scientific-skills/Data Analysis/bioservices/SKILL.md
Unified Python access to 40+ bioinformatics web services; use when you need to query multiple databases (e.g., UniProt/KEGG/ChEMBL/Reactome) with one consistent API in a single workflow, especially for cross-database analysis and identifier mapping.
npx skillsauth add aipoch/medical-research-skills bioservicesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
python >= 3.9bioservices (install via pip/uv; version depends on your environment)Optional (commonly used alongside returned formats):
pandas >= 1.5 (TSV/tabular outputs)beautifulsoup4 >= 4.11 (XML parsing)lxml >= 4.9 (faster XML parsing)networkx >= 2.8 (network analysis of interactions)biopython >= 1.81 (sequence handling for FASTA outputs)A single runnable script that demonstrates a cross-service workflow:
"""
Run:
uv pip install bioservices pandas
python bioservices_example.py
Notes:
- Some services may rate-limit or be temporarily unavailable.
- NCBI BLAST requires an email; this example does not run BLAST to stay lightweight.
"""
from bioservices import UniProt, KEGG, QuickGO, PSICQUIC, UniChem
def main():
# --- UniProt: search + retrieve ---
u = UniProt(verbose=False)
# Search by entry name (example: ZAP70 human)
tab = u.search("ZAP70_HUMAN", frmt="tab", columns="id,entry name,genes,organism")
print("UniProt search (tab):")
print(tab.splitlines()[0:3], "\n") # show header + first rows
uniprot_ac = "P43403" # ZAP70_HUMAN accession
fasta = u.retrieve(uniprot_ac, "fasta")
print("UniProt FASTA header:")
print(fasta.splitlines()[0], "\n")
# --- UniProt: identifier mapping (UniProt -> KEGG) ---
mapping = u.mapping(fr="UniProtKB_AC-ID", to="KEGG", query=uniprot_ac)
print("UniProt -> KEGG mapping:")
print(mapping, "\n")
# --- KEGG: pathway discovery + parsing ---
k = KEGG(verbose=False)
k.organism = "hsa"
# Example gene: ZAP70 is KEGG gene hsa:7535
pathways = k.get_pathway_by_gene("7535", "hsa")
print("KEGG pathways containing hsa:7535:")
print(pathways, "\n")
pathway_id = "hsa04660" # T cell receptor signaling pathway (example)
kgml_relations = k.parse_kgml_pathway(pathway_id).get("relations", [])
print(f"KEGG KGML relations count for {pathway_id}: {len(kgml_relations)}\n")
# Export to SIF (useful for network tools)
sif = k.pathway2sif(pathway_id)
print(f"KEGG SIF preview for {pathway_id}:")
print("\n".join(sif.splitlines()[:5]), "\n")
# --- QuickGO: GO annotations for a UniProt protein ---
g = QuickGO(verbose=False)
ann = g.Annotation(protein=uniprot_ac, format="tsv")
print("QuickGO annotation TSV header:")
print(ann.splitlines()[0], "\n")
# --- PSICQUIC: interaction query (database name may vary by availability) ---
p = PSICQUIC(verbose=False)
# Example query: ZAP70 interactions in human
# Choose a database that is active in your environment; "intact" is commonly available.
interactions = p.query("intact", "ZAP70 AND species:9606")
print("PSICQUIC query result preview:")
print("\n".join(interactions.splitlines()[:3]), "\n")
# --- Compound workflow: KEGG compound -> UniChem -> ChEMBL ---
# Example: Geldanamycin
cpd_hits = k.find("compound", "Geldanamycin")
print("KEGG compound find('Geldanamycin'):")
print(cpd_hits, "\n")
# If you already know the KEGG compound ID:
kegg_compound_id = "C11222"
uc = UniChem(verbose=False)
chembl_id = uc.get_compound_id_from_kegg(kegg_compound_id)
print(f"UniChem KEGG {kegg_compound_id} -> ChEMBL:")
print(chembl_id, "\n")
if __name__ == "__main__":
main()
UniProt, KEGG, QuickGO, PSICQUIC, NCBIblast). You instantiate a client and call methods that wrap the underlying endpoints.verbose: toggles HTTP/request logging (verbose=False is recommended for scripts).TIMEOUT: per-service timeout control (useful for slow networks or large responses).search(query, frmt=..., columns=...), retrieve(accession, format), mapping(fr=..., to=..., query=...)find(db, query), get(entry_id), parse(raw), parse_kgml_pathway(pathway_id), pathway2sif(pathway_id)run(...) → getStatus(jobid) → getResult(jobid, ...))pandas.read_csv(io.StringIO(text), sep="\t")BeautifulSoup or lxmltools
Generates complete conventional oncology bulk-transcriptome biomarker and hub-gene research designs from a user-provided cancer type and study direction. Always use this skill whenever a user wants to design, plan, or build a tumor bioinformatics study centered on differential expression, prognostic filtering or risk modeling, PPI-based hub-gene prioritization, diagnostic/prognostic evaluation, clinical association, immune infiltration context, methylation context, and optional tissue or cell validation. Covers five study patterns (signature-first prognostic workflow, hub-gene-first biomarker workflow, hybrid signature-to-hub workflow, immune-context biomarker workflow, translational validation workflow) and always outputs four workload configs (Lite / Standard / Advanced / Publication+) with recommended primary plan, step-by-step workflow, figure plan, validation strategy, minimal executable version, publication upgrade path...
development
Generates complete conventional non-oncology bioinformatics research designs from a user-provided disease context, process-related gene family or biological theme, and validation direction. Use when a study centers on multi-dataset bulk transcriptome integration, DEG analysis, process-gene intersection, enrichment analysis, GSEA, PPI hub-gene prioritization, TF/miRNA regulatory networks, ROC-based biomarker evaluation, and immune infiltration analysis. Covers five study patterns (process-DEG discovery, enrichment/GSEA interpretation, hub-gene prioritization, regulatory-network and immune interpretation, multi-layer public validation) and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.
tools
Plans confounder control, variable adjustment logic, and bias mitigation strategies at the protocol stage for clinical, epidemiologic, translational, observational, and biomarker studies. Always use this skill when a user needs to identify major confounders, decide which variables should or should not be adjusted for, compare matching/stratification/weighting approaches, anticipate selection or measurement bias, or pressure-test a study design before execution. Focus on bias sensing, causal structure awareness, variable-role classification, and critical design review rather than generic statistical advice.
testing
Generates complete comparative network-toxicology research designs from a user-provided exposure pair, shared toxic phenotype, and validation direction. Use when a study centers on two related exposures under one outcome and needs target collection, shared-vs-specific target decomposition, enrichment, PPI hub prioritization, docking, optional transcriptomic cross-checks, and conservative mechanistic synthesis. Covers five study patterns and always outputs Lite / Standard / Advanced / Publication+ with a recommended primary plan, stepwise workflow, figure plan, validation hierarchy, minimal executable version, publication upgrade path, and strictly verified literature retrieval.