Skip to content

Add GDA EGT cluster INFO BCF source#103

Merged
joshuamschmidt merged 7 commits into
mainfrom
illumina-egt-info-bcf
May 20, 2026
Merged

Add GDA EGT cluster INFO BCF source#103
joshuamschmidt merged 7 commits into
mainfrom
illumina-egt-info-bcf

Conversation

@joshuamschmidt

@joshuamschmidt joshuamschmidt commented May 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the reference "expected" half of the observed-vs-EGT comparison for updates to popgen-genotyping SNP QC.

  • illumina_microarray/extract_egt_info_bcf.sh — standalone bash build script. Runs bcftools +gtc2vcf against the GDA-8v1-0 BPM + EGT + GRCh38 fasta with no --gtcs, piping through norm, sort, and view -G -O b --write-index=csi. Output: GDA-8v1-0_D1_ClusterFile_info.bcf{,.csi} in --out-dir.
  • illumina_microarray/copy_egt_info_bcf_to_main.sh — minimal gcloud storage cp from cpg-common-test to cpg-common-main. Run via analysis-runner at --access-level full --dataset common.
  • references.py — adds GDA_8v1_0_D1_ClusterFile_egt_info_bcf{,_index} as keys on the existing illumina_microarray Source (no new Source, no transfer_cmd). The promote script is the transfer mechanism.

The output BCF carries the per-variant INFO directly from the EGT cluster file: GenTrain_Score, Cluster_Sep, N_AA/AB/BB, meanTHETA_AA/AB/BB, devTHETA_AA/AB/BB, meanR_AA/AB/BB, devR_AA/AB/BB (plus ALLELE_A/B, FRAC_*, INTENSITY_ONLY, GC, etc.).

Sequencing

Staging into the test bucket is a manual gcloud storage cp step (no flag on the build script). Canonical staged paths:

gs://cpg-common-test/references/illumina_microarray/GDA-8v1-0_D1_ClusterFile_info.bcf
gs://cpg-common-test/references/illumina_microarray/GDA-8v1-0_D1_ClusterFile_info.bcf.csi

After merge, run the job to copy the files to main with AR:

analysis-runner \
  --dataset common \
  --access-level full \
  --description 'Promote EGT-derived BCF to cpg-common-main' \
  --output-dir references/illumina_microarray \
  illumina_microarray/copy_egt_info_bcf_to_main.sh

Tests

  • Script run locally against the canonical inputs in cpg-common-main/references/illumina_microarray/ (BPM, EGT, GRCh38 fasta) — 1,862,364 records emitted (1,904,599 BPM total − 3,352 skipped by gtc2vcf − 38,929 reference-mismatch removed by norm + 46 multiallelic splits).
  • Header declares all expected INFO fields; spot-check record has populated cluster moments.
  • BCF has 8 columns (no sample column) — view -G did its job.
  • Stage BCF + CSI under gs://cpg-common-test/references/illumina_microarray/ with the ClusterFile_info filenames.
  • Post-merge: run copy_egt_info_bcf_to_main.sh via analysis-runner at --access-level full and confirm BCF + CSI land at gs://cpg-common-main/references/illumina_microarray/.
  • Confirm references.toml gains illumina_microarray.GDA_8v1_0_D1_ClusterFile_egt_info_bcf{,_index} after the next references-repo CI run.

Adds the reference "expected" half of the observed-vs-EGT comparison
that the popgen-genotyping SNP QC report needs: a sample-less BCF whose
INFO carries the EGT cluster geometry from GDA-8v1-0_D1_ClusterFile.egt
(GenTrain_Score, Cluster_Sep, N_AA/AB/BB, meanTHETA_*/devTHETA_*,
meanR_*/devR_*).

* illumina_microarray/extract_egt_info_bcf.sh — standalone bash driver.
  Runs `bcftools +gtc2vcf` with no `--gtcs` against the canonical
  GDA-8v1-0 BPM + EGT + GRCh38 fasta, pipes through `norm`, `sort`,
  `view -G -O b --write-index=csi`. Mirrors the production
  gtc2vcf invocation in popgen-genotyping. Supports `--upload-only` so
  the bcftools build can run inside the bcftools:1.23-1 container and
  the gcloud upload runs from the host.
* references.py — new `illumina_microarray_egt_info` Source pointing at
  gs://cpg-common-test/references/illumina_microarray/egt_info/ with
  gcs_rsync, mirroring the hail_intervals_hg38 staging pattern. CI will
  rsync the BCF + CSI into cpg-common-main on merge.

Artifact already staged to the test bucket:
  gs://cpg-common-test/references/illumina_microarray/egt_info/GDA-8v1-0_D1_egt_info.bcf      (159 MB, 1,862,364 records)
  gs://cpg-common-test/references/illumina_microarray/egt_info/GDA-8v1-0_D1_egt_info.bcf.csi  (1.4 MB)
@joshuamschmidt
joshuamschmidt requested a review from silkm May 20, 2026 00:43
@joshuamschmidt
joshuamschmidt removed the request for review from silkm May 20, 2026 01:04
@joshuamschmidt joshuamschmidt changed the title Add GDA EGT cluster INFO BCF source + local extractor Add GDA EGT cluster INFO BCF source May 20, 2026
@joshuamschmidt
joshuamschmidt requested a review from silkm May 20, 2026 01:27

@silkm silkm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@joshuamschmidt
joshuamschmidt merged commit 0eb30c6 into main May 20, 2026
4 checks passed
@joshuamschmidt
joshuamschmidt deleted the illumina-egt-info-bcf branch May 20, 2026 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants