tooluniverse 1.0.7__py3-none-any.whl → 1.0.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of tooluniverse might be problematic. Click here for more details.
- tooluniverse/__init__.py +37 -14
- tooluniverse/admetai_tool.py +16 -5
- tooluniverse/base_tool.py +36 -0
- tooluniverse/biogrid_tool.py +118 -0
- tooluniverse/build_optimizer.py +87 -0
- tooluniverse/cache/__init__.py +3 -0
- tooluniverse/cache/memory_cache.py +99 -0
- tooluniverse/cache/result_cache_manager.py +235 -0
- tooluniverse/cache/sqlite_backend.py +257 -0
- tooluniverse/clinvar_tool.py +90 -0
- tooluniverse/compose_scripts/output_summarizer.py +87 -33
- tooluniverse/compose_tool.py +2 -2
- tooluniverse/custom_tool.py +28 -0
- tooluniverse/data/adverse_event_tools.json +97 -98
- tooluniverse/data/agentic_tools.json +81 -162
- tooluniverse/data/arxiv_tools.json +1 -4
- tooluniverse/data/compose_tools.json +0 -54
- tooluniverse/data/core_tools.json +1 -4
- tooluniverse/data/dataset_tools.json +7 -7
- tooluniverse/data/doaj_tools.json +1 -3
- tooluniverse/data/drug_discovery_agents.json +282 -0
- tooluniverse/data/europe_pmc_tools.json +1 -2
- tooluniverse/data/genomics_tools.json +174 -0
- tooluniverse/data/geo_tools.json +86 -0
- tooluniverse/data/literature_search_tools.json +15 -35
- tooluniverse/data/markitdown_tools.json +51 -0
- tooluniverse/data/monarch_tools.json +1 -2
- tooluniverse/data/openalex_tools.json +1 -5
- tooluniverse/data/opentarget_tools.json +8 -16
- tooluniverse/data/output_summarization_tools.json +23 -20
- tooluniverse/data/packages/bioinformatics_core_tools.json +2 -2
- tooluniverse/data/packages/cheminformatics_tools.json +1 -1
- tooluniverse/data/packages/genomics_tools.json +1 -1
- tooluniverse/data/packages/single_cell_tools.json +1 -1
- tooluniverse/data/packages/structural_biology_tools.json +1 -1
- tooluniverse/data/pmc_tools.json +1 -4
- tooluniverse/data/ppi_tools.json +139 -0
- tooluniverse/data/pubmed_tools.json +1 -3
- tooluniverse/data/semantic_scholar_tools.json +1 -2
- tooluniverse/data/tool_composition_tools.json +2 -4
- tooluniverse/data/unified_guideline_tools.json +206 -4
- tooluniverse/data/xml_tools.json +15 -15
- tooluniverse/data/zenodo_tools.json +1 -2
- tooluniverse/dbsnp_tool.py +71 -0
- tooluniverse/default_config.py +6 -0
- tooluniverse/ensembl_tool.py +61 -0
- tooluniverse/execute_function.py +235 -76
- tooluniverse/generate_tools.py +303 -20
- tooluniverse/genomics_gene_search_tool.py +56 -0
- tooluniverse/geo_tool.py +116 -0
- tooluniverse/gnomad_tool.py +63 -0
- tooluniverse/logging_config.py +64 -2
- tooluniverse/markitdown_tool.py +159 -0
- tooluniverse/mcp_client_tool.py +10 -5
- tooluniverse/molecule_2d_tool.py +9 -3
- tooluniverse/molecule_3d_tool.py +9 -3
- tooluniverse/output_hook.py +217 -150
- tooluniverse/smcp.py +18 -10
- tooluniverse/smcp_server.py +89 -199
- tooluniverse/string_tool.py +112 -0
- tooluniverse/tools/{MultiAgentLiteratureSearch.py → ADMETAnalyzerAgent.py} +18 -18
- tooluniverse/tools/ArXiv_search_papers.py +3 -3
- tooluniverse/tools/CMA_Guidelines_Search.py +52 -0
- tooluniverse/tools/CORE_search_papers.py +3 -3
- tooluniverse/tools/ClinVar_search_variants.py +52 -0
- tooluniverse/tools/ClinicalTrialDesignAgent.py +63 -0
- tooluniverse/tools/CompoundDiscoveryAgent.py +59 -0
- tooluniverse/tools/DOAJ_search_articles.py +2 -2
- tooluniverse/tools/DiseaseAnalyzerAgent.py +52 -0
- tooluniverse/tools/DrugInteractionAnalyzerAgent.py +52 -0
- tooluniverse/tools/DrugOptimizationAgent.py +63 -0
- tooluniverse/tools/Ensembl_lookup_gene_by_symbol.py +52 -0
- tooluniverse/tools/EuropePMC_search_articles.py +1 -1
- tooluniverse/tools/GIN_Guidelines_Search.py +52 -0
- tooluniverse/tools/GWAS_search_associations_by_gene.py +52 -0
- tooluniverse/tools/LiteratureSynthesisAgent.py +59 -0
- tooluniverse/tools/PMC_search_papers.py +3 -3
- tooluniverse/tools/PubMed_search_articles.py +2 -2
- tooluniverse/tools/SemanticScholar_search_papers.py +1 -1
- tooluniverse/tools/UCSC_get_genes_by_region.py +67 -0
- tooluniverse/tools/Zenodo_search_records.py +1 -1
- tooluniverse/tools/__init__.py +33 -3
- tooluniverse/tools/convert_to_markdown.py +59 -0
- tooluniverse/tools/dbSNP_get_variant_by_rsid.py +46 -0
- tooluniverse/tools/gnomAD_query_variant.py +52 -0
- tooluniverse/tools/openalex_literature_search.py +4 -4
- tooluniverse/ucsc_tool.py +60 -0
- tooluniverse/unified_guideline_tools.py +1175 -57
- tooluniverse/utils.py +51 -4
- tooluniverse/zenodo_tool.py +2 -1
- {tooluniverse-1.0.7.dist-info → tooluniverse-1.0.9.dist-info}/METADATA +10 -3
- {tooluniverse-1.0.7.dist-info → tooluniverse-1.0.9.dist-info}/RECORD +96 -61
- {tooluniverse-1.0.7.dist-info → tooluniverse-1.0.9.dist-info}/entry_points.txt +0 -3
- {tooluniverse-1.0.7.dist-info → tooluniverse-1.0.9.dist-info}/WHEEL +0 -0
- {tooluniverse-1.0.7.dist-info → tooluniverse-1.0.9.dist-info}/licenses/LICENSE +0 -0
- {tooluniverse-1.0.7.dist-info → tooluniverse-1.0.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ClinicalTrialDesignAgent
|
|
3
|
+
|
|
4
|
+
AI agent that designs clinical trial protocols based on preclinical data and regulatory requirements
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def ClinicalTrialDesignAgent(
|
|
12
|
+
drug_name: str,
|
|
13
|
+
indication: str,
|
|
14
|
+
preclinical_data: Optional[str] = "",
|
|
15
|
+
target_population: Optional[str] = "General adult population",
|
|
16
|
+
*,
|
|
17
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
18
|
+
use_cache: bool = False,
|
|
19
|
+
validate: bool = True,
|
|
20
|
+
) -> Any:
|
|
21
|
+
"""
|
|
22
|
+
AI agent that designs clinical trial protocols based on preclinical data and regulatory requirements
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
drug_name : str
|
|
27
|
+
Name of the drug candidate
|
|
28
|
+
indication : str
|
|
29
|
+
Disease indication
|
|
30
|
+
preclinical_data : str
|
|
31
|
+
Preclinical efficacy and safety data
|
|
32
|
+
target_population : str
|
|
33
|
+
Target patient population
|
|
34
|
+
stream_callback : Callable, optional
|
|
35
|
+
Callback for streaming output
|
|
36
|
+
use_cache : bool, default False
|
|
37
|
+
Enable caching
|
|
38
|
+
validate : bool, default True
|
|
39
|
+
Validate parameters
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
Any
|
|
44
|
+
"""
|
|
45
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
46
|
+
|
|
47
|
+
return get_shared_client().run_one_function(
|
|
48
|
+
{
|
|
49
|
+
"name": "ClinicalTrialDesignAgent",
|
|
50
|
+
"arguments": {
|
|
51
|
+
"drug_name": drug_name,
|
|
52
|
+
"indication": indication,
|
|
53
|
+
"preclinical_data": preclinical_data,
|
|
54
|
+
"target_population": target_population,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
stream_callback=stream_callback,
|
|
58
|
+
use_cache=use_cache,
|
|
59
|
+
validate=validate,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
__all__ = ["ClinicalTrialDesignAgent"]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
CompoundDiscoveryAgent
|
|
3
|
+
|
|
4
|
+
AI agent that analyzes potential drug compounds using multiple strategies and LLM reasoning
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def CompoundDiscoveryAgent(
|
|
12
|
+
disease_name: str,
|
|
13
|
+
targets: str,
|
|
14
|
+
context: Optional[str] = "",
|
|
15
|
+
*,
|
|
16
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
17
|
+
use_cache: bool = False,
|
|
18
|
+
validate: bool = True,
|
|
19
|
+
) -> Any:
|
|
20
|
+
"""
|
|
21
|
+
AI agent that analyzes potential drug compounds using multiple strategies and LLM reasoning
|
|
22
|
+
|
|
23
|
+
Parameters
|
|
24
|
+
----------
|
|
25
|
+
disease_name : str
|
|
26
|
+
Name of the disease
|
|
27
|
+
targets : str
|
|
28
|
+
List of therapeutic targets (comma-separated)
|
|
29
|
+
context : str
|
|
30
|
+
Additional context or specific requirements
|
|
31
|
+
stream_callback : Callable, optional
|
|
32
|
+
Callback for streaming output
|
|
33
|
+
use_cache : bool, default False
|
|
34
|
+
Enable caching
|
|
35
|
+
validate : bool, default True
|
|
36
|
+
Validate parameters
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
Any
|
|
41
|
+
"""
|
|
42
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
43
|
+
|
|
44
|
+
return get_shared_client().run_one_function(
|
|
45
|
+
{
|
|
46
|
+
"name": "CompoundDiscoveryAgent",
|
|
47
|
+
"arguments": {
|
|
48
|
+
"disease_name": disease_name,
|
|
49
|
+
"targets": targets,
|
|
50
|
+
"context": context,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
stream_callback=stream_callback,
|
|
54
|
+
use_cache=use_cache,
|
|
55
|
+
validate=validate,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
__all__ = ["CompoundDiscoveryAgent"]
|
|
@@ -10,8 +10,8 @@ from ._shared_client import get_shared_client
|
|
|
10
10
|
|
|
11
11
|
def DOAJ_search_articles(
|
|
12
12
|
query: str,
|
|
13
|
-
max_results: int,
|
|
14
|
-
type: str,
|
|
13
|
+
max_results: Optional[int] = 10,
|
|
14
|
+
type: Optional[str] = "articles",
|
|
15
15
|
*,
|
|
16
16
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
17
17
|
use_cache: bool = False,
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DiseaseAnalyzerAgent
|
|
3
|
+
|
|
4
|
+
AI agent that analyzes disease characteristics and identifies potential therapeutic targets using...
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def DiseaseAnalyzerAgent(
|
|
12
|
+
disease_name: str,
|
|
13
|
+
context: Optional[str] = "",
|
|
14
|
+
*,
|
|
15
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
|
+
use_cache: bool = False,
|
|
17
|
+
validate: bool = True,
|
|
18
|
+
) -> Any:
|
|
19
|
+
"""
|
|
20
|
+
AI agent that analyzes disease characteristics and identifies potential therapeutic targets using...
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
disease_name : str
|
|
25
|
+
Name of the disease to analyze
|
|
26
|
+
context : str
|
|
27
|
+
Additional context or specific focus areas
|
|
28
|
+
stream_callback : Callable, optional
|
|
29
|
+
Callback for streaming output
|
|
30
|
+
use_cache : bool, default False
|
|
31
|
+
Enable caching
|
|
32
|
+
validate : bool, default True
|
|
33
|
+
Validate parameters
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
Any
|
|
38
|
+
"""
|
|
39
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
40
|
+
|
|
41
|
+
return get_shared_client().run_one_function(
|
|
42
|
+
{
|
|
43
|
+
"name": "DiseaseAnalyzerAgent",
|
|
44
|
+
"arguments": {"disease_name": disease_name, "context": context},
|
|
45
|
+
},
|
|
46
|
+
stream_callback=stream_callback,
|
|
47
|
+
use_cache=use_cache,
|
|
48
|
+
validate=validate,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = ["DiseaseAnalyzerAgent"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DrugInteractionAnalyzerAgent
|
|
3
|
+
|
|
4
|
+
AI agent that analyzes drug-drug interactions and provides clinical recommendations
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def DrugInteractionAnalyzerAgent(
|
|
12
|
+
compounds: str,
|
|
13
|
+
patient_context: Optional[str] = "General adult population",
|
|
14
|
+
*,
|
|
15
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
|
+
use_cache: bool = False,
|
|
17
|
+
validate: bool = True,
|
|
18
|
+
) -> Any:
|
|
19
|
+
"""
|
|
20
|
+
AI agent that analyzes drug-drug interactions and provides clinical recommendations
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
compounds : str
|
|
25
|
+
List of compounds to analyze for interactions (comma-separated)
|
|
26
|
+
patient_context : str
|
|
27
|
+
Patient context (age, comorbidities, medications, etc.)
|
|
28
|
+
stream_callback : Callable, optional
|
|
29
|
+
Callback for streaming output
|
|
30
|
+
use_cache : bool, default False
|
|
31
|
+
Enable caching
|
|
32
|
+
validate : bool, default True
|
|
33
|
+
Validate parameters
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
Any
|
|
38
|
+
"""
|
|
39
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
40
|
+
|
|
41
|
+
return get_shared_client().run_one_function(
|
|
42
|
+
{
|
|
43
|
+
"name": "DrugInteractionAnalyzerAgent",
|
|
44
|
+
"arguments": {"compounds": compounds, "patient_context": patient_context},
|
|
45
|
+
},
|
|
46
|
+
stream_callback=stream_callback,
|
|
47
|
+
use_cache=use_cache,
|
|
48
|
+
validate=validate,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = ["DrugInteractionAnalyzerAgent"]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
DrugOptimizationAgent
|
|
3
|
+
|
|
4
|
+
AI agent that analyzes drug optimization strategies based on ADMET and efficacy data
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def DrugOptimizationAgent(
|
|
12
|
+
compounds: str,
|
|
13
|
+
admet_data: Optional[str] = "",
|
|
14
|
+
efficacy_data: Optional[str] = "",
|
|
15
|
+
target_profile: Optional[str] = "",
|
|
16
|
+
*,
|
|
17
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
18
|
+
use_cache: bool = False,
|
|
19
|
+
validate: bool = True,
|
|
20
|
+
) -> Any:
|
|
21
|
+
"""
|
|
22
|
+
AI agent that analyzes drug optimization strategies based on ADMET and efficacy data
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
compounds : str
|
|
27
|
+
List of compounds to optimize (comma-separated)
|
|
28
|
+
admet_data : str
|
|
29
|
+
ADMET properties and issues
|
|
30
|
+
efficacy_data : str
|
|
31
|
+
Efficacy and potency data
|
|
32
|
+
target_profile : str
|
|
33
|
+
Target profile and requirements
|
|
34
|
+
stream_callback : Callable, optional
|
|
35
|
+
Callback for streaming output
|
|
36
|
+
use_cache : bool, default False
|
|
37
|
+
Enable caching
|
|
38
|
+
validate : bool, default True
|
|
39
|
+
Validate parameters
|
|
40
|
+
|
|
41
|
+
Returns
|
|
42
|
+
-------
|
|
43
|
+
Any
|
|
44
|
+
"""
|
|
45
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
46
|
+
|
|
47
|
+
return get_shared_client().run_one_function(
|
|
48
|
+
{
|
|
49
|
+
"name": "DrugOptimizationAgent",
|
|
50
|
+
"arguments": {
|
|
51
|
+
"compounds": compounds,
|
|
52
|
+
"admet_data": admet_data,
|
|
53
|
+
"efficacy_data": efficacy_data,
|
|
54
|
+
"target_profile": target_profile,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
stream_callback=stream_callback,
|
|
58
|
+
use_cache=use_cache,
|
|
59
|
+
validate=validate,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
__all__ = ["DrugOptimizationAgent"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Ensembl_lookup_gene_by_symbol
|
|
3
|
+
|
|
4
|
+
Lookup Ensembl gene by species and gene symbol, returning core metadata and coordinates (uses /xr...
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def Ensembl_lookup_gene_by_symbol(
|
|
12
|
+
symbol: str,
|
|
13
|
+
species: Optional[str] = "homo_sapiens",
|
|
14
|
+
*,
|
|
15
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
|
+
use_cache: bool = False,
|
|
17
|
+
validate: bool = True,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
"""
|
|
20
|
+
Lookup Ensembl gene by species and gene symbol, returning core metadata and coordinates (uses /xr...
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
species : str
|
|
25
|
+
Species name (e.g., 'homo_sapiens').
|
|
26
|
+
symbol : str
|
|
27
|
+
Gene symbol (e.g., BRCA1).
|
|
28
|
+
stream_callback : Callable, optional
|
|
29
|
+
Callback for streaming output
|
|
30
|
+
use_cache : bool, default False
|
|
31
|
+
Enable caching
|
|
32
|
+
validate : bool, default True
|
|
33
|
+
Validate parameters
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
dict[str, Any]
|
|
38
|
+
"""
|
|
39
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
40
|
+
|
|
41
|
+
return get_shared_client().run_one_function(
|
|
42
|
+
{
|
|
43
|
+
"name": "Ensembl_lookup_gene_by_symbol",
|
|
44
|
+
"arguments": {"species": species, "symbol": symbol},
|
|
45
|
+
},
|
|
46
|
+
stream_callback=stream_callback,
|
|
47
|
+
use_cache=use_cache,
|
|
48
|
+
validate=validate,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = ["Ensembl_lookup_gene_by_symbol"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GIN_Guidelines_Search
|
|
3
|
+
|
|
4
|
+
Search Guidelines International Network (GIN) guidelines database. GIN maintains the world's larg...
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def GIN_Guidelines_Search(
|
|
12
|
+
query: str,
|
|
13
|
+
limit: int,
|
|
14
|
+
*,
|
|
15
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
|
+
use_cache: bool = False,
|
|
17
|
+
validate: bool = True,
|
|
18
|
+
) -> list[Any]:
|
|
19
|
+
"""
|
|
20
|
+
Search Guidelines International Network (GIN) guidelines database. GIN maintains the world's larg...
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
query : str
|
|
25
|
+
Medical condition, treatment, or clinical topic to search for in GIN guidelin...
|
|
26
|
+
limit : int
|
|
27
|
+
Maximum number of guidelines to return (default: 10)
|
|
28
|
+
stream_callback : Callable, optional
|
|
29
|
+
Callback for streaming output
|
|
30
|
+
use_cache : bool, default False
|
|
31
|
+
Enable caching
|
|
32
|
+
validate : bool, default True
|
|
33
|
+
Validate parameters
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
list[Any]
|
|
38
|
+
"""
|
|
39
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
40
|
+
|
|
41
|
+
return get_shared_client().run_one_function(
|
|
42
|
+
{
|
|
43
|
+
"name": "GIN_Guidelines_Search",
|
|
44
|
+
"arguments": {"query": query, "limit": limit},
|
|
45
|
+
},
|
|
46
|
+
stream_callback=stream_callback,
|
|
47
|
+
use_cache=use_cache,
|
|
48
|
+
validate=validate,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = ["GIN_Guidelines_Search"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GWAS_search_associations_by_gene
|
|
3
|
+
|
|
4
|
+
Search GWAS Catalog associations by gene name (returns strongest risk allele and p-value fields).
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def GWAS_search_associations_by_gene(
|
|
12
|
+
gene_name: str,
|
|
13
|
+
size: Optional[int] = 5,
|
|
14
|
+
*,
|
|
15
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
|
+
use_cache: bool = False,
|
|
17
|
+
validate: bool = True,
|
|
18
|
+
) -> dict[str, Any]:
|
|
19
|
+
"""
|
|
20
|
+
Search GWAS Catalog associations by gene name (returns strongest risk allele and p-value fields).
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
gene_name : str
|
|
25
|
+
Gene symbol (e.g., BRCA1).
|
|
26
|
+
size : int
|
|
27
|
+
Max associations to return.
|
|
28
|
+
stream_callback : Callable, optional
|
|
29
|
+
Callback for streaming output
|
|
30
|
+
use_cache : bool, default False
|
|
31
|
+
Enable caching
|
|
32
|
+
validate : bool, default True
|
|
33
|
+
Validate parameters
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
dict[str, Any]
|
|
38
|
+
"""
|
|
39
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
40
|
+
|
|
41
|
+
return get_shared_client().run_one_function(
|
|
42
|
+
{
|
|
43
|
+
"name": "GWAS_search_associations_by_gene",
|
|
44
|
+
"arguments": {"gene_name": gene_name, "size": size},
|
|
45
|
+
},
|
|
46
|
+
stream_callback=stream_callback,
|
|
47
|
+
use_cache=use_cache,
|
|
48
|
+
validate=validate,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = ["GWAS_search_associations_by_gene"]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
LiteratureSynthesisAgent
|
|
3
|
+
|
|
4
|
+
AI agent that synthesizes literature findings and provides evidence-based insights
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def LiteratureSynthesisAgent(
|
|
12
|
+
topic: str,
|
|
13
|
+
literature_data: str,
|
|
14
|
+
focus_area: Optional[str] = "General",
|
|
15
|
+
*,
|
|
16
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
17
|
+
use_cache: bool = False,
|
|
18
|
+
validate: bool = True,
|
|
19
|
+
) -> Any:
|
|
20
|
+
"""
|
|
21
|
+
AI agent that synthesizes literature findings and provides evidence-based insights
|
|
22
|
+
|
|
23
|
+
Parameters
|
|
24
|
+
----------
|
|
25
|
+
topic : str
|
|
26
|
+
Research topic or question
|
|
27
|
+
literature_data : str
|
|
28
|
+
Literature findings or abstracts to synthesize
|
|
29
|
+
focus_area : str
|
|
30
|
+
Specific focus area for synthesis
|
|
31
|
+
stream_callback : Callable, optional
|
|
32
|
+
Callback for streaming output
|
|
33
|
+
use_cache : bool, default False
|
|
34
|
+
Enable caching
|
|
35
|
+
validate : bool, default True
|
|
36
|
+
Validate parameters
|
|
37
|
+
|
|
38
|
+
Returns
|
|
39
|
+
-------
|
|
40
|
+
Any
|
|
41
|
+
"""
|
|
42
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
43
|
+
|
|
44
|
+
return get_shared_client().run_one_function(
|
|
45
|
+
{
|
|
46
|
+
"name": "LiteratureSynthesisAgent",
|
|
47
|
+
"arguments": {
|
|
48
|
+
"topic": topic,
|
|
49
|
+
"literature_data": literature_data,
|
|
50
|
+
"focus_area": focus_area,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
stream_callback=stream_callback,
|
|
54
|
+
use_cache=use_cache,
|
|
55
|
+
validate=validate,
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
__all__ = ["LiteratureSynthesisAgent"]
|
|
@@ -11,9 +11,9 @@ from ._shared_client import get_shared_client
|
|
|
11
11
|
def PMC_search_papers(
|
|
12
12
|
query: str,
|
|
13
13
|
limit: int,
|
|
14
|
-
date_from: str,
|
|
15
|
-
date_to: str,
|
|
16
|
-
article_type: str,
|
|
14
|
+
date_from: Optional[str] = None,
|
|
15
|
+
date_to: Optional[str] = None,
|
|
16
|
+
article_type: Optional[str] = None,
|
|
17
17
|
*,
|
|
18
18
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
19
19
|
use_cache: bool = False,
|
|
@@ -10,8 +10,8 @@ from ._shared_client import get_shared_client
|
|
|
10
10
|
|
|
11
11
|
def PubMed_search_articles(
|
|
12
12
|
query: str,
|
|
13
|
-
limit: int,
|
|
14
|
-
api_key: str,
|
|
13
|
+
limit: Optional[int] = 10,
|
|
14
|
+
api_key: Optional[str] = None,
|
|
15
15
|
*,
|
|
16
16
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
17
17
|
use_cache: bool = False,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"""
|
|
2
|
+
UCSC_get_genes_by_region
|
|
3
|
+
|
|
4
|
+
Query UCSC Genome Browser track API for knownGene features in a genomic window.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def UCSC_get_genes_by_region(
|
|
12
|
+
chrom: str,
|
|
13
|
+
start: int,
|
|
14
|
+
end: int,
|
|
15
|
+
genome: Optional[str] = "hg38",
|
|
16
|
+
track: Optional[str] = "knownGene",
|
|
17
|
+
*,
|
|
18
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
19
|
+
use_cache: bool = False,
|
|
20
|
+
validate: bool = True,
|
|
21
|
+
) -> dict[str, Any]:
|
|
22
|
+
"""
|
|
23
|
+
Query UCSC Genome Browser track API for knownGene features in a genomic window.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
genome : str
|
|
28
|
+
Genome assembly (e.g., hg38).
|
|
29
|
+
chrom : str
|
|
30
|
+
Chromosome (e.g., chr17).
|
|
31
|
+
start : int
|
|
32
|
+
Start position (0-based).
|
|
33
|
+
end : int
|
|
34
|
+
End position.
|
|
35
|
+
track : str
|
|
36
|
+
Track name.
|
|
37
|
+
stream_callback : Callable, optional
|
|
38
|
+
Callback for streaming output
|
|
39
|
+
use_cache : bool, default False
|
|
40
|
+
Enable caching
|
|
41
|
+
validate : bool, default True
|
|
42
|
+
Validate parameters
|
|
43
|
+
|
|
44
|
+
Returns
|
|
45
|
+
-------
|
|
46
|
+
dict[str, Any]
|
|
47
|
+
"""
|
|
48
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
49
|
+
|
|
50
|
+
return get_shared_client().run_one_function(
|
|
51
|
+
{
|
|
52
|
+
"name": "UCSC_get_genes_by_region",
|
|
53
|
+
"arguments": {
|
|
54
|
+
"genome": genome,
|
|
55
|
+
"chrom": chrom,
|
|
56
|
+
"start": start,
|
|
57
|
+
"end": end,
|
|
58
|
+
"track": track,
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
stream_callback=stream_callback,
|
|
62
|
+
use_cache=use_cache,
|
|
63
|
+
validate=validate,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
__all__ = ["UCSC_get_genes_by_region"]
|
|
@@ -11,7 +11,7 @@ from ._shared_client import get_shared_client
|
|
|
11
11
|
def Zenodo_search_records(
|
|
12
12
|
query: str,
|
|
13
13
|
max_results: int,
|
|
14
|
-
community: str,
|
|
14
|
+
community: Optional[str] = None,
|
|
15
15
|
*,
|
|
16
16
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
17
17
|
use_cache: bool = False,
|