gene-id
download a gene dataset by NCBI Gene ID
gene-id
Name
datasets download gene gene-id - download a gene dataset by NCBI Gene ID
Synopsis
datasets download gene gene-id <gene-id ...> [flags]
Description
Download a gene dataset by NCBI Gene ID. Gene data packages include gene, transcript and protein sequence, a data table and a data report. Datasets are downloaded as a zip file.
The default gene dataset includes the following files:
- gene.fna (gene sequences)
- rna.fna (transcript sequences)
- protein.faa (protein sequences)
- data_report.jsonl (data report with gene metadata)
- data_table.tsv (data table with gene metadata, one transcript per row)
- dataset_catalog.json (a list of files and file types included in the dataset)
Refer to NCBI Datasets Gene Package documentation for more information about the gene package.
Examples
datasets download gene gene-id 672
datasets download gene gene-id 2597 14433
Options
--api-key string NCBI Datasets API Key
--exclude-gene exclude gene.fna (gene sequence file)
--exclude-protein exclude protein.faa (protein sequence file)
--exclude-rna exclude rna.fna (transcript sequence file)
--fasta-filter strings limit gene fasta download to a specific list of accessions
--fasta-filter-file string file of accessions to limit gene fasta download
--filename string specify a custom file name for the downloaded dataset (default "ncbi_dataset.zip")
-h, --help help for gene-id
--include-3p-utr include 3p_utr.fna (3'-UTR sequence file)
--include-5p-utr include 5p_utr.fna (5'-UTR sequence file)
--include-cds include cds.fna (CDS sequence file)
-i, --inputfile string read a list of NCBI Gene IDs from a file to use as input
--no-progressbar hide progress bar
Generated March 11, 2025