Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.
.claude/skills/lingxling-bioservices/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 157% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 57% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 67% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 41% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -10% | 0% |
BioServices is a Python package providing programmatic access to approximately 40 bioinformatics web services and databases. Retrieve biological data, perform cross-database queries, map identifiers, analyze sequences, and integrate multiple biological resources in Python workflows. The package handles both REST and SOAP/WSDL protocols transparently.
Version note: Examples target bioservices 1.16.0 (PyPI, Mar 2026). Requires Python 3.9–3.12. UniProt REST changes in mid-2022 (bioservices ≥1.10) mainly affect tabular columns names — see upstream _legacy_names if parsing breaks. ChEMBL wrappers changed at 1.6.0 (2018 API); use get_similarity, get_substructure, get_molecule instead of pre-1.6 method names.
This skill should be used when:
Retrieve protein information, sequences, and functional annotations:
pythonfrom bioservices import UniProt u = UniProt(verbose=False) # Search for protein by name results = u.search("ZAP70_HUMAN", frmt="tab", columns="id,genes,organism") # Retrieve FASTA sequence sequence = u.retrieve("P43403", "fasta") # Map identifiers between databases kegg_ids = u.mapping(fr="UniProtKB_AC-ID", to="KEGG", query="P43403")
Key methods:
search(): Query UniProt with flexible search termsretrieve(): Get protein entries in various formats (FASTA, XML, tab)mapping(): Convert identifiers between databasesReference: references/services_reference.md for complete UniProt API details.
Access KEGG pathway information for genes and organisms:
pythonfrom bioservices import KEGG k = KEGG() k.organism = "hsa" # Set to human # Search for organisms k.lookfor_organism("droso") # Find Drosophila species # Find pathways by name k.lookfor_pathway("B cell") # Returns matching pathway IDs # Get pathways containing specific genes pathways = k.get_pathway_by_gene("7535", "hsa") # ZAP70 gene # Retrieve and parse pathway data data = k.get("hsa04660") parsed = k.parse(data) # Extract pathway interactions interactions = k.parse_kgml_pathway("hsa04660") relations = interactions['relations'] # Protein-protein interactions # Convert to Simple Interaction Format sif_data = k.pathway2sif("hsa04660")
Key methods:
lookfor_organism(), lookfor_pathway(): Search by nameget_pathway_by_gene(): Find pathways containing genesparse_kgml_pathway(): Extract structured pathway datapathway2sif(): Get protein interaction networksReference: references/workflow_patterns.md for complete pathway analysis workflows.
Search and cross-reference compounds across multiple databases:
pythonfrom bioservices import KEGG, UniChem k = KEGG() # Search compounds by name results = k.find("compound", "Geldanamycin") # Returns cpd:C11222 # Get compound information with database links compound_info = k.get("cpd:C11222") # Includes ChEBI links # Cross-reference KEGG → ChEMBL using UniChem u = UniChem() chembl_id = u.get_compound_id_from_kegg("C11222") # Returns CHEMBL278315
Common workflow:
Reference: references/identifier_mapping.md for complete cross-database mapping guide.
Run BLAST searches and sequence alignments. NCBI requires a contact email — prefer the NCBI_EMAIL environment variable (same convention as BioPython Entrez and other repo skills):
pythonimport os from bioservices import NCBIblast s = NCBIblast(verbose=False) email = os.environ["NCBI_EMAIL"] # set before running: export NCBI_EMAIL=you@lab.org # Run BLASTP against UniProtKB jobid = s.run( program="blastp", sequence=protein_sequence, stype="protein", database="uniprotkb", email=email, ) # Check job status and retrieve results s.getStatus(jobid) results = s.getResult(jobid, "out")
Note: BLAST jobs are asynchronous. Check status before retrieving results.
Convert identifiers between different biological databases:
pythonfrom bioservices import UniProt, KEGG # UniProt mapping (many database pairs supported) u = UniProt() results = u.mapping( fr="UniProtKB_AC-ID", # Source database to="KEGG", # Target database query="P43403" # Identifier(s) to convert ) # KEGG gene ID → UniProt kegg_to_uniprot = u.mapping(fr="KEGG", to="UniProtKB_AC-ID", query="hsa:7535") # For compounds, use UniChem from bioservices import UniChem u = UniChem() chembl_from_kegg = u.get_compound_id_from_kegg("C11222")
Supported mappings (UniProt):
references/identifier_mapping.md)Access GO terms and annotations:
pythonfrom bioservices import QuickGO g = QuickGO(verbose=False) # Retrieve GO term information term_info = g.Term("GO:0003824", frmt="obo") # Search annotations annotations = g.Annotation(protein="P43403", format="tsv")
Query interaction databases via PSICQUIC:
pythonfrom bioservices import PSICQUIC s = PSICQUIC(verbose=False) # Query specific database (e.g., MINT) interactions = s.query("mint", "ZAP70 AND species:9606") # List available interaction databases databases = s.activeDBs
Available databases: MINT, IntAct, BioGRID, DIP, and 30+ others.
BioServices excels at combining multiple services for comprehensive analysis. Common integration patterns:
Execute a full protein characterization workflow:
bashexport NCBI_EMAIL=your.email@example.com python scripts/protein_analysis_workflow.py ZAP70_HUMAN # Or pass email as optional second argument if NCBI_EMAIL is unset python scripts/protein_analysis_workflow.py ZAP70_HUMAN your.email@example.com
This script demonstrates:
Analyze all pathways for an organism:
bashpython scripts/pathway_analysis.py hsa output_directory/
Extracts and analyzes:
Map compound identifiers across databases:
bashpython scripts/compound_cross_reference.py Geldanamycin
Retrieves:
Convert multiple identifiers at once:
bashpython scripts/batch_id_converter.py input_ids.txt --from UniProtKB_AC-ID --to KEGG
Different services return data in various formats:
Control API request behavior:
pythonfrom bioservices import KEGG k = KEGG(verbose=False) # Suppress HTTP request details k.TIMEOUT = 30 # Adjust timeout for slow connections
Wrap service calls in try-except blocks:
pythontry: results = u.search("ambiguous_query") if results: # Process results pass except Exception as e: print(f"Search failed: {e}")
Use standard organism abbreviations:
hsa: Homo sapiens (human)mmu: Mus musculus (mouse)dme: Drosophila melanogastersce: Saccharomyces cerevisiae (yeast)List all organisms: k.list("organism") or k.organismIds
BioServices works well with:
Executable Python scripts demonstrating complete workflows:
protein_analysis_workflow.py: End-to-end protein characterizationpathway_analysis.py: KEGG pathway discovery and network extractioncompound_cross_reference.py: Multi-database compound searchingbatch_id_converter.py: Bulk identifier mapping utilityScripts can be executed directly or adapted for specific use cases.
Detailed documentation loaded as needed:
services_reference.md: Comprehensive list of all 40+ services with methodsworkflow_patterns.md: Detailed multi-step analysis workflowsidentifier_mapping.md: Complete guide to cross-database ID conversionLoad references when working with specific services or complex integration tasks.
bashuv pip install "bioservices==1.16.0"
Dependencies are installed automatically. Upstream CI tests Python 3.9–3.12 (PyPI, docs).
Most services need no API key. Exceptions:
| Service | Requirement | |---------|-------------| | NCBI BLAST | Contact email via NCBI_EMAIL or email= in NCBIblast.run() | | Some EBI services | Optional; check service docs if rate-limited |
Set once per shell session:
bashexport NCBI_EMAIL=your.email@example.com
Use a real institutional or lab address — NCBI may contact you about heavy BLAST usage.
For detailed API documentation and advanced features, refer to:
references/services_reference.md| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 29,409 | 8,860 | -70% | 1 | 1 | 0% | 5,885 | 3,216 | -45% | 0 | 0 | — |
case-02 | fail→pass | 84,950 | 32,893 | -61% | 1 | 1 | 0% | 3,839 | 9,883 | +157% | 0 | 0 | — |
case-03 | fail→fail | 27,598 | 66,740 | +142% | 1 | 1 | 0% | 5,589 | 11,145 | +99% | 0 | 0 | — |
case-04 | pass→pass | 22,689 | 11,342 | -50% | 1 | 1 | 0% | 3,431 | 4,763 | +39% | 0 | 0 | — |
case-05 | fail→pass | 13,489 | 6,812 | -49% | 1 | 1 | 0% | 2,563 | 4,033 | +57% | 0 | 0 | — |
case-06 | fail→pass | 14,508 | 5,109 | -65% | 1 | 1 | 0% | 2,173 | 3,623 | +67% | 0 | 0 | — |
case-07 | fail→pass | 26,655 | 10,285 | -61% | 1 | 1 | 0% | 3,041 | 4,293 | +41% | 0 | 0 | — |
case-08 | pass→pass | 38,556 | 3,541 | -91% | 1 | 1 | 0% | 1,058 | 3,410 | +222% | 0 | 0 | — |
case-09 | fail→pass | 20,163 | 5,580 | -72% | 1 | 1 | 0% | 4,066 | 3,655 | -10% | 0 | 0 | — |
case-10 | fail→pass | 6,734 | 4,276 | -37% | 1 | 1 | 0% | 1,448 | 3,608 | +149% | 0 | 0 | — |
case-11 | fail→pass | 16,519 | 4,943 | -70% | 1 | 1 | 0% | 2,507 | 3,703 | +48% | 0 | 0 | — |
case-12 | fail→pass | 5,593 | 4,052 | -28% | 1 | 1 | 0% | 951 | 3,410 | +259% | 0 | 0 | — |
case-13 | fail→pass | 11,001 | 5,371 | -51% | 1 | 1 | 0% | 2,200 | 3,985 | +81% | 0 | 0 | — |
case-14 | pass→pass | 12,228 | 3,505 | -71% | 1 | 1 | 0% | 1,560 | 3,361 | +115% | 0 | 0 | — |
case-15 | fail→pass | 10,194 | 6,970 | -32% | 1 | 1 | 0% | 1,576 | 3,855 | +145% | 0 | 0 | — |
case-16 | fail→pass | 8,136 | 5,487 | -33% | 1 | 1 | 0% | 1,084 | 3,665 | +238% | 0 | 0 | — |
case-17 | fail→pass | 10,629 | 4,471 | -58% | 1 | 1 | 0% | 1,995 | 3,681 | +85% | 0 | 0 | — |
case-18 | pass→pass | 36,091 | 2,167 | -94% | 1 | 1 | 0% | 1,156 | 3,202 | +177% | 0 | 0 | — |
case-19 | fail→pass | 4,383 | 3,269 | -25% | 1 | 1 | 0% | 802 | 3,275 | +308% | 0 | 0 | — |
case-20 | pass→pass | 58,470 | 12,453 | -79% | 1 | 1 | 0% | 1,826 | 4,607 | +152% | 0 | 0 | — |
case-21 | pass→pass | 3,829 | 4,524 | +18% | 1 | 1 | 0% | 727 | 3,738 | +414% | 0 | 0 | — |
case-22 | fail→pass | 8,010 | 5,843 | -27% | 1 | 1 | 0% | 955 | 3,961 | +315% | 0 | 0 | — |
case-23 | pass→pass | 46,487 | 14,215 | -69% | 1 | 1 | 0% | 2,628 | 5,564 | +112% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +61 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.