Sample Relatedness — Duplicates, Swaps and Relatives¶
In the app: Population & relatedness › Sample Relatedness
Available on projects with variant (SNP) data, once the pipeline has delivered relatedness.tsv.
Sample Relatedness compares the genotypes of every pair of samples. Two libraries from the same individual share nearly all their genotypes; first-degree relatives share about half; unrelated samples share little beyond chance. Checked against what the annotation says — the Individual column set in the project wizard — this finds duplicates (the same DNA under two labels), sample swaps (a sample whose DNA belongs to someone else) and unexpected relatives.

Example output from a demonstration project with synthetic data.
Findings¶
- Pair findings — one sentence per flagged pair, for example "… look like the same individual (relatedness …) but are labelled different individuals", or "… are labelled the same individual but their genotypes are unrelated … — check for a swap." When a pair has no expected relation (no Individual for one of them), the finding says so: the pair alone is not judged a swap — set Individual to confirm.
- ⚠️ Pipeline flags — samples the pipeline flagged, for example as a duplicate of another library (identical genotypes), as unrelated to a sample labelled as the same individual, or as closely related to a sample labelled as a different individual.
- Or, when nothing is wrong: "No duplicate, swapped or unexpectedly related pair among N pairs."
- If the annotation has no Individual column, a caution says the expected relation of each pair is unknown, so identical pairs are listed as duplicates.
- Pairs that could not be assessed — too few informative sites, or low depth — are listed in a note as not evidence either way.
A scale note follows: ≈ 1: same individual or duplicate · ≈ 0.5: first degree · ≈ 0.25: second degree · ≤ 0: unrelated. Pairs ≥ 0.9 are treated as the same individual, 0.35–0.9 as close relatives. When the pipeline measured genotype correlation instead of kinship, the note explains that scale instead.
Pairwise relatedness (clustered)¶
A heatmap of the relatedness value for every pair of samples, ordered by clustering so related samples sit together. The diagonal (each sample with itself) is 1. An off-diagonal block at or near 1 is two samples with the same genotypes.
Raw data¶
Raw data — Flagged pairs¶
| Column | Meaning |
|---|---|
sample_a, sample_b |
The pair |
| Relatedness | The pair's relatedness value (labelled for the metric the pipeline used) |
expected |
What the annotation says, for example same individual (P1) or different individuals (P3 / P7) |
finding |
What the genotypes say, for example swap suspect or expected same individual — not matching |
source |
Whether the app or the pipeline raised the flag |
| IBS0 | Share of sites where the two samples have no allele in common (opposite homozygotes); near 0 for the same individual |
| Sites compared | Number of sites the value was computed over |
When no pair is flagged, the expander is Raw data — All pairs instead. A Not assessable pairs table lists pairs that could not be judged, with the reason.
Report settings that apply¶
None of the filter settings in the Report settings panel change this report. Appearance sets the plot styling (see Report Settings).
Reading it¶
- Same genotypes, different labels — a duplicate library, or one sample loaded twice. If the samples should be different individuals, one of them is probably swapped.
- Same label, unrelated genotypes — a swap: one of the libraries is not from the individual it is labelled as. Look for where its DNA actually sits in Genotype PCA.
- Set the Individual column when several libraries come from one individual; without it, the report cannot tell an intended replicate from a duplicate.
- Low values for a pair expected to be the same individual are not always a swap: with very few informative sites or low depth the estimate is noise. Such pairs are marked not assessable.