# gget

> 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

- Category: Science & Biomedical AI / Genomics & Single-Cell
- Language: Python
- Licence: BSD-2-Clause
- Repository: https://github.com/scverse/gget
- Website: https://scverse.org/gget
- Canonical page: https://ai-tldr.dev/tools/gget/
- Updated: 2026-06-08

## In short

gget is a free, open-source command-line tool and Python package for querying genomic reference databases efficiently. It sits in the Genomics & Single-Cell category of the Science & Biomedical AI tools and is open-source, written in Python and licensed BSD-2-Clause. To get started: install.

## 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), a research post written by gget's developer Laura Luebbert, Anthropic tested scientific research agents (Claude, Biomni OSS, Edison Analysis and GPT) on retrieving viral sequences from NCBI Virus 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 an Ebolavirus query whose correct answer was 266. Giving those agents `gget virus` lifted every one above 90%, peaking at 99.7% for GPT-5.5, and made the choice of model much less important.

## 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.

1. Install

   From PyPI with uv or pip. Installing from source works too.

```bash
uv pip install gget
# or
pip install --upgrade gget
```

2. Look a gene up from the shell

   Find the Ensembl ID by name, then fetch the record and the translated sequence for its canonical transcript.

```bash
# 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 ENSG00000130234
```

3. Do the same from Python

   Every CLI module has a matching function, so a notebook workflow reads the same as the shell one.

```python
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)
```

4. 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.

```bash
gget virus "Zika virus" --host "Homo sapiens" --nuc_completeness complete
```

5. Run 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.

```bash
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.h5ad
```

## 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

## Version history

- 2026-06-08: Anthropic published *Paving the way for agents in biology*, testing scientific research agents (Claude, Biomni OSS, Edison Analysis, GPT) on NCBI Virus sequence retrieval. Mean accuracy ranged from 16.9% to 91.3% with large run-to-run variance; giving each agent the deterministic `gget virus` module raised all of them above 90%, peaking at 99.7%.
