GenBank Flat File Format Explained with Examples

Loading

GenBank Flat File Format Explained with Examples

The GenBank flat file format is a structured text format used to represent nucleotide sequence records together with their biological annotations, identifiers, source information, references, and sequence data. It is one of the most useful formats for researchers who need to examine not only a nucleotide sequence but also the biological features associated with that sequence. Unlike FASTA, which primarily represents sequence identifiers and nucleotide strings, a GenBank flat file can contain detailed information about genes, coding sequences, RNA molecules, feature locations, qualifiers, publications, and biological source information.

The term flat file refers to the way the information is represented as a structured text record rather than as a conventional database table. Although the file is plain text and can be opened in a basic text editor, its contents follow established conventions. Field names, indentation, feature keys, locations, qualifiers, sequence formatting, and record termination markers allow both humans and bioinformatics software to interpret the information consistently.

A typical GenBank flat file begins with record-level information and progresses through descriptive and biological annotation fields before reaching the nucleotide sequence. A simplified structure can be represented as:

LOCUS
DEFINITION
ACCESSION
VERSION
KEYWORDS
SOURCE
  ORGANISM
REFERENCE
FEATURES
ORIGIN
//

Not every record will contain exactly the same fields, and some records may contain additional information depending on the type of sequence and its history. Nevertheless, these fields provide a useful framework for learning how to read a GenBank flat file.

The LOCUS line is normally the first major line of a GenBank record. It provides a compact summary of the sequence record and can include the locus name, sequence length, molecule type, database division, and modification date. In the NCBI sample record for accession U49845, for example, the LOCUS line identifies the record as SCU49845, reports a length of 5028 bp, identifies the molecule as DNA, and includes the GenBank division and modification date.

LOCUS       SCU49845     5028 bp    DNA             PLN       21-JUN-1999

The precise spacing of a traditional GenBank flat file is significant because the format uses defined columns and indentation conventions. However, researchers should focus first on the meaning of each field rather than attempting to memorize every column position. The LOCUS line provides an overview, while later fields contain more detailed information.

The DEFINITION line provides a short description of the sequence. It can identify the organism, gene, protein product, or other biological description associated with the record. In the U49845 example, the definition describes a Saccharomyces cerevisiae sequence containing the TCP1-beta gene and other annotated genes.

DEFINITION  Saccharomyces cerevisiae TCP1-beta gene, partial cds,
            and Axl2p (AXL2) and Rev7p (REV7) genes, complete cds.

Long descriptions can continue across multiple lines. The continuation lines are indented to indicate that they belong to the same field. This continuation convention is common throughout GenBank flat files.

The ACCESSION line contains the accession identifier for the sequence record. An accession identifies the record and provides a practical way to retrieve it from a nucleotide database.

ACCESSION   U49845

Researchers commonly use accession numbers when retrieving GenBank records, citing sequences in scientific publications, comparing sequences, and referring to particular nucleotide records. The accession should not be confused with the LOCUS name. Accession numbers are generally the preferred identifiers for retrieving GenBank records.

The VERSION line provides an accession.version identifier that identifies a particular sequence version.

VERSION     U49845.1

The .1 component indicates the sequence version. If the nucleotide sequence itself is changed, the version number can be incremented while the accession remains associated with the record. This distinction is particularly important when researchers need to reproduce an analysis using the exact sequence that was available at a particular time.

Older GenBank examples may also show a GI number on the VERSION line, such as:

VERSION     U49845.1  GI:1293613

Researchers should be careful when reading older tutorials because GI identifiers are historical and are no longer the preferred sequence identifiers. Modern workflows should generally rely on accession.version identifiers when a precise nucleotide sequence identity is required.

The KEYWORDS field contains descriptive keywords when applicable. Older records may contain terms in this field, whereas many newer records have little or no keyword information. In a record without keywords, the field may contain a period:

KEYWORDS    .

The KEYWORDS field is largely historical and is not a controlled vocabulary, so researchers should not assume that it provides a comprehensive description of the sequence.

The SOURCE section identifies the biological source of the sequence. It is generally followed by an ORGANISM line that provides the scientific organism name and taxonomic classification.

SOURCE      Saccharomyces cerevisiae (baker's yeast)
  ORGANISM  Saccharomyces cerevisiae
            Eukaryota; Fungi; Ascomycota; ...

The SOURCE and ORGANISM information provides biological context for the sequence. Additional source characteristics such as strain, isolate, host, geographic location, collection information, or other attributes may be represented as qualifiers in the FEATURES section.

The REFERENCE section connects the sequence record to scientific literature or other references. A record may contain one or multiple references. These references can identify publications describing the sequence, biological material, experimental work, or related research. When interpreting a sequence record, references can therefore help establish where the data originated and how the sequence was characterized.

The FEATURES section is one of the most important parts of a GenBank flat file. It contains annotations describing biologically meaningful regions or characteristics of the nucleotide sequence. Common feature keys include source, gene, CDS, mRNA, rRNA, tRNA, and other feature types.

FEATURES             Location/Qualifiers
     source          1..5028
                     /organism="Saccharomyces cerevisiae"
     gene            1..206
                     /gene="TCP1"
     CDS             1..206
                     /gene="TCP1"
                     /product="Example protein"

The actual structure can be considerably more complex, but the basic principle is consistent: a feature has a feature key, a location, and, when appropriate, qualifiers.

The feature key describes the type of biological feature. Common examples include source, gene, CDS, mRNA, rRNA, tRNA, promoter, and misc_feature. The available feature keys are part of the standardized annotation system used by the International Nucleotide Sequence Database Collaboration.

The location specifies where the feature occurs on the sequence. A simple feature can be represented by a range such as:

     gene            100..500

This means that the feature occupies nucleotides 100 through 500.

A feature can also occur on the complementary strand. Such a location can be represented using complement:

     CDS             complement(100..500)

This indicates that the feature is located on the opposite strand relative to the displayed sequence orientation.

A feature can contain multiple intervals. This is particularly important for genes and transcripts that contain introns. A simplified example is:

     CDS             join(100..200,301..450,501..700)

The join() expression indicates that the feature is composed of multiple sequence intervals. These intervals are interpreted together as one biological feature.

Partial features can also be represented using location symbols. For example:

     CDS             <1..206

or:

     CDS             435..915>

The < and > symbols indicate that the corresponding end of the feature is incomplete or extends beyond the available sequence.

The information following a feature location consists of qualifiers. Qualifiers provide additional information about the feature and are generally written as a qualifier name followed by a value.

     CDS             100..900
                     /gene="ABC1"
                     /product="Example protein"

Here, gene and product are qualifiers associated with the CDS feature.

Other commonly encountered qualifiers include /locus_tag, /note, /protein_id, /translation, /inference, and /db_xref. The precise qualifiers allowed depend on the feature type and current annotation rules.

The relationship between a feature key, location, and qualifiers is fundamental to understanding GenBank annotation:

Feature key       Location
     ↓                ↓
     CDS             100..900
                     ↓
                 Qualifiers
                     ↓
              /gene="ABC1"
              /product="Example protein"

A gene feature identifies a genomic or nucleotide region associated with a gene. A CDS feature identifies the coding region that is translated into a protein. These features can be related through their coordinates and qualifiers.

For example:

     gene            100..800
                     /gene="ABC1"

     CDS             150..750
                     /gene="ABC1"
                     /product="Example protein"

The gene and CDS are not necessarily identical in length. Their locations represent different biological concepts.

The ORIGIN section marks the beginning of the nucleotide sequence representation in a traditional GenBank flat file. The nucleotide sequence follows the ORIGIN line and is formatted in groups to make the sequence easier for humans to inspect.

ORIGIN
        1 atgcctagca gctagcttac ggatcctaga
       31 tcgactgaca atcgatcgta gctagctagc
       61 ...

The numbers at the left indicate nucleotide positions, while the letters represent the nucleotide sequence. Spaces and line wrapping make the sequence easier to read; they are not part of the biological sequence itself.

The record is terminated by the symbol:

//

This indicates the end of one GenBank record. A file containing several records can therefore contain multiple record blocks, each ending with //.

An important practical point is that the GenBank flat-file format is not the same thing as the GenBank database. GenBank is the nucleotide sequence database, while the flat file is a textual representation of sequence records and their associated information.

It is also important to distinguish a GenBank flat file from a FASTA file. A FASTA file might contain:

>ABC1
ATGCGTACGATCGATCGATCGATCG

The corresponding GenBank representation could contain much more information:

LOCUS       ABC1       24 bp    DNA
DEFINITION  Example nucleotide sequence.
ACCESSION   ABC123
VERSION     ABC123.1
SOURCE      Example organism
FEATURES             Location/Qualifiers
     gene            1..24
                     /gene="ABC1"
     CDS             1..21
                     /gene="ABC1"
                     /product="example protein"
ORIGIN
        1 atgcgtacga tcgatcgatc gatc
//

The example above is simplified for teaching purposes. A real GenBank record contains additional information and follows the appropriate formatting conventions. The important distinction is that FASTA primarily provides sequence data, whereas GenBank provides sequence data together with structured annotation and metadata.

The source feature is particularly important because it connects the sequence to its biological origin. In many GenBank records, the source feature spans the entire sequence and contains qualifiers describing the organism and other characteristics of the biological material.

A GenBank flat file may also contain comments, cross-references, database links, assembly information, or other record-specific information depending on the type of record. Genome-scale records can be much more complex than the short gene examples commonly used in introductory tutorials. Researchers should therefore treat simplified examples as demonstrations of the format rather than complete representations of every possible GenBank record.

The flat-file representation is also closely connected to the GenBank feature table used during sequence annotation and submission. NCBI provides a five-column, tab-delimited feature-table format in which the sequence identifier, feature locations, feature keys, qualifier keys, and qualifier values are represented separately. This information can be used to construct corresponding GenBank annotation.

For example, a simplified feature table can contain:

100     900     CDS
                gene        ABC1
                product     Example protein

The corresponding GenBank flat-file representation can then contain:

     CDS             100..900
                     /gene="ABC1"
                     /product="Example protein"

This relationship is useful when moving between sequence submission, annotation, and the final public GenBank record.

When reading a GenBank flat file, researchers should pay particular attention to the relationship between coordinates and biological meaning. A feature location tells you where something is, while its feature key and qualifiers tell you what it represents. For example, the location 100..900 by itself does not tell you whether the sequence represents a gene, CDS, RNA, or another feature. That interpretation comes from the feature key and associated annotation.

The distinction between gene and CDS is especially important. A gene feature describes a gene region, whereas a CDS identifies the portion that encodes a protein. In a simple prokaryotic gene, the two may have similar coordinates, but in more complex genes they can differ substantially. Researchers should therefore avoid assuming that every gene feature and CDS feature represent exactly the same nucleotide interval.

The same principle applies to RNA annotations. Features such as mRNA, rRNA, and tRNA identify different types of RNA-related biological information. Their locations and qualifiers provide additional information about the sequence and its interpretation.

GenBank flat files can be read manually, but they are also designed to be processed computationally. Bioinformatics libraries can parse records and expose their fields, features, locations, and sequences as structured objects. This is especially useful when researchers need to analyze hundreds, thousands, or millions of sequence records rather than inspect them individually.

For example, a computational workflow might extract all CDS features from a collection of GenBank files, retrieve their nucleotide sequences, extract gene names, translate the CDS regions into proteins, and then compare the resulting sequences. Because the annotation and sequence are stored together, a GenBank file can provide much of the information needed for such workflows.

When using GenBank records in computational research, it is important to retain the accession.version identifier associated with each sequence. The same accession can remain associated with a record while the underlying nucleotide sequence changes between versions. Recording the accession.version used in an analysis therefore provides a more precise reference to the sequence data.

Researchers should also be cautious when copying GenBank examples from older tutorials. The overall structure of the format is stable, but individual fields, identifiers, submission practices, and annotation conventions can change over time. Older records may contain historical identifiers or formatting conventions that should not automatically be treated as current best practice.

The GenBank flat file is particularly valuable when a researcher needs to preserve the biological context of a sequence. A FASTA file can be ideal for sequence alignment, similarity searches, and many computational analyses, but the corresponding GenBank record may be essential when the researcher needs to know which bases correspond to genes, CDS regions, RNA features, source information, or other annotations.

A useful way to understand a GenBank flat file is therefore to read it from top to bottom. Start with LOCUS to understand the basic record, examine DEFINITION to understand what the sequence represents, use ACCESSION and VERSION to identify the record precisely, inspect SOURCE and ORGANISM for biological context, examine REFERENCE for literature information, study FEATURES for biological annotation, and finally examine ORIGIN for the nucleotide sequence. The // marker indicates that the record is complete.

The following simplified example brings the major concepts together:

LOCUS       DEMO001      900 bp    DNA
DEFINITION  Example gene sequence.
ACCESSION   DEMO001
VERSION     DEMO001.1
KEYWORDS    .
SOURCE      Example organism
  ORGANISM  Example organism
REFERENCE   1

FEATURES             Location/Qualifiers
     source          1..900
                     /organism="Example organism"
     gene            100..800
                     /gene="ABC1"
     CDS             150..750
                     /gene="ABC1"
                     /product="Example protein"

ORIGIN
        1 atgctagcta gctagctagc tagctagcta
       31 gctagctagc tagctagcta gctagctagc
       ...
//

This is an intentionally simplified teaching example rather than a submission-ready GenBank record. It illustrates the hierarchy of information: record identifiers appear near the beginning, biological annotation is contained in FEATURES, and the nucleotide sequence is provided under ORIGIN.

In a real record, feature annotations may be much more extensive. A single sequence can contain numerous genes, CDS features, RNA features, regulatory regions, repeat regions, mobile elements, variation annotations, and other biological features. Locations may involve complementary strands, joined intervals, partial boundaries, and other expressions. Consequently, understanding the basic syntax is an important foundation for more advanced work with GenBank sequence annotation.

The GenBank flat file is also important for understanding how information retrieved from NCBI can be transferred into other bioinformatics workflows. Researchers may download a record in GenBank format when they need the annotations and metadata, or retrieve the same sequence in FASTA when they only need the nucleotide sequence for a particular analysis. Choosing the appropriate representation depends on the purpose of the analysis.

For researchers submitting sequences to GenBank, understanding the flat-file representation can also provide insight into how their submitted information will ultimately appear in a public record. However, researchers should use the current NCBI submission workflows and appropriate annotation tools rather than manually constructing a flat file unless their particular workflow specifically requires it.

Overall, the GenBank flat file format provides a standardized and information-rich representation of nucleotide sequence records. Its structure combines record identifiers, sequence descriptions, biological source information, references, feature annotations, qualifiers, and nucleotide sequence data in a single text-based record. Learning to interpret fields such as LOCUS, ACCESSION, VERSION, FEATURES, and ORIGIN makes it much easier to work with GenBank data in both laboratory and computational settings.

The most important skill is not memorizing every field but understanding how the different parts of the record relate to one another. The accession identifies the record, the version identifies a particular sequence version, the source describes its biological origin, the FEATURES section explains biologically meaningful regions, qualifiers provide additional information, and ORIGIN contains the nucleotide sequence. Once these relationships are understood, even large and complex GenBank records become much easier to read, interpret, retrieve, and analyze.

Author: admin

Leave a Reply

Your email address will not be published. Required fields are marked *