Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Query Ensembl genome database REST API for 250+ species. Gene lookups, sequence retrieval, variant analysis, comparative genomics, orthologs, VEP predictions, for genomic research.
.claude/skills/ensembl-database/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-01 | ✗→✓ | ▲ Improved | — | — |
| case-13 | ✗→✓ | ▲ Improved | — | — |
Access and query the Ensembl genome database, a comprehensive resource for vertebrate genomic data maintained by EMBL-EBI. The database provides gene annotations, sequences, variants, regulatory information, and comparative genomics data for over 250 species. Current release is 115 (September 2025).
This skill should be used when:
Query gene data by symbol, Ensembl ID, or external database identifiers.
Common operations:
Using the ensembl_rest package:
pythonfrom ensembl_rest import EnsemblClient client = EnsemblClient() # Look up gene by symbol gene_data = client.symbol_lookup( species='human', symbol='BRCA2' ) # Get detailed gene information gene_info = client.lookup_id( id='ENSG00000139618', # BRCA2 Ensembl ID expand=True )
Direct REST API (no package):
pythonimport requests server = "https://rest.ensembl.org" # Symbol lookup response = requests.get( f"{server}/lookup/symbol/homo_sapiens/BRCA2", headers={"Content-Type": "application/json"} ) gene_data = response.json()
Fetch genomic, transcript, or protein sequences in various formats (JSON, FASTA, plain text).
Operations:
Example:
python# Using ensembl_rest package sequence = client.sequence_id( id='ENSG00000139618', # Gene ID content_type='application/json' ) # Get sequence for a genomic region region_seq = client.sequence_region( species='human', region='7:140424943-140624564' # chromosome:start-end )
Query genetic variation data and predict variant consequences using the Variant Effect Predictor (VEP).
Capabilities:
VEP example:
python# Predict variant consequences vep_result = client.vep_hgvs( species='human', hgvs_notation='ENST00000380152.7:c.803C>T' ) # Query variant by rsID variant = client.variation_id( species='human', id='rs699' )
Perform cross-species comparisons to identify orthologs, paralogs, and evolutionary relationships.
Operations:
Example:
python# Find orthologs for a human gene orthologs = client.homology_ensemblgene( id='ENSG00000139618', # Human BRCA2 target_species='mouse' ) # Get gene tree gene_tree = client.genetree_member_symbol( species='human', symbol='BRCA2' )
Find all genomic features (genes, transcripts, regulatory elements) in a specific region.
Use cases:
Example:
python# Find all features in a region features = client.overlap_region( species='human', region='7:140424943-140624564', feature='gene' )
Convert coordinates between different genome assemblies (e.g., GRCh37 to GRCh38).
Important: Use https://grch37.rest.ensembl.org for GRCh37/hg19 queries and https://rest.ensembl.org for current assemblies.
Example:
pythonfrom ensembl_rest import AssemblyMapper # Map coordinates from GRCh37 to GRCh38 mapper = AssemblyMapper( species='human', asm_from='GRCh37', asm_to='GRCh38' ) mapped = mapper.map(chrom='7', start=140453136, end=140453136)
The Ensembl REST API has rate limits. Follow these practices:
Retry-After header and waitAlways implement proper error handling:
pythonimport requests import time def query_ensembl(endpoint, params=None, max_retries=3): server = "https://rest.ensembl.org" headers = {"Content-Type": "application/json"} for attempt in range(max_retries): response = requests.get( f"{server}{endpoint}", headers=headers, params=params ) if response.status_code == 200: return response.json() elif response.status_code == 429: # Rate limited - wait and retry retry_after = int(response.headers.get('Retry-After', 1)) time.sleep(retry_after) else: response.raise_for_status() raise Exception(f"Failed after {max_retries} attempts")
bashuv pip install ensembl_rest
The ensembl_rest package provides a Pythonic interface to all Ensembl REST API endpoints.
No installation needed - use standard HTTP libraries like requests:
bashuv pip install requests
api_endpoints.md: Comprehensive documentation of all 17 API endpoint categories with examples and parametersensembl_query.py: Reusable Python script for common Ensembl queries with built-in rate limiting and error handlingTo query available species and assemblies:
python# List all available species species_list = client.info_species() # Get assembly information for a species assembly_info = client.info_assembly(species='human')
Common species identifiers:
homo_sapiens or humanmus_musculus or mousedanio_rerio or zebrafishdrosophila_melanogaster| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
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. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.