DNA comparison identifies shared and divergent sequence by aligning short reads or whole genomes against a reference, then counting differences. Two human genomes are roughly 99.9 percent identical, so the work is finding the 3 million or so positions that differ. The method depends on read length, reference quality, and the error model used to separate true variants from sequencing noise.
The comparison is not a single step. It is a pipeline: sample preparation, sequencing, quality trimming, alignment to a reference, variant calling, and filtering. Each stage introduces error that propagates. Understanding DNA comparison means understanding where those errors enter and how the scoring system handles them.
How alignment scoring separates signal from noise
Alignment works by finding the best-scoring way to place a sequence against a reference. The scoring rewards matches and penalizes mismatches and gaps. A typical scheme assigns +1 or +2 for a match, -1 to -4 for a mismatch, and larger penalties for opening and extending a gap. The gap penalty is often "affine": a fixed cost to open, a smaller cost per base to extend. This reflects biology, because a single insertion event is more likely than several independent ones.
The algorithm fills a matrix of scores. For each position, it asks whether the best path came from a diagonal (match or mismatch), a vertical move (gap in the query), or a horizontal move (gap in the reference). Dynamic programming guarantees the optimal score under the chosen penalties. Smith-Waterman finds the best local alignment; Needleman-Wunsch finds the best global one. Modern aligners like BWA-MEM and minimap2 use seeds and indexes to avoid filling the full matrix, which would be far too slow at genome scale.
The scoring choice changes the answer. Raise the mismatch penalty and the aligner prefers gaps; lower it and the aligner tolerates substitutions. For divergent sequences, a tuned scoring matrix matters more than the aligner itself.
One level deeper: alignment is a hypothesis about homology. A high score means the sequences are similar under the model, not that they share ancestry at that position. Repeat regions break this assumption, because a read can align equally well to several loci. That is why mapping quality exists.
Quantified context: what the numbers actually look like
Human genomes contain about 3.1 billion base pairs per haploid set, so a diploid genome is roughly 6.2 billion. Any two unrelated humans differ at about 0.1 percent of positions, which is roughly 3 million single-nucleotide variants. Add insertions, deletions, and structural variants and the count of differing bases rises.
Short-read sequencers produce reads of 100 to 300 base pairs. A typical whole-genome run generates 30x coverage, meaning each base is read about 30 times. At 30x, the probability that a true heterozygous variant is missed by chance is very low, but not zero. At 10x, confidence drops sharply in regions with uneven coverage.
Long-read platforms produce reads of 10,000 to 100,000 base pairs. They resolve repeats and structural variants that short reads cannot span, but their raw per-base error rate is higher, historically 5 to 15 percent, now often below 1 percent with improved chemistry. Hybrid approaches combine both.
RNA comparison adds a layer: expression level. Two samples can have identical sequence and differ tenfold in transcript abundance. That is a comparison of quantity, not of letters.
Where comparisons break: repeats, ploidy, and contamination
About half the human genome is repetitive. Segmental duplications, tandem repeats, and transposable elements create regions where many loci look alike. A short read from such a region may map to the wrong copy, producing a false variant or masking a real one. Mapping quality scores flag ambiguous placements, but filtering them discards real data.
Ploidy complicates variant calling. A heterozygous site shows roughly half the reads carrying the alternate allele, but coverage fluctuations push that fraction around. A somatic mutation in a tumor might appear in 5 percent of reads. Distinguishing a low-fraction true variant from a sequencing error requires a model of the error rate at that specific position and read context.
Sample contamination is a silent failure. A few percent of foreign DNA introduces variants that look real. Mitochondrial comparisons and sex-chromosome checks catch some contamination, but not all.
Counterintuitive detail: more coverage does not always improve accuracy. In repetitive regions, additional reads can reinforce a systematic misalignment. The error is not random, so averaging does not remove it. This is why coverage thresholds are necessary but not sufficient.
Red flags when reviewing a comparison: Coverage is uneven, with sharp drops in exons or GC-rich regions. The transition-to-transversion ratio departs from the expected roughly 2:1 for human germline variants. Heterozygous variant fractions cluster at implausible values, suggesting contamination or mismapping. Variant counts per sample vary far more than the cohort's spread. No negative control was run alongside the samples. Reference genome build is unstated or inconsistent between samples.
Common misconceptions about what a match means
A 99.9 percent identity figure describes single-nucleotide differences between two human genomes. It does not mean two people are 99.9 percent the same in every functional sense, because a single variant can disable a gene. Nor does it capture structural differences, which can span thousands of bases.
Another misconception: a match to a reference means the sequence is normal. The reference genome is a composite, not a universal standard. Some reference alleles are actually rare variants. Comparing against a pangenome, which represents many individuals, reduces this reference bias.
A third: identical sequence means identical function. Gene expression, epigenetic marks, and environmental context all shape outcomes. Sequence comparison is one layer of a multi-layer system.
Choosing a comparison method by question
| Method | Best for | Typical read length | Strength | Limitation |
|---|---|---|---|---|
| Short-read WGS | Germline SNVs, cohort studies | 100–300 bp | Low cost, high accuracy per base | Poor across repeats |
| Long-read WGS | Structural variants, repeats | 10–100 kb | Spans complex regions | Higher raw error, higher cost |
| Targeted panel | Known genes, clinical depth | 100–250 bp | Deep coverage at low cost | Misses variants outside panel |
| RNA-seq | Expression and splicing | 50–150 bp | Quantifies transcript levels | Not a germline test |
| Genotyping array | Common variants, large cohorts | Probe-based | Cheap at scale | Misses rare variants |
| Metagenomic comparison | Mixed microbial samples | varies | Species-level profiling | Reference database limits |
The right method follows from the question. A clinical germline question needs high accuracy at known loci. A structural-variant question needs long reads. A population study needs scale, which favors arrays. Comparing across methods without accounting for their different error profiles produces false discordance.
From comparison to action: thresholds and steps
A practical workflow starts before sequencing. Define the question, then choose the assay. Whole-genome sequencing at 30x suits germline discovery. Targeted panels at 500x or more suit known hotspots. RNA-seq suits expression questions.
Quality control comes next. Trim adapters and low-quality tails. Check read quality with per-base scores, and confirm coverage uniformity. Flag samples with contamination above a set threshold.
Alignment and variant calling follow. Use a declared reference build, and apply mapping-quality filters. Call variants with a model that accounts for the local error rate, then filter by depth and genotype quality.
Threshold reconciliation requires care, because published cutoffs differ by context. A minimum depth of 10x is common for germline calls, while 20x to 30x is preferred for confident heterozygous calls. Somatic calling often requires 50x or more and a minimum variant allele fraction. Clinical laboratories set their own validated thresholds, and those override generic rules. Reconcile by adopting the threshold validated for your assay and question, then documenting it. Do not mix thresholds from different pipelines when comparing outputs.
Interpretation is a separate step. A variant is not automatically causal. Cross-reference population frequency, predicted effect, and, where relevant, clinical databases. Compare family members to phase variants and test segregation.
The limits of any DNA comparison
Every comparison rests on a reference, a model, and a threshold. Change any one and the result can change. Reference bias favors alleles present in the reference. Error models assume the sequencing chemistry behaves as characterized. Thresholds encode tradeoffs between sensitivity and specificity.
Comparison also cannot resolve what it did not measure. A germline test says nothing about somatic mutations. A sequence says little about expression. A match at one locus says nothing about the rest of the genome.
The honest conclusion is bounded: DNA comparison tells you where two sequences differ under a stated method, with a measurable error rate. It does not tell you what those differences do without further evidence.
Timeline table for a typical germline comparison study:
| Stage | Duration | Key output |
|---|---|---|
| Sample collection and QC | 1–3 days | Quality-checked DNA |
| Library prep and sequencing | 2–5 days | Raw reads |
| Trimming and alignment | Hours | Aligned reads, mapping quality |
| Variant calling and filtering | Hours to days | Filtered variant list |
| Interpretation and review | Days to weeks | Classified variants |
| Validation of key findings | Days to weeks | Confirmed results |
| Reporting | Days | Final report |
A pangenome reference, built from many assembled genomes, reduces single-reference bias. It does not eliminate it, because any finite reference underrepresents rare variation. GeneReviews and similar resources describe how clinical interpretation handles this uncertainty. The practical takeaway: treat every comparison as conditional on its inputs, and state those inputs when you report a result.