Biological Sequence Databases
Biological Sequence Databases, Identifiers and File Formats
Two kinds of sequence database
Sequence databases fall into two broad groups, and choosing well starts with knowing which kind you are searching.
- Primary (archival) databases store sequences as submitted by the researchers who produced them. The International Nucleotide Sequence Database Collaboration (INSDC) consists of GenBank (NCBI, USA), the European Nucleotide Archive (EMBL-EBI) and the DNA Data Bank of Japan. The three exchange data daily, so a record submitted to one appears in all. The archive is comprehensive but redundant: the same gene may appear many times, and each record carries the submitter's own annotation.
- Secondary (curated) databases build on the archives. They merge redundant entries, standardize annotation and add evidence.
- RefSeq (NCBI) provides one non-redundant reference record per molecule.
- UniProtKB is the central protein knowledgebase. Swiss-Prot is its reviewed section, with manual curation from the literature. TrEMBL is its unreviewed section, with automatic annotation of translated coding sequences. TrEMBL is far larger; Swiss-Prot is far more reliable for function.
Related resources fill other roles. The Sequence Read Archive (SRA) stores raw sequencing reads, the Protein Data Bank (PDB) stores experimentally determined 3-D structures, and Entrez is NCBI's search and retrieval system.
Entrez links records across databases, so you can move from a nucleotide record to its protein, gene, publications and structures. A query can combine field tags, for example insulin[Gene Name] AND Mus musculus[Organism].
Identifiers
An accession is a stable identifier for a record, and it is never reassigned to a different record. NCBI and INSDC records add a version: accession.version.
The version number increases when the sequence itself changes. Updates to annotation, such as references or feature descriptions, do not change it. To reproduce an analysis exactly, cite and retrieve the full accession.version.
RefSeq prefixes describe the molecule type and how the record was produced:
Prefix | Molecule | Origin |
|---|---|---|
NC_ | complete genomic molecule (chromosome, organelle genome) | curated assembly-based reference |
NG_ | genomic region (e.g., a gene locus) | curated |
NM_ / NR_ / NP_ | mRNA / non-coding RNA / protein | based mainly on transcript evidence; curation status ranges from provisional to reviewed |
XM_ / XR_ / XP_ | mRNA / non-coding RNA / protein | model predictions from the automated genome annotation pipeline |
UniProtKB entries have an accession, a short alphanumeric code, and a more readable entry name of the form MNEMONIC_SPECIES, such as HBA_HUMAN. The accession is the stable identifier to cite.
File formats
FASTA is the minimal format. Each record starts with a header line beginning >, followed by one or more lines of sequence. Line breaks inside a sequence carry no meaning, and the header is not part of the sequence. A file can hold many records.
GenBank flat file is a rich, human-readable record. It contains LOCUS (name, length, molecule type), DEFINITION, ACCESSION, VERSION, SOURCE/ORGANISM and REFERENCE blocks, then a FEATURES table giving coordinates for features such as gene and CDS (often with a /translation). The numbered sequence follows under ORIGIN, and the record ends with //.
FASTQ stores sequencing reads with per-base quality. Each record has four lines:
- @read identifier
- the bases
- +, optionally repeating the identifier
- a quality string with one character per base
In the modern Phred+33 encoding, the quality score is Q = (ASCII code of the character) − 33, and the estimated probability that the base call is wrong is P = 10−Q/10. For example, the character ? has ASCII code 63, so Q = 30 and P = 10−3: about one error per thousand such bases.
Nucleotide or protein? The IUPAC nucleotide alphabet is A, C, G, T/U plus ambiguity codes R, Y, S, W, K, M, B, D, H, V and N.
Many of these letters are also amino-acid codes, so a sequence of only those letters is ambiguous. Letters such as E, F, I, L, P and Q never occur in nucleotide sequences, so their presence indicates protein.
Choosing a database
- Need reliable, experimentally supported protein function? Use Swiss-Prot.
- Need the most complete catalogue of sequences, including poorly characterized ones? Use the archive (INSDC) or broad protein sets that include TrEMBL, and accept the redundancy.
- Need one stable reference transcript or protein for coordinates or variant reporting? Use RefSeq NM_/NP_ records, cited with a version.
- Need raw reads to re-analyse? Use SRA. Need a structure? Use PDB.
Match the query type too. Protein questions are best asked of protein databases, and nucleotide questions of nucleotide databases. How similarity searches score and report matches is a separate topic.
While looking up a gene in NCBI, a student finds two RefSeq mRNA records: one with an accession beginning NM_ and one beginning XM_. Which statement correctly interprets the difference?
Mark Yourself Question
- Grab a piece of paper and try this problem yourself.
- When you're done, check the "I have answered this question" box below.
- View the solution and report whether you got it right or wrong.
In a FASTQ file using the standard Phred+33 encoding, one base in a read has the quality character 5. The ASCII code of the character 5 is 53. What is the estimated probability that this base call is incorrect?