Skip to content

Verify the people and the reference

The corrected sample table connects each genotype row to its source population label and recorded parents. A unique sample identifier is the join key. A row does not become an independent observation merely because its identifier differs from the identifiers beside it.

The selected input is the final 2022 GRCh38 callset on the PLINK resource page. The Phase 3 sample table and preliminary 2021 genotype release are different inputs. The examples preserve the exact corrected table and the reference header from the matching variant archive.

The companion preserves complete transfer checks for both genotype archives, the corrected sample table, and the October 24, 2026 PLINK binary archive. Local SHA-256 values identify those downloaded bytes. The provider does not supply an independent genotype checksum through these routes.

The small fixture below contains the complete sample table and bounded reference metadata. Its checks establish sample and reference identities. Complete genotype validity belongs to the separate primary workflow.

Both languages compare every sample identifier and population count. Missing sex metadata remains missing; neither example removes a person because that field is unavailable. The source does not define a family identifier column, so the code preserves parental identifiers directly.

The genotype data come from Byrska-Bishop and colleagues and NYGC. The collection acknowledgment credits Coriell samples and NHGRI grants 3UM1HG008901-03S1 and 3UM1HG008901-04S2. This lesson calculates its own teaching summaries from the declared source selection.

source("/shared/population_utils.R")
samples <- ReadSamples()
provenance <- VerifyMetadata()
header <- readLines("/fixtures/source/pvar_header.txt")
stopifnot(any(grepl("GRCh38_full_analysis_set", header, fixed = TRUE)))
chromosome_lengths <- c(
248956422, 242193529, 198295559, 190214555, 181538259, 170805979,
159345973, 145138636, 138394717, 133797422, 135086622, 133275309,
114364328, 107043718, 101991189, 90338345, 83257441, 80373285,
58617616, 64444167, 46709983, 50818468
)
for (index in seq_along(chromosome_lengths)) {
expected <- sprintf("##contig=<ID=chr%d,length=%d>",
index, chromosome_lengths[index])
stopifnot(expected %in% header)
}
samples$has_parent <- as.integer(samples$PAT != "0" | samples$MAT != "0")
summary <- aggregate(rep(1L, nrow(samples)),
samples[c("SuperPop", "Population")], sum)
names(summary)[3] <- "samples"
summary <- summary[order(summary$SuperPop, summary$Population), ]
dir.create("outputs", showWarnings = FALSE)
write.table(samples, "outputs/samples_r.tsv", sep = "\t", row.names = FALSE,
quote = FALSE)
write.table(summary, "outputs/populations_r.tsv", sep = "\t",
row.names = FALSE, quote = FALSE)
colors <- c(AFR = "#9e4f22", AMR = "#7c54a2", EAS = "#167c80",
EUR = "#3c6cb0", SAS = "#c48d16")
png("outputs/populations_r.png", width = 1200, height = 700, res = 130)
par(mar = c(7, 4, 3, 1))
barplot(summary$samples, names.arg = summary$Population, las = 2,
col = colors[summary$SuperPop], border = NA,
ylim = c(0, max(summary$samples) * 1.25),
ylab = "People in the complete source table",
main = "Source collection labels before relatedness exclusions")
legend("topright", names(colors), fill = colors, bty = "n", ncol = 5)
invisible(dev.off())
metrics <- list(samples = nrow(samples), populations = nrow(summary),
superpopulations = length(unique(samples$SuperPop)),
recorded_parent = sum(samples$has_parent),
missing_sex = sum(samples$SEX == "NA"),
autosomal_contigs = length(chromosome_lengths))
WriteMetrics(metrics)
cat(sprintf("The corrected table contains %d unique people.\n",
metrics$samples))
cat(sprintf("It contains %d populations and %d superpopulation labels.\n",
metrics$populations, metrics$superpopulations))
cat(sprintf("A parent is recorded for %d people.\n", metrics$recorded_parent))
cat(sprintf("The sex field is missing for %d person.\n", metrics$missing_sex))
cat("All 22 autosomal lengths match the declared GRCh38 reference.\n")
The corrected table contains 3202 unique people.
It contains 26 populations and 5 superpopulation labels.
A parent is recorded for 619 people.
The sex field is missing for 1 person.
All 22 autosomal lengths match the declared GRCh38 reference.

The R figure counts people by their source population labels.

The columns count people before family exclusions. The colors reproduce the source superpopulation labels and do not establish biological categories.

The IGSR policy states that 1000 Genomes data are available without embargo and asks users to cite the source publications. The companion preserves that notice with its retrieval hash. It does not assign a new Creative Commons license to the genotype files.

  • PLINK 1000 Genomes resources

    The resource selector distinguishes the final 2022 callset from its 2021 predecessor and explains the corrected sample table. The selected files must preserve those release and pedigree identities.

  • Byrska-Bishop and colleagues, expanded 1000 Genomes cohort

    The original study describes 3202 high-coverage genomes and 602 trios. Its data section maps genotypes and pedigree metadata to the corresponding IGSR collection.

  • NYGC collection acknowledgment

    The collection notice names the Coriell sample repository, NYGC data generation, funding, and study citation. Keep that acknowledgment with reuse of this cohort.