IAE Academy

FOR CORE AND IT JOBS · CHAPTER 1 OF 7

Biological data and databases

This chapter explains what kinds of data bioinformatics handles, how a sequence is written in FASTA and GenBank files, and which database holds which kind of record. An engineer needs it to read biological files and to find the right record quickly.

Updated 30 Oct 2026

What you will be able to do

You will say what kinds of data bioinformatics works on and where each kind is kept. You will read a FASTA record and a GenBank record field by field. You will tell GenBank, UniProt, PDB and Pfam apart and pick the right one for a question. You will do small size and length calculations on sequences.

Before you start

  1. Powers and logarithms, including a change of base, for instance and

  2. Rounding up to a whole number, written

  3. Percentages; bits and bytes (8 bits make 1 byte)

  4. School biology: DNA, RNA, gene, protein and amino acid

What bioinformatics works on

Bioinformatics stores, searches and compares biological data with computers. Three kinds of data dominate. Sequences are strings of letters. Structures are lists of atom positions in space. Expression data is a table of numbers: one row per gene, one column per sample (one tissue or condition). Sequences come first: a structure is the folded shape of one protein sequence, and expression data measures how much RNA is copied from each gene, which is known by its sequence.

  1. DNA is copied into RNA, with U in place of T.

  2. Messenger RNA (mRNA), the copy of a gene, is read three bases at a time (translation).

  3. Each triplet is a codon and names one amino acid or a stop.

  4. The chain of amino acids folds into a protein.

A DNA sequence is a string over the four bases A, C, G, T. A strand has two different ends, named 5' and 3', and sequences are written from 5' to 3'. A protein sequence is a string over 20 letters, one per standard amino acid, written from the chain's N end (free amino group) to its C end (free carboxyl group). A computer treats both as plain text, so databases hold them cheaply and search them fast. The number of possible strings shows why searching by eye is hopeless.

NUMBER OF SEQUENCES OF LENGTH N

Holds when each position may hold any of letters, chosen independently, so the choices multiply. for DNA, for protein; is the length in bases or amino acids; is a count with no unit. A protein of 100 amino acids already has possible sequences.

SHORTEST CODON LENGTH

Holds for codons of one fixed length , in bases. A codon of bases can name at most things. gives 16, fewer than 20 amino acids. gives 64, enough for 20 amino acids and the stop signals, with codons to spare. .

BITS TO STORE A DNA SEQUENCE

Holds when only A, C, G and T occur and every base gets the same fixed-length code. Each base is one of 4 symbols, so it needs bits. is in bits, in bases. As text at 8 bits per letter, the letters alone take bits, four times .

Data

What it records

Unit or form

Main database

Nucleotide sequence

Order of A, C, G, T

Letters, 5' to 3'

GenBank, ENA, DDBJ

Protein sequence

Order of amino acids

Letters, N end to C end

UniProt

3D structure

Position of every atom

x, y, z in ångström

Protein Data Bank (PDB)

Expression

Amount of each gene's RNA per sample

Numbers in a gene by sample table

Gene Expression Omnibus (GEO)

WATCH OUT FOR

A, C, G and T are also amino acid letters (Ala, Cys, Gly, Thr). Test: a string with letters such as L, E or Q is protein. A string of only A, C, G and T is almost always DNA; the header settles it.

Sequence formats: FASTA and GenBank

FASTA is the simplest format. A record is one header line that starts with >, then the sequence on the next lines. The header holds an identifier (the text up to the first space) and a free description. Line breaks inside the sequence are only for display, and a file can hold many records one after another. This chapter writes DNA in capitals, as below; some files and GenBank's ORIGIN use lower case for the same bases.

>seq1 test fragment
ATGGCCATTGTAATGGGCCGC
TGAAAGGGTGCCCGATAG

SIZE OF A FASTA RECORD

Holds for one byte per character and per newline, a newline after every line, and sequence lines letters long except perhaps the last. is the header line's characters, > included; the sequence length in letters; the line width; the header's newline; the last term the number of sequence lines. is in bytes.

GC CONTENT

Holds for a DNA sequence. and are the counts of those bases; counts A, C, G and T together, leaving out letters that stand for an unknown base, such as N. The result is a percentage between 0 and 100.

PROTEIN LENGTH FROM A CODING SEQUENCE

Holds when the coding sequence (CDS) is the coding bases alone, joined end to end (non-coding stretches called introns, which split many genes, are left out), is a whole number of codons and ends with one stop codon, which names no amino acid. is in bases; counts every amino acid of the chain as made, the first included.

WORKED EXAMPLE

A FASTA record has the header line >seq1 test (10 characters including >), a sequence of 600 bases and a line width of 60. How many bytes is the record?

Solution
  1. Header line: 10 characters plus its newline, so 11 bytes.

  2. Sequence letters: one byte per base, so 600 bytes.

  3. Sequence lines: 600 divides by 60 exactly, so there are 10 full lines and no rounding up; each ends in a newline, so 10 bytes.

  4. Add the three parts: 11 + 600 + 10 = 621.

Answer: 621 bytes

GenBank is a richer format: the same sequence plus a description in labelled fields. The record is plain text, ends with //, and its main fields come in the order below.

Field

What it holds

LOCUS

Name, length in bases, molecule type, topology (linear or circular), division, date

DEFINITION

Short description

ACCESSION and VERSION

The stable identifier and its version

KEYWORDS and SOURCE

Search words; the organism and its lineage

REFERENCE

Papers that describe the sequence

FEATURES

Located annotations: gene, CDS (with a /translation), source

ORIGIN

The sequence in lower case, 60 letters per line in groups of 10, each line starting with the position of its first base

WORKED EXAMPLE

A GenBank FEATURES entry says the CDS of a gene is 1,200 bases long, including the stop codon, and the CDS contains 420 G and 360 C. Find the protein length and the GC content of the CDS.

Solution
  1. Each codon is 3 bases, so the CDS holds 1200/3 = 400 codons.

  2. The stop codon names no amino acid, so .

  3. GC content counts the bases G and C: 420 + 360 = 780.

  4. Divide by all 1,200 bases and multiply by 100: 780 / 1200 × 100 = 65.

Answer: 399 amino acids; GC content 65%

WATCH OUT FOR

Line width and the ORIGIN numbers are layout, not data. Test: in the ORIGIN block only, delete spaces, digits and newlines and count the letters. The count equals the length printed in LOCUS.

Databases and accession numbers

A primary database holds data as submitted by the people who produced it. A secondary database holds patterns derived from primary data. GenBank, ENA and DDBJ are the three primary nucleotide databases. They exchange new records daily, so a sequence submitted to one appears in all three under the same accession. UniProt holds protein sequences: its Swiss-Prot section is curated by hand, its TrEMBL section is annotated automatically and not curated. The Protein Data Bank (PDB) holds 3D structures found by experiment. Pfam groups proteins into domain families; PROSITE holds short motifs such as active sites.

Database

Kind

Holds

Accession looks like

GenBank, ENA, DDBJ

Primary

Nucleotide sequences

Letters then digits, such as U12345 or AB123456

UniProt Swiss-Prot

Protein, curated by hand

Protein sequences with annotation

6 or 10 characters, letter first, such as P69905

UniProt TrEMBL

Protein, automatic

Protein sequences

Same pattern as Swiss-Prot

PDB

Primary

Atom coordinates

4 characters, first a digit, such as 4HHB

Pfam

Secondary

Protein domain families

PF then 5 digits, such as PF00069

PROSITE

Secondary

Short motifs and patterns

PS then 5 digits, such as PS00001

An accession number is the stable name of a record. It stays the same when the record is updated, and it is what you cite. GenBank adds a version after a dot, as in U12345.2. The version rises when the sequence itself is corrected; the accession stays. A UniProt entry also has a readable entry name, such as HBA_HUMAN, which can change, so cite the accession.

  1. Pick the database by the data: nucleotide, protein, structure or domain.

  2. With an accession, search for it: it finds that one record.

  3. Otherwise search by keyword, such as organism and gene name, and narrow by molecule type or to Swiss-Prot entries.

  4. Open the record and check its description, length and organism before using it.

Check yourself

CHECK YOURSELF 1

How many different DNA sequences of length 5 exist?

  1. (A)

    20

  2. (B)

    625

  3. (C)

    1024

  4. (D)

    3125

Answer and solution

Answer: (C)

  1. Each of 5 positions has 4 choices, chosen independently.

  2. .

CHECK YOURSELF 2One or more options are correct

Which statements are correct?

  1. (A)

    Swiss-Prot entries are curated by hand.

  2. (B)

    TrEMBL entries are curated by hand.

  3. (C)

    GenBank, ENA and DDBJ exchange sequence data.

  4. (D)

    The PDB stores atom coordinates of structures.

Answer and solution

Answer: (A), (C), (D)

  1. Swiss-Prot is curated by hand; TrEMBL is annotated automatically, so B is false.

  2. The three nucleotide databases exchange records daily, so C is true.

  3. PDB holds atom positions, so D is true.

CHECK YOURSELF 3

A FASTA record has a header line of 20 characters including >, a sequence of 1000 bases and a line width of 80. Assuming one byte per character, one byte per newline and a newline after every line, how many bytes is the record?

Answer and solution

Answer:

  1. Header line: 20 + 1 = 21 bytes.

  2. Sequence lines: lines, so 13 newline bytes.

  3. Total: 21 + 1000 + 13 = 1034.

CHECK YOURSELF 4

Which of these identifiers names an entry in the Protein Data Bank?

  1. (A)

    PF00042

  2. (B)

    P68871

  3. (C)

    1TUP

  4. (D)

    PS00017

Answer and solution

Answer: (C)

  1. PF followed by 5 digits is Pfam; PS followed by 5 digits is PROSITE.

  2. P68871 is a six-character UniProt accession, letter first.

  3. Four characters with a digit first is the PDB pattern, so C.

Used in these GATE topics