- GenBank and EMBL are important biological sequence formats used to store nucleotide sequences together with detailed biological annotations. Unlike simple sequence formats such as FASTA, which primarily contain sequence identifiers and nucleotide or protein sequences, GenBank and EMBL flat-file formats provide structured information about the origin, organization, and biological features of a sequence. They can include accession numbers, organism names, references, gene locations, coding sequences, regulatory regions, sequence translations, and other annotations. These formats are widely used in sequence analysis, genome annotation, comparative genomics, molecular biology, and biological database management.
- GenBank is a nucleotide sequence database maintained by the National Center for Biotechnology Information (NCBI), while EMBL-format records are associated with the European Nucleotide Archive (ENA). Both resources participate in the International Nucleotide Sequence Database Collaboration (INSDC), together with the DNA Data Bank of Japan (DDBJ). The collaborating databases exchange submitted sequence records to maintain a shared international archive of nucleotide sequence information. Although GenBank and EMBL use different flat-file conventions, they represent broadly comparable biological information and support international sequence data exchange.
- A flat-file format stores structured records as readable text, using predefined labels, fields, and sections. Each record generally contains a header or identification section, descriptive information, references, biological feature annotations, and the nucleotide sequence itself. The information is arranged in a consistent structure so that researchers and computer programs can identify individual fields and interpret the biological content. Flat-file formats are particularly useful because they can be inspected manually, processed with scripts, and exchanged between different bioinformatics applications.
- A GenBank flat-file record commonly contains several major sections, including LOCUS, DEFINITION, ACCESSION, VERSION, KEYWORDS, SOURCE, REFERENCE, COMMENT, FEATURES, and ORIGIN. The record ends with a line containing //. Each section provides a different type of information about the sequence.
- The LOCUS line contains basic information about the sequence record, such as its identifier, sequence length, molecule type, topology, division, and record date. The DEFINITION line provides a brief description of the sequence. The ACCESSION line contains the stable accession identifier assigned to the record, while the VERSION line identifies a particular version of the sequence record. These identifiers are important for retrieving records and distinguishing updated sequence versions.
- The KEYWORDS section contains terms associated with the record, where available. The SOURCE section identifies the organism or biological source from which the sequence was obtained. It may also include a scientific name and taxonomy information. The REFERENCE section provides bibliographic details about publications or other sources associated with the sequence. References can include authors, titles, journal information, and PubMed identifiers or other literature links.
- The COMMENT section may contain additional information about the record, such as submission details, annotation notes, or relationships with other records. Its contents vary depending on the sequence and the information supplied by the database. Researchers should distinguish descriptive comments from formal feature annotations because they serve different purposes in the record.
- The FEATURES section is one of the most important parts of a GenBank record. It describes the biological elements and functional regions identified within the nucleotide sequence. Features may include genes, coding sequences (CDS), messenger RNA, transfer RNA, ribosomal RNA, exons, introns, regulatory regions, promoters, and other sequence elements. Each feature has a type, a location, and associated qualifiers. For example, a gene feature may include a gene name, while a CDS feature may contain a gene identifier, product description, protein identifier, and translated amino acid sequence.
- Feature locations describe where a biological element occurs within the sequence. They may represent a continuous interval, a joined set of intervals, a complementary strand, or a more complex arrangement. These location expressions are important when genes contain multiple exons or when a coding sequence is located on the reverse strand. Researchers should use format-aware software to interpret complex feature locations rather than relying only on simple text extraction.
- The ORIGIN section contains the nucleotide sequence itself. The sequence is generally displayed in lowercase or uppercase letters and divided into numbered lines for readability. The record terminates with //, which indicates the end of that sequence entry. The following is a simplified GenBank flat-file example. It is illustrative rather than a complete record from a database.
LOCUS EXAMPLE001 120 bp DNA linear PLN 01-JAN-2026
DEFINITION Example nucleotide sequence.
ACCESSION EXAMPLE001
VERSION EXAMPLE001.1
KEYWORDS .
SOURCE Example organism
ORGANISM Example organism
Bacteria; Example group.
REFERENCE 1 (bases 1 to 120)
AUTHORS Example,A.
TITLE Example sequence record
JOURNAL Unpublished
FEATURES Location/Qualifiers
source 1..120
/organism=”Example organism”
gene 1..120
/gene=”exampleA”
CDS 1..90
/gene=”exampleA”
/product=”example protein”
/translation=”MKTAYIAKQRQISFVKSHFS”
ORIGIN
1 atggctacgt agctagctag ctacgtagct agctagctag ctacgtagct
61 agctagctag ctacgtagct agctagctag ctacgtagct agctagctag
//
- The example demonstrates the relationship between the sequence and its annotations. The source feature identifies the biological origin, the gene feature describes a gene region, and the CDS feature identifies a coding region. The /translation qualifier provides the corresponding amino acid sequence. In real records, feature locations and qualifiers can be considerably more complex, and the biological sequence may be much longer.
- The EMBL flat-file format stores similar nucleotide sequence information but uses a different system of line labels and record organization. It is traditionally associated with the European Molecular Biology Laboratory nucleotide database, now represented through the European Nucleotide Archive. An EMBL record commonly includes lines such as ID, AC, SV, DT, DE, KW, OS, OC, RN, RP, RA, RT, RL, DR, CC, FH, FT, and SQ.
- The ID line identifies the record and provides basic information about its sequence. The AC line contains the accession number, while SV identifies the sequence version. The DT lines record dates associated with the creation and modification of the entry. The DE line provides a description of the sequence, and the KW line contains relevant keywords.
- The OS line identifies the organism, while OC provides its taxonomic classification. Bibliographic references are represented using lines such as RN, RP, RA, RT, and RL, which provide reference numbers, sequence positions, authors, titles, and publication information. The DR lines contain cross-references to other databases, while CC contains comments about the record.
- The FH and FT lines describe the biological features of the sequence. The FT lines contain feature types, sequence locations, and qualifiers, such as gene names, product descriptions, and protein identifiers. The SQ line introduces the sequence section and provides summary information, including sequence length and composition. The nucleotide sequence follows, and the record ends with //.
- A simplified EMBL flat-file example is shown below.
ID EXAMPLE001; SV 1; linear; DNA; PLN; 120 BP.
AC EXAMPLE001;
SV EXAMPLE001.1
DT 01-JAN-2026 (Rel. 1, Created)
DE Example nucleotide sequence.
KW .
OS Example organism
OC Bacteria; Example group.
RN [1]
RP 1-120
RA Example,A.;
RT “Example sequence record”;
RL Unpublished.
FH Key Location/Qualifiers
FH
FT source 1..120
FT /organism=”Example organism”
FT gene 1..120
FT /gene=”exampleA”
FT CDS 1..90
FT /gene=”exampleA”
FT /product=”example protein”
FT /translation=”MKTAYIAKQRQISFVKSHFS”
SQ Sequence 120 BP; 30 A; 30 C; 30 G; 30 T; 0 other;
atggctacgt agctagctag ctacgtagct agctagctag ctacgtagct 60
agctagctag ctacgtagct agctagctag ctacgtagct agctagctag 120
//
- The example illustrates the main organization of an EMBL record. Although the line labels differ from GenBank, the underlying biological information is similar. Both formats provide sequence identifiers, organism information, references, feature annotations, and nucleotide sequences. Their different conventions mean that software designed for one format should not automatically be assumed to parse the other correctly.
- GenBank and EMBL records are especially useful because they combine sequence information with biological annotation. A researcher studying a particular gene can retrieve its nucleotide sequence, examine its coding region, identify its protein product, inspect its organism of origin, and follow references to supporting publications. This makes the formats valuable for genome annotation, gene characterization, sequence comparison, evolutionary analysis, and functional studies.
- Accession numbers are central to identifying and retrieving records from both resources. An accession number provides a stable reference to a database record, while a version suffix identifies a particular sequence version. For example, an accession written as EXAMPLE001.1 illustrates a versioned identifier. If the sequence is changed in a later update, its version may increase. Researchers should preserve the complete versioned identifier when exact sequence reproducibility is important. The accession without a version suffix may refer to the record independently of a particular sequence version, depending on the database’s conventions.
- GenBank and EMBL records also contain cross-references that connect nucleotide sequences with other biological resources. A nucleotide record may be linked to protein records, gene databases, taxonomy resources, publications, and structural or functional databases. These links support database integration and identifier mapping. For example, a CDS feature may contain a protein identifier that can be used to retrieve the corresponding protein sequence or functional annotation. Cross-references help researchers move from nucleotide-level information to protein-level and functional information.
- Both formats support the representation of complex biological features. A gene may contain several exons separated by introns, and its coding sequence may occur on either DNA strand. A CDS feature can therefore include joined intervals and strand information. Some records also contain partial features, uncertain boundaries, or features that cross the origin of a circular sequence. Such annotations require careful interpretation. The feature table should be treated as structured biological information rather than as a simple list of text descriptions.
- GenBank and EMBL flat files can be retrieved through their respective databases and associated services. NCBI provides nucleotide records through its Entrez system and E-utilities, while ENA provides sequence records through its browser, API, and data-download services. Researchers can retrieve individual records using accession numbers or search for groups of records using organism names, gene names, keywords, or other search criteria. For large datasets, bulk retrieval methods are generally more efficient than downloading records individually.
- Python provides convenient tools for parsing GenBank and EMBL records. The Biopython library includes the SeqIO module, which supports reading, writing, and converting common sequence formats. The following example reads a GenBank file and displays its identifier, description, sequence length, and annotated features.
from Bio import SeqIO
record = SeqIO.read(“sequence.gb”, “genbank”)
print(“Identifier:”, record.id)
print(“Description:”, record.description)
print(“Sequence length:”, len(record.seq))
for feature in record.features:
print(
“Type:”, feature.type,
“Location:”, feature.location
)
The same approach can be used to read an EMBL file by specifying the appropriate format.
from Bio import SeqIO
record = SeqIO.read(“sequence.embl”, “embl”)
print(“Identifier:”, record.id)
print(“Description:”, record.description)
print(“Sequence length:”, len(record.seq))
for feature in record.features:
print(feature.type, feature.location)
- When a file contains multiple records, SeqIO.parse() can be used instead of SeqIO.read(). The following example processes all records in a GenBank file and extracts their identifiers and sequence lengths.
from Bio import SeqIO
for record in SeqIO.parse(“sequences.gb”, “genbank”):
print(record.id, len(record.seq))
- Biopython can also convert between GenBank and EMBL flat-file formats while retaining supported sequence annotations. The following example converts a GenBank file into EMBL format.
from Bio import SeqIO
SeqIO.convert(
“sequences.gb”,
“genbank”,
“sequences.embl”,
“embl”
)
print(“GenBank file converted to EMBL format.”)
- Format conversion should always be followed by validation. Although the two formats represent similar information, their conventions are not identical, and some fields or details may not transfer perfectly. Researchers should compare record identifiers, sequence lengths, sequences, feature locations, qualifiers, and references after conversion. Important annotations should be checked to ensure that they have been preserved correctly.
- R can also be used to work with sequence records through Bioconductor packages. The Biostrings and Rsamtools ecosystems provide tools for biological sequence and genomic data analysis, while other packages support specific database and annotation workflows. The following example illustrates reading a GenBank sequence file using the read.GenBank() function from the ape package.
# Install the package if required:
# install.packages(“ape”)
library(ape)
sequences <- read.GenBank(
c(“NC_001416”),
species.names = TRUE
)
print(sequences)
- This example retrieves a sequence using an accession identifier rather than parsing a locally stored GenBank flat file. For local flat-file parsing and more extensive feature annotation handling, Python with Biopython or other format-aware tools may be more suitable. Researchers should select software according to the type of information they need to extract.
- GenBank and EMBL files can be large, particularly when they contain complete genomes or extensive annotations. Researchers should therefore consider storage, compression, retrieval, and processing requirements. Text-based flat files can be compressed using gzip, producing files such as sequence.gb.gz or sequence.embl.gz. Some software libraries can read compressed files directly, while others require decompression. Large collections of records can be processed iteratively to avoid loading all sequences into memory at once.
- File validation is important when working with these formats. Researchers should confirm that records have valid identifiers, complete sequence sections, properly structured feature tables, and appropriate record termination markers. They should also check that feature locations fall within the sequence boundaries and that sequence lengths agree with the information provided in the record. When records are retrieved from external databases, accession numbers and version information should be preserved so that the source can be identified later.
- Data provenance and reproducibility should also be considered. Researchers should record the database source, accession number, sequence version, retrieval date, retrieval method, and any processing or conversion performed. If a record is downloaded and subsequently modified, the original version should be preserved where possible. Checksums can be used to verify file integrity, and retrieval logs can document the source and status of downloaded records. These practices are particularly important when sequence data are used in published research or large-scale computational workflows.
- Although GenBank and EMBL are valuable formats, they have some limitations. Their flat-file structure is readable but can be difficult to manipulate manually when records contain complex feature locations, numerous qualifiers, or large numbers of annotations. Different databases may also use different annotation practices, and the presence of a feature does not necessarily mean that it has been experimentally confirmed. Some annotations are based on computational predictions or evidence transferred from related sequences. Researchers should therefore examine the evidence and annotation source before drawing biological conclusions.
- GenBank and EMBL flat-file formats are closely related to other biological data formats. FASTA provides a simpler representation of sequence information without the same level of structured annotation. GFF3 and GTF focus on genomic features and their locations, while VCF represents genetic variation. Protein sequences may be stored in FASTA or retrieved from resources such as UniProt, and structural information may be obtained from the Protein Data Bank. Understanding how these formats differ and complement one another is important for building integrated bioinformatics workflows.
- GenBank and EMBL remain important components of biological data management because they provide standardized ways to store and exchange nucleotide sequences with associated annotations. Their accession systems, feature tables, organism information, references, and sequence records support sequence retrieval, genome annotation, comparative analysis, and database integration. By understanding their structures and using format-aware software such as Biopython, researchers can retrieve, inspect, convert, and analyze sequence records more reliably. Careful validation, version tracking, and provenance documentation further support accurate and reproducible bioinformatics research.