bio-ncbi-datasets-cli
БесплатноЗапускает вложенные скриптыНе проверенDownload genome assemblies, gene records, and ortholog data from NCBI using the modern Datasets v2 CLI (replaces assembly_summary.txt scraping and many EFetch…
от gabrielmoreira★ 23 звезды на GitHubОб этом скилле
Version Compatibility
Reference examples tested with: NCBI Datasets CLI 16.0+ (2024), dataformat 16.0+
Before using code patterns, verify installed versions match. If versions differ:
- CLI:
datasets --version,dataformat --version - Subcommand help:
datasets <subcommand> --help
If a subcommand or flag is unrecognized, run datasets --help and adapt. The CLI is
under active development; major releases (v15 -> v16) added subcommands and renamed flags.
NCBI Datasets CLI
"Pull genome / gene / ortholog data from NCBI in 2026" -> The Datasets v2 CLI (launched 2023) is the official, supported bulk endpoint for genome and gene-centric data. It replaces the prior best-practice of scraping assembly_summary.txt + parallel FTP + manual checksum verification. For genome-scale data, it is strictly better than E-utilities (EFetch).
The CLI is not the right answer for everything. PubMed, SRA reads, and custom Entrez queries still belong to E-utilities. The defection rule: if the question is about genome assemblies, gene records, or pre-computed orthologs, use Datasets; otherwise stay with E-utilities.
- CLI:
datasets download genome accession GCF_... - CLI:
datasets summary gene symbol BRCA1 --taxon human - Python:
subprocesswrapper; Python clientncbi-datasets-pylib(experimental as of 2024)
Installation
# conda
conda install -c conda-forge ncbi-datasets-cli
# Or direct download (Linux, macOS, Windows binaries)
curl -O https://ftp.ncbi.nlm.nih.gov/pub/datasets/command-line/v2/linux-amd64/datasets
datasets --version # 16.0+ expected
dataformat --version # bundled companion tool
What's in scope (use Datasets) vs out of scope (use E-utilities or other tools)
| Question | Datasets | Use instead |
|---|---|---|
| Genome assembly download | yes | — |
| All reference genomes for a taxon | yes | — |
| Gene record metadata (multi-species) | yes | — |
| Ortholog data for a gene | yes (datasets summary gene ... --ortholog) |
OrthoDB / Compara for tree-aware orthology |
| Virus data (assemblies, metadata) | yes (datasets download virus) |
— |
| Annotation files (GFF3, GTF) for a genome | yes | — |
| Protein records (curated, with cross-refs) | partial | UniProt REST for richer annotation |
| PubMed | no | entrez-search / entrez-fetch |
| SRA reads | no | sra-data |
| BLAST | no | blast-searches / local-blast |
| Custom Entrez queries | no | entrez-search |
| Pre-computed alignments (Compara) | no | ensembl-rest |
Subcommand taxonomy
| Subcommand | Purpose | Example |
|---|---|---|
datasets summary genome |
Metadata only; JSON output | datasets summary genome accession GCF_000001405.40 |
datasets download genome |
Download data files | datasets download genome accession GCF_... |
datasets summary gene |
Gene record metadata | datasets summary gene symbol BRCA1 --taxon human |
datasets download gene |
Download gene products | datasets download gene symbol BRCA1 --taxon human |
datasets summary taxonomy |
Taxonomy info | datasets summary taxonomy taxon human |
datasets download virus |
Virus assemblies/proteins | datasets download virus genome taxon SARS-CoV-2 |
dataformat tsv / dataformat excel |
Convert JSON-lines to tabular | dataformat tsv gene-summary |
datasets summary always returns JSON-lines on stdout (one object per record). datasets download produces a .zip (default) or a "dehydrated" stub for cloud workflows.
Key parameters (download)
| Flag | Effect |
|---|---|
--filename out.zip |
Where to write the archive |
--include genome,gff3,gtf,protein,cds,rna,seq-report |
Which file types to include |
--reference |
Restrict to reference assemblies only (one per species) |
--annotated |
Restrict to annotated assemblies |
--assembly-source RefSeq / GenBank / all |
Database source |
--assembly-level chromosome,complete |
Assembly quality level |
--released-after 2024-01-01 |
Date filter |
--dehydrated |
Skip data; download just stubs + URL list (for parallel pull) |
--api-key XXX |
Optional API key (raises rate limit) |
--no-progressbar |
For non-interactive use |
For very large pulls (1000+ genomes), --dehydrated is the right choice: download the metadata stubs first, then run datasets rehydrate later or pull URLs in parallel from the manifest.
JSON-lines output + dataformat
datasets summary returns JSON-lines (one JSON object per line) on stdout. Pipe through dataformat tsv for tabular:
datasets summary genome taxon "Escherichia coli" --reference --as-json-lines \
| dataformat tsv genome --fields accession,organism-name,assembly-level,scaffold-n50 \
> ecoli_refs.tsv
dataformat subcommands match summary types: genome, gene, virus-genome, etc. The --fields list is documented per type via dataformat tsv <type> --help.
When to use --dehydrated for cloud workflows
The "dehydrated" mode separates data di
Установить bio-ncbi-datasets-cli в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл bio-ncbi-datasets-cli?
Download genome assemblies, gene records, and ortholog data from NCBI using the modern Datasets v2 CLI (replaces assembly_summary.txt scraping and many EFetch workflows). Use when bulk-pulling genome assemblies, gene metadata across species, ortholog sets, or BLAST databases; when E-utilities are too slow for genome-scale work; or when automatic checksum verification, parallel download, and clean accession-driven retrieval are required. Encodes the JSON-lines output format, dataformat conversion, --dehydrated for cloud workflows, and when Datasets is/isn't the right tool.
Как установить скилл bio-ncbi-datasets-cli?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл bio-ncbi-datasets-cli запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic