You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ Preprints are NOT peer-reviewed but critical for emerging outbreaks!
Example - Search preprints (bioRxiv/medRxiv don't have search APIs, use EuropePMC):
# Search for newest preprint findingspreprints=tu.tools.EuropePMC_search_articles(
query=f"{pathogen_name} mechanism resistance",
source="PPR", # PPR = Preprints (bioRxiv, medRxiv, etc.)pageSize=20
)
# If you have a specific DOI, retrieve full metadata:ifdoi_from_search.startswith('10.1101/'):
full_preprint=tu.tools.BioRxiv_get_preprint(doi=doi_from_search)
# Alternative: Use web search for bioRxivweb_results=tu.tools.web_search(
query=f"{pathogen_name} clinical trial effectiveness",
limit=20
)
# Computational papersarxiv=tu.tools.ArXiv_search_papers(
query=f"{pathogen_name} drug discovery",
category="q-bio",
limit=10
)
defrapid_drug_screen(tu, target_sequence, drug_smiles_list):
"""Rapid docking screen for drug repurposing."""# Quick structure predictionstructure=tu.tools.NvidiaNIM_esmfold(sequence=target_sequence)
# Dock all candidatesresults= []
forsmilesindrug_smiles_list:
docking=tu.tools.NvidiaNIM_diffdock(
protein=structure['structure'],
ligand=smiles,
num_poses=3
)
results.append({
'smiles': smiles,
'score': docking['poses'][0]['confidence']
})
returnsorted(results, key=lambdax: x['score'], reverse=True)
Example 3: Knowledge Transfer from Related Pathogen
deftransfer_knowledge(tu, novel_pathogen, reference_pathogen):
"""Transfer drug knowledge from related pathogen."""# Get drugs approved for reference pathogenref_drugs=tu.tools.ChEMBL_search_drugs(
query=reference_pathogen,
max_phase=4
)
# Get target from novel pathogennovel_proteins=tu.tools.UniProt_search(
query=f"organism:{novel_pathogen}"
)
# Find homologous targetshomologs= []
forproteininnovel_proteins:
# BLAST against referenceblast=tu.tools.BLAST_protein_search(
sequence=protein['sequence'],
database="refseq_protein",
organism=reference_pathogen
)
ifblastandblast[0]['identity'] >70:
homologs.append({
'novel_target': protein,
'reference_homolog': blast[0],
'identity': blast[0]['identity']
})
# Match drugs to homologous targetscandidates= []
fordruginref_drugs:
forhomologinhomologs:
ifdrug['target'] ==homolog['reference_homolog']['accession']:
candidates.append({
'drug': drug,
'target_homology': homolog['identity'],
'expected_activity': 'High'ifhomolog['identity'] >90else'Medium'
})
returncandidates
Fallback Chains
Taxonomy
Primary
Fallback 1
Fallback 2
NCBI_Taxonomy_search
UniProt_taxonomy
Manual NCBI query
Structure Prediction
Primary
Fallback 1
Fallback 2
NvidiaNIM_alphafold2
NvidiaNIM_esmfold
alphafold_get_prediction
alphafold_get_prediction
NvidiaNIM_openfold2
PDB homolog
Docking
Primary
Fallback 1
Fallback 2
NvidiaNIM_diffdock
NvidiaNIM_boltz2
Literature docking
Drug Search
Primary
Fallback 1
Fallback 2
ChEMBL_search_drugs
DrugBank_search
PubChem BioAssay
Pathway Analysis (NEW)
Primary
Fallback 1
Fallback 2
kegg_search_pathway
Reactome_search_pathway
WikiPathways_search
kegg_get_pathway_genes
Reactome_get_pathway_participants
Gene list extraction
Literature (ENHANCED)
Primary
Fallback 1
Fallback 2
PubMed_search_articles
openalex_search_works
Google Scholar
EuropePMC_search_articles (source='PPR')
web_search (site:biorxiv.org)
ArXiv q-bio
openalex_search_works
SemanticScholar_search
Manual citation
Common Parameter Mistakes
Tool
Wrong
Correct
NCBI_Taxonomy_search
name="virus"
query="virus"
UniProt_search
name="protease"
query="protease"
ChEMBL_search_targets
target="Mpro"
query="Mpro"
NvidiaNIM_diffdock
protein_file=path
protein=content
NvidiaNIM_alphafold2
seq="MVLS..."
sequence="MVLS..."
NVIDIA NIM Requirements
API Key: NVIDIA_API_KEY environment variable required
Rate limits: 40 RPM (1.5 second minimum between calls)
Async operations:
AlphaFold2 may return 202, requiring polling
ESMFold is synchronous (faster for rapid screening)
Check Availability
importosnvidia_available=bool(os.environ.get("NVIDIA_API_KEY"))
ifnotnvidia_available:
print("Warning: NVIDIA NIM tools unavailable, using fallbacks")
Speed Optimization
For Urgent Outbreaks
Use ESMFold first for rapid structure (30 sec vs 5-15 min)
Dock FDA-approved only initially (fastest to deploy)
Parallelize docking if possible
Cache structures for repeated queries
Prioritization Order
defprioritize_candidates(candidates):
"""Prioritize by speed to clinical use."""returnsorted(candidates, key=lambdax: (
-x['fda_approved'], # FDA approved first-x['phase'], # Higher phase next-x['docking_score'] # Then by score
))