Python arguments are equivalent to long-option arguments (--arg), unless otherwise specified. Flags are True/False arguments in Python. The manual for any gget tool can be called from the command-line using the -h --help flag.

gget seq 🧬

Fetch nucleotide or amino acid sequence(s) of a gene (and all its isoforms) or a transcript by Ensembl ID.
Return format: FASTA.

Positional argument
ens_ids
One or more Ensembl IDs.

Optional arguments
-o --out
Path to the file the results will be saved in, e.g. path/to/directory/results.fa. Default: Standard out.
Python: save=True will save the output in the current working directory.

Flags
-t --translate
Returns amino acid (instead of nucleotide) sequences.
Nucleotide sequences are fetched from Ensembl.
Amino acid sequences are fetched from UniProt.

-iso --isoforms
Returns the sequences of all known transcripts.
(Only for gene IDs.)

-q --quiet
Command-line only. Prevents progress information from being displayed.
Python: Use verbose=False to prevent progress information from being displayed.

Examples

gget seq ENSG00000034713 ENSG00000104853 ENSG00000170296
# Python
gget.seq(["ENSG00000034713", "ENSG00000104853", "ENSG00000170296"])

→ Returns the nucleotide sequences of ENSG00000034713, ENSG00000104853, and ENSG00000170296 in FASTA format.

gget seq -t -iso ENSG00000034713
# Python
gget.seq("ENSG00000034713", translate=True, isoforms=True)

→ Returns the amino acid sequences of all known transcripts of ENSG00000034713 in FASTA format.

More examples