tooluniverse.hpa_tool moduleΒΆ
- class tooluniverse.hpa_tool.BaseTool(tool_config)[source][source]ΒΆ
Bases:
object- classmethod get_default_config_file()[source][source]ΒΆ
Get the path to the default configuration file for this tool type.
This method uses a robust path resolution strategy that works across different installation scenarios:
Installed packages: Uses importlib.resources for proper package resource access
Development mode: Falls back to file-based path resolution
Legacy Python: Handles importlib.resources and importlib_resources
Override this method in subclasses to specify a custom defaults file.
- Returns:
Path or resource object pointing to the defaults file
- tooluniverse.hpa_tool.register_tool(tool_type_name=None, config=None)[source][source]ΒΆ
Decorator to automatically register tool classes and their configs.
- Usage:
@register_tool(βCustomToolNameβ, config={β¦}) class MyTool:
pass
- class tooluniverse.hpa_tool.HPASearchApiTool(tool_config)[source][source]ΒΆ
Bases:
BaseToolBase class for interacting with HPAβs search_download.php API. Uses HPAβs search and download API to get protein expression data.
- class tooluniverse.hpa_tool.HPAJsonApiTool(tool_config)[source][source]ΒΆ
Bases:
BaseToolBase class for interacting with HPAβs /{ensembl_id}.json API. More efficient for getting comprehensive gene data.
- class tooluniverse.hpa_tool.HPAXmlApiTool(tool_config)[source][source]ΒΆ
Bases:
BaseToolBase class for interacting with HPAβs /{ensembl_id}.xml API. Optimized for comprehensive XML data extraction.
- class tooluniverse.hpa_tool.HPAGetRnaExpressionBySourceTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolGet RNA expression for a gene from specific biological sources using optimized columns parameter. This tool directly leverages the comprehensive columns table for efficient queries.
- class tooluniverse.hpa_tool.HPAGetSubcellularLocationTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolGet annotated subcellular locations for a protein using optimized columns parameter. Uses scml (main location) and scal (additional location) columns for efficient queries.
- class tooluniverse.hpa_tool.HPASearchGenesTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolSearch for matching genes by gene name, keywords, or cell line names and return Ensembl ID list. This is the entry tool for many query workflows.
- class tooluniverse.hpa_tool.HPAGetComparativeExpressionTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolCompare gene expression levels in specific cell lines and healthy tissues. Get expression data for comparison by gene name and cell line name.
- class tooluniverse.hpa_tool.HPAGetDiseaseExpressionTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolGet expression data for a gene in specific diseases and tissues. Get related expression information by gene name, tissue type, and disease name.
- class tooluniverse.hpa_tool.HPAGetBiologicalProcessTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolGet biological process information related to a gene. Get specific biological processes a gene is involved in by gene name.
- class tooluniverse.hpa_tool.HPAGetCancerPrognosticsTool(tool_config)[source][source]ΒΆ
Bases:
HPAJsonApiToolGet prognostic value of a gene across various cancers. Uses the efficient JSON API to retrieve cancer prognostic data.
- class tooluniverse.hpa_tool.HPAGetProteinInteractionsTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolGet protein-protein interaction partners for a gene. Uses search API to retrieve interaction data.
- class tooluniverse.hpa_tool.HPAGetRnaExpressionByTissueTool(tool_config)[source][source]ΒΆ
Bases:
HPAJsonApiToolQuery RNA expression levels for a gene in specific tissues. More precise than general tissue expression queries.
- class tooluniverse.hpa_tool.HPAGetContextualBiologicalProcessTool(tool_config)[source][source]ΒΆ
Bases:
BaseToolAnalyze a geneβs biological processes in the context of specific tissue or cell line. Enhanced with intelligent context validation and recommendation.
- class tooluniverse.hpa_tool.HPAGetGenePageDetailsTool(tool_config)[source][source]ΒΆ
Bases:
HPAXmlApiToolGet detailed information about a gene page, including images, protein expression, antibody data, etc. Get the most comprehensive data by parsing HPAβs single gene XML endpoint. Enhanced version with improved image extraction and comprehensive data parsing based on optimization plan.
- class tooluniverse.hpa_tool.HPAGetGeneJSONTool(tool_config)[source][source]ΒΆ
Bases:
HPAJsonApiToolEnhanced legacy tool - Get basic gene information using Ensembl Gene ID. Now uses the efficient JSON API instead of search API.
- class tooluniverse.hpa_tool.HPAGetGeneXMLTool(tool_config)[source][source]ΒΆ
Bases:
HPASearchApiToolLegacy tool - Get gene TSV format data (alternative to XML).