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.
- Sequence the sample. A sequencer reports many short fragments called reads, usually in a FASTQ file.
- Control quality. Low-confidence bases and leftover adapter sequence are trimmed or removed.
- Assemble or map. Reads are either joined by their overlaps into longer contigs (de novo assembly) or placed onto a known reference genome (mapping).
- Analyse. Software counts, compares and annotates features such as genes, variants or differences in expression.
- Interpret. The results become biological hypotheses that are tested back in the lab.
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 Q expresses the probability P that a base call is wrong:
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 P over all of its bases.
Sequencing coverage, also called depth, is the average number of reads that overlap each base of the genome:
where L is the read length in base pairs, N the number of reads and G 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:
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×107 bases, so C=6.0×107/1.2×107=5.0. The expected uncovered fraction is e−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 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 k taken from a longer sequence. A sequence of length n contains n−k+1 overlapping k-mers, and there are 4k 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=8 overlapping 3-mers, drawn from 43=64 possible 3-mers. By contrast, 416≈4.3×109 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 4k is much larger than the number of genome positions being considered, as with 420≈1.1×1012. 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/10; each 10 points of Phred score means ten times fewer expected errors.
- Mean coverage is C=LN/G; with random read placement the expected uncovered fraction is e−C. Quality and coverage alone do not establish fitness for a biological question.
- GC content and k-mer counts (n−k+1 in a sequence, 4k 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,000, which is ________.
Divide by the genome size, keeping both quantities in base pairs:
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.0, which is ________, or about 5% of the genome.
Multiply by the genome size:
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/10, which is ________.
Expected errors add across the bases of the read:
At Q30 the error probability is 10−30/10, which is ________, so the same read would carry 150×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 ________.
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%.
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.
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.