BIO-4-1
How DNA is sequenced and the biases that creates
Every downstream thing you will do in this track, aligning reads (BIO-3), calling variants against the mutation types from S7.1, measuring expression, starts from data a sequencer produced. Carry a wrong picture of how that data is made and every analysis on top of it inherits the error. So before any algorithm, here is the honest physical story of where the letters come from, and the biases baked in the moment they are written.
Here is the picture almost every programmer starts with, and it is wrong. You imagine a function like read_chromosome(1) that streams back one continuous string of 249 million bases, start to finish, like reading a file off disk. No sequencer does that, and understanding what it does instead is the whole lesson.
The machine does not read a chromosome
A sequencer cannot walk a chromosome end to end. What it does instead is shear the DNA into millions of tiny fragments, read each fragment on its own, and hand you the pile. Each fragment read is called a read, a short string of bases (call it 150 for now) with no coordinate attached. The machine does not know or record where in the genome a given read came from. It also does not know which of the two strands it read, so about half your reads arrive as the reverse complement of the reference (recall the reverse complement from S3.2, this is exactly why that operation is not optional).
The programmer's version of this: imagine reconstructing one huge log file when your log shipper only hands you short line fragments, shuffled, some corrupted, drawn from many copies of the file, with the line numbers stripped off. You rebuild it either by matching each fragment against a known-good copy (alignment to a reference) or by overlapping fragments with each other until the whole thing reassembles (de novo assembly). The analogy is good, and here is where it cracks. A real log ships with timestamps and byte offsets. DNA reads carry no offsets and no orientation. Worse, a genome has long stretches that are byte-for-byte identical in several places, so a fragment from inside one is genuinely unplaceable, something a log with unique line numbers never suffers. And a corrupted read does not look malformed the way a truncated log line does. A miscalled base is a valid letter that simply happens to be wrong.
Illumina: short and accurate, and why those come together
The dominant short-read platform is Illumina, and its two defining traits, high accuracy and short length, are the same fact seen twice. The method is sequencing by synthesis. Fragments are stuck to a glass flow cell and each is copied in place into a dense cluster of identical strands. Then the machine runs cycles. In each cycle it adds one nucleotide to every strand, a nucleotide carrying a colored fluorescent tag and a chemical cap that blocks the next addition. A camera photographs the whole flow cell (each cluster glows the color of the base just added), the cap and tag are cleaved off, and the next cycle runs. One base per cycle, imaged in parallel across hundreds of millions of clusters.
Why so accurate: reading a bright cluster of thousands of identical strands averages out noise, so each base is called correctly about 99.9 percent of the time. Why so short: the clusters slowly fall out of step. A few strands skip a cycle or run one ahead, so the once-clean color signal blurs a little more every cycle. After roughly 150 to 300 bases the blur wins and the read becomes unreadable. That same drift means the error profile is characteristic: errors are mostly single-base substitutions (one base miscalled as another), and they rise toward the 3 prime end of each read as the phasing drift accumulates.
Reads, coverage, and why you need a stack of them
One read of a spot tells you little. You want many reads covering the same spot, and the amount of that redundancy is coverage (also called depth). For an average across a genome:
coverage = total bases sequenced / genome length
= (number of reads * read length) / genome length
For a human genome of about 3 billion bases, 40 million reads of 150 bases each is 6 billion sequenced bases, or about 2x average coverage. That is thin. A confident study usually targets around 30x. Three independent reasons force that redundancy, and you can derive each:
- Random per-base errors average out. Illumina misreads roughly 1 base in 1000. Stack 30 reads over a position and a lone error is outvoted by the agreeing majority.
- You are diploid, so most positions have two alleles, and a heterozygous variant shows up in only about half the reads. At 2x coverage you might sample only one allele by pure chance and miss the variant entirely.
- Reads land at random positions (roughly Poisson), so even when the average is 30x, some regions get 5x and some get 60x. You need enough average to keep the unlucky low spots usable.
Why repeats and structural variants break short reads
Here is the deep limit of short reads, and it follows from one rule: a read can be placed uniquely only if its sequence occurs in exactly one place in the genome. Nearly half the human genome is repetitive. If a repeated unit is longer than your read, then a read taken from inside that repeat matches every copy equally well, and the aligner cannot honestly choose one. It either guesses or flags the placement as low confidence. You end up effectively blind precisely where the genome repeats.
The same limit wrecks structural variants, large rearrangements of roughly 50 bases or more: big insertions, deletions, inversions, duplications, or a piece of one chromosome fused to another. A short read that sits entirely on one side of the break looks completely normal. To detect the event you need a read that spans the breakpoint, that reaches across it into the sequence on both sides. A 150-base read almost never spans a large event, so short reads systematically under-report exactly the kind of variation that matters most in cancer and rare disease.
Long reads: Nanopore and PacBio
Long-read platforms attack that limit directly by reading far longer pieces. Oxford Nanopore threads a single DNA strand through a tiny protein pore and measures the faint ionic current across it. Whichever bases sit in the pore's narrowest point squeeze the current by a characteristic amount, and the sequence is decoded from that current trace. There is no synthesis and no cluster to fall out of phase, so reads run from 10,000 bases to, in some cases, millions. Pacific Biosciences (PacBio) instead watches a single polymerase copy a strand inside a microscopic well, catching a flash of color at each base it adds (this is called single-molecule real-time, or SMRT, sequencing).
Be honest about the tradeoff. Historically these platforms had a much higher raw error rate, roughly 5 to 15 percent, and their errors have a different shape than Illumina's. Instead of substitutions, they make insertions and deletions, concentrated in homopolymers, runs of the same base like AAAAAA. Counting exactly how many identical bases went by is hard when the signal barely changes between them.
FASTQ: what the run actually hands you
A finished run does not hand you a genome. It hands you a file of millions of reads in FASTQ format (you met FASTQ as a format in BIO-2.1, here is where its contents come from). Each read is four lines: an identifier line starting with @, the base sequence, a + separator, and a quality line the exact same length as the sequence.
@SEQ_READ_001 machine1:run5:lane2:tile1101:x3020:y7912
GATTACAGATTACAGGCCTAACGT
+
IIIIIIIIIIIIIIII??5555##
Read the quality line left to right. Each character encodes a Phred quality score for the base above it, and it tells the honest story of the read: strong and steady near the start, then decaying toward the 3 prime end exactly as the Illumina phasing model predicts. The score is defined as Q equals negative 10 times log base 10 of the probability that the base is wrong, and it is stored as a single ASCII character offset by 33. The snippet below decodes it. Trace the four characters by hand before you read the printed answers, and notice it is a log scale, not a percentage.
# Phred score Q = -10 * log10(P_error), stored as one ASCII char, offset 33.
def phred_to_error(qual_char):
q = ord(qual_char) - 33
return q, 10 ** (-q / 10)
for c in "I?5#":
q, p = phred_to_error(c)
print(c, "Q" + str(q), round(p, 4))
# I -> Q40 -> 0.0001 (1 wrong base in 10000)
# ? -> Q30 -> 0.001 (1 in 1000)
# 5 -> Q20 -> 0.01 (1 in 100)
# # -> Q2 -> 0.631 (more likely wrong than right)
The biases this creates
Now the promise in the title. Sequencing is a measurement, and like every measurement it is biased. The biases are systematic, so more coverage does not remove them.
- Amplification (GC) bias. The library-prep step often copies fragments by PCR, and PCR copies extreme regions poorly. Very GC-rich and very AT-rich stretches get amplified less, so they end up with less coverage even though they were present in the sample.
- Mappability bias. Repetitive regions cannot be uniquely placed, so they receive little or no confidently-mapped coverage. You are blind in exactly the places the genome repeats, and short reads make this worse.
- Reference bias. Aligning to a single reference genome means anything absent from that reference is hard to see, and a read carrying a real variant aligns slightly worse than a read matching the reference, which subtly undercounts the alternate allele. You will meet this again in BIO-5.2 as a reproducibility trap.
- Platform error profile. A variant caller must know whether to expect Illumina substitutions or long-read homopolymer indels. Point the wrong model at the data and it promotes systematic sequencing errors into confident, entirely fake variants.
Two ways to give a read its coordinates: alignment vs assembly
Because reads arrive without positions, there are exactly two strategies to recover structure, and which one you pick shapes everything. Alignment to a reference maps each read against an existing genome. It is fast and it is what most resequencing does, but it can only find what the reference lets it see, so it inherits reference bias and struggles at repeats and structural variants. De novo assembly ignores any reference and rebuilds the genome purely by overlapping the reads with each other, which is how you discover sequence that is not in any reference and how you resolve large rearrangements, but it is far more computationally demanding and it fails wherever reads are too short to bridge a repeat. This last point is why long reads did not just improve assembly, they changed what assembly can finish. A read that spans a repeat closes a gap that a mountain of short reads leaves permanently open, which is how the truly complete, telomere-to-telomere human genome was assembled only after long reads matured.
Key terms
- read
- One sequenced DNA fragment, a short string of bases with no genome coordinate attached and possibly from either strand.
- coverage (depth)
- How many reads overlap a given position on average, equal to total bases sequenced divided by genome length. Redundancy against random error, not systematic bias.
- sequencing by synthesis
- The Illumina method: copy fragments into clusters, then add one tagged, capped base per cycle and image the color, which is highly accurate but limited to short reads by phasing drift.
- long-read sequencing
- Nanopore (ionic current through a pore) and PacBio (watching a polymerase) produce reads of tens of thousands of bases or more, historically at higher raw error, and can span repeats and structural variants.
- structural variant
- A large genome rearrangement of roughly 50 bases or more (insertion, deletion, inversion, duplication, or translocation) that a short read usually cannot span and so usually cannot detect.
- FASTQ
- The text format a sequencing run outputs: four lines per read holding an id, the base sequence, a separator, and an equal-length string of quality characters.
- Phred quality score
- Q equals negative 10 times log10 of the probability a base is wrong, stored as one ASCII character offset by 33. Log-scaled, so Q30 means 1 error in 1000.
- reference bias
- The distortion from mapping reads to one reference genome, which hides sequence not in the reference and undercounts alternate alleles because variant-bearing reads align slightly worse.
Where this leaves you
A sequencer never reads a chromosome end to end. It shreds DNA, reads millions of short overlapping fragments from either strand with no coordinates, and writes them to FASTQ with a per-base quality that decays down each read. Illumina buys accuracy at the price of length, long reads buy length at the historical price of accuracy, and coverage is redundancy that beats random error but not repeats, structural variants, or systematic bias. The data you are handed is a biased measurement, not the truth, and the rest of this track is the honest work of turning it back into structure.
Check yourself
1. A sequencing run finishes. What did the machine actually produce?
2. You sequence a 3 billion base human genome and get 40 million reads of 150 bases each. Roughly what average coverage is that, and is it enough to confidently call heterozygous variants?
3. A genome contains a 5000-base segment repeated identically in three places. You sequence with 150-base short reads. Why cannot the aligner confidently place reads from inside that repeat, and what fixes it?
4. One platform's errors are mostly single-base substitutions that worsen toward the end of each read. Another's are mostly insertions and deletions inside homopolymer runs like AAAAAA. Which is which, and why does it matter?