How to Fetch a Sequence by Accession Number: GenBank, RefSeq and UniProt
6 min read · Updated July 10, 2026
An accession number identifies one exact, versioned record in GenBank, RefSeq or UniProt — the reliable way to retrieve a sequence when a gene name or a plain-text description could match several records, or none at all. This guide covers how to read GenBank and RefSeq accession formats, what the RefSeq prefixes (NM_, NP_, NC_, NR_, XM_, XP_) mean, how UniProt accessions are structured, and why the version number after the dot matters for reproducing an analysis.
Why fetch by accession instead of by name
A gene name like "p53" or a description like "human insulin precursor mRNA" can map to several database entries — different species, different transcript variants, or superseded records. Searching by name also depends on how a record happens to be titled, which varies from one submission to the next. An accession number removes that ambiguity: it points to one specific record, maintained by one database, with a defined sequence.
The practical workflow is straightforward: find the accession referenced in the paper, supplementary table or database entry you're working from, fetch the record directly from the source database by that accession, note its version, and use the returned FASTA or GenBank/UniProt record as your working sequence.
GenBank and RefSeq accession formats
GenBank nucleotide accessions follow a predictable shape: 1-2 letters followed by 5-6 digits. Older records use 1 letter and 5 digits, such as U49845; newer records use 2 letters and 6 digits, such as AY123456, reflecting how the format expanded as the database grew. The letters themselves don't encode molecule type the way RefSeq's prefixes do — they're just part of the accession, not a code to decode.
RefSeq accessions carry more information: a 2-letter prefix indicates molecule type and curation status, followed by an underscore and a digit string. The N-prefixed records (NM_, NP_, NC_, NR_) are curated. The X-prefixed records (XM_, XP_) come from automated annotation pipelines and carry lower confidence — treat an XM_/XP_ hit as a working hypothesis about a transcript or protein, not a confirmed one, and check for a curated N-prefixed equivalent before relying on it.
- NM_ — mRNA (curated)
- NP_ — protein (curated)
- NC_ — complete genomic molecule, e.g. a chromosome or a full viral or bacterial genome
- NR_ — non-coding RNA
- XM_ / XP_ — computationally predicted ("model") mRNA or protein
UniProt accession format
UniProt accessions identify protein entries and follow their own pattern: typically a 6-character alphanumeric code starting with a letter, such as P69905 for human hemoglobin subunit alpha. Newer entries can run to 10 characters as UniProt's namespace has expanded.
A UniProt accession also carries a version number, the same way GenBank and RefSeq accessions do — covered next — so pin it just as carefully when citing or fetching a sequence.
The version suffix: why it matters for reproducibility
Almost every accession also carries a version suffix after a dot, e.g. NM_000546.6. That number increments every time the record's underlying sequence is revised — a corrected base call, an updated annotation, a resubmission.
Fetching "the accession" without pinning the version means a later fetch of the same accession could silently return an updated, slightly different sequence than the one you originally analyzed. A colleague who fetches NM_000546 six months after you did might get a newer version, with a corrected base or an updated annotation your original analysis never saw. Citing and fetching a specific version — NM_000546.6, not just NM_000546 — is what keeps an analysis reproducible months or years later.
Skip the copy-paste step
One of the easiest mistakes to make is copying a sequence out of a paper's PDF or a supplementary figure instead of fetching it. That process can introduce line-wrap artifacts, hidden whitespace, or OCR mistakes — especially from older, scanned papers — that look completely normal to the eye but break a downstream alignment, primer design, or restriction digest.
Fetching directly from the source database by accession avoids that failure mode, because you get the record as the database maintains it rather than as a PDF renderer happened to lay it out.
From accession to working sequence
Once you have the accession and its version, the remaining step is turning it into a record you can actually use. A sequence fetcher does exactly that: paste in a GenBank, RefSeq or UniProt accession and get back the corresponding FASTA or GenBank record, ready to feed into a sequence analyzer for composition, ORF, restriction-site and primer summaries, or into a tool that builds a full identity report from an unfamiliar sequence before sending it on to BLAST.
Starting from the accession rather than a transcribed sequence avoids a class of errors before the analysis even starts.
Frequently asked questions
How do I fetch a sequence using its accession number?
Take the accession as written in the paper or database entry, including its version number if one is given, and enter it directly into the source database or a tool that queries GenBank, RefSeq and UniProt, rather than retyping or copying the sequence by hand.
What's the difference between a GenBank and a RefSeq accession?
GenBank accessions (1-2 letters plus 5-6 digits, e.g. AY123456) are individually submitted records from labs and sequencing projects, while RefSeq accessions (a 2-letter prefix, underscore, then digits, e.g. NM_000546) are NCBI's curated or predicted reference set, with the prefix itself indicating molecule type.
What does the NM_ prefix mean in an accession number?
NM_ marks a curated mRNA record in RefSeq. Related prefixes are NP_ for the corresponding protein, NC_ for a complete genomic molecule such as a chromosome or full viral or bacterial genome, NR_ for non-coding RNA, and XM_/XP_ for computationally predicted mRNA or protein equivalents.
Why does the version number after an accession matter?
The version, such as the ".6" in NM_000546.6, tracks revisions to that record's sequence, so fetching without specifying it risks silently retrieving a different sequence than the one used in the original analysis, breaking reproducibility.
Related references
Quick reference for FASTA, FASTQ, GenBank and related formats.
SAM/BAM flags, VCF, BED and GFF/GTF columns and coordinate systems.
Reference table of common cloning and protein expression vectors with backbone size, origin of replication, copy number, selection marker, promoter and fusion tags.