Bioinformatics: From Raw Sequence to Biological Insight

A single modern sequencing run can produce billions of bases of DNA sequence, far more than anyone could read by eye. Bioinformatics is the use of computation, statistics and data management to store, process and interpret biological data, especially DNA, RNA and protein sequences. You meet it whenever an experiment ends in a data file rather than a band on a gel: a genome project, a screen for antibiotic-resistance genes, or a study of which genes switch on in a tumour. This lesson shows how a bioinformatics workflow is organised and introduces the numbers you use to decide whether sequence data are good enough to answer a biological question.

The bioinformatics workflow

Most analyses follow the same broad stages, whatever the organism.

  1. Sequence the sample. A sequencer reports many short fragments called reads, usually in a FASTQ file.
  2. Control quality. Low-confidence bases and leftover adapter sequence are trimmed or removed.
  3. Assemble or map. Reads are either joined by their overlaps into longer contigs (de novo assembly) or placed onto a known reference genome (mapping).
  4. Analyse. Software counts, compares and annotates features such as genes, variants or differences in expression.
  5. Interpret. The results become biological hypotheses that are tested back in the lab.


A row of five boxes shows the stages of a bioinformatics workflow from sequencing to interpretation, with the data each stage produces written underneath.



Searching sequence databases and aligning sequences are specialised tools used inside stages 3 and 4. Here the focus is the workflow itself and the measurements that frame it.

Measuring a sequencing run

Two useful initial checks are base-call quality and coverage. These describe how accurate each base call is and how many times each position was sequenced, but alone cannot establish whether the data are fit for the biological question. Contamination and systematic bias also matter.


The Phred quality score QQ expresses the probability PP that a base call is wrong:


Q=−10log⁡10P⟺P=10−Q/10Q = -10\log_{10} P \qquad\Longleftrightarrow\qquad P = 10^{-Q/10}


Phred score

Error probability

Base-call accuracy

10

1 in 10

90%

20

1 in 100

99%

30

1 in 1,000

99.9%

40

1 in 10,000

99.99%


The expected number of errors in a read is the sum of PP over all of its bases.



Sequencing coverage, also called depth, is the average number of reads that overlap each base of the genome:


C=LNGC = \frac{L N}{G}


where LL is the read length in base pairs, NN the number of reads and GG the genome size in base pairs.


Even at a good mean coverage, some positions can receive no reads, because reads land at random. If reads are placed independently and uniformly, with coverage described by a Poisson distribution, the Lander–Waterman model predicts the expected fraction of bases with zero coverage:


P(0)=e−CP(0) = e^{-C}


This is an expected uncovered fraction, not a guarantee that every sequencing run has gaps. This prediction holds only when reads are spread randomly; repeats and regions with extreme base composition often sequence unevenly, so real gaps are usually larger than the model suggests.


Example: A 12 Mb yeast genome is sequenced with 400,000 reads of 150 bp. The reads contain 4.0×105×150=6.0×1074.0\times10^{5} \times 150 = 6.0\times10^{7} bases, so C=6.0×107/1.2×107=5.0C = 6.0\times10^{7} / 1.2\times10^{7} = 5.0. The expected uncovered fraction is e−5.0=0.0067e^{-5.0} = 0.0067, or about 81,000 bases of the genome.

Describing sequence composition

Once sequence is in hand, simple counts summarise it. GC content is the percentage of bases that are guanine or cytosine:


GC content=G+CA+T+G+C×100%\text{GC content} = \frac{G + C}{A + T + G + C} \times 100\%


GC content differs widely between species, from below 20% in some parasites to above 70% in some soil bacteria, and it affects how evenly a region sequences and how stable the duplex is.


A k-mer is any substring of length kk taken from a longer sequence. A sequence of length nn contains n−k+1n - k + 1 overlapping k-mers, and there are 4k4^k possible distinct DNA k-mers. Assemblers and fast read classifiers break reads into k-mers because comparing short fixed-length words is quick.


Example: A 10-base sequence contains 10−3+1=810 - 3 + 1 = 8 overlapping 3-mers, drawn from 43=644^3 = 64 possible 3-mers. By contrast, 416≈4.3×1094^{16} \approx 4.3\times10^{9} exceeds the 3.1 × 109 bp human genome, but that alone does not make a present 16-mer likely to be unique. Under a random-sequence model with equally likely bases, a present k-mer becomes likely to be unique when 4k4^k is much larger than the number of genome positions being considered, as with 420≈1.1×10124^{20} \approx 1.1\times10^{12}. Repeated sequences in real genomes can still prevent uniqueness even for longer k-mers.

What to remember

  • Bioinformatics turns raw biological data into interpretable results: sequence, control quality, assemble or map, analyse, interpret.
  • P=10−Q/10P = 10^{-Q/10}; each 10 points of Phred score means ten times fewer expected errors.
  • Mean coverage is C=LN/GC = LN/G; with random read placement the expected uncovered fraction is e−Ce^{-C}. Quality and coverage alone do not establish fitness for a biological question.
  • GC content and k-mer counts (n−k+1n - k + 1 in a sequence, 4k4^k possible) summarise sequence composition.

Example: Checking a pilot run for a bacterial genome

A lab sequences a newly isolated bacterium whose genome is estimated at 5.0 Mb (5,000,000 bp). A quick pilot run produces 100,000 reads, each 150 bp long. Before paying for a full run, the team checks what the pilot data can and cannot support.


a) Calculate the mean sequencing coverage of the pilot run.


The total number of sequenced bases is LN=150×100,000LN = 150 \times 100{,}000, which is ________.


Divide by the genome size, keeping both quantities in base pairs:


C=LNG=1.5×107 bp5.0×106 bp=3.0C = \frac{LN}{G} = \frac{1.5\times10^{7}\ \text{bp}}{5.0\times10^{6}\ \text{bp}} = 3.0


The pilot run has a mean coverage of 3.0×: on average each base appears in three reads.



b) Assuming reads land independently and uniformly across the genome, estimate how many bases are not covered by any read.


The Lander–Waterman model gives the uncovered fraction as P(0)=e−C=e−3.0P(0) = e^{-C} = e^{-3.0}, which is ________, or about 5% of the genome.


Multiply by the genome size:


0.0498×5.0×106 bp≈2.49×105 bp0.0498 \times 5.0\times10^{6}\ \text{bp} \approx 2.49\times10^{5}\ \text{bp}


The expected uncovered amount is about 249,000 bp. Actual gaps in this particular run may differ from the model's expectation. The model predicts substantial missing sequence, so a finished assembly from this pilot is extremely unlikely.


c) Most bases in the pilot reads have a Phred score of 20. Find the expected number of incorrect base calls in one 150-bp read if every base is Q20, and compare it with a read in which every base is Q30.


At Q20 the error probability per base is P=10−20/10P = 10^{-20/10}, which is ________.


Expected errors add across the bases of the read:


150×0.01=1.5 errors per read150 \times 0.01 = 1.5\ \text{errors per read}


At Q30 the error probability is 10−30/1010^{-30/10}, which is ________, so the same read would carry 150×0.001=0.15150 \times 0.001 = 0.15 expected errors.


A Q20 read is expected to contain 1.5 wrong bases, ten times as many as a Q30 read (0.15), which is why low-quality ends are often trimmed before analysis.


d) One contig from the pilot assembly contains the fragment 5′-ATGGCGCCTAGATTACGGCC-3′. Calculate its GC content.


Count each base in the 20-base fragment: A = 4, T = 4, G = 6 and C = 6. The number of G and C bases together is ________.


GC content=1220×100%=60%\text{GC content} = \frac{12}{20} \times 100\% = 60\%


The fragment has a GC content of 60%. Check: the A and T bases make up the other 8 of 20, or 40%, and the two percentages sum to 100%.

Match each term used in genome sequencing projects with the description that defines it. Each description is used exactly once.

Match each term
A.

Any substring of fixed length k taken from a longer sequence

B.

Joining overlapping reads into longer contiguous sequences without using a reference

C.

Average number of reads that overlap each position of a genome

D.

Logarithmic measure of the probability that a single base call is wrong

E.

Percentage of bases in a sequence that are guanine or cytosine

F.

A contiguous string of base calls reported by the sequencer for one DNA fragment

Coverage (depth)

De novo genome assembly

k-mer

GC content

Phred quality score

Sequencing read

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A sequencing facility returns its reads in FASTQ format, where each read is stored as a four-line record. Line 1 is a header that begins with the character and names the read. Line 2 holds the base calls. Line 3 begins with the character and may repeat the read name. Line 4 holds one encoded Phred score for each base, so it must contain exactly as many characters as line 2. A file that stores only sequences, each under a header line that begins with the > character, is in format.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

A research group wants a mean coverage of 40× for a bacterial genome of 4.2 Mb (4,200,000 bp), using single-end reads that are each 150 bp long. Assuming every read is usable, how many reads must they generate? Give your answer in millions of reads, to two decimal places.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

Extra Practice