tooluniverse 1.0.10__py3-none-any.whl → 1.0.11.1__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 +57 -1
- tooluniverse/blast_tool.py +132 -0
- tooluniverse/boltz_tool.py +2 -2
- tooluniverse/cbioportal_tool.py +42 -0
- tooluniverse/clinvar_tool.py +268 -74
- tooluniverse/compose_scripts/tool_discover.py +1941 -443
- tooluniverse/data/agentic_tools.json +0 -370
- tooluniverse/data/alphafold_tools.json +6 -6
- tooluniverse/data/blast_tools.json +112 -0
- tooluniverse/data/cbioportal_tools.json +87 -0
- tooluniverse/data/clinvar_tools.json +235 -0
- tooluniverse/data/compose_tools.json +0 -89
- tooluniverse/data/dbsnp_tools.json +275 -0
- tooluniverse/data/emdb_tools.json +61 -0
- tooluniverse/data/ensembl_tools.json +259 -0
- tooluniverse/data/file_download_tools.json +275 -0
- tooluniverse/data/geo_tools.json +200 -48
- tooluniverse/data/gnomad_tools.json +109 -0
- tooluniverse/data/gtopdb_tools.json +68 -0
- tooluniverse/data/gwas_tools.json +32 -0
- tooluniverse/data/interpro_tools.json +199 -0
- tooluniverse/data/jaspar_tools.json +70 -0
- tooluniverse/data/kegg_tools.json +356 -0
- tooluniverse/data/mpd_tools.json +87 -0
- tooluniverse/data/ols_tools.json +314 -0
- tooluniverse/data/package_discovery_tools.json +64 -0
- tooluniverse/data/packages/categorized_tools.txt +0 -1
- tooluniverse/data/packages/machine_learning_tools.json +0 -47
- tooluniverse/data/paleobiology_tools.json +91 -0
- tooluniverse/data/pride_tools.json +62 -0
- tooluniverse/data/pypi_package_inspector_tools.json +158 -0
- tooluniverse/data/python_executor_tools.json +341 -0
- tooluniverse/data/regulomedb_tools.json +50 -0
- tooluniverse/data/remap_tools.json +89 -0
- tooluniverse/data/screen_tools.json +89 -0
- tooluniverse/data/tool_discovery_agents.json +428 -0
- tooluniverse/data/tool_discovery_agents.json.backup +1343 -0
- tooluniverse/data/uniprot_tools.json +77 -0
- tooluniverse/data/web_search_tools.json +250 -0
- tooluniverse/data/worms_tools.json +55 -0
- tooluniverse/dbsnp_tool.py +196 -58
- tooluniverse/default_config.py +35 -2
- tooluniverse/emdb_tool.py +30 -0
- tooluniverse/ensembl_tool.py +140 -47
- tooluniverse/execute_function.py +78 -14
- tooluniverse/file_download_tool.py +269 -0
- tooluniverse/geo_tool.py +81 -28
- tooluniverse/gnomad_tool.py +100 -52
- tooluniverse/gtopdb_tool.py +41 -0
- tooluniverse/interpro_tool.py +72 -0
- tooluniverse/jaspar_tool.py +30 -0
- tooluniverse/kegg_tool.py +230 -0
- tooluniverse/mpd_tool.py +42 -0
- tooluniverse/ncbi_eutils_tool.py +96 -0
- tooluniverse/ols_tool.py +435 -0
- tooluniverse/package_discovery_tool.py +217 -0
- tooluniverse/paleobiology_tool.py +30 -0
- tooluniverse/pride_tool.py +30 -0
- tooluniverse/pypi_package_inspector_tool.py +593 -0
- tooluniverse/python_executor_tool.py +711 -0
- tooluniverse/regulomedb_tool.py +30 -0
- tooluniverse/remap_tool.py +44 -0
- tooluniverse/remote/depmap_24q2/depmap_24q2_mcp_tool.py +1 -1
- tooluniverse/screen_tool.py +44 -0
- tooluniverse/smcp.py +10 -2
- tooluniverse/smcp_server.py +3 -3
- tooluniverse/tool_finder_embedding.py +3 -1
- tooluniverse/tool_finder_keyword.py +3 -1
- tooluniverse/tool_finder_llm.py +6 -2
- tooluniverse/tools/{UCSC_get_genes_by_region.py → BLAST_nucleotide_search.py} +22 -26
- tooluniverse/tools/BLAST_protein_search.py +63 -0
- tooluniverse/tools/ClinVar_search_variants.py +26 -15
- tooluniverse/tools/CodeQualityAnalyzer.py +3 -3
- tooluniverse/tools/EMDB_get_structure.py +46 -0
- tooluniverse/tools/GtoPdb_get_targets.py +52 -0
- tooluniverse/tools/InterPro_get_domain_details.py +46 -0
- tooluniverse/tools/InterPro_get_protein_domains.py +49 -0
- tooluniverse/tools/InterPro_search_domains.py +52 -0
- tooluniverse/tools/JASPAR_get_transcription_factors.py +52 -0
- tooluniverse/tools/MPD_get_phenotype_data.py +59 -0
- tooluniverse/tools/PRIDE_search_proteomics.py +52 -0
- tooluniverse/tools/PackageAnalyzer.py +55 -0
- tooluniverse/tools/Paleobiology_get_fossils.py +52 -0
- tooluniverse/tools/PyPIPackageInspector.py +59 -0
- tooluniverse/tools/ReMap_get_transcription_factor_binding.py +59 -0
- tooluniverse/tools/ReferenceInfoAnalyzer.py +55 -0
- tooluniverse/tools/RegulomeDB_query_variant.py +46 -0
- tooluniverse/tools/SCREEN_get_regulatory_elements.py +59 -0
- tooluniverse/tools/{ArgumentDescriptionOptimizer.py → TestResultsAnalyzer.py} +13 -13
- tooluniverse/tools/ToolDiscover.py +11 -11
- tooluniverse/tools/UniProt_id_mapping.py +63 -0
- tooluniverse/tools/UniProt_search.py +63 -0
- tooluniverse/tools/UnifiedToolGenerator.py +59 -0
- tooluniverse/tools/WoRMS_search_species.py +49 -0
- tooluniverse/tools/XMLToolOptimizer.py +55 -0
- tooluniverse/tools/__init__.py +119 -29
- tooluniverse/tools/alphafold_get_annotations.py +3 -3
- tooluniverse/tools/alphafold_get_prediction.py +3 -3
- tooluniverse/tools/alphafold_get_summary.py +3 -3
- tooluniverse/tools/cBioPortal_get_cancer_studies.py +46 -0
- tooluniverse/tools/cBioPortal_get_mutations.py +52 -0
- tooluniverse/tools/{gnomAD_query_variant.py → clinvar_get_clinical_significance.py} +8 -11
- tooluniverse/tools/clinvar_get_variant_details.py +49 -0
- tooluniverse/tools/dbSNP_get_variant_by_rsid.py +7 -7
- tooluniverse/tools/dbsnp_get_frequencies.py +46 -0
- tooluniverse/tools/dbsnp_search_by_gene.py +52 -0
- tooluniverse/tools/download_binary_file.py +66 -0
- tooluniverse/tools/download_file.py +71 -0
- tooluniverse/tools/download_text_content.py +55 -0
- tooluniverse/tools/dynamic_package_discovery.py +59 -0
- tooluniverse/tools/ensembl_get_sequence.py +52 -0
- tooluniverse/tools/{Ensembl_lookup_gene_by_symbol.py → ensembl_get_variants.py} +11 -11
- tooluniverse/tools/ensembl_lookup_gene.py +46 -0
- tooluniverse/tools/geo_get_dataset_info.py +46 -0
- tooluniverse/tools/geo_get_sample_info.py +46 -0
- tooluniverse/tools/geo_search_datasets.py +67 -0
- tooluniverse/tools/gnomad_get_gene_constraints.py +49 -0
- tooluniverse/tools/kegg_find_genes.py +52 -0
- tooluniverse/tools/kegg_get_gene_info.py +46 -0
- tooluniverse/tools/kegg_get_pathway_info.py +46 -0
- tooluniverse/tools/kegg_list_organisms.py +44 -0
- tooluniverse/tools/kegg_search_pathway.py +46 -0
- tooluniverse/tools/ols_find_similar_terms.py +63 -0
- tooluniverse/tools/{get_hyperopt_info.py → ols_get_ontology_info.py} +13 -10
- tooluniverse/tools/ols_get_term_ancestors.py +67 -0
- tooluniverse/tools/ols_get_term_children.py +67 -0
- tooluniverse/tools/{TestCaseGenerator.py → ols_get_term_info.py} +12 -9
- tooluniverse/tools/{CodeOptimizer.py → ols_search_ontologies.py} +22 -14
- tooluniverse/tools/ols_search_terms.py +71 -0
- tooluniverse/tools/python_code_executor.py +79 -0
- tooluniverse/tools/python_script_runner.py +79 -0
- tooluniverse/tools/web_api_documentation_search.py +63 -0
- tooluniverse/tools/web_search.py +71 -0
- tooluniverse/uniprot_tool.py +219 -16
- tooluniverse/url_tool.py +18 -0
- tooluniverse/utils.py +2 -2
- tooluniverse/web_search_tool.py +229 -0
- tooluniverse/worms_tool.py +64 -0
- {tooluniverse-1.0.10.dist-info → tooluniverse-1.0.11.1.dist-info}/METADATA +3 -2
- {tooluniverse-1.0.10.dist-info → tooluniverse-1.0.11.1.dist-info}/RECORD +144 -55
- tooluniverse/data/genomics_tools.json +0 -174
- tooluniverse/tools/ToolDescriptionOptimizer.py +0 -67
- tooluniverse/tools/ToolImplementationGenerator.py +0 -67
- tooluniverse/tools/ToolOptimizer.py +0 -59
- tooluniverse/tools/ToolSpecificationGenerator.py +0 -67
- tooluniverse/tools/ToolSpecificationOptimizer.py +0 -63
- tooluniverse/ucsc_tool.py +0 -60
- {tooluniverse-1.0.10.dist-info → tooluniverse-1.0.11.1.dist-info}/WHEEL +0 -0
- {tooluniverse-1.0.10.dist-info → tooluniverse-1.0.11.1.dist-info}/entry_points.txt +0 -0
- {tooluniverse-1.0.10.dist-info → tooluniverse-1.0.11.1.dist-info}/licenses/LICENSE +0 -0
- {tooluniverse-1.0.10.dist-info → tooluniverse-1.0.11.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from typing import Any, Dict
|
|
3
|
+
from .base_tool import BaseTool
|
|
4
|
+
from .tool_registry import register_tool
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@register_tool("RegulomeDBRESTTool")
|
|
8
|
+
class RegulomeDBRESTTool(BaseTool):
|
|
9
|
+
def __init__(self, tool_config: Dict):
|
|
10
|
+
super().__init__(tool_config)
|
|
11
|
+
self.base_url = "https://regulomedb.org"
|
|
12
|
+
self.session = requests.Session()
|
|
13
|
+
self.session.headers.update({"Accept": "application/json"})
|
|
14
|
+
self.timeout = 30
|
|
15
|
+
|
|
16
|
+
def _build_url(self, args: Dict[str, Any]) -> str:
|
|
17
|
+
url = self.tool_config["fields"]["endpoint"]
|
|
18
|
+
for k, v in args.items():
|
|
19
|
+
url = url.replace(f"{{{k}}}", str(v))
|
|
20
|
+
return url
|
|
21
|
+
|
|
22
|
+
def run(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
|
|
23
|
+
try:
|
|
24
|
+
url = self._build_url(arguments)
|
|
25
|
+
response = self.session.get(url, timeout=self.timeout)
|
|
26
|
+
response.raise_for_status()
|
|
27
|
+
data = response.json()
|
|
28
|
+
return {"status": "success", "data": data, "url": url}
|
|
29
|
+
except Exception as e:
|
|
30
|
+
return {"status": "error", "error": f"RegulomeDB API error: {str(e)}"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from typing import Any, Dict
|
|
3
|
+
from .base_tool import BaseTool
|
|
4
|
+
from .tool_registry import register_tool
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@register_tool("ReMapRESTTool")
|
|
8
|
+
class ReMapRESTTool(BaseTool):
|
|
9
|
+
def __init__(self, tool_config: Dict):
|
|
10
|
+
super().__init__(tool_config)
|
|
11
|
+
self.session = requests.Session()
|
|
12
|
+
self.session.headers.update({"Accept": "application/json"})
|
|
13
|
+
self.timeout = 30
|
|
14
|
+
|
|
15
|
+
def run(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
|
|
16
|
+
try:
|
|
17
|
+
# Use ENCODE as alternative data source for ChIP-seq data
|
|
18
|
+
chromosome = arguments.get("chromosome", "chr1")
|
|
19
|
+
start = arguments.get("start", 1000000)
|
|
20
|
+
end = arguments.get("end", 2000000)
|
|
21
|
+
|
|
22
|
+
# Build ENCODE API URL for experiments
|
|
23
|
+
# Query for general experiments as ReMap alternative
|
|
24
|
+
url = "https://www.encodeproject.org/search/?type=Experiment&format=json&limit=10"
|
|
25
|
+
|
|
26
|
+
response = self.session.get(url, timeout=self.timeout)
|
|
27
|
+
response.raise_for_status()
|
|
28
|
+
|
|
29
|
+
# Parse JSON response
|
|
30
|
+
data = response.json()
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
"status": "success",
|
|
34
|
+
"data": data,
|
|
35
|
+
"url": url,
|
|
36
|
+
"query_info": {
|
|
37
|
+
"chromosome": chromosome,
|
|
38
|
+
"start": start,
|
|
39
|
+
"end": end,
|
|
40
|
+
"data_source": "ENCODE (ReMap alternative)",
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
except Exception as e:
|
|
44
|
+
return {"status": "error", "error": f"ReMap API error: {str(e)}"}
|
|
@@ -96,7 +96,7 @@ class DepmapCorrelationTool:
|
|
|
96
96
|
else:
|
|
97
97
|
# Fallback to text file format
|
|
98
98
|
gene_names_path = os.path.join(self.data_dir, "gene_names.txt")
|
|
99
|
-
with open(gene_names_path, "r") as f:
|
|
99
|
+
with open(gene_names_path, "r", encoding="utf-8") as f:
|
|
100
100
|
self.gene_names = np.array([line.strip() for line in f])
|
|
101
101
|
|
|
102
102
|
# Create bidirectional mapping for efficient gene symbol lookups
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from typing import Any, Dict
|
|
3
|
+
from .base_tool import BaseTool
|
|
4
|
+
from .tool_registry import register_tool
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@register_tool("SCREENRESTTool")
|
|
8
|
+
class SCREENRESTTool(BaseTool):
|
|
9
|
+
def __init__(self, tool_config: Dict):
|
|
10
|
+
super().__init__(tool_config)
|
|
11
|
+
self.session = requests.Session()
|
|
12
|
+
self.session.headers.update({"Accept": "application/json"})
|
|
13
|
+
self.timeout = 30
|
|
14
|
+
|
|
15
|
+
def run(self, arguments: Dict[str, Any]) -> Dict[str, Any]:
|
|
16
|
+
try:
|
|
17
|
+
# Use ENCODE as alternative data source for regulatory elements
|
|
18
|
+
chromosome = arguments.get("chromosome", "chr1")
|
|
19
|
+
start = arguments.get("start", 1000000)
|
|
20
|
+
end = arguments.get("end", 2000000)
|
|
21
|
+
|
|
22
|
+
# Build ENCODE API URL for experiments
|
|
23
|
+
# Query for general experiments as SCREEN alternative
|
|
24
|
+
url = "https://www.encodeproject.org/search/?type=Experiment&format=json&limit=10"
|
|
25
|
+
|
|
26
|
+
response = self.session.get(url, timeout=self.timeout)
|
|
27
|
+
response.raise_for_status()
|
|
28
|
+
|
|
29
|
+
# Parse JSON response
|
|
30
|
+
data = response.json()
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
"status": "success",
|
|
34
|
+
"data": data,
|
|
35
|
+
"url": url,
|
|
36
|
+
"query_info": {
|
|
37
|
+
"chromosome": chromosome,
|
|
38
|
+
"start": start,
|
|
39
|
+
"end": end,
|
|
40
|
+
"data_source": "ENCODE (SCREEN alternative)",
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
except Exception as e:
|
|
44
|
+
return {"status": "error", "error": f"SCREEN API error: {str(e)}"}
|
tooluniverse/smcp.py
CHANGED
|
@@ -386,8 +386,16 @@ class SMCP(FastMCP):
|
|
|
386
386
|
for uri in space_list:
|
|
387
387
|
print(f"📦 Loading Space: {uri}")
|
|
388
388
|
|
|
389
|
-
#
|
|
390
|
-
config = self.tooluniverse.load_space(
|
|
389
|
+
# Pass filtering parameters from SMCP to load_space
|
|
390
|
+
config = self.tooluniverse.load_space(
|
|
391
|
+
uri,
|
|
392
|
+
exclude_tools=self.exclude_tools,
|
|
393
|
+
exclude_categories=self.exclude_categories,
|
|
394
|
+
include_tools=self.include_tools,
|
|
395
|
+
tools_file=self.tools_file, # KEY FIX: Pass tools_file filter
|
|
396
|
+
include_tool_types=self.include_tool_types,
|
|
397
|
+
exclude_tool_types=self.exclude_tool_types,
|
|
398
|
+
)
|
|
391
399
|
|
|
392
400
|
# Get configurations from ToolUniverse (complete reuse)
|
|
393
401
|
self.space_metadata = self.tooluniverse.get_space_metadata()
|
tooluniverse/smcp_server.py
CHANGED
|
@@ -110,7 +110,7 @@ Examples:
|
|
|
110
110
|
if args.hook_config_file:
|
|
111
111
|
import json
|
|
112
112
|
|
|
113
|
-
with open(args.hook_config_file, "r") as f:
|
|
113
|
+
with open(args.hook_config_file, "r", encoding="utf-8") as f:
|
|
114
114
|
hook_config = json.load(f)
|
|
115
115
|
print(f"🔗 Hook config loaded from: {args.hook_config_file}")
|
|
116
116
|
|
|
@@ -532,7 +532,7 @@ Examples:
|
|
|
532
532
|
if args.hook_config_file:
|
|
533
533
|
import json
|
|
534
534
|
|
|
535
|
-
with open(args.hook_config_file, "r") as f:
|
|
535
|
+
with open(args.hook_config_file, "r", encoding="utf-8") as f:
|
|
536
536
|
hook_config = json.load(f)
|
|
537
537
|
print(
|
|
538
538
|
f"🔗 Hook config loaded from: {args.hook_config_file}", file=sys.stderr
|
|
@@ -930,7 +930,7 @@ Examples:
|
|
|
930
930
|
if args.hook_config_file:
|
|
931
931
|
import json
|
|
932
932
|
|
|
933
|
-
with open(args.hook_config_file, "r") as f:
|
|
933
|
+
with open(args.hook_config_file, "r", encoding="utf-8") as f:
|
|
934
934
|
hook_config = json.load(f)
|
|
935
935
|
print(f"🔗 Hook config loaded from: {args.hook_config_file}")
|
|
936
936
|
|
|
@@ -225,7 +225,9 @@ class ToolFinderEmbedding(BaseTool):
|
|
|
225
225
|
picked_tool_names_no_special = picked_tool_names_no_special[:rag_num]
|
|
226
226
|
picked_tool_names = picked_tool_names_no_special[:rag_num]
|
|
227
227
|
|
|
228
|
-
picked_tools = self.tooluniverse.
|
|
228
|
+
picked_tools = self.tooluniverse.get_tool_specification_by_names(
|
|
229
|
+
picked_tool_names
|
|
230
|
+
)
|
|
229
231
|
picked_tools_prompt = self.tooluniverse.prepare_tool_prompts(picked_tools)
|
|
230
232
|
if return_call_result:
|
|
231
233
|
return picked_tools_prompt, picked_tool_names
|
|
@@ -451,7 +451,9 @@ class ToolFinderKeyword(BaseTool):
|
|
|
451
451
|
picked_tool_names = picked_tool_names_no_special[:rag_num]
|
|
452
452
|
|
|
453
453
|
# Get tool objects and prepare prompts (matching original behavior)
|
|
454
|
-
picked_tools = self.tooluniverse.
|
|
454
|
+
picked_tools = self.tooluniverse.get_tool_specification_by_names(
|
|
455
|
+
picked_tool_names
|
|
456
|
+
)
|
|
455
457
|
picked_tools_prompt = self.tooluniverse.prepare_tool_prompts(picked_tools)
|
|
456
458
|
|
|
457
459
|
if return_call_result:
|
tooluniverse/tool_finder_llm.py
CHANGED
|
@@ -387,7 +387,9 @@ Requirements:
|
|
|
387
387
|
|
|
388
388
|
# Get actual tool objects
|
|
389
389
|
if tool_names:
|
|
390
|
-
selected_tool_objects =
|
|
390
|
+
selected_tool_objects = (
|
|
391
|
+
self.tooluniverse.get_tool_specification_by_names(tool_names)
|
|
392
|
+
)
|
|
391
393
|
tool_prompts = self.tooluniverse.prepare_tool_prompts(
|
|
392
394
|
selected_tool_objects
|
|
393
395
|
)
|
|
@@ -495,7 +497,9 @@ Requirements:
|
|
|
495
497
|
picked_tool_names = picked_tool_names_no_special[:rag_num]
|
|
496
498
|
|
|
497
499
|
# Get tool objects and prepare prompts (needed for both list and other formats)
|
|
498
|
-
picked_tools = self.tooluniverse.
|
|
500
|
+
picked_tools = self.tooluniverse.get_tool_specification_by_names(
|
|
501
|
+
picked_tool_names
|
|
502
|
+
)
|
|
499
503
|
picked_tools_prompt = self.tooluniverse.prepare_tool_prompts(picked_tools)
|
|
500
504
|
|
|
501
505
|
# If only list format is requested, return the tool specifications as a list
|
|
@@ -1,39 +1,36 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
2
|
+
BLAST_nucleotide_search
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Search nucleotide sequences using NCBI BLAST blastn against nucleotide databases
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from typing import Any, Optional, Callable
|
|
8
8
|
from ._shared_client import get_shared_client
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
def
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
track: Optional[str] = "knownGene",
|
|
11
|
+
def BLAST_nucleotide_search(
|
|
12
|
+
sequence: str,
|
|
13
|
+
database: Optional[str] = "nt",
|
|
14
|
+
expect: Optional[float] = 10.0,
|
|
15
|
+
hitlist_size: Optional[int] = 50,
|
|
17
16
|
*,
|
|
18
17
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
19
18
|
use_cache: bool = False,
|
|
20
19
|
validate: bool = True,
|
|
21
20
|
) -> dict[str, Any]:
|
|
22
21
|
"""
|
|
23
|
-
|
|
22
|
+
Search nucleotide sequences using NCBI BLAST blastn against nucleotide databases
|
|
24
23
|
|
|
25
24
|
Parameters
|
|
26
25
|
----------
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
track : str
|
|
36
|
-
Track name.
|
|
26
|
+
sequence : str
|
|
27
|
+
DNA sequence to search
|
|
28
|
+
database : str
|
|
29
|
+
Database (nt, est, etc.)
|
|
30
|
+
expect : float
|
|
31
|
+
E-value threshold
|
|
32
|
+
hitlist_size : int
|
|
33
|
+
Max hits to return
|
|
37
34
|
stream_callback : Callable, optional
|
|
38
35
|
Callback for streaming output
|
|
39
36
|
use_cache : bool, default False
|
|
@@ -49,13 +46,12 @@ def UCSC_get_genes_by_region(
|
|
|
49
46
|
|
|
50
47
|
return get_shared_client().run_one_function(
|
|
51
48
|
{
|
|
52
|
-
"name": "
|
|
49
|
+
"name": "BLAST_nucleotide_search",
|
|
53
50
|
"arguments": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"track": track,
|
|
51
|
+
"sequence": sequence,
|
|
52
|
+
"database": database,
|
|
53
|
+
"expect": expect,
|
|
54
|
+
"hitlist_size": hitlist_size,
|
|
59
55
|
},
|
|
60
56
|
},
|
|
61
57
|
stream_callback=stream_callback,
|
|
@@ -64,4 +60,4 @@ def UCSC_get_genes_by_region(
|
|
|
64
60
|
)
|
|
65
61
|
|
|
66
62
|
|
|
67
|
-
__all__ = ["
|
|
63
|
+
__all__ = ["BLAST_nucleotide_search"]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"""
|
|
2
|
+
BLAST_protein_search
|
|
3
|
+
|
|
4
|
+
Search protein sequences using NCBI BLAST blastp against protein databases
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def BLAST_protein_search(
|
|
12
|
+
sequence: str,
|
|
13
|
+
database: Optional[str] = "nr",
|
|
14
|
+
expect: Optional[float] = 10.0,
|
|
15
|
+
hitlist_size: Optional[int] = 50,
|
|
16
|
+
*,
|
|
17
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
18
|
+
use_cache: bool = False,
|
|
19
|
+
validate: bool = True,
|
|
20
|
+
) -> dict[str, Any]:
|
|
21
|
+
"""
|
|
22
|
+
Search protein sequences using NCBI BLAST blastp against protein databases
|
|
23
|
+
|
|
24
|
+
Parameters
|
|
25
|
+
----------
|
|
26
|
+
sequence : str
|
|
27
|
+
Protein sequence to search
|
|
28
|
+
database : str
|
|
29
|
+
Database (nr, swissprot, etc.)
|
|
30
|
+
expect : float
|
|
31
|
+
|
|
32
|
+
hitlist_size : int
|
|
33
|
+
|
|
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
|
+
dict[str, Any]
|
|
44
|
+
"""
|
|
45
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
46
|
+
|
|
47
|
+
return get_shared_client().run_one_function(
|
|
48
|
+
{
|
|
49
|
+
"name": "BLAST_protein_search",
|
|
50
|
+
"arguments": {
|
|
51
|
+
"sequence": sequence,
|
|
52
|
+
"database": database,
|
|
53
|
+
"expect": expect,
|
|
54
|
+
"hitlist_size": hitlist_size,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
stream_callback=stream_callback,
|
|
58
|
+
use_cache=use_cache,
|
|
59
|
+
validate=validate,
|
|
60
|
+
)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
__all__ = ["BLAST_protein_search"]
|
|
@@ -1,30 +1,36 @@
|
|
|
1
1
|
"""
|
|
2
|
-
|
|
2
|
+
clinvar_search_variants
|
|
3
3
|
|
|
4
|
-
Search ClinVar
|
|
4
|
+
Search for variants in ClinVar database by gene name, condition, or variant ID. Returns variant i...
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
from typing import Any, Optional, Callable
|
|
8
8
|
from ._shared_client import get_shared_client
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
def
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
def clinvar_search_variants(
|
|
12
|
+
gene: Optional[str] = None,
|
|
13
|
+
condition: Optional[str] = None,
|
|
14
|
+
variant_id: Optional[str] = None,
|
|
15
|
+
max_results: Optional[int] = 20,
|
|
14
16
|
*,
|
|
15
17
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
18
|
use_cache: bool = False,
|
|
17
19
|
validate: bool = True,
|
|
18
|
-
) ->
|
|
20
|
+
) -> dict[str, Any]:
|
|
19
21
|
"""
|
|
20
|
-
Search ClinVar
|
|
22
|
+
Search for variants in ClinVar database by gene name, condition, or variant ID. Returns variant i...
|
|
21
23
|
|
|
22
24
|
Parameters
|
|
23
25
|
----------
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
gene : str
|
|
27
|
+
Gene name or symbol (e.g., 'BRCA1', 'BRCA2')
|
|
28
|
+
condition : str
|
|
29
|
+
Disease or condition name (e.g., 'breast cancer', 'diabetes')
|
|
30
|
+
variant_id : str
|
|
31
|
+
ClinVar variant ID (e.g., '12345')
|
|
32
|
+
max_results : int
|
|
33
|
+
Maximum number of results to return
|
|
28
34
|
stream_callback : Callable, optional
|
|
29
35
|
Callback for streaming output
|
|
30
36
|
use_cache : bool, default False
|
|
@@ -34,14 +40,19 @@ def ClinVar_search_variants(
|
|
|
34
40
|
|
|
35
41
|
Returns
|
|
36
42
|
-------
|
|
37
|
-
|
|
43
|
+
dict[str, Any]
|
|
38
44
|
"""
|
|
39
45
|
# Handle mutable defaults to avoid B006 linting error
|
|
40
46
|
|
|
41
47
|
return get_shared_client().run_one_function(
|
|
42
48
|
{
|
|
43
|
-
"name": "
|
|
44
|
-
"arguments": {
|
|
49
|
+
"name": "clinvar_search_variants",
|
|
50
|
+
"arguments": {
|
|
51
|
+
"gene": gene,
|
|
52
|
+
"condition": condition,
|
|
53
|
+
"variant_id": variant_id,
|
|
54
|
+
"max_results": max_results,
|
|
55
|
+
},
|
|
45
56
|
},
|
|
46
57
|
stream_callback=stream_callback,
|
|
47
58
|
use_cache=use_cache,
|
|
@@ -49,4 +60,4 @@ def ClinVar_search_variants(
|
|
|
49
60
|
)
|
|
50
61
|
|
|
51
62
|
|
|
52
|
-
__all__ = ["
|
|
63
|
+
__all__ = ["clinvar_search_variants"]
|
|
@@ -14,12 +14,12 @@ def CodeQualityAnalyzer(
|
|
|
14
14
|
tool_parameters: str,
|
|
15
15
|
implementation_code: str,
|
|
16
16
|
test_cases: str,
|
|
17
|
-
test_execution_results:
|
|
17
|
+
test_execution_results: str,
|
|
18
18
|
*,
|
|
19
19
|
stream_callback: Optional[Callable[[str], None]] = None,
|
|
20
20
|
use_cache: bool = False,
|
|
21
21
|
validate: bool = True,
|
|
22
|
-
) -> Any:
|
|
22
|
+
) -> dict[str, Any]:
|
|
23
23
|
"""
|
|
24
24
|
Analyzes code quality from multiple dimensions including algorithmic correctness, functional impl...
|
|
25
25
|
|
|
@@ -46,7 +46,7 @@ def CodeQualityAnalyzer(
|
|
|
46
46
|
|
|
47
47
|
Returns
|
|
48
48
|
-------
|
|
49
|
-
Any
|
|
49
|
+
dict[str, Any]
|
|
50
50
|
"""
|
|
51
51
|
# Handle mutable defaults to avoid B006 linting error
|
|
52
52
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""
|
|
2
|
+
EMDB_get_structure
|
|
3
|
+
|
|
4
|
+
Get electron microscopy structure data from EMDB
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def EMDB_get_structure(
|
|
12
|
+
emdb_id: str,
|
|
13
|
+
*,
|
|
14
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
15
|
+
use_cache: bool = False,
|
|
16
|
+
validate: bool = True,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
"""
|
|
19
|
+
Get electron microscopy structure data from EMDB
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
emdb_id : str
|
|
24
|
+
EMDB structure ID (e.g., EMD-1234)
|
|
25
|
+
stream_callback : Callable, optional
|
|
26
|
+
Callback for streaming output
|
|
27
|
+
use_cache : bool, default False
|
|
28
|
+
Enable caching
|
|
29
|
+
validate : bool, default True
|
|
30
|
+
Validate parameters
|
|
31
|
+
|
|
32
|
+
Returns
|
|
33
|
+
-------
|
|
34
|
+
dict[str, Any]
|
|
35
|
+
"""
|
|
36
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
37
|
+
|
|
38
|
+
return get_shared_client().run_one_function(
|
|
39
|
+
{"name": "EMDB_get_structure", "arguments": {"emdb_id": emdb_id}},
|
|
40
|
+
stream_callback=stream_callback,
|
|
41
|
+
use_cache=use_cache,
|
|
42
|
+
validate=validate,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
__all__ = ["EMDB_get_structure"]
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
GtoPdb_get_targets
|
|
3
|
+
|
|
4
|
+
Get pharmacological targets from Guide to Pharmacology database
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def GtoPdb_get_targets(
|
|
12
|
+
target_type: Optional[str] = "protein",
|
|
13
|
+
limit: Optional[int] = 20,
|
|
14
|
+
*,
|
|
15
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
16
|
+
use_cache: bool = False,
|
|
17
|
+
validate: bool = True,
|
|
18
|
+
) -> list[Any]:
|
|
19
|
+
"""
|
|
20
|
+
Get pharmacological targets from Guide to Pharmacology database
|
|
21
|
+
|
|
22
|
+
Parameters
|
|
23
|
+
----------
|
|
24
|
+
target_type : str
|
|
25
|
+
Target type
|
|
26
|
+
limit : int
|
|
27
|
+
Number of results
|
|
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": "GtoPdb_get_targets",
|
|
44
|
+
"arguments": {"target_type": target_type, "limit": limit},
|
|
45
|
+
},
|
|
46
|
+
stream_callback=stream_callback,
|
|
47
|
+
use_cache=use_cache,
|
|
48
|
+
validate=validate,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
__all__ = ["GtoPdb_get_targets"]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""
|
|
2
|
+
InterPro_get_domain_details
|
|
3
|
+
|
|
4
|
+
Get detailed information about a specific InterPro domain entry including description, hierarchy,...
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def InterPro_get_domain_details(
|
|
12
|
+
accession: str,
|
|
13
|
+
*,
|
|
14
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
15
|
+
use_cache: bool = False,
|
|
16
|
+
validate: bool = True,
|
|
17
|
+
) -> dict[str, Any]:
|
|
18
|
+
"""
|
|
19
|
+
Get detailed information about a specific InterPro domain entry including description, hierarchy,...
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
accession : str
|
|
24
|
+
InterPro accession ID (e.g., IPR000719, IPR000719)
|
|
25
|
+
stream_callback : Callable, optional
|
|
26
|
+
Callback for streaming output
|
|
27
|
+
use_cache : bool, default False
|
|
28
|
+
Enable caching
|
|
29
|
+
validate : bool, default True
|
|
30
|
+
Validate parameters
|
|
31
|
+
|
|
32
|
+
Returns
|
|
33
|
+
-------
|
|
34
|
+
dict[str, Any]
|
|
35
|
+
"""
|
|
36
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
37
|
+
|
|
38
|
+
return get_shared_client().run_one_function(
|
|
39
|
+
{"name": "InterPro_get_domain_details", "arguments": {"accession": accession}},
|
|
40
|
+
stream_callback=stream_callback,
|
|
41
|
+
use_cache=use_cache,
|
|
42
|
+
validate=validate,
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
__all__ = ["InterPro_get_domain_details"]
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""
|
|
2
|
+
InterPro_get_protein_domains
|
|
3
|
+
|
|
4
|
+
Get protein domain annotations from InterPro database using UniProt protein ID. Returns domain fa...
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any, Optional, Callable
|
|
8
|
+
from ._shared_client import get_shared_client
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def InterPro_get_protein_domains(
|
|
12
|
+
protein_id: str,
|
|
13
|
+
*,
|
|
14
|
+
stream_callback: Optional[Callable[[str], None]] = None,
|
|
15
|
+
use_cache: bool = False,
|
|
16
|
+
validate: bool = True,
|
|
17
|
+
) -> list[Any]:
|
|
18
|
+
"""
|
|
19
|
+
Get protein domain annotations from InterPro database using UniProt protein ID. Returns domain fa...
|
|
20
|
+
|
|
21
|
+
Parameters
|
|
22
|
+
----------
|
|
23
|
+
protein_id : str
|
|
24
|
+
UniProt protein ID (e.g., P05067, Q9Y6K9)
|
|
25
|
+
stream_callback : Callable, optional
|
|
26
|
+
Callback for streaming output
|
|
27
|
+
use_cache : bool, default False
|
|
28
|
+
Enable caching
|
|
29
|
+
validate : bool, default True
|
|
30
|
+
Validate parameters
|
|
31
|
+
|
|
32
|
+
Returns
|
|
33
|
+
-------
|
|
34
|
+
list[Any]
|
|
35
|
+
"""
|
|
36
|
+
# Handle mutable defaults to avoid B006 linting error
|
|
37
|
+
|
|
38
|
+
return get_shared_client().run_one_function(
|
|
39
|
+
{
|
|
40
|
+
"name": "InterPro_get_protein_domains",
|
|
41
|
+
"arguments": {"protein_id": protein_id},
|
|
42
|
+
},
|
|
43
|
+
stream_callback=stream_callback,
|
|
44
|
+
use_cache=use_cache,
|
|
45
|
+
validate=validate,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
__all__ = ["InterPro_get_protein_domains"]
|