File size: 3,343 Bytes
765c2b7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | import sys
sys.path.insert(0, "/ibex/project/c2041/hany0c/bench_h2h_20260915/tool")
from bench_h2h.eventlog import append_event
L = "/ibex/project/c2041/hany0c/bench_h2h_20260915/events.log"
append_event(L, "download",
"VCF VERIFY real/raw chr2 phased panel with bcftools 1.16 on the login node (nice/ionice, single stream; measured): 3202 samples, sample set == ped SampleID set (0 differences); header contigs chr1-22,X,Y (chr2 length 242,193,529), index lists chr2 only with 6,088,598 records, POS 10,000-242,183,311; FORMAT GT only (phased, source shapeit4.2.2); INFO AC/AF/AN, per-superpop AC/AN/AF/MAF with _unrel variants, AC_Hom/AC_Het, HWE, ExcHet, CM, SV fields. FILTER column is '.' on ALL 6,088,598 records: bcftools view -f PASS keeps 0 records; use -f .,PASS (or no -f) -- deviation from the quick-look spec text, needs the pipeline owner's acknowledgement. TYPE: SNP 5,318,178 (all REF/ALT single base: multiallelics are pre-split into biallelic records), INDEL 762,345, OTHER 8,075. INFO/AC minimum 2 over all SNVs (no AC=1 singletons in the panel; AC=2 1,617,715). 51,832 positions carry >1 biallelic SNV record (104,299 records; split multiallelics) -> dropped by the more-than-one-SNV-record rule. GT values chr2:10.0-10.1 Mb: only 0|0, 0|1, 1|0, 1|1 (no missing, no unphased). Cosmetic: htslib warns 'index file is older than the data file' because the .tbi was fetched first; content verified by sha256, files left untouched.",
sha={"real/scripts/vcf_probe2.sh": "bcc635c99bd5411ae8abafb83e30f8320bda49c077874cd54558b093b4856cfe", "real/logs/vcf_probe2.txt": "23041beeda28a79c6d96c2dd45eb16405582196d55ca735a4b949253f038b1bd"})
append_event(L, "download",
"UNRELATED CORE MEMBERSHIP (derived, from downloaded files only): the ped file's columns (FamilyID SampleID FatherID MotherID Sex Population Superpopulation) do NOT identify the 2,504 core -- the founder rule FatherID==0 & MotherID==0 gives 2,590 (EUR 525 vs 503, EAS 512 vs 504, AMR 353 vs 347, SAS 514 vs 489, AFR 686 vs 661; YRI 120, CEU 122, CHB 103) and wrongly excludes core samples that have parents listed (e.g. NA12878). Derived instead per sample from the VCF: for rare biallelic SNVs (INFO/AC<=40, chr2:10-25 Mb, 253,476 sites, 217,129 per-superpop constraints) AC_<SP>_unrel must equal the alt-allele sum over that superpopulation's unrelated carriers; single-unknown-carrier propagation (2 rounds) determined every AFR/EUR/EAS sample with 0 conflicts and 0 violations. Result: AFR 661, EUR 503, EAS 504 unrelated == header AN_*_unrel/2 exactly (measured); YRI 108, CEU 99, CHB 103 (YRI 1 and CEU 4 core samples have parents listed; 13 YRI and 27 CEU founders are not core). Rule for the cohort: sample in core iff status==unrel in derived/unrel2504_membership_AFR_EUR_EAS.tsv.",
sha={"real/derived/unrel2504_membership_AFR_EUR_EAS.tsv": "a50eeb038482a9a9fde2a58b08118134d53a4c765d403b8bd5c8b2a2d1f49c8f",
"real/derived/samples_AFR_EUR_EAS.txt": "0ca602ad840f64c928f291dcc7ac61566657c3d5cd406c18925f4e5e110c5efc",
"real/scripts/derive_unrel.py": "e7527b726f3fcfa3d5b59d76746e04cec5de1631854984c965a167e3a80dc9be",
"real/scripts/derive_unrel.sh": "d5473d332e64cc95ce2ac9f95e78eae3ab74bbab1f45d2799023f5717d52c90a",
"real/logs/derive_unrel2.txt": "db517e925982eb818cb0c26103a1ae18010c55a57fc54e708d1bd6862309edb1"})
print("ok")
|