Overview
gget is a free, open-source command-line tool and Python package for querying genomic reference databases efficiently. It is built as a collection of separate but interoperable modules, each handling one kind of lookup in a single line: `ref` fetches Ensembl reference and annotation FTPs, `search` finds gene IDs by name or description, `info` looks up a gene or transcript, `seq` returns nucleotide or amino-acid sequence, `blat` and `blast` locate a sequence, `muscle` and `diamond` align, `enrichr` runs ontology enrichment, `archs4` returns tissue expression, `pdb` pulls a structure, `virus` downloads NCBI Virus genome datasets, `elm` finds eukaryotic linear motifs, and `cellxgene` fetches a single-cell count matrix as AnnData.
It was developed by Laura Luebbert in the Pachter Lab and is now part of the scverse project, fiscally sponsored by NumFOCUS. The package is BSD-2-Clause licensed, installs from PyPI or bioconda, and works identically from a shell, from a Jupyter or Colab notebook, or from R through reticulate. The reference publication is Luebbert & Pachter, *Efficient querying of genomic reference databases with gget*, Bioinformatics (2023).
gget has also become a worked example of why agents need deterministic tools. In *Paving the Way for Agents in Biology* (8 June 2026), Anthropic and the Pachter Lab benchmarked six science agents on NCBI Virus retrieval and found mean accuracies ranging from 16.9% to 91.3%, with severe run-to-run variability — Claude Sonnet 4 returned 106, then 15, then 5 sequences across three identical runs of a query whose correct answer was 266. Giving those same agents `gget virus` lifted every one above 90%, peaking at 99.7%, and largely eliminated the run-to-run variance.
What it does
- One module per database — Ensembl, NCBI, UniProt, PDB, Enrichr, ARCHS4, NCBI Virus, ELM, CELLxGENE — each usable in a single line
- Identical CLI and Python APIs, so the same query works in a shell script, a Jupyter notebook or Google Colab
- Sequence work built in: BLAT, BLAST, MUSCLE multiple alignment and DIAMOND local alignment against a reference
- `gget cellxgene` returns a single-cell RNA-seq count matrix in AnnData format filtered by gene, tissue and cell type
- Deterministic retrieval — the same query returns the same result, which is what makes it usable as an agent tool
- Callable from R via reticulate, and installable from PyPI or bioconda
Getting started
gget installs as a normal Python package and exposes every module as both a shell command and a Python function.
Install
From PyPI with uv or pip. Installing from source works too.
uv pip install gget
# or
pip install --upgrade ggetLook a gene up from the shell
Find the Ensembl ID by name, then fetch the record and the translated sequence for its canonical transcript.
# Ensembl IDs for human genes matching "ace2"
gget search -s homo_sapiens 'ace2' 'angiotensin converting enzyme 2'
# the gene and one of its transcripts
gget info ENSG00000130234 ENST00000252519
# the amino-acid sequence of the canonical transcript
gget seq --translate ENSG00000130234Do the same from Python
Every CLI module has a matching function, so a notebook workflow reads the same as the shell one.
import gget
gget.ref("homo_sapiens")
gget.search(["ace2", "angiotensin converting enzyme 2"], "homo_sapiens")
gget.info(["ENSG00000130234", "ENST00000252519"])
gget.seq("ENSG00000130234", translate=True)
gget.enrichr(["ACE2", "AGT", "AGTR1"], database="ontology", plot=True)Download a virus genome dataset
This is the module Anthropic's agents-in-biology work used as a deterministic retrieval layer: the query is explicit, so the result is reproducible.
gget virus "Zika virus" --host "Homo sapiens" --nuc_completeness completeRun the modules that need a one-time setup
A few modules download supporting data on first use. Run setup once per module, then use it normally.
gget setup elm
gget elm -o results MSSSSWLLLSLVAVTAAQSTIEEQAKTFLDKFNHEAEDLFYQSSLAS
gget setup cellxgene
gget cellxgene --gene ACE2 SLC5A1 --tissue lung --cell_type 'mucus secreting cell' -o example_adata.h5adCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Pull reference genomes, annotations and gene records into a bioinformatics pipeline without hand-writing one API client per database
- Give an LLM agent a deterministic biology retrieval tool so that an identical query returns an identical answer
- Fetch a filtered single-cell count matrix straight into AnnData for downstream scverse analysis
- Go from a gene name to sequence, structure, tissue expression and enrichment in a handful of notebook cells
How gget compares
gget alongside other open-source genomics & single-cell tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| Evo 2 | ★ 4.2k | Genome foundation model for modeling and designing DNA sequences across all domains of life. |
| scGPT | ★ 1.6k | Foundation model for single-cell multi-omics, using a generative pretrained transformer for cell-type annotation, integration, and perturbation prediction. |
| gget | ★ 1.2k | A command-line tool and Python package that queries the major genomic reference databases in one line each — and gives an LLM agent a deterministic retrieval layer instead of a guess |
| Nucleotide Transformer | ★ 919 | Foundation models for genomics and transcriptomics, pretrained on DNA sequences for downstream genomic prediction tasks. |
| Geneformer | — | Transformer foundation model pretrained on millions of single-cell transcriptomes for context-aware predictions in network biology. |