esample
Quick Start
- Command:
esample -docsum|-article|-book|-protein|-gene|-taxon|-blast|-snp|-hgvs|-bioc|-flatfile|-gff|-gencode - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/esample - Full reference: See
references/help.md
When To Use This Tool
- Get a representative sample document for
xtract, parser, or schema debugging without making a live Entrez request. - Create fixtures for tests or documentation that need stable example records.
- Learn the structure of a supported output type before switching to real
efetchorxfetchdata.
Common Patterns
# 1) Prototype an xtract expression against a sample PubMed docsum
esample -docsum | xtract -pattern DocumentSummary -element Id Title
# 2) Save a sample GenBank flatfile or GFF3 record as a fixture
esample -flatfile > example.gb
esample -gff > example.gff3
# 3) Inspect sample genetic code output for parser work
esample -gencode
Recommended Workflow
- Choose the sample mode that matches the structure you need to inspect.
- Pipe it into
xtract,transmute, or your parser until the transformation is correct. - Save the output as a stable fixture if you need repeatable tests.
- Replace the sample source with real
efetch,xfetch, or archived data once the downstream logic is proven.
Guardrails
esampleprints hard-coded example documents; it does not fetch live records from NCBI.- Output goes to standard output, so redirect to a file if you want to keep the sample.
- Use one mode flag per invocation; this is a selector for canned examples, not a general conversion engine.
- The documented help entry point is
-help, not--help.