Home › Explainers › Science
ScienceHow Genetic Testing Finds a Match in Your DNA
- Before DNA can be read, a technique called PCR copies a tiny sample millions of times over, since there usually isn't enough raw genetic material to analyze directly.
- Sequencing then determines the exact order of the four DNA bases in the amplified sample, which is compared against a reference genome or a specific known marker.
- Consumer ancestry and relative-matching tests work differently from clinical or forensic tests, comparing shared DNA segments across many people rather than reading a single gene.
A saliva swab, a drop of blood, a few skin cells left at a scene — each contains DNA molecules folded and packed inside cells, but far too little of it to analyze directly with most laboratory equipment. Nearly everything genetic testing accomplishes depends on solving that scarcity problem first, before the actual reading of genetic information can even begin.
Amplifying a Sample That's Too Small to Read
The workhorse technique for solving this is called the polymerase chain reaction, or PCR. A small sample of DNA is mixed with an enzyme that copies DNA strands, short synthetic DNA fragments called primers that mark the specific region to be copied, and the raw building blocks needed to construct new strands. The mixture is then cycled through precise temperature changes: high heat to split the double-stranded DNA into two single strands, a cooler stage that lets the primers attach to their matching spot on each strand, and a middle temperature where the enzyme builds a new complementary strand alongside each original. Each full cycle roughly doubles the amount of targeted DNA, and running 30 or so cycles turns a single strand into over a billion copies within a couple of hours, providing more than enough material for the next step.
Reading the Actual Sequence
Once there's enough amplified DNA to work with, sequencing determines the exact order of the four chemical bases — adenine, thymine, guanine, and cytosine — that make up the strand. Modern sequencing machines typically tag each of the four bases with a different fluorescent marker, then read the DNA one base at a time as it's built, detecting which color lights up at each step and recording the sequence as a long string of letters. A full human genome contains roughly three billion of these base pairs, but most genetic tests don't need to read the entire genome. Many clinical tests target one specific gene known to be associated with a particular condition, while forensic and paternity tests focus on a small set of highly variable regions that differ enough between unrelated people to serve as an identifying fingerprint without needing to sequence anything close to the whole genome.
Comparing Against a Reference
A raw sequence of letters is meaningless without something to compare it to. Clinical genetic tests compare a patient's sequence at a specific gene against a reference version of that gene known to function normally, looking for variants that are known, from prior research, to disrupt the protein that gene produces or to correlate statistically with a particular condition. Forensic identity tests instead compare specific variable regions against a suspect's known sample or against entries in a database, calculating the statistical odds that two unrelated people would share that particular combination of variants by chance, which is typically astronomically low once enough regions are compared. This comparison step, not the sequencing itself, is usually where the most interpretive judgment enters the process, since a novel variant with no prior research behind it may be difficult to classify as harmful, harmless, or simply unknown.
How Ancestry and Relative-Matching Tests Differ
Consumer tests that estimate ethnic ancestry or find genetic relatives work on a different principle than a single-gene clinical test. These tests scan hundreds of thousands of specific positions scattered across the genome, known to vary commonly between populations, and compare the pattern against reference panels built from people with well-documented ancestry. Two people who are related will share unusually long, unbroken stretches of matching DNA at these positions, inherited intact from a shared ancestor, and the length and number of these shared segments is what the software uses to estimate how closely related two people likely are. This is a statistical, population-level comparison rather than a search for any single meaningful gene, which is why ancestry estimates are presented as probabilities across reference populations rather than as a single definitive answer.
Why Results Come With Confidence Levels, Not Certainties
Almost no genetic test result is reported as an absolute, deterministic fact, and for good reason: reference databases are incomplete, some genetic variants have effects that depend on other genes or environmental factors, and a small number of samples can be degraded or contaminated in ways that affect the result. Clinical laboratories generally report findings with defined confidence categories, and professional guidance from the National Library of Medicine's genetics resources emphasizes that a genetic test result is best interpreted together with family history and clinical context rather than read in isolation.
Genetic testing starts by using PCR to copy a small DNA sample millions of times over, since raw samples rarely contain enough material to analyze directly. Sequencing then reads the exact order of DNA bases in the amplified sample, and that sequence is compared against a reference gene, a database, or a population panel depending on whether the test is clinical, forensic, or ancestry-focused. Because comparisons rely on incomplete reference data and statistical probability, most results are reported as confidence levels rather than absolute certainties.