New to Claude Skills? Learn how to install them →

mims-harvard on GitHub

Biological Sequence Retrieval

Free

Efficiently fetch and disambiguate biological sequences.

Get this skill

Free · Opens the source repo

What Biological Sequence Retrieval does

The Biological Sequence Retrieval skill allows users to retrieve DNA, RNA, and protein sequences from trusted databases like NCBI and ENA, ensuring high-quality and accurate results. It emphasizes a structured workflow to clarify queries, disambiguate gene and organism information, and effectively search and report sequences. This skill is particularly useful for researchers, bioinformaticians, and anyone involved in genomic studies who require reliable access to biological data.

The skill operates on a clear hierarchy of sequence quality, preferring RefSeq curated sequences over GenBank submissions. Users can fetch specific sequences by their accession numbers or perform lookups using gene symbols. The retrieval process is designed to be efficient, with built-in mechanisms to handle potential ambiguities in gene and organism identification. For example, if a gene exists in multiple organisms, the skill prompts for clarification to ensure accurate results.

In addition to fetching sequences, the skill provides a comprehensive Sequence Profile Report that summarizes the search results, including crucial details like accession numbers, sequence types, and annotations. This report format is designed to facilitate downstream analysis, making it easier for users to interpret and utilize the retrieved data in their research or applications.

Overall, this skill is an essential tool for anyone needing to access biological sequences with precision and clarity, streamlining the often complex process of genomic data retrieval and interpretation.

When to use it

Use this skill when you need to fetch specific DNA, RNA, or protein sequences from NCBI or ENA, especially when disambiguation is required.

When not to use it

This skill may not be suitable for users who require extensive data analysis or visualization, as it focuses solely on retrieval and reporting.

What you can build with it

Fetching Specific Sequences

Use the skill to retrieve a specific DNA or protein sequence by providing its accession number for quick access.

Disambiguating Gene Information

When working with genes present in multiple organisms, this skill helps clarify and disambiguate to ensure accurate data retrieval.

Generating Sequence Reports

After retrieving sequences, generate a comprehensive report that summarizes key details and annotations for further analysis.

How to install Biological Sequence Retrieval

View source

1. Install with the skills CLI

npx skills add mims-harvard/tooluniverse/tooluniverse-sequence-retrieval --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by mims-harvard

Biological Sequence Retrieval

Retrieve DNA, RNA, and protein sequences with proper disambiguation and cross-database handling.

IMPORTANT: Always use English terms in tool calls. Only try original-language terms as fallback. Respond in the user's language.

LOOK UP DON'T GUESS: Never assume accession numbers or sequence versions. Always retrieve and verify from NCBI or ENA.

Domain Reasoning

Sequence quality hierarchy: RefSeq (NM_/NP_ = curated) > RefSeq predicted (XM_/XP_) > GenBank (submitted). Prefer the MANE Select transcript for human canonical isoforms. Check version numbers -- annotations improve across versions.

Workflow

Phase 0: Clarify (if needed) → Phase 1: Disambiguate Gene/Organism → Phase 2: Search & Retrieve → Phase 3: Report

Phase 0: Clarification (When Needed)

Ask ONLY if: gene exists in multiple organisms, sequence type unclear, or strain matters. Skip for: specific accessions, clear organism+gene combos, complete genome requests with organism.


Phase 1: Gene/Organism Disambiguation

Accession Type Decision Tree

PrefixTypeUse With
NC_/NM_/NR_/NP_/XM_RefSeqNCBI only
U*/M*/K*/X*/CP*/NZ_GenBankNCBI or ENA
EMBL formatEMBLENA preferred

CRITICAL: Never try ENA tools with RefSeq accessions -- they return 404.

Identity Checklist

  • Organism confirmed (scientific name)
  • Gene symbol/name identified
  • Sequence type determined (genomic/mRNA/protein)
  • Accession prefix identified for tool selection

Phase 2: Data Retrieval (Internal)

Retrieve silently. Do NOT narrate the search process.

# Search NCBI Nucleotide
result = tu.tools.NCBI_search_nucleotide(
    operation="search", organism=organism, gene=gene,
    strain=strain, keywords=keywords, seq_type=seq_type, limit=10
)

# Get accessions from UIDs
accessions = tu.tools.NCBI_fetch_accessions(operation="fetch_accession", uids=result["data"]["uids"])

# Retrieve sequence (FASTA or GenBank format)
sequence = tu.tools.NCBI_get_sequence(operation="fetch_sequence", accession=accession, format="fasta")

# ENA alternative (non-RefSeq accessions only)
entry = tu.tools.ena_get_entry(accession=accession)
fasta = tu.tools.ena_get_sequence_fasta(accession=accession)

Fallback Chains

PrimaryFallbackNotes
NCBI_get_sequenceENA (if GenBank format)NCBI unavailable
ena_get_entryNCBI_get_sequenceENA doesn't have RefSeq
NCBI_search_nucleotideTry broader keywordsNo results

Phase 3: Report Sequence Profile

Present as a Sequence Profile Report. Hide search process. Include:

  1. Search Summary: query, database, result count
  2. Primary Sequence: accession, type (RefSeq/GenBank), organism, strain, length, molecule, topology, curation level
  3. Sequence Preview: first lines of FASTA (truncated)
  4. Annotations Summary: CDS/tRNA/rRNA/regulatory feature counts (from GenBank format)
  5. Alternative Sequences: ranked by relevance and curation, with ENA compatibility
  6. Cross-Database References: RefSeq, GenBank, ENA/EMBL, BioProject, BioSample
  7. Download Options: FASTA (for BLAST/alignment), GenBank (for annotation)

Curation Level Tiers

TierPrefixDescription
RefSeq Reference (best)NC_, NM_, NP_NCBI-curated, gold standard
RefSeq PredictedXM_, XP_, XR_Computationally predicted
GenBank ValidatedVariousSubmitted, some curation
GenBank DirectVariousDirect submission
Third PartyTPA_Third-party annotation

Reasoning Framework

Sequence quality: Prefer RefSeq over GenBank. Check version numbers. Sequences with "PREDICTED" in definition are not experimentally validated.

Accession guidance: RefSeq = NCBI-only. GenBank = mirrored in ENA/EMBL. Default to RefSeq mRNA (NM_) for human/model organisms; most complete genome assembly for microbial queries.

Cross-database reconciliation: Same sequence may have different accessions (e.g., GenBank U00096 = RefSeq NC_000913 for E. coli K-12). Always report both when available. Discrepancies between GenBank/RefSeq typically indicate RefSeq curation corrected submission errors.

Synthesis Questions

  1. What is the highest-quality accession available?
  2. Are there alternative accessions in other databases?
  3. What is the annotation completeness?
  4. Is the sequence from the expected organism/strain?
  5. What download format suits the user's downstream analysis?

Error Handling

ErrorResponse
"No search criteria provided"Add organism, gene, or keywords
"ENA 404 error"Likely RefSeq -- use NCBI only
"No results found"Broaden search, check spelling, try synonyms
"Sequence too large"Note size, provide download link instead

Tool Reference

NCBI Tools: NCBI_search_nucleotide (search), NCBI_fetch_accessions (UID→accession), NCBI_get_sequence (retrieve) ENA Tools (GenBank/EMBL only): ena_get_entry (metadata), ena_get_sequence_fasta (FASTA), ena_get_entry_summary (summary)


Search Parameters Reference

NCBI_search_nucleotide: operation="search", organism (scientific name), gene (symbol), strain, keywords, seq_type (complete_genome/mrna/refseq), limit

NCBI_get_sequence: operation="fetch_sequence", accession, format (fasta/genbank)

Frequently asked questions about Biological Sequence Retrieval

Similar skills