Skip to content

Reproduce the population genotype workflow

The workflow starts with archived genotypes from the final 2022 GRCh38 Byrska-Bishop callset. It performs fresh genotype validation, allele counts, relatedness selection, LD pruning, PCA, and quantitative association. Every association phenotype is simulated. The workflow does not repeat alignment, variant discovery, or original read quality analysis.

The source files come from the exact final-callset links on the PLINK resource page. The preliminary 2021 release and the 2,504-sample Phase 3 metadata remain different inputs. The corrected sample file has SHA-256 727a01b637d5e1ef02516a53069dc552b1fa46f442004ad50ea3d069c7741cdd.

Input Complete compressed bytes SHA-256
all_hg38.pgen.zst 3,396,789,539 61112b5cda8ca9738f81c4d98aff8f6fbdc9f3f177fe6d0870077bcb5b6a8fa3
all_hg38_rs_noannot.pvar.zst 583,491,735 b07449dba35891c5546c05e4182b1246c6e1adad60886b8c5b12ab806ac54d6b
hg38_corrected.psam 77,820 727a01b637d5e1ef02516a53069dc552b1fa46f442004ad50ea3d069c7741cdd
plink2_linux_amd_avx2_20261024.zip 11,021,215 1cb873b6a2cfc2ac17df60f55fd576e5a4259a089d32befa51ad8831854db780

These hashes identify complete downloaded bytes. The download routes do not provide independent genotype checksums. The preparation verifies complete Zstandard streams and ZIP members.

The pinned executable reports PLINK v2.0.0-b.1.2LM AVX2 AMD, dated October 24, 2026. Its executable SHA-256 is 534c4587998a6d37f864d8862fffd6560ea682cbf82e10ccf34f3ee46331f1f0. The companion records the full binary help text used to check command options.

The population_genetics:0.1.0 recipe extends the exact accepted Spatial image and uses its locked R environment with a separate uv-locked Python environment. The image build passes the complete R package lock, Python package checks, and exact PLINK version check. Its image digest is sha256:926cbe201dbc68aad10053d8625ad0a727db8c914d769892aeb4da5df3f82d30. The complete genotype preparation, source-bound pedigree review, and fresh complete primary gate pass. The six association families preserve the same 128,859 variants and 2,574 people without a model error.

The private companion repository contains the source preparation, container recipe, primary workflow, and page runners. Access requires permission. The public genotype inputs remain available from their provider.

The primary stages run in a container with network access disabled, two CPUs, and eight GiB. PLINK receives a required 5,500 MiB workspace and two threads. Chromosome-specific preparation limits memory use while preserving the complete source cohort and every eligible autosomal variant.

Run the compatibility and preparation stages from the companion repository root.

The genotype and pedigree files come from the final 2022 NYGC collection described by Byrska-Bishop and colleagues. Its data acknowledgment credits Coriell samples and NHGRI grants 3UM1HG008901-03S1 and 3UM1HG008901-04S2. The original study permits public distribution without access or use restrictions; the workflow computes its own teaching summaries.

Terminal window
bash guides/reproducibility/plink_population/run_stage.sh preflight
bash guides/reproducibility/plink_population/run_stage.sh prepare

The preflight uses actual chromosome 22 calls in one bounded interval to check reader behavior and command compatibility. Its diagnostic associations use random covariates and all source samples. Those results do not enter the teaching fixtures.

The preparation stage checks the complete PGEN, preserves original variant identifiers, and verifies duplicate allele keys. It calculates complete autosomal missingness and allele counts before thresholds, then estimates KING kinship on the preliminary sparse panel.

The downstream stage requires a recorded pedigree review bound to the source identity, conflict pairs, discordant pairs, and retained sample list. It does not create a simulated phenotype before that review passes.

The companion preserves the accepted decision in guides/population_genetics/scientific_review_2026_10_31.json. Its separate evidence file records every population’s source, retained, and excluded counts, alongside the documented relationship summaries. The decision applies only to the four recorded source hashes; changed evidence requires a new scientific review.

After inspection of the matching fresh preparation, copy that decision and run the complete primary gate. The gate repeats preparation before it checks the review and creates the simulated outcomes.

Terminal window
cp guides/population_genetics/scientific_review_2026_10_31.json \
/mnt/data/bti_population_genetics_2026_10_31/provenance/pedigree_review.json
uv run --no-project python harness/gate_guide.py \
guides/reproducibility/plink_population

Keep selection rules independent of association

Section titled “Keep selection rules independent of association”

The conflict graph combines KING estimates above 0.0884 with documented first-degree and second-degree pedigree relationships. Each step removes the largest remaining degree, then resolves ties by missingness and identifier. The primary output preserves each exclusion and its remaining conflict edges.

Allele counts are recalculated in the retained people. Eligible markers have minor allele frequency of at least 0.05. The final sparse panel selects the lowest-coordinate eligible marker per 100-kb window, with REF and ALT as lexical tie breakers. The dense panel contains all eligible chromosome 22 SNPs.

Their deduplicated union defines each association family. PCA uses only the sparse chromosome 1 through 21 markers after --indep-pairwise 1000kb 1 0.2. The workflow preserves the complete candidate, retained, and pruned marker lists.

The generating marker is the lowest eligible chromosome 22 position at or above 30,000,000, with the same allele tie rule. The workflow freezes its source identifiers, ALT allele, and complete dosage before it generates the three traits. Each trait has an unadjusted and ten-PC-adjusted OLS model, producing six separate complete families.

Every family must contain exactly one additive result for each frozen marker, with the declared ALT effect allele and complete sample count. Any unresolved model error stops acceptance. Regional plots retain the full-family threshold.

The complete downloads, bounded preflight, complete genotype preparation, source-bound pedigree review, and fresh primary analysis pass. All seven paired lesson gates pass against the accepted complete fixtures. The figures also pass visual review; the release check requires exact copies of their fresh outputs. Production build and browser checks remain separate release requirements.

The record distinguishes an executed process from accepted source identity, genotype quality, model agreement, and a successful page gate. No association in this section supports a disease mechanism, clinical prediction, or a biological discovery claim.

The result block is synchronized with the primary runner’s captured output. Its release check also verifies the accepted panel and the saved pedigree decision before it accepts either captured count.

The complete primary acceptance preserves 594 output identities.
All six families retain 128859 tests with no model errors.

The source use notice follows the IGSR data policy, and the analysis cites Byrska-Bishop and colleagues. The companion preserves the exact retrieved policy bytes and their hash.

The PLINK 2 resources page identifies public genotype distributions. The basic statistics reference defines the frequency and missingness outputs used for population checks.

The IGSR data access policy distinguishes public access from the obligations attached to source collections. Consult the policy with the exact collection record when redistributing genotype files.