vimalinx/bio-agent / .claude/skills/efetch
efetch
UnverifiedUse when you need to fetch records or data from NCBI Entrez databases (PubMed, nucleotide, protein, gene, SRA, etc.) by ID or accession
efetch
Quick Start
- Command:
efetch - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/efetch - Full reference: references/help.md
When To Use This Tool
- Retrieve full records or sequence data after
esearchorepost. - Fetch records by ID or accession from PubMed, Nucleotide, Protein, Gene, SRA, Assembly, and related databases.
- Export in FASTA, abstract, docsum, XML, JSON, or native record formats.
- Pull sequence subranges when you only need a locus, not the entire accession.
Common Patterns
# 1) Fetch PubMed abstracts from a search result
esearch -db pubmed -query 'ebola virus[Title/Abstract]' | efetch -format abstract
# 2) Fetch a nucleotide record in FASTA
efetch -db nucleotide -id NM_000546.6 -format fasta
# 3) Fetch only a sequence subrange
efetch \
-db nucleotide \
-id NC_000001.11 \
-format fasta \
-seq_start 100000 \
-seq_stop 101000
# 4) Fetch summaries in JSON-compatible mode
efetch -db assembly -id GCF_000001405.40 -format docsum -mode json
Recommended Workflow
- Get stable IDs first with
esearchorepost. - Choose
-formatdeliberately, because downstream parsing depends on it. - Save raw outputs for reproducibility when the fetched record is part of an analysis result.
- Pipe XML-style outputs into
xtractonly after verifying the record shape.
Guardrails
- Always specify
-dband usually specify-format; implicit defaults are easy to misread. - Large fetches should be chunked with
-startand-stop, or handled through batched EDirect pipelines. -seq_start,-seq_stop, and strand options only apply to sequence-style retrieval.- Invalid or mismatched IDs often yield empty output, so validate the upstream search first.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 117k | Updated | Claude CodeCodex | Unverified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 117k | Updated | Claude CodeCodex | Unverified | Install |