tooluniverse.humanbase_tool moduleΒΆ

class tooluniverse.humanbase_tool.HumanBaseTool(tool_config)[source]ΒΆ

Bases: BaseTool

Tool to retrieve protein-protein interactions and biological processes from HumanBase.

__init__(tool_config)[source]ΒΆ
_convert_to_string(graph, bp_collection, original_genes, tissue)[source]ΒΆ

Convert NetworkX graph and biological processes to string representation.

Parameters:
  • graph (networkx.Graph) – The network graph.

  • bp_collection (list) – List of biological processes.

  • original_genes (list) – Original gene list provided by user.

  • tissue (str) – Tissue type used for analysis.

Returns:

Comprehensive string representation of the network data.

Return type:

str

_get_current_timestamp()[source]ΒΆ

Get current timestamp for the report.

get_entrez_ids(gene_names)[source]ΒΆ

Convert gene names to Entrez IDs using NCBI Entrez API.

Parameters:

gene_names (list) – List of gene names to convert.

Returns:

List of Entrez IDs corresponding to the gene names.

Return type:

list

get_official_gene_name(gene_name)[source]ΒΆ

Retrieve the official gene symbol (same as EnrichrTool method)

Parameters:

gene_name (str) – The gene name or synonym to query.

Returns:

The official gene symbol.

Return type:

str

humanbase_ppi_retrieve(genes, tissue, max_node=10, interaction=None)[source]ΒΆ

Retrieve protein-protein interactions and biological processes from HumanBase.

Parameters:
  • genes (list) – List of gene names to analyze.

  • tissue (str) – Tissue type for tissue-specific interactions.

  • max_node (int) – Maximum number of nodes to retrieve.

  • interaction (str) – Specific interaction type to filter by.

Returns:

(NetworkX Graph of interactions, list of biological processes)

Return type:

tuple

run(arguments)[source]ΒΆ

Main entry point for the tool.