tooluniverse.hpa_tool module¶
- class tooluniverse.hpa_tool.HPASearchApiTool[source]¶
Bases:
BaseTool
Base 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[source]¶
Bases:
BaseTool
Base class for interacting with HPA’s /{ensembl_id}.json API. More efficient for getting comprehensive gene data.
- class tooluniverse.hpa_tool.HPAXmlApiTool[source]¶
Bases:
BaseTool
Base class for interacting with HPA’s /{ensembl_id}.xml API. Optimized for comprehensive XML data extraction.
- class tooluniverse.hpa_tool.HPAGetRnaExpressionBySourceTool[source]¶
Bases:
HPASearchApiTool
Get RNA expression for a gene from specific biological sources using optimized columns parameter. This tool directly leverages the comprehensive columns table for efficient queries.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetSubcellularLocationTool[source]¶
Bases:
HPASearchApiTool
Get annotated subcellular locations for a protein using optimized columns parameter. Uses scml (main location) and scal (additional location) columns for efficient queries.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPASearchGenesTool[source]¶
Bases:
HPASearchApiTool
Search 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.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetComparativeExpressionTool[source]¶
Bases:
HPASearchApiTool
Compare gene expression levels in specific cell lines and healthy tissues. Get expression data for comparison by gene name and cell line name.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetDiseaseExpressionTool[source]¶
Bases:
HPASearchApiTool
Get expression data for a gene in specific diseases and tissues. Get related expression information by gene name, tissue type, and disease name.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetBiologicalProcessTool[source]¶
Bases:
HPASearchApiTool
Get biological process information related to a gene. Get specific biological processes a gene is involved in by gene name.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetCancerPrognosticsTool[source]¶
Bases:
HPAJsonApiTool
Get prognostic value of a gene across various cancers. Uses the efficient JSON API to retrieve cancer prognostic data.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetProteinInteractionsTool[source]¶
Bases:
HPASearchApiTool
Get protein-protein interaction partners for a gene. Uses search API to retrieve interaction data.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetRnaExpressionByTissueTool[source]¶
Bases:
HPAJsonApiTool
Query RNA expression levels for a gene in specific tissues. More precise than general tissue expression queries.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetContextualBiologicalProcessTool[source]¶
Bases:
BaseTool
Analyze a gene’s biological processes in the context of specific tissue or cell line. Enhanced with intelligent context validation and recommendation.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetGenePageDetailsTool[source]¶
Bases:
HPAXmlApiTool
Get 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.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetGeneJSONTool[source]¶
Bases:
HPAJsonApiTool
Enhanced legacy tool - Get basic gene information using Ensembl Gene ID. Now uses the efficient JSON API instead of search API.
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.
- class tooluniverse.hpa_tool.HPAGetGeneXMLTool[source]¶
Bases:
HPASearchApiTool
Legacy tool - Get gene TSV format data (alternative to XML).
- run(arguments)[source]¶
Execute the tool.
The default BaseTool implementation accepts an optional arguments mapping to align with most concrete tool implementations which expect a dictionary of inputs.
- Parameters:
arguments (
dict, optional
) – Tool-specific argumentsstream_callback (
callable, optional
) – Callback for streaming responsesuse_cache (
bool, optional
) – Whether result caching is enabledvalidate (
bool, optional
) – Whether parameter validation was performed
Note
These additional parameters (stream_callback, use_cache, validate) are passed from run_one_function() to provide context about the execution. Tools can use these for optimization or special handling.
For backward compatibility, tools that don’t accept these parameters will still work - they will only receive the arguments parameter.