From 9b75e261c27f380d3970bf2787043614592a1176 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 09:04:07 +0100 Subject: [PATCH 001/110] fix(prs): withhold the percentile when the scored genotypes list variants only og prs table takes the genotypes pgsc_calc scored (--target) and counts their called and reference calls. When under one in five is 0/0, every missing site was read as the reference, so each score keeps its raw sum, loses its percentile and effect, and the new Percentile_Note column says why. The rule reads the genotypes, never --input-kind: chip VCFs list their reference calls and keep their percentiles. Bead: lin-42 --- rust/crates/og-summary/src/prs.rs | 168 ++++++++++++++---- rust/crates/og-summary/src/prs/tests.rs | 224 ++++++++++++++++++++++++ 2 files changed, 361 insertions(+), 31 deletions(-) diff --git a/rust/crates/og-summary/src/prs.rs b/rust/crates/og-summary/src/prs.rs index 5e20ad875..f882f6c62 100644 --- a/rust/crates/og-summary/src/prs.rs +++ b/rust/crates/og-summary/src/prs.rs @@ -16,10 +16,15 @@ //! left out. //! - pgsc_calc's zero-match and below-threshold exits become rows, not //! errors. +//! - A score matched against genotypes that list variants only loses its +//! percentile (see [`Genotypes`]): every site such an input leaves out +//! reads as the reference, so the sum leans away from the panel's sums. //! //! The table's columns are [`COLUMNS`], with [`EFFECT_COLUMNS`] before -//! `Input` when any score has evaluations. Stdout has one line per score, -//! which the e2e cases read. +//! `Input` when any score has evaluations, and [`NOTE_COLUMN`] before +//! `Input` when the genotypes were given (`--target`). Stdout has one line +//! per score, which the e2e cases read, then the note on a variant-only +//! input. use crate::args::{self, Kind, Opt}; use crate::{basename, finish, float, is_file, join, text_lines, trunc, write_file}; @@ -50,6 +55,11 @@ pub const COLUMNS: [&str; 13] = [ ]; /// Written before Input when the score list names PGS Catalog evaluations. pub const EFFECT_COLUMNS: [&str; 2] = ["Evaluated_In", "Effect"]; +/// Written before Input when the genotypes pgsc_calc scored were given: +/// why a score has no percentile when the panel gave it one. +pub const NOTE_COLUMN: &str = "Percentile_Note"; +/// The note of a percentile withheld for an input that lists variants only. +pub const WITHHELD: &str = "percentile withheld: the input lists variants only"; /// Sex_Check of a sex-specific score. pub const SEX_APPLIES: &str = "applies"; @@ -58,7 +68,7 @@ pub const SEX_NOT_DECLARED: &str = "no sex declared"; const USAGE: &str = "usage: og prs table --sample S --results DIR --sampleset NAME --scores DIR --input-kind {gvcf,vcf} [--panel NAME] [--zero-matches] [--below-threshold LOG] [--sex {,male,female}] - --out F [--ancestry-out F] + [--target VCF] --out F [--ancestry-out F] "; const OPTS: &[Opt] = &[ @@ -71,6 +81,7 @@ const OPTS: &[Opt] = &[ Opt("--zero-matches", Kind::Flag, false), Opt("--below-threshold", Kind::Value, false), Opt("--sex", Kind::Choice(&["", "male", "female"]), false), + Opt("--target", Kind::Value, false), Opt("--out", Kind::Value, true), Opt("--ancestry-out", Kind::Value, false), ]; @@ -99,11 +110,74 @@ pub struct Inputs<'a> { pub sex: &'a str, /// pgsc_calc ran with an ancestry panel. pub panel: bool, + /// The genotypes pgsc_calc scored, when the caller gave them. + pub genotypes: Option, } -/// One row of the table: the 15 cells of [`COLUMNS`] with -/// [`EFFECT_COLUMNS`] before Input. -pub type TableRow = [String; 15]; +/// One row of the table: the 16 cells of [`COLUMNS`] with +/// [`EFFECT_COLUMNS`] and [`NOTE_COLUMN`] before Input. +pub type TableRow = [String; 16]; + +/// The called genotypes of the file pgsc_calc scored (the score positions, +/// and with a panel the panel's), and how many of them are reference calls. +/// +/// pgsc_calc reads a position the file leaves out as the reference allele +/// on both copies. That is true only when the file lists reference calls: +/// genotypes from a gVCF, or a chip VCF (scripts/chip-to-vcf.sh writes every +/// probe). A variant-only VCF lists none, so each of its missing sites may +/// be a variant it never called, and its percentile would sit among the +/// panel's complete genotypes as if it were one of them. The evidence is in +/// the genotypes themselves, never in the input's name: a gVCF with no +/// reference blocks over the sites is as blind as a variant-only VCF. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] +pub struct Genotypes { + /// Records with a genotype whose every allele is called. + pub called: u64, + /// Of those, the records whose every allele is the reference (0/0, 0|0, 0). + pub hom_ref: u64, +} + +impl Genotypes { + /// Counts the first sample's GT of each record of a VCF, gzipped or not. + pub fn read(path: &str) -> Result { + let mut g = Genotypes::default(); + let mut lines = text_lines(path)?; + let mut line = String::new(); + while lines + .read_line(&mut line) + .map_err(|e| format!("{path}: {e}"))? + { + if line.starts_with('#') { + continue; + } + let f: Vec<&str> = line.trim_end_matches(['\n', '\r']).split('\t').collect(); + let (Some(format), Some(sample)) = (f.get(8), f.get(9)) else { + continue; + }; + let Some(k) = format.split(':').position(|k| k == "GT") else { + continue; + }; + let gt = sample.split(':').nth(k).unwrap_or(""); + let alleles: Vec<&str> = gt.split(['/', '|']).collect(); + if alleles.iter().any(|a| a.is_empty() || *a == ".") { + continue; + } + g.called += 1; + if alleles.iter().all(|a| *a == "0") { + g.hom_ref += 1; + } + } + Ok(g) + } + + /// Whether the file lists reference calls: at least one called site in + /// five is 0/0, the rule step 26b applies to the panel's sites. A gVCF + /// or a chip VCF gives most score positions as 0/0; a variant-only VCF + /// gives none. + pub fn lists_reference(&self) -> bool { + self.called > 0 && self.hom_ref.saturating_mul(5) >= self.called + } +} /// The ancestry rows of step 26: (key, value). pub type Ancestry = Vec<(String, String)>; @@ -463,6 +537,7 @@ pub fn table(i: &Inputs) -> Result<(Vec, Ancestry), String> { } } let below = matches!(i.outcome, Outcome::BelowThreshold(_)); + let variants_only = i.genotypes.is_some_and(|g| !g.lists_reference()); let mut rows = Vec::with_capacity(totals.len()); for (pid, (t, label)) in &totals { let m = matched.get(pid).copied().unwrap_or(0); @@ -481,6 +556,14 @@ pub fn table(i: &Inputs) -> Result<(Vec, Ancestry), String> { // sample in, and only when that group is one the score was evaluated in. let g = group.get(pid).map_or("NA", String::as_str); let p = pct.get(pid).map_or("NA", String::as_str); + // A percentile the panel gave goes when the genotypes list variants + // only; the note says why. A score of the other sex has none anyway. + let note = if variants_only && p != "NA" && !below && check != SEX_NOT_APPLICABLE { + WITHHELD + } else { + "" + }; + let p = if note.is_empty() { p } else { "NA" }; let eff = if check == SEX_NOT_APPLICABLE || p == "NA" || below { String::new() } else { @@ -498,6 +581,7 @@ pub fn table(i: &Inputs) -> Result<(Vec, Ancestry), String> { check.to_owned(), evaluated_in.join(";"), eff, + note.to_owned(), i.input_kind.to_owned(), ]; let head: [String; 8] = if below { @@ -583,6 +667,9 @@ fn line(r: &TableRow) -> String { if !r[13].is_empty() { extra.push_str(&format!(", effect in that group {}", r[13])); } + if !r[14].is_empty() { + extra.push_str(&format!(", {}", r[14])); + } if r[3] == "NA" { format!( " {} ({}): no sum, under pgsc_calc's minimum overlap ({}% of {} variants matched)", @@ -611,38 +698,47 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { None if a.flag("--zero-matches") => Outcome::ZeroMatches, None => Outcome::Scored, }; - let inputs = Inputs { - results: a.text("--results"), - sampleset: a.text("--sampleset"), - scores: a.text("--scores"), - input_kind: a.text("--input-kind"), - outcome, - sex: a.text("--sex"), - panel: !a.text("--panel").is_empty(), - }; + let target = a.get("--target").filter(|t| !t.is_empty()); let mut run = || -> Result<(), String> { + let inputs = Inputs { + results: a.text("--results"), + sampleset: a.text("--sampleset"), + scores: a.text("--scores"), + input_kind: a.text("--input-kind"), + outcome, + sex: a.text("--sex"), + panel: !a.text("--panel").is_empty(), + genotypes: target.map(Genotypes::read).transpose()?, + }; let (rows, ancestry) = table(&inputs)?; - // A score list without evaluations gives the table its older columns. + // A score list without evaluations gives the table its older + // columns; a call without --target, the columns before the note. let evaluated = rows.iter().any(|r| !r[12].is_empty()); - let mut body = String::new(); - let cols: Vec<&str> = if evaluated { - COLUMNS[..12] - .iter() - .chain(&EFFECT_COLUMNS) - .chain(&COLUMNS[12..]) - .copied() - .collect() - } else { - COLUMNS.to_vec() + let noted = inputs.genotypes.is_some(); + let keep = |k: usize| match k { + 12 | 13 => evaluated, + 14 => noted, + _ => true, }; + let mut body = String::new(); + let cols: Vec<&str> = COLUMNS[..12] + .iter() + .chain(&EFFECT_COLUMNS) + .chain([&NOTE_COLUMN]) + .chain(&COLUMNS[12..]) + .enumerate() + .filter(|(k, _)| keep(*k)) + .map(|(_, c)| *c) + .collect(); body.push_str(&cols.join("\t")); body.push('\n'); for r in &rows { - let cells: Vec<&str> = if evaluated { - r.iter().map(String::as_str).collect() - } else { - r[..12].iter().chain(&r[14..]).map(String::as_str).collect() - }; + let cells: Vec<&str> = r + .iter() + .enumerate() + .filter(|(k, _)| keep(*k)) + .map(|(_, c)| c.as_str()) + .collect(); body.push_str(&cells.join("\t")); body.push('\n'); } @@ -668,6 +764,16 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { for r in &rows { writeln!(out, "{}", line(r)).map_err(|e| e.to_string())?; } + if let Some(g) = inputs.genotypes.filter(|g| !g.lists_reference()) { + writeln!( + out, + "NOTE: hom-ref sites are absent from this input ({} of {} genotyped positions are \ + reference calls), so a missing site reads as the reference and the sums are \ + biased; not comparable to published distributions, and no percentile is given", + g.hom_ref, g.called + ) + .map_err(|e| e.to_string())?; + } Ok(()) }; finish(run(), err) diff --git a/rust/crates/og-summary/src/prs/tests.rs b/rust/crates/og-summary/src/prs/tests.rs index 80f967297..5bf77eb07 100644 --- a/rust/crates/og-summary/src/prs/tests.rs +++ b/rust/crates/og-summary/src/prs/tests.rs @@ -420,3 +420,227 @@ fn usage_errors_exit_2() { "{err}" ); } + +/// A one-sample VCF with these GT cells, one record each; gzipped as +/// step 25 and PRS_SCORE_SITES write it. +fn target(d: &Dir, name: &str, gts: &[&str]) -> String { + let mut body = String::from( + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n", + ); + for (k, gt) in gts.iter().enumerate() { + body.push_str(&format!( + "1\t{}\t.\tA\tG\t.\tPASS\t.\tGT:GQ\t{gt}:30\n", + k + 1 + )); + } + d.put_gz(name, &body) +} + +/// og prs table on the panel results of [`results`] and the scores of +/// [`two_scores`], for this input kind and genotypes. +fn with_target(d: &Dir, kind: &str, gts: Option<&[&str]>) -> (u8, String, Vec>) { + let pgs = two_scores(d); + results(d, "adj", true); + let (res, out) = (d.path("adj"), d.path("out.tsv")); + let t = gts.map(|g| target(d, "target.vcf.gz", g)); + let mut a = vec![ + "--sample", + "S", + "--sampleset", + "sample", + "--input-kind", + kind, + "--results", + &res, + "--scores", + &pgs, + "--panel", + "p", + "--out", + &out, + ]; + if let Some(t) = &t { + a.extend(["--target", t.as_str()]); + } + let (code, stdout, stderr) = run(cli, &a); + assert_eq!(stderr, ""); + let rows = std::fs::read_to_string(&out) + .unwrap() + .lines() + .map(|l| l.split('\t').map(str::to_owned).collect()) + .collect(); + (code, stdout, rows) +} + +/// The cell of `col` in row `k` (0 is the header). +fn cell<'a>(rows: &'a [Vec], k: usize, col: &str) -> &'a str { + let i = rows[0].iter().position(|c| c == col).unwrap(); + &rows[k][i] +} + +#[test] +fn a_variant_only_input_keeps_its_sum_and_loses_its_percentile() { + // What a variant-only VCF gives pgsc_calc: het and hom-alt calls only. + let d = Dir::new("prs-variants-only"); + let (code, stdout, rows) = with_target(&d, "vcf", Some(&["0/1", "1/1", "0|1", "1/1"])); + assert_eq!(code, 0); + let mut cols: Vec<&str> = COLUMNS[..12].to_vec(); + cols.extend(EFFECT_COLUMNS); + cols.extend([NOTE_COLUMN, "Input"]); + assert_eq!(rows[0], cols); + assert_eq!(cell(&rows, 1, "Score_SUM"), "1.25"); + assert_eq!(cell(&rows, 1, "Percentile"), "NA"); + assert_eq!(cell(&rows, 1, "Effect"), ""); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), WITHHELD); + assert_eq!(cell(&rows, 1, "Input"), "vcf"); + // PGS000002 had no percentile to withhold. + assert_eq!(cell(&rows, 2, NOTE_COLUMN), ""); + assert!( + stdout.contains( + "sum 1.25, 2 of 3 variants matched (66.7%), percentile withheld: the input lists variants only\n" + ), + "{stdout}" + ); + assert!(!stdout.contains("percentile 94.4"), "{stdout}"); + assert!( + stdout.ends_with( + "NOTE: hom-ref sites are absent from this input (0 of 4 genotyped positions are \ + reference calls), so a missing site reads as the reference and the sums are \ + biased; not comparable to published distributions, and no percentile is given\n" + ), + "{stdout}" + ); +} + +#[test] +fn a_chip_shaped_input_keeps_its_percentile() { + // scripts/chip-to-vcf.sh writes every probe: most are 0/0. + let d = Dir::new("prs-chip"); + let gts = ["0/0", "0/0", "0/1", "0/0", "1/1", "0/0", "./.", "0/0"]; + let (code, stdout, rows) = with_target(&d, "vcf", Some(>s)); + assert_eq!(code, 0); + assert_eq!(cell(&rows, 1, "Percentile"), "94.4"); + assert_eq!(cell(&rows, 1, "Effect"), "HR 1.53 (EUR, PPM000591)"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + assert_eq!(cell(&rows, 1, "Input"), "vcf"); + assert!(stdout.contains("percentile 94.4 among EUR"), "{stdout}"); + assert!( + !stdout.contains("NOTE:") && !stdout.contains("withheld"), + "{stdout}" + ); +} + +#[test] +fn the_genotypes_decide_never_the_input_kind() { + // A gVCF whose reference blocks miss every site is as blind as a + // variant-only VCF. + let d = Dir::new("prs-kind"); + let (_, _, rows) = with_target(&d, "gvcf", Some(&["0/1", "1/1"])); + assert_eq!(cell(&rows, 1, "Percentile"), "NA"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), WITHHELD); + let (_, _, rows) = with_target(&d, "gvcf", Some(&["0/0", "0/1"])); + assert_eq!(cell(&rows, 1, "Percentile"), "94.4"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + // Without --target there is no evidence and no note column: the table + // of older callers. + let (_, stdout, rows) = with_target(&d, "vcf", None); + assert_eq!(rows[0].len(), 15); + assert!(!rows[0].iter().any(|c| c == NOTE_COLUMN)); + assert_eq!(cell(&rows, 1, "Percentile"), "94.4"); + assert!(!stdout.contains("NOTE:"), "{stdout}"); +} + +#[test] +fn a_withheld_percentile_leaves_other_rows_alone() { + // No panel: nothing to withhold, but the note on the input stays. + let d = Dir::new("prs-raw-target"); + let pgs = two_scores(&d); + results(&d, "raw", false); + let res = d.path("raw"); + let t = target(&d, "target.vcf.gz", &["0/1"]); + let (code, stdout, _, rows) = go(&d, &["--results", &res, "--scores", &pgs, "--target", &t]); + assert_eq!(code, 0); + assert_eq!(cell(&rows, 1, "Percentile"), "NA"); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + assert!( + stdout.contains("NOTE: hom-ref sites are absent"), + "{stdout}" + ); + // A score of the other sex says that, not the input's note. + let d = Dir::new("prs-sex-target"); + formatted( + &d, + "pgs", + "PGS000001", + "Prostate cancer", + 3, + "0\tleft out", + "male", + "", + ); + results(&d, "adj", true); + let (res, pgs) = (d.path("adj"), d.path("pgs")); + let t = target(&d, "target.vcf.gz", &["1/1"]); + let (_, _, _, rows) = go( + &d, + &[ + "--results", + &res, + "--scores", + &pgs, + "--panel", + "p", + "--sex", + "female", + "--target", + &t, + ], + ); + assert_eq!(cell(&rows, 1, "Sex_Check"), SEX_NOT_APPLICABLE); + assert_eq!(cell(&rows, 1, NOTE_COLUMN), ""); + // An unreadable target is an error, and no table. + std::fs::remove_file(d.path("out.tsv")).unwrap(); + let (code, _, err, rows) = go( + &d, + &[ + "--results", + &res, + "--scores", + &pgs, + "--target", + &d.path("none.vcf.gz"), + ], + ); + assert_eq!(code, 1); + assert!(err.contains("No such file or directory"), "{err}"); + assert!(rows.is_empty()); +} + +#[test] +fn genotypes_count_called_and_reference_calls() { + let d = Dir::new("prs-genotypes"); + let p = d.put( + "t.vcf", + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n\ + 1\t1\t.\tA\tG\t.\tPASS\t.\tGT\t0/0\n\ + 1\t2\t.\tA\tG\t.\tPASS\t.\tGQ:GT\t30:0|0\n\ + X\t3\t.\tA\tG\t.\tPASS\t.\tGT\t0\n\ + 1\t4\t.\tA\tG\t.\tPASS\t.\tGT\t0/1\n\ + 1\t5\t.\tA\tG\t.\tPASS\t.\tGT\t./.\n\ + 1\t6\t.\tA\tG\t.\tPASS\t.\tGT\t0/.\n\ + 1\t7\t.\tA\tG\t.\tPASS\t.\tGQ\t30\n\ + 1\t8\t.\tA\tG\t.\tPASS\t.\n\ + 1\t9\t.\tA\tG\t.\tPASS\t.\tGT\t1/2\r\n", + ); + assert_eq!( + Genotypes::read(&p).unwrap(), + Genotypes { + called: 5, + hom_ref: 3 + } + ); + // One called site in five as 0/0 is enough; fewer, or none called, is not. + let g = |called, hom_ref| Genotypes { called, hom_ref }.lists_reference(); + assert!(g(5, 1) && g(1, 1) && g(430_000, 300_000)); + assert!(!g(6, 1) && !g(4, 0) && !g(0, 0)); +} From 2379defe88a33727f7107cf0b9b7cc4a29085070 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 09:04:07 +0100 Subject: [PATCH 002/110] fix(prs): give og prs table the genotypes pgsc_calc scored Step 25 passes target.vcf.gz and PRS_SUMMARY gets PRS_SCORE_SITES' output. The NOTE on missing hom-ref sites now comes from og prs table and follows the genotypes instead of the input kind. Bead: lin-42 --- modules/local/prs/main.nf | 12 ++++++++---- scripts/25-prs.sh | 11 +++++++---- workflows/clinical.nf | 5 ++++- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/modules/local/prs/main.nf b/modules/local/prs/main.nf index c0ad2f43f..4b3f5237e 100644 --- a/modules/local/prs/main.nf +++ b/modules/local/prs/main.nf @@ -24,7 +24,9 @@ samplesheet's sex its plink2 gets the sex (--update-sex), which it needs to read chrX PRS_SUMMARY _prs_summary.tsv (og prs table), - a score of the other sex marked not applicable, also + a score of the other sex marked not applicable, a + percentile withheld when PRS_SCORE_SITES' genotypes + list variants only (under one 0/0 in five), also published as _prs_summary..tsv so a rerun keeps it, and with the panel the ancestry table of step 26 @@ -328,7 +330,9 @@ process PRS_SUMMARY { publishDir { "${params.outdir}/${meta.id}/ancestry" }, mode: params.publish_dir_mode, pattern: '*_ancestry.tsv' input: - tuple val(meta), path(results), val(input_kind), path(scores, stageAs: 'pgs') + // target: PRS_SCORE_SITES' genotypes, which pgsc_calc scored; og prs + // table withholds the percentiles when they hold no reference calls. + tuple val(meta), path(results), val(input_kind), path(scores, stageAs: 'pgs'), path(target, stageAs: 'target/*') val(panel_name) // '' without an ancestry panel output: @@ -350,7 +354,7 @@ process PRS_SUMMARY { if [ -f ${results}/ZERO_MATCHES ]; then FLAGS=(--zero-matches); fi if [ -f ${results}/BELOW_THRESHOLD ]; then FLAGS=(--below-threshold ${results}/pgsc_calc.log); fi og prs table --sample ${meta.id} --results ${results} --sampleset sample \\ - --scores pgs --input-kind ${input_kind} --sex '${sex}' \${FLAGS[@]+"\${FLAGS[@]}"} ${anc} --out ${meta.id}_prs_summary.tsv + --scores pgs --input-kind ${input_kind} --sex '${sex}' --target ${target} \${FLAGS[@]+"\${FLAGS[@]}"} ${anc} --out ${meta.id}_prs_summary.tsv cp -p ${meta.id}_prs_summary.tsv ${meta.id}_prs_summary.\$(date -r ${meta.id}_prs_summary.tsv +%Y%m%d-%H%M).tsv printf '"%s":\\n python: %s\\n' "${task.process}" "${task.container.replaceFirst(/^[^:@]+[:@]/, '')}" > versions.yml @@ -358,7 +362,7 @@ process PRS_SUMMARY { stub: """ - printf 'Condition\\tPGS_ID\\tScore_SUM\\tVariants_Matched\\tVariants_Total\\tMatched_Pct\\tPercentile\\tAncestry_Group\\tChrX\\tAmbiguous\\tApplies_To\\tSex_Check\\tInput\\n' > ${meta.id}_prs_summary.tsv + printf 'Condition\\tPGS_ID\\tScore_SUM\\tVariants_Matched\\tVariants_Total\\tMatched_Pct\\tPercentile\\tAncestry_Group\\tChrX\\tAmbiguous\\tApplies_To\\tSex_Check\\tPercentile_Note\\tInput\\n' > ${meta.id}_prs_summary.tsv cp ${meta.id}_prs_summary.tsv ${meta.id}_prs_summary.20260101-0000.tsv if [ -n "${panel_name}" ]; then printf 'key\\tvalue\\nsample\\t%s\\n' ${meta.id} > ${meta.id}_ancestry.tsv; fi printf '"%s":\\n python: %s\\n' "${task.process}" "${task.container.replaceFirst(/^[^:@]+[:@]/, '')}" > versions.yml diff --git a/scripts/25-prs.sh b/scripts/25-prs.sh index 75d64df76..612368cd5 100755 --- a/scripts/25-prs.sh +++ b/scripts/25-prs.sh @@ -17,6 +17,12 @@ # 0/0 instead of a missing site. Without it, only your variant sites are # scored and the summary's Input column says vcf. # +# pgsc_calc reads a site the genotypes leave out as the reference. When under +# one in five of the genotyped positions is a reference call (0/0), the input +# lists variants only: each score keeps its raw sum, its percentile is +# withheld (Percentile_Note), and the step prints a NOTE. A chip VCF from +# chip-to-vcf.sh lists its reference calls and keeps its percentiles. +# # With the sample's sex, a score's chrX rows are scored too: pgsc_calc's # plink2 gets the sex with the genotypes. Without it they are left out (plink2 # refuses chrX without a sex), and the summary's ChrX column says so. @@ -389,7 +395,7 @@ run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$PYTHON_IMAGE" \ /pgp-bin/og prs table \ --sample "$SAMPLE" --results "$(cpath "${WORK}/results")" --sampleset "$SAMPLESET" \ --scores "$(cpath "${WORK}/scores")" --input-kind "$INPUT_KIND" --sex "$SEX" \ - ${ZERO[@]+"${ZERO[@]}"} ${ANC_ARGS[@]+"${ANC_ARGS[@]}"} --out "$(cpath "$RESULTS_FILE")" + --target "$(cpath "$TARGET")" ${ZERO[@]+"${ZERO[@]}"} ${ANC_ARGS[@]+"${ANC_ARGS[@]}"} --out "$(cpath "$RESULTS_FILE")" # This run's summary under its time too, so the next run keeps it; an earlier # summary of the same minute keeps its name and this one gets -2, -3... STAMP=$(date -r "$RESULTS_FILE" +%Y%m%d-%H%M) @@ -418,9 +424,6 @@ rm -rf "${WORK}/work" "${WORK}/.nextflow" if awk -F'\t' 'NR > 1 && $6 + 0 < 50 {found = 1} END {exit !found}' "$RESULTS_FILE"; then echo "WARNING: under half of a score's variants were genotyped; that sum is not comparable to published distributions." fi -if [ "$INPUT_KIND" = vcf ]; then - echo "NOTE: hom-ref sites are absent from this VCF, so the score is biased; not comparable to published distributions" -fi echo "" echo "============================================" diff --git a/workflows/clinical.nf b/workflows/clinical.nf index 3006c53a9..47cd3e984 100644 --- a/workflows/clinical.nf +++ b/workflows/clinical.nf @@ -159,11 +159,14 @@ workflow CLINICAL { .map { _id, meta, vcf, kind, pgs -> [meta, vcf, kind, pgs] }, ch_ancestry_ref ) + // With the genotypes pgsc_calc scored: og prs table withholds + // the percentiles when they hold no reference calls. PRS_SUMMARY( PRS.out.results .map { meta, res, kind -> [meta.id, meta, res, kind] } .join(ch_sample_pgs) - .map { _id, meta, res, kind, pgs -> [meta, res, kind, pgs] }, + .join(PRS_SCORE_SITES.out.vcf.map { meta, target, _kind -> [meta.id, target] }) + .map { _id, meta, res, kind, pgs, target -> [meta, res, kind, pgs, target] }, panel_name ) ch_prs_scores = PRS_SUMMARY.out.summary From d0c5d8f7d3c399aee036950b66f310ce8db120d9 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 09:04:07 +0100 Subject: [PATCH 003/110] feat(summary): carry the PRS percentile note into the summary og summary collect writes percentile_note for a table that has the Percentile_Note column. The c-full fixture gains the column with one withheld row; the goldens of the cases built on it change on purpose. Bead: lin-42 --- .../og-summary/src/collect/group_c/tables.rs | 37 ++++++++++--------- tests/parity/gen/summary-collect-c.sh | 6 +-- .../all-history/all-history.json | 9 +++-- .../golden/summary-collect/all/all.json | 9 +++-- .../c-float--inf/float--inf.json | 9 +++-- .../c-float-inf/float-inf.json | 9 +++-- .../c-float-nan/float-nan.json | 9 +++-- .../golden/summary-collect/c-full/full.json | 9 +++-- 8 files changed, 59 insertions(+), 38 deletions(-) diff --git a/rust/crates/og-summary/src/collect/group_c/tables.rs b/rust/crates/og-summary/src/collect/group_c/tables.rs index 59988dc59..fe87f046a 100644 --- a/rust/crates/og-summary/src/collect/group_c/tables.rs +++ b/rust/crates/og-summary/src/collect/group_c/tables.rs @@ -204,23 +204,26 @@ pub fn prs(c: &Ctx<'_>) -> Out { Some(Some(x)) => strs(x.split(';').filter(|x| !x.is_empty())), _ => Value::Null, }; - rows.push( - Obj::new() - .set("condition", get_default(r, "Condition", "")) - .set("pgs_id", get_default(r, "PGS_ID", "")) - .set("score", get_default(r, "Score_SUM", "")) - .set("matched", get_default(r, "Variants_Matched", "")) - .set("total", get_default(r, "Variants_Total", "")) - .set("chrx", get_default(r, "ChrX", "")) - .set("ambiguous", get_default(r, "Ambiguous", "")) - .set("applies_to", get_default(r, "Applies_To", "")) - .set("sex_check", get_default(r, "Sex_Check", "")) - .set("percentile", s(&pct)) - .set("group", group) - .set("evaluated_in", evaluated) - .set("effect", s(&or(r, "Effect", ""))) - .val(), - ); + let mut row = Obj::new() + .set("condition", get_default(r, "Condition", "")) + .set("pgs_id", get_default(r, "PGS_ID", "")) + .set("score", get_default(r, "Score_SUM", "")) + .set("matched", get_default(r, "Variants_Matched", "")) + .set("total", get_default(r, "Variants_Total", "")) + .set("chrx", get_default(r, "ChrX", "")) + .set("ambiguous", get_default(r, "Ambiguous", "")) + .set("applies_to", get_default(r, "Applies_To", "")) + .set("sex_check", get_default(r, "Sex_Check", "")) + .set("percentile", s(&pct)) + .set("group", group) + .set("evaluated_in", evaluated) + .set("effect", s(&or(r, "Effect", ""))); + // Why a panel run gave no percentile (og prs table --target writes + // the column): the input listed variants only. Older tables have none. + if r.get("Percentile_Note").is_some() { + row.put("percentile_note", s(&or(r, "Percentile_Note", ""))); + } + rows.push(row.val()); } let mut out = Obj::new() .set("scores", Value::Array(rows)) diff --git a/tests/parity/gen/summary-collect-c.sh b/tests/parity/gen/summary-collect-c.sh index 8c033035c..51af0da38 100644 --- a/tests/parity/gen/summary-collect-c.sh +++ b/tests/parity/gen/summary-collect-c.sh @@ -96,9 +96,9 @@ HFE\t1\tHFE*001\t3\t20\t.\t0\t-1 short\t1\n" put $f/hla_optitype/S_hla_concordance.tsv "Gene\tT1K\tOptiType\tAgree\tNote\nHLA-A\t A*02:01 \tA*02:01\tyes\t\n\t\t\t\t\nHLA-B\tB*57:01\tB*57:01\tyes\tok\n" put $f/kir_t1k/S_kir_genotype.tsv "KIR2DL1\t2\tKIR2DL1*001\t5\t30\tKIR2DL1*002\t4\t20\nKIR3DL3\t0\t.\t0\t-1\t.\t0\t-1\n" -put $f/prs/S_prs_summary.tsv "Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tChrX\tAmbiguous\tApplies_To\tSex_Check\tPercentile\tAncestry_Group\tEvaluated_In\tEffect -CAD\tPGS000018\t0.5\t100\t120\t0\t12 dropped\tall\tok\t75\tEUR\tEUR;;AFR\tHR 1.5 (EUR) -T2D\tPGS000014\t0.1\t10\t20\t0\t0\tall\tok\tNA\tNA\t\t +put $f/prs/S_prs_summary.tsv "Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tChrX\tAmbiguous\tApplies_To\tSex_Check\tPercentile\tAncestry_Group\tEvaluated_In\tEffect\tPercentile_Note +CAD\tPGS000018\t0.5\t100\t120\t0\t12 dropped\tall\tok\t75\tEUR\tEUR;;AFR\tHR 1.5 (EUR)\t +T2D\tPGS000014\t0.1\t10\t20\t0\t0\tall\tok\tNA\tNA\t\t\tpercentile withheld: the input lists variants only Short\tPGS1\n" put $f/ancestry/S_ancestry.tsv "key\tvalue\npopulation\tEUR\nreference_panel\tHGDP+1kGP\n\tskipped\npopulation_low_confidence\n" put $f/ancestry_fine/S_ancestry_fine.tsv "level\tcode\tgroup\tfraction\tse\tlow\thigh diff --git a/tests/parity/golden/summary-collect/all-history/all-history.json b/tests/parity/golden/summary-collect/all-history/all-history.json index e6d8efc33..13f69a860 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -13432,7 +13432,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -13447,7 +13448,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -13462,7 +13464,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index fabbf7ce7..e47c0e7ef 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -13437,7 +13437,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -13452,7 +13453,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -13467,7 +13469,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/summary-collect/c-float--inf/float--inf.json b/tests/parity/golden/summary-collect/c-float--inf/float--inf.json index 3ca35e94d..888b5abdb 100644 --- a/tests/parity/golden/summary-collect/c-float--inf/float--inf.json +++ b/tests/parity/golden/summary-collect/c-float--inf/float--inf.json @@ -479,7 +479,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -494,7 +495,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -509,7 +511,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/summary-collect/c-float-inf/float-inf.json b/tests/parity/golden/summary-collect/c-float-inf/float-inf.json index 060a6d172..7f06a7d5a 100644 --- a/tests/parity/golden/summary-collect/c-float-inf/float-inf.json +++ b/tests/parity/golden/summary-collect/c-float-inf/float-inf.json @@ -479,7 +479,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -494,7 +495,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -509,7 +511,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/summary-collect/c-float-nan/float-nan.json b/tests/parity/golden/summary-collect/c-float-nan/float-nan.json index 4e6448ba6..403298419 100644 --- a/tests/parity/golden/summary-collect/c-float-nan/float-nan.json +++ b/tests/parity/golden/summary-collect/c-float-nan/float-nan.json @@ -479,7 +479,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -494,7 +495,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -509,7 +511,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, diff --git a/tests/parity/golden/summary-collect/c-full/full.json b/tests/parity/golden/summary-collect/c-full/full.json index d6c6c247c..f3dfe4697 100644 --- a/tests/parity/golden/summary-collect/c-full/full.json +++ b/tests/parity/golden/summary-collect/c-full/full.json @@ -582,7 +582,8 @@ "EUR", "AFR" ], - "effect": "HR 1.5 (EUR)" + "effect": "HR 1.5 (EUR)", + "percentile_note": "" }, { "condition": "T2D", @@ -597,7 +598,8 @@ "percentile": "", "group": "", "evaluated_in": [], - "effect": "" + "effect": "", + "percentile_note": "percentile withheld: the input lists variants only" }, { "condition": "Short", @@ -612,7 +614,8 @@ "percentile": "", "group": null, "evaluated_in": null, - "effect": "" + "effect": "", + "percentile_note": "" } ], "adjusted": true, From b18a92de304c3a2fe0947e5ed76558f0c139c51f Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 09:04:07 +0100 Subject: [PATCH 004/110] docs(prs): say when a percentile is withheld for a variant-only input Bead: lin-42 --- CHANGELOG.md | 1 + docs/25-prs.md | 13 ++++++++----- docs/results/ancestry-and-lineage.md | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79deccf48..04c13e1c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 25 and the Nextflow `PRS_SUMMARY` withhold a score's percentile when the genotypes pgsc_calc scored list variants only. pgsc_calc reads every site such a VCF leaves out as the reference, so the sum leans away from the panel's sums, which come from complete genotypes, and the percentile was not comparable. Each score keeps its raw sum. Its `Percentile` is `NA`, its `Effect` is empty, and a new column before `Input`, `Percentile_Note`, says `percentile withheld: the input lists variants only`. The decision reads the genotypes, not the kind of input: at least one genotyped position in five must be a reference call (0/0), the rule step 26b applies to the panel's sites. Genotypes from a gVCF and chip VCFs from `scripts/chip-to-vcf.sh`, which list their reference calls, keep their percentiles. `og prs table` takes the genotypes with a new option, `--target VCF`, and prints the NOTE that step 25 printed before; the NOTE now follows the genotypes too, so a gVCF without reference blocks at the score positions gets it. `og summary collect` passes the note on as `percentile_note`. The output gains one column; no column, option or file name changes. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/docs/25-prs.md b/docs/25-prs.md index cdbd5e5ee..1bcc6a648 100644 --- a/docs/25-prs.md +++ b/docs/25-prs.md @@ -128,7 +128,7 @@ Which docker flags pgsc_calc's own containers get: they run as you (`-u` with yo | File | Contents | |---|---| -| `${SAMPLE}_prs_summary.tsv` | `Condition`, `PGS_ID`, `Score_SUM`, `Variants_Matched`, `Variants_Total`, `Matched_Pct`, `Percentile`, `Ancestry_Group`, `ChrX`, `Ambiguous`, `Applies_To`, `Sex_Check`, `Evaluated_In`, `Effect`, `Input`. `Evaluated_In` and `Effect` are written when the score list names evaluations, as the shipped one does | +| `${SAMPLE}_prs_summary.tsv` | `Condition`, `PGS_ID`, `Score_SUM`, `Variants_Matched`, `Variants_Total`, `Matched_Pct`, `Percentile`, `Ancestry_Group`, `ChrX`, `Ambiguous`, `Applies_To`, `Sex_Check`, `Evaluated_In`, `Effect`, `Percentile_Note`, `Input`. `Evaluated_In` and `Effect` are written when the score list names evaluations, as the shipped one does. Step 25 and `PRS_SUMMARY` always write `Percentile_Note` | | `${SAMPLE}_prs_summary..tsv` | The same table under the time it was written, one per run, so a rerun keeps the earlier ones | | `pgsc_calc./` | Step 25 only: the previous run's `pgsc_calc/` folder, moved aside by the rerun | | `pgsc_calc/target.vcf.gz` | The genotypes pgsc_calc scored: the score (and panel) positions, from the gVCF or the VCF | @@ -187,7 +187,7 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Variants_Matched**: score variants pgsc_calc matched in your genotypes. `NA` when every score fell under pgsc_calc's 75% match rate: pgsc_calc then stops and publishes no match counts, and `Matched_Pct` is the rate its log gave. - **Variants_Total**: variants of the scoring file with a GRCh38 position on the autosomes, plus chrX when the sex was given. Strand-ambiguous rows count unless a failed strand check left them out. - **Matched_Pct**: `Variants_Matched / Variants_Total` as a percentage; the step warns below 50%, and pgsc_calc gives no sum below 75%. -- **Percentile**: with the panel, where your score falls among the reference samples of `Ancestry_Group` (pgsc_calc's empirical percentile, `percentile_MostSimilarPop`). `NA` without the panel, and `NA` for a score that does not apply to the declared sex. +- **Percentile**: with the panel, where your score falls among the reference samples of `Ancestry_Group` (pgsc_calc's empirical percentile, `percentile_MostSimilarPop`). `NA` without the panel, `NA` for a score that does not apply to the declared sex, and `NA` when the input lists variants only (see `Percentile_Note`). - **Ancestry_Group**: the panel population whose genetic ancestry is most similar to yours (for the 1000 Genomes panel: AFR, AMR, EAS, EUR or SAS). `NA` without the panel. - **ChrX**: the score's rows on chrX: `8 scored` with the sex, `8 left out` without it, `0` when it has none. With the panel, `8 left out (not matched in the panel run)` when pgsc_calc matched none of them and `5 scored, 3 left out (not matched in the panel run)` when it matched some, see [chrX and the sex](#chrx-and-the-sex). - **Ambiguous**: the score's strand-ambiguous rows (A/T and C/G) and what happened to them: `11 dropped` by default, `11 kept` with `PRS_KEEP_AMBIGUOUS=true`, `11 dropped, strand check failed` when the score's other rows did not agree with the reference. `0` when it has none. @@ -195,7 +195,8 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Sex_Check**: for those scores, `applies`, `not applicable to the declared sex` or `no sex declared`; empty for the rest. - **Evaluated_In**: the groups the score has an evaluation for in the score list (`EUR;AFR;AMR`), empty when it has none. - **Effect**: the OR or HR of the evaluation in `Ancestry_Group`, with the group and the PPM id (`HR 1.53 (EUR, PPM000591)`). Empty without the panel, when the score has no percentile or was not evaluated in your group, and for a score that does not apply to the declared sex. -- **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the variant-only VCF was there. +- **Percentile_Note**: `percentile withheld: the input lists variants only` when the panel gave a percentile and the genotypes pgsc_calc scored hold no reference calls (see [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf)); empty otherwise. +- **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the VCF was there. The percentile does not depend on it: a chip VCF is `vcf` and keeps its percentile. Both reports show the percentile with its group, or one line saying "Raw score only" when no panel was used. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. @@ -224,12 +225,14 @@ The check says the score was reported on the forward strand; it does not prove e The VCF from step 3 lists only sites where you differ from the reference. A scoring variant whose effect allele is the reference allele is missing from that VCF when you carry two copies of it, and adds nothing to your sum. Step 3 also writes a gVCF, which records where you match the reference, and step 25 reads those sites from it as 0/0. With the gVCF, a site is missing when it was not covered or its record is filtered (FILTER other than `PASS` or `.`, such as LowQual or RefCall). -Without a gVCF (`Input` is `vcf`, a sample called by an older version), the sum misses the weight of every reference-allele effect allele you carry on two copies, and few scores reach pgsc_calc's 75% match rate. The step then prints: +Without a gVCF (`Input` is `vcf`, a sample called by an older version), the sum misses the weight of every reference-allele effect allele you carry on two copies, and few scores reach pgsc_calc's 75% match rate. pgsc_calc reads each missing site as the reference, so a sum from a variant-only VCF is not comparable with the panel's sums, which come from complete genotypes. Each score then keeps its raw sum and loses its percentile and its effect: `Percentile` is `NA`, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the step prints: ``` -NOTE: hom-ref sites are absent from this VCF, so the score is biased; not comparable to published distributions +NOTE: hom-ref sites are absent from this input (0 of N genotyped positions are reference calls), so a missing site reads as the reference and the sums are biased; not comparable to published distributions, and no percentile is given ``` +The decision reads the genotypes pgsc_calc scored (`pgsc_calc/target.vcf.gz`; in Nextflow the output of `PRS_SCORE_SITES`), not the kind of input: the input lists reference calls when at least one in five of its genotyped positions is 0/0, the rule step 26b applies to the panel's sites. Genotypes from a gVCF pass it. So does a chip VCF from `scripts/chip-to-vcf.sh`, which lists every probe it read, reference calls included, so chip data keeps its percentiles. A variant-only VCF lists no 0/0 and fails it, and so does a gVCF without reference blocks at the positions. + Call the sample again with step 3 to get the gVCF. Imputation (step 14) is not needed for a score from a gVCF: it adds phasing, which the scores do not use, and a percentile needs the ancestry panel, not imputed sites. ### What these scores are NOT diff --git a/docs/results/ancestry-and-lineage.md b/docs/results/ancestry-and-lineage.md index b4786ef5d..73c92ef8c 100644 --- a/docs/results/ancestry-and-lineage.md +++ b/docs/results/ancestry-and-lineage.md @@ -101,4 +101,4 @@ Closeness on the PCA is genetic similarity, not descent: being near an ancient g With the ancestry panel installed (`scripts/setup.sh --ancestry-panel`), each score has a **Percentile** and an **Ancestry_Group**: the 80th percentile means your score is higher than 80% of the reference samples whose genetic ancestry is most similar to yours (step 26 names that group). A percentile is still not a probability: most people at a high percentile never get the condition, and lifestyle and family history often weigh more. Percentiles of different conditions are not comparable either. -Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When `Input` is `vcf` (no gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#interpreting-results) explains why). When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. +Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When the input lists variants only (a VCF without its gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#hom-ref-sites-come-from-the-gvcf) explains why). Each score then keeps its raw sum but gets no percentile, and `Percentile_Note` says `percentile withheld: the input lists variants only`. A chip VCF lists its reference calls and keeps its percentiles. When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. From 5ddb18a14f2e14b164f5b491890e4938a933590d Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 10:41:02 +0100 Subject: [PATCH 005/110] fix(prs): say a missing site adds nothing, and drop the panel line when no percentile is left pgsc_calc drops a score position the genotypes leave out, so it adds nothing to the sum; it does not read it as the reference. The NOTE, the doc comments, docs/25-prs.md and the CHANGELOG now say so. Step 25's closing banner said the percentile compares the score with the reference samples even when every percentile was withheld. It now says that only when a row has a numeric Percentile. docs/25-prs.md now says the reports still print the Raw score only line when every percentile was withheld, and where the reason is. --- CHANGELOG.md | 2 +- docs/25-prs.md | 6 +++--- rust/crates/og-summary/src/prs.rs | 23 +++++++++++++---------- rust/crates/og-summary/src/prs/tests.rs | 2 +- scripts/25-prs.sh | 9 +++++++-- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04c13e1c9..de13484b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- Step 25 and the Nextflow `PRS_SUMMARY` withhold a score's percentile when the genotypes pgsc_calc scored list variants only. pgsc_calc reads every site such a VCF leaves out as the reference, so the sum leans away from the panel's sums, which come from complete genotypes, and the percentile was not comparable. Each score keeps its raw sum. Its `Percentile` is `NA`, its `Effect` is empty, and a new column before `Input`, `Percentile_Note`, says `percentile withheld: the input lists variants only`. The decision reads the genotypes, not the kind of input: at least one genotyped position in five must be a reference call (0/0), the rule step 26b applies to the panel's sites. Genotypes from a gVCF and chip VCFs from `scripts/chip-to-vcf.sh`, which list their reference calls, keep their percentiles. `og prs table` takes the genotypes with a new option, `--target VCF`, and prints the NOTE that step 25 printed before; the NOTE now follows the genotypes too, so a gVCF without reference blocks at the score positions gets it. `og summary collect` passes the note on as `percentile_note`. The output gains one column; no column, option or file name changes. +- Step 25 and the Nextflow `PRS_SUMMARY` withhold a score's percentile when the genotypes pgsc_calc scored list variants only. Every site such a VCF leaves out adds nothing to the sum, so the sum leans away from the panel's sums, which come from complete genotypes, and the percentile was not comparable. Each score keeps its raw sum. Its `Percentile` is `NA`, its `Effect` is empty, and a new column before `Input`, `Percentile_Note`, says `percentile withheld: the input lists variants only`. The decision reads the genotypes, not the kind of input: at least one genotyped position in five must be a reference call (0/0), the rule step 26b applies to the panel's sites. Genotypes from a gVCF and chip VCFs from `scripts/chip-to-vcf.sh`, which list their reference calls, keep their percentiles. `og prs table` takes the genotypes with a new option, `--target VCF`, and prints the NOTE that step 25 printed before; the NOTE now follows the genotypes too, so a gVCF without reference blocks at the score positions gets it. `og summary collect` passes the note on as `percentile_note`. The output gains one column; no column, option or file name changes. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/docs/25-prs.md b/docs/25-prs.md index 1bcc6a648..90d8a96e4 100644 --- a/docs/25-prs.md +++ b/docs/25-prs.md @@ -198,7 +198,7 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Percentile_Note**: `percentile withheld: the input lists variants only` when the panel gave a percentile and the genotypes pgsc_calc scored hold no reference calls (see [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf)); empty otherwise. - **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the VCF was there. The percentile does not depend on it: a chip VCF is `vcf` and keeps its percentile. -Both reports show the percentile with its group, or one line saying "Raw score only" when no panel was used. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. +Both reports show the percentile with its group, or one line saying "Raw score only" when no score has a percentile. That happens when no panel was used, and also when every percentile was withheld for a variant-only input: the reports do not yet tell these two apart, so read `Percentile_Note` in the summary table (and `percentile_note` in `summary.json`) for the reason. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. A raw `Score_SUM` from a run with the panel is not comparable with one from a run without it: with the panel pgsc_calc scores only the variants the panel has too. Compare percentiles, which only a panel run gives. @@ -225,10 +225,10 @@ The check says the score was reported on the forward strand; it does not prove e The VCF from step 3 lists only sites where you differ from the reference. A scoring variant whose effect allele is the reference allele is missing from that VCF when you carry two copies of it, and adds nothing to your sum. Step 3 also writes a gVCF, which records where you match the reference, and step 25 reads those sites from it as 0/0. With the gVCF, a site is missing when it was not covered or its record is filtered (FILTER other than `PASS` or `.`, such as LowQual or RefCall). -Without a gVCF (`Input` is `vcf`, a sample called by an older version), the sum misses the weight of every reference-allele effect allele you carry on two copies, and few scores reach pgsc_calc's 75% match rate. pgsc_calc reads each missing site as the reference, so a sum from a variant-only VCF is not comparable with the panel's sums, which come from complete genotypes. Each score then keeps its raw sum and loses its percentile and its effect: `Percentile` is `NA`, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the step prints: +Without a gVCF (`Input` is `vcf`, a sample called by an older version), the sum misses the weight of every reference-allele effect allele you carry on two copies, and few scores reach pgsc_calc's 75% match rate. A missing site adds nothing to the sum, so a sum from a variant-only VCF is not comparable with the panel's sums, which come from complete genotypes. Each score then keeps its raw sum and loses its percentile and its effect: `Percentile` is `NA`, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the step prints: ``` -NOTE: hom-ref sites are absent from this input (0 of N genotyped positions are reference calls), so a missing site reads as the reference and the sums are biased; not comparable to published distributions, and no percentile is given +NOTE: hom-ref sites are absent from this input (0 of N genotyped positions are reference calls), so a missing site adds nothing to the sum and the sums are biased; not comparable to published distributions, and no percentile is given ``` The decision reads the genotypes pgsc_calc scored (`pgsc_calc/target.vcf.gz`; in Nextflow the output of `PRS_SCORE_SITES`), not the kind of input: the input lists reference calls when at least one in five of its genotyped positions is 0/0, the rule step 26b applies to the panel's sites. Genotypes from a gVCF pass it. So does a chip VCF from `scripts/chip-to-vcf.sh`, which lists every probe it read, reference calls included, so chip data keeps its percentiles. A variant-only VCF lists no 0/0 and fails it, and so does a gVCF without reference blocks at the positions. diff --git a/rust/crates/og-summary/src/prs.rs b/rust/crates/og-summary/src/prs.rs index f882f6c62..59ab16d3a 100644 --- a/rust/crates/og-summary/src/prs.rs +++ b/rust/crates/og-summary/src/prs.rs @@ -18,7 +18,7 @@ //! errors. //! - A score matched against genotypes that list variants only loses its //! percentile (see [`Genotypes`]): every site such an input leaves out -//! reads as the reference, so the sum leans away from the panel's sums. +//! adds nothing to the sum, so the sum leans away from the panel's sums. //! //! The table's columns are [`COLUMNS`], with [`EFFECT_COLUMNS`] before //! `Input` when any score has evaluations, and [`NOTE_COLUMN`] before @@ -121,14 +121,17 @@ pub type TableRow = [String; 16]; /// The called genotypes of the file pgsc_calc scored (the score positions, /// and with a panel the panel's), and how many of them are reference calls. /// -/// pgsc_calc reads a position the file leaves out as the reference allele -/// on both copies. That is true only when the file lists reference calls: -/// genotypes from a gVCF, or a chip VCF (scripts/chip-to-vcf.sh writes every -/// probe). A variant-only VCF lists none, so each of its missing sites may -/// be a variant it never called, and its percentile would sit among the -/// panel's complete genotypes as if it were one of them. The evidence is in -/// the genotypes themselves, never in the input's name: a gVCF with no -/// reference blocks over the sites is as blind as a variant-only VCF. +/// pgsc_calc drops a position the file leaves out from the score, so it adds +/// nothing to the sum, as if no effect allele were there. When the file +/// lists reference calls (genotypes from a gVCF, or a chip VCF: +/// scripts/chip-to-vcf.sh writes every probe), a missing position is one +/// that was not read, and the sum stays comparable. A variant-only VCF lists +/// none, so every site where the sample matches the reference is missing, +/// and a reference effect allele carried there adds nothing: its percentile +/// would sit among the panel's complete genotypes as if it were one of them. +/// The evidence is in the genotypes themselves, never in the input's name: a +/// gVCF with no reference blocks over the sites is as blind as a variant-only +/// VCF. #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub struct Genotypes { /// Records with a genotype whose every allele is called. @@ -768,7 +771,7 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { writeln!( out, "NOTE: hom-ref sites are absent from this input ({} of {} genotyped positions are \ - reference calls), so a missing site reads as the reference and the sums are \ + reference calls), so a missing site adds nothing to the sum and the sums are \ biased; not comparable to published distributions, and no percentile is given", g.hom_ref, g.called ) diff --git a/rust/crates/og-summary/src/prs/tests.rs b/rust/crates/og-summary/src/prs/tests.rs index 5bf77eb07..3fe71cb0e 100644 --- a/rust/crates/og-summary/src/prs/tests.rs +++ b/rust/crates/og-summary/src/prs/tests.rs @@ -505,7 +505,7 @@ fn a_variant_only_input_keeps_its_sum_and_loses_its_percentile() { assert!( stdout.ends_with( "NOTE: hom-ref sites are absent from this input (0 of 4 genotyped positions are \ - reference calls), so a missing site reads as the reference and the sums are \ + reference calls), so a missing site adds nothing to the sum and the sums are \ biased; not comparable to published distributions, and no percentile is given\n" ), "{stdout}" diff --git a/scripts/25-prs.sh b/scripts/25-prs.sh index 612368cd5..856f9e3f3 100755 --- a/scripts/25-prs.sh +++ b/scripts/25-prs.sh @@ -17,7 +17,7 @@ # 0/0 instead of a missing site. Without it, only your variant sites are # scored and the summary's Input column says vcf. # -# pgsc_calc reads a site the genotypes leave out as the reference. When under +# A site the genotypes leave out adds nothing to a score's sum. When under # one in five of the genotyped positions is a reference call (0/0), the input # lists variants only: each score keeps its raw sum, its percentile is # withheld (Percentile_Note), and the step prints a NOTE. A chip VCF from @@ -439,9 +439,14 @@ echo "============================================" echo "" echo "IMPORTANT: a polygenic score is NOT diagnostic. It estimates relative genetic" echo "predisposition; lifestyle, environment and other genes are not captured." -if $USE_PANEL; then +if $USE_PANEL && awk -F'\t' 'NR == 1 {for (i = 1; i <= NF; i++) c[$i] = i; next} + c["Percentile"] && $c["Percentile"] != "NA" {found = 1} END {exit !found}' "$RESULTS_FILE"; then echo "The percentile compares your score with the reference samples whose genetic" echo "ancestry is most similar to yours. See docs/25-prs.md." +elif $USE_PANEL; then + echo "No percentile: the ancestry reference panel gave none for these scores (the" + echo "input lists variants only, or no score matched enough variants), so a raw sum" + echo "cannot be compared with anyone. See docs/25-prs.md." else echo "Raw score only: without the ancestry reference panel there is no percentile," echo "and a raw sum cannot be compared with anyone (scripts/setup.sh --ancestry-panel)." From 53d6068802b774606847276eb05f6c7f0ec5041e Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:33:09 +0100 Subject: [PATCH 006/110] fix(prs): say the percentile was withheld, not that no panel was installed When the panel ran but every percentile was withheld for a variant-only input, adjusted is false, and both reports said no ancestry reference panel was installed and told the user to add one. The not-assessed list said no panel was used. Both were false. Both reports (bin/render_report.py and og report render) now print a "Percentile withheld: the input lists variants only" line with the reason when a score carries a percentile_note, and og summary collect writes a not-assessed line that says the percentiles were withheld. A run without the panel keeps its lines. The report-render golden a-prs-raw records the new line: that case's T2D score carries the note. --- CHANGELOG.md | 2 +- bin/render_report.py | 11 + docs/25-prs.md | 2 +- docs/results/ancestry-and-lineage.md | 2 +- rust/crates/og-render/src/sections/prs.rs | 23 + rust/crates/og-render/tests/prs_withheld.rs | 60 ++ rust/crates/og-summary/src/collect/post.rs | 17 +- .../og-summary/src/collect/post/tests.rs | 37 + .../report-render/a-prs-raw/a-prs-raw.html | 738 ++++++++++++++++++ .../report-render/a-prs-raw/a-prs-raw.txt | 337 ++++++++ tests/test_render_report.py | 26 +- 11 files changed, 1249 insertions(+), 6 deletions(-) create mode 100644 rust/crates/og-render/tests/prs_withheld.rs create mode 100644 tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html create mode 100644 tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index de13484b3..adfaf03d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- Step 25 and the Nextflow `PRS_SUMMARY` withhold a score's percentile when the genotypes pgsc_calc scored list variants only. Every site such a VCF leaves out adds nothing to the sum, so the sum leans away from the panel's sums, which come from complete genotypes, and the percentile was not comparable. Each score keeps its raw sum. Its `Percentile` is `NA`, its `Effect` is empty, and a new column before `Input`, `Percentile_Note`, says `percentile withheld: the input lists variants only`. The decision reads the genotypes, not the kind of input: at least one genotyped position in five must be a reference call (0/0), the rule step 26b applies to the panel's sites. Genotypes from a gVCF and chip VCFs from `scripts/chip-to-vcf.sh`, which list their reference calls, keep their percentiles. `og prs table` takes the genotypes with a new option, `--target VCF`, and prints the NOTE that step 25 printed before; the NOTE now follows the genotypes too, so a gVCF without reference blocks at the score positions gets it. `og summary collect` passes the note on as `percentile_note`. The output gains one column; no column, option or file name changes. +- Step 25 and the Nextflow `PRS_SUMMARY` withhold a score's percentile when the genotypes pgsc_calc scored list variants only. Every site such a VCF leaves out adds nothing to the sum, so the sum leans away from the panel's sums, which come from complete genotypes, and the percentile was not comparable. Each score keeps its raw sum. Its `Percentile` is `NA`, its `Effect` is empty, and a new column before `Input`, `Percentile_Note`, says `percentile withheld: the input lists variants only`. The decision reads the genotypes, not the kind of input: at least one genotyped position in five must be a reference call (0/0), the rule step 26b applies to the panel's sites. Genotypes from a gVCF and chip VCFs from `scripts/chip-to-vcf.sh`, which list their reference calls, keep their percentiles. `og prs table` takes the genotypes with a new option, `--target VCF`, and prints the NOTE that step 25 printed before; the NOTE now follows the genotypes too, so a gVCF without reference blocks at the score positions gets it. `og summary collect` passes the note on as `percentile_note`. When every percentile was withheld, both reports say "Percentile withheld: the input lists variants only" and why, and the summary's `not_assessed` list says the percentiles were withheld, in place of the lines for a run without the panel, which told the user to install a panel the run had used. The output gains one column; no column, option or file name changes. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/bin/render_report.py b/bin/render_report.py index 9f73b1b41..4363fc8eb 100755 --- a/bin/render_report.py +++ b/bin/render_report.py @@ -571,6 +571,15 @@ def prs_sex_note(d): "Give the sex to mark a score of the other sex not applicable (docs/25-prs.md).") +# The start of the line under the scores when every percentile was withheld +# for an input that lists variants only (the scores' percentile_note): the +# panel ran, so the no-panel line would be false. +PRS_WITHHELD_TEXT = ("Percentile withheld: the input lists variants only, so each scoring site it leaves out adds " + "nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, " + "whose genotypes are complete. A gVCF from step 3, or a chip VCF, lists the reference calls " + "and keeps the percentile.") + + def prs_note(d): """The line under the PRS scores, in both reports: what the numbers can be compared with.""" x = prs_chrx_note(d) + prs_sex_note(d) @@ -583,6 +592,8 @@ def prs_note(d): return (f"Percentile: where the score falls among the {group or 'most similar'} samples{panel}, " f"the group whose genetic ancestry is most similar to this sample's (pgsc_calc).{low} " f"A percentile is not a risk.{eff} {PRS_ANCESTRY_NOTE} See docs/25-prs.md." + x) + if any(r.get("percentile_note") for r in d.get("scores", [])): + return f"{PRS_WITHHELD_TEXT} {PRS_ANCESTRY_NOTE} See docs/25-prs.md." + x return ("Raw score only: no ancestry reference panel was installed, so there is no percentile and the sum " f"cannot be compared with anyone (scripts/setup.sh --ancestry-panel adds it). {PRS_ANCESTRY_NOTE} " "See docs/25-prs.md." + x) diff --git a/docs/25-prs.md b/docs/25-prs.md index 90d8a96e4..169fd6224 100644 --- a/docs/25-prs.md +++ b/docs/25-prs.md @@ -198,7 +198,7 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Percentile_Note**: `percentile withheld: the input lists variants only` when the panel gave a percentile and the genotypes pgsc_calc scored hold no reference calls (see [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf)); empty otherwise. - **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the VCF was there. The percentile does not depend on it: a chip VCF is `vcf` and keeps its percentile. -Both reports show the percentile with its group, or one line saying "Raw score only" when no score has a percentile. That happens when no panel was used, and also when every percentile was withheld for a variant-only input: the reports do not yet tell these two apart, so read `Percentile_Note` in the summary table (and `percentile_note` in `summary.json`) for the reason. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. +Both reports show the percentile with its group. When no panel was used, they show one line saying "Raw score only" instead, and the "Not assessed" list says that no ancestry reference panel was used. When the panel ran but every percentile was withheld for a variant-only input (see `Percentile_Note`), the line says "Percentile withheld: the input lists variants only" and why, and the "Not assessed" list says the percentiles were withheld; neither says that no panel was installed. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. A raw `Score_SUM` from a run with the panel is not comparable with one from a run without it: with the panel pgsc_calc scores only the variants the panel has too. Compare percentiles, which only a panel run gives. diff --git a/docs/results/ancestry-and-lineage.md b/docs/results/ancestry-and-lineage.md index 73c92ef8c..6fa59b785 100644 --- a/docs/results/ancestry-and-lineage.md +++ b/docs/results/ancestry-and-lineage.md @@ -101,4 +101,4 @@ Closeness on the PCA is genetic similarity, not descent: being near an ancient g With the ancestry panel installed (`scripts/setup.sh --ancestry-panel`), each score has a **Percentile** and an **Ancestry_Group**: the 80th percentile means your score is higher than 80% of the reference samples whose genetic ancestry is most similar to yours (step 26 names that group). A percentile is still not a probability: most people at a high percentile never get the condition, and lifestyle and family history often weigh more. Percentiles of different conditions are not comparable either. -Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When the input lists variants only (a VCF without its gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#hom-ref-sites-come-from-the-gvcf) explains why). Each score then keeps its raw sum but gets no percentile, and `Percentile_Note` says `percentile withheld: the input lists variants only`. A chip VCF lists its reference calls and keeps its percentiles. When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. +Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When the input lists variants only (a VCF without its gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#hom-ref-sites-come-from-the-gvcf) explains why). Each score then keeps its raw sum but gets no percentile, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the report says "Percentile withheld" in place of "Raw score only". A chip VCF lists its reference calls and keeps its percentiles. When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. diff --git a/rust/crates/og-render/src/sections/prs.rs b/rust/crates/og-render/src/sections/prs.rs index 7ac93adc1..e7646f62e 100644 --- a/rust/crates/og-render/src/sections/prs.rs +++ b/rust/crates/og-render/src/sections/prs.rs @@ -28,6 +28,14 @@ pub const EFFECT_TEXT: &str = "Effect: the odds ratio (OR) or hazard ratio (HR) evaluation's unit (its PGS Catalog PPM page says which). It describes the score in that \ group, not your own risk, and is shown only for a group the score was evaluated in."; +/// The start of the line under the scores when every percentile was +/// withheld for an input that lists variants only (og summary collect's +/// `percentile_note`): the panel ran, so the no-panel line would be false. +pub const WITHHELD_TEXT: &str = "Percentile withheld: the input lists variants only, so each \ + scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with \ + the reference panel's samples, whose genotypes are complete. A gVCF from step 3, or a chip \ + VCF, lists the reference calls and keeps the percentile."; + /// What a score, matched or total cell says when the summary has none: og /// summary collect writes null for a short row of pgsc_calc's table. pub const NOT_AVAILABLE: &str = "not available"; @@ -162,6 +170,16 @@ fn sex_note(rs: &[Value]) -> Result { )) } +/// Whether a score's percentile was withheld (its `percentile_note`). +fn withheld(rs: &[Value]) -> Result { + for r in rs { + if on(r, "percentile_note")?.is_some() { + return Ok(true); + } + } + Ok(false) +} + /// Whether the summary's table names evaluations (its Evaluated_In column). fn names_evaluations(rs: &[Value]) -> Result { for r in rs { @@ -178,6 +196,11 @@ pub fn note(d: &Value) -> Result { let rs = scores(d)?; let tail = chrx_note(&rs)? + &sex_note(&rs)?; if !get(d, "adjusted", PATH)?.is_some_and(truthy) { + if withheld(&rs)? { + return Ok(format!( + "{WITHHELD_TEXT} {PRS_ANCESTRY_NOTE} See docs/25-prs.md.{tail}" + )); + } return Ok(format!( "Raw score only: no ancestry reference panel was installed, so there is no percentile \ and the sum cannot be compared with anyone (scripts/setup.sh --ancestry-panel adds \ diff --git a/rust/crates/og-render/tests/prs_withheld.rs b/rust/crates/og-render/tests/prs_withheld.rs new file mode 100644 index 000000000..ac3b16d5d --- /dev/null +++ b/rust/crates/og-render/tests/prs_withheld.rs @@ -0,0 +1,60 @@ +//! A run with the ancestry panel whose input lists variants only: og prs +//! table withholds every percentile and says why in `percentile_note`, so +//! the summary has no percentile and `adjusted` is false. Both reports must +//! say the percentile was withheld, not that no panel was installed. A run +//! without the panel (no note on any score) keeps the no-panel line. + +use std::path::Path; + +use og_render::model::Summary; +use og_render::{html, text}; + +const WITHHELD: &str = "Percentile withheld: the input lists variants only"; +const NO_PANEL: &str = "no ancestry reference panel was installed"; + +/// The golden summary with every percentile gone and `adjusted` false; its +/// T2D score keeps its note when `note` is set. +fn raw(note: bool) -> Summary { + let p = Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../../tests/parity/golden/summary-collect/all/all.json"); + let mut j = std::fs::read_to_string(p).unwrap(); + for (from, to) in [ + ("\"adjusted\": true", "\"adjusted\": false"), + ("\"percentile\": \"75\"", "\"percentile\": \"\""), + ] { + assert_eq!(j.matches(from).count(), 1, "{from}"); + j = j.replace(from, to); + } + if !note { + let from = "\"percentile_note\": \"percentile withheld: the input lists variants only\""; + assert_eq!(j.matches(from).count(), 1); + j = j.replace(from, "\"percentile_note\": \"\""); + } + Summary::parse(&j).unwrap() +} + +#[test] +fn a_withheld_percentile_is_not_called_a_missing_panel() { + let s = raw(true); + let txt = text::report(&s).unwrap(); + let page = html::report(&s).unwrap(); + for r in [&txt, &page] { + assert!(r.contains(WITHHELD), "{r}"); + assert!(!r.contains(NO_PANEL), "{r}"); + assert!( + !r.contains("scripts/setup.sh --ancestry-panel adds it"), + "{r}" + ); + } +} + +#[test] +fn no_note_keeps_the_no_panel_line() { + let s = raw(false); + let txt = text::report(&s).unwrap(); + let page = html::report(&s).unwrap(); + for r in [&txt, &page] { + assert!(r.contains(&format!("Raw score only: {NO_PANEL}")), "{r}"); + assert!(!r.contains(WITHHELD), "{r}"); + } +} diff --git a/rust/crates/og-summary/src/collect/post.rs b/rust/crates/og-summary/src/collect/post.rs index 305bc87ac..81623a7f4 100644 --- a/rust/crates/og-summary/src/collect/post.rs +++ b/rust/crates/og-summary/src/collect/post.rs @@ -101,6 +101,11 @@ const NOT_ASSESSED: [&str; 5] = [ const PRS_NOT_ADJUSTED: &str = "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums"; +/// Added in its place when the panel ran but every percentile was withheld, +/// because the input lists variants only (a score's `percentile_note`). +const PRS_WITHHELD: &str = "Polygenic score percentiles: the input lists variants only, so the \ +percentiles were withheld and the scores are raw sums"; + /// Added unless step 35's depth count (short reads) or step 35b /// (Paraphase, PacBio HiFi, both genes) made a call. const HBA_NOT_ASSESSED: &str = "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count \ @@ -262,7 +267,17 @@ fn not_assessed(sections: &[Section]) -> Vec<&'static str> { }; let mut out = NOT_ASSESSED.to_vec(); if !field("prs", "adjusted").is_some_and(truthy) { - out.push(PRS_NOT_ADJUSTED); + let withheld = match field("prs", "scores") { + Some(Value::Array(rows)) => rows + .iter() + .any(|r| at(Some(r), "percentile_note").is_some_and(truthy)), + _ => false, + }; + out.push(if withheld { + PRS_WITHHELD + } else { + PRS_NOT_ADJUSTED + }); } // Step 35b on a region subset (--paraphase_regions) may leave hba out. let hba_genes: Vec<&str> = match field("paralogs", "genes") { diff --git a/rust/crates/og-summary/src/collect/post/tests.rs b/rust/crates/og-summary/src/collect/post/tests.rs index 34d18cc61..aa0d6f7b5 100644 --- a/rust/crates/og-summary/src/collect/post/tests.rs +++ b/rust/crates/og-summary/src/collect/post/tests.rs @@ -114,6 +114,43 @@ fn an_empty_folder_lists_every_step_and_every_line() { assert_eq!(lines, expected); } +/// Step 25's table on a run with the panel: `note` is each score's +/// Percentile_Note, and no score has a percentile. +fn raw_prs(d: &Dir, notes: [&str; 2]) { + d.put( + "S/prs/S_prs_summary.tsv", + format!( + "Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tMatched_Pct\t\ + Percentile\tAncestry_Group\tChrX\tAmbiguous\tApplies_To\tSex_Check\t\ + Percentile_Note\tInput\n\ + CAD\tPGS000018\t0.5\t100\t120\t83.3\tNA\tEUR\t0\t0\t\t\t{}\tvcf\n\ + T2D\tPGS000014\t0.1\t90\t100\t90.0\tNA\tEUR\t0\t0\t\t\t{}\tvcf\n", + notes[0], notes[1] + ), + ); +} + +#[test] +fn withheld_percentiles_are_not_called_a_missing_panel() { + let w = "percentile withheld: the input lists variants only"; + let d = Dir::new("post-prs-withheld"); + raw_prs(&d, [w, w]); + let v = summary(&d); + assert!(matches!( + at(&v, &["sections", "prs", "data", "adjusted"]), + Value::Bool(false) + )); + let lines = texts(at(&v, &["not_assessed"])); + assert!(lines.contains(&PRS_WITHHELD.to_owned()), "{lines:?}"); + assert!(!lines.contains(&PRS_NOT_ADJUSTED.to_owned()), "{lines:?}"); + // No note on any score: the panel was not used, the line says so. + let d = Dir::new("post-prs-no-panel"); + raw_prs(&d, ["", ""]); + let lines = texts(at(&summary(&d), &["not_assessed"])); + assert!(lines.contains(&PRS_NOT_ADJUSTED.to_owned()), "{lines:?}"); + assert!(!lines.contains(&PRS_WITHHELD.to_owned()), "{lines:?}"); +} + #[test] fn a_failed_step_says_so_under_not_run() { let d = Dir::new("post-failed"); diff --git a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html new file mode 100644 index 000000000..9a47425a9 --- /dev/null +++ b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html @@ -0,0 +1,738 @@ + + + + + + +OwnGenome Report + + + +
+ +
+
+

Genomic Analysis Report

+
+ Sample: S  |  Generated: 2026-11-19 10:29 UTC +
+
+ Pipeline commit: unknown  |  ClinVar file: unknown  |  ClinVar in CPSR's bundle: unknown  |  HLA database: unknown +
+
+ +
+

Quality

+

Can I trust this data?

+
+
+
+

Quality Control

+

Steps 16b, 16, 33, 02 · Not run · link to this section

+

Mean depth is an average over the genome: some genes get far fewer reads, and the gene callability card lists those. The sex, identity and contamination checks catch a swapped or mixed sample, not every lab error.

+
Mean depthnot available
+
Inferred sex (indexcov)not available
+
Declared sexnot declared
+
Identity and contamination (step 33)Not run
+
+
+
+
+

Variant Calling

+

Step 03 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Counts of the calls DeepVariant made against the reference. A whole genome usually holds 4 to 5 million, most of them common. PASS calls passed the caller's filter; a count says nothing about health on its own.

+
Total variants1
+
PASS variants1
+
SNPs0
+
Indels1
+
+
+
+
+
+

Clinical

+

Is there anything to take to a doctor?

+
+
+
+

ClinVar Screening

+

Step 06 · Not run · link to this section

+
StatusNot run
+
+
+
+
+

Clinical Variant Filter

+

Step 23 · Not run · link to this section

+
StatusNot run
+
+
+
+
+

Cancer Predisposition

+

Step 17 · Not run · link to this section

+
StatusNot run
+
+
+
+
+

Variant Prioritization (slivar)

+

Step 31 · Not run · link to this section

+
StatusNot run
+
+
+
+
+

Symptom-Driven Ranking (Exomiser)

+

Step 48 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

A ranking to bring to a clinical geneticist, not a diagnosis: a high score means a rare, likely damaging variant in a gene linked to symptoms like these, not that it causes them, and an empty or low list does not rule a genetic cause out. Coding and splice variants only (docs/48-exomiser.md).

+
Symptoms searchedSeizure (HP:0001250), HP:0000001
+ + + + + +
RankGeneInheritanceScoreSymptom matchVariantACMG (Exomiser)Linked diseaseViewer
1GENE1AD0.90.8chr1-1-A-G 0/1
missense p.X
LPD1
chr1-2-A-G 0/1
stop p.Y
PD1
2GENE2AR0.50.4chr2-1-A-G 1/1
splice c.1
VUSD2
+

The Viewer column opens the reads at each row in the genome viewer on this computer (start it first: scripts/owngenome-view.sh <sample>, docs/viewer.md).

+

Exomiser's own report: exomiser/S_exomiser.html

+
+

Files of this step, beside this report: Exomiser ranking table

+
+
+
+

Mobile Element Insertions

+

Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Every call: mei/<sample>_mei.tsv.

+
Insertions called3 (ALU 2, L1 1)
+
GeneElementConditionInheritanceStatusDepthCall
FKTNSVAFukuyamaARcallable30not seen
TAF1SVAXDPXLnot callable2.
+
+
+
+
+

Repeat Expansions

+

Step 09 · Failed · link to this section

+
could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/str_intermediate_ranges.tsv'
+
StatusUnreadable
+
+
+
+
+

MUC1 VNTR Frameshifts (VNtyper)

+

Step 52 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

The MUC1 repeat is long and GC-rich, and short reads cover it unevenly. VNtyper looks only for known frameshifts in it: a negative result lowers the chance of those and does not rule out ADTKD-MUC1, and a positive one needs a clinical test (SNaPshot for dupC) to confirm it.

+
Resultnegative
+

Result: negative

+

.

+

VNtyper's coverage check: .

+

.

+

none

+
+
+
+
+

Mitochondrial Analysis

+

Step 20 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Length heteroplasmy in the D-loop poly-C tracts is found in most people and is usually technical; it is listed here and not counted as heteroplasmy.

+

A single large mtDNA deletion is often found in muscle and not in blood (except in Pearson syndrome), so a blood sample with none does not rule one out (docs/20-mtoolbox.md).

+

ClinVar and gnomAD v3.1 (chrM sites) annotate the calls in step 20. MITOMAP (mitomap.org) has the curated disease status of mtDNA variants; it is a manual lookup, as it refuses scripted requests.

+
chrM variants (PASS)7
+
Heteroplasmic (AF 0.05 to 0.95, outside the D-loop poly-C tracts)1
+
Length heteroplasmy in the D-loop poly-C tracts2
+

chrM:302 A>AC,ACC AF 0.3

+

chrM:16189 T>C AF 0.5

+
ClinVar pathogenic or likely pathogenic1
+
VariantAFClinVarReviewConditiongnomAD AF homgnomAD AF hetPoly-C tractViewer
chrM:3243 A>G0.40PathogeniccriteriaMELAS00chrM:3243
chrM:302 A>AC0.3.....yeschrM:302
chrM:500 C>T0.99Uncertain_significance....chrM:500
+

The Viewer column opens the reads at each row in the genome viewer on this computer (start it first: scripts/owngenome-view.sh <sample>, docs/viewer.md).

+

ClinVar 2026-10-01; gnomAD not annotated: no file

+
Confirmed disease variants3
+

m.3243A>G (MT-TL1) AF 0.40 filter PASS MELAS (mitochondrial encephalomyopathy, lactic acidosis and stroke-like episodes); maternally inherited diabetes and deafness; ClinVar 9589; PMID 2102678. Usually heteroplasmic; the level differs between tissues and is often lower in blood than in muscle or urine.

+

m.8344A>G (MT-TK) AF 0.30 filter weak_evidence MERRF (myoclonic epilepsy with ragged-red fibres); ClinVar 9579; PMID 2112427. Usually heteroplasmic; the level differs between tissues.

+

m.11778G>A (MT-ND4) AF 0.99 filter PASS Leber hereditary optic neuropathy (LHON); ClinVar 9708; PMID 3201231. Usually homoplasmic; not everyone who carries it loses vision.

+
Large deletions (eKLIPse)3
+
Named in the confirmed list1
+

m.8470_13446del (4977 bp) level 0.5% The common 4977 bp deletion, between two 13 bp direct repeats: Kearns-Sayre syndrome, chronic progressive external ophthalmoplegia (CPEO), Pearson syndrome; ClinVar 430680 (m.8483_13459del); PMID 2711184, 2541333, 20301382

+

m.101_199del (None bp) level 2.5%

+
mtDNA copies per cellnot assessed
+

mtDNA copy number: not assessed (unknown)

+
+
+
+
+

Lp(a): LPA KIV-2 Repeat Count

+

Step 46 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

The KIV-2 repeat count from read depth is a research estimate, not an Lp(a) level: the level is a blood test, and the count explains only part of the difference between people.

+
Genetic sign of high Lp(a)Yes
+

KIV-2 repeats (both chromosomes): 35 (95% interval 30 to 40), low

+

ok

+

KIV-2 4925G>A null allele (rs1484919544): present, 4 of 200 reads carry it

+

.

+

A null allele lowers the Lp(a) made from the copies it sits on; the Lp(a) blood test is the measure.

+

rs10455872: A/G (1 risk allele)

+

rs3798220: T|C (1 risk allele)

+

Genetic signs of a high Lp(a): 2 risk alleles at rs10455872 and rs3798220 and a low KIV-2 repeat count. Measure Lp(a) in blood.

+

.

+
+
+
+
+

Clonal Haematopoiesis (CHIP)

+

Step 49 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Clonal haematopoiesis is common with age and most people with it never get a blood cancer: a call here is not a diagnosis. A call is a change in a CHIP gene's published classes, found by Mutect2 without a matched normal; one at a VAF of 35% or more is left out as possibly inherited. docs/49-chip.md says how to read it.

+
CHIP calls1
+

DNMT3A R882H: VAF 0.05 (3 of 60 reads), .

+

Detection limit: a clone of VAF about 10% or more is found 8 times in 10 at this depth (median 33x over the genes' coding exons). CHIP starts at a VAF of 2%: smaller clones are likely missed, so no call does not rule one out.

+

Too shallow or not on the reference: ASXL1, SRSF2.

+

1 other protein changes listed, not counted: chip/S_chip.tsv.

+
+
+
+
+

Mosaic Chromosomal Alterations (MoChA)

+

Step 51 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Large gains, losses and copy-neutral losses of heterozygosity (CN-LOH) carried by a share of the blood cells, from MoChA on the phased heterozygous sites of chr1 to chr22. In a UK Biobank study they became more common with age and went with a higher risk of a later blood cancer (Loh et al. 2018). That is a population-level association, not a diagnosis; an event is confirmed on a new blood sample. Below the floor nothing is reported, and an event above it can still be missed. Every MoChA call, with the reason it was or was not reported: mosaic/<sample>_mocha.tsv.

+
Calls reported1
+
Cell-fraction floor0.05
+
TypeArmRegionMbCell fractionViewer
Lossqchr20:1-2100.1chr20:1-2
+

The Viewer column opens the reads at each row in the genome viewer on this computer (start it first: scripts/owngenome-view.sh <sample>, docs/viewer.md).

+

Reported at a cell fraction of 0.05 or more at 30x (read-sampling floor ., minimum .; . heterozygous sites on .)

+
+
+
+
+
+

Carrier

+

What could I pass on to a child?

+
+
+
+

Couple Carrier Screen

+

Step 39 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

A screen, not a diagnosis: the couple report (couple_<a>_<b>.md in the family folder) lists the genes, variant types and repeats it does not see. These counts are of its gene table: a carrier deletion allele from read depth (step 35), and a possible shared risk it adds, is in that report only. See a genetic counsellor before acting on a result, or on its absence (docs/39-couple.md).

+

Partner: P2. Genes where both carry a change: 1; X-linked findings: 1; genes where only one partner carries a change: 2

+

Shared: CFTR (Cystic fibrosis): 1 in 4. This sample: c.1521_1523del (P). P2: c.350G>A (LP)

+

X-linked: DMD (Duchenne): 1 in 4 sons. This sample: c.10G>T (P). P2: .

+
+
+
+
+

Paralog Genes (Paraphase)

+

Steps 35b, 35 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Paraphase reads PacBio HiFi reads only. A 'no call' means it saw one haplotype and the depth did not settle one copy or two. A research estimate, not a diagnostic test: confirm a result (for example an HBA deletion or one SMN1 copy) with a clinical laboratory.

+
StatusComplete
+
GeneCopy numberCallDetail
SMN12calledok
SMN22called.
HBA11called.
HBA22called.
PMS22called.
+
SMN1 by both toolsParaphase 2, Parascopy 1 (quality 31, filter PASS): they DISAGREE: check both before using either
+
Other Paraphase regions2 (1 with a call)
+
Variants on phased haplotypes3
+
+
+

SMN1/SMN2 Copy Number (Parascopy)

+

The other loci of step 35's catalog (assets/paralog_loci.tsv): agCN is the copies of the gene and its paralogs together, read only with filter PASS and quality 20 or more; which copy gained or lost one is not said. Not assessed names the reason (most often: no read over the locus).

+

Parascopy reads short reads at SMN1 and SMN2 and at the other loci of its catalog. A quality under 20 or a filter other than PASS leaves a copy unresolved. HBA1 and HBA2, CYP21A2 and the gene-dosage loci have no Parascopy model: step 35 counts them from read depth against flanking sequence (CYP21A2 also from six sites where it differs from its pseudogene CYP21A1P), which cannot say which chromosome lost or gained a copy. The copy-number intervals (ClinGen's recurrent CNV regions, carrier deletion alleles, the AZF regions) are read from depth too. A research estimate, not a diagnostic test: confirm a result with a clinical laboratory (MLPA or qPCR; gap-PCR for alpha-thalassaemia).

+
StatusComplete
+
SMN1 copies1 (quality 31, filter PASS)
+
SMN1 g.27134T>G silent-carrier marker (rs143838139)not seen, 0 of 31 reads carry it, about 0 copies
+
SMN1 marker readingno read carries the G
+
SMN1 marker caveatThe marker raises the chance that two SMN1 copies sit on one chromosome (2+0, a silent carrier); it does not prove 2+0, and a carrier test in a clinical laboratory confirms it.
+
SMN2 copies3 (quality 25, filter PASS)
+
SMN1 and SMN2 together (agCN) at exon 74 (quality 45.5, filter PASS)
+
Readingone SMN1 copy: the pattern of an SMA carrier
+
HBA1 and HBA2 together (alpha-globin genes, from depth). (.; estimate .)
+
CYP21A2 (RCCX module, from depth and six PSV sites). CYP21A2 copies, module total 4 of ., finding none
+
HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
+
LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
+
CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
+
GenesCopies together (agCN)Reading
GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
mytablenot assessed: no read over the locus.
pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
+
Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
+
RegionRowPlaceCopiesChange
AZFcAZFcchrY:23000001-260000000 of 1deletion
dupX1chr1:2-23 of 2duplication
+
+
+
+
+
+

Medicines

+

How might I respond to medicines?

+
+
+
+

Pharmacogenomics

+

Step 07 · Not run · link to this section

+
StatusNot run
+
+
+
+
+

CPIC Drug Recommendations

+

Step 27 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

CPIC recommendations follow the phenotype PharmCAT called. They are guidance for prescribers, not a prescription. A gene that was not called has no recommendation here, and that is not the same as a typical response.

+
StatusComplete
+
Genes with a non-normal phenotype1
+
Genes with more than one possible result0
+
Genes not called0
+
Genes called without a function phenotype (no drug guidance)0
+
TipRecommendations per gene: cpic/S_cpic_recommendations.txt
+
+
+

Genes With a Non-Normal or Unresolved Phenotype (CPIC)

+ + + +
GeneDiplotypePhenotype
UGT1A1*1/*28Intermediate
+

Drugs for each gene: cpic/S_cpic_recommendations.txt

+
+

Files of this step, beside this report: CPIC recommendations per gene (text)

+
+
+
+

CYP2D6 Across Callers

+

Steps 32, 21 · Not run · link to this section

+

CYP2D6 sits beside its look-alike CYP2D7, and short reads often cannot tell them apart, so pypgx, Cyrius and step 36 can disagree or give no call. A disagreement or a missing call means the gene was not read reliably here; a clinical CYP2D6 test settles it.

+
PharmCAT (step 36's call)not run
+
pypgxnot run
+
Cyriusnot run
+
pypgx and Cyrius agreefewer than two usable calls
+
+
+
+
+

HLA Typing

+

Step 08 · Failed · link to this section

+
could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/hla_alleles.tsv'
+
StatusUnreadable
+
+
+
+
+

Locityper Second Opinion at Hard Loci

+

Step 53 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

A second opinion beside the primary caller, never the call itself. Locityper (Prodanov et al. 2025, Nat Genet, PMID 41107551) picks the two haplotypes of the HPRC pangenome panel that best explain the reads at each locus; it names haplotypes of panel people (<sample>.1 or .2), not alleles, so the two callers are shown side by side and not compared. Filter: the authors' HLA and KIR benchmark filter (no warning, weighted distance of 30 or less, fewer than 1000 or 20% unexplained reads). Every column: locityper/<sample>_locityper.tsv.

+
Loci called4 of 5 (3 pass the filter)
+
LocusLocityperFilterPrimary caller
HLA-DRB1h1 + h2 (quality 30, 1 of 100 reads unexplained, weighted distance 0.1; filter pass)passT1K (step 08) did not run
KIRk1 + k2 (quality 20, 1 of 100 reads unexplained, weighted distance 0.1; filter pass)passT1K's KIR pass (step 08, KIR=true) gave no call
CYP2D6not called: low depthfailpypgx (step 32) and Cyrius (step 21) did not run
FCGRf + f (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter fail: q)failno other step calls FCGR
ZZZz + z (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter pass)passno other step calls this locus
+
+
+
+
+
+

Ancestry

+

Where do my ancestors come from?

+
+
+
+

Fine-Grained Ancestry

+

Step 26b · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Each name is a group of reference populations we put together and named, not a nationality. Continental groups are well apart; neighbouring regions are not: splits within Iberia are weak for every method, and Greek and Southern Italian ancestry overlap. Read a regional fraction with its bootstrap range. See docs/26b-ancestry-fine.md.

+

Continental groups

+ + + + +
GroupFractionBootstrap range
West Eurasia95%93% to 97%
Africa5%.
+

Regional groups

+ + + +
GroupFractionBootstrap range
Iberia60%50% to 70%
+

Left out of the model: Oceania. The panel has fewer than 10 unrelated reference people for it, so its ancestry is spread over the groups shown.

+
Painted genomenone; not painted: RFMix failed on chr21
+ Chromosome painting: chromosomes 1 to 22, two haplotypes each, coloured by continental group +

■ Africa ■ West Eurasia (Europe, Middle East, North Africa) ■ Central and South Asia ■ East Asia ■ Americas (Native American) ■ Oceania ■ not painted

+
+
+
+
+

Mitochondrial Haplogroup

+

Step 12 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares.

+
StatusComplete
+
HaplogroupH5a1
+
Contamination (haplocheck)no (level .)
+
FamilyTreeDNA Discover (free, no upload)https://discover.familytreedna.com/mtdna/H5a1 (opens a website; the address carries the haplogroup)
+
YFull MTreehttps://www.yfull.com/mtree/H5a1/ (opens a website; the address carries the haplogroup)
+ +
+
+
+
+

Y-Chromosome Haplogroup

+

Steps 37, 45 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares.

+
HaplogroupR1b1a1b1a1a2*(xR-L21)
+
Markers40
+
QC-score0.98
+
FamilyTreeDNA Discover (free, no upload)https://discover.familytreedna.com/y-dna/R1b1a1b1a1a2 (opens a website; the address carries the haplogroup)
+
YFull YTreehttps://www.yfull.com/tree/R1b1a1b1a1a2/ (opens a website; the address carries the haplogroup)
+ +
+
+

Y Placement on the Current Public Tree

+

Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares.

+

A second placement, on a public tree release newer than the one Yleaf carries, walked from the reads by og y tree-place. The two can differ in depth and in name: branches get renamed and split between releases, and the position tables differ. A branch is taken when it has more derived than ancestral SNPs, and an ancestral call above it blocks the branches below unless the SNPs below outvote that one site. Every level is in y_haplogroup/<sample>_y_tree_path.tsv; docs/37-y-haplogroup.md says how the walk works.

+
BranchR-Z2105
+
Level12
+
TreeISOGG 2026
+

Path SNPs: 30 derived, . ancestral, . no call; 400 SNPs called at depth . or more

+
LevelBranchDerivedAncestralNo callAncestral SNPs
1A0-T1
2R
+
FamilyTreeDNA Discover (free, no upload)https://discover.familytreedna.com/y-dna/R-Z2105 (opens a website; the address carries the haplogroup)
+
YFull YTreehttps://www.yfull.com/tree/R-Z2105/ (opens a website; the address carries the haplogroup)
+ +
+
+

Y-STR Markers (HipSTR)

+

Repeat counts read from the genome with HipSTR, in FamilyTreeDNA's Y-111 order. A count can differ from FamilyTreeDNA's by a fixed number of repeats at some markers, as labs count some repeat blocks differently: compare with a known result before trusting a difference. Multi-copy markers and repeats longer than the reads are not called. Every marker, with its reads and notes, is in y_str/<sample>_y_str.tsv; y_str/<sample>_y_str.csv is the same list for a spreadsheet.

+

Markers called: 1 high and 1 low confidence of 4; 1 no call, 1 not callable from short reads

+
PanelMarkerRepeatsConfidence
Y-12DYS39313high
Y-12DYS39024low
Y-25DYS464.not callable
+
+
+
+
+

Archaic Ancestry (Neanderthal, Denisovan)

+

Step 43 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

An estimate from IBDmix against the Altai and Vindija Neanderthals and the Altai Denisovan: a segment counts when either copy carries it, and part of what any person gets is old shared ancestry, not gene flow (Africans get some too). Every segment: archaic/<sample>_archaic_segments.tsv; docs/43-archaic.md says where the numbers end.

+
Neanderthal2.00%
+
Denisovan0.01%
+

Neanderthal: 2.00% (50.0 Mb in 120 segments)

+

Denisovan: 0.01% (0.2 Mb in 3 segments)

+

Analysed: 2500.0 Mb of the autosomes; modern frequencies: 1000 Genomes CEU

+

Longest segments:

+

a

+

b

+

j

+
+
+
+
+

Ancient Populations

+

Step 44 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Closeness on this PCA is genetic similarity, not descent: a genome near an ancient group shares ancestry with it and does not descend from those people. qpAdm models are not part of step 44; docs/44-ancient.md says how to read the plot.

+

AADR v62: 500000 of . sites used; axes from . present-day West Eurasians, . ancient people in . groups projected.

+ + + + +
#Ancient groupDatesCountryPlacePeople
1Spain_BA2000 BCESpainx10
2France_NFrance5
+ PC1 against PC2: present-day West Eurasians in grey, ancient people coloured by age, the sample marked +
+
+
+
+

Runs of Homozygosity

+

Step 11 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Long runs concentrated on one chromosome, with few elsewhere, are the sign of isodisomy: both copies of that chromosome from one parent. They can also be chance in a child of related parents. Which parent gave both copies cannot be told without the parents' samples, and a heterodisomy (two different copies from one parent) leaves no runs at all. The parents' genotypes confirm a UPD. Where an imprinted region is listed, a methylation test of that region tests for its imprinting disorder; on its own it does not prove a UPD (docs/11-roh-analysis.md).

+

F_ROH is the share of the autosomes (outside the bands) in runs of 5 MB or more.

+

Autosomes only: chrX and chrY are left out, and so is the part of a segment in a centromere or heterochromatin band (GRCh38 cytoband acen, gvar, stalk), where few markers map. No population allele frequencies were used (bcftools roh --AF-dflt 0.4): read the total and the short segments as rough; the long segments are the signal.

+
StatusComplete
+
ROH total37.5 MB
+
ROH largest segment27.0 MB
+
Segments3
+
Autosomal ROH > 5 MB2
+

chr2:10000001-17000000 7.0MB

+

chr15:23000001-50000000 27.0MB

+

F_ROH: 0.0128 (34.0 MB in runs of 5 MB or more); nearest: no band (one chromosome holds most of the runs)

+

** chr15 carries 27.0 MB, more than 50% of the length in runs of 5 MB or more: both copies may come from one parent (uniparental isodisomy) **

+

Imprinted 15q11-q13 (SNRPN, UBE3A): from the mother: -; from the father: - (PMID 22237428;27615419)

+

Left out in centromere and heterochromatin bands: 46.5 MB

+

Segments on chrX/chrY, not counted: 1

+
+
+
+
+
+

Traits and scores

+

What do studies say about my traits and risk scores?

+
+
+
+

Traits

+

Step 42 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Each reading is what the cited studies found on average in the people they studied, not a diagnosis. A row marked ancestry reads differently in other populations; its note says how.

+
Read / no genotype / other allele3 / 1 / 1
+ + + + + + + + +
TraitGeneGenotypeReadingSource
Lp(a)LPA
rs10455872
A/Gone copy
.
PMID 1
Lp(a)LPA
rs3798220
T|Cone copy
.
PMID 1
R117HCFTR
rs78655421
G/Aone copy
.
PMID 1
xX
rs1
.no reads
.
PMID 1
xX
rs2
C/Cother
.
PMID 1
xX
rs3
C/TA low-quality call at this position (genotype quality 5, below 20): not read; check the reads.
.
PMID 1
+

Genotype rules (several sites read together)

+ + + + +
TraitGene and sitesGenotypesResultReadingSource
bitterTAS2R38
rs1
C/GPAV/AVI (not phased)taster
.
PMID 1
kidneyAPOL1
rs73885319, rs60910145
A/G, T/TG0/G1
With G2: G1/G2
one G1
With G2: Two APOL1 risk copies (G1/G2): the high-risk genotype of Genovese 2010, which went with focal segmental glomerulosclerosis and hypertension-attributed kidney failure in African Americans. A risk factor, not a diagnosis.
G2 (rs71785313): 1 copy of the deletion called.
.
PMID 20647424
+

Every rule line: traits/S_genotype_rules.tsv

+
APOE and Alzheimer's disease: a risk factor, not a diagnosis. Many people choose not to learn their APOE result; docs/42-traits.md explains it. Open to show it. + + + +
TraitGeneGenotypeReadingSource
APOEAPOE
rs429358
T/Ce3/e4
.
PMID 1
+

Every row with its note: traits/S_traits.tsv

+
+
+
+
+

Polygenic Risk Scores (raw, not percentiles)

+

Step 25 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+ + + + +
ConditionPGSScoreVariants matchedPercentile
CADPGS0000180.5100/120raw score only
T2DPGS0000140.110/20raw score only
+

Percentile withheld: the input lists variants only, so each scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, whose genotypes are complete. A gVCF from step 3, or a chip VCF, lists the reference calls and keeps the percentile. Most PRS scores were developed in European-ancestry populations and predict less well for other ancestries, even with an ancestry-adjusted percentile. See docs/25-prs.md.

+
+
+
+
+

Blood Groups (predicted)

+

Step 41 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Predicted from the DNA at the variants that define each antigen, not typed from blood. RhD comes from the read depth over RHD; weak and partial D are not assessed. The evidence for each site is in bloodtype/<sample>_bloodtype_evidence.tsv.

+
ABOA
+
RhDRhD positive
+
SystemPredicted phenotypeGenotypeConfidence
ABOAA1/O1high
RhDRhD positive.medium
Kell.K-/k+.
+
+
+
+
+

Telomere content (relative)

+

Step 10 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

Relative telomere content (intratelomeric reads per million reads with 48-52% GC), not a telomere length: compare it only with samples of a similar age sequenced on the same platform (docs/10-telomere-analysis.md).

+
Telomere content1.5
+

Intratelomeric reads: 40 (floor 2,000 at 30.0x)

+
Warningtoo few telomeric reads for a stable estimate; do not compare this value.
+
+
+
+
+
+

Other and exports

+

What else did the run find or write?

+
+
+
+

Viral DNA in the Unmapped Reads

+

Step 47 · Complete · file date 2021-03-04 05:06 UTC · link to this section

+

From the reads that do not map to the human genome, realigned to a fixed set of human viral genomes. Not a test for an infection: most adults carry herpesviruses that stay in their cells, and reagents carry viral DNA too. HHV-6 integration follows Liu et al. 2020 (depth over the viral genome at 0.30 of the human depth or more). Every genome: viral/<sample>_viral.tsv.

+
HHV-6inherited integrated HHV-6B likely
+
VirusCallReadsBreadthDepth / humanCopies per cell
phiXspike-in5001.0..
HHV-6Binherited integrated HHV-6 likely20000.991.01.0
+
+
+
+
+
+

What this report leaves out

+

Which steps did not run, and what does no step look at?

+
+
+
+

Steps Not Run

+
    +
  • Coverage (mosdepth)
  • +
  • Gene callability (mosdepth)
  • +
  • Sex check (indexcov)
  • +
  • Sample identity and contamination (somalier, VerifyBamID2)
  • +
  • Mosaic loss of chromosome Y or X
  • +
  • ClinVar screen
  • +
  • PharmCAT
  • +
  • pypgx
  • +
  • Cyrius (CYP2D6)
  • +
  • Cancer predisposition (CPSR)
  • +
  • Clinical variant filter
  • +
  • Variant prioritization (slivar)
  • +
+
+
+
+
+

Not Assessed by This Pipeline

+
    +
  • Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)
  • +
  • Methylation and imprinting
  • +
  • Repeat expansions outside the ExpansionHunter catalog
  • +
  • Phase: two variants in one gene are compound-het candidates, not confirmed
  • +
  • Variants of uncertain significance (not interpreted)
  • +
+
+
+
+
+
+ Disclaimer: This report is for educational and research purposes only. + It is not a clinical diagnosis. Always discuss genomic findings with a qualified healthcare + professional before making any medical decisions. Variants of Uncertain Significance (VUS) + are not clinically actionable. +
+ + +
+
+ + diff --git a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt new file mode 100644 index 000000000..00191265d --- /dev/null +++ b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt @@ -0,0 +1,337 @@ +================================================================================ + GENOMICS ANALYSIS REPORT + Sample: S + Generated: 2026-11-19 10:29 UTC +================================================================================ + +################################################################################ +# 1. QUALITY: Can I trust this data? +################################################################################ + +## Variant Calling (DeepVariant) +--- + Total variants: 1 + PASS variants: 1 + SNPs: 0 Indels: 1 + Counts of the calls DeepVariant made against the reference. A whole genome usually holds 4 to 5 million, most of them common. PASS calls passed the caller's filter; a count says nothing about health on its own. + +################################################################################ +# 2. CLINICAL: Is there anything to take to a doctor? +################################################################################ + +## Symptom-Driven Ranking (Exomiser, step 48) +--- + Symptoms searched: Seizure (HP:0001250), HP:0000001 + 1. GENE1 (AD) score 0.9 (symptom match 0.8) + chr1-1-A-G 0/1 missense p.X ACMG LP; D1 + chr1-2-A-G 0/1 stop p.Y ACMG P; D1 + 2. GENE2 (AR) score 0.5 (symptom match 0.4) + chr2-1-A-G 1/1 splice c.1 ACMG VUS; D2 + A ranking to bring to a clinical geneticist, not a diagnosis: a high score means a rare, likely damaging variant in a gene linked to symptoms like these, not that it causes them, and an empty or low list does not rule a genetic cause out. Coding and splice variants only (docs/48-exomiser.md). In words: exomiser/S_exomiser.txt + +## Mobile Element Insertions (step 50) +--- + Insertions called: 3 (ALU 2, L1 1) + FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) + TAF1 SVA (XDP; XL): not callable (depth 2) + Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Every call: mei/_mei.tsv. + +## Repeat Expansions (ExpansionHunter) +--- + [could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/str_intermediate_ranges.tsv'] +## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) +--- + Result: negative + . + VNtyper's coverage check: . + . + none + The MUC1 repeat is long and GC-rich, and short reads cover it unevenly. VNtyper looks only for known frameshifts in it: a negative result lowers the chance of those and does not rule out ADTKD-MUC1, and a positive one needs a clinical test (SNaPshot for dupC) to confirm it. + +## Mitochondrial Variants (Mutect2) +--- + PASS variants: 7 + Heteroplasmic (AF 0.05 to 0.95, outside the D-loop poly-C tracts): 1 + Length heteroplasmy in the D-loop poly-C tracts (m.303-315, m.16184-16193; common, usually technical): 2 + chrM:302 A>AC,ACC AF 0.3 + chrM:16189 T>C AF 0.5 + Annotation (mito/S_chrM_annotated.tsv): ClinVar 2026-10-01; gnomAD not annotated: no file + ClinVar pathogenic or likely pathogenic: 1 + Heteroplasmic, or in ClinVar with a class other than benign: + chrM:3243 A>G AF 0.40 ClinVar Pathogenic (criteria; MELAS) gnomAD AF hom 0, het 0 + chrM:302 A>AC AF 0.3 not in ClinVar not in gnomAD poly-C tract + chrM:500 C>T AF 0.99 ClinVar Uncertain_significance (.; .) not in gnomAD + Confirmed disease variants (assets/mito_confirmed.tsv): 3 + m.3243A>G (MT-TL1) AF 0.40 filter PASS MELAS (mitochondrial encephalomyopathy, lactic acidosis and stroke-like episodes); maternally inherited diabetes and deafness; ClinVar 9589; PMID 2102678. Usually heteroplasmic; the level differs between tissues and is often lower in blood than in muscle or urine. + m.8344A>G (MT-TK) AF 0.30 filter weak_evidence MERRF (myoclonic epilepsy with ragged-red fibres); ClinVar 9579; PMID 2112427. Usually heteroplasmic; the level differs between tissues. + m.11778G>A (MT-ND4) AF 0.99 filter PASS Leber hereditary optic neuropathy (LHON); ClinVar 9708; PMID 3201231. Usually homoplasmic; not everyone who carries it loses vision. + Large deletions (eKLIPse): 3, of them 1 named in assets/mito_confirmed.tsv; listed: named ones and any at 1.0% or more + m.8470_13446del (4977 bp) level 0.5% The common 4977 bp deletion, between two 13 bp direct repeats: Kearns-Sayre syndrome, chronic progressive external ophthalmoplegia (CPEO), Pearson syndrome; ClinVar 430680 (m.8483_13459del); PMID 2711184, 2541333, 20301382 + m.101_199del (None bp) level 2.5% + A single large mtDNA deletion is often found in muscle and not in blood (except in Pearson syndrome), so a blood sample with none does not rule one out (docs/20-mtoolbox.md). + mtDNA copy number: not assessed (unknown) + Length heteroplasmy in the D-loop poly-C tracts is found in most people and is usually technical; it is listed here and not counted as heteroplasmy. + ClinVar and gnomAD v3.1 (chrM sites) annotate the calls in step 20. MITOMAP (mitomap.org) has the curated disease status of mtDNA variants; it is a manual lookup, as it refuses scripted requests. + +## Lp(a): LPA KIV-2 Repeat Count and Risk Variants +--- + KIV-2 repeats (both chromosomes): 35 (95% interval 30 to 40), low + ok + KIV-2 4925G>A null allele (rs1484919544): present, 4 of 200 reads carry it + . + A null allele lowers the Lp(a) made from the copies it sits on; the Lp(a) blood test is the measure. + rs10455872: A/G (1 risk allele) + rs3798220: T|C (1 risk allele) + Genetic signs of a high Lp(a): 2 risk alleles at rs10455872 and rs3798220 and a low KIV-2 repeat count. Measure Lp(a) in blood. + . + The KIV-2 repeat count from read depth is a research estimate, not an Lp(a) level: the level is a blood test, and the count explains only part of the difference between people. + +## Clonal Haematopoiesis (CHIP, step 49) +--- + DNMT3A R882H: VAF 0.05 (3 of 60 reads), . + Detection limit: a clone of VAF about 10% or more is found 8 times in 10 at this depth (median 33x over the genes' coding exons). CHIP starts at a VAF of 2%: smaller clones are likely missed, so no call does not rule one out. + Too shallow or not on the reference: ASXL1, SRSF2. + 1 other protein changes listed, not counted: chip/S_chip.tsv. + Clonal haematopoiesis is common with age and most people with it never get a blood cancer: a call here is not a diagnosis. A call is a change in a CHIP gene's published classes, found by Mutect2 without a matched normal; one at a VAF of 35% or more is left out as possibly inherited. docs/49-chip.md says how to read it. + +## Mosaic Chromosomal Alterations (MoChA, step 51) +--- + Reported at a cell fraction of 0.05 or more at 30x (read-sampling floor ., minimum .; . heterozygous sites on .) + Loss on q, chr20:1-2 (10 Mb): about 0.1 of the cells + Large gains, losses and copy-neutral losses of heterozygosity (CN-LOH) carried by a share of the blood cells, from MoChA on the phased heterozygous sites of chr1 to chr22. In a UK Biobank study they became more common with age and went with a higher risk of a later blood cancer (Loh et al. 2018). That is a population-level association, not a diagnosis; an event is confirmed on a new blood sample. Below the floor nothing is reported, and an event above it can still be missed. Every MoChA call, with the reason it was or was not reported: mosaic/_mocha.tsv. + +################################################################################ +# 3. CARRIER: What could I pass on to a child? +################################################################################ + +## Couple Carrier Screen (step 39) +--- + Partner: P2. Genes where both carry a change: 1; X-linked findings: 1; genes where only one partner carries a change: 2 + Shared: CFTR (Cystic fibrosis): 1 in 4. This sample: c.1521_1523del (P). P2: c.350G>A (LP) + X-linked: DMD (Duchenne): 1 in 4 sons. This sample: c.10G>T (P). P2: . + A screen, not a diagnosis: the couple report (couple__.md in the family folder) lists the genes, variant types and repeats it does not see. These counts are of its gene table: a carrier deletion allele from read depth (step 35), and a possible shared risk it adds, is in that report only. See a genetic counsellor before acting on a result, or on its absence (docs/39-couple.md). + +## Paralog Genes (Paraphase, PacBio HiFi) +--- + SMN1: 2 (called); ok + SMN2: 2 (called) + HBA1: 1 (called) + HBA2: 2 (called) + PMS2: 2 (called) + SMN1 by both tools: Paraphase 2, Parascopy 1 (quality 31, filter PASS): they DISAGREE: check both before using either + Other Paraphase regions: 2 (1 with a call) + Variants on phased haplotypes: 3 + Paraphase reads PacBio HiFi reads only. A 'no call' means it saw one haplotype and the depth did not settle one copy or two. A research estimate, not a diagnostic test: confirm a result (for example an HBA deletion or one SMN1 copy) with a clinical laboratory. + +## SMN1/SMN2 Copy Number (Parascopy, short reads) +--- + SMN1 copies: 1 (quality 31, filter PASS) + SMN1 g.27134T>G silent-carrier marker (rs143838139): not seen, 0 of 31 reads carry it, about 0 copies + SMN1 marker reading: no read carries the G + SMN1 marker caveat: The marker raises the chance that two SMN1 copies sit on one chromosome (2+0, a silent carrier); it does not prove 2+0, and a carrier test in a clinical laboratory confirms it. + SMN2 copies: 3 (quality 25, filter PASS) + SMN1 and SMN2 together (agCN) at exon 7: 4 (quality 45.5, filter PASS) + Reading: one SMN1 copy: the pattern of an SMA carrier + HBA1 and HBA2 together (alpha-globin genes, from depth): . (.; estimate .) + CYP21A2 (RCCX module, from depth and six PSV sites): . CYP21A2 copies, module total 4 of ., finding none + HP (haptoglobin) copies (from depth): 2 (estimate 2.1). Reading: usual + LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted + CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) + GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy + STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns + mytable (agCN): not assessed: no read over the locus + pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) + Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication + Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies + Duplication: dup (X1, chr1:2-2), 3 of 2 copies + Parascopy reads short reads at SMN1 and SMN2 and at the other loci of its catalog. A quality under 20 or a filter other than PASS leaves a copy unresolved. HBA1 and HBA2, CYP21A2 and the gene-dosage loci have no Parascopy model: step 35 counts them from read depth against flanking sequence (CYP21A2 also from six sites where it differs from its pseudogene CYP21A1P), which cannot say which chromosome lost or gained a copy. The copy-number intervals (ClinGen's recurrent CNV regions, carrier deletion alleles, the AZF regions) are read from depth too. A research estimate, not a diagnostic test: confirm a result with a clinical laboratory (MLPA or qPCR; gap-PCR for alpha-thalassaemia). + +################################################################################ +# 4. MEDICINES: How might I respond to medicines? +################################################################################ + +## CPIC Drug-Gene Recommendations +--- + Genes with a non-normal phenotype: 1 More than one possible result: 0 Not called: 0 Called without a function phenotype (no drug guidance): 0 + UGT1A1 *1/*28 Intermediate + Drugs per gene: cpic/S_cpic_recommendations.txt + CPIC recommendations follow the phenotype PharmCAT called. They are guidance for prescribers, not a prescription. A gene that was not called has no recommendation here, and that is not the same as a typical response. + +## HLA Typing (T1K) +--- + [could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/hla_alleles.tsv'] +## Locityper Second Opinion at Hard Loci (step 53) +--- + Loci called: 4 of 5; passing the authors' filter: 3 + HLA-DRB1 Locityper: h1 + h2 (quality 30, 1 of 100 reads unexplained, weighted distance 0.1; filter pass) + primary: T1K (step 08) did not run + KIR Locityper: k1 + k2 (quality 20, 1 of 100 reads unexplained, weighted distance 0.1; filter pass) + primary: T1K's KIR pass (step 08, KIR=true) gave no call + CYP2D6 Locityper: not called: low depth + primary: pypgx (step 32) and Cyrius (step 21) did not run + FCGR Locityper: f + f (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter fail: q) + primary: no other step calls FCGR + ZZZ Locityper: z + z (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter pass) + primary: no other step calls this locus + A second opinion beside the primary caller, never the call itself. Locityper (Prodanov et al. 2025, Nat Genet, PMID 41107551) picks the two haplotypes of the HPRC pangenome panel that best explain the reads at each locus; it names haplotypes of panel people (.1 or .2), not alleles, so the two callers are shown side by side and not compared. Filter: the authors' HLA and KIR benchmark filter (no warning, weighted distance of 30 or less, fewer than 1000 or 20% unexplained reads). Every column: locityper/_locityper.tsv. + +################################################################################ +# 5. ANCESTRY: Where do my ancestors come from? +################################################################################ + +## Fine-Grained Ancestry (ADMIXTURE, RFMix) +--- + Continental groups (fraction, bootstrap range): + West Eurasia 95% (93% to 97%) + Africa 5% + Regional groups (fraction, bootstrap range): + Iberia 60% (50% to 70%) + Left out of the model: Oceania. The panel has fewer than 10 unrelated reference people for it, so its ancestry is spread over the groups shown. + Chromosome painting: none; not painted: RFMix failed on chr21 + Each name is a group of reference populations we put together and named, not a nationality. Continental groups are well apart; neighbouring regions are not: splits within Iberia are weak for every method, and Greek and Southern Italian ancestry overlap. Read a regional fraction with its bootstrap range. See docs/26b-ancestry-fine.md. + +## Mitochondrial Haplogroup +--- + Haplogroup: H5a1 + Contamination (haplocheck): no (level .) + FamilyTreeDNA Discover (free, no upload): https://discover.familytreedna.com/mtdna/H5a1 + YFull MTree: https://www.yfull.com/mtree/H5a1/ + More routes, and the files to share: https://github.com/GeiserX/OwnGenome/blob/main/docs/12-mito-haplogroup.md#explore-your-branch-further + Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares. + +## Y-Chromosome Haplogroup (Yleaf) +--- + Haplogroup: R1b1a1b1a1a2*(xR-L21) (40 markers, QC-score 0.98) + FamilyTreeDNA Discover (free, no upload): https://discover.familytreedna.com/y-dna/R1b1a1b1a1a2 + YFull YTree: https://www.yfull.com/tree/R1b1a1b1a1a2/ + More routes, and the files to share: https://github.com/GeiserX/OwnGenome/blob/main/docs/37-y-haplogroup.md#explore-your-branch-further + Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares. + +## Y Placement on the Current Public Tree +--- + Branch: R-Z2105 (level 12, ISOGG 2026) + Path SNPs: 30 derived, . ancestral, . no call; 400 SNPs called at depth . or more + 1 A0-T 1D A N + 2 R D A N + A second placement, on a public tree release newer than the one Yleaf carries, walked from the reads by og y tree-place. The two can differ in depth and in name: branches get renamed and split between releases, and the position tables differ. A branch is taken when it has more derived than ancestral SNPs, and an ancestral call above it blocks the branches below unless the SNPs below outvote that one site. Every level is in y_haplogroup/_y_tree_path.tsv; docs/37-y-haplogroup.md says how the walk works. + +## Y-STR Markers (HipSTR) +--- + Markers called: 1 high and 1 low confidence of 4; 1 no call, 1 not callable from short reads + Y-12 DYS393 13 (high) + Y-12 DYS390 24 (low) + Y-25 DYS464 . (not callable) + Repeat counts read from the genome with HipSTR, in FamilyTreeDNA's Y-111 order. A count can differ from FamilyTreeDNA's by a fixed number of repeats at some markers, as labs count some repeat blocks differently: compare with a known result before trusting a difference. Multi-copy markers and repeats longer than the reads are not called. Every marker, with its reads and notes, is in y_str/_y_str.tsv; y_str/_y_str.csv is the same list for a spreadsheet. + +## Archaic Ancestry (IBDmix, step 43) +--- + Neanderthal: 2.00% (50.0 Mb in 120 segments) + Denisovan: 0.01% (0.2 Mb in 3 segments) + Analysed: 2500.0 Mb of the autosomes; modern frequencies: 1000 Genomes CEU + Longest segments: + a + b + j + An estimate from IBDmix against the Altai and Vindija Neanderthals and the Altai Denisovan: a segment counts when either copy carries it, and part of what any person gets is old shared ancestry, not gene flow (Africans get some too). Every segment: archaic/_archaic_segments.tsv; docs/43-archaic.md says where the numbers end. +## Ancient Populations (AADR PCA, step 44) +--- + AADR v62: 500000 of . sites used; axes from . present-day West Eurasians, . ancient people in . groups projected. + Nearest ancient groups: + 1. Spain_BA (2000 BCE, Spain; 10 people) + 2. France_N (, France; 5 people) + Closeness on this PCA is genetic similarity, not descent: a genome near an ancient group shares ancestry with it and does not descend from those people. qpAdm models are not part of step 44; docs/44-ancient.md says how to read the plot. Plot: ancient/S_ancient_pca.svg + +## Runs of Homozygosity +--- + Segments: 3 Total: 37.5 MB Largest: 27.0 MB + Autosomal ROH > 5MB: 2 + chr2:10000001-17000000 7.0MB + chr15:23000001-50000000 27.0MB + F_ROH: 0.0128 (34.0 MB in runs of 5 MB or more); nearest: no band (one chromosome holds most of the runs) + ** chr15 carries 27.0 MB, more than 50% of the length in runs of 5 MB or more: both copies may come from one parent (uniparental isodisomy) ** + Imprinted 15q11-q13 (SNRPN, UBE3A): from the mother: -; from the father: - (PMID 22237428;27615419) + Long runs concentrated on one chromosome, with few elsewhere, are the sign of isodisomy: both copies of that chromosome from one parent. They can also be chance in a child of related parents. Which parent gave both copies cannot be told without the parents' samples, and a heterodisomy (two different copies from one parent) leaves no runs at all. The parents' genotypes confirm a UPD. Where an imprinted region is listed, a methylation test of that region tests for its imprinting disorder; on its own it does not prove a UPD (docs/11-roh-analysis.md). + F_ROH is the share of the autosomes (outside the bands) in runs of 5 MB or more. + Left out in centromere and heterochromatin bands: 46.5 MB + Segments on chrX/chrY, not counted: 1 + Autosomes only: chrX and chrY are left out, and so is the part of a segment in a centromere or heterochromatin band (GRCh38 cytoband acen, gvar, stalk), where few markers map. No population allele frequencies were used (bcftools roh --AF-dflt 0.4): read the total and the short segments as rough; the long segments are the signal. + +################################################################################ +# 6. TRAITS AND SCORES: What do studies say about my traits and risk scores? +################################################################################ + +## Traits Panel (step 42) +--- + Read: 3 No genotype at the position: 1 Other allele: 1 + Lp(a) (LPA rs10455872): A/G. one copy (PMID 1) + Lp(a) (LPA rs3798220): T|C. one copy (PMID 1) + R117H (CFTR rs78655421): G/A. one copy (PMID 1) + x (X rs2): C/C. other (PMID 1) + x (X rs3): C/T. A low-quality call at this position (genotype quality 5, below 20): not read; check the reads. (PMID 1) + Not read (no genotype in the gVCF): rs1 + Each reading is what the cited studies found on average in the people they studied, not a diagnosis. A row marked ancestry reads differently in other populations; its note says how. Notes per row: traits/S_traits.tsv + Genotype rules (several sites read together; traits/S_genotype_rules.tsv): + bitter (TAS2R38 rs1): PAV/AVI (not phased). taster (PMID 1) + kidney (APOL1 rs73885319, rs60910145): G0/G1. one G1 (PMID 20647424) + With G2 (rs71785313): G1/G2. G2 (rs71785313): 1 copy of the deletion called. Two APOL1 risk copies (G1/G2): the high-risk genotype of Genovese 2010, which went with focal segmental glomerulosclerosis and hypertension-attributed kidney failure in African Americans. A risk factor, not a diagnosis. + APOE and Alzheimer's disease: a risk factor, not a diagnosis. Many people choose not to learn their APOE result; docs/42-traits.md explains it. + APOE (rs429358): T/C. e3/e4 + +## Polygenic Risk Scores +--- + CAD 0.5 (100/120 variants matched) PGS000018 + T2D 0.1 (10/20 variants matched) PGS000014 + Percentile withheld: the input lists variants only, so each scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, whose genotypes are complete. A gVCF from step 3, or a chip VCF, lists the reference calls and keeps the percentile. Most PRS scores were developed in European-ancestry populations and predict less well for other ancestries, even with an ancestry-adjusted percentile. See docs/25-prs.md. + +## Blood Groups (predicted from the genome) +--- + ABO A A1/O1 (high) + RhD RhD positive . (medium) + Kell . K-/k+ (.) + Predicted from the DNA at the variants that define each antigen, not typed from blood. RhD comes from the read depth over RHD; weak and partial D are not assessed. The evidence for each site is in bloodtype/_bloodtype_evidence.tsv. + +## Telomere content (relative, TelomereHunter) +--- + Telomere content: 1.5 intratelomeric reads per million reads with 48-52% GC + Intratelomeric reads: 40 (floor 2,000 at 30.0x) + WARNING: too few telomeric reads for a stable estimate; do not compare this value. + Relative telomere content (intratelomeric reads per million reads with 48-52% GC), not a telomere length: compare it only with samples of a similar age sequenced on the same platform (docs/10-telomere-analysis.md). + +################################################################################ +# 7. OTHER AND EXPORTS: What else did the run find or write? +################################################################################ + +## Viral DNA in the Unmapped Reads (step 47) +--- + HHV-6: inherited integrated HHV-6B likely + phiX: spike-in (500 reads, 100% of the genome) + HHV-6B: inherited integrated HHV-6 likely (2000 reads, 99% of the genome, 1.0 copies per cell) + From the reads that do not map to the human genome, realigned to a fixed set of human viral genomes. Not a test for an infection: most adults carry herpesviruses that stay in their cells, and reagents carry viral DNA too. HHV-6 integration follows Liu et al. 2020 (depth over the viral genome at 0.30 of the human depth or more). Every genome: viral/_viral.tsv. + +## Steps Not Run +--- + - Coverage (mosdepth) + - Gene callability (mosdepth) + - Sex check (indexcov) + - Sample identity and contamination (somalier, VerifyBamID2) + - Mosaic loss of chromosome Y or X + - ClinVar screen + - PharmCAT + - pypgx + - Cyrius (CYP2D6) + - Cancer predisposition (CPSR) + - Clinical variant filter + - Variant prioritization (slivar) + +## Not Assessed by This Pipeline +--- + - Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes) + - Methylation and imprinting + - Repeat expansions outside the ExpansionHunter catalog + - Phase: two variants in one gene are compound-het candidates, not confirmed + - Variants of uncertain significance (not interpreted) + +================================================================================ + DISCLAIMER: This is NOT a clinical report. Discuss findings with a + qualified healthcare professional before making medical decisions. +================================================================================ diff --git a/tests/test_render_report.py b/tests/test_render_report.py index 54de5d098..f782cf812 100644 --- a/tests/test_render_report.py +++ b/tests/test_render_report.py @@ -47,7 +47,9 @@ named ("1 scored, 2 left out (not matched in the panel run)"); 5. both reports: a percentile with its group when there is one, the "Raw score only" line when there is none, and the not-assessed line about - percentiles only then; a score whose chrX rows were left out is named, + percentiles only then; a panel run whose percentiles were withheld for a + variant-only input says so in both reports and in not-assessed, never + that no panel was installed; a score whose chrX rows were left out is named, one whose chrX rows were scored is not; both captions, with a panel and without, carry the ancestry-transfer caveat of docs/25-prs.md; 6. the ClinVar card: a homozygous 3-star P/LP hit gets no green badge, @@ -133,6 +135,8 @@ def check(desc, ok, detail=""): PRS_NOT_ADJUSTED = "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums" +PRS_WITHHELD = ("Polygenic score percentiles: the input lists variants only, so the percentiles were withheld and " + "the scores are raw sums") def haplogroup_explore(kind, hg): @@ -682,7 +686,25 @@ def chrx_of(res): and "PGS000002 (3)" not in txt, txt) check("no panel: the HTML row says raw score only", "raw score only" in html) check("no panel: not-assessed names the missing percentiles", - PRS_NOT_ADJUSTED in summ["not_assessed"]) + PRS_NOT_ADJUSTED in summ["not_assessed"] and PRS_WITHHELD not in summ["not_assessed"]) + # A panel run whose input lists variants only: og prs table withheld + # every percentile and wrote why (Percentile_Note). Neither report + # may say that no panel was installed, nor tell the user to add one. + d = f"{work}/sample_withheld/S" + withheld = "percentile withheld: the input lists variants only" + put(f"{d}/prs/S_prs_summary.tsv", "\t".join(PRS_COLUMNS[:-1] + ["Percentile_Note", "Input"]) + "\n" + f"Coronary artery disease\tPGS000001\t62\t2\t3\t66.7\tNA\tEUR\t0\t0\t\t\t{withheld}\tvcf\n") + summ = collect_summary.collect("S", d) + txt, html = render_report.text_report(summ), render_report.html_report(summ) + check("withheld: both reports say the percentile was withheld for a variant-only input", + "Percentile withheld: the input lists variants only" in txt + and "Percentile withheld: the input lists variants only" in html, txt) + check("withheld: no report says no panel was installed, nor asks for one", + "no ancestry reference panel was installed" not in txt + html + and "--ancestry-panel adds it" not in txt + html, txt) + check("withheld: not-assessed gives the true reason", + PRS_WITHHELD in summ["not_assessed"] and PRS_NOT_ADJUSTED not in summ["not_assessed"], + summ["not_assessed"]) d = f"{work}/sample_adj/S" put(f"{d}/prs/S_prs_summary.tsv", "\t".join(PRS_COLUMNS) + "\n" "Coronary artery disease\tPGS000001\t1.25\t2\t3\t66.7\t94.4\tEUR\t0\tgvcf\n") From bcf516af2176ef9b805fdc70f818303dcf6e654e Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 11:47:52 +0100 Subject: [PATCH 007/110] test(parity): keep a-prs-raw a run without the panel The a-prs-raw summary is c-full's with adjusted false, so it took c-full's withheld note on the T2D score, and og now renders the withheld line there. The report-render oracle's commit predates that line, so the case needed a golden: a whole report, whose LPA lines the personal-data scan reads as genotypes. Clearing the note keeps the case what it was meant to be, a run without the panel, which og and the oracle render alike. The cargo test prs_withheld.rs and tests/test_render_report.py cover the withheld line. --- tests/parity/gen/report-corpus.sh | 5 +- .../report-render/a-prs-raw/a-prs-raw.html | 738 ------------------ .../report-render/a-prs-raw/a-prs-raw.txt | 337 -------- 3 files changed, 4 insertions(+), 1076 deletions(-) delete mode 100644 tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html delete mode 100644 tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt diff --git a/tests/parity/gen/report-corpus.sh b/tests/parity/gen/report-corpus.sh index 84798b863..48dc1207b 100644 --- a/tests/parity/gen/report-corpus.sh +++ b/tests/parity/gen/report-corpus.sh @@ -491,8 +491,11 @@ amut painting '.sections.ancestry_fine.data.painting = [{"code": "AFR", "group": {"group": "Narrow", "fraction": 0.005, "low": 0.0, "high": 0.02}, {"group": "Unfit", "fraction": null, "low": null, "high": null}]' amut no-painting '.sections.ancestry_fine.data.painting = [] | .sections.ancestry_fine.data.not_painted = [] | .sections.ancestry_fine.data.left_out = [] | .sections.ancestry_fine.data.painting_png = ""' +# prs-raw is a run without the panel, so no score has a percentile note: a +# withheld note (c-full's T2D row) would make og print the withheld line, +# which the oracle's commit predates (the cargo test prs_withheld.rs covers it). amut prs-raw '.sections.prs.data.adjusted = false | del(.sections.prs.data.ancestry) - | .sections.prs.data.scores |= map(.percentile = "" | .evaluated_in = null)' + | .sections.prs.data.scores |= map(.percentile = "" | .evaluated_in = null | .percentile_note = "")' amut prs-sex '.sections.prs.data.ancestry = {"population": "", "panel": "", "low_confidence": "True"} | .sections.prs.data.scores = [ {"condition": "Prostate", "pgs_id": "PGS2", "score": "1", "matched": "5", "total": "6", "chrx": "0", diff --git a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html deleted file mode 100644 index 9a47425a9..000000000 --- a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.html +++ /dev/null @@ -1,738 +0,0 @@ - - - - - - -OwnGenome Report - - - - - - diff --git a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt b/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt deleted file mode 100644 index 00191265d..000000000 --- a/tests/parity/golden/report-render/a-prs-raw/a-prs-raw.txt +++ /dev/null @@ -1,337 +0,0 @@ -================================================================================ - GENOMICS ANALYSIS REPORT - Sample: S - Generated: 2026-11-19 10:29 UTC -================================================================================ - -################################################################################ -# 1. QUALITY: Can I trust this data? -################################################################################ - -## Variant Calling (DeepVariant) ---- - Total variants: 1 - PASS variants: 1 - SNPs: 0 Indels: 1 - Counts of the calls DeepVariant made against the reference. A whole genome usually holds 4 to 5 million, most of them common. PASS calls passed the caller's filter; a count says nothing about health on its own. - -################################################################################ -# 2. CLINICAL: Is there anything to take to a doctor? -################################################################################ - -## Symptom-Driven Ranking (Exomiser, step 48) ---- - Symptoms searched: Seizure (HP:0001250), HP:0000001 - 1. GENE1 (AD) score 0.9 (symptom match 0.8) - chr1-1-A-G 0/1 missense p.X ACMG LP; D1 - chr1-2-A-G 0/1 stop p.Y ACMG P; D1 - 2. GENE2 (AR) score 0.5 (symptom match 0.4) - chr2-1-A-G 1/1 splice c.1 ACMG VUS; D2 - A ranking to bring to a clinical geneticist, not a diagnosis: a high score means a rare, likely damaging variant in a gene linked to symptoms like these, not that it causes them, and an empty or low list does not rule a genetic cause out. Coding and splice variants only (docs/48-exomiser.md). In words: exomiser/S_exomiser.txt - -## Mobile Element Insertions (step 50) ---- - Insertions called: 3 (ALU 2, L1 1) - FKTN SVA (Fukuyama; AR): callable (depth 30, not seen) - TAF1 SVA (XDP; XL): not callable (depth 2) - Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Every call: mei/_mei.tsv. - -## Repeat Expansions (ExpansionHunter) ---- - [could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/str_intermediate_ranges.tsv'] -## MUC1 VNTR Frameshifts (ADTKD-MUC1, VNtyper) ---- - Result: negative - . - VNtyper's coverage check: . - . - none - The MUC1 repeat is long and GC-rich, and short reads cover it unevenly. VNtyper looks only for known frameshifts in it: a negative result lowers the chance of those and does not rule out ADTKD-MUC1, and a positive one needs a clinical test (SNaPshot for dupC) to confirm it. - -## Mitochondrial Variants (Mutect2) ---- - PASS variants: 7 - Heteroplasmic (AF 0.05 to 0.95, outside the D-loop poly-C tracts): 1 - Length heteroplasmy in the D-loop poly-C tracts (m.303-315, m.16184-16193; common, usually technical): 2 - chrM:302 A>AC,ACC AF 0.3 - chrM:16189 T>C AF 0.5 - Annotation (mito/S_chrM_annotated.tsv): ClinVar 2026-10-01; gnomAD not annotated: no file - ClinVar pathogenic or likely pathogenic: 1 - Heteroplasmic, or in ClinVar with a class other than benign: - chrM:3243 A>G AF 0.40 ClinVar Pathogenic (criteria; MELAS) gnomAD AF hom 0, het 0 - chrM:302 A>AC AF 0.3 not in ClinVar not in gnomAD poly-C tract - chrM:500 C>T AF 0.99 ClinVar Uncertain_significance (.; .) not in gnomAD - Confirmed disease variants (assets/mito_confirmed.tsv): 3 - m.3243A>G (MT-TL1) AF 0.40 filter PASS MELAS (mitochondrial encephalomyopathy, lactic acidosis and stroke-like episodes); maternally inherited diabetes and deafness; ClinVar 9589; PMID 2102678. Usually heteroplasmic; the level differs between tissues and is often lower in blood than in muscle or urine. - m.8344A>G (MT-TK) AF 0.30 filter weak_evidence MERRF (myoclonic epilepsy with ragged-red fibres); ClinVar 9579; PMID 2112427. Usually heteroplasmic; the level differs between tissues. - m.11778G>A (MT-ND4) AF 0.99 filter PASS Leber hereditary optic neuropathy (LHON); ClinVar 9708; PMID 3201231. Usually homoplasmic; not everyone who carries it loses vision. - Large deletions (eKLIPse): 3, of them 1 named in assets/mito_confirmed.tsv; listed: named ones and any at 1.0% or more - m.8470_13446del (4977 bp) level 0.5% The common 4977 bp deletion, between two 13 bp direct repeats: Kearns-Sayre syndrome, chronic progressive external ophthalmoplegia (CPEO), Pearson syndrome; ClinVar 430680 (m.8483_13459del); PMID 2711184, 2541333, 20301382 - m.101_199del (None bp) level 2.5% - A single large mtDNA deletion is often found in muscle and not in blood (except in Pearson syndrome), so a blood sample with none does not rule one out (docs/20-mtoolbox.md). - mtDNA copy number: not assessed (unknown) - Length heteroplasmy in the D-loop poly-C tracts is found in most people and is usually technical; it is listed here and not counted as heteroplasmy. - ClinVar and gnomAD v3.1 (chrM sites) annotate the calls in step 20. MITOMAP (mitomap.org) has the curated disease status of mtDNA variants; it is a manual lookup, as it refuses scripted requests. - -## Lp(a): LPA KIV-2 Repeat Count and Risk Variants ---- - KIV-2 repeats (both chromosomes): 35 (95% interval 30 to 40), low - ok - KIV-2 4925G>A null allele (rs1484919544): present, 4 of 200 reads carry it - . - A null allele lowers the Lp(a) made from the copies it sits on; the Lp(a) blood test is the measure. - rs10455872: A/G (1 risk allele) - rs3798220: T|C (1 risk allele) - Genetic signs of a high Lp(a): 2 risk alleles at rs10455872 and rs3798220 and a low KIV-2 repeat count. Measure Lp(a) in blood. - . - The KIV-2 repeat count from read depth is a research estimate, not an Lp(a) level: the level is a blood test, and the count explains only part of the difference between people. - -## Clonal Haematopoiesis (CHIP, step 49) ---- - DNMT3A R882H: VAF 0.05 (3 of 60 reads), . - Detection limit: a clone of VAF about 10% or more is found 8 times in 10 at this depth (median 33x over the genes' coding exons). CHIP starts at a VAF of 2%: smaller clones are likely missed, so no call does not rule one out. - Too shallow or not on the reference: ASXL1, SRSF2. - 1 other protein changes listed, not counted: chip/S_chip.tsv. - Clonal haematopoiesis is common with age and most people with it never get a blood cancer: a call here is not a diagnosis. A call is a change in a CHIP gene's published classes, found by Mutect2 without a matched normal; one at a VAF of 35% or more is left out as possibly inherited. docs/49-chip.md says how to read it. - -## Mosaic Chromosomal Alterations (MoChA, step 51) ---- - Reported at a cell fraction of 0.05 or more at 30x (read-sampling floor ., minimum .; . heterozygous sites on .) - Loss on q, chr20:1-2 (10 Mb): about 0.1 of the cells - Large gains, losses and copy-neutral losses of heterozygosity (CN-LOH) carried by a share of the blood cells, from MoChA on the phased heterozygous sites of chr1 to chr22. In a UK Biobank study they became more common with age and went with a higher risk of a later blood cancer (Loh et al. 2018). That is a population-level association, not a diagnosis; an event is confirmed on a new blood sample. Below the floor nothing is reported, and an event above it can still be missed. Every MoChA call, with the reason it was or was not reported: mosaic/_mocha.tsv. - -################################################################################ -# 3. CARRIER: What could I pass on to a child? -################################################################################ - -## Couple Carrier Screen (step 39) ---- - Partner: P2. Genes where both carry a change: 1; X-linked findings: 1; genes where only one partner carries a change: 2 - Shared: CFTR (Cystic fibrosis): 1 in 4. This sample: c.1521_1523del (P). P2: c.350G>A (LP) - X-linked: DMD (Duchenne): 1 in 4 sons. This sample: c.10G>T (P). P2: . - A screen, not a diagnosis: the couple report (couple__.md in the family folder) lists the genes, variant types and repeats it does not see. These counts are of its gene table: a carrier deletion allele from read depth (step 35), and a possible shared risk it adds, is in that report only. See a genetic counsellor before acting on a result, or on its absence (docs/39-couple.md). - -## Paralog Genes (Paraphase, PacBio HiFi) ---- - SMN1: 2 (called); ok - SMN2: 2 (called) - HBA1: 1 (called) - HBA2: 2 (called) - PMS2: 2 (called) - SMN1 by both tools: Paraphase 2, Parascopy 1 (quality 31, filter PASS): they DISAGREE: check both before using either - Other Paraphase regions: 2 (1 with a call) - Variants on phased haplotypes: 3 - Paraphase reads PacBio HiFi reads only. A 'no call' means it saw one haplotype and the depth did not settle one copy or two. A research estimate, not a diagnostic test: confirm a result (for example an HBA deletion or one SMN1 copy) with a clinical laboratory. - -## SMN1/SMN2 Copy Number (Parascopy, short reads) ---- - SMN1 copies: 1 (quality 31, filter PASS) - SMN1 g.27134T>G silent-carrier marker (rs143838139): not seen, 0 of 31 reads carry it, about 0 copies - SMN1 marker reading: no read carries the G - SMN1 marker caveat: The marker raises the chance that two SMN1 copies sit on one chromosome (2+0, a silent carrier); it does not prove 2+0, and a carrier test in a clinical laboratory confirms it. - SMN2 copies: 3 (quality 25, filter PASS) - SMN1 and SMN2 together (agCN) at exon 7: 4 (quality 45.5, filter PASS) - Reading: one SMN1 copy: the pattern of an SMA carrier - HBA1 and HBA2 together (alpha-globin genes, from depth): . (.; estimate .) - CYP21A2 (RCCX module, from depth and six PSV sites): . CYP21A2 copies, module total 4 of ., finding none - HP (haptoglobin) copies (from depth): 2 (estimate 2.1). Reading: usual - LCE3B/LCE3C copies (from depth): 1 (estimate 1.0). Reading: one deleted - CCL3L1/CCL3L3 copies (from depth): not assessed (low depth) - GBA1, GBAP1 (agCN): 4 (2 region(s), quality 35.25 or more, filter PASS). Reading: agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy - STRC, STRCP1 (agCN): unreadable: S_strc_copy_number.tsv lacks the copy-number columns - mytable (agCN): not assessed: no read over the locus - pms2 (agCN): chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual) - Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth): 4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication - Deletion: AZFc (AZFc, chrY:23000001-26000000), 0 of 1 copies - Duplication: dup (X1, chr1:2-2), 3 of 2 copies - Parascopy reads short reads at SMN1 and SMN2 and at the other loci of its catalog. A quality under 20 or a filter other than PASS leaves a copy unresolved. HBA1 and HBA2, CYP21A2 and the gene-dosage loci have no Parascopy model: step 35 counts them from read depth against flanking sequence (CYP21A2 also from six sites where it differs from its pseudogene CYP21A1P), which cannot say which chromosome lost or gained a copy. The copy-number intervals (ClinGen's recurrent CNV regions, carrier deletion alleles, the AZF regions) are read from depth too. A research estimate, not a diagnostic test: confirm a result with a clinical laboratory (MLPA or qPCR; gap-PCR for alpha-thalassaemia). - -################################################################################ -# 4. MEDICINES: How might I respond to medicines? -################################################################################ - -## CPIC Drug-Gene Recommendations ---- - Genes with a non-normal phenotype: 1 More than one possible result: 0 Not called: 0 Called without a function phenotype (no drug guidance): 0 - UGT1A1 *1/*28 Intermediate - Drugs per gene: cpic/S_cpic_recommendations.txt - CPIC recommendations follow the phenotype PharmCAT called. They are guidance for prescribers, not a prescription. A gene that was not called has no recommendation here, and that is not the same as a typical response. - -## HLA Typing (T1K) ---- - [could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/hla_alleles.tsv'] -## Locityper Second Opinion at Hard Loci (step 53) ---- - Loci called: 4 of 5; passing the authors' filter: 3 - HLA-DRB1 Locityper: h1 + h2 (quality 30, 1 of 100 reads unexplained, weighted distance 0.1; filter pass) - primary: T1K (step 08) did not run - KIR Locityper: k1 + k2 (quality 20, 1 of 100 reads unexplained, weighted distance 0.1; filter pass) - primary: T1K's KIR pass (step 08, KIR=true) gave no call - CYP2D6 Locityper: not called: low depth - primary: pypgx (step 32) and Cyrius (step 21) did not run - FCGR Locityper: f + f (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter fail: q) - primary: no other step calls FCGR - ZZZ Locityper: z + z (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter pass) - primary: no other step calls this locus - A second opinion beside the primary caller, never the call itself. Locityper (Prodanov et al. 2025, Nat Genet, PMID 41107551) picks the two haplotypes of the HPRC pangenome panel that best explain the reads at each locus; it names haplotypes of panel people (.1 or .2), not alleles, so the two callers are shown side by side and not compared. Filter: the authors' HLA and KIR benchmark filter (no warning, weighted distance of 30 or less, fewer than 1000 or 20% unexplained reads). Every column: locityper/_locityper.tsv. - -################################################################################ -# 5. ANCESTRY: Where do my ancestors come from? -################################################################################ - -## Fine-Grained Ancestry (ADMIXTURE, RFMix) ---- - Continental groups (fraction, bootstrap range): - West Eurasia 95% (93% to 97%) - Africa 5% - Regional groups (fraction, bootstrap range): - Iberia 60% (50% to 70%) - Left out of the model: Oceania. The panel has fewer than 10 unrelated reference people for it, so its ancestry is spread over the groups shown. - Chromosome painting: none; not painted: RFMix failed on chr21 - Each name is a group of reference populations we put together and named, not a nationality. Continental groups are well apart; neighbouring regions are not: splits within Iberia are weak for every method, and Greek and Southern Italian ancestry overlap. Read a regional fraction with its bootstrap range. See docs/26b-ancestry-fine.md. - -## Mitochondrial Haplogroup ---- - Haplogroup: H5a1 - Contamination (haplocheck): no (level .) - FamilyTreeDNA Discover (free, no upload): https://discover.familytreedna.com/mtdna/H5a1 - YFull MTree: https://www.yfull.com/mtree/H5a1/ - More routes, and the files to share: https://github.com/GeiserX/OwnGenome/blob/main/docs/12-mito-haplogroup.md#explore-your-branch-further - Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares. - -## Y-Chromosome Haplogroup (Yleaf) ---- - Haplogroup: R1b1a1b1a1a2*(xR-L21) (40 markers, QC-score 0.98) - FamilyTreeDNA Discover (free, no upload): https://discover.familytreedna.com/y-dna/R1b1a1b1a1a2 - YFull YTree: https://www.yfull.com/tree/R1b1a1b1a1a2/ - More routes, and the files to share: https://github.com/GeiserX/OwnGenome/blob/main/docs/37-y-haplogroup.md#explore-your-branch-further - Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares. - -## Y Placement on the Current Public Tree ---- - Branch: R-Z2105 (level 12, ISOGG 2026) - Path SNPs: 30 derived, . ancestral, . no call; 400 SNPs called at depth . or more - 1 A0-T 1D A N - 2 R D A N - A second placement, on a public tree release newer than the one Yleaf carries, walked from the reads by og y tree-place. The two can differ in depth and in name: branches get renamed and split between releases, and the position tables differ. A branch is taken when it has more derived than ancestral SNPs, and an ancestral call above it blocks the branches below unless the SNPs below outvote that one site. Every level is in y_haplogroup/_y_tree_path.tsv; docs/37-y-haplogroup.md says how the walk works. - -## Y-STR Markers (HipSTR) ---- - Markers called: 1 high and 1 low confidence of 4; 1 no call, 1 not callable from short reads - Y-12 DYS393 13 (high) - Y-12 DYS390 24 (low) - Y-25 DYS464 . (not callable) - Repeat counts read from the genome with HipSTR, in FamilyTreeDNA's Y-111 order. A count can differ from FamilyTreeDNA's by a fixed number of repeats at some markers, as labs count some repeat blocks differently: compare with a known result before trusting a difference. Multi-copy markers and repeats longer than the reads are not called. Every marker, with its reads and notes, is in y_str/_y_str.tsv; y_str/_y_str.csv is the same list for a spreadsheet. - -## Archaic Ancestry (IBDmix, step 43) ---- - Neanderthal: 2.00% (50.0 Mb in 120 segments) - Denisovan: 0.01% (0.2 Mb in 3 segments) - Analysed: 2500.0 Mb of the autosomes; modern frequencies: 1000 Genomes CEU - Longest segments: - a - b - j - An estimate from IBDmix against the Altai and Vindija Neanderthals and the Altai Denisovan: a segment counts when either copy carries it, and part of what any person gets is old shared ancestry, not gene flow (Africans get some too). Every segment: archaic/_archaic_segments.tsv; docs/43-archaic.md says where the numbers end. -## Ancient Populations (AADR PCA, step 44) ---- - AADR v62: 500000 of . sites used; axes from . present-day West Eurasians, . ancient people in . groups projected. - Nearest ancient groups: - 1. Spain_BA (2000 BCE, Spain; 10 people) - 2. France_N (, France; 5 people) - Closeness on this PCA is genetic similarity, not descent: a genome near an ancient group shares ancestry with it and does not descend from those people. qpAdm models are not part of step 44; docs/44-ancient.md says how to read the plot. Plot: ancient/S_ancient_pca.svg - -## Runs of Homozygosity ---- - Segments: 3 Total: 37.5 MB Largest: 27.0 MB - Autosomal ROH > 5MB: 2 - chr2:10000001-17000000 7.0MB - chr15:23000001-50000000 27.0MB - F_ROH: 0.0128 (34.0 MB in runs of 5 MB or more); nearest: no band (one chromosome holds most of the runs) - ** chr15 carries 27.0 MB, more than 50% of the length in runs of 5 MB or more: both copies may come from one parent (uniparental isodisomy) ** - Imprinted 15q11-q13 (SNRPN, UBE3A): from the mother: -; from the father: - (PMID 22237428;27615419) - Long runs concentrated on one chromosome, with few elsewhere, are the sign of isodisomy: both copies of that chromosome from one parent. They can also be chance in a child of related parents. Which parent gave both copies cannot be told without the parents' samples, and a heterodisomy (two different copies from one parent) leaves no runs at all. The parents' genotypes confirm a UPD. Where an imprinted region is listed, a methylation test of that region tests for its imprinting disorder; on its own it does not prove a UPD (docs/11-roh-analysis.md). - F_ROH is the share of the autosomes (outside the bands) in runs of 5 MB or more. - Left out in centromere and heterochromatin bands: 46.5 MB - Segments on chrX/chrY, not counted: 1 - Autosomes only: chrX and chrY are left out, and so is the part of a segment in a centromere or heterochromatin band (GRCh38 cytoband acen, gvar, stalk), where few markers map. No population allele frequencies were used (bcftools roh --AF-dflt 0.4): read the total and the short segments as rough; the long segments are the signal. - -################################################################################ -# 6. TRAITS AND SCORES: What do studies say about my traits and risk scores? -################################################################################ - -## Traits Panel (step 42) ---- - Read: 3 No genotype at the position: 1 Other allele: 1 - Lp(a) (LPA rs10455872): A/G. one copy (PMID 1) - Lp(a) (LPA rs3798220): T|C. one copy (PMID 1) - R117H (CFTR rs78655421): G/A. one copy (PMID 1) - x (X rs2): C/C. other (PMID 1) - x (X rs3): C/T. A low-quality call at this position (genotype quality 5, below 20): not read; check the reads. (PMID 1) - Not read (no genotype in the gVCF): rs1 - Each reading is what the cited studies found on average in the people they studied, not a diagnosis. A row marked ancestry reads differently in other populations; its note says how. Notes per row: traits/S_traits.tsv - Genotype rules (several sites read together; traits/S_genotype_rules.tsv): - bitter (TAS2R38 rs1): PAV/AVI (not phased). taster (PMID 1) - kidney (APOL1 rs73885319, rs60910145): G0/G1. one G1 (PMID 20647424) - With G2 (rs71785313): G1/G2. G2 (rs71785313): 1 copy of the deletion called. Two APOL1 risk copies (G1/G2): the high-risk genotype of Genovese 2010, which went with focal segmental glomerulosclerosis and hypertension-attributed kidney failure in African Americans. A risk factor, not a diagnosis. - APOE and Alzheimer's disease: a risk factor, not a diagnosis. Many people choose not to learn their APOE result; docs/42-traits.md explains it. - APOE (rs429358): T/C. e3/e4 - -## Polygenic Risk Scores ---- - CAD 0.5 (100/120 variants matched) PGS000018 - T2D 0.1 (10/20 variants matched) PGS000014 - Percentile withheld: the input lists variants only, so each scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, whose genotypes are complete. A gVCF from step 3, or a chip VCF, lists the reference calls and keeps the percentile. Most PRS scores were developed in European-ancestry populations and predict less well for other ancestries, even with an ancestry-adjusted percentile. See docs/25-prs.md. - -## Blood Groups (predicted from the genome) ---- - ABO A A1/O1 (high) - RhD RhD positive . (medium) - Kell . K-/k+ (.) - Predicted from the DNA at the variants that define each antigen, not typed from blood. RhD comes from the read depth over RHD; weak and partial D are not assessed. The evidence for each site is in bloodtype/_bloodtype_evidence.tsv. - -## Telomere content (relative, TelomereHunter) ---- - Telomere content: 1.5 intratelomeric reads per million reads with 48-52% GC - Intratelomeric reads: 40 (floor 2,000 at 30.0x) - WARNING: too few telomeric reads for a stable estimate; do not compare this value. - Relative telomere content (intratelomeric reads per million reads with 48-52% GC), not a telomere length: compare it only with samples of a similar age sequenced on the same platform (docs/10-telomere-analysis.md). - -################################################################################ -# 7. OTHER AND EXPORTS: What else did the run find or write? -################################################################################ - -## Viral DNA in the Unmapped Reads (step 47) ---- - HHV-6: inherited integrated HHV-6B likely - phiX: spike-in (500 reads, 100% of the genome) - HHV-6B: inherited integrated HHV-6 likely (2000 reads, 99% of the genome, 1.0 copies per cell) - From the reads that do not map to the human genome, realigned to a fixed set of human viral genomes. Not a test for an infection: most adults carry herpesviruses that stay in their cells, and reagents carry viral DNA too. HHV-6 integration follows Liu et al. 2020 (depth over the viral genome at 0.30 of the human depth or more). Every genome: viral/_viral.tsv. - -## Steps Not Run ---- - - Coverage (mosdepth) - - Gene callability (mosdepth) - - Sex check (indexcov) - - Sample identity and contamination (somalier, VerifyBamID2) - - Mosaic loss of chromosome Y or X - - ClinVar screen - - PharmCAT - - pypgx - - Cyrius (CYP2D6) - - Cancer predisposition (CPSR) - - Clinical variant filter - - Variant prioritization (slivar) - -## Not Assessed by This Pipeline ---- - - Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes) - - Methylation and imprinting - - Repeat expansions outside the ExpansionHunter catalog - - Phase: two variants in one gene are compound-het candidates, not confirmed - - Variants of uncertain significance (not interpreted) - -================================================================================ - DISCLAIMER: This is NOT a clinical report. Discuss findings with a - qualified healthcare professional before making medical decisions. -================================================================================ From 466150fc7ea6b07ba1a28f3c4eb87bead6d5b0c6 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:15:59 +0100 Subject: [PATCH 008/110] fix(callability): stop counting overlapping mates twice when deciding a gene was read The gene callability pass of step 16b and the MOSDEPTH module ran mosdepth with --fast-mode. That mode counts every base from a read's start to its end: the overlap of two mates counts twice, and a CIGAR deletion counts as read. A gene that fewer than 10 fragments covered could reach 10x and read as read. The gene pass now runs without --fast-mode; the genome-wide 500 bp pass keeps it. The step doc and the lessons-learned entry no longer say that --fast-mode drops the per-base output (--no-per-base does). The new e2e case builds a small BAM: 5 overlapping pairs over one gene (0 bases at 10x, 10 on main), 10 pairs over another (10) and a deletion over a third (0, 10 on main), on both paths, plus a --fast-mode control. Bead: plat-50 --- docs/16b-mosdepth.md | 6 +- docs/lessons-learned.md | 7 +- modules/local/mosdepth/main.nf | 6 +- scripts/16b-mosdepth.sh | 8 +- scripts/ci/e2e-case-paths.tsv | 1 + scripts/ci/e2e-case-times.tsv | 1 + tests/e2e/i411-callability-overlap-1-mates.sh | 110 ++++++++++++++++++ 7 files changed, 129 insertions(+), 10 deletions(-) create mode 100755 tests/e2e/i411-callability-overlap-1-mates.sh diff --git a/docs/16b-mosdepth.md b/docs/16b-mosdepth.md index 8a2f56122..7fdba327d 100644 --- a/docs/16b-mosdepth.md +++ b/docs/16b-mosdepth.md @@ -11,7 +11,7 @@ Reads the BAM file and computes: 2. **Coverage distribution** — cumulative fraction of bases at each depth level 3. **Region coverage** — mean depth in 500bp windows across the genome 4. **Threshold report** — fraction of bases at 1x, 5x, 10x, 15x, 20x, 30x, 50x depth -5. **Gene callability** — for each gene of `assets/callability_genes.tsv` on chr1-22, X and Y, the bases with 10 or more reads of mapping quality 20 or more (a second mosdepth pass) +5. **Gene callability** — for each gene of `assets/callability_genes.tsv` on chr1-22, X and Y, the bases with 10 or more reads of mapping quality 20 or more (a second mosdepth pass, which counts the two mates of a pair once where they overlap) ## Why @@ -90,7 +90,7 @@ Shows what fraction of each region is covered at key depths: A gene can have several reasons. Gene positions are GENCODE 50 gene spans. The `owner` column names the step that calls the gene with a method of its own: `parascopy` (step 35, the genes of `assets/paralog_loci.tsv`), `pypgx` (step 32, the bam genes of `assets/pgx_genes.tsv` it can call on the no-ALT reference, so not GSTT1) or `cn_loci:` (the depth engine, `bin/cn_loci.tsv`: the genes a row names, HBA1, HBA2, LPA and RHD, not a gene that only holds one of its targets); `.` for none. -A gene counts as **read** when 90% or more of its bases have 10 or more reads of MAPQ 20 or more. Both reports have a section "Genes this genome could not read reliably" in the Quality chapter. It lists every gene with no owner that was not read, with the share of its bases that reached that depth, and every ALT-only gene with no owner as "not on this reference". Genes with an owner that were not read are listed apart: their own step's section says what it called. On a partial BAM (the CI fixture, an exome) most genes are not read, because they have no reads at all. +A gene counts as **read** when 90% or more of its bases have 10 or more reads of MAPQ 20 or more. The gene pass runs mosdepth without `--fast-mode`, so a base where the two mates of one pair overlap counts one read, not two, and a base inside a deletion of a read's CIGAR counts no read. With `--fast-mode` mosdepth counts every base from a read's start to its end once per read: short-insert pairs, whose mates overlap, and small deletions lift a base to 10x when fewer than 10 fragments read it, and the gene reads as read. The genome-wide pass (the 500 bp windows and their thresholds) keeps `--fast-mode`: it describes the run's depth, and nothing is decided per gene from it. Both reports have a section "Genes this genome could not read reliably" in the Quality chapter. It lists every gene with no owner that was not read, with the share of its bases that reached that depth, and every ALT-only gene with no owner as "not on this reference". Genes with an owner that were not read are listed apart: their own step's section says what it called. On a partial BAM (the CI fixture, an exome) most genes are not read, because they have no reads at all. `CALLABILITY_GENES` names another table with the same columns (the CI case uses a two-gene one). A table from an older catalog, one that lacks a gene of the current catalog, makes the section unreadable: run step 16b again. When only `_callability.bed.gz` is missing, step 16b runs the gene pass alone. @@ -110,7 +110,7 @@ mosdepth output is automatically detected by MultiQC. The `mosdepth.global.dist. ## Notes -- `--fast-mode` skips per-base output (saves ~10 GB of disk for 30X WGS) while keeping all distributions and thresholds +- The genome-wide pass runs with `--fast-mode`: mosdepth reads only each read's start and end, so it neither corrects for overlapping mates nor reads the CIGAR. That is faster and close enough for the depth summaries. `--no-per-base`, not `--fast-mode`, is what leaves out the large per-base BED. The gene callability pass runs without `--fast-mode` (see [Gene callability](#gene-callability)) - Supports `ALIGN_DIR` variable to use alternative alignments: `ALIGN_DIR=aligned_bwamem2 ./scripts/16b-mosdepth.sh sample` - Supports `CAPTURE_BED` for WES on-target coverage: `CAPTURE_BED=${GENOME_DIR}/captures/my_panel.bed ./scripts/16b-mosdepth.sh sample`. **The BED file must be inside `GENOME_DIR`** — the Docker container only mounts `GENOME_DIR` as `/genome/`, so paths outside it are invisible to the container - mosdepth uses 1 main thread + N decompression threads, so `--threads 4` actually uses 5 threads total diff --git a/docs/lessons-learned.md b/docs/lessons-learned.md index 038d182a3..7430b6ed2 100644 --- a/docs/lessons-learned.md +++ b/docs/lessons-learned.md @@ -314,9 +314,10 @@ Most bioinformatics containers run as non-root users. If writing to bind-mounted - **Observed:** fastp's `--detect_adapter_for_pe` works for Illumina, BGI, and MGI adapters without specifying adapter sequences. BGI/MGI adapters are compiled into fastp's `knownadapters.h`. - **No action needed:** The `--detect_adapter_for_pe` flag handles all common sequencing platforms. -### mosdepth: --fast-mode skips per-base output -- **Observed:** `--fast-mode` uses a simpler, faster counting method and does NOT write the per-base `.per-base.bed.gz` file. This saves ~2 GB of output and cuts runtime by ~40%. -- **Fix:** Always use `--fast-mode` unless per-base resolution is specifically needed. +### mosdepth: --fast-mode counts overlapping mates twice +- **Observed:** `--fast-mode` counts every base from a read's start to its end. It does not correct for the two mates of a pair that overlap, and it does not read the CIGAR, so the bases of a deletion count as read. A short-insert pair lifts the depth of its overlap to 2 where one fragment was read. The per-base `.per-base.bed.gz` is left out by `--no-per-base`, not by `--fast-mode`; this entry said otherwise before. +- **Why it mattered:** step 16b's gene callability pass ran with `--fast-mode`, so a gene with fewer than 10 fragments over its bases could still reach 10x and read as read. +- **Fix:** the gene callability pass runs without `--fast-mode`. The genome-wide 500 bp pass keeps it, because it only describes depth. Use `--fast-mode` only where a base's depth decides nothing. ### MultiQC: Auto-discovers fastp JSON by content, not filename - **Observed:** MultiQC identifies fastp output by looking for `"before_filtering": {` in JSON files, not by filename pattern. Files must end in `.json`. diff --git a/modules/local/mosdepth/main.nf b/modules/local/mosdepth/main.nf index 36e29350f..f27402a7a 100644 --- a/modules/local/mosdepth/main.nf +++ b/modules/local/mosdepth/main.nf @@ -51,14 +51,16 @@ process MOSDEPTH { # Gene callability, as scripts/16b-mosdepth.sh: the genes with a position # (not the ALT-only ones), reads of MAPQ 20 or more, bases at 10x or more. # It writes into callability/, so its own summary and region files never - # match the globs of the outputs above. + # match the globs of the outputs above. No --fast-mode: without it the + # bases where the two mates of a pair overlap count once and the bases of a + # CIGAR deletion do not count, so a gene is read only when 10 fragments + # cover it. mkdir -p callability awk -F'\\t' -v OFS='\\t' '!/^#/ && \$1 != "gene" && \$4 ~ /^[0-9]+\$/ {print \$3, \$4, \$5, \$1}' \\ ${callability_genes} > callability/genes.bed mosdepth \\ --by callability/genes.bed \\ --mapq 20 \\ - --fast-mode \\ --no-per-base \\ --threads ${task.cpus} \\ --thresholds 10 \\ diff --git a/scripts/16b-mosdepth.sh b/scripts/16b-mosdepth.sh index ca9de7b10..8e2deb421 100755 --- a/scripts/16b-mosdepth.sh +++ b/scripts/16b-mosdepth.sh @@ -51,6 +51,10 @@ mkdir -p "$OUTPUT_DIR" # more only, the bases at 10x or more per gene (the same command as the # MOSDEPTH module). The genes with no position on chr1-22, X or Y (ALT-only) # are left out of the BED; the report reads them from the table. +# No --fast-mode here: without it mosdepth counts the bases where the two mates +# of a pair overlap once, not twice, and does not count the bases of a deletion +# in the CIGAR. With it, a short-insert pair or a deletion lifts bases to 10x +# that fewer than 10 fragments read, and a gene reads as read when it was not. callability_pass() { local work="${OUTPUT_DIR}/callability.part" rm -rf "$work" @@ -63,7 +67,6 @@ callability_pass() { mosdepth \ --by "/genome/${SAMPLE}/mosdepth/callability.part/genes.bed" \ --mapq 20 \ - --fast-mode \ --no-per-base \ --threads "${THREADS}" \ --thresholds 10 \ @@ -92,7 +95,8 @@ fi # mosdepth flags: # --by 500 Window size for per-region coverage (500bp bins; WGS default) # --by Capture BED for on-target coverage (WES; set CAPTURE_BED env var) -# --fast-mode Use faster algorithm (does NOT skip per-base output by itself) +# --fast-mode Skip the CIGAR and the mate-overlap correction: faster, and fine +# for these depth summaries (the gene pass above runs without it) # --no-per-base Omit the large per-base BED (saves ~3-5 GB per WGS sample) # --threads Decompression threads (mosdepth uses 1 main + N decompression) # --thresholds Report fraction of bases at these coverage thresholds diff --git a/scripts/ci/e2e-case-paths.tsv b/scripts/ci/e2e-case-paths.tsv index 24aecec80..c5b56fe97 100644 --- a/scripts/ci/e2e-case-paths.tsv +++ b/scripts/ci/e2e-case-paths.tsv @@ -106,6 +106,7 @@ haplogroup-explore-1-files assets/callability_genes.tsv assets/live/index.html a hba-short-read-accuracy-1-nf-report assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/export_consumer/* modules/local/html_report/* modules/local/vcf_precheck/* scripts/24-html-report.sh scripts/40-export-consumer.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz hla-second-caller-1-bash assets/pgx_genes.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat bin/cn_loci.tsv bin/og bin/render_report.py scripts/08-hla-typing.sh scripts/24-html-report.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh hla-second-caller-2-nextflow assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/pgx_genes.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/hla_typing/* modules/local/html_report/* modules/local/pgx_consensus/* modules/local/pharmcat/* modules/local/t1k_build/* modules/local/vcf_precheck/* scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/21-cyrius.sh scripts/24-html-report.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/cyrius-constraints.txt scripts/setup.sh scripts/validate-setup.sh +i411-callability-overlap-1-mates modules/local/mosdepth/* scripts/16b-mosdepth.sh scripts/lib/common.sh ibd-segments-1 assets/families.example.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/stub/pedigree.tsv bin/family_report.py bin/og rust/crates/og-dev/src/fixture.rs scripts/38-family.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh live-server-1-weblog assets/live/* assets/viewer/index.html bin/live_results.py bin/og bin/owngenome_live.py bin/owngenome_live_results.py bin/render_report.py bin/run_state.py modules/local/roh/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh lpa-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/deepvariant/* modules/local/html_report/* modules/local/lpa/* modules/local/vcf_precheck/* scripts/24-html-report.sh scripts/46-lpa.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh diff --git a/scripts/ci/e2e-case-times.tsv b/scripts/ci/e2e-case-times.tsv index 7d028ba47..146ceecb3 100644 --- a/scripts/ci/e2e-case-times.tsv +++ b/scripts/ci/e2e-case-times.tsv @@ -105,6 +105,7 @@ haplogroup-explore-1-files shard 59 - hba-short-read-accuracy-1-nf-report shard 111 - hla-second-caller-1-bash shard 482 - hla-second-caller-2-nextflow shard 188 hla-second-caller-1-bash +i411-callability-overlap-1-mates shard 40 - ibd-segments-1 shard 239 - live-server-1-weblog shard 18 - lpa-1 shard 42 - diff --git a/tests/e2e/i411-callability-overlap-1-mates.sh b/tests/e2e/i411-callability-overlap-1-mates.sh new file mode 100755 index 000000000..aa0372fb4 --- /dev/null +++ b/tests/e2e/i411-callability-overlap-1-mates.sh @@ -0,0 +1,110 @@ +#!/usr/bin/env bash +# Step 16b's gene callability counts the two mates of a pair once where they +# overlap, on both paths, with the real mosdepth image. +# +# A made-up BAM on a 3,000-base chr20 holds three 10-base genes: +# TEST_OVERLAP 5 pairs whose mates both cover the gene: 5 fragments, so no +# base reaches 10x. With --fast-mode mosdepth counts each base +# twice, 10x, and the gene read as read. +# TEST_PAIRS 10 such pairs: 10 fragments, every base at 10x (control: the +# pass still counts each pair once, not zero times). +# TEST_DEL 10 single reads with a 10-base deletion over the gene: no read +# has a base there. With --fast-mode the deletion counted 10x. +# scripts/16b-mosdepth.sh (CALLABILITY_GENES) and the MOSDEPTH module, run alone +# through a one-line pipeline, must both write 0, 10 and 0 bases at 10x. A run +# of the same image with --fast-mode on the same BAM must write 10, 10 and 10, +# so the BAM does hold what the gene pass must not count twice. +. "$(dirname "$0")/lib.sh" + +command -v nextflow >/dev/null || { fail "nextflow is not on PATH"; finish; } + +S="${SAMPLE}-ovl" +SD="${GENOME_DIR}/${S}" +rm -rf "${SD:?}" +mkdir -p "${SD}/aligned" + +CAT="${CASE_TMP}/callability_genes.tsv" +{ + printf 'gene\thgnc_id\tchrom\tstart\tend\treasons\towner\n' + printf 'TEST_OVERLAP\tHGNC:0\tchr20\t1000\t1010\tsegdup\t.\n' + printf 'TEST_PAIRS\tHGNC:1\tchr20\t1500\t1510\tsegdup\t.\n' + printf 'TEST_DEL\tHGNC:2\tchr20\t2000\t2010\tsegdup\t.\n' +} > "$CAT" + +# The reads: 60-base mates 20 bases apart (insert 80), both over the gene, and +# 80-base reads with 40M10D40M whose deletion is the gene's 10 bases. +SAM="${SD}/aligned/in.sam" +s60=$(printf 'A%.0s' $(seq 60)); q60=$(printf 'I%.0s' $(seq 60)) +s80=$(printf 'A%.0s' $(seq 80)); q80=$(printf 'I%.0s' $(seq 80)) +{ + printf '@HD\tVN:1.6\tSO:unsorted\n@SQ\tSN:chr20\tLN:3000\n' + for i in 1 2 3 4 5; do + printf 'ov%s\t99\tchr20\t961\t60\t60M\t=\t981\t80\t%s\t%s\n' "$i" "$s60" "$q60" + printf 'ov%s\t147\tchr20\t981\t60\t60M\t=\t961\t-80\t%s\t%s\n' "$i" "$s60" "$q60" + done + for i in $(seq 10); do + printf 'pr%s\t99\tchr20\t1461\t60\t60M\t=\t1481\t80\t%s\t%s\n' "$i" "$s60" "$q60" + printf 'pr%s\t147\tchr20\t1481\t60\t60M\t=\t1461\t-80\t%s\t%s\n' "$i" "$s60" "$q60" + done + for i in $(seq 10); do + printf 'dl%s\t0\tchr20\t1961\t60\t40M10D40M\t*\t0\t0\t%s\t%s\n' "$i" "$s80" "$q80" + done +} > "$SAM" +docker run --rm --user "$(id -u):$(id -g)" -v "${GENOME_DIR}:/genome" -w /genome "$SAMTOOLS_IMAGE" sh -c \ + "samtools sort -o '${S}/aligned/${S}_sorted.bam' '${S}/aligned/in.sam' && samtools index '${S}/aligned/${S}_sorted.bam'" +BAM="${SD}/aligned/${S}_sorted.bam" +check "the made-up BAM and its index exist" test -s "${BAM}.bai" +check_eq "the made-up BAM holds 40 reads" "$(sam view -c "${S}/aligned/${S}_sorted.bam" 2>/dev/null)" 40 + +# at10 TABLE GENE: the gene's bases at 10x or more (column 10X of the table) +at10() { gzip -dc "$1" 2>/dev/null | awk -F'\t' -v g="$2" '$4 == g {print $5}'; } + +# --- the input: --fast-mode counts the overlap and the deletion ----------------------- +awk -F'\t' -v OFS='\t' 'NR > 1 {print $3, $4, $5, $1}' "$CAT" > "${SD}/fast.bed" +docker run --rm --user "$(id -u):$(id -g)" -v "${GENOME_DIR}:/genome" -w "/genome/${S}" "$MOSDEPTH_IMAGE" \ + mosdepth --by fast.bed --mapq 20 --fast-mode --no-per-base --thresholds 10 fast "aligned/${S}_sorted.bam" +F="${SD}/fast.thresholds.bed.gz" +check_eq "input: --fast-mode counts TEST_OVERLAP's 5 pairs as 10x" "$(at10 "$F" TEST_OVERLAP)" 10 +check_eq "input: --fast-mode counts TEST_DEL's deletion as 10x" "$(at10 "$F" TEST_DEL)" 10 +check_eq "input: --fast-mode counts TEST_PAIRS at 10x" "$(at10 "$F" TEST_PAIRS)" 10 + +# --- step 16b --------------------------------------------------------------------------- +CALLABILITY_GENES="$CAT" THREADS=2 run_step 16b-mosdepth.sh "$S" +check_step_exit 16b-mosdepth.sh +T="${SD}/mosdepth/${S}_callability.bed.gz" +echo "step 16b's table:"; gzip -dc "$T" 2>/dev/null +check_eq "bash: TEST_OVERLAP's 5 overlapping pairs reach 10x on no base" "$(at10 "$T" TEST_OVERLAP)" 0 +check_eq "bash: TEST_PAIRS's 10 pairs reach 10x on all 10 bases" "$(at10 "$T" TEST_PAIRS)" 10 +check_eq "bash: TEST_DEL's deleted bases reach 10x on no base" "$(at10 "$T" TEST_DEL)" 0 + +# --- the MOSDEPTH module ---------------------------------------------------------------- +NP="${CASE_TMP}/project" +rm -rf "$NP" "${CASE_TMP}/out" "${CASE_TMP}/work" +mkdir -p "$NP" +cat > "${NP}/main.nf" < "${NP}/nextflow.config" < "${CASE_TMP}/nf.log" 2>&1 +RC=$? +check_eq "nextflow run (MOSDEPTH) exits 0" "$RC" 0 +[ "$RC" = 0 ] || grep -E 'ERROR|Error executing process|Command error' -A 8 "${CASE_TMP}/nf.log" | head -40 +N="${CASE_TMP}/out/${S}/coverage/${S}_callability.bed.gz" +check_eq "Nextflow: TEST_OVERLAP's 5 overlapping pairs reach 10x on no base" "$(at10 "$N" TEST_OVERLAP)" 0 +check_eq "Nextflow: TEST_PAIRS's 10 pairs reach 10x on all 10 bases" "$(at10 "$N" TEST_PAIRS)" 10 +check_eq "Nextflow: TEST_DEL's deleted bases reach 10x on no base" "$(at10 "$N" TEST_DEL)" 0 +check_eq "MOSDEPTH's table is step 16b's" "$(gzip -dc "$N" 2>/dev/null | md5sum)" "$(gzip -dc "$T" 2>/dev/null | md5sum)" + +rm -rf "${SD:?}" +finish From 5ffb4041832d61925e2a85c9da3f2923c931a13b Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:22:33 +0100 Subject: [PATCH 009/110] ci(e2e): run the e2e cases that use og when rust/ changes rust/ was outside the e2e scope (but for two og-dev files), so a pull request that changed only Rust code ran no e2e case, and its merge started no run on main. A change under rust/ now counts as a change to bin/og: it picks every case whose paths row has a glob that matches bin/og. The push paths of e2e.yml gain rust/**. 19 rows of cases that run og through a step, helper or module now list bin/og. Bead: plat-09 --- .github/workflows/e2e.yml | 3 +-- CHANGELOG.md | 3 ++- docs/rust.md | 1 + docs/testing.md | 6 ++--- scripts/ci/e2e-case-paths.tsv | 43 +++++++++++++++++++---------------- scripts/ci/e2e-scope.sh | 24 ++++++++++++++----- tests/test_e2e_scope.sh | 27 +++++++++++++++++++++- 7 files changed, 74 insertions(+), 33 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d6e5a5cbf..30af2c3e3 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -58,6 +58,7 @@ on: - 'bin/**' - 'conf/**' - 'assets/**' + - 'rust/**' - 'tests/e2e/**' - 'tests/fixtures/VERSION' - 'main.nf' @@ -65,8 +66,6 @@ on: - 'nextflow_schema.json' - 'versions.env' - '.github/workflows/e2e.yml' - - 'rust/crates/og-dev/src/fixture.rs' - - 'rust/crates/og-dev/src/traits_sources.rs' - '.github/actions/**' - 'tests/fixtures/annotsv/class45.sh' - 'tests/fixtures/consumer_export/sites.tsv.gz' diff --git a/CHANGELOG.md b/CHANGELOG.md index 79deccf48..c14bc7049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- A pull request that changes only Rust code now runs the e2e cases that run `og`. Before, `rust/` was outside the e2e scope, but for two files of `og-dev`, so such a pull request ran no case, and a merge of it started no run on main: a change in what `og` writes reached main with no real-tool run. A change under `rust/` now picks every case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, as a change to `bin/og` does, and main runs every case after such a merge. 19 case rows that run `og` through a step, helper or module now list `bin/og`. `tests/test_e2e_scope.sh` checks the pick. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. @@ -11,7 +12,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n - The privacy page now says what the CPSR (step 17) and MultiQC (step 28) reports contact when you open them: nothing. Both keep their stylesheets, scripts and images inside the HTML file, and their external addresses are plain links. The page said before that these two reports were not checked. Docs only; no output changes. - Guard's new `mito-workdir` job fails when the Nextflow `MITO_HAPLOGROUP` process has a `cd` or a `readlink -f`: haplogrep3 must run in the task directory. There the pinned build uses the config and trees beside its jar, and Nextflow collects the report. The check reads only that process, so the `readlink -f` of the reference in `MITO_EXTRACT_CHRM` stays allowed. Its self-test plants a `cd`, a `readlink -f` and a renamed process, which must each fail, and a `cd` in `MITO_EXTRACT_CHRM`, which must not. No output changes. - The 1.0.0 release notes said steps 21, 32 and 9b still run Python for the CYP2D6 depth check and the RFC1 motif count. They run `og`, and the Python files are gone; the notes now say so. `docs/00-reference-setup.md` lists the GIAB tandem-repeat map `setup.sh` installs for step 04c, with its source, its checksum and what the step does without it. -- A change to `rust/crates/og-dev/src/traits_sources.rs`, the source of `og dev traits-sources`, now runs the `traits-panel-1` e2e case, which calls that command. Before, the file was in no case row and not in the e2e scope, so a change to it ran no e2e case. The path is in the case row, in `SCOPE_FILES` of `scripts/ci/e2e-scope.sh` and in the push paths of `e2e.yml`. +- A change to `rust/crates/og-dev/src/traits_sources.rs`, the source of `og dev traits-sources`, now runs the `traits-panel-1` e2e case, which calls that command. Before, the file was in no case row and not in the e2e scope, so a change to it ran no e2e case. The path is in the case row, and the e2e scope covers it with the rest of `rust/`. - The docs demo sample, DEMO-001, is written by the Rust `og` binary: `og dev demo-sample --genome-dir DIR` writes it and `og dev demo-sample check --genome-dir DIR` stops when a report section is not ok. The picture retake script (`tests/demo/retake-screenshots.sh`), the live-site demo (`tests/demo/build_live_demo.py`) and the report and live-results tests run it in place of `tests/demo/make_demo_sample.py`, which stays only for the older tests that still import or run it (`test_live_journal.py`, `test_lpa_kiv2.py`, `test_report_charts.py`, `test_vcf_precheck_samples.sh`) until they move. Every table a step writes with og is written by that og verb, so the demo shows what the product writes. Every fixed table is byte for byte the Python's (the PharmCAT report, the CPIC tables, blood groups, traits, the ClinVar, AnnotSV and Exomiser rows with the son's planted results), and step 24 reads every section of DEMO-001 as ok. The random values come from a new seeded generator, so the made-up counts, depths and scores of the demo differ from before; the planted findings keep their genes and positions. The retake script now runs `bin/og` on the host instead of `python3`, and its mount probe looks for `bin/og`. Pipeline outputs do not change. - The live family page keeps a child's closed results out of the de novo and compound-het tables of that child's own children. A person whom one family lists as a child, with a result to act on still unopened, can be a parent in a family with three generations. Their children's trio rows hold their calls: the parent each variant came from, and their genotype at each de novo candidate. The page left out the gated person's own rows but drew those of their children, so the grandparents' family page showed them. Now both tables of a child stay out of the family view while the child or either parent is gated, and chapter IV says so in one fixed line that does not depend on which rows there are. The tables come back once that parent's results are opened on the page. `family.json` does not change; only what the page draws from it. A node test (`tests/test_live_family_hide_closed.sh`) runs `core.js` and `family-page.js` on an invented family, with controls that cut the rule out. - The live-site docs answer two things a reader looked for and did not find. "Start it" says that Ctrl+C in the site's terminal stops it, and the systemd unit says how to save, start and stop it. "Behind a reverse proxy" says the site needs a host name of its own, served at its root: the pages ask for root paths such as `/login` and `/runs.json`, and there is no flag for a path prefix. Docs only; nothing the site does changes. diff --git a/docs/rust.md b/docs/rust.md index bda0a8ffb..bbb869513 100644 --- a/docs/rust.md +++ b/docs/rust.md @@ -117,6 +117,7 @@ To add a primitive: write it in `pycompat` with unit tests, add an operation to - **Guard, job `rust`** (every pull request, required through `ci-ok`): `cargo fmt --check`; `cargo clippy -D warnings`; a planted failing test (`--features planted-failure`) that must fail; the planted mistakes of the live ops card (`-p og-live --features fault-inject`, the `planted_*` tests of `crates/og-live/tests/ops*.rs`), every one of which must fail its check; `cargo test`; the differential test at 100,000 cases per operation; the four builds through `scripts/setup.sh --og` (both musl ones and the macOS pair); and the stale check on the real binaries, which must refuse them after an edit to `rust/`, in `rust/og.sh check` and in `nextflow run main.nf -stub`, before any task. Then the fake-docker case `reports-stale-step` runs with `bin/og` and must check its `summary.json` with `og dev schema`, and every test that carries the line `# og-leg: OG_REQUIRED` (the tests that run `og`, such as the `og sv` and `og pgx` filter tests, the step 05 tests and `tests/test_ancestry_fine_report.py`) runs with `bin/og` and `OG_REQUIRED=1`; in `unit-tests`, which has no `og`, they skip with a note. A new test that needs `og` adds that line; the job has no list to edit. Before the real run the step plants a marked test with a failing assert, which must be picked and fail. The planned-verb test must fail once one verb's arm is dropped from `og/src/main.rs`. `cargo test` includes `og dev contract --static` and `og dev report-only` on the checkout (`rust/crates/og-dev/tests/repo.rs`). Its unit tests run `og dev params-doc` on the checkout too: every parameter of `nextflow_schema.json` has one row in `docs/parameters.md`, and every row names a parameter. It also runs `og dev helpers --static` and `--list` on the checkout (`rust/crates/og-dev/tests/helpers_repo.rs`); the `helper-binaries` job runs the same verb through `scripts/ci/check-container-helpers.sh`, with the og the `og` job builds. - **Guard, job `unit-tests`**: `tests/test_og_check.sh` runs the check on planted trees (no binary, a stale one, an edit that is uncommitted, untracked or committed, a file git ignores, a binary stamped `unknown`, a fresh and a stale macOS pair, a tree hash that cannot be computed, a release download with a bad checksum or attestation, without the macOS pair, with `gh` not logged in, with a network error, without binaries, or whose copy into `bin/.og` fails), and checks that `run-all.sh`, `validate-setup.sh` and `write_manifest.sh` act on it. - **Rust** (`rust.yml`, on a pull request that touches the Rust code, the shim or `versions.env`): times a cold and a cached build, runs `og` by bare name in the four images on amd64 and arm64 (QEMU), runs that check once more with a wrong-arch binary planted, which must fail, runs the fetch smoke with both binaries (arm64 under QEMU) and with pysam in `PYPGX_IMAGE`, which must all match `fetch.pysam.tsv`, and keeps the binaries as the artifact `og-binaries`. Every night it runs the differential test at 10,000,000 cases per operation with a new seed. +- **E2E** (`e2e.yml`): a pull request that changes `rust/` runs the smoke cases and every e2e case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, the cases that run `og` on real tool output ([Which cases a pull request runs](testing.md#which-cases-a-pull-request-runs)). A merge to main that changes `rust/` runs every case. - **Release** (`release.yml`): a tag builds the four binaries and `THIRD-PARTY-LICENSES.txt`, writes `SHA256SUMS` over all five, checks them with `scripts/ci/check-release.sh dist` (each file there, listed once and matching its sum, and the notices of the Rust standard library, musl, htslib and htscodecs in the licence file), attests them and attaches all six files to the release. A pull request that changes `rust/` or the workflow builds them as a dry run, with the same check. - **`og dev licences notices`**: `cargo test -p og-dev --test licences` runs it through real `cargo metadata` on a planted workspace. The crates the binary links must all be credited, each text once; build, dev, procedural-macro, other-target and feature-off crates must not be; an extra part's HTML notices must come out as text; and a crate under SSPL-1.0, one with no licence text that MIT cannot cover, a licence file it cannot read and a missing extra file must each stop it. diff --git a/docs/testing.md b/docs/testing.md index 408186b35..5f2246b06 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -82,7 +82,7 @@ In CI the cases run in parallel legs, each case at most once: a pull request run - The shard that holds `nextflow-from-fastq-2-nextflow` and the one that holds `nextflow-hardening-2-nf` run the parity checks; the plan fails when either case runs and the case before it in its pair is in a different shard. - The required check is the job `e2e`. It merges every leg's results into one table of case, result, time and job, followed by the failed checks of each failed case, and it is red unless the plan and every leg succeeded, every picked case reported exactly one pass and each parity check passed once when its cases ran (and not at all when they did not). It is red too when `e2e-scope` did not succeed. A leg that was skipped, cancelled or cut by its limit leaves cases with no result, and that is red too. The full logs are in the `e2e-logs-` artifacts. -`tests/test_e2e_shards.sh` (unit tests) checks the split against planted faults: a case listed twice or missing, a stale or malformed table row, a need on a case that runs later, a pick that leaves out a need, and results missing, failed or reported twice; the leg count; and a case with no row, which `check` must name. `tests/test_e2e_scope.sh` checks the pick: a case with no paths row, a second row, a row for no case and a glob that matches no file must each fail `e2e-scope.sh check`, and a docs-only change, a change to `main.nf`, a change to one helper, to one module, to a case and to a table row must each pick the cases listed below. +`tests/test_e2e_shards.sh` (unit tests) checks the split against planted faults: a case listed twice or missing, a stale or malformed table row, a need on a case that runs later, a pick that leaves out a need, and results missing, failed or reported twice; the leg count; and a case with no row, which `check` must name. `tests/test_e2e_scope.sh` checks the pick: a case with no paths row, a second row, a row for no case and a glob that matches no file must each fail `e2e-scope.sh check`, and a docs-only change, a change to `main.nf`, a change to one helper, to one module, to a case, to a table row and to `rust/` must each pick the cases listed below. On the real table, a change to `rust/` must pick what a change to `bin/og` picks. To measure the table again, run the E2E workflow by hand with `job: e2e` and `trace: true`. That run puts every non-base case in one shard, so it runs as long as one serial run. After each case `e2e-run.sh` records its time and, with the file systems remounted `strictatime`, every file under the work area and the checkout whose atime moved during the case, attributed to the case whose run last changed that file's ctime. The job `e2e` then prints a new `e2e-case-times.tsv` in its summary and uploads it as the artifact `e2e-case-times`; it keeps each row's stage and needs and adds the traced needs. It refuses a trace that saw no case read another case's file. The traced needs are an upper bound, not the table to commit: a file counts for the case that changed it last, so a case that rewrites or touches a shared file (a report, an index) shows up as a need of every later case that reads that file, and a case that scans a folder reads everything in it. On the trace of run 41454755531 they joined almost every case into one group, so check each traced need against the case before you add it. A read the trace cannot see, such as a test for whether a file exists, is not in the table: such a case fails in its shard, and its row then needs a hand-written `needs`. @@ -92,9 +92,9 @@ Every pull request starts the workflow, so main can require the e2e check. Its ` A pull request's e2e run used to run every case: 2 h 17 min from start to end and 339 job-minutes with free runners (run 41774860458, 2026-11-04), while most cases cannot be affected by a given change. [`scripts/ci/e2e-scope.sh`](https://github.com/GeiserX/OwnGenome/blob/main/scripts/ci/e2e-scope.sh) now picks the cases from the files the pull request changed since it left main (`git diff BASE...HEAD`, three dots): -- **None** when no changed path is in the e2e scope: `scripts/`, `modules/`, `workflows/`, `bin/`, `conf/`, `assets/`, `tests/e2e/`, `tests/fixtures/VERSION`, `main.nf`, `nextflow.config`, `nextflow_schema.json`, `versions.env`, `.github/workflows/e2e.yml`, `.github/actions/`, and the committed files under `tests/fixtures/` that a case reads (each named in `SCOPE_FILES` and in that case's row; the other files there feed only the unit tests). +- **None** when no changed path is in the e2e scope: `scripts/`, `modules/`, `workflows/`, `bin/`, `conf/`, `assets/`, `rust/`, `tests/e2e/`, `tests/fixtures/VERSION`, `main.nf`, `nextflow.config`, `nextflow_schema.json`, `versions.env`, `.github/workflows/e2e.yml`, `.github/actions/`, and the committed files under `tests/fixtures/` that a case reads (each named in `SCOPE_FILES` and in that case's row; the other files there feed only the unit tests). - **Every case** when a changed path is shared wiring (`FULL` in the script): `main.nf`, `nextflow.config`, `nextflow_schema.json`, `versions.env`, `assets/steps.tsv`, `workflows/`, `conf/`, `scripts/lib/`, `scripts/run-all.sh`, steps 02 and 03 (the BAM and VCF every case starts from), the fixture (`tests/fixtures/VERSION`, `scripts/ci/build-fixture.sh`), and the e2e runner and planner (`e2e-run.sh`, `e2e-shards.sh`, `e2e-scope.sh`, `tests/e2e/lib.sh`, `tests/e2e/bin/`, `e2e.yml`) with the composite actions every leg runs (`.github/actions/`). Also when the pull request carries the label `e2e-full`: the scope job reads the labels when it runs, so add the label and re-run the workflow (or push). -- **Otherwise** the smoke cases `nextflow-from-fastq-1-bash` and `nextflow-from-fastq-2-nextflow` (the bash steps and the pipeline from FASTQ, and their parity check), every case whose own file changed, every case whose row in `e2e-case-paths.tsv` or `e2e-case-times.tsv` changed, every case with a path glob that matches a changed file, and the cases those need (`needs`, followed through). +- **Otherwise** the smoke cases `nextflow-from-fastq-1-bash` and `nextflow-from-fastq-2-nextflow` (the bash steps and the pipeline from FASTQ, and their parity check), every case whose own file changed, every case whose row in `e2e-case-paths.tsv` or `e2e-case-times.tsv` changed, every case with a path glob that matches a changed file, and the cases those need (`needs`, followed through). A change under `rust/` counts as a change to `bin/og`, which runs the binary built from it: it runs every case with a glob that matches `bin/og`. So a case that runs `og`, itself or through a step script, helper or module, lists `bin/og` in its row. The base leg runs every base case whenever any case runs, because every shard starts from what they wrote. A change to a base step other than 02 and 03 therefore runs the base cases, the smoke cases and the cases that list the step, but not a shard case that only reads that step's output: the full run on main after the merge is what tests those. The job summary of `e2e-scope` lists every picked case with the reason it was picked. diff --git a/scripts/ci/e2e-case-paths.tsv b/scripts/ci/e2e-case-paths.tsv index 24aecec80..82d06b4b5 100644 --- a/scripts/ci/e2e-case-paths.tsv +++ b/scripts/ci/e2e-case-paths.tsv @@ -10,7 +10,10 @@ # runs, the base leg runs every base case. # A case runs on a pull request when one of its globs matches a changed path, # when its own file or one of its table rows changes, when a case that runs -# needs it, or when it is one of the smoke cases. A change to shared wiring +# needs it, or when it is one of the smoke cases. A change under rust/ (og's +# sources) runs every case with a glob that matches bin/og, so a case that +# runs og, itself or through a step, helper or module, lists bin/og. +# A change to shared wiring # (FULL in e2e-scope.sh: main.nf, the workflows, the config, the shared # library, the launcher, the alignment and calling steps, the fixture, the # e2e runner) runs every case. Every case needs a row, and every glob must @@ -55,15 +58,15 @@ archaic-ancestry-1 assets/pgs_scores.tsv bin/og bin/collect_summary.py modules/l bash-step-08-hla - bash-step-09-str assets/str_extra_loci.json assets/stub/db/catalog.json bin/og scripts/09-expansion-hunter.sh scripts/09b-stranger.sh scripts/ci/fake-docker/lib.sh bash-step-10-telomere scripts/10-telomere-hunter.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh -bash-step-11-roh scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh +bash-step-11-roh scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh bin/og bash-step-14-imputation scripts/14-imputation-prep.sh scripts/ci/fake-docker/lib.sh bash-step-19-delly scripts/19-delly.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh -bash-step-20-numt assets/callability_genes.tsv bin/collect_summary.py scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh +bash-step-20-numt assets/callability_genes.tsv bin/collect_summary.py scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh bin/og bash-step-bash42 assets/construct_variants.tsv bin/cpsr_sample_id bin/og scripts/03d-octopus.sh scripts/04a-tiddit.sh scripts/10-telomere-hunter.sh scripts/17-cpsr.sh scripts/19-delly.sh scripts/ci/fake-docker/lib.sh bloodtype-1 assets/bloodtype_markers.tsv bin/cn_loci.tsv bin/og modules/local/bloodtype/* modules/local/vcf_precheck/* scripts/41-bloodtype.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bumps-drop-in-baseline scripts/ci/fake-docker/lib.sh callability-1-catalog assets/callability_genes.tsv assets/paralog_loci.tsv assets/pgx_genes.tsv bin/cn_loci.tsv bin/og scripts/ci/build-callability.sh scripts/ci/fake-docker/lib.sh scripts/ci/lib/fetch-pinned.sh -callability-2-genes assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +callability-2-genes assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og chip-clonal-1 assets/chip_genes.tsv bin/og bin/render_report.py modules/local/chip/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/49-chip.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh chip-mt-1-roundtrip assets/par_grch38.bed bin/og rust/crates/og-dev/src/fixture.rs scripts/40-export-consumer.sh scripts/chip-to-vcf.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz ci-e2e-2-locityper assets/locityper_loci.bed bin/og scripts/53-locityper.sh scripts/setup.sh @@ -82,7 +85,7 @@ cn-report-1-tables assets/carrier_genes.tsv assets/par_grch38.bed bin/collect_su comphet-phasing-1-reads assets/construct_variants.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/og modules/local/slivar/* modules/local/vcf_precheck/* modules/local/vep/* scripts/13-vep-annotation.sh scripts/31-slivar.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh rust/crates/og-dev/src/fixture.rs construct-scan-1-both assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/html_report/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh consumer-export-1 assets/chip_genes.tsv assets/par_grch38.bed bin/og modules/local/chip/* modules/local/export_consumer/* modules/local/vcf_precheck/* scripts/40-export-consumer.sh scripts/49-chip.sh scripts/chip-to-vcf.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz -containers-software-versions scripts/ci/fake-docker/lib.sh scripts/ci/gen-containers-config.sh +containers-software-versions scripts/ci/fake-docker/lib.sh scripts/ci/gen-containers-config.sh bin/og couple-carrier-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/families.example.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/paralog_loci.tsv assets/pedigree.example.tsv assets/pgx_genes.tsv assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/pedigree.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/couple/* modules/local/delly/* modules/local/expansion_hunter/* modules/local/hla_typing/* modules/local/html_report/* modules/local/parascopy/* modules/local/somalier/* modules/local/t1k_build/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/08-hla-typing.sh scripts/09-expansion-hunter.sh scripts/19-delly.sh scripts/24-html-report.sh scripts/32-pypgx.sh scripts/33-sample-qc.sh scripts/35-paralogs.sh scripts/36-pgx-consensus.sh scripts/38-family.sh scripts/39-couple.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh couple-common-sv-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/families.example.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/stub/pedigree.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/couple/* modules/local/delly/* modules/local/html_report/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/19-delly.sh scripts/24-html-report.sh scripts/38-family.sh scripts/39-couple.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh cpic-phenoconversion-1-medications assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv bin/cn_loci.tsv bin/collect_summary.py bin/og modules/local/cpic_lookup/* modules/local/pharmcat/* modules/local/vcf_precheck/* scripts/07-pharmacogenomics.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh @@ -93,7 +96,7 @@ families-file-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_g family-joint-1 assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/families.example.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/stub/pedigree.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/collect_summary.py bin/family_report.py bin/og modules/local/align_minimap2/* modules/local/clinvar_screen/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/somalier/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/11-roh-analysis.sh scripts/33-sample-qc.sh scripts/38-family.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh fixitfelix-chr21-1 assets/callability_genes.tsv scripts/16b-mosdepth.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh bin/og followups-ci-3-sv-rule-regions assets/sv_rule_regions.tsv bin/og scripts/ci/build-sv-rule-regions.sh scripts/ci/fake-docker/lib.sh scripts/ci/lib/fetch-pinned.sh -followups-clinvar-traits-1-rules-html assets/genotype_rules.tsv assets/traits.tsv bin/render_report.py scripts/42-traits.sh scripts/ci/check-rule-alleles.sh +followups-clinvar-traits-1-rules-html assets/genotype_rules.tsv assets/traits.tsv bin/render_report.py scripts/42-traits.sh scripts/ci/check-rule-alleles.sh bin/og followups-cn-1-couple-report assets/carrier_genes.tsv assets/par_grch38.bed assets/stub/pedigree.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/couple/* modules/local/html_report/* scripts/39-couple.sh scripts/ci/fake-docker/lib.sh followups-nf-1-nf-wiring assets/stub/* assets/test_samplesheet.csv assets/steps.tsv bin/collect_summary.py bin/render_report.py bin/results_index.py bin/run_state.py conf/test.config conf/test_all.config conf/containers.config modules/local/html_report/* modules/local/couple/* modules/local/parascopy/* modules/local/deepvariant/* modules/local/cpsr/* modules/local/clinvar_screen/* modules/local/locityper/* workflows/* tests/fixtures/consumer_export/sites.tsv.gz bin/og genome-lookup-1 bin/og scripts/ci/fake-docker/lib.sh scripts/owngenome-lookup.sh @@ -115,7 +118,7 @@ mocha-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv mosaic-loy-lox-1 assets/callability_genes.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/16b-mosdepth.sh scripts/33-sample-qc.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh nextflow-from-fastq-1-bash assets/callability_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/pgs_scores.tsv assets/pgx_genes.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat bin/cn_loci.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/11-roh-analysis.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/25-prs.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/ci/parity-diff.sh scripts/validate-setup.sh nextflow-from-fastq-2-nextflow assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/live/index.html assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgs_scores.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/viewer/index.html bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/align_minimap2/* modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/cyrius/* modules/local/deepvariant/* modules/local/fastp/* modules/local/hla_typing/* modules/local/html_report/* modules/local/indexcov/* modules/local/mito_haplogroup/* modules/local/mito_variants/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/prs/* modules/local/roh/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/vcfanno/* scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/21-cyrius.sh scripts/24-html-report.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/30-vcfanno.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/cyrius-constraints.txt scripts/validate-setup.sh -nextflow-from-fastq-3-sexcheck assets/callability_genes.tsv assets/live/index.html assets/viewer/index.html bin/collect_summary.py modules/local/indexcov/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +nextflow-from-fastq-3-sexcheck assets/callability_genes.tsv assets/live/index.html assets/viewer/index.html bin/collect_summary.py modules/local/indexcov/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og nextflow-hardening-1-manta assets/par_grch38.bed assets/sv_rule_regions.tsv bin/collect_summary.py bin/family_report.py bin/og scripts/04-manta.sh scripts/05-annotsv.sh scripts/15-duphold.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/ci/fake-docker/lib.sh nextflow-hardening-2-nf assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/live/index.html assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgx_genes.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/sv_rule_regions.tsv assets/viewer/index.html bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/delly/* modules/local/html_report/* modules/local/indexcov/* modules/local/manta/* modules/local/mito_haplogroup/* modules/local/mosdepth/* modules/local/pgx_consensus/* modules/local/pharmcat/* modules/local/pypgx/* modules/local/survivor_merge/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/vcfanno/* modules/local/y_haplogroup/* scripts/04-manta.sh scripts/05-annotsv.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/10-telomere-hunter.sh scripts/12-mito-haplogroup.sh scripts/15-duphold.sh scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/20-mtoolbox.sh scripts/21-cyrius.sh scripts/22-survivor-merge.sh scripts/24-html-report.sh scripts/30-vcfanno.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/37-y-haplogroup.sh scripts/ci/fake-docker/lib.sh scripts/ci/parity-diff.sh scripts/cyrius-constraints.txt scripts/setup.sh scripts/validate-setup.sh nextflow-report-parity-1-sections assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgx_genes.tsv assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/sv_rule_regions.tsv bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/annotsv/* modules/local/clinvar_screen/* modules/local/expansion_hunter/* modules/local/export_consumer/* modules/local/html_report/* modules/local/mito_variants/* modules/local/pypgx/* modules/local/slivar/* modules/local/stranger/* modules/local/vcf_precheck/* modules/local/vep/* scripts/05-annotsv.sh scripts/06-clinvar-screen.sh scripts/09-expansion-hunter.sh scripts/09b-stranger.sh scripts/13-vep-annotation.sh scripts/15-duphold.sh scripts/16b-mosdepth.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/31-slivar.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/40-export-consumer.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz @@ -138,37 +141,37 @@ pharmcat-indel-refblocks-1 bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake pharmcat-mito-input-and-log-1-mtrnr1 bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake-docker/lib.sh platelet-antigens-1 assets/bloodtype_markers.tsv bin/cn_loci.tsv bin/og scripts/41-bloodtype.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh prs-1-agreement assets/pgs_scores.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/25-prs.sh scripts/ci/fake-docker/lib.sh -prs-2-ancestry assets/pgs_scores.tsv bin/collect_summary.py bin/render_report.py scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh -prs-3-panel-measure assets/pgs_scores.tsv bin/collect_summary.py modules/local/prs/* modules/local/vcf_precheck/* scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh -prs-runopts-and-trace-1 assets/par_grch38.bed assets/pgs_scores.tsv bin/collect_summary.py modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/prs/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +prs-2-ancestry assets/pgs_scores.tsv bin/collect_summary.py bin/render_report.py scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh bin/og +prs-3-panel-measure assets/pgs_scores.tsv bin/collect_summary.py modules/local/prs/* modules/local/vcf_precheck/* scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh bin/og +prs-runopts-and-trace-1 assets/par_grch38.bed assets/pgs_scores.tsv bin/collect_summary.py modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/prs/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og prs-scores-and-run-options-1-strand-sex assets/pgs_scores.tsv bin/collect_summary.py bin/og modules/local/prs/* modules/local/vcf_precheck/* rust/crates/og-dev/src/fixture.rs scripts/25-prs.sh scripts/26-ancestry.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh prs-scores-and-run-options-2-panel-chrx assets/pgs_scores.tsv bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/25-prs.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh pypgx-cyp2d6-section-1-summary assets/pgx_genes.tsv bin/cn_loci.tsv bin/og scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh qc-1-sample-qc bin/collect_summary.py bin/og rust/crates/og-dev/src/fixture.rs scripts/28-multiqc.sh scripts/33-sample-qc.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh qc-2-nextflow-sample-qc assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/families.example.tsv assets/live/index.html assets/mito_confirmed.tsv assets/par_grch38.bed assets/pedigree.example.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/pedigree.tsv assets/stub/sample.vcf.gz assets/viewer/index.html bin/cn_loci.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/align_minimap2/* modules/local/cpic_lookup/* modules/local/deepvariant/* modules/local/fastp/* modules/local/hla_typing/* modules/local/html_report/* modules/local/indexcov/* modules/local/mito_haplogroup/* modules/local/mito_variants/* modules/local/mosdepth/* modules/local/pharmcat/* modules/local/pypgx/* modules/local/roh/* modules/local/somalier/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/verifybamid2/* scripts/01b-fastp-qc.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16-indexcov.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/33-sample-qc.sh scripts/36-pgx-consensus.sh scripts/38-family.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -qc-3-cram assets/callability_genes.tsv bin/collect_summary.py modules/local/cram_archive/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/34-cram-archive.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -reference-noalt scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +qc-3-cram assets/callability_genes.tsv bin/collect_summary.py modules/local/cram_archive/* modules/local/mosdepth/* modules/local/vcf_precheck/* scripts/16b-mosdepth.sh scripts/34-cram-archive.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og +reference-noalt scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og report-followups-1-sections assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/genotype_rules.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/sample.vcf.gz assets/sv_rule_regions.tsv assets/traits.tsv bin/collect_summary.py bin/family_report.py bin/og bin/render_report.py bin/results_index.py modules/local/annotsv/* modules/local/expansion_hunter/* modules/local/export_consumer/* modules/local/html_report/* modules/local/manta/* modules/local/traits/* modules/local/vcf_precheck/* scripts/04-manta.sh scripts/05-annotsv.sh scripts/09-expansion-hunter.sh scripts/15-duphold.sh scripts/18-cnvpytor.sh scripts/19-delly.sh scripts/24-html-report.sh scripts/40-export-consumer.sh scripts/42-traits.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh tests/fixtures/consumer_export/sites.tsv.gz -report-sections-mito-roh-telomere-cnv-1-mito assets/callability_genes.tsv bin/collect_summary.py scripts/10-telomere-hunter.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh +report-sections-mito-roh-telomere-cnv-1-mito assets/callability_genes.tsv bin/collect_summary.py scripts/10-telomere-hunter.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh bin/og reports-and-pgx-correctness-clinical assets/construct_variants.tsv bin/og scripts/23-clinical-filter.sh scripts/31-slivar.sh scripts/ci/fake-docker/lib.sh reports-and-pgx-correctness-pgx assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv bin/cn_loci.tsv bin/collect_summary.py bin/og scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -reports-and-pgx-correctness-reports assets/stub/db/clinvar.vcf.gz assets/stub/db/hla.dat bin/collect_summary.py bin/render_report.py bin/write_manifest.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh +reports-and-pgx-correctness-reports assets/stub/db/clinvar.vcf.gz assets/stub/db/hla.dat bin/collect_summary.py bin/render_report.py bin/write_manifest.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh bin/og reports-and-pgx-correctness-revel scripts/30-vcfanno.sh scripts/ci/fake-docker/lib.sh run-all-launcher assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/par_grch38.bed assets/pgs_scores.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/align_minimap2/* modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/deepvariant/* modules/local/fastp/* modules/local/hla_typing/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/mito_variants/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/prs/* modules/local/roh/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* modules/local/vcfanno/* modules/local/vep/* scripts/01b-fastp-qc.sh scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/13-vep-annotation.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/25-prs.sh scripts/26-ancestry.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/30-vcfanno.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/ci/parity-diff.sh scripts/validate-setup.sh -run-all-sample-qc-and-stale-index-1-index-times assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh +run-all-sample-qc-and-stale-index-1-index-times assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og setup-gencode-exons-and-nextflow-clip-check-1 assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/og modules/local/clinvar_screen/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh short-sample-id-stub assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/db/hla.dat assets/stub/db/kir.dat assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz assets/stub/sample.vcf.gz.tbi bin/cn_loci.tsv bin/collect_summary.py bin/cpsr_sample_id bin/og bin/render_report.py bin/results_index.py modules/local/cpic_lookup/* modules/local/cpsr/* modules/local/hla_typing/* modules/local/html_report/* modules/local/pharmcat/* modules/local/t1k_build/* modules/local/telomere_hunter/* modules/local/vcf_precheck/* scripts/07-pharmacogenomics.sh scripts/08-hla-typing.sh scripts/10-telomere-hunter.sh scripts/17-cpsr.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -single-source-lib-ownership scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh +single-source-lib-ownership scripts/11-roh-analysis.sh scripts/ci/fake-docker/lib.sh bin/og str-catalog-1-strchive assets/str_extra_loci.json assets/stub/db/catalog.json assets/stub/sample.bam assets/stub/sample.bam.bai bin/og modules/local/expansion_hunter/* modules/local/stranger/* modules/local/vcf_precheck/* scripts/09-expansion-hunter.sh scripts/09b-stranger.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh scripts/validate-setup.sh rust/crates/og-dev/src/fixture.rs str-extra-repeats-1-readings assets/str_extra_loci.json bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/expansion_hunter/* modules/local/html_report/* scripts/09-expansion-hunter.sh scripts/24-html-report.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/validate-setup.sh rust/crates/og-dev/src/fixture.rs sv-mito-telomere-steps-1-sv-merge scripts/22-survivor-merge.sh scripts/ci/fake-docker/lib.sh tests/fixtures/sv/cnvpytor.vcf.in tests/fixtures/sv/delly.vcf.in tests/fixtures/sv/manta.vcf.in -sv-mito-telomere-steps-2-mito assets/callability_genes.tsv bin/collect_summary.py scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh +sv-mito-telomere-steps-2-mito assets/callability_genes.tsv bin/collect_summary.py scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh bin/og sv-mito-telomere-steps-3-y-haplogroup assets/live/index.html assets/viewer/index.html bin/og scripts/16-indexcov.sh scripts/37-y-haplogroup.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh sv-mito-telomere-steps-4-clinvar-tier bin/og scripts/23-clinical-filter.sh scripts/ci/fake-docker/lib.sh sv-mito-telomere-steps-5-giab scripts/benchmark-variants.sh scripts/ci/fake-docker/lib.sh sv-mito-telomere-steps-6-scatter scripts/03a-gatk-haplotypecaller.sh scripts/03b-freebayes.sh scripts/ci/fake-docker/lib.sh -traits-panel-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/genotype_rules.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz assets/traits.tsv bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/traits/* modules/local/vcf_precheck/* rust/crates/og-dev/src/traits_sources.rs scripts/24-html-report.sh scripts/42-traits.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -vcf-precheck-ref-spotcheck-1 assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/vcf/grch37_no_contigs.vcf +traits-panel-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/genotype_rules.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz assets/traits.tsv bin/collect_summary.py bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/traits/* modules/local/vcf_precheck/* rust/crates/og-dev/src/traits_sources.rs scripts/24-html-report.sh scripts/42-traits.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh bin/og +vcf-precheck-ref-spotcheck-1 assets/par_grch38.bed modules/local/align_minimap2/* modules/local/deepvariant/* modules/local/fastp/* modules/local/roh/* modules/local/vcf_precheck/* scripts/01b-fastp-qc.sh scripts/11-roh-analysis.sh scripts/ci/check-images.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh tests/fixtures/vcf/grch37_no_contigs.vcf bin/og vendor-vcf-intake-1-bash bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake-docker/lib.sh vendor-vcf-intake-2-nf-report assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh vendor-vcf-intake-3-nf-stops assets/callability_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/collect_summary.py bin/og modules/local/clinvar_screen/* modules/local/mito_haplogroup/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh @@ -182,4 +185,4 @@ y-tree-current-1-placement assets/live/index.html assets/viewer/index.html bin/o rust-z2e-readers bin/og tests/e2e/lib.sh scripts/ci/image-smoke.sh scripts/ci/nf-trace-requests.tsv rust-c2b-traits assets/traits.tsv assets/genotype_rules.tsv bin/og modules/local/traits/* scripts/42-traits.sh qc-3-cram-checksum modules/local/cram_archive/* scripts/34-cram-archive.sh scripts/lib/common.sh -gvcf-pass-gate scripts/26b-ancestry-fine.sh modules/local/ancestry_fine/main.nf scripts/44-ancient.sh modules/local/ancient/main.nf scripts/25-prs.sh modules/local/prs/main.nf +gvcf-pass-gate scripts/26b-ancestry-fine.sh modules/local/ancestry_fine/main.nf scripts/44-ancient.sh modules/local/ancient/main.nf scripts/25-prs.sh modules/local/prs/main.nf bin/og diff --git a/scripts/ci/e2e-scope.sh b/scripts/ci/e2e-scope.sh index c334f3baa..eb5a7f019 100755 --- a/scripts/ci/e2e-scope.sh +++ b/scripts/ci/e2e-scope.sh @@ -21,9 +21,11 @@ # `rows`). Nothing when no path is in the e2e scope. Every shard # case when a path is shared wiring (FULL below). Otherwise the # smoke cases, every case whose own file or table row changed, -# every case with a glob that matches a changed path, and the -# cases those need (the needs column of e2e-case-times.tsv, -# followed through). Base cases are never printed: whenever a case +# every case with a glob that matches a changed path, every case +# with a glob that matches bin/og when a path under rust/ (og's +# sources, OG_SOURCES below) changed, and the cases those need +# (the needs column of e2e-case-times.tsv, followed through). +# Base cases are never printed: whenever a case # runs, the base leg runs all of them. The reason for each pick # goes to stderr. # @@ -43,9 +45,8 @@ export LC_ALL=C # The paths the e2e cases exercise. A pull request that changes none of them # runs no case. The push paths of e2e.yml are the same list (e2e-plan checks). -SCOPE_DIRS=(scripts modules workflows bin conf assets tests/e2e .github/actions) +SCOPE_DIRS=(scripts modules workflows bin conf assets rust tests/e2e .github/actions) SCOPE_FILES=(tests/fixtures/VERSION main.nf nextflow.config nextflow_schema.json versions.env .github/workflows/e2e.yml - rust/crates/og-dev/src/fixture.rs rust/crates/og-dev/src/traits_sources.rs # The committed fixtures the cases read (their rows name them too). tests/fixtures/annotsv/class45.sh tests/fixtures/consumer_export/sites.tsv.gz tests/fixtures/families/stub_families.tsv tests/fixtures/pharmcat/refblocks.g.vcf tests/fixtures/sv/cnvpytor.vcf.in @@ -67,6 +68,11 @@ FULL=(main.nf nextflow.config nextflow_schema.json versions.env assets/steps.tsv # Nextflow pipeline from the fixture's FASTQ, and the parity check of the two. SMOKE=(nextflow-from-fastq-1-bash nextflow-from-fastq-2-nextflow) +# og's sources. The cases run og through bin/og, which runs the binary built +# from these, so a change here picks every case whose row has a glob that +# matches bin/og, as a change to bin/og itself does. +OG_SOURCES=('rust/*') + die() { echo "ERROR: $*" >&2; exit 1; } cases() { @@ -160,7 +166,7 @@ in_list() { } select_cases() { - local changed=$1 rowsf=${2:-/dev/null} p c globs g full="" inscope="" picked out gl + local changed=$1 rowsf=${2:-/dev/null} p c globs g full="" inscope="" og_src="" picked out gl [ -f "$changed" ] || die "select: no file ${changed}" [ -e "$rowsf" ] || die "select: no file ${rowsf}" check > /dev/null @@ -170,6 +176,7 @@ select_cases() { while IFS= read -r p; do [ -n "$p" ] || continue in_list "$p" "${scope_globs[@]}" && inscope=1 + [ -z "$og_src" ] && in_list "$p" "${OG_SOURCES[@]}" && og_src=$p if in_list "$p" "${FULL[@]}"; then full=$p; break; fi done < "$changed" [ -s "$rowsf" ] && inscope=1 @@ -199,6 +206,11 @@ select_cases() { if [[ $p == $g ]]; then printf '%s\truns %s\n' "$c" "$p"; continue 3; fi done done < "$changed" + [ -n "$og_src" ] || continue + for g in "${gl[@]}"; do + # shellcheck disable=SC2053 # g is a glob on purpose + if [[ bin/og == $g ]]; then printf '%s\truns og, built from %s\n' "$c" "$og_src"; continue 2; fi + done done < <(rows_of "$PATHS") ) # Keep only real cases outside the base stage, then add their needs. diff --git a/tests/test_e2e_scope.sh b/tests/test_e2e_scope.sh index 9ea0189b6..003ba7866 100755 --- a/tests/test_e2e_scope.sh +++ b/tests/test_e2e_scope.sh @@ -6,7 +6,9 @@ # no file, a glob that matches a file outside the e2e scope. Then the # picks: nothing for a path outside the scope, every case for shared wiring, the smoke cases plus the matching ones for a helper, # the case whose file or row changed, the cases those need, never a base -# case. Last, the real table must pass the check. +# case, and for a change under rust/ (the og binary's sources) every case +# whose row has a glob that matches bin/og. Last, the real table must pass +# the check, and on it a Rust change must pick what a bin/og change picks. set -euo pipefail export LC_ALL=C @@ -96,6 +98,12 @@ expect "a base step runs the smoke cases only (the base leg runs every base case printf '%s\n' traits-2 > "${WORK}/rows.txt" ROWS="${WORK}/rows.txt" expect "a changed table row runs its case and what it needs" "${SMOKE} traits-1 traits-2" docs/x.md expect "a deleted case file runs the smoke cases" "${SMOKE}" tests/e2e/gone-1.sh +expect "a Rust change runs the cases that run og and what they need" "${SMOKE} traits-1 traits-2" rust/crates/og-vcf/src/lib.rs +if grep -q 'traits-2: runs og, built from rust/crates/og-vcf/src/lib.rs' "${WORK}/why.txt"; then ok "select says a Rust change picked a case because it runs og" +else bad "select gave no og reason for a Rust change: $(paste -sd' ' "${WORK}/why.txt")"; fi +expect "the og build script runs the cases that run og" "${SMOKE} traits-1 traits-2" rust/og.sh +{ paths | grep -v "^lpa-1${TAB}"; printf '%s\n' "lpa-1${TAB}modules/local/lpa/* bin/*"; } > "${WORK}/wide.tsv" +E2E_PATHS="${WORK}/wide.tsv" expect "a row whose glob covers bin/og runs on a Rust change" "lpa-1 ${SMOKE} traits-1 traits-2" rust/og/src/main.rs if grep -q 'traits-1: needed by traits-2' "${WORK}/why.txt" 2> /dev/null || { pick bin/og > /dev/null; grep -q 'traits-2: runs bin/og' "${WORK}/why.txt"; }; then ok "select says why it picked each case" else bad "select gave no reasons: $(cat "${WORK}/why.txt")"; fi @@ -137,6 +145,23 @@ if [ -s "${WORK}/real.txt" ] && E2E_SELECT="${WORK}/real.txt" "${REPO}/scripts/c ok "a real pick splits: $(paste -sd' ' "${WORK}/real.txt")" else bad "a real pick did not split: $(paste -sd' ' "${WORK}/real.txt")"; fi +# A Rust change picks what a change to bin/og picks: every case that runs og +# (its row has a glob that matches bin/og), the smoke cases and their needs. +"$S" select "${WORK}/changed.txt" > "${WORK}/og.txt" 2> /dev/null +printf '%s\n' rust/og/src/main.rs > "${WORK}/changed.txt" +"$S" select "${WORK}/changed.txt" > "${WORK}/rust.txt" 2> /dev/null || true +if [ -s "${WORK}/rust.txt" ] && cmp -s "${WORK}/og.txt" "${WORK}/rust.txt"; then + ok "the real table: a Rust change runs the $(wc -l < "${WORK}/rust.txt" | tr -d ' ') cases a bin/og change runs" +else bad "the real table: a Rust change picks $(wc -l < "${WORK}/rust.txt" | tr -d ' ') cases, a bin/og change $(wc -l < "${WORK}/og.txt" | tr -d ' '): $(diff "${WORK}/og.txt" "${WORK}/rust.txt" | grep '^[<>]' | paste -sd' ' -)"; fi +for c in output-contract-1-hg002 traits-panel-1 prs-2-ancestry bash-step-11-roh; do + if grep -qx "$c" "${WORK}/rust.txt"; then ok "the real table runs ${c}, which runs og, on a Rust change" + else bad "the real table does not run ${c} on a Rust change, though it runs og"; fi +done +for c in alignment-markdup-gvcf-sex-4-bwamem2 sv-mito-telomere-steps-1-sv-merge; do + if grep -qx "$c" "${WORK}/rust.txt"; then bad "the real table runs ${c} on a Rust change, though it runs no og" + else ok "the real table leaves out ${c}, which runs no og, on a Rust change"; fi +done + printf '%s\n' tests/fixtures/consumer_export/sites.tsv.gz > "${WORK}/changed.txt" if "$S" select "${WORK}/changed.txt" 2> /dev/null | grep -qx consumer-export-1; then ok "the real table runs consumer-export-1 when its fixture changes" else bad "the real table does not run consumer-export-1 when its fixture changes"; fi From f946731b6c39822053d6dc1d69bc95172d1f0d57 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:22:39 +0100 Subject: [PATCH 010/110] ci(e2e): report a cancelled run's e2e check as cancelled, not failed The e2e job ran under always(), so when a run was cancelled (a newer push, or by hand) it ran anyway, found the legs cancelled and failed. It now runs under !cancelled(): in a cancelled run it is cancelled with the run, as the other legs are. A cancelled check still blocks a merge. A leg cut by its time limit in a run that was not cancelled still turns e2e red, and the message says so. Bead: plat-05 Bead: plat-06 --- .github/workflows/e2e.yml | 13 +++++++++---- CHANGELOG.md | 1 + docs/testing.md | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 30af2c3e3..a83af9fe7 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1136,12 +1136,15 @@ jobs: # green only when the plan and every leg succeeded, every picked case # reported exactly one pass (one table of every case goes to the summary) # and each parity check whose cases ran passed once. Red when e2e-scope - # did not succeed. A leg that was skipped, cancelled or - # cut by its time limit leaves cases without a result, which is red too. + # did not succeed. A leg that was skipped, failed or cut by its time limit + # leaves cases without a result, which is red too. When the run itself is + # cancelled (a newer push to the pull request, or by hand), this job is + # cancelled with it and reads cancelled, not failed: nothing ran to fail. + # A cancelled check blocks a merge as a red one does. e2e: needs: [e2e-scope, e2e-plan, e2e-base, e2e-shards] if: >- - ${{ always() && ( + ${{ !cancelled() && ( github.event_name == 'pull_request' || github.event_name == 'push' || github.event_name == 'schedule' || @@ -1191,7 +1194,9 @@ jobs: export E2E_SELECT="${RUNNER_TEMP}/select.txt" fi if [ "$PLAN" != success ] || [ "$BASE" != success ] || [ "$LEGS" != success ]; then - echo "::error::The plan job ended ${PLAN:-unknown}, the base leg ${BASE:-unknown} and the shard legs ${LEGS:-unknown}; e2e needs all three to succeed." + # The run was not cancelled (then this job would not run), so a + # job that ended cancelled was cut by its time limit. + echo "::error::The plan job ended ${PLAN:-unknown}, the base leg ${BASE:-unknown} and the shard legs ${LEGS:-unknown}; e2e needs all three to succeed. A job that ended cancelled in a run that was not cancelled hit its time limit." rc=1 fi dir="${RUNNER_TEMP}/reports" diff --git a/CHANGELOG.md b/CHANGELOG.md index c14bc7049..b78bd3d27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased - A pull request that changes only Rust code now runs the e2e cases that run `og`. Before, `rust/` was outside the e2e scope, but for two files of `og-dev`, so such a pull request ran no case, and a merge of it started no run on main: a change in what `og` writes reached main with no real-tool run. A change under `rust/` now picks every case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, as a change to `bin/og` does, and main runs every case after such a merge. 19 case rows that run `og` through a step, helper or module now list `bin/og`. `tests/test_e2e_scope.sh` checks the pick. +- The required `e2e` check reads cancelled, not failed, when its run was cancelled, by a newer push or by hand. Before, it ran anyway and failed, which read as a broken case when the cases had only been stopped. A cancelled check still blocks a merge. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/docs/testing.md b/docs/testing.md index 5f2246b06..836883dfb 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -80,7 +80,7 @@ In CI the cases run in parallel legs, each case at most once: a pull request run - The table holds each case's median time on the passing runs of nine e2e runs of 2026-11-04 (41766267038, 41767270253, 41773233871, 41774860458, 41779067613, 41790595358, 41799741941, 41807346887 and 41821518376), and its `needs`: the non-base cases whose outputs it reads. The needs were written from what each case says it reads (its header and its checks) and from the cases that failed in a split run without them (run 41455829120). A case and every case it needs, followed through, form a group that stays in one shard, in name order. Groups go to the least loaded shard, heaviest first. Every case needs a row: `e2e-shards.sh check`, which `tests/test_e2e_shards.sh` runs on the real table in the unit tests, fails and names each case without one. The split itself still runs a case with no row, as a 300-second case that needs nothing, so add the row with the case's measured seconds from its first passing run. - The base leg runs first. It packs every file its cases wrote or changed (at its absolute path, with owners, modes and times) and uploads it as the artifact `e2e-base`, kept for 3 days so that "Re-run failed jobs" the next day still finds it. The shard legs start only after it passed (`needs:`), so a shard never holds a runner while it waits: when many runs share the account's runners, shards that started early and waited took the runners the base legs needed (run 41506673662 had three shards running and its base leg still queued). Each shard fetches the artifact, tried up to five times, takes the base leg's work area, unpacks the archive there, deletes it (about 4 GB the cases need) and runs its cases. When the base leg fails, the shards are skipped and `e2e` is red. - The shard that holds `nextflow-from-fastq-2-nextflow` and the one that holds `nextflow-hardening-2-nf` run the parity checks; the plan fails when either case runs and the case before it in its pair is in a different shard. -- The required check is the job `e2e`. It merges every leg's results into one table of case, result, time and job, followed by the failed checks of each failed case, and it is red unless the plan and every leg succeeded, every picked case reported exactly one pass and each parity check passed once when its cases ran (and not at all when they did not). It is red too when `e2e-scope` did not succeed. A leg that was skipped, cancelled or cut by its limit leaves cases with no result, and that is red too. The full logs are in the `e2e-logs-` artifacts. +- The required check is the job `e2e`. It merges every leg's results into one table of case, result, time and job, followed by the failed checks of each failed case, and it is red unless the plan and every leg succeeded, every picked case reported exactly one pass and each parity check passed once when its cases ran (and not at all when they did not). It is red too when `e2e-scope` did not succeed. A leg that was skipped, failed or cut by its time limit leaves cases with no result, and that is red too. When the run itself is cancelled, by a newer push to the pull request or by hand, `e2e` is cancelled with it and reads cancelled, not failed: no case ran, so none failed. A cancelled `e2e` blocks a merge as a red one does; re-run the workflow, or push again, to get a result. The full logs are in the `e2e-logs-` artifacts. `tests/test_e2e_shards.sh` (unit tests) checks the split against planted faults: a case listed twice or missing, a stale or malformed table row, a need on a case that runs later, a pick that leaves out a need, and results missing, failed or reported twice; the leg count; and a case with no row, which `check` must name. `tests/test_e2e_scope.sh` checks the pick: a case with no paths row, a second row, a row for no case and a glob that matches no file must each fail `e2e-scope.sh check`, and a docs-only change, a change to `main.nf`, a change to one helper, to one module, to a case, to a table row and to `rust/` must each pick the cases listed below. On the real table, a change to `rust/` must pick what a change to `bin/og` picks. From 007bb644b4b56f69124fcf574b5f0a165c7d3d69 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:22:46 +0100 Subject: [PATCH 011/110] docs(testing): say what a green container-ok means when no image changed container-ok passes on a pull request that changes no image, with no smoke row run. The testing guide now says so, and why the full-data AnnotSV row stays monthly and on dispatch. Bead: plat-08 --- CHANGELOG.md | 1 + docs/testing.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b78bd3d27..d5cf4162f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n - A pull request that changes only Rust code now runs the e2e cases that run `og`. Before, `rust/` was outside the e2e scope, but for two files of `og-dev`, so such a pull request ran no case, and a merge of it started no run on main: a change in what `og` writes reached main with no real-tool run. A change under `rust/` now picks every case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, as a change to `bin/og` does, and main runs every case after such a merge. 19 case rows that run `og` through a step, helper or module now list `bin/og`. `tests/test_e2e_scope.sh` checks the pick. - The required `e2e` check reads cancelled, not failed, when its run was cancelled, by a newer push or by hand. Before, it ran anyway and failed, which read as a broken case when the cases had only been stopped. A cancelled check still blocks a merge. +- The testing guide says what a green `container-ok` means on a pull request that changes no image: no smoke row ran. It also says why the AnnotSV row with its 5.3 GB of full data stays monthly and on dispatch: no image pull request waits on that download. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/docs/testing.md b/docs/testing.md index 836883dfb..bde4865cb 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -158,7 +158,7 @@ A new check has to be seen failing once before it is trusted: run it against the ### What no e2e case runs -This is every step script that no e2e case runs, plus the full-size index build of step 02a. The first eight rows need data, hardware or a binary an e2e job does not have. The three long-read rows need long reads, and the e2e fixture has short reads only. The others could run, but no case runs them yet. The last column says what checks each one instead. An image's smoke test is a row of `tests/smoke/commands.tsv` that `container-test.yml` runs on the fixture when the image changes and once a month; it runs the tool, not the step's script. +This is every step script that no e2e case runs, plus the full-size index build of step 02a. The first eight rows need data, hardware or a binary an e2e job does not have. The three long-read rows need long reads, and the e2e fixture has short reads only. The others could run, but no case runs them yet. The last column says what checks each one instead. An image's smoke test is a row of `tests/smoke/commands.tsv` that `container-test.yml` runs on the fixture when the image changes and once a month; it runs the tool, not the step's script. Its required check `container-ok` is green on a pull request that changes no image: then no smoke row ran, so that green says only that no image changed. The row that runs AnnotSV with its 5.3 GB of full data runs monthly and on dispatch, never on a pull request, so no image pull request waits on that download. | Step | Why no e2e case runs it | What checks it instead | |---|---|---| From 419dda585835c45c49fdec10e6c7e2c868a04a00 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:37:19 +0100 Subject: [PATCH 012/110] test(summary): a run on chr20 and chr22 must record its scope and mark genome-wide sections partial The test fails on main: summary.json has no scope, and no genome-wide section says it covers part of the genome. Bead: D14 --- .../crates/og-summary/tests/i411_run_scope.rs | 254 ++++++++++++++++++ 1 file changed, 254 insertions(+) create mode 100644 rust/crates/og-summary/tests/i411_run_scope.rs diff --git a/rust/crates/og-summary/tests/i411_run_scope.rs b/rust/crates/og-summary/tests/i411_run_scope.rs new file mode 100644 index 000000000..0648f3cfe --- /dev/null +++ b/rust/crates/og-summary/tests/i411_run_scope.rs @@ -0,0 +1,254 @@ +//! What part of the genome a run covered (`scope` in summary.json), and the +//! partial mark on each genome-wide section of a run that covered less. +//! +//! A run on a part of the genome (`--intervals`, a sliced VCF or BAM) gives +//! ROH, archaic, ancestry, PRS, callability and telomere results that read +//! as whole-genome results. The collector reads the contigs of the sample +//! VCF's records, writes them as `scope`, and marks each of those sections +//! "partial: covers N of 22 autosomes" when fewer than 22 are there. + +use og_summary::collect::{Group, Input, post}; +use pycompat::json::Value; +use std::fs; +use std::io::Write; +use std::path::PathBuf; + +const REPO: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../.."); + +/// The sections whose result is a share or a sum over the whole genome. +const GENOME_WIDE: [&str; 6] = [ + "callability", + "prs", + "ancestry_fine", + "telomere", + "roh", + "archaic", +]; + +struct Dir(PathBuf); + +impl Dir { + fn new(tag: &str) -> Dir { + let d = std::env::temp_dir().join(format!("og-run-scope-{}-{tag}", std::process::id())); + let _ = fs::remove_dir_all(&d); + fs::create_dir_all(&d).unwrap(); + Dir(d) + } + fn path(&self) -> String { + self.0.to_str().unwrap().to_owned() + } + fn put(&self, rel: &str, body: &[u8]) { + let p = self.0.join(rel); + fs::create_dir_all(p.parent().unwrap()).unwrap(); + fs::write(&p, body).unwrap(); + } + fn put_gz(&self, rel: &str, text: &str) { + let mut e = flate2::write::GzEncoder::new(Vec::new(), flate2::Compression::fast()); + e.write_all(text.as_bytes()).unwrap(); + self.put(rel, &e.finish().unwrap()); + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +fn collect(dir: &Dir) -> Value { + post::collect(&Input { + sample: "S".into(), + sample_dir: dir.path(), + declared_sex: None, + assets: format!("{REPO}/assets"), + group: Group::All, + tables: format!("{REPO}/bin"), + }) + .unwrap() +} + +fn get<'a>(v: &'a Value, key: &str) -> Option<&'a Value> { + match v { + Value::Object(m) => m.get(key), + _ => None, + } +} + +fn at<'a>(v: &'a Value, path: &[&str]) -> &'a Value { + path.iter().fold(v, |v, k| { + get(v, k).unwrap_or_else(|| panic!("no {k} in {v:?}")) + }) +} + +fn st(v: &Value) -> &str { + match v { + Value::Str(s) => s, + _ => panic!("not a string: {v:?}"), + } +} + +/// A sample folder whose sample VCF has records on `contigs`, with a result +/// in each genome-wide section, as the steps write them. +fn folder(tag: &str, contigs: &[&str]) -> Dir { + let d = Dir::new(tag); + let mut vcf = String::from( + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n", + ); + for (i, c) in contigs.iter().enumerate() { + for pos in [1_000_000, 2_000_000] { + vcf.push_str(&format!( + "{c}\t{}\t.\tA\tG\t50\tPASS\t.\tGT\t0/1\n", + pos + i + )); + } + } + d.put_gz("vcf/S.vcf.gz", &vcf); + // Step 11: bcftools roh's sites and one run on each chromosome called. + let mut roh = String::from("# ST\n# RG\n"); + for c in contigs { + roh.push_str(&format!("ST\tS\t{c}\t1000000\t1\t50\n")); + } + roh.push_str(&format!( + "RG\tS\t{}\t1000000\t7000000\t6000001\t9\t50\n", + contigs[0] + )); + d.put("vcf/S_roh.txt", roh.as_bytes()); + // Step 16b: the catalog's genes on the chromosomes the BAM has. + let catalog = fs::read_to_string(format!("{REPO}/assets/callability_genes.tsv")).unwrap(); + let mut bed = String::from("#chrom\tstart\tend\tregion\t10X\n"); + for line in catalog.lines().filter(|l| !l.starts_with('#')).skip(1) { + let f: Vec<&str> = line.split('\t').collect(); + let plain = f[2].trim_start_matches("chr"); + if f[3] != "." && contigs.iter().any(|c| c.trim_start_matches("chr") == plain) { + let (a, b): (i64, i64) = (f[3].parse().unwrap(), f[4].parse().unwrap()); + bed.push_str(&format!("{}\t{a}\t{b}\t{}\t{}\n", f[2], f[0], b - a)); + } + } + d.put_gz("mosdepth/S_callability.bed.gz", &bed); + d.put( + "prs/S_prs_summary.tsv", + b"Condition\tPGS_ID\tScore_SUM\tVariants_Matched\tVariants_Total\tPercentile\n\ + Coronary artery disease\tPGS000018\t0.5\t10\t100\tNA\n", + ); + d.put( + "ancestry_fine/S_ancestry_fine.tsv", + b"level\tcode\tgroup\tfraction\tse\tlow\thigh\ncontinent\tEUR\tEurope\t1.0\t0.01\t0.98\t1.0\n", + ); + d.put( + "telomere/S/S/S_summary.tsv", + b"PID\tsample\ttotal_reads\tread_lengths\tintratel_reads\ttel_content\nS\ttumor\t1000\t150\t10\t12.5\n", + ); + d.put( + "archaic/S_archaic.tsv", + b"key\tvalue\npopulation\tEUR\nneanderthal_segments\t3\nneanderthal_bp\t300000\n\ + denisovan_segments\t0\ndenisovan_bp\t0\nanalysed_bp\t1000000\n\ + neanderthal_percent\t1.5\ndenisovan_percent\t0.0\n", + ); + d +} + +fn autosomes() -> Vec { + (1..=22).map(|i| format!("chr{i}")).collect() +} + +#[test] +fn a_run_on_chr20_and_chr22_is_partial_in_every_genome_wide_section() { + let d = folder("two", &["chr20", "chr22"]); + let v = collect(&d); + let scope = at(&v, &["scope"]); + assert_eq!(at(scope, &["autosomes_covered"]), &Value::Int(2)); + assert_eq!( + at(scope, &["autosomes"]), + &Value::Array(vec![Value::Str("chr20".into()), Value::Str("chr22".into())]) + ); + assert_eq!(at(scope, &["chrx"]), &Value::Bool(false)); + assert_eq!(at(scope, &["intervals"]), &Value::Null); + assert_eq!(at(scope, &["partial"]), &Value::Bool(true)); + assert_eq!( + st(at(scope, &["mark"])), + "partial: covers 2 of 22 autosomes" + ); + for key in GENOME_WIDE { + let sec = at(&v, &["sections", key]); + assert_eq!(st(at(sec, &["state"])), "ok", "{key}: {sec:?}"); + assert_eq!( + st(at(sec, &["partial"])), + "partial: covers 2 of 22 autosomes", + "{key}" + ); + } + // A section about the calls themselves, not a share of the genome. + let variants = at(&v, &["sections", "variants"]); + assert_eq!(st(at(variants, &["state"])), "ok"); + assert!(get(variants, "partial").is_none()); +} + +#[test] +fn a_whole_genome_run_carries_no_partial_mark() { + let mut names = autosomes(); + names.push("chrX".into()); + let plain: Vec = names.iter().map(|c| c[3..].to_owned()).collect(); + for (tag, names) in [("chr", &names), ("plain", &plain)] { + let contigs: Vec<&str> = names.iter().map(String::as_str).collect(); + let d = folder(tag, &contigs); + let v = collect(&d); + let scope = at(&v, &["scope"]); + assert_eq!(at(scope, &["autosomes_covered"]), &Value::Int(22), "{tag}"); + assert_eq!( + at(scope, &["autosomes"]), + &Value::Array(autosomes().into_iter().map(Value::Str).collect()), + "{tag}" + ); + assert_eq!(at(scope, &["chrx"]), &Value::Bool(true), "{tag}"); + assert_eq!(at(scope, &["partial"]), &Value::Bool(false), "{tag}"); + assert_eq!(at(scope, &["mark"]), &Value::Null, "{tag}"); + for key in GENOME_WIDE { + let sec = at(&v, &["sections", key]); + assert_eq!(st(at(sec, &["state"])), "ok", "{tag} {key}: {sec:?}"); + assert!(get(sec, "partial").is_none(), "{tag} {key}"); + } + } +} + +#[test] +fn intervals_the_run_manifest_records_make_a_whole_genome_run_partial() { + let names = autosomes(); + let contigs: Vec<&str> = names.iter().map(String::as_str).collect(); + let d = folder("intervals", &contigs); + d.put( + "run_manifest.tsv", + b"run\tintervals\tchr1:1-1000000 chr2:1-1000000\n", + ); + let v = collect(&d); + let scope = at(&v, &["scope"]); + assert_eq!(at(scope, &["autosomes_covered"]), &Value::Int(22)); + assert_eq!( + st(at(scope, &["intervals"])), + "chr1:1-1000000 chr2:1-1000000" + ); + assert_eq!(at(scope, &["partial"]), &Value::Bool(true)); + let mark = "partial: limited to the run's intervals (chr1:1-1000000 chr2:1-1000000)"; + assert_eq!(st(at(scope, &["mark"])), mark); + for key in GENOME_WIDE { + assert_eq!(st(at(&v, &["sections", key, "partial"])), mark, "{key}"); + } +} + +#[test] +fn without_a_readable_sample_vcf_no_scope_is_written_and_nothing_is_marked() { + let d = folder("novcf", &["chr20"]); + fs::remove_file(d.0.join("vcf/S.vcf.gz")).unwrap(); + let v = collect(&d); + assert!(get(&v, "scope").is_none()); + for key in GENOME_WIDE { + assert!( + get(at(&v, &["sections", key]), "partial").is_none(), + "{key}" + ); + } + // A VCF cut off mid-stream is no scope either: its contigs are unknown. + let d = folder("badvcf", &["chr20"]); + d.put("vcf/S.vcf.gz", b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03"); + let v = collect(&d); + assert!(get(&v, "scope").is_none()); +} From 48919c39d3cf07aae923dbb45773f472e17574d2 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:37:19 +0100 Subject: [PATCH 013/110] feat(summary): record what part of the genome a run covered and mark genome-wide results partial og summary collect reads the chromosomes of the sample VCF's records and writes scope {autosomes_covered, autosomes, chrx, intervals, partial, mark}. When fewer than 22 autosomes have calls, or the run manifest records intervals, callability, prs, ancestry_fine, telomere, roh and archaic get a partial field with the mark. Without a readable sample VCF no scope is written. The whole-file parity goldens all and all-history change on purpose: their fixture VCF has calls on chr22 only. Bead: D14 --- CHANGELOG.md | 1 + docs/results/quality.md | 13 +++ rust/crates/og-summary/src/collect/post.rs | 103 +++++++++++++++++- rust/crates/og-summary/src/collect/scan.rs | 64 +++++++++++ .../all-history/all-history.json | 30 +++-- .../golden/summary-collect/all/all.json | 32 ++++-- tests/schema/summary.schema.json | 68 ++++++++++++ 7 files changed, 291 insertions(+), 20 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79deccf48..abad2c572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- `summary.json` says what part of the genome a run covered. A run on part of the genome (`--intervals`, or a VCF cut down to chr20 and chr22) gave callability, polygenic score, ancestry, telomere, ROH and archaic results that read as whole-genome results. `og summary collect` now reads the chromosomes of the sample VCF's records and writes a new top-level `scope` object: `autosomes_covered`, `autosomes`, `chrx`, `intervals` (a `run intervals` row of `run_manifest.tsv`, else `null`), `partial` and `mark`. When fewer than 22 autosomes have calls, or the run was limited to intervals, each of those six sections that has a result gets a new `partial` field, such as `partial: covers 2 of 22 autosomes`. Without a readable sample VCF there is no `scope` and nothing is marked. These are new keys; no key, file or format changes or goes away. The reports and the live site do not show the mark yet. `docs/results/quality.md` describes it, and `tests/schema/summary.schema.json` has both fields. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/docs/results/quality.md b/docs/results/quality.md index 08ddc776f..05d169fb1 100644 --- a/docs/results/quality.md +++ b/docs/results/quality.md @@ -11,6 +11,19 @@ These steps check that the data is good enough for everything else. Look at them - **Coverage (step 16b, mosdepth):** `${SAMPLE}/mosdepth/${SAMPLE}.mosdepth.summary.txt`. The `total` row should show a mean near the depth you paid for (about 30). Below 15, small-variant calls lose accuracy. See [step 16b](../16b-mosdepth.md#interpreting-results). - **Sex check (step 16, indexcov):** `${SAMPLE}/indexcov/` estimates the copy number of chrX and chrY from the BAM index. About 1 and 1 is XY, about 2 and 0 is XX. A result that does not match the sex you gave the pipeline means a sample swap, a mislabelled file or a real sex-chromosome difference; [step 16](../16-indexcov.md#interpretation) lists the patterns. Re-check the input before reading anything else. +## What Part of the Genome a Run Covered + +Some results are a share, a sum or a placement over the whole genome: callability, the polygenic scores, fine-grained ancestry, telomere content, runs of homozygosity and archaic ancestry. A run on part of the genome (`--intervals`, or a VCF or BAM cut down to a few chromosomes) gives these results too, and they look the same as whole-genome results. + +So `summary.json` records the run's scope under `scope`. It comes from the chromosomes that the records of the sample VCF are on (`chr20` and `20` count alike): + +- `autosomes_covered`: how many of chr1 to chr22 have calls, and `autosomes`: which ones. +- `chrx`: whether chrX has calls. chrX alone does not make a run partial, because these results read the autosomes. +- `intervals`: the intervals the run was limited to, from a `run intervals` row of `run_manifest.tsv`, else `null`. +- `partial` and `mark`: the run is partial when it covers fewer than 22 autosomes (`partial: covers 2 of 22 autosomes`) or was limited to intervals (`partial: limited to the run's intervals (...)`). + +When the run is partial, each of those six sections that has a result gets the same text in its `partial` field. Without a sample VCF that can be read to its end, the scope is not known: `summary.json` has no `scope`, and no section is marked. The scope says which chromosomes have calls. It does not say how much of each chromosome was read well; callability does that. + ## Reports (Steps 24 and 28) - **HTML report (step 24):** `${SAMPLE}/${SAMPLE}_report.html` collects the headline results of the other steps on one page, including the ClinVar hits table. It contains health findings: share it only as you would share a medical record. diff --git a/rust/crates/og-summary/src/collect/post.rs b/rust/crates/og-summary/src/collect/post.rs index 305bc87ac..e0c343938 100644 --- a/rust/crates/og-summary/src/collect/post.rs +++ b/rust/crates/og-summary/src/collect/post.rs @@ -10,6 +10,8 @@ //! - `not_run`: the steps whose section has no file; //! - `not_assessed`: what no step looked at, with the lines that depend on //! the polygenic scores, HBA1/HBA2, mobile elements, VNtyper and MoChA; +//! - `scope`: what part of the genome the run called, and the `partial` +//! mark on each genome-wide section of a run that called less; //! - `recheck`: the last database re-check of the sample; //! - `new_since`: what changed since the previous run kept in `history/`. //! @@ -25,7 +27,7 @@ use super::group_c::Others; use super::model::{Section, State, Summary}; use super::sections::Data; -use super::{Folder, Input, declared, group_b, post_c, qc_declared, read_a, read_c, time}; +use super::{Folder, Input, declared, group_b, post_c, qc_declared, read_a, read_c, scan, time}; use og_runlog::{delta, files}; use pycompat::json::Value; use pycompat::value::truthy; @@ -125,10 +127,19 @@ of the blood cells): step 51 (MoChA) did not assess this sample"; /// be read. pub fn collect(input: &Input) -> Result { let folder = Folder::open(input)?; + let vcf = folder + .index + .first(&[format!( + "vcf/{}.vcf.gz", + pycompat::mtime::escape(&input.sample) + )]) + .map(|rel| crate::join(&input.sample_dir, rel)); // Group a reads the sample VCF, the input that takes time, on its own - // thread; groups b and c read their sections meanwhile, one at a time, - // so the peak memory stays near the biggest section's. - let (a, b, mut c) = std::thread::scope(|scope| { + // thread, and so does the read of its contigs; groups b and c read + // their sections meanwhile, one at a time, so the peak memory stays + // near the biggest section's. + let (a, b, mut c, contigs) = std::thread::scope(|scope| { + let contigs = scope.spawn(|| vcf.as_deref().and_then(|p| scan::vcf_contigs(p).ok())); let a = scope.spawn(|| read_a(input, &folder)); let b = group_b::read(input, &folder); let c = read_c(input, &folder); @@ -145,8 +156,15 @@ pub fn collect(input: &Input) -> Result { .collect() }; let a = a.join().unwrap_or_else(|_| stopped(&super::model::GROUP_A)); - (a, b, c) + (a, b, c, contigs.join().ok().flatten()) }); + let intervals = folder + .manifest + .as_ref() + .and_then(|m| m.value("run", "intervals")) + .map(str::trim) + .filter(|v| !v.is_empty()) + .map(str::to_owned); let declared_sex = declared(input, &folder, qc_declared(&a)); post_c( input, @@ -189,6 +207,10 @@ pub fn collect(input: &Input) -> Result { .collect(), ), ); + if let Some(scope) = scope(contigs.as_deref(), intervals.as_deref()) { + mark_partial(m, &scope); + m.insert("scope".into(), scope); + } let dir = Path::new(&input.sample_dir); if let Some(r) = delta::read_recheck(&dir.join("recheck").join("state.json")) { m.insert("recheck".into(), Value::Object(r)); @@ -201,6 +223,77 @@ pub fn collect(input: &Input) -> Result { Ok(v) } +/// The sections whose result is a share, a sum or a placement over the +/// whole genome: a run over a part of it gives a different result that +/// reads the same. +pub const GENOME_WIDE: [&str; 6] = [ + "callability", + "prs", + "ancestry_fine", + "telomere", + "roh", + "archaic", +]; + +/// `scope`: what part of the genome the run called, from the contigs of +/// the sample VCF's records (`chr20` and `20` alike) and the intervals the +/// run manifest records (`run intervals`). `None` (no `scope` key) without a +/// sample VCF read to its end: the scope is then not known, and nothing +/// is marked. +/// +/// The run is partial when the calls cover fewer than the 22 autosomes, or +/// when the run was limited to intervals. chrX is recorded but makes no run +/// partial: the genome-wide sections read the autosomes. +fn scope(contigs: Option<&[String]>, intervals: Option<&str>) -> Option { + let names: Vec<&str> = contigs? + .iter() + .map(|c| c.strip_prefix("chr").unwrap_or(c)) + .collect(); + let autosomes: Vec = (1..=22) + .map(|i| i.to_string()) + .filter(|n| names.contains(&n.as_str())) + .map(|n| format!("chr{n}")) + .collect(); + let n = autosomes.len(); + let mark = if n < 22 { + Some(format!("partial: covers {n} of 22 autosomes")) + } else { + intervals.map(|i| format!("partial: limited to the run's intervals ({i})")) + }; + let mut out = indexmap::IndexMap::new(); + out.insert("autosomes_covered".to_owned(), Value::Int(n as i128)); + out.insert( + "autosomes".to_owned(), + Value::Array(autosomes.into_iter().map(Value::Str).collect()), + ); + out.insert("chrx".to_owned(), Value::Bool(names.contains(&"X"))); + out.insert( + "intervals".to_owned(), + intervals.map_or(Value::Null, |i| Value::Str(i.to_owned())), + ); + out.insert("partial".to_owned(), Value::Bool(mark.is_some())); + out.insert("mark".to_owned(), mark.map_or(Value::Null, Value::Str)); + Some(Value::Object(out)) +} + +/// Adds the scope's mark as `partial` to each genome-wide section that has +/// a result (ok or stale) when the run was partial. +fn mark_partial(summary: &mut indexmap::IndexMap, scope: &Value) { + let Some(Value::Str(mark)) = at(Some(scope), "mark") else { + return; + }; + let Some(Value::Object(sections)) = summary.get_mut("sections") else { + return; + }; + for key in GENOME_WIDE { + if let Some(Value::Object(sec)) = sections.get_mut(key) + && (is(sec.get("state"), "ok") || is(sec.get("state"), "stale")) + { + sec.insert("partial".into(), Value::Str(mark.clone())); + } + } +} + /// What the post pass of group c needs from group b: the CPIC state, /// pypgx's CYP2D6 call and Cyrius's genotype and Filter. fn others(b: &[Section]) -> Others { diff --git a/rust/crates/og-summary/src/collect/scan.rs b/rust/crates/og-summary/src/collect/scan.rs index 26da7d11d..86239ff2f 100644 --- a/rust/crates/og-summary/src/collect/scan.rs +++ b/rust/crates/og-summary/src/collect/scan.rs @@ -119,6 +119,51 @@ impl FolderIndex { } } +/// The contigs of the sample VCF's records, each once, in the order first +/// seen: the part of the genome the run called. A record is what the +/// variant count reads as one, a line not starting with `#` with seven +/// cells or more; `\r\n` and a lone `\r` end a line too. An error is a file +/// that cannot be read to its end, whose contigs are then not known. +pub fn vcf_contigs(path: &str) -> Result, String> { + use std::io::BufRead; + let fail = |e: std::io::Error| { + format!( + "{}: {}", + crate::basename(path), + super::sections::gzip_message(&e) + ) + }; + let mut r = og_io::bgzf::open(path, og_io::bgzf::workers()).map_err(fail)?; + let mut seen: Vec> = Vec::new(); + let mut buf = Vec::with_capacity(1 << 16); + let mut record = |line: &[u8]| { + if line.first() == Some(&b'#') { + return; + } + let chrom = line.split(|&c| c == b'\t').next().unwrap_or(line); + // A sorted VCF repeats its last contig line after line. + if seen.last().is_some_and(|c| c == chrom) || seen.iter().any(|c| c == chrom) { + return; + } + if memchr::memchr_iter(b'\t', line).take(6).count() == 6 { + seen.push(chrom.to_vec()); + } + }; + loop { + buf.clear(); + if r.read_until(b'\n', &mut buf).map_err(fail)? == 0 { + break; + } + let line = buf.strip_suffix(b"\n").unwrap_or(&buf); + let line = line.strip_suffix(b"\r").unwrap_or(line); + line.split(|&c| c == b'\r').for_each(&mut record); + } + Ok(seen + .into_iter() + .map(|c| String::from_utf8_lossy(&c).into_owned()) + .collect()) +} + fn has_magic(s: &str) -> bool { s.contains(['*', '?', '[']) } @@ -235,6 +280,25 @@ mod tests { ); } + #[test] + fn vcf_contigs_are_the_records_contigs_once_in_order() { + let d = Dir::new("scan-contigs"); + let p = d.put_gz( + "S.vcf.gz", + "##contig=\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\n\ + chr22\t1\t.\tA\tG\t1\tPASS\nchr22\t2\t.\tA\tG\t1\tPASS\n\ + chr3\t1\t.\tA\tG\t1\r\nchr7\t1\t.\tA\tG\t1\tPASS\rchrX\t1\t.\tA\tG\t1\t.\n\ + chr9\t1\t.\tA\tG\t1\nchr22\t3\t.\tA\tG\t1\tPASS\n", + ); + // chr1 is only a header line; chr3 and chr9 have six cells. + assert_eq!(vcf_contigs(&p).unwrap(), ["chr22", "chr7", "chrX"]); + let empty = d.put_gz("E.vcf.gz", "#CHROM\n"); + assert!(vcf_contigs(&empty).unwrap().is_empty()); + let cut = d.put("C.vcf.gz", b"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03"); + assert!(vcf_contigs(&cut).is_err()); + assert!(vcf_contigs(&d.path("none.vcf.gz")).is_err()); + } + #[test] fn a_missing_folder_is_empty() { let ix = FolderIndex::walk(Path::new("/nonexistent/og-summary-scan")); diff --git a/tests/parity/golden/summary-collect/all-history/all-history.json b/tests/parity/golden/summary-collect/all-history/all-history.json index e6d8efc33..99c68379f 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-16 16:16 UTC", + "generated_utc": "2026-11-19 11:33 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12197,7 +12197,8 @@ "OR9G9", "TAS2R45" ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "sex_check": { "title": "Sex check (indexcov)", @@ -13471,7 +13472,8 @@ "panel": "HGDP+1kGP", "low_confidence": null } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancestry_fine": { "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", @@ -13559,7 +13561,8 @@ "colour": "#56b4e9" } ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "manta": { "title": "Structural variants (Manta)", @@ -14033,7 +14036,8 @@ "depth": 30.0, "read_floor": 2000, "low_reads": true - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "roh": { "title": "Runs of homozygosity", @@ -14105,7 +14109,8 @@ "partial": false, "note": "Sites on all 22 autosomes; marker presence does not establish callable breadth or copy neutrality." } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "haplogroup": { "title": "Mitochondrial haplogroup", @@ -14793,7 +14798,8 @@ "analysed_bp": 2500000000, "neanderthal_percent": "2.00", "denisovan_percent": "0.01" - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancient": { "title": "Ancient populations (AADR PCA)", @@ -15518,6 +15524,16 @@ "Phase: two variants in one gene are compound-het candidates, not confirmed", "Variants of uncertain significance (not interpreted)" ], + "scope": { + "autosomes_covered": 1, + "autosomes": [ + "chr22" + ], + "chrx": false, + "intervals": null, + "partial": true, + "mark": "partial: covers 1 of 22 autosomes" + }, "recheck": { "checked_utc": "2021-03-05 00:00:00 UTC", "items": [ diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index fabbf7ce7..1609fa91e 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-16 16:16 UTC", + "generated_utc": "2026-11-19 11:33 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12202,7 +12202,8 @@ "OR9G9", "TAS2R45" ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "sex_check": { "title": "Sex check (indexcov)", @@ -13476,7 +13477,8 @@ "panel": "HGDP+1kGP", "low_confidence": null } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancestry_fine": { "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", @@ -13564,7 +13566,8 @@ "colour": "#56b4e9" } ] - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "manta": { "title": "Structural variants (Manta)", @@ -14038,7 +14041,8 @@ "depth": 30.0, "read_floor": 2000, "low_reads": true - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "roh": { "title": "Runs of homozygosity", @@ -14110,7 +14114,8 @@ "partial": false, "note": "Sites on all 22 autosomes; marker presence does not establish callable breadth or copy neutrality." } - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "haplogroup": { "title": "Mitochondrial haplogroup", @@ -14798,7 +14803,8 @@ "analysed_bp": 2500000000, "neanderthal_percent": "2.00", "denisovan_percent": "0.01" - } + }, + "partial": "partial: covers 1 of 22 autosomes" }, "ancient": { "title": "Ancient populations (AADR PCA)", @@ -15522,5 +15528,15 @@ "Repeat expansions outside the ExpansionHunter catalog", "Phase: two variants in one gene are compound-het candidates, not confirmed", "Variants of uncertain significance (not interpreted)" - ] + ], + "scope": { + "autosomes_covered": 1, + "autosomes": [ + "chr22" + ], + "chrx": false, + "intervals": null, + "partial": true, + "mark": "partial: covers 1 of 22 autosomes" + } } diff --git a/tests/schema/summary.schema.json b/tests/schema/summary.schema.json index df7c1dbe4..02270bedb 100644 --- a/tests/schema/summary.schema.json +++ b/tests/schema/summary.schema.json @@ -50,6 +50,9 @@ }, "data": { "type": "object" + }, + "partial": { + "type": "string" } } } @@ -1769,6 +1772,71 @@ "type": "string" }, "minItems": 1 + }, + "scope": { + "type": "object", + "required": [ + "autosomes_covered", + "autosomes", + "chrx", + "intervals", + "partial", + "mark" + ], + "properties": { + "autosomes_covered": { + "type": "integer", + "minimum": 0 + }, + "autosomes": { + "type": "array", + "items": { + "enum": [ + "chr1", + "chr2", + "chr3", + "chr4", + "chr5", + "chr6", + "chr7", + "chr8", + "chr9", + "chr10", + "chr11", + "chr12", + "chr13", + "chr14", + "chr15", + "chr16", + "chr17", + "chr18", + "chr19", + "chr20", + "chr21", + "chr22" + ] + }, + "maxItems": 22 + }, + "chrx": { + "type": "boolean" + }, + "intervals": { + "type": [ + "string", + "null" + ] + }, + "partial": { + "type": "boolean" + }, + "mark": { + "type": [ + "string", + "null" + ] + } + } } } } From ec30fe94402e410ec8e604810edeaa3ffe865043 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 12:45:37 +0100 Subject: [PATCH 014/110] docs(callability): measure the gene pass without --fast-mode on public HG002 30x The gene callability pass took 3 min 26 s and 3 min 50 s on HG002 30x without --fast-mode (1 min 46 s and 2 min 29 s with it), about 37% more CPU time. Four of 1,553 catalog genes moved from read to not read. Bead: plat-50 --- CHANGELOG.md | 1 + docs/16b-mosdepth.md | 6 +++++- docs/hardware-requirements.md | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79deccf48..edfa98c37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Gene callability (step 16b and the Nextflow `MOSDEPTH` process) no longer counts a fragment twice. The gene pass ran mosdepth with `--fast-mode`, which counts every base from a read's start to its end: where the two mates of a pair overlap, a base counted two reads, and the bases of a deletion in a read counted as read. A gene that fewer than 10 fragments covered could reach 10x and read as read. The gene pass now runs without `--fast-mode`; the genome-wide 500 bp pass keeps it. The file name and columns of `_callability.bed.gz` do not change; its `10X` counts can be lower, so a gene near 90% can move to "not read". On public HG002 30x, 4 of 1,553 genes moved (DHX40, SPATA31C2, GOLGA6L10 and UGT2B17), and the pass takes about 37% more CPU time, 3.5-4 min on a 10-core Mac mini. The step doc and `docs/lessons-learned.md` said `--fast-mode` drops the per-base output; `--no-per-base` does that, and they now say so. A new e2e case, `i411-callability-overlap-1-mates`, runs both paths on a small BAM with overlapping pairs and a deletion. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. - Four commands in docs tables now copy and run as written. The docs site printed the backslash that escaped each pipe for GitHub, so the Nextflow install line in Getting started read `curl -s https://get.nextflow.io \| ...`, which is not a pipeline. That row now points at the install command in Full run. The BAM build check of the FAQ and the site table hash of Keeping versions up to date moved into code blocks under their tables, and the `readings` row of Copy Number from Depth names its separator in words. `tests/test_docs_table_pipes.sh` fails when a table row under `docs/` holds an escaped pipe inside a code span. diff --git a/docs/16b-mosdepth.md b/docs/16b-mosdepth.md index 7fdba327d..b8806be26 100644 --- a/docs/16b-mosdepth.md +++ b/docs/16b-mosdepth.md @@ -101,9 +101,13 @@ The CMRG gene list and the stratification BEDs are only inputs of the build scri | Dataset | Threads | Time | Memory | |---|---|---|---| | 30-40x WGS, measured in three runs ([runtime](hardware-requirements.md#runtime-per-step)) | 4 | 2-3 min | 1.9 GB | -| The gene callability pass on the same BAM (estimate: a second read of the BAM) | 4 | about as long again | < 2 GB | +| The gene callability pass, public HG002 30x, measured in two runs (below) | 4 | 3 min 26 s - 3 min 50 s | 2.0 GB | | chr22 BAM (estimate) | 2 | < 30 sec | < 1 GB | +The gene pass was measured on Google's public HG002 NovaSeq PCR-free 30x BAM on GRCh38 (`HG002.novaseq.pcr-free.30x.dedup.grch38.bam`, 43.7 GB, from `storage.googleapis.com/brain-genomics-public`), with mosdepth 0.3.14 and 4 threads, on a 10-core Mac mini that was running other jobs. Without `--fast-mode` it took 3 min 26 s and 3 min 50 s; with it, as before, 1 min 46 s and 2 min 29 s. The CPU time is the steadier figure: about 7 min without `--fast-mode` against 5 min with it, 37% more. The genome-wide pass took 3 min 15 s on the same machine. Peak memory was 2.0 GB in every run. + +On that genome 934 of the 1,553 catalog genes with a position are read, against 938 with `--fast-mode`. The share of bases at 10x fell by 0.2 points on average and by 7 points at most. Four genes moved from read to not read: DHX40, SPATA31C2 and GOLGA6L10 were at 90.1-90.2% and are now at 89.6-89.9%, and UGT2B17 (step 32 calls it) went from 91.7% to 89.9%. No gene moved the other way. + ## MultiQC Integration mosdepth output is automatically detected by MultiQC. The `mosdepth.global.dist.txt` and `mosdepth.summary.txt` files are consumed to generate coverage distribution plots and summary statistics in the aggregated report. diff --git a/docs/hardware-requirements.md b/docs/hardware-requirements.md index 1da8b16a0..50becd244 100644 --- a/docs/hardware-requirements.md +++ b/docs/hardware-requirements.md @@ -211,7 +211,7 @@ Both ends of each measured figure are also in `assets/steps.tsv` (`hours_low` an | 14 Imputation prep (opt-in) | not measured (estimate ~10 min) | | | | | 15 duphold | 3-4 min | 1.0 GB | 3.2-4.1 | plus about a second for its filter | | 16 indexcov | 1-3 s | | | | -| 16b mosdepth | 2-3 min | 1.9 GB | 2.7-3.5 | | +| 16b mosdepth | 2-3 min | 1.9 GB | 2.7-3.5 | the gene callability pass now runs without `--fast-mode`, which costs it about 37% more CPU time; on public HG002 30x that pass alone took 3.5-4 min ([step 16b](16b-mosdepth.md#runtime)) | | 17 CPSR | 17-36 min | 12.3-15.6 GB (`peak_rss`, see above) | 1.8-2.3 | | | 18 CNVpytor | 14-20 min | 1.4-2.7 GB | 2.3-3.7 | | | 19 Delly | 21 min - 3 h 19 min | 1.2-3.1 GB | 1.0-1.1 | five runs: 21 and 25 min on two samples, 1 h 35 min to 3 h 19 min in three runs on the third | From dec1bc40cca32f2dfcae37943521cf02349f05f4 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 13:19:58 +0100 Subject: [PATCH 015/110] fix(prs): tie the kept percentile to the reference-call rule, not the file type The withheld line said a gVCF or a chip VCF keeps the percentile. A target of either kind with too few 0/0 calls still fails the one-in-five rule, so both reports and the docs now say the reference calls keep it, and that those files usually have them. --- bin/render_report.py | 5 +++-- docs/25-prs.md | 2 +- docs/results/ancestry-and-lineage.md | 2 +- rust/crates/og-render/src/sections/prs.rs | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/bin/render_report.py b/bin/render_report.py index 4363fc8eb..c53f2324d 100755 --- a/bin/render_report.py +++ b/bin/render_report.py @@ -576,8 +576,9 @@ def prs_sex_note(d): # panel ran, so the no-panel line would be false. PRS_WITHHELD_TEXT = ("Percentile withheld: the input lists variants only, so each scoring site it leaves out adds " "nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, " - "whose genotypes are complete. A gVCF from step 3, or a chip VCF, lists the reference calls " - "and keeps the percentile.") + "whose genotypes are complete. Genotypes with a reference call (0/0) at one genotyped " + "position in five or more keep the percentile; a gVCF from step 3 or a chip VCF usually has " + "them.") def prs_note(d): diff --git a/docs/25-prs.md b/docs/25-prs.md index 169fd6224..8ef1b061d 100644 --- a/docs/25-prs.md +++ b/docs/25-prs.md @@ -196,7 +196,7 @@ That run scored PGS000018 alone and fits a 16 GB machine; the default scores nee - **Evaluated_In**: the groups the score has an evaluation for in the score list (`EUR;AFR;AMR`), empty when it has none. - **Effect**: the OR or HR of the evaluation in `Ancestry_Group`, with the group and the PPM id (`HR 1.53 (EUR, PPM000591)`). Empty without the panel, when the score has no percentile or was not evaluated in your group, and for a score that does not apply to the declared sex. - **Percentile_Note**: `percentile withheld: the input lists variants only` when the panel gave a percentile and the genotypes pgsc_calc scored hold no reference calls (see [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf)); empty otherwise. -- **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the VCF was there. The percentile does not depend on it: a chip VCF is `vcf` and keeps its percentile. +- **Input**: `gvcf` when the positions were genotyped from the gVCF, `vcf` when only the VCF was there. The percentile does not depend on it: a chip VCF is `vcf`, and keeps its percentile when it passes the reference-call rule of [Hom-ref sites come from the gVCF](#hom-ref-sites-come-from-the-gvcf). Both reports show the percentile with its group. When no panel was used, they show one line saying "Raw score only" instead, and the "Not assessed" list says that no ancestry reference panel was used. When the panel ran but every percentile was withheld for a variant-only input (see `Percentile_Note`), the line says "Percentile withheld: the input lists variants only" and why, and the "Not assessed" list says the percentiles were withheld; neither says that no panel was installed. With the panel they also show the effect in your group, or say that the score has none for it and name the groups it was evaluated in. When a score's chrX rows were left out because no sex was given, the same line names the score and how many rows; rows left out in a panel run show only in the summary's ChrX column. A score that does not apply to the declared sex shows "not applicable to the declared sex" in place of its percentile, and when no sex was declared the reports say which scores are for one sex only. diff --git a/docs/results/ancestry-and-lineage.md b/docs/results/ancestry-and-lineage.md index 6fa59b785..cd9dff8c5 100644 --- a/docs/results/ancestry-and-lineage.md +++ b/docs/results/ancestry-and-lineage.md @@ -101,4 +101,4 @@ Closeness on the PCA is genetic similarity, not descent: being near an ancient g With the ancestry panel installed (`scripts/setup.sh --ancestry-panel`), each score has a **Percentile** and an **Ancestry_Group**: the 80th percentile means your score is higher than 80% of the reference samples whose genetic ancestry is most similar to yours (step 26 names that group). A percentile is still not a probability: most people at a high percentile never get the condition, and lifestyle and family history often weigh more. Percentiles of different conditions are not comparable either. -Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When the input lists variants only (a VCF without its gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#hom-ref-sites-come-from-the-gvcf) explains why). Each score then keeps its raw sum but gets no percentile, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the report says "Percentile withheld" in place of "Raw score only". A chip VCF lists its reference calls and keeps its percentiles. When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. +Without the panel the report says "Raw score only": the sum cannot be compared with anyone, so read nothing into its size. A score with `NA` as its sum matched under 75% of its variants and was not scored; `Matched_Pct` says how many. When the input lists variants only (a VCF without its gVCF), the sums leave out the sites where you match the reference ([step 25](../25-prs.md#hom-ref-sites-come-from-the-gvcf) explains why). Each score then keeps its raw sum but gets no percentile, `Percentile_Note` says `percentile withheld: the input lists variants only`, and the report says "Percentile withheld" in place of "Raw score only". A score keeps its percentile when the genotypes have a reference call (0/0) at one genotyped position in five or more, which a chip VCF usually has. When `ChrX` says `left out`, the sample's sex was not given and the score's chrX rows are not in its sum ([chrX and the sex](../25-prs.md#chrx-and-the-sex)). The breast cancer score is for women and the prostate cancer score for men: when you declared the other sex, `Sex_Check` says `not applicable to the declared sex` and the score has no percentile. The blood pressure and lipid scores rank a genetic tendency only; a measured blood pressure or lipid panel says far more. The Alzheimer's score includes APOE: read [Before you look](../interpreting-results.md#before-you-look-what-the-pipeline-can-tell-you) first. diff --git a/rust/crates/og-render/src/sections/prs.rs b/rust/crates/og-render/src/sections/prs.rs index e7646f62e..c35e01535 100644 --- a/rust/crates/og-render/src/sections/prs.rs +++ b/rust/crates/og-render/src/sections/prs.rs @@ -33,8 +33,9 @@ pub const EFFECT_TEXT: &str = "Effect: the odds ratio (OR) or hazard ratio (HR) /// `percentile_note`): the panel ran, so the no-panel line would be false. pub const WITHHELD_TEXT: &str = "Percentile withheld: the input lists variants only, so each \ scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with \ - the reference panel's samples, whose genotypes are complete. A gVCF from step 3, or a chip \ - VCF, lists the reference calls and keeps the percentile."; + the reference panel's samples, whose genotypes are complete. Genotypes with a reference call \ + (0/0) at one genotyped position in five or more keep the percentile; a gVCF from step 3 or a \ + chip VCF usually has them."; /// What a score, matched or total cell says when the summary has none: og /// summary collect writes null for a short row of pgsc_calc's table. From e2fd6fc7929542ee3b871c73fc2c384c94ed9417 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 13:25:09 +0100 Subject: [PATCH 016/110] docs(callability): give step 16b's full time on 30x and how to refresh an old table --- CHANGELOG.md | 2 +- docs/16b-mosdepth.md | 2 +- docs/hardware-requirements.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de2cdf6ce..c47435362 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- Gene callability (step 16b and the Nextflow `MOSDEPTH` process) no longer counts a fragment twice. The gene pass ran mosdepth with `--fast-mode`, which counts every base from a read's start to its end: where the two mates of a pair overlap, a base counted two reads, and the bases of a deletion in a read counted as read. A gene that fewer than 10 fragments covered could reach 10x and read as read. The gene pass now runs without `--fast-mode`; the genome-wide 500 bp pass keeps it. The file name and columns of `_callability.bed.gz` do not change; its `10X` counts can be lower, so a gene near 90% can move to "not read". On public HG002 30x, 4 of 1,553 genes moved (DHX40, SPATA31C2, GOLGA6L10 and UGT2B17), and the pass takes about 37% more CPU time, 3.5-4 min on a 10-core Mac mini. The step doc and `docs/lessons-learned.md` said `--fast-mode` drops the per-base output; `--no-per-base` does that, and they now say so. A new e2e case, `i411-callability-overlap-1-mates`, runs both paths on a small BAM with overlapping pairs and a deletion. +- Gene callability (step 16b and the Nextflow `MOSDEPTH` process) no longer counts a fragment twice. The gene pass ran mosdepth with `--fast-mode`, which counts every base from a read's start to its end: where the two mates of a pair overlap, a base counted two reads, and the bases of a deletion in a read counted as read. A gene that fewer than 10 fragments covered could reach 10x and read as read. The gene pass now runs without `--fast-mode`; the genome-wide 500 bp pass keeps it. The file name and columns of `_callability.bed.gz` do not change; its `10X` counts can be lower, so a gene near 90% can move to "not read". Step 16b skips a sample it already ran, so a sample from before this change keeps its old counts: delete `/mosdepth/_callability.bed.gz` and run step 16b again, and only the gene pass runs. On public HG002 30x, 4 of 1,553 genes moved (DHX40, SPATA31C2, GOLGA6L10 and UGT2B17), and the pass takes about 37% more CPU time, 3.5-4 min on a 10-core Mac mini. The step doc and `docs/lessons-learned.md` said `--fast-mode` drops the per-base output; `--no-per-base` does that, and they now say so. A new e2e case, `i411-callability-overlap-1-mates`, runs both paths on a small BAM with overlapping pairs and a deletion. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/16b-mosdepth.md b/docs/16b-mosdepth.md index b8806be26..972012d3f 100644 --- a/docs/16b-mosdepth.md +++ b/docs/16b-mosdepth.md @@ -100,7 +100,7 @@ The CMRG gene list and the stratification BEDs are only inputs of the build scri | Dataset | Threads | Time | Memory | |---|---|---|---| -| 30-40x WGS, measured in three runs ([runtime](hardware-requirements.md#runtime-per-step)) | 4 | 2-3 min | 1.9 GB | +| The genome-wide pass, 30-40x WGS, measured in three runs ([runtime](hardware-requirements.md#runtime-per-step)) | 4 | 2-3 min | 1.9 GB | | The gene callability pass, public HG002 30x, measured in two runs (below) | 4 | 3 min 26 s - 3 min 50 s | 2.0 GB | | chr22 BAM (estimate) | 2 | < 30 sec | < 1 GB | diff --git a/docs/hardware-requirements.md b/docs/hardware-requirements.md index 50becd244..00555f527 100644 --- a/docs/hardware-requirements.md +++ b/docs/hardware-requirements.md @@ -211,7 +211,7 @@ Both ends of each measured figure are also in `assets/steps.tsv` (`hours_low` an | 14 Imputation prep (opt-in) | not measured (estimate ~10 min) | | | | | 15 duphold | 3-4 min | 1.0 GB | 3.2-4.1 | plus about a second for its filter | | 16 indexcov | 1-3 s | | | | -| 16b mosdepth | 2-3 min | 1.9 GB | 2.7-3.5 | the gene callability pass now runs without `--fast-mode`, which costs it about 37% more CPU time; on public HG002 30x that pass alone took 3.5-4 min ([step 16b](16b-mosdepth.md#runtime)) | +| 16b mosdepth | 2-3 min | 1.9 GB | 2.7-3.5 | the time is the genome-wide pass only; the gene callability pass adds 3.5-4 min (measured on public HG002 30x, without `--fast-mode`, which costs it about 37% more CPU time), so the step takes about 6-7 min on 30x ([step 16b](16b-mosdepth.md#runtime)) | | 17 CPSR | 17-36 min | 12.3-15.6 GB (`peak_rss`, see above) | 1.8-2.3 | | | 18 CNVpytor | 14-20 min | 1.4-2.7 GB | 2.3-3.7 | | | 19 Delly | 21 min - 3 h 19 min | 1.2-3.1 GB | 1.0-1.1 | five runs: 21 and 25 min on two samples, 1 h 35 min to 3 h 19 min in three runs on the third | From e294262888b2238728fc150a0d71d42ab6568f8c Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 13:54:07 +0100 Subject: [PATCH 017/110] docs(summary): say that no step writes the run intervals row yet, so intervals reads null --- CHANGELOG.md | 2 +- docs/results/quality.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc2cb22af..36c10cdb8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- `summary.json` says what part of the genome a run covered. A run on part of the genome (`--intervals`, or a VCF cut down to chr20 and chr22) gave callability, polygenic score, ancestry, telomere, ROH and archaic results that read as whole-genome results. `og summary collect` now reads the chromosomes of the sample VCF's records and writes a new top-level `scope` object: `autosomes_covered`, `autosomes`, `chrx`, `intervals` (a `run intervals` row of `run_manifest.tsv`, else `null`), `partial` and `mark`. When fewer than 22 autosomes have calls, or the run was limited to intervals, each of those six sections that has a result gets a new `partial` field, such as `partial: covers 2 of 22 autosomes`. Without a readable sample VCF there is no `scope` and nothing is marked. These are new keys; no key, file or format changes or goes away. The reports and the live site do not show the mark yet. `docs/results/quality.md` describes it, and `tests/schema/summary.schema.json` has both fields. +- `summary.json` says what part of the genome a run covered. A run on part of the genome (`--intervals`, or a VCF cut down to chr20 and chr22) gave callability, polygenic score, ancestry, telomere, ROH and archaic results that read as whole-genome results. `og summary collect` now reads the chromosomes of the sample VCF's records and writes a new top-level `scope` object: `autosomes_covered`, `autosomes`, `chrx`, `intervals` (a `run intervals` row of `run_manifest.tsv`, else `null`), `partial` and `mark`. No step writes the `run intervals` row yet, so today `intervals` is `null`, and a run limited with `--intervals` is caught only by the chromosomes its calls are on. When fewer than 22 autosomes have calls, or the run was limited to intervals, each of those six sections that has a result gets a new `partial` field, such as `partial: covers 2 of 22 autosomes`. Without a readable sample VCF there is no `scope` and nothing is marked. These are new keys; no key, file or format changes or goes away. The reports and the live site do not show the mark yet. `docs/results/quality.md` describes it, and `tests/schema/summary.schema.json` has both fields. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/results/quality.md b/docs/results/quality.md index 05d169fb1..f24152594 100644 --- a/docs/results/quality.md +++ b/docs/results/quality.md @@ -19,7 +19,7 @@ So `summary.json` records the run's scope under `scope`. It comes from the chrom - `autosomes_covered`: how many of chr1 to chr22 have calls, and `autosomes`: which ones. - `chrx`: whether chrX has calls. chrX alone does not make a run partial, because these results read the autosomes. -- `intervals`: the intervals the run was limited to, from a `run intervals` row of `run_manifest.tsv`, else `null`. +- `intervals`: the intervals the run was limited to, from a `run intervals` row of `run_manifest.tsv`, else `null`. No step writes this row yet, so today it is `null`: a run limited with `--intervals` is caught only by the chromosomes its calls are on. - `partial` and `mark`: the run is partial when it covers fewer than 22 autosomes (`partial: covers 2 of 22 autosomes`) or was limited to intervals (`partial: limited to the run's intervals (...)`). When the run is partial, each of those six sections that has a result gets the same text in its `partial` field. Without a sample VCF that can be read to its end, the scope is not known: `summary.json` has no `scope`, and no section is marked. The scope says which chromosomes have calls. It does not say how much of each chromosome was read well; callability does that. From bc9c3b9f5f0e88a153dfb4a8562cade811269255 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:25:10 +0100 Subject: [PATCH 018/110] ci(e2e): run vendor-vcf-intake-5-docs on a Rust change, it runs og The case runs the pipeline from docs/vcf-first.md and reads PharmCAT's report with og dev pharmcat diplotypes, so its row lists bin/og. The real-table check in tests/test_e2e_scope.sh now names it. --- CHANGELOG.md | 2 +- scripts/ci/e2e-case-paths.tsv | 2 +- tests/test_e2e_scope.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index db85e0f26..e589459eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- A pull request that changes only Rust code now runs the e2e cases that run `og`. Before, `rust/` was outside the e2e scope, but for two files of `og-dev`, so such a pull request ran no case, and a merge of it started no run on main: a change in what `og` writes reached main with no real-tool run. A change under `rust/` now picks every case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, as a change to `bin/og` does, and main runs every case after such a merge. 19 case rows that run `og` through a step, helper or module now list `bin/og`. `tests/test_e2e_scope.sh` checks the pick. +- A pull request that changes only Rust code now runs the e2e cases that run `og`. Before, `rust/` was outside the e2e scope, but for two files of `og-dev`, so such a pull request ran no case, and a merge of it started no run on main: a change in what `og` writes reached main with no real-tool run. A change under `rust/` now picks every case whose row in `scripts/ci/e2e-case-paths.tsv` has a glob that matches `bin/og`, as a change to `bin/og` does, and main runs every case after such a merge. 20 case rows that run `og` through a step, helper or module now list `bin/og`. `tests/test_e2e_scope.sh` checks the pick. - The required `e2e` check reads cancelled, not failed, when its run was cancelled, by a newer push or by hand. Before, it ran anyway and failed, which read as a broken case when the cases had only been stopped. A cancelled check still blocks a merge. - The testing guide says what a green `container-ok` means on a pull request that changes no image: no smoke row ran. It also says why the AnnotSV row with its 5.3 GB of full data stays monthly and on dispatch: no image pull request waits on that download. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. diff --git a/scripts/ci/e2e-case-paths.tsv b/scripts/ci/e2e-case-paths.tsv index 9f89ebab5..db1d1e0db 100644 --- a/scripts/ci/e2e-case-paths.tsv +++ b/scripts/ci/e2e-case-paths.tsv @@ -176,7 +176,7 @@ vendor-vcf-intake-1-bash bin/og scripts/07-pharmacogenomics.sh scripts/ci/fake-d vendor-vcf-intake-2-nf-report assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/mosdepth/* modules/local/multiqc/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/28-multiqc.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh vendor-vcf-intake-3-nf-stops assets/callability_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/stub/sample.bam assets/stub/sample.bam.bai bin/collect_summary.py bin/og modules/local/clinvar_screen/* modules/local/mito_haplogroup/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh vendor-vcf-intake-4-nf-header-clinvar assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/construct_variants.tsv assets/deep_intronic_sites.tsv assets/mito_confirmed.tsv assets/pgx_contraindications.tsv assets/pgx_genes.tsv assets/pgx_inhibitors.tsv assets/stub/sample.bam assets/stub/sample.bam.bai assets/stub/sample.vcf.gz bin/cn_loci.tsv bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/clinvar_screen/* modules/local/cpic_lookup/* modules/local/html_report/* modules/local/mito_haplogroup/* modules/local/pharmcat/* modules/local/roh/* modules/local/vcf_precheck/* scripts/06-clinvar-screen.sh scripts/07-pharmacogenomics.sh scripts/11-roh-analysis.sh scripts/12-mito-haplogroup.sh scripts/16b-mosdepth.sh scripts/20-mtoolbox.sh scripts/24-html-report.sh scripts/27-cpic-lookup.sh scripts/32-pypgx.sh scripts/36-pgx-consensus.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh -vendor-vcf-intake-5-docs scripts/ci/fake-docker/lib.sh +vendor-vcf-intake-5-docs bin/og scripts/ci/fake-docker/lib.sh viral-reads-1 bin/og modules/local/vcf_precheck/* modules/local/viral/* rust/crates/og-dev/src/fixture.rs scripts/47-viral.sh scripts/ci/fake-docker/lib.sh scripts/generate-report.sh scripts/setup.sh scripts/validate-setup.sh vntyper-1 assets/acmg_sf.tsv assets/callability_genes.tsv assets/carrier_genes.tsv assets/mito_confirmed.tsv assets/stub/sample.vcf.gz bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/vcf_precheck/* modules/local/vntyper/* scripts/24-html-report.sh scripts/52-vntyper.sh scripts/ci/fake-docker/lib.sh scripts/validate-setup.sh y-private-report-1-private-and-tree assets/live/index.html assets/viewer/index.html bin/collect_summary.py bin/og bin/render_report.py bin/results_index.py modules/local/html_report/* modules/local/y_haplogroup/* rust/crates/og-dev/src/fixture.rs scripts/16-indexcov.sh scripts/24-html-report.sh scripts/37-y-haplogroup.sh scripts/generate-report.sh scripts/ci/fake-docker/lib.sh scripts/setup.sh diff --git a/tests/test_e2e_scope.sh b/tests/test_e2e_scope.sh index 003ba7866..672a77de1 100755 --- a/tests/test_e2e_scope.sh +++ b/tests/test_e2e_scope.sh @@ -153,7 +153,7 @@ printf '%s\n' rust/og/src/main.rs > "${WORK}/changed.txt" if [ -s "${WORK}/rust.txt" ] && cmp -s "${WORK}/og.txt" "${WORK}/rust.txt"; then ok "the real table: a Rust change runs the $(wc -l < "${WORK}/rust.txt" | tr -d ' ') cases a bin/og change runs" else bad "the real table: a Rust change picks $(wc -l < "${WORK}/rust.txt" | tr -d ' ') cases, a bin/og change $(wc -l < "${WORK}/og.txt" | tr -d ' '): $(diff "${WORK}/og.txt" "${WORK}/rust.txt" | grep '^[<>]' | paste -sd' ' -)"; fi -for c in output-contract-1-hg002 traits-panel-1 prs-2-ancestry bash-step-11-roh; do +for c in output-contract-1-hg002 traits-panel-1 prs-2-ancestry bash-step-11-roh vendor-vcf-intake-5-docs; do if grep -qx "$c" "${WORK}/rust.txt"; then ok "the real table runs ${c}, which runs og, on a Rust change" else bad "the real table does not run ${c} on a Rust change, though it runs og"; fi done From d25f89ee97a2c86ea4acd36592e002019ed35ce8 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:29:34 +0100 Subject: [PATCH 019/110] feat(contract): compare the contract with a release's contract (--baseline) og dev contract --static compares the code with the contract in the same checkout only, so a change that renames a stable output and its row together, removes a stable param with its row, or demotes a stable row passes. --baseline FILE now checks every stable row of a release's contract against this one: still listed, still stable, same format, every leg and every required field kept. New rows and changes to experimental and internal rows pass. Bead: plat-03 --- rust/crates/og-dev/src/contract.rs | 132 +++++++++++++++++- rust/crates/og-dev/tests/repo.rs | 213 ++++++++++++++++++++++++++++- 2 files changed, 341 insertions(+), 4 deletions(-) diff --git a/rust/crates/og-dev/src/contract.rs b/rust/crates/og-dev/src/contract.rs index 71e52cf3a..eb7e6e0c7 100644 --- a/rust/crates/og-dev/src/contract.rs +++ b/rust/crates/og-dev/src/contract.rs @@ -16,6 +16,12 @@ //! required columns (tsv, csv), INFO/FORMAT/FILTER fields (vcf) or //! top-level keys (json). `--observe` also lists every file under //! `DIR/S` with what it has. +//! - `--baseline FILE`: the contract of the last release, against this one +//! ([`check_baseline`]): every stable row of FILE still has a row here, +//! still stable; a stable file keeps its format, every leg that wrote it +//! and every field it required. New rows, and changes to experimental and +//! internal rows, are free. Guard's `rust` job runs it against the newest +//! 1.x release tag. //! //! Exit 0 when nothing is broken, 1 when something is (or the contract is //! malformed: `ERROR: …`), 2 on a usage error. `--repo` defaults to the @@ -44,7 +50,7 @@ use std::io::{self, BufRead, Read, Write}; use std::path::Path; use std::sync::LazyLock; -const USAGE: &str = "usage: og dev contract [--contract CONTRACT] [--repo REPO] [--static] [--outputs OUTPUTS]\n [--leg {bash,nextflow}] [--sample SAMPLE] [--observe]\n"; +const USAGE: &str = "usage: og dev contract [--contract CONTRACT] [--repo REPO] [--static] [--baseline BASELINE]\n [--outputs OUTPUTS] [--leg {bash,nextflow}] [--sample SAMPLE] [--observe]\n"; const COLUMNS: [&str; 9] = [ "kind", @@ -714,6 +720,99 @@ fn check_static(repo: &str, rows: &[Row]) -> Result, String> { Ok(problems) } +// ---------------------------------------------------------------- the release side + +/// The legs a file row's `legs` cell names. +fn legs_of(legs: &str) -> &'static [&'static str] { + match legs { + "both" => &["bash", "nextflow"], + "bash" => &["bash"], + "nextflow" => &["nextflow"], + _ => &[], + } +} + +fn required(r: &Row) -> Vec<&str> { + if r.required == "-" { + Vec::new() + } else { + r.required.split(',').collect() + } +} + +/// What `rows` broke of `base`, the contract of the last release. Every +/// stable row of the release still has a row of the same kind and name, and +/// one of them is stable. A stable file row is still written by every leg +/// that wrote it, and each stable row of it that covers one of those legs +/// keeps the format and every required field. The `step`, `process` and +/// `e2e` cells say where the code and the tests stand, not what is promised, +/// so they may change. +pub fn check_baseline(base: &[Row], rows: &[Row]) -> Vec { + let mut problems = Vec::new(); + for b in base.iter().filter(|r| r.stability == Stability::Stable) { + let k = b.kind.word(); + let same: Vec<&Row> = rows + .iter() + .filter(|r| r.kind == b.kind && r.name == b.name) + .collect(); + let Some(first) = same.first() else { + problems.push(format!( + "BREAKING: the stable {k} {} (baseline line {}) has no row in the contract: removed or renamed since the release", + b.name, b.line + )); + continue; + }; + let stable: Vec<&Row> = same + .iter() + .copied() + .filter(|r| r.stability == Stability::Stable) + .collect(); + if stable.is_empty() { + let now = match first.stability { + Stability::Experimental => "experimental", + _ => "internal", + }; + problems.push(format!( + "BREAKING: the stable {k} {} (baseline line {}) is {now} now (contract line {}): a stable row stays stable until 2.0", + b.name, b.line, first.line + )); + continue; + } + if b.kind != Kind::File { + continue; + } + let was = legs_of(&b.legs); + for leg in was { + if !stable.iter().any(|r| legs_of(&r.legs).contains(leg)) { + problems.push(format!( + "BREAKING: the stable file {} (baseline line {}, legs {}) is no longer written by the {leg} leg", + b.name, b.line, b.legs + )); + } + } + let want = required(b); + for r in stable + .iter() + .filter(|r| legs_of(&r.legs).iter().any(|l| was.contains(l))) + { + if r.format != b.format { + problems.push(format!( + "BREAKING: the stable file {} (contract line {}) is {}, it was {} at the release (baseline line {})", + r.name, r.line, r.format, b.format, b.line + )); + } + let have = required(r); + for f in want.iter().filter(|f| !have.contains(f)) { + problems.push(format!( + "BREAKING: the stable file {} (contract line {}) no longer requires {f}, which the release promised (baseline line {})", + r.name, r.line, b.line + )); + } + } + } + problems +} + // ---------------------------------------------------------------- the run side /// The lines of a plain or gzip file, invalid UTF-8 replaced. @@ -970,6 +1069,7 @@ struct Args { contract: Option, repo: Option, static_: bool, + baseline: Option, outputs: Option, leg: Option, sample: Option, @@ -998,6 +1098,7 @@ fn parse(args: &[String]) -> Result, String> { "-h" | "--help" => return Ok(None), "--contract" => a.contract = Some(value(flag)?), "--repo" => a.repo = Some(value(flag)?), + "--baseline" => a.baseline = Some(value(flag)?), "--outputs" => a.outputs = Some(value(flag)?), "--sample" => a.sample = Some(value(flag)?), "--leg" => { @@ -1015,8 +1116,8 @@ fn parse(args: &[String]) -> Result, String> { _ => return Err(format!("unrecognized arguments: {arg}")), } } - if !a.static_ && a.outputs.is_none() { - return Err("give --static or --outputs".to_owned()); + if !a.static_ && a.outputs.is_none() && a.baseline.is_none() { + return Err("give --static, --baseline or --outputs".to_owned()); } if a.outputs.is_some() && (a.leg.is_none() || a.sample.is_none()) { return Err("--outputs needs --leg and --sample".to_owned()); @@ -1068,6 +1169,31 @@ pub fn cli(args: &[String], out: &mut dyn Write, err: &mut dyn Write) -> u8 { } } } + if let Some(path) = &a.baseline { + let base = match read_contract(path) { + Ok(r) => r, + Err(e) => { + let _ = writeln!(out, "ERROR: baseline: {e}"); + return 1; + } + }; + let mut p = check_baseline(&base, &rows); + let n = base + .iter() + .filter(|r| r.stability == Stability::Stable) + .count(); + let _ = writeln!( + out, + "baseline: {n} stable rows of {path} checked, {} problems", + p.len() + ); + if n == 0 { + p.push(format!( + "the baseline {path} has no stable row: the check checked nothing" + )); + } + problems.extend(p); + } if let (Some(dir), Some(leg), Some(sample)) = (&a.outputs, &a.leg, &a.sample) { let (n, mut p) = check_outputs(&rows, dir, leg, sample, a.observe, out); let _ = writeln!( diff --git a/rust/crates/og-dev/tests/repo.rs b/rust/crates/og-dev/tests/repo.rs index ad44bc082..48ea28761 100644 --- a/rust/crates/og-dev/tests/repo.rs +++ b/rust/crates/og-dev/tests/repo.rs @@ -14,7 +14,14 @@ //! a renamed file and an unreadable gzip are each refused and named; an //! experimental row is never enforced; an empty folder fails. //! 3. A contract with a row listed twice or a bad stability is refused. -//! 4. The report-only check passes on this checkout and names both cDNA +//! 4. Against a release's contract (`--baseline`, this checkout's standing +//! in for it): a stable output renamed in the code and in its row passes +//! the static check and fails here; a removed stable param or tool, a +//! stable row made experimental or internal, another format, a dropped +//! required column and a dropped leg each fail; a new row, a new leg, a +//! new required column, an `e2e` or `process` change and any change to +//! an experimental row pass; a baseline with no stable row fails. +//! 5. The report-only check passes on this checkout and names both cDNA //! checks; dropping a process from the report-only list fails naming //! it; a second consumer makes a process a feeder; a stale KEEP_STOP //! name fails; a `//` inside a string and a nested brace in the strategy @@ -310,6 +317,210 @@ fn contract_controls_are_refused() { } } +// ---------------------------------------------------------------- the release baseline + +/// The contract with `change` applied to its lines, the cells of each split +/// on tabs; `tag` names the copy. +fn contract_edit(tmp: &Tmp, tag: &str, change: impl Fn(&mut Vec>)) -> PathBuf { + let path = tmp.0.join(format!("{tag}.tsv")); + let mut lines: Vec> = fs::read_to_string(contract_path()) + .unwrap() + .lines() + .map(|l| l.split('\t').map(str::to_owned).collect()) + .collect(); + let before = lines.clone(); + change(&mut lines); + assert!(lines != before, "{tag}: the change changed nothing"); + let text: Vec = lines.iter().map(|c| c.join("\t")).collect(); + fs::write(&path, text.join("\n") + "\n").unwrap(); + path +} + +/// The line of `kind` row `name`. +fn row_mut<'a>(lines: &'a mut [Vec], kind: &str, name: &str) -> &'a mut Vec { + lines + .iter_mut() + .find(|c| c.len() > 1 && c[0] == kind && c[1] == name) + .unwrap_or_else(|| panic!("no {kind} row {name}")) +} + +fn drop_row(lines: &mut Vec>, kind: &str, name: &str) { + let n = lines.len(); + lines.retain(|c| !(c.len() > 1 && c[0] == kind && c[1] == name)); + assert_eq!(lines.len(), n - 1, "no {kind} row {name}"); +} + +const ROH: &str = "{sample}/roh/{sample}_roh_summary.txt"; +const HITS: &str = "{sample}/clinvar/{sample}_clinvar_hits.tsv"; + +#[test] +fn the_contract_keeps_its_own_baseline() { + let (rc, out) = contract(&["--repo", &s(&repo()), "--baseline", &s(&contract_path())]); + assert!( + rc == 0 + && has( + &out, + r"baseline: \d{2,} stable rows of .* checked, 0 problems" + ), + "{out}" + ); +} + +/// The red-first control: a stable output renamed in the code and in its row +/// in one change passes the static check, which reads only this checkout, +/// and fails against the release's contract. +#[test] +fn a_stable_output_renamed_with_its_row_fails_against_the_baseline() { + let tmp = Tmp::new("baseline-roh"); + let d = code_copy(&tmp); + edit( + &d.join("modules/local/roh/main.nf"), + "path(\"*_roh_summary.txt\")", + "path(\"*_roh_segments.txt\")", + ); + let c = contract_edit(&tmp, "renamed", |l| { + row_mut(l, "file", ROH)[1] = "{sample}/roh/{sample}_roh_segments.txt".to_owned(); + }); + let (rc, out) = contract(&["--static", "--repo", &s(&d), "--contract", &s(&c)]); + assert!(rc == 0 && out.contains(" 0 problems"), "{out}"); + let base = s(&contract_path()); + let (rc, out) = contract(&[ + "--static", + "--repo", + &s(&d), + "--contract", + &s(&c), + "--baseline", + &base, + ]); + assert!( + rc == 1 + && has( + &out, + r"FAIL BREAKING: the stable file \{sample\}/roh/\{sample\}_roh_summary\.txt \(baseline line \d+\) has no row in the contract" + ) + && out.matches("FAIL ").count() == 1, + "{out}" + ); +} + +#[test] +fn baseline_controls_are_refused() { + type Change = fn(&mut Vec>); + let cases: [(&str, Change, &str); 7] = [ + ( + "a stable param removed with its row", + |l| drop_row(l, "param", "intervals"), + r"BREAKING: the stable param intervals \(baseline line \d+\) has no row in the contract", + ), + ( + "a stable file made experimental", + |l| row_mut(l, "file", ROH)[6] = "experimental".to_owned(), + r"BREAKING: the stable file \{sample\}/roh/\{sample\}_roh_summary\.txt \(baseline line \d+\) is experimental now \(contract line \d+\)", + ), + ( + "a stable switch made internal", + |l| row_mut(l, "switch", "SKIP_TRIM")[6] = "internal".to_owned(), + r"BREAKING: the stable switch SKIP_TRIM \(baseline line \d+\) is internal now", + ), + ( + "a stable file of another format", + |l| row_mut(l, "file", ROH)[5] = "csv".to_owned(), + r"BREAKING: the stable file \{sample\}/roh/\{sample\}_roh_summary\.txt \(contract line \d+\) is csv, it was tsv at the release", + ), + ( + "a required column dropped", + |l| { + let r = row_mut(l, "file", HITS); + r[8] = r[8].replace(",clnsig,", ","); + }, + r"BREAKING: the stable file \{sample\}/clinvar/\{sample\}_clinvar_hits\.tsv \(contract line \d+\) no longer requires clnsig", + ), + ( + "a leg dropped (both to nextflow)", + |l| row_mut(l, "file", HITS)[4] = "nextflow".to_owned(), + r"BREAKING: the stable file \{sample\}/clinvar/\{sample\}_clinvar_hits\.tsv \(baseline line \d+, legs both\) is no longer written by the bash leg", + ), + ( + "a stable tool removed with its row", + |l| drop_row(l, "tool", "pharmcat"), + r"BREAKING: the stable tool pharmcat \(baseline line \d+\) has no row in the contract", + ), + ]; + let base = s(&contract_path()); + for (desc, change, want) in cases { + let tmp = Tmp::new("baseline"); + let c = contract_edit(&tmp, "changed", change); + let (rc, out) = contract(&["--contract", &s(&c), "--baseline", &base]); + assert!( + rc == 1 && has(&out, want) && out.matches("FAIL ").count() == 1, + "{desc}: rc={rc}: {out}" + ); + } +} + +#[test] +fn what_the_baseline_allows() { + type Change = fn(&mut Vec>); + let cases: [(&str, Change); 6] = [ + ("a new stable row", |l| { + l.push( + "file\t{sample}/new/{sample}_new.tsv\t-\t-\tbash\ttsv\tstable\t-\t-" + .split('\t') + .map(str::to_owned) + .collect(), + ) + }), + ("a leg added (nextflow to both)", |l| { + row_mut(l, "file", ROH)[4] = "both".to_owned() + }), + ("a new required column", |l| { + row_mut(l, "file", HITS)[8].push_str(",new_column") + }), + ("an e2e cell and a process changed", |l| { + let r = row_mut(l, "file", HITS); + r[7] = "-".to_owned(); + r[3] = "OTHER".to_owned(); + }), + ("an experimental row removed", |l| { + drop_row(l, "file", "{sample}/bloodtype/{sample}_bloodtype.tsv") + }), + ("an experimental row made stable", |l| { + row_mut(l, "file", "{sample}/bloodtype/{sample}_bloodtype.tsv")[6] = "stable".to_owned() + }), + ]; + let base = s(&contract_path()); + for (desc, change) in cases { + let tmp = Tmp::new("baseline-ok"); + let c = contract_edit(&tmp, "changed", change); + let (rc, out) = contract(&["--contract", &s(&c), "--baseline", &base]); + assert!( + rc == 0 && out.contains(" 0 problems"), + "{desc}: rc={rc}: {out}" + ); + } +} + +#[test] +fn a_baseline_that_checks_nothing_or_does_not_parse_fails() { + let tmp = Tmp::new("baseline-bad"); + let empty = tmp.0.join("empty.tsv"); + fs::write( + &empty, + "kind\tname\tstep\tprocess\tlegs\tformat\tstability\te2e\trequired\n", + ) + .unwrap(); + let (rc, out) = contract(&["--repo", &s(&repo()), "--baseline", &s(&empty)]); + assert!( + rc == 1 && out.contains("has no stable row: the check checked nothing"), + "{out}" + ); + let bad = tmp.0.join("bad.tsv"); + fs::write(&bad, "not a contract\n").unwrap(); + let (rc, out) = contract(&["--repo", &s(&repo()), "--baseline", &s(&bad)]); + assert!(rc == 1 && out.contains("ERROR: baseline: "), "{out}"); +} + #[test] fn pedigree_is_a_declared_param() { let config = fs::read_to_string(repo().join("nextflow.config")).unwrap(); From 648f08536372386b5f5ca7c99caa6ec7c09dfafa Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:29:34 +0100 Subject: [PATCH 020/110] test(contract): check the stable files the e2e base run already writes 26 stable file rows had e2e '-' although the base cases write them on every run (the clinical summary, the slivar tables, the mito tables, pypgx, the ClinVar cDNA and deep-intronic tables, the gVCF, the read count, the charts and search index, the PharmCAT JSON and HTML, the coverage beds, the sex check, indexcov), so the HG002 contract case never checked them. Their e2e cells now name the legs the base run writes, from the e2e-base artifact of main run 44444355103 and the observed lists of three main runs. The annotated VCF index is checked on both legs now, not only Nextflow. run_manifest.tsv is written by step 24 too, so its legs are both and the bash leg checks it. The VEP output of step 13 stays '-': the fixture provides it, the step does not run. Bead: plat-04 --- assets/output_contract.tsv | 56 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/assets/output_contract.tsv b/assets/output_contract.tsv index 053631567..b1f5794ba 100644 --- a/assets/output_contract.tsv +++ b/assets/output_contract.tsv @@ -83,10 +83,10 @@ file {sample}/chip/{sample}_chip_depth.tsv 49 CHIP_REPORT both tsv experimental file {sample}/chip/{sample}_chip_filtered.vcf.gz 49 CHIP_MUTECT2 both vcf experimental - - file {sample}/clinical/{sample}_clinical.vcf.gz 23 CLINICAL_FILTER both vcf stable bash - file {sample}/clinical/{sample}_clinical.vcf.gz.tbi 23 CLINICAL_FILTER nextflow index stable - - -file {sample}/clinical/{sample}_clinical_summary.tsv 23 CLINICAL_FILTER both tsv stable - - -file {sample}/clinvar/{sample}_clinvar_cdna_check.tsv 06 CLINVAR_CDNA_CHECK both tsv stable - - -file {sample}/clinvar/{sample}_clinvar_cdna_scan.tsv 06 CLINVAR_CDNA_CHECK both tsv stable - - -file {sample}/clinvar/{sample}_clinvar_deep_intronic.tsv 06 CLINVAR_SCREEN both tsv stable - - +file {sample}/clinical/{sample}_clinical_summary.tsv 23 CLINICAL_FILTER both tsv stable bash - +file {sample}/clinvar/{sample}_clinvar_cdna_check.tsv 06 CLINVAR_CDNA_CHECK both tsv stable both - +file {sample}/clinvar/{sample}_clinvar_cdna_scan.tsv 06 CLINVAR_CDNA_CHECK both tsv stable both - +file {sample}/clinvar/{sample}_clinvar_deep_intronic.tsv 06 CLINVAR_SCREEN both tsv stable both - file {sample}/clinvar/{sample}_clinvar_hits.tsv 06 CLINVAR_SCREEN both tsv stable both chrom,pos,ref,alt,genotype,clinvar_id,geneinfo,clnsig,clnrevstat file {sample}/clinvar/{sample}_clinvar_hits.vcf 06 CLINVAR_SCREEN both vcf stable both INFO/GENEINFO,INFO/CLNSIG,INFO/CLNREVSTAT file {sample}/clinvar/{sample}_pass.vcf.gz 06 CLINVAR_SCREEN both vcf stable both FORMAT/GT @@ -99,11 +99,11 @@ file {sample}/consumer_export/{sample}_23andme_v5.zip 40 CONSUMER_EXPORT both zi file {sample}/consumer_export/{sample}_ancestrydna_layout.zip 40 CONSUMER_EXPORT both zip experimental - - file {sample}/consumer_export/{sample}_consumer_export.tsv 40 CONSUMER_EXPORT both tsv experimental - - file {sample}/couple/{sample}_couple_carrier.tsv 39 COUPLE_CARRIER both tsv experimental - - -file {sample}/coverage/{sample}.mosdepth.global.dist.txt 16b MOSDEPTH nextflow text stable - - +file {sample}/coverage/{sample}.mosdepth.global.dist.txt 16b MOSDEPTH nextflow text stable nextflow - file {sample}/coverage/{sample}.mosdepth.summary.txt 16b MOSDEPTH nextflow tsv stable nextflow chrom,length,bases,mean,min,max -file {sample}/coverage/{sample}.regions.bed.gz 16b MOSDEPTH nextflow bed stable - - -file {sample}/coverage/{sample}.thresholds.bed.gz 16b MOSDEPTH nextflow bed stable - - -file {sample}/coverage/{sample}_callability.bed.gz 16b MOSDEPTH nextflow bed stable - - +file {sample}/coverage/{sample}.regions.bed.gz 16b MOSDEPTH nextflow bed stable nextflow - +file {sample}/coverage/{sample}.thresholds.bed.gz 16b MOSDEPTH nextflow bed stable nextflow - +file {sample}/coverage/{sample}_callability.bed.gz 16b MOSDEPTH nextflow bed stable nextflow - file {sample}/cpic/{sample}_cpic_recommendations.txt 27 CPIC_LOOKUP both text stable both - file {sample}/cpic/{sample}_phenotypes.tsv 27 CPIC_LOOKUP both tsv stable both - file {sample}/cpsr/{sample}.cpsr.grch38.classification.tsv.gz 17 CPSR both tsv stable - - @@ -132,7 +132,7 @@ file {sample}/hla/{sample}_hla_genotype.tsv 08 HLA_TYPING nextflow tsv stable - file {sample}/hla_optitype/{sample}_hla_concordance.tsv 08 HLA_QC both tsv experimental - - file {sample}/hla_optitype/{sample}_optitype_result.tsv 08 HLA_QC both tsv experimental - - file {sample}/hla_t1k/{sample}_hla_genotype.tsv 08 - bash tsv stable bash - -file {sample}/indexcov 16 INDEXCOV both dir stable - - +file {sample}/indexcov 16 INDEXCOV both dir stable both - file {sample}/indexcov/indexcov-indexcov.ped 16 - bash tsv stable bash - file {sample}/kir/database_release.txt 08 KIR_TYPING nextflow text experimental - - file {sample}/kir/{sample}_kir_genotype.tsv 08 KIR_TYPING both tsv experimental - - @@ -154,17 +154,17 @@ file {sample}/mei/{sample}_mei_annotsv.tsv 50 MEI_REPORT both tsv experimental - file {sample}/mei/{sample}_mei_depth.tsv 50 MEI_DEPTH both tsv experimental - - file {sample}/mei/{sample}_mei_mainchr.txt 50 MEI_DEPTH nextflow text internal - - file {sample}/mei/{sample}_mei_sites.tsv 50 MEI_REPORT both tsv experimental - - -file {sample}/mito/{sample}_chrM.fasta 12 MITO_EXTRACT_CHRM both fasta stable - - +file {sample}/mito/{sample}_chrM.fasta 12 MITO_EXTRACT_CHRM both fasta stable bash - file {sample}/mito/{sample}_chrM.vcf.gz 12 MITO_EXTRACT_CHRM nextflow vcf internal - - file {sample}/mito/{sample}_chrM.vcf.gz.tbi 12 MITO_EXTRACT_CHRM nextflow index internal - - -file {sample}/mito/{sample}_chrM_annotated.tsv 20 MITO_VARIANTS_ANNOTATE both tsv stable - - -file {sample}/mito/{sample}_chrM_deletions.tsv 20 MITO_DELETIONS both tsv stable - - +file {sample}/mito/{sample}_chrM_annotated.tsv 20 MITO_VARIANTS_ANNOTATE both tsv stable bash - +file {sample}/mito/{sample}_chrM_deletions.tsv 20 MITO_DELETIONS both tsv stable bash - file {sample}/mito/{sample}_chrM_filtered.vcf.gz 20 MITO_VARIANTS both vcf stable bash - file {sample}/mito/{sample}_chrM_filtered.vcf.gz.tbi 20 MITO_VARIANTS nextflow index stable - - file {sample}/mito/{sample}_chrM_mutect2.vcf.gz.stats 20 MITO_VARIANTS nextflow bin stable - - file {sample}/mito/{sample}_haplocheck.txt 12 HAPLOCHECK both text stable - - file {sample}/mito/{sample}_haplogroup.txt 12 MITO_HAPLOGROUP both text stable bash - -file {sample}/mito/{sample}_mtdna_copies.tsv 20 MITO_DELETIONS both tsv stable - - +file {sample}/mito/{sample}_mtdna_copies.tsv 20 MITO_DELETIONS both tsv stable bash - file {sample}/mosaic/{sample}_mocha.log 51 MOCHA_CALL both text experimental - - file {sample}/mosaic/{sample}_mocha.tsv 51 MOCHA_REPORT both tsv experimental - - file {sample}/mosaic/{sample}_mocha_calls_raw.tsv 51 MOCHA_CALL both tsv experimental - - @@ -188,15 +188,15 @@ file {sample}/paralogs/{sample}_smn1_marker.tsv 35 PARASCOPY both tsv experiment file {sample}/paralogs/{sample}_smn_copy_number.tsv 35 PARASCOPY both tsv experimental - - file {sample}/pgx_consensus/{sample}_outside_calls.tsv 36 PGX_CONSENSUS both tsv stable - - file {sample}/pgx_consensus/{sample}_pgx_consensus.tsv 36 PGX_CONSENSUS both tsv stable - - -file {sample}/pharmcat/{sample}.match.json 07 PHARMCAT nextflow json stable - - -file {sample}/pharmcat/{sample}.phenotype.json 07 PHARMCAT nextflow json stable - - -file {sample}/pharmcat/{sample}.report.html 07 PHARMCAT nextflow html stable - - +file {sample}/pharmcat/{sample}.match.json 07 PHARMCAT nextflow json stable nextflow - +file {sample}/pharmcat/{sample}.phenotype.json 07 PHARMCAT nextflow json stable nextflow - +file {sample}/pharmcat/{sample}.report.html 07 PHARMCAT nextflow html stable nextflow - file {sample}/pharmcat/{sample}.report.json 07 PHARMCAT nextflow json stable nextflow - file {sample}/prs/pgsc_calc 25 PRS both dir stable - - file {sample}/prs/{sample}_prs_summary.*.tsv 25 PRS_SUMMARY nextflow tsv stable - - file {sample}/prs/{sample}_prs_summary.tsv 25 PRS_SUMMARY both tsv stable - - -file {sample}/pypgx/{sample}_cyp2d6_depth_check.tsv 32 PYPGX both tsv stable - - -file {sample}/pypgx/{sample}_pharmcat_comparison.tsv 27 CPIC_LOOKUP both tsv stable - - +file {sample}/pypgx/{sample}_cyp2d6_depth_check.tsv 32 PYPGX both tsv stable bash - +file {sample}/pypgx/{sample}_pharmcat_comparison.tsv 27 CPIC_LOOKUP both tsv stable bash - file {sample}/pypgx/{sample}_pypgx_results 32 PYPGX nextflow dir stable - - file {sample}/pypgx/{sample}_pypgx_summary.tsv 32 PYPGX both tsv stable bash - file {sample}/qc/somalier/{sample}.somalier 33 SOMALIER nextflow bin experimental - - @@ -205,17 +205,17 @@ file {sample}/qc/verifybamid2/{sample}.Ancestry 33 VERIFYBAMID2 nextflow bin exp file {sample}/qc/verifybamid2/{sample}.log 33 VERIFYBAMID2 both text experimental - - file {sample}/qc/verifybamid2/{sample}.marker_check 33 VERIFYBAMID2 nextflow bin internal - - file {sample}/qc/verifybamid2/{sample}.selfSM 33 VERIFYBAMID2 both bin experimental - - -file {sample}/qc/{sample}_read_count.tsv 02 ALIGN_MINIMAP2 both tsv stable - - +file {sample}/qc/{sample}_read_count.tsv 02 ALIGN_MINIMAP2 both tsv stable bash - file {sample}/qc/{sample}_sample_qc.tsv 33 SAMPLE_QC both tsv experimental - - file {sample}/roh/{sample}_roh.txt 11 ROH nextflow text stable nextflow - file {sample}/roh/{sample}_roh_summary.txt 11 ROH nextflow tsv stable nextflow chrom,start,end,length_bp,length_mb -file {sample}/run_manifest.tsv - - nextflow tsv stable - - +file {sample}/run_manifest.tsv - - both tsv stable bash - file {sample}/slivar/{sample}.ped 31 SLIVAR_PRIORITIZE nextflow tsv internal - - -file {sample}/slivar/{sample}_compound_het_pairs.tsv 31 COMPHET_PHASE both tsv stable - - +file {sample}/slivar/{sample}_compound_het_pairs.tsv 31 COMPHET_PHASE both tsv stable bash - file {sample}/slivar/{sample}_compound_hets.vcf.gz 31 SLIVAR both vcf stable bash - file {sample}/slivar/{sample}_prioritized.vcf.gz 31 SLIVAR_PRIORITIZE both vcf stable bash - file {sample}/slivar/{sample}_prioritized.vcf.gz.tbi 31 SLIVAR_PRIORITIZE nextflow index stable - - -file {sample}/slivar/{sample}_slivar_summary.tsv 31 SLIVAR_PRIORITIZE both tsv stable - - +file {sample}/slivar/{sample}_slivar_summary.tsv 31 SLIVAR_PRIORITIZE both tsv stable bash - file {sample}/summary.json 24 HTML_REPORT both json stable bash schema_version,sample,generated_utc,run,databases,manifest,sections,cyp2d6,not_run,not_assessed file {sample}/sv_duphold/{sample}_sv_duphold.vcf 15 DUPHOLD nextflow vcf stable - - file {sample}/sv_filtered/{sample}_sv_filtered.log 15 DUPHOLD_FILTER nextflow text stable - - @@ -227,8 +227,8 @@ file {sample}/telomere/{sample} 10 TELOMERE_HUNTER both dir stable - - file {sample}/traits/{sample}_genotype_rules.tsv 42 TRAITS both tsv stable - - file {sample}/traits/{sample}_traits.tsv 42 TRAITS both tsv stable - - file {sample}/traits/{sample}_traits_genotypes.tsv 42 TRAITS_SITES both tsv stable - - -file {sample}/vcf/{sample}.g.vcf.gz 03 DEEPVARIANT both vcf stable - - -file {sample}/vcf/{sample}.g.vcf.gz.tbi 03 DEEPVARIANT both index stable - - +file {sample}/vcf/{sample}.g.vcf.gz 03 DEEPVARIANT both vcf stable bash - +file {sample}/vcf/{sample}.g.vcf.gz.tbi 03 DEEPVARIANT both index stable bash - file {sample}/vcf/{sample}.report.html 07 - bash html stable bash - file {sample}/vcf/{sample}.report.json 07 - bash json stable bash - file {sample}/vcf/{sample}.vcf.gz 03 DEEPVARIANT both vcf stable bash FORMAT/GT,FORMAT/GQ,FORMAT/DP @@ -237,7 +237,7 @@ file {sample}/vcf/{sample}_roh.txt 11 - bash text stable bash - file {sample}/vcf/{sample}_roh_summary.txt 11 - bash tsv stable bash chrom,start,end,length_bp,length_mb file {sample}/vcf_gatk/{sample}.vcf.gz 03a - bash vcf stable bash FORMAT/GT file {sample}/vep/{sample}_annotated.vcf.gz 30 VCFANNO_INDEX both vcf stable both INFO/REVEL -file {sample}/vep/{sample}_annotated.vcf.gz.tbi 30 VCFANNO_INDEX both index stable nextflow - +file {sample}/vep/{sample}_annotated.vcf.gz.tbi 30 VCFANNO_INDEX both index stable both - file {sample}/vep/{sample}_vep.vcf.gz 13 VEP both vcf stable - - file {sample}/vep/{sample}_vep.vcf.gz.tbi 13 VEP both index stable - - file {sample}/vep/{sample}_vep.vcf_summary.html 13 VEP nextflow html stable - - @@ -265,11 +265,11 @@ file {sample}/y_str/{sample}_y_str.csv 45 Y_STR both csv experimental - - file {sample}/y_str/{sample}_y_str.log 45 Y_STR both text experimental - - file {sample}/y_str/{sample}_y_str.tsv 45 Y_STR both tsv experimental - - file {sample}/y_str/{sample}_y_str.vcf.gz 45 Y_STR both vcf experimental - - -file {sample}/{sample}_charts.json 24 HTML_REPORT both json stable - - +file {sample}/{sample}_charts.json 24 HTML_REPORT both json stable bash - file {sample}/{sample}_report.html 24 HTML_REPORT both html stable bash - file {sample}/{sample}_report.txt 24 - both text stable bash - -file {sample}/{sample}_search_index.json 24 HTML_REPORT both json stable - - -file {sample}/{sample}_sex_check.tsv 16 INDEXCOV nextflow tsv stable - - +file {sample}/{sample}_search_index.json 24 HTML_REPORT both json stable bash - +file {sample}/{sample}_sex_check.tsv 16 INDEXCOV nextflow tsv stable nextflow - param input - - - - stable - - param outdir - - - - stable - - param allow_unfiltered - - - - stable - - From 0e41c70586646c583b310ac602ae80d04d63bd45 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:31:51 +0100 Subject: [PATCH 021/110] ci(guard): compare the contract with the newest 1.x release's Guard's rust job now reads the newest v1.x.y tag of the upstream repository and runs og dev contract --baseline against that tag's contract. Before the first 1.x tag it says there is nothing to compare with; after it, a tag that cannot be listed, fetched or read fails the step. Its control plants a stable row that is gone since the baseline, which must fail. Bead: plat-03 --- .github/workflows/guard.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/guard.yml b/.github/workflows/guard.yml index 5607968b7..969348e19 100644 --- a/.github/workflows/guard.yml +++ b/.github/workflows/guard.yml @@ -558,6 +558,41 @@ jobs: - name: cargo test run: cargo test --workspace --locked --no-fail-fast + # The output contract keeps every stable row of the newest 1.x release + # (docs/output-contract.md, "How CI holds it"). Release tags live on the + # upstream repository, so a run on a fork reads them there too. Before + # the first 1.x tag there is nothing to compare with; after it, a tag + # that cannot be listed, fetched or read fails the step. The control + # runs first: a baseline with a stable row this contract lacks must fail. + - name: The contract keeps every stable row of the newest 1.x release + env: + RELEASES: https://github.com/GeiserX/OwnGenome.git + MAJOR: '1' # the release line this branch keeps; the 2.0 change sets 2 + run: | + contract=../assets/output_contract.tsv + planted="${RUNNER_TEMP}/contract-planted.tsv" + log="${RUNNER_TEMP}/contract-baseline-red.log" + { cat "$contract"; printf 'file\t{sample}/gone/{sample}_gone.tsv\t-\t-\tbash\ttsv\tstable\t-\t-\n'; } > "$planted" + if cargo run --locked -q -p og -- dev contract --contract "$contract" --baseline "$planted" > "$log" 2>&1; then + cat "$log" + echo "ERROR: a stable row that is gone since the baseline passed" + exit 1 + fi + cat "$log" + grep -F 'FAIL BREAKING: the stable file {sample}/gone/{sample}_gone.tsv' "$log" + echo "Control: a stable row that is gone since the baseline failed." + refs=$(git ls-remote --tags --refs "$RELEASES") || { echo "ERROR: could not list the tags of ${RELEASES}"; exit 1; } + tag=$(printf '%s\n' "$refs" | sed -n "s|^[0-9a-f]*[[:space:]]*refs/tags/\(v${MAJOR}\.[0-9][0-9]*\.[0-9][0-9]*\)$|\1|p" | sort -V | tail -n 1) + if [ -z "$tag" ]; then + echo "No ${MAJOR}.x release tag on ${RELEASES} yet: no release contract to compare with." + exit 0 + fi + git fetch --no-tags --depth=1 "$RELEASES" "refs/tags/${tag}" + base="${RUNNER_TEMP}/contract-${tag}.tsv" + git show "FETCH_HEAD:assets/output_contract.tsv" > "$base" + echo "Baseline: the contract of ${tag}" + cargo run --locked -q -p og -- dev contract --contract "$contract" --baseline "$base" + # The browser checks of og-browser (tests/browser/README.md) ran in # cargo test above, in the runner's Chrome. Two controls: a page error # planted in the clean page must fail its test, and with no Chrome the From 4ddc99160ba5121b9a0a9fc560a957624d48f862 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:31:51 +0100 Subject: [PATCH 022/110] chore(codeowners): say the file routes reviews and does not require them The comment said owner review is required. main requires a pull request with its 14 status checks and no approving review (the decision is to keep checks only), so the comment now says the file routes review requests. The output contract joins the routed paths. Bead: plat-07 Bead: D6 --- .github/CODEOWNERS | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f47531a3d..f2f2e2b38 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,10 @@ -# Require owner review for infrastructure and automation changes +# Routing only: GitHub asks the owner to review a pull request that touches +# these paths. main takes changes through a pull request whose required +# checks pass; it needs no approving review, so nothing here blocks a merge. .github/ @GeiserX versions.env @GeiserX scripts/setup.sh @GeiserX scripts/run-all.sh @GeiserX scripts/validate-setup.sh @GeiserX .coderabbit.yaml @GeiserX +assets/output_contract.tsv @GeiserX From eb7da6a14accc066723c011b9355eedf751d78a9 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:32:35 +0100 Subject: [PATCH 023/110] docs(contract): say how the release baseline holds the contract docs/output-contract.md names the third check, the comparison with the newest 1.x release, says what it refuses and what it lets through, and adds the breaks it now catches (a stable row made experimental or internal, another format, a dropped leg). The e2e paragraph says which rows stay '-' and why, and that the bash leg checks run_manifest.tsv. The contract's header and the changelog say the same. Bead: plat-03 Bead: plat-04 --- CHANGELOG.md | 1 + assets/output_contract.tsv | 5 +++-- docs/output-contract.md | 8 +++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..aa88b5a6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- The output contract check now compares the contract with the last release, so a stable output cannot disappear between releases. Before, `og dev contract --static` compared the code with the contract of the same checkout only: a change that renamed a stable output in the code and in its row, removed a stable param with its row, or made a stable row experimental passed. `og dev contract --baseline FILE` checks every stable row of a release's contract against this one: still listed, still stable, the same format, every leg that wrote the file and every required field. New rows and changes to experimental and internal rows pass. Guard's `rust` job runs it against the contract of the newest `v1.x.y` tag; until 1.0.0 is tagged there is none, and the step says so. The HG002 e2e case now also checks 26 stable files the base run writes whose `e2e` cell was `-` (the clinical summary, the slivar, mitochondrial and pypgx tables, the ClinVar cDNA and deep-intronic tables, the gVCF, the read count, the charts and search index, the PharmCAT JSON and HTML, the coverage beds, the sex check and indexcov). `run_manifest.tsv` is now listed on both legs, since step 24 writes it too. No output changes. `.github/CODEOWNERS` now says it routes review requests: main requires its status checks, not an approving review. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/assets/output_contract.tsv b/assets/output_contract.tsv index b1f5794ba..af9f8e8f0 100644 --- a/assets/output_contract.tsv +++ b/assets/output_contract.tsv @@ -1,7 +1,8 @@ # assets/output_contract.tsv: what OwnGenome 1.0 keeps stable (docs/output-contract.md). # og dev contract reads it (rust/crates/og-dev/src/contract.rs): --static in Guard's rust job (rust/crates/og-dev/tests/repo.rs) -# checks every row against the code, and the e2e case output-contract-1-hg002 checks the files the -# HG002 run wrote. Columns, tab-separated: +# checks every row against the code, --baseline in the same job checks that every stable row of the +# newest 1.x release is still here and still stable, and the e2e case output-contract-1-hg002 checks +# the files the HG002 run wrote. Columns, tab-separated: # kind file, param (a nextflow_schema.json param), tool (a --tools name in main.nf) or # switch (a run-all.sh switch, its SWITCHES list) # name file: its path under the results folder (GENOME_DIR for the bash steps and run-all.sh, diff --git a/docs/output-contract.md b/docs/output-contract.md index 668571d3e..31ab738ba 100644 --- a/docs/output-contract.md +++ b/docs/output-contract.md @@ -19,7 +19,8 @@ A 1.x release never does any of these to a `stable` row: - remove or rename a file, or move it to another folder; - remove or rename a column of a table, an INFO or FORMAT field of a VCF, or a top-level key of a JSON file; -- remove or rename a param, a `--tools` name or a `run-all.sh` switch, or change what it means. +- remove or rename a param, a `--tools` name or a `run-all.sh` switch, or change what it means; +- make it `experimental` or `internal`, change the format of a file, or stop writing a file on a leg (the Nextflow pipeline or the single-step script) that wrote it. These are not breaks, and can come in any 1.x release: @@ -39,10 +40,11 @@ The engines that run by default, and every step that existed before 1.0, are `st ## How CI holds it -Two checks read the contract, both with `og dev contract` ([`rust/crates/og-dev/src/contract.rs`](https://github.com/GeiserX/OwnGenome/blob/main/rust/crates/og-dev/src/contract.rs)): +Three checks read the contract, all with `og dev contract` ([`rust/crates/og-dev/src/contract.rs`](https://github.com/GeiserX/OwnGenome/blob/main/rust/crates/og-dev/src/contract.rs)): - **On every pull request, with no run** (`og dev contract --static`, run by [`rust/crates/og-dev/tests/repo.rs`](https://github.com/GeiserX/OwnGenome/blob/main/rust/crates/og-dev/tests/repo.rs) in the `rust` job of the Guard workflow): every param of `nextflow_schema.json`, every `--tools` name of `main.nf` and every switch of `run-all.sh` has a row, and every row still names one. Every file row of a Nextflow process still matches a file that process writes and publishes, in the folder of a `publishDir` that keeps it (a `saveAs` that returns `null` for the file does not count), and every file a module publishes has a row. A published row with leg `nextflow` fails when its step's script writes the same path too, since its leg is then `both`; the check reads the script with its shell variables filled in, so a path it cannot follow is not flagged, and a `both` row it does not find is not refused. Every default in `nextflow_schema.json` must equal the value in `nextflow.config`, with the same JSON type: `false` is not `0`. A removed or renamed stable item fails as `BREAKING`. A new one with no row fails too, with the message to add it, so the contract is always the full list. The test also plants each kind of break on a copy of the code (a renamed output, a removed param, a removed switch, a new tool and a new output with no row, a schema default that differs from `nextflow.config`, one of another JSON type, a row in the folder a `saveAs` drops the file from, and a `nextflow` row a step script also writes) and requires each to fail. -- **On the HG002 end-to-end run** (`tests/e2e/output-contract-1-hg002.sh`): every stable file whose `e2e` column names a leg must be in the results that leg wrote, under its contracted name, with its required fields. The bash leg is the single-step scripts the base cases run; the Nextflow leg is case `60-nextflow`. Rows whose step the fixture run does not reach have `e2e` set to `-` and are held by the static check only. The two files `run-all.sh` writes itself, `run_manifest.tsv` and `logs/run_status.tsv`, are listed but no check holds them yet: neither the fixture run nor a module writes them. The same case copies the Nextflow results, drops the `clnsig` column of the ClinVar hits table and renames the ROH summary, and requires the check to fail on both. It also prints every file each leg wrote with its fields, which is what to read when the contract is written again. +- **Against the last release, on every pull request** (`og dev contract --baseline`, a step of the same `rust` job): the contract of the newest `v1.x.y` tag of GeiserX/OwnGenome is the baseline. Every stable row there must still have a row here, still `stable`. A stable file keeps its format, every leg that wrote it and every required field. New rows, a new leg or field, and changes to the `step`, `process` and `e2e` cells or to `experimental` and `internal` rows pass. This catches the break the first check cannot see: a stable output renamed or removed together with its row. Until 1.0.0 is tagged there is no baseline and the step says so; after that, a tag it cannot read fails it. Its control plants a stable row that is gone since the baseline and requires the check to fail. The pull request that starts 2.0 sets `MAJOR` in that step to 2. +- **On the HG002 end-to-end run** (`tests/e2e/output-contract-1-hg002.sh`): every stable file whose `e2e` column names a leg must be in the results that leg wrote, under its contracted name, with its required fields. The bash leg is the single-step scripts the base cases run; the Nextflow leg is case `60-nextflow`. Every stable file the base cases write has the leg that writes it in `e2e`. A row has `e2e` set to `-` when the fixture run does not reach its step, or when the fixture provides the file instead of the step (the VEP output of step 13); the static check holds those rows. `run_manifest.tsv` is checked on the bash leg: step 24 writes it for a sample that has none, as `run-all.sh` does when a run starts. `logs/run_status.tsv` is listed but no check holds it yet: only `run-all.sh` writes it, and the fixture run does not call `run-all.sh`. The same case copies the Nextflow results, drops the `clnsig` column of the ClinVar hits table and renames the ROH summary, and requires the check to fail on both. It also prints every file each leg wrote with its fields, which is what to read when the contract is written again. ## Changing the contract From 10846998bbd383e61a3ee09e329e37894c19ca25 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:36:45 +0100 Subject: [PATCH 024/110] fix(summary): mark a stale genome-wide result as of unknown scope, never as complete --- CHANGELOG.md | 2 +- docs/results/quality.md | 2 +- rust/crates/og-summary/src/collect/post.rs | 34 ++++++++---- .../crates/og-summary/tests/i411_run_scope.rs | 53 +++++++++++++++++++ 4 files changed, 80 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36c10cdb8..605a95538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- `summary.json` says what part of the genome a run covered. A run on part of the genome (`--intervals`, or a VCF cut down to chr20 and chr22) gave callability, polygenic score, ancestry, telomere, ROH and archaic results that read as whole-genome results. `og summary collect` now reads the chromosomes of the sample VCF's records and writes a new top-level `scope` object: `autosomes_covered`, `autosomes`, `chrx`, `intervals` (a `run intervals` row of `run_manifest.tsv`, else `null`), `partial` and `mark`. No step writes the `run intervals` row yet, so today `intervals` is `null`, and a run limited with `--intervals` is caught only by the chromosomes its calls are on. When fewer than 22 autosomes have calls, or the run was limited to intervals, each of those six sections that has a result gets a new `partial` field, such as `partial: covers 2 of 22 autosomes`. Without a readable sample VCF there is no `scope` and nothing is marked. These are new keys; no key, file or format changes or goes away. The reports and the live site do not show the mark yet. `docs/results/quality.md` describes it, and `tests/schema/summary.schema.json` has both fields. +- `summary.json` says what part of the genome a run covered. A run on part of the genome (`--intervals`, or a VCF cut down to chr20 and chr22) gave callability, polygenic score, ancestry, telomere, ROH and archaic results that read as whole-genome results. `og summary collect` now reads the chromosomes of the sample VCF's records and writes a new top-level `scope` object: `autosomes_covered`, `autosomes`, `chrx`, `intervals` (a `run intervals` row of `run_manifest.tsv`, else `null`), `partial` and `mark`. No step writes the `run intervals` row yet, so today `intervals` is `null`, and a run limited with `--intervals` is caught only by the chromosomes its calls are on. When fewer than 22 autosomes have calls, or the run was limited to intervals, each of those six sections that has a result of this run gets a new `partial` field, such as `partial: covers 2 of 22 autosomes`. A stale one of the six, a result from an earlier run whose scope was not recorded, gets `partial: not known, from an earlier run` whatever this run covered. Without a readable sample VCF there is no `scope` and nothing is marked. These are new keys; no key, file or format changes or goes away. The reports and the live site do not show the mark yet. `docs/results/quality.md` describes it, and `tests/schema/summary.schema.json` has both fields. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/results/quality.md b/docs/results/quality.md index f24152594..e66b1382c 100644 --- a/docs/results/quality.md +++ b/docs/results/quality.md @@ -22,7 +22,7 @@ So `summary.json` records the run's scope under `scope`. It comes from the chrom - `intervals`: the intervals the run was limited to, from a `run intervals` row of `run_manifest.tsv`, else `null`. No step writes this row yet, so today it is `null`: a run limited with `--intervals` is caught only by the chromosomes its calls are on. - `partial` and `mark`: the run is partial when it covers fewer than 22 autosomes (`partial: covers 2 of 22 autosomes`) or was limited to intervals (`partial: limited to the run's intervals (...)`). -When the run is partial, each of those six sections that has a result gets the same text in its `partial` field. Without a sample VCF that can be read to its end, the scope is not known: `summary.json` has no `scope`, and no section is marked. The scope says which chromosomes have calls. It does not say how much of each chromosome was read well; callability does that. +When the run is partial, each of those six sections that has a result of this run gets the same text in its `partial` field. A stale section holds a result from an earlier run, and that run's scope was not recorded: it gets `partial: not known, from an earlier run`, whatever this run covered. Without a sample VCF that can be read to its end, the scope is not known: `summary.json` has no `scope`, and no section is marked. The scope says which chromosomes have calls. It does not say how much of each chromosome was read well; callability does that. ## Reports (Steps 24 and 28) diff --git a/rust/crates/og-summary/src/collect/post.rs b/rust/crates/og-summary/src/collect/post.rs index e0c343938..33cc842dd 100644 --- a/rust/crates/og-summary/src/collect/post.rs +++ b/rust/crates/og-summary/src/collect/post.rs @@ -11,7 +11,8 @@ //! - `not_assessed`: what no step looked at, with the lines that depend on //! the polygenic scores, HBA1/HBA2, mobile elements, VNtyper and MoChA; //! - `scope`: what part of the genome the run called, and the `partial` -//! mark on each genome-wide section of a run that called less; +//! mark on each genome-wide section of a run that called less, and on +//! each stale one, whose earlier run's scope is not known; //! - `recheck`: the last database re-check of the sample; //! - `new_since`: what changed since the previous run kept in `history/`. //! @@ -276,20 +277,35 @@ fn scope(contigs: Option<&[String]>, intervals: Option<&str>) -> Option { Some(Value::Object(out)) } -/// Adds the scope's mark as `partial` to each genome-wide section that has -/// a result (ok or stale) when the run was partial. +/// The mark of a stale genome-wide section: its result is from an earlier +/// run, and that run's scope was not recorded. +const STALE_MARK: &str = "partial: not known, from an earlier run"; + +/// Adds a `partial` mark to the genome-wide sections. A result of this run +/// (ok) takes the scope's mark when the run was partial. A stale result is +/// from an earlier run, whose scope this run's VCF does not tell: it takes +/// `STALE_MARK` whatever this run covered, so it never reads as complete. fn mark_partial(summary: &mut indexmap::IndexMap, scope: &Value) { - let Some(Value::Str(mark)) = at(Some(scope), "mark") else { - return; + let mark = match at(Some(scope), "mark") { + Some(Value::Str(m)) => Some(m.clone()), + _ => None, }; let Some(Value::Object(sections)) = summary.get_mut("sections") else { return; }; for key in GENOME_WIDE { - if let Some(Value::Object(sec)) = sections.get_mut(key) - && (is(sec.get("state"), "ok") || is(sec.get("state"), "stale")) - { - sec.insert("partial".into(), Value::Str(mark.clone())); + let Some(Value::Object(sec)) = sections.get_mut(key) else { + continue; + }; + let text = if is(sec.get("state"), "stale") { + Some(STALE_MARK.to_owned()) + } else if is(sec.get("state"), "ok") { + mark.clone() + } else { + None + }; + if let Some(text) = text { + sec.insert("partial".into(), Value::Str(text)); } } } diff --git a/rust/crates/og-summary/tests/i411_run_scope.rs b/rust/crates/og-summary/tests/i411_run_scope.rs index 0648f3cfe..768169f57 100644 --- a/rust/crates/og-summary/tests/i411_run_scope.rs +++ b/rust/crates/og-summary/tests/i411_run_scope.rs @@ -252,3 +252,56 @@ fn without_a_readable_sample_vcf_no_scope_is_written_and_nothing_is_marked() { let v = collect(&d); assert!(get(&v, "scope").is_none()); } + +/// Marks the ROH result (step 11) as from an earlier run: the run started +/// after every file was written, and step 11 failed in it. +fn roh_from_an_earlier_run(d: &Dir) { + let started = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs() + + 86_400; + let mut status = format!("meta\tstarted_epoch\t{started}\n"); + for step in og_summary::collect::model::RUN_ALL_STEPS { + let result = if *step == "11" { + "failed (exit 1)" + } else { + "ok" + }; + status.push_str(&format!("step\t{step}\t{result}\n")); + } + d.put("logs/run_status.tsv", status.as_bytes()); +} + +#[test] +fn a_stale_genome_wide_result_never_reads_as_complete() { + // A whole-genome run whose ROH step failed shows the ROH result of an + // earlier run. That run's scope was not recorded: it may have been a + // chr22-only run, so the mark says the scope is not known. + let names = autosomes(); + let contigs: Vec<&str> = names.iter().map(String::as_str).collect(); + for (tag, contigs, mark) in [ + ("stale-whole", contigs.clone(), None), + ( + "stale-two", + vec!["chr20", "chr22"], + Some("partial: covers 2 of 22 autosomes"), + ), + ] { + let d = folder(tag, &contigs); + roh_from_an_earlier_run(&d); + let v = collect(&d); + let roh = at(&v, &["sections", "roh"]); + assert_eq!(st(at(roh, &["state"])), "stale", "{tag}: {roh:?}"); + assert_eq!( + st(at(roh, &["partial"])), + "partial: not known, from an earlier run", + "{tag}" + ); + for key in GENOME_WIDE.iter().filter(|k| **k != "roh") { + let sec = at(&v, &["sections", key]); + assert_eq!(st(at(sec, &["state"])), "ok", "{tag} {key}: {sec:?}"); + assert_eq!(get(sec, "partial").map(st), mark, "{tag} {key}"); + } + } +} From 5b0d2f7718b884020e957c8054ad2e0cc0206018 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:37:43 +0100 Subject: [PATCH 025/110] test(mei): a filtered MEGAnE call must not make a disease site seen Red first: an LC-flagged SVA call in the FKTN window reads seen today. Zero depth without a call must read not callable, never not seen. Bead: sv-33 Bead: sv-34 --- .../og-reports/tests/i411_mei_seen_pass.rs | 175 ++++++++++++++++++ 1 file changed, 175 insertions(+) create mode 100644 rust/crates/og-reports/tests/i411_mei_seen_pass.rs diff --git a/rust/crates/og-reports/tests/i411_mei_seen_pass.rs b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs new file mode 100644 index 000000000..03dd1b840 --- /dev/null +++ b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs @@ -0,0 +1,175 @@ +//! `og mei report` (step 50): what makes a known disease insertion site +//! "seen" (#411 sv-33, sv-34). +//! +//! MEGAnE writes every insertion it identifies, with its own filter result +//! in FILTER: `PASS`, or flags such as `LC` (low confidence). A call that +//! failed MEGAnE's filters must not make a catalog site "seen"; the site +//! names the filtered call instead. Without a call, a window with too few +//! reads (no bedcov line, or a mean under 10x, zero included) reads +//! "not callable", never "not seen". +//! +//! Each case writes a synthetic MEGAnE VCF, a two-row catalog (the FKTN SVA +//! window and the TAF1 SVA window) and `samtools bedcov -c` lines, then +//! reads the sites table `report` writes. + +use og_reports::mei::{Files, report}; +use std::collections::HashMap; +use std::fs; +use std::path::PathBuf; + +const HEAD: &str = "##fileformat=VCFv4.1 +##ALT= +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS +"; + +const SITES: &str = "gene\tchrom\tstart\tend\tsite\telement\tinheritance\tcondition\tclinvar\tpmid +FKTN\tchr9\t105639156\t105640156\t105639656\tSVA\tautosomal recessive\tFukuyama congenital muscular dystrophy\t3199\t9690476 +TAF1\tchrX\t71439993\t71440993\t71440493\tSVA\tX-linked\tX-linked dystonia-parkinsonism\t9862\t29474918 +"; + +/// 30x over both windows (30030 bases summed over 1001). +const DEPTH_30X: &str = + "chr9\t105639155\t105640156\tFKTN\t30030\t200\nchrX\t71439992\t71440993\tTAF1\t30030\t200\n"; + +/// An SVA call MEGAnE identified (MEPRED=PASS), one copy, with this FILTER. +fn sva(chrom: &str, pos: u64, filter: &str) -> String { + format!( + "{chrom}\t{pos}\t.\tN\t\t.\t{filter}\tSVTYPE=Retroposon/SVA;MEPRED=PASS;MEI_rpos={};MEI=SVA_F,1/1500,+/+;CN_conf=H\tCN\t1\n", + pos + 8 + ) +} + +struct Dir(PathBuf); + +impl Dir { + fn new(tag: &str) -> Dir { + let d = std::env::temp_dir().join(format!("og-i411-mei-{}-{tag}", std::process::id())); + let _ = fs::remove_dir_all(&d); + fs::create_dir_all(&d).unwrap(); + Dir(d) + } + fn p(&self, n: &str) -> String { + self.0.join(n).to_str().unwrap().to_owned() + } + fn put(&self, n: &str, t: &str) -> String { + fs::write(self.p(n), t).unwrap(); + self.p(n) + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +type Row = HashMap; + +/// The sites table, one map per catalog row, keyed by gene. +fn sites(tag: &str, records: &[String], depth: &str) -> HashMap { + let d = Dir::new(tag); + let f = Files { + vcf: &d.put("m.vcf", &format!("{HEAD}{}", records.concat())), + sites: &d.put("sites.tsv", SITES), + depth: &d.put("depth.tsv", depth), + annotsv: None, + out_calls: &d.p("calls.tsv"), + out_sites: &d.p("sites_out.tsv"), + }; + report("S", &f).unwrap(); + let text = fs::read_to_string(d.p("sites_out.tsv")).unwrap(); + let mut lines = text.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + lines + .map(|l| { + let row: Row = head + .iter() + .map(|h| (*h).to_owned()) + .zip(l.split('\t').map(str::to_owned)) + .collect(); + (row["gene"].clone(), row) + }) + .collect() +} + +fn status(rows: &HashMap, gene: &str) -> (String, String) { + (rows[gene]["status"].clone(), rows[gene]["call"].clone()) +} + +/// Red first: an SVA call at the FKTN site that MEGAnE flagged LC is not +/// "seen". The site says the call was filtered out, and why, and still +/// names the call. +#[test] +fn red_first_a_filtered_call_is_not_seen() { + let rows = sites("lc", &[sva("chr9", 105_639_660, "LC")], DEPTH_30X); + assert_eq!( + status(&rows, "FKTN"), + ( + "call filtered out (LC)".to_owned(), + "chr9:105639660 SVA_F 1 copy LC".to_owned() + ) + ); + assert_eq!(status(&rows, "TAF1").0, "not seen"); +} + +/// Red first: a filtered call at a thin window still names the call; it +/// does not hide behind "not callable". +#[test] +fn red_first_a_filtered_call_at_low_depth() { + let thin = "chr9\t105639155\t105640156\tFKTN\t5005\t30\n"; + let rows = sites("lc-thin", &[sva("chr9", 105_639_660, "LC")], thin); + assert_eq!(status(&rows, "FKTN").0, "call filtered out (LC)"); + assert_eq!(rows["FKTN"]["mean_depth"], "5.0"); +} + +/// A PASS call wins over a filtered one in the same window, whichever +/// comes first. +#[test] +fn a_pass_call_in_the_window_is_seen() { + let rows = sites( + "pass-and-lc", + &[ + sva("chr9", 105_639_400, "LC"), + sva("chr9", 105_639_660, "PASS"), + ], + DEPTH_30X, + ); + assert_eq!( + status(&rows, "FKTN"), + ( + "seen".to_owned(), + "chr9:105639660 SVA_F 1 copy PASS".to_owned() + ) + ); + // A PASS call at low depth is still seen: the call is the evidence. + let thin = "chr9\t105639155\t105640156\tFKTN\t5005\t30\n"; + let rows = sites("pass-thin", &[sva("chr9", 105_639_660, "PASS")], thin); + assert_eq!(status(&rows, "FKTN").0, "seen"); +} + +/// Without a call, zero depth, or no bedcov line at all, is "not callable" +/// with no call, never "not seen". +#[test] +fn zero_depth_is_not_callable() { + let zero = + "chr9\t105639155\t105640156\tFKTN\t0\t0\nchrX\t71439992\t71440993\tTAF1\t0\t0\n"; + let rows = sites("zero", &[], zero); + for gene in ["FKTN", "TAF1"] { + assert_eq!( + [ + rows[gene]["status"].as_str(), + &rows[gene]["mean_depth"], + &rows[gene]["call"] + ], + ["not callable", "0.0", "."], + "{gene}" + ); + } + let rows = sites("no-line", &[], ""); + assert_eq!(status(&rows, "FKTN").0, "not callable"); + assert_eq!(rows["FKTN"]["mean_depth"], "."); + // Only a filtered call far from the window: depth decides, as without + // any call. + let rows = sites("lc-far", &[sva("chr9", 105_700_000, "LC")], zero); + assert_eq!(status(&rows, "FKTN").0, "not callable"); +} From 646995fa7e66f5511f0cd52f85e1f9fe4a930a96 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:38:28 +0100 Subject: [PATCH 026/110] fix(mei): mark a disease site seen only from a call that passed MEGAnE's filters A catalog site is seen only when a call of its element in the window has FILTER PASS. When only flagged calls are there, the site reads "call filtered out (FLAGS)" and names the first one. A PASS call wins over a flagged one in the same window. Bead: sv-33 --- rust/crates/og-reports/src/mei.rs | 34 ++++++++++++------- .../og-reports/tests/i411_mei_seen_pass.rs | 3 +- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/rust/crates/og-reports/src/mei.rs b/rust/crates/og-reports/src/mei.rs index 23ec79728..155661d09 100644 --- a/rust/crates/og-reports/src/mei.rs +++ b/rust/crates/og-reports/src/mei.rs @@ -18,8 +18,12 @@ //! (AnnotSV's table of the `annotsv-input` VCF) its genes, location, benign //! allele frequency and ACMG class. `--out-sites`: every row of the catalog //! with its status: `seen` (an insertion of the same element inside the -//! window), `not seen` (none, with a mean depth of at least 10 over the -//! window), or `not callable`. +//! window that passed MEGAnE's filters, FILTER `PASS`), `call filtered out +//! (FLAGS)` (only calls MEGAnE flagged, such as `LC`: the first one is +//! named, with its FILTER), `not seen` (none, with a mean depth of at least +//! 10 over the window), or `not callable` (no bedcov line for the window, +//! or no call there and a mean under 10, zero included: too few reads to +//! tell). //! //! `annotsv-input` writes the calls the table lists as the VCF AnnotSV //! reads (``, `SVTYPE=INS`, `END=POS`, and the ID the table is @@ -400,20 +404,24 @@ fn site_status( let shown = crate::fixed(mean, 1); let calls = by_chrom.get(chrom.as_str()).map_or(&[][..], Vec::as_slice); let first = calls.partition_point(|c| c.pos < lo); - let hit = calls[first..] + let here: Vec<&Call> = calls[first..] .iter() .take_while(|c| c.pos <= hi) - .find(|c| c.element.name() == site[5]); - if let Some(c) = hit { + .filter(|c| c.element.name() == site[5]) + .copied() + .collect(); + let named = |c: &Call| { let cop = if c.copies == "1" { "y" } else { "ies" }; - return Ok([ - "seen".into(), - shown, - format!( - "{}:{} {} {} cop{cop} {}", - c.chrom, c.pos, c.subfamily, c.copies, c.filter - ), - ]); + format!( + "{}:{} {} {} cop{cop} {}", + c.chrom, c.pos, c.subfamily, c.copies, c.filter + ) + }; + if let Some(c) = here.iter().find(|c| c.filter == "PASS") { + return Ok(["seen".into(), shown, named(c)]); + } + if let Some(c) = here.first() { + return Ok([format!("call filtered out ({})", c.filter), shown, named(c)]); } if mean < MIN_DEPTH { return Ok(["not callable".into(), shown, ".".into()]); diff --git a/rust/crates/og-reports/tests/i411_mei_seen_pass.rs b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs index 03dd1b840..a16b1b138 100644 --- a/rust/crates/og-reports/tests/i411_mei_seen_pass.rs +++ b/rust/crates/og-reports/tests/i411_mei_seen_pass.rs @@ -151,8 +151,7 @@ fn a_pass_call_in_the_window_is_seen() { /// with no call, never "not seen". #[test] fn zero_depth_is_not_callable() { - let zero = - "chr9\t105639155\t105640156\tFKTN\t0\t0\nchrX\t71439992\t71440993\tTAF1\t0\t0\n"; + let zero = "chr9\t105639155\t105640156\tFKTN\t0\t0\nchrX\t71439992\t71440993\tTAF1\t0\t0\n"; let rows = sites("zero", &[], zero); for gene in ["FKTN", "TAF1"] { assert_eq!( From 7087af1153a03dd49878458493f4ab69730781ef Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 14:38:55 +0100 Subject: [PATCH 027/110] docs(mei): say a flagged MEGAnE call reads call filtered out, not seen Bead: sv-33 Bead: sv-34 --- CHANGELOG.md | 1 + docs/50-mei.md | 8 ++++---- docs/results/structural-and-repeats.md | 2 +- modules/local/mei/main.nf | 3 ++- scripts/50-mei.sh | 7 ++++--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..7245dba72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 50 marks a known disease insertion (the FKTN, TAF1 and BBS1 SVAs of `assets/mei_sites.tsv`) seen only when MEGAnE's call there passed its own filters (FILTER `PASS`). Before, a call MEGAnE had flagged, such as `LC` for low confidence, also made the site read seen, so a call MEGAnE did not trust could read as carrier status. Now a site whose only calls are flagged reads `call filtered out (LC)` (with the call's flags) in the `status` column of `mei/_mei_sites.tsv`, and `call` names the flagged call. A `PASS` call in the same window still makes the site seen. That status value is new; the columns and the other values (seen, not seen, not callable) do not change. A window with zero depth and no call reads not callable, never not seen, as before; a new test now holds that. The calls table `mei/_mei.tsv` does not change: it lists flagged calls with their `filter`, as before. Tests: `rust/crates/og-reports/tests/i411_mei_seen_pass.rs`. Part of #411. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/50-mei.md b/docs/50-mei.md index f48aed70f..1553c314d 100644 --- a/docs/50-mei.md +++ b/docs/50-mei.md @@ -2,7 +2,7 @@ ## What This Does -Finds the copies of Alu, L1 (LINE-1) and SVA elements that the genome carries and the reference does not, and genotypes each one as one or two copies, with MEGAnE ([Kojima et al. 2023](https://pubmed.ncbi.nlm.nih.gov/37169872/), Nat Genet). Then it reads a short catalog of insertions known to cause disease as seen, not seen, or not callable. Opt-in. +Finds the copies of Alu, L1 (LINE-1) and SVA elements that the genome carries and the reference does not, and genotypes each one as one or two copies, with MEGAnE ([Kojima et al. 2023](https://pubmed.ncbi.nlm.nih.gov/37169872/), Nat Genet). Then it reads a short catalog of insertions known to cause disease as seen, call filtered out, not seen, or not callable. Opt-in. Mobile elements are pieces of DNA that copy themselves into new places. In the 1000 Genomes Project each genome carried a median of about 1,200 insertions that the reference lacks, most of them Alu ([Sudmant et al. 2015](https://pubmed.ncbi.nlm.nih.gov/26432246/)), nearly all common and harmless. A few land in a gene and break it: @@ -61,7 +61,7 @@ With `run-all.sh`: `TOOLS=...,mei`; a run lists step 50 only when `TOOLS` names 3. MEGAnE writes `MEI_final_percentile_genotyped.vcf`, the file its log recommends for one sample. When it finds too few insertions to fit its filter thresholds (a BAM of one chromosome), it writes `MEI_final_failed_genotyped.vcf` with fixed thresholds instead; the step then uses that file and prints a warning. 4. `og mei report` keeps the Alu, L1 and SVA insertions that MEGAnE identified (`MEPRED=PASS`) with one or two copies. Other repeat classes in MEGAnE's VCF (DNA transposons, old LTRs) are left out: none is active in human genomes, so a call of one is read as an artefact. 5. With AnnotSV's data, `og mei annotsv-input` writes the kept insertions as the VCF AnnotSV reads, one `` record each with `END` at its position and an ID the table is joined on, and AnnotSV annotates them as [step 05](05-annotsv.md) does the other SVs (`-annotationMode both`, the MANE Select transcripts). MEGAnE gives no inserted length, so AnnotSV takes each insertion as a point and skips its minimum-size check. -6. Each catalog row is **seen** when a kept insertion of the same element lies in its window, **not callable** when the BAM has no reads of that contig or the mean depth over the window is under 10, and **not seen** otherwise. The 10x is this pipeline's choice, not a published value. +6. Each catalog row is **seen** when a kept insertion of the same element lies in its window and passed MEGAnE's own filters (FILTER `PASS`). When the only such insertions in the window are ones MEGAnE flagged (FILTER `LC`, low confidence, or another flag), the row reads **call filtered out** with the flags, for example `call filtered out (LC)`, and names the first of them in `call`: MEGAnE saw something there but did not trust it, so it is neither seen nor not seen. Without any such insertion, the row is **not callable** when the BAM has no reads of that contig or the mean depth over the window is under 10 (zero included), and **not seen** otherwise. The 10x is this pipeline's choice, not a published value. ## Output @@ -69,7 +69,7 @@ With `run-all.sh`: `TOOLS=...,mei`; a run lists step 50 only when `TOOLS` names |---|---| | `mei/${SAMPLE}_mei.tsv` | one row per insertion: `chrom`, `pos`, `end` (MEGAnE's right breakpoint), `element` (Alu, L1, SVA), `subfamily` (for example AluYa5, L1HS, SVA_F), `copies` (1 or 2), `filter` (MEGAnE's FILTER: `PASS`, or flags such as `LC`, low confidence), `confidence` (`H` or `L`, how sure the copy number is), and from AnnotSV: `genes` (the genes the insertion falls in), `location` (each gene with where in it: `exon3`, `intron2-intron2`, ...), `benign_af` (`B_ins_AFmax`, the highest allele frequency of a benign insertion at that place in AnnotSV's benign set, gnomAD-SV among them) and `acmg_class` (AnnotSV's `ACMG_class`). All four are `.` without AnnotSV's data, and for a call AnnotSV did not annotate | | `mei/${SAMPLE}_mei_annotsv.tsv` | AnnotSV's own table of those insertions, with AnnotSV's data only | -| `mei/${SAMPLE}_mei_sites.tsv` | the catalog with `status` (seen, not seen, not callable), `mean_depth` over the window and `call` (the insertion seen: position, subfamily, copies, filter) | +| `mei/${SAMPLE}_mei_sites.tsv` | the catalog with `status` (seen, `call filtered out (FLAGS)`, not seen, not callable), `mean_depth` over the window and `call` (the insertion seen, or the flagged one: position, subfamily, copies, filter) | | `mei/${SAMPLE}_megane.vcf` | MEGAnE's VCF as it wrote it | | `mei/${SAMPLE}_mei_depth.tsv` | `samtools bedcov -c` over the catalog windows | | `mei/${SAMPLE}_megane.log` | MEGAnE's log | @@ -84,7 +84,7 @@ On HG002's chr20 at 30x (13 million mapped reads) on a 4-CPU GitHub runner, MEGA ## Validation -The e2e case `tests/e2e/mei-1.sh` runs the step on HG002's chr20: the reads of chr20 in GIAB's 60x novoalign BAM, half the pairs (30x), realigned with minimap2 to chr20 alone, the unmapped reads dropped (so the case fits a runner's time), and the k-mer set of that chromosome. Its Alu calls are scored against the GIAB v5.0q insertions of HG002 on chr20 (RepeatMasker SINE/Alu, interspersed, 250 to 400 bp, inside the benchmark regions): recall must be at least 0.70 and precision at least 0.80, within 100 bp. On 2026-10-27 it found 12 of the 15 insertions (0.80), and 13 of its 15 Alu calls inside the benchmark regions matched a GIAB insertion (0.87); with the unmapped reads kept, the same 12 of 15 and 13 of 15. With every read pair within 1 kb of a GIAB Alu insertion removed, it found 0 of 15 and the recall check failed. The same case then runs AnnotSV on the calls with made-up AnnotSV data (the bundle of `tests/fixtures/annotsv/class45.sh` plus one made-up gene over all of chr20) and checks that every call comes back inside that gene, with its location there and class `NA`; the same VCF read without AnnotSV's table fails that check. It also runs the Nextflow pipeline with `--tools mei` and `--annotsv_annotations` on the same BAM and checks that its calls table is the bash step's, byte for byte. `rust/crates/og-reports/tests/optin_mei.rs` plants an SVA in the FKTN window of a synthetic MEGAnE VCF and checks it is seen, and not seen without it, and joins a table in AnnotSV's columns back to the calls. +The e2e case `tests/e2e/mei-1.sh` runs the step on HG002's chr20: the reads of chr20 in GIAB's 60x novoalign BAM, half the pairs (30x), realigned with minimap2 to chr20 alone, the unmapped reads dropped (so the case fits a runner's time), and the k-mer set of that chromosome. Its Alu calls are scored against the GIAB v5.0q insertions of HG002 on chr20 (RepeatMasker SINE/Alu, interspersed, 250 to 400 bp, inside the benchmark regions): recall must be at least 0.70 and precision at least 0.80, within 100 bp. On 2026-10-27 it found 12 of the 15 insertions (0.80), and 13 of its 15 Alu calls inside the benchmark regions matched a GIAB insertion (0.87); with the unmapped reads kept, the same 12 of 15 and 13 of 15. With every read pair within 1 kb of a GIAB Alu insertion removed, it found 0 of 15 and the recall check failed. The same case then runs AnnotSV on the calls with made-up AnnotSV data (the bundle of `tests/fixtures/annotsv/class45.sh` plus one made-up gene over all of chr20) and checks that every call comes back inside that gene, with its location there and class `NA`; the same VCF read without AnnotSV's table fails that check. It also runs the Nextflow pipeline with `--tools mei` and `--annotsv_annotations` on the same BAM and checks that its calls table is the bash step's, byte for byte. `rust/crates/og-reports/tests/optin_mei.rs` plants an SVA in the FKTN window of a synthetic MEGAnE VCF and checks it is seen, and not seen without it, and joins a table in AnnotSV's columns back to the calls. `rust/crates/og-reports/tests/i411_mei_seen_pass.rs` checks that an SVA there that MEGAnE flagged `LC` reads `call filtered out (LC)`, not seen, that a `PASS` call in the same window wins over a flagged one, and that a window with zero depth and no call reads not callable, never not seen. ## Notes diff --git a/docs/results/structural-and-repeats.md b/docs/results/structural-and-repeats.md index 7afbb24aa..f892dcbaa 100644 --- a/docs/results/structural-and-repeats.md +++ b/docs/results/structural-and-repeats.md @@ -177,4 +177,4 @@ Fewer repeats or a risk allele point to a higher Lp(a); a 4925G>A copy lowers th **Where to look:** `${SAMPLE}/mei/${SAMPLE}_mei_sites.tsv` for the three known disease insertions (SVA insertions in FKTN, TAF1 and BBS1), and `${SAMPLE}/mei/${SAMPLE}_mei.tsv` for every Alu, L1 and SVA insertion MEGAnE called, with one or two copies. -Expect many calls: a genome carries about 1,200 such insertions, nearly all common and harmless. Read the catalog first. **Seen** means an insertion of the same element was called inside the site's window; one copy of the FKTN or BBS1 insertion is carrier status for a recessive condition, and the TAF1 insertion on a male's single X is what causes X-linked dystonia-parkinsonism. **Not seen** is not proof of absence: short reads find an SVA's edges, not its body. **Not callable** means too few reads there (under 10x) to tell. Confirm anything that matters in a clinical laboratory. [Step 50](../50-mei.md) explains the columns. +Expect many calls: a genome carries about 1,200 such insertions, nearly all common and harmless. Read the catalog first. **Seen** means an insertion of the same element was called inside the site's window and passed MEGAnE's own filters; one copy of the FKTN or BBS1 insertion is carrier status for a recessive condition, and the TAF1 insertion on a male's single X is what causes X-linked dystonia-parkinsonism. **Not seen** is not proof of absence: short reads find an SVA's edges, not its body. **Call filtered out** (with MEGAnE's flags, such as `LC` for low confidence) means MEGAnE called one there but did not trust it: it is not a finding, and not proof of absence either; the `call` column names it, so a laboratory can check that site. **Not callable** means too few reads there (under 10x, or none) to tell. Confirm anything that matters in a clinical laboratory. [Step 50](../50-mei.md) explains the columns. diff --git a/modules/local/mei/main.nf b/modules/local/mei/main.nf index 892dfb509..9ddd74fd2 100644 --- a/modules/local/mei/main.nf +++ b/modules/local/mei/main.nf @@ -16,7 +16,8 @@ class, NA for every insertion (AnnotSV 3.5 scores deletions and duplications only); then og mei report: the calls with those columns ("." without AnnotSV's data), and the - catalog as seen / not seen / not callable. 4 CPUs and 8 GB + catalog as seen / call filtered out / not seen / not + callable. 4 CPUs and 8 GB with AnnotSV's data, as step 05 gives AnnotSV, 1 and 2 GB without (conf/base.config) diff --git a/scripts/50-mei.sh b/scripts/50-mei.sh index b13392ddb..e7c219d5d 100755 --- a/scripts/50-mei.sh +++ b/scripts/50-mei.sh @@ -9,8 +9,9 @@ # the insertions it calls and reads a short catalog of insertions known to # cause disease (assets/mei_sites.tsv: the FKTN SVA of Fukuyama muscular # dystrophy, the TAF1 SVA of X-linked dystonia-parkinsonism, the BBS1 SVA of -# Bardet-Biedl syndrome) as seen, not seen, or not callable (too few reads -# there to tell). With AnnotSV's data in GENOME_DIR (annotsv_annotations/, as +# Bardet-Biedl syndrome) as seen (a call that passed MEGAnE's filters), call +# filtered out (only calls MEGAnE flagged), not seen, or not callable (too few +# reads there to tell). With AnnotSV's data in GENOME_DIR (annotsv_annotations/, as # step 05 reads it), AnnotSV annotates the insertions the table lists: the # genes each falls in, where in them, the frequency of a benign insertion at # that place, and AnnotSV's class (NA for every insertion: AnnotSV 3.5 scores @@ -27,7 +28,7 @@ # with at least one copy, and AnnotSV's genes, location, # benign frequency and class ("." without AnnotSV's data) # mei/_mei_annotsv.tsv AnnotSV's table of those insertions (with its data only) -# mei/_mei_sites.tsv the catalog with seen / not seen / not callable +# mei/_mei_sites.tsv the catalog with seen / call filtered out / not seen / not callable # mei/_mei_depth.tsv samtools bedcov over the catalog windows # mei/_megane.log MEGAnE's log # MEGAnE reads the whole BAM; about an hour for a 30x genome on 4 threads, in From 6493dde9d5e1fc64f7b6ba536a9fcc79d632a7af Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 15:36:54 +0100 Subject: [PATCH 028/110] test(contract): check the five stable files the bash base run writes that kept e2e '-' The clinical, slivar and chrM_filtered VCF indexes and the chrM Mutect2 stats are written by their step scripts too, so their leg is both, and the base run writes them with the Stranger VCF of step 09b. Their e2e cell is now bash, so the HG002 case holds them. --- CHANGELOG.md | 2 +- assets/output_contract.tsv | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa88b5a6a..8625db42a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- The output contract check now compares the contract with the last release, so a stable output cannot disappear between releases. Before, `og dev contract --static` compared the code with the contract of the same checkout only: a change that renamed a stable output in the code and in its row, removed a stable param with its row, or made a stable row experimental passed. `og dev contract --baseline FILE` checks every stable row of a release's contract against this one: still listed, still stable, the same format, every leg that wrote the file and every required field. New rows and changes to experimental and internal rows pass. Guard's `rust` job runs it against the contract of the newest `v1.x.y` tag; until 1.0.0 is tagged there is none, and the step says so. The HG002 e2e case now also checks 26 stable files the base run writes whose `e2e` cell was `-` (the clinical summary, the slivar, mitochondrial and pypgx tables, the ClinVar cDNA and deep-intronic tables, the gVCF, the read count, the charts and search index, the PharmCAT JSON and HTML, the coverage beds, the sex check and indexcov). `run_manifest.tsv` is now listed on both legs, since step 24 writes it too. No output changes. `.github/CODEOWNERS` now says it routes review requests: main requires its status checks, not an approving review. +- The output contract check now compares the contract with the last release, so a stable output cannot disappear between releases. Before, `og dev contract --static` compared the code with the contract of the same checkout only: a change that renamed a stable output in the code and in its row, removed a stable param with its row, or made a stable row experimental passed. `og dev contract --baseline FILE` checks every stable row of a release's contract against this one: still listed, still stable, the same format, every leg that wrote the file and every required field. New rows and changes to experimental and internal rows pass. Guard's `rust` job runs it against the contract of the newest `v1.x.y` tag; until 1.0.0 is tagged there is none, and the step says so. The HG002 e2e case now also checks 31 stable files the base run writes whose `e2e` cell was `-` (the clinical summary, the slivar, mitochondrial and pypgx tables, the ClinVar cDNA and deep-intronic tables, the gVCF, the read count, the charts and search index, the PharmCAT JSON and HTML, the coverage beds, the sex check, indexcov, the Stranger VCF of ExpansionHunter, the indexes of the clinical, slivar and mitochondrial VCFs, and the Mutect2 stats of chrM). `run_manifest.tsv`, those three indexes and the Mutect2 stats are now listed on both legs, since the step scripts write them too. No output changes. `.github/CODEOWNERS` now says it routes review requests: main requires its status checks, not an approving review. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/assets/output_contract.tsv b/assets/output_contract.tsv index af9f8e8f0..df4909e6b 100644 --- a/assets/output_contract.tsv +++ b/assets/output_contract.tsv @@ -83,7 +83,7 @@ file {sample}/chip/{sample}_chip.tsv 49 CHIP_REPORT both tsv experimental - - file {sample}/chip/{sample}_chip_depth.tsv 49 CHIP_REPORT both tsv experimental - - file {sample}/chip/{sample}_chip_filtered.vcf.gz 49 CHIP_MUTECT2 both vcf experimental - - file {sample}/clinical/{sample}_clinical.vcf.gz 23 CLINICAL_FILTER both vcf stable bash - -file {sample}/clinical/{sample}_clinical.vcf.gz.tbi 23 CLINICAL_FILTER nextflow index stable - - +file {sample}/clinical/{sample}_clinical.vcf.gz.tbi 23 CLINICAL_FILTER both index stable bash - file {sample}/clinical/{sample}_clinical_summary.tsv 23 CLINICAL_FILTER both tsv stable bash - file {sample}/clinvar/{sample}_clinvar_cdna_check.tsv 06 CLINVAR_CDNA_CHECK both tsv stable both - file {sample}/clinvar/{sample}_clinvar_cdna_scan.tsv 06 CLINVAR_CDNA_CHECK both tsv stable both - @@ -120,7 +120,7 @@ file {sample}/exomiser/{sample}_exomiser_terms.tsv 48 EXOMISER_REPORT both tsv e file {sample}/exomiser/{sample}_exomiser_top.tsv 48 EXOMISER_REPORT both tsv experimental - - file {sample}/expansion_hunter/{sample}.json 09 EXPANSION_HUNTER nextflow json stable - - file {sample}/expansion_hunter/{sample}.vcf 09 EXPANSION_HUNTER nextflow vcf stable - - -file {sample}/expansion_hunter/{sample}_eh_stranger.vcf 09b STRANGER both vcf stable - - +file {sample}/expansion_hunter/{sample}_eh_stranger.vcf 09b STRANGER both vcf stable bash - file {sample}/expansion_hunter/{sample}_realigned.bam 09 EXPANSION_HUNTER nextflow bam stable - - file {sample}/expansion_hunter/{sample}_rfc1_motif.tsv 09b STRANGER_RFC1 both tsv stable - - file {sample}/expansion_hunter/{sample}_str_motifs.tsv 09b STRANGER_RFC1 both tsv stable - - @@ -161,8 +161,8 @@ file {sample}/mito/{sample}_chrM.vcf.gz.tbi 12 MITO_EXTRACT_CHRM nextflow index file {sample}/mito/{sample}_chrM_annotated.tsv 20 MITO_VARIANTS_ANNOTATE both tsv stable bash - file {sample}/mito/{sample}_chrM_deletions.tsv 20 MITO_DELETIONS both tsv stable bash - file {sample}/mito/{sample}_chrM_filtered.vcf.gz 20 MITO_VARIANTS both vcf stable bash - -file {sample}/mito/{sample}_chrM_filtered.vcf.gz.tbi 20 MITO_VARIANTS nextflow index stable - - -file {sample}/mito/{sample}_chrM_mutect2.vcf.gz.stats 20 MITO_VARIANTS nextflow bin stable - - +file {sample}/mito/{sample}_chrM_filtered.vcf.gz.tbi 20 MITO_VARIANTS both index stable bash - +file {sample}/mito/{sample}_chrM_mutect2.vcf.gz.stats 20 MITO_VARIANTS both bin stable bash - file {sample}/mito/{sample}_haplocheck.txt 12 HAPLOCHECK both text stable - - file {sample}/mito/{sample}_haplogroup.txt 12 MITO_HAPLOGROUP both text stable bash - file {sample}/mito/{sample}_mtdna_copies.tsv 20 MITO_DELETIONS both tsv stable bash - @@ -215,7 +215,7 @@ file {sample}/slivar/{sample}.ped 31 SLIVAR_PRIORITIZE nextflow tsv internal - - file {sample}/slivar/{sample}_compound_het_pairs.tsv 31 COMPHET_PHASE both tsv stable bash - file {sample}/slivar/{sample}_compound_hets.vcf.gz 31 SLIVAR both vcf stable bash - file {sample}/slivar/{sample}_prioritized.vcf.gz 31 SLIVAR_PRIORITIZE both vcf stable bash - -file {sample}/slivar/{sample}_prioritized.vcf.gz.tbi 31 SLIVAR_PRIORITIZE nextflow index stable - - +file {sample}/slivar/{sample}_prioritized.vcf.gz.tbi 31 SLIVAR_PRIORITIZE both index stable bash - file {sample}/slivar/{sample}_slivar_summary.tsv 31 SLIVAR_PRIORITIZE both tsv stable bash - file {sample}/summary.json 24 HTML_REPORT both json stable bash schema_version,sample,generated_utc,run,databases,manifest,sections,cyp2d6,not_run,not_assessed file {sample}/sv_duphold/{sample}_sv_duphold.vcf 15 DUPHOLD nextflow vcf stable - - From 8f246c1fca07fe135e4e287dbced57f171080730 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 15:41:04 +0100 Subject: [PATCH 029/110] fix(locityper): read uncalibrated outside HLA and KIR The authors set their quality filter on HLA and KIR loci only. og locityper report applied it as pass or fail at every locus, so a CYP2D6 or FCGR call could read as a pass nobody had measured. The filter now reads pass or fail only at HLA-* and KIR* loci; elsewhere it reads uncalibrated, with what the rule alone gives in the reason column. The existing filter cases move from CYP2D6 to HLA-DQB1, where the rule still applies. 12 parity goldens record the new CYP2D6 rows. Bead: sv-39 --- rust/crates/og-reports/src/locityper.rs | 62 +++++- .../tests/i411_locityper_uncalibrated.rs | 195 ++++++++++++++++++ .../og-reports/tests/optin_locityper.rs | 17 +- .../locityper-report/boolcounts/out.tsv | 2 + .../golden/locityper-report/boolcounts/stdout | 1 + .../golden/locityper-report/clean/out.tsv | 2 + .../golden/locityper-report/clean/stdout | 1 + .../golden/locityper-report/far/out.tsv | 2 + .../parity/golden/locityper-report/far/stdout | 1 + .../locityper-report/nanquality/out.tsv | 2 + .../golden/locityper-report/nanquality/stdout | 1 + .../golden/locityper-report/nocounts/out.tsv | 2 + .../golden/locityper-report/nocounts/stdout | 1 + .../golden/locityper-report/nodist/out.tsv | 2 + .../golden/locityper-report/nodist/stdout | 1 + .../golden/locityper-report/nulltotal/out.tsv | 2 + .../golden/locityper-report/nulltotal/stdout | 1 + .../golden/locityper-report/share/out.tsv | 2 + .../golden/locityper-report/share/stdout | 1 + .../locityper-report/strquality/out.tsv | 2 + .../golden/locityper-report/strquality/stdout | 1 + .../locityper-report/three-loci/out.tsv | 4 + .../golden/locityper-report/three-loci/stdout | 1 + .../locityper-report/unexplained/out.tsv | 2 + .../locityper-report/unexplained/stdout | 1 + .../golden/locityper-report/warned/out.tsv | 2 + .../golden/locityper-report/warned/stdout | 1 + 27 files changed, 303 insertions(+), 9 deletions(-) create mode 100644 rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs create mode 100644 tests/parity/golden/locityper-report/boolcounts/out.tsv create mode 100644 tests/parity/golden/locityper-report/boolcounts/stdout create mode 100644 tests/parity/golden/locityper-report/clean/out.tsv create mode 100644 tests/parity/golden/locityper-report/clean/stdout create mode 100644 tests/parity/golden/locityper-report/far/out.tsv create mode 100644 tests/parity/golden/locityper-report/far/stdout create mode 100644 tests/parity/golden/locityper-report/nanquality/out.tsv create mode 100644 tests/parity/golden/locityper-report/nanquality/stdout create mode 100644 tests/parity/golden/locityper-report/nocounts/out.tsv create mode 100644 tests/parity/golden/locityper-report/nocounts/stdout create mode 100644 tests/parity/golden/locityper-report/nodist/out.tsv create mode 100644 tests/parity/golden/locityper-report/nodist/stdout create mode 100644 tests/parity/golden/locityper-report/nulltotal/out.tsv create mode 100644 tests/parity/golden/locityper-report/nulltotal/stdout create mode 100644 tests/parity/golden/locityper-report/share/out.tsv create mode 100644 tests/parity/golden/locityper-report/share/stdout create mode 100644 tests/parity/golden/locityper-report/strquality/out.tsv create mode 100644 tests/parity/golden/locityper-report/strquality/stdout create mode 100644 tests/parity/golden/locityper-report/three-loci/out.tsv create mode 100644 tests/parity/golden/locityper-report/three-loci/stdout create mode 100644 tests/parity/golden/locityper-report/unexplained/out.tsv create mode 100644 tests/parity/golden/locityper-report/unexplained/stdout create mode 100644 tests/parity/golden/locityper-report/warned/out.tsv create mode 100644 tests/parity/golden/locityper-report/warned/stdout diff --git a/rust/crates/og-reports/src/locityper.rs b/rust/crates/og-reports/src/locityper.rs index c61f82505..2e11e47b8 100644 --- a/rust/crates/og-reports/src/locityper.rs +++ b/rust/crates/og-reports/src/locityper.rs @@ -16,6 +16,11 @@ //! 2025, Zenodo 15879519 README): no warning, a weighted distance of 30 or //! less, and fewer than 1000 or fewer than 20% unexplained reads. //! +//! The authors calibrated that filter on HLA and KIR loci only. At an HLA +//! (`HLA-...`) or KIR (`KIR...`) locus the filter reads pass or fail. At any +//! other locus (CYP2D6, FCGR) it reads "uncalibrated", never a pass, and +//! the reason says what the rule alone would give there. +//! //! A locus Locityper did not finish is "not called", never a genotype. Exit //! 1 only when the BED cannot be read. //! @@ -134,11 +139,34 @@ fn warnings_of(res: &Value) -> Result, String> { } } -/// The authors' filter: pass, or fail with the reasons. +/// The authors' filter: pass, or fail with the reasons; at a locus they +/// did not calibrate it on, uncalibrated with the reasons the rule alone +/// gives (none when it would pass). #[derive(Debug, Clone, PartialEq, Eq)] pub enum Filter { Pass, Fail(Vec), + Uncalibrated(Vec), +} + +/// The start of the reason of an uncalibrated locus. +pub const UNCALIBRATED: &str = "the authors calibrated this filter on HLA and KIR loci only"; + +/// Whether the authors calibrated their filter on this locus: an HLA gene +/// (`HLA-DRB1`, `HLA-DQB1`) or the KIR cluster or a KIR gene (`KIR`, +/// `KIR2DL1`). Their benchmark covered those and nothing else. +pub fn calibrated(locus: &str) -> bool { + locus.starts_with("HLA-") || locus.starts_with("KIR") +} + +/// The filter of `locus`: the authors' rule where they calibrated it, +/// "uncalibrated" elsewhere. +fn filter_at(locus: &str, res: &Value, warns: &[String]) -> Filter { + match judge(res, warns) { + f if calibrated(locus) => f, + Filter::Fail(why) | Filter::Uncalibrated(why) => Filter::Uncalibrated(why), + Filter::Pass => Filter::Uncalibrated(Vec::new()), + } } fn judge(res: &Value, warns: &[String]) -> Filter { @@ -224,6 +252,17 @@ impl LocusRow { let (f, why) = match filter { Filter::Pass => ("pass", None), Filter::Fail(w) => ("fail", Some(w.join("; "))), + Filter::Uncalibrated(w) if w.is_empty() => ( + "uncalibrated", + Some(format!("{UNCALIBRATED}; by its rule alone it passes")), + ), + Filter::Uncalibrated(w) => ( + "uncalibrated", + Some(format!( + "{UNCALIBRATED}; by its rule alone it fails: {}", + w.join("; ") + )), + ), }; vec![ locus.clone(), @@ -317,7 +356,7 @@ pub fn row_for(name: &str, region: &str, gt_dir: &str, exit_code: i64) -> LocusR Ok(w) => w, Err(e) => return not_called(format!("res.json.gz cannot be read: {e}")), }; - let filter = judge(&res, &warnings); + let filter = filter_at(name, &res, &warnings); let get = |k| pycompat::value::get(&res, k).ok().flatten(); LocusRow::Called { locus: name.into(), @@ -385,8 +424,25 @@ fn report(gt_dir: &str, loci: &str, exit_code: i64, out: &str) -> Outcome { ) }) .count(); + let uncalibrated = rows + .iter() + .filter(|r| { + matches!( + r, + LocusRow::Called { + filter: Filter::Uncalibrated(_), + .. + } + ) + }) + .count(); + let outside = if uncalibrated > 0 { + format!(", {uncalibrated} uncalibrated (outside HLA and KIR)") + } else { + String::new() + }; Ok(format!( - "{called} of {} loci called, {pass} pass the authors' filter\n", + "{called} of {} loci called, {pass} pass the authors' filter{outside}\n", rows.len() )) } diff --git a/rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs b/rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs new file mode 100644 index 000000000..a3cae4f5d --- /dev/null +++ b/rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs @@ -0,0 +1,195 @@ +//! `og locityper report`: the authors' filter reads pass or fail only at +//! the HLA and KIR loci they calibrated it on. At CYP2D6 and FCGR it reads +//! "uncalibrated", never a green pass, and the reason says what the rule +//! alone would give there. +//! +//! Red first: before the fix a clean CYP2D6 call read "pass" and a far +//! one "fail", the same as at HLA-DQB1. + +use std::fs; +use std::io::Write as _; +use std::num::NonZero; +use std::path::PathBuf; + +/// The five loci of `assets/locityper_loci.bed`. +const BED: &str = "# the shipped loci +chr1\t161506761\t161681047\tFCGR +chr6\t32484347\t32593538\tHLA-DRB1 +chr6\t32652603\t32669077\tHLA-DQB1 +chr19\t54723153\t54868521\tKIR +chr22\t42122284\t42152960\tCYP2D6 +"; + +/// A clean call: no warning, weighted distance 0.2, 12 of 900 reads +/// unexplained. +const CLEAN: &str = r#"{"genotype": "HG00733.1,NA19240.2", "quality": 27.8, "total_reads": 900, "unexpl_reads": 12, "weight_dist": 0.2, "options": 120, "dist_type": "edit"}"#; +/// The same call with a weighted distance of 31.5, above the authors' 30. +const FAR: &str = r#"{"genotype": "HG00733.1,NA19240.2", "quality": 27.8, "total_reads": 900, "unexpl_reads": 12, "weight_dist": 31.5, "options": 120, "dist_type": "edit"}"#; + +struct Dir(PathBuf); + +impl Dir { + fn new(name: &str) -> Dir { + let p = + std::env::temp_dir().join(format!("og-i411-locityper-{name}-{}", std::process::id())); + let _ = fs::remove_dir_all(&p); + fs::create_dir_all(&p).unwrap(); + Dir(p) + } + + fn p(&self, s: &str) -> String { + self.0.join(s).to_str().unwrap().to_owned() + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +/// `res.json.gz` and `success` of one locus, as Locityper 1.7.14 writes +/// them. +fn locus(root: &str, name: &str, json: &str) { + let d = PathBuf::from(root).join("loci").join(name); + fs::create_dir_all(&d).unwrap(); + let mut w = og_io::bgzf::Writer::new(Vec::new(), NonZero::new(1).unwrap()).unwrap(); + w.write_all(json.as_bytes()).unwrap(); + fs::write(d.join("res.json.gz"), w.finish().unwrap()).unwrap(); + fs::write(d.join("success"), "").unwrap(); +} + +/// The verb on the five loci, each with `json(locus)`: (stdout, rows as +/// (locus, filter, reason)). +fn report(d: &Dir, json: fn(&str) -> &'static str) -> (String, Vec<[String; 3]>) { + let bed = d.p("loci.bed"); + fs::write(&bed, BED).unwrap(); + let root = d.p("gt"); + for name in ["FCGR", "HLA-DRB1", "HLA-DQB1", "KIR", "CYP2D6"] { + locus(&root, name, json(name)); + } + let out = d.p("out.tsv"); + let args: Vec = ["--gt-dir", &root, "--loci", &bed, "--out", &out] + .iter() + .map(|s| (*s).to_owned()) + .collect(); + let (mut o, mut e) = (Vec::new(), Vec::new()); + let code = og_reports::locityper::cli(Some("report"), &args, &mut o, &mut e); + assert_eq!(code, 0, "{}", String::from_utf8_lossy(&e)); + let text = fs::read_to_string(&out).unwrap(); + let mut lines = text.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + let col = |n: &str| head.iter().position(|h| *h == n).unwrap(); + let (f, r) = (col("filter"), col("reason")); + let rows = lines + .map(|l| { + let c: Vec<&str> = l.split('\t').collect(); + assert_eq!(c.len(), 13, "{l}"); + [c[0].to_owned(), c[f].to_owned(), c[r].to_owned()] + }) + .collect(); + (String::from_utf8(o).unwrap(), rows) +} + +fn filters(rows: &[[String; 3]]) -> Vec<(&str, &str)> { + rows.iter() + .map(|r| (r[0].as_str(), r[1].as_str())) + .collect() +} + +#[test] +fn red_first_a_clean_cyp2d6_call_reads_uncalibrated_not_pass() { + let d = Dir::new("clean"); + let (stdout, rows) = report(&d, |_| CLEAN); + assert_eq!( + filters(&rows), + [ + ("FCGR", "uncalibrated"), + ("HLA-DRB1", "pass"), + ("HLA-DQB1", "pass"), + ("KIR", "pass"), + ("CYP2D6", "uncalibrated"), + ] + ); + for r in rows.iter().filter(|r| r[1] == "pass") { + assert_eq!(r[2], ".", "{r:?}"); + } + for r in rows.iter().filter(|r| r[1] == "uncalibrated") { + assert_eq!( + r[2], + "the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes", + "{r:?}" + ); + } + assert_eq!( + stdout, + "5 of 5 loci called, 3 pass the authors' filter, 2 uncalibrated (outside HLA and KIR)\n" + ); +} + +#[test] +fn a_far_call_fails_at_hla_and_kir_and_reads_uncalibrated_elsewhere() { + let d = Dir::new("far"); + let (stdout, rows) = report(&d, |_| FAR); + assert_eq!( + filters(&rows), + [ + ("FCGR", "uncalibrated"), + ("HLA-DRB1", "fail"), + ("HLA-DQB1", "fail"), + ("KIR", "fail"), + ("CYP2D6", "uncalibrated"), + ] + ); + for r in &rows { + let why = "weighted distance 31.50 is above 30"; + if r[1] == "fail" { + assert_eq!(r[2], why, "{r:?}"); + } else { + assert_eq!( + r[2], + format!( + "the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: {why}" + ), + "{r:?}" + ); + } + } + assert_eq!( + stdout, + "5 of 5 loci called, 0 pass the authors' filter, 2 uncalibrated (outside HLA and KIR)\n" + ); +} + +#[test] +fn hla_and_kir_loci_by_name() { + use og_reports::locityper::calibrated; + for l in ["HLA-DRB1", "HLA-DQB1", "HLA-A", "KIR", "KIR2DL1"] { + assert!(calibrated(l), "{l}"); + } + for l in ["CYP2D6", "FCGR", "FCGR3A", "C4", "LPA", "hla-a", "HLA", ""] { + assert!(!calibrated(l), "{l}"); + } +} + +#[test] +fn only_hla_and_kir_calls_count_as_passing() { + // With every locus clean, HLA-DQB1 alone passes: the CYP2D6 row adds + // nothing to the pass count. + let d = Dir::new("mixed"); + let (stdout, rows) = report(&d, |l| if l == "HLA-DQB1" { CLEAN } else { FAR }); + assert_eq!( + filters(&rows), + [ + ("FCGR", "uncalibrated"), + ("HLA-DRB1", "fail"), + ("HLA-DQB1", "pass"), + ("KIR", "fail"), + ("CYP2D6", "uncalibrated"), + ] + ); + assert!( + stdout.starts_with("5 of 5 loci called, 1 pass the authors' filter, 2 uncalibrated"), + "{stdout}" + ); +} diff --git a/rust/crates/og-reports/tests/optin_locityper.rs b/rust/crates/og-reports/tests/optin_locityper.rs index aecdf3832..8aeaa0e9e 100644 --- a/rust/crates/og-reports/tests/optin_locityper.rs +++ b/rust/crates/og-reports/tests/optin_locityper.rs @@ -158,12 +158,14 @@ fn table(text: &str) -> Vec { .collect() } -/// The verb on CYP2D6 alone: its row. +/// The verb on HLA-DQB1 alone, a locus the authors calibrated their +/// filter on: its row. (CYP2D6 and FCGR read "uncalibrated", tested in +/// `i411_locityper_uncalibrated.rs`.) fn og_row(d: &Dir, n: usize, body: Body, success: bool, exit_code: i64) -> Row { let root = d.p(&format!("c{n}")); - gt_dir(&root, "CYP2D6", body, success); + gt_dir(&root, "HLA-DQB1", body, success); let bed = d.p(&format!("c{n}.bed")); - fs::write(&bed, "chr22\t42122284\t42152960\tCYP2D6\n").unwrap(); + fs::write(&bed, "chr6\t32652603\t32669077\tHLA-DQB1\n").unwrap(); let out = d.p(&format!("c{n}.tsv")); let (code, _, err) = og(&[ "--gt-dir", @@ -383,16 +385,16 @@ fn the_cli_writes_a_row_per_bed_locus_in_order() { let bed = d.p("loci.bed"); fs::write(&bed, BED).unwrap(); let root = d.p("gt"); - gt_dir(&root, "CYP2D6", Body::Res(res()), true); gt_dir( &root, - "HLA-DQB1", + "CYP2D6", Body::Res(Res { wd: Some("50"), ..res() }), true, ); + gt_dir(&root, "HLA-DQB1", Body::Res(res()), true); let out = d.p("cli.tsv"); let (code, stdout, err) = og(&[ "--gt-dir", @@ -414,7 +416,10 @@ fn the_cli_writes_a_row_per_bed_locus_in_order() { assert_eq!(lines[1][1], "chr6:32652604-32669077"); let st: Vec<&str> = lines[1..].iter().map(|r| r[2]).collect(); assert_eq!(st, ["called", "called", "not called"]); - assert!(stdout.contains("2 of 3 loci called, 1 pass"), "{stdout}"); + assert!( + stdout.contains("2 of 3 loci called, 1 pass the authors' filter, 1 uncalibrated"), + "{stdout}" + ); let bad = d.p("bad.bed"); fs::write(&bad, "chr6\tx\t10\tA\n").unwrap(); let (code, _, err) = og(&["--gt-dir", &root, "--loci", &bad, "--out", &d.p("bad.tsv")]); diff --git a/tests/parity/golden/locityper-report/boolcounts/out.tsv b/tests/parity/golden/locityper-report/boolcounts/out.tsv new file mode 100644 index 000000000..764b55afb --- /dev/null +++ b/tests/parity/golden/locityper-report/boolcounts/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 . . 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper gave no read counts (total_reads, unexpl_reads), so the unexplained-read rule cannot be checked diff --git a/tests/parity/golden/locityper-report/boolcounts/stdout b/tests/parity/golden/locityper-report/boolcounts/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/boolcounts/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/clean/out.tsv b/tests/parity/golden/locityper-report/clean/out.tsv new file mode 100644 index 000000000..5d364c599 --- /dev/null +++ b/tests/parity/golden/locityper-report/clean/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes diff --git a/tests/parity/golden/locityper-report/clean/stdout b/tests/parity/golden/locityper-report/clean/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/clean/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/far/out.tsv b/tests/parity/golden/locityper-report/far/out.tsv new file mode 100644 index 000000000..2cd4b8da4 --- /dev/null +++ b/tests/parity/golden/locityper-report/far/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 31.500 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: weighted distance 31.50 is above 30 diff --git a/tests/parity/golden/locityper-report/far/stdout b/tests/parity/golden/locityper-report/far/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/far/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nanquality/out.tsv b/tests/parity/golden/locityper-report/nanquality/out.tsv new file mode 100644 index 000000000..8e722c73f --- /dev/null +++ b/tests/parity/golden/locityper-report/nanquality/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called A.1,B.2 A.1 B.2 . 10 0 inf . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: weighted distance inf is above 30 diff --git a/tests/parity/golden/locityper-report/nanquality/stdout b/tests/parity/golden/locityper-report/nanquality/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nanquality/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nocounts/out.tsv b/tests/parity/golden/locityper-report/nocounts/out.tsv new file mode 100644 index 000000000..764b55afb --- /dev/null +++ b/tests/parity/golden/locityper-report/nocounts/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 . . 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper gave no read counts (total_reads, unexpl_reads), so the unexplained-read rule cannot be checked diff --git a/tests/parity/golden/locityper-report/nocounts/stdout b/tests/parity/golden/locityper-report/nocounts/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nocounts/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nodist/out.tsv b/tests/parity/golden/locityper-report/nodist/out.tsv new file mode 100644 index 000000000..0b60d84e8 --- /dev/null +++ b/tests/parity/golden/locityper-report/nodist/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 . . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: no weighted distance (the database has no haplotype alignments: setup.sh runs locityper augment) diff --git a/tests/parity/golden/locityper-report/nodist/stdout b/tests/parity/golden/locityper-report/nodist/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nodist/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/nulltotal/out.tsv b/tests/parity/golden/locityper-report/nulltotal/out.tsv new file mode 100644 index 000000000..7fc3eab50 --- /dev/null +++ b/tests/parity/golden/locityper-report/nulltotal/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 . 12 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper gave no read counts (total_reads, unexpl_reads), so the unexplained-read rule cannot be checked diff --git a/tests/parity/golden/locityper-report/nulltotal/stdout b/tests/parity/golden/locityper-report/nulltotal/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/nulltotal/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/share/out.tsv b/tests/parity/golden/locityper-report/share/out.tsv new file mode 100644 index 000000000..7c735596b --- /dev/null +++ b/tests/parity/golden/locityper-report/share/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 10000 1500 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes diff --git a/tests/parity/golden/locityper-report/share/stdout b/tests/parity/golden/locityper-report/share/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/share/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/strquality/out.tsv b/tests/parity/golden/locityper-report/strquality/out.tsv new file mode 100644 index 000000000..0a7ee6406 --- /dev/null +++ b/tests/parity/golden/locityper-report/strquality/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 . 900 12 . . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: no weighted distance (the database has no haplotype alignments: setup.sh runs locityper augment) diff --git a/tests/parity/golden/locityper-report/strquality/stdout b/tests/parity/golden/locityper-report/strquality/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/strquality/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/three-loci/out.tsv b/tests/parity/golden/locityper-report/three-loci/out.tsv new file mode 100644 index 000000000..d7198c272 --- /dev/null +++ b/tests/parity/golden/locityper-report/three-loci/out.tsv @@ -0,0 +1,4 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +HLA-DQB1 chr6:32652604-32669077 not called . . . . . . . . . Locityper wrote no result for this locus +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes +FCGR chr1:161506762-161681047 not called . . . . . . . . . Locityper wrote no result for this locus diff --git a/tests/parity/golden/locityper-report/three-loci/stdout b/tests/parity/golden/locityper-report/three-loci/stdout new file mode 100644 index 000000000..c359d926d --- /dev/null +++ b/tests/parity/golden/locityper-report/three-loci/stdout @@ -0,0 +1 @@ +1 of 3 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/unexplained/out.tsv b/tests/parity/golden/locityper-report/unexplained/out.tsv new file mode 100644 index 000000000..37404de24 --- /dev/null +++ b/tests/parity/golden/locityper-report/unexplained/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 3000 1200 0.200 . uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: 1200 of 3000 reads unexplained (1000 or more, and 20% or more) diff --git a/tests/parity/golden/locityper-report/unexplained/stdout b/tests/parity/golden/locityper-report/unexplained/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/unexplained/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) diff --git a/tests/parity/golden/locityper-report/warned/out.tsv b/tests/parity/golden/locityper-report/warned/out.tsv new file mode 100644 index 000000000..cec57a9bb --- /dev/null +++ b/tests/parity/golden/locityper-report/warned/out.tsv @@ -0,0 +1,2 @@ +locus region status genotype haplotype_1 haplotype_2 quality total_reads unexplained_reads weighted_distance warnings filter reason +CYP2D6 chr22:42122285-42152960 called HG00733.1,NA19240.2 HG00733.1 NA19240.2 27.8 900 12 0.200 UnexplainedReads uncalibrated the authors calibrated this filter on HLA and KIR loci only; by its rule alone it fails: Locityper warned: UnexplainedReads diff --git a/tests/parity/golden/locityper-report/warned/stdout b/tests/parity/golden/locityper-report/warned/stdout new file mode 100644 index 000000000..ad8e8250b --- /dev/null +++ b/tests/parity/golden/locityper-report/warned/stdout @@ -0,0 +1 @@ +1 of 1 loci called, 0 pass the authors' filter, 1 uncalibrated (outside HLA and KIR) From cdf7ae183b7dfac26e1c44612c260cb4c2854456 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 15:41:04 +0100 Subject: [PATCH 030/110] docs(locityper): say where the authors' filter applies Bead: sv-39 --- CHANGELOG.md | 1 + docs/53-locityper.md | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..79bdeabdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 53 (Locityper) no longer shows a pass at CYP2D6 and FCGR. The authors set their quality filter (no warning, a weighted distance of 30 or less, few unexplained reads) on HLA and KIR genes only, but `og locityper report` applied it as pass or fail at every locus, so a CYP2D6 or FCGR call could read as a green pass that nobody had measured. The `filter` column now reads `pass` or `fail` only at a locus whose name starts with `HLA-` or `KIR`; at any other locus it reads `uncalibrated`, and `reason` says what the rule alone gives there (`... by its rule alone it passes`, or `... it fails:` with the reasons). Both reports show `uncalibrated` in grey and count only `pass` rows as passing. The step's last line adds the count of uncalibrated loci. `docs/53-locityper.md` also says that the cut of 30 comes from Locityper 0.17.3, whose weighted distance was a minimizer Jaccard distance, while the 1.7.14 the step runs gives an edit distance. No column or file name changes; the `filter` column has one new value. A cargo test, `rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs`, checks all five shipped loci; 12 parity goldens of `locityper-report` record the new rows. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/53-locityper.md b/docs/53-locityper.md index b14b39899..f95bdbd4c 100644 --- a/docs/53-locityper.md +++ b/docs/53-locityper.md @@ -2,7 +2,7 @@ ## What This Does -Genotypes five of the hardest polymorphic regions of the genome with Locityper: HLA-DRB1, HLA-DQB1, the KIR cluster, CYP2D6 and FCGR. For each one it names the two haplotypes of a pangenome panel that best explain the sample's reads there, with a quality and a pass or fail filter. Opt-in. +Genotypes five of the hardest polymorphic regions of the genome with Locityper: HLA-DRB1, HLA-DQB1, the KIR cluster, CYP2D6 and FCGR. For each one it names the two haplotypes of a pangenome panel that best explain the sample's reads there, with a quality. At HLA-DRB1, HLA-DQB1 and KIR the call also gets the pass or fail filter of the authors' HLA and KIR benchmark; at CYP2D6 and FCGR that filter reads "uncalibrated". Opt-in. It is a second opinion. The report shows it beside the call of the step that owns the gene, never in its place. @@ -69,6 +69,10 @@ With `run-all.sh`: `TOOLS=...,locityper`. It is opt-in, so a run lists step 53 o The filter is the one the authors used for their HLA and KIR benchmark (Zenodo 15879519, README): a call passes with no Locityper warning, a weighted distance of 30 or less, and fewer than 1000 or fewer than 20% unexplained reads. A call whose result gives no read counts fails it, and its `total_reads` and `unexplained_reads` read `.`. The weighted distance is the edit distance from the call to the other likely genotypes, weighted by their probability: a high value means the reads fit very different genotypes about as well. +The authors set that filter on HLA and KIR genes only, so the `filter` column reads pass or fail only at a locus whose name starts with `HLA-` or `KIR` (HLA-DRB1, HLA-DQB1 and KIR here). At any other locus, CYP2D6 and FCGR here, it reads `uncalibrated`: nobody has measured what a pass means there, so the table never shows one. The `reason` column then says what the rule alone gives, for example `the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes`, or `... it fails:` with the reasons. A locus of your own list (`LOCITYPER_LOCI`) follows the same rule by its name. The reports count only `pass` rows as passing. + +At HLA and KIR the cut of 30 is also older than the distance it is applied to. The authors' results came from Locityper 0.17.3, where the weighted distance was a Jaccard distance between sets of minimizers (the Zenodo README). Locityper 1.7.0 changed the estimate, and the 1.7.14 this step runs gives it as an edit distance (`dist_type` `edit` in `res.json.gz`), from the alignments `locityper augment` writes. So a pass there is the authors' rule applied to a newer measure, not a result they benchmarked. + Locityper names haplotypes of panel people, such as `HG00733.1`, not alleles. The two callers are shown side by side and not compared: an allele name from T1K and a panel haplotype are not the same kind of answer. ## Output @@ -82,7 +86,7 @@ ${SAMPLE}/locityper/ └── gt/loci//res.json.gz ``` -Columns: `locus`, `region`, `status`, `genotype`, `haplotype_1`, `haplotype_2`, `quality` (Phred), `total_reads`, `unexplained_reads`, `weighted_distance`, `warnings`, `filter`, `reason`. +Columns: `locus`, `region`, `status`, `genotype`, `haplotype_1`, `haplotype_2`, `quality` (Phred), `total_reads`, `unexplained_reads`, `weighted_distance`, `warnings`, `filter` (`pass`, `fail`, `uncalibrated` outside HLA and KIR, or `.` when not called), `reason`. Both reports carry a section "Locityper Second Opinion at Hard Loci" in the medicines chapter: per locus Locityper's call with its filter, and the primary caller's call. From b8de02d6b5395ddc1d86159813933ad82e14211c Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:01:41 +0100 Subject: [PATCH 031/110] docs(ystr): say why the Y-STR panel follows FamilyTreeDNA's order The panel reproduces FamilyTreeDNA's Y-111 order, names and panels so a sample's counts line up with FamilyTreeDNA results. Its header now says that, says that no FamilyTreeDNA text is copied, and names FamilyTreeDNA as a trademark of Gene by Gene. Readers drop '#' lines, so no output changes. Bead: lic-18 Bead: D4 --- assets/ystr_panel.tsv | 3 +++ 1 file changed, 3 insertions(+) diff --git a/assets/ystr_panel.tsv b/assets/ystr_panel.tsv index f3afaca3a..22e8eb500 100644 --- a/assets/ystr_panel.tsv +++ b/assets/ystr_panel.tsv @@ -1,4 +1,7 @@ # Y-STR panel of step 45: the 111 markers of FamilyTreeDNA's Y-111 test, in FamilyTreeDNA's order. +# The order, the names and the panels are reproduced only so that counts line up with FamilyTreeDNA +# results and surname-project tables. No FamilyTreeDNA text is copied. FamilyTreeDNA is a trademark +# of Gene by Gene, Ltd., which does not endorse this table. # Sources, read 2026-10-25: # order, names and panels: FamilyTreeDNA Help Center, "Y-STR Results Guide", # https://help.familytreedna.com/hc/en-us/articles/4408063356303-Y-STR-Results-Guide From 710591d2eca6813110f5b40bc1cbb21b6675af86 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:02:00 +0100 Subject: [PATCH 032/110] fix(ystr): report Y-STR counts on the scale people compare against HipSTR's regions do not always cover the repeat blocks FamilyTreeDNA counts, so step 45 read DYS19 as 16 where FamilyTreeDNA reads 15 on the same DNA, DYS449 as 36 for 29 and Y-GATA-H4 as 31 for 11. The panel's offset column was empty. It now holds an offset for the 24 markers with a published counting rule: the GRCh38 sequence counted by NIST STRBase's repeat structure, plus ISOGG's FamilyTreeDNA-NIST conversion for Y-GATA-H4. A called marker without one says that its count is on the reference's scale. A high call also needs at least 70% of the reads that span the repeat to show the called length (HipSTR's MALLREADS). Before, high meant read quality only. The new og-reports test calls every region at the reference length and requires FamilyTreeDNA's count of the reference at each marker; it fails on main's panel (DYS19 16, not 15). The e2e case puts the reads' own count on the same scale, the HipSTR smoke row requires MALLREADS, and the parity goldens of five y-str-report cases take the new notes. Bead: lin-18 Bead: lin-19 Bead: lin-20 Bead: lin-21 --- CHANGELOG.md | 5 + assets/ystr_panel.tsv | 58 ++--- docs/45-y-str.md | 12 +- rust/crates/og-render/tests/ancestry_ystr.rs | 25 +- rust/crates/og-reports/src/ystr.rs | 107 ++++++++- .../og-reports/tests/i411_ystr_ftdna_scale.rs | 213 ++++++++++++++++++ tests/e2e/y-str-1.sh | 18 +- tests/parity/golden/y-str-report/calls/o.csv | 112 +++++++++ tests/parity/golden/y-str-report/calls/o.tsv | 112 +++++++++ tests/parity/golden/y-str-report/calls/stdout | 1 + .../golden/y-str-report/empty-log/o.csv | 112 +++++++++ .../golden/y-str-report/empty-log/o.tsv | 112 +++++++++ .../golden/y-str-report/empty-log/stdout | 1 + tests/parity/golden/y-str-report/log/o.csv | 112 +++++++++ tests/parity/golden/y-str-report/log/o.tsv | 112 +++++++++ tests/parity/golden/y-str-report/log/stdout | 1 + .../golden/y-str-report/plain-vcf/o.csv | 112 +++++++++ .../golden/y-str-report/plain-vcf/o.tsv | 112 +++++++++ .../golden/y-str-report/plain-vcf/stdout | 1 + .../golden/y-str-report/read-length-250/o.csv | 112 +++++++++ .../golden/y-str-report/read-length-250/o.tsv | 112 +++++++++ .../y-str-report/read-length-250/stdout | 1 + tests/smoke/hipstr.sh | 6 +- 23 files changed, 1518 insertions(+), 51 deletions(-) create mode 100644 rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs create mode 100644 tests/parity/golden/y-str-report/calls/o.csv create mode 100644 tests/parity/golden/y-str-report/calls/o.tsv create mode 100644 tests/parity/golden/y-str-report/calls/stdout create mode 100644 tests/parity/golden/y-str-report/empty-log/o.csv create mode 100644 tests/parity/golden/y-str-report/empty-log/o.tsv create mode 100644 tests/parity/golden/y-str-report/empty-log/stdout create mode 100644 tests/parity/golden/y-str-report/log/o.csv create mode 100644 tests/parity/golden/y-str-report/log/o.tsv create mode 100644 tests/parity/golden/y-str-report/log/stdout create mode 100644 tests/parity/golden/y-str-report/plain-vcf/o.csv create mode 100644 tests/parity/golden/y-str-report/plain-vcf/o.tsv create mode 100644 tests/parity/golden/y-str-report/plain-vcf/stdout create mode 100644 tests/parity/golden/y-str-report/read-length-250/o.csv create mode 100644 tests/parity/golden/y-str-report/read-length-250/o.tsv create mode 100644 tests/parity/golden/y-str-report/read-length-250/stdout diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..3c9c4e75b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 45's Y-STR counts are on FamilyTreeDNA's scale at the 24 markers with a published counting rule. The marker set's regions did not always cover the repeat blocks a lab counts, so DYS19 read 16 where FamilyTreeDNA reads 15 on the same DNA, DYS449 read 36 for 29 and Y-GATA-H4 31 for 11. `assets/ystr_panel.tsv` now carries each marker's offset, from the GRCh38 sequence counted by NIST STRBase's repeat structure, and `og y str-report` adds it. A called marker with no published rule says in its note that its count is on the reference's scale. + - `high` confidence now also needs at least 70% of the reads that span the repeat to show the called length (HipSTR's `MALLREADS`). Before, it meant read quality only: a call could be high while most reads showed another length. A record without `MALLREADS` is not high. + - The panel's header says that FamilyTreeDNA's order, names and panels are reproduced only for comparison, that no FamilyTreeDNA text is copied, and that FamilyTreeDNA is a trademark of Gene by Gene. + The columns of `y_str/_y_str.tsv` and `.csv` do not change; the `count` values and the `note` text do. + - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/assets/ystr_panel.tsv b/assets/ystr_panel.tsv index 22e8eb500..982ee547a 100644 --- a/assets/ystr_panel.tsv +++ b/assets/ystr_panel.tsv @@ -14,6 +14,10 @@ # sha256 d5b91757c7de756ada8a940cb5588e6f51aa79513ae6ce8cb4f1b9df63df9e61; the Y-STR marker set of # Willems et al. 2016 (PMID 27126583) and HipSTR (Willems et al. 2017, PMID 28436466) # motif: NIST STRBase repeat structure, https://strbase.nist.gov/api/loci (seqPattern) +# offset, read 2026-11-19: the GRCh38 chrY sequence of each marker with a motif (and DYS389I, the +# first block of DYS389II's motif) counted by that repeat structure, the convention FamilyTreeDNA +# follows for these markers; ISOGG's FamilyTreeDNA-NIST conversion, https://isogg.org/wiki/Y-STR +# (Y-GATA-H4: FamilyTreeDNA's count is NIST's minus one) # Columns: # order position in FamilyTreeDNA's list (1-111) # panel the smallest FamilyTreeDNA test that has the marker (Y-12, Y-25, Y-37, Y-67, Y-111) @@ -28,47 +32,49 @@ # absent no region for it in the HipSTR marker set, so it is not called # regions chrom:start-end/motif length/reference copies/HipSTR name, ';' between parts; '.' when none # motif STRBase repeat structure, '.' when STRBase has none -# offset whole repeats to add to reach FamilyTreeDNA's count; '.' when no published value was found -# (none was, for any marker, on 2026-10-25: see docs/45-y-str.md) +# offset whole repeats to add to reach FamilyTreeDNA's count: the reference's count on FamilyTreeDNA's +# scale minus the region's reference copies (each part rounded, halves up, summed); '.' when +# no published counting rule was found, and the count stays on the reference's scale +# (see docs/45-y-str.md) # note what the count covers, '.' for nothing to add order panel marker kind regions motif offset note -1 Y-12 DYS393 single chrY:3263111-3263158/4/12/DYS393 [AGAT]n . . -2 Y-12 DYS390 single chrY:15163067-15163162/4/24/DYS390 [TAGA]n CAGA [TAGA]n [CAGA]n . . -3 Y-12 DYS19 single chrY:9684380-9684443/4/16/DYS19/DYS394 [TCTA]n ccta [TCTA]n . . -4 Y-12 DYS391 single chrY:11982089-11982132/4/11/DYS391 [TCTA]n . . +1 Y-12 DYS393 single chrY:3263111-3263158/4/12/DYS393 [AGAT]n 0 . +2 Y-12 DYS390 single chrY:15163067-15163162/4/24/DYS390 [TAGA]n CAGA [TAGA]n [CAGA]n 0 . +3 Y-12 DYS19 single chrY:9684380-9684443/4/16/DYS19/DYS394 [TCTA]n ccta [TCTA]n -1 . +4 Y-12 DYS391 single chrY:11982089-11982132/4/11/DYS391 [TCTA]n 0 . 5 Y-12 DYS385a multicopy . [TTTC]n . . 6 Y-12 DYS385b multicopy . [TTTC]n . . 7 Y-12 DYS426 single chrY:17022970-17023005/3/12/DYS426 . . . 8 Y-12 DYS388 single chrY:12635604-12635639/3/12/DYS388 . . . 9 Y-12 DYS439 absent . [GATA]n . . -10 Y-12 DYS389I single chrY:12500448-12500495/4/12/DYS389I . . . -11 Y-12 DYS392 single chrY:20471987-20472025/3/13/DYS392 [ATA]n . . -12 Y-12 DYS389II span chrY:12500448-12500516/4/17.25/DYS389II.1;chrY:12500564-12500611/4/12/DYS389II.2 [TAGA]n [CAGA]n N48 [TAGA]n [CAGA]n . FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too -13 Y-25 DYS458 single chrY:7999839-7999902/4/16/DYS458 [GAAA]n . . +10 Y-12 DYS389I single chrY:12500448-12500495/4/12/DYS389I . 0 . +11 Y-12 DYS392 single chrY:20471987-20472025/3/13/DYS392 [ATA]n 0 . +12 Y-12 DYS389II span chrY:12500448-12500516/4/17.25/DYS389II.1;chrY:12500564-12500611/4/12/DYS389II.2 [TAGA]n [CAGA]n N48 [TAGA]n [CAGA]n 0 FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too +13 Y-25 DYS458 single chrY:7999839-7999902/4/16/DYS458 [GAAA]n 0 . 14 Y-25 DYS459a multicopy . . . . 15 Y-25 DYS459b multicopy . . . . 16 Y-25 DYS455 single chrY:7043528-7043571/4/11/DYS455 . . . 17 Y-25 DYS454 single chrY:8356115-8356158/4/11/DYS454 . . . 18 Y-25 DYS447 absent . . . . 19 Y-25 DYS437 absent . [TCTA]n [TCTG]n [TCTA]n . . -20 Y-25 DYS448 span chrY:22218923-22218996/6/12.3333/DYS448.1;chrY:22219031-22219078/6/8/DYS448.2 [AGAGAT]n [atagag]2 [agatag]3 [atag]2 agaa [AGAGAT]n . . -21 Y-25 DYS449 parts chrY:8349973-8350033/4/15.25/DYS449.1;chrY:8350056-8350139/4/21/DYS449.2 [TTCT]n N22 [TTCT]n N12 [TTCT]n . . +20 Y-25 DYS448 span chrY:22218923-22218996/6/12.3333/DYS448.1;chrY:22219031-22219078/6/8/DYS448.2 [AGAGAT]n [atagag]2 [agatag]3 [atag]2 agaa [AGAGAT]n -1 . +21 Y-25 DYS449 parts chrY:8349973-8350033/4/15.25/DYS449.1;chrY:8350056-8350139/4/21/DYS449.2 [TTCT]n N22 [TTCT]n N12 [TTCT]n -7 . 22 Y-25 DYS464a multicopy . . . . 23 Y-25 DYS464b multicopy . . . . 24 Y-25 DYS464c multicopy . . . . 25 Y-25 DYS464d multicopy . . . . -26 Y-37 DYS460 single chrY:18888954-18888993/4/10/DYS460 [CTAT]n . . -27 Y-37 Y-GATA-H4 single chrY:16631635-16631756/4/30.5/Y-GATA-H4 [TCTA]n . . +26 Y-37 DYS460 single chrY:18888954-18888993/4/10/DYS460 [CTAT]n 0 . +27 Y-37 Y-GATA-H4 single chrY:16631635-16631756/4/30.5/Y-GATA-H4 [TCTA]n -20 . 28 Y-37 YCAIIa multicopy . . . . 29 Y-37 YCAIIb multicopy . . . . -30 Y-37 DYS456 single chrY:4402919-4402978/4/15/DYS456 [AGAT]n . . +30 Y-37 DYS456 single chrY:4402919-4402978/4/15/DYS456 [AGAT]n 0 . 31 Y-37 DYS607 single chrY:16302502-16302577/4/19/DYS607 . . . -32 Y-37 DYS576 single chrY:7185318-7185385/4/17/DYS576 [AAAG]n . . -33 Y-37 DYS570 single chrY:6993190-6993257/4/17/DYS570 [TTTC]n . . +32 Y-37 DYS576 single chrY:7185318-7185385/4/17/DYS576 [AAAG]n 0 . +33 Y-37 DYS570 single chrY:6993190-6993257/4/17/DYS570 [TTTC]n 0 . 34 Y-37 CDYa multicopy . . . . 35 Y-37 CDYb multicopy . . . . 36 Y-37 DYS442 single chrY:12649170-12649229/4/15/DYS442 . . . -37 Y-37 DYS438 single chrY:12825899-12825948/5/10/DYS438 [TTTTC]n . . +37 Y-37 DYS438 single chrY:12825899-12825948/5/10/DYS438 [TTTTC]n 2 . 38 Y-67 DYS531 single chrY:8598154-8598197/4/11/DYS531 . . . 39 Y-67 DYS578 single chrY:20400678-20400713/4/9/DYS578 . . . 40 Y-67 DYF395S1a multicopy . . . . @@ -89,7 +95,7 @@ order panel marker kind regions motif offset note 55 Y-67 DYS534 single chrY:16281076-16281155/4/20/DYS534 . . . 56 Y-67 DYS450 span chrY:8258259-8258303/5/9/DYS450.1;chrY:8258317-8258341/5/5/DYS450.2 . . . 57 Y-67 DYS444 single chrY:17114310-17114365/4/14/DYS444 . . . -58 Y-67 DYS481 single chrY:8558337-8558402/3/22/DYS481 [CTT]n . . +58 Y-67 DYS481 single chrY:8558337-8558402/3/22/DYS481 [CTT]n 0 . 59 Y-67 DYS520 single chrY:7862390-7862473/4/21/DYS520 . . . 60 Y-67 DYS446 single chrY:3263417-3263486/5/14/DYS446 . . . 61 Y-67 DYS617 single chrY:16969638-16969673/3/12/DYS617 . . . @@ -107,13 +113,13 @@ order panel marker kind regions motif offset note 73 Y-111 DYS714 single chrY:19985849-19985978/5/26/DYS714 . . . 74 Y-111 DYS716 absent . . . . 75 Y-111 DYS717 single chrY:15201365-15201444/5/16/DYS717 . . . -76 Y-111 DYS505 single chrY:3772790-3772837/4/12/DYS505 [TCCT]n . . +76 Y-111 DYS505 single chrY:3772790-3772837/4/12/DYS505 [TCCT]n 0 . 77 Y-111 DYS556 single chrY:20439570-20439613/4/11/DYS556 . . . -78 Y-111 DYS549 single chrY:19358338-19358389/4/13/DYS549 [GATA]n . . +78 Y-111 DYS549 single chrY:19358338-19358389/4/13/DYS549 [GATA]n 0 . 79 Y-111 DYS589 single chrY:22339546-22339610/5/13/DYS589 . . . -80 Y-111 DYS522 single chrY:7547584-7547623/4/10/DYS522 [ATAG]n . . +80 Y-111 DYS522 single chrY:7547584-7547623/4/10/DYS522 [ATAG]n 0 . 81 Y-111 DYS494 single chrY:19224282-19224311/3/10/DYS494 . . . -82 Y-111 DYS533 single chrY:16281349-16281396/4/12/DYS533 [TATC]n . . +82 Y-111 DYS533 single chrY:16281349-16281396/4/12/DYS533 [TATC]n 0 . 83 Y-111 DYS636 single chrY:20472971-20473014/4/11/DYS636 . . . 84 Y-111 DYS575 single chrY:7568216-7568255/4/10/DYS575 . . . 85 Y-111 DYS638 single chrY:15533611-15533654/4/11/DYS638 . . . @@ -135,11 +141,11 @@ order panel marker kind regions motif offset note 101 Y-111 DYS561 single chrY:14452471-14452528/4/14.5/DYS561 . . . 102 Y-111 DYS552 parts chrY:11981554-11981613/4/15/DYS552.1;chrY:11981654-11981689/4/9/DYS552.2 . . . 103 Y-111 DYS726 absent . . . . -104 Y-111 DYS635 single chrY:12258860-12258951/4/23/DYS635 [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n . . +104 Y-111 DYS635 single chrY:12258860-12258951/4/23/DYS635 [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n [TACA]n [TAGA]n 0 . 105 Y-111 DYS587 single chrY:15916828-15916912/5/17/DYS587 . . . -106 Y-111 DYS643 single chrY:15314132-15314186/5/11/DYS643 [CTTTT]n . . +106 Y-111 DYS643 single chrY:15314132-15314186/5/11/DYS643 [CTTTT]n 0 . 107 Y-111 DYS497 single chrY:16053588-16053629/3/14/DYS497 . . . 108 Y-111 DYS510 span chrY:15188021-15188088/4/17/DYS510.1;chrY:15188102-15188119/4/4.5/DYS510.2;chrY:15188127-15188138/4/3/DYS510.3 . . . 109 Y-111 DYS434 single chrY:12345804-12345839/4/9/DYS434 . . . -110 Y-111 DYS461 single chrY:18888808-18888851/4/11/DYS461 [TCTG]n [TCTA]n . . +110 Y-111 DYS461 single chrY:18888808-18888851/4/11/DYS461 [TCTG]n [TCTA]n 1 . 111 Y-111 DYS435 single chrY:12384503-12384538/4/9/DYS435 . . . diff --git a/docs/45-y-str.md b/docs/45-y-str.md index d574588a0..e23321842 100644 --- a/docs/45-y-str.md +++ b/docs/45-y-str.md @@ -26,6 +26,9 @@ Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. - **Order, names and panels**: FamilyTreeDNA's "Y-STR Results Guide" (https://help.familytreedna.com/hc/en-us/articles/4408063356303-Y-STR-Results-Guide), read on 2026-10-25 through the Internet Archive copy of 2026-04-13, because the live page refuses scripted requests. - **Regions** (GRCh38, the motif length and the reference copies): the Y-STR set HipSTR's authors annotated, `human/all_annot_markers.hg38.fixed.bed` of HipSTR-references at a fixed commit (MIT licence). Some markers are several regions there (DYS389II, DYS448, DYS449, DYS450, DYS504, DYS510, DYS532, DYS552); the table keeps those parts as the source gives them. - **Motif**: NIST STRBase's repeat structure, where it has one. +- **Offset** (read 2026-11-19): how many repeats to add to reach FamilyTreeDNA's count. For the 23 markers with a motif, and for DYS389I (the first block of DYS389II's motif), the GRCh38 sequence was counted by that repeat structure, which FamilyTreeDNA follows for these markers. For Y-GATA-H4, ISOGG's conversion table (https://isogg.org/wiki/Y-STR) says FamilyTreeDNA's count is NIST's minus one. The offset is that count minus the region's reference copies. The other markers have no published counting rule, so their offset is empty. + +FamilyTreeDNA is a trademark of Gene by Gene, Ltd. The table reproduces the order, names and panels only so that counts line up with FamilyTreeDNA results and surname-project tables. It copies no FamilyTreeDNA text, and its header says so. The 111 markers fall into four kinds: @@ -80,13 +83,13 @@ HipSTR --bams --fasta --regions regions.bed --str-vcf | `y_str/${SAMPLE}_y_str.vcf.gz` | HipSTR's calls | | `y_str/${SAMPLE}_y_str.log` | HipSTR's log: why it skipped a region | -How a count is made: HipSTR gives, per region, how many base pairs the call differs from the reference allele. The count is the region's reference copies (rounded to whole repeats, halves up) plus that difference divided by the motif length. Base pairs left over are written after a dot, the usual notation of a partial repeat (`11.2`: eleven repeats and two bases). +How a count is made: HipSTR gives, per region, how many base pairs the call differs from the reference allele. The count is the region's reference copies (rounded to whole repeats, halves up) plus that difference divided by the motif length, plus the marker's offset. Base pairs left over are written after a dot, the usual notation of a partial repeat (`11.2`: eleven repeats and two bases). A called marker with no offset says in its note that its count is on the reference's scale, not FamilyTreeDNA's. Confidence: | Value | Meaning | |---|---| -| `high` | HipSTR's own haploid filters pass (posterior at least 0.9, at most 15% of the reads with a stutter artifact and at most 15% with an indel in the flanks), and at least 10 reads were used | +| `high` | HipSTR's own haploid filters pass (posterior at least 0.9, at most 15% of the reads with a stutter artifact and at most 15% with an indel in the flanks), at least 10 reads were used, and at least 70% of the reads that span the repeat show the called length (HipSTR's `MALLREADS`, each read's most likely length). The read quality alone does not make a call high: the reads must also agree on the length | | `low` | a call that fails one of those; the note says which | | `no call` | HipSTR wrote no genotype for the marker or for one of its parts. When it wrote no record at all, the note quotes the reason from HipSTR's log, such as `Skipping locus with too few reads`, or `Aborting genotyping of the locus as the sequence downstream of the repeat is too repetitive for accurate genotyping` when the bases beside the repeat are themselves repetitive | | `not callable` | multi-copy, no region, or a repeat longer than 150 bp reads can span with 10 bases on each side (DYS452, 155 bp in the reference, and the DYS389II and DYS448 spans) | @@ -95,7 +98,8 @@ Both reports get a Y-STR section: the number of markers per confidence and every ## Comparing with FamilyTreeDNA -- **A count can differ from FamilyTreeDNA's by a fixed number of repeats.** Labs do not all count the same repeat blocks of a marker, and the region edges of the marker set are not always the edges a lab counts. FamilyTreeDNA does not publish its conventions marker by marker, and we found no published table of the offsets between these regions and FamilyTreeDNA's counts (searched 2026-10-25), so the table's `offset` column is empty and no count is adjusted. A difference that is the same for every man of a project is a convention, not a mutation. The safe comparison is with a relative or project member who also has a genome, or with one known FamilyTreeDNA result of the same man. +- **24 markers are on FamilyTreeDNA's scale.** The marker set's regions do not always cover the blocks a lab counts. At DYS19 the region holds 16 repeat units, but FamilyTreeDNA does not count the `CCTA` unit in it, so the GRCh38 reference reads 15. At DYS449 the two parts hold 36 units, and FamilyTreeDNA counts only the two `TTTC` blocks, 15 and 14, so the reference reads 29. The offsets in the table move every one of the 24 markers with a published counting rule onto FamilyTreeDNA's scale: DYS19 -1, DYS448 -1, DYS449 -7, Y-GATA-H4 -20, DYS438 +2 (two repeat units lie just before the region) and DYS461 +1; the other 18 need no change. `og-reports`' test `i411_ystr_ftdna_scale` checks that the reference reads FamilyTreeDNA's count at each of them. +- **The other called markers are on the reference's scale, and their note says so.** No published rule says which blocks FamilyTreeDNA counts there, so a count can differ from FamilyTreeDNA's by a fixed number of repeats. A difference that is the same for every man of a project is a convention, not a mutation. The safe comparison is with a relative or project member who also has a genome, or with one known FamilyTreeDNA result of the same man. - FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II (its guide says so). The DYS389II span here starts where DYS389I starts, so its count would cover both too. At 164 bp it is longer than 150 bp reads can span, so from such reads DYS389II is not callable; DYS389I is. - FamilyTreeDNA lists DYS385, DYS459, DYS464, YCAII, CDY, DYF395S1 and DYS413 as two or four values; those are the not callable rows here. @@ -107,4 +111,4 @@ Seconds to a few minutes: HipSTR reads 86 short regions of chrY. - Short reads at 30x put about 15 reads on each Y region (one copy). A repeat near the read length gets fewer reads that span it, so its call is `low` or `no call` more often. - HipSTR is built for Illumina short reads; long-read BAMs are not tested here. -- The e2e case reads HG002's reads at every region from GIAB's 60x BAM, checks each high call, the span markers included, against a count made from the reads themselves, keeps HipSTR's log with the case logs, and checks the step against the Nextflow process on the fixture's own BAM. +- The e2e case reads HG002's reads at every region from GIAB's 60x BAM, checks each high call, the span markers included, against a count made from the reads themselves plus the panel's offset, keeps HipSTR's log with the case logs, and checks the step against the Nextflow process on the fixture's own BAM. diff --git a/rust/crates/og-render/tests/ancestry_ystr.rs b/rust/crates/og-render/tests/ancestry_ystr.rs index 8fb6e3d0d..8b26ae7e7 100644 --- a/rust/crates/og-render/tests/ancestry_ystr.rs +++ b/rust/crates/og-render/tests/ancestry_ystr.rs @@ -158,7 +158,7 @@ fn read_panel(path: &str) -> Vec { .collect() } -const FORMAT: &str = "GT:GB:Q:PQ:DP:DSNP:PSNP:PDP:GLDIFF:DSTUTTER:DFLANKINDEL"; +const FORMAT: &str = "GT:GB:Q:PQ:DP:DSNP:PSNP:PDP:GLDIFF:DSTUTTER:DFLANKINDEL:MALLREADS"; /// One HipSTR call: GT, GB, Q, DP, DSTUTTER, DFLANKINDEL. type Call = [&'static str; 6]; @@ -177,7 +177,7 @@ fn good(gb: &'static str) -> Call { } /// A HipSTR VCF with these records (by HipSTR region name), each written at -/// its region's start. +/// its region's start; every read shows the called length (MALLREADS). fn vcf(d: &Path, records: &[(&str, Call)], samples: &[&str]) -> PathBuf { let panel = read_panel(&panel_path()); let mut lines = vec![ @@ -195,7 +195,12 @@ fn vcf(d: &Path, records: &[(&str, Call)], samples: &[&str]) -> PathBuf { .find(|x| x.5 == *name) .map(|x| (x.0.clone(), x.1)) .unwrap_or_else(|| panic!("no panel region is named {name}")); - let cell = format!("{gt}:{gb}:{q}:{q}:{dp}:0:0|0:{dp}|0:.:{st}:{fl}"); + let all = if *gb == "." { + ".".to_owned() + } else { + format!("{gb}|{dp}") + }; + let cell = format!("{gt}:{gb}:{q}:{q}:{dp}:0:0|0:{dp}|0:.:{st}:{fl}:{all}"); let mut row = vec![ c, (s - 1).to_string(), @@ -492,7 +497,11 @@ fn counts_are_reference_copies_plus_the_length_difference() { ("DYS19/DYS394", GOOD), ], ); - assert_eq!(cell(&o, "DYS19", "count"), "16", "a reference call"); + assert_eq!( + cell(&o, "DYS19", "count"), + "15", + "a reference call, on FamilyTreeDNA's scale (16 copies, offset -1)" + ); assert_eq!(cell(&o, "DYS393", "count"), "13", "GB +4 at a 4-base motif"); assert_eq!(cell(&o, "DYS390", "count"), "22", "GB -8"); assert_eq!(cell(&o, "DYS391", "count"), "11.2", "a partial repeat"); @@ -501,7 +510,11 @@ fn counts_are_reference_copies_plus_the_length_difference() { "12.2", "GB -1 at a 3-base motif" ); - assert_eq!(cell(&o, "DYS449", "count"), "36", "the sum of its parts"); + assert_eq!( + cell(&o, "DYS449", "count"), + "29", + "the sum of its parts (15 + 21 copies) plus its offset -7" + ); assert_eq!( cell(&o, "DYS510", "count"), "26", @@ -513,7 +526,7 @@ fn counts_are_reference_copies_plus_the_length_difference() { cell(&o, "DYS510", "reads"), cell(&o, "DYS510", "note") ], - ["high", "20", "."] + ["high", "20", og_reports::ystr::REFERENCE_SCALE] ); for (m, bp) in [("DYS389II", 164), ("DYS448", 156)] { assert_eq!(cell(&o, m, "confidence"), "not callable", "{m}"); diff --git a/rust/crates/og-reports/src/ystr.rs b/rust/crates/og-reports/src/ystr.rs index 1f47390ed..7d25a96d5 100644 --- a/rust/crates/og-reports/src/ystr.rs +++ b/rust/crates/og-reports/src/ystr.rs @@ -18,9 +18,17 @@ //! reference copies (halves rounded up) plus GB / motif length, by floor //! division, so GB -2 on 11 copies of a 4 bp motif is `10.2` (ten repeats //! and two bases). Parts are summed; a span marker is one region; the -//! panel's offset is added last. Confidence: high (HipSTR's haploid filters -//! pass and 10 reads or more), low (the note says which filter failed), no -//! call, not callable. +//! panel's offset is added last, which puts the count on FamilyTreeDNA's +//! scale. A marker with no offset keeps the reference's scale, and its note +//! says so. Confidence: high (HipSTR's haploid filters pass, 10 reads or +//! more, and at least 70% of the reads show the called length), low (the +//! note says which test failed), no call, not callable. +//! +//! The read support comes from MALLREADS, HipSTR's most likely length per +//! read. HipSTR's own filters allow 15% of the reads with stutter and 15% +//! with a flank indel, so a clean call has at least 70% of its reads at the +//! called length. A call whose record has no MALLREADS is not high: nothing +//! shows that its reads agree. //! //! What changes on purpose: a motif length under 1, reference copies that //! are negative or not finite, and an order that is not a whole number are @@ -38,6 +46,11 @@ const MIN_Q: f64 = 0.9; const MAX_STUTTER: f64 = 0.15; const MAX_FLANK: f64 = 0.15; const FLANK: i128 = 10; +/// The share of reads that must show the called length for a high call. +const MIN_SUPPORT: f64 = 0.7; +/// The note of a count with no offset to FamilyTreeDNA's scale. +pub const REFERENCE_SCALE: &str = + "on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker"; pub const TSV_COLUMNS: [&str; 10] = [ "order", @@ -390,6 +403,16 @@ fn part_call(fmt: &HashMap) -> Result { if dp < MIN_READS { problems.push(format!("{dp} reads, fewer than {MIN_READS}")); } + match read_support(get("MALLREADS"), bp) { + None => { + problems.push("no per-read lengths (MALLREADS) to show that the reads agree".to_owned()) + } + Some((at, all)) if (at as f64) < MIN_SUPPORT * all as f64 => problems.push(format!( + "{at} of {all} reads show the called length, fewer than {}%", + (MIN_SUPPORT * 100.0).round() + )), + Some(_) => {} + } Ok(PartCall { bp, dp, @@ -400,6 +423,24 @@ fn part_call(fmt: &HashMap) -> Result { }) } +/// MALLREADS (`bp|reads;bp|reads`): the reads at length `bp` and all the +/// reads; `None` when the field is missing, empty or unreadable. +fn read_support(field: Option<&str>, bp: i128) -> Option<(i128, i128)> { + let (mut at, mut all) = (0i128, 0i128); + for item in field?.split(';') { + let (len, n) = item.split_once('|')?; + let (len, n) = (crate::int(len)?, crate::int(n)?); + if n < 0 { + return None; + } + all += n; + if len == bp { + at += n; + } + } + (all > 0).then_some((at, all)) +} + /// Python's `divmod` on ints: the quotient rounded down. fn divmod(a: i128, b: i128) -> (i128, i128) { let (mut q, mut r) = (a / b, a % b); @@ -535,6 +576,10 @@ pub fn marker_row( ); } row[3] = count_text(ref_sum, bp_sum, period, m.offset); + let mut notes = notes; + if m.offset.is_none() { + notes.push(REFERENCE_SCALE.to_owned()); + } row[4] = if problems.is_empty() { "high" } else { "low" }.into(); row[5] = dps.iter().min().map_or(String::new(), ToString::to_string); row[6] = sts.iter().max().map_or(String::new(), ToString::to_string); @@ -675,30 +720,74 @@ mod tests { #[test] fn part_calls() { let f = |s: &str| -> HashMap { - s.split(';') + s.split(',') .map(|kv| { let (k, v) = kv.split_once('=').unwrap(); (k.into(), v.into()) }) .collect() }; - let p = part_call(&f("GT=1;GB=-4;Q=0.95;DP=30;DSTUTTER=6;DFLANKINDEL=0")).unwrap(); + let p = part_call(&f( + "GT=1,GB=-4,Q=0.95,DP=30,DSTUTTER=6,DFLANKINDEL=0,MALLREADS=-4|24;0|6", + )) + .unwrap(); assert_eq!(p.problems, ["6 of 30 reads with stutter"]); - let p = part_call(&f("GT=1;GB=0;Q=0.5;DP=5;DSTUTTER=0;DFLANKINDEL=0")).unwrap(); + let p = part_call(&f( + "GT=1,GB=0,Q=0.5,DP=5,DSTUTTER=0,DFLANKINDEL=0,MALLREADS=0|5", + )) + .unwrap(); assert_eq!( p.problems, ["posterior 0.5 below 0.9", "5 reads, fewer than 10"] ); + let clean = "GT=1,GB=4,Q=0.99,DP=20,DSTUTTER=0,DFLANKINDEL=0"; + assert!( + part_call(&f(&format!("{clean},MALLREADS=4|14;0|6"))) + .unwrap() + .problems + .is_empty() + ); assert_eq!( - part_call(&f("GT=.;GB=.;FILTER=LowQ")).err().unwrap(), + part_call(&f("GT=.,GB=.,FILTER=LowQ")).err().unwrap(), "HipSTR made no genotype (LowQ)" ); assert_eq!( - part_call(&f("GT=0/1;GB=0/4")).err().unwrap(), + part_call(&f("GT=0/1,GB=0/4")).err().unwrap(), "two lengths on the Y chromosome (GB 0/4)" ); - assert_eq!(part_call(&f("GT=0;GB=x")).err().unwrap(), "unreadable GB x"); + assert_eq!(part_call(&f("GT=0,GB=x")).err().unwrap(), "unreadable GB x"); assert!(py_min(&[f64::NAN, 0.5]).is_nan()); + } + + /// Red first: every read-quality filter passes, yet most reads show + /// another length, so the call is not high. + #[test] + fn red_first_read_quality_alone_is_not_high() { + let f = |s: &str| -> HashMap { + s.split(',') + .map(|kv| { + let (k, v) = kv.split_once('=').unwrap(); + (k.into(), v.into()) + }) + .collect() + }; + let clean = "GT=1,GB=4,Q=0.99,DP=20,DSTUTTER=0,DFLANKINDEL=0"; + assert_eq!( + part_call(&f(&format!("{clean},MALLREADS=4|13;0|7"))) + .unwrap() + .problems, + ["13 of 20 reads show the called length, fewer than 70%"] + ); + assert_eq!( + part_call(&f(clean)).unwrap().problems, + ["no per-read lengths (MALLREADS) to show that the reads agree"] + ); + assert_eq!(read_support(Some("4|14;0|6"), 4), Some((14, 20))); + assert_eq!(read_support(Some("-4|3;0|15"), 0), Some((15, 18))); + assert_eq!(read_support(Some("."), 0), None); + assert_eq!(read_support(Some("0|0"), 0), None); + assert_eq!(read_support(Some("0|-1;4|5"), 4), None); + assert_eq!(read_support(None, 0), None); assert_eq!(py_min(&[0.5, f64::NAN]), 0.5); } } diff --git a/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs b/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs new file mode 100644 index 000000000..69b00f11c --- /dev/null +++ b/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs @@ -0,0 +1,213 @@ +//! Step 45's counts are on FamilyTreeDNA's scale where a published counting +//! rule exists. +//! +//! A HipSTR VCF that calls every region of `assets/ystr_panel.tsv` at the +//! reference length (GB 0, every read at that length) is the GRCh38 +//! reference itself, so `og y str-report` must give the reference's +//! FamilyTreeDNA counts. `REFERENCE` holds them: the GRCh38 chrY sequence of +//! each marker counted by its NIST STRBase repeat structure (the panel's +//! motif column), which FamilyTreeDNA follows for these markers, and for +//! Y-GATA-H4 ISOGG's FamilyTreeDNA-NIST conversion (one less than NIST). +//! For example DYS19 is `[TCTA]12 CCTA [TCTA]3` there: FamilyTreeDNA counts +//! the TCTA blocks, 15, while HipSTR's region holds 16 repeat units. DYS449 +//! is `[TTTC]15 N50 [TTTC]14`, 29, while HipSTR's two parts hold 36 units. +//! +//! The reads are 250 bp long here, so DYS389II and DYS448 (over 150 bp) are +//! counted too. + +use og_reports::y::cli; +use std::collections::BTreeMap; +use std::path::{Path, PathBuf}; + +/// Marker, FamilyTreeDNA count of the GRCh38 reference. +const REFERENCE: [(&str, &str); 24] = [ + ("DYS393", "12"), + ("DYS390", "24"), + ("DYS19", "15"), + ("DYS391", "11"), + ("DYS389I", "12"), + ("DYS392", "13"), + ("DYS389II", "29"), + ("DYS458", "16"), + ("DYS448", "19"), + ("DYS449", "29"), + ("DYS460", "10"), + ("Y-GATA-H4", "11"), + ("DYS456", "15"), + ("DYS576", "17"), + ("DYS570", "17"), + ("DYS438", "12"), + ("DYS481", "22"), + ("DYS505", "12"), + ("DYS549", "13"), + ("DYS522", "10"), + ("DYS533", "12"), + ("DYS635", "23"), + ("DYS643", "11"), + ("DYS461", "12"), +]; + +fn panel() -> String { + Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../../../assets/ystr_panel.tsv") + .display() + .to_string() +} + +/// A scratch folder, removed when the test ends. +struct Tmp(PathBuf); + +impl Drop for Tmp { + fn drop(&mut self) { + let _ = std::fs::remove_dir_all(&self.0); + } +} + +fn tmp(tag: &str) -> Tmp { + let nanos = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_nanos(); + let d = std::env::temp_dir().join(format!("og-i411-ystr-{tag}-{}-{nanos}", std::process::id())); + std::fs::create_dir(&d).unwrap(); + Tmp(d) +} + +fn og(verb: &str, args: &[String]) -> (u8, String) { + let (mut out, mut err) = (Vec::new(), Vec::new()); + let code = cli(Some(verb), args, &mut out, &mut err); + (code, String::from_utf8(err).unwrap()) +} + +/// Every region of the panel called with this GB, from 20 reads that all +/// show it, then the table by marker: the count, the confidence and the note. +fn reference_table(d: &Path, gb: &str) -> BTreeMap { + let s = |p: &Path| p.display().to_string(); + let bed = d.join("regions.bed"); + let (code, err) = og( + "str-bed", + &["--panel".into(), panel(), "--out".into(), s(&bed)], + ); + assert_eq!(code, 0, "{err}"); + let mut vcf = String::from( + "##fileformat=VCFv4.1\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS1\n", + ); + for l in std::fs::read_to_string(&bed).unwrap().lines() { + let c: Vec<&str> = l.split('\t').collect(); + let pos: i64 = c[1].parse().unwrap(); + vcf += &format!( + "{}\t{}\t{}\tA\t.\t.\tPASS\tPERIOD={}\tGT:GB:Q:DP:DSTUTTER:DFLANKINDEL:MALLREADS\t0:{gb}:0.99:20:0:0:{gb}|20\n", + c[0], + pos - 1, + c[5], + c[3] + ); + } + let v = d.join("calls.vcf"); + std::fs::write(&v, vcf).unwrap(); + let (tsv, csv) = (d.join("o.tsv"), d.join("o.csv")); + let (code, err) = og( + "str-report", + &[ + "--panel".into(), + panel(), + "--vcf".into(), + s(&v), + "--tsv".into(), + s(&tsv), + "--csv".into(), + s(&csv), + "--read-length".into(), + "250".into(), + ], + ); + assert_eq!(code, 0, "{err}"); + let text = std::fs::read_to_string(&tsv).unwrap(); + text.lines() + .skip(1) + .map(|l| { + let c: Vec<&str> = l.split('\t').collect(); + (c[2].to_owned(), [c[3].into(), c[4].into(), c[9].into()]) + }) + .collect() +} + +/// The panel rows: marker and offset cell. +fn offsets() -> Vec<(String, String)> { + std::fs::read_to_string(panel()) + .unwrap() + .lines() + .filter(|l| !l.starts_with('#') && !l.starts_with("order\t")) + .map(|l| { + let c: Vec<&str> = l.split('\t').collect(); + (c[2].to_owned(), c[6].to_owned()) + }) + .collect() +} + +/// Red first: before the offsets, DYS19 read 16 and DYS449 36. +#[test] +fn the_reference_reads_familytreedna_s_counts() { + let d = tmp("ref"); + let t = reference_table(&d.0, "0"); + for (m, want) in REFERENCE { + assert_eq!( + [t[m][0].as_str(), t[m][1].as_str()], + [want, "high"], + "{m}: the GRCh38 reference on FamilyTreeDNA's scale" + ); + } + for (m, _) in REFERENCE { + assert!( + !t[m][2].contains(og_reports::ystr::REFERENCE_SCALE), + "{m}: a count on FamilyTreeDNA's scale does not say otherwise" + ); + } +} + +/// An offset no published count backs is a guess: every marker with one is +/// in `REFERENCE`, and every called marker without one says that its count +/// is on the reference's scale. +#[test] +fn every_offset_is_checked_and_every_other_count_says_its_scale() { + let checked: Vec<&str> = REFERENCE.iter().map(|(m, _)| *m).collect(); + let rows = offsets(); + let with: Vec<&str> = rows + .iter() + .filter(|(_, o)| o != ".") + .map(|(m, _)| m.as_str()) + .collect(); + let mut a = with.clone(); + let mut b = checked.clone(); + a.sort_unstable(); + b.sort_unstable(); + assert_eq!(a, b, "the markers with an offset are the checked ones"); + + let d = tmp("scale"); + let t = reference_table(&d.0, "0"); + for (m, o) in &rows { + let [count, conf, note] = &t[m]; + if conf == "not callable" { + continue; + } + assert!(!count.is_empty(), "{m}: called"); + assert_eq!( + o == ".", + note.contains(og_reports::ystr::REFERENCE_SCALE), + "{m}: offset {o}, note {note}" + ); + } +} + +/// A change in the reads moves the count from the reference's FamilyTreeDNA +/// count: one repeat more at every 4-base marker. +#[test] +fn a_change_counts_from_the_familytreedna_reference() { + let d = tmp("plus"); + let t = reference_table(&d.0, "4"); + assert_eq!(t["DYS19"][0], "16"); + assert_eq!(t["DYS393"][0], "13"); + assert_eq!(t["Y-GATA-H4"][0], "12"); + // DYS449's two parts each gain a repeat: 29 + 2. + assert_eq!(t["DYS449"][0], "31"); +} diff --git a/tests/e2e/y-str-1.sh b/tests/e2e/y-str-1.sh index 9e6250825..e0f918174 100755 --- a/tests/e2e/y-str-1.sh +++ b/tests/e2e/y-str-1.sh @@ -14,9 +14,11 @@ # - an independent count from the reads: for every high call, the length of # the repeat in the reads that span it with 10 bases on each side # (reference length plus the CIGAR's insertions minus its deletions there -# or in those 10 bases, where an aligner can left-align a repeat's indel) -# gives the same count in at least 90% of the markers, and in every span -# marker (one region over close-set parts) called high; +# or in those 10 bases, where an aligner can left-align a repeat's indel), +# plus the panel's offset to FamilyTreeDNA's scale, gives the same count +# in at least 90% of the markers, and in every span marker (one region +# over close-set parts) called high; without the offsets the counts +# differ at the markers that have one (HG002: DYS438, DYS461, Y-GATA-H4); # - a planted change: the same reads with four bases (one AGAT repeat) cut # out of DYS393 in every read that spans it give DYS393 one repeat fewer, # and leave the other called markers as they were; @@ -133,7 +135,15 @@ check_eq "DYS393 is called high" "$(col "$H" DYS393 confidence)" high # length gives the count with the same rounding as the step (reference copies # rounded half up, plus the length change in whole and partial repeats). dk "$SAMTOOLS_IMAGE" samtools view -q 20 -F 0xF04 "${T}/win.bam" > "${T}/win.sam" -"${REPO}/bin/og" dev fixture ystr-readcount "$PANEL" "$OUT" "${T}/win.sam" > "${T}/readcount.tsv" +"${REPO}/bin/og" dev fixture ystr-readcount "$PANEL" "$OUT" "${T}/win.sam" > "${T}/readcount.raw.tsv" +# The reads' count is on the reference's scale; the panel's offset puts it on +# FamilyTreeDNA's, as the step does ('.' is no offset). +awk -F'\t' -v OFS='\t' ' + NR == FNR { if ($0 !~ /^#/ && $1 != "order") off[$3] = ($7 == "." ? 0 : $7); next } + { n = split($3, p, "."); $3 = (p[1] + off[$1]) (n > 1 ? "." p[2] : ""); print }' \ + "$PANEL" "${T}/readcount.raw.tsv" > "${T}/readcount.tsv" +check_ge "control: without the panel's offsets the reads' count differs where one applies" \ + "$(awk -F'\t' '$2 != $3' "${T}/readcount.raw.tsv" | wc -l | tr -d ' ')" 1 N_CMP=$(grep -c . "${T}/readcount.tsv" || true) N_SAME=$(awk -F'\t' '$2 == $3' "${T}/readcount.tsv" | wc -l | tr -d ' ') awk -F'\t' '$2 != $3 {print " differs: " $0}' "${T}/readcount.tsv" diff --git a/tests/parity/golden/y-str-report/calls/o.csv b/tests/parity/golden/y-str-report/calls/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/calls/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/calls/o.tsv b/tests/parity/golden/y-str-report/calls/o.tsv new file mode 100644 index 000000000..cd7cab69d --- /dev/null +++ b/tests/parity/golden/y-str-report/calls/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460; see HipSTR's log +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4; see HipSTR's log +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456; see HipSTR's log +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607; see HipSTR's log +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576; see HipSTR's log +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570; see HipSTR's log +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442; see HipSTR's log +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438; see HipSTR's log +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531; see HipSTR's log +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578; see HipSTR's log +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590; see HipSTR's log +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537; see HipSTR's log +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641; see HipSTR's log +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472; see HipSTR's log +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1; see HipSTR's log +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511; see HipSTR's log +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425; see HipSTR's log +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557; see HipSTR's log +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594; see HipSTR's log +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436; see HipSTR's log +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490; see HipSTR's log +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534; see HipSTR's log +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450; see HipSTR's log +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444; see HipSTR's log +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481; see HipSTR's log +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520; see HipSTR's log +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446; see HipSTR's log +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617; see HipSTR's log +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568; see HipSTR's log +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487; see HipSTR's log +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572; see HipSTR's log +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640; see HipSTR's log +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492; see HipSTR's log +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565; see HipSTR's log +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485; see HipSTR's log +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632; see HipSTR's log +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495; see HipSTR's log +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540; see HipSTR's log +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714; see HipSTR's log +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717; see HipSTR's log +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505; see HipSTR's log +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556; see HipSTR's log +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549; see HipSTR's log +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589; see HipSTR's log +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522; see HipSTR's log +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494; see HipSTR's log +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533; see HipSTR's log +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636; see HipSTR's log +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575; see HipSTR's log +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638; see HipSTR's log +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462; see HipSTR's log +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445; see HipSTR's log +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10; see HipSTR's log +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463; see HipSTR's log +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525; see HipSTR's log +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593; see HipSTR's log +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532; see HipSTR's log +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504; see HipSTR's log +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513; see HipSTR's log +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561; see HipSTR's log +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2; see HipSTR's log +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635; see HipSTR's log +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587; see HipSTR's log +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643; see HipSTR's log +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497; see HipSTR's log +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434; see HipSTR's log +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461; see HipSTR's log +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435; see HipSTR's log diff --git a/tests/parity/golden/y-str-report/calls/stdout b/tests/parity/golden/y-str-report/calls/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/calls/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/empty-log/o.csv b/tests/parity/golden/y-str-report/empty-log/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/empty-log/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/empty-log/o.tsv b/tests/parity/golden/y-str-report/empty-log/o.tsv new file mode 100644 index 000000000..9faaa7b07 --- /dev/null +++ b/tests/parity/golden/y-str-report/empty-log/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460, and its log gives no reason +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4, and its log gives no reason +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456, and its log gives no reason +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607, and its log gives no reason +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576, and its log gives no reason +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570, and its log gives no reason +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442, and its log gives no reason +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438, and its log gives no reason +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531, and its log gives no reason +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578, and its log gives no reason +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590, and its log gives no reason +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537, and its log gives no reason +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641, and its log gives no reason +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472, and its log gives no reason +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1, and its log gives no reason +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511, and its log gives no reason +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425, and its log gives no reason +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557, and its log gives no reason +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594, and its log gives no reason +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436, and its log gives no reason +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490, and its log gives no reason +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534, and its log gives no reason +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450, and its log gives no reason +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444, and its log gives no reason +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481, and its log gives no reason +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520, and its log gives no reason +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446, and its log gives no reason +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617, and its log gives no reason +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568, and its log gives no reason +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487, and its log gives no reason +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572, and its log gives no reason +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640, and its log gives no reason +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492, and its log gives no reason +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565, and its log gives no reason +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485, and its log gives no reason +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632, and its log gives no reason +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495, and its log gives no reason +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540, and its log gives no reason +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714, and its log gives no reason +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717, and its log gives no reason +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505, and its log gives no reason +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556, and its log gives no reason +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549, and its log gives no reason +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589, and its log gives no reason +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522, and its log gives no reason +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494, and its log gives no reason +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533, and its log gives no reason +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636, and its log gives no reason +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575, and its log gives no reason +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638, and its log gives no reason +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462, and its log gives no reason +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445, and its log gives no reason +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10, and its log gives no reason +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463, and its log gives no reason +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525, and its log gives no reason +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593, and its log gives no reason +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532, and its log gives no reason +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504, and its log gives no reason +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513, and its log gives no reason +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561, and its log gives no reason +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2, and its log gives no reason +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635, and its log gives no reason +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587, and its log gives no reason +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643, and its log gives no reason +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497, and its log gives no reason +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434, and its log gives no reason +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461, and its log gives no reason +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435, and its log gives no reason diff --git a/tests/parity/golden/y-str-report/empty-log/stdout b/tests/parity/golden/y-str-report/empty-log/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/empty-log/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/log/o.csv b/tests/parity/golden/y-str-report/log/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/log/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/log/o.tsv b/tests/parity/golden/y-str-report/log/o.tsv new file mode 100644 index 000000000..9faaa7b07 --- /dev/null +++ b/tests/parity/golden/y-str-report/log/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460, and its log gives no reason +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4, and its log gives no reason +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456, and its log gives no reason +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607, and its log gives no reason +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576, and its log gives no reason +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570, and its log gives no reason +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442, and its log gives no reason +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438, and its log gives no reason +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531, and its log gives no reason +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578, and its log gives no reason +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590, and its log gives no reason +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537, and its log gives no reason +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641, and its log gives no reason +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472, and its log gives no reason +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1, and its log gives no reason +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511, and its log gives no reason +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425, and its log gives no reason +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557, and its log gives no reason +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594, and its log gives no reason +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436, and its log gives no reason +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490, and its log gives no reason +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534, and its log gives no reason +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450, and its log gives no reason +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444, and its log gives no reason +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481, and its log gives no reason +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520, and its log gives no reason +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446, and its log gives no reason +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617, and its log gives no reason +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568, and its log gives no reason +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487, and its log gives no reason +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572, and its log gives no reason +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640, and its log gives no reason +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492, and its log gives no reason +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565, and its log gives no reason +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485, and its log gives no reason +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632, and its log gives no reason +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495, and its log gives no reason +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540, and its log gives no reason +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714, and its log gives no reason +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717, and its log gives no reason +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505, and its log gives no reason +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556, and its log gives no reason +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549, and its log gives no reason +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589, and its log gives no reason +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522, and its log gives no reason +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494, and its log gives no reason +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533, and its log gives no reason +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636, and its log gives no reason +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575, and its log gives no reason +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638, and its log gives no reason +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462, and its log gives no reason +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445, and its log gives no reason +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10, and its log gives no reason +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463, and its log gives no reason +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525, and its log gives no reason +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593, and its log gives no reason +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532, and its log gives no reason +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504, and its log gives no reason +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513, and its log gives no reason +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561, and its log gives no reason +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2, and its log gives no reason +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635, and its log gives no reason +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587, and its log gives no reason +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643, and its log gives no reason +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497, and its log gives no reason +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434, and its log gives no reason +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461, and its log gives no reason +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435, and its log gives no reason diff --git a/tests/parity/golden/y-str-report/log/stdout b/tests/parity/golden/y-str-report/log/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/log/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/plain-vcf/o.csv b/tests/parity/golden/y-str-report/plain-vcf/o.csv new file mode 100644 index 000000000..4b925a03c --- /dev/null +++ b/tests/parity/golden/y-str-report/plain-vcf/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,,not callable +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,,not callable +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,,not callable +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/plain-vcf/o.tsv b/tests/parity/golden/y-str-report/plain-vcf/o.tsv new file mode 100644 index 000000000..cd7cab69d --- /dev/null +++ b/tests/parity/golden/y-str-report/plain-vcf/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II not callable not callable from short reads: a 164 bp repeat is longer than 150 bp reads can span with 10 bases on each side +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 not callable not callable from short reads: a 156 bp repeat is longer than 150 bp reads can span with 10 bases on each side +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460; see HipSTR's log +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4; see HipSTR's log +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456; see HipSTR's log +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607; see HipSTR's log +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576; see HipSTR's log +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570; see HipSTR's log +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442; see HipSTR's log +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438; see HipSTR's log +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531; see HipSTR's log +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578; see HipSTR's log +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590; see HipSTR's log +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537; see HipSTR's log +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641; see HipSTR's log +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472; see HipSTR's log +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1; see HipSTR's log +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511; see HipSTR's log +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425; see HipSTR's log +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557; see HipSTR's log +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594; see HipSTR's log +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436; see HipSTR's log +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490; see HipSTR's log +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534; see HipSTR's log +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450; see HipSTR's log +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444; see HipSTR's log +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481; see HipSTR's log +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520; see HipSTR's log +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446; see HipSTR's log +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617; see HipSTR's log +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568; see HipSTR's log +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487; see HipSTR's log +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572; see HipSTR's log +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640; see HipSTR's log +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492; see HipSTR's log +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565; see HipSTR's log +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485; see HipSTR's log +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632; see HipSTR's log +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495; see HipSTR's log +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540; see HipSTR's log +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714; see HipSTR's log +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717; see HipSTR's log +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505; see HipSTR's log +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556; see HipSTR's log +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549; see HipSTR's log +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589; see HipSTR's log +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522; see HipSTR's log +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494; see HipSTR's log +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533; see HipSTR's log +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636; see HipSTR's log +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575; see HipSTR's log +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638; see HipSTR's log +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462; see HipSTR's log +87 Y-111 DYS452 not callable not callable from short reads: a 155 bp repeat is longer than 150 bp reads can span with 10 bases on each side +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445; see HipSTR's log +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10; see HipSTR's log +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463; see HipSTR's log +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525; see HipSTR's log +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593; see HipSTR's log +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532; see HipSTR's log +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504; see HipSTR's log +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513; see HipSTR's log +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561; see HipSTR's log +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2; see HipSTR's log +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635; see HipSTR's log +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587; see HipSTR's log +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643; see HipSTR's log +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497; see HipSTR's log +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434; see HipSTR's log +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461; see HipSTR's log +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435; see HipSTR's log diff --git a/tests/parity/golden/y-str-report/plain-vcf/stdout b/tests/parity/golden/y-str-report/plain-vcf/stdout new file mode 100644 index 000000000..a0d13f61b --- /dev/null +++ b/tests/parity/golden/y-str-report/plain-vcf/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 10 low, 71 no call, 30 not callable diff --git a/tests/parity/golden/y-str-report/read-length-250/o.csv b/tests/parity/golden/y-str-report/read-length-250/o.csv new file mode 100644 index 000000000..5f6cd99da --- /dev/null +++ b/tests/parity/golden/y-str-report/read-length-250/o.csv @@ -0,0 +1,112 @@ +marker,value,confidence +DYS393,13,low +DYS390,22,low +DYS19,,no call +DYS391,11.2,low +DYS385a,,not callable +DYS385b,,not callable +DYS426,12,low +DYS388,12,low +DYS439,,not callable +DYS389I,12,low +DYS392,12.2,low +DYS389II,29,low +DYS458,16,low +DYS459a,,not callable +DYS459b,,not callable +DYS455,,no call +DYS454,,no call +DYS447,,not callable +DYS437,,not callable +DYS448,20,low +DYS449,36,low +DYS464a,,not callable +DYS464b,,not callable +DYS464c,,not callable +DYS464d,,not callable +DYS460,,no call +Y-GATA-H4,,no call +YCAIIa,,not callable +YCAIIb,,not callable +DYS456,,no call +DYS607,,no call +DYS576,,no call +DYS570,,no call +CDYa,,not callable +CDYb,,not callable +DYS442,,no call +DYS438,,no call +DYS531,,no call +DYS578,,no call +DYF395S1a,,not callable +DYF395S1b,,not callable +DYS590,,no call +DYS537,,no call +DYS641,,no call +DYS472,,no call +DYF406S1,,no call +DYS511,,no call +DYS425,,no call +DYS413a,,not callable +DYS413b,,not callable +DYS557,,no call +DYS594,,no call +DYS436,,no call +DYS490,,no call +DYS534,,no call +DYS450,,no call +DYS444,,no call +DYS481,,no call +DYS520,,no call +DYS446,,no call +DYS617,,no call +DYS568,,no call +DYS487,,no call +DYS572,,no call +DYS640,,no call +DYS492,,no call +DYS565,,no call +DYS710,,not callable +DYS485,,no call +DYS632,,no call +DYS495,,no call +DYS540,,no call +DYS714,,no call +DYS716,,not callable +DYS717,,no call +DYS505,,no call +DYS556,,no call +DYS549,,no call +DYS589,,no call +DYS522,,no call +DYS494,,no call +DYS533,,no call +DYS636,,no call +DYS575,,no call +DYS638,,no call +DYS462,,no call +DYS452,31,low +DYS445,,no call +Y-GATA-A10,,no call +DYS463,,no call +DYS441,,not callable +Y-GGAAT-1B07,,not callable +DYS525,,no call +DYS712,,not callable +DYS593,,no call +DYS650,,not callable +DYS532,,no call +DYS715,,not callable +DYS504,,no call +DYS513,,no call +DYS561,,no call +DYS552,,no call +DYS726,,not callable +DYS635,,no call +DYS587,,no call +DYS643,,no call +DYS497,,no call +DYS510,26,low +DYS434,,no call +DYS461,,no call +DYS435,,no call diff --git a/tests/parity/golden/y-str-report/read-length-250/o.tsv b/tests/parity/golden/y-str-report/read-length-250/o.tsv new file mode 100644 index 000000000..2b4250b71 --- /dev/null +++ b/tests/parity/golden/y-str-report/read-length-250/o.tsv @@ -0,0 +1,112 @@ +order panel marker count confidence reads stutter_reads flank_indel_reads q note +1 Y-12 DYS393 13 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +2 Y-12 DYS390 22 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +3 Y-12 DYS19 no call DYS19/DYS394: two lengths on the Y chromosome (GB 0|4) +4 Y-12 DYS391 11.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +5 Y-12 DYS385a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +6 Y-12 DYS385b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +7 Y-12 DYS426 12 low 20 0 0 0.6 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; posterior 0.6 below 0.9; no per-read lengths (MALLREADS) to show that the reads agree +8 Y-12 DYS388 12 low 20 5 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 5 of 20 reads with stutter; no per-read lengths (MALLREADS) to show that the reads agree +9 Y-12 DYS439 not callable not callable: no region for it in the HipSTR marker set +10 Y-12 DYS389I 12 low 20 0 4 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 4 of 20 reads with a flank indel; no per-read lengths (MALLREADS) to show that the reads agree +11 Y-12 DYS392 12.2 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +12 Y-12 DYS389II 29 low 20 0 0 0.99 FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too; on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +13 Y-25 DYS458 16 low 6 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; 6 reads, fewer than 10; no per-read lengths (MALLREADS) to show that the reads agree +14 Y-25 DYS459a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +15 Y-25 DYS459b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +16 Y-25 DYS455 no call DYS455: HipSTR made no genotype +17 Y-25 DYS454 no call DYS454: unreadable GB x +18 Y-25 DYS447 not callable not callable: no region for it in the HipSTR marker set +19 Y-25 DYS437 not callable not callable: no region for it in the HipSTR marker set +20 Y-25 DYS448 20 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +21 Y-25 DYS449 36 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; DYS449.1: no per-read lengths (MALLREADS) to show that the reads agree; DYS449.2: no per-read lengths (MALLREADS) to show that the reads agree +22 Y-25 DYS464a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +23 Y-25 DYS464b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +24 Y-25 DYS464c not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +25 Y-25 DYS464d not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +26 Y-37 DYS460 no call HipSTR wrote no record for DYS460; see HipSTR's log +27 Y-37 Y-GATA-H4 no call HipSTR wrote no record for Y-GATA-H4; see HipSTR's log +28 Y-37 YCAIIa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +29 Y-37 YCAIIb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +30 Y-37 DYS456 no call HipSTR wrote no record for DYS456; see HipSTR's log +31 Y-37 DYS607 no call HipSTR wrote no record for DYS607; see HipSTR's log +32 Y-37 DYS576 no call HipSTR wrote no record for DYS576; see HipSTR's log +33 Y-37 DYS570 no call HipSTR wrote no record for DYS570; see HipSTR's log +34 Y-37 CDYa not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +35 Y-37 CDYb not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +36 Y-37 DYS442 no call HipSTR wrote no record for DYS442; see HipSTR's log +37 Y-37 DYS438 no call HipSTR wrote no record for DYS438; see HipSTR's log +38 Y-67 DYS531 no call HipSTR wrote no record for DYS531; see HipSTR's log +39 Y-67 DYS578 no call HipSTR wrote no record for DYS578; see HipSTR's log +40 Y-67 DYF395S1a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +41 Y-67 DYF395S1b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +42 Y-67 DYS590 no call HipSTR wrote no record for DYS590; see HipSTR's log +43 Y-67 DYS537 no call HipSTR wrote no record for DYS537; see HipSTR's log +44 Y-67 DYS641 no call HipSTR wrote no record for DYS641; see HipSTR's log +45 Y-67 DYS472 no call HipSTR wrote no record for DYS472; see HipSTR's log +46 Y-67 DYF406S1 no call HipSTR wrote no record for DYF406S1; see HipSTR's log +47 Y-67 DYS511 no call HipSTR wrote no record for DYS511; see HipSTR's log +48 Y-67 DYS425 no call HipSTR wrote no record for DYS425; see HipSTR's log +49 Y-67 DYS413a not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +50 Y-67 DYS413b not callable not callable from short reads: a multi-copy marker in duplicated Y sequence +51 Y-67 DYS557 no call HipSTR wrote no record for DYS557; see HipSTR's log +52 Y-67 DYS594 no call HipSTR wrote no record for DYS594; see HipSTR's log +53 Y-67 DYS436 no call HipSTR wrote no record for DYS436; see HipSTR's log +54 Y-67 DYS490 no call HipSTR wrote no record for DYS490; see HipSTR's log +55 Y-67 DYS534 no call HipSTR wrote no record for DYS534; see HipSTR's log +56 Y-67 DYS450 no call HipSTR wrote no record for DYS450; see HipSTR's log +57 Y-67 DYS444 no call HipSTR wrote no record for DYS444; see HipSTR's log +58 Y-67 DYS481 no call HipSTR wrote no record for DYS481; see HipSTR's log +59 Y-67 DYS520 no call HipSTR wrote no record for DYS520; see HipSTR's log +60 Y-67 DYS446 no call HipSTR wrote no record for DYS446; see HipSTR's log +61 Y-67 DYS617 no call HipSTR wrote no record for DYS617; see HipSTR's log +62 Y-67 DYS568 no call HipSTR wrote no record for DYS568; see HipSTR's log +63 Y-67 DYS487 no call HipSTR wrote no record for DYS487; see HipSTR's log +64 Y-67 DYS572 no call HipSTR wrote no record for DYS572; see HipSTR's log +65 Y-67 DYS640 no call HipSTR wrote no record for DYS640; see HipSTR's log +66 Y-67 DYS492 no call HipSTR wrote no record for DYS492; see HipSTR's log +67 Y-67 DYS565 no call HipSTR wrote no record for DYS565; see HipSTR's log +68 Y-111 DYS710 not callable not callable: no region for it in the HipSTR marker set +69 Y-111 DYS485 no call HipSTR wrote no record for DYS485; see HipSTR's log +70 Y-111 DYS632 no call HipSTR wrote no record for DYS632; see HipSTR's log +71 Y-111 DYS495 no call HipSTR wrote no record for DYS495; see HipSTR's log +72 Y-111 DYS540 no call HipSTR wrote no record for DYS540; see HipSTR's log +73 Y-111 DYS714 no call HipSTR wrote no record for DYS714; see HipSTR's log +74 Y-111 DYS716 not callable not callable: no region for it in the HipSTR marker set +75 Y-111 DYS717 no call HipSTR wrote no record for DYS717; see HipSTR's log +76 Y-111 DYS505 no call HipSTR wrote no record for DYS505; see HipSTR's log +77 Y-111 DYS556 no call HipSTR wrote no record for DYS556; see HipSTR's log +78 Y-111 DYS549 no call HipSTR wrote no record for DYS549; see HipSTR's log +79 Y-111 DYS589 no call HipSTR wrote no record for DYS589; see HipSTR's log +80 Y-111 DYS522 no call HipSTR wrote no record for DYS522; see HipSTR's log +81 Y-111 DYS494 no call HipSTR wrote no record for DYS494; see HipSTR's log +82 Y-111 DYS533 no call HipSTR wrote no record for DYS533; see HipSTR's log +83 Y-111 DYS636 no call HipSTR wrote no record for DYS636; see HipSTR's log +84 Y-111 DYS575 no call HipSTR wrote no record for DYS575; see HipSTR's log +85 Y-111 DYS638 no call HipSTR wrote no record for DYS638; see HipSTR's log +86 Y-111 DYS462 no call HipSTR wrote no record for DYS462; see HipSTR's log +87 Y-111 DYS452 31 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +88 Y-111 DYS445 no call HipSTR wrote no record for DYS445; see HipSTR's log +89 Y-111 Y-GATA-A10 no call HipSTR wrote no record for Y-GATA-A10; see HipSTR's log +90 Y-111 DYS463 no call HipSTR wrote no record for DYS463; see HipSTR's log +91 Y-111 DYS441 not callable not callable: no region for it in the HipSTR marker set +92 Y-111 Y-GGAAT-1B07 not callable not callable: no region for it in the HipSTR marker set +93 Y-111 DYS525 no call HipSTR wrote no record for DYS525; see HipSTR's log +94 Y-111 DYS712 not callable not callable: no region for it in the HipSTR marker set +95 Y-111 DYS593 no call HipSTR wrote no record for DYS593; see HipSTR's log +96 Y-111 DYS650 not callable not callable: no region for it in the HipSTR marker set +97 Y-111 DYS532 no call HipSTR wrote no record for DYS532; see HipSTR's log +98 Y-111 DYS715 not callable not callable: no region for it in the HipSTR marker set +99 Y-111 DYS504 no call HipSTR wrote no record for DYS504; see HipSTR's log +100 Y-111 DYS513 no call HipSTR wrote no record for DYS513; see HipSTR's log +101 Y-111 DYS561 no call HipSTR wrote no record for DYS561; see HipSTR's log +102 Y-111 DYS552 no call HipSTR wrote no record for DYS552.2; see HipSTR's log +103 Y-111 DYS726 not callable not callable: no region for it in the HipSTR marker set +104 Y-111 DYS635 no call HipSTR wrote no record for DYS635; see HipSTR's log +105 Y-111 DYS587 no call HipSTR wrote no record for DYS587; see HipSTR's log +106 Y-111 DYS643 no call HipSTR wrote no record for DYS643; see HipSTR's log +107 Y-111 DYS497 no call HipSTR wrote no record for DYS497; see HipSTR's log +108 Y-111 DYS510 26 low 20 0 0 0.99 on the reference's scale, not FamilyTreeDNA's: no published counting rule for this marker; no per-read lengths (MALLREADS) to show that the reads agree +109 Y-111 DYS434 no call HipSTR wrote no record for DYS434; see HipSTR's log +110 Y-111 DYS461 no call HipSTR wrote no record for DYS461; see HipSTR's log +111 Y-111 DYS435 no call HipSTR wrote no record for DYS435; see HipSTR's log diff --git a/tests/parity/golden/y-str-report/read-length-250/stdout b/tests/parity/golden/y-str-report/read-length-250/stdout new file mode 100644 index 000000000..156bd72dd --- /dev/null +++ b/tests/parity/golden/y-str-report/read-length-250/stdout @@ -0,0 +1 @@ +Y-STR markers: 0 high, 13 low, 71 no call, 27 not callable diff --git a/tests/smoke/hipstr.sh b/tests/smoke/hipstr.sh index 9b2e86e41..33588f7e5 100644 --- a/tests/smoke/hipstr.sh +++ b/tests/smoke/hipstr.sh @@ -17,13 +17,15 @@ HipSTR --bams /in/HG002_slice.bam --fasta /in/ref.fa --regions regions.bed --str --max-str-len 150 --output-filters --log hipstr.log python3 --version > python_version.txt 2>&1 # called.tsv: id, GT, GB, DP and Q of every call with a genotype and those -# four fields and DSTUTTER. +# four fields, DSTUTTER and MALLREADS (each read's most likely length, which +# og y str-report needs for a high call). gzip -dc calls.vcf.gz | awk -F'\t' -v OFS='\t' ' /^#/ { next } { split("", f); k = split($9, key, ":"); m = split($10, val, ":") for (i = 1; i <= k && i <= m; i++) f[key[i]] = val[i] - if (("GT" in f) && f["GT"] != "." && ("GB" in f) && ("DP" in f) && ("Q" in f) && ("DSTUTTER" in f)) + if (("GT" in f) && f["GT"] != "." && ("GB" in f) && ("DP" in f) && ("Q" in f) && ("DSTUTTER" in f) \ + && ("MALLREADS" in f) && f["MALLREADS"] ~ /^-?[0-9]+\|[0-9]+/) print $3, f["GT"], f["GB"], f["DP"], f["Q"] }' > called.tsv cat called.tsv From 699ca89aece69af8739e1c7cf458c6f949a19a11 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:32:47 +0100 Subject: [PATCH 033/110] fix(gridss): write the high-confidence calls GRIDSS recommends, and stop pointing at step 22 Step 04b printed GRIDSS's high-confidence rule (QUAL >= 1000, AS > 0, RAS > 0) as advice and never applied it, and said step 22 converts and integrates its calls, which step 22 does not do. The step now writes sv_gridss/_gridss.high.vcf.gz and its index with the pinned bcftools, beside the untouched raw VCF (also when the raw VCF already exists), and says GRIDSS calls are left out of the SV consensus. The new file has a stable output-contract row. Bead: sv-14 Bead: sv-16 Bead: D14 --- assets/output_contract.tsv | 2 + docs/04b-gridss.md | 13 ++++--- scripts/04b-gridss.sh | 65 ++++++++++++++++++++++++------- tests/fake-docker/bash-step-sv.sh | 25 ++++++++++++ 4 files changed, 85 insertions(+), 20 deletions(-) diff --git a/assets/output_contract.tsv b/assets/output_contract.tsv index 053631567..b804b99c1 100644 --- a/assets/output_contract.tsv +++ b/assets/output_contract.tsv @@ -221,6 +221,8 @@ file {sample}/sv_duphold/{sample}_sv_duphold.vcf 15 DUPHOLD nextflow vcf stable file {sample}/sv_filtered/{sample}_sv_filtered.log 15 DUPHOLD_FILTER nextflow text stable - - file {sample}/sv_filtered/{sample}_sv_filtered.vcf.gz 15 DUPHOLD_FILTER nextflow vcf stable - - file {sample}/sv_filtered/{sample}_sv_filtered.vcf.gz.tbi 15 DUPHOLD_FILTER nextflow index stable - - +file {sample}/sv_gridss/{sample}_gridss.high.vcf.gz 04b - bash vcf stable - - +file {sample}/sv_gridss/{sample}_gridss.high.vcf.gz.tbi 04b - bash index stable - - file {sample}/sv_merged/{sample}_sv_consensus.vcf.gz 22 SURVIVOR_SORT both vcf stable - - file {sample}/sv_merged/{sample}_sv_consensus.vcf.gz.tbi 22 SURVIVOR_SORT both index stable - - file {sample}/telomere/{sample} 10 TELOMERE_HUNTER both dir stable - - diff --git a/docs/04b-gridss.md b/docs/04b-gridss.md index 0191fac6e..4a4133017 100644 --- a/docs/04b-gridss.md +++ b/docs/04b-gridss.md @@ -13,7 +13,7 @@ Assembly-based structural variant caller that identifies breakpoints through loc ## Why -GRIDSS complements Manta and Delly in the SV consensus pipeline (step 22): +GRIDSS adds to Manta and Delly. Its calls stay out of the SV consensus of step 22 (see Notes), so you read them here: - **Complex rearrangements** — GRIDSS assembles across breakpoints rather than relying on read pair signals alone - **Small SVs (50-300bp)** — too small for discordant read pair detection but too large for standard SNP callers - **Breakpoint precision** — assembly provides single-nucleotide resolution at breakpoints @@ -28,9 +28,9 @@ GRIDSS complements Manta and Delly in the SV consensus pipeline (step 22): ## Docker Image -- `GRIDSS_IMAGE` +- `GRIDSS_IMAGE` (GRIDSS), `BCFTOOLS_IMAGE` (the high-confidence filter) -Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. +Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. Image size: ~1.5 GB (includes Java 11, R, bwa, samtools, all dependencies). @@ -69,7 +69,8 @@ This takes about an hour (an estimate, not measured here) and produces 5 index f | File | Description | |---|---| -| `sv_gridss/_gridss.vcf.gz` | SV calls in BND notation | +| `sv_gridss/_gridss.vcf.gz` | Every GRIDSS call, in BND notation, as GRIDSS wrote it | +| `sv_gridss/_gridss.high.vcf.gz` | The high-confidence calls (see Quality filtering), and its `.tbi` index | | `sv_gridss/_assembly.bam` | Assembly contigs (intermediate, can be deleted) | | `sv_gridss/work/` | GRIDSS's working directory (`--workingdir`), about 50 GB during the run; removed once the VCF is written, kept when GRIDSS fails so you can look at it | @@ -84,6 +85,8 @@ GRIDSS reports all variants as **BND** (breakend) records, not DEL/DUP/INV/INS. | High | `QUAL >= 1000` and `AS > 0` and `RAS > 0` | | Medium | `QUAL >= 500` and (`AS > 0` or `RAS > 0`) | +The step writes the high tier, the threshold GRIDSS's authors give for high-confidence calls, to `_gridss.high.vcf.gz` with `bcftools view -i 'QUAL>=1000 && INFO/AS>0 && INFO/RAS>0'`. `AS` counts the assemblies that support the breakend and `RAS` those from its partner breakend, so the rule asks for assembly support on both sides. Both records of a breakend pair carry the same `QUAL`, and one record's `AS` is the other's `RAS`, so the filter keeps or drops a pair together. The raw VCF stays as GRIDSS wrote it. When the raw VCF is already there, the step skips GRIDSS and writes the high-confidence file again from it, which takes seconds. For the medium tier, filter the raw VCF yourself. + Note: GRIDSS QUAL scores are uncorrected for multiple testing and tend to be overestimated. ## Resource Requirements @@ -115,7 +118,7 @@ Not measured here; the end test does not run GRIDSS. These are estimates: ## Notes -- GRIDSS output is not part of the SV consensus (step 22): GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), which never match the DEL, DUP and INV records of the other callers +- GRIDSS output is left out of the SV consensus (step 22). GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), and nothing in the pipeline turns a pair into one DEL, DUP or INV. SURVIVOR 1.0.7 counts BND as the same type as INV and TRA, so a GRIDSS breakend would pair with another caller's inversion or translocation and count as a vote for an event GRIDSS never typed - The assembly BAM (`_assembly.bam`) can be deleted after the VCF is generated to save disk space - Supports `ALIGN_DIR` variable: `ALIGN_DIR=aligned_bwamem2 ./scripts/04b-gridss.sh sample` - GRIDSS does not have ARM64 support — runs under emulation on Apple Silicon (very slow) diff --git a/scripts/04b-gridss.sh b/scripts/04b-gridss.sh index cbf1d6ca9..0a15566ee 100755 --- a/scripts/04b-gridss.sh +++ b/scripts/04b-gridss.sh @@ -1,10 +1,15 @@ #!/usr/bin/env bash # GRIDSS — Assembly-based structural variant caller # Input: sorted BAM + GRCh38 reference (with BWA index) -# Output: VCF with BND-notation breakpoints in $GENOME_DIR//sv_gridss/ +# Output, in $GENOME_DIR//sv_gridss/: +# _gridss.vcf.gz every GRIDSS call, as breakends (SVTYPE=BND) +# _gridss.high.vcf.gz the calls GRIDSS rates high confidence: +# QUAL >= 1000 with assembly support on both +# sides (INFO/AS > 0 and INFO/RAS > 0), and its .tbi # -# GRIDSS excels at complex rearrangements that Manta/Delly miss. -# Output is BND notation — use the SV consensus merge (step 22) for integration. +# GRIDSS excels at complex rearrangements that Manta/Delly miss. Its calls are +# left out of the SV consensus (step 22): nothing here turns its breakend pairs +# into DEL, DUP or INV events, so SURVIVOR cannot count them as one caller. # # HEAVY: Requires 31 GB JVM heap, 8 threads, and ~50 GB intermediate disk space. # Expected runtime: 4-8 hours for 30X WGS. @@ -20,6 +25,38 @@ SAMPLE_DIR="${GENOME_DIR}/${SAMPLE}" BAM="${SAMPLE_DIR}/${ALIGN_DIR}/${SAMPLE}_sorted.bam" REF="$REF_FASTA" OUTPUT_DIR="${SAMPLE_DIR}/sv_gridss" +RAW="${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz" +HIGH="${OUTPUT_DIR}/${SAMPLE}_gridss.high.vcf.gz" +# GRIDSS's own high-confidence rule: QUAL >= 1000 with assembly support on both +# sides of the breakpoint. Both breakends of a pair carry one QUAL, and each +# one's AS is the other's RAS, so the filter keeps or drops a pair together. +HIGH_EXPR='QUAL>=1000 && INFO/AS>0 && INFO/RAS>0' +require_image GRIDSS_IMAGE BCFTOOLS_IMAGE + +# write_high: write HIGH from RAW with HIGH_EXPR, and its index. RAW stays as +# GRIDSS wrote it. Cheap (seconds), so it runs again on every call. +write_high() { + rm -f "$HIGH" "${HIGH}.tbi" + run_in --cpus 1 --memory 2g "$BCFTOOLS_IMAGE" \ + bcftools view -i "$HIGH_EXPR" -Oz -o "$(cpath "$HIGH")" "$(cpath "$RAW")" + run_in --cpus 1 --memory 2g "$BCFTOOLS_IMAGE" bcftools index -f -t "$(cpath "$HIGH")" + if ! wrote_vcf "$HIGH"; then + echo "ERROR: bcftools wrote no ${HIGH}." >&2 + exit 1 + fi + local n_in n_out + n_in=$(run_in "$BCFTOOLS_IMAGE" bcftools view -H "$(cpath "$RAW")" | wc -l | tr -d ' ') + n_out=$(run_in "$BCFTOOLS_IMAGE" bcftools view -H "$(cpath "$HIGH")" | wc -l | tr -d ' ') + echo "High confidence: ${HIGH} (kept ${n_out} of ${n_in} breakend records: ${HIGH_EXPR})" +} + +# say_consensus: what step 22 does with these calls. +say_consensus() { + echo "" + echo "NOTE: GRIDSS calls are left out of the SV consensus (step 22). GRIDSS writes" + echo " each event as a pair of breakends (SVTYPE=BND), and nothing here turns a pair" + echo " into a DEL, DUP or INV. Read both files here directly." +} echo "=== GRIDSS: ${SAMPLE} ===" echo "BAM: ${BAM}" @@ -53,9 +90,11 @@ fi # Skip only a finished VCF (complete BGZF file with a VCF header); a file cut # short by a killed run is called again. -if have_output "${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz"; then - echo "GRIDSS output already exists, skipping." +if have_output "$RAW"; then + echo "GRIDSS output already exists, skipping GRIDSS." echo "Delete to re-run: rm -rf ${OUTPUT_DIR}" + write_high + say_consensus exit 0 fi @@ -118,19 +157,15 @@ run_in --rw "$(dirname "$REF_FASTA")" -w "/genome/${SAMPLE}/sv_gridss" \ "${GRIDSS_IMAGE}" \ "${GRIDSS_ARGS[@]}" -if ! wrote_vcf "${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz"; then - echo "ERROR: GRIDSS exited without a ${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz." >&2 +if ! wrote_vcf "$RAW"; then + echo "ERROR: GRIDSS exited without a ${RAW}." >&2 echo " Its intermediate files are kept in ${OUTPUT_DIR}/work/ for a look." >&2 exit 1 fi rm -rf "${OUTPUT_DIR}/work" +write_high echo "=== GRIDSS complete ===" -echo "VCF: ${OUTPUT_DIR}/${SAMPLE}_gridss.vcf.gz" -echo "" -echo "NOTE: GRIDSS outputs BND-notation breakpoints. For standard SV types" -echo " (DEL/DUP/INV/INS), use the SV consensus merge step (22-survivor-merge.sh)" -echo " which converts and integrates calls from all SV callers." -echo "" -echo "Quality filtering: QUAL >= 1000 with assembly support (AS > 0 & RAS > 0)" -echo " is a good threshold for high-confidence calls." +echo "VCF: ${RAW}" +echo "High-confidence VCF: ${HIGH}" +say_consensus diff --git a/tests/fake-docker/bash-step-sv.sh b/tests/fake-docker/bash-step-sv.sh index 35925efdd..fcd555c0e 100755 --- a/tests/fake-docker/bash-step-sv.sh +++ b/tests/fake-docker/bash-step-sv.sh @@ -8,6 +8,10 @@ # GRIDSS (04b): runs with --workingdir sv_gridss/work, removed once the VCF # is written; it is skipped, with the reason, when Docker has less memory # than GRIDSS_MIN_MEM_GB (default 32; the fake Docker reports 16 GiB). +# After the raw VCF it writes sv_gridss/_gridss.high.vcf.gz with +# bcftools and GRIDSS's high-confidence rule (QUAL>=1000 && INFO/AS>0 && +# INFO/RAS>0), and its index, and says its calls are left out of the SV +# consensus (step 22 does not convert them). # Delly (19): gets -x with the exclude map setup.sh installs; without it, # runs as before and warns. # Sniffles2 (04c): stops with exit 1, before Sniffles2, when the first @@ -62,6 +66,9 @@ case "$args" in *" bcftools view -e "*) # The expression and the files of a filter call, one per line printf '%s\n' "${5}" "${*: -1}" > "${CASE_WORK}/bcftools-filter" ;; + *" bcftools view -i "*) + # The expression and the input of an include call, one per line + printf '%s\n' "${5}" "${*: -1}" > "${CASE_WORK}/bcftools-include" ;; esac exec "${CASE_WORK}/hook-outputs" "$@" HOOK @@ -94,6 +101,24 @@ GRIDSS_MIN_MEM_GB=8 run_expect 0 gridss "${SCRIPTS}/04b-gridss.sh" sample1 docker_log_has '^run image=[^ ]*gridss.* --workingdir /genome/sample1/sv_gridss/work ' "GRIDSS ran without --workingdir sv_gridss/work" docker_log_has "^run image=[^ ]*gridss.* -t ${THREADS:-8} " "GRIDSS did not get THREADS" [ ! -e "${GENOME_DIR}/sample1/sv_gridss/work" ] || fail "step 04b kept sv_gridss/work after GRIDSS wrote its VCF" +# Step 22 leaves GRIDSS out, and the step says so instead of sending you there. +output_has gridss 'left out of the SV consensus' +output_lacks gridss 'converts and integrates' +# GRIDSS's own high-confidence rule, applied with the pinned bcftools to the raw +# VCF, which stays beside the filtered one. +G=/genome/sample1/sv_gridss +[ "$(sed -n 1p "${CASE_WORK}/bcftools-include" 2>/dev/null)" = 'QUAL>=1000 && INFO/AS>0 && INFO/RAS>0' ] \ + || fail "step 04b did not filter with GRIDSS's high-confidence rule: $(sed -n 1p "${CASE_WORK}/bcftools-include" 2>/dev/null)" +[ "$(sed -n 2p "${CASE_WORK}/bcftools-include" 2>/dev/null)" = "${G}/sample1_gridss.vcf.gz" ] \ + || fail "step 04b did not filter GRIDSS's raw VCF" +docker_log_has "^run image=[^ ]*bcftools[^ ]* :: .* bcftools view -i .* -o ${G//./\\.}/sample1_gridss\\.high\\.vcf\\.gz " \ + "step 04b did not write sv_gridss/sample1_gridss.high.vcf.gz with BCFTOOLS_IMAGE" +docker_log_has "^run image=[^ ]*bcftools.* bcftools index -f -t ${G//./\\.}/sample1_gridss\\.high\\.vcf\\.gz" \ + "step 04b did not index the high-confidence VCF" +H="${GENOME_DIR}/sample1/sv_gridss/sample1_gridss" +[ -f "${H}.vcf.gz" ] && [ -f "${H}.high.vcf.gz" ] && [ -f "${H}.high.vcf.gz.tbi" ] \ + || fail "step 04b did not leave the raw VCF, the high-confidence VCF and its index" +output_has gridss 'High confidence: .*sample1_gridss\.high\.vcf\.gz' # --- Delly ---------------------------------------------------------------------------- : > "$FAKE_DOCKER_LOG" From 42a90de3267bbc4a43aa73ae0c2ae558533ee2f9 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:32:47 +0100 Subject: [PATCH 034/110] docs(sv): call the consensus caller agreement and give the real reason GRIDSS stays out The docs called two-caller consensus independent validation, though Manta and Delly read the same split and paired reads, and suggested running AnnotSV on the consensus VCF, whose sample columns are the callers. They also said GRIDSS breakends never match the other callers' records; SURVIVOR 1.0.7 lets a BND match an INV or TRA, so GRIDSS stays out because nothing turns its breakend pairs into typed events. Step 22's log line and header say the same. Bead: sv-15 Bead: sv-12 --- ROADMAP.md | 2 +- docs/22-survivor-merge.md | 12 ++++++------ docs/getting-started.md | 2 +- docs/nextflow.md | 2 +- docs/results/structural-and-repeats.md | 4 ++-- docs/tool-rationale.md | 4 ++-- scripts/22-survivor-merge.sh | 17 ++++++++++++++--- 7 files changed, 27 insertions(+), 16 deletions(-) diff --git a/ROADMAP.md b/ROADMAP.md index 08ee20f4a..4bac3dd4c 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -25,7 +25,7 @@ Upgrade pinned tools, add pre-alignment QC ([#14](https://github.com/GeiserX/Own - [x] **PharmCAT upgrade to 3.2.0** — preprocessor renamed (no `.py`), explicit reporter flags (`-reporterJson -reporterHtml`), `wildtypeAllele` → `referenceAllele` in JSON, NAT2 calling added. Step 7 and step 27 updated together - [x] **PCGR/CPSR upgrade to 2.2.5** — upgraded from 1.4.1 to 2.2.5 with new ref data bundle (`20250314`), separate VEP cache mount, and completely rewritten CLI - [x] **Octopus variant caller** (`scripts/03d-octopus.sh` → `vcf_octopus/`) — haplotype-aware Bayesian caller as a 5th benchmarking alternative. Auto-discovered by `benchmark-variants.sh` -- [x] **GRIDSS structural variant caller** (`scripts/04b-gridss.sh` → `sv_gridss/`) — assembly-based SV caller for complex rearrangements; strengthens SV consensus alongside Manta/Delly. Requires BWA index and 32GB RAM +- [x] **GRIDSS structural variant caller** (`scripts/04b-gridss.sh` → `sv_gridss/`) — assembly-based SV caller for complex rearrangements; left out of the SV consensus (step 22), since its breakend pairs are not turned into DEL, DUP or INV. Writes its high-confidence calls (QUAL >= 1000, AS > 0, RAS > 0) to `sv_gridss/_gridss.high.vcf.gz`. Requires BWA index and 32GB RAM - [x] **CYP2D6 star allele calling** — evaluated Aldy v4.8.3 (best CYP2D6 SV caller per Twesigomwe 2020), StellarPGx (broken Docker), and BCyrius (no public repo). Aldy documented as recommended optional replacement for Cyrius in `docs/21-cyrius.md`. Note: Aldy uses an academic-only license (IURTC) incompatible with GPL-3.0, so it cannot be a required dependency. pypgx (step 32) is the GPL-compatible alternative included in the pipeline - [x] **Long-read support** (`scripts/02b-alignment-longread.sh`, `scripts/03e-clair3.sh`, `scripts/04c-sniffles2.sh`) — ONT and PacBio HiFi alignment (minimap2 `map-ont`/`map-hifi`), Clair3 variant calling, Sniffles2 SV calling. Comprehensive guide in `docs/long-read-guide.md` - [x] **Whole exome sequencing (WES) guide** — `docs/wes-guide.md` covers per-step compatibility, capture BED files, coverage QC metrics and limitations. WES data runs step by step; no script has a WES mode. Thanks to [@madmolecularman](https://github.com/madmolecularman) for domain expertise here diff --git a/docs/22-survivor-merge.md b/docs/22-survivor-merge.md index af18426b9..f441d7a9d 100644 --- a/docs/22-survivor-merge.md +++ b/docs/22-survivor-merge.md @@ -2,7 +2,7 @@ ## What This Does -Keeps the structural variants (SVs) that two or more independent callers agree on. SURVIVOR merge pairs two calls when both of their breakpoints lie within 1,000 bp of each other, their SV type and strands agree, and the event is at least 50 bp long. Each consensus record says how many callers support it and which. +Keeps the structural variants (SVs) that two or more callers agree on. SURVIVOR merge pairs two calls when both of their breakpoints lie within 1,000 bp of each other, their SV type and strands agree, and the event is at least 50 bp long. Each consensus record says how many callers support it and which. That is caller agreement, not validation (see Why). ## Why @@ -12,7 +12,7 @@ Individual SV callers each have distinct biases and false-positive profiles: - **Delly**: strongest for inversions and balanced translocations (paired-end, split reads and depth) - **CNVpytor**: best for large CNVs (read depth only) -An SV seen by two callers that use different signals is more likely to be real. +An SV that two callers report is less likely to be one caller's artefact. Agreement is not independent proof, though. Manta and Delly both read split and paired reads from the same alignment, so a misaligned read cluster both of them see can reach the consensus. Only CNVpytor reads a different signal, depth, and its breakpoints are coarse (see Limitations). The step used to bin calls by chromosome, `int(POS/1000)` and SV type. That split one deletion called at positions 999 and 1001 over two bins, and counted two deletions of very different size that start in one bin as agreement. SURVIVOR compares both breakpoints, so neither happens: the e2e case `tests/e2e/sv-mito-telomere-steps-1-sv-merge.sh` runs both situations on the synthetic three-caller set in `tests/fixtures/sv/`. @@ -41,7 +41,7 @@ At least two of the following (the script uses every one it finds): | TIDDIT (script 4a) | `${GENOME_DIR}/${SAMPLE}/sv_tiddit/${SAMPLE}_sv.vcf.gz` | | Sniffles2 (script 4c, long reads) | `${GENOME_DIR}/${SAMPLE}/sv_sniffles/${SAMPLE}_sv.vcf.gz` | -GRIDSS (step 4b) is left out, and the script says so when its VCF exists. GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), which never match the DEL, DUP and INV records of the other callers. +GRIDSS (step 4b) is left out of the SV consensus, and the script says so when its VCF exists. GRIDSS reports every event as a pair of breakends (`SVTYPE=BND`), and nothing here turns a pair into one DEL, DUP or INV. SURVIVOR 1.0.7 counts BND as the same type as INV and TRA, so a GRIDSS breakend would pair with another caller's inversion or translocation and count as a vote for an event GRIDSS never typed. Step 4b writes GRIDSS's own high-confidence calls to `sv_gridss/_gridss.high.vcf.gz`. The Nextflow pipeline (`survivor_merge` in `--tools`, with at least two of `manta`, `delly`, `cnvpytor`) merges the callers it ran. @@ -83,7 +83,7 @@ A typical 30X WGS genome produces: - **Delly**: 5,000-15,000 SVs - **CNVpytor**: 3,000-4,000 CNVs, 1,500-2,000 of them with e-value < 0.01 (see [interpreting results](interpreting-results.md#cnvpytor-results-step-18)) -Multi-caller SVs have lower false-positive rates than single-caller calls. The count after the merge has not been measured on a real genome with this version of the step. +An SV two callers report is less likely to be one caller's artefact, but it is not validated: see Why. The count after the merge has not been measured on a real genome with this version of the step. SV types in the output: **DEL** (deletion), **DUP** (duplication), **INV** (inversion), **INS** (insertion), **TRA** (a translocation, SURVIVOR's name for a breakend pair between two chromosomes). @@ -102,12 +102,12 @@ docker run --rm -v "${GENOME_DIR}:/genome" "${BCFTOOLS_IMAGE}" \ - Single-caller SVs are discarded even if they are real. If you suspect a specific SV, check the individual caller outputs directly. - CNVpytor's calls are depth-only and their breakpoints are coarse (its bin size), so a CNVpytor call often lies more than 1 kb from the Manta or Delly breakpoint of the same event and does not pair with it. - The CNVpytor VCF made from its table carries no genotype and no quality. -- Breakend (BND) records pair only with breakends of another caller. That includes a lone Manta inversion junction of 1 Mb or more, which step 4 keeps as its two breakends instead of a whole-span inversion. +- A breakend (BND) record pairs with a breakend, an inversion (INV) or a translocation (TRA) of another caller: SURVIVOR 1.0.7 lets a BND match those two types. That includes a lone Manta inversion junction of 1 Mb or more, which step 4 keeps as its two breakends instead of a whole-span inversion. ## Notes - Run this step only after completing at least two of: step 4 (Manta), step 19 (Delly), step 18 (CNVpytor). -- The consensus VCF can be annotated or loaded into IGV for visual inspection. +- Load the consensus VCF into IGV to look at it, but never run AnnotSV on it. Its sample columns are the callers, not you, and its positions are SURVIVOR's merged ones. AnnotSV (step 5) annotates the callers' own calls, and the reports join `SUPP` and `SUPP_VEC` onto them ([step 5](05-annotsv.md)). ## Links diff --git a/docs/getting-started.md b/docs/getting-started.md index 744e48153..303b5b364 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -171,7 +171,7 @@ When the run starts from an existing VCF, the pipeline does not read a gVCF besi | `EXTRA_CALLERS=gatk,freebayes,strelka2,octopus` | run the alternative callers 3a to 3d after the pipeline | | | `BENCHMARK=true` | runs `benchmark-variants.sh` after them; it needs `EXTRA_CALLERS` or a second caller's VCF from an earlier 3a-3d run, and is skipped without one | | -GRIDSS is not part of the SV consensus (step 22): it reports every event as a pair of breakends, which never match the DEL, DUP and INV records of Manta, Delly and CNVpytor. +GRIDSS is left out of the SV consensus (step 22): it reports every event as a pair of breakends, and nothing in the pipeline turns a pair into one DEL, DUP or INV. Step 4b writes GRIDSS's high-confidence calls to `sv_gridss/_gridss.high.vcf.gz` beside its raw VCF. Without `THREADS` or `--max_cpus`, `run-all.sh` passes the machine's CPU count as `--max_cpus`, and without `--max_memory` it passes the machine's RAM in whole GB (31.GB on a 32 GB Linux machine). Nextflow refuses a task that asks for more than the machine has, and the larger steps ask for 8 CPUs and 32 GB; with the caps they run with less. Options after the sex go to `nextflow run` unchanged, for example `./scripts/run-all.sh your_name male --max_memory 24.GB` to cap each task at 24 GB, or `--sex_check warn` to go on when the sex inferred from the BAM differs from the one given. [Nextflow Parameters](parameters.md) lists every parameter. `MAX_JOBS` is no longer read: Nextflow starts a task when its CPUs and memory fit in what is left of the machine's, and `--max_cpus` and `--max_memory` cap each task, not the total; [a shared host](hardware-requirements.md#a-shared-host) shows how to bound the total. diff --git a/docs/nextflow.md b/docs/nextflow.md index 6332f369e..15b7a8842 100644 --- a/docs/nextflow.md +++ b/docs/nextflow.md @@ -404,7 +404,7 @@ Tools that require external databases (VEP, slivar, clinvar, CPSR, ExpansionHunt ### SV consensus merge -`survivor_merge` runs `SURVIVOR merge` (step 22's parameters: breakpoints within 1 kb, same type and strands, at least 50 bp, two or more callers) over the callers this run selected among `manta`, `delly` and `cnvpytor`, each cut to its PASS records first (`SURVIVOR_PREP`, `SURVIVOR_MERGE`, `SURVIVOR_SORT`). CNVpytor's depth-only calls count as one caller like the others; their coarse breakpoints often lie more than 1 kb from the paired-end callers'. TIDDIT and Sniffles2 have no module, so the consensus of the script (step 22) can hold those two callers as well. GRIDSS is in neither: its breakend (BND) records never match the DEL, DUP and INV records of the other callers. See [step 22](22-survivor-merge.md). +`survivor_merge` runs `SURVIVOR merge` (step 22's parameters: breakpoints within 1 kb, same type and strands, at least 50 bp, two or more callers) over the callers this run selected among `manta`, `delly` and `cnvpytor`, each cut to its PASS records first (`SURVIVOR_PREP`, `SURVIVOR_MERGE`, `SURVIVOR_SORT`). CNVpytor's depth-only calls count as one caller like the others; their coarse breakpoints often lie more than 1 kb from the paired-end callers'. TIDDIT and Sniffles2 have no module, so the consensus of the script (step 22) can hold those two callers as well. GRIDSS is in neither: it reports every event as a pair of breakends (BND), and nothing turns a pair into one DEL, DUP or INV. See [step 22](22-survivor-merge.md). ### FILTER=PASS required diff --git a/docs/results/structural-and-repeats.md b/docs/results/structural-and-repeats.md index 7afbb24aa..3ff274cfa 100644 --- a/docs/results/structural-and-repeats.md +++ b/docs/results/structural-and-repeats.md @@ -34,14 +34,14 @@ A typical human genome has: ### Which Callers to Trust? If you ran multiple SV callers: -- **Called by 2+ callers (Manta + Delly, or Manta + CNVpytor):** Lower false-positive rate +- **Called by 2+ callers (Manta + Delly, or Manta + CNVpytor):** less likely to be one caller's artefact, but not validated: Manta and Delly read the same split and paired reads, so an alignment artefact can reach both - **Called by 1 caller only:** Lower confidence, may be false positive - **duphold DHFFC < 0.7 for deletions:** High confidence (depth drops as expected) - **duphold DHBFC > 1.3 for duplications:** High confidence (depth rises as expected) ### SV Consensus (Step 22) -`${SAMPLE}/sv_merged/${SAMPLE}_sv_consensus.vcf.gz` keeps the SVs that two or more callers found (Manta, Delly, CNVpytor and, when they ran, Sniffles2 and TIDDIT): SURVIVOR pairs two calls when both breakpoints lie within 1 kb of each other and their type and strands agree. `SUPP` says how many callers found each one and `SUPP_VEC` which. GRIDSS is left out (its breakend records never match). It is the short list to read first, but it drops real SVs that only one caller found; see [step 22](../22-survivor-merge.md#limitations). +`${SAMPLE}/sv_merged/${SAMPLE}_sv_consensus.vcf.gz` keeps the SVs that two or more callers found (Manta, Delly, CNVpytor and, when they ran, Sniffles2 and TIDDIT): SURVIVOR pairs two calls when both breakpoints lie within 1 kb of each other and their type and strands agree. `SUPP` says how many callers found each one and `SUPP_VEC` which. `SUPP` is caller agreement, not validation. GRIDSS is left out of the SV consensus: nothing here turns its breakend pairs into DEL, DUP or INV events. Its high-confidence calls are in `${SAMPLE}/sv_gridss/${SAMPLE}_gridss.high.vcf.gz` ([step 4b](../04b-gridss.md#quality-filtering)). The consensus is the short list to read first, but it drops real SVs that only one caller found; see [step 22](../22-survivor-merge.md#limitations). Never run AnnotSV on it: its sample columns are the callers and its positions are SURVIVOR's. The reports already join its support onto AnnotSV's class 4 and 5 SVs ([step 5](../05-annotsv.md)). ### AnnotSV Output diff --git a/docs/tool-rationale.md b/docs/tool-rationale.md index 8461e0097..4c3178c61 100644 --- a/docs/tool-rationale.md +++ b/docs/tool-rationale.md @@ -144,7 +144,7 @@ Manta is the primary SV caller because: - **Best for inversions and balanced translocations.** Delly combines all three signal types (paired-end, split-read, read-depth) and is the most accurate caller for inversions (INV) and breakend events (BND). - **Higher sensitivity overall.** Delly calls more SVs than Manta (5,000-15,000 vs 3,000-5,000), catching events that Manta's more conservative filters miss. -- **Higher false positive rate.** The extra sensitivity comes with more false calls. This is why the pipeline uses multi-caller consensus (step 22) rather than trusting any single caller. +- **Higher false positive rate.** The extra sensitivity comes with more false calls. Step 22 marks the calls that two or more callers agree on, and the reports show that support. Agreement with Manta is not independent proof: both callers read split and paired reads. ### CNVpytor: strengths and role @@ -170,7 +170,7 @@ Manta is the primary SV caller because: | Large CNV focus | CNVpytor alone or CNVpytor + Manta | | Inversions / translocations | Delly (strongest for these SV types) | -The consensus merge (step 22) keeps only SVs called by two or more callers, reducing false positives at the cost of losing some real single-caller-only events. For more thorough SV analysis, consider also running AnnotSV (step 5) on the consensus set. +The consensus merge (step 22) keeps only SVs called by two or more callers, which removes many single-caller artefacts at the cost of losing some real single-caller-only events. It reports caller agreement, not validation. AnnotSV (step 5) annotates the callers' own calls, and the reports join the consensus support onto them; never run AnnotSV on the consensus VCF, whose sample columns are the callers. --- diff --git a/scripts/22-survivor-merge.sh b/scripts/22-survivor-merge.sh index 077a6e1e8..51c64e7a8 100755 --- a/scripts/22-survivor-merge.sh +++ b/scripts/22-survivor-merge.sh @@ -11,8 +11,15 @@ # # Inputs, each used when it exists (two or more are needed): Manta (step 04), # Delly (19), CNVpytor (18), TIDDIT (04a) and Sniffles2 (04c). GRIDSS (04b) is -# left out: it reports every event as a pair of breakends (SVTYPE=BND), which -# never match the DEL, DUP and INV records of the other callers. +# left out: it reports every event as a pair of breakends (SVTYPE=BND), and +# nothing here turns a pair into one DEL, DUP or INV. SURVIVOR 1.0.7 counts BND +# as the same type as INV and TRA, so its breakends would pair with the other +# callers' inversions and translocations and count as votes for an event GRIDSS +# never typed. +# +# SUPP counts callers that agree, not independent proof: Manta and Delly both +# read split and paired reads, so they share alignment errors. AnnotSV (step 05) +# annotates the callers' own calls; the reports join SUPP onto them. set -euo pipefail SAMPLE=${1:?Usage: $0 } @@ -33,6 +40,8 @@ echo " Step 22: SV consensus (SURVIVOR merge)" echo " Sample: ${SAMPLE}" echo " Output: ${OUT}" echo "============================================" +echo "SUPP is caller agreement, not validation: Manta and Delly read the same split and" +echo " paired reads. Annotate the callers' own calls (step 05), not this file." echo "" # CNVpytor's own table, when step 18 left no VCF: one DEL or DUP record per @@ -98,7 +107,7 @@ for c in "${CALLERS[@]}"; do USED+=("$name") done if [ -f "${S}/sv_gridss/${SAMPLE}_gridss.vcf.gz" ]; then - echo " [--] gridss: left out, its breakend (BND) records do not match the other callers' DEL, DUP and INV" + echo " [--] gridss: left out of the SV consensus: its breakend pairs (BND) are not turned into DEL, DUP or INV events" fi echo "" @@ -134,6 +143,8 @@ echo " Callers (SUPP_VEC order): ${USED[*]}" echo " Consensus SVs (2+ callers): ${COUNT}" echo " Output: ${OUT}" echo "============================================" +echo "SUPP is caller agreement, not validation: Manta and Delly read the same split and" +echo " paired reads. Annotate the callers' own calls (step 05), not this file." echo "By support (SUPP_VEC: one digit per caller above):" run_in "$BCFTOOLS_IMAGE" bcftools query -f '%INFO/SVTYPE\t%INFO/SUPP_VEC\n' "$(cpath "$OUT")" \ | sort | uniq -c | sort -rn | head -20 From 93a8baf4d2bba58dd2fec4054b058940c7721817 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:32:47 +0100 Subject: [PATCH 035/110] docs(changelog): GRIDSS high-confidence file and the SV consensus wording Bead: sv-14 Bead: sv-15 Bead: sv-16 Bead: sv-12 Bead: D14 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..95019d443 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 4b (GRIDSS) now writes the calls GRIDSS rates high confidence to `sv_gridss/_gridss.high.vcf.gz`, with its index: `QUAL >= 1000` with assembly support on both sides of the breakpoint (`INFO/AS > 0` and `INFO/RAS > 0`), filtered with the pinned bcftools. The step printed that rule as advice and never applied it. The raw `_gridss.vcf.gz` stays as GRIDSS wrote it. When the raw VCF already exists, the step skips GRIDSS and writes the new file from it. The file is a new stable output in the output contract; no existing output changes. The step also said that step 22 "converts and integrates" GRIDSS's calls. Step 22 leaves them out of the SV consensus, and the step now says so. The reason given for leaving them out was wrong too: SURVIVOR 1.0.7 lets a breakend match another caller's inversion or translocation, so GRIDSS's breakends would count as votes for events it never typed. The SV docs now call the consensus caller agreement, not validation, since Manta and Delly read the same split and paired reads, and say never to run AnnotSV on the consensus VCF: AnnotSV annotates the callers' own calls, and the reports join the consensus support onto them. `tests/fake-docker/bash-step-sv.sh` checks the message and the bcftools filter. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. From 5938c2202a0cb58e6b5f553762efcac9dbbf3fc0 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:42:36 +0100 Subject: [PATCH 036/110] fix(qc): og qc sample marks thin identity and contamination evidence og qc sample wrote a clean-looking verdict whatever the evidence behind it: a single sample with no comparator, a somalier run on a few hundred sites, and a FREEMIX that VerifyBamID2 estimated with its marker check skipped or from a few thousand markers. The table gains five rows after same_person_as (none renamed or removed): verifybamid2_markers (new --verifybamid2-markers N), contamination_confidence and its reason (uncertain on a skipped check or fewer than 5,000 markers), identity and its reason (uncertain below 1,000 informative sites, the sample's own or a pair's shared n; not_checked with no other sample; checked otherwise). The parity goldens of the qc-sample cases record the new rows on purpose. Bead: lin-30 Bead: lin-31 Bead: plat-61 --- rust/crates/og-summary/src/qc.rs | 154 +++++++++++++- rust/crates/og-summary/src/qc/tests.rs | 201 +++++++++++++++++- .../golden/qc-sample/contaminated/q.tsv | 26 +++ .../golden/qc-sample/contaminated/stdout | 25 +++ tests/parity/golden/qc-sample/crlf/q.tsv | 26 +++ tests/parity/golden/qc-sample/crlf/stdout | 25 +++ tests/parity/golden/qc-sample/female/q.tsv | 26 +++ tests/parity/golden/qc-sample/female/stdout | 25 +++ tests/parity/golden/qc-sample/gzip/q.tsv | 26 +++ tests/parity/golden/qc-sample/gzip/stdout | 25 +++ .../golden/qc-sample/low-quality-nan/q.tsv | 26 +++ .../golden/qc-sample/low-quality-nan/stdout | 25 +++ .../parity/golden/qc-sample/low-quality/q.tsv | 26 +++ .../golden/qc-sample/low-quality/stdout | 25 +++ tests/parity/golden/qc-sample/male-ok/q.tsv | 26 +++ tests/parity/golden/qc-sample/male-ok/stdout | 25 +++ tests/parity/golden/qc-sample/mismatch/q.tsv | 26 +++ tests/parity/golden/qc-sample/mismatch/stdout | 25 +++ .../golden/qc-sample/no-declared-sex/q.tsv | 26 +++ .../golden/qc-sample/no-declared-sex/stdout | 25 +++ .../golden/qc-sample/pedigree-female/q.tsv | 26 +++ .../golden/qc-sample/pedigree-female/stdout | 25 +++ .../golden/qc-sample/pedigree-kept/q.tsv | 26 +++ .../golden/qc-sample/pedigree-kept/stdout | 25 +++ .../golden/qc-sample/somalier-name/q.tsv | 26 +++ .../golden/qc-sample/somalier-name/stdout | 25 +++ .../golden/qc-sample/threshold-sci/q.tsv | 26 +++ .../golden/qc-sample/threshold-sci/stdout | 25 +++ .../golden/qc-sample/x-and-y-undeclared/q.tsv | 26 +++ .../qc-sample/x-and-y-undeclared/stdout | 25 +++ .../golden/qc-sample/x-and-y-unknown/q.tsv | 26 +++ .../golden/qc-sample/x-and-y-unknown/stdout | 25 +++ tests/parity/golden/qc-sample/x-and-y/q.tsv | 26 +++ tests/parity/golden/qc-sample/x-and-y/stdout | 25 +++ 34 files changed, 1165 insertions(+), 6 deletions(-) create mode 100644 tests/parity/golden/qc-sample/contaminated/q.tsv create mode 100644 tests/parity/golden/qc-sample/contaminated/stdout create mode 100644 tests/parity/golden/qc-sample/crlf/q.tsv create mode 100644 tests/parity/golden/qc-sample/crlf/stdout create mode 100644 tests/parity/golden/qc-sample/female/q.tsv create mode 100644 tests/parity/golden/qc-sample/female/stdout create mode 100644 tests/parity/golden/qc-sample/gzip/q.tsv create mode 100644 tests/parity/golden/qc-sample/gzip/stdout create mode 100644 tests/parity/golden/qc-sample/low-quality-nan/q.tsv create mode 100644 tests/parity/golden/qc-sample/low-quality-nan/stdout create mode 100644 tests/parity/golden/qc-sample/low-quality/q.tsv create mode 100644 tests/parity/golden/qc-sample/low-quality/stdout create mode 100644 tests/parity/golden/qc-sample/male-ok/q.tsv create mode 100644 tests/parity/golden/qc-sample/male-ok/stdout create mode 100644 tests/parity/golden/qc-sample/mismatch/q.tsv create mode 100644 tests/parity/golden/qc-sample/mismatch/stdout create mode 100644 tests/parity/golden/qc-sample/no-declared-sex/q.tsv create mode 100644 tests/parity/golden/qc-sample/no-declared-sex/stdout create mode 100644 tests/parity/golden/qc-sample/pedigree-female/q.tsv create mode 100644 tests/parity/golden/qc-sample/pedigree-female/stdout create mode 100644 tests/parity/golden/qc-sample/pedigree-kept/q.tsv create mode 100644 tests/parity/golden/qc-sample/pedigree-kept/stdout create mode 100644 tests/parity/golden/qc-sample/somalier-name/q.tsv create mode 100644 tests/parity/golden/qc-sample/somalier-name/stdout create mode 100644 tests/parity/golden/qc-sample/threshold-sci/q.tsv create mode 100644 tests/parity/golden/qc-sample/threshold-sci/stdout create mode 100644 tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv create mode 100644 tests/parity/golden/qc-sample/x-and-y-undeclared/stdout create mode 100644 tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv create mode 100644 tests/parity/golden/qc-sample/x-and-y-unknown/stdout create mode 100644 tests/parity/golden/qc-sample/x-and-y/q.tsv create mode 100644 tests/parity/golden/qc-sample/x-and-y/stdout diff --git a/rust/crates/og-summary/src/qc.rs b/rust/crates/og-summary/src/qc.rs index fe63bb974..ef58104a9 100644 --- a/rust/crates/og-summary/src/qc.rs +++ b/rust/crates/og-summary/src/qc.rs @@ -15,8 +15,12 @@ //! declared sex. //! - FREEMIX above `--freemix-warn` (default 0.03) warns. //! - A relatedness of 0.9 or more is the same person (a duplicate or a swap). +//! - FREEMIX is `uncertain` when VerifyBamID2 skipped its marker check or +//! kept fewer than [`MIN_CONTAMINATION_MARKERS`] markers. +//! - Identity is `uncertain` below [`MIN_IDENTITY_SITES`] informative sites, +//! and `not_checked` when no other sample was there to compare with. //! -//! The table is `key\tvalue` with 20 rows in a fixed order; `og qc +//! The table is `key\tvalue` with 25 rows in a fixed order; `og qc //! sex-loss` appends its `mosaic_*` rows afterwards. Each row is echoed on //! stdout as ` key: value`. @@ -31,11 +35,21 @@ use std::io::Write; pub const FREEMIX_WARN: f64 = 0.03; /// somalier relatedness at or above this: the same person. pub const SAME_PERSON: f64 = 0.9; +/// Informative sites (genotyped by somalier, or shared by a pair) below +/// which identity is `uncertain`: about one in 18 of somalier's 17,766 +/// sites. A whole genome at 30x genotypes most of them; a sliced, targeted +/// or very shallow BAM falls below the floor. +pub const MIN_IDENTITY_SITES: i128 = 1000; +/// Markers VerifyBamID2 kept below which FREEMIX is `uncertain`: five times +/// the 1,000 its own marker check asks for, and half of the 10% of the +/// 100,000-marker panel that check also asks for. +pub const MIN_CONTAMINATION_MARKERS: u64 = 5000; const USAGE: &str = "usage: og qc sample --sample S --somalier-samples F [--somalier-pairs F] [--somalier-id ID] [--selfsm F] [--declared-sex {male,female,}] [--freemix-warn X] - [--marker-check {passed,skipped,}] --out F + [--marker-check {passed,skipped,}] [--verifybamid2-markers N] + --out F "; const OPTS: &[Opt] = &[ @@ -55,6 +69,7 @@ const OPTS: &[Opt] = &[ Kind::Choice(&["passed", "skipped", ""]), false, ), + Opt("--verifybamid2-markers", Kind::Value, false), Opt("--out", Kind::Value, true), ]; @@ -168,6 +183,9 @@ pub struct Inputs<'a> { pub freemix_warn: f64, pub somalier_id: Option<&'a str>, pub marker_check: &'a str, + /// The markers VerifyBamID2 kept (its log's "N SNP markers remained + /// after sanity check"), when known. + pub markers: Option, } /// The sex check: its word in the table and the reason. @@ -305,23 +323,133 @@ pub fn table(i: &Inputs) -> Result, String> { ("verifybamid2_marker_check", i.marker_check.to_owned()), ]); let mut same = Vec::new(); + // Other samples compared on enough shared sites, and on too few. + let (mut compared, mut thin) = (0usize, 0usize); if let Some(pairs) = i.pairs_tsv.filter(|s| !s.is_empty()) { for r in read_rows(pairs)? { let (a, b) = (cell(&r, "sample_a"), cell(&r, "sample_b")); let rel = num(cell(&r, "relatedness")); if (a == Some(sid) || b == Some(sid)) && a != b - && let Some(rel) = rel.filter(|&x| x >= SAME_PERSON) + && let Some(rel) = rel { - let other = if a == Some(sid) { b } else { a }; - same.push(format!("{} ({})", other.unwrap_or("None"), fixed(rel, 2))); + // `n`: the sites both samples have a genotype at (an older + // somalier without it: the sample's own sites decide). + match num(cell(&r, "n")) { + Some(n) if n < MIN_IDENTITY_SITES as f64 => thin += 1, + _ => compared += 1, + } + if rel >= SAME_PERSON { + let other = if a == Some(sid) { b } else { a }; + same.push(format!("{} ({})", other.unwrap_or("None"), fixed(rel, 2))); + } } } } out.push(("same_person_as", same.join(", "))); + let (confidence, confidence_why) = contamination_confidence(freemix, i.marker_check, i.markers); + let (identity, identity_why) = identity(sites, compared, thin); + out.extend([ + ( + "verifybamid2_markers", + i.markers.map_or_else(String::new, |m| m.to_string()), + ), + ("contamination_confidence", confidence.to_owned()), + ("contamination_confidence_reason", confidence_why), + ("identity", identity.to_owned()), + ("identity_reason", identity_why), + ]); Ok(out) } +/// How far FREEMIX can be trusted: `ok`, `uncertain`, or nothing when +/// VerifyBamID2 did not run; and why. +fn contamination_confidence( + freemix: Option, + marker_check: &str, + markers: Option, +) -> (&'static str, String) { + let floor = MIN_CONTAMINATION_MARKERS; + if freemix.is_none() { + return ("", String::new()); + } + match (marker_check, markers) { + ("skipped", Some(m)) => ( + "uncertain", + format!( + "VerifyBamID2 skipped its marker check and estimated FREEMIX from {m} markers; a firm estimate needs {}", + thousands(floor) + ), + ), + ("skipped", None) => ( + "uncertain", + "VerifyBamID2 skipped its marker check: fewer than 1,000 markers had reads".to_owned(), + ), + (_, Some(m)) if m < floor => ( + "uncertain", + format!( + "FREEMIX rests on {m} markers; a firm estimate needs {}", + thousands(floor) + ), + ), + (_, Some(m)) => ("ok", format!("FREEMIX rests on {m} markers")), + ("passed", None) => ("ok", "VerifyBamID2's marker check passed".to_owned()), + (_, None) => ( + "uncertain", + "the number of markers FREEMIX rests on is not known".to_owned(), + ), + } +} + +/// Whether the reads were checked against another sample: `checked`, +/// `uncertain` (too few informative sites) or `not_checked` (nothing to +/// compare with); and why. `compared` and `thin` count the other samples +/// of the run with at least, and with fewer than, [`MIN_IDENTITY_SITES`] +/// shared sites. +fn identity(sites: i128, compared: usize, thin: usize) -> (&'static str, String) { + let floor = thousands(MIN_IDENTITY_SITES as u64); + if sites < MIN_IDENTITY_SITES { + return ( + "uncertain", + format!( + "somalier genotyped {sites} sites; telling one person from another needs {floor}" + ), + ); + } + if compared > 0 { + let s = if compared == 1 { "" } else { "s" }; + return ( + "checked", + format!( + "compared with {compared} other sample{s} of the run on {floor} or more shared sites" + ), + ); + } + if thin > 0 { + return ( + "uncertain", + format!("the other samples of the run share fewer than {floor} sites with this one"), + ); + } + ( + "not_checked", + "no other sample in the somalier run to compare with: the sex check is the only identity check".to_owned(), + ) +} + +/// `n` with a comma between thousands: 5000 is `5,000`. +fn thousands(n: u64) -> String { + let d = n.to_string(); + let mut out = String::new(); + for (k, c) in d.chars().enumerate() { + if k > 0 && (d.len() - k).is_multiple_of(3) { + out.push(','); + } + out.push(c); + } + out +} + /// `og qc sample ARGS`: the exit code. pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { let a = match args::parse(argv, OPTS) { @@ -347,6 +475,21 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { } }, }; + let markers = match a.get("--verifybamid2-markers").filter(|s| !s.is_empty()) { + None => None, + Some(s) => match s.parse::() { + Ok(v) => Some(v), + Err(_) => { + let _ = write!(err, "{USAGE}"); + let _ = writeln!( + err, + "og qc sample: error: argument --verifybamid2-markers: invalid int value: {}", + crate::repr(s) + ); + return 2; + } + }, + }; let inputs = Inputs { sample: a.text("--sample"), samples_tsv: a.text("--somalier-samples"), @@ -356,6 +499,7 @@ pub fn cli(argv: &[String], out: &mut impl Write, err: &mut impl Write) -> u8 { freemix_warn, somalier_id: a.get("--somalier-id"), marker_check: a.text("--marker-check"), + markers, }; let mut run = || -> Result<(), String> { let rows = table(&inputs)?; diff --git a/rust/crates/og-summary/src/qc/tests.rs b/rust/crates/og-summary/src/qc/tests.rs index 2e361fd4a..0702ecdb2 100644 --- a/rust/crates/og-summary/src/qc/tests.rs +++ b/rust/crates/og-summary/src/qc/tests.rs @@ -195,6 +195,8 @@ fn the_table_byte_for_byte() { "male", "--marker-check", "passed", + "--verifybamid2-markers", + "3000", "--out", &out, ], @@ -204,7 +206,10 @@ fn the_table_byte_for_byte() { sex_check_reason\tdeclared male, somalier infers male\nsites_genotyped\t120\ndepth_at_sites\t30.0\n\ x_sites\t39\nx_het\t0\nx_hom_alt\t39\nx_depth_ratio\t0.50\ny_sites\t5\ny_depth_ratio\t0.47\n\ freemix\t0.0412\nfreemix_warn_above\t0.03\ncontamination\twarn\npanel_markers\t10000\n\ -verifybamid2_marker_check\tpassed\nsame_person_as\tT (0.95), U (0.99)\n"; +verifybamid2_marker_check\tpassed\nsame_person_as\tT (0.95), U (0.99)\n\ +verifybamid2_markers\t3000\ncontamination_confidence\tuncertain\n\ +contamination_confidence_reason\tFREEMIX rests on 3000 markers; a firm estimate needs 5,000\n\ +identity\tuncertain\nidentity_reason\tsomalier genotyped 120 sites; telling one person from another needs 1,000\n"; assert_eq!(d.read("out.tsv"), want); let echoed: String = want .lines() @@ -304,3 +309,197 @@ fn unreadable_inputs_exit_1_with_a_message() { assert!(err.contains("invalid float value: 'x'"), "{err}"); assert!(!std::path::Path::new(&out).exists()); } + +/// The verdict for `samples` (one row, sample S) with `pairs` and the +/// VerifyBamID2 inputs, as a map. +fn evidence( + samples: &str, + pairs: Option<&str>, + selfsm: bool, + marker_check: &str, + markers: Option, +) -> HashMap<&'static str, String> { + let d = Dir::new("qc-evidence"); + let s = d.put("s.samples.tsv", samples); + let p = pairs.map(|p| d.put("s.pairs.tsv", p)); + let sm = selfsm.then(|| { + d.put( + "s.selfSM", + "#SEQ_ID\tRG\tCHIP_ID\t#SNPS\t#READS\tAVG_DP\tFREEMIX\nS\tNA\tNA\t100000\t5000\t2.1\t0.0050\n", + ) + }); + let i = Inputs { + sample: "S", + samples_tsv: &s, + pairs_tsv: p.as_deref(), + selfsm: sm.as_deref(), + freemix_warn: FREEMIX_WARN, + marker_check, + markers, + ..Inputs::default() + }; + table(&i).unwrap().into_iter().collect() +} + +/// A somalier row for S with these genotype counts. +fn sites(hom_ref: u32, het: u32, hom_alt: u32) -> String { + samples(&MALE).replace( + "\t60\t40\t20\t", + &format!("\t{hom_ref}\t{het}\t{hom_alt}\t"), + ) +} + +const PAIRS: &str = "#sample_a\tsample_b\trelatedness\tibs0\tibs2\tn\n"; + +#[test] +fn identity_on_300_sites_is_uncertain() { + // 300 informative sites: a sliced or very shallow BAM. + let t = evidence(&sites(100, 120, 80), None, false, "", None); + assert_eq!(t["sites_genotyped"], "300"); + assert_eq!(t["identity"], "uncertain"); + assert_eq!( + t["identity_reason"], + "somalier genotyped 300 sites; telling one person from another needs 1,000" + ); + // Also with another sample on the run that shares many sites. + let pairs = format!("{PAIRS}S\tT\t0.02\t40\t300\t300\n"); + let t = evidence(&sites(100, 120, 80), Some(&pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + // 999 is below the floor, 1,000 is at it. + let t = evidence(&sites(333, 333, 333), None, false, "", None); + assert_eq!(t["identity"], "uncertain"); + let t = evidence(&sites(334, 333, 333), None, false, "", None); + assert_eq!(t["identity"], "not_checked"); +} + +#[test] +fn identity_needs_another_sample_on_enough_shared_sites() { + let many = sites(5000, 6000, 4000); + // One sample alone: nothing to compare with. + let t = evidence(&many, None, false, "", None); + assert_eq!(t["identity"], "not_checked"); + assert!(t["identity_reason"].contains("no other sample"), "{t:?}"); + let t = evidence(&many, Some(PAIRS), false, "", None); + assert_eq!(t["identity"], "not_checked"); + // A pair that shares 12,000 sites is a comparison; one of 300 is not. + let pairs = format!("{PAIRS}S\tT\t0.02\t40\t300\t12000\nU\tS\t0.5\t0\t300\t300\n"); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!(t["identity"], "checked"); + assert_eq!( + t["identity_reason"], + "compared with 1 other sample of the run on 1,000 or more shared sites" + ); + let pairs = format!("{PAIRS}U\tS\t0.97\t0\t300\t300\nS\tV\t0.1\t0\t300\t999\n"); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + assert!(t["identity_reason"].contains("fewer than 1,000"), "{t:?}"); + // The same-person flag still shows; the identity row says it is thin. + assert_eq!(t["same_person_as"], "U (0.97)"); + // An older pairs table without n, and a pair whose relatedness is nan. + let pairs = "#sample_a\tsample_b\trelatedness\nS\tT\t0.1\nS\tU\t0.2\nW\tS\tnan\nS\tS\t1.0\n"; + let t = evidence(&many, Some(pairs), false, "", None); + assert_eq!( + (t["identity"].as_str(), t["identity_reason"].as_str()), + ( + "checked", + "compared with 2 other samples of the run on 1,000 or more shared sites" + ) + ); +} + +#[test] +fn contamination_on_fewer_than_5000_markers_is_uncertain() { + let many = sites(5000, 6000, 4000); + // The marker check passed, yet only 4,999 markers were kept. + let t = evidence(&many, None, true, "passed", Some(4999)); + assert_eq!(t["contamination"], "ok"); + assert_eq!(t["verifybamid2_markers"], "4999"); + assert_eq!(t["contamination_confidence"], "uncertain"); + assert_eq!( + t["contamination_confidence_reason"], + "FREEMIX rests on 4999 markers; a firm estimate needs 5,000" + ); + let t = evidence(&many, None, true, "passed", Some(5000)); + assert_eq!( + ( + t["contamination_confidence"].as_str(), + t["contamination_confidence_reason"].as_str() + ), + ("ok", "FREEMIX rests on 5000 markers") + ); + // Relaxed mode: uncertain whatever the count. + for markers in [Some(320), Some(60000), None] { + let t = evidence(&many, None, true, "skipped", markers); + assert_eq!(t["contamination_confidence"], "uncertain", "{markers:?}"); + assert!( + t["contamination_confidence_reason"].contains("skipped its marker check"), + "{t:?}" + ); + } + // A passed check with no count: VerifyBamID2's own floor held. + let t = evidence(&many, None, true, "passed", None); + assert_eq!(t["contamination_confidence"], "ok"); + assert_eq!(t["verifybamid2_markers"], ""); + // Neither the check nor the count known. + let t = evidence(&many, None, true, "", None); + assert_eq!(t["contamination_confidence"], "uncertain"); + // VerifyBamID2 did not run: no confidence either way. + let t = evidence(&many, None, false, "", Some(320)); + assert_eq!( + ( + t["contamination"].as_str(), + t["contamination_confidence"].as_str(), + t["contamination_confidence_reason"].as_str() + ), + ("not_run", "", "") + ); +} + +#[test] +fn the_markers_option() { + let d = Dir::new("qc-markers"); + let samples = d.put("s.tsv", samples(&MALE)); + let selfsm = d.put("s.selfSM", "#SEQ_ID\tFREEMIX\nS\t0.001\n"); + let out = d.path("o.tsv"); + let go = |m: &str| { + run( + cli, + &[ + "--sample", + "S", + "--somalier-samples", + &samples, + "--selfsm", + &selfsm, + "--marker-check", + "passed", + "--verifybamid2-markers", + m, + "--out", + &out, + ], + ) + }; + // Empty: the log had no count. + let (code, stdout, _) = go(""); + assert_eq!(code, 0); + assert!( + stdout.contains(" verifybamid2_markers: \n contamination_confidence: ok\n"), + "{stdout}" + ); + let (code, _, stderr) = go("many"); + assert_eq!(code, 2); + assert!( + stderr.contains("argument --verifybamid2-markers: invalid int value: 'many'"), + "{stderr}" + ); +} + +#[test] +fn thousands_has_commas() { + assert_eq!(thousands(0), "0"); + assert_eq!(thousands(999), "999"); + assert_eq!(thousands(1000), "1,000"); + assert_eq!(thousands(17766), "17,766"); + assert_eq!(thousands(1234567), "1,234,567"); +} diff --git a/tests/parity/golden/qc-sample/contaminated/q.tsv b/tests/parity/golden/qc-sample/contaminated/q.tsv new file mode 100644 index 000000000..889b064a7 --- /dev/null +++ b/tests/parity/golden/qc-sample/contaminated/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix 0.0412 +freemix_warn_above 0.04 +contamination warn +panel_markers 10000 +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence uncertain +contamination_confidence_reason the number of markers FREEMIX rests on is not known +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/contaminated/stdout b/tests/parity/golden/qc-sample/contaminated/stdout new file mode 100644 index 000000000..386b01aad --- /dev/null +++ b/tests/parity/golden/qc-sample/contaminated/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: 0.0412 + freemix_warn_above: 0.04 + contamination: warn + panel_markers: 10000 + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: uncertain + contamination_confidence_reason: the number of markers FREEMIX rests on is not known + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/crlf/q.tsv b/tests/parity/golden/qc-sample/crlf/q.tsv new file mode 100644 index 000000000..c777ae4e2 --- /dev/null +++ b/tests/parity/golden/qc-sample/crlf/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex male +sex_check ok +sex_check_reason declared male, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/crlf/stdout b/tests/parity/golden/qc-sample/crlf/stdout new file mode 100644 index 000000000..ded245023 --- /dev/null +++ b/tests/parity/golden/qc-sample/crlf/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: male + sex_check: ok + sex_check_reason: declared male, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/female/q.tsv b/tests/parity/golden/qc-sample/female/q.tsv new file mode 100644 index 000000000..8c9544309 --- /dev/null +++ b/tests/parity/golden/qc-sample/female/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex female +sex_check ok +sex_check_reason declared female, somalier infers female +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.00 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check skipped +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/female/stdout b/tests/parity/golden/qc-sample/female/stdout new file mode 100644 index 000000000..28b0a1598 --- /dev/null +++ b/tests/parity/golden/qc-sample/female/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: female + sex_check: ok + sex_check_reason: declared female, somalier infers female + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.00 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: skipped + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/gzip/q.tsv b/tests/parity/golden/qc-sample/gzip/q.tsv new file mode 100644 index 000000000..aa55d3cef --- /dev/null +++ b/tests/parity/golden/qc-sample/gzip/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/gzip/stdout b/tests/parity/golden/qc-sample/gzip/stdout new file mode 100644 index 000000000..89fef7d34 --- /dev/null +++ b/tests/parity/golden/qc-sample/gzip/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality-nan/q.tsv b/tests/parity/golden/qc-sample/low-quality-nan/q.tsv new file mode 100644 index 000000000..bf2af7a32 --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality-nan/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id U +declared_sex male +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality-nan/stdout b/tests/parity/golden/qc-sample/low-quality-nan/stdout new file mode 100644 index 000000000..96b18ade5 --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality-nan/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: U + declared_sex: male + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality/q.tsv b/tests/parity/golden/qc-sample/low-quality/q.tsv new file mode 100644 index 000000000..9433cdd08 --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/low-quality/stdout b/tests/parity/golden/qc-sample/low-quality/stdout new file mode 100644 index 000000000..da94d7caa --- /dev/null +++ b/tests/parity/golden/qc-sample/low-quality/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 39 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/male-ok/q.tsv b/tests/parity/golden/qc-sample/male-ok/q.tsv new file mode 100644 index 000000000..b45297c6c --- /dev/null +++ b/tests/parity/golden/qc-sample/male-ok/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex male +sex_check ok +sex_check_reason declared male, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix 0.0012 +freemix_warn_above 0.03 +contamination ok +panel_markers 10000 +verifybamid2_marker_check passed +same_person_as T (0.95), U (0.99) +verifybamid2_markers +contamination_confidence ok +contamination_confidence_reason VerifyBamID2's marker check passed +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/male-ok/stdout b/tests/parity/golden/qc-sample/male-ok/stdout new file mode 100644 index 000000000..c5e1f01b9 --- /dev/null +++ b/tests/parity/golden/qc-sample/male-ok/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: male + sex_check: ok + sex_check_reason: declared male, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: 0.0012 + freemix_warn_above: 0.03 + contamination: ok + panel_markers: 10000 + verifybamid2_marker_check: passed + same_person_as: T (0.95), U (0.99) + verifybamid2_markers: + contamination_confidence: ok + contamination_confidence_reason: VerifyBamID2's marker check passed + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/mismatch/q.tsv b/tests/parity/golden/qc-sample/mismatch/q.tsv new file mode 100644 index 000000000..2953690ee --- /dev/null +++ b/tests/parity/golden/qc-sample/mismatch/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex male +sex_check mismatch +sex_check_reason declared female, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/mismatch/stdout b/tests/parity/golden/qc-sample/mismatch/stdout new file mode 100644 index 000000000..d48d0cc64 --- /dev/null +++ b/tests/parity/golden/qc-sample/mismatch/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: male + sex_check: mismatch + sex_check_reason: declared female, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/no-declared-sex/q.tsv b/tests/parity/golden/qc-sample/no-declared-sex/q.tsv new file mode 100644 index 000000000..aa55d3cef --- /dev/null +++ b/tests/parity/golden/qc-sample/no-declared-sex/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/no-declared-sex/stdout b/tests/parity/golden/qc-sample/no-declared-sex/stdout new file mode 100644 index 000000000..89fef7d34 --- /dev/null +++ b/tests/parity/golden/qc-sample/no-declared-sex/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-female/q.tsv b/tests/parity/golden/qc-sample/pedigree-female/q.tsv new file mode 100644 index 000000000..2953690ee --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-female/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex male +sex_check mismatch +sex_check_reason declared female, somalier infers male +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-female/stdout b/tests/parity/golden/qc-sample/pedigree-female/stdout new file mode 100644 index 000000000..d48d0cc64 --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-female/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: male + sex_check: mismatch + sex_check_reason: declared female, somalier infers male + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-kept/q.tsv b/tests/parity/golden/qc-sample/pedigree-kept/q.tsv new file mode 100644 index 000000000..52aa8f6c9 --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-kept/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex male +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 2 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 2 +x_het 0 +x_hom_alt 2 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/pedigree-kept/stdout b/tests/parity/golden/qc-sample/pedigree-kept/stdout new file mode 100644 index 000000000..b1d245627 --- /dev/null +++ b/tests/parity/golden/qc-sample/pedigree-kept/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: male + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 2 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 2 + x_het: 0 + x_hom_alt: 2 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/somalier-name/q.tsv b/tests/parity/golden/qc-sample/somalier-name/q.tsv new file mode 100644 index 000000000..0d5ed2139 --- /dev/null +++ b/tests/parity/golden/qc-sample/somalier-name/q.tsv @@ -0,0 +1,26 @@ +key value +sample X +somalier_id T +declared_sex +inferred_sex female +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as S (0.95), U (0.99) +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/somalier-name/stdout b/tests/parity/golden/qc-sample/somalier-name/stdout new file mode 100644 index 000000000..7a6d5f73f --- /dev/null +++ b/tests/parity/golden/qc-sample/somalier-name/stdout @@ -0,0 +1,25 @@ + sample: X + somalier_id: T + declared_sex: + inferred_sex: female + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: S (0.95), U (0.99) + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/threshold-sci/q.tsv b/tests/parity/golden/qc-sample/threshold-sci/q.tsv new file mode 100644 index 000000000..8d0e7bd49 --- /dev/null +++ b/tests/parity/golden/qc-sample/threshold-sci/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex male +sex_check not_checked +sex_check_reason no declared sex +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 39 +x_het 0 +x_hom_alt 39 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix 0.0412 +freemix_warn_above 0.05 +contamination ok +panel_markers 10000 +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence uncertain +contamination_confidence_reason the number of markers FREEMIX rests on is not known +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/threshold-sci/stdout b/tests/parity/golden/qc-sample/threshold-sci/stdout new file mode 100644 index 000000000..bb863410a --- /dev/null +++ b/tests/parity/golden/qc-sample/threshold-sci/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: male + sex_check: not_checked + sex_check_reason: no declared sex + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 39 + x_het: 0 + x_hom_alt: 39 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: 0.0412 + freemix_warn_above: 0.05 + contamination: ok + panel_markers: 10000 + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: uncertain + contamination_confidence_reason: the number of markers FREEMIX rests on is not known + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv b/tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv new file mode 100644 index 000000000..9d1a54c10 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-undeclared/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex +inferred_sex unknown +sex_check not_checked +sex_check_reason chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-undeclared/stdout b/tests/parity/golden/qc-sample/x-and-y-undeclared/stdout new file mode 100644 index 000000000..fca49020b --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-undeclared/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv b/tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv new file mode 100644 index 000000000..032b3a829 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-unknown/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex unknown +sex_check not_checked +sex_check_reason somalier could not tell the sex from 4 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 4 +x_het 0 +x_hom_alt 4 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y-unknown/stdout b/tests/parity/golden/qc-sample/x-and-y-unknown/stdout new file mode 100644 index 000000000..e12a601cb --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y-unknown/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: somalier could not tell the sex from 4 chrX sites (it needs more than 10 with reads, and allele balances that look like one person) + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 4 + x_het: 0 + x_hom_alt: 4 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y/q.tsv b/tests/parity/golden/qc-sample/x-and-y/q.tsv new file mode 100644 index 000000000..801ea9177 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y/q.tsv @@ -0,0 +1,26 @@ +key value +sample S +somalier_id S +declared_sex female +inferred_sex unknown +sex_check not_checked +sex_check_reason chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample +sites_genotyped 120 +depth_at_sites 30.0 +x_sites 40 +x_het 20 +x_hom_alt 20 +x_depth_ratio 0.50 +y_sites 5 +y_depth_ratio 0.47 +freemix +freemix_warn_above 0.03 +contamination not_run +panel_markers +verifybamid2_marker_check +same_person_as +verifybamid2_markers +contamination_confidence +contamination_confidence_reason +identity uncertain +identity_reason somalier genotyped 120 sites; telling one person from another needs 1,000 diff --git a/tests/parity/golden/qc-sample/x-and-y/stdout b/tests/parity/golden/qc-sample/x-and-y/stdout new file mode 100644 index 000000000..31d987381 --- /dev/null +++ b/tests/parity/golden/qc-sample/x-and-y/stdout @@ -0,0 +1,25 @@ + sample: S + somalier_id: S + declared_sex: female + inferred_sex: unknown + sex_check: not_checked + sex_check_reason: chrX is heterozygous like a female sample but chrY has reads: a sex-chromosome aneuploidy or a mixed sample + sites_genotyped: 120 + depth_at_sites: 30.0 + x_sites: 40 + x_het: 20 + x_hom_alt: 20 + x_depth_ratio: 0.50 + y_sites: 5 + y_depth_ratio: 0.47 + freemix: + freemix_warn_above: 0.03 + contamination: not_run + panel_markers: + verifybamid2_marker_check: + same_person_as: + verifybamid2_markers: + contamination_confidence: + contamination_confidence_reason: + identity: uncertain + identity_reason: somalier genotyped 120 sites; telling one person from another needs 1,000 From d5f2c8b529180f54a7a266b17acd3dc183911f01 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:42:36 +0100 Subject: [PATCH 037/110] fix(qc): pass VerifyBamID2's kept-marker count to the verdict VerifyBamID2's marker check logs "N SNP markers remained after sanity check"; the rerun with --DisableSanityCheck does not, so step 33 and the Nextflow VERIFYBAMID2 task read the count from the first run's log and pass it to og qc sample. In Nextflow it travels as the second line of .marker_check, so the workflow's channels stay as they are. The fake-docker case covers 42,000 markers (ok), 3,000 markers with the check passed (uncertain), the skipped check (uncertain, count kept from the first run) and 300 somalier sites (identity uncertain). The qc-1 e2e case checks the real VerifyBamID2 log gives a count on the fixture. Bead: lin-31 Bead: plat-61 Bead: lin-30 --- modules/local/somalier/main.nf | 23 ++++++++++++---------- modules/local/verifybamid2/main.nf | 17 +++++++++++----- scripts/33-sample-qc.sh | 21 ++++++++++++++++---- tests/e2e/qc-1-sample-qc.sh | 14 +++++++++++++- tests/fake-docker/qc-steps-33-34.sh | 30 +++++++++++++++++++++++++++-- 5 files changed, 83 insertions(+), 22 deletions(-) diff --git a/modules/local/somalier/main.nf b/modules/local/somalier/main.nf index 26af3cb47..09262ba81 100644 --- a/modules/local/somalier/main.nf +++ b/modules/local/somalier/main.nf @@ -17,15 +17,17 @@ SAMPLE_QC writes _sample_qc.tsv with og qc sample (rust/, bin/og on the task PATH; the rule scripts/33-sample-qc.sh runs too): somalier's sex against the samplesheet's, VERIFYBAMID2's FREEMIX against - --freemix_warn, and the other samples somalier finds to be the same - person. workflows/bam_analysis.nf stops the run on a sex mismatch - (--sex_check warn logs it), the check INDEXCOV makes from the BAM index, - made again from the reads. Then og qc sex-loss (rust/) adds the mosaic_* - rows: the share of cells that lost the Y (or one X), from MOSDEPTH's - windows (when mosdepth runs) and, for a woman, the VCF's chrX allele - fractions. SAMPLE_QC waits for the VCF, so on a FASTQ row somalier's sex - check reports after DEEPVARIANT; INDEXCOV's check still stops the run - before it. + --freemix_warn (uncertain on a skipped marker check or fewer than 5,000 + markers), and the other samples somalier finds to be the same person + (identity uncertain below 1,000 informative sites, not checked with no + other sample in the run). workflows/bam_analysis.nf stops the run on a + sex mismatch (--sex_check warn logs it), the check INDEXCOV makes from + the BAM index, made again from the reads. Then og qc sex-loss (rust/) + adds the mosaic_* rows: the share of cells that lost the Y (or one X), + from MOSDEPTH's windows (when mosdepth runs) and, for a woman, the + VCF's chrX allele fractions. SAMPLE_QC waits for the VCF, so on a FASTQ + row somalier's sex check reports after DEEPVARIANT; INDEXCOV's check + still stops the run before it. Equivalent to: scripts/33-sample-qc.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -161,7 +163,8 @@ process SAMPLE_QC { --selfsm ${selfsm} \\ --declared-sex "${meta.sex ?: ''}" \\ --freemix-warn ${params.freemix_warn} \\ - --marker-check "\$(cat ${marker_check})" \\ + --marker-check "\$(sed -n 1p ${marker_check})" \\ + --verifybamid2-markers "\$(sed -n 2p ${marker_check})" \\ --out ${meta.id}_sample_qc.tsv og qc sex-loss --table ${meta.id}_sample_qc.tsv ${mosaic_args} diff --git a/modules/local/verifybamid2/main.nf b/modules/local/verifybamid2/main.nf index 538f1de9d..e99b21076 100644 --- a/modules/local/verifybamid2/main.nf +++ b/modules/local/verifybamid2/main.nf @@ -9,8 +9,12 @@ than 1,000 markers have reads (a targeted or sliced BAM); the task then runs it again with --DisableSanityCheck and writes "skipped" to .marker_check, so the report says the marker check was skipped. - SAMPLE_QC compares FREEMIX with --freemix_warn; contamination never stops - the run. + The second line of .marker_check is the number of markers the check + kept ("N SNP markers remained after sanity check" in the first run's + log; the run without the check does not log it), empty when the log + has no such line. SAMPLE_QC compares FREEMIX with --freemix_warn and + calls it uncertain on a skipped check or fewer than 5,000 markers; + contamination never stops the run. Equivalent to: the VerifyBamID2 part of scripts/33-sample-qc.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -51,7 +55,10 @@ process VERIFYBAMID2 { --Output ${meta.id} --NumThread ${task.cpus} "\$@" > ${meta.id}.log 2>&1 } MARKER_CHECK=passed - if ! vb2; then + VB_RC=0 + vb2 || VB_RC=\$? + MARKERS=\$(sed -n '/SNP markers remained after sanity check/{s/.* \\([0-9][0-9]*\\) SNP markers remained.*/\\1/p;q;}' ${meta.id}.log) + if [ "\$VB_RC" -ne 0 ]; then if grep -q 'Insufficient Available markers' ${meta.id}.log; then echo "Fewer than 1,000 panel markers have reads: running again with --DisableSanityCheck" MARKER_CHECK=skipped @@ -61,7 +68,7 @@ process VERIFYBAMID2 { exit 1 fi fi - echo "\$MARKER_CHECK" > ${meta.id}.marker_check + printf '%s\\n%s\\n' "\$MARKER_CHECK" "\$MARKERS" > ${meta.id}.marker_check cat ${meta.id}.selfSM cat <<-END_VERSIONS > versions.yml @@ -72,7 +79,7 @@ process VERIFYBAMID2 { stub: """ - echo passed > ${meta.id}.marker_check + printf 'passed\\n100000\\n' > ${meta.id}.marker_check printf '#SEQ_ID\\tRG\\tCHIP_ID\\t#SNPS\\t#READS\\tAVG_DP\\tFREEMIX\\n%s\\tNA\\tNA\\t100000\\t1\\t30\\t0.001\\n' ${meta.id} > ${meta.id}.selfSM touch ${meta.id}.log diff --git a/scripts/33-sample-qc.sh b/scripts/33-sample-qc.sh index 57bf921e4..d6b689d3e 100755 --- a/scripts/33-sample-qc.sh +++ b/scripts/33-sample-qc.sh @@ -24,7 +24,10 @@ # as a one-line pedigree (--ped), so its own table and MultiQC show it beside # the sex from the reads; the verdict is still the sex from the reads alone. FREEMIX above FREEMIX_WARN # (default 0.03) is a warning only: contamination makes calls less reliable, -# it does not make them someone else's. +# it does not make them someone else's. On thin evidence the table says so: +# FREEMIX from fewer than 5,000 markers, or with VerifyBamID2's marker check +# skipped, is uncertain, and so is identity from fewer than 1,000 somalier +# sites; with no other sample to compare, identity is not checked. # A data problem in the mosaic estimate (og qc sex-loss) never stops the step # either (a missing og binary does): # below about 10% of the cells nothing can be told at 30x, and above it the @@ -133,7 +136,9 @@ done # --- 2. VerifyBamID2: contamination ---------------------------------------------- # VerifyBamID2 refuses to estimate when fewer than 1,000 panel markers have # reads (a targeted or sliced BAM). Then it runs again without that check, -# and the table says the marker check was skipped. +# and the table says the marker check was skipped. Its check logs how many +# markers it kept ("N SNP markers remained after sanity check"); the run +# without the check does not, so the count comes from the first run's log. echo "" echo "--- VerifyBamID2" VB_OUT="/genome/${SAMPLE}/qc/verifybamid2/${SAMPLE}" @@ -148,7 +153,10 @@ vb2() { --NumThread "$THREADS" "$@" > "$VB_LOG" 2>&1 } SANITY_CHECK=passed -if ! vb2; then +VB_RC=0 +vb2 || VB_RC=$? +MARKERS=$(sed -n '/SNP markers remained after sanity check/{s/.* \([0-9][0-9]*\) SNP markers remained.*/\1/p;q;}' "$VB_LOG") +if [ "$VB_RC" -ne 0 ]; then if grep -q 'Insufficient Available markers' "$VB_LOG"; then SANITY_CHECK=skipped echo "Fewer than 1,000 panel markers have reads; running again without VerifyBamID2's marker check." @@ -177,6 +185,7 @@ run_in -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$PYTHON_IMAGE" \ --declared-sex "$DECLARED_SEX" \ --freemix-warn "$FREEMIX_WARN" \ --marker-check "$SANITY_CHECK" \ + --verifybamid2-markers "$MARKERS" \ --out "/genome/${SAMPLE}/qc/${SAMPLE}_sample_qc.tsv" TABLE="${OUT}/${SAMPLE}_sample_qc.tsv" [ -s "$TABLE" ] || { echo "ERROR: no ${TABLE}" >&2; exit 1; } @@ -208,7 +217,10 @@ echo "Results: ${TABLE}" echo " somalier: ${OUT}/somalier/${SAMPLE}.samples.tsv, ${SAMPLE}.html" echo " VerifyBamID2: ${OUT}/verifybamid2/${SAMPLE}.selfSM" echo "" -echo "Contamination: FREEMIX $(val freemix) (VerifyBamID2's marker check ${SANITY_CHECK})" +echo "Contamination: FREEMIX $(val freemix) (VerifyBamID2's marker check ${SANITY_CHECK}, ${MARKERS:-an unknown number of} markers kept)" +if [ "$(val contamination_confidence)" = uncertain ]; then + echo " The estimate is uncertain: $(val contamination_confidence_reason)." +fi if [ "$(val contamination)" = warn ]; then echo "!!! FREEMIX $(val freemix) is above ${FREEMIX_WARN}: about $(awk -v f="$(val freemix)" 'BEGIN { printf "%d", f * 100 + 0.5 }')% of the reads may come" >&2 echo "!!! from another person. Calls, above all heterozygous ones, are less reliable; see docs/33-sample-qc.md." >&2 @@ -224,6 +236,7 @@ echo "Sex from the reads (somalier): $(val inferred_sex)" if [ -n "$(val same_person_as)" ]; then echo "!!! The same person as: $(val same_person_as)" >&2 fi +echo "Identity: $(val identity) ($(val identity_reason))" case "$(val sex_check)" in ok) echo " Declared sex: ${DECLARED_SEX}"; echo " Sex check: OK" ;; not_checked) echo " Sex check: not done ($(val sex_check_reason))" ;; diff --git a/tests/e2e/qc-1-sample-qc.sh b/tests/e2e/qc-1-sample-qc.sh index 349efa271..06f1d98d0 100755 --- a/tests/e2e/qc-1-sample-qc.sh +++ b/tests/e2e/qc-1-sample-qc.sh @@ -6,7 +6,9 @@ # somalier's chrX sites fall inside the slices, too few for a sex call, so # the step says it could not check the sex and goes on, also when male is # declared: somalier's table then carries male as the pedigree's sex, -# which the verdict does not take for a call; +# which the verdict does not take for a call. VerifyBamID2 keeps a few +# hundred markers there, so FREEMIX reads uncertain, with the count +# taken from the log of its first run; # - sex: with sites at the slice's own chrX calls (case 21; HG002 is male, # so somalier sees them homozygous), declared female stops the step, # somalier's own table shows the pedigree's female next to the male it @@ -70,6 +72,16 @@ check_eq "contamination verdict" "$(tval "$T" contamination)" ok check_eq "VerifyBamID2's marker check was skipped (the slices hold fewer than 1,000 markers)" \ "$(tval "$T" verifybamid2_marker_check)" skipped check "the log says why it ran again" has 'Fewer than 1,000 panel markers have reads' "$(cat "$STEP_LOG")" +MK=$(tval "$T" verifybamid2_markers) +check "VerifyBamID2's first run logged the markers it kept (${MK:-none})" above "$MK" 0 +check "fewer than the 1,000 its check asks for (${MK:-none})" below "$MK" 1000 +check_eq "so FREEMIX is uncertain" "$(tval "$T" contamination_confidence)" uncertain +check "and the step says so" has 'The estimate is uncertain: VerifyBamID2 skipped its marker check' "$(cat "$STEP_LOG")" +# One sample: identity is uncertain below 1,000 somalier sites, else not checked. +SITES_N=$(tval "$T" sites_genotyped) +WANT_ID=not_checked +below "$SITES_N" 1000 && WANT_ID=uncertain +check_eq "identity from ${SITES_N:-no} somalier sites and no other sample" "$(tval "$T" identity)" "$WANT_ID" check_eq "no declared sex: somalier's pedigree sex is unknown" "$(scol original_pedigree_sex)" unknown # Declared male on the same 2 chrX sites: somalier starts its sex column from diff --git a/tests/fake-docker/qc-steps-33-34.sh b/tests/fake-docker/qc-steps-33-34.sh index 4350e5ca4..86fe363a6 100755 --- a/tests/fake-docker/qc-steps-33-34.sh +++ b/tests/fake-docker/qc-steps-33-34.sh @@ -10,7 +10,10 @@ # tell is not checked either; # FREEMIX above 0.03 warns and exits 0; "Insufficient Available markers" # reruns VerifyBamID2 with --DisableSanityCheck and records it; any other -# VerifyBamID2 failure, or missing data, stops the step. +# VerifyBamID2 failure, or missing data, stops the step. The markers its +# check kept come from the first run's log: a skipped check, or fewer than +# 5,000 markers, reads uncertain; fewer than 1,000 somalier sites make +# identity uncertain, and one sample alone leaves it not checked. # Step 34: a CRAM whose flagstat differs from the BAM's, or that fails # quickcheck or its content checksum fails, is removed and the BAM kept; the BAM is # deleted only after the check passed; --restore refuses to write over a BAM @@ -53,14 +56,20 @@ case "$*" in ped_code=$(awk -F'\t' '{print $5; exit}' "$(host_path "$ped")") case "$ped_code" in 1) ped_sex=male ;; 2) ped_sex=female ;; *) ped_sex=unknown ;; esac fi - printf '#family_id\tsample_id\tpaternal_id\tmaternal_id\tsex\tphenotype\toriginal_pedigree_sex\tgt_depth_mean\tn_hom_ref\tn_het\tn_hom_alt\tX_depth_mean\tX_n\tX_hom_ref\tX_het\tX_hom_alt\tY_depth_mean\tY_n\n%s\t%s\t-9\t-9\t%s\t-9\t%s\t30.0\t5000\t6000\t4000\t15.0\t%s\t40\t%s\t260\t14.0\t17\n' \ + printf '#family_id\tsample_id\tpaternal_id\tmaternal_id\tsex\tphenotype\toriginal_pedigree_sex\tgt_depth_mean\tn_hom_ref\tn_het\tn_hom_alt\tX_depth_mean\tX_n\tX_hom_ref\tX_het\tX_hom_alt\tY_depth_mean\tY_n\n%s\t%s\t-9\t-9\t%s\t-9\t%s\t30.0\t%s\t%s\t%s\t15.0\t%s\t40\t%s\t260\t14.0\t17\n' \ "${FAKE_SM:-sample1}" "${FAKE_SM:-sample1}" "${FAKE_SOMALIER_SEX:-$ped_code}" "$ped_sex" \ + "${FAKE_HOM_REF:-5000}" "${FAKE_HET:-6000}" "${FAKE_HOM_ALT:-4000}" \ "${FAKE_X_N:-300}" "${FAKE_X_HET:-0}" > "${o}.samples.tsv" printf '#sample_a\tsample_b\trelatedness\n' > "${o}.pairs.tsv" ;; "verifybamid2 "*) FLAG=--Output; o=$(host_path "$(arg "$@")") case " $* " in *" --DisableSanityCheck "*) few=false ;; *) few=${FAKE_VB2_FEW:-false} ;; esac if [ -n "${FAKE_VB2_FAIL:-}" ]; then echo "Segmentation fault"; exit 139; fi + # As VerifyBamID2: only a run with its marker check logs the markers kept. + case " $* " in + *" --DisableSanityCheck "*) ;; + *) echo "NOTICE - $($few && echo 320 || echo "${FAKE_VB2_MARKERS:-42000}") SNP markers remained after sanity check." ;; + esac if $few; then echo "WARNING - Insufficient Available markers, check input bam depth"; exit 1; fi printf '#SEQ_ID\tRG\tCHIP_ID\t#SNPS\t#READS\tAVG_DP\tFREEMIX\n%s\tNA\tNA\t%s\t1\t30\t%s\n' \ "${FAKE_SM:-sample1}" "$([ "${FAKE_VB2_FEW:-false}" = true ] && echo 320 || echo 99000)" "${FAKE_FREEMIX:-0.004}" > "${o}.selfSM" ;; @@ -123,6 +132,20 @@ docker_log_has 'somalier relate --infer --ped /genome/sample1/qc/somalier/sample || fail "the pedigree does not hold the declared male: $(cat "${GENOME_DIR}/sample1/qc/somalier/sample1.declared.ped")" [ "$(tval contamination)" = ok ] || fail "FREEMIX 0.004 was not reported ok" [ "$(tval verifybamid2_marker_check)" = passed ] || fail "the marker check was not recorded as passed" +[ "$(tval verifybamid2_markers)" = 42000 ] || fail "the markers VerifyBamID2 kept were not read from its log: $(tval verifybamid2_markers)" +[ "$(tval contamination_confidence)" = ok ] || fail "FREEMIX on 42,000 markers was not ok: $(tval contamination_confidence)" +[ "$(tval identity)" = not_checked ] || fail "one sample alone was not left unchecked: $(tval identity)" +output_has qc-match 'Identity: not_checked \(no other sample in the somalier run' + +# A passed marker check that kept only 3,000 markers: FREEMIX is uncertain. +FAKE_VB2_MARKERS=3000 run_expect 0 qc-thin-markers "${SCRIPTS}/33-sample-qc.sh" sample1 +[ "$(tval contamination_confidence)" = uncertain ] || fail "FREEMIX on 3,000 markers was not uncertain" +output_has qc-thin-markers 'The estimate is uncertain: FREEMIX rests on 3000 markers; a firm estimate needs 5,000' + +# 300 informative somalier sites: identity is uncertain. +FAKE_HOM_REF=100 FAKE_HET=120 FAKE_HOM_ALT=80 run_expect 0 qc-thin-sites "${SCRIPTS}/33-sample-qc.sh" sample1 +[ "$(tval identity)" = uncertain ] || fail "identity from 300 sites was not uncertain: $(tval identity)" +output_has qc-thin-sites 'Identity: uncertain \(somalier genotyped 300 sites' FAKE_SOMALIER_SEX=-9 run_expect 0 qc-unknown "${SCRIPTS}/33-sample-qc.sh" sample1 female output_has qc-unknown 'Sex check: not done \(somalier could not tell the sex' @@ -159,6 +182,9 @@ output_has qc-few-markers 'Fewer than 1,000 panel markers have reads' docker_log_has 'verifybamid2 .*--DisableSanityCheck' "the second VerifyBamID2 call lacks --DisableSanityCheck" [ "$(tval verifybamid2_marker_check)" = skipped ] || fail "the skipped marker check was not recorded" [ "$(tval panel_markers)" = 320 ] || fail "the panel size was not recorded" +[ "$(tval verifybamid2_markers)" = 320 ] || fail "the markers of the first run's log were lost by the rerun: $(tval verifybamid2_markers)" +[ "$(tval contamination_confidence)" = uncertain ] || fail "FREEMIX with the marker check skipped was not uncertain" +output_has qc-few-markers 'The estimate is uncertain: VerifyBamID2 skipped its marker check' FAKE_VB2_FAIL=1 run_expect 1 qc-vb2-crash "${SCRIPTS}/33-sample-qc.sh" sample1 output_has qc-vb2-crash 'ERROR: VerifyBamID2 failed' From 299e8ec12c19708d6c4f1b0b51092f02975f5e8f Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:42:36 +0100 Subject: [PATCH 038/110] docs(qc): say when identity and contamination read uncertain Bead: lin-30 Bead: lin-31 Bead: plat-61 --- CHANGELOG.md | 5 +++++ docs/33-sample-qc.md | 15 +++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..de2729e64 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 33's table (`qc/_sample_qc.tsv`) now says when identity or contamination rests on too little evidence. Before, a run with one sample and a FREEMIX from a few hundred markers read like a clean, confirmed sample. Five rows follow `same_person_as`; no row was renamed or removed: + - `verifybamid2_markers`: the markers VerifyBamID2's marker check kept, read from its log. The rerun without the check does not log it, so the count comes from the first run. + - `contamination_confidence` and its reason: `uncertain` when the marker check was skipped or kept fewer than 5,000 markers, else `ok`. `contamination` (`ok` or `warn`) is unchanged. + - `identity` and its reason: `uncertain` below 1,000 informative somalier sites (the sample's genotyped sites, or the sites a pair shares), `not_checked` when no other sample was in the somalier run (every bash run), and `checked` when another sample was compared on 1,000 or more shared sites. + - `og qc sample` takes `--verifybamid2-markers N`. In Nextflow, `.marker_check` holds the count on a second line. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/33-sample-qc.md b/docs/33-sample-qc.md index 2aed8fd77..5b4e879cf 100644 --- a/docs/33-sample-qc.md +++ b/docs/33-sample-qc.md @@ -3,8 +3,8 @@ ## What This Does Checks two things about a sample before you read any result from it, and estimates a third: -- **Is it the person you think?** somalier reads the BAM at 17,766 known polymorphic sites and infers the sex from the reads: a male has no heterozygous sites on chrX outside the pseudoautosomal regions. A sex that differs from the one you declare stops the step. In a Nextflow run with several samples, somalier also compares every pair, so two rows that are the same person show up. -- **Is another person's DNA mixed in?** VerifyBamID2 estimates FREEMIX, the share of reads that come from someone else, from the allele balance at 100,000 markers of the 1000 Genomes panel. Above 0.03 the step warns. +- **Is it the person you think?** somalier reads the BAM at 17,766 known polymorphic sites and infers the sex from the reads: a male has no heterozygous sites on chrX outside the pseudoautosomal regions. A sex that differs from the one you declare stops the step. In a Nextflow run with several samples, somalier also compares every pair, so two rows that are the same person show up. With one sample there is nothing to compare, and the table says identity was `not_checked`; below 1,000 informative sites it says `uncertain`. +- **Is another person's DNA mixed in?** VerifyBamID2 estimates FREEMIX, the share of reads that come from someone else, from the allele balance at 100,000 markers of the 1000 Genomes panel. Above 0.03 the step warns. An estimate from fewer than 5,000 markers, or with VerifyBamID2's marker check skipped, is marked `uncertain`. - **Did some cells lose the Y, or one X?** From the depth step 16b measured and, for a woman, the VCF's chrX allele fractions, the step estimates the share of cells that lost the Y chromosome (men) or one X (women), with its 95% range. See [Mosaic loss of chrY or chrX](#mosaic-loss-of-chry-or-chrx). ## Why @@ -19,7 +19,7 @@ Contamination only warns. A contaminated sample is still your sample; its calls ## Docker Image - `SOMALIER_IMAGE` - `VERIFYBAMID2_IMAGE` -- `PYTHON_IMAGE` (the verdict, from `og summary collect`, and the mosaic estimate, from `og qc sex-loss`, the Rust binary `scripts/setup.sh --og` builds) +- `PYTHON_IMAGE` (the verdict, from `og qc sample`, and the mosaic estimate, from `og qc sex-loss`, the Rust binary `scripts/setup.sh --og` builds) Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. @@ -63,6 +63,10 @@ The bash step lets somalier name the sample after the BAM's `@RG SM` tag; every VerifyBamID2 refuses to estimate when fewer than 1,000 panel markers have reads ("Insufficient Available markers"), as on a targeted (WES) or sliced BAM. The step then runs it again with `--DisableSanityCheck` and records `verifybamid2_marker_check skipped`, so the report says FREEMIX rests on fewer than 1,000 markers. On the CI fixture, with about 320 markers that have reads, FREEMIX still read 0.0004 for the clean HG002 and 0.093 for HG002 with 9.3% of its reads from HG001. +VerifyBamID2's marker check logs how many markers it kept: those with reads and a depth within three standard deviations of the mean (`NOTICE - N SNP markers remained after sanity check.`). The run without the check does not log it, so the step reads the count from the first run's log and records it as `verifybamid2_markers`. FREEMIX is `contamination_confidence uncertain` when the check was skipped or when it kept fewer than 5,000 markers. That floor is five times the 1,000 markers the check asks for, and half of the 10% of the panel it also asks for. A whole genome at 30x keeps far more. `contamination` (`ok` or `warn`) still compares FREEMIX with `FREEMIX_WARN` as before; the confidence row only says how far to trust that number. + +Identity rests on somalier's informative sites: the sites it genotyped for the sample (`sites_genotyped`) and, for each pair, the sites both samples have a genotype at (its `n` column). Below 1,000, about one in 18 of somalier's 17,766 sites, `identity` is `uncertain`. With one sample, as in every bash run, there is no other sample to compare with: `identity` is `not_checked`, and the sex check is the only identity check. It is `checked` when somalier compared the sample with another sample of the run on 1,000 or more shared sites. + In Nextflow, add `sample_qc` to `--tools` with `--somalier_sites` and `--verifybamid2_panel` (the folder that holds the `.UD`, `.mu` and `.bed` files); `--freemix_warn` and `--sex_check` work as above. `SOMALIER_RELATE` runs once over every sample of the run, with a pedigree of every sample's samplesheet sex. A sex mismatch stops the run, after `INDEXCOV` made the same check from the index. `SAMPLE_QC` gets `MOSDEPTH`'s windows when `mosdepth` is in `--tools` (it is in the default list), and the row's VCF. It waits for that VCF, so on a FASTQ row somalier's sex check reports after `DEEPVARIANT`; `INDEXCOV`'s check still stops the run before it. ## Mosaic loss of chrY or chrX @@ -80,7 +84,7 @@ The step needs step 16b's windows for the depth estimate and, for a woman, the V ## Output Files | File | Description | |---|---| -| `qc/${SAMPLE}_sample_qc.tsv` | The verdict, one `key` and `value` per line: `inferred_sex`, `sex_check` (`ok`, `mismatch` or `not_checked` with `sex_check_reason`), the chrX and chrY numbers it rests on, `freemix`, `contamination` (`ok` or `warn`), `panel_markers`, `verifybamid2_marker_check` (`passed`, or `skipped` when fewer than 1,000 markers had reads), `same_person_as`; then the mosaic rows below | +| `qc/${SAMPLE}_sample_qc.tsv` | The verdict, one `key` and `value` per line: `inferred_sex`, `sex_check` (`ok`, `mismatch` or `not_checked` with `sex_check_reason`), the chrX and chrY numbers it rests on, `freemix`, `contamination` (`ok` or `warn`), `panel_markers`, `verifybamid2_marker_check` (`passed`, or `skipped` when fewer than 1,000 markers had reads), `same_person_as`, `verifybamid2_markers` (the markers VerifyBamID2 kept, empty when its log does not say), `contamination_confidence` (`ok`, `uncertain`, or empty when VerifyBamID2 did not run) with `contamination_confidence_reason`, `identity` (`checked`, `uncertain` or `not_checked`) with `identity_reason`; then the mosaic rows below | | `qc/somalier/${SAMPLE}.samples.tsv` | somalier's per-sample table: depth, genotype counts, chrX and chrY counts, `original_pedigree_sex` (the declared sex: `male`, `female`, or `unknown` when none was declared), `sex` (the pedigree's code, changed when the reads tell: 1 male, 2 female, -9 unknown, -2 when it is female but chrY has reads) | | `qc/somalier/${SAMPLE}.declared.ped` | The pedigree somalier got: the declared sex | | `qc/somalier/${SAMPLE}.pairs.tsv`, `.html` | Relatedness of every pair (one sample here; every sample of the run in Nextflow, under `somalier/`) | @@ -112,7 +116,10 @@ The HTML report (step 24) shows the inferred sex, FREEMIX and any duplicate in i | FREEMIX below 0.01 | Clean | Nothing | | FREEMIX 0.01 to 0.03 | Trace contamination, usual for a library | Nothing | | FREEMIX above 0.03 | About that share of the reads are someone else's | Treat heterozygous calls with care; ask the lab whether it can resequence | +| `contamination_confidence uncertain` | FREEMIX rests on fewer than 5,000 markers, or VerifyBamID2 skipped its marker check | Read FREEMIX as a rough estimate. Normal on a targeted or sliced BAM; on a whole genome, check the depth | | `same_person_as` set | Two samples of the run share their genome (relatedness 0.9 or more) | A duplicate row, a resequenced sample, an identical twin, or a swap | +| `identity not_checked` | No other sample in the somalier run to compare with | Nothing. To compare with an earlier sample, relate the two `.somalier` files (Notes below) | +| `identity uncertain` | Fewer than 1,000 informative somalier sites for the sample, or shared with every other sample | A relatedness or a `same_person_as` from so few sites can be wrong. Normal on a targeted or sliced BAM | | `mosaic_call not_detected` | The 95% range does not put a loss of the Y (or of one X) above 10% of the cells; the estimate itself can be higher when the range is wide | Nothing; a smaller loss cannot be told from noise at 30x | | `mosaic_call detected` | The low end of the 95% range is above 10%: a share of the blood cells lost the Y, or one X | Nothing follows from it alone. It is a population-level marker, not a diagnosis; a doctor would test blood cells directly if it ever mattered | | `mosaic_call gain` | More depth than one Y or two X | An extra copy (47,XYY, 47,XXX) or a gain; it is not a loss | From c5ea933caf9f3bcfde451e350502053e9c1f5200 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 039/110] docs(assets): name GENCODE 50 as the source of the CHIP gene BED The BED step 29 hands to Mutect2 had no header, so a reader of the file could not tell where its 33 gene spans came from or under which terms. GATK and bcftools skip '#' lines in a BED, so the calls do not change. Bead: lic-20 --- assets/chip_genes_grch38.bed | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/assets/chip_genes_grch38.bed b/assets/chip_genes_grch38.bed index f300cd222..6aabf063d 100644 --- a/assets/chip_genes_grch38.bed +++ b/assets/chip_genes_grch38.bed @@ -1,3 +1,9 @@ +# assets/chip_genes_grch38.bed: the clonal hematopoiesis (CHIP) driver genes step 29 +# (scripts/29-mutect2-somatic.sh) calls with Mutect2 by default (INTERVALS=chip), GRCh38, BED +# (0-based start). Columns: chrom, start, end, gene. Each row is the gene's record in GENCODE 50's +# basic annotation, 100 bp either side. +# Source: GENCODE release 50 (https://www.gencodegenes.org/human/release_50.html), open access data +# with no restriction on use (EMBL-EBI terms of use, https://www.ebi.ac.uk/about/terms-of-use/). chr1 1785184 1892392 GNB1 chr1 43337707 43354566 MPL chr1 114704367 114716875 NRAS From 16211d2145db725062a884b152c46e922c48a0d9 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 040/110] docs(assets): carry TRExplorer's MIT notice in the SV rule regions og dev build sv-rule-regions now writes a header line naming each source's terms (TRExplorer MIT, GENCODE, HGNC, NCBI), so the committed file and the --check rebuild stay byte for byte the same. The MIT notice ships as assets/licences/TRExplorer-LICENSE.txt. A unit test fails when the line or the notice is missing. docs/05 says the same, and says the AnnotSV annotation bundle is a mix of sources under their own terms that setup.sh downloads from AnnotSV's server and the project never redistributes. Bead: sv-45 Bead: sv-46 --- assets/licences/TRExplorer-LICENSE.txt | 21 +++++++++++++ assets/sv_rule_regions.tsv | 3 ++ docs/05-annotsv.md | 4 ++- rust/crates/og-dev/src/build/sv_rules.rs | 38 ++++++++++++++++++++++-- 4 files changed, 63 insertions(+), 3 deletions(-) create mode 100644 assets/licences/TRExplorer-LICENSE.txt diff --git a/assets/licences/TRExplorer-LICENSE.txt b/assets/licences/TRExplorer-LICENSE.txt new file mode 100644 index 000000000..18009f750 --- /dev/null +++ b/assets/licences/TRExplorer-LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Broad Institute + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/assets/sv_rule_regions.tsv b/assets/sv_rule_regions.tsv index a442cc13f..86bc4fb9a 100644 --- a/assets/sv_rule_regions.tsv +++ b/assets/sv_rule_regions.tsv @@ -1,6 +1,9 @@ # assets/sv_rule_regions.tsv: the GRCh38 regions where og sv postfilter overrides AnnotSV's class 4 # or 5. Written by scripts/ci/build-sv-rule-regions.sh, which says how each rule's rows are chosen; # rebuild it there, do not edit it by hand. start is 0-based and end 1-based, as in a BED file. +# Sources and terms: the TRExplorer catalog, Copyright (c) 2024 Broad Institute, MIT licence +# (assets/licences/TRExplorer-LICENSE.txt); GENCODE, open access; HGNC and the NCBI assembly +# regions, no restriction on use. # Rows: gene_alias 10, ig_tr_locus 6, mhc 1, tandem_repeat 2409. #chrom start end rule action name source chr1 939398 939508 tandem_repeat class_3 SAMD11:48bp motif TRExplorer v2.1; GENCODE 50 MANE Select CDS diff --git a/docs/05-annotsv.md b/docs/05-annotsv.md index e59f45025..664e61cd1 100644 --- a/docs/05-annotsv.md +++ b/docs/05-annotsv.md @@ -26,6 +26,8 @@ tar -xzf ${GENOME_DIR}/Annotations_Human_3.5.tar.gz -C ${GENOME_DIR}/annotsv_ann The script checks for `${GENOME_DIR}/annotsv_annotations/Annotations_Human/Genes/GRCh38` and stops with a pointer to `setup.sh` when it is missing. `run-all.sh` reports step 5 as skipped in that case. +> **License:** AnnotSV's code is GPL-3.0. Its annotation bundle gathers many sources, each under its own terms, OMIM-derived gene annotations among them; AnnotSV's manual lists each source and its version for the release. AnnotSV leaves GeneHancer and COSMIC out of the bundle because they need a licence of their own. The pipeline does not redistribute the bundle: `setup.sh` downloads it from AnnotSV's server, the same file AnnotSV's own installer fetches. Check the terms of each source before any commercial use. + ### gnomAD-SV frequencies and MANE Select transcripts `setup.sh` adds two files to the bundle. Both are pinned in `versions.env` with a sha256, and the run manifest records the pins through its copy of `versions.env`. `./scripts/setup.sh --annotsv-data ${GENOME_DIR}` adds them to an existing install without running the rest of setup. @@ -124,7 +126,7 @@ Some class 4 and 5 calls are common or unreliable for a reason AnnotSV does not - **The MHC** (`mhc`). An SV more than half inside the MHC, GRCh38 chr6:28,510,120-33,480,577. Its haplotypes differ by tens of kilobases between people, and gnomAD-SV marks every SV over half inside IGH or the MHC as low confidence (FILTER `IGH_MHC_OVERLAP`, Collins 2020, PMID 32461652). CYP21A2 lies in the MHC; short reads cannot call it here, and [step 35b](35-paralogs.md) reads it from PacBio HiFi reads. - **A pseudogene named by a disease gene's symbol** (`gene_alias`). AnnotSV joins its gene annotations by symbol. A few pseudogenes carry a disease gene's symbol as an HGNC alias or previous symbol (for example RHEBP1, whose HGNC alias is RHEB). When `Gene_name` lists that symbol and the SV reaches no transcript of the disease gene in AnnotSV's genes file, the table names the pseudogene instead, and the call moves to class 3 when no other gene is left. This needs the genes file, like the exon-edge check. -The regions are in `assets/sv_rule_regions.tsv`, one row each (`chrom`, `start` 0-based, `end`, `rule`, `action`, `name`, `source`): 2,409 coding tandem repeats, the six IG and TR loci, the MHC and 10 pseudogenes. `scripts/ci/build-sv-rule-regions.sh` writes it from four pinned downloads, each checked against its sha256: TRExplorer v2.1's GRCh38 tandem repeat catalog (the file upstream rebuilt in place on 2026-10-30, sha256 `df9c23c4…`; every repeat of 50 bp or more on a MANE Select coding exon of GENCODE 50), GENCODE 50's IG and TR genes, the MHC row of the GRCh38 assembly regions report, and HGNC's complete set of 2026-10-06 (each pseudogene whose alias or previous symbol is the approved symbol of a gene with a GenCC curation). The file is about 250 KB and ships with the repository, so the step downloads nothing. The e2e case `followups-ci-3-sv-rule-regions` rebuilds it with `scripts/ci/build-sv-rule-regions.sh --check`, which fails when one byte differs, so a hand edit or a drifted pin cannot ship. Step 05 mounts it into the AnnotSV image and the Nextflow `ANNOTSV` gets it as an input. +The regions are in `assets/sv_rule_regions.tsv`, one row each (`chrom`, `start` 0-based, `end`, `rule`, `action`, `name`, `source`): 2,409 coding tandem repeats, the six IG and TR loci, the MHC and 10 pseudogenes. `scripts/ci/build-sv-rule-regions.sh` writes it from four pinned downloads, each checked against its sha256: TRExplorer v2.1's GRCh38 tandem repeat catalog (the file upstream rebuilt in place on 2026-10-30, sha256 `df9c23c4…`; every repeat of 50 bp or more on a MANE Select coding exon of GENCODE 50), GENCODE 50's IG and TR genes, the MHC row of the GRCh38 assembly regions report, and HGNC's complete set of 2026-10-06 (each pseudogene whose alias or previous symbol is the approved symbol of a gene with a GenCC curation). The file is about 250 KB and ships with the repository, so the step downloads nothing. Its header names each source's terms: the TRExplorer catalog is MIT, copyright 2024 Broad Institute, with its notice in `assets/licences/TRExplorer-LICENSE.txt`; GENCODE is open access, and HGNC and the NCBI assembly regions carry no restriction on use. The e2e case `followups-ci-3-sv-rule-regions` rebuilds it with `scripts/ci/build-sv-rule-regions.sh --check`, which fails when one byte differs, so a hand edit or a drifted pin cannot ship. Step 05 mounts it into the AnnotSV image and the Nextflow `ANNOTSV` gets it as an input. How many callers saw each SV comes from step 22's consensus (`sv_merged/_sv_consensus.vcf.gz`), which runs after this step, and beside `ANNOTSV` in Nextflow. So the reports (`og summary collect`) join it when they are written: an SV matches the consensus record of the same type whose two breakpoints lie within 1,000 bp of its own, step 22's distance, and its support is that record's `SUPP` with the callers of `SUPP_VEC`. An SV in no consensus record was made by one caller and shows as "single caller". Without the consensus file the support is "not known", never 1. `og sv postfilter --consensus` adds the same `Support` and `Support_callers` columns to the table. diff --git a/rust/crates/og-dev/src/build/sv_rules.rs b/rust/crates/og-dev/src/build/sv_rules.rs index 7004f02b7..c1d8e8b68 100644 --- a/rust/crates/og-dev/src/build/sv_rules.rs +++ b/rust/crates/og-dev/src/build/sv_rules.rs @@ -400,7 +400,10 @@ pub fn build(work: &Path) -> Result<(String, String), BuildError> { let mut text = String::from( "# assets/sv_rule_regions.tsv: the GRCh38 regions where og sv postfilter overrides AnnotSV's class 4\n\ # or 5. Written by scripts/ci/build-sv-rule-regions.sh, which says how each rule's rows are chosen;\n\ - # rebuild it there, do not edit it by hand. start is 0-based and end 1-based, as in a BED file.\n", + # rebuild it there, do not edit it by hand. start is 0-based and end 1-based, as in a BED file.\n\ + # Sources and terms: the TRExplorer catalog, Copyright (c) 2024 Broad Institute, MIT licence\n\ + # (assets/licences/TRExplorer-LICENSE.txt); GENCODE, open access; HGNC and the NCBI assembly\n\ + # regions, no restriction on use.\n", ); text.push_str(&format!( "# {summary}.\n#chrom\tstart\tend\trule\taction\tname\tsource\n" @@ -566,7 +569,7 @@ mod tests { fixture(&dir, false); let (text, summary) = build(&dir).unwrap(); fs::remove_dir_all(&dir).unwrap(); - let body: Vec<&str> = text.lines().skip(4).collect(); + let body: Vec<&str> = text.lines().skip_while(|l| l.starts_with("# ")).collect(); assert_eq!( body, [ @@ -587,6 +590,37 @@ mod tests { assert!(text.contains("\n# Rows: gene_alias 2, ig_tr_locus 2, mhc 1, tandem_repeat 2.\n")); } + #[test] + fn the_header_names_each_source_and_its_terms() { + let dir = std::env::temp_dir().join(format!("og-svrules-terms-{}", std::process::id())); + fixture(&dir, false); + let (text, _) = build(&dir).unwrap(); + fs::remove_dir_all(&dir).unwrap(); + let header: String = text + .lines() + .take_while(|l| l.starts_with("# ")) + .map(|l| &l[2..]) + .collect::>() + .join(" "); + for want in [ + "TRExplorer catalog, Copyright (c) 2024 Broad Institute, MIT licence", + "(assets/licences/TRExplorer-LICENSE.txt)", + "GENCODE, open access", + "HGNC and the NCBI assembly regions, no restriction on use", + ] { + assert!( + header.contains(want), + "{want:?} not in the header: {header}" + ); + } + let notice = fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../../assets/licences/TRExplorer-LICENSE.txt" + )) + .unwrap(); + assert!(notice.starts_with("MIT License\n\nCopyright (c) 2024 Broad Institute\n")); + } + #[test] fn a_par_pseudogene_keeps_its_chrx_span_whichever_record_comes_first() { let dir = std::env::temp_dir().join(format!("og-svrules-par-{}", std::process::id())); From 6e56ee41da71dbd89b1e60a80f3b8531c5ffcf70 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 041/110] docs(assets): name NIST, GENCODE, HGNC and NCBI in the callability catalog og dev build callability now writes a header line naming its sources and their terms, and NIST's notice for the GIAB data ships in assets/licences/NIST-GIAB-NOTICE.txt with what changed. A unit test fails when the line or the notice is missing. The consumer site fixture names 23andme2vcf (MIT, notice in assets/licences) and dbSNP. Bead: plat-74 --- assets/callability_genes.tsv | 3 ++ assets/licences/23andme2vcf-LICENSE.txt | 22 +++++++++++++ assets/licences/NIST-GIAB-NOTICE.txt | 33 +++++++++++++++++++ rust/crates/og-dev/src/build/callability.rs | 36 ++++++++++++++++++++- tests/fixtures/consumer_export/README.md | 5 +++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 assets/licences/23andme2vcf-LICENSE.txt create mode 100644 assets/licences/NIST-GIAB-NOTICE.txt diff --git a/assets/callability_genes.tsv b/assets/callability_genes.tsv index 6fedd9c07..28eb04e83 100644 --- a/assets/callability_genes.tsv +++ b/assets/callability_genes.tsv @@ -3,6 +3,9 @@ # report lists the ones it could not read. Written by scripts/ci/build-callability.sh, which says how the # rows and the owners are chosen; rebuild it there, do not edit it by hand. start is 0-based and end # 1-based, as in a BED file; an ALT-only gene has its ALT scaffold as chrom and '.' as start and end. +# Sources and terms: GIAB CMRG v1.00 and genome stratifications v3.6, from NIST, not subject to +# US copyright (notice and changes: assets/licences/NIST-GIAB-NOTICE.txt); GENCODE 50, open +# access; HGNC ids and the NCBI GRCh38 assembly report, no restriction on use. # Genes: 1572 (CMRG 273, segdup 1276, false_duplication 22, collapsed 50, ALT-only 19); with an owner: 61. gene hgnc_id chrom start end reasons owner OR4F5 HGNC:14825 chr1 65418 71585 segdup . diff --git a/assets/licences/23andme2vcf-LICENSE.txt b/assets/licences/23andme2vcf-LICENSE.txt new file mode 100644 index 000000000..40b933fcb --- /dev/null +++ b/assets/licences/23andme2vcf-LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 Rob Long + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/assets/licences/NIST-GIAB-NOTICE.txt b/assets/licences/NIST-GIAB-NOTICE.txt new file mode 100644 index 000000000..5f96456f6 --- /dev/null +++ b/assets/licences/NIST-GIAB-NOTICE.txt @@ -0,0 +1,33 @@ +assets/callability_genes.tsv is built from Genome in a Bottle (GIAB) data of the +National Institute of Standards and Technology (NIST): the CMRG v1.00 benchmark gene +coordinates and the GRCh38 genome stratifications v3.6 (segmental duplications, false +duplications, collapsed duplications). Changed: the genes those regions cover are +selected and each is tagged with its reason (scripts/ci/build-callability.sh); the date +of each change is the git commit date of assets/callability_genes.tsv. The notice NIST +asks distributions of its data to carry (https://www.nist.gov/open/license): + +This data/work was created by employees of the National Institute of Standards and +Technology (NIST), an agency of the Federal Government. Pursuant to title 17 United +States Code Section 105, works of NIST employees are not subject to copyright protection +in the United States. This data/work may be subject to foreign copyright. The data/work +is provided by NIST as a public service and is expressly provided "AS IS." NIST MAKES NO +WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE +IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT +AND DATA ACCURACY. NIST does not warrant or make any representations regarding the use +of the data or the results thereof, including but not limited to the correctness, +accuracy, reliability or usefulness of the data. NIST SHALL NOT BE LIABLE AND YOU HEREBY +RELEASE NIST FROM LIABILITY FOR ANY INDIRECT, CONSEQUENTIAL, SPECIAL, OR INCIDENTAL +DAMAGES (INCLUDING DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF +BUSINESS INFORMATION, AND THE LIKE), WHETHER ARISING IN TORT, CONTRACT, OR OTHERWISE, +ARISING FROM OR RELATING TO THE DATA (OR THE USE OF OR INABILITY TO USE THIS DATA), EVEN +IF NIST HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +To the extent that NIST may hold copyright in countries other than the United States, +you are hereby granted the non-exclusive irrevocable and unconditional right to print, +publish, prepare derivative works and distribute the NIST data, in any medium, or +authorize others to do so on your behalf, on a royalty-free basis throughout the world. +You may improve, modify, and create derivative works of the data or any portion of the +data, and you may copy and distribute such modifications or works. Modified works should +carry a notice stating that you changed the data and should note the date and nature of +any such change. Please explicitly acknowledge the National Institute of Standards and +Technology as the source of the data. diff --git a/rust/crates/og-dev/src/build/callability.rs b/rust/crates/og-dev/src/build/callability.rs index d7ce4dece..a222307e3 100644 --- a/rust/crates/og-dev/src/build/callability.rs +++ b/rust/crates/og-dev/src/build/callability.rs @@ -442,7 +442,10 @@ pub fn build(work: &Path, repo: &Path) -> Result<(String, String), BuildError> { # 'no finding' there needs a reading of its own. Step 16b measures each gene on chr1-22, X and Y; the\n\ # report lists the ones it could not read. Written by scripts/ci/build-callability.sh, which says how the\n\ # rows and the owners are chosen; rebuild it there, do not edit it by hand. start is 0-based and end\n\ - # 1-based, as in a BED file; an ALT-only gene has its ALT scaffold as chrom and '.' as start and end.\n", + # 1-based, as in a BED file; an ALT-only gene has its ALT scaffold as chrom and '.' as start and end.\n\ + # Sources and terms: GIAB CMRG v1.00 and genome stratifications v3.6, from NIST, not subject to\n\ + # US copyright (notice and changes: assets/licences/NIST-GIAB-NOTICE.txt); GENCODE 50, open\n\ + # access; HGNC ids and the NCBI GRCh38 assembly report, no restriction on use.\n", ); let _ = writeln!(text, "# {summary}."); text.push_str("gene\thgnc_id\tchrom\tstart\tend\treasons\towner\n"); @@ -584,6 +587,37 @@ mod tests { assert!(text.contains(&format!("\n# {summary}.\n"))); } + #[test] + fn the_header_names_each_source_and_its_terms() { + let dir = std::env::temp_dir().join(format!("og-callability-terms-{}", std::process::id())); + let (work, repo) = fixture(&dir); + let (text, _) = build(&work, &repo).unwrap(); + fs::remove_dir_all(&dir).unwrap(); + let header: String = text + .lines() + .take_while(|l| l.starts_with("# ")) + .map(|l| &l[2..]) + .collect::>() + .join(" "); + for want in [ + "GIAB CMRG v1.00 and genome stratifications v3.6, from NIST, not subject to US copyright", + "(notice and changes: assets/licences/NIST-GIAB-NOTICE.txt)", + "GENCODE 50, open access", + "HGNC ids and the NCBI GRCh38 assembly report, no restriction on use", + ] { + assert!( + header.contains(want), + "{want:?} not in the header: {header}" + ); + } + let notice = fs::read_to_string(concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../../assets/licences/NIST-GIAB-NOTICE.txt" + )) + .unwrap(); + assert!(notice.contains("works of NIST employees are not subject to copyright protection")); + } + #[test] fn a_cmrg_gene_with_no_gencode_gene_stops_the_build() { let dir = std::env::temp_dir().join(format!("og-callability-cmrg-{}", std::process::id())); diff --git a/tests/fixtures/consumer_export/README.md b/tests/fixtures/consumer_export/README.md index 03449e9cf..3cb4d1e05 100644 --- a/tests/fixtures/consumer_export/README.md +++ b/tests/fixtures/consumer_export/README.md @@ -26,3 +26,8 @@ dbSNP's rCRS position (see docs/40-export-consumer.md). The slice has rsIDs, positions and reference bases only: no genotype of anyone. + +Sources and terms: the 23andMe v5 site list is from 23andme2vcf +(https://github.com/arrogantrobot/23andme2vcf), Copyright (c) 2015 Rob +Long, MIT licence; its notice is `assets/licences/23andme2vcf-LICENSE.txt`. +dbSNP is NCBI's, with no restriction on use. From 9702119165411631aa5a19500607eb0ce0378039 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 042/110] docs(assets): credit the CC BY 4.0 Parascopy and Locityper data Both tables come from Timofey Prodanov's Zenodo records, which are CC BY 4.0. Their headers and docs now name the author, the DOI, the licence and what changed. docs/53 says the HPRC panel is public domain and that its Locityper pin is 1.7.15, as versions.env has it. The parascopy header names the Rust tests that read it now. Bead: lic-30 Bead: sv-47 --- assets/locityper_loci.bed | 4 ++++ assets/parascopy_models_v1.7.txt | 8 ++++++-- docs/35-paralogs.md | 2 +- docs/53-locityper.md | 10 +++++----- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/assets/locityper_loci.bed b/assets/locityper_loci.bed index 24b648573..977698fa7 100644 --- a/assets/locityper_loci.bed +++ b/assets/locityper_loci.bed @@ -4,6 +4,10 @@ # their FCGR3A and FCGR2B loci joined because they overlap. setup.sh --locityper-data builds the # database of these rows from the HPRC v2.1 pangenome VCF (LOCITYPER_PANEL_URL) and reads that VCF # 250 kb either side of each row, the room Locityper's locus extension needs (up to 200 kb). +# Source: Timofey Prodanov, Locityper loci database, https://doi.org/10.5281/zenodo.15879519, +# licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changed: five of its 326 loci +# kept, FCGR3A and FCGR2B joined as FCGR. The HPRC panel is public domain +# (https://humanpangenome.org/data-use/); no part of it is in this file. chr1 161506761 161681047 FCGR chr6 32484347 32593538 HLA-DRB1 chr6 32652603 32669077 HLA-DQB1 diff --git a/assets/parascopy_models_v1.7.txt b/assets/parascopy_models_v1.7.txt index 4328d6d0a..4578145c6 100644 --- a/assets/parascopy_models_v1.7.txt +++ b/assets/parascopy_models_v1.7.txt @@ -6,8 +6,12 @@ # From models_GRCh38_1KGP_v1.7.tar.gz of Zenodo record 15019940 (md5 244110d8fa883cf11334527ec2383498, # the archive setup.sh --parascopy-data installs), folder EUR; AFR, AMR, EAS and SAS hold the same # 167 models with the same regions (checked 2026-10-27). -# tests/test_copy_number.py reads it: a row of bin/cn_loci.tsv whose targets or controls overlap one -# of these regions fails, unless the test's short list of exemptions names that row and model. +# Source: Timofey Prodanov, Parascopy precomputed data, https://doi.org/10.5281/zenodo.15019940, +# licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changed: only the model +# regions are kept, reformatted one per line, and overlapping copy regions are merged. +# rust/crates/og-cn/tests/genome_cn.rs reads it: a row of bin/cn_loci.tsv whose targets or controls +# overlap one of these regions fails, unless the test's short list of exemptions names that row and +# model. rust/crates/og-steps/tests/paralog_loci.rs reads the model list. ABCC6 chr16:16198410-16228707 main ABCC6 chr16:14816373-14829810 copy ABCC6 chr16:14829826-14836719 copy diff --git a/docs/35-paralogs.md b/docs/35-paralogs.md index 6ae0a4830..0bd5b9ea0 100644 --- a/docs/35-paralogs.md +++ b/docs/35-paralogs.md @@ -183,7 +183,7 @@ One owner per locus. These loci are Parascopy's: no row of `bin/cn_loci.tsv` tha A new locus is a new row for a model already in the pinned data; it needs no code change. A rerun of the bash step removes the table of a row the catalog no longer has, so every catalog table in `paralogs/` comes from the last run. A row whose region has no read is not assessed and costs one `samtools view -c`, so a BAM of part of the genome runs Parascopy only where it has reads. -`assets/parascopy_models_v1.7.txt` lists every region of the 167 models of the pinned data (`models_GRCh38_1KGP_v1.7.tar.gz`, Zenodo record 15019940, archive sha256 `2e9be08b69936f13a49d52c7764f2414beac27a99b95e0c48b2e2ccafbb8c846`), the same for the five populations. Each gene there is the model file `.gz` of the `list.txt` the data installs. `cargo test -p og-steps --test paralog_loci` refuses a catalog row whose model is not on that list: the gene GBA1, for example, has the model `GBA.gz`, not `GBA1.gz`. +`assets/parascopy_models_v1.7.txt` lists every region of the 167 models of the pinned data (`models_GRCh38_1KGP_v1.7.tar.gz`, Zenodo record 15019940, archive sha256 `2e9be08b69936f13a49d52c7764f2414beac27a99b95e0c48b2e2ccafbb8c846`), the same for the five populations. That data is Timofey Prodanov's, licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); the file's header names it and what changed: only the model regions are kept, and overlapping copy regions are merged. Each gene there is the model file `.gz` of the `list.txt` the data installs. `cargo test -p og-steps --test paralog_loci` refuses a catalog row whose model is not on that list: the gene GBA1, for example, has the model `GBA.gz`, not `GBA1.gz`. ## HBA1 and HBA2 from Depth diff --git a/docs/53-locityper.md b/docs/53-locityper.md index b14b39899..ba1abb586 100644 --- a/docs/53-locityper.md +++ b/docs/53-locityper.md @@ -14,12 +14,12 @@ Locityper (Prodanov et al., Nat Genet 2025, PMID 41107551, doi 10.1038/s41588-02 ## Tool -- Locityper, the release `LOCITYPER_IMAGE` pins (1.7.14 today; MIT licence, https://github.com/tprodanov/locityper): `locityper preproc` and `locityper genotype` on the BAM +- Locityper, the release `LOCITYPER_IMAGE` pins (1.7.15 today; MIT licence, https://github.com/tprodanov/locityper): `locityper preproc` and `locityper genotype` on the BAM - `og locityper report` (OwnGenome's Rust binary, [og](rust.md), static, so it runs inside the Locityper image) for the table ## Docker Image -- `LOCITYPER_IMAGE`: the Bioconda build, `quay.io/biocontainers/locityper`. It carries Locityper, jellyfish, samtools, minimap2, strobealign, tabix and Python. 1.7.15 exists; its only change is in `locityper align`, which this step does not run, so the pin stays at 1.7.14. +- `LOCITYPER_IMAGE`: the Bioconda build, `quay.io/biocontainers/locityper`. It carries Locityper, jellyfish, samtools, minimap2, strobealign, tabix and Python. Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. The line is marked optional, so `setup.sh` pulls it only with `--locityper-data`. @@ -36,7 +36,7 @@ Then it follows Locityper's documentation (https://locityper.vercel.app, "Prepar ## The loci -`assets/locityper_loci.bed` lists them. The regions are those of the Locityper authors' own GRCh38 database of 326 loci (Zenodo record 15879519, https://zenodo.org/records/15879519), except FCGR, where their FCGR3A and FCGR2B loci overlap and are joined. +`assets/locityper_loci.bed` lists them. The regions are those of the Locityper authors' own GRCh38 database of 326 loci (Zenodo record 15879519, https://zenodo.org/records/15879519), except FCGR, where their FCGR3A and FCGR2B loci overlap and are joined. That database is Timofey Prodanov's, licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/); the file's header names it and what changed. The HPRC panel the database is built from is public domain (https://humanpangenome.org/data-use/). `setup.sh` builds the database on your machine, and the repository ships none of the panel. | Locus | GRCh38 region | Primary caller here | |---|---|---| @@ -110,5 +110,5 @@ The fixture's three loci took about 5 minutes to build and 8 minutes to augment - Prodanov T, et al. Nat Genet 2025. PMID 41107551, doi 10.1038/s41588-025-02362-4 (read 2026-11-03) - Locityper documentation, https://locityper.vercel.app (read 2026-11-03) -- Locityper authors' databases and benchmark filter, Zenodo record 15879519, https://zenodo.org/records/15879519 (read 2026-11-03) -- HPRC release 2 Minigraph-Cactus GRCh38 VCF, https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/v2.1/hprc-v2.1-mc-grch38/ (read 2026-11-03) +- Locityper authors' databases and benchmark filter, Zenodo record 15879519, https://zenodo.org/records/15879519, CC BY 4.0 (read 2026-11-03) +- HPRC release 2 Minigraph-Cactus GRCh38 VCF, https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/v2.1/hprc-v2.1-mc-grch38/, public domain (read 2026-11-03) From 20211a3d425908184e5124e3cf5382869af906fe Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 043/110] docs(assets): ship RBCeq2's MIT notice with the blood group markers Owner decision D3 (a): the rows stay, with RBCeq2's MIT notice in assets/licences/RBCeq2-LICENSE.txt, and the ISBT database is cited for the nomenclature only. No row was read from the ISBT site or its API. Bead: lic-08 Bead: trait-43 Bead: D3 --- assets/bloodtype_markers.tsv | 7 +++++++ assets/licences/RBCeq2-LICENSE.txt | 7 +++++++ docs/41-bloodtype.md | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 assets/licences/RBCeq2-LICENSE.txt diff --git a/assets/bloodtype_markers.tsv b/assets/bloodtype_markers.tsv index c29af72f2..6653bb764 100644 --- a/assets/bloodtype_markers.tsv +++ b/assets/bloodtype_markers.tsv @@ -2,6 +2,13 @@ # processes) reads, GRCh38 (NCBI no-ALT analysis set), as a BED with extra columns: start is # 0-based, end 1-based, so samtools bedcov reads this file as it is (comment and header lines removed). # +# Licence: what this table takes from RBCeq2 is used under RBCeq2's MIT licence, Copyright 2025 +# Australian Red Cross Lifeblood; its full notice is assets/licences/RBCeq2-LICENSE.txt. The +# system, antigen and allele names follow the ISBT nomenclature: International Society of Blood +# Transfusion (ISBT) Blood Group Database, https://blooddatabase.isbtweb.org. No row was read +# from that database or its API. Positions and rsids from dbSNP and Ensembl are open data with +# no restriction on use. +# # kind site: one variant that defines a blood group antigen. ref and alt are the VCF alleles # (left-aligned, + strand); ref_means and alt_means are what each allele gives. The variants # and their antigens are the ones the ISBT allele tables define, as packaged by RBCeq2 2.4.4 diff --git a/assets/licences/RBCeq2-LICENSE.txt b/assets/licences/RBCeq2-LICENSE.txt new file mode 100644 index 000000000..e621675d7 --- /dev/null +++ b/assets/licences/RBCeq2-LICENSE.txt @@ -0,0 +1,7 @@ +Copyright 2025 Australian Red Cross Lifeblood + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/docs/41-bloodtype.md b/docs/41-bloodtype.md index 650c9de24..acbadea0b 100644 --- a/docs/41-bloodtype.md +++ b/docs/41-bloodtype.md @@ -18,7 +18,7 @@ Most blood group antigens differ by one known variant, so the genome predicts th - bcftools `norm` to left-align the VCF's records near the marker sites against the reference first (see [Indels written another way](#indels-written-another-way)) - samtools `bedcov` for the read depth over the marker sites and RHD; the RHD regions are the RHD row of `bin/cn_loci.tsv`, and og cn's engine turns their depth into the copy number (see [Copy number from depth](cn-loci.md)) -The variants and the antigens they define are the ISBT allele definitions, as RBCeq2 2.4.4 packages them (database v2.5.1, MIT licence, Australian Red Cross Lifeblood). The table's header names the release and the checksum of the file they were read from. Each position and REF base was checked against Ensembl GRCh38 and its dbSNP id. The HPA positions come from dbSNP through Ensembl, because that RBCeq2 database lists them at their GRCh37 positions. +The variants and the antigens they define are the ISBT allele definitions, as RBCeq2 2.4.4 packages them (database v2.5.1, MIT licence, Australian Red Cross Lifeblood). The table's header names the release and the checksum of the file they were read from. What the table takes from RBCeq2 is used under that MIT licence; its full notice ships as `assets/licences/RBCeq2-LICENSE.txt`. The system, antigen and allele names follow the ISBT nomenclature (International Society of Blood Transfusion (ISBT) Blood Group Database, https://blooddatabase.isbtweb.org). No row was read from that database or its API. Each position and REF base was checked against Ensembl GRCh38 and its dbSNP id. The HPA positions come from dbSNP through Ensembl, because that RBCeq2 database lists them at their GRCh37 positions. The null alleles (an allele that makes no antigen) are the single-variant null alleles RBCeq2 lists for SMIM1 (Vel), ABCB6 (Lan), ABCG2 (Jra), FUT1 (H), FUT2 (secretor), KEL (K0) and SLC14A1 (Jk(a-b-)): 205 rows. Null alleles at one position with the same REF share a row, its ALT then a comma list. Left out are the alleles of two or more variants, the two deletions over 50 bp, one KEL allele that shares its position with another under a different REF, and three alleles too common to be a null on their own (see Notes). HPA-7 to HPA-35 are RBCeq2's HPA alleles. That database gives them at GRCh37 positions, so each was mapped to GRCh38 with Ensembl's assembly map. Every new row was then checked on GRCh38 on 2026-11-03: Ensembl VEP on the row's REF and ALT gives the allele's c. change on its RefSeq transcript, and the REF is Ensembl's sequence. Where RBCeq2's text has a slip, the table keeps VEP's change: HPA-13 is ITGA2 c.2483C>T, HPA-16 is ITGB3 c.497C>T and HPA-35 is ITGB3 c.1514G>A. The IPD-HPA database (https://www.ebi.ac.uk/ipd/hpa/) names the same antigens. From 83a15c8bf8d33a5be8d1332f217271a3e05842ec Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 044/110] docs: state the terms of the cohort panels and the test-data mirror docs/resources.md names the terms of each cohort source setup.sh reads (1000 Genomes with the NYGC acknowledgement, gnomAD HGDP + 1000 Genomes, HPRC, HAPNEST) and says the repository ships none of them. docs/testing says the e2e-data-1 notes name each mirrored file's source and terms. Bead: lic-27 --- docs/resources.md | 11 +++++++++++ docs/testing.md | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/resources.md b/docs/resources.md index d90ddc14f..aec9ecef2 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -52,6 +52,17 @@ Free resources for understanding your genomic data, organized from most accessib - **[1000 Genomes Project](https://www.internationalgenome.org/)** — Catalog of human genetic variation from 2,504 individuals across 26 populations. - **[gnomAD paper (2020)](https://www.nature.com/articles/s41586-020-2308-7)** — Understanding allele frequencies and how gnomAD's constraint metrics (pLI, LOEUF) predict gene essentiality. +### Cohort data terms + +`setup.sh` downloads or builds each population panel on your own machine, from its source. The repository ships none of them. These are the terms of each source: + +- **1000 Genomes** (the phase 3 sites of step 43, the high-coverage panel of step 51 (MoChA), and pgsc_calc's panel of steps 25 and 26): available without embargo. Cite the project (The 1000 Genomes Project Consortium, Nature 2015, doi:10.1038/nature15393; https://www.internationalgenome.org/IGSR_disclaimer). For the high-coverage data, cite Byrska-Bishop et al., Cell 2022 (doi:10.1016/j.cell.2022.08.004) and add: "These data were generated at the New York Genome Center with funds provided by NHGRI Grant 3UM1HG008901-03S1." Its cell lines come from the NIGMS Human Genetic Cell Repository at the Coriell Institute for Medical Research. +- **gnomAD HGDP + 1000 Genomes** (step 26b): released under gnomAD's terms, CC0 1.0 (https://gnomad.broadinstitute.org/terms). +- **HPRC release 2** (step 53, Locityper): public domain (https://humanpangenome.org/data-use/). +- **HAPNEST** (the PGS Catalog's small synthetic panel the tests use; `ANCESTRY_PANEL_NAME` can pick it for steps 25 and 26): synthetic genotypes made from 1000 Genomes and HGDP, published by EMBL-EBI (BioStudies S-BSST936, https://www.ebi.ac.uk/biostudies/studies/S-BSST936) under EMBL-EBI's terms of use (https://www.ebi.ac.uk/about/terms-of-use/). + +The test-data prerelease `e2e-data-1` (https://github.com/GeiserX/OwnGenome/releases/tag/e2e-data-1) mirrors some of these files and the table builders' downloads unchanged, for CI only. Its release notes name each file's source and terms. + ### Online Courses (Free) - **[Coursera: Genomic Data Science](https://www.coursera.org/specializations/genomic-data-science)** — Johns Hopkins. 8-course specialization covering the full analysis pipeline from FASTQ to interpretation. diff --git a/docs/testing.md b/docs/testing.md index 408186b35..d46db6227 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -102,7 +102,7 @@ The base leg runs every base case whenever any case runs, because every shard st The images the cases use are cached in four GitHub Actions cache entries, one per group. `scripts/ci/e2e-run.sh --image-groups` names each image's group, taken from its repository name without the tag, so a version bump changes the key of one group only; a group whose key missed restores the newest older entry of that group and pulls only what changed. A group keeps its smallest images up to 1500 MB of zstd output, and the larger ones are pulled on every run. Four groups of 1500 MB and the six data entries below stay under the repository's 10 GB cache limit even while main replaces one group: 5.9 GB of images, 1.5 GB more for the group being replaced, and about 2.4 GB of data. Images pinned by digest are not cached, because `docker load` gives them back without the digest, and they are left out of the group's key, so a digest bump misses no entry. Only the base leg saves, and only on main (or in a run by hand with `save_images`, on any branch), after it pulled every image the cases use and got through its cases, and only the groups whose key missed: a cache saved by a pull request can be read by that pull request alone and would only push main's entries out. The job summary lists every image with its size and what the cache did with it: restored on an exact key hit, restored from an older entry, saved, or pulled. Every merge in the e2e scope starts a run on main, so the cache follows main's images. GitHub drops an entry no run has read for 7 days, so after a quiet week the next run on main fills the cache again. Until this layout the cache was one entry, and by October 2026 it had grown to about 11 GB, over the limit, so every run missed it. -Six downloads are cached the same way. Two come from EBI's 1000 Genomes server, which is slow and at times stalls: MoChA's chr20 panel with its manifest (0.64 GB, case `mocha-1`), keyed on `MOCHA_PANEL_MANIFEST_SHA256` and the chromosome, and the 1000 Genomes phase 3 sites VCF (1.36 GB, case `archaic-ancestry-1`), keyed on `ARCHAIC_1KG_SITES_MD5`. On a miss, each of those two is tried first at `E2E_DATA_MIRROR`, the GitHub release `e2e-data-1` that holds copies of the pinned files, and then at EBI; the pin checks both. The release also holds the four PGS Catalog score files, the HAPNEST panel and the table builders' downloads below, so an EBI outage costs none of them on a cold cache. It holds the TRExplorer catalog of `build-sv-rule-regions.sh` too (the v2.1 file its `TRX_SHA256` pins), so a miss tries the mirror first and the catalog's own GitHub release after it. Two are small and failed whole runs on 2026-11-04, because their case is in the base leg or a shard that cannot start without it: `hla.dat` of the two IPD-IMGT/HLA releases `bash-step-08-hla` installs, from raw.githubusercontent.com (which served it under 1 KB/s), with GENCODE's gene and exon files from EBI's FTP server (curl exit 7 and 28), and the four real PGS Catalog score files of `prs-scores-and-run-options-1-strand-sex`, from the same server. `scripts/ci/e2e-run.sh --data-key` names their keys: the releases and a hash of the code in `scripts/lib/common.sh` that installs them, and a hash of the score ids and their server. `scripts/ci/e2e-run.sh` hands each case its files just before it runs, at the paths `setup.sh` and `install_data_file` read them from, so they download nothing; the score files the case copies from the cache itself. On a miss it downloads them first, checked against their pins or the checksum files the servers publish beside them (`MD5SUMS`, `md5checksum.txt`, the `.md5` of each score), trying up to 6 times 30 s apart. The four score files are pinned by md5 in `PGS_MD5` of `e2e-run.sh` (the md5 the PGS Catalog served beside each on 2026-11-06), tried on the mirror first and then at EBI; a restored or downloaded score must match its pin as well as its `.md5`. A file gets at most `E2E_MIRROR_BUDGET` seconds on the mirror (900, or half the fill's budget when that is less), so a mirror that trickles leaves EBI its turn. One fill may take at most `E2E_DATA_BUDGET` seconds (2400 in `e2e.yml`): a source that trickles above `fetch`'s stall limit would otherwise run on to the leg's 240-minute limit, as EBI's 1000 Genomes server did twice on 2026-11-05. A fill still running then is stopped and its case fails as `FAIL (data fill over 2400s)` without running, since its own download would be as slow. A restored entry is checked again before use (`--data-check`): the IPD-IMGT/HLA and GENCODE entry against the sha256 list written when it was filled, the score files against their `.md5`; one that fails is downloaded again. `bash-step-08-hla` then runs with every HTTP and HTTPS request sent to a closed port, after a control shows that a request under that block fails at the closed port, so a warm cache cannot reach either host. Only the leg whose cases include the case restores and saves its entry, and it saves only on main or in a run by hand with `save_images`, as with the images. The job summary says whether each key hit, and the case's log says where its files came from. The fifth is the PGS Catalog's synthetic HAPNEST panel (0.27 GB, cases `prs-2-ancestry` and `prs-scores-and-run-options-2-panel-chrx`) from EBI's FTP server, which failed cases with curl exit 7 on 2026-11-04. It is keyed on the sha256 `tests/e2e/lib.sh` pins (`HAPNEST_SHA256`). The cases handle it themselves (`setup_ancestry_panel` in `lib.sh`): with the panel in the cache, or on a miss from `E2E_DATA_MIRROR`, they check the sha256 and run `setup.sh --ancestry-panel` with every HTTP and HTTPS request sent to a closed port, so an EBI outage cannot fail them; when neither has it, `setup.sh` downloads the panel from EBI as a user's run does. The first case puts a panel that did not come from the cache in the cache for the save step. A red control in `prs-2-ancestry` runs `setup.sh` with the network blocked and no panel, which must fail. The sixth, entry `catalogs`, holds the pinned downloads of `scripts/ci/build-callability.sh`, `scripts/ci/build-cn-intervals.sh` and `scripts/ci/build-sv-rule-regions.sh`, whose cases `callability-1-catalog`, `cn-intervals-1-catalog` and `followups-ci-3-sv-rule-regions` rebuild `assets/callability_genes.tsv`, the interval rows of `bin/cn_loci.tsv` and `assets/sv_rule_regions.tsv` and compare them with the committed files. Each builder lists its downloads with `--list`; the key is a hash of those lists, so a new pin is a new key. GENCODE's GTF among them comes from EBI's FTP server, which refused every connection for minutes on 2026-11-06 and failed `callability-1-catalog` on main (run 42259432681). The runner fills the entry as it does the others, mirror first and every file checked against its sha256, and each case points its builder's cache at its folder there; a builder that still has to download tries for about five minutes, 30 s apart, and gives up at once on a 403 or 404 (`fetch_pinned` in `scripts/ci/lib/fetch-pinned.sh`, which the three builders share). The builders download with `curl` and hand the folder to `og dev build`, which reads local files only. Every download, there and in `setup.sh`, gives up on a transfer that stalls (`FETCH_STALL`, see `fetch` in `scripts/lib/common.sh`), and the next try resumes it. +Six downloads are cached the same way. Two come from EBI's 1000 Genomes server, which is slow and at times stalls: MoChA's chr20 panel with its manifest (0.64 GB, case `mocha-1`), keyed on `MOCHA_PANEL_MANIFEST_SHA256` and the chromosome, and the 1000 Genomes phase 3 sites VCF (1.36 GB, case `archaic-ancestry-1`), keyed on `ARCHAIC_1KG_SITES_MD5`. On a miss, each of those two is tried first at `E2E_DATA_MIRROR`, the GitHub release `e2e-data-1` that holds copies of the pinned files, and then at EBI; the pin checks both. The release also holds the four PGS Catalog score files, the HAPNEST panel and the table builders' downloads below, so an EBI outage costs none of them on a cold cache. It holds the TRExplorer catalog of `build-sv-rule-regions.sh` too (the v2.1 file its `TRX_SHA256` pins), so a miss tries the mirror first and the catalog's own GitHub release after it. The release keeps each file unchanged, and its notes name the source and the terms of every file it holds. Two are small and failed whole runs on 2026-11-04, because their case is in the base leg or a shard that cannot start without it: `hla.dat` of the two IPD-IMGT/HLA releases `bash-step-08-hla` installs, from raw.githubusercontent.com (which served it under 1 KB/s), with GENCODE's gene and exon files from EBI's FTP server (curl exit 7 and 28), and the four real PGS Catalog score files of `prs-scores-and-run-options-1-strand-sex`, from the same server. `scripts/ci/e2e-run.sh --data-key` names their keys: the releases and a hash of the code in `scripts/lib/common.sh` that installs them, and a hash of the score ids and their server. `scripts/ci/e2e-run.sh` hands each case its files just before it runs, at the paths `setup.sh` and `install_data_file` read them from, so they download nothing; the score files the case copies from the cache itself. On a miss it downloads them first, checked against their pins or the checksum files the servers publish beside them (`MD5SUMS`, `md5checksum.txt`, the `.md5` of each score), trying up to 6 times 30 s apart. The four score files are pinned by md5 in `PGS_MD5` of `e2e-run.sh` (the md5 the PGS Catalog served beside each on 2026-11-06), tried on the mirror first and then at EBI; a restored or downloaded score must match its pin as well as its `.md5`. A file gets at most `E2E_MIRROR_BUDGET` seconds on the mirror (900, or half the fill's budget when that is less), so a mirror that trickles leaves EBI its turn. One fill may take at most `E2E_DATA_BUDGET` seconds (2400 in `e2e.yml`): a source that trickles above `fetch`'s stall limit would otherwise run on to the leg's 240-minute limit, as EBI's 1000 Genomes server did twice on 2026-11-05. A fill still running then is stopped and its case fails as `FAIL (data fill over 2400s)` without running, since its own download would be as slow. A restored entry is checked again before use (`--data-check`): the IPD-IMGT/HLA and GENCODE entry against the sha256 list written when it was filled, the score files against their `.md5`; one that fails is downloaded again. `bash-step-08-hla` then runs with every HTTP and HTTPS request sent to a closed port, after a control shows that a request under that block fails at the closed port, so a warm cache cannot reach either host. Only the leg whose cases include the case restores and saves its entry, and it saves only on main or in a run by hand with `save_images`, as with the images. The job summary says whether each key hit, and the case's log says where its files came from. The fifth is the PGS Catalog's synthetic HAPNEST panel (0.27 GB, cases `prs-2-ancestry` and `prs-scores-and-run-options-2-panel-chrx`) from EBI's FTP server, which failed cases with curl exit 7 on 2026-11-04. It is keyed on the sha256 `tests/e2e/lib.sh` pins (`HAPNEST_SHA256`). The cases handle it themselves (`setup_ancestry_panel` in `lib.sh`): with the panel in the cache, or on a miss from `E2E_DATA_MIRROR`, they check the sha256 and run `setup.sh --ancestry-panel` with every HTTP and HTTPS request sent to a closed port, so an EBI outage cannot fail them; when neither has it, `setup.sh` downloads the panel from EBI as a user's run does. The first case puts a panel that did not come from the cache in the cache for the save step. A red control in `prs-2-ancestry` runs `setup.sh` with the network blocked and no panel, which must fail. The sixth, entry `catalogs`, holds the pinned downloads of `scripts/ci/build-callability.sh`, `scripts/ci/build-cn-intervals.sh` and `scripts/ci/build-sv-rule-regions.sh`, whose cases `callability-1-catalog`, `cn-intervals-1-catalog` and `followups-ci-3-sv-rule-regions` rebuild `assets/callability_genes.tsv`, the interval rows of `bin/cn_loci.tsv` and `assets/sv_rule_regions.tsv` and compare them with the committed files. Each builder lists its downloads with `--list`; the key is a hash of those lists, so a new pin is a new key. GENCODE's GTF among them comes from EBI's FTP server, which refused every connection for minutes on 2026-11-06 and failed `callability-1-catalog` on main (run 42259432681). The runner fills the entry as it does the others, mirror first and every file checked against its sha256, and each case points its builder's cache at its folder there; a builder that still has to download tries for about five minutes, 30 s apart, and gives up at once on a 403 or 404 (`fetch_pinned` in `scripts/ci/lib/fetch-pinned.sh`, which the three builders share). The builders download with `curl` and hand the folder to `og dev build`, which reads local files only. Every download, there and in `setup.sh`, gives up on a transfer that stalls (`FETCH_STALL`, see `fetch` in `scripts/lib/common.sh`), and the next try resumes it. How long it took in one job, before the split: a passing e2e job took about 105 to 205 minutes with 84 cases, and 230 minutes of cases with 130 (run 41390434697, 2026-11-02). The runner decides much of it, not the cache: the same CPU model took 106 minutes in one run and 166 in another. In October 2026, with 84 cases, the same code took 106 and 166 minutes on an AMD EPYC 9V45 (runs 39197502832 and 39075176392, the second of which also saved the cache), 112 minutes on an Intel Xeon 6973P (run 39088086725), 156 and 191 minutes on an AMD EPYC 7763 (runs 39075764278 and 39075201465) and 205 minutes on an AMD EPYC 9V74 (run 39197512594, which saved three groups). The image cache saves about 7 minutes of that: pulling every image took 9 minutes, restoring and loading the four groups took 2.5 (run 39075201465 restored 39 images in 118 seconds), and saving them all took 12. Each leg has a limit of 240 minutes (355 for a traced shard leg); the base leg waits up to 75 minutes for a fixture a pull request bumps. Each leg's first steps print the runner's CPU model and CPU count to the log and the job summary, so a later timing can name the hardware. From 258b158f784dfe44f4e2892147a6bb8ba613ef4e Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 16:43:44 +0100 Subject: [PATCH 045/110] docs(changelog): note the source and licence lines of the bundled tables Bead: lic-20, lic-30, sv-45, sv-46, sv-47, trait-43, plat-74, lic-08, lic-27, D3 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..0982d4928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Every bundled data table now names its source and its terms in its header. `assets/chip_genes_grch38.bed` had no header; it now names GENCODE 50. `assets/sv_rule_regions.tsv` names TRExplorer (MIT, Broad Institute), GENCODE, HGNC and NCBI. `assets/callability_genes.tsv` names GIAB (NIST), GENCODE, HGNC and NCBI. The builders write these lines, so a rebuild keeps them, and a builder test fails when one is missing. `assets/parascopy_models_v1.7.txt` and `assets/locityper_loci.bed` credit Timofey Prodanov's Zenodo data under CC BY 4.0 and say what changed. `assets/bloodtype_markers.tsv` names RBCeq2's MIT licence and cites the ISBT database for the names only. The upstream notices ship in `assets/licences/`: RBCeq2, TRExplorer, 23andme2vcf and NIST's notice for the GIAB data. The docs of steps 05, 35, 41 and 53, the consumer site fixture and `docs/resources.md` name the same terms, with the terms of the cohort panels and of the AnnotSV bundle. The notes of the test-data release `e2e-data-1` now name the source and terms of each file. No data row changes, and every reader of these files already skips `#` lines, so no output changes. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. From 41845f9dd55527bcb53301e9b60dc5ac3ddc4461 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 17:13:23 +0100 Subject: [PATCH 046/110] fix(qc): count a pair as a comparison only on known shared sites A pair whose relatedness is nan (no shared site) was skipped, so a sample with only such pairs read not_checked; a pair table without the n column counted as a comparison on enough sites. Both now leave identity uncertain: checked needs a known n of 1,000 or more. The docs and the changelog state the single-sample rule and the confidence fallbacks in full. Bead: lin-30 Bead: lin-31 --- CHANGELOG.md | 4 ++-- docs/33-sample-qc.md | 8 ++++---- rust/crates/og-summary/src/qc.rs | 28 +++++++++++++------------- rust/crates/og-summary/src/qc/tests.rs | 19 ++++++++++++++--- 4 files changed, 36 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index de2729e64..975b90c95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,8 +6,8 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n - Step 33's table (`qc/_sample_qc.tsv`) now says when identity or contamination rests on too little evidence. Before, a run with one sample and a FREEMIX from a few hundred markers read like a clean, confirmed sample. Five rows follow `same_person_as`; no row was renamed or removed: - `verifybamid2_markers`: the markers VerifyBamID2's marker check kept, read from its log. The rerun without the check does not log it, so the count comes from the first run. - - `contamination_confidence` and its reason: `uncertain` when the marker check was skipped or kept fewer than 5,000 markers, else `ok`. `contamination` (`ok` or `warn`) is unchanged. - - `identity` and its reason: `uncertain` below 1,000 informative somalier sites (the sample's genotyped sites, or the sites a pair shares), `not_checked` when no other sample was in the somalier run (every bash run), and `checked` when another sample was compared on 1,000 or more shared sites. + - `contamination_confidence` and its reason: `uncertain` when the marker check was skipped, kept fewer than 5,000 markers, or neither the check nor the count is known; `ok` when it kept 5,000 or more, or passed with no count in its log; empty when VerifyBamID2 did not run. `contamination` (`ok` or `warn`) is unchanged. + - `identity` and its reason: `uncertain` below 1,000 genotyped somalier sites, or when no other sample is known to share 1,000 or more with this one; from 1,000 sites on, `not_checked` when no other sample was in the somalier run (every bash run), and `checked` when another sample was compared on 1,000 or more shared sites. - `og qc sample` takes `--verifybamid2-markers N`. In Nextflow, `.marker_check` holds the count on a second line. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. diff --git a/docs/33-sample-qc.md b/docs/33-sample-qc.md index 5b4e879cf..be0432573 100644 --- a/docs/33-sample-qc.md +++ b/docs/33-sample-qc.md @@ -3,7 +3,7 @@ ## What This Does Checks two things about a sample before you read any result from it, and estimates a third: -- **Is it the person you think?** somalier reads the BAM at 17,766 known polymorphic sites and infers the sex from the reads: a male has no heterozygous sites on chrX outside the pseudoautosomal regions. A sex that differs from the one you declare stops the step. In a Nextflow run with several samples, somalier also compares every pair, so two rows that are the same person show up. With one sample there is nothing to compare, and the table says identity was `not_checked`; below 1,000 informative sites it says `uncertain`. +- **Is it the person you think?** somalier reads the BAM at 17,766 known polymorphic sites and infers the sex from the reads: a male has no heterozygous sites on chrX outside the pseudoautosomal regions. A sex that differs from the one you declare stops the step. In a Nextflow run with several samples, somalier also compares every pair, so two rows that are the same person show up. Below 1,000 informative sites the table says identity is `uncertain`. At 1,000 or more, with one sample there is nothing to compare, and it says `not_checked`. - **Is another person's DNA mixed in?** VerifyBamID2 estimates FREEMIX, the share of reads that come from someone else, from the allele balance at 100,000 markers of the 1000 Genomes panel. Above 0.03 the step warns. An estimate from fewer than 5,000 markers, or with VerifyBamID2's marker check skipped, is marked `uncertain`. - **Did some cells lose the Y, or one X?** From the depth step 16b measured and, for a woman, the VCF's chrX allele fractions, the step estimates the share of cells that lost the Y chromosome (men) or one X (women), with its 95% range. See [Mosaic loss of chrY or chrX](#mosaic-loss-of-chry-or-chrx). @@ -65,7 +65,7 @@ VerifyBamID2 refuses to estimate when fewer than 1,000 panel markers have reads VerifyBamID2's marker check logs how many markers it kept: those with reads and a depth within three standard deviations of the mean (`NOTICE - N SNP markers remained after sanity check.`). The run without the check does not log it, so the step reads the count from the first run's log and records it as `verifybamid2_markers`. FREEMIX is `contamination_confidence uncertain` when the check was skipped or when it kept fewer than 5,000 markers. That floor is five times the 1,000 markers the check asks for, and half of the 10% of the panel it also asks for. A whole genome at 30x keeps far more. `contamination` (`ok` or `warn`) still compares FREEMIX with `FREEMIX_WARN` as before; the confidence row only says how far to trust that number. -Identity rests on somalier's informative sites: the sites it genotyped for the sample (`sites_genotyped`) and, for each pair, the sites both samples have a genotype at (its `n` column). Below 1,000, about one in 18 of somalier's 17,766 sites, `identity` is `uncertain`. With one sample, as in every bash run, there is no other sample to compare with: `identity` is `not_checked`, and the sex check is the only identity check. It is `checked` when somalier compared the sample with another sample of the run on 1,000 or more shared sites. +Identity rests on somalier's informative sites: the sites it genotyped for the sample (`sites_genotyped`) and, for each pair, the sites both samples have a genotype at (its `n` column). Below 1,000 genotyped sites, about one in 18 of somalier's 17,766 sites, `identity` is `uncertain`. From 1,000 sites on, with one sample, as in every bash run, there is no other sample to compare with: `identity` is `not_checked`, and the sex check is the only identity check. It is `checked` when somalier compared the sample with another sample of the run on 1,000 or more shared sites. A pair with fewer shared sites, with no `n` column, or with no relatedness (somalier writes `nan` when two samples share no site) does not count, and when no pair counts, `identity` is `uncertain`. In Nextflow, add `sample_qc` to `--tools` with `--somalier_sites` and `--verifybamid2_panel` (the folder that holds the `.UD`, `.mu` and `.bed` files); `--freemix_warn` and `--sex_check` work as above. `SOMALIER_RELATE` runs once over every sample of the run, with a pedigree of every sample's samplesheet sex. A sex mismatch stops the run, after `INDEXCOV` made the same check from the index. `SAMPLE_QC` gets `MOSDEPTH`'s windows when `mosdepth` is in `--tools` (it is in the default list), and the row's VCF. It waits for that VCF, so on a FASTQ row somalier's sex check reports after `DEEPVARIANT`; `INDEXCOV`'s check still stops the run before it. @@ -118,8 +118,8 @@ The HTML report (step 24) shows the inferred sex, FREEMIX and any duplicate in i | FREEMIX above 0.03 | About that share of the reads are someone else's | Treat heterozygous calls with care; ask the lab whether it can resequence | | `contamination_confidence uncertain` | FREEMIX rests on fewer than 5,000 markers, or VerifyBamID2 skipped its marker check | Read FREEMIX as a rough estimate. Normal on a targeted or sliced BAM; on a whole genome, check the depth | | `same_person_as` set | Two samples of the run share their genome (relatedness 0.9 or more) | A duplicate row, a resequenced sample, an identical twin, or a swap | -| `identity not_checked` | No other sample in the somalier run to compare with | Nothing. To compare with an earlier sample, relate the two `.somalier` files (Notes below) | -| `identity uncertain` | Fewer than 1,000 informative somalier sites for the sample, or shared with every other sample | A relatedness or a `same_person_as` from so few sites can be wrong. Normal on a targeted or sliced BAM | +| `identity not_checked` | 1,000 or more informative sites, but no other sample in the somalier run to compare with | Nothing. To compare with an earlier sample, relate the two `.somalier` files (Notes below) | +| `identity uncertain` | Fewer than 1,000 informative somalier sites for the sample, or no other sample known to share 1,000 or more with it | A relatedness or a `same_person_as` from so few sites can be wrong. Normal on a targeted or sliced BAM | | `mosaic_call not_detected` | The 95% range does not put a loss of the Y (or of one X) above 10% of the cells; the estimate itself can be higher when the range is wide | Nothing; a smaller loss cannot be told from noise at 30x | | `mosaic_call detected` | The low end of the 95% range is above 10%: a share of the blood cells lost the Y, or one X | Nothing follows from it alone. It is a population-level marker, not a diagnosis; a doctor would test blood cells directly if it ever mattered | | `mosaic_call gain` | More depth than one Y or two X | An extra copy (47,XYY, 47,XXX) or a gain; it is not a loss | diff --git a/rust/crates/og-summary/src/qc.rs b/rust/crates/og-summary/src/qc.rs index ef58104a9..c8a9efe61 100644 --- a/rust/crates/og-summary/src/qc.rs +++ b/rust/crates/og-summary/src/qc.rs @@ -329,17 +329,15 @@ pub fn table(i: &Inputs) -> Result, String> { for r in read_rows(pairs)? { let (a, b) = (cell(&r, "sample_a"), cell(&r, "sample_b")); let rel = num(cell(&r, "relatedness")); - if (a == Some(sid) || b == Some(sid)) - && a != b - && let Some(rel) = rel - { - // `n`: the sites both samples have a genotype at (an older - // somalier without it: the sample's own sites decide). - match num(cell(&r, "n")) { - Some(n) if n < MIN_IDENTITY_SITES as f64 => thin += 1, - _ => compared += 1, + if (a == Some(sid) || b == Some(sid)) && a != b { + // `n`: the sites both samples have a genotype at. A pair + // with fewer, with no `n` column, or with no relatedness + // (nan: they share no site) is no comparison. + match (rel, num(cell(&r, "n"))) { + (Some(_), Some(n)) if n >= MIN_IDENTITY_SITES as f64 => compared += 1, + _ => thin += 1, } - if rel >= SAME_PERSON { + if let Some(rel) = rel.filter(|&x| x >= SAME_PERSON) { let other = if a == Some(sid) { b } else { a }; same.push(format!("{} ({})", other.unwrap_or("None"), fixed(rel, 2))); } @@ -403,9 +401,9 @@ fn contamination_confidence( /// Whether the reads were checked against another sample: `checked`, /// `uncertain` (too few informative sites) or `not_checked` (nothing to -/// compare with); and why. `compared` and `thin` count the other samples -/// of the run with at least, and with fewer than, [`MIN_IDENTITY_SITES`] -/// shared sites. +/// compare with); and why. `compared` counts the other samples of the +/// run with at least [`MIN_IDENTITY_SITES`] shared sites, `thin` the +/// others (fewer, unknown, or no relatedness). fn identity(sites: i128, compared: usize, thin: usize) -> (&'static str, String) { let floor = thousands(MIN_IDENTITY_SITES as u64); if sites < MIN_IDENTITY_SITES { @@ -428,7 +426,9 @@ fn identity(sites: i128, compared: usize, thin: usize) -> (&'static str, String) if thin > 0 { return ( "uncertain", - format!("the other samples of the run share fewer than {floor} sites with this one"), + format!( + "no other sample of the run is known to share {floor} or more genotyped sites with this one" + ), ); } ( diff --git a/rust/crates/og-summary/src/qc/tests.rs b/rust/crates/og-summary/src/qc/tests.rs index 0702ecdb2..f04a7e049 100644 --- a/rust/crates/og-summary/src/qc/tests.rs +++ b/rust/crates/og-summary/src/qc/tests.rs @@ -392,12 +392,25 @@ fn identity_needs_another_sample_on_enough_shared_sites() { let pairs = format!("{PAIRS}U\tS\t0.97\t0\t300\t300\nS\tV\t0.1\t0\t300\t999\n"); let t = evidence(&many, Some(&pairs), false, "", None); assert_eq!(t["identity"], "uncertain"); - assert!(t["identity_reason"].contains("fewer than 1,000"), "{t:?}"); + assert_eq!( + t["identity_reason"], + "no other sample of the run is known to share 1,000 or more genotyped sites with this one" + ); // The same-person flag still shows; the identity row says it is thin. assert_eq!(t["same_person_as"], "U (0.97)"); - // An older pairs table without n, and a pair whose relatedness is nan. - let pairs = "#sample_a\tsample_b\trelatedness\nS\tT\t0.1\nS\tU\t0.2\nW\tS\tnan\nS\tS\t1.0\n"; + // A pair that shares no site: somalier writes nan and n 0. + let pairs = format!("{PAIRS}S\tT\tnan\t0\t0\t0\n"); + let t = evidence(&many, Some(&pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + // An older pairs table without n: the shared sites are not known. + let pairs = "#sample_a\tsample_b\trelatedness\nS\tT\t0.1\nS\tU\t0.2\nS\tS\t1.0\n"; let t = evidence(&many, Some(pairs), false, "", None); + assert_eq!(t["identity"], "uncertain"); + // Two pairs on enough shared sites, and a self pair that does not count. + let pairs = format!( + "{PAIRS}S\tT\t0.1\t9\t300\t15000\nU\tS\t0.2\t9\t300\t1000\nS\tS\t1.0\t0\t300\t15000\n" + ); + let t = evidence(&many, Some(&pairs), false, "", None); assert_eq!( (t["identity"].as_str(), t["identity_reason"].as_str()), ( From f4123b0d700bc2d45852cf813391fc04998d1b41 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 17:13:51 +0100 Subject: [PATCH 047/110] test(gridss): check the skip path writes the high-confidence file; print step 22's SUPP note once When the raw GRIDSS VCF already exists, step 4b skips GRIDSS and writes the high-confidence file from it. The SV fake-docker case now runs that path and fails when the file or its index is missing. Step 22 printed its note on SUPP twice; it now prints it once, in the summary next to the counts. --- scripts/22-survivor-merge.sh | 2 -- tests/fake-docker/bash-step-sv.sh | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/scripts/22-survivor-merge.sh b/scripts/22-survivor-merge.sh index 51c64e7a8..83a6d2ddb 100755 --- a/scripts/22-survivor-merge.sh +++ b/scripts/22-survivor-merge.sh @@ -40,8 +40,6 @@ echo " Step 22: SV consensus (SURVIVOR merge)" echo " Sample: ${SAMPLE}" echo " Output: ${OUT}" echo "============================================" -echo "SUPP is caller agreement, not validation: Manta and Delly read the same split and" -echo " paired reads. Annotate the callers' own calls (step 05), not this file." echo "" # CNVpytor's own table, when step 18 left no VCF: one DEL or DUP record per diff --git a/tests/fake-docker/bash-step-sv.sh b/tests/fake-docker/bash-step-sv.sh index fcd555c0e..311c4cdd6 100755 --- a/tests/fake-docker/bash-step-sv.sh +++ b/tests/fake-docker/bash-step-sv.sh @@ -11,7 +11,8 @@ # After the raw VCF it writes sv_gridss/_gridss.high.vcf.gz with # bcftools and GRIDSS's high-confidence rule (QUAL>=1000 && INFO/AS>0 && # INFO/RAS>0), and its index, and says its calls are left out of the SV -# consensus (step 22 does not convert them). +# consensus (step 22 does not convert them). A second run finds the raw +# VCF, skips GRIDSS and writes the high-confidence file again from it. # Delly (19): gets -x with the exclude map setup.sh installs; without it, # runs as before and warns. # Sniffles2 (04c): stops with exit 1, before Sniffles2, when the first @@ -119,6 +120,21 @@ H="${GENOME_DIR}/sample1/sv_gridss/sample1_gridss" [ -f "${H}.vcf.gz" ] && [ -f "${H}.high.vcf.gz" ] && [ -f "${H}.high.vcf.gz.tbi" ] \ || fail "step 04b did not leave the raw VCF, the high-confidence VCF and its index" output_has gridss 'High confidence: .*sample1_gridss\.high\.vcf\.gz' +# A second run finds the raw VCF: it skips GRIDSS and writes the high-confidence +# file again from that VCF. The raw VCF is a finished one, ending with the BGZF +# end-of-file block as htslib writes it, so the step takes it as done. +{ printf '##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tsample1\n' | gzip -c + printf '\x1f\x8b\x08\x04\x00\x00\x00\x00\x00\xff\x06\x00\x42\x43\x02\x00\x1b\x00\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00'; } > "${H}.vcf.gz" +: > "$FAKE_DOCKER_LOG" +rm -f "${H}.high.vcf.gz" "${H}.high.vcf.gz.tbi" +GRIDSS_MIN_MEM_GB=8 run_expect 0 gridss-skip "${SCRIPTS}/04b-gridss.sh" sample1 +output_has gridss-skip 'skipping GRIDSS' +if awk '/^run image=[^ ]*gridss/ { found = 1 } END { exit !found }' "$FAKE_DOCKER_LOG"; then + fail "step 04b ran GRIDSS again although its VCF exists" +fi +[ -f "${H}.high.vcf.gz" ] && [ -f "${H}.high.vcf.gz.tbi" ] \ + || fail "step 04b did not write the high-confidence VCF and its index from the existing raw VCF" +output_has gridss-skip 'High confidence: .*sample1_gridss\.high\.vcf\.gz' # --- Delly ---------------------------------------------------------------------------- : > "$FAKE_DOCKER_LOG" From 1e12a8e2b076096b483685af6e7e2fd5cd184591 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 17:43:21 +0100 Subject: [PATCH 048/110] docs(assets): give the 3202-set NYGC acknowledgement and NIST's whole notice The MoChA panel is the extended 3202-sample set, whose NYGC reuse text names grants 03S1 and 04S2. NIST's notice ends with two more sentences on citation and acknowledgement. The Locityper note counts the six upstream loci its five rows come from. --- assets/licences/NIST-GIAB-NOTICE.txt | 5 ++++- assets/locityper_loci.bed | 4 ++-- docs/resources.md | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/licences/NIST-GIAB-NOTICE.txt b/assets/licences/NIST-GIAB-NOTICE.txt index 5f96456f6..3747f3f20 100644 --- a/assets/licences/NIST-GIAB-NOTICE.txt +++ b/assets/licences/NIST-GIAB-NOTICE.txt @@ -30,4 +30,7 @@ You may improve, modify, and create derivative works of the data or any portion data, and you may copy and distribute such modifications or works. Modified works should carry a notice stating that you changed the data and should note the date and nature of any such change. Please explicitly acknowledge the National Institute of Standards and -Technology as the source of the data. +Technology as the source of the data: Data citation recommendations are provided at +https://www.nist.gov/open/license . Permission to use this data is contingent upon your +acceptance of the terms of this agreement and upon your providing appropriate +acknowledgments of NIST's creation of the data/work. diff --git a/assets/locityper_loci.bed b/assets/locityper_loci.bed index 977698fa7..107e1f4f5 100644 --- a/assets/locityper_loci.bed +++ b/assets/locityper_loci.bed @@ -5,8 +5,8 @@ # database of these rows from the HPRC v2.1 pangenome VCF (LOCITYPER_PANEL_URL) and reads that VCF # 250 kb either side of each row, the room Locityper's locus extension needs (up to 200 kb). # Source: Timofey Prodanov, Locityper loci database, https://doi.org/10.5281/zenodo.15879519, -# licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changed: five of its 326 loci -# kept, FCGR3A and FCGR2B joined as FCGR. The HPRC panel is public domain +# licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Changed: six of its 326 loci +# kept, FCGR3A and FCGR2B joined as FCGR (five rows). The HPRC panel is public domain # (https://humanpangenome.org/data-use/); no part of it is in this file. chr1 161506761 161681047 FCGR chr6 32484347 32593538 HLA-DRB1 diff --git a/docs/resources.md b/docs/resources.md index aec9ecef2..738288a42 100644 --- a/docs/resources.md +++ b/docs/resources.md @@ -56,7 +56,7 @@ Free resources for understanding your genomic data, organized from most accessib `setup.sh` downloads or builds each population panel on your own machine, from its source. The repository ships none of them. These are the terms of each source: -- **1000 Genomes** (the phase 3 sites of step 43, the high-coverage panel of step 51 (MoChA), and pgsc_calc's panel of steps 25 and 26): available without embargo. Cite the project (The 1000 Genomes Project Consortium, Nature 2015, doi:10.1038/nature15393; https://www.internationalgenome.org/IGSR_disclaimer). For the high-coverage data, cite Byrska-Bishop et al., Cell 2022 (doi:10.1016/j.cell.2022.08.004) and add: "These data were generated at the New York Genome Center with funds provided by NHGRI Grant 3UM1HG008901-03S1." Its cell lines come from the NIGMS Human Genetic Cell Repository at the Coriell Institute for Medical Research. +- **1000 Genomes** (the phase 3 sites of step 43, the high-coverage panel of step 51 (MoChA), and pgsc_calc's panel of steps 25 and 26): available without embargo. Cite the project (The 1000 Genomes Project Consortium, Nature 2015, doi:10.1038/nature15393; https://www.internationalgenome.org/IGSR_disclaimer). For the high-coverage data, cite Byrska-Bishop et al., Cell 2022 (doi:10.1016/j.cell.2022.08.004) and add: "These data were generated at the New York Genome Center with funds provided by NHGRI Grants 3UM1HG008901-03S1 and 3UM1HG008901-04S2." NYGC asks for this text for the extended 3202-sample set the panel comes from: https://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/1000G_2504_high_coverage/20200526_1000G_2504plus698_high_cov_data_reuse_README.txt. Its cell lines come from the NIGMS Human Genetic Cell Repository at the Coriell Institute for Medical Research. - **gnomAD HGDP + 1000 Genomes** (step 26b): released under gnomAD's terms, CC0 1.0 (https://gnomad.broadinstitute.org/terms). - **HPRC release 2** (step 53, Locityper): public domain (https://humanpangenome.org/data-use/). - **HAPNEST** (the PGS Catalog's small synthetic panel the tests use; `ANCESTRY_PANEL_NAME` can pick it for steps 25 and 26): synthetic genotypes made from 1000 Genomes and HGDP, published by EMBL-EBI (BioStudies S-BSST936, https://www.ebi.ac.uk/biostudies/studies/S-BSST936) under EMBL-EBI's terms of use (https://www.ebi.ac.uk/about/terms-of-use/). From 885d08b0fdc6f317be2f54cea3bcb7e66796fdd7 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 17:54:31 +0100 Subject: [PATCH 049/110] docs(changelog): say only the SV rule and callability builders write the headers --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0982d4928..0cd2d5e22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- Every bundled data table now names its source and its terms in its header. `assets/chip_genes_grch38.bed` had no header; it now names GENCODE 50. `assets/sv_rule_regions.tsv` names TRExplorer (MIT, Broad Institute), GENCODE, HGNC and NCBI. `assets/callability_genes.tsv` names GIAB (NIST), GENCODE, HGNC and NCBI. The builders write these lines, so a rebuild keeps them, and a builder test fails when one is missing. `assets/parascopy_models_v1.7.txt` and `assets/locityper_loci.bed` credit Timofey Prodanov's Zenodo data under CC BY 4.0 and say what changed. `assets/bloodtype_markers.tsv` names RBCeq2's MIT licence and cites the ISBT database for the names only. The upstream notices ship in `assets/licences/`: RBCeq2, TRExplorer, 23andme2vcf and NIST's notice for the GIAB data. The docs of steps 05, 35, 41 and 53, the consumer site fixture and `docs/resources.md` name the same terms, with the terms of the cohort panels and of the AnnotSV bundle. The notes of the test-data release `e2e-data-1` now name the source and terms of each file. No data row changes, and every reader of these files already skips `#` lines, so no output changes. +- Every bundled data table now names its source and its terms in its header. `assets/chip_genes_grch38.bed` had no header; it now names GENCODE 50. `assets/sv_rule_regions.tsv` names TRExplorer (MIT, Broad Institute), GENCODE, HGNC and NCBI. `assets/callability_genes.tsv` names GIAB (NIST), GENCODE, HGNC and NCBI. The builders of the SV rule table and the callability catalog (`og dev build sv-rule-regions` and `og dev build callability`) write these lines, so a rebuild keeps them, and a builder test fails when one is missing. The CHIP gene BED has no builder in the repository, so its header is kept by hand. `assets/parascopy_models_v1.7.txt` and `assets/locityper_loci.bed` credit Timofey Prodanov's Zenodo data under CC BY 4.0 and say what changed. `assets/bloodtype_markers.tsv` names RBCeq2's MIT licence and cites the ISBT database for the names only. The upstream notices ship in `assets/licences/`: RBCeq2, TRExplorer, 23andme2vcf and NIST's notice for the GIAB data. The docs of steps 05, 35, 41 and 53, the consumer site fixture and `docs/resources.md` name the same terms, with the terms of the cohort panels and of the AnnotSV bundle. The notes of the test-data release `e2e-data-1` now name the source and terms of each file. No data row changes, and every reader of these files already skips `#` lines, so no output changes. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. From a878b3bca8a34011e306246c9820eed359079e8c Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:04:16 +0100 Subject: [PATCH 050/110] fix(ystr): count DYS389II as FamilyTreeDNA does, 30 on GRCh38 GRCh38 reads [TAGA]9 [CAGA]3 N48 [TAGA]13 [CAGA]5 at DYS389II, which is 30 by its STRBase repeat structure and NIST's sequence-based allele. The span's two parts round to 17 + 12 copies, so offset 0 gave 29 and every run with reads long enough to span DYS389II read one repeat low. The offset is now +1, and the reference test requires 30. Bead: lin-18 --- assets/ystr_panel.tsv | 2 +- docs/45-y-str.md | 2 +- rust/crates/og-render/tests/ancestry_ystr.rs | 3 ++- rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs | 4 +++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/assets/ystr_panel.tsv b/assets/ystr_panel.tsv index 982ee547a..aad198342 100644 --- a/assets/ystr_panel.tsv +++ b/assets/ystr_panel.tsv @@ -49,7 +49,7 @@ order panel marker kind regions motif offset note 9 Y-12 DYS439 absent . [GATA]n . . 10 Y-12 DYS389I single chrY:12500448-12500495/4/12/DYS389I . 0 . 11 Y-12 DYS392 single chrY:20471987-20472025/3/13/DYS392 [ATA]n 0 . -12 Y-12 DYS389II span chrY:12500448-12500516/4/17.25/DYS389II.1;chrY:12500564-12500611/4/12/DYS389II.2 [TAGA]n [CAGA]n N48 [TAGA]n [CAGA]n 0 FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too +12 Y-12 DYS389II span chrY:12500448-12500516/4/17.25/DYS389II.1;chrY:12500564-12500611/4/12/DYS389II.2 [TAGA]n [CAGA]n N48 [TAGA]n [CAGA]n 1 FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II; the span starts where DYS389I starts, so this count covers DYS389I too 13 Y-25 DYS458 single chrY:7999839-7999902/4/16/DYS458 [GAAA]n 0 . 14 Y-25 DYS459a multicopy . . . . 15 Y-25 DYS459b multicopy . . . . diff --git a/docs/45-y-str.md b/docs/45-y-str.md index e23321842..089fb7b23 100644 --- a/docs/45-y-str.md +++ b/docs/45-y-str.md @@ -98,7 +98,7 @@ Both reports get a Y-STR section: the number of markers per confidence and every ## Comparing with FamilyTreeDNA -- **24 markers are on FamilyTreeDNA's scale.** The marker set's regions do not always cover the blocks a lab counts. At DYS19 the region holds 16 repeat units, but FamilyTreeDNA does not count the `CCTA` unit in it, so the GRCh38 reference reads 15. At DYS449 the two parts hold 36 units, and FamilyTreeDNA counts only the two `TTTC` blocks, 15 and 14, so the reference reads 29. The offsets in the table move every one of the 24 markers with a published counting rule onto FamilyTreeDNA's scale: DYS19 -1, DYS448 -1, DYS449 -7, Y-GATA-H4 -20, DYS438 +2 (two repeat units lie just before the region) and DYS461 +1; the other 18 need no change. `og-reports`' test `i411_ystr_ftdna_scale` checks that the reference reads FamilyTreeDNA's count at each of them. +- **24 markers are on FamilyTreeDNA's scale.** The marker set's regions do not always cover the blocks a lab counts. At DYS19 the region holds 16 repeat units, but FamilyTreeDNA does not count the `CCTA` unit in it, so the GRCh38 reference reads 15. At DYS449 the two parts hold 36 units, and FamilyTreeDNA counts only the two `TTTC` blocks, 15 and 14, so the reference reads 29. The offsets in the table move every one of the 24 markers with a published counting rule onto FamilyTreeDNA's scale: DYS19 -1, DYS389II +1, DYS448 -1, DYS449 -7, Y-GATA-H4 -20, DYS438 +2 (two repeat units lie just before the region) and DYS461 +1; the other 17 need no change. `og-reports`' test `i411_ystr_ftdna_scale` checks that the reference reads FamilyTreeDNA's count at each of them. - **The other called markers are on the reference's scale, and their note says so.** No published rule says which blocks FamilyTreeDNA counts there, so a count can differ from FamilyTreeDNA's by a fixed number of repeats. A difference that is the same for every man of a project is a convention, not a mutation. The safe comparison is with a relative or project member who also has a genome, or with one known FamilyTreeDNA result of the same man. - FamilyTreeDNA reports DYS389II as the sum total of DYS389I and DYS389II (its guide says so). The DYS389II span here starts where DYS389I starts, so its count would cover both too. At 164 bp it is longer than 150 bp reads can span, so from such reads DYS389II is not callable; DYS389I is. - FamilyTreeDNA lists DYS385, DYS459, DYS464, YCAII, CDY, DYF395S1 and DYS413 as two or four values; those are the not callable rows here. diff --git a/rust/crates/og-render/tests/ancestry_ystr.rs b/rust/crates/og-render/tests/ancestry_ystr.rs index 8b26ae7e7..963b15c02 100644 --- a/rust/crates/og-render/tests/ancestry_ystr.rs +++ b/rust/crates/og-render/tests/ancestry_ystr.rs @@ -542,7 +542,8 @@ fn counts_are_reference_copies_plus_the_length_difference() { o.stdout ); let o = run_at(&d, &[("DYS389II", good("4"))], Some(250)); - assert_eq!(cell(&o, "DYS389II", "count"), "30"); + // 17 + 12 part copies, one repeat (GB 4), offset +1. + assert_eq!(cell(&o, "DYS389II", "count"), "31"); assert!(cell(&o, "DYS389II", "note").contains("covers DYS389I")); let off = d.join("offset_panel.tsv"); diff --git a/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs b/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs index 69b00f11c..67d7e0018 100644 --- a/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs +++ b/rust/crates/og-reports/tests/i411_ystr_ftdna_scale.rs @@ -11,6 +11,8 @@ //! For example DYS19 is `[TCTA]12 CCTA [TCTA]3` there: FamilyTreeDNA counts //! the TCTA blocks, 15, while HipSTR's region holds 16 repeat units. DYS449 //! is `[TTTC]15 N50 [TTTC]14`, 29, while HipSTR's two parts hold 36 units. +//! DYS389II is `[TAGA]9 [CAGA]3 N48 [TAGA]13 [CAGA]5`, 30, while its span's +//! two parts round to 17 + 12 copies. //! //! The reads are 250 bp long here, so DYS389II and DYS448 (over 150 bp) are //! counted too. @@ -27,7 +29,7 @@ const REFERENCE: [(&str, &str); 24] = [ ("DYS391", "11"), ("DYS389I", "12"), ("DYS392", "13"), - ("DYS389II", "29"), + ("DYS389II", "30"), ("DYS458", "16"), ("DYS448", "19"), ("DYS449", "29"), From 795f1c40b47d1b17d627f73fbb3c0cf4af9053b7 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:10:08 +0100 Subject: [PATCH 051/110] fix(pgx): leave reference calls below GQ 20 out of PharmCAT's input og pgx refblock-fill held the GQ 20 floor only for the 0/0 records it writes at PharmCAT positions longer than one base. Every other reference call of the expanded gVCF passed through: a one-base block or a DeepVariant RefCall with GQ 5 at CYP2C19 rs4244285 reached PharmCAT as a confident 0/0. Now every reference call (GT all 0) below --min-gq, or without a GQ, is left out, so PharmCAT reads the position as missing. A variant call passes whatever its GQ. stderr counts them and names those at PharmCAT positions. The pgx-refblock-fill parity goldens change on purpose: the fixture's GQ 10 block (61 records) is left out, and stderr has the new line. Bead: pgx-07 Bead: D10 --- rust/crates/og-filters/src/refblock.rs | 70 +- .../og-filters/tests/i411_refblock_gq.rs | 214 +++ .../tests/port_tests_pgx_refblock.rs | 15 +- .../pgx-refblock-fill/bgzip-min-gq-50/stderr | 2 + .../pgx-refblock-fill/bgzip-min-gq-50/stdout | 1354 +++++++++++++++ .../pgx-refblock-fill/block-then-kept/stderr | 1 + .../pgx-refblock-fill/block-then-kept/stdout | 61 - .../golden/pgx-refblock-fill/crlf/stderr | 2 + .../golden/pgx-refblock-fill/crlf/stdout | 1532 +++++++++++++++++ .../golden/pgx-refblock-fill/fixture/stderr | 2 + .../golden/pgx-refblock-fill/fixture/stdout | 1532 +++++++++++++++++ .../pgx-refblock-fill/inconsistent/stderr | 1 + .../pgx-refblock-fill/inconsistent/stdout | 61 - .../pgx-refblock-fill/kept-then-block/stderr | 1 + .../pgx-refblock-fill/kept-then-block/stdout | 61 - .../golden/pgx-refblock-fill/min-gq-51/stderr | 2 + .../golden/pgx-refblock-fill/min-gq-51/stdout | 17 + .../pgx-refblock-fill/no-final-newline/stderr | 2 + .../pgx-refblock-fill/no-final-newline/stdout | 61 - .../pgx-refblock-fill/same-start/stderr | 1 + .../pgx-refblock-fill/same-start/stdout | 61 - 21 files changed, 4742 insertions(+), 311 deletions(-) create mode 100644 rust/crates/og-filters/tests/i411_refblock_gq.rs create mode 100644 tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr create mode 100644 tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout create mode 100644 tests/parity/golden/pgx-refblock-fill/crlf/stderr create mode 100644 tests/parity/golden/pgx-refblock-fill/crlf/stdout create mode 100644 tests/parity/golden/pgx-refblock-fill/fixture/stderr create mode 100644 tests/parity/golden/pgx-refblock-fill/fixture/stdout create mode 100644 tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr create mode 100644 tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout create mode 100644 tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr diff --git a/rust/crates/og-filters/src/refblock.rs b/rust/crates/og-filters/src/refblock.rs index 69f1894e5..ad5954cc3 100644 --- a/rust/crates/og-filters/src/refblock.rs +++ b/rust/crates/og-filters/src/refblock.rs @@ -15,6 +15,13 @@ //! lowest over the span. A summary goes to stderr; exit 2 on unreadable //! input. //! +//! The same floor holds for every record the filter passes on: a reference +//! call (GT all 0, a one-base block record or a `RefCall`) with GQ below +//! `--min-gq`, or no GQ, is left out, so PharmCAT reads the position as +//! missing instead of a confident 0/0 (issue #411, pgx-07). A variant call +//! passes whatever its GQ. stderr counts them and names those at PharmCAT +//! positions. +//! //! Fixes against the Python, each with a golden in `tests/parity`: //! - when the expanded stream had a record at a filled position that was //! not a one-base reference block, the Python wrote that record and then @@ -91,6 +98,9 @@ pub struct Targets { chroms: Vec<(String, Vec)>, index: HashMap, pub count: usize, + /// Every PharmCAT position, one base or longer: its gene (`?` without + /// one). + genes: HashMap<(String, i128), String>, } impl Targets { @@ -121,6 +131,7 @@ pub fn read_positions(path: &str) -> Result { chroms: Vec::new(), index: HashMap::new(), count: 0, + genes: HashMap::new(), }; let mut number = 0; for line in lines_of(path)? { @@ -134,13 +145,18 @@ pub fn read_positions(path: &str) -> Result { continue; } let ref_ = c[3]; - if crate::chars(ref_) == 1 && c[4].split(',').all(|a| crate::chars(a) == 1) { - continue; - } let gene = c .get(7) .and_then(|info| info.split(';').find_map(|kv| kv.strip_prefix("PX="))) .unwrap_or_default(); + if let Ok(pos) = pycompat::num::parse_int(c[1]) { + t.genes + .entry((c[0].to_owned(), pos)) + .or_insert_with(|| if gene.is_empty() { "?" } else { gene }.to_owned()); + } + if crate::chars(ref_) == 1 && c[4].split(',').all(|a| crate::chars(a) == 1) { + continue; + } let start = int_at(path, number, "POS", c[1])?; let len = i128::try_from(crate::chars(ref_)).unwrap_or(i128::MAX); let target = Target { @@ -187,6 +203,26 @@ pub fn block(alt: &str, filter: &str, gt: &str, gq: Option, min_gq: i128) } } +/// Whether a record is a reference call (GT all 0, one sample) below +/// `min_gq`, or without a GQ: not confident enough to reach PharmCAT as 0/0. +/// A record without a sample column or a GT is not a reference call. +pub fn weak_reference(line: &str, min_gq: i128) -> bool { + let c: Vec<&str> = line.trim_end_matches(['\n', '\r']).split('\t').collect(); + let (Some(keys), Some(vals)) = (c.get(8), c.get(9)) else { + return false; + }; + let fmt: HashMap<&str, &str> = keys.split(':').zip(vals.split(':')).collect(); + let Some(gt) = fmt.get("GT") else { + return false; + }; + if !gt.split(['/', '|']).all(|a| a == "0") { + return false; + } + fmt.get("GQ") + .and_then(|g| pycompat::num::parse_int(g).ok()) + .is_none_or(|gq| gq < min_gq) +} + /// What the gVCF shows over one target. #[derive(Debug, Clone)] struct Coverage { @@ -360,12 +396,16 @@ struct Fill { label: String, } -/// What [`run`] wrote: the labels of the records it filled, and the -/// positions where it kept the stream's own record instead. +/// What [`run`] wrote: the labels of the records it filled, the positions +/// where it kept the stream's own record instead, and the reference calls +/// below the GQ floor it left out (how many, and the labels of those at +/// PharmCAT positions). #[derive(Debug, Default)] pub struct Outcome { pub filled: Vec, pub kept: Vec, + pub weak: usize, + pub weak_at: Vec, } /// Fills the expanded VCF from `input` into `out`. @@ -488,6 +528,15 @@ pub fn run( // kept instead of it, so one position never gets two records. continue; } + if weak_reference(&line, min_gq) { + // A reference call below the floor: left out, so PharmCAT reads + // the position as missing, as it reads a ./. block. + outcome.weak += 1; + if let Some(gene) = targets.genes.get(&(c[0].to_owned(), key.1)) { + outcome.weak_at.push(format!("{gene} {}:{}", c[0], key.1)); + } + continue; + } out.write_all(line.as_bytes()).map_err(w)?; open_line = !line.ends_with('\n'); kept_key = Some(key); @@ -529,6 +578,17 @@ pub fn cli(argv: &[String]) -> u8 { "{PREFIX}: {} of {n} PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= {min_gq}{list}; the others stay as the gVCF has them (a variant call, or missing)", o.filled.len() ); + if o.weak > 0 { + let at = if o.weak_at.is_empty() { + "; none at a PharmCAT position".to_owned() + } else { + format!("; at PharmCAT positions: {}", o.weak_at.join(", ")) + }; + eprintln!( + "{PREFIX}: {} reference calls with GQ below {min_gq} (or none) left out, so PharmCAT reads them as missing{at}", + o.weak + ); + } 0 } Err(e) => { diff --git a/rust/crates/og-filters/tests/i411_refblock_gq.rs b/rust/crates/og-filters/tests/i411_refblock_gq.rs new file mode 100644 index 000000000..734a4f44e --- /dev/null +++ b/rust/crates/og-filters/tests/i411_refblock_gq.rs @@ -0,0 +1,214 @@ +//! A low-quality reference call never reaches PharmCAT as a confident 0/0 +//! (issue #411, pgx-07; floor D10). +//! +//! Step 07 expands the gVCF's reference blocks into one record per base and +//! `og pgx refblock-fill` passes that stream on to PharmCAT. Before this fix +//! the GQ 20 floor held only for the 0/0 records the filter writes itself at +//! positions longer than one base: a one-base block, or a DeepVariant +//! `RefCall`, with GQ 5 at CYP2C19 rs4244285 (the *2 position) passed through +//! as 0/0, and PharmCAT read the sample as confidently not *2. Now every +//! reference call (GT all 0) below the floor, or without a GQ, is left out +//! of the stream, so PharmCAT reads the position as missing. A variant call +//! passes whatever its GQ: the floor is for reference calls only. + +use og_filters::refblock::{MIN_GQ, Outcome, run}; + +const HEADER: &str = "##fileformat=VCFv4.2\n\ +##INFO=\n\ +##FORMAT=\n\ +##FORMAT=\n\ +##FORMAT=\n\ +##contig=\n\ +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS1\n"; + +/// PharmCAT's positions: CYP2C19 *2 (one base) and *17 (one base), and a +/// CYP2C9 deletion (two bases), as in its positions file. +const POSITIONS: &str = "##fileformat=VCFv4.2\n\ +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tPharmCAT\n\ +chr10\t94761900\trs12248560\tC\tT\t.\tPASS\tPX=CYP2C19\tGT\t0/0\n\ +chr10\t94781859\trs4244285\tG\tA\t.\tPASS\tPX=CYP2C19\tGT\t0/0\n\ +chr10\t94942205\trs1\tCT\tC\t.\tPASS\tPX=CYP2C9\tGT\t0/0\n"; + +const RS4244285: &str = "chr10\t94781859"; + +struct Run { + out: String, + outcome: Outcome, +} + +/// The verb on `records` (the gVCF's records over the region, as step 07 +/// writes them with `bcftools view -R`) and `stream` (the expanded records +/// on stdin), with `min_gq`. +fn fill(records: &str, stream: &str, min_gq: i128) -> Run { + let dir = std::env::temp_dir().join(format!( + "og-i411-refblock-gq-{}-{}", + std::process::id(), + std::thread::current() + .name() + .unwrap_or("t") + .replace("::", "-") + )); + std::fs::create_dir_all(&dir).unwrap(); + let positions = dir.join("positions.vcf"); + let gvcf = dir.join("gvcf.vcf"); + std::fs::write(&positions, POSITIONS).unwrap(); + std::fs::write(&gvcf, format!("{HEADER}{records}")).unwrap(); + let mut out = Vec::new(); + let (_, outcome) = run( + positions.to_str().unwrap(), + gvcf.to_str().unwrap(), + min_gq, + format!("{HEADER}{stream}").as_bytes(), + &mut out, + ) + .unwrap(); + std::fs::remove_dir_all(&dir).unwrap(); + Run { + out: String::from_utf8(out).unwrap(), + outcome, + } +} + +/// The one record the output holds at rs4244285, if any. +fn at_rs4244285(out: &str) -> Option { + let found: Vec<&str> = out + .lines() + .filter(|l| l.starts_with(&format!("{RS4244285}\t"))) + .collect(); + assert!(found.len() <= 1, "one record at most: {found:?}"); + found.first().map(|l| (*l).to_owned()) +} + +/// A one-base reference block over rs4244285 with `gq`: the gVCF record and +/// what `bcftools convert --gvcf2vcf | bcftools view --trim-alt-alleles` +/// makes of it. +fn one_base_block(gq: u32) -> (String, String) { + ( + format!("{RS4244285}\t.\tG\t<*>\t0\t.\tEND=94781859\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"), + format!("{RS4244285}\t.\tG\t.\t0\t.\t.\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"), + ) +} + +#[test] +fn red_first_a_gq_5_block_at_rs4244285_is_a_no_call() { + let (records, stream) = one_base_block(5); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out), + None, + "a one-base block with GQ 5 at CYP2C19 rs4244285 must not reach PharmCAT as 0/0" + ); +} + +#[test] +fn a_gq_25_block_at_rs4244285_stays_0_0() { + let (records, stream) = one_base_block(25); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out).as_deref(), + Some(stream.trim_end()), + "a block with GQ 25 is confident reference and passes unchanged" + ); + assert_eq!(r.outcome.weak, 0); + assert!(r.outcome.weak_at.is_empty()); +} + +#[test] +fn the_floor_is_d10s_20_and_follows_min_gq() { + for (gq, min_gq, kept) in [ + (20, MIN_GQ, true), + (19, MIN_GQ, false), + (25, 30, false), + (30, 30, true), + ] { + let (records, stream) = one_base_block(gq); + let r = fill(&records, &stream, min_gq); + assert_eq!( + at_rs4244285(&r.out).is_some(), + kept, + "GQ {gq} with --min-gq {min_gq}: kept {kept}" + ); + } + assert_eq!(MIN_GQ, 20, "the shared floor D10"); +} + +#[test] +fn refcall_records_take_the_same_floor() { + // DeepVariant's RefCall: a candidate it called reference, GT 0/0, its ALT + // trimmed to . by --trim-alt-alleles. + for (gq, kept) in [(8, false), (30, true)] { + let records = + format!("{RS4244285}\t.\tG\tA,<*>\t0\tRefCall\t.\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"); + let stream = format!("{RS4244285}\t.\tG\t.\t0\tRefCall\t.\tGT:GQ:MIN_DP\t0/0:{gq}:3\n"); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out).is_some(), + kept, + "a RefCall with GQ {gq}: kept {kept}" + ); + } +} + +#[test] +fn other_reference_calls_without_confidence_are_left_out() { + for (what, sample) in [ + ("haploid, GQ 5", "0:5:3"), + ("phased, GQ 5", "0|0:5:3"), + ("no GQ value", "0/0:.:3"), + ] { + let stream = format!("{RS4244285}\t.\tG\t.\t0\t.\t.\tGT:GQ:MIN_DP\t{sample}\n"); + let r = fill("", &stream, MIN_GQ); + assert_eq!(at_rs4244285(&r.out), None, "{what}: left out"); + } + let stream = format!("{RS4244285}\t.\tG\t.\t0\t.\t.\tGT:MIN_DP\t0/0:3\n"); + let r = fill("", &stream, MIN_GQ); + assert_eq!(at_rs4244285(&r.out), None, "no GQ field: left out"); +} + +#[test] +fn variant_calls_and_no_sample_lines_pass_whatever_the_gq() { + for sample in ["0/1:5:3", "1/1:3:3", "1:2:3"] { + let stream = format!("{RS4244285}\t.\tG\tA\t10\tPASS\t.\tGT:GQ:MIN_DP\t{sample}\n"); + let r = fill("", &stream, MIN_GQ); + assert_eq!( + at_rs4244285(&r.out).as_deref(), + Some(stream.trim_end()), + "a variant call {sample} passes unchanged" + ); + } +} + +#[test] +fn the_outcome_counts_them_and_names_pharmcat_positions() { + // A GQ 5 block over three bases: rs4244285 and the two after it. + let records = format!("{RS4244285}\t.\tG\t<*>\t0\t.\tEND=94781861\tGT:GQ:MIN_DP\t0/0:5:3\n"); + let stream: String = (94_781_859..=94_781_861) + .map(|p| format!("chr10\t{p}\t.\tN\t.\t0\t.\t.\tGT:GQ:MIN_DP\t0/0:5:3\n")) + .collect(); + let r = fill(&records, &stream, MIN_GQ); + assert_eq!( + r.out.lines().filter(|l| !l.starts_with('#')).count(), + 0, + "all three left out" + ); + assert_eq!(r.outcome.weak, 3); + assert_eq!(r.outcome.weak_at, vec!["CYP2C19 chr10:94781859".to_owned()]); +} + +#[test] +fn a_low_gq_block_inside_a_multi_base_span_still_fills_nothing() { + // The CYP2C9 deletion at 94942205 (CT): a GQ 5 block over both bases. No + // 0/0 is written for it, and its one-base records are left out too. + let records = "chr10\t94942200\t.\tA\t<*>\t0\t.\tEND=94942210\tGT:GQ:MIN_DP\t0/0:5:3\n"; + let stream: String = (94_942_200..=94_942_210) + .map(|p| format!("chr10\t{p}\t.\tN\t.\t0\t.\t.\tGT:GQ:MIN_DP\t0/0:5:3\n")) + .collect(); + let r = fill(records, &stream, MIN_GQ); + assert!(r.outcome.filled.is_empty(), "nothing filled"); + assert_eq!( + r.out.lines().filter(|l| !l.starts_with('#')).count(), + 0, + "no record reaches PharmCAT" + ); + assert_eq!(r.outcome.weak_at, vec!["CYP2C9 chr10:94942205".to_owned()]); +} diff --git a/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs b/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs index 31f326f98..0744e299c 100644 --- a/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs +++ b/rust/crates/og-filters/tests/port_tests_pgx_refblock.rs @@ -282,15 +282,28 @@ fn the_fixture_fills_five_and_leaves_four() { filled_keys.iter().all(|k| at.get(k) == Some(&1)), "one record at each filled position (the one-base record is replaced)" ); + // The GQ 10 block's one-base records are reference calls below the GQ + // 20 floor: left out, so PharmCAT reads them as missing (issue #411, + // pgx-07; tests/i411_refblock_gq.rs). + let weak = |r: &Vec| r[9].starts_with("0/0:10:"); let kept: Vec<&Vec> = inp .iter() - .filter(|r| !filled_keys.contains(&key(r))) + .filter(|r| !filled_keys.contains(&key(r)) && !weak(r)) .collect(); let passed: Vec<&Vec> = outr.iter().filter(|r| r[7] != "PGX_REFBLOCK").collect(); assert_eq!( passed, kept, "every other record passes unchanged and in order" ); + assert!( + inp.iter().any(&weak) && !outr.iter().any(weak), + "the GQ 10 block reaches the stream and is left out of the output" + ); + assert!( + err.contains("reference calls with GQ below 20 (or none) left out") + && err.contains("CYP2C9 chr10:94949161"), + "stderr counts them and names the PharmCAT position among them: {err}" + ); assert!( at.contains_key(&("chr2".to_owned(), 233_760_234)) && at.contains_key(&("chr2".to_owned(), 233_760_235)), diff --git a/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr new file mode 100644 index 000000000..a7b2e19e2 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 1 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 50: UGT1A1 chr2:233760233; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 239 reference calls with GQ below 50 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: DPYD chr1:97450068, TPMT chr6:18149022, TPMT chr6:18149032, TPMT chr6:18149045, CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189, RYR1 chr19:38572262, RYR1 chr19:38572266, G6PD chrX:154532046, G6PD chrX:154532055 diff --git a/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout new file mode 100644 index 000000000..e1d612c5e --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/bgzip-min-gq-50/stdout @@ -0,0 +1,1354 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr1 97450020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr2 233759900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760001 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760002 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760003 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760004 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760005 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760006 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760007 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760008 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760009 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760010 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760011 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760012 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760013 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760014 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760015 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760016 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760017 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760018 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760019 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760066 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760067 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760068 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760069 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760070 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760071 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760072 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760073 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760074 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760075 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760076 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760077 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760078 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760079 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760080 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760081 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760082 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760083 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760084 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760085 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760086 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760087 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760088 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760089 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760090 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760091 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760092 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760093 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760094 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760095 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760096 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760097 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760098 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760099 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760100 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760101 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760102 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760103 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760104 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760105 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760106 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760107 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760108 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760109 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760110 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760111 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760112 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760113 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760114 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760115 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760116 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760117 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760118 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760119 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760120 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760121 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760122 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760123 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760124 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760125 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760126 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760127 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760128 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760129 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760130 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760131 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760132 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760133 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760134 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760135 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760136 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760137 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760138 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760139 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760140 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760141 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760142 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760143 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760144 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760145 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760146 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760147 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760148 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760149 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760211 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760233 rs3064744 CAT C,CATAT,CATATAT . PASS PGX_REFBLOCK GT:GQ 0/0:50 +chr2 233760234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760282 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760331 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760332 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760333 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760334 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760335 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760336 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760337 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760338 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760339 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760340 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760341 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760342 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760343 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760344 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760345 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760346 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760347 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760348 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760349 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760350 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760351 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760352 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760353 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760354 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760355 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760356 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760357 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760358 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760359 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760360 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760361 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760362 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760363 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760364 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760365 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760366 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760367 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760368 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760369 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760370 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760371 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760372 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760373 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760374 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760375 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760376 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760377 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760378 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760379 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760380 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760381 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760382 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760383 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760384 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760385 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760386 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760387 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760388 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760389 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760390 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760391 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760392 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760393 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760394 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760395 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760396 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760397 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760398 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760399 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760400 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760401 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760402 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760403 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760404 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760405 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760406 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760407 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760408 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760409 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760410 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760411 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760412 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760413 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760414 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760415 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760416 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760417 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760418 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760419 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760420 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760421 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760422 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760423 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760424 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760425 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760426 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760427 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760428 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760429 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760430 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760431 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760432 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760433 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760434 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760435 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760436 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760437 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760438 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760439 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760440 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760441 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760442 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760443 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760444 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760445 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760446 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760447 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760448 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760449 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760450 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760451 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760452 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760453 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760454 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760455 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760456 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760457 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760458 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760459 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760460 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760461 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760462 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760463 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760464 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760465 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760466 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760467 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760468 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760469 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760470 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760471 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760472 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760473 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760474 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760475 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760476 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760477 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760478 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760479 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760480 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760481 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760482 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760483 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760484 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760485 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760486 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760487 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760488 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760489 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760490 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760491 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760492 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760493 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760494 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760495 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760496 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760497 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760498 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760499 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760500 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760501 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760502 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760503 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760504 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760505 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760506 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760507 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760508 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760509 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760510 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760511 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760512 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760513 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760514 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760515 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760516 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760517 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760518 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760519 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760520 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760521 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760522 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760523 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760524 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760525 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760526 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760527 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760528 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760529 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760530 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760531 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760532 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760533 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760534 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760535 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760536 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760537 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760538 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760539 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760540 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760541 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760542 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760543 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760544 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760545 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760546 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760547 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760548 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760549 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760550 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760551 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760552 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760553 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760554 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760555 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760556 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760557 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760558 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760559 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760560 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760561 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760562 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760563 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760564 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760565 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760566 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760567 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760568 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760569 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760570 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760571 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760572 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760573 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760574 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760575 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760576 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760577 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760578 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760579 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760580 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760581 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760582 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760583 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760584 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760585 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760586 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760587 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760588 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760589 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760590 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760591 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760592 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760593 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760594 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760595 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760596 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760597 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760598 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760599 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760600 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760601 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760602 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760603 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760604 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760605 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760606 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760607 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760608 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760609 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760610 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760611 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760612 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760613 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760614 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760615 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760616 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760617 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760618 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760619 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760620 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760621 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760622 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760623 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760624 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760625 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760626 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760627 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760628 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760629 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760630 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760631 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760632 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760633 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760634 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760635 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760636 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760637 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760638 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760639 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760640 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760641 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760642 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760643 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760644 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760645 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760646 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760647 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760648 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760649 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760650 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760651 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760652 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760653 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760654 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760655 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760656 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760657 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760658 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760659 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760660 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760661 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760662 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760663 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760664 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760665 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760666 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760667 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760668 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760669 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760670 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760671 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760672 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760673 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760674 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760675 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760676 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760677 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760678 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760679 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760680 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760681 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760682 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760683 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760684 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760685 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760686 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760687 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760688 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760689 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760690 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760691 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760692 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760693 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760694 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760695 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760696 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760697 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760698 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760699 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760700 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760701 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760702 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760703 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760704 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760705 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760706 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760707 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760708 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760709 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760710 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760711 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760712 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760713 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760714 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760715 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760716 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760717 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760718 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760719 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760720 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760721 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760722 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760723 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760724 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760725 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760726 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760727 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760728 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760729 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760730 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760731 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760732 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760733 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760734 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760735 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760736 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760737 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760738 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760739 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760740 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760741 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760742 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760743 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760744 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760745 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760746 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760747 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760748 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760749 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760750 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760751 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760752 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760753 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760754 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760755 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760756 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760757 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760758 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760759 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760760 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760761 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760762 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760763 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760764 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760765 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760766 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760767 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760768 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760769 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760770 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760771 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760772 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760773 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760774 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760775 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760776 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760777 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760778 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760779 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760780 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760781 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760782 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760783 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760784 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760785 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760786 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760787 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760788 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760789 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760790 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760791 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760792 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760793 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760794 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760795 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760796 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760797 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760798 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760799 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760800 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760801 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760802 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760803 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760804 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760805 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760806 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760807 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760808 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760809 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760810 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760811 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760812 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760813 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760814 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760815 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760816 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760817 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760818 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760819 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760820 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760821 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760822 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760823 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760824 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760825 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760826 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760827 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760828 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760829 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760830 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760831 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760832 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760833 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760834 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760835 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760836 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760837 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760838 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760839 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760840 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760841 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760842 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760843 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760844 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760845 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760846 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760847 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760848 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760849 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760850 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760851 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760852 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760853 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760854 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760855 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760856 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760857 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760858 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760859 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760860 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760861 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760862 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760863 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760864 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760865 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760866 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760867 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760868 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760869 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760870 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760871 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760872 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760873 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760874 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760875 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760876 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760877 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760878 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760879 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760880 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760881 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760882 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760883 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760884 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760885 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760886 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760887 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760888 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760889 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760890 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760891 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760892 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760893 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760894 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760895 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760896 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760897 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760898 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760899 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233761000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942233 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 +chr10 94949283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr index 7fabd6ad7..12075ad15 100644 --- a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr +++ b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stderr @@ -1,2 +1,3 @@ pgx_refblock_fill: kept the gVCF's record at chr2:233760233 (not a reference block), not a 0/0 record beside it pgx_refblock_fill: 4 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout index 8eb81f4d6..9a70a9cb8 100644 --- a/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout +++ b/tests/parity/golden/pgx-refblock-fill/block-then-kept/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/crlf/stderr b/tests/parity/golden/pgx-refblock-fill/crlf/stderr new file mode 100644 index 000000000..5ec065540 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/crlf/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 5 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/crlf/stdout b/tests/parity/golden/pgx-refblock-fill/crlf/stdout new file mode 100644 index 000000000..2b10dbac5 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/crlf/stdout @@ -0,0 +1,1532 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr1 97450020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450065 rs72549303 TG T . PASS PGX_REFBLOCK GT:GQ 0/0:45 +chr1 97450066 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450067 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450068 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450069 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450070 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450071 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450072 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450073 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450074 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450075 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450076 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450077 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450078 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450079 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450080 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450081 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450082 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450083 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450084 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450085 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450086 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450087 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450088 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450089 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450090 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450091 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450092 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450093 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450094 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450095 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450096 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450097 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450098 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450099 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450100 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450101 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450102 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450103 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450104 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450105 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450106 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450107 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450108 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450109 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450110 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr2 233759900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760001 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760002 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760003 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760004 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760005 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760006 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760007 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760008 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760009 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760010 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760011 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760012 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760013 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760014 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760015 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760016 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760017 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760018 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760019 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760066 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760067 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760068 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760069 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760070 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760071 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760072 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760073 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760074 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760075 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760076 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760077 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760078 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760079 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760080 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760081 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760082 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760083 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760084 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760085 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760086 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760087 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760088 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760089 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760090 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760091 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760092 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760093 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760094 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760095 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760096 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760097 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760098 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760099 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760100 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760101 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760102 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760103 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760104 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760105 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760106 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760107 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760108 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760109 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760110 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760111 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760112 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760113 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760114 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760115 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760116 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760117 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760118 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760119 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760120 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760121 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760122 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760123 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760124 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760125 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760126 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760127 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760128 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760129 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760130 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760131 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760132 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760133 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760134 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760135 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760136 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760137 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760138 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760139 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760140 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760141 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760142 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760143 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760144 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760145 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760146 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760147 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760148 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760149 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760211 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760233 rs3064744 CAT C,CATAT,CATATAT . PASS PGX_REFBLOCK GT:GQ 0/0:50 +chr2 233760234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760282 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760331 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760332 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760333 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760334 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760335 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760336 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760337 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760338 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760339 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760340 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760341 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760342 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760343 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760344 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760345 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760346 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760347 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760348 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760349 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760350 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760351 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760352 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760353 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760354 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760355 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760356 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760357 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760358 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760359 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760360 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760361 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760362 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760363 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760364 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760365 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760366 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760367 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760368 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760369 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760370 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760371 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760372 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760373 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760374 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760375 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760376 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760377 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760378 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760379 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760380 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760381 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760382 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760383 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760384 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760385 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760386 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760387 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760388 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760389 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760390 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760391 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760392 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760393 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760394 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760395 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760396 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760397 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760398 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760399 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760400 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760401 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760402 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760403 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760404 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760405 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760406 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760407 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760408 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760409 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760410 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760411 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760412 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760413 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760414 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760415 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760416 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760417 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760418 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760419 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760420 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760421 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760422 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760423 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760424 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760425 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760426 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760427 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760428 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760429 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760430 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760431 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760432 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760433 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760434 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760435 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760436 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760437 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760438 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760439 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760440 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760441 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760442 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760443 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760444 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760445 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760446 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760447 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760448 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760449 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760450 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760451 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760452 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760453 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760454 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760455 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760456 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760457 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760458 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760459 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760460 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760461 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760462 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760463 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760464 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760465 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760466 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760467 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760468 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760469 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760470 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760471 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760472 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760473 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760474 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760475 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760476 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760477 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760478 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760479 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760480 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760481 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760482 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760483 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760484 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760485 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760486 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760487 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760488 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760489 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760490 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760491 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760492 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760493 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760494 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760495 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760496 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760497 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760498 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760499 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760500 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760501 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760502 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760503 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760504 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760505 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760506 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760507 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760508 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760509 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760510 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760511 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760512 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760513 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760514 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760515 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760516 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760517 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760518 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760519 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760520 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760521 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760522 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760523 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760524 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760525 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760526 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760527 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760528 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760529 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760530 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760531 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760532 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760533 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760534 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760535 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760536 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760537 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760538 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760539 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760540 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760541 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760542 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760543 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760544 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760545 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760546 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760547 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760548 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760549 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760550 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760551 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760552 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760553 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760554 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760555 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760556 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760557 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760558 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760559 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760560 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760561 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760562 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760563 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760564 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760565 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760566 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760567 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760568 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760569 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760570 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760571 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760572 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760573 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760574 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760575 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760576 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760577 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760578 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760579 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760580 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760581 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760582 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760583 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760584 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760585 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760586 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760587 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760588 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760589 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760590 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760591 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760592 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760593 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760594 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760595 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760596 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760597 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760598 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760599 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760600 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760601 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760602 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760603 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760604 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760605 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760606 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760607 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760608 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760609 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760610 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760611 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760612 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760613 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760614 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760615 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760616 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760617 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760618 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760619 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760620 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760621 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760622 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760623 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760624 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760625 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760626 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760627 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760628 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760629 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760630 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760631 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760632 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760633 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760634 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760635 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760636 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760637 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760638 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760639 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760640 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760641 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760642 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760643 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760644 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760645 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760646 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760647 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760648 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760649 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760650 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760651 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760652 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760653 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760654 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760655 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760656 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760657 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760658 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760659 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760660 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760661 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760662 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760663 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760664 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760665 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760666 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760667 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760668 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760669 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760670 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760671 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760672 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760673 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760674 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760675 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760676 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760677 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760678 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760679 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760680 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760681 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760682 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760683 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760684 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760685 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760686 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760687 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760688 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760689 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760690 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760691 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760692 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760693 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760694 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760695 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760696 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760697 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760698 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760699 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760700 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760701 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760702 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760703 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760704 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760705 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760706 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760707 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760708 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760709 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760710 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760711 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760712 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760713 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760714 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760715 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760716 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760717 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760718 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760719 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760720 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760721 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760722 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760723 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760724 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760725 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760726 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760727 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760728 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760729 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760730 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760731 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760732 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760733 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760734 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760735 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760736 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760737 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760738 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760739 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760740 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760741 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760742 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760743 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760744 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760745 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760746 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760747 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760748 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760749 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760750 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760751 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760752 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760753 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760754 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760755 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760756 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760757 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760758 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760759 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760760 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760761 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760762 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760763 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760764 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760765 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760766 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760767 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760768 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760769 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760770 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760771 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760772 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760773 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760774 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760775 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760776 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760777 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760778 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760779 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760780 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760781 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760782 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760783 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760784 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760785 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760786 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760787 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760788 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760789 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760790 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760791 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760792 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760793 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760794 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760795 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760796 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760797 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760798 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760799 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760800 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760801 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760802 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760803 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760804 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760805 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760806 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760807 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760808 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760809 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760810 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760811 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760812 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760813 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760814 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760815 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760816 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760817 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760818 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760819 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760820 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760821 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760822 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760823 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760824 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760825 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760826 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760827 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760828 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760829 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760830 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760831 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760832 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760833 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760834 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760835 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760836 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760837 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760838 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760839 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760840 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760841 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760842 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760843 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760844 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760845 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760846 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760847 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760848 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760849 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760850 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760851 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760852 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760853 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760854 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760855 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760856 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760857 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760858 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760859 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760860 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760861 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760862 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760863 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760864 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760865 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760866 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760867 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760868 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760869 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760870 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760871 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760872 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760873 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760874 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760875 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760876 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760877 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760878 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760879 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760880 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760881 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760882 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760883 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760884 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760885 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760886 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760887 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760888 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760889 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760890 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760891 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760892 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760893 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760894 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760895 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760896 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760897 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760898 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760899 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233761000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr6 18149010 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149011 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149012 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149013 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149014 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149015 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149016 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149017 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149018 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149019 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149020 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149021 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149022 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149023 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149024 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149025 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149026 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149027 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149028 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149029 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149030 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149031 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149032 rs759836180 C CT . PASS PGX_REFBLOCK GT:GQ 0/0:40 +chr6 18149033 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149034 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149035 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149036 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149037 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149038 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149039 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149040 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149041 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149042 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149043 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149044 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149045 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149046 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149047 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149048 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149049 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149050 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149051 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149052 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149053 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149054 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149055 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149056 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149057 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149058 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149059 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149060 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr10 94942150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942233 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 +chr10 94949283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr19 38572240 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572241 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572242 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572243 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572244 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572245 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572246 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572247 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572248 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572249 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572250 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572251 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572252 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572253 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572254 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572255 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572256 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572257 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572258 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572259 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572260 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572261 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572262 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572263 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572264 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572265 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572266 rs193922862 TC CT . PASS PGX_REFBLOCK GT:GQ 0/0:35 +chr19 38572267 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572268 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572269 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572270 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572271 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572272 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572273 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572274 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572275 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572276 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572277 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572278 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572279 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572280 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572281 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572282 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572283 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572284 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572285 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572286 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572287 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572288 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572289 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572290 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chrX 154532040 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532041 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532042 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532043 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532044 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532045 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532046 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532047 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532048 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532049 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532050 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532051 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532052 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532053 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532054 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532055 . CTCT C . PASS PGX_REFBLOCK GT:GQ 0:30 +chrX 154532056 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532057 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532058 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532059 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532060 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532061 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532062 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532063 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532064 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532065 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532066 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532067 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532068 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532069 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532070 . N . 0 . . GT:GQ:MIN_DP 0:30:20 diff --git a/tests/parity/golden/pgx-refblock-fill/fixture/stderr b/tests/parity/golden/pgx-refblock-fill/fixture/stderr new file mode 100644 index 000000000..5ec065540 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/fixture/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 5 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/fixture/stdout b/tests/parity/golden/pgx-refblock-fill/fixture/stdout new file mode 100644 index 000000000..4a26b87a3 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/fixture/stdout @@ -0,0 +1,1532 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr1 97450020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:31 +chr1 97450065 rs72549303 TG T . PASS PGX_REFBLOCK GT:GQ 0/0:45 +chr1 97450066 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450067 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450068 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450069 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450070 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450071 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450072 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450073 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450074 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450075 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450076 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450077 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450078 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450079 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450080 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450081 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450082 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450083 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450084 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450085 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450086 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450087 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450088 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450089 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450090 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450091 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450092 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450093 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450094 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450095 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450096 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450097 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450098 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450099 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450100 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450101 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450102 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450103 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450104 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450105 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450106 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450107 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450108 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450109 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr1 97450110 . N . 0 . . GT:GQ:MIN_DP 0/0:45:29 +chr2 233759900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233759999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760001 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760002 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760003 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760004 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760005 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760006 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760007 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760008 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760009 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760010 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760011 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760012 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760013 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760014 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760015 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760016 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760017 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760018 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760019 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760020 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760021 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760022 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760023 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760024 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760025 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760026 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760027 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760028 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760029 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760030 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760031 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760032 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760033 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760034 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760035 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760036 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760037 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760038 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760039 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760040 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760041 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760042 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760043 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760044 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760045 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760046 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760047 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760048 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760049 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760050 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760051 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760052 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760053 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760054 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760055 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760056 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760057 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760058 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760059 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760060 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760061 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760062 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760063 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760064 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760065 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760066 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760067 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760068 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760069 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760070 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760071 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760072 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760073 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760074 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760075 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760076 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760077 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760078 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760079 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760080 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760081 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760082 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760083 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760084 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760085 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760086 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760087 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760088 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760089 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760090 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760091 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760092 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760093 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760094 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760095 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760096 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760097 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760098 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760099 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760100 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760101 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760102 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760103 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760104 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760105 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760106 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760107 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760108 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760109 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760110 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760111 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760112 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760113 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760114 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760115 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760116 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760117 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760118 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760119 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760120 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760121 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760122 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760123 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760124 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760125 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760126 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760127 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760128 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760129 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760130 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760131 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760132 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760133 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760134 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760135 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760136 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760137 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760138 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760139 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760140 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760141 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760142 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760143 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760144 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760145 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760146 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760147 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760148 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760149 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760211 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760233 rs3064744 CAT C,CATAT,CATATAT . PASS PGX_REFBLOCK GT:GQ 0/0:50 +chr2 233760234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760282 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760331 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760332 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760333 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760334 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760335 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760336 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760337 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760338 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760339 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760340 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760341 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760342 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760343 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760344 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760345 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760346 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760347 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760348 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760349 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760350 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760351 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760352 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760353 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760354 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760355 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760356 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760357 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760358 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760359 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760360 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760361 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760362 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760363 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760364 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760365 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760366 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760367 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760368 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760369 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760370 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760371 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760372 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760373 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760374 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760375 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760376 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760377 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760378 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760379 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760380 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760381 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760382 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760383 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760384 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760385 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760386 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760387 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760388 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760389 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760390 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760391 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760392 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760393 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760394 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760395 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760396 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760397 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760398 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760399 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760400 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760401 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760402 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760403 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760404 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760405 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760406 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760407 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760408 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760409 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760410 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760411 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760412 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760413 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760414 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760415 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760416 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760417 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760418 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760419 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760420 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760421 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760422 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760423 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760424 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760425 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760426 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760427 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760428 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760429 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760430 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760431 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760432 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760433 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760434 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760435 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760436 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760437 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760438 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760439 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760440 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760441 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760442 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760443 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760444 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760445 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760446 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760447 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760448 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760449 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760450 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760451 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760452 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760453 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760454 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760455 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760456 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760457 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760458 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760459 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760460 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760461 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760462 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760463 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760464 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760465 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760466 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760467 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760468 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760469 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760470 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760471 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760472 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760473 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760474 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760475 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760476 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760477 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760478 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760479 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760480 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760481 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760482 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760483 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760484 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760485 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760486 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760487 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760488 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760489 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760490 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760491 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760492 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760493 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760494 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760495 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760496 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760497 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760498 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760499 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760500 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760501 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760502 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760503 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760504 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760505 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760506 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760507 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760508 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760509 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760510 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760511 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760512 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760513 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760514 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760515 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760516 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760517 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760518 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760519 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760520 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760521 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760522 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760523 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760524 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760525 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760526 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760527 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760528 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760529 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760530 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760531 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760532 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760533 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760534 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760535 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760536 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760537 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760538 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760539 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760540 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760541 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760542 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760543 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760544 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760545 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760546 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760547 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760548 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760549 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760550 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760551 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760552 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760553 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760554 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760555 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760556 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760557 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760558 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760559 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760560 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760561 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760562 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760563 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760564 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760565 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760566 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760567 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760568 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760569 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760570 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760571 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760572 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760573 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760574 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760575 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760576 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760577 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760578 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760579 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760580 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760581 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760582 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760583 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760584 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760585 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760586 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760587 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760588 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760589 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760590 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760591 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760592 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760593 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760594 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760595 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760596 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760597 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760598 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760599 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760600 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760601 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760602 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760603 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760604 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760605 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760606 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760607 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760608 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760609 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760610 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760611 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760612 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760613 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760614 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760615 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760616 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760617 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760618 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760619 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760620 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760621 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760622 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760623 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760624 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760625 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760626 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760627 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760628 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760629 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760630 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760631 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760632 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760633 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760634 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760635 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760636 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760637 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760638 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760639 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760640 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760641 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760642 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760643 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760644 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760645 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760646 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760647 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760648 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760649 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760650 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760651 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760652 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760653 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760654 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760655 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760656 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760657 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760658 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760659 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760660 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760661 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760662 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760663 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760664 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760665 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760666 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760667 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760668 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760669 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760670 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760671 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760672 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760673 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760674 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760675 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760676 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760677 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760678 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760679 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760680 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760681 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760682 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760683 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760684 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760685 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760686 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760687 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760688 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760689 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760690 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760691 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760692 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760693 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760694 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760695 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760696 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760697 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760698 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760699 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760700 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760701 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760702 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760703 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760704 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760705 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760706 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760707 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760708 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760709 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760710 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760711 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760712 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760713 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760714 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760715 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760716 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760717 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760718 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760719 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760720 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760721 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760722 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760723 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760724 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760725 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760726 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760727 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760728 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760729 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760730 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760731 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760732 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760733 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760734 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760735 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760736 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760737 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760738 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760739 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760740 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760741 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760742 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760743 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760744 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760745 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760746 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760747 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760748 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760749 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760750 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760751 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760752 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760753 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760754 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760755 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760756 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760757 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760758 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760759 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760760 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760761 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760762 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760763 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760764 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760765 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760766 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760767 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760768 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760769 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760770 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760771 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760772 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760773 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760774 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760775 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760776 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760777 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760778 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760779 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760780 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760781 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760782 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760783 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760784 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760785 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760786 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760787 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760788 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760789 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760790 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760791 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760792 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760793 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760794 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760795 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760796 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760797 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760798 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760799 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760800 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760801 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760802 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760803 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760804 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760805 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760806 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760807 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760808 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760809 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760810 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760811 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760812 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760813 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760814 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760815 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760816 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760817 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760818 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760819 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760820 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760821 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760822 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760823 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760824 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760825 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760826 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760827 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760828 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760829 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760830 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760831 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760832 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760833 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760834 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760835 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760836 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760837 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760838 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760839 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760840 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760841 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760842 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760843 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760844 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760845 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760846 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760847 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760848 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760849 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760850 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760851 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760852 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760853 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760854 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760855 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760856 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760857 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760858 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760859 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760860 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760861 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760862 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760863 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760864 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760865 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760866 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760867 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760868 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760869 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760870 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760871 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760872 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760873 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760874 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760875 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760876 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760877 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760878 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760879 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760880 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760881 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760882 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760883 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760884 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760885 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760886 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760887 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760888 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760889 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760890 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760891 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760892 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760893 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760894 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760895 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760896 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760897 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760898 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760899 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760900 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760901 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760902 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760903 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760904 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760905 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760906 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760907 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760908 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760909 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760910 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760911 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760912 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760913 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760914 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760915 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760916 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760917 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760918 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760919 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760920 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760921 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760922 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760923 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760924 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760925 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760926 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760927 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760928 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760929 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760930 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760931 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760932 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760933 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760934 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760935 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760936 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760937 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760938 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760939 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760940 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760941 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760942 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760943 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760944 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760945 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760946 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760947 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760948 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760949 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760950 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760951 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760952 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760953 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760954 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760955 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760956 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760957 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760958 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760959 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760960 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760961 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760962 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760963 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760964 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760965 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760966 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760967 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760968 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760969 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760970 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760971 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760972 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760973 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760974 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760975 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760976 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760977 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760978 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760979 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760980 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760981 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760982 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760983 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760984 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760985 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760986 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760987 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760988 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760989 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760990 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760991 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760992 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760993 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760994 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760995 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760996 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760997 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760998 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233760999 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr2 233761000 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr6 18149010 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149011 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149012 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149013 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149014 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149015 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149016 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149017 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149018 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149019 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149020 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149021 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149022 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149023 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149024 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149025 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149026 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149027 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149028 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149029 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149030 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149031 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149032 rs759836180 C CT . PASS PGX_REFBLOCK GT:GQ 0/0:40 +chr6 18149033 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149034 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149035 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149036 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149037 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149038 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149039 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149040 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149041 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149042 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149043 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149044 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149045 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149046 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149047 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149048 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149049 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149050 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149051 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149052 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149053 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149054 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149055 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149056 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149057 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149058 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149059 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr6 18149060 . N . 0 . . GT:GQ:MIN_DP 0/0:40:27 +chr10 94942150 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942151 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942152 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942153 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942154 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942155 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942156 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942157 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942158 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942159 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942160 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942161 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942162 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942163 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942164 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942165 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942166 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942167 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942168 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942169 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942170 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942171 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942172 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942173 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942174 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942175 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942176 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942177 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942178 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942179 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942180 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942181 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942182 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942183 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942184 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942185 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942186 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942187 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942188 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942189 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942190 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942191 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942192 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942193 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942194 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942195 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942196 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942197 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942198 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942199 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942200 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942201 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942202 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942203 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942204 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942205 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942206 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942207 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942208 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942209 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942210 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942212 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942213 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942214 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942215 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942216 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942217 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942218 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942219 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942220 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942221 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942222 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942223 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942224 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942225 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942226 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942227 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942228 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942229 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942230 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942231 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942232 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942233 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942234 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942235 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942236 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942237 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942238 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942239 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942240 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942241 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942242 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942243 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942244 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942245 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942246 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942247 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942248 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942249 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949253 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949254 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949255 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949256 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949261 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949262 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949263 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949264 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949265 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949266 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949267 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949268 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949269 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949270 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949271 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949272 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949273 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949274 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949275 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949276 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949277 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949278 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949279 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949280 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949281 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 +chr10 94949283 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949284 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949285 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949286 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949287 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949288 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949289 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949290 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949291 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949292 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949293 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949294 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949295 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949296 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949297 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949298 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949299 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949300 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949301 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949302 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949303 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949304 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949305 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949306 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949307 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949308 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949309 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949310 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949311 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949312 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949313 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949314 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949315 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949316 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949317 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949318 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949319 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949320 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949321 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949322 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949323 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949324 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949325 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949326 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949327 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949328 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949329 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr10 94949330 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 +chr19 38572240 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572241 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572242 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572243 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572244 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572245 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572246 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572247 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572248 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572249 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572250 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572251 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572252 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572253 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572254 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572255 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572256 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572257 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572258 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572259 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572260 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572261 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572262 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572263 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572264 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572265 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572266 rs193922862 TC CT . PASS PGX_REFBLOCK GT:GQ 0/0:35 +chr19 38572267 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572268 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572269 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572270 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572271 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572272 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572273 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572274 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572275 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572276 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572277 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572278 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572279 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572280 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572281 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572282 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572283 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572284 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572285 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572286 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572287 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572288 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572289 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chr19 38572290 . N . 0 . . GT:GQ:MIN_DP 0/0:35:25 +chrX 154532040 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532041 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532042 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532043 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532044 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532045 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532046 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532047 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532048 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532049 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532050 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532051 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532052 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532053 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532054 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532055 . CTCT C . PASS PGX_REFBLOCK GT:GQ 0:30 +chrX 154532056 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532057 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532058 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532059 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532060 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532061 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532062 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532063 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532064 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532065 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532066 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532067 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532068 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532069 . N . 0 . . GT:GQ:MIN_DP 0:30:20 +chrX 154532070 . N . 0 . . GT:GQ:MIN_DP 0:30:20 diff --git a/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr b/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr index 7fabd6ad7..12075ad15 100644 --- a/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr +++ b/tests/parity/golden/pgx-refblock-fill/inconsistent/stderr @@ -1,2 +1,3 @@ pgx_refblock_fill: kept the gVCF's record at chr2:233760233 (not a reference block), not a 0/0 record beside it pgx_refblock_fill: 4 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout b/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout index a3a4afc7a..1c3c31016 100644 --- a/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout +++ b/tests/parity/golden/pgx-refblock-fill/inconsistent/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr index 7fabd6ad7..12075ad15 100644 --- a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr +++ b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stderr @@ -1,2 +1,3 @@ pgx_refblock_fill: kept the gVCF's record at chr2:233760233 (not a reference block), not a 0/0 record beside it pgx_refblock_fill: 4 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout index 8eb81f4d6..9a70a9cb8 100644 --- a/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout +++ b/tests/parity/golden/pgx-refblock-fill/kept-then-block/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr new file mode 100644 index 000000000..6178a914d --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 0 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 51; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 1576 reference calls with GQ below 51 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: DPYD chr1:97450058, DPYD chr1:97450059, DPYD chr1:97450065, DPYD chr1:97450068, UGT1A1 chr2:233759924, UGT1A1 chr2:233760233, UGT1A1 chr2:233760498, UGT1A1 chr2:233760973, TPMT chr6:18149022, TPMT chr6:18149032, TPMT chr6:18149045, CYP2C9 chr10:94942203, CYP2C9 chr10:94942205, CYP2C9 chr10:94942216, CYP2C9 chr10:94942226, CYP2C9 chr10:94942230, CYP2C9 chr10:94942231, CYP2C9 chr10:94942233, CYP2C9 chr10:94942234, CYP2C9 chr10:94942240, CYP2C9 chr10:94942243, CYP2C9 chr10:94942249, CYP2C9 chr10:94942254, CYP2C9 chr10:94942255, CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189, CYP2C9 chr10:94949278, CYP2C9 chr10:94949280, CYP2C9 chr10:94949281, RYR1 chr19:38572262, RYR1 chr19:38572266, G6PD chrX:154532046, G6PD chrX:154532055 diff --git a/tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout new file mode 100644 index 000000000..4cbfccc1c --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/min-gq-51/stdout @@ -0,0 +1,17 @@ +##fileformat=VCFv4.2 +##FILTER= +##INFO= +##FORMAT= +##FORMAT= +##FORMAT= +##FORMAT= +##ALT= +##contig= +##contig= +##contig= +##contig= +##contig= +##contig= +##INFO= +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT REFBLOCKS +chr10 94949282 . A G 30 PASS . GT:GQ:DP 0/1:30:28 diff --git a/tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr new file mode 100644 index 000000000..5ec065540 --- /dev/null +++ b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stderr @@ -0,0 +1,2 @@ +pgx_refblock_fill: 5 of 9 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout index 8424be758..b616ea762 100644 --- a/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout +++ b/tests/parity/golden/pgx-refblock-fill/no-final-newline/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 diff --git a/tests/parity/golden/pgx-refblock-fill/same-start/stderr b/tests/parity/golden/pgx-refblock-fill/same-start/stderr index 58f736e68..0481f5c4f 100644 --- a/tests/parity/golden/pgx-refblock-fill/same-start/stderr +++ b/tests/parity/golden/pgx-refblock-fill/same-start/stderr @@ -1 +1,2 @@ pgx_refblock_fill: 5 of 10 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: DPYD chr1:97450065, UGT1A1 chr2:233760233, TPMT chr6:18149032, RYR1 chr19:38572266, G6PD chrX:154532055; the others stay as the gVCF has them (a variant call, or missing) +pgx_refblock_fill: 61 reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C9 chr10:94949144, CYP2C9 chr10:94949145, CYP2C9 chr10:94949161, CYP2C9 chr10:94949184, CYP2C9 chr10:94949189 diff --git a/tests/parity/golden/pgx-refblock-fill/same-start/stdout b/tests/parity/golden/pgx-refblock-fill/same-start/stdout index 6e6c4df61..4a26b87a3 100644 --- a/tests/parity/golden/pgx-refblock-fill/same-start/stdout +++ b/tests/parity/golden/pgx-refblock-fill/same-start/stdout @@ -1367,67 +1367,6 @@ chr10 94942257 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942258 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942259 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94942260 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 -chr10 94949140 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949141 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949142 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949143 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949144 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949145 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949146 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949147 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949148 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949149 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949150 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949151 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949152 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949153 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949154 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949155 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949156 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949157 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949158 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949159 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949160 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949161 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949162 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949163 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949164 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949165 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949166 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949167 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949168 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949169 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949170 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949171 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949172 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949173 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949174 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949175 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949176 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949177 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949178 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949179 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949180 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949181 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949182 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949183 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949184 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949185 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949186 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949187 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949188 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949189 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949190 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949191 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949192 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949193 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949194 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949195 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949196 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949197 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949198 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949199 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 -chr10 94949200 . N . 0 . . GT:GQ:MIN_DP 0/0:10:4 chr10 94949250 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949251 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 chr10 94949252 . N . 0 . . GT:GQ:MIN_DP 0/0:50:30 From def4b2dd4f28e86853702d7ba92445645acb0368 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:10:14 +0100 Subject: [PATCH 052/110] docs(pgx): say that reference calls below GQ 20 reach PharmCAT as missing Step 07, the PHARMCAT_PREPROCESS module, the step doc, lessons learned and the changelog now say that the GQ 20 floor holds for every reference call, one-base positions included. The step doc no longer says a one-base position takes any 0/0 block. Bead: pgx-07 Bead: D10 --- CHANGELOG.md | 1 + docs/07-pharmacogenomics.md | 8 +++++--- docs/lessons-learned.md | 5 +++++ modules/local/pharmcat/main.nf | 7 +++++-- scripts/07-pharmacogenomics.sh | 5 ++++- 5 files changed, 20 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..827974ce1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- PharmCAT (step 07 and the Nextflow `PHARMCAT_PREPROCESS` process) no longer reads a low-quality reference call as a confident match with the reference. With a gVCF, every base of a reference block reached PharmCAT as 0/0 whatever its GQ: a GQ 5 block at CYP2C19 rs4244285, the \*2 position, read as "not \*2". The GQ 20 floor held only for the positions longer than one base that `og pgx refblock-fill` writes itself. Now that filter leaves out every reference call (a block or a DeepVariant `RefCall`) with GQ below 20, or with no GQ, so PharmCAT reads the position as missing and lists it in `missing_pgx_var.vcf`. A variant call passes whatever its GQ. `--min-gq` sets both floors. The step log gets one more line when a call is left out, with the count and the PharmCAT positions among them. No option, output file or column changes; a gene can now come out with fewer alleles ruled out where its positions were poorly covered. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/07-pharmacogenomics.md b/docs/07-pharmacogenomics.md index 3c50af7ca..b0a51b779 100644 --- a/docs/07-pharmacogenomics.md +++ b/docs/07-pharmacogenomics.md @@ -26,7 +26,8 @@ GENOME_DIR=/path/to/your/data # PharmCAT's gene regions into a plain VCF, so a covered position where you # match the reference is a 0/0 call and an uncovered one (./.) stays missing; # then og pgx refblock-fill (bin/og) calls 0/0 the positions longer than one base -# (indels) that reference blocks with GQ >= 20 cover (see below) +# (indels) that reference blocks with GQ >= 20 cover, and leaves out every +# reference call below GQ 20, so PharmCAT reads it as missing (see below) docker run --rm \ -v ${GENOME_DIR}/${SAMPLE}/vcf:/data \ -v "${GENOME_DIR}:/genome" \ @@ -96,7 +97,8 @@ docker run --rm \ ### Input the preprocessor or PharmCAT refuses - **gVCF.** PharmCAT refuses a gVCF, and decides by the file name too (`.g.vcf`, `.genomic.vcf`). Yet a gVCF is the better input: a variants-only VCF leaves about half of PharmCAT's genes Unknown, because PharmCAT cannot tell a reference call from a position that was not covered. So the script reads `vcf/${SAMPLE}.g.vcf.gz` when step 3 wrote one and expands its reference blocks into `${SAMPLE}.pgx_regions.vcf.gz` (step 0 above, deleted afterwards), which PharmCAT accepts; without a gVCF it reads `${SAMPLE}.vcf.gz`, and does not check whether that file is itself a gVCF (PharmCAT then stops on it). The Nextflow pipeline does the same with DeepVariant's gVCF, or with the gVCF a samplesheet row gives in its `gvcf` column (`run-all.sh` fills it from `vcf/${SAMPLE}.g.vcf.gz`); a gVCF given in the `vcf` column stops the run before any analysis when `pharmcat` is selected. For a vendor gVCF, remove the reference blocks and rename the file: [Starting from a Vendor VCF](vcf-first.md). -- **Positions longer than one base.** The expansion writes one record per base, each with a one-base REF. 51 PharmCAT 3.4.0 positions have a REF or ALT longer than one base: the insertions and deletions of DPYD, UGT1A1 (\*28, the TA-repeat insertion at chr2:233760233), TPMT, CYP3A4, CYP3A5, CFTR, CYP2C9, NUDT15, RYR1, CYP2D6 and G6PD, and two two-base substitutions in RYR1. PharmCAT's preprocessor does not take a one-base record as a call at such a position: it sets the record aside (FILTER `PCATxINDEL`, or `PCATxREF` for the substitutions) and lists the position in `missing_pgx_var.vcf`. Where PharmCAT's REF is longer than one base (the deletions, UGT1A1 \*28, the substitutions), its matcher then discards the record ("REF in VCF (C) does not match expected reference (CAT)"), so the position has no call and the alleles defined there are uncallable, even where the gVCF shows you match the reference over the whole span. At an insertion with a one-base REF the matcher still reads the set-aside record as a reference call ("PharmCAT cannot validate this position"). So step 0 runs `og pgx refblock-fill` on the expanded file. For each of these positions in PharmCAT's positions file (`/pharmcat/pharmcat_positions.vcf.bgz` in the image), it writes a 0/0 record with PharmCAT's own ID, REF and ALT (INFO flag `PGX_REFBLOCK`) in place of the one-base record, when every base of the REF span lies in reference blocks with GQ 20 or more (GQ is Phred-scaled: 20 means a 1 in 100 chance the reference call is wrong; genotype 0/0, or 0 on a haploid chrX; FILTER `PASS` or `.`) and no other record overlaps the span: no variant call, no `./.` block, no block below GQ 20. Otherwise the expanded file stays as it was there: the position stays missing, and at an insertion the matcher reads the one-base record as before. The step log names the positions it filled (`pgx_refblock_fill: N of 51 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: ...`). The GQ threshold applies to these positions only: a one-base position takes any 0/0 block, as before. Where the expanded file has a record at such a position that is not a one-base reference call, that record stays and no 0/0 record is added beside it; the log says so. The Nextflow module does the same. +- **Positions longer than one base.** The expansion writes one record per base, each with a one-base REF. 51 PharmCAT 3.4.0 positions have a REF or ALT longer than one base: the insertions and deletions of DPYD, UGT1A1 (\*28, the TA-repeat insertion at chr2:233760233), TPMT, CYP3A4, CYP3A5, CFTR, CYP2C9, NUDT15, RYR1, CYP2D6 and G6PD, and two two-base substitutions in RYR1. PharmCAT's preprocessor does not take a one-base record as a call at such a position: it sets the record aside (FILTER `PCATxINDEL`, or `PCATxREF` for the substitutions) and lists the position in `missing_pgx_var.vcf`. Where PharmCAT's REF is longer than one base (the deletions, UGT1A1 \*28, the substitutions), its matcher then discards the record ("REF in VCF (C) does not match expected reference (CAT)"), so the position has no call and the alleles defined there are uncallable, even where the gVCF shows you match the reference over the whole span. At an insertion with a one-base REF the matcher still reads the set-aside record as a reference call ("PharmCAT cannot validate this position"). So step 0 runs `og pgx refblock-fill` on the expanded file. For each of these positions in PharmCAT's positions file (`/pharmcat/pharmcat_positions.vcf.bgz` in the image), it writes a 0/0 record with PharmCAT's own ID, REF and ALT (INFO flag `PGX_REFBLOCK`) in place of the one-base record, when every base of the REF span lies in reference blocks with GQ 20 or more (GQ is Phred-scaled: 20 means a 1 in 100 chance the reference call is wrong; genotype 0/0, or 0 on a haploid chrX; FILTER `PASS` or `.`) and no other record overlaps the span: no variant call, no `./.` block, no block below GQ 20. Otherwise the expanded file stays as it was there: the position stays missing, and at an insertion the matcher reads the one-base record as before. The step log names the positions it filled (`pgx_refblock_fill: N of 51 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: ...`). Where the expanded file has a record at such a position that is not a one-base reference call, that record stays and no 0/0 record is added beside it; the log says so. The Nextflow module does the same. +- **Low-quality reference calls.** The same GQ 20 floor holds for every record that reaches PharmCAT, one-base positions included. A reference call (genotype 0/0, or 0 on a haploid chrX) with GQ below 20, or with no GQ, is left out of the expanded file, so PharmCAT reads the position as missing instead of a confident match with the reference. This covers a reference block with a low GQ and a DeepVariant `RefCall` record (a candidate it called reference) with a low GQ. Before, such a call at a one-base position reached PharmCAT as 0/0: a GQ 5 block at CYP2C19 rs4244285, the \*2 position, read as "not \*2" when the data could not tell. A variant call passes whatever its GQ. The step log counts them and names those at PharmCAT positions (`pgx_refblock_fill: N reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C19 chr10:94781859, ...`). PharmCAT then lists these positions in `missing_pgx_var.vcf` and does not use them to call or rule out an allele. The Nextflow module does the same. - **MT-RNR1 from the chrM calls.** PharmCAT 3.4.0 has no MT-RNR1 definition for its matcher: it reads the gene only as an outside call, one allele (chrM is not a pair), so from a VCF alone MT-RNR1 is No Result on every sample. When [step 20](20-mtoolbox.md) wrote its Mutect2 chrM calls (`mito/${SAMPLE}_chrM_filtered.vcf.gz`), the script runs `og pgx mito-merge` (step 3 above). It reads PharmCAT's own MT-RNR1 alleles from the jar (`Reference` and names such as `m.1555A>G`) and adds one MT-RNR1 line to a copy of step 36's outside calls (`${SAMPLE}.pharmcat_outside_calls.tsv`, deleted afterwards): a named single-base allele with FILTER `PASS` and an allele fraction (AF) of 0.05 or more, the pipeline's heteroplasmy floor; the one PharmCAT ranks highest (increased risk, then uncertain, then normal) when there are several, with the others named in the step log; or `Reference` when no named allele is called. A heteroplasmic allele (AF 0.05 to 0.95) is passed like a homoplasmic one: CPIC's MT-RNR1 guideline sets no heteroplasmy level at which aminoglycosides become safe, and asks for the homoplasmic guidance whenever a relevant variant is detected. So a heteroplasmic m.1555A>G or m.1494C>T gives PharmCAT's aminoglycoside recommendation, and the step log says `heteroplasmic` with the AF (the [step 20](20-mtoolbox.md) table and the report's chrM section give the level too). Mutect2 writes variant records only, so a position without reads has no record either: `Reference` needs read evidence, 20 reads or more (`samtools depth`, MAPQ and base quality 20) at every position where PharmCAT names an MT-RNR1 allele, from the sample's BAM (`aligned/${SAMPLE}_sorted.bam`, the one step 20 read). Without the BAM, or with a position below 20 reads, no `Reference` is passed and the log names the positions; a named allele needs no depth, its record is the evidence. Mutect2 writes the genotype 0/1 even at AF 1.0, so the AF decides, not the genotype. No line is added, and the gene stays No Result with the reason in the step log, when a named allele is below the detection floor (AF below 0.05) and no other named allele is called (the log says so, and the gene is not called Reference either; beside a called allele it is only named in the log), filtered, or has no AF (or an AF that reads `nan`); when a `PASS` record at AF 0.05 or more at a position where PharmCAT names an allele (m.960 and m.961 included, named there only as deletions) has an ALT PharmCAT does not name; when a `PASS` insertion or deletion overlaps a named position or lies within 10 bases of m.960 or m.961, where PharmCAT names deletions in a C run that the script does not map; and when the file has no `PASS` chrM record. Without step 20's file the step says so and MT-RNR1 stays No Result: run step 20 before this step. The PHARMCAT module does the same with MITO_VARIANTS' calls. - **PharmCAT's own log file.** The jar's built-in `logback.xml` writes `pharmcat.log` into the working directory. In the image that is `/pharmcat`, which the calling user cannot write, so every run printed a logback status dump with a `pharmcat.log (Permission denied)` stack trace (the calls were not affected). The script runs the jar with `-w /tmp`, a writable directory that goes away with the container. A Nextflow task runs in its own writable work directory, so the module needs nothing: the log lands there. - **A backslash in a `##` header line.** PharmCAT up to 3.4.0 bundles vcf-parser 0.3.1, which stops with "Error parsing metadata: character to be escaped is missing" on one. The line is valid VCF; bcftools writes it for a soft filter with a quoted string (`bcftools filter -s LowDP -e 'FORMAT/DP<10 && GT!="0/0"'`). The script and the Nextflow module rewrite the header of PharmCAT's own copy (`${SAMPLE}.pharmcat_input.vcf`, deleted afterwards by the script): on `##` lines `\"` becomes `'` and any other `\` becomes `/`. PharmCAT's calls are the same with and without the rewrite. A newer PharmCAT is no fix yet: 3.4.0 still bundles vcf-parser 0.3.1 and fails the same way. @@ -105,7 +107,7 @@ docker run --rm \ - HTML report with drug recommendations per gene, including HLA-A, HLA-B and CYP2D6 when [step 36](36-pgx-consensus.md) passed them as outside calls, and MT-RNR1 (aminoglycosides) when step 20's chrM calls gave it a call - JSON report used by step 27 (`${SAMPLE}.report.json`) - Preprocessed VCF (`${SAMPLE}.preprocessed.vcf.bgz`) generated as an intermediate -- `${SAMPLE}.missing_pgx_var.vcf`: the PGx positions absent from PharmCAT's input. With the gVCF these are the positions without coverage, plus the positions longer than one base whose span is not wholly inside reference blocks with GQ 20 or more; with a variants-only VCF they include every position where you match the reference. +- `${SAMPLE}.missing_pgx_var.vcf`: the PGx positions absent from PharmCAT's input. With the gVCF these are the positions without coverage, the positions whose reference call has a GQ below 20, and the positions longer than one base whose span is not wholly inside reference blocks with GQ 20 or more; with a variants-only VCF they include every position where you match the reference. - Covers CYP2C19, CYP2D6, CYP2B6, CYP3A4/5, UGT1A1, DPYD, NAT2, TPMT, etc. - Star allele calls with metabolizer status (Poor/Intermediate/Normal/Rapid/Ultra-rapid) diff --git a/docs/lessons-learned.md b/docs/lessons-learned.md index 038d182a3..1eb87c369 100644 --- a/docs/lessons-learned.md +++ b/docs/lessons-learned.md @@ -531,6 +531,11 @@ Most bioinformatics containers run as non-root users. If writing to bind-mounted - **Why:** PharmCAT 3.4.0's preprocessor does not read a one-base 0/0 record as a call at a position whose REF or ALT is longer than one base. It sets the record aside with FILTER `PCATxINDEL` (or `PCATxREF` for a two-base substitution) and lists the position as missing; where PharmCAT's REF is longer than one base, the matcher then discards it. - **Fix:** `og pgx refblock-fill` (was `bin/pgx_refblock_fill.py`) writes PharmCAT's own record (its ID, REF and ALT) as 0/0 at each such position when every base of the span lies in reference blocks with GQ 20 or more and nothing else overlaps it. The details are in [Pharmacogenomics, Input the preprocessor or PharmCAT refuses](07-pharmacogenomics.md#input-the-preprocessor-or-pharmcat-refuses). +### A low-quality reference call reached PharmCAT as a confident 0/0 +- **Failed:** a one-base reference block with GQ 5 at CYP2C19 rs4244285 (the \*2 position) reached PharmCAT as 0/0, so the sample read as "not \*2" when the data could not tell. A DeepVariant `RefCall` record with a low GQ did the same. +- **Why:** `bcftools convert --gvcf2vcf` writes a 0/0 record for every base of a block, whatever its GQ, and the GQ 20 floor of `og pgx refblock-fill` held only for the 0/0 records it writes itself at positions longer than one base. Every other reference call passed through unchecked. +- **Fix:** `og pgx refblock-fill` leaves out every reference call (GT all 0) below GQ 20, or without a GQ, so PharmCAT reads the position as missing. A variant call passes whatever its GQ. The step log counts them and names those at PharmCAT positions. The details are in [Pharmacogenomics, Input the preprocessor or PharmCAT refuses](07-pharmacogenomics.md#input-the-preprocessor-or-pharmcat-refuses). + ### PharmCAT reads MT-RNR1 only as an outside call - **Failed:** MT-RNR1 (aminoglycoside-induced hearing loss) was No Result on every sample, although step 20 calls chrM with Mutect2 at high depth. - **Why:** PharmCAT 3.4.0 has no MT-RNR1 allele definition for its matcher, so chrM records in its VCF input are never matched for the gene. It lists MT-RNR1 among the genes it prefers as an outside call, and its own MT-RNR1 test passes the gene that way. diff --git a/modules/local/pharmcat/main.nf b/modules/local/pharmcat/main.nf index 2575b1410..86205ecb4 100644 --- a/modules/local/pharmcat/main.nf +++ b/modules/local/pharmcat/main.nf @@ -16,8 +16,11 @@ REF or ALT is longer than one base (an indel such as UGT1A1 *28), so og pgx refblock-fill writes a 0/0 record with PharmCAT's own alleles there when reference blocks with GQ >= 20 cover the whole REF - span and no other record overlaps it. The expanded file is named without - .g.vcf, which PharmCAT refuses. + span and no other record overlaps it. The same GQ 20 floor holds for + every reference call it passes on: a 0/0 record (a block or a + DeepVariant RefCall) below GQ 20, or without a GQ, is left out, so + PharmCAT reads that position as missing, not as a confident 0/0. The + expanded file is named without .g.vcf, which PharmCAT refuses. PharmCAT types neither HLA nor CYP2D6 from a VCF. When PGX_CONSENSUS wrote outside calls for the sample (HLA-A and HLA-B from T1K, a CYP2D6 diff --git a/scripts/07-pharmacogenomics.sh b/scripts/07-pharmacogenomics.sh index f5ea70149..2c8166f38 100755 --- a/scripts/07-pharmacogenomics.sh +++ b/scripts/07-pharmacogenomics.sh @@ -40,7 +40,10 @@ done # count at a PharmCAT position whose REF or ALT is longer than one base (an # indel such as UGT1A1 *28); og pgx refblock-fill writes a 0/0 record # with PharmCAT's own alleles there when reference blocks with GQ >= 20 cover -# the whole REF span and no other record overlaps it. PharmCAT refuses a gVCF, +# the whole REF span and no other record overlaps it. The same GQ 20 floor +# holds for every reference call it passes on: a 0/0 record (a block or a +# DeepVariant RefCall) below GQ 20, or without a GQ, is left out, so PharmCAT +# reads that position as missing, not as a confident 0/0. PharmCAT refuses a gVCF, # by content and by a name with .g.vcf in it, so the expanded file has # neither. The PHARMCAT_PREPROCESS module does the same. GVCF="${OUTPUT_DIR}/${SAMPLE}.g.vcf.gz" From 57f63aaae63d10496e0eba9917d97ec30ffd5a95 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:14:17 +0100 Subject: [PATCH 053/110] fix(qc): word a skipped marker check after VerifyBamID2's real rule VerifyBamID2 keeps its marker check only for more than 1,000 markers that are also more than a tenth of the panel. On the 100,000-marker panel a check can skip with up to 10,000 markers kept, above the 5,000 floor, so the reason no longer sets the count against that floor and no longer claims fewer than 1,000 markers had reads. --- docs/33-sample-qc.md | 4 ++-- rust/crates/og-summary/src/qc.rs | 9 ++++++--- rust/crates/og-summary/src/qc/tests.rs | 15 +++++++++++++-- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/docs/33-sample-qc.md b/docs/33-sample-qc.md index be0432573..fa8be9751 100644 --- a/docs/33-sample-qc.md +++ b/docs/33-sample-qc.md @@ -61,7 +61,7 @@ The pedigree is one line: the sample, itself as its family, no parents (`-9`), t The bash step lets somalier name the sample after the BAM's `@RG SM` tag; every BAM step 02 writes has one. In Nextflow, somalier names each sample by its samplesheet id instead, so two rows whose BAMs share an `SM` stay two samples, and a BAM with no read group works. -VerifyBamID2 refuses to estimate when fewer than 1,000 panel markers have reads ("Insufficient Available markers"), as on a targeted (WES) or sliced BAM. The step then runs it again with `--DisableSanityCheck` and records `verifybamid2_marker_check skipped`, so the report says FREEMIX rests on fewer than 1,000 markers. On the CI fixture, with about 320 markers that have reads, FREEMIX still read 0.0004 for the clean HG002 and 0.093 for HG002 with 9.3% of its reads from HG001. +VerifyBamID2 refuses to estimate unless its marker check keeps more than 1,000 markers and more than a tenth of the panel ("Insufficient Available markers"), as on a targeted (WES) or sliced BAM. On the 100,000-marker panel that means 10,000 or fewer markers with reads. The step then runs it again with `--DisableSanityCheck` and records `verifybamid2_marker_check skipped`, so the report says FREEMIX is a rough estimate. On the CI fixture, with about 320 markers that have reads, FREEMIX still read 0.0004 for the clean HG002 and 0.093 for HG002 with 9.3% of its reads from HG001. VerifyBamID2's marker check logs how many markers it kept: those with reads and a depth within three standard deviations of the mean (`NOTICE - N SNP markers remained after sanity check.`). The run without the check does not log it, so the step reads the count from the first run's log and records it as `verifybamid2_markers`. FREEMIX is `contamination_confidence uncertain` when the check was skipped or when it kept fewer than 5,000 markers. That floor is five times the 1,000 markers the check asks for, and half of the 10% of the panel it also asks for. A whole genome at 30x keeps far more. `contamination` (`ok` or `warn`) still compares FREEMIX with `FREEMIX_WARN` as before; the confidence row only says how far to trust that number. @@ -84,7 +84,7 @@ The step needs step 16b's windows for the depth estimate and, for a woman, the V ## Output Files | File | Description | |---|---| -| `qc/${SAMPLE}_sample_qc.tsv` | The verdict, one `key` and `value` per line: `inferred_sex`, `sex_check` (`ok`, `mismatch` or `not_checked` with `sex_check_reason`), the chrX and chrY numbers it rests on, `freemix`, `contamination` (`ok` or `warn`), `panel_markers`, `verifybamid2_marker_check` (`passed`, or `skipped` when fewer than 1,000 markers had reads), `same_person_as`, `verifybamid2_markers` (the markers VerifyBamID2 kept, empty when its log does not say), `contamination_confidence` (`ok`, `uncertain`, or empty when VerifyBamID2 did not run) with `contamination_confidence_reason`, `identity` (`checked`, `uncertain` or `not_checked`) with `identity_reason`; then the mosaic rows below | +| `qc/${SAMPLE}_sample_qc.tsv` | The verdict, one `key` and `value` per line: `inferred_sex`, `sex_check` (`ok`, `mismatch` or `not_checked` with `sex_check_reason`), the chrX and chrY numbers it rests on, `freemix`, `contamination` (`ok` or `warn`), `panel_markers`, `verifybamid2_marker_check` (`passed`, or `skipped` when the check kept 1,000 or fewer markers, or a tenth of the panel or fewer), `same_person_as`, `verifybamid2_markers` (the markers VerifyBamID2 kept, empty when its log does not say), `contamination_confidence` (`ok`, `uncertain`, or empty when VerifyBamID2 did not run) with `contamination_confidence_reason`, `identity` (`checked`, `uncertain` or `not_checked`) with `identity_reason`; then the mosaic rows below | | `qc/somalier/${SAMPLE}.samples.tsv` | somalier's per-sample table: depth, genotype counts, chrX and chrY counts, `original_pedigree_sex` (the declared sex: `male`, `female`, or `unknown` when none was declared), `sex` (the pedigree's code, changed when the reads tell: 1 male, 2 female, -9 unknown, -2 when it is female but chrY has reads) | | `qc/somalier/${SAMPLE}.declared.ped` | The pedigree somalier got: the declared sex | | `qc/somalier/${SAMPLE}.pairs.tsv`, `.html` | Relatedness of every pair (one sample here; every sample of the run in Nextflow, under `somalier/`) | diff --git a/rust/crates/og-summary/src/qc.rs b/rust/crates/og-summary/src/qc.rs index c8a9efe61..f3105e295 100644 --- a/rust/crates/og-summary/src/qc.rs +++ b/rust/crates/og-summary/src/qc.rs @@ -372,16 +372,19 @@ fn contamination_confidence( return ("", String::new()); } match (marker_check, markers) { + // VerifyBamID2 keeps its check only for more than 1,000 markers + // that are also more than a tenth of the panel, so on the + // 100,000-marker panel a skipped check can follow a count above + // the floor: the reason names the check's rule, not the floor. ("skipped", Some(m)) => ( "uncertain", format!( - "VerifyBamID2 skipped its marker check and estimated FREEMIX from {m} markers; a firm estimate needs {}", - thousands(floor) + "VerifyBamID2 skipped its marker check: its first run kept {m} markers, too few for that check (more than 1,000 and more than a tenth of the panel), so FREEMIX is a rough estimate" ), ), ("skipped", None) => ( "uncertain", - "VerifyBamID2 skipped its marker check: fewer than 1,000 markers had reads".to_owned(), + "VerifyBamID2 skipped its marker check: too few markers had reads (it needs more than 1,000 and more than a tenth of the panel)".to_owned(), ), (_, Some(m)) if m < floor => ( "uncertain", diff --git a/rust/crates/og-summary/src/qc/tests.rs b/rust/crates/og-summary/src/qc/tests.rs index f04a7e049..5b43ab16c 100644 --- a/rust/crates/og-summary/src/qc/tests.rs +++ b/rust/crates/og-summary/src/qc/tests.rs @@ -441,14 +441,25 @@ fn contamination_on_fewer_than_5000_markers_is_uncertain() { ("ok", "FREEMIX rests on 5000 markers") ); // Relaxed mode: uncertain whatever the count. - for markers in [Some(320), Some(60000), None] { + for markers in [Some(320), Some(8000), None] { let t = evidence(&many, None, true, "skipped", markers); assert_eq!(t["contamination_confidence"], "uncertain", "{markers:?}"); + let why = &t["contamination_confidence_reason"]; assert!( - t["contamination_confidence_reason"].contains("skipped its marker check"), + why.starts_with("VerifyBamID2 skipped its marker check"), "{t:?}" ); + // The check needs more than 1,000 markers and a tenth of the + // panel, so it can skip above the 5,000 floor: the reason must + // not set the count against that floor. + assert!(!why.contains("5,000"), "{t:?}"); + assert!(why.contains("more than a tenth of the panel"), "{t:?}"); } + let t = evidence(&many, None, true, "skipped", Some(8000)); + assert_eq!( + t["contamination_confidence_reason"], + "VerifyBamID2 skipped its marker check: its first run kept 8000 markers, too few for that check (more than 1,000 and more than a tenth of the panel), so FREEMIX is a rough estimate" + ); // A passed check with no count: VerifyBamID2's own floor held. let t = evidence(&many, None, true, "passed", None); assert_eq!(t["contamination_confidence"], "ok"); From 7fde0dc804e9d629a5780e10a1edf2d83c62b08e Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:44:56 +0100 Subject: [PATCH 054/110] test(str): red tests for HTT 36-39 reduced penetrance and in-repeat-only alleles HTT 37 must carry the reduced-penetrance range, and an allele that only in-repeat reads support must read in_repeat, not sized. Bead: sv-29 Bead: D14 --- .../tests/i411_str_htt_penetrance.rs | 250 ++++++++++++++++++ 1 file changed, 250 insertions(+) create mode 100644 rust/crates/og-summary/tests/i411_str_htt_penetrance.rs diff --git a/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs new file mode 100644 index 000000000..c636efa1c --- /dev/null +++ b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs @@ -0,0 +1,250 @@ +//! Step 09's repeat counts as `og summary collect` reads them. +//! +//! 1. HTT 36 to 39 CAG is the reduced-penetrance range (GeneReviews: +//! Huntington Disease). Stranger grades it with the catalog's pathogenic +//! minimum alone, so 37 reads as plain `full_mutation` under STRchive's +//! thresholds. A sized HTT allele in that range carries the range, its +//! label and its citation from `assets/str_penetrance_ranges.tsv`. +//! 2. An allele whose ExpansionHunter estimate rests on in-repeat reads only +//! (ADSP and ADFL 0, ADIR above 0) is longer than a read: it is +//! `in_repeat`, not sized, whatever its SO field says. Its point estimate +//! must never earn a range label. + +use og_summary::collect::{Group, Input, collect}; +use pycompat::json::Value; +use std::fs; +use std::path::PathBuf; + +const HEAD: &str = "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n"; +const FMT: &str = "GT:SO:REPCN:REPCI:ADSP:ADFL:ADIR:LC"; + +struct Dir(PathBuf); + +impl Dir { + fn new(tag: &str) -> Dir { + let p = std::env::temp_dir().join(format!( + "og-summary-i411-str-{tag}-{}-{:?}", + std::process::id(), + std::thread::current().id() + )); + let _ = fs::remove_dir_all(&p); + fs::create_dir_all(&p).unwrap(); + Dir(p) + } + + fn path(&self, name: &str) -> String { + self.0.join(name).display().to_string() + } + + fn put(&self, name: &str, body: &str) { + let p = self.0.join(name); + fs::create_dir_all(p.parent().unwrap()).unwrap(); + fs::write(p, body).unwrap(); + } +} + +impl Drop for Dir { + fn drop(&mut self) { + let _ = fs::remove_dir_all(&self.0); + } +} + +/// One ExpansionHunter record with Stranger's INFO fields. The counts are +/// invented. +fn rec(locus: &str, so: &str, cn: &str, ci: &str, ad: [&str; 3], st: &str) -> String { + format!( + "chr4\t3074877\t.\tC\t\t.\tPASS\tEND=3074940;REPID={locus};VARID={locus};\ + STR_STATUS={st};STR_NORMAL_MAX=26;STR_PATHOLOGIC_MIN=36\t{FMT}\t\ + 0/1:{so}:{cn}:{ci}:{}:{}:{}:30.0\n", + ad[0], ad[1], ad[2] + ) +} + +/// The expansions section's loci by name, for one ExpansionHunter VCF that +/// Stranger graded. +fn loci(tag: &str, records: &str) -> Vec<(String, Value)> { + let d = Dir::new(tag); + let vcf = format!("{HEAD}{records}"); + d.put("S/expansion_hunter/S_eh.vcf", &vcf); + d.put("S/expansion_hunter/S_eh_stranger.vcf", &vcf); + let input = Input { + sample: "S".into(), + sample_dir: d.path("S"), + declared_sex: None, + assets: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets").into(), + group: Group::C, + tables: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../bin").into(), + }; + let v = collect(&input).unwrap().to_json(); + let sec = at(&v, &["sections", "expansions"]); + assert_eq!(at(sec, &["state"]), &Value::Str("ok".into()), "{sec:?}"); + match at(sec, &["data", "loci"]) { + Value::Array(xs) => xs + .iter() + .map(|x| (text(at(x, &["locus"])).to_owned(), x.clone())) + .collect(), + other => panic!("loci: {other:?}"), + } +} + +fn locus<'a>(ls: &'a [(String, Value)], name: &str) -> &'a Value { + &ls.iter() + .find(|(k, _)| k == name) + .unwrap_or_else(|| panic!("no {name}")) + .1 +} + +fn at<'a>(v: &'a Value, path: &[&str]) -> &'a Value { + path.iter().fold(v, |v, k| match v { + Value::Object(m) => m.get(*k).unwrap_or_else(|| panic!("no {k} in {v:?}")), + _ => panic!("{k} of {v:?}"), + }) +} + +fn get<'a>(v: &'a Value, k: &str) -> Option<&'a Value> { + match v { + Value::Object(m) => m.get(k), + _ => None, + } +} + +fn text(v: &Value) -> &str { + match v { + Value::Str(s) => s, + _ => panic!("not a text: {v:?}"), + } +} + +const SPAN2: &str = "SPANNING/SPANNING"; + +#[test] +fn htt_37_reads_reduced_penetrance() { + let ls = loci( + "htt37", + &rec("HTT", SPAN2, "17/37", "17-17/37-37", ["12/9", "0/0", "0/0"], "normal,full_mutation"), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(text(at(htt, &["sizing"])), "sized", "{htt:?}"); + assert_eq!(text(at(htt, &["penetrance"])), "36-39", "{htt:?}"); + assert!( + text(at(htt, &["penetrance_label"])).starts_with("reduced penetrance"), + "{htt:?}" + ); + assert!( + text(at(htt, &["penetrance_citation"])).contains("NBK1305"), + "{htt:?}" + ); + // Stranger's own grade stays as it wrote it. + assert_eq!(text(at(htt, &["status"])), "normal,full_mutation"); +} + +#[test] +fn the_flagged_list_carries_the_penetrance_range() { + let d = Dir::new("flagged"); + let vcf = format!( + "{HEAD}{}", + rec("HTT", SPAN2, "20/38", "20-20/38-38", ["10/8", "0/0", "0/0"], "normal,full_mutation") + ); + d.put("S/expansion_hunter/S_eh.vcf", &vcf); + d.put("S/expansion_hunter/S_eh_stranger.vcf", &vcf); + let input = Input { + sample: "S".into(), + sample_dir: d.path("S"), + declared_sex: None, + assets: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets").into(), + group: Group::C, + tables: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../bin").into(), + }; + let v = collect(&input).unwrap().to_json(); + let flagged = match at(&v, &["sections", "expansions", "data", "flagged"]) { + Value::Array(xs) => xs.clone(), + other => panic!("{other:?}"), + }; + assert_eq!(flagged.len(), 1, "{flagged:?}"); + assert_eq!(text(at(&flagged[0], &["penetrance"])), "36-39"); +} + +#[test] +fn the_ends_of_the_range_and_their_neighbours() { + for (cn, want) in [ + ("20/35", None), + ("20/36", Some("36-39")), + ("20/39", Some("36-39")), + ("20/40", None), + ] { + let (a, b) = cn.split_once('/').unwrap(); + let ls = loci( + &format!("ends-{b}"), + &rec("HTT", SPAN2, cn, &format!("{a}-{a}/{b}-{b}"), ["10/8", "0/0", "0/0"], "normal"), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(get(htt, "penetrance").map(text), want, "{cn}: {htt:?}"); + // The keys come together or not at all. + assert_eq!(get(htt, "penetrance_label").is_some(), want.is_some()); + assert_eq!(get(htt, "penetrance_citation").is_some(), want.is_some()); + } +} + +#[test] +fn only_a_sized_allele_earns_the_label_and_only_at_its_locus() { + // A low-confidence 37 (one spanning read), and 37 at another locus. + let ls = loci( + "unsized37", + &(rec("HTT", SPAN2, "17/37", "17-17/37-37", ["10/1", "0/0", "0/0"], "normal,full_mutation") + + &rec("ATXN1", SPAN2, "17/37", "17-17/37-37", ["10/8", "0/0", "0/0"], "normal")), + ); + let htt = locus(&ls, "HTT"); + assert_eq!(text(at(htt, &["sizing"])), "low_confidence"); + assert!(get(htt, "penetrance").is_none(), "{htt:?}"); + assert!(get(locus(&ls, "ATXN1"), "penetrance").is_none()); +} + +#[test] +fn an_allele_of_in_repeat_reads_only_is_not_sized() { + // No SO value, and SO=FLANKING, on an allele that only in-repeat reads + // support: each is longer than a read. The first allele has spanning + // reads (sized, or unknown where SO is empty). + for (so, want) in [ + (".", "unknown/in_repeat"), + ("SPANNING/.", "sized/in_repeat"), + ("SPANNING/FLANKING", "sized/in_repeat"), + ] { + let ls = loci( + &format!("irr-{}", so.replace(['/', '.'], "_")), + &rec("HTT", so, "17/37", "17-17/37-60", ["12/0", "0/0", "0/14"], "normal,full_mutation"), + ); + let htt = locus(&ls, "HTT"); + assert_eq!( + text(at(htt, &["allele_sizing"])), + want, + "{so}: {htt:?}" + ); + assert_eq!(text(at(htt, &["sizing"])), "in_repeat", "{so}"); + // The point estimate 37 of an unsized allele earns no label. + assert!(get(htt, "penetrance").is_none(), "{so}: {htt:?}"); + assert_eq!(text(at(htt, &["zone"])), "", "{so}"); + } +} + +#[test] +fn spanning_or_flanking_reads_keep_the_allele_as_it_was() { + // Reads beside the in-repeat ones: the IRR rule does not fire. + let ls = loci( + "not-irr", + &(rec("HTT", ".", "17/37", "17-17/37-37", ["12/3", "0/0", "0/14"], "normal,full_mutation") + + &rec("ATXN1", "SPANNING/FLANKING", "17/50", "17-17/40-60", ["12/0", "0/4", "0/14"], "normal") + + &rec("DMPK", SPAN2, "5/12", "5-5/12-12", ["12/9", "0/0", "0/0"], "normal")), + ); + assert_eq!( + text(at(locus(&ls, "HTT"), &["allele_sizing"])), + "unknown/unknown" + ); + assert_eq!( + text(at(locus(&ls, "ATXN1"), &["allele_sizing"])), + "sized/flanking_only" + ); + assert_eq!( + text(at(locus(&ls, "DMPK"), &["allele_sizing"])), + "sized/sized" + ); +} From f256ba299c68fe56437c0e22e7aa9b3e13ba4335 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:49:37 +0100 Subject: [PATCH 055/110] fix(str): mark HTT 36-39 as reduced penetrance and read in-repeat-only alleles as not sized Stranger grades HTT with one pathogenic minimum, so 36-39 CAG read as plain full_mutation. og summary collect now adds penetrance, penetrance_label and penetrance_citation to a locus (and its flagged entry) with a sized allele in a range of the new assets/str_penetrance_ranges.tsv. An allele with no spanning or flanking read but in-repeat reads is longer than a read: it is in_repeat whatever SO says, so an empty SO no longer reads it as sized. Bead: sv-29 Bead: D14 --- assets/str_penetrance_ranges.tsv | 10 ++ .../og-summary/src/collect/group_c/repeats.rs | 117 ++++++++++++++++-- .../tests/i411_str_htt_penetrance.rs | 87 ++++++++++--- 3 files changed, 190 insertions(+), 24 deletions(-) create mode 100644 assets/str_penetrance_ranges.tsv diff --git a/assets/str_penetrance_ranges.tsv b/assets/str_penetrance_ranges.tsv new file mode 100644 index 000000000..1b0a24bee --- /dev/null +++ b/assets/str_penetrance_ranges.tsv @@ -0,0 +1,10 @@ +# assets/str_penetrance_ranges.tsv: the repeat ranges of reduced penetrance that og summary collect names (step 09). +# A count in such a range can cause the disease, but not in everyone who carries it. Stranger grades a count only +# against the catalog's normal maximum and pathogenic minimum, so it reads such a count as plain full_mutation or +# pre_mutation. og-summary embeds this file at build time and marks a sized allele in a range with the keys +# penetrance (min-max), penetrance_label and penetrance_citation of its locus in summary.json. +# The intermediate ranges (between normal and disease-causing) are a separate table, bin/str_intermediate_ranges.tsv. +# locus: the ExpansionHunter locus id (REPID). min, max: the range, in repeat units, both ends included. +# label: what the summary says beside a count in the range. citation: the GeneReviews chapter that defines the range. +locus min max label citation +HTT 36 39 reduced penetrance (may or may not cause Huntington disease; full penetrance from 40) GeneReviews: Huntington Disease, https://www.ncbi.nlm.nih.gov/books/NBK1305/ diff --git a/rust/crates/og-summary/src/collect/group_c/repeats.rs b/rust/crates/og-summary/src/collect/group_c/repeats.rs index 3081543d3..cefcc8135 100644 --- a/rust/crates/og-summary/src/collect/group_c/repeats.rs +++ b/rust/crates/og-summary/src/collect/group_c/repeats.rs @@ -1,10 +1,13 @@ //! Step 09 (ExpansionHunter) and 9b (Stranger, the RFC1 and other motif //! counts): every locus with its counts, how well each allele was sized, -//! Stranger's grade, the intermediate zone, and what the counts of CFTR's -//! TG and poly-T tracts and UGT1A1's TA repeat mean. +//! Stranger's grade, the intermediate zone, the reduced-penetrance range, +//! and what the counts of CFTR's TG and poly-T tracts and UGT1A1's TA +//! repeat mean. use super::super::model::State; -use super::util::{Obj, bin_rows, cells, count, get_default, s, strs, table, vcf_lines}; +use super::util::{ + Obj, asset_rows, bin_rows, cells, count, get_default, s, strs, table, vcf_lines, +}; use super::{Ctx, Out}; use indexmap::IndexMap; use pycompat::json::Value; @@ -76,11 +79,37 @@ fn str_int(x: &str) -> Option { crate::int(x).ok() } -/// One allele's sizing from ExpansionHunter's SO, ADSP and REPCI fields. -fn allele_sizing(so: &str, adsp: &str, ci: &str, cn: &str, path_min: Option) -> Sizing { +/// The reads behind one allele: ExpansionHunter's ADSP, ADFL and ADIR. +struct Reads<'a> { + spanning: &'a str, + flanking: &'a str, + in_repeat: &'a str, +} + +impl Reads<'_> { + /// No spanning and no flanking read, and at least one in-repeat read: + /// the estimate rests on reads made only of repeat, so the allele is + /// longer than a read, whatever SO says. + fn in_repeat_only(&self) -> bool { + let zero = |x: &str| str_int(x) == Some(0); + zero(self.spanning) && zero(self.flanking) && str_int(self.in_repeat).is_some_and(|n| n > 0) + } +} + +/// One allele's sizing from ExpansionHunter's SO, read counts and REPCI. +fn allele_sizing( + so: &str, + reads: &Reads<'_>, + ci: &str, + cn: &str, + path_min: Option, +) -> Sizing { let Some(n) = str_int(cn) else { return Sizing::NoCall; }; + if reads.in_repeat_only() { + return Sizing::InRepeat; + } match so { "" | "." => return Sizing::Unknown, "FLANKING" => return Sizing::FlankingOnly, @@ -92,7 +121,7 @@ fn allele_sizing(so: &str, adsp: &str, ci: &str, cn: &str, path_min: Option) -> Result>, Str Ok(out) } +/// A range of reduced penetrance of `assets/str_penetrance_ranges.tsv`. +struct Penetrance { + locus: String, + min: i128, + max: i128, + label: String, + citation: String, +} + +/// `assets/str_penetrance_ranges.tsv`. An assets folder without it (a +/// staged copy of some tables) labels nothing; a table that is there but +/// cannot be read makes the section unreadable. +fn penetrance(c: &Ctx<'_>) -> Result, String> { + const NAME: &str = "str_penetrance_ranges.tsv"; + let rows = match asset_rows(c.assets, NAME) { + Ok(r) => r, + Err(e) if e.starts_with(&format!("{NAME} is not in ")) => return Ok(Vec::new()), + Err(e) => return Err(e), + }; + let cell = |r: &pycompat::csv::DictRow, k: &str| -> Result { + r.get(k) + .flatten() + .map(str::to_owned) + .ok_or_else(|| super::util::key_error(k)) + }; + let num = |r: &pycompat::csv::DictRow, k: &str| -> Result { + crate::int(&cell(r, k)?).map_err(|e| super::super::sections::py_error("ValueError", &e)) + }; + rows.iter() + .map(|r| { + Ok(Penetrance { + locus: cell(r, "locus")?, + min: num(r, "min")?, + max: num(r, "max")?, + label: cell(r, "label")?, + citation: cell(r, "citation")?, + }) + }) + .collect() +} + fn mtime(p: &str) -> Result { pycompat::mtime::mtime(p).map_err(|e| super::util::os_note(&crate::os_error(&e, p))) } @@ -210,6 +280,7 @@ pub fn expansions(c: &Ctx<'_>) -> Out { return Ok(None); }; let ranges = ranges(c)?; + let penetrance = penetrance(c)?; let stp = st.as_ref().map(|f| f.path.as_str()); let rfc1 = match stp { Some(after) => { @@ -273,12 +344,24 @@ pub fn expansions(c: &Ctx<'_>) -> Out { } else { counts.clone() }; + let (sp, fl, ir) = ( + split_n(field("ADSP"), n), + split_n(field("ADFL"), n), + split_n(field("ADIR"), n), + ); let sizing: Vec = split_n(field("SO"), n) .iter() - .zip(split_n(field("ADSP"), n)) .zip(split_n(field("REPCI"), n)) .zip(cn_list) - .map(|(((so, ad), ci), cn)| allele_sizing(so, &ad, &ci, cn, path_min)) + .enumerate() + .map(|(i, ((so, ci), cn))| { + let reads = Reads { + spanning: &sp[i], + flanking: &fl[i], + in_repeat: &ir[i], + }; + allele_sizing(so, &reads, &ci, cn, path_min) + }) .collect(); let status: Vec<&str> = if st.is_some() { info.get("STR_STATUS") @@ -351,6 +434,16 @@ pub fn expansions(c: &Ctx<'_>) -> Out { } } } + // Stranger grades a count against two thresholds only, so a count of + // reduced penetrance reads as plain full_mutation or pre_mutation. + if let Some(p) = penetrance + .iter() + .find(|p| p.locus == rep && sized.iter().any(|c| p.min <= *c && *c <= p.max)) + { + item.put("penetrance", s(&format!("{}-{}", p.min, p.max))); + item.put("penetrance_label", s(&p.label)); + item.put("penetrance_citation", s(&p.citation)); + } let abnormal = status.iter().any(|x| *x != "normal"); if rep == "RFC1" && st.is_some() && abnormal { item.put( @@ -387,7 +480,13 @@ pub fn expansions(c: &Ctx<'_>) -> Out { for k in ["locus", "repeat_count", "status", "sizing"] { f.put(k, item.0[k].clone()); } - for k in ["rfc1_motif", "motif"] { + for k in [ + "penetrance", + "penetrance_label", + "penetrance_citation", + "rfc1_motif", + "motif", + ] { if let Some(v) = item.0.get(k) { f.put(k, v.clone()); } diff --git a/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs index c636efa1c..c3a230071 100644 --- a/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs +++ b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs @@ -15,7 +15,8 @@ use pycompat::json::Value; use std::fs; use std::path::PathBuf; -const HEAD: &str = "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n"; +const HEAD: &str = + "##fileformat=VCFv4.2\n#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n"; const FMT: &str = "GT:SO:REPCN:REPCI:ADSP:ADFL:ADIR:LC"; struct Dir(PathBuf); @@ -121,7 +122,14 @@ const SPAN2: &str = "SPANNING/SPANNING"; fn htt_37_reads_reduced_penetrance() { let ls = loci( "htt37", - &rec("HTT", SPAN2, "17/37", "17-17/37-37", ["12/9", "0/0", "0/0"], "normal,full_mutation"), + &rec( + "HTT", + SPAN2, + "17/37", + "17-17/37-37", + ["12/9", "0/0", "0/0"], + "normal,full_mutation", + ), ); let htt = locus(&ls, "HTT"); assert_eq!(text(at(htt, &["sizing"])), "sized", "{htt:?}"); @@ -143,7 +151,14 @@ fn the_flagged_list_carries_the_penetrance_range() { let d = Dir::new("flagged"); let vcf = format!( "{HEAD}{}", - rec("HTT", SPAN2, "20/38", "20-20/38-38", ["10/8", "0/0", "0/0"], "normal,full_mutation") + rec( + "HTT", + SPAN2, + "20/38", + "20-20/38-38", + ["10/8", "0/0", "0/0"], + "normal,full_mutation" + ) ); d.put("S/expansion_hunter/S_eh.vcf", &vcf); d.put("S/expansion_hunter/S_eh_stranger.vcf", &vcf); @@ -175,7 +190,14 @@ fn the_ends_of_the_range_and_their_neighbours() { let (a, b) = cn.split_once('/').unwrap(); let ls = loci( &format!("ends-{b}"), - &rec("HTT", SPAN2, cn, &format!("{a}-{a}/{b}-{b}"), ["10/8", "0/0", "0/0"], "normal"), + &rec( + "HTT", + SPAN2, + cn, + &format!("{a}-{a}/{b}-{b}"), + ["10/8", "0/0", "0/0"], + "normal", + ), ); let htt = locus(&ls, "HTT"); assert_eq!(get(htt, "penetrance").map(text), want, "{cn}: {htt:?}"); @@ -190,8 +212,21 @@ fn only_a_sized_allele_earns_the_label_and_only_at_its_locus() { // A low-confidence 37 (one spanning read), and 37 at another locus. let ls = loci( "unsized37", - &(rec("HTT", SPAN2, "17/37", "17-17/37-37", ["10/1", "0/0", "0/0"], "normal,full_mutation") - + &rec("ATXN1", SPAN2, "17/37", "17-17/37-37", ["10/8", "0/0", "0/0"], "normal")), + &(rec( + "HTT", + SPAN2, + "17/37", + "17-17/37-37", + ["10/1", "0/0", "0/0"], + "normal,full_mutation", + ) + &rec( + "ATXN1", + SPAN2, + "17/37", + "17-17/37-37", + ["10/8", "0/0", "0/0"], + "normal", + )), ); let htt = locus(&ls, "HTT"); assert_eq!(text(at(htt, &["sizing"])), "low_confidence"); @@ -211,14 +246,17 @@ fn an_allele_of_in_repeat_reads_only_is_not_sized() { ] { let ls = loci( &format!("irr-{}", so.replace(['/', '.'], "_")), - &rec("HTT", so, "17/37", "17-17/37-60", ["12/0", "0/0", "0/14"], "normal,full_mutation"), + &rec( + "HTT", + so, + "17/37", + "17-17/37-60", + ["12/0", "0/0", "0/14"], + "normal,full_mutation", + ), ); let htt = locus(&ls, "HTT"); - assert_eq!( - text(at(htt, &["allele_sizing"])), - want, - "{so}: {htt:?}" - ); + assert_eq!(text(at(htt, &["allele_sizing"])), want, "{so}: {htt:?}"); assert_eq!(text(at(htt, &["sizing"])), "in_repeat", "{so}"); // The point estimate 37 of an unsized allele earns no label. assert!(get(htt, "penetrance").is_none(), "{so}: {htt:?}"); @@ -231,9 +269,28 @@ fn spanning_or_flanking_reads_keep_the_allele_as_it_was() { // Reads beside the in-repeat ones: the IRR rule does not fire. let ls = loci( "not-irr", - &(rec("HTT", ".", "17/37", "17-17/37-37", ["12/3", "0/0", "0/14"], "normal,full_mutation") - + &rec("ATXN1", "SPANNING/FLANKING", "17/50", "17-17/40-60", ["12/0", "0/4", "0/14"], "normal") - + &rec("DMPK", SPAN2, "5/12", "5-5/12-12", ["12/9", "0/0", "0/0"], "normal")), + &(rec( + "HTT", + ".", + "17/37", + "17-17/37-37", + ["12/3", "0/0", "0/14"], + "normal,full_mutation", + ) + &rec( + "ATXN1", + "SPANNING/FLANKING", + "17/50", + "17-17/40-60", + ["12/0", "0/4", "0/14"], + "normal", + ) + &rec( + "DMPK", + SPAN2, + "5/12", + "5-5/12-12", + ["12/9", "0/0", "0/0"], + "normal", + )), ); assert_eq!( text(at(locus(&ls, "HTT"), &["allele_sizing"])), From 41fccf52e3e9701df3ad6d989b00e3578e94264e Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:49:37 +0100 Subject: [PATCH 056/110] docs(str): say how HTT 36-39 and in-repeat-only alleles are read Bead: sv-29 Bead: D14 --- CHANGELOG.md | 1 + docs/09-str-expansions.md | 6 +++--- docs/09b-stranger.md | 2 +- docs/results/structural-and-repeats.md | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..a2f163568 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- An HTT count of 36 to 39 CAG no longer reads only as plain `full_mutation` in `summary.json`. That range is reduced penetrance: it can cause Huntington disease, but not in everyone who carries it. Stranger grades HTT with one pathogenic minimum (36 on the STRchive catalog), so it could not say so. `og summary collect` now adds three keys to a locus with a sized allele in such a range, and to its entry in the flagged list: `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (GeneReviews). The ranges live in a new table, `assets/str_penetrance_ranges.tsv`, which holds HTT only. Stranger's status and every other key stay as they were. The reports do not print the new keys yet. A second fix: an allele that ExpansionHunter supports with in-repeat reads only (`ADSP` and `ADFL` 0, `ADIR` above 0) is now `in_repeat`, so it is listed as not sized and shown as at least the lower end of its interval. Before, such an allele read as sized when its `SO` was empty, and as `flanking_only` when its `SO` said `FLANKING`. `rust/crates/og-summary/tests/i411_str_htt_penetrance.rs` checks both. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/09-str-expansions.md b/docs/09-str-expansions.md index 795c99b44..7fc210477 100644 --- a/docs/09-str-expansions.md +++ b/docs/09-str-expansions.md @@ -61,7 +61,7 @@ SLC6A4 5-HTTLPR, the serotonin transporter promoter length polymorphism, is not ## Key Disease Thresholds -The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat units: Stranger calls a count up to the normal maximum `normal`, one in the pre-mutation band `pre_mutation`, and one from the full-mutation minimum `full_mutation`. `tests/test_str_ranges.py` checks every row against the catalog. With `EH_CATALOG=bundled`, step 9b uses Stranger's bundled catalog, whose thresholds differ at some loci. +The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat units: Stranger calls a count up to the normal maximum `normal`, one in the pre-mutation band `pre_mutation`, and one from the full-mutation minimum `full_mutation`. `rust/crates/og-setup/tests/genome_str_ranges.rs` checks every row against the catalog. With `EH_CATALOG=bundled`, step 9b uses Stranger's bundled catalog, whose thresholds differ at some loci. | Disease | Gene | Repeat Unit | Normal | Pre-mutation | Full mutation | |---|---|---|---|---|---| @@ -73,7 +73,7 @@ The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat un | SCA1 | ATXN1 | CAG | ≤35 | 36-38 | ≥39 | | SCA2 | ATXN2 | CAG | ≤28 | 29-34 | ≥35 | -Stranger's pre-mutation band is everything between the two thresholds; it is wider than a clinical intermediate range at some loci. At FMR1 it covers both the gray zone and the premutation below. `setup.sh` also writes `reference/strchive-/str_ranges.tsv`, one row per locus with these two thresholds and STRchive's own intermediate range. +Stranger's pre-mutation band is everything between the two thresholds; it is wider than a clinical intermediate range at some loci. At FMR1 it covers both the gray zone and the premutation below. At HTT, Stranger's full mutation starts at 36, but 36 to 39 is the reduced-penetrance range of GeneReviews: such a count can cause Huntington disease, but not in everyone who carries it. `og summary collect` marks a sized HTT count of 36 to 39 as reduced penetrance in `summary.json`, from `assets/str_penetrance_ranges.tsv` ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). `setup.sh` also writes `reference/strchive-/str_ranges.tsv`, one row per locus with these two thresholds and STRchive's own intermediate range. ## FMR1 Clinical Zones @@ -101,4 +101,4 @@ The second argument (`male`/`female`) is **required** — it affects X-linked lo - **Why STRchive, not a larger catalog.** STRchive lists the loci with a published disease link, each with the sources of its thresholds. Larger catalogs (tens of thousands of loci) are for research, have no thresholds, and would make step 9b's grades meaningless. Illumina has published no newer catalog than the bundled one (2021). - **What the STRchive catalog cannot do.** It does not make long repeats readable: the seven loci above stay ungraded, and an expansion longer than a read is still sized only roughly. The motif count of step 9b reads the motif, never the size. - Short-read WGS can reliably detect expansions up to ~150 repeats; very large expansions (>1000) are less accurate -- **How well each allele was sized.** The VCF's `SO` field says which reads support each allele: `SPANNING` (reads cross the whole repeat, so it is sized), `FLANKING` (reads reach into the repeat from one side only, so the size is not determined) or `INREPEAT` (reads made only of repeat, so the allele is longer than a read). `ADSP` counts the spanning reads and `REPCI` gives the interval. The report uses them: a `FLANKING` or `INREPEAT` allele, one with fewer than 2 spanning reads, or one whose interval reaches the pathogenic minimum is listed as not sized and never as normal ([how the report reads them](interpreting-results.md#str-expansions-step-9)) +- **How well each allele was sized.** The VCF's `SO` field says which reads support each allele: `SPANNING` (reads cross the whole repeat, so it is sized), `FLANKING` (reads reach into the repeat from one side only, so the size is not determined) or `INREPEAT` (reads made only of repeat, so the allele is longer than a read). `ADSP`, `ADFL` and `ADIR` count the spanning, flanking and in-repeat reads, and `REPCI` gives the interval. An allele with no spanning and no flanking read but at least one in-repeat read rests on in-repeat reads only, so it is longer than a read and is read as `INREPEAT`, whatever its `SO` says. The report uses them: a `FLANKING` or `INREPEAT` allele, one with fewer than 2 spanning reads, or one whose interval reaches the pathogenic minimum is listed as not sized and never as normal ([how the report reads them](interpreting-results.md#str-expansions-step-9)) diff --git a/docs/09b-stranger.md b/docs/09b-stranger.md index 918bb83b7..3db71a426 100644 --- a/docs/09b-stranger.md +++ b/docs/09b-stranger.md @@ -28,7 +28,7 @@ Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. By default, the catalog step 9 ran on (`expansion_hunter/_eh_catalog.json`) when it carries Stranger's thresholds: that is the STRchive catalog `setup.sh` builds ([step 9](09-str-expansions.md#which-catalog-runs)). Its thresholds are STRchive's, so steps 9 and 9b read one list of loci, and every graded record carries `SourceDisplay=STRchive-`. The log names it. Without it (step 9 ran on the bundled 31 loci, or on a catalog without thresholds) Stranger's bundled GRCh38 catalog grades, as before. `STRANGER_REPEATS=file` picks another catalog (TSV or JSON), `STRANGER_REPEATS=bundled` the bundled GRCh38 one. The Nextflow `STRANGER` module takes `--expansion_catalog` and makes the same choice. -The thresholds differ from the bundled catalog's at some loci. HTT, for example: STRchive's benign maximum is 26 and its pathogenic minimum 36, so 27 to 35 CAG is `pre_mutation`, where the bundled catalog calls up to 34 normal. Seven STRchive loci get no status at all (MUC1, CEL, TYMS, PLIN4, VWA1, POLG, MIR7-2; [why](09-str-expansions.md#which-catalog-runs)). +The thresholds differ from the bundled catalog's at some loci. HTT, for example: STRchive's benign maximum is 26 and its pathogenic minimum 36, so 27 to 35 CAG is `pre_mutation`, where the bundled catalog calls up to 34 normal. From 36 Stranger says `full_mutation`, but 36 to 39 is the reduced-penetrance range: `summary.json` marks a sized count there as reduced penetrance ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). Seven STRchive loci get no status at all (MUC1, CEL, TYMS, PLIN4, VWA1, POLG, MIR7-2; [why](09-str-expansions.md#which-catalog-runs)). ## Command diff --git a/docs/results/structural-and-repeats.md b/docs/results/structural-and-repeats.md index 7afbb24aa..ac4bb27b7 100644 --- a/docs/results/structural-and-repeats.md +++ b/docs/results/structural-and-repeats.md @@ -79,8 +79,9 @@ The output VCF lists each tested locus with the number of repeats found. Key loc The report prints no all-clear verdict for these loci. It lists every locus in the ExpansionHunter output, the five above first, with its repeat count, Stranger's status and the catalog's normal maximum (`STR_NORMAL_MAX`), and, when step 9b (Stranger) ran, every locus Stranger marks `pre_mutation` or `full_mutation`; without step 9b, compare the counts with the table yourself. It also says: -- **Not sized.** A locus whose call rests on flanking reads only prints "size not determined (flanking reads only)"; one with in-repeat reads only (longer than a read) prints its count as at least the lower end of ExpansionHunter's interval; one with fewer than 2 spanning reads, or an interval that reaches the catalog's pathogenic minimum, is marked low confidence. Such a locus is listed apart and never shown as normal, because an unsized repeat can hide an expansion. -- **Intermediate range.** A sized count inside the HTT, FMR1 or DMPK intermediate range of the table above prints the range, a note that it does not cause disease but may expand in offspring, and the GeneReviews chapter. The report reads these ranges from `bin/str_intermediate_ranges.tsv`, and `tests/test_str_ranges.py` checks that the table above prints the same ones. +- **Not sized.** A locus whose call rests on flanking reads only prints "size not determined (flanking reads only)"; one with in-repeat reads only (longer than a read) prints its count as at least the lower end of ExpansionHunter's interval. An allele counts as in-repeat when its `SO` says `INREPEAT`, or when ExpansionHunter found no spanning and no flanking read for it but at least one in-repeat read (`ADSP` and `ADFL` 0, `ADIR` above 0), whatever its `SO` says; one with fewer than 2 spanning reads, or an interval that reaches the catalog's pathogenic minimum, is marked low confidence. Such a locus is listed apart and never shown as normal, because an unsized repeat can hide an expansion. +- **Intermediate range.** A sized count inside the HTT, FMR1 or DMPK intermediate range of the table above prints the range, a note that it does not cause disease but may expand in offspring, and the GeneReviews chapter. The report reads these ranges from `bin/str_intermediate_ranges.tsv`, and `rust/crates/og-setup/tests/genome_str_ranges.rs` checks that the table above prints the same ones. +- **Reduced penetrance.** Stranger grades HTT with one pathogenic minimum, 36 on the STRchive catalog, so a count of 36 to 39 reads as plain `full_mutation`. It is the reduced-penetrance range of the table above. `summary.json` marks a sized HTT allele of 36 to 39 with `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (the GeneReviews chapter) on the locus, and on its entry in the flagged list. The range comes from `assets/str_penetrance_ranges.tsv`. An allele that was not sized gets no such mark: its point estimate is not a count. Stranger's status stays as Stranger wrote it. - **RFC1.** A `full_mutation` flag at RFC1 carries the motif verdict of step 9b ([RFC1 note](../09b-stranger.md#notes)). A count under every threshold is not a guarantee: repeat-expansion calls from short reads can be wrong at some loci, and a long expansion cannot be sized. Intermediate-range results should be discussed with a genetic counselor. From 2fe290a89b873bc372062183d03321f0cc233a1d Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 18:59:24 +0100 Subject: [PATCH 057/110] fix(str): refuse a penetrance table with no row or an inverted range A header alone, or a row whose min is above its max, labels nothing; the section now reads unreadable instead of dropping the label silently. Bead: sv-29 --- .../og-summary/src/collect/group_c/repeats.rs | 22 +++++- .../tests/i411_str_htt_penetrance.rs | 73 +++++++++++++++++-- 2 files changed, 84 insertions(+), 11 deletions(-) diff --git a/rust/crates/og-summary/src/collect/group_c/repeats.rs b/rust/crates/og-summary/src/collect/group_c/repeats.rs index cefcc8135..e45290cbd 100644 --- a/rust/crates/og-summary/src/collect/group_c/repeats.rs +++ b/rust/crates/og-summary/src/collect/group_c/repeats.rs @@ -170,7 +170,8 @@ struct Penetrance { /// `assets/str_penetrance_ranges.tsv`. An assets folder without it (a /// staged copy of some tables) labels nothing; a table that is there but -/// cannot be read makes the section unreadable. +/// cannot be read, has no row, or has a range whose min is above its max +/// makes the section unreadable. fn penetrance(c: &Ctx<'_>) -> Result, String> { const NAME: &str = "str_penetrance_ranges.tsv"; let rows = match asset_rows(c.assets, NAME) { @@ -187,15 +188,30 @@ fn penetrance(c: &Ctx<'_>) -> Result, String> { let num = |r: &pycompat::csv::DictRow, k: &str| -> Result { crate::int(&cell(r, k)?).map_err(|e| super::super::sections::py_error("ValueError", &e)) }; + // A table with no row (a header alone, whatever its columns) labels + // nothing, so it is as broken as one with a bad row. + if rows.is_empty() { + return Err(super::super::sections::py_error( + "ValueError", + &format!("{NAME} has no range"), + )); + } rows.iter() .map(|r| { - Ok(Penetrance { + let p = Penetrance { locus: cell(r, "locus")?, min: num(r, "min")?, max: num(r, "max")?, label: cell(r, "label")?, citation: cell(r, "citation")?, - }) + }; + if p.min > p.max { + return Err(super::super::sections::py_error( + "ValueError", + &format!("{NAME}: {} has min {} above max {}", p.locus, p.min, p.max), + )); + } + Ok(p) }) .collect() } diff --git a/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs index c3a230071..b1b24fba2 100644 --- a/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs +++ b/rust/crates/og-summary/tests/i411_str_htt_penetrance.rs @@ -61,25 +61,37 @@ fn rec(locus: &str, so: &str, cn: &str, ci: &str, ad: [&str; 3], st: &str) -> St ) } -/// The expansions section's loci by name, for one ExpansionHunter VCF that -/// Stranger graded. -fn loci(tag: &str, records: &str) -> Vec<(String, Value)> { +const ASSETS: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets"); + +/// The expansions section for one ExpansionHunter VCF that Stranger graded, +/// with the assets folder `assets` (`None`: one written in the scratch +/// folder, holding `table` as the penetrance table when given). +fn section(tag: &str, records: &str, assets: Option<&str>, table: Option<&str>) -> Value { let d = Dir::new(tag); let vcf = format!("{HEAD}{records}"); d.put("S/expansion_hunter/S_eh.vcf", &vcf); d.put("S/expansion_hunter/S_eh_stranger.vcf", &vcf); + d.put("assets/README", "a staged assets folder\n"); + if let Some(t) = table { + d.put("assets/str_penetrance_ranges.tsv", t); + } let input = Input { sample: "S".into(), sample_dir: d.path("S"), declared_sex: None, - assets: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets").into(), + assets: assets.map_or_else(|| d.path("assets"), str::to_owned), group: Group::C, tables: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../bin").into(), }; let v = collect(&input).unwrap().to_json(); - let sec = at(&v, &["sections", "expansions"]); - assert_eq!(at(sec, &["state"]), &Value::Str("ok".into()), "{sec:?}"); - match at(sec, &["data", "loci"]) { + at(&v, &["sections", "expansions"]).clone() +} + +/// The expansions section's loci by name, with the repository's assets. +fn loci(tag: &str, records: &str) -> Vec<(String, Value)> { + let sec = section(tag, records, Some(ASSETS), None); + assert_eq!(at(&sec, &["state"]), &Value::Str("ok".into()), "{sec:?}"); + match at(&sec, &["data", "loci"]) { Value::Array(xs) => xs .iter() .map(|x| (text(at(x, &["locus"])).to_owned(), x.clone())) @@ -166,7 +178,7 @@ fn the_flagged_list_carries_the_penetrance_range() { sample: "S".into(), sample_dir: d.path("S"), declared_sex: None, - assets: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets").into(), + assets: ASSETS.into(), group: Group::C, tables: concat!(env!("CARGO_MANIFEST_DIR"), "/../../../bin").into(), }; @@ -305,3 +317,48 @@ fn spanning_or_flanking_reads_keep_the_allele_as_it_was() { "sized/sized" ); } + +#[test] +fn a_broken_table_is_refused_and_a_missing_one_labels_nothing() { + let htt37 = rec( + "HTT", + SPAN2, + "17/37", + "17-17/37-37", + ["12/9", "0/0", "0/0"], + "normal,full_mutation", + ); + let head = "locus\tmin\tmax\tlabel\tcitation\n"; + let state = |tag: &str, table: Option<&str>| { + let sec = section(tag, &htt37, None, table); + (text(at(&sec, &["state"])).to_owned(), sec) + }; + // A good table in a staged folder: the control for the three below. + let good = format!("# a comment\n{head}HTT\t36\t39\treduced\tGeneReviews\n"); + let (st, sec) = state("good", Some(&good)); + assert_eq!(st, "ok", "{sec:?}"); + let loci = match at(&sec, &["data", "loci"]) { + Value::Array(xs) => xs.clone(), + other => panic!("{other:?}"), + }; + assert_eq!(text(at(&loci[0], &["penetrance"])), "36-39"); + // Inverted bounds, a header alone, and a header without the columns. + for (tag, table) in [ + ( + "inverted", + format!("{head}HTT\t39\t36\treduced\tGeneReviews\n"), + ), + ("header", head.to_owned()), + ("columns", "locus\tmin\n".to_owned()), + ] { + let (st, sec) = state(tag, Some(&table)); + assert_eq!(st, "unreadable", "{tag}: {sec:?}"); + } + // No table in the staged folder: the section reads, with no label. + let (st, sec) = state("missing", None); + assert_eq!(st, "ok", "{sec:?}"); + match at(&sec, &["data", "loci"]) { + Value::Array(xs) => assert!(get(&xs[0], "penetrance").is_none(), "{sec:?}"), + other => panic!("{other:?}"), + } +} From f25ee5571f1fd768c1b769a3b57f9513131b6e79 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:05:28 +0100 Subject: [PATCH 058/110] docs(pgx): scope the GQ 20 floor for reference calls to the gVCF path --- docs/07-pharmacogenomics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/07-pharmacogenomics.md b/docs/07-pharmacogenomics.md index b0a51b779..2d9a87aa7 100644 --- a/docs/07-pharmacogenomics.md +++ b/docs/07-pharmacogenomics.md @@ -98,7 +98,7 @@ docker run --rm \ - **gVCF.** PharmCAT refuses a gVCF, and decides by the file name too (`.g.vcf`, `.genomic.vcf`). Yet a gVCF is the better input: a variants-only VCF leaves about half of PharmCAT's genes Unknown, because PharmCAT cannot tell a reference call from a position that was not covered. So the script reads `vcf/${SAMPLE}.g.vcf.gz` when step 3 wrote one and expands its reference blocks into `${SAMPLE}.pgx_regions.vcf.gz` (step 0 above, deleted afterwards), which PharmCAT accepts; without a gVCF it reads `${SAMPLE}.vcf.gz`, and does not check whether that file is itself a gVCF (PharmCAT then stops on it). The Nextflow pipeline does the same with DeepVariant's gVCF, or with the gVCF a samplesheet row gives in its `gvcf` column (`run-all.sh` fills it from `vcf/${SAMPLE}.g.vcf.gz`); a gVCF given in the `vcf` column stops the run before any analysis when `pharmcat` is selected. For a vendor gVCF, remove the reference blocks and rename the file: [Starting from a Vendor VCF](vcf-first.md). - **Positions longer than one base.** The expansion writes one record per base, each with a one-base REF. 51 PharmCAT 3.4.0 positions have a REF or ALT longer than one base: the insertions and deletions of DPYD, UGT1A1 (\*28, the TA-repeat insertion at chr2:233760233), TPMT, CYP3A4, CYP3A5, CFTR, CYP2C9, NUDT15, RYR1, CYP2D6 and G6PD, and two two-base substitutions in RYR1. PharmCAT's preprocessor does not take a one-base record as a call at such a position: it sets the record aside (FILTER `PCATxINDEL`, or `PCATxREF` for the substitutions) and lists the position in `missing_pgx_var.vcf`. Where PharmCAT's REF is longer than one base (the deletions, UGT1A1 \*28, the substitutions), its matcher then discards the record ("REF in VCF (C) does not match expected reference (CAT)"), so the position has no call and the alleles defined there are uncallable, even where the gVCF shows you match the reference over the whole span. At an insertion with a one-base REF the matcher still reads the set-aside record as a reference call ("PharmCAT cannot validate this position"). So step 0 runs `og pgx refblock-fill` on the expanded file. For each of these positions in PharmCAT's positions file (`/pharmcat/pharmcat_positions.vcf.bgz` in the image), it writes a 0/0 record with PharmCAT's own ID, REF and ALT (INFO flag `PGX_REFBLOCK`) in place of the one-base record, when every base of the REF span lies in reference blocks with GQ 20 or more (GQ is Phred-scaled: 20 means a 1 in 100 chance the reference call is wrong; genotype 0/0, or 0 on a haploid chrX; FILTER `PASS` or `.`) and no other record overlaps the span: no variant call, no `./.` block, no block below GQ 20. Otherwise the expanded file stays as it was there: the position stays missing, and at an insertion the matcher reads the one-base record as before. The step log names the positions it filled (`pgx_refblock_fill: N of 51 PharmCAT positions longer than one base called 0/0 from reference blocks with GQ >= 20: ...`). Where the expanded file has a record at such a position that is not a one-base reference call, that record stays and no 0/0 record is added beside it; the log says so. The Nextflow module does the same. -- **Low-quality reference calls.** The same GQ 20 floor holds for every record that reaches PharmCAT, one-base positions included. A reference call (genotype 0/0, or 0 on a haploid chrX) with GQ below 20, or with no GQ, is left out of the expanded file, so PharmCAT reads the position as missing instead of a confident match with the reference. This covers a reference block with a low GQ and a DeepVariant `RefCall` record (a candidate it called reference) with a low GQ. Before, such a call at a one-base position reached PharmCAT as 0/0: a GQ 5 block at CYP2C19 rs4244285, the \*2 position, read as "not \*2" when the data could not tell. A variant call passes whatever its GQ. The step log counts them and names those at PharmCAT positions (`pgx_refblock_fill: N reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C19 chr10:94781859, ...`). PharmCAT then lists these positions in `missing_pgx_var.vcf` and does not use them to call or rule out an allele. The Nextflow module does the same. +- **Low-quality reference calls.** With a gVCF, the same GQ 20 floor holds for every record of the expanded file, one-base positions included. Without a gVCF there is no expanded file and this filter does not run: a low-GQ reference call in `${SAMPLE}.vcf.gz`, such as a DeepVariant `RefCall` record, goes to PharmCAT unchanged. A reference call (genotype 0/0, or 0 on a haploid chrX) with GQ below 20, or with no GQ, is left out of the expanded file, so PharmCAT reads the position as missing instead of a confident match with the reference. This covers a reference block with a low GQ and a DeepVariant `RefCall` record (a candidate it called reference) with a low GQ. Before, such a call at a one-base position reached PharmCAT as 0/0: a GQ 5 block at CYP2C19 rs4244285, the \*2 position, read as "not \*2" when the data could not tell. A variant call passes whatever its GQ. The step log counts them and names those at PharmCAT positions (`pgx_refblock_fill: N reference calls with GQ below 20 (or none) left out, so PharmCAT reads them as missing; at PharmCAT positions: CYP2C19 chr10:94781859, ...`). PharmCAT then lists these positions in `missing_pgx_var.vcf` and does not use them to call or rule out an allele. The Nextflow module does the same. - **MT-RNR1 from the chrM calls.** PharmCAT 3.4.0 has no MT-RNR1 definition for its matcher: it reads the gene only as an outside call, one allele (chrM is not a pair), so from a VCF alone MT-RNR1 is No Result on every sample. When [step 20](20-mtoolbox.md) wrote its Mutect2 chrM calls (`mito/${SAMPLE}_chrM_filtered.vcf.gz`), the script runs `og pgx mito-merge` (step 3 above). It reads PharmCAT's own MT-RNR1 alleles from the jar (`Reference` and names such as `m.1555A>G`) and adds one MT-RNR1 line to a copy of step 36's outside calls (`${SAMPLE}.pharmcat_outside_calls.tsv`, deleted afterwards): a named single-base allele with FILTER `PASS` and an allele fraction (AF) of 0.05 or more, the pipeline's heteroplasmy floor; the one PharmCAT ranks highest (increased risk, then uncertain, then normal) when there are several, with the others named in the step log; or `Reference` when no named allele is called. A heteroplasmic allele (AF 0.05 to 0.95) is passed like a homoplasmic one: CPIC's MT-RNR1 guideline sets no heteroplasmy level at which aminoglycosides become safe, and asks for the homoplasmic guidance whenever a relevant variant is detected. So a heteroplasmic m.1555A>G or m.1494C>T gives PharmCAT's aminoglycoside recommendation, and the step log says `heteroplasmic` with the AF (the [step 20](20-mtoolbox.md) table and the report's chrM section give the level too). Mutect2 writes variant records only, so a position without reads has no record either: `Reference` needs read evidence, 20 reads or more (`samtools depth`, MAPQ and base quality 20) at every position where PharmCAT names an MT-RNR1 allele, from the sample's BAM (`aligned/${SAMPLE}_sorted.bam`, the one step 20 read). Without the BAM, or with a position below 20 reads, no `Reference` is passed and the log names the positions; a named allele needs no depth, its record is the evidence. Mutect2 writes the genotype 0/1 even at AF 1.0, so the AF decides, not the genotype. No line is added, and the gene stays No Result with the reason in the step log, when a named allele is below the detection floor (AF below 0.05) and no other named allele is called (the log says so, and the gene is not called Reference either; beside a called allele it is only named in the log), filtered, or has no AF (or an AF that reads `nan`); when a `PASS` record at AF 0.05 or more at a position where PharmCAT names an allele (m.960 and m.961 included, named there only as deletions) has an ALT PharmCAT does not name; when a `PASS` insertion or deletion overlaps a named position or lies within 10 bases of m.960 or m.961, where PharmCAT names deletions in a C run that the script does not map; and when the file has no `PASS` chrM record. Without step 20's file the step says so and MT-RNR1 stays No Result: run step 20 before this step. The PHARMCAT module does the same with MITO_VARIANTS' calls. - **PharmCAT's own log file.** The jar's built-in `logback.xml` writes `pharmcat.log` into the working directory. In the image that is `/pharmcat`, which the calling user cannot write, so every run printed a logback status dump with a `pharmcat.log (Permission denied)` stack trace (the calls were not affected). The script runs the jar with `-w /tmp`, a writable directory that goes away with the container. A Nextflow task runs in its own writable work directory, so the module needs nothing: the log lands there. - **A backslash in a `##` header line.** PharmCAT up to 3.4.0 bundles vcf-parser 0.3.1, which stops with "Error parsing metadata: character to be escaped is missing" on one. The line is valid VCF; bcftools writes it for a soft filter with a quoted string (`bcftools filter -s LowDP -e 'FORMAT/DP<10 && GT!="0/0"'`). The script and the Nextflow module rewrite the header of PharmCAT's own copy (`${SAMPLE}.pharmcat_input.vcf`, deleted afterwards by the script): on `##` lines `\"` becomes `'` and any other `\` becomes `/`. PharmCAT's calls are the same with and without the rewrite. A newer PharmCAT is no fix yet: 3.4.0 still bundles vcf-parser 0.3.1 and fails the same way. From ed2939e4b41adc4204bc9fbcd96922e0a8882b2a Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:07:38 +0100 Subject: [PATCH 059/110] fix(chip): count ASXL1 truncating changes only in its last two exons The CHIP studies count ASXL1 frameshift, nonsense and splice changes in its last exons (11 and 12 in their numbering, 12 and 13 of the MANE Select transcript ENST00000375687, Ensembl 116). The table counted a truncating change in any exon. An earlier one is now other_change. Bead: trait-61 --- assets/chip_genes.tsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/chip_genes.tsv b/assets/chip_genes.tsv index 04e7fa31a..acc504dc9 100644 --- a/assets/chip_genes.tsv +++ b/assets/chip_genes.tsv @@ -12,7 +12,7 @@ gene truncating missense note pmids DNMT3A all R882 The most common CHIP gene. R882 is the hotspot of DNMT3A in acute myeloid leukaemia; other missense changes are listed, not counted. 25426837;21067377 TET2 all none Second most common CHIP gene. Truncating changes only; missense changes are listed, not counted. 25426837;19474426 -ASXL1 all none Third most common CHIP gene. Truncating changes only. 25426837;19388938 +ASXL1 exons:12-13 none Third most common CHIP gene. Truncating changes in the last two exons (12 and 13 here, 11 and 12 in the older transcript numbering), where the CHIP studies count them; earlier ones are listed, not counted. 25426837;19388938 JAK2 none V617F V617F only, the change behind most myeloproliferative neoplasms. 25426837;15858187 TP53 all 102-292 Missense changes count in the DNA-binding core domain, residues 102 to 292. 25426837;8023157 PPM1D exons:6-6 none Truncating changes in the last exon (6), where the mosaic and clonal ones cluster. 23242139;29954749 From 60699ea3ccb71dc997df3f1810591168f3c1c593 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:07:46 +0100 Subject: [PATCH 060/110] fix(chip): apply the 2% VAF floor and call a chip row a possible finding og chip report now: - gives a passing call with a VAF under 2%, the VAF that defines CHIP, the new status low_vaf, not counted; - starts the note of a chip row with "possible clonal haematopoiesis (not a diagnosis)", and the first stdout line says the same; - adds a germline-fit sentence to a chip call whose reads fit an inherited heterozygous variant (binomial at 50%, one-sided P of 0.01 or more: 9 or 10 of 30 reads fit), keeps it chip and counted, and counts these calls apart on the first stdout line; - says in a likely_germline note that the 35% cut cannot tell an inherited variant from a large clone. The chip parity cases get goldens for the calls table and stdout: og now differs from the Python oracle there on purpose. Bead: trait-57 Bead: trait-58 Bead: trait-60 Bead: trait-71 Bead: D10 --- rust/crates/og-chip/src/report.rs | 87 ++++- .../og-chip/tests/i411_chip_classify.rs | 323 ++++++++++++++++++ .../golden/chip/report-calls/S_chip.tsv | 26 ++ tests/parity/golden/chip/report-calls/stdout | 2 +- tests/parity/golden/chip/report-empty/stdout | 2 + .../golden/chip/report-overlap/S_chip.tsv | 26 ++ .../parity/golden/chip/report-overlap/stdout | 2 +- .../golden/chip/report-table/S_chip.tsv | 26 ++ tests/parity/golden/chip/report-table/stdout | 2 +- 9 files changed, 485 insertions(+), 11 deletions(-) create mode 100644 rust/crates/og-chip/tests/i411_chip_classify.rs create mode 100644 tests/parity/golden/chip/report-calls/S_chip.tsv create mode 100644 tests/parity/golden/chip/report-empty/stdout create mode 100644 tests/parity/golden/chip/report-overlap/S_chip.tsv create mode 100644 tests/parity/golden/chip/report-table/S_chip.tsv diff --git a/rust/crates/og-chip/src/report.rs b/rust/crates/og-chip/src/report.rs index 7027aa31d..b6a7f58bf 100644 --- a/rust/crates/og-chip/src/report.rs +++ b/rust/crates/og-chip/src/report.rs @@ -10,10 +10,14 @@ //! //! Statuses, in the order they are tested: //! - `likely_germline`: VAF [`GERMLINE_VAF`] or more (an inherited variant -//! sits near 50% or 100%, and a tumour-only call cannot tell); +//! sits near 50% or 100%, and a tumour-only call cannot tell it from a +//! large clone); //! - `filtered`: FilterMutectCalls did not pass it; //! - `low_support`: fewer than [`MIN_ALT_READS`] reads with the change; -//! - `chip`: in the table's classes; +//! - `low_vaf`: VAF under [`CHIP_MIN_VAF`], the 2% that defines CHIP; +//! - `chip`: in the table's classes. The note says it is a possible finding, +//! not a diagnosis, and adds a germline-fit sentence when its reads fit an +//! inherited heterozygous variant ([`fits_inherited`]); //! - `other_change`: a protein change outside them. //! //! A base counts once per gene, even when the depth file lists it twice. @@ -39,8 +43,10 @@ //! [`CALLABLE_DEPTH`] reads or more, and the share where a clone at the //! stated limit shows its reads. //! -//! The calls table is the Python's, byte for byte; the depth table and the -//! summary line differ on purpose since the per-base limit (issue #411). +//! The calls table differs from the Python's on purpose since issue #411: +//! the 2% floor, the notes of `chip` and `likely_germline` rows, and the +//! ASXL1 row of the table. The depth table and the summary line differ on +//! purpose since the per-base limit. use crate::binom::{detection_limit_over, finite_mean, readable_at}; use crate::prepare::{attr, columns}; @@ -55,8 +61,42 @@ use std::collections::{BTreeSet, HashMap}; /// At or above this VAF a call is read as a possible inherited variant. pub const GERMLINE_VAF: f64 = 0.35; -/// CHIP is defined from a VAF of 2% (Steensma et al. 2015, PMID 25931582). +/// CHIP is defined from a VAF of 2% (Steensma et al. 2015, PMID 25931582): +/// a call under it is `low_vaf`, not counted. pub const CHIP_MIN_VAF: f64 = 0.02; +/// A `chip` call whose alt reads are this likely or more under an inherited +/// heterozygous variant (one-sided, `P(X <= alt)` with `X ~ Binomial(depth, +/// 0.5)`) gets the germline-fit note: 9 or 10 of 30 reads fit, 6 of 46 do +/// not. +pub const GERMLINE_FIT_P: f64 = 0.01; +/// What a `chip` row's note starts with: the step finds a possible clone, +/// it does not diagnose CHIP. +pub const CHIP_LABEL: &str = "possible clonal haematopoiesis (not a diagnosis)"; + +/// `P(X <= alt)` for `X ~ Binomial(depth, 0.5)`, summed in log space so a +/// deep base neither overflows nor underflows. 1 when `alt >= depth`. +pub fn het_lower_tail(alt: u64, depth: u64) -> f64 { + if alt >= depth { + return 1.0; + } + let n = depth as f64; + // ln P(X = i), from ln P(X = 0) = n ln(1/2) by the ratio (n - i) / (i + 1). + let mut l = n * 0.5f64.ln(); + let mut logs = Vec::with_capacity(alt as usize + 1); + for i in 0..=alt { + logs.push(l); + l += ((n - i as f64) / (i as f64 + 1.0)).ln(); + } + let top = logs.iter().copied().fold(f64::NEG_INFINITY, f64::max); + let sum: f64 = logs.iter().map(|x| (x - top).exp()).sum(); + (top + sum.ln()).exp().min(1.0) +} + +/// Whether `alt` of `depth` reads fit an inherited heterozygous variant: +/// [`het_lower_tail`] at [`GERMLINE_FIT_P`] or more. +pub fn fits_inherited(alt: u64, depth: u64) -> bool { + depth > 0 && het_lower_tail(alt, depth) >= GERMLINE_FIT_P +} /// The calls table's columns. pub const OUT_COLUMNS: [&str; 15] = [ @@ -427,7 +467,7 @@ pub fn classify( ( "likely_germline", format!( - "VAF {}: near an inherited 50% or 100%, not counted", + "VAF {}: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted", fixed(v, 2) ), ) @@ -438,8 +478,27 @@ pub fn classify( "low_support", format!("{alt_reads} reads with the change, under {MIN_ALT_READS}"), ) + } else if let Some(v) = vaf.filter(|v| *v < CHIP_MIN_VAF) { + ( + "low_vaf", + format!( + "VAF {}: under the 2% VAF that defines CHIP, not counted", + fixed(v, 3) + ), + ) } else if !cls.is_empty() { - ("chip", why) + let mut note = format!("{CHIP_LABEL}: {why}"); + // The reads the table shows: alt_reads of the depth column. + if let Some(d) = depth.filter(|d| d.is_finite() && *d >= 1.0) + && alt_reads >= 0 + && fits_inherited(alt_reads as u64, d as u64) + { + note.push_str(&format!( + "; {alt_reads} of {} reads also fit an inherited heterozygous variant", + d as u64 + )); + } + ("chip", note) } else { ("other_change", why) }; @@ -834,10 +893,22 @@ pub fn report(files: &Files, sample: &str) -> Result { write_atomic(&files.out, tsv(&OUT_COLUMNS, &rows).as_bytes())?; write_atomic(&files.depth_out, tsv(&DEPTH_COLUMNS, &depth).as_bytes())?; let n = rows.iter().filter(|r| r[12] == "chip").count(); + let fit = rows + .iter() + .filter(|r| r[12] == "chip" && r[14].contains("also fit an inherited")) + .count(); let other = rows.len() - n; let s = |k: usize| if k == 1 { "" } else { "s" }; + let fit = if fit == 0 { + String::new() + } else { + format!( + "{fit} of them also fit{} an inherited variant; ", + if fit == 1 { "s" } else { "" } + ) + }; Ok(format!( - "{sample}: {n} CHIP call{} in {} genes ({other} other protein change{} listed, not counted)\n{summary}\n", + "{sample}: {n} CHIP call{} in {} genes (possible clonal haematopoiesis, not a diagnosis; {fit}{other} other protein change{} listed, not counted)\n{summary}\n", s(n), table.len(), s(other) diff --git a/rust/crates/og-chip/tests/i411_chip_classify.rs b/rust/crates/og-chip/tests/i411_chip_classify.rs new file mode 100644 index 000000000..b4c1dc92c --- /dev/null +++ b/rust/crates/og-chip/tests/i411_chip_classify.rs @@ -0,0 +1,323 @@ +//! Issue #411, the CHIP classes and statuses of `og chip report`. +//! +//! Before the fix: +//! - a call under the 2% VAF that defines CHIP still read `chip`, though +//! the step and its doc said CHIP starts at 2%; +//! - a passing call whose reads fit an inherited heterozygous variant as +//! well as a clone (10 of 30 reads, under the 35% cut) read `chip` with +//! nothing to say so, and the summary line counted it like any other; +//! - a `chip` row and the summary line named the result CHIP, a clinical +//! category that needs a blood count and a doctor, with no word that it +//! is a possible finding only; +//! - ASXL1 counted a truncating change in any exon, where the CHIP studies +//! count the ones in its last two exons (12 and 13 of the MANE Select +//! transcript). + +use std::collections::HashMap; +use std::fs; +use std::path::PathBuf; +use std::sync::atomic::{AtomicUsize, Ordering}; + +static N: AtomicUsize = AtomicUsize::new(0); + +const TABLE: &str = concat!( + env!("CARGO_MANIFEST_DIR"), + "/../../../assets/chip_genes.tsv" +); +const DNMT3A: &str = "ENST00000321117"; +const ASXL1: &str = "ENST00000375687"; +/// ASXL1's MANE Select exons in Ensembl 116 (chr20, + strand). +const ASXL1_EXONS: [(u64, u64); 13] = [ + (32_358_331, 32_358_832), + (32_366_384, 32_366_466), + (32_367_727, 32_367_729), + (32_369_015, 32_369_123), + (32_428_128, 32_428_248), + (32_428_325, 32_428_422), + (32_429_338, 32_429_431), + (32_429_901, 32_430_053), + (32_431_321, 32_431_484), + (32_431_583, 32_431_679), + (32_432_880, 32_432_985), + (32_433_284, 32_433_917), + (32_434_432, 32_439_319), +]; + +fn gff() -> String { + let mut s = "##gff-version 3\n".to_owned(); + s += "chr2\tensembl\tgene\t25234000\t25240300\t.\t-\t.\tID=gene:DNMT3A;Name=DNMT3A\n"; + s += &format!( + "chr2\tensembl\tmRNA\t25234000\t25240300\t.\t-\t.\tID=transcript:{DNMT3A};Parent=gene:DNMT3A;transcript_id={DNMT3A}\n" + ); + s += &format!( + "chr2\tensembl\texon\t25234000\t25234500\t.\t-\t.\tParent=transcript:{DNMT3A};rank=23\n###\n" + ); + s += "chr20\tensembl\tgene\t32358331\t32439319\t.\t+\t.\tID=gene:ASXL1;Name=ASXL1\n"; + s += &format!( + "chr20\tensembl\tmRNA\t32358331\t32439319\t.\t+\t.\tID=transcript:{ASXL1};Parent=gene:ASXL1;transcript_id={ASXL1}\n" + ); + for (i, (a, b)) in ASXL1_EXONS.iter().enumerate() { + s += &format!( + "chr20\tensembl\texon\t{a}\t{b}\t.\t+\t.\tParent=transcript:{ASXL1};rank={}\n", + i + 1 + ); + } + s + "###\n" +} + +/// One bcftools query line: a call with its reads. +fn line( + chrom: &str, + pos: u64, + csq: &str, + gene: &str, + tx: &str, + aa: &str, + (ad, af, dp): (&str, &str, &str), +) -> String { + format!( + "{chrom}\t{pos}\tC\tT\tPASS\t{csq}|{gene}|{tx}|protein_coding|+|{aa}|{pos}C>T\t{ad}\t{af}\t{dp}\n" + ) +} + +/// DNMT3A R882H with these reads. +fn r882(ad: &str, af: &str, dp: &str) -> String { + line( + "chr2", + 25_234_373, + "missense", + "DNMT3A", + DNMT3A, + "882R>882H", + (ad, af, dp), + ) +} + +/// `og chip report` on the calls: its stdout and its rows by column. +fn report(calls: &str) -> (String, Vec>) { + let n = N.fetch_add(1, Ordering::Relaxed); + let dir: PathBuf = + std::env::temp_dir().join(format!("og-chip-classify-{}-{n}", std::process::id())); + let _ = fs::remove_dir_all(&dir); + fs::create_dir_all(&dir).unwrap(); + let put = |f: &str, body: &str| { + let p = dir.join(f); + fs::write(&p, body).unwrap(); + p.to_str().unwrap().to_owned() + }; + let gff = put("chip.gff3", &gff()); + let bed = put( + "chip.bed", + "chr2\t25233990\t25234510\tDNMT3A\nchr20\t32434421\t32439319\tASXL1\n", + ); + let calls = put("calls.tsv", calls); + let depth = put("depth.tsv", ""); + let out = dir.join("S_chip.tsv").to_str().unwrap().to_owned(); + let dout = dir.join("S_chip_depth.tsv").to_str().unwrap().to_owned(); + let args: Vec = [ + "--genes", + TABLE, + "--gff", + &gff, + "--bed", + &bed, + "--calls", + &calls, + "--depth", + &depth, + "--sample", + "S", + "--out", + &out, + "--depth-out", + &dout, + ] + .iter() + .map(|s| (*s).to_owned()) + .collect(); + let (mut so, mut se) = (Vec::new(), Vec::new()); + let code = og_chip::cli("report", &args, &mut so, &mut se); + assert_eq!(code, 0, "{}", String::from_utf8_lossy(&se)); + let text = fs::read_to_string(&out).unwrap(); + let mut lines = text.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + let rows = lines + .map(|l| { + head.iter() + .zip(l.split('\t')) + .map(|(k, v)| ((*k).to_owned(), v.to_owned())) + .collect() + }) + .collect(); + let _ = fs::remove_dir_all(&dir); + (String::from_utf8(so).unwrap(), rows) +} + +fn one(calls: &str) -> HashMap { + let (_, mut rows) = report(calls); + assert_eq!(rows.len(), 1, "{rows:?}"); + rows.remove(0) +} + +#[test] +fn red_first_a_call_under_2_percent_is_not_counted() { + // 1% of 600 reads: 6 reads, enough support, but under the 2% of CHIP. + let r = one(&r882("594,6", "0.010", "600")); + assert_eq!(r["status"], "low_vaf", "{r:?}"); + assert_eq!(r["class"], "missense", "the class still says what it is"); + assert!(r["note"].contains("under the 2% VAF"), "{r:?}"); + // Just under and at the floor. + assert_eq!(one(&r882("589,11", "0.019", "600"))["status"], "low_vaf"); + assert_eq!(one(&r882("588,12", "0.020", "600"))["status"], "chip"); + // The VAF from AD when AF is missing: 10 of 1000 reads is 1%. + assert_eq!(one(&r882("990,10", ".", "1000"))["status"], "low_vaf"); + let (out, _) = report(&r882("594,6", "0.010", "600")); + assert!(out.starts_with("S: 0 CHIP calls "), "{out}"); +} + +#[test] +fn red_first_a_call_that_fits_an_inherited_variant_keeps_chip_with_a_note() { + // 10 of 30 reads: P(X <= 10) is 0.049 for a heterozygous variant. + let r = one(&r882("20,10", "0.333", "30")); + assert_eq!(r["status"], "chip", "no new status: {r:?}"); + assert!( + r["note"].contains("10 of 30 reads also fit an inherited heterozygous variant"), + "{r:?}" + ); + // 9 of 30 reads: 0.021, still a fit. + let r = one(&r882("21,9", "0.300", "30")); + assert_eq!(r["status"], "chip"); + assert!(r["note"].contains("9 of 30 reads also fit"), "{r:?}"); + // 6 of 46 reads: 0.0000009, a clone; and 8 of 40: 0.00011. + for (ad, af, dp) in [("40,6", "0.130", "46"), ("32,8", "0.200", "40")] { + let r = one(&r882(ad, af, dp)); + assert_eq!(r["status"], "chip"); + assert!(!r["note"].contains("inherited"), "{r:?}"); + } + // The summary line counts the calls that fit apart. + let calls = r882("20,10", "0.333", "30") + + &line( + "chr2", + 25_234_374, + "missense", + "DNMT3A", + DNMT3A, + "882R>882C", + ("40,6", "0.130", "46"), + ); + let (out, rows) = report(&calls); + assert_eq!(rows.len(), 2); + assert!( + out.starts_with("S: 2 CHIP calls in 13 genes (possible clonal haematopoiesis, not a diagnosis; 1 of them also fits an inherited variant; 0 other protein changes listed, not counted)\n"), + "{out}" + ); + let (out, _) = report(&r882("40,6", "0.130", "46")); + assert!( + !out.contains("fits an inherited"), + "only when one fits: {out}" + ); +} + +#[test] +fn red_first_a_chip_row_says_it_is_a_possible_finding_not_a_diagnosis() { + let r = one(&r882("40,6", "0.130", "46")); + assert_eq!(r["status"], "chip"); + assert_eq!( + r["note"], + "possible clonal haematopoiesis (not a diagnosis): hotspot R882" + ); + let (out, _) = report(&r882("40,6", "0.130", "46")); + assert!( + out.starts_with( + "S: 1 CHIP call in 13 genes (possible clonal haematopoiesis, not a diagnosis; " + ), + "{out}" + ); +} + +#[test] +fn a_call_at_35_percent_or_more_says_why_it_is_left_out() { + let r = one(&r882("20,19", "0.48", "39")); + assert_eq!(r["status"], "likely_germline"); + assert!( + r["note"].starts_with("VAF 0.48: at or above the 35% cut") + && r["note"].contains("not counted"), + "{r:?}" + ); +} + +#[test] +fn red_first_asxl1_counts_truncating_changes_in_its_last_two_exons() { + let table = fs::read_to_string(TABLE).unwrap(); + let row: Vec<&str> = table + .lines() + .find(|l| l.starts_with("ASXL1\t")) + .unwrap() + .split('\t') + .collect(); + assert_eq!(&row[1..3], ["exons:12-13", "none"], "{row:?}"); + let asxl1 = |pos: u64, csq: &str, aa: &str| { + one(&line( + "chr20", + pos, + csq, + "ASXL1", + ASXL1, + aa, + ("40,6", "0.130", "46"), + )) + }; + // G646fs (c.1934dupG), the ASXL1 hotspot, in exon 13. + let r = asxl1(32_434_638, "frameshift", "645G>645GX"); + assert_eq!( + (r["status"].as_str(), r["exon"].as_str()), + ("chip", "13"), + "{r:?}" + ); + let r = asxl1(32_433_500, "stop_gained", "500R>500*"); + assert_eq!( + (r["status"].as_str(), r["exon"].as_str()), + ("chip", "12"), + "{r:?}" + ); + // A stop in exon 5 is listed, not counted. + let r = asxl1(32_428_200, "stop_gained", "120R>120*"); + assert_eq!( + (r["status"].as_str(), r["exon"].as_str()), + ("other_change", "5"), + "{r:?}" + ); + assert!(r["note"].contains("the table counts exons 12-13"), "{r:?}"); +} + +#[test] +fn the_germline_fit_is_a_binomial_tail_at_half() { + use og_chip::report::{fits_inherited, het_lower_tail}; + let near = |a: f64, b: f64| (a - b).abs() < 1e-4; + assert!( + near(het_lower_tail(10, 30), 0.04937), + "{}", + het_lower_tail(10, 30) + ); + assert!( + near(het_lower_tail(9, 30), 0.02139), + "{}", + het_lower_tail(9, 30) + ); + assert!( + near(het_lower_tail(15, 30), 0.57223), + "{}", + het_lower_tail(15, 30) + ); + assert_eq!(het_lower_tail(30, 30), 1.0); + // Deep runs stay finite: 2^-5000 underflows a plain product. + let deep = het_lower_tail(2400, 5000); + assert!(deep.is_finite() && deep > 0.0 && deep < 0.01, "{deep}"); + assert!( + near(het_lower_tail(2500, 5000), 0.50564), + "{}", + het_lower_tail(2500, 5000) + ); + assert!(fits_inherited(10, 30) && fits_inherited(5, 20)); + assert!(!fits_inherited(6, 46) && !fits_inherited(12, 60) && !fits_inherited(0, 0)); +} diff --git a/tests/parity/golden/chip/report-calls/S_chip.tsv b/tests/parity/golden/chip/report-calls/S_chip.tsv new file mode 100644 index 000000000..4b29db100 --- /dev/null +++ b/tests/parity/golden/chip/report-calls/S_chip.tsv @@ -0,0 +1,26 @@ +gene chrom pos ref alt consequence protein_change exon vaf alt_reads depth filter status class note +DNMT3A chr2 1150 C T missense R882H 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1151 C T missense M880L 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +DNMT3A chr2 1302 C T splice_acceptor 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): splice_acceptor +DNMT3A chr2 1152 C T missense R882H 2 0.480 19 39 PASS likely_germline missense VAF 0.48: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1153 C T missense R882H 2 0.970 35 36 PASS likely_germline missense VAF 0.97: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1154 C T missense R882H 2 0.340 13 38 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882; 13 of 38 reads also fit an inherited heterozygous variant +DNMT3A chr2 1155 C T missense R882H 2 0.130 6 46 weak_evidence;strand_bias filtered missense FilterMutectCalls: weak_evidence;strand_bias +DNMT3A chr2 1156 C T missense R882H 2 0.060 2 32 PASS low_support missense 2 reads with the change, under 3 +DNMT3A chr2 1157 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1158 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1159 C T missense R882H 2 0 PASS low_support missense 0 reads with the change, under 3 +DNMT3A chr2 1163 C T missense&splice_region R882 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1164 C T inframe_deletion R882 2 0.130 6 46 PASS other_change a protein change outside the table's classes +TET2 chr4 15500 C T frameshift Q1200fs 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift +TET2 chr4 10600 C T stop_gained&splice_donor R100* 1 0.130 6 46 . chip truncating possible clonal haematopoiesis (not a diagnosis): splice_donor +TET2 chr4 15501 C T missense E1201K 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 500 C T missense V617F 1 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): V617F +JAK2 chr9 501 C T missense V617L 1 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 502 C T stop_gained R618* 1 0.130 6 46 PASS other_change truncating changes of this gene are not counted +PPM1D chr17 60663500 C T stop_gained R500* 6 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): stop_gained in exon 6 +PPM1D chr17 60600100 C T stop_gained R100* 5 0.130 6 46 PASS other_change truncating, but in exon 5 of 2 (the table counts exons 6-6) +TP53 chr17 7673800 C T missense R248Q 7 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): missense in codons 102-292 +TP53 chr17 7673801 C T missense E340K 7 0.130 6 46 PASS other_change a missense change outside the table's hotspots +TP53 chr17 7673802 C T start_lost M1 7 0.130 6 46 PASS other_change a protein change outside the table's classes +DNMT3A chr2 1166 C CA,CAA frameshift R882fs 2 0.300 5 17 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift; 5 of 17 reads also fit an inherited heterozygous variant diff --git a/tests/parity/golden/chip/report-calls/stdout b/tests/parity/golden/chip/report-calls/stdout index 7f02ad8a1..93c986643 100644 --- a/tests/parity/golden/chip/report-calls/stdout +++ b/tests/parity/golden/chip/report-calls/stdout @@ -1,2 +1,2 @@ -S: 12 CHIP calls in 6 genes (13 other protein changes listed, not counted) +S: 12 CHIP calls in 6 genes (possible clonal haematopoiesis, not a diagnosis; 2 of them also fit an inherited variant; 13 other protein changes listed, not counted) Read-support limit (median 30x over the CHIP genes' coding exons): in the median CHIP gene, a clone with a VAF of about 14% or more shows at least 3 reads with the change 8 times in 10, counted base by base. Mutect2 and its filters call fewer than that. Too few reads for any limit in 4 genes; the share of each one's coding bases read deep enough for that VAF: JAK2 0%, TET2 67%, PPM1D 0%, TP53 0%. CHIP starts at a VAF of 2%, so smaller clones are likely missed: no call here does not rule one out. Not a diagnosis. diff --git a/tests/parity/golden/chip/report-empty/stdout b/tests/parity/golden/chip/report-empty/stdout new file mode 100644 index 000000000..e4309d5d1 --- /dev/null +++ b/tests/parity/golden/chip/report-empty/stdout @@ -0,0 +1,2 @@ +S: 0 CHIP calls in 6 genes (possible clonal haematopoiesis, not a diagnosis; 0 other protein changes listed, not counted) +No CHIP gene has the depth to find a clone (at least 3 reads with the change): no result either way. diff --git a/tests/parity/golden/chip/report-overlap/S_chip.tsv b/tests/parity/golden/chip/report-overlap/S_chip.tsv new file mode 100644 index 000000000..4b29db100 --- /dev/null +++ b/tests/parity/golden/chip/report-overlap/S_chip.tsv @@ -0,0 +1,26 @@ +gene chrom pos ref alt consequence protein_change exon vaf alt_reads depth filter status class note +DNMT3A chr2 1150 C T missense R882H 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1151 C T missense M880L 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +DNMT3A chr2 1302 C T splice_acceptor 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): splice_acceptor +DNMT3A chr2 1152 C T missense R882H 2 0.480 19 39 PASS likely_germline missense VAF 0.48: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1153 C T missense R882H 2 0.970 35 36 PASS likely_germline missense VAF 0.97: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1154 C T missense R882H 2 0.340 13 38 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882; 13 of 38 reads also fit an inherited heterozygous variant +DNMT3A chr2 1155 C T missense R882H 2 0.130 6 46 weak_evidence;strand_bias filtered missense FilterMutectCalls: weak_evidence;strand_bias +DNMT3A chr2 1156 C T missense R882H 2 0.060 2 32 PASS low_support missense 2 reads with the change, under 3 +DNMT3A chr2 1157 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1158 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1159 C T missense R882H 2 0 PASS low_support missense 0 reads with the change, under 3 +DNMT3A chr2 1163 C T missense&splice_region R882 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1164 C T inframe_deletion R882 2 0.130 6 46 PASS other_change a protein change outside the table's classes +TET2 chr4 15500 C T frameshift Q1200fs 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift +TET2 chr4 10600 C T stop_gained&splice_donor R100* 1 0.130 6 46 . chip truncating possible clonal haematopoiesis (not a diagnosis): splice_donor +TET2 chr4 15501 C T missense E1201K 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 500 C T missense V617F 1 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): V617F +JAK2 chr9 501 C T missense V617L 1 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 502 C T stop_gained R618* 1 0.130 6 46 PASS other_change truncating changes of this gene are not counted +PPM1D chr17 60663500 C T stop_gained R500* 6 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): stop_gained in exon 6 +PPM1D chr17 60600100 C T stop_gained R100* 5 0.130 6 46 PASS other_change truncating, but in exon 5 of 2 (the table counts exons 6-6) +TP53 chr17 7673800 C T missense R248Q 7 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): missense in codons 102-292 +TP53 chr17 7673801 C T missense E340K 7 0.130 6 46 PASS other_change a missense change outside the table's hotspots +TP53 chr17 7673802 C T start_lost M1 7 0.130 6 46 PASS other_change a protein change outside the table's classes +DNMT3A chr2 1166 C CA,CAA frameshift R882fs 2 0.300 5 17 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift; 5 of 17 reads also fit an inherited heterozygous variant diff --git a/tests/parity/golden/chip/report-overlap/stdout b/tests/parity/golden/chip/report-overlap/stdout index 6acc33a71..ab41203a3 100644 --- a/tests/parity/golden/chip/report-overlap/stdout +++ b/tests/parity/golden/chip/report-overlap/stdout @@ -1,2 +1,2 @@ -S: 12 CHIP calls in 6 genes (13 other protein changes listed, not counted) +S: 12 CHIP calls in 6 genes (possible clonal haematopoiesis, not a diagnosis; 2 of them also fit an inherited variant; 13 other protein changes listed, not counted) Read-support limit (median 22x over the CHIP genes' coding exons): in the median CHIP gene, a clone with a VAF of about 14% or more shows at least 3 reads with the change 8 times in 10, counted base by base. Mutect2 and its filters call fewer than that. Too few reads for any limit in 2 genes; the share of each one's coding bases read deep enough for that VAF: JAK2 0%, TET2 0%. CHIP starts at a VAF of 2%, so smaller clones are likely missed: no call here does not rule one out. Not a diagnosis. diff --git a/tests/parity/golden/chip/report-table/S_chip.tsv b/tests/parity/golden/chip/report-table/S_chip.tsv new file mode 100644 index 000000000..4b29db100 --- /dev/null +++ b/tests/parity/golden/chip/report-table/S_chip.tsv @@ -0,0 +1,26 @@ +gene chrom pos ref alt consequence protein_change exon vaf alt_reads depth filter status class note +DNMT3A chr2 1150 C T missense R882H 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1151 C T missense M880L 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +DNMT3A chr2 1302 C T splice_acceptor 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): splice_acceptor +DNMT3A chr2 1152 C T missense R882H 2 0.480 19 39 PASS likely_germline missense VAF 0.48: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1153 C T missense R882H 2 0.970 35 36 PASS likely_germline missense VAF 0.97: at or above the 35% cut, where an inherited variant (near 50% or 100%) and a large clone look the same without a matched normal sample; not counted +DNMT3A chr2 1154 C T missense R882H 2 0.340 13 38 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882; 13 of 38 reads also fit an inherited heterozygous variant +DNMT3A chr2 1155 C T missense R882H 2 0.130 6 46 weak_evidence;strand_bias filtered missense FilterMutectCalls: weak_evidence;strand_bias +DNMT3A chr2 1156 C T missense R882H 2 0.060 2 32 PASS low_support missense 2 reads with the change, under 3 +DNMT3A chr2 1157 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1158 C T missense R882H 2 0.250 10 40 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1159 C T missense R882H 2 0 PASS low_support missense 0 reads with the change, under 3 +DNMT3A chr2 1163 C T missense&splice_region R882 2 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): hotspot R882 +DNMT3A chr2 1164 C T inframe_deletion R882 2 0.130 6 46 PASS other_change a protein change outside the table's classes +TET2 chr4 15500 C T frameshift Q1200fs 2 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift +TET2 chr4 10600 C T stop_gained&splice_donor R100* 1 0.130 6 46 . chip truncating possible clonal haematopoiesis (not a diagnosis): splice_donor +TET2 chr4 15501 C T missense E1201K 2 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 500 C T missense V617F 1 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): V617F +JAK2 chr9 501 C T missense V617L 1 0.130 6 46 PASS other_change a missense change outside the table's hotspots +JAK2 chr9 502 C T stop_gained R618* 1 0.130 6 46 PASS other_change truncating changes of this gene are not counted +PPM1D chr17 60663500 C T stop_gained R500* 6 0.130 6 46 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): stop_gained in exon 6 +PPM1D chr17 60600100 C T stop_gained R100* 5 0.130 6 46 PASS other_change truncating, but in exon 5 of 2 (the table counts exons 6-6) +TP53 chr17 7673800 C T missense R248Q 7 0.130 6 46 PASS chip missense possible clonal haematopoiesis (not a diagnosis): missense in codons 102-292 +TP53 chr17 7673801 C T missense E340K 7 0.130 6 46 PASS other_change a missense change outside the table's hotspots +TP53 chr17 7673802 C T start_lost M1 7 0.130 6 46 PASS other_change a protein change outside the table's classes +DNMT3A chr2 1166 C CA,CAA frameshift R882fs 2 0.300 5 17 PASS chip truncating possible clonal haematopoiesis (not a diagnosis): frameshift; 5 of 17 reads also fit an inherited heterozygous variant diff --git a/tests/parity/golden/chip/report-table/stdout b/tests/parity/golden/chip/report-table/stdout index c403b5e4b..c34a11487 100644 --- a/tests/parity/golden/chip/report-table/stdout +++ b/tests/parity/golden/chip/report-table/stdout @@ -1,2 +1,2 @@ -S: 12 CHIP calls in 13 genes (13 other protein changes listed, not counted) +S: 12 CHIP calls in 13 genes (possible clonal haematopoiesis, not a diagnosis; 2 of them also fit an inherited variant; 13 other protein changes listed, not counted) Read-support limit (median 30x over the CHIP genes' coding exons): in the median CHIP gene, a clone with a VAF of about 14% or more shows at least 3 reads with the change 8 times in 10, counted base by base. Mutect2 and its filters call fewer than that. Too few reads for any limit in 4 genes; the share of each one's coding bases read deep enough for that VAF: TET2 67%, JAK2 0%, TP53 0%, PPM1D 0%. CHIP starts at a VAF of 2%, so smaller clones are likely missed: no call here does not rule one out. Not a diagnosis. From 95d6abeac9aa6a6e51220f1baffc809ac99c50e8 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:07:52 +0100 Subject: [PATCH 061/110] docs(chip): document the 2% floor, the germline-fit note and the ASXL1 row docs/49-chip.md gets the low_vaf status, the note of a chip row, the germline-fit rule with its read counts at 20x, 30x and 40x, and the ASXL1 row. Step 49's log says possible CHIP calls, not a diagnosis. The chip-clonal-1 e2e case checks the note of the planted R882H row and the step's count line. Bead: trait-57 Bead: trait-58 Bead: trait-60 Bead: trait-61 Bead: trait-71 Bead: D10 --- CHANGELOG.md | 6 ++++++ docs/49-chip.md | 18 ++++++++++++------ scripts/49-chip.sh | 8 +++++--- tests/e2e/chip-clonal-1.sh | 13 +++++++++++-- 4 files changed, 34 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..7e3b294dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 49 (CHIP) now applies the 2% VAF that defines CHIP, says that a call is a possible finding and not a diagnosis, notes the calls whose reads also fit an inherited variant, and counts ASXL1 truncating changes only in its last two exons. Before, a passing call under 2% read `chip` although the step and its doc said CHIP starts at 2%. A call such as 10 of 30 reads, under the 35% cut, read `chip` with nothing to say that an inherited heterozygous variant fits those reads as well. ASXL1 counted a truncating change in any exon, where the CHIP studies count the ones in its last exons. What changes in `chip/_chip.tsv` (no column is added, renamed or removed): + - A new `status` value, `low_vaf`: a call that passed the filters with 3 reads or more and a VAF under 2%. It is not counted. + - The `note` of a `chip` row starts with `possible clonal haematopoiesis (not a diagnosis): `, then the class rule as before. When the call's reads fit an inherited heterozygous variant (a binomial count at 50%: 1 in 100 or more such variants show as few reads with the change), the note ends with `; 10 of 30 reads also fit an inherited heterozygous variant`. The call stays `chip` and counted: a real clone of 25% to 35% looks the same. + - The `note` of a `likely_germline` row says that the 35% cut cannot tell an inherited variant from a large clone without a matched normal sample. + - `assets/chip_genes.tsv` counts ASXL1 truncating changes in exons 12 and 13 of its MANE Select transcript (11 and 12 in the older numbering of the CHIP studies). One in an earlier exon is `other_change`. + - The step's first log line says `possible clonal haematopoiesis, not a diagnosis` and counts the calls that also fit an inherited variant apart. The report cards read the same table, so their call lines carry the new notes; their titles do not change here. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/49-chip.md b/docs/49-chip.md index fb86153f2..24b198f07 100644 --- a/docs/49-chip.md +++ b/docs/49-chip.md @@ -50,7 +50,7 @@ With `run-all.sh`: `TOOLS=...,chip`. It is opt-in, so a run lists step 49 only w |---|---|---| | DNMT3A | truncating anywhere; missense at R882 | 25426837, 21067377 | | TET2 | truncating anywhere | 25426837, 19474426 | -| ASXL1 | truncating anywhere | 25426837, 19388938 | +| ASXL1 | truncating in the last two exons, 12 and 13 (11 and 12 in the older transcript numbering of the CHIP studies) | 25426837, 19388938 | | JAK2 | V617F | 25426837, 15858187 | | TP53 | truncating anywhere; missense in the DNA-binding core domain, residues 102 to 292 | 25426837, 8023157 | | PPM1D | truncating in the last exon (6) | 23242139, 29954749 | @@ -68,13 +68,18 @@ With `run-all.sh`: `TOOLS=...,chip`. It is opt-in, so a run lists step 49 only w | Status | Rule | |---|---| -| `chip` | passed FilterMutectCalls, in the gene's class, VAF under 35%, at least 3 reads with the change | -| `likely_germline` | VAF 35% or more. An inherited variant sits near 50% or 100%, and without a matched normal sample the two cannot be told apart | +| `chip` | passed FilterMutectCalls, in the gene's class, VAF from 2% to under 35%, at least 3 reads with the change | +| `likely_germline` | VAF 35% or more. An inherited variant sits near 50% or 100%, and without a matched normal sample it cannot be told apart from a large clone | | `filtered` | FilterMutectCalls did not pass it; its filters are in the `note` column | | `low_support` | fewer than 3 reads with the change | +| `low_vaf` | VAF under 2%, the VAF that defines CHIP (Steensma et al., PMID 25931582). Not counted | | `other_change` | a protein change outside the gene's class | -Synonymous, intronic and UTR changes are left out. +The rules are tested in that order, so a call is `low_vaf` only when it passed the filters and has 3 reads. Synonymous, intronic and UTR changes are left out. + +A `chip` row is a possible finding, not a diagnosis, and its `note` starts with `possible clonal haematopoiesis (not a diagnosis)`, then the class rule it matched. CHIP itself is a clinical term: it also needs a normal blood count and no blood cancer, which a genome cannot show. + +5. A `chip` call whose reads also fit an inherited heterozygous variant keeps its status and gets one more sentence in its `note`: `10 of 30 reads also fit an inherited heterozygous variant`. The test is a binomial count at 50%: the reads fit when at least 1 in 100 inherited heterozygous variants at that depth would show as few reads with the change, or fewer. At 20x that is 5 reads of 20 and up (25%), at 30x 9 of 30 and up (30%), at 40x 13 of 40 and up (33%). From 60x the fit starts at the 35% cut, so no counted call gets the sentence there. These calls stay counted, because a real clone of 25% to 35% looks the same, and the step's log line counts them apart: `2 CHIP calls in 13 genes (possible clonal haematopoiesis, not a diagnosis; 1 of them also fits an inherited variant; ...)`. ## The read-support limit @@ -121,7 +126,8 @@ Not measured on a whole genome. Mutect2 reads about 35 kb of the BAM, which take ## Notes -- A `chip` row is a finding worth showing a haematologist, together with a blood count. It does not mean a blood cancer, and the risks the studies report are averages over many people. -- Tumour-only calling cannot prove a change is acquired. The VAF rule removes most inherited variants, but a change at 35% or more is never counted, and a real large clone there is missed too. +- A `chip` row is a possible finding worth showing a haematologist, together with a blood count. It does not mean a blood cancer, and the risks the studies report are averages over many people. +- Tumour-only calling cannot prove a change is acquired. The VAF rule removes most inherited variants, but a change at 35% or more is never counted, and a real large clone there is missed too. A counted call with the germline-fit sentence may be inherited: a test of a second tissue (a cheek swab or hair) or of a parent tells the two apart. +- A clone under 2% is not CHIP by its definition, so a call under 2% is `low_vaf` and not counted. Such a call needs 3 reads with the change, so more than 150 reads over the site: it shows only where the depth is far above a usual 30x genome. - **U2AF1 on the default reference.** GRCh38 added to the short arm of chr21 a near copy of the U2AF1 locus that real genomes do not have, and the no-ALT analysis set keeps it. Reads from U2AF1 then fit both copies equally well and get mapping quality 0. Miller et al. 2022 (PMID 35041928) found that GRCh38 pipelines missed U2AF1 mutations for this reason, and that they were found again once the copy was masked. This step counts depth and Mutect2 reads only from mapping quality 20 up, so on the default reference expect U2AF1 to show `too_shallow` or `partly_covered` in `chip_depth.tsv`, or a read-support limit far above the other genes'. Either way, no call at S34 or Q157 does not mean there is none. The fix is the masked reference, at the same coordinates: `setup.sh --masked-reference` builds it, with the false copies set to N as FixItFelix (Behera et al. 2023, PMID 36810122) and GIAB do, and a sample realigned to it gets its U2AF1 reads back ([the masked reference](realignment.md#the-masked-reference)). On chr21 of GIAB's HG002, step 16b reads U2AF1 on the masked reference and not on the default one (CI case `fixitfelix-chr21-1`); this step has not been measured on a whole genome either way. - Steps 29 and 49 call the same genes in two ways: step 29 calls gene bodies and leaves the calls unread, step 49 calls the coding exons and reads them. diff --git a/scripts/49-chip.sh b/scripts/49-chip.sh index 72732ea05..f3507ca43 100755 --- a/scripts/49-chip.sh +++ b/scripts/49-chip.sh @@ -9,8 +9,10 @@ # step 29 are used when they are in GENOME_DIR/somatic/. bcftools csq names # each change on that transcript, and og chip (bin/og) keeps the changes in # the table's CHIP classes, leaves out the ones whose VAF looks inherited (35% -# and up) and states the detection limit at the sample's depth over the same -# exons. The same commands run in the Nextflow CHIP_* processes. +# and up) or is under the 2% that defines CHIP, notes the kept ones whose +# reads also fit an inherited variant, and states the detection limit at the +# sample's depth over the same exons. The same commands run in the Nextflow +# CHIP_* processes. # # Not a diagnosis: CHIP is common with age and most people with it never get # a blood cancer. A negative result does not rule out a clone smaller than the @@ -106,7 +108,7 @@ echo "[4/4] CHIP classes, germline exclusion and detection limit..." rm -f "${P}_pileup.tsv" "${P}_f1r2.tar.gz" "${P}_orientation.tar.gz" echo "" -echo "CHIP calls (${P}.tsv):" +echo "Possible CHIP calls, not a diagnosis (${P}.tsv):" awk -F'\t' 'NR > 1 && $13 == "chip" { printf " %-8s %-10s VAF %-6s %s/%s reads %s\n", $1, $7, $9, $10, $11, $15; n++ } END { if (!n) print " none" }' "${P}.tsv" echo "Not a diagnosis. docs/49-chip.md says what a call means and what to ask a haematologist." diff --git a/tests/e2e/chip-clonal-1.sh b/tests/e2e/chip-clonal-1.sh index 008f5ca8f..e19580aef 100755 --- a/tests/e2e/chip-clonal-1.sh +++ b/tests/e2e/chip-clonal-1.sh @@ -11,8 +11,10 @@ # and a read-support limit from each base's depth under 10% at about 60x, # with nearly every coding base of DNMT3A at 10 reads or more; # - the same reads with DNMT3A R882H (chr2:25234373 C>T) planted in every -# fifth read over it: a chip row R882H at a VAF near 20%. The reads as they -# are are the negative control of that check; +# fifth read over it: a chip row R882H at a VAF near 20%, whose note says it +# is a possible finding, not a diagnosis, and whose reads (a fifth of about +# 60) do not fit an inherited variant. The reads as they are are the +# negative control of that check; # - planted in every second read: likely_germline, not chip; # - both reports show the section and the planted call; # - the Nextflow CHIP_* processes on the planted reads merged into step 02's BAM @@ -63,6 +65,8 @@ sample() { } # row NAME POS: the chip table's row at POS, as status,protein_change,vaf row() { awk -F'\t' -v p="$2" '$3 == p {print $13 "," $7 "," $9}' "${G}/$1/chip/$1_chip.tsv" 2>/dev/null; } +# note NAME POS: the note of that row +note() { awk -F'\t' -v p="$2" '$3 == p {print $15}' "${G}/$1/chip/$1_chip.tsv" 2>/dev/null; } # depth NAME GENE COLUMN depth() { awk -F'\t' -v g="$2" -v k="$3" 'NR == 1 {for (i = 1; i <= NF; i++) c[$i] = i; next} $1 == g {print $c[k]}' \ @@ -98,10 +102,15 @@ check "DNMT3A has a share of bases at the stated limit ($(depth "$U" DNMT3A asse awk -v d="$(depth "$U" DNMT3A assessable_fraction)" 'BEGIN {exit !(d ~ /^[01]\.[0-9][0-9][0-9]$/ && d > 0)}' check "the step prints the read-support limit and that it is not a diagnosis" \ has 'Read-support limit \(median [0-9]+x.*does not rule one out\. Not a diagnosis\.' "$(cat "$STEP_LOG")" +check "the step's count says possible clonal haematopoiesis, not a diagnosis" \ + has ': [0-9]+ CHIP calls? in [0-9]+ genes \(possible clonal haematopoiesis, not a diagnosis; ' "$(cat "$STEP_LOG")" IFS=, read -r st pc vaf <<< "$(row "$P" "$R882")" check_eq "planted at a fifth: a chip row" "${st:-none}" chip check_eq "named R882H on DNMT3A's MANE transcript" "${pc:-none}" R882H check "its VAF is near 20% (${vaf:-none})" awk -v v="${vaf:-0}" 'BEGIN {exit !(v >= 0.10 && v <= 0.30)}' +check "its note says a possible finding, not a diagnosis ($(note "$P" "$R882"))" \ + has '^possible clonal haematopoiesis \(not a diagnosis\): hotspot R882' "$(note "$P" "$R882")" +check "a fifth of about 60 reads does not fit an inherited variant" lacks 'fit an inherited' "$(note "$P" "$R882")" check_eq "planted at a half: likely_germline, not chip" "$(row "$H" "$R882" | cut -d, -f1)" likely_germline check_eq "and the germline-looking call is not counted" \ "$(awk -F'\t' '$13 == "chip" && $3 == p' p="$R882" "${G}/${H}/chip/${H}_chip.tsv" 2>/dev/null | wc -l | tr -d ' ')" 0 From 9dac36f30516b9b349a71c93f7fa66866183ccb5 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 19:46:56 +0100 Subject: [PATCH 062/110] docs(str): say the penetrance table is read at run time and the Nextflow report does not stage it yet --- CHANGELOG.md | 2 +- assets/str_penetrance_ranges.tsv | 8 ++++++-- docs/09-str-expansions.md | 2 +- docs/09b-stranger.md | 2 +- docs/results/structural-and-repeats.md | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2f163568..5628ac73b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- An HTT count of 36 to 39 CAG no longer reads only as plain `full_mutation` in `summary.json`. That range is reduced penetrance: it can cause Huntington disease, but not in everyone who carries it. Stranger grades HTT with one pathogenic minimum (36 on the STRchive catalog), so it could not say so. `og summary collect` now adds three keys to a locus with a sized allele in such a range, and to its entry in the flagged list: `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (GeneReviews). The ranges live in a new table, `assets/str_penetrance_ranges.tsv`, which holds HTT only. Stranger's status and every other key stay as they were. The reports do not print the new keys yet. A second fix: an allele that ExpansionHunter supports with in-repeat reads only (`ADSP` and `ADFL` 0, `ADIR` above 0) is now `in_repeat`, so it is listed as not sized and shown as at least the lower end of its interval. Before, such an allele read as sized when its `SO` was empty, and as `flanking_only` when its `SO` said `FLANKING`. `rust/crates/og-summary/tests/i411_str_htt_penetrance.rs` checks both. +- An HTT count of 36 to 39 CAG no longer reads only as plain `full_mutation` in `summary.json`. That range is reduced penetrance: it can cause Huntington disease, but not in everyone who carries it. Stranger grades HTT with one pathogenic minimum (36 on the STRchive catalog), so it could not say so. `og summary collect` now adds three keys to a locus with a sized allele in such a range, and to its entry in the flagged list: `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (GeneReviews). The ranges live in a new table, `assets/str_penetrance_ranges.tsv`, which holds HTT only. Stranger's status and every other key stay as they were. The reports do not print the new keys yet, and only step 24 (`run-all.sh`) writes them: the Nextflow report does not stage the new table yet, so a Nextflow run's `summary.json` has no such keys. A second fix: an allele that ExpansionHunter supports with in-repeat reads only (`ADSP` and `ADFL` 0, `ADIR` above 0) is now `in_repeat`, so it is listed as not sized and shown as at least the lower end of its interval. Before, such an allele read as sized when its `SO` was empty, and as `flanking_only` when its `SO` said `FLANKING`. `rust/crates/og-summary/tests/i411_str_htt_penetrance.rs` checks both. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/assets/str_penetrance_ranges.tsv b/assets/str_penetrance_ranges.tsv index 1b0a24bee..93827ff95 100644 --- a/assets/str_penetrance_ranges.tsv +++ b/assets/str_penetrance_ranges.tsv @@ -1,8 +1,12 @@ # assets/str_penetrance_ranges.tsv: the repeat ranges of reduced penetrance that og summary collect names (step 09). # A count in such a range can cause the disease, but not in everyone who carries it. Stranger grades a count only # against the catalog's normal maximum and pathogenic minimum, so it reads such a count as plain full_mutation or -# pre_mutation. og-summary embeds this file at build time and marks a sized allele in a range with the keys -# penetrance (min-max), penetrance_label and penetrance_citation of its locus in summary.json. +# pre_mutation. og summary collect reads this file from its --assets folder at run time and marks a sized allele in +# a range with the keys penetrance (min-max), penetrance_label and penetrance_citation of its locus in summary.json. +# It is not embedded in the binary: an assets folder without this file labels nothing and says no error, and a +# broken table (a bad row, no row, or a min above its max) makes the expansions section unreadable. +# Step 24 mounts the whole assets/ folder. The Nextflow HTML_REPORT stages only the tables main.nf lists, and this +# file is not one of them yet, so a Nextflow run labels nothing. # The intermediate ranges (between normal and disease-causing) are a separate table, bin/str_intermediate_ranges.tsv. # locus: the ExpansionHunter locus id (REPID). min, max: the range, in repeat units, both ends included. # label: what the summary says beside a count in the range. citation: the GeneReviews chapter that defines the range. diff --git a/docs/09-str-expansions.md b/docs/09-str-expansions.md index 7fc210477..0ae39c423 100644 --- a/docs/09-str-expansions.md +++ b/docs/09-str-expansions.md @@ -73,7 +73,7 @@ The thresholds step 9b grades with on the STRchive v2.28.0 catalog, in repeat un | SCA1 | ATXN1 | CAG | ≤35 | 36-38 | ≥39 | | SCA2 | ATXN2 | CAG | ≤28 | 29-34 | ≥35 | -Stranger's pre-mutation band is everything between the two thresholds; it is wider than a clinical intermediate range at some loci. At FMR1 it covers both the gray zone and the premutation below. At HTT, Stranger's full mutation starts at 36, but 36 to 39 is the reduced-penetrance range of GeneReviews: such a count can cause Huntington disease, but not in everyone who carries it. `og summary collect` marks a sized HTT count of 36 to 39 as reduced penetrance in `summary.json`, from `assets/str_penetrance_ranges.tsv` ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). `setup.sh` also writes `reference/strchive-/str_ranges.tsv`, one row per locus with these two thresholds and STRchive's own intermediate range. +Stranger's pre-mutation band is everything between the two thresholds; it is wider than a clinical intermediate range at some loci. At FMR1 it covers both the gray zone and the premutation below. At HTT, Stranger's full mutation starts at 36, but 36 to 39 is the reduced-penetrance range of GeneReviews: such a count can cause Huntington disease, but not in everyone who carries it. `og summary collect` marks a sized HTT count of 36 to 39 as reduced penetrance in `summary.json`, from `assets/str_penetrance_ranges.tsv`. Step 24 (`run-all.sh`) does this; the Nextflow report does not stage that table yet, so a Nextflow run has no such mark ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). `setup.sh` also writes `reference/strchive-/str_ranges.tsv`, one row per locus with these two thresholds and STRchive's own intermediate range. ## FMR1 Clinical Zones diff --git a/docs/09b-stranger.md b/docs/09b-stranger.md index 3db71a426..35dfd8a03 100644 --- a/docs/09b-stranger.md +++ b/docs/09b-stranger.md @@ -28,7 +28,7 @@ Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. By default, the catalog step 9 ran on (`expansion_hunter/_eh_catalog.json`) when it carries Stranger's thresholds: that is the STRchive catalog `setup.sh` builds ([step 9](09-str-expansions.md#which-catalog-runs)). Its thresholds are STRchive's, so steps 9 and 9b read one list of loci, and every graded record carries `SourceDisplay=STRchive-`. The log names it. Without it (step 9 ran on the bundled 31 loci, or on a catalog without thresholds) Stranger's bundled GRCh38 catalog grades, as before. `STRANGER_REPEATS=file` picks another catalog (TSV or JSON), `STRANGER_REPEATS=bundled` the bundled GRCh38 one. The Nextflow `STRANGER` module takes `--expansion_catalog` and makes the same choice. -The thresholds differ from the bundled catalog's at some loci. HTT, for example: STRchive's benign maximum is 26 and its pathogenic minimum 36, so 27 to 35 CAG is `pre_mutation`, where the bundled catalog calls up to 34 normal. From 36 Stranger says `full_mutation`, but 36 to 39 is the reduced-penetrance range: `summary.json` marks a sized count there as reduced penetrance ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). Seven STRchive loci get no status at all (MUC1, CEL, TYMS, PLIN4, VWA1, POLG, MIR7-2; [why](09-str-expansions.md#which-catalog-runs)). +The thresholds differ from the bundled catalog's at some loci. HTT, for example: STRchive's benign maximum is 26 and its pathogenic minimum 36, so 27 to 35 CAG is `pre_mutation`, where the bundled catalog calls up to 34 normal. From 36 Stranger says `full_mutation`, but 36 to 39 is the reduced-penetrance range: `summary.json` of step 24 marks a sized count there as reduced penetrance; the Nextflow report does not yet ([how to read it](results/structural-and-repeats.md#how-to-read-expansionhunter-output)). Seven STRchive loci get no status at all (MUC1, CEL, TYMS, PLIN4, VWA1, POLG, MIR7-2; [why](09-str-expansions.md#which-catalog-runs)). ## Command diff --git a/docs/results/structural-and-repeats.md b/docs/results/structural-and-repeats.md index ac4bb27b7..8337beffc 100644 --- a/docs/results/structural-and-repeats.md +++ b/docs/results/structural-and-repeats.md @@ -81,7 +81,7 @@ The report prints no all-clear verdict for these loci. It lists every locus in t - **Not sized.** A locus whose call rests on flanking reads only prints "size not determined (flanking reads only)"; one with in-repeat reads only (longer than a read) prints its count as at least the lower end of ExpansionHunter's interval. An allele counts as in-repeat when its `SO` says `INREPEAT`, or when ExpansionHunter found no spanning and no flanking read for it but at least one in-repeat read (`ADSP` and `ADFL` 0, `ADIR` above 0), whatever its `SO` says; one with fewer than 2 spanning reads, or an interval that reaches the catalog's pathogenic minimum, is marked low confidence. Such a locus is listed apart and never shown as normal, because an unsized repeat can hide an expansion. - **Intermediate range.** A sized count inside the HTT, FMR1 or DMPK intermediate range of the table above prints the range, a note that it does not cause disease but may expand in offspring, and the GeneReviews chapter. The report reads these ranges from `bin/str_intermediate_ranges.tsv`, and `rust/crates/og-setup/tests/genome_str_ranges.rs` checks that the table above prints the same ones. -- **Reduced penetrance.** Stranger grades HTT with one pathogenic minimum, 36 on the STRchive catalog, so a count of 36 to 39 reads as plain `full_mutation`. It is the reduced-penetrance range of the table above. `summary.json` marks a sized HTT allele of 36 to 39 with `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (the GeneReviews chapter) on the locus, and on its entry in the flagged list. The range comes from `assets/str_penetrance_ranges.tsv`. An allele that was not sized gets no such mark: its point estimate is not a count. Stranger's status stays as Stranger wrote it. +- **Reduced penetrance.** Stranger grades HTT with one pathogenic minimum, 36 on the STRchive catalog, so a count of 36 to 39 reads as plain `full_mutation`. It is the reduced-penetrance range of the table above. `summary.json` marks a sized HTT allele of 36 to 39 with `penetrance` (`36-39`), `penetrance_label` and `penetrance_citation` (the GeneReviews chapter) on the locus, and on its entry in the flagged list. The range comes from `assets/str_penetrance_ranges.tsv`. An allele that was not sized gets no such mark: its point estimate is not a count. Stranger's status stays as Stranger wrote it. The report does not print this mark yet; it is in `summary.json` only, and only from step 24 (`run-all.sh`): the Nextflow report does not stage the table yet, so a Nextflow run has no such mark. - **RFC1.** A `full_mutation` flag at RFC1 carries the motif verdict of step 9b ([RFC1 note](../09b-stranger.md#notes)). A count under every threshold is not a guarantee: repeat-expansion calls from short reads can be wrong at some loci, and a long expansion cannot be sized. Intermediate-range results should be discussed with a genetic counselor. From b0a57ab83d242a632e8bee2314acec1a9d60c6fd Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:18:08 +0100 Subject: [PATCH 063/110] feat(og): map an ONT basecaller model to its Clair3 model og longread clair3-model reads the basecall_model= of a BAM's @RG DS fields (or takes BASECALL_MODEL), maps it to Clair3's model directory, checks the directory exists in the image and stops with the image's model list when nothing fits. CLAIR3_MODEL still wins. Bead: plat-59 --- rust/crates/og-steps/src/longread.rs | 492 ++++++++++++++++++++++++++- 1 file changed, 485 insertions(+), 7 deletions(-) diff --git a/rust/crates/og-steps/src/longread.rs b/rust/crates/og-steps/src/longread.rs index f3dcb97bf..40e1cf1c8 100644 --- a/rust/crates/og-steps/src/longread.rs +++ b/rust/crates/og-steps/src/longread.rs @@ -1,13 +1,491 @@ //! `og longread clair3-model`: the Clair3 model that matches the basecaller -//! of a long-read sample. +//! of an Oxford Nanopore sample. //! -//! Not ported yet: until its unit of the 1.0.0 plan lands, the verb says so -//! on stderr and exits 2, before reading any argument. +//! Clair3 has one model per pore, basecaller accuracy and basecaller model +//! version. A model trained on other basecalls still runs and still writes a +//! VCF, but every call is less accurate, and nothing in the output says so. +//! So step 03e never assumes a basecaller: it reads the basecaller model +//! from the BAM's `@RG` `DS` field (`basecall_model=...`, which Dorado writes +//! and step 02b carries), or takes it from `BASECALL_MODEL`, maps it here to +//! a model directory, and stops when no model matches or the image lacks it. +//! `CLAIR3_MODEL` still names a model directory outright. +//! +//! The verb runs inside the Clair3 image, so it checks the directory on the +//! filesystem it sees, and lists the image's models when it stops. +//! +//! `--basecaller-only` prints the basecaller model of a BAM's header (step +//! 02b reads an unaligned BAM's this way) and maps nothing. +use std::collections::BTreeSet; use std::io::Write; +use std::path::Path; + +use crate::paraphase::bam_header; + +const USAGE: &str = "usage: og longread clair3-model [--bam BAM] [--basecaller NAME] [--model DIR] [--models-dir DIR] [--basecaller-only] + Prints the Clair3 model directory for an ONT sample. --model (CLAIR3_MODEL) + wins; else --basecaller (BASECALL_MODEL); else the basecall_model= of the + BAM's @RG DS fields. Exit 1 when no model fits or the directory is missing. + --basecaller-only prints the BAM's basecaller model (nothing when none). +"; + +/// The Clair3 model directory name for a basecaller model name, or `None` +/// when Clair3 has no model for it. +/// +/// Dorado names a model `dna_r10.4.1_e8.2_400bps_sup@v5.0.0`; Clair3 names +/// the matching one `r1041_e82_400bps_sup_v500`, one digit per version part. +/// R9.4.1 basecalls (Dorado `dna_r9.4.1_e8_sup@v3.3`, Guppy +/// `dna_r9.4.1_450bps_sup`) take Clair3's two R9.4.1 models, trained on +/// Guppy 5 SUP and on Guppy 3.6/4.2 HAC. Fast basecalls, RNA, other pores +/// and other speeds have no Clair3 model. +pub fn clair3_model_for(basecaller: &str) -> Option { + let name = basecaller.trim(); + let name = name.strip_prefix("dna_").unwrap_or(name); + let (config, version) = match name.split_once('@') { + Some((c, v)) => (c, Some(v)), + None => (name, None), + }; + if let Some(rest) = config.strip_prefix("r10.4.1_e8.2_400bps_") { + let accuracy = match rest { + "sup" | "hac" => rest, + _ => return None, + }; + let digits = version_digits(version?)?; + return Some(format!("r1041_e82_400bps_{accuracy}_v{digits}")); + } + if let Some(rest) = config.strip_prefix("r9.4.1_") { + // e8_sup, 450bps_sup, 450bps_hac_prom: the pore's speed and the + // Guppy "prom" suffix do not change which Clair3 model fits. + let words: Vec<&str> = rest.split('_').collect(); + if words.contains(&"sup") { + return Some("r941_prom_sup_g5014".to_owned()); + } + if words.contains(&"hac") { + return Some("r941_prom_hac_g360+g422".to_owned()); + } + } + None +} + +/// `v5.0.0` -> `500`, `v4.1.0` -> `410`, `v5.0` -> `500`: one digit per +/// part, as Clair3's directory names have them. `None` for anything else. +fn version_digits(version: &str) -> Option { + let parts: Vec<&str> = version.strip_prefix('v')?.split('.').collect(); + if !(2..=3).contains(&parts.len()) { + return None; + } + let mut digits = String::new(); + for p in &parts { + if p.len() != 1 || !p.bytes().all(|b| b.is_ascii_digit()) { + return None; + } + digits.push_str(p); + } + if parts.len() == 2 { + digits.push('0'); + } + Some(digits) +} + +/// The distinct `basecall_model=` values of the header's `@RG` `DS` +/// fields, sorted. +pub fn basecallers(header: &str) -> Vec { + let mut found = BTreeSet::new(); + for line in header.split('\n').filter(|l| l.starts_with("@RG\t")) { + for tag in line.trim_end_matches('\r').split('\t').skip(1) { + let Some(ds) = tag.strip_prefix("DS:") else { + continue; + }; + for word in ds.split(' ') { + if let Some(v) = word.strip_prefix("basecall_model=") + && !v.is_empty() + { + found.insert(v.to_owned()); + } + } + } + } + found.into_iter().collect() +} + +/// The directories under `dir`, sorted; empty when it cannot be read. +fn models_in(dir: &str) -> Vec { + let Ok(entries) = std::fs::read_dir(dir) else { + return Vec::new(); + }; + let mut names: Vec = entries + .flatten() + .filter(|e| e.path().is_dir()) + .map(|e| e.file_name().to_string_lossy().into_owned()) + .collect(); + names.sort(); + names +} + +#[derive(Default)] +struct Opts { + bam: Option, + basecaller: Option, + model: Option, + models_dir: Option, + basecaller_only: bool, +} + +fn parse(args: &[String]) -> Result { + let mut o = Opts::default(); + let mut it = args.iter(); + while let Some(a) = it.next() { + let (key, inline) = match a.split_once('=') { + Some((k, v)) if k.starts_with("--") => (k, Some(v.to_owned())), + _ => (a.as_str(), None), + }; + let slot = match key { + "--basecaller-only" if inline.is_none() => { + o.basecaller_only = true; + continue; + } + "--bam" => &mut o.bam, + "--basecaller" => &mut o.basecaller, + "--model" => &mut o.model, + "--models-dir" => &mut o.models_dir, + _ => return Err(format!("unrecognized arguments: {a}")), + }; + let value = match inline { + Some(v) => v, + None => it + .next() + .ok_or_else(|| format!("argument {key}: expected one argument"))? + .clone(), + }; + *slot = Some(value); + } + Ok(o) +} + +/// `og longread clair3-model ARGS`: the model directory on stdout, or the +/// reason on stderr and exit 1 (2 for a usage error). +pub fn clair3_model_cli(args: &[String], out: &mut dyn Write, err: &mut dyn Write) -> u8 { + if args.iter().any(|a| a == "-h" || a == "--help") { + let _ = out.write_all(USAGE.as_bytes()); + return 0; + } + let o = match parse(args) { + Ok(o) => o, + Err(msg) => { + let _ = write!(err, "{USAGE}"); + let _ = writeln!(err, "og longread clair3-model: error: {msg}"); + return 2; + } + }; + match run(&o) { + Ok(Some(line)) => { + let _ = writeln!(out, "{line}"); + 0 + } + Ok(None) => 0, + Err(msg) => { + let _ = writeln!(err, "ERROR: {msg}"); + 1 + } + } +} + +fn run(o: &Opts) -> Result, String> { + let from_bam = || -> Result, String> { + match &o.bam { + Some(bam) => bam_header(bam).map(|h| basecallers(&h)).map_err(|e| e.0), + None => Ok(Vec::new()), + } + }; + if o.basecaller_only { + if o.bam.is_none() { + return Err("--basecaller-only needs --bam".to_owned()); + } + let found = from_bam()?; + return match found.as_slice() { + [] => Ok(None), + [one] => Ok(Some(one.clone())), + many => Err(format!( + "the read groups name more than one basecaller model: {}", + many.join(", ") + )), + }; + } + let models_dir = o.models_dir.as_deref().unwrap_or("/opt/models"); + let available = || { + let names = models_in(models_dir); + if names.is_empty() { + format!("no model directory found under {models_dir}") + } else { + format!("models in {models_dir}: {}", names.join(" ")) + } + }; + let (path, why) = if let Some(model) = o.model.as_deref().filter(|m| !m.is_empty()) { + (model.to_owned(), "set by CLAIR3_MODEL".to_owned()) + } else { + let (basecaller, source) = if let Some(b) = + o.basecaller.as_deref().filter(|b| !b.is_empty()) + { + (b.to_owned(), "BASECALL_MODEL") + } else { + let found = from_bam()?; + let bam = o.bam.as_deref().unwrap_or("the BAM"); + match found.as_slice() { + [one] => (one.clone(), "the BAM's read group"), + [] => { + return Err(format!( + "{bam} names no basecaller model (no basecall_model= in an @RG DS field), so the Clair3 model cannot be chosen. Set BASECALL_MODEL to the Dorado model the reads were basecalled with (for example dna_r10.4.1_e8.2_400bps_sup@v5.0.0), or CLAIR3_MODEL to a model directory; {}.", + available() + )); + } + many => { + return Err(format!( + "{bam} holds reads from more than one basecaller model ({}); one Clair3 model cannot fit them all. Set CLAIR3_MODEL to the model directory to use; {}.", + many.join(", "), + available() + )); + } + } + }; + let Some(dir) = clair3_model_for(&basecaller) else { + return Err(format!( + "Clair3 has no model for the basecaller model {basecaller} (from {source}). Clair3 models exist for R10.4.1 400 bps HAC and SUP and for R9.4.1 HAC and SUP basecalls, not for fast ones. Set CLAIR3_MODEL to a model directory if you know which fits; {}.", + available() + )); + }; + ( + format!("{}/{dir}", models_dir.trim_end_matches('/')), + format!("basecaller {basecaller}, from {source}"), + ) + }; + if !Path::new(&path).is_dir() { + return Err(format!( + "the Clair3 model {path} ({why}) is not in the image. Set CLAIR3_MODEL to a model directory that exists; {}.", + available() + )); + } + Ok(Some(path)) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn model(b: &str) -> Option { + clair3_model_for(b) + } + + #[test] + fn r10_sup_and_hac_map_by_version() { + for (basecaller, want) in [ + ( + "dna_r10.4.1_e8.2_400bps_sup@v4.1.0", + "r1041_e82_400bps_sup_v410", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v4.1.0", + "r1041_e82_400bps_hac_v410", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v4.3.0", + "r1041_e82_400bps_sup_v430", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0", + "r1041_e82_400bps_sup_v500", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v5.0.0", + "r1041_e82_400bps_hac_v500", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v5.2.0", + "r1041_e82_400bps_sup_v520", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v5.2.0", + "r1041_e82_400bps_hac_v520", + ), + ( + "dna_r10.4.1_e8.2_400bps_hac@v6.0.0", + "r1041_e82_400bps_hac_v600", + ), + ( + "dna_r10.4.1_e8.2_400bps_sup@v6.0.0", + "r1041_e82_400bps_sup_v600", + ), + ("r10.4.1_e8.2_400bps_sup@v5.0", "r1041_e82_400bps_sup_v500"), + ( + " dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n", + "r1041_e82_400bps_sup_v500", + ), + ] { + assert_eq!(model(basecaller).as_deref(), Some(want), "{basecaller}"); + } + } + + #[test] + fn r9_maps_to_the_two_r9_models() { + for (basecaller, want) in [ + ("dna_r9.4.1_e8_sup@v3.3", "r941_prom_sup_g5014"), + ("dna_r9.4.1_e8_sup@v3.6", "r941_prom_sup_g5014"), + ("dna_r9.4.1_450bps_sup", "r941_prom_sup_g5014"), + ("dna_r9.4.1_450bps_sup_prom", "r941_prom_sup_g5014"), + ("dna_r9.4.1_e8_hac@v3.3", "r941_prom_hac_g360+g422"), + ("dna_r9.4.1_450bps_hac_prom", "r941_prom_hac_g360+g422"), + ] { + assert_eq!(model(basecaller).as_deref(), Some(want), "{basecaller}"); + } + } + + #[test] + fn unknown_basecallers_map_to_nothing() { + for basecaller in [ + "", + "dna_r10.4.1_e8.2_400bps_fast@v5.0.0", + "dna_r9.4.1_e8_fast@v3.4", + "dna_r10.4.1_e8.2_260bps_sup@v4.0.0", + "dna_r10.4.1_e8.2_400bps_sup", + "dna_r10.4.1_e8.2_400bps_sup@v10.0.0", + "dna_r10.4.1_e8.2_400bps_sup@5.0.0", + "dna_r10.4.1_e8.2_400bps_sup@v5", + "rna004_130bps_sup@v5.0.0", + "dna_r10.4.1_e8.2_400bps_sup_v500", + "hifi_revio", + ] { + assert_eq!(model(basecaller), None, "{basecaller:?}"); + } + } + + #[test] + fn basecallers_come_from_rg_ds_only() { + let header = "@HD\tVN:1.6\n\ + @RG\tID:a\tPL:ONT\tDS:runid=x basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 modbase_models=m\n\ + @RG\tID:b\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0\r\n\ + @PG\tID:p\tDS:basecall_model=not_a_read_group\n\ + @CO\tbasecall_model=comment\n"; + assert_eq!( + basecallers(header), + vec!["dna_r10.4.1_e8.2_400bps_sup@v5.0.0".to_owned()] + ); + let two = "@RG\tID:a\tDS:basecall_model=x@v1.0.0\n@RG\tID:b\tDS:basecall_model=y@v1.0.0\n"; + assert_eq!(basecallers(two).len(), 2); + assert!(basecallers("@RG\tID:a\tPL:ONT\n").is_empty()); + } + + fn scratch(name: &str) -> std::path::PathBuf { + let d = std::env::temp_dir().join(format!("og-longread-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(d.join("r1041_e82_400bps_sup_v500")).unwrap(); + std::fs::create_dir_all(d.join("hifi_revio")).unwrap(); + d + } + + /// A BAM holding only a header: BGZF is gzip, which the reader takes. + fn bam(dir: &Path, name: &str, header: &str) -> String { + use std::io::Write as _; + let mut raw = b"BAM\x01".to_vec(); + raw.extend_from_slice(&i32::try_from(header.len()).unwrap().to_le_bytes()); + raw.extend_from_slice(header.as_bytes()); + raw.extend_from_slice(&0i32.to_le_bytes()); + let path = dir.join(name); + let mut gz = flate2::write::GzEncoder::new( + std::fs::File::create(&path).unwrap(), + flate2::Compression::default(), + ); + gz.write_all(&raw).unwrap(); + gz.finish().unwrap(); + path.to_string_lossy().into_owned() + } + + fn cli(args: &[&str]) -> (u8, String, String) { + let args: Vec = args.iter().map(|s| (*s).to_owned()).collect(); + let (mut out, mut err) = (Vec::new(), Vec::new()); + let code = clair3_model_cli(&args, &mut out, &mut err); + ( + code, + String::from_utf8(out).unwrap(), + String::from_utf8(err).unwrap(), + ) + } + + #[test] + fn the_cli_picks_checks_and_refuses() { + let d = scratch("cli"); + let models = d.to_string_lossy().into_owned(); + let with = bam( + &d, + "with.bam", + "@RG\tID:a\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n", + ); + let (code, out, _) = cli(&["--bam", &with, "--models-dir", &models]); + assert_eq!(code, 0); + assert_eq!(out, format!("{models}/r1041_e82_400bps_sup_v500\n")); + + // BASECALL_MODEL wins over the BAM, and a missing directory stops. + let (code, out, err) = cli(&[ + "--bam", + &with, + "--basecaller", + "dna_r10.4.1_e8.2_400bps_hac@v4.1.0", + "--models-dir", + &models, + ]); + assert_eq!((code, out.as_str()), (1, "")); + assert!(err.contains("r1041_e82_400bps_hac_v410"), "{err}"); + assert!(err.contains("is not in the image"), "{err}"); + assert!( + err.contains("hifi_revio r1041_e82_400bps_sup_v500"), + "{err}" + ); + + // CLAIR3_MODEL wins over both, and is checked too. + let own = format!("{models}/hifi_revio"); + let (code, out, _) = cli(&[ + "--bam", + &with, + "--basecaller", + "x", + "--model", + &own, + "--models-dir", + &models, + ]); + assert_eq!((code, out), (0, format!("{own}\n"))); + let (code, _, err) = cli(&["--model", "/no/such/model", "--models-dir", &models]); + assert_eq!(code, 1); + assert!(err.contains("CLAIR3_MODEL"), "{err}"); + + // No basecaller anywhere, and a fast basecaller: both stop. + let without = bam(&d, "without.bam", "@RG\tID:a\tPL:ONT\n"); + let (code, _, err) = cli(&["--bam", &without, "--models-dir", &models]); + assert_eq!(code, 1); + assert!( + err.contains("BASECALL_MODEL") && err.contains("CLAIR3_MODEL"), + "{err}" + ); + let (code, _, err) = cli(&[ + "--basecaller", + "dna_r10.4.1_e8.2_400bps_fast@v5.0.0", + "--models-dir", + &models, + ]); + assert_eq!(code, 1); + assert!(err.contains("has no model"), "{err}"); + + // --basecaller-only prints what the header names, or nothing. + let (code, out, _) = cli(&["--bam", &with, "--basecaller-only"]); + assert_eq!( + (code, out.as_str()), + (0, "dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n") + ); + let (code, out, _) = cli(&["--bam", &without, "--basecaller-only"]); + assert_eq!((code, out.as_str()), (0, "")); -/// `og longread clair3-model ARGS`: not ported yet, so one line on stderr and exit 2. -pub fn clair3_model_cli(_args: &[String], _out: &mut dyn Write, err: &mut dyn Write) -> u8 { - let _ = writeln!(err, "og longread clair3-model: not ported yet"); - 2 + // A usage error is exit 2. + let (code, _, err) = cli(&["--og-scaffold-probe"]); + assert_eq!(code, 2); + assert!(err.contains("unrecognized arguments"), "{err}"); + let _ = std::fs::remove_dir_all(&d); + } } From 56448b7592f608ff7241de9988faa5f1c8ab58c5 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:21:15 +0100 Subject: [PATCH 064/110] fix(longread): choose the Clair3 model from the basecaller Step 03e used the Dorado v5.0.0 SUP weights for every ONT sample unless CLAIR3_MODEL was set, so reads from another basecaller got the wrong model and degraded calls with no warning. Step 02b now writes the basecaller model into the aligned BAM's @RG DS (from BASECALL_MODEL or the unaligned BAM's own @RG DS), and 03e picks the model with og longread clair3-model inside the Clair3 image. With no basecaller, one Clair3 has no model for, or a model the image lacks, the step stops and lists the image's models. HiFi is unchanged. Bead: plat-59 Bead: D14 --- scripts/02b-alignment-longread.sh | 30 ++++++- scripts/03e-clair3.sh | 32 +++++-- .../alignment-markdup-gvcf-sex-calling.sh | 87 +++++++++++++++++++ 3 files changed, 139 insertions(+), 10 deletions(-) diff --git a/scripts/02b-alignment-longread.sh b/scripts/02b-alignment-longread.sh index 6d835d5b8..c0d57b551 100755 --- a/scripts/02b-alignment-longread.sh +++ b/scripts/02b-alignment-longread.sh @@ -9,6 +9,12 @@ # PLATFORM=ont -> Oxford Nanopore (minimap2 preset: map-ont) # PLATFORM=hifi -> PacBio HiFi/CCS (minimap2 preset: map-hifi) # +# ONT: the basecaller model goes into the BAM's @RG DS field +# (DS:basecall_model=...), where step 03e reads it to pick the Clair3 model. +# It comes from BASECALL_MODEL (e.g. dna_r10.4.1_e8.2_400bps_sup@v5.0.0; +# needed for FASTQ input), else from the unaligned BAM's own @RG DS, which +# Dorado writes. +# # Runtime: ~1-3 hours for 30X long-read WGS depending on read length and throughput. # # The BAM is written under a temporary name, indexed and checked with samtools @@ -98,12 +104,34 @@ if [ -z "$INPUT_FILE" ] || [ ! -f "$INPUT_FILE" ]; then exit 1 fi +# The basecaller model, for step 03e. Read only for ONT: HiFi has one Clair3 +# model and no basecaller choice that changes it. +BASECALLER="" +[ "$PLATFORM" != ont ] || BASECALLER="${BASECALL_MODEL:-}" +case "$BASECALLER" in + *[!A-Za-z0-9._@+-]*) + echo "ERROR: BASECALL_MODEL holds characters a basecaller model name never has: '${BASECALLER}'" >&2 + exit 2 ;; +esac +if [ "$PLATFORM" = ont ] && [ -z "$BASECALLER" ] && [[ "$INPUT_FILE" == *.bam ]]; then + BASECALLER=$(run_in --cpus 1 --memory 1g -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$SAMTOOLS_IMAGE" \ + /pgp-bin/og longread clair3-model --basecaller-only --bam "/genome/${REAL_INPUT#"${REAL_GENOME}/"}") \ + || { echo "NOTE: the basecaller model of the unaligned BAM could not be read (see above)." >&2; BASECALLER=""; } +fi +RG_DS="" +if [ -n "$BASECALLER" ]; then + RG_DS="\tDS:basecall_model=${BASECALLER}" +elif [ "$PLATFORM" = ont ]; then + echo "NOTE: no basecaller model known (set BASECALL_MODEL); step 03e will then need BASECALL_MODEL or CLAIR3_MODEL." +fi + echo "=== Long-read Alignment: ${SAMPLE} ===" echo "Platform: ${PLATFORM} (minimap2 preset: ${MM2_PRESET})" echo "Input: ${INPUT_FILE}" echo "Reference: ${REF}" echo "Output: ${OUTPUT_DIR}/" echo "Threads: ${THREADS}" +[ -z "$BASECALLER" ] || echo "Basecaller model: ${BASECALLER}" # Validate reference exists if [ ! -f "$REF" ]; then @@ -146,7 +174,7 @@ _align_and_sort() { "$MINIMAP2_IMAGE" \ minimap2 -t "${THREADS}" -a -x "${MM2_PRESET}" \ --MD -Y \ - -R "@RG\tID:${SAMPLE}\tSM:${SAMPLE}\tPL:${RG_PLATFORM}\tLB:${SAMPLE}" \ + -R "@RG\tID:${SAMPLE}\tSM:${SAMPLE}\tPL:${RG_PLATFORM}\tLB:${SAMPLE}${RG_DS}" \ "$@" \ "${REF_FASTA_C}" \ "$reads" \ diff --git a/scripts/03e-clair3.sh b/scripts/03e-clair3.sh index 66a6af801..a5b47bd1e 100755 --- a/scripts/03e-clair3.sh +++ b/scripts/03e-clair3.sh @@ -8,10 +8,17 @@ # Usage: PLATFORM=ont|hifi ./scripts/03e-clair3.sh [male|female] # # Set PLATFORM to select the appropriate model: -# PLATFORM=ont -> ONT R10.4.1 model (r1041_e82_400bps_sup_v500) # PLATFORM=hifi -> PacBio HiFi/Revio model (hifi_revio) +# PLATFORM=ont -> the model of the reads' basecaller: og longread +# clair3-model maps the basecall_model= of the BAM's @RG +# DS field (Dorado writes it, step 02b carries it) or +# BASECALL_MODEL (e.g. dna_r10.4.1_e8.2_400bps_sup@v5.0.0) +# to a model directory of the image. With no basecaller, +# one Clair3 has no model for, or a model the image +# lacks, the step stops and lists the image's models: a +# model trained on other basecalls degrades every call. # CLAIR3_MODEL overrides the model path inside the image (e.g. -# /opt/models/r1041_e82_400bps_sup_v520 for newer Dorado basecalls). +# /opt/models/r1041_e82_400bps_sup_v520); for ONT it is still checked. # Sex: `male` calls chrX and chrY haploid outside the pseudoautosomal regions # (Clair3 --gender male with assets/par_grch38.bed); `female` leaves chrY # out and calls chrX diploid; no sex calls both diploid. @@ -40,12 +47,7 @@ OUTPUT_DIR="${SAMPLE_DIR}/vcf_clair3" # Select model path based on platform case "$PLATFORM" in - ont) - MODEL_PATH="${CLAIR3_MODEL:-/opt/models/r1041_e82_400bps_sup_v500}" - ;; - hifi) - MODEL_PATH="${CLAIR3_MODEL:-/opt/models/hifi_revio}" - ;; + ont|hifi) ;; *) echo "ERROR: PLATFORM must be 'ont' or 'hifi', got '${PLATFORM}'" >&2 exit 1 @@ -54,7 +56,6 @@ esac echo "=== Clair3 Variant Calling: ${SAMPLE} ===" echo "Platform: ${PLATFORM}" -echo "Model: ${MODEL_PATH}" echo "Input BAM: ${BAM}" echo "Reference: ${REF}" echo "Output: ${OUTPUT_DIR}/" @@ -71,6 +72,19 @@ done mkdir -p "$OUTPUT_DIR" +if [ "$PLATFORM" = hifi ]; then + MODEL_PATH="${CLAIR3_MODEL:-/opt/models/hifi_revio}" +else + # Inside the Clair3 image, so the check sees the image's /opt/models. + MODEL_ARGS=(--bam "/genome/${SAMPLE}/${ALIGN_DIR}/${SAMPLE}_sorted.bam" --models-dir /opt/models) + [ -z "${BASECALL_MODEL:-}" ] || MODEL_ARGS+=(--basecaller "$BASECALL_MODEL") + [ -z "${CLAIR3_MODEL:-}" ] || MODEL_ARGS+=(--model "$CLAIR3_MODEL") + MODEL_PATH=$(run_in --cpus 1 --memory 1g -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$CLAIR3_IMAGE" \ + /pgp-bin/og longread clair3-model "${MODEL_ARGS[@]}") \ + || { echo "ERROR: no Clair3 model chosen (see above); Clair3 did not run." >&2; exit 1; } +fi +echo "Model: ${MODEL_PATH}" + # --gender exists from Clair3 v2.0.3 on; male also gets the PAR BED, so the # pseudoautosomal regions stay diploid. SEX_ARGS=() diff --git a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh index dafa1c3b4..49d934c23 100755 --- a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh +++ b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh @@ -7,6 +7,13 @@ # intermediate files in the sample directory, removed after; a # run that leaves no gVCF fails and keeps the earlier VCF. # 03e male Clair3 gets --gender=male and the PAR BED; CLAIR3_MODEL wins. +# 03e ont the model comes from the BAM's @RG DS basecall_model= or from +# BASECALL_MODEL, through og longread clair3-model run for real +# (bin/og) against a fake /opt/models; no basecaller, one Clair3 +# has no model for, or a model the image lacks stops the step +# with the image's models listed, before Clair3 runs. +# 02b ont the basecaller model (BASECALL_MODEL, or the unaligned BAM's +# own @RG DS) goes into the aligned BAM's @RG as DS. # shellcheck source=../../scripts/ci/fake-docker/lib.sh . "${REPO_ROOT:?}/scripts/ci/fake-docker/lib.sh" @@ -42,6 +49,21 @@ case "$args" in [ "${FAKE_DV:-ok}" = nogvcf ] || bgzf "$(host_path "$(eq output_gvcf)")" ;; *"/opt/bin/run_clair3.sh "*) bgzf "$(host_path "$(eq output)")/merge_output.vcf.gz" ;; + " /pgp-bin/og longread clair3-model "*) + # The real og, with the image's /opt/models played by CASE_WORK/models. + run=() + for a in "$@"; do + case "$a" in + /pgp-bin/*) run+=("${REPO_ROOT}/bin/${a#/pgp-bin/}") ;; + /genome*) run+=("$(host_path "$a")") ;; + /opt/models*) run+=("${CASE_WORK}/models${a#/opt/models}") ;; + *) run+=("$a") ;; + esac + done + "${run[@]}" | sed "s#^${CASE_WORK}/models#/opt/models#" ;; + *" samtools index "*) + for a in "$@"; do last=$a; done + : > "$(host_path "$last").bai" ;; *" bcftools stats "*) printf 'SN\t0\tnumber of records:\t1\n' ;; *) exec "${CASE_WORK}/hook-outputs" image "$@" ;; @@ -104,6 +126,22 @@ expect_rc dv-nogvcf 1 [ -z "$(leftovers)" ] || fail "files left after the failed run: $(leftovers)" # --- 03e Clair3 --------------------------------------------------------------------- +"${REPO_ROOT}/bin/og" version > /dev/null || fail "og does not run here: build it into bin/.og (rust/og.sh, the Guard fake-docker job does)" +for m in r1041_e82_400bps_sup_v500 r1041_e82_400bps_sup_v520 r1041_e82_400bps_hac_v410 r941_prom_sup_g5014 hifi_revio; do + mkdir -p "${CASE_WORK}/models/${m}" +done +# mkbam FILE HEADER: a BAM that holds only HEADER (gzip reads as BGZF here). +mkbam() { + local n=${#2} + { printf 'BAM\001' + # shellcheck disable=SC2059 # the format is the four length bytes + printf "$(printf '\\x%02x\\x%02x\\x%02x\\x%02x' $((n & 255)) $((n >> 8 & 255)) $((n >> 16 & 255)) $((n >> 24 & 255)))" + printf '%s' "$2" + printf '\000\000\000\000'; } | gzip -c > "$1" +} +LRBAM="${GENOME_DIR}/sample1/aligned_longread/sample1_sorted.bam" +mkbam "$LRBAM" $'@HD\tVN:1.6\n@RG\tID:sample1\tSM:sample1\tPL:ONT\n' +clair3_ran() { grep -q 'run_clair3' "$FAKE_DOCKER_LOG"; } : > "$FAKE_DOCKER_LOG" run_expect 0 clair3-male env PLATFORM=ont CLAIR3_MODEL=/opt/models/r1041_e82_400bps_sup_v520 "${SCRIPTS}/03e-clair3.sh" sample1 male docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/r1041_e82_400bps_sup_v520 .*--gender=male --par_regions_bed=/pgp/par_grch38\.bed' \ @@ -115,3 +153,52 @@ if awk '/run_clair3/ && /--gender/ { bad = 1 } END { exit !bad }' "$FAKE_DOCKER_ fi docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/hifi_revio ' "Clair3 HiFi model path changed" run_expect 2 clair3-badsex env PLATFORM=ont "${SCRIPTS}/03e-clair3.sh" sample1 M + +# --- 03e ONT: the model follows the basecaller ------------------------------------- +mkbam "$LRBAM" $'@HD\tVN:1.6\n@RG\tID:sample1\tSM:sample1\tPL:ONT\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_hac@v4.1.0\n' +: > "$FAKE_DOCKER_LOG" +run_expect 0 clair3-from-rg env PLATFORM=ont "${SCRIPTS}/03e-clair3.sh" sample1 +docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/r1041_e82_400bps_hac_v410 ' \ + "Clair3 did not get the model of the BAM's basecaller (hac v4.1.0)" +: > "$FAKE_DOCKER_LOG" +run_expect 0 clair3-basecall-env env PLATFORM=ont BASECALL_MODEL=dna_r9.4.1_e8_sup@v3.3 "${SCRIPTS}/03e-clair3.sh" sample1 +docker_log_has 'run_clair3\.sh .*--model_path=/opt/models/r941_prom_sup_g5014 ' \ + "BASECALL_MODEL did not choose the R9.4.1 SUP model over the BAM's read group" + +# No basecaller anywhere, a fast basecaller, a model the image lacks, a +# CLAIR3_MODEL the image lacks: each stops before Clair3 runs. +mkbam "$LRBAM" $'@HD\tVN:1.6\n@RG\tID:sample1\tSM:sample1\tPL:ONT\n' +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-no-basecaller env PLATFORM=ont "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-no-basecaller 'names no basecaller model.*BASECALL_MODEL.*CLAIR3_MODEL' +output_has clair3-no-basecaller 'models in .*: hifi_revio r1041_e82_400bps_hac_v410 r1041_e82_400bps_sup_v500 r1041_e82_400bps_sup_v520 r941_prom_sup_g5014' +! clair3_ran || fail "Clair3 ran with no basecaller model known" +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-fast env PLATFORM=ont BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_fast@v5.0.0 "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-fast 'Clair3 has no model for the basecaller model dna_r10\.4\.1_e8\.2_400bps_fast@v5\.0\.0' +! clair3_ran || fail "Clair3 ran on a fast basecaller" +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-not-in-image env PLATFORM=ont BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v4.3.0 "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-not-in-image 'r1041_e82_400bps_sup_v430 .*is not in the image' +! clair3_ran || fail "Clair3 ran with a model the image lacks" +: > "$FAKE_DOCKER_LOG" +run_expect 1 clair3-bad-override env PLATFORM=ont CLAIR3_MODEL=/opt/models/no_such_model "${SCRIPTS}/03e-clair3.sh" sample1 +output_has clair3-bad-override 'no_such_model \(set by CLAIR3_MODEL\) is not in the image' +! clair3_ran || fail "Clair3 ran with a CLAIR3_MODEL the image lacks" + +# --- 02b ONT carries the basecaller model into the aligned BAM ---------------------- +mkdir -p "${GENOME_DIR}/sample1/fastq" +printf 'placeholder\n' | gzip -c > "${GENOME_DIR}/sample1/fastq/sample1.fastq.gz" +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-basecall-env env PLATFORM=ont BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 "${SCRIPTS}/02b-alignment-longread.sh" sample1 +docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.0\.0 ' \ + "step 02b did not put BASECALL_MODEL into the read group" +mkbam "${GENOME_DIR}/sample1/fastq/sample1.bam" $'@HD\tVN:1.6\n@RG\tID:run1\tPL:ONT\tDS:runid=r1 basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.2.0 modbase_models=x\n' +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-ubam env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" "${SCRIPTS}/02b-alignment-longread.sh" sample1 +docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.2\.0 ' \ + "step 02b did not carry the unaligned BAM's basecaller model into the read group" +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-hifi env PLATFORM=hifi INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 "${SCRIPTS}/02b-alignment-longread.sh" sample1 +if grep -q 'DS:basecall_model' "$FAKE_DOCKER_LOG"; then fail "step 02b wrote a basecaller model for HiFi reads"; fi +run_expect 2 longread-bad-basecaller env PLATFORM=ont BASECALL_MODEL=$'sup\tx' "${SCRIPTS}/02b-alignment-longread.sh" sample1 From 81f4a9e7136ea883fdbcc84bc542700e36086728 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:21:48 +0100 Subject: [PATCH 065/110] docs(longread): say how step 03e picks the Clair3 model Bead: plat-59 Bead: D14 --- CHANGELOG.md | 2 ++ docs/long-read-guide.md | 33 ++++++++++++++++++++++++++------- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..2e8f3af05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 03e picks the Clair3 model for ONT reads from their basecaller. Before, it used the Dorado v5.0.0 SUP model for every ONT sample unless `CLAIR3_MODEL` was set, so reads from another basecaller got the wrong model: Clair3 still wrote a VCF, with less accurate calls and no warning. Now step 02b writes the basecaller model into the aligned BAM's read group (`DS:basecall_model=...`), from the new `BASECALL_MODEL` or from the `basecall_model=` Dorado writes into an unaligned BAM. Step 03e runs `og longread clair3-model` inside the Clair3 image, which maps the name to the model directory (R10.4.1 400 bps SUP and HAC by version, R9.4.1 SUP and HAC) and checks that the directory is in the image. `CLAIR3_MODEL` still wins and is checked too. With no basecaller model known, one Clair3 has no model for (fast basecalls), or a model the image lacks, the step stops with exit 1 and lists the image's models. So an ONT run that worked before without a basecaller model in its BAM now stops until `BASECALL_MODEL` or `CLAIR3_MODEL` is set. HiFi does not change. The aligned BAM of an ONT run gains a `DS` field in its `@RG` line; no output file name changes. `docs/long-read-guide.md` has the mapping. + - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/long-read-guide.md b/docs/long-read-guide.md index f97909f2c..f35f05a6e 100644 --- a/docs/long-read-guide.md +++ b/docs/long-read-guide.md @@ -149,6 +149,12 @@ The script auto-detects input files in this order: Override with: `INPUT=${GENOME_DIR}/your_sample/fastq/custom_reads.fastq.gz PLATFORM=ont ./scripts/02b-alignment-longread.sh your_sample` +For ONT reads the script also records the basecaller model in the aligned BAM's read group (`DS:basecall_model=...`), where step 3e reads it to pick the Clair3 model. It takes `BASECALL_MODEL` when set, else the `basecall_model=` that Dorado writes into an unaligned BAM's read group. A FASTQ does not carry it, so set it for FASTQ input: + +```bash +BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 PLATFORM=ont ./scripts/02b-alignment-longread.sh your_sample +``` + > **Note:** The INPUT path must be **physically** inside `GENOME_DIR` because Docker only mounts that directory. Symlinks that point outside `GENOME_DIR` will not work — Docker cannot follow them. Copy or move the file instead. ### Step 3: Variant Calling (SNPs + Indels) @@ -167,7 +173,21 @@ PLATFORM=hifi ./scripts/03e-clair3.sh your_sample Output: `${GENOME_DIR}/your_sample/vcf_clair3/your_sample.vcf.gz` -Clair3 uses deep-learning models trained specifically on long-read error profiles. It auto-selects the correct model based on your PLATFORM setting. +Clair3 uses deep-learning models trained on long-read error profiles, one per platform and, for ONT, one per basecaller model. HiFi uses `hifi_revio`. For ONT the step picks the model that matches the reads' basecaller (`og longread clair3-model`): + +1. `CLAIR3_MODEL`, a model directory, when you set it. +2. Else `BASECALL_MODEL`, a Dorado model name such as `dna_r10.4.1_e8.2_400bps_sup@v5.0.0`. +3. Else the `basecall_model=` in the BAM's read group (step 2b writes it; a BAM aligned by Dorado has it too). + +| Basecaller model | Clair3 model | +|---|---| +| `dna_r10.4.1_e8.2_400bps_sup@vX.Y.Z` | `r1041_e82_400bps_sup_vXYZ` (for example v5.0.0 gives `r1041_e82_400bps_sup_v500`) | +| `dna_r10.4.1_e8.2_400bps_hac@vX.Y.Z` | `r1041_e82_400bps_hac_vXYZ` | +| R9.4.1 SUP (Dorado `dna_r9.4.1_e8_sup@v3.3`, Guppy `dna_r9.4.1_450bps_sup`) | `r941_prom_sup_g5014` | +| R9.4.1 HAC | `r941_prom_hac_g360+g422` | +| fast models, other pores or speeds, RNA | none | + +The pinned image holds the R10.4.1 SUP models v4.1.0, v5.0.0 and v5.2.0 and the HAC models v4.1.0, v5.0.0, v5.2.0 and v6.0.0. Before Clair3 runs, the step checks that the chosen directory exists in the image, `CLAIR3_MODEL` included. With no basecaller model known, one with no Clair3 model (fast basecalls), or a model the image lacks (for example SUP v4.3.0), the step stops with exit 1 and lists the image's models. It never falls back to another model: a model trained on other basecalls still writes a VCF, but every call is less accurate and nothing in the output says so. Set `CLAIR3_MODEL` to use a model by hand. #### Option B: DeepVariant (long-read mode) @@ -293,7 +313,7 @@ dorado basecaller sup pod5_dir/ > reads.bam dorado demux reads.bam # if barcoded ``` -The Clair3 model (`r1041_e82_400bps_sup_v500`) assumes R10.4.1 chemistry with SUP basecalling. Using a different chemistry or basecaller may reduce accuracy. +Step 3e picks the Clair3 model from the basecaller model (see Step 3 above), so keep the `basecall_model=` that Dorado writes into the BAM, or set `BASECALL_MODEL`. Clair3 has no model for fast basecalls. ### Read Length Distribution @@ -345,13 +365,12 @@ Long-read alignment uses more memory than short-read because the index is loaded # In the script, change --memory 16g to --memory 24g or higher ``` -### "Clair3 model not found" +### "names no basecaller model", "has no model" or "is not in the image" -The Docker image `CLAIR3_IMAGE` bundles models at `/opt/models/`. If you get a model-not-found error: +Step 3e stopped before Clair3 ran, because it could not match a model to the reads' basecaller. The message lists the models in `CLAIR3_IMAGE` (`/opt/models/`). -1. Verify the image is pulled: `docker images | grep clair3` -2. Check available models: `docker run --rm "${CLAIR3_IMAGE}" ls /opt/models/` (after `source versions.env` in the repository root) -3. If your ONT chemistry is different (e.g., R9.4.1), look for a matching model in the container +1. No basecaller model: set `BASECALL_MODEL` to the Dorado model the reads were basecalled with. Dorado's BAM names it in its `@RG` line (`samtools view -H reads.bam | grep '^@RG'`), and its FASTQ headers carry `basecall_model_version_id=`. +2. No Clair3 model or not in the image: set `CLAIR3_MODEL` to the listed model closest to your basecaller, for example `CLAIR3_MODEL=/opt/models/r1041_e82_400bps_sup_v520`, or use a newer `CLAIR3_IMAGE` that ships the matching model. ### "Sniffles2 needs long reads" or "Sniffles2 produces 0 SVs" From 0dd394234879c7e68b28f05b015c6bf6d1e394cf Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:22:08 +0100 Subject: [PATCH 066/110] fix(traits): say when a rule reading assumes which alleles share a copy A rule read without phase (SERPINA1, HFE, GC, APOL1, CAD9p21, MAPT) that gets one diplotype from two or more heterozygous sites assumes which alleles share a copy. The reading now ends with that assumption. og traits phase-sites sends those sites to WhatsHap, and when one phase block holds them the phase confirms the pair or reads it as other_haplotype. APOE, whose line already names both pairs, is unchanged. Bead: trait-02 Bead: trait-03 Bead: trait-05 Bead: trait-06 Bead: trait-25 --- rust/crates/og-steps/src/traits.rs | 339 +++++++++++++++++++++++++++-- 1 file changed, 316 insertions(+), 23 deletions(-) diff --git a/rust/crates/og-steps/src/traits.rs b/rust/crates/og-steps/src/traits.rs index 0bf6a38b0..16098ad04 100644 --- a/rust/crates/og-steps/src/traits.rs +++ b/rust/crates/og-steps/src/traits.rs @@ -735,6 +735,82 @@ fn read_phased(path: &str, wanted: &HashSet) -> Result { } Ok(out) } +/// The two haplotypes of a key that is one diplotype (`a/b`). An empty key +/// or several diplotypes (`a/b|c/d`, whose reading already says what phase +/// would decide) give `None`. +fn assumed_copies<'a>(r: &'a Rule, key: &str) -> Option<(&'a Hap, &'a Hap)> { + if key.is_empty() || key.contains('|') { + return None; + } + let (a, b) = key.split_once('/')?; + let hap = |n: &str| r.haps.iter().find(|h| h.name == n); + Some((hap(a)?, hap(b)?)) +} +/// "x and y", or "x, y and z". +fn join_and(items: &[String]) -> String { + match items { + [] => String::new(), + [one] => one.clone(), + [rest @ .., last] => format!("{} and {last}", rest.join(", ")), + } +} +/// Where the changed alleles (the alt of each heterozygous site) sit, given +/// the alleles of one copy: the other copy carries the rest. +fn placement(r: &Rule, het: &[usize], copy: &[String]) -> String { + let alt = |i: &usize| format!("{} {}", r.sites[*i].row["rsid"], r.sites[*i].row["alt"]); + let (on, off): (Vec, Vec) = het + .iter() + .partition(|i| copy[**i] == r.sites[**i].row["alt"]); + let all = join_and(&het.iter().map(alt).collect::>()); + if on.is_empty() || off.is_empty() { + format!("{all} sit on one copy") + } else if het.len() == 2 { + format!("{all} sit on different copies") + } else { + format!( + "{} sit on one copy and {} on the other", + join_and(&on.iter().map(alt).collect::>()), + join_and(&off.iter().map(alt).collect::>()) + ) + } +} +/// The reading when read-backed phase puts the alleles on copies the rule +/// does not describe, where the genotypes alone read `label`. +fn phased_apart( + r: &Rule, + het: &[usize], + copies: [(&Vec, Option); 2], + label: &str, +) -> String { + let rs: Vec<_> = r.sites.iter().map(|s| s.row["rsid"].as_str()).collect(); + let name = |(h, n): (&Vec, Option)| { + n.map_or_else( + || format!("{} at {}", h.join(","), rs.join(", ")), + |n| r.haps[n].name.clone(), + ) + }; + let changed = copies + .iter() + .filter(|(h, _)| h.iter().zip(&r.sites).any(|(a, s)| a == &s.row["alt"])) + .count(); + let unknown = copies.iter().filter(|(_, n)| n.is_none()).count(); + format!( + "Read-backed phase shows that {}: the copies are {} and {}{}. This rule does not describe {}, so the pair is not read; without phase these genotypes would read {label}.", + placement(r, het, copies[0].0), + name(copies[0]), + name(copies[1]), + if changed == 1 { + ", so one copy is changed and the other is not" + } else { + "" + }, + if unknown == 1 { + "that copy" + } else { + "those copies" + } + ) +} fn rule_line(r: &Rule, gt: &Genotypes, phased: Option<&Phased>) -> Row { let g: Vec<_> = r.sites.iter().map(|s| genotype(s, gt)).collect(); let rs: Vec<_> = r.sites.iter().map(|s| s.row["rsid"].as_str()).collect(); @@ -830,34 +906,86 @@ fn rule_line(r: &Rule, gt: &Genotypes, phased: Option<&Phased>) -> Row { } else { "not_needed" }; + let het: Vec<_> = g + .iter() + .enumerate() + .filter(|(_, g)| g.alleles[0] != g.alleles[1]) + .map(|(i, _)| i) + .collect(); + // The two copies read-backed phase gives, when one phase block holds + // every heterozygous site; the homozygous sites are on both copies. + let from_reads = || -> Option<(Vec, Vec)> { + let calls: Vec<_> = het + .iter() + .map(|i| phased.and_then(|p| p.get(&r.sites[*i].key()))) + .collect::>()?; + if !calls.iter().all(|v| v.2 == calls[0].2) { + return None; + } + let mut h1: Vec<_> = g.iter().map(|g| g.alleles[0].clone()).collect(); + let mut h2: Vec<_> = g.iter().map(|g| g.alleles[1].clone()).collect(); + for (i, c) in het.iter().zip(calls) { + h1[*i] = c.0.clone(); + h2[*i] = c.1.clone(); + } + Some((h1, h2)) + }; + let why = if phased.is_some() { + "no read or read pair covered them together" + } else { + "no phasing ran (no BAM, or phasing failed)" + }; + let mut caveat = String::new(); let key = if r.meta["needs_phase"] == "no" { - allowed(r, &g.iter().map(|g| g.alleles.clone()).collect::>()).join("|") + let key = allowed(r, &g.iter().map(|g| g.alleles.clone()).collect::>()).join("|"); + // One diplotype read without phase from two or more heterozygous + // sites assumes which alleles share a copy: read-backed phase checks + // it, and without it the reading says what it assumes. + let assumed = assumed_copies(r, &key); + match (het.len() >= 2, assumed) { + (true, Some((a, b))) => match from_reads() { + Some((h1, h2)) => { + phase = "read_backed"; + let n1 = r.haps.iter().position(|h| h.alleles == h1); + let n2 = r.haps.iter().position(|h| h.alleles == h2); + if let (Some(x), Some(y)) = (n1, n2) { + format!("{}/{}", r.haps[x.min(y)].name, r.haps[x.max(y)].name) + } else { + let label = r + .combos + .iter() + .rev() + .find(|c| c.key == key) + .map_or(key.as_str(), |c| c.label.as_str()); + return finish( + out, + phase, + ".", + Status::OtherHaplotype, + phased_apart(r, &het, [(&h1, n1), (&h2, n2)], label), + ); + } + } + None => { + caveat = format!( + " Phase unknown: this reading assumes {} (the copies {} and {}); {why}, so that is not checked.", + placement(r, &het, &a.alleles), + a.name, + b.name + ); + key + } + }, + _ => key, + } } else { - let het: Vec<_> = g - .iter() - .enumerate() - .filter(|(_, g)| g.alleles[0] != g.alleles[1]) - .map(|(i, _)| i) - .collect(); let mut h1: Vec<_> = g.iter().map(|g| g.alleles[0].clone()).collect(); let mut h2: Vec<_> = g.iter().map(|g| g.alleles[1].clone()).collect(); if het.len() >= 2 { - let calls: Option> = het - .iter() - .map(|i| phased.and_then(|p| p.get(&r.sites[*i].key()))) - .collect(); - if let Some(calls) = calls.filter(|c| c.iter().all(|v| v.2 == c[0].2)) { - for (i, c) in het.iter().zip(calls) { - h1[*i] = c.0.clone(); - h2[*i] = c.1.clone(); - } + if let Some((p1, p2)) = from_reads() { + (h1, h2) = (p1, p2); phase = "read_backed"; } else { - let why = if phased.is_some() { - "no read or read pair covered them together" - } else { - "no phasing ran (no BAM, or phasing failed)" - }; return finish( out, "unphased", @@ -900,7 +1028,13 @@ fn rule_line(r: &Rule, gt: &Genotypes, phased: Option<&Phased>) -> Row { .rev() .find(|c| !key.is_empty() && c.key == key) { - Some(c) => finish(out, phase, &c.label, Status::Called, c.reading.clone()), + Some(c) => finish( + out, + phase, + &c.label, + Status::Called, + format!("{}{caveat}", c.reading), + ), None => finish( out, phase, @@ -923,7 +1057,7 @@ fn stage_tsv(path: &str, columns: &[&str], rows: &[Row]) -> Result { } fn phase_vcf(path: &str, sample: &str, rules: &[Rule], gt: &Genotypes) -> Result { let mut sites = BTreeMap::new(); - for r in rules.iter().filter(|r| r.meta["needs_phase"] == "yes") { + for r in rules { let calls: Option> = r .sites .iter() @@ -932,6 +1066,17 @@ fn phase_vcf(path: &str, sample: &str, rules: &[Rule], gt: &Genotypes) -> Result (g.status == Status::Called).then_some(g) }) .collect(); + // A rule that reads without phase sends its sites only when the + // genotypes read one diplotype that assumes which alleles share a + // copy: read-backed phase then checks that assumption. + let calls = calls.filter(|c| { + r.meta["needs_phase"] == "yes" + || assumed_copies( + r, + &allowed(r, &c.iter().map(|g| g.alleles.clone()).collect::>()).join("|"), + ) + .is_some() + }); if let Some(calls) = calls { let het: Vec<_> = r .sites @@ -1457,6 +1602,154 @@ mod tests { let gt = genotypes(r, &[0, 0, 0]); assert_eq!(rule_line(r, >, None)["phase"], "not_needed"); } + /// A rule read without phase (HFE, SERPINA1, GC, CAD9p21, MAPT) that + /// gets one diplotype from two heterozygous sites assumes which alleles + /// share a copy. Unphased, the reading says so; read-backed phase in one + /// block confirms it, or puts the alleles on copies the rule does not + /// describe and the pair is not read. + #[test] + fn a_double_heterozygote_read_without_phase_says_what_it_assumes() { + let (_, rules) = assets(); + let rule = |id: &str| rules.iter().find(|r| r.id == id).unwrap(); + // Phase of each site: 0|1 puts the alt on the second copy. + let phased = |r: &Rule, gts: &[&str], ps: [&str; 2]| -> Phased { + r.sites + .iter() + .zip(gts) + .zip(ps) + .map(|((s, gt), ps)| { + let (a, b) = gt.split_once('|').unwrap(); + let base = |i: &str| s.row[if i == "1" { "alt" } else { "ref" }].clone(); + (s.key(), (base(a), base(b), ps.to_owned())) + }) + .collect() + }; + for (id, label, place) in [ + ( + "HFE", + "C282Y/H63D", + "sit on different copies (the copies C282Y and H63D)", + ), + ( + "SERPINA1", + "PiSZ", + "sit on different copies (the copies S and Z)", + ), + ( + "GC", + "Gc1S/Gc2", + "sit on different copies (the copies Gc1S and Gc2)", + ), + ( + "CAD9p21", + "one risk copy", + "sit on one copy (the copies nonrisk and risk)", + ), + ("MAPT", "H1/H2", "sit on one copy (the copies H1 and H2)"), + ] { + let r = rule(id); + let gt = genotypes(r, &[1, 1]); + let plain = r.combos.iter().find(|c| c.label == label).unwrap(); + let line = rule_line(r, >, None); + assert_eq!( + (&line["status"][..], &line["result"][..], &line["phase"][..]), + ("called", label, "not_used"), + "{id}" + ); + assert!(line["reading"].starts_with(&plain.reading), "{id}"); + assert!( + line["reading"].contains("Phase unknown"), + "{id}: {}", + line["reading"] + ); + assert!(line["reading"].contains(place), "{id}: {}", line["reading"]); + assert!(line["reading"].contains("no phasing ran"), "{id}"); + let rs = &r.sites; + assert!( + line["reading"].contains(&format!( + "{} {} and {} {}", + rs[0].row["rsid"], rs[0].row["alt"], rs[1].row["rsid"], rs[1].row["alt"] + )), + "{id}: {}", + line["reading"] + ); + // Phased as the reading assumes: the plain reading, no caveat. + let same = if place.contains("different") { + ["1|0", "0|1"] + } else { + ["1|0", "1|0"] + }; + let other = if place.contains("different") { + ["1|0", "1|0"] + } else { + ["1|0", "0|1"] + }; + let line = rule_line(r, >, Some(&phased(r, &same, ["5", "5"]))); + assert_eq!( + (&line["status"][..], &line["result"][..], &line["phase"][..]), + ("called", label, "read_backed"), + "{id}" + ); + assert_eq!(line["reading"], plain.reading, "{id}"); + // Two phase blocks are no phase: the caveat stays. + let line = rule_line(r, >, Some(&phased(r, &same, ["5", "6"]))); + assert_eq!(line["phase"], "not_used", "{id}"); + assert!(line["reading"].contains("no read or read pair"), "{id}"); + // Phased the other way: not the assumed pair, not read. + let line = rule_line(r, >, Some(&phased(r, &other, ["5", "5"]))); + assert_eq!( + (&line["status"][..], &line["result"][..], &line["phase"][..]), + ("other_haplotype", ".", "read_backed"), + "{id}" + ); + assert!(line["reading"].contains("not read"), "{id}"); + assert!( + line["reading"].contains(&format!("would read {label}.")), + "{id}: {}", + line["reading"] + ); + // One heterozygous site assumes nothing. + for choices in [[1, 0], [0, 1], [2, 1], [1, 2]] { + let line = rule_line(r, &genotypes(r, &choices), None); + assert!( + !line["reading"].contains("Phase unknown"), + "{id} {choices:?}" + ); + } + } + // HFE with C282Y and H63D on one copy: one copy changed, the other wt. + let r = rule("HFE"); + let line = rule_line( + r, + &genotypes(r, &[1, 1]), + Some(&phased(r, &["0|1", "0|1"], ["5", "5"])), + ); + assert_eq!( + line["reading"], + "Read-backed phase shows that rs1800562 A and rs1799945 G sit on one copy: the copies \ + are wt and A,G at rs1800562, rs1799945, so one copy is changed and the other is not. \ + This rule does not describe that copy, so the pair is not read; without phase these \ + genotypes would read C282Y/H63D." + ); + // APOE's double heterozygote line already names the other pair. + let apoe = rule("APOE"); + let line = rule_line(apoe, &genotypes(apoe, &[1, 1]), None); + assert_eq!(line["result"], "e2/e4"); + assert!(!line["reading"].contains("Phase unknown")); + // WhatsHap gets the two HFE sites, not APOE's. + let scratch = Scratch::new(); + let path = scratch.put("phase", ""); + let mut gt = genotypes(r, &[1, 1]); + gt.extend(genotypes(apoe, &[1, 1])); + assert_eq!(phase_vcf(&path, "S", &rules, >).unwrap(), 2); + let text = std::fs::read_to_string(&path).unwrap(); + assert!(text.contains("rs1800562") && text.contains("rs1799945")); + assert!(!text.contains("rs429358")); + assert_eq!( + phase_vcf(&path, "S", &rules, &genotypes(r, &[1, 2])).unwrap(), + 0 + ); + } /// The call floor (decision D10): a site whose GQ is below 20, or whose /// record the caller filtered, is not read. GQ 20, a missing GQ and /// DeepVariant's RefCall stay readable. From 770bd8c93f9f9e0c3730b5cf8db0db7101ac7297 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:22:08 +0100 Subject: [PATCH 067/110] test(e2e): check the HFE phase caveat and the HFE phase sites in rust-c2b-traits Bead: trait-02 Bead: trait-03 Bead: trait-05 Bead: trait-06 Bead: trait-25 --- tests/e2e/rust-c2b-traits.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/e2e/rust-c2b-traits.sh b/tests/e2e/rust-c2b-traits.sh index e5e2e3852..a6c5537ab 100755 --- a/tests/e2e/rust-c2b-traits.sh +++ b/tests/e2e/rust-c2b-traits.sh @@ -5,19 +5,22 @@ OG=${OG:-${REPO}/bin/og} TABLE="${REPO}/assets/traits.tsv" RULES="${REPO}/assets/genotype_rules.tsv" G="${CASE_TMP}/g.tsv" -printf 'chr19\t44908684\tT\tC\tT/C\t40\nchr19\t44908822\tC\tT\tC/T\t40\nchr7\t141973545\tC\tG\tC/G\t30\nchr7\t141972905\tG\tA\tG/A\t31\nchr7\t141972804\tT\tC\tT/C\t32\n' > "$G" +printf 'chr6\t26090951\tC\tG\tC/G\t40\nchr6\t26092913\tG\tA\tG/A\t40\nchr19\t44908684\tT\tC\tT/C\t40\nchr19\t44908822\tC\tT\tC/T\t40\nchr7\t141973545\tC\tG\tC/G\t30\nchr7\t141972905\tG\tA\tG/A\t31\nchr7\t141972804\tT\tC\tT/C\t32\n' > "$G" "$OG" traits table --table "$TABLE" --rules "$RULES" --genotypes "$G" --sample S \ --out "${CASE_TMP}/traits.tsv" --rules-out "${CASE_TMP}/rules.tsv" check_eq 'traits table exits 0' "$?" 0 check_eq 'APOE double heterozygote is e2/e4' "$(awk -F'\t' '$1 == "APOE" {print $10}' "${CASE_TMP}/rules.tsv")" e2/e4 +check_eq 'HFE double heterozygote is C282Y/H63D' "$(awk -F'\t' '$1 == "HFE" {print $10}' "${CASE_TMP}/rules.tsv")" C282Y/H63D +check 'HFE reading says it assumes different copies' has 'Phase unknown: this reading assumes rs1800562 A and rs1799945 G sit on different copies' "$(awk -F'\t' '$1 == "HFE" {print $12}' "${CASE_TMP}/rules.tsv")" +check 'APOE reading adds no phase caveat' lacks 'Phase unknown' "$(awk -F'\t' '$1 == "APOE" {print $12}' "${CASE_TMP}/rules.tsv")" check_eq 'the taster rule needs phase' "$(awk -F'\t' '$1 == "TAS2R38" {print $11}' "${CASE_TMP}/rules.tsv")" unphased check_eq 'APOE line occurs exactly once' "$(grep -c '^rs429358+rs7412' "${CASE_TMP}/traits.tsv")" 1 # shellcheck disable=SC2016 # awk field references check 'absent LCT has no inferred genotype' awk -F'\t' '$1 == "rs4988235" {ok = ($6 == "." && $7 == "not_covered")} END {exit !ok}' "${CASE_TMP}/traits.tsv" "$OG" traits phase-sites --rules "$RULES" --genotypes "$G" --sample S --out "${CASE_TMP}/phase.vcf" check_eq 'phase-sites exits 0' "$?" 0 -check_eq 'only the three taster sites need phase' "$(grep -cv '^#' "${CASE_TMP}/phase.vcf")" 3 -check_eq 'phase sites are in genome order' "$(grep -v '^#' "${CASE_TMP}/phase.vcf" | cut -f2 | paste -sd, -)" 141972804,141972905,141973545 +check_eq 'the two HFE and three taster sites need phase, APOE none' "$(grep -cv '^#' "${CASE_TMP}/phase.vcf")" 5 +check_eq 'phase sites are in genome order' "$(grep -v '^#' "${CASE_TMP}/phase.vcf" | cut -f2 | paste -sd, -)" 26090951,26092913,141972804,141972905,141973545 sed 's/44908684\tT\t/44908684\tG\t/' "$G" > "${CASE_TMP}/bad.tsv" "$OG" traits table --table "$TABLE" --rules "$RULES" --genotypes "${CASE_TMP}/bad.tsv" --sample S \ --out "${CASE_TMP}/bad-out.tsv" --rules-out "${CASE_TMP}/bad-rules.tsv" > "${CASE_TMP}/bad.log" 2>&1 From e84323d8cf9e7840885cf30df6bf2ce7b51ad812 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:22:08 +0100 Subject: [PATCH 068/110] docs(traits): describe the phase caveat of rules read without phase Bead: trait-02 Bead: trait-03 Bead: trait-05 Bead: trait-06 Bead: trait-25 --- CHANGELOG.md | 1 + assets/genotype_rules.tsv | 9 ++++++--- docs/42-traits.md | 12 ++++++------ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..7d3ad8026 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 42 now says when a genotype rule's reading assumes which variants share a copy. Heterozygous at both HFE sites read as C282Y/H63D, one change on each copy, with no word that the two changes could sit on one copy. The same held for SERPINA1 PiSZ and GC Gc1S/Gc2, and the other way round for APOL1 G0/G1, CAD9p21 "one risk copy" and MAPT H1/H2, which assume both sites sit on one copy. Such a reading now ends with "Phase unknown: this reading assumes ...". `og traits phase-sites` also sends those sites to WhatsHap. When one phase block holds them, a confirmed pair reads without the note (`phase` read_backed), and a pair with a copy the rule does not describe reads `other_haplotype`, not read: C282Y and H63D on one copy say that one copy is changed and the other is not. The columns of `_genotype_rules.tsv` stay the same; only the `reading`, `phase` and `status` values of these double heterozygotes change. APOE is unchanged: its line already names both pairs. Part of #411 (trait-02, trait-03, trait-05, trait-06, trait-25). - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/assets/genotype_rules.tsv b/assets/genotype_rules.tsv index c4dd1b1e1..8110a12ab 100644 --- a/assets/genotype_rules.tsv +++ b/assets/genotype_rules.tsv @@ -15,7 +15,10 @@ # genotypes allow several diplotypes, all of them in that order, joined by |. # needs_phase yes: with two or more heterozygous sites the result needs to know which alleles sit # on the same copy (WhatsHap, from the reads); without that the rule is unphased, not read. -# needs_phase no: the combination line is the one of every diplotype the genotypes allow. +# needs_phase no: the combination line is the one of every diplotype the genotypes allow. When +# that is one diplotype from two or more heterozygous sites, it assumes which alleles share a copy: +# the reading ends with that assumption, and read-backed phase, when one block holds the sites, +# confirms it or reads the pair as other_haplotype. # ancestry: yes when the reading depends on ancestry (the note says how). rule APOE APOE APOE alleles (e2, e3, e4) no yes Odds ratios from a meta-analysis of people of European descent (Farrer 1997); the e4 effect was weaker in African American and Hispanic people and stronger in Japanese people. Step 25's Alzheimer's score (PGS000334) includes the same two sites; docs/42-traits.md says why step 06 does not list APOE. 8346443,9343467 site APOE rs429358 chr19 44908684 T C @@ -62,7 +65,7 @@ combination SERPINA1 M/Z PiMZ One Z copy: a carrier, with an intermediate alpha- combination SERPINA1 S/S PiSS Two S copies: a mildly lowered level, not usually a deficiency that raises the risk of disease. combination SERPINA1 S/Z PiSZ One S and one Z copy: a moderate deficiency, with a raised risk of emphysema, above all in smokers. Worth a serum level and a talk with a doctor. combination SERPINA1 Z/Z PiZZ Two Z copies: severe alpha-1 antitrypsin deficiency, with a raised risk of early emphysema and of liver disease. Worth a serum level and a talk with a doctor. -rule HFE HFE HFE haemochromatosis genotype (C282Y, H63D) no yes The two HFE missense changes of Feder 1996: C282Y (rs1800562), found homozygous in 83% of 178 patients with hereditary haemochromatosis, and H63D (rs1799945). The two sites are about 2 kb apart and read without phase: heterozygous at both reads as C282Y/H63D, one change on each copy. Many people with a risk genotype never build up iron; ferritin and transferrin saturation tell. The secondary-findings list reports C282Y homozygotes too (assets/acmg_sf.tsv); this line is the reading of every genotype. C282Y is most common in people of northern European descent. 8696333 +rule HFE HFE HFE haemochromatosis genotype (C282Y, H63D) no yes The two HFE missense changes of Feder 1996: C282Y (rs1800562), found homozygous in 83% of 178 patients with hereditary haemochromatosis, and H63D (rs1799945). The two sites are about 2 kb apart, too far for most read pairs to phase: heterozygous at both reads as C282Y/H63D, one change on each copy, and the reading says it assumes that. Many people with a risk genotype never build up iron; ferritin and transferrin saturation tell. The secondary-findings list reports C282Y homozygotes too (assets/acmg_sf.tsv); this line is the reading of every genotype. C282Y is most common in people of northern European descent. 8696333 site HFE rs1800562 chr6 26092913 G A site HFE rs1799945 chr6 26090951 C G haplotype HFE wt G,C @@ -86,7 +89,7 @@ combination GC Gc1F/Gc2 Gc1F/Gc2 One Gc1F and one Gc2 copy: Powe 2013 gave prote combination GC Gc1S/Gc1S Gc1S/Gc1S Two Gc1S copies: in Powe 2013 this group had the highest vitamin D-binding protein level (mean 468 micrograms per millilitre). combination GC Gc1S/Gc2 Gc1S/Gc2 One Gc1S and one Gc2 copy: Powe 2013 gave protein levels for the homozygous groups and Gc1F/Gc1S only. combination GC Gc2/Gc2 Gc2/Gc2 Two Gc2 copies: in Powe 2013 this group had an intermediate protein level (mean 190 micrograms per millilitre). -rule CAD9p21 CDKN2B-AS1 Chromosome 9p21 heart disease risk haplotype no yes Two tags of the 9p21 risk haplotype near CDKN2A and CDKN2B: rs10757278 (G, Helgadottir 2007, myocardial infarction) and rs1333049 (C, the strongest coronary artery disease signal of the WTCCC 2007 scan). McPherson 2007 found the same interval, with no link to cholesterol, blood pressure or diabetes. The two are read together without phase; a copy with only one of the two risk alleles is not read. The studies were of people of European descent. 17478679,17554300,17478681 +rule CAD9p21 CDKN2B-AS1 Chromosome 9p21 heart disease risk haplotype no yes Two tags of the 9p21 risk haplotype near CDKN2A and CDKN2B: rs10757278 (G, Helgadottir 2007, myocardial infarction) and rs1333049 (C, the strongest coronary artery disease signal of the WTCCC 2007 scan). McPherson 2007 found the same interval, with no link to cholesterol, blood pressure or diabetes. The two are read together as tags of one haplotype; heterozygous at both reads as one risk copy, and the reading says it assumes both risk alleles sit on that copy. A copy with only one of the two risk alleles is not read. The studies were of people of European descent. 17478679,17554300,17478681 site CAD9p21 rs10757278 chr9 22124478 A G site CAD9p21 rs1333049 chr9 22125504 G C haplotype CAD9p21 nonrisk A,G diff --git a/docs/42-traits.md b/docs/42-traits.md index 66e419782..d150de9fa 100644 --- a/docs/42-traits.md +++ b/docs/42-traits.md @@ -11,7 +11,7 @@ These are the results most people find easiest to read, and the pipeline had no ## Tool - **bcftools** (`bcftools convert --gvcf2vcf`, `view`, `query`) reads the genotypes at the table's positions from the gVCF. -- **WhatsHap** (`whatshap phase`) phases the heterozygous sites of a rule that needs phase from the BAM's reads. +- **WhatsHap** (`whatshap phase`) phases from the BAM's reads the heterozygous sites of a rule that needs phase, and those of a rule read without phase whose genotypes assume which alleles share a copy. - **`og traits table`** (Rust) reads each genotype against the table, and each rule against the rule table. ## Docker Image @@ -88,10 +88,10 @@ Some results need several sites read together: APOE's ε alleles come from two s The two haplotypes a person's genotypes make are looked up by their alleles, and the pair gives the combination line. A heterozygous site does not say which of its alleles shares a copy with the alleles at the other sites, so: -- **`needs_phase no`** (APOE): the combination line is the one listing every pair the genotypes allow. Heterozygous at both APOE sites allows ε2/ε4 and ε1/ε3; that line reads ε2/ε4 and says it could also be the rare ε1/ε3. +- **`needs_phase no`** (APOE, APOL1, SERPINA1, HFE, GC, CAD9p21, MAPT): the combination line is the one listing every pair the genotypes allow. Heterozygous at both APOE sites allows ε2/ε4 and ε1/ε3; that line reads ε2/ε4 and says it could also be the rare ε1/ε3. When the genotypes allow one pair only but two or more sites are heterozygous, that pair is an assumption about which alleles share a copy: heterozygous at both HFE sites reads C282Y/H63D only if C282Y and H63D sit on different copies. Such a reading ends with what it assumes, for example "Phase unknown: this reading assumes rs1800562 A and rs1799945 G sit on different copies (the copies C282Y and H63D); no phasing ran (no BAM, or phasing failed), so that is not checked." Those sites also go to WhatsHap (`og traits phase-sites`); APOE's do not, because its line already names both pairs. When one phase block holds them all, the phase decides (`phase` read_backed): the pair it confirms reads without the caveat, and a pair with a copy the rule does not describe is `other_haplotype`, not read. Its reading says where the reads put the alleles, and, when only one copy carries any change, "one copy is changed and the other is not". Phased C282Y and H63D on one copy read that way, with the other copy wt. - **`needs_phase yes`** (TAS2R38): with one heterozygous site or none, the two haplotypes follow from the genotypes. With two or more, WhatsHap phases them from the reads: a read, or the two reads of a pair, that covers two of the sites shows which alleles sit on one copy. When every heterozygous site of the rule lands in one phase block the rule is read (`phase` read_backed); otherwise it is `unphased`, not read. The three TAS2R38 sites lie within 741 bases, so a read pair can span them, but not always. -`status` of a rule line is `called`, `not_covered` (a site has no genotype), `low_gq` (a site's call has a GQ below 20 or a caller filter: not read, no result), `other_allele` (an allele the rule does not describe), `other_haplotype` (a copy that is none of the rule's haplotypes; it names the alleles) or `unphased`. `phase` is `not_used` (needs_phase no), `not_needed`, `read_backed` or `unphased`. +`status` of a rule line is `called`, `not_covered` (a site has no genotype), `low_gq` (a site's call has a GQ below 20 or a caller filter: not read, no result), `other_allele` (an allele the rule does not describe), `other_haplotype` (a copy that is none of the rule's haplotypes; it names the alleles) or `unphased`. `phase` is `not_used` (needs_phase no, and no phase block held the heterozygous sites), `not_needed`, `read_backed` or `unphased`. The rules today: @@ -106,7 +106,7 @@ The rules today: | CAD9p21 | rs10757278, rs1333049 | nonrisk, risk | 17478679, 17554300, 17478681 | | MAPT | rs1052553, rs8070723 | H1, H2 | 15654335, 19912324, 21685912 | -The six rules after TAS2R38 need no phase. Their sites lie close together on one copy (the two APOL1 G1 changes were in perfect linkage disequilibrium in Genovese et al. 2010; the 9p21 and 17q21.31 tags each mark one haplotype), or, for HFE, a double heterozygote reads as one change on each copy. A copy the rule does not describe, such as a 9p21 copy with only one of the two risk alleles, is `other_haplotype`, not read. What each rule leaves out, said in its note: +The six rules after TAS2R38 are read without phase. A double heterozygote of each rests on an assumption, and the reading says it (see `needs_phase no` above). SERPINA1 PiSZ, HFE C282Y/H63D and GC Gc1S/Gc2 assume the two changes sit on different copies. APOL1 G0/G1, CAD9p21 "one risk copy" and MAPT H1/H2 assume both sites sit on one copy: the two APOL1 G1 changes were in perfect linkage disequilibrium in Genovese et al. (2010), and the 9p21 and 17q21.31 tags each mark one haplotype. A copy the rule does not describe, such as a 9p21 copy with only one of the two risk alleles, is `other_haplotype`, not read. What each rule leaves out, said in its note: - APOL1 G2 (rs71785313) is a 6-base deletion. The rule table reads single-base sites only, so the rule itself reads G1, and a G2 copy reads as G0 there. The HTML and text reports read G2 beside the rule (`og summary collect`, the `apol1` module of `rust/crates/og-summary/src/collect/group_c/traits.rs`) from the sample's gVCF, or its VCF when there is no gVCF, and show the G1 plus G2 result under "With G2": G1/G2, G2/G2 and G1/G1 are the high-risk genotype. Two G2 copies read G2/G2 even when the G1 sites were not read. A VCF without reference blocks cannot tell a reference base from a position with no reads, so there a result with no G2 copy is marked `(no G2 call)`. The G2 reading uses the same floor as the trait sites: a call over the deletion span with a GQ below 20, a G2 call whose FILTER is not `PASS` or `.`, or a reference call whose FILTER is not `PASS`, `.` or `RefCall`, leaves G2 not read, so two G2 copies at GQ 5 never read G2/G2. The Nextflow report gets the sample's gVCF too (DeepVariant's, or the samplesheet's `gvcf` column), so both runs read the gVCF when there is one. - SERPINA1: M is any copy with neither S nor Z; rarer deficiency and null alleles are not read. A serum level confirms a deficiency. @@ -139,13 +139,13 @@ The APOE line is the APOE rule of `assets/genotype_rules.tsv`, written into the ## Runtime -Seconds: bcftools reads the gVCF at the table's positions through its index (36 rows and 17 rule sites), and WhatsHap, when a rule needs it, reads the BAM over three sites within 741 bases. +Seconds: bcftools reads the gVCF at the table's positions through its index (36 rows and 17 rule sites), and WhatsHap, when a rule has two or more heterozygous sites to phase, reads the BAM over them (each rule's sites lie within about 7 kb). ## Notes - A reading is what the cited studies found on average in the people they studied. It is not a diagnosis, and for most traits it says little about one person. - Rows marked `ancestry` read differently in other populations; their note says how. Lactase persistence is the clearest case: -13910T explains it in Europeans, and the three African alleles have their own rows. -- Each traits table row is read alone. The genotype rules read several sites together: APOE, the TAS2R38 taster haplotype with read-backed phase, and the six rules of the table above. Two different MC1R red-hair variants on the same or on different copies are still read one by one; their note says so. +- Each traits table row is read alone. The genotype rules read several sites together: APOE, the TAS2R38 taster haplotype with read-backed phase, and the six rules of the table above, which use read-backed phase when it covers their heterozygous sites. Two different MC1R red-hair variants on the same or on different copies are still read one by one; their note says so. - SNVs only; the table has no indel and no chrX, chrY or chrM row. - Positions with no genotype (no reads, or a no-call) are listed as not read. On the e2e fixture, a small slice of the HG002 genome, only the table positions inside its slices are read, and the e2e case checks their genotypes against the GIAB truth. - The licence: the readings, notes and table are this project's own text, GPL-3.0-or-later like the rest of the repository. From a38bd34d88d8fac82254b8e451e58befcac785cb Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:25:00 +0100 Subject: [PATCH 069/110] feat(ancestry): add our own copying-model painting engine to og-admix The hidden state is (ancestry, reference haplotype). Ancestry events come at T per Morgan and draw from mu, copying jumps inside an ancestry at rho_a per Morgan, and the emission is 1 - epsilon on a match. Each forward and backward step is O(H) through per-group totals, forward values are kept every sqrt(M) sites, references are bit-packed, and up to 5 EM rounds over the whole genome fit the parameters. Written from the published equations. Bead: D5 Bead: D14 --- rust/crates/og-admix/src/paint.rs | 396 ++++++++++++++++++++++++- rust/crates/og-admix/src/paint/bits.rs | 161 ++++++++++ rust/crates/og-admix/src/paint/hmm.rs | 332 +++++++++++++++++++++ 3 files changed, 887 insertions(+), 2 deletions(-) create mode 100644 rust/crates/og-admix/src/paint/bits.rs create mode 100644 rust/crates/og-admix/src/paint/hmm.rs diff --git a/rust/crates/og-admix/src/paint.rs b/rust/crates/og-admix/src/paint.rs index 1fc0f571c..71190b9ea 100644 --- a/rust/crates/og-admix/src/paint.rs +++ b/rust/crates/og-admix/src/paint.rs @@ -1,2 +1,394 @@ -//! Local-ancestry painting, our own engine in place of RFMix. Empty until -//! its unit of the 1.0.0 plan lands. +//! Local-ancestry painting, our own engine in place of RFMix: a Li and +//! Stephens copying model whose hidden state is (ancestry, reference +//! haplotype), as Browning, Waples and Browning published it for FLARE +//! (AJHG 2023). The code is written from the published equations; no FLARE +//! or RFMix source was read. +//! +//! Along a target haplotype, ancestry events come at rate T per Morgan, and +//! each draws the new ancestry from the proportions mu (it may be the old +//! one) and a reference haplotype of it uniformly. Inside an ancestry a the +//! copied haplotype jumps at rate rho_a per Morgan to one drawn uniformly +//! from the n_a haplotypes of a. The copied haplotype carries the target's +//! allele with chance 1 - epsilon. [`hmm`] has the equations; each forward +//! and backward step costs O(H) through per-group totals, and the forward +//! values are kept only every sqrt(M) sites. +//! +//! [`paint`] fits mu, T, epsilon and rho_a by expectation-maximisation over +//! the whole genome, every chromosome and haplotype at once, for up to +//! [`Options::rounds`] rounds, and calls each site's ancestry as the group +//! of highest posterior. The start is [`Params::initial`]: mu from the +//! continental projection, T = 10, epsilon = 0.01 and rho_a = 4 Ne / n_a. +//! Chromosomes and haplotypes run on [`Options::threads`] threads; the +//! sums are taken in a fixed order, so any thread count gives the same +//! bytes. +//! +//! Memory: the reference haplotypes take M H / 8 bytes over all M sites of +//! the genome, each running haplotype about 16 sqrt(M_c) H bytes for its +//! chromosome of M_c sites, and the posteriors 8 A bytes per site and +//! haplotype for A groups. + +pub mod bits; +pub mod hmm; + +pub use bits::{Bits, RefPanel}; +pub use hmm::{Fb, Stats, checkpoint_block, forward_backward}; + +use crate::simulate::MAX_PER_MORGAN; +use crate::{Error, Result, repr}; +use std::io::Write; +use std::sync::atomic::{AtomicUsize, Ordering}; + +/// The effective population size the start of rho_a takes, 4 Ne / n_a per +/// Morgan. +pub const DEFAULT_NE: f64 = 10_000.0; +/// The start of T, ancestry events per Morgan. +pub const START_T: f64 = 10.0; +/// The start of epsilon. +pub const START_EPSILON: f64 = 0.01; +/// The most EM rounds [`paint`] runs by default. +pub const DEFAULT_ROUNDS: usize = 5; +/// EM stops early when no parameter moves by more than this share. +pub const TOLERANCE: f64 = 1e-4; + +/// The model's parameters. +#[derive(Debug, Clone, PartialEq)] +pub struct Params { + /// The proportion of each group, summing to 1. + pub mu: Vec, + /// T, ancestry events per Morgan. + pub generations: f64, + /// The chance that the copied haplotype does not carry the allele. + pub epsilon: f64, + /// rho_a, copying jumps per Morgan inside each group. + pub rho: Vec, +} + +impl Params { + /// The start: `mu` (the continental projection), T = 10, epsilon = + /// 0.01 and rho_a = 4 `ne` / n_a, `sizes` holding n_a. + pub fn initial(mu: Vec, sizes: &[usize], ne: f64) -> Params { + Params { + mu, + generations: START_T, + epsilon: START_EPSILON, + rho: sizes.iter().map(|&n| 4.0 * ne / n as f64).collect(), + } + } + + /// Checks the numbers for `groups` groups: mu above 0 and summing to 1 + /// (within 1e-6), T above 0 and at most [`MAX_PER_MORGAN`], epsilon + /// above 0 and at most 0.5, every rho_a finite and above 0. + pub fn check(&self, groups: usize) -> Result<()> { + if self.mu.len() != groups || self.rho.len() != groups { + return Err(Error(format!( + "{} proportions and {} jump rates for {groups} groups", + self.mu.len(), + self.rho.len() + ))); + } + if let Some(w) = self.mu.iter().find(|w| !(w.is_finite() && **w > 0.0)) { + return Err(Error(format!("a proportion is {w}: each must be above 0"))); + } + let total: f64 = self.mu.iter().sum(); + if (total - 1.0).abs() > 1e-6 { + return Err(Error(format!( + "the ancestry proportions sum to {total}, not 1" + ))); + } + let t = self.generations; + if !(t.is_finite() && t > 0.0 && t <= MAX_PER_MORGAN) { + return Err(Error(format!( + "T is {t}: ancestry events per Morgan must be above 0 and at most {MAX_PER_MORGAN}" + ))); + } + let eps = self.epsilon; + if !(eps.is_finite() && eps > 0.0 && eps <= 0.5) { + return Err(Error(format!( + "epsilon is {eps}: it must be above 0 and at most 0.5" + ))); + } + if let Some(r) = self.rho.iter().find(|r| !(r.is_finite() && **r > 0.0)) { + return Err(Error(format!( + "a copying jump rate is {r}: each must be above 0" + ))); + } + Ok(()) + } + + /// The next parameters from the expected counts of a pass. + fn update(&self, s: &Stats) -> Params { + let groups = self.mu.len(); + // mu: the mean posterior of each ancestry, kept above 1e-6 so no + // group drops out of the model. + let mut mu: Vec = s.ancestry.iter().map(|x| (x / s.sites).max(1e-6)).collect(); + let total: f64 = mu.iter().sum(); + mu.iter_mut().for_each(|x| *x /= total); + // T: expected events per Morgan walked. + let generations = if s.morgans > 0.0 { + (s.events / s.morgans).clamp(1e-3, MAX_PER_MORGAN) + } else { + self.generations + }; + let epsilon = (s.mismatches / s.sites).clamp(1e-6, 0.5); + let rho = (0..groups) + .map(|a| { + if s.exposure[a] > 0.0 { + (s.jumps[a] / s.exposure[a]).clamp(1e-3, 1e7) + } else { + self.rho[a] + } + }) + .collect(); + Params { + mu, + generations, + epsilon, + rho, + } + } + + /// The largest share by which any parameter differs from `other`. + fn moved(&self, other: &Params) -> f64 { + let rel = |a: f64, b: f64| (a - b).abs() / b.abs().max(f64::MIN_POSITIVE); + let mut m = rel(self.generations, other.generations).max(rel(self.epsilon, other.epsilon)); + for (a, b) in self + .mu + .iter() + .zip(&other.mu) + .chain(self.rho.iter().zip(&other.rho)) + { + m = m.max(rel(*a, *b)); + } + m + } +} + +/// One chromosome to paint. +#[derive(Debug, Clone, PartialEq)] +pub struct ChromInput { + pub name: String, + /// The genetic position of each site, cM, never going down. + pub cm: Vec, + pub panel: RefPanel, + /// The target's haplotypes at the panel's sites. + pub targets: Vec, +} + +/// How [`paint`] runs. +#[derive(Debug, Clone, PartialEq)] +pub struct Options { + /// Worker threads, at least 1. + pub threads: usize, + /// The most EM rounds; 0 paints with the start parameters. + pub rounds: usize, +} + +impl Default for Options { + fn default() -> Options { + Options { + threads: 1, + rounds: DEFAULT_ROUNDS, + } + } +} + +/// One painted haplotype. +#[derive(Debug, Clone, PartialEq)] +pub struct PaintedHap { + /// Site by site, the posterior of each group: `posterior[m * A + a]`. + pub posterior: Vec, + /// Site by site, the group of highest posterior (the first on a tie). + pub calls: Vec, +} + +/// One painted chromosome. +#[derive(Debug, Clone, PartialEq)] +pub struct PaintedChrom { + pub name: String, + pub haplotypes: Vec, +} + +/// The painting of a genome. +#[derive(Debug, Clone, PartialEq)] +pub struct Painting { + /// The parameters the painting was made with. + pub params: Params, + /// The EM rounds run (parameter updates made). + pub rounds: usize, + /// The log-likelihood of the genome under [`Painting::params`]. + pub loglik: f64, + pub chroms: Vec, +} + +fn check_input(chroms: &[ChromInput], start: &Params, opts: &Options) -> Result<()> { + if opts.threads == 0 { + return Err(Error("the painting needs at least one thread".into())); + } + let Some(first) = chroms.first() else { + return Err(Error("no chromosome to paint".into())); + }; + start.check(first.panel.groups())?; + for c in chroms { + let name = repr(&c.name); + if c.panel.sizes() != first.panel.sizes() { + return Err(Error(format!( + "chromosome {name} has another reference panel than {}", + repr(&first.name) + ))); + } + let m = c.panel.sites(); + if m == 0 { + return Err(Error(format!("chromosome {name} has no site"))); + } + if c.cm.len() != m { + return Err(Error(format!( + "chromosome {name}: {} map positions for {m} sites", + c.cm.len() + ))); + } + if let Some(i) = (0..m).find(|&i| !c.cm[i].is_finite() || (i > 0 && c.cm[i] < c.cm[i - 1])) + { + return Err(Error(format!( + "chromosome {name}: the map position of site {i} is {} (it must be finite and never go down)", + c.cm[i] + ))); + } + if let Some(t) = c.targets.iter().position(|t| t.len() != m) { + return Err(Error(format!( + "chromosome {name}: target haplotype {t} has {} sites, the panel {m}", + c.targets[t].len() + ))); + } + } + Ok(()) +} + +/// Runs one forward-backward per (chromosome, haplotype) on `threads` +/// threads; the results in that order. +fn pass(chroms: &[ChromInput], params: &Params, threads: usize) -> Vec { + let units: Vec<(usize, usize)> = chroms + .iter() + .enumerate() + .flat_map(|(c, ch)| (0..ch.targets.len()).map(move |t| (c, t))) + .collect(); + let run = |&(c, t): &(usize, usize)| { + let ch = &chroms[c]; + forward_backward( + &ch.panel, + &ch.cm, + &ch.targets[t], + params, + checkpoint_block(ch.panel.sites()), + ) + }; + if threads <= 1 || units.len() <= 1 { + return units.iter().map(run).collect(); + } + let next = AtomicUsize::new(0); + let mut done: Vec<(usize, Fb)> = std::thread::scope(|s| { + let workers: Vec<_> = (0..threads.min(units.len())) + .map(|_| { + s.spawn(|| { + let mut out = Vec::new(); + loop { + let i = next.fetch_add(1, Ordering::Relaxed); + let Some(u) = units.get(i) else { break }; + out.push((i, run(u))); + } + out + }) + }) + .collect(); + workers + .into_iter() + .flat_map(|w| w.join().expect("a painting thread panicked")) + .collect() + }); + done.sort_by_key(|(i, _)| *i); + done.into_iter().map(|(_, fb)| fb).collect() +} + +/// Paints every target haplotype of `chroms`, fitting the parameters from +/// `start` by EM for up to `opts.rounds` rounds over the whole genome. A +/// round stops the fit early when no parameter moves by more than +/// [`TOLERANCE`]; the painting is then made with the parameters before +/// that last update. +pub fn paint(chroms: &[ChromInput], start: Params, opts: &Options) -> Result { + check_input(chroms, &start, opts)?; + let groups = chroms[0].panel.groups(); + let mut params = start; + let mut rounds = 0; + let (fbs, total) = loop { + let fbs = pass(chroms, ¶ms, opts.threads); + let mut total = Stats::zero(groups); + for fb in &fbs { + total.add(&fb.stats); + } + if rounds == opts.rounds { + break (fbs, total); + } + let next = params.update(&total); + if next.moved(¶ms) <= TOLERANCE { + break (fbs, total); + } + params = next; + rounds += 1; + }; + let mut fbs = fbs.into_iter(); + let out = chroms + .iter() + .map(|c| PaintedChrom { + name: c.name.clone(), + haplotypes: (0..c.targets.len()) + .map(|_| { + let fb = fbs.next().expect("one pass per haplotype"); + let calls = fb + .posterior + .chunks(groups) + .map(|p| { + (1..groups).fold(0, |best, a| if p[a] > p[best] { a } else { best }) + }) + .collect(); + PaintedHap { + posterior: fb.posterior, + calls, + } + }) + .collect(), + }) + .collect(); + Ok(Painting { + params, + rounds, + loglik: total.loglik, + chroms: out, + }) +} + +/// Writes `paint/params.tsv`: a header, then one `parameter group value` +/// row per value (`.` for a parameter of no group): T, epsilon, mu and rho +/// of each group, the EM rounds and the log-likelihood. `names` names the +/// groups in their order. +pub fn write_params(out: &mut dyn Write, painting: &Painting, names: &[String]) -> Result<()> { + let p = &painting.params; + if names.len() != p.mu.len() { + return Err(Error(format!( + "{} group names for {} groups", + names.len(), + p.mu.len() + ))); + } + let mut text = String::from("#parameter\tgroup\tvalue\n"); + text.push_str(&format!("T\t.\t{}\n", p.generations)); + text.push_str(&format!("epsilon\t.\t{}\n", p.epsilon)); + for (g, w) in names.iter().zip(&p.mu) { + text.push_str(&format!("mu\t{g}\t{w}\n")); + } + for (g, r) in names.iter().zip(&p.rho) { + text.push_str(&format!("rho\t{g}\t{r}\n")); + } + text.push_str(&format!("em_rounds\t.\t{}\n", painting.rounds)); + text.push_str(&format!("loglik\t.\t{}\n", painting.loglik)); + out.write_all(text.as_bytes()) + .map_err(|e| Error(format!("cannot write the painting parameters: {e}"))) +} diff --git a/rust/crates/og-admix/src/paint/bits.rs b/rust/crates/og-admix/src/paint/bits.rs new file mode 100644 index 000000000..8d79e63ea --- /dev/null +++ b/rust/crates/og-admix/src/paint/bits.rs @@ -0,0 +1,161 @@ +//! The bit-packed inputs of the painting: the reference haplotypes of one +//! chromosome, one bit per haplotype per site, and a target haplotype, one +//! bit per site. + +use crate::panel::{Haplotypes, bit, words}; +use crate::{Error, Result}; + +/// The reference haplotypes of one chromosome and the group (ancestry) of +/// each. A site takes `ceil(H / 64)` words, so a panel of H haplotypes at M +/// sites holds `M * H / 8` bytes. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct RefPanel { + haplotypes: usize, + words: usize, + bits: Vec, + group: Vec, + size: Vec, +} + +impl RefPanel { + /// An empty panel: `group[h]` is the group of haplotype `h`, an index + /// below `groups`. Every group needs at least one haplotype. + pub fn new(group: Vec, groups: usize) -> Result { + if groups == 0 { + return Err(Error("the painting needs at least one group".into())); + } + let mut size = vec![0usize; groups]; + for (h, &g) in group.iter().enumerate() { + if g >= groups { + return Err(Error(format!( + "reference haplotype {h} is in group {g}, but there are {groups} groups" + ))); + } + size[g] += 1; + } + if let Some(g) = size.iter().position(|&n| n == 0) { + return Err(Error(format!("group {g} has no reference haplotype"))); + } + Ok(RefPanel { + haplotypes: group.len(), + words: words(group.len()), + bits: Vec::new(), + group, + size, + }) + } + + /// The panel of `haplotypes` (every site it holds); `group[p]` is the + /// group of person `p`, so both haplotypes of a person share it. + pub fn from_haplotypes( + haplotypes: &Haplotypes, + person_group: &[usize], + groups: usize, + ) -> Result { + if person_group.len() != haplotypes.people().len() { + return Err(Error(format!( + "{} groups given for {} reference people", + person_group.len(), + haplotypes.people().len() + ))); + } + let group = person_group.iter().flat_map(|&g| [g, g]).collect(); + let mut panel = RefPanel::new(group, groups)?; + for m in 0..haplotypes.sites().len() { + panel.push_site(haplotypes.row(m)); + } + Ok(panel) + } + + /// Adds a site: bit `h` of `row` is the allele of haplotype `h`. + pub fn push_site(&mut self, row: &[u64]) { + assert_eq!(row.len(), self.words, "a row of {} words", self.words); + self.bits.extend_from_slice(row); + // Bits past the last haplotype are never read, but zero them so + // equal panels compare equal. + let extra = self.words * 64 - self.haplotypes; + if extra > 0 { + let last = self.bits.len() - 1; + self.bits[last] &= u64::MAX >> extra; + } + } + + pub fn sites(&self) -> usize { + self.bits.len().checked_div(self.words).unwrap_or(0) + } + + pub fn haplotypes(&self) -> usize { + self.haplotypes + } + + pub fn groups(&self) -> usize { + self.size.len() + } + + /// The group of haplotype `h`. + pub fn group_of(&self, h: usize) -> usize { + self.group[h] + } + + /// The group of every haplotype. + pub fn group_all(&self) -> &[usize] { + &self.group + } + + /// The haplotypes of each group. + pub fn sizes(&self) -> &[usize] { + &self.size + } + + /// The alleles of every haplotype at site `m`. + pub fn row(&self, m: usize) -> &[u64] { + &self.bits[m * self.words..(m + 1) * self.words] + } + + /// The allele (0 or 1) of haplotype `h` at site `m`. + pub fn allele(&self, m: usize, h: usize) -> u8 { + bit(self.row(m), h) + } +} + +/// One haplotype to paint: one allele bit per site. +#[derive(Debug, Clone, PartialEq, Eq, Default)] +pub struct Bits { + len: usize, + words: Vec, +} + +impl Bits { + /// From alleles, each 0 or 1 (anything else counts as 1). + pub fn from_alleles(alleles: &[u8]) -> Bits { + let mut b = Bits::default(); + for &a in alleles { + b.push(a != 0); + } + b + } + + pub fn push(&mut self, one: bool) { + if self.len.is_multiple_of(64) { + self.words.push(0); + } + if one { + self.words[self.len / 64] |= 1 << (self.len % 64); + } + self.len += 1; + } + + pub fn len(&self) -> usize { + self.len + } + + pub fn is_empty(&self) -> bool { + self.len == 0 + } + + /// The allele at site `m`. + pub fn get(&self, m: usize) -> u8 { + assert!(m < self.len, "site {m} of {}", self.len); + bit(&self.words, m) + } +} diff --git a/rust/crates/og-admix/src/paint/hmm.rs b/rust/crates/og-admix/src/paint/hmm.rs new file mode 100644 index 000000000..f1f4624f5 --- /dev/null +++ b/rust/crates/og-admix/src/paint/hmm.rs @@ -0,0 +1,332 @@ +//! Forward-backward over the (ancestry, reference haplotype) states of one +//! target haplotype on one chromosome, in O(H) per site, with the forward +//! values kept only at checkpoints. +//! +//! Between sites m-1 and m, d Morgans apart, with pT = 1 - exp(-T d) and +//! pR(a) = 1 - exp(-rho_a d), the chance of moving from state (a, h) to +//! state (b, k) is +//! +//! ```text +//! P = (1 - pT) [ (1 - pR(a)) [h = k] + pR(a) / n_a ] [a = b] +//! + pT mu_b / n_b +//! ``` +//! +//! The first term keeps the ancestry (and, unless the copying jumps, the +//! haplotype); the second is an ancestry event, whose new ancestry is drawn +//! from mu (it may be the old one) and whose haplotype is drawn uniformly in +//! it. Every term is either the state itself or a group total, so with the +//! per-group sums S_a = sum of alpha(a, h) over h the forward step is +//! +//! ```text +//! alpha_m(b, k) = e_m(k) [ (1 - pT)(1 - pR(b)) alpha_{m-1}(b, k) +//! + (1 - pT) pR(b) S_b / n_b + pT mu_b / n_b sum(S) ] +//! ``` +//! +//! and the backward step, with g(b, k) = e_m(k) beta_m(b, k) and its group +//! sums G_b, is +//! +//! ```text +//! beta_{m-1}(a, h) = (1 - pT)(1 - pR(a)) g(a, h) + (1 - pT) pR(a) G_a / n_a +//! + pT sum_b mu_b G_b / n_b +//! ``` +//! +//! The emission e_m(k) is 1 - epsilon when reference haplotype k carries +//! the target's allele at site m and epsilon when it does not. Both passes +//! rescale each site to sum 1; the forward scales give the log-likelihood. +//! +//! The forward values of every `block`-th site are kept. The backward pass +//! recomputes one block at a time from its checkpoint, with the same code +//! and in the same order, so the values are the same bits as in the first +//! pass. With `block` near sqrt(M) the memory is about 2 sqrt(M) H values +//! instead of M H. + +use super::Params; +use super::bits::{Bits, RefPanel}; + +/// What one haplotype's pass adds to the EM step: expected counts, summed +/// over the sites of one chromosome. +#[derive(Debug, Clone, PartialEq)] +pub struct Stats { + /// Sites. + pub sites: f64, + /// The expected number of sites where the copied haplotype does not + /// carry the target's allele. + pub mismatches: f64, + /// Per group, the summed posterior of that ancestry over the sites. + pub ancestry: Vec, + /// The expected number of ancestry events. + pub events: f64, + /// Morgans from the first site to the last. + pub morgans: f64, + /// Per group, the expected number of copying jumps inside that + /// ancestry. + pub jumps: Vec, + /// Per group, the expected Morgans spent in that ancestry (each + /// interval weighted by the ancestry's posterior at its left end). + pub exposure: Vec, + /// The log-likelihood of the haplotype. + pub loglik: f64, +} + +impl Stats { + pub fn zero(groups: usize) -> Stats { + Stats { + sites: 0.0, + mismatches: 0.0, + ancestry: vec![0.0; groups], + events: 0.0, + morgans: 0.0, + jumps: vec![0.0; groups], + exposure: vec![0.0; groups], + loglik: 0.0, + } + } + + /// Adds `other` in place. + pub fn add(&mut self, other: &Stats) { + self.sites += other.sites; + self.mismatches += other.mismatches; + self.events += other.events; + self.morgans += other.morgans; + self.loglik += other.loglik; + for (a, b) in [ + (&mut self.ancestry, &other.ancestry), + (&mut self.jumps, &other.jumps), + (&mut self.exposure, &other.exposure), + ] { + for (x, y) in a.iter_mut().zip(b) { + *x += y; + } + } + } +} + +/// The result of one haplotype's pass. +#[derive(Debug, Clone, PartialEq)] +pub struct Fb { + /// Site by site, the posterior of each group: `posterior[m * A + a]`. + pub posterior: Vec, + pub stats: Stats, +} + +/// The transition terms of one interval, per group. +struct Step { + p_t: f64, + /// (1 - pT)(1 - pR(a)). + stay: Vec, + /// (1 - pT) pR(a) / n_a. + jump: Vec, + /// pT mu_a / n_a. + enter: Vec, +} + +impl Step { + fn new(groups: usize) -> Step { + Step { + p_t: 0.0, + stay: vec![0.0; groups], + jump: vec![0.0; groups], + enter: vec![0.0; groups], + } + } + + fn set(&mut self, params: &Params, sizes: &[usize], morgans: f64) { + let p_t = -(-params.generations * morgans).exp_m1(); + self.p_t = p_t; + for (a, &n) in sizes.iter().enumerate() { + let n = n as f64; + let p_r = -(-params.rho[a] * morgans).exp_m1(); + self.stay[a] = (1.0 - p_t) * (1.0 - p_r); + self.jump[a] = (1.0 - p_t) * p_r / n; + self.enter[a] = p_t * params.mu[a] / n; + } + } +} + +struct Engine<'a> { + panel: &'a RefPanel, + cm: &'a [f64], + target: &'a Bits, + params: &'a Params, + step: Step, + sums: Vec, +} + +impl Engine<'_> { + fn emission(&self, m: usize, h: usize) -> f64 { + if self.panel.allele(m, h) == self.target.get(m) { + 1.0 - self.params.epsilon + } else { + self.params.epsilon + } + } + + fn morgans(&self, m: usize) -> f64 { + (self.cm[m] - self.cm[m - 1]) / 100.0 + } + + /// Writes the forward values of site `m` into `out`, scaled to sum 1, + /// from those of site m-1 (`prev`, scaled to sum 1); the log of the + /// scale. + fn forward(&mut self, m: usize, prev: Option<&[f64]>, out: &mut [f64]) -> f64 { + let group = self.panel.group_all(); + let sizes = self.panel.sizes(); + match prev { + None => { + for (h, o) in out.iter_mut().enumerate() { + let g = group[h]; + *o = self.emission(0, h) * self.params.mu[g] / sizes[g] as f64; + } + } + Some(prev) => { + let d = self.morgans(m); + self.step.set(self.params, sizes, d); + self.sums.iter_mut().for_each(|s| *s = 0.0); + for (h, &p) in prev.iter().enumerate() { + self.sums[group[h]] += p; + } + let total: f64 = self.sums.iter().sum(); + for (a, s) in self.sums.iter_mut().enumerate() { + // Everything a state of group a receives that does not + // depend on its own previous value. + *s = self.step.jump[a] * *s + self.step.enter[a] * total; + } + for (h, o) in out.iter_mut().enumerate() { + let g = group[h]; + *o = self.emission(m, h) * (self.step.stay[g] * prev[h] + self.sums[g]); + } + } + } + let c: f64 = out.iter().sum(); + out.iter_mut().for_each(|o| *o /= c); + c.ln() + } +} + +/// The checkpoint spacing for `sites` sites: ceil(sqrt(sites)), at least 1. +pub fn checkpoint_block(sites: usize) -> usize { + sites.isqrt().max(1) + usize::from(sites.isqrt().pow(2) < sites) +} + +/// Runs forward-backward for `target` against `panel`, `cm` the genetic +/// position of each site, keeping the forward values every `block` sites +/// (`block` at least the number of sites keeps them all). +pub fn forward_backward( + panel: &RefPanel, + cm: &[f64], + target: &Bits, + params: &Params, + block: usize, +) -> Fb { + let sites = panel.sites(); + let hs = panel.haplotypes(); + let groups = panel.groups(); + assert!(sites > 0 && cm.len() == sites && target.len() == sites); + let k = block.clamp(1, sites); + let blocks = sites.div_ceil(k); + let mut e = Engine { + panel, + cm, + target, + params, + step: Step::new(groups), + sums: vec![0.0; groups], + }; + let mut stats = Stats::zero(groups); + + // Forward, keeping every k-th site. + let mut checkpoints = vec![0.0; blocks * hs]; + let (mut prev, mut cur) = (vec![0.0; hs], vec![0.0; hs]); + for m in 0..sites { + stats.loglik += e.forward(m, (m > 0).then_some(&prev[..]), &mut cur); + if m % k == 0 { + checkpoints[(m / k) * hs..(m / k + 1) * hs].copy_from_slice(&cur); + } + std::mem::swap(&mut prev, &mut cur); + } + drop((prev, cur)); + + // Backward, one block at a time. + let group = panel.group_all().to_vec(); + let sizes = panel.sizes().to_vec(); + let mut buf = vec![0.0; k * hs]; + let mut loaded = usize::MAX; + let mut beta = vec![1.0 / hs as f64; hs]; + let mut posterior = vec![0.0; sites * groups]; + let mut post = vec![0.0; groups]; + let mut s_alpha = vec![0.0; groups]; + let mut g_beta = vec![0.0; groups]; + // The interval to the right of the current site, once its backward step + // is done: its K, its length and the scale beta was divided by. Its jump + // terms and its G stay in `step` and `g_beta` until the next backward + // step overwrites them, after they are read. + let mut pending: Option<(f64, f64, f64)> = None; + let mut step = Step::new(groups); + for m in (0..sites).rev() { + let b = m / k; + if b != loaded { + let start = b * k; + let len = k.min(sites - start); + buf[..hs].copy_from_slice(&checkpoints[b * hs..(b + 1) * hs]); + for i in 1..len { + let (done, rest) = buf.split_at_mut(i * hs); + e.forward(start + i, Some(&done[(i - 1) * hs..]), &mut rest[..hs]); + } + loaded = b; + } + let alpha = &buf[(m - b * k) * hs..(m - b * k + 1) * hs]; + + // The posterior at m. + post.iter_mut().for_each(|p| *p = 0.0); + s_alpha.iter_mut().for_each(|s| *s = 0.0); + let mut mism = 0.0; + for h in 0..hs { + let w = alpha[h] * beta[h]; + post[group[h]] += w; + s_alpha[group[h]] += alpha[h]; + if panel.allele(m, h) != target.get(m) { + mism += w; + } + } + let tot: f64 = post.iter().sum(); + for (a, p) in post.iter_mut().enumerate() { + *p /= tot; + stats.ancestry[a] += *p; + } + posterior[m * groups..(m + 1) * groups].copy_from_slice(&post); + stats.sites += 1.0; + stats.mismatches += mism / tot; + + // The interval from m to m+1: its expected events and jumps. + if let Some((kk, d, scale)) = pending.take() { + // The sum over both ends of alpha_m P e beta_{m+1}. + let z = scale * tot; + stats.events += kk / z; + for a in 0..groups { + stats.jumps[a] += step.jump[a] * s_alpha[a] * g_beta[a] / z; + stats.exposure[a] += d * post[a]; + } + stats.morgans += d; + } + + // The backward step from m to m-1. + if m > 0 { + let d = (cm[m] - cm[m - 1]) / 100.0; + step.set(params, &sizes, d); + g_beta.iter_mut().for_each(|g| *g = 0.0); + for (h, bh) in beta.iter_mut().enumerate() { + *bh *= e.emission(m, h); + g_beta[group[h]] += *bh; + } + let kk: f64 = (0..groups).map(|a| step.enter[a] * g_beta[a]).sum(); + for (h, bh) in beta.iter_mut().enumerate() { + let a = group[h]; + *bh = step.stay[a] * *bh + step.jump[a] * g_beta[a] + kk; + } + let scale: f64 = beta.iter().sum(); + beta.iter_mut().for_each(|bh| *bh /= scale); + pending = Some((kk, d, scale)); + } + } + Fb { posterior, stats } +} From 58fc3745a9109974627c88b5a6705115fe8e3c00 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:25:00 +0100 Subject: [PATCH 070/110] test(ancestry): check the painting engine against truth, a brute-force model and its memory bound A two-group chromosome with one breakpoint is painted within 0.5 cM and at bp accuracy 0.98 or more, and an emission of 0.5 fails that check. Forward-backward equals an O(H^2) model within 1e-9, checkpoints equal full storage within 1e-12, a 22-chromosome painting peaks under 1 GB, and 1 and 4 threads give the same bytes. The planted-red feature turns each check red. Bead: D5 Bead: D14 --- .../crates/og-admix/tests/anc_paint_engine.rs | 635 ++++++++++++++++++ 1 file changed, 635 insertions(+) create mode 100644 rust/crates/og-admix/tests/anc_paint_engine.rs diff --git a/rust/crates/og-admix/tests/anc_paint_engine.rs b/rust/crates/og-admix/tests/anc_paint_engine.rs new file mode 100644 index 000000000..072d81560 --- /dev/null +++ b/rust/crates/og-admix/tests/anc_paint_engine.rs @@ -0,0 +1,635 @@ +//! Truth tests of the painting engine (`og_admix::paint`): +//! +//! - a two-group chromosome of 2,000 sites with one breakpoint is painted +//! with the breakpoint within 0.5 cM and a bp accuracy of at least 0.98, +//! and the same check fails when the emission is set to 0.5; +//! - forward-backward equals a brute-force O(H^2) model on 30 sites and 12 +//! haplotypes within 1e-9, and the checkpointed pass equals the one that +//! keeps every site within 1e-12; +//! - the peak memory of a 22-chromosome painting stays under 1 GB, and the +//! checkpoints keep a long chromosome far below what full storage takes; +//! - two runs, on 1 and on 4 threads, give the same bytes. +//! +//! Memory is the resident memory Linux reports (/proc/self/status); on +//! another system those two checks only run the painting. +//! +//! The simulator of `og ancestry-fine simulate` writes unphased genotypes, +//! and the engine paints phased haplotypes, so these tests build their +//! phased haplotypes with the same RNG and map. + +use og_admix::map::GeneticMap; +use og_admix::paint::{ + Bits, ChromInput, Options, Params, RefPanel, checkpoint_block, forward_backward, paint, + write_params, +}; +use og_admix::panel::words; +use og_admix::rng::Rng; +use std::sync::Mutex; + +/// The tests run one at a time, so a peak belongs to one test. +static ONE_AT_A_TIME: Mutex<()> = Mutex::new(()); + +fn lock() -> std::sync::MutexGuard<'static, ()> { + ONE_AT_A_TIME.lock().unwrap_or_else(|e| e.into_inner()) +} + +/// A line `: N kB` of /proc/self/status, in bytes. +#[cfg(target_os = "linux")] +fn status_bytes(key: &str) -> usize { + let text = std::fs::read_to_string("/proc/self/status").expect("/proc/self/status"); + let line = text + .lines() + .find(|l| l.starts_with(key)) + .unwrap_or_else(|| panic!("no {key} in /proc/self/status")); + let kb: usize = line[key.len()..] + .trim() + .trim_end_matches("kB") + .trim() + .parse() + .expect("a number of kB"); + kb * 1024 +} + +/// The peak resident memory of the process while `f` runs, and how far it +/// rose above the resident memory before (Linux: VmHWM of +/// /proc/self/status, reset through /proc/self/clear_refs). `None` on a +/// system without them; CI runs on Linux, where they must work. +fn peak_of(f: impl FnOnce() -> T) -> (T, Option<(usize, usize)>) { + #[cfg(target_os = "linux")] + { + std::fs::write("/proc/self/clear_refs", "5").expect("reset the peak RSS"); + let before = status_bytes("VmRSS:"); + let out = f(); + let peak = status_bytes("VmHWM:"); + (out, Some((peak, peak.saturating_sub(before)))) + } + #[cfg(not(target_os = "linux"))] + { + eprintln!("no /proc on this system: memory not measured"); + (f(), None) + } +} + +const PLANTED: bool = cfg!(feature = "planted-red"); + +/// A haplotype made of pieces of `founders`, switching to another founder +/// at `switch_per_site` per site, with each allele flipped at `noise`. +fn mosaic(rng: &mut Rng, founders: &[Vec], switch_per_site: f64, noise: f64) -> Vec { + let sites = founders[0].len(); + let mut f = rng.below(founders.len() as u64) as usize; + (0..sites) + .map(|m| { + if rng.uniform() < switch_per_site { + f = rng.below(founders.len() as u64) as usize; + } + founders[f][m] ^ u8::from(rng.uniform() < noise) + }) + .collect() +} + +/// A simulated population: `groups` groups of `founders` founder +/// haplotypes each, at `sites` sites, whose allele frequencies drift apart +/// from a shared one by up to 0.25. +fn founders(rng: &mut Rng, groups: usize, founders: usize, sites: usize) -> Vec>> { + let base: Vec = (0..sites).map(|_| 0.1 + 0.8 * rng.uniform()).collect(); + (0..groups) + .map(|_| { + let freq: Vec = base + .iter() + .map(|p| (p + 0.5 * (rng.uniform() - 0.5)).clamp(0.02, 0.98)) + .collect(); + (0..founders) + .map(|_| freq.iter().map(|&p| u8::from(rng.uniform() < p)).collect()) + .collect() + }) + .collect() +} + +/// A reference panel of `per_group` mosaic haplotypes of each group. +fn panel_of(rng: &mut Rng, pop: &[Vec>], per_group: usize) -> RefPanel { + let sites = pop[0][0].len(); + let haps: Vec<(usize, Vec)> = pop + .iter() + .enumerate() + .flat_map(|(g, f)| { + (0..per_group) + .map(|_| (g, mosaic(rng, f, 0.01, 0.005))) + .collect::>() + }) + .collect(); + let mut panel = RefPanel::new(haps.iter().map(|(g, _)| *g).collect(), pop.len()).unwrap(); + let mut row = vec![0u64; words(haps.len())]; + for m in 0..sites { + row.iter_mut().for_each(|w| *w = 0); + for (h, (_, a)) in haps.iter().enumerate() { + row[h / 64] |= u64::from(a[m]) << (h % 64); + } + panel.push_site(&row); + } + panel +} + +/// cM of each site of a chromosome of `sites` sites 1 kb apart, through +/// a map of 1 cM per Mb. +fn map_cm(sites: usize) -> Vec { + let map = GeneticMap::from_markers(vec![(0, 0.0), (1_000_000_000, 1000.0)]).unwrap(); + (0..sites) + .map(|m| map.cm_at(1_000 * (m as i64 + 1))) + .collect() +} + +// ---- Truth: one breakpoint ---- + +const SITES: usize = 2_000; +const BREAK: usize = 1_000; + +struct Truth { + chrom: ChromInput, + /// The true group of each site, per haplotype. + truth: [Vec; 2], +} + +/// Two groups A (0) and B (1). Haplotype 0 copies A up to site 1,000 and B +/// after; haplotype 1 is B throughout. +fn one_breakpoint() -> Truth { + let mut rng = Rng::stream(20261119, "anc-paint-engine/one-breakpoint"); + let pop = founders(&mut rng, 2, 4, SITES); + let panel = panel_of(&mut rng, &pop, 30); + let a = mosaic(&mut rng, &pop[0], 0.01, 0.005); + let b = mosaic(&mut rng, &pop[1], 0.01, 0.005); + let hap0: Vec = (0..SITES) + .map(|m| if m < BREAK { a[m] } else { b[m] }) + .collect(); + let hap1 = mosaic(&mut rng, &pop[1], 0.01, 0.005); + Truth { + chrom: ChromInput { + name: "chr1".into(), + cm: map_cm(SITES), + panel, + targets: vec![Bits::from_alleles(&hap0), Bits::from_alleles(&hap1)], + }, + truth: [ + (0..SITES).map(|m| usize::from(m >= BREAK)).collect(), + vec![1; SITES], + ], + } +} + +/// The fixture Q of the continental projection: a quarter A. +fn fixture_q() -> Vec { + vec![0.25, 0.75] +} + +/// Paints the truth chromosome from `start` with `rounds` EM rounds and +/// checks the result: bp accuracy at least 0.98 and a called breakpoint +/// within 0.5 cM of the true one. +fn paint_and_score(t: &Truth, start: Params, rounds: usize) -> Result<(), String> { + let p = paint( + std::slice::from_ref(&t.chrom), + start, + &Options { threads: 2, rounds }, + ) + .map_err(|e| e.0)?; + let pos = |m: usize| 1_000 * (m as u64 + 1); + let (mut right, mut all) = (0u64, 0u64); + for (h, hap) in p.chroms[0].haplotypes.iter().enumerate() { + for m in 0..SITES - 1 { + let bp = pos(m + 1) - pos(m); + all += bp; + if hap.calls[m] == t.truth[h][m] { + right += bp; + } + } + } + let accuracy = right as f64 / all as f64; + let calls = &p.chroms[0].haplotypes[0].calls; + let breaks: Vec = (1..SITES) + .filter(|&m| calls[m] != calls[m - 1]) + .map(|m| (t.chrom.cm[m - 1] + t.chrom.cm[m]) / 2.0) + .collect(); + let true_cm = (t.chrom.cm[BREAK - 1] + t.chrom.cm[BREAK]) / 2.0; + let nearest = breaks + .iter() + .map(|b| (b - true_cm).abs()) + .fold(f64::INFINITY, f64::min); + eprintln!( + "bp accuracy {accuracy}, nearest called breakpoint {nearest} cM off, {} EM rounds, T {}, epsilon {}, mu {:?}", + p.rounds, p.params.generations, p.params.epsilon, p.params.mu + ); + if accuracy < 0.98 { + return Err(format!("bp accuracy {accuracy}, below 0.98")); + } + if nearest > 0.5 { + return Err(format!( + "no called breakpoint within 0.5 cM of {true_cm} cM (called: {breaks:?})" + )); + } + Ok(()) +} + +#[test] +fn paints_one_breakpoint_within_half_a_cm() { + let _g = lock(); + let t = one_breakpoint(); + let mut start = Params::initial( + fixture_q(), + t.chrom.panel.sizes(), + og_admix::paint::DEFAULT_NE, + ); + if PLANTED { + // The red control: an emission that says nothing. + start.epsilon = 0.5; + } + let rounds = if PLANTED { 0 } else { 5 }; + paint_and_score(&t, start, rounds).unwrap(); +} + +#[test] +fn an_emission_of_one_half_fails_the_breakpoint_check() { + let _g = lock(); + let t = one_breakpoint(); + let mut start = Params::initial( + fixture_q(), + t.chrom.panel.sizes(), + og_admix::paint::DEFAULT_NE, + ); + start.epsilon = 0.5; + let got = paint_and_score(&t, start, 0); + assert!(got.is_err(), "the check passed with no information"); +} + +// ---- Exactness: brute force and checkpoints ---- + +/// A small random case: groups of 5, 4 and 3 haplotypes, `sites` sites at +/// uneven distances (some 0), and parameters where every term matters. +fn small_case(seed: u64, sites: usize, sizes: &[usize]) -> (RefPanel, Vec, Bits, Params) { + let mut rng = Rng::new(seed); + let group: Vec = sizes + .iter() + .enumerate() + .flat_map(|(g, &n)| std::iter::repeat_n(g, n)) + .collect(); + // Interleave the groups, so a group is not one run of haplotypes. + let mut order: Vec = (0..group.len()).collect(); + for i in (1..order.len()).rev() { + order.swap(i, rng.below(i as u64 + 1) as usize); + } + let group: Vec = order.iter().map(|&i| group[i]).collect(); + let hs = group.len(); + let mut panel = RefPanel::new(group, sizes.len()).unwrap(); + let mut row = vec![0u64; words(hs)]; + for _ in 0..sites { + row.iter_mut().for_each(|w| *w = 0); + for h in 0..hs { + row[h / 64] |= u64::from(rng.uniform() < 0.4) << (h % 64); + } + panel.push_site(&row); + } + let mut cm = vec![0.0]; + for m in 1..sites { + let step = if m % 7 == 3 { 0.0 } else { 1.2 * rng.uniform() }; + cm.push(cm[m - 1] + step); + } + let target = Bits::from_alleles( + &(0..sites) + .map(|_| u8::from(rng.uniform() < 0.5)) + .collect::>(), + ); + let mut mu: Vec = sizes.iter().map(|_| 0.2 + rng.uniform()).collect(); + let total: f64 = mu.iter().sum(); + mu.iter_mut().for_each(|x| *x /= total); + let params = Params { + mu, + generations: 40.0, + epsilon: 0.07, + rho: sizes.iter().map(|_| 20.0 + 300.0 * rng.uniform()).collect(), + }; + (panel, cm, target, params) +} + +/// The same model with its full H x H transition matrix: the group +/// posteriors per site, the log-likelihood and the expected events and +/// jumps. +struct Brute { + posterior: Vec, + loglik: f64, + events: f64, + jumps: Vec, +} + +// Written index by index, as the equations read. +#[allow(clippy::needless_range_loop)] +fn brute_force(panel: &RefPanel, cm: &[f64], target: &Bits, p: &Params) -> Brute { + let hs = panel.haplotypes(); + let a_n = panel.groups(); + let sites = panel.sites(); + let g = |h: usize| panel.group_of(h); + let n = |a: usize| panel.sizes()[a] as f64; + let e = |m: usize, h: usize| { + if panel.allele(m, h) == target.get(m) { + 1.0 - p.epsilon + } else { + p.epsilon + } + }; + // trans[m][i][j], with the event and jump parts apart. + let parts = |m: usize| { + let d = (cm[m] - cm[m - 1]) / 100.0; + let pt = 1.0 - (-p.generations * d).exp(); + let mut full = vec![vec![0.0; hs]; hs]; + let mut event = vec![vec![0.0; hs]; hs]; + let mut jump = vec![vec![0.0; hs]; hs]; + for i in 0..hs { + for j in 0..hs { + let (a, b) = (g(i), g(j)); + let pr = 1.0 - (-p.rho[a] * d).exp(); + let ev = pt * p.mu[b] / n(b); + let ju = if a == b { (1.0 - pt) * pr / n(a) } else { 0.0 }; + let st = if i == j { (1.0 - pt) * (1.0 - pr) } else { 0.0 }; + event[i][j] = ev; + jump[i][j] = ju; + full[i][j] = ev + ju + st; + } + } + (full, event, jump) + }; + let mut alpha = vec![vec![0.0; hs]; sites]; + let mut loglik = 0.0; + for h in 0..hs { + alpha[0][h] = p.mu[g(h)] / n(g(h)) * e(0, h); + } + let c: f64 = alpha[0].iter().sum(); + alpha[0].iter_mut().for_each(|x| *x /= c); + loglik += c.ln(); + for m in 1..sites { + let (full, _, _) = parts(m); + for j in 0..hs { + alpha[m][j] = (0..hs).map(|i| alpha[m - 1][i] * full[i][j]).sum::() * e(m, j); + } + let c: f64 = alpha[m].iter().sum(); + alpha[m].iter_mut().for_each(|x| *x /= c); + loglik += c.ln(); + } + let mut beta = vec![vec![1.0; hs]; sites]; + for m in (0..sites - 1).rev() { + let (full, _, _) = parts(m + 1); + for i in 0..hs { + beta[m][i] = (0..hs) + .map(|j| full[i][j] * e(m + 1, j) * beta[m + 1][j]) + .sum(); + } + let c: f64 = beta[m].iter().sum(); + beta[m].iter_mut().for_each(|x| *x /= c); + } + let mut posterior = vec![0.0; sites * a_n]; + for m in 0..sites { + let tot: f64 = (0..hs).map(|h| alpha[m][h] * beta[m][h]).sum(); + for h in 0..hs { + posterior[m * a_n + g(h)] += alpha[m][h] * beta[m][h] / tot; + } + } + let (mut events, mut jumps) = (0.0, vec![0.0; a_n]); + for m in 1..sites { + let (full, event, jump) = parts(m); + let w = + |i: usize, j: usize, t: &[Vec]| alpha[m - 1][i] * t[i][j] * e(m, j) * beta[m][j]; + let mut z = 0.0; + for i in 0..hs { + for j in 0..hs { + z += w(i, j, &full); + } + } + for i in 0..hs { + for j in 0..hs { + events += w(i, j, &event) / z; + jumps[g(i)] += w(i, j, &jump) / z; + } + } + } + Brute { + posterior, + loglik, + events, + jumps, + } +} + +#[test] +fn forward_backward_equals_the_brute_force_model() { + let _g = lock(); + for seed in [1u64, 2, 3] { + let (panel, cm, target, params) = small_case(seed, 30, &[5, 4, 3]); + assert_eq!(panel.haplotypes(), 12); + let want = brute_force(&panel, &cm, &target, ¶ms); + let mut block = checkpoint_block(30); + if PLANTED { + // The red control: the engine with another model. + block = 30; + } + let mut model = params.clone(); + if PLANTED { + model.rho[0] *= 1.01; + } + let got = forward_backward(&panel, &cm, &target, &model, block); + for (i, (x, y)) in got.posterior.iter().zip(&want.posterior).enumerate() { + assert!( + (x - y).abs() <= 1e-9, + "seed {seed}: posterior {i}: {x} against the brute force {y}" + ); + } + assert!( + (got.stats.loglik - want.loglik).abs() <= 1e-9, + "seed {seed}: loglik {} against {}", + got.stats.loglik, + want.loglik + ); + assert!( + (got.stats.events - want.events).abs() <= 1e-9, + "seed {seed}: events {} against {}", + got.stats.events, + want.events + ); + for a in 0..3 { + assert!( + (got.stats.jumps[a] - want.jumps[a]).abs() <= 1e-9, + "seed {seed}: jumps of group {a}: {} against {}", + got.stats.jumps[a], + want.jumps[a] + ); + } + } +} + +#[test] +fn checkpoints_give_what_full_storage_gives() { + let _g = lock(); + let (panel, cm, target, params) = small_case(7, 500, &[20, 12, 8]); + let full = forward_backward(&panel, &cm, &target, ¶ms, 500); + for block in [checkpoint_block(500), 1, 7, 64, 499] { + let block = if PLANTED { block + 1 } else { block }; + let got = forward_backward(&panel, &cm, &target, ¶ms, block); + let mut model = params.clone(); + if PLANTED { + model.epsilon += 1e-6; + } + let got = if PLANTED { + forward_backward(&panel, &cm, &target, &model, block) + } else { + got + }; + for (i, (x, y)) in got.posterior.iter().zip(&full.posterior).enumerate() { + assert!( + (x - y).abs() <= 1e-12, + "block {block}: posterior {i}: {x} against {y}" + ); + } + assert!((got.stats.loglik - full.stats.loglik).abs() <= 1e-12); + assert!((got.stats.events - full.stats.events).abs() <= 1e-12); + assert!((got.stats.mismatches - full.stats.mismatches).abs() <= 1e-12); + } +} + +// ---- Memory and determinism ---- + +/// A genome of 22 chromosomes, three groups of 40 reference haplotypes and +/// one target person. +fn genome() -> Vec { + (1..=22) + .map(|c| { + let mut rng = Rng::stream(20261119, &format!("anc-paint-engine/chr{c}")); + let sites = 600 + 20 * c; + let pop = founders(&mut rng, 3, 4, sites); + let panel = panel_of(&mut rng, &pop, 40); + let a = mosaic(&mut rng, &pop[c % 3], 0.01, 0.005); + let b = mosaic(&mut rng, &pop[(c + 1) % 3], 0.01, 0.005); + let cut = sites / 3; + let hap0: Vec = (0..sites) + .map(|m| if m < cut { a[m] } else { b[m] }) + .collect(); + let hap1 = mosaic(&mut rng, &pop[(c + 2) % 3], 0.01, 0.005); + ChromInput { + name: format!("chr{c}"), + cm: map_cm(sites), + panel, + targets: vec![Bits::from_alleles(&hap0), Bits::from_alleles(&hap1)], + } + }) + .collect() +} + +/// Every byte of a painting: params.tsv, then each haplotype's posteriors +/// and calls. +fn bytes(chroms: &[ChromInput], threads: usize) -> Vec { + let start = Params::initial( + vec![0.3, 0.3, 0.4], + chroms[0].panel.sizes(), + og_admix::paint::DEFAULT_NE, + ); + let p = paint(chroms, start, &Options { threads, rounds: 5 }).unwrap(); + let mut out = Vec::new(); + write_params(&mut out, &p, &["A".into(), "B".into(), "C".into()]).unwrap(); + for c in &p.chroms { + out.extend_from_slice(c.name.as_bytes()); + for h in &c.haplotypes { + for x in &h.posterior { + out.extend_from_slice(&x.to_le_bytes()); + } + out.extend(h.calls.iter().map(|&a| a as u8)); + } + } + out +} + +#[test] +fn a_22_chromosome_painting_stays_under_1_gb_and_repeats_byte_for_byte() { + let _g = lock(); + let chroms = genome(); + let (one, peak) = peak_of(|| bytes(&chroms, 1)); + if let Some((peak, _)) = peak { + eprintln!("peak resident memory {peak} bytes"); + assert!(peak < 1 << 30, "peak {peak} bytes, 1 GB or more"); + } + let four = bytes(&chroms, 4); + let mut again = bytes(&chroms, 4); + if PLANTED { + // The red control: one bit of one posterior differs. + let last = again.len() - 1; + again[last] ^= 1; + } + assert!(one == four, "1 and 4 threads gave different bytes"); + assert!(four == again, "two runs gave different bytes"); + let text = + String::from_utf8_lossy(&one[..one.iter().position(|&b| b == b'c').unwrap()]).into_owned(); + assert!( + text.starts_with("#parameter\tgroup\tvalue\nT\t.\t"), + "{text}" + ); +} + +#[test] +fn checkpoints_keep_a_long_chromosome_small() { + let _g = lock(); + // 40,000 sites and 400 haplotypes: keeping every site's forward values + // takes 40,000 x 400 x 8 = 128 MB. + let (panel, cm, target, params) = small_case(11, 40_000, &[150, 150, 100]); + let full_alpha = 40_000 * 400 * 8; + let bound = full_alpha / 16; + let block = if PLANTED { + 40_000 + } else { + checkpoint_block(40_000) + }; + let (_, peak) = peak_of(|| forward_backward(&panel, &cm, &target, ¶ms, block)); + let Some((_, rise)) = peak else { return }; + assert!( + rise < bound, + "memory rose {rise} bytes with checkpoints, not below {bound}" + ); + // The control: keeping every site goes over the bound. + let (_, full) = peak_of(|| forward_backward(&panel, &cm, &target, ¶ms, 40_000)); + let (_, full_rise) = full.expect("measured above"); + eprintln!("memory rose {rise} bytes with checkpoints, {full_rise} keeping every site"); + assert!( + full_rise > bound, + "full storage rose {full_rise} bytes, the bound {bound} would not see it" + ); +} + +#[test] +fn bad_inputs_stop_with_a_reason() { + let _g = lock(); + let t = one_breakpoint(); + let ok = Params::initial(fixture_q(), t.chrom.panel.sizes(), 10_000.0); + let run = |c: &ChromInput, p: Params, threads: usize| { + paint(std::slice::from_ref(c), p, &Options { threads, rounds: 0 }) + .map(|_| ()) + .map_err(|e| e.0) + }; + let mut bad = ok.clone(); + bad.mu = vec![0.5, 0.6]; + assert!(run(&t.chrom, bad, 1).unwrap_err().contains("sum to")); + let mut bad = ok.clone(); + bad.epsilon = 0.6; + assert!(run(&t.chrom, bad, 1).unwrap_err().contains("epsilon")); + let mut c = t.chrom.clone(); + c.cm[5] = c.cm[4] - 1.0; + assert!( + run(&c, ok.clone(), 1) + .unwrap_err() + .contains("never go down") + ); + let mut c = t.chrom.clone(); + c.targets[1] = Bits::from_alleles(&[0, 1]); + assert!( + run(&c, ok.clone(), 1) + .unwrap_err() + .contains("target haplotype 1") + ); + assert!(run(&t.chrom, ok, 0).unwrap_err().contains("thread")); + assert!( + RefPanel::new(vec![0, 0, 2], 3) + .unwrap_err() + .0 + .contains("group 1") + ); +} From 28dac609c419a8f67b4e1088b400460ac091fc03 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:25:00 +0100 Subject: [PATCH 071/110] docs(changelog): note the painting engine Bead: D5 Bead: D14 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..49658d521 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- og-admix has our own local-ancestry painting engine, `og_admix::paint`, written from the published equations of the copying model FLARE uses; no FLARE or RFMix source was read. Each hidden state is an ancestry and a reference haplotype of it. Ancestry events come at T per Morgan and draw the new ancestry from mu; inside an ancestry the copied haplotype jumps at rho_a per Morgan; the copied allele differs from the target's with chance epsilon. Each forward and backward step costs O(H) through per-group totals, the forward values are kept every sqrt(M) sites, and the reference haplotypes are bit-packed. Up to 5 EM rounds over the whole genome fit mu, T, epsilon and rho_a, starting from mu of the continental projection, T 10, epsilon 0.01 and rho_a 4Ne/n_a; `write_params` writes them as `paint/params.tsv`. Chromosomes and haplotypes run on a set number of threads and give the same bytes on any number. No step calls the engine yet, so nothing a run writes changes; step 26b still paints with RFMix. The cargo test `tests/anc_paint_engine.rs` paints a simulated two-group chromosome of 2,000 sites with one breakpoint (bp accuracy 0.9995, the breakpoint 0.002 cM off) and fails it with an emission of 0.5; checks forward-backward against a brute-force model within 1e-9 and the checkpoints against full storage within 1e-12; and measures a 22-chromosome painting under 1 GB. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. From fd7fdd9679768a01e070a0fa934fb684f69d2a8a Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:25:57 +0100 Subject: [PATCH 072/110] feat(freshness): compare the curated PGx tables with CPIC, DailyMed, the FDA and pypgx Three database rows check assets/pgx_contraindications.tsv (CPIC pair, level, provisional; DailyMed label), assets/pgx_inhibitors.tsv (the FDA table of CYP inhibitors, both ways) and assets/pgx_genes.tsv (the newest pypgx gene table). A row that differs is drift, a warning; a source that does not answer is an error. The self-test plants each kind of drift, including a CPIC level moved from A to B. Bead: pgx-34 --- rust/crates/og-fresh/src/lookups.rs | 403 +++++++++++++++++++++++++++ rust/crates/og-fresh/src/selftest.rs | 219 +++++++++++++++ 2 files changed, 622 insertions(+) diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index 14511e2a8..a1cba5895 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -9,6 +9,7 @@ use crate::version::{change_kind, max_by, newer_tags, ver}; use crate::{ DbRow, Found, Lookup, LookupError, Upstream, array, failed, field, need_str, opt_field, string, }; +use indexmap::IndexMap; use pycompat::json::Value; use regex::Regex; use std::collections::BTreeSet; @@ -731,6 +732,405 @@ pub fn cyrius(c: &Ctx<'_>) -> Lookup { }) } +// The curated PGx tables. Each row of assets/pgx_contraindications.tsv, +// assets/pgx_inhibitors.tsv and assets/pgx_genes.tsv was copied by hand from +// a source that can change under it: a CPIC level moves, a label is +// withdrawn, the FDA reclassifies an inhibitor, pypgx gains a copy-number +// model. These lookups compare every row with its source now. A row that no +// longer agrees is `drift` (a warning in the issue, not an error); a source +// that does not answer, or answers empty, is an error as everywhere here. + +/// The CPIC API's pairs of one gene (the `Pair_source` of a row). +pub const CPIC_PAIRS: &str = "https://api.cpicpgx.org/v1/pair_view?genesymbol=eq."; +/// One DailyMed label's version history, by its set id. +pub const DAILYMED_HISTORY: &str = "https://dailymed.nlm.nih.gov/dailymed/services/v2/spls/"; +/// The FDA's table of clinical CYP inhibitors (the `Class_source` of the +/// inhibitor rows). +pub const FDA_CYP_TABLE: &str = "https://www.fda.gov/drugs/drug-interactions-labeling/healthcare-professionals-fdas-examples-drugs-interact-cyp-enzymes-and-transporter-systems"; + +/// The rows of a curated table under `assets/` beside `versions.env`, by +/// column name. `#` lines are comments; the first other line is the header. +pub fn curated(c: &Ctx<'_>, name: &str, need: &[&str]) -> Lookup>> { + let path = c + .versions + .parent() + .unwrap_or_else(|| Path::new("")) + .join("assets") + .join(name); + let text = std::fs::read_to_string(&path) + .map_err(|e| LookupError::Failed(format!("cannot read {}: {e}", path.display())))?; + let mut lines = text + .lines() + .filter(|l| !l.starts_with('#') && !l.trim().is_empty()); + let Some(header) = lines.next() else { + return failed(format!("{name}: no header")); + }; + let header: Vec<&str> = header.split('\t').collect(); + if let Some(miss) = need.iter().find(|n| !header.contains(n)) { + return Err(LookupError::Shape(format!("{name} has no {miss} column"))); + } + let rows: Vec> = lines + .map(|l| { + header + .iter() + .zip(l.split('\t')) + .map(|(h, v)| ((*h).to_owned(), v.trim().to_owned())) + .collect() + }) + .collect(); + if rows.is_empty() { + return failed(format!("{name}: no rows")); + } + Ok(rows) +} + +fn col<'a>(row: &'a IndexMap, name: &str) -> &'a str { + row.get(name).map_or("", String::as_str) +} + +/// The report row of a table check: `current` when nothing drifted, else +/// `drift` with each drifted row named. +fn table_row(item: &str, pinned: String, agree: String, drift: &[String], todo: &str) -> Found { + let upstream = if drift.is_empty() { + agree + } else { + format!("{} difference(s): {}", drift.len(), drift.join("; ")) + }; + Found { + row: DbRow { + item: item.into(), + pinned, + upstream, + state: if drift.is_empty() { "current" } else { "drift" }.into(), + todo: if drift.is_empty() { + String::new() + } else { + todo.into() + }, + }, + upstream: Upstream::ReportOnly, + } +} + +/// `assets/pgx_contraindications.tsv` against the CPIC API (the pair, its +/// level, still provisional) and DailyMed (the label the note quotes is +/// still published). +pub fn pgx_contraindications(c: &Ctx<'_>) -> Lookup { + let rows = curated( + c, + "pgx_contraindications.tsv", + &["Gene", "Drug", "CPIC_level", "Label_source"], + )?; + let mut drift = vec![]; + let mut pairs: IndexMap> = IndexMap::new(); + let mut labels: IndexMap = IndexMap::new(); + static SETID: LazyLock = LazyLock::new(|| re(r"setid=([0-9A-Fa-f-]{36})\b")); + for row in &rows { + let (gene, drug, level) = (col(row, "Gene"), col(row, "Drug"), col(row, "CPIC_level")); + if !pairs.contains_key(gene) { + let body = c.fetch.json(&format!("{CPIC_PAIRS}{gene}"))?; + let list = array(&body, &format!("CPIC pairs of {gene}"))?; + // An empty answer cannot tell a dropped gene from an outage. + if list.is_empty() { + return failed(format!("CPIC pairs of {gene}: empty")); + } + pairs.insert(gene.to_owned(), list.to_vec()); + } + let found = pairs[gene].iter().find(|p| { + matches!(opt_field(p, "drugname"), Ok(Some(Value::Str(d))) if d.eq_ignore_ascii_case(drug)) + }); + let Some(pair) = found else { + drift.push(format!("{gene} {drug}: CPIC no longer lists the pair")); + continue; + }; + let up = need_str(pair, "cpiclevel", &format!("CPIC level of {gene} {drug}"))?; + if up != level { + drift.push(format!( + "{gene} {drug}: CPIC level {up}, the table says {level}" + )); + } + if !matches!(opt_field(pair, "provisional")?, Some(Value::Bool(true))) { + drift.push(format!( + "{gene} {drug}: no longer provisional in CPIC (a guideline: PharmCAT may call the gene)" + )); + } + let Some(setid) = SETID + .captures(col(row, "Label_source")) + .map(|m| m[1].to_owned()) + else { + return Err(LookupError::Shape(format!( + "{gene} {drug}: Label_source has no DailyMed setid" + ))); + }; + let live = match labels.get(&setid) { + Some(l) => *l, + None => { + let body = c + .fetch + .json(&format!("{DAILYMED_HISTORY}{setid}/history.json"))?; + let history = match opt_field(&body, "data")? { + Some(d) => opt_field(d, "history")?, + None => return failed(format!("DailyMed label {setid}: empty")), + }; + let live = matches!(history, Some(Value::Array(h)) if !h.is_empty()); + labels.insert(setid.clone(), live); + live + } + }; + if !live { + drift.push(format!( + "{gene} {drug}: DailyMed no longer publishes label {setid}" + )); + } + } + Ok(table_row( + "Drug warnings for disease genes (assets/pgx_contraindications.tsv, step 27)", + format!("{} rows, CPIC levels and FDA labels", rows.len()), + format!( + "CPIC lists every pair at the same level, provisional; {} label(s) published", + labels.len() + ), + &drift, + "Read the CPIC pair and the label again, then fix, move or drop the row in \ + assets/pgx_contraindications.tsv (its date and Note too) and rerun step 27.", + )) +} + +/// `name` of the FDA table as a medication list names it: lower case, no +/// footnote marks, no markup. +fn fda_cell(raw: &str) -> String { + static SUP: LazyLock = LazyLock::new(|| re(r"(?s).*?")); + static TAG: LazyLock = LazyLock::new(|| re(r"(?s)<[^>]*>")); + let t = SUP.replace_all(raw, ""); + let t = TAG.replace_all(&t, " "); + let t = t.replace(" ", " ").replace("&", "&"); + t.split_whitespace() + .collect::>() + .join(" ") + .to_lowercase() +} + +/// The CYP enzymes of an FDA table cell (`2C19; 2D6 strong inhibitor`). +fn fda_genes(cell: &str) -> Vec { + static G: LazyLock = LazyLock::new(|| re(r"(?i)\b(1A2|2B6|2C8|2C9|2C19|2D6|3A)\b")); + G.captures_iter(cell).map(|m| m[1].to_uppercase()).collect() +} + +/// The FDA table's enzyme name for a table gene: CYP3A4 and CYP3A5 are its +/// `3A`. +fn fda_gene(gene: &str) -> String { + let g = gene.trim_start_matches("CYP"); + if g.starts_with("3A") { + "3A".into() + } else { + g.to_owned() + } +} + +/// One substance of the FDA table with its strong and moderate CYP +/// inhibitions as `(enzyme, strength)`. +pub type FdaRow = (String, Vec<(String, &'static str)>); + +/// The FDA table: (its date, each substance with its strong and moderate +/// CYP inhibitions as `(enzyme, strength)`). +pub fn fda_inhibitors(html: &str) -> Lookup<(Option, Vec)> { + static TABLE: LazyLock = LazyLock::new(|| re(r#"(?s)summary="Table 1\."(.*?)"#)); + static TD: LazyLock = LazyLock::new(|| re(r"(?s)]*>(.*?)")); + static DATE: LazyLock = + LazyLock::new(|| re(r#"(?s)Content current as of.{0,300}?datetime="(\d{4}-\d{2}-\d{2})"#)); + let Some(table) = TABLE.captures(html) else { + return Err(LookupError::Shape( + "the FDA page has no Table 1 of substrates, inhibitors and inducers".into(), + )); + }; + let mut out = vec![]; + for tr in table[1].split(" = TD.captures_iter(tr).map(|m| fda_cell(&m[1])).collect(); + if cells.len() < 3 || cells[0].is_empty() { + continue; + } + let mut inh = vec![]; + for (cell, strength) in [(&cells[1], "strong"), (&cells[2], "moderate")] { + inh.extend(fda_genes(cell).into_iter().map(|g| (g, strength))); + } + out.push((cells[0].clone(), inh)); + } + if out.is_empty() { + return failed("the FDA table of CYP inhibitors: empty"); + } + Ok((DATE.captures(html).map(|m| m[1].to_owned()), out)) +} + +/// The parts of a substance of the FDA table: `lopinavir and ritonavir` is +/// lopinavir and ritonavir. +fn fda_parts(name: &str) -> Vec<&str> { + name.split(" and ") + .map(|p| p.trim_matches(|ch: char| !ch.is_alphanumeric())) + .filter(|p| !p.is_empty()) + .collect() +} + +/// `assets/pgx_inhibitors.tsv` against the FDA's table of CYP inhibitors: +/// every row's class, and every strong or moderate inhibitor of a gene the +/// table covers (strong only for CYP3A) that has no row. +pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { + let rows = curated(c, "pgx_inhibitors.tsv", &["Drug", "Gene", "Strength"])?; + let html = c.fetch.text(FDA_CYP_TABLE)?; + let (date, fda) = fda_inhibitors(&html)?; + let strength_of = |names: &[&FdaRow], g: &str| { + let s: Vec<&str> = names + .iter() + .flat_map(|(_, inh)| inh.iter().filter(|(e, _)| e == g).map(|(_, s)| *s)) + .collect(); + if s.contains(&"strong") { + Some("strong") + } else if s.contains(&"moderate") { + Some("moderate") + } else { + None + } + }; + let mut drift = vec![]; + for row in &rows { + let (drug, gene, ours) = (col(row, "Drug"), col(row, "Gene"), col(row, "Strength")); + // Its own rows and the ritonavir-boosted combinations it is part + // of: a partner row takes the combination's class (indinavir alone + // is no strong inhibitor; indinavir and ritonavir is). + let named: Vec<_> = fda + .iter() + .filter(|(n, _)| fda_parts(n).contains(&drug)) + .collect(); + if named.is_empty() { + drift.push(format!("{drug} {gene}: not in the FDA table")); + continue; + } + match strength_of(&named, &fda_gene(gene)) { + Some(s) if s == ours => {} + Some(s) => drift.push(format!( + "{drug} {gene}: the FDA says {s}, the table says {ours}" + )), + None => drift.push(format!( + "{drug} {gene}: the FDA no longer lists it as a strong or moderate inhibitor" + )), + } + } + // What the table covers: strong and moderate inhibitors of CYP2D6, + // CYP2C19, CYP2C9 and CYP2B6, strong inhibitors of CYP3A. + let has = |drug: &str, g: &str| { + rows.iter() + .any(|r| col(r, "Drug") == drug && fda_gene(col(r, "Gene")) == g) + }; + for (name, inh) in &fda { + let first = fda_parts(name).first().copied().unwrap_or(name.as_str()); + for (g, s) in inh { + let covered = matches!(g.as_str(), "2D6" | "2C19" | "2C9" | "2B6") + || (g == "3A" && *s == "strong"); + if covered && !has(name, g) && !has(first, g) { + drift.push(format!( + "{name}: the FDA lists a {s} CYP{g} inhibitor the table has no row for" + )); + } + } + } + Ok(table_row( + "Drug interactions (assets/pgx_inhibitors.tsv, step 27)", + format!("{} rows, FDA classes read 2026-11-03", rows.len()), + format!( + "the FDA table{} classes every row the same and has no inhibitor the table lacks", + date.map(|d| format!(" (current as of {d})")) + .unwrap_or_default() + ), + &drift, + "Read the FDA table again, then fix, add or drop the rows in assets/pgx_inhibitors.tsv \ + (and the date in its header) and rerun step 27 with a medication list.", + )) +} + +/// The fields of one CSV line; a quoted field may hold commas. +fn csv_fields(line: &str) -> Vec { + let (mut out, mut cur, mut quoted) = (vec![], String::new(), false); + for ch in line.chars() { + match ch { + '"' => quoted = !quoted, + ',' if !quoted => out.push(std::mem::take(&mut cur)), + _ => cur.push(ch), + } + } + out.push(cur); + out +} + +/// `assets/pgx_genes.tsv` against the gene table of pypgx's newest release: +/// every row is a pypgx gene, and the bam rows are exactly the genes with a +/// copy-number model (SV=TRUE). tests/test_pypgx_genes.sh checks the same +/// at the pinned version; this says when a newer pypgx moves it. +pub fn pgx_genes(c: &Ctx<'_>) -> Lookup { + let rows = curated(c, "pgx_genes.tsv", &["gene", "mode"])?; + let latest = need_str( + &c.fetch.github("/repos/sbslee/pypgx/releases/latest")?, + "tag_name", + "pypgx latest release", + )?; + let csv = c.fetch.text(&format!( + "{RAW}/sbslee/pypgx/{latest}/pypgx/api/data/gene-table.csv" + ))?; + let mut lines = csv.lines().filter(|l| !l.trim().is_empty()); + let header = csv_fields(lines.next().unwrap_or("")); + let (Some(gi), Some(si)) = ( + header.iter().position(|h| h == "Gene"), + header.iter().position(|h| h == "SV"), + ) else { + return Err(LookupError::Shape(format!( + "pypgx {latest} gene-table.csv has no Gene or SV column" + ))); + }; + let mut sv: indexmap::IndexMap = indexmap::IndexMap::new(); + for l in lines { + let f = csv_fields(l); + if let (Some(g), Some(s)) = (f.get(gi), f.get(si)) { + sv.insert(g.clone(), s == "TRUE"); + } + } + if sv.is_empty() { + return failed(format!("pypgx {latest} gene-table.csv: empty")); + } + let mut drift = vec![]; + for row in &rows { + let (gene, mode) = (col(row, "gene"), col(row, "mode")); + match sv.get(gene) { + None => drift.push(format!("{gene}: not in pypgx {latest}'s gene table")), + Some(false) if mode == "bam" => drift.push(format!( + "{gene}: a bam row, but pypgx {latest} has no copy-number model for it" + )), + _ => {} + } + } + for (gene, has_sv) in &sv { + if *has_sv + && !rows + .iter() + .any(|r| col(r, "gene") == gene && col(r, "mode") == "bam") + { + drift.push(format!( + "{gene}: pypgx {latest} has a copy-number model, but it is not a bam row" + )); + } + } + let bam = rows.iter().filter(|r| col(r, "mode") == "bam").count(); + Ok(table_row( + "pypgx genes (assets/pgx_genes.tsv, step 32)", + format!( + "{} genes, {bam} bam (pypgx {})", + rows.len(), + c.pins.get("PYPGX_BUNDLE_VERSION").unwrap_or("?") + ), + format!("pypgx {latest}'s gene table agrees"), + &drift, + "When PYPGX_IMAGE moves to this pypgx, change the rows of assets/pgx_genes.tsv \ + with it (tests/test_pypgx_genes.sh checks them at the pin) and rerun step 32.", + )) +} + /// A lookup by its report name. pub type LookupFn = fn(&Ctx<'_>) -> Lookup; @@ -751,6 +1151,9 @@ pub const DATABASES: &[(&str, LookupFn)] = &[ ("Cyrius", cyrius), ("Parascopy data", parascopy_data), ("gnomAD constraint", gnomad), + ("PGx contraindications table", pgx_contraindications), + ("PGx inhibitors table", pgx_inhibitors), + ("PGx genes table", pgx_genes), ]; /// One image of the images section. diff --git a/rust/crates/og-fresh/src/selftest.rs b/rust/crates/og-fresh/src/selftest.rs index e2c45e774..3883a15e5 100644 --- a/rust/crates/og-fresh/src/selftest.rs +++ b/rust/crates/og-fresh/src/selftest.rs @@ -316,6 +316,117 @@ pub fn data_rows( ) } +/// The curated PGx table rows (contraindications, inhibitors, pypgx genes) +/// on planted tables and stubbed answers: (state, upstream) of each, and +/// the number of errors. +pub fn pgx_rows(answers: Vec<(&'static str, Option)>) -> (Vec<(String, String)>, usize) { + let stub = Stub::new(answers); + let scratch = Scratch::new().expect("a private scratch folder"); + let d = scratch.path(); + let versions = d.join("versions.env"); + let _ = std::fs::write(&versions, "PYPGX_BUNDLE_VERSION=\"0.26.0\"\n"); + let _ = std::fs::create_dir(d.join("assets")); + let _ = std::fs::write( + d.join("assets/pgx_contraindications.tsv"), + "# a comment\nGene\tDrug\tNames\tCPIC_level\tNote\tPair_source\tLabel_source\tReport_if\n\ + POLG\tvalproic acid\tvalproic\tA\tn\thttps://api.cpicpgx.org/v1/pair_view?genesymbol=eq.POLG\t\ + https://dailymed.nlm.nih.gov/dailymed/drugInfo.cfm?setid=08a65cf4-7749-4ceb-6895-8f4805e2b01f\tany\n", + ); + let _ = std::fs::write( + d.join("assets/pgx_inhibitors.tsv"), + "Drug\tGene\tStrength\tActivity_score_factor\tClass_source\tRule_source\n\ + bupropion\tCYP2D6\tstrong\t0\tx\tx\n\ + lopinavir\tCYP3A4\tstrong\t-\tx\t-\n", + ); + let _ = std::fs::write( + d.join("assets/pgx_genes.tsv"), + "gene\tmode\tcallable_without_alt\talt_contig\tsecond_caller\tpharmcat_outside_call\n\ + CYP2D6\tbam\tyes\t.\tcyrius\tyes\nCYP2C9\tvcf\tyes\t.\tpharmcat\tno\n", + ); + let pins = Pins::parse("PYPGX_BUNDLE_VERSION=\"0.26.0\"\n"); + let reg = FakeRegistry { + tags: |_| vec![], + digests: |_| String::new(), + asked: Mutex::new(vec![]), + }; + let ctx = Ctx { + fetch: &stub, + registry: ®, + pins: &pins, + versions: &versions, + setup: Path::new("/nonexistent"), + common: Path::new("/nonexistent"), + now: jiff::Timestamp::now(), + }; + let mut r = Report::default(); + for (what, f) in [ + ( + "PGx contraindications table", + lookups::pgx_contraindications as lookups::LookupFn, + ), + ("PGx inhibitors table", lookups::pgx_inhibitors), + ("PGx genes table", lookups::pgx_genes), + ] { + match f(&ctx) { + Ok(found) => r.db_rows.push(found.row), + Err(e) => r.db_error(what, &e), + } + } + drop(scratch); + ( + r.db_rows + .into_iter() + .map(|x| (x.state, x.upstream)) + .collect(), + r.errors.len(), + ) +} + +/// The CPIC API's answer for the planted POLG row. +fn cpic(level: &str, provisional: bool) -> Option { + Some(Body::Json(Value::Array(vec![ + obj(vec![ + ("drugname", s("divalproex sodium")), + ("cpiclevel", s("A")), + ("provisional", Value::Bool(true)), + ]), + obj(vec![ + ("drugname", s("valproic acid")), + ("cpiclevel", s(level)), + ("provisional", Value::Bool(provisional)), + ]), + ]))) +} + +/// DailyMed's version history of a label, empty when it is withdrawn. +fn dailymed(live: bool) -> Option { + let history = if live { + vec![obj(vec![("spl_version", Value::Int(3))])] + } else { + vec![] + }; + Some(Body::Json(obj(vec![( + "data", + obj(vec![("history", Value::Array(history))]), + )]))) +} + +/// The FDA page with its Table 1: one row per (substance, strong cell, +/// moderate cell). +fn fda(rows: &[(&str, &str, &str)]) -> Option { + let mut html = String::from( + "

Content current as of:

\ + ", + ); + for (name, strong, moderate) in rows { + html += &format!( + "" + ); + } + html += "
DrugStrgModWK
{name}1{strong}{moderate}1A2  weak  inhibitor
"; + text(&html) +} + fn text(t: &str) -> Option { Some(Body::Text(t.into())) } @@ -579,6 +690,114 @@ pub fn run(out: &mut dyn Write) -> u8 { &format!("an answer without the release is an error row for each of the five ({st:?})"), ); + // The curated PGx tables against their sources, on planted tables: the + // same answer is current, a changed one is drift naming the row, and an + // empty or unreadable answer is an error row. + let agree = || { + vec![ + ("api.cpicpgx.org", cpic("A", true)), + ("dailymed.nlm.nih.gov", dailymed(true)), + ( + "fda.gov", + fda(&[ + ("bupropion", "2D6  strong  inhibitor", " "), + ("lopinavir", " ", " "), + ("lopinavir and ritonavir", "3A strong inhibitor", " "), + ("aprepitant", " ", "3A  moderate  inhibitor"), + ]), + ), + ( + "api.github.invalid", + Some(Body::Json(obj(vec![("tag_name", s("0.27.0"))]))), + ), + ( + "gene-table.csv", + text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",FALSE\n"), + ), + ] + }; + let (rows, e) = pgx_rows(agree()); + check( + rows.iter().all(|(st, _)| st == "current") && rows.len() == 3 && e == 0, + &format!( + "PGx tables: rows that agree with CPIC, DailyMed, the FDA and pypgx are current ({rows:?})" + ), + ); + let mut drifted = agree(); + drifted[0].1 = cpic("B", true); + drifted[2].1 = fda(&[ + ("bupropion", " ", "2D6 moderate inhibitor"), + ("lopinavir and ritonavir", "3A strong inhibitor", " "), + ("newdrug", "2C19 strong inhibitor", " "), + ]); + drifted[4].1 = + text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",TRUE\n"); + let (rows, e) = pgx_rows(drifted); + let said = |rows: &[(String, String)], i: usize, what: &str| { + rows.get(i) + .is_some_and(|(st, up)| st == "drift" && up.contains(what)) + }; + check( + said( + &rows, + 0, + "POLG valproic acid: CPIC level B, the table says A", + ) && e == 0, + &format!( + "PGx tables: a planted row whose CPIC level moved from A to B is drift ({:?})", + rows.first() + ), + ); + check( + said( + &rows, + 1, + "bupropion CYP2D6: the FDA says moderate, the table says strong", + ) && said( + &rows, + 1, + "newdrug: the FDA lists a strong CYP2C19 inhibitor", + ), + &format!( + "PGx tables: a reclassified inhibitor and a new one are drift ({:?})", + rows.get(1) + ), + ); + check( + said( + &rows, + 2, + "CYP2C9: pypgx 0.27.0 has a copy-number model, but it is not a bam row", + ), + &format!( + "PGx tables: a new pypgx copy-number model is drift ({:?})", + rows.get(2) + ), + ); + let mut gone = agree(); + gone[0].1 = cpic("A", false); + gone[1].1 = dailymed(false); + let (rows, _) = pgx_rows(gone); + check( + said(&rows, 0, "no longer provisional") + && said(&rows, 0, "DailyMed no longer publishes label"), + &format!( + "PGx tables: a pair with a guideline and a withdrawn label are drift ({:?})", + rows.first() + ), + ); + let mut broken = agree(); + broken[0].1 = Some(Body::Json(Value::Array(vec![]))); + broken[2].1 = text("no table"); + broken[4].1 = None; + let (rows, e) = pgx_rows(broken); + check( + rows.iter().all(|(st, _)| st == "ERROR") && e == 3, + &format!( + "PGx tables: an empty CPIC answer, an FDA page without its table and a missing gene table are errors ({rows:?})" + ), + ); + // 2. A fake server: an empty or truncated 200 must fail, and the issue // logic. let gh = Arc::new(Mutex::new(FakeGitHub::default())); From 34ccd45d50cd0af60e42032bbae5cf411bca3baa Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:25:57 +0100 Subject: [PATCH 073/110] ci(freshness): run the freshness checks when a curated PGx table changes Bead: pgx-34 --- .github/workflows/freshness.yml | 17 ++++++++++++----- CHANGELOG.md | 1 + 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/freshness.yml b/.github/workflows/freshness.yml index 144b3f886..6e4fa2140 100644 --- a/.github/workflows/freshness.yml +++ b/.github/workflows/freshness.yml @@ -5,7 +5,13 @@ name: Freshness # behind upstream or stopped answering. Renovate bumps image tags; this covers # what it cannot see (the Ensembl cache release, the PCGR bundle date, the # pypgx-bundle tag, the Nextflow line, the ClinVar file date) and lists the -# major updates Renovate does not open on its own. +# major updates Renovate does not open on its own. It also compares the +# curated PGx tables with their sources: each row of +# assets/pgx_contraindications.tsv with its CPIC pair (level, provisional) and +# its DailyMed label, assets/pgx_inhibitors.tsv with the FDA table of CYP +# inhibitors, and assets/pgx_genes.tsv with the gene table of the newest +# pypgx. A row that no longer agrees shows as `drift` in the issue: a warning +# to fix the table, not a failed run. # # The issue is found by a marker in its body, not by the label alone, so an # issue another workflow files under the same label is never overwritten. A @@ -73,7 +79,8 @@ concurrency: jobs: # Every pull request starts this workflow, so main can require its checks. # This job says whether a pull request touches scripts/, docs/, - # versions.env, assets/pgs_scores.tsv, rust/crates/og-fresh/ or this file; + # versions.env, assets/pgs_scores.tsv, the curated PGx tables, + # rust/crates/og-fresh/ or this file; # when it does not, self-tests and pull-request are skipped, which GitHub # counts as passed. # Outside a pull request the answer is always run=true. A failed or missing @@ -103,7 +110,7 @@ jobs: if [ "$EVENT" != "pull_request" ]; then echo "run=true" >> "$GITHUB_OUTPUT"; exit 0; fi git diff --name-only "${BASE}...${HEAD_SHA}" > "${RUNNER_TEMP}/changed.txt" cat "${RUNNER_TEMP}/changed.txt" - if grep -qE '^(scripts|docs|rust/crates/og-fresh)/|^(versions\.env|assets/pgs_scores\.tsv|\.github/workflows/freshness\.yml)$' "${RUNNER_TEMP}/changed.txt"; then + if grep -qE '^(scripts|docs|rust/crates/og-fresh)/|^(versions\.env|assets/pgs_scores\.tsv|assets/pgx_(contraindications|inhibitors|genes)\.tsv|\.github/workflows/freshness\.yml)$' "${RUNNER_TEMP}/changed.txt"; then echo "run=true" >> "$GITHUB_OUTPUT" else echo "Nothing the freshness checks read changed: they are skipped." @@ -138,7 +145,7 @@ jobs: working-directory: rust run: cargo build --release --locked -p og --no-default-features - - name: og dev freshness self-test (a bogus image, a missing tag and a bogus URL must exit non-zero) + - name: og dev freshness self-test (a bogus image, a missing tag and a bogus URL must exit non-zero; a planted PGx table row whose CPIC level moved must show as drift) run: rust/target/release/og dev freshness --self-test # check-links.sh and check-pgs-labels.sh read with og dev versions @@ -180,7 +187,7 @@ jobs: has() { grep -qxE "$1" "${RUNNER_TEMP}/changed.txt" && echo true || echo false; } { echo "prs=$(has 'scripts/25-prs\.sh|assets/pgs_scores\.tsv|scripts/ci/check-pgs-labels\.sh|\.github/workflows/freshness\.yml')" - echo "report=$(has 'rust/crates/og-fresh/.*|versions\.env|\.github/workflows/freshness\.yml')" + echo "report=$(has 'rust/crates/og-fresh/.*|versions\.env|assets/pgx_(contraindications|inhibitors|genes)\.tsv|\.github/workflows/freshness\.yml')" } >> "$GITHUB_OUTPUT" # og dev freshness (rust/crates/og-fresh) writes the report, and the diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..a5b529961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- The monthly freshness issue now says when a curated drug table no longer matches its source. Three rows join its database table. Each row of `assets/pgx_contraindications.tsv` is compared with its CPIC pair (the pair exists, its level, still provisional) and with its DailyMed label (still published). `assets/pgx_inhibitors.tsv` is compared with the FDA table of CYP inhibitors: each row's class, and any strong or moderate CYP2D6, CYP2C19, CYP2C9 or CYP2B6 inhibitor, or strong CYP3A inhibitor, that has no row. `assets/pgx_genes.tsv` is compared with the gene table of the newest pypgx release. A row that differs shows as `drift` with the row named; it is a warning to fix the table, and the run stays green. A source that does not answer, or answers empty, is an error as for every other lookup. The freshness checks now also run on a pull request that changes one of the three tables. `og dev freshness --self-test` plants a row whose CPIC level moved from A to B and fails unless it shows as drift. No pipeline output changes. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. From a7482f852bef7cf17d0c402633c132060bf03f5f Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 22:54:51 +0100 Subject: [PATCH 074/110] fix(longread): infer no Clair3 model from partly annotated read groups A BAM with one read group naming a basecaller model and another naming none gave the named model to every read. Such a BAM now stops like one with mixed models, in both modes of og longread clair3-model; an explicit BASECALL_MODEL or CLAIR3_MODEL still decides. Step 02b reads the basecaller of an unaligned BAM reached through a link whose name has no .bam, as its conversion branch already did. Bead: plat-59 --- CHANGELOG.md | 2 +- docs/long-read-guide.md | 4 +- rust/crates/og-steps/src/longread.rs | 112 ++++++++++++++---- scripts/02b-alignment-longread.sh | 2 +- .../alignment-markdup-gvcf-sex-calling.sh | 6 + 5 files changed, 96 insertions(+), 30 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e8f3af05..ff195353a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- Step 03e picks the Clair3 model for ONT reads from their basecaller. Before, it used the Dorado v5.0.0 SUP model for every ONT sample unless `CLAIR3_MODEL` was set, so reads from another basecaller got the wrong model: Clair3 still wrote a VCF, with less accurate calls and no warning. Now step 02b writes the basecaller model into the aligned BAM's read group (`DS:basecall_model=...`), from the new `BASECALL_MODEL` or from the `basecall_model=` Dorado writes into an unaligned BAM. Step 03e runs `og longread clair3-model` inside the Clair3 image, which maps the name to the model directory (R10.4.1 400 bps SUP and HAC by version, R9.4.1 SUP and HAC) and checks that the directory is in the image. `CLAIR3_MODEL` still wins and is checked too. With no basecaller model known, one Clair3 has no model for (fast basecalls), or a model the image lacks, the step stops with exit 1 and lists the image's models. So an ONT run that worked before without a basecaller model in its BAM now stops until `BASECALL_MODEL` or `CLAIR3_MODEL` is set. HiFi does not change. The aligned BAM of an ONT run gains a `DS` field in its `@RG` line; no output file name changes. `docs/long-read-guide.md` has the mapping. +- Step 03e picks the Clair3 model for ONT reads from their basecaller. Before, it used the Dorado v5.0.0 SUP model for every ONT sample unless `CLAIR3_MODEL` was set, so reads from another basecaller got the wrong model: Clair3 still wrote a VCF, with less accurate calls and no warning. Now step 02b writes the basecaller model into the aligned BAM's read group (`DS:basecall_model=...`), from the new `BASECALL_MODEL` or from the `basecall_model=` Dorado writes into an unaligned BAM. Step 03e runs `og longread clair3-model` inside the Clair3 image, which maps the name to the model directory (R10.4.1 400 bps SUP and HAC by version, R9.4.1 SUP and HAC) and checks that the directory is in the image. `CLAIR3_MODEL` still wins and is checked too. With no basecaller model known, read groups that name different models or only some that name one, a basecaller Clair3 has no model for (fast basecalls), or a model the image lacks, the step stops with exit 1 and lists the image's models. So an ONT run that worked before without a basecaller model in its BAM now stops until `BASECALL_MODEL` or `CLAIR3_MODEL` is set. HiFi does not change. The aligned BAM of an ONT run gains a `DS` field in its `@RG` line; no output file name changes. `docs/long-read-guide.md` has the mapping. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. diff --git a/docs/long-read-guide.md b/docs/long-read-guide.md index f35f05a6e..3a0fecc9f 100644 --- a/docs/long-read-guide.md +++ b/docs/long-read-guide.md @@ -187,7 +187,7 @@ Clair3 uses deep-learning models trained on long-read error profiles, one per pl | R9.4.1 HAC | `r941_prom_hac_g360+g422` | | fast models, other pores or speeds, RNA | none | -The pinned image holds the R10.4.1 SUP models v4.1.0, v5.0.0 and v5.2.0 and the HAC models v4.1.0, v5.0.0, v5.2.0 and v6.0.0. Before Clair3 runs, the step checks that the chosen directory exists in the image, `CLAIR3_MODEL` included. With no basecaller model known, one with no Clair3 model (fast basecalls), or a model the image lacks (for example SUP v4.3.0), the step stops with exit 1 and lists the image's models. It never falls back to another model: a model trained on other basecalls still writes a VCF, but every call is less accurate and nothing in the output says so. Set `CLAIR3_MODEL` to use a model by hand. +The pinned image holds the R10.4.1 SUP models v4.1.0, v5.0.0 and v5.2.0 and the HAC models v4.1.0, v5.0.0, v5.2.0 and v6.0.0. Before Clair3 runs, the step checks that the chosen directory exists in the image, `CLAIR3_MODEL` included. With no basecaller model known, read groups that name different models or only some that name one, a basecaller with no Clair3 model (fast basecalls), or a model the image lacks (for example SUP v4.3.0), the step stops with exit 1 and lists the image's models. It never falls back to another model: a model trained on other basecalls still writes a VCF, but every call is less accurate and nothing in the output says so. Set `CLAIR3_MODEL` to use a model by hand. #### Option B: DeepVariant (long-read mode) @@ -369,7 +369,7 @@ Long-read alignment uses more memory than short-read because the index is loaded Step 3e stopped before Clair3 ran, because it could not match a model to the reads' basecaller. The message lists the models in `CLAIR3_IMAGE` (`/opt/models/`). -1. No basecaller model: set `BASECALL_MODEL` to the Dorado model the reads were basecalled with. Dorado's BAM names it in its `@RG` line (`samtools view -H reads.bam | grep '^@RG'`), and its FASTQ headers carry `basecall_model_version_id=`. +1. No basecaller model, or read groups that do not agree on one: set `BASECALL_MODEL` to the Dorado model the reads were basecalled with. Dorado's BAM names it in its `@RG` line (`samtools view -H reads.bam | grep '^@RG'`), and its FASTQ headers carry `basecall_model_version_id=`. 2. No Clair3 model or not in the image: set `CLAIR3_MODEL` to the listed model closest to your basecaller, for example `CLAIR3_MODEL=/opt/models/r1041_e82_400bps_sup_v520`, or use a newer `CLAIR3_IMAGE` that ships the matching model. ### "Sniffles2 needs long reads" or "Sniffles2 produces 0 SVs" diff --git a/rust/crates/og-steps/src/longread.rs b/rust/crates/og-steps/src/longread.rs index 40e1cf1c8..ed501097b 100644 --- a/rust/crates/og-steps/src/longread.rs +++ b/rust/crates/og-steps/src/longread.rs @@ -88,10 +88,12 @@ fn version_digits(version: &str) -> Option { } /// The distinct `basecall_model=` values of the header's `@RG` `DS` -/// fields, sorted. -pub fn basecallers(header: &str) -> Vec { +/// fields, sorted, and how many read groups name none. +pub fn basecallers(header: &str) -> (Vec, usize) { let mut found = BTreeSet::new(); + let mut unnamed = 0; for line in header.split('\n').filter(|l| l.starts_with("@RG\t")) { + let mut named = false; for tag in line.trim_end_matches('\r').split('\t').skip(1) { let Some(ds) = tag.strip_prefix("DS:") else { continue; @@ -101,11 +103,34 @@ pub fn basecallers(header: &str) -> Vec { && !v.is_empty() { found.insert(v.to_owned()); + named = true; } } } + if !named { + unnamed += 1; + } + } + (found.into_iter().collect(), unnamed) +} + +/// The one basecaller model of every read group of the header; `None` +/// when no read group names one. Read groups that name different models, +/// or some that name one and some none, are an error: one Clair3 model +/// cannot be chosen for the whole BAM from them. +pub fn bam_basecaller(header: &str) -> Result, String> { + let (found, unnamed) = basecallers(header); + match found.as_slice() { + [] => Ok(None), + [one] if unnamed == 0 => Ok(Some(one.clone())), + [one] => Err(format!( + "{unnamed} read group(s) name no basecaller model while others name {one}, so the model of every read is not known" + )), + many => Err(format!( + "the read groups name more than one basecaller model ({}), and one Clair3 model cannot fit them all", + many.join(", ") + )), } - found.into_iter().collect() } /// The directories under `dir`, sorted; empty when it cannot be read. @@ -191,25 +216,19 @@ pub fn clair3_model_cli(args: &[String], out: &mut dyn Write, err: &mut dyn Writ } fn run(o: &Opts) -> Result, String> { - let from_bam = || -> Result, String> { + let bam = o.bam.as_deref().unwrap_or("the BAM"); + let from_bam = || -> Result, String> { match &o.bam { - Some(bam) => bam_header(bam).map(|h| basecallers(&h)).map_err(|e| e.0), - None => Ok(Vec::new()), + Some(path) => bam_basecaller(&bam_header(path).map_err(|e| e.0)?) + .map_err(|e| format!("{bam}: {e}")), + None => Ok(None), } }; if o.basecaller_only { if o.bam.is_none() { return Err("--basecaller-only needs --bam".to_owned()); } - let found = from_bam()?; - return match found.as_slice() { - [] => Ok(None), - [one] => Ok(Some(one.clone())), - many => Err(format!( - "the read groups name more than one basecaller model: {}", - many.join(", ") - )), - }; + return from_bam(); } let models_dir = o.models_dir.as_deref().unwrap_or("/opt/models"); let available = || { @@ -228,20 +247,17 @@ fn run(o: &Opts) -> Result, String> { { (b.to_owned(), "BASECALL_MODEL") } else { - let found = from_bam()?; - let bam = o.bam.as_deref().unwrap_or("the BAM"); - match found.as_slice() { - [one] => (one.clone(), "the BAM's read group"), - [] => { + match from_bam() { + Ok(Some(one)) => (one, "the BAM's read group"), + Ok(None) => { return Err(format!( "{bam} names no basecaller model (no basecall_model= in an @RG DS field), so the Clair3 model cannot be chosen. Set BASECALL_MODEL to the Dorado model the reads were basecalled with (for example dna_r10.4.1_e8.2_400bps_sup@v5.0.0), or CLAIR3_MODEL to a model directory; {}.", available() )); } - many => { + Err(e) => { return Err(format!( - "{bam} holds reads from more than one basecaller model ({}); one Clair3 model cannot fit them all. Set CLAIR3_MODEL to the model directory to use; {}.", - many.join(", "), + "{e}. Set CLAIR3_MODEL to the model directory to use, or BASECALL_MODEL; {}.", available() )); } @@ -366,11 +382,27 @@ mod tests { @CO\tbasecall_model=comment\n"; assert_eq!( basecallers(header), - vec!["dna_r10.4.1_e8.2_400bps_sup@v5.0.0".to_owned()] + (vec!["dna_r10.4.1_e8.2_400bps_sup@v5.0.0".to_owned()], 0) + ); + assert_eq!( + bam_basecaller(header), + Ok(Some("dna_r10.4.1_e8.2_400bps_sup@v5.0.0".to_owned())) ); let two = "@RG\tID:a\tDS:basecall_model=x@v1.0.0\n@RG\tID:b\tDS:basecall_model=y@v1.0.0\n"; - assert_eq!(basecallers(two).len(), 2); - assert!(basecallers("@RG\tID:a\tPL:ONT\n").is_empty()); + assert_eq!(basecallers(two).0.len(), 2); + assert!(bam_basecaller(two).is_err()); + assert_eq!(basecallers("@RG\tID:a\tPL:ONT\n"), (Vec::new(), 1)); + assert_eq!(bam_basecaller("@RG\tID:a\tPL:ONT\n"), Ok(None)); + assert_eq!(bam_basecaller("@HD\tVN:1.6\n"), Ok(None)); + // One read group named, one not: the other's reads may be from any + // basecaller, so no model is inferred. + let partial = "@RG\tID:a\tDS:basecall_model=x@v1.0.0\n@RG\tID:b\tDS:runid=r2\n"; + assert_eq!(basecallers(partial), (vec!["x@v1.0.0".to_owned()], 1)); + let e = bam_basecaller(partial).unwrap_err(); + assert!( + e.contains("1 read group(s) name no basecaller model"), + "{e}" + ); } fn scratch(name: &str) -> std::path::PathBuf { @@ -482,6 +514,34 @@ mod tests { let (code, out, _) = cli(&["--bam", &without, "--basecaller-only"]); assert_eq!((code, out.as_str()), (0, "")); + // A BAM with one read group named and one not: no model is inferred, + // in either mode, but BASECALL_MODEL still decides. + let partial = bam( + &d, + "partial.bam", + "@RG\tID:a\tDS:basecall_model=dna_r10.4.1_e8.2_400bps_sup@v5.0.0\n@RG\tID:b\tPL:ONT\n", + ); + let (code, out, err) = cli(&["--bam", &partial, "--models-dir", &models]); + assert_eq!((code, out.as_str()), (1, "")); + assert!( + err.contains("name no basecaller model while others name"), + "{err}" + ); + let (code, out, _) = cli(&["--bam", &partial, "--basecaller-only"]); + assert_eq!((code, out.as_str()), (1, "")); + let (code, out, _) = cli(&[ + "--bam", + &partial, + "--basecaller", + "dna_r10.4.1_e8.2_400bps_sup@v5.0.0", + "--models-dir", + &models, + ]); + assert_eq!( + (code, out), + (0, format!("{models}/r1041_e82_400bps_sup_v500\n")) + ); + // A usage error is exit 2. let (code, _, err) = cli(&["--og-scaffold-probe"]); assert_eq!(code, 2); diff --git a/scripts/02b-alignment-longread.sh b/scripts/02b-alignment-longread.sh index c0d57b551..d2123a5d1 100755 --- a/scripts/02b-alignment-longread.sh +++ b/scripts/02b-alignment-longread.sh @@ -113,7 +113,7 @@ case "$BASECALLER" in echo "ERROR: BASECALL_MODEL holds characters a basecaller model name never has: '${BASECALLER}'" >&2 exit 2 ;; esac -if [ "$PLATFORM" = ont ] && [ -z "$BASECALLER" ] && [[ "$INPUT_FILE" == *.bam ]]; then +if [ "$PLATFORM" = ont ] && [ -z "$BASECALLER" ] && [[ "$REAL_INPUT" == *.bam ]]; then BASECALLER=$(run_in --cpus 1 --memory 1g -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$SAMTOOLS_IMAGE" \ /pgp-bin/og longread clair3-model --basecaller-only --bam "/genome/${REAL_INPUT#"${REAL_GENOME}/"}") \ || { echo "NOTE: the basecaller model of the unaligned BAM could not be read (see above)." >&2; BASECALLER=""; } diff --git a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh index 49d934c23..c6daf5d23 100755 --- a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh +++ b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh @@ -198,6 +198,12 @@ mkbam "${GENOME_DIR}/sample1/fastq/sample1.bam" $'@HD\tVN:1.6\n@RG\tID:run1\tPL: run_expect 0 longread-ubam env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" "${SCRIPTS}/02b-alignment-longread.sh" sample1 docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.2\.0 ' \ "step 02b did not carry the unaligned BAM's basecaller model into the read group" +# An INPUT with no .bam in its name that links to the unaligned BAM. +ln -s sample1.bam "${GENOME_DIR}/sample1/fastq/reads-link" +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-ubam-link env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/reads-link" "${SCRIPTS}/02b-alignment-longread.sh" sample1 +docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2_400bps_sup@v5\.2\.0 ' \ + "step 02b did not read the basecaller model of an unaligned BAM reached through a link" : > "$FAKE_DOCKER_LOG" run_expect 0 longread-hifi env PLATFORM=hifi INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 "${SCRIPTS}/02b-alignment-longread.sh" sample1 if grep -q 'DS:basecall_model' "$FAKE_DOCKER_LOG"; then fail "step 02b wrote a basecaller model for HiFi reads"; fi From e011ae36d2ba3ad5d9d18c5f88b65ee44c20c848 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:02:38 +0100 Subject: [PATCH 075/110] fix(freshness): ask fda.gov for a web page The FDA table answered HTTP 404 to the GitHub runner's request, which asked for nothing in particular. Send the Accept and Accept-Language headers a browser sends for a page. Bead: pgx-34 --- rust/crates/og-fresh/src/lookups.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index a1cba5895..6c17f78c3 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -2,7 +2,7 @@ //! image and digest sections. Each lookup returns its report row and a //! typed answer ([`Found`]); a lookup that cannot answer is an error. -use crate::http::Fetch; +use crate::http::{Body, Fetch, Request, Want}; use crate::pins::{Pins, hla_db_release, setting, vep_cache_template}; use crate::registry::{Registry, split_image}; use crate::version::{change_kind, max_by, newer_tags, ver}; @@ -975,7 +975,14 @@ fn fda_parts(name: &str) -> Vec<&str> { /// table covers (strong only for CYP3A) that has no row. pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { let rows = curated(c, "pgx_inhibitors.tsv", &["Drug", "Gene", "Strength"])?; - let html = c.fetch.text(FDA_CYP_TABLE)?; + // fda.gov answers 404 to a request that does not ask for a web page. + let req = Request::get(FDA_CYP_TABLE, Want::Text) + .header("Accept", "text/html,application/xhtml+xml") + .header("Accept-Language", "en-US,en;q=0.9"); + let html = match c.fetch.request(&req)?.0 { + Body::Text(t) => t, + _ => return Err(LookupError::Shape(format!("{FDA_CYP_TABLE}: no text body"))), + }; let (date, fda) = fda_inhibitors(&html)?; let strength_of = |names: &[&FdaRow], g: &str| { let s: Vec<&str> = names From 0fa7d9cd51b19591c13235e1fed168670c965a91 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:06:15 +0100 Subject: [PATCH 076/110] test(parity): record the phase caveat og adds to the shared-vocabulary double heterozygote og traits now notes when a double heterozygote reading assumes which alleles share a copy; the Python oracle never did. The golden records that deliberate change. The step 42 doc also says WhatsHap phases those sites. --- docs/42-traits.md | 2 +- .../golden/traits/shared-vocabulary/rules-out.tsv | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 tests/parity/golden/traits/shared-vocabulary/rules-out.tsv diff --git a/docs/42-traits.md b/docs/42-traits.md index d150de9fa..6bd27af64 100644 --- a/docs/42-traits.md +++ b/docs/42-traits.md @@ -22,7 +22,7 @@ These are the results most people find easiest to read, and the pipeline had no - `${SAMPLE}/vcf/${SAMPLE}.g.vcf.gz` with its `.tbi`: the gVCF of [step 3](03-variant-calling.md). A gVCF holds reference blocks, so a position where you match the reference reads as ref/ref, and a position with no reads has no record and reads as "not covered". A variant-only VCF cannot tell those two apart, so the step does not read one. The gVCF must hold one sample: a gVCF with several sample columns stops the step with the count. - `assets/traits.tsv`: the table, and `assets/genotype_rules.tsv`: the rules. -- `${SAMPLE}/aligned/${SAMPLE}_sorted.bam` with its `.bai` (`ALIGN_DIR` as for the other steps), optional: WhatsHap reads it when a rule needs phase. Without it, or when WhatsHap fails (step 42 prints a warning and goes on, as `TRAITS_PHASE` does in Nextflow), such a rule is read only when at most one of its sites is heterozygous. +- `${SAMPLE}/aligned/${SAMPLE}_sorted.bam` with its `.bai` (`ALIGN_DIR` as for the other steps), optional: WhatsHap reads it when a rule needs phase. Without it, or when WhatsHap fails (step 42 prints a warning and goes on, as `TRAITS_PHASE` does in Nextflow), such a rule is read only when at most one of its sites is heterozygous. WhatsHap also phases the double heterozygote of a rule read without phase; without the BAM such a reading keeps its "Phase unknown" note. In the Nextflow pipeline (`traits` in `--tools`, part of the default list) the processes `TRAITS_SITES` and `TRAITS` run for every sample with a gVCF, and `TRAITS_PHASE` (WhatsHap) for every such sample with a BAM: one DeepVariant wrote (FASTQ, BAM or CRAM rows) or one the samplesheet gives in its `gvcf` and `gvcf_index` columns. A sample without one is skipped with a warning. From an existing VCF, `run-all.sh` passes a gVCF on only for a sample with a BAM and a VCF whose gVCF lies beside the VCF; any other sample that starts from a VCF gets step 42 listed as skipped, with the reason. A failed traits task is skipped and the run goes on, as for the other report-only tools. diff --git a/tests/parity/golden/traits/shared-vocabulary/rules-out.tsv b/tests/parity/golden/traits/shared-vocabulary/rules-out.tsv new file mode 100644 index 000000000..c65e252d3 --- /dev/null +++ b/tests/parity/golden/traits/shared-vocabulary/rules-out.tsv @@ -0,0 +1,10 @@ +rule gene trait rsids chrom pos genotypes gq phase result status reading ancestry note pmids +APOE APOE APOE alleles (e2, e3, e4) rs429358,rs7412 chr19 44908684,44908822 T/G,C/T 40,40 . . other_allele Not read: needs a genotype at both rs429358 and rs7412. yes Odds ratios from a meta-analysis of people of European descent (Farrer 1997); the e4 effect was weaker in African American and Hispanic people and stronger in Japanese people. Step 25's Alzheimer's score (PGS000334) includes the same two sites; docs/42-traits.md says why step 06 does not list APOE. 8346443,9343467 +TAS2R38 TAS2R38 Bitter taste haplotype (TAS2R38, PTC and PROP) rs713598,rs1726866,rs10246939 chr7 141973545,141972905,141972804 .,.,. .,.,. . . not_covered Not read: needs a genotype at every one of rs713598, rs1726866 and rs10246939. no The three TAS2R38 sites of the traits table read together: PAV (Pro49, Ala262, Val296) is the taster form and AVI (Ala49, Val262, Ile296) the non-taster form. Kim 2003 found five haplotypes worldwide; this rule reads the two common ones, and a copy with another (AAV, AAI, PVI or a rarer one) is not read. TAS2R38 lies on the minus strand, so the alleles here are the complement of the codon bases. 12595690,15723792 +APOL1 APOL1 APOL1 kidney risk variants (G1 read, G2 not read) rs73885319,rs60910145 chr22 36265860,36265988 .,. .,. . . not_covered Not read: needs a genotype at both rs73885319 and rs60910145. yes G1 is two missense changes that sit on one copy, S342G (rs73885319) and I384M (rs60910145), in perfect linkage disequilibrium in Genovese 2010, so they are read together without phase. G2 (rs71785313) is a 6-base deletion of N388 and Y389; this rule table reads single-base sites only, so this rule does not read G2 and a G2 copy reads as G0 here; the HTML report reads G2 from the sample's VCF beside this result (og summary collect). G1 and G2 never share a copy. In African Americans, two risk copies (G1 or G2) went with focal segmental glomerulosclerosis (odds ratio 10.5) and hypertension-attributed end-stage kidney disease (odds ratio 7.3), and one copy did not raise the risk (a recessive pattern). Both variants are common on African chromosomes and were absent from the European chromosomes studied. 20647424 +SERPINA1 SERPINA1 Alpha-1 antitrypsin Pi type (M, S, Z) rs17580,rs28929474 chr14 94380925,94378610 .,. .,. . . not_covered Not read: needs a genotype at both rs17580 and rs28929474. yes The two common deficiency alleles of SERPINA1: S (Glu264Val, rs17580) and Z (Glu342Lys, rs28929474). SERPINA1 lies on the minus strand, so the alleles here are the complement of the codon bases. M stands for a copy with neither S nor Z; other deficiency and null alleles are not read. The readings follow the ATS/ERS 2003 standards; a serum alpha-1 antitrypsin level confirms a deficiency. Z is most common in people of northern European descent. 14522813 +HFE HFE HFE haemochromatosis genotype (C282Y, H63D) rs1800562,rs1799945 chr6 26092913,26090951 .,. .,. . . not_covered Not read: needs a genotype at both rs1800562 and rs1799945. yes The two HFE missense changes of Feder 1996: C282Y (rs1800562), found homozygous in 83% of 178 patients with hereditary haemochromatosis, and H63D (rs1799945). The two sites are about 2 kb apart, too far for most read pairs to phase: heterozygous at both reads as C282Y/H63D, one change on each copy, and the reading says it assumes that. Many people with a risk genotype never build up iron; ferritin and transferrin saturation tell. The secondary-findings list reports C282Y homozygotes too (assets/acmg_sf.tsv); this line is the reading of every genotype. C282Y is most common in people of northern European descent. 8696333 +GC GC Vitamin D-binding protein type (Gc1F, Gc1S, Gc2) rs7041,rs4588 chr4 71752617,71752606 .,. .,. . . not_covered Not read: needs a genotype at both rs7041 and rs4588. yes rs7041 (Asp432Glu) and rs4588 (Thr436Lys) together give the three common vitamin D-binding protein types: Gc1F (Asp, Thr), Gc1S (Glu, Thr) and Gc2 (Asp, Lys). GC lies on the minus strand, so the alleles here are the complement of the codon bases. In Powe 2013 the two sites explained 79.4% of the variation in the protein level and 9.9% of that of total 25-hydroxyvitamin D. Gc1F was the most common type in black participants and Gc1S in white ones. The monoclonal assay that study used was questioned in later letters, so the protein levels are those of that assay. A protein type, not a vitamin D deficiency. 24256378 +CAD9p21 CDKN2B-AS1 Chromosome 9p21 heart disease risk haplotype rs10757278,rs1333049 chr9 22124478,22125504 .,. .,. . . not_covered Not read: needs a genotype at both rs10757278 and rs1333049. yes Two tags of the 9p21 risk haplotype near CDKN2A and CDKN2B: rs10757278 (G, Helgadottir 2007, myocardial infarction) and rs1333049 (C, the strongest coronary artery disease signal of the WTCCC 2007 scan). McPherson 2007 found the same interval, with no link to cholesterol, blood pressure or diabetes. The two are read together as tags of one haplotype; heterozygous at both reads as one risk copy, and the reading says it assumes both risk alleles sit on that copy. A copy with only one of the two risk alleles is not read. The studies were of people of European descent. 17478679,17554300,17478681 +MAPT MAPT 17q21.31 inversion lineage (H1, H2) rs1052553,rs8070723 chr17 45996523,46003698 .,. .,. . . not_covered Not read: needs a genotype at both rs1052553 and rs8070723. yes The 17q21.31 region around MAPT comes in two lineages, H1 and H2, that differ by a 900-kb inversion and do not recombine (Stefansson 2005); H2 was found in about 20% of European chromosomes, rarely in Africans and almost never in East Asians. Two H1/H2 tags are read together: rs1052553 in MAPT (A is H1, Wider 2010) and rs8070723 (Hoglinger 2011's proxy for H1/H2, its minor allele G in H2). A copy with H1 at one tag and H2 at the other is not read. GRCh38 carries H1. 15654335,19912324,21685912 +SHARE SHARE Shared position test rs999999991,rs999999992 chr19 44908684,44908822 T/G,C/T 40,40 not_used carrier called One alternate copy. Phase unknown: this reading assumes rs999999991 G and rs999999992 T sit on one copy (the copies h0 and h1); no phasing ran (no BAM, or phasing failed), so that is not checked. no Synthetic alternate allele vocabulary. 1 From 22d654fb39afb94f3e78ea7fd453297ff3e7e4ca Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:23:56 +0100 Subject: [PATCH 077/110] fix(freshness): read the FDA table from its newest Wayback capture when fda.gov refuses fda.gov answers HTTP 404 to GitHub's runners, Accept headers or not. When it does not answer, the inhibitor row reads the newest Wayback Machine capture of the page and names its date; a capture older than 92 days is an error. The self-test covers both. Bead: pgx-34 --- .github/workflows/freshness.yml | 8 ++-- CHANGELOG.md | 2 +- rust/crates/og-fresh/src/lookups.rs | 71 ++++++++++++++++++++++++---- rust/crates/og-fresh/src/selftest.rs | 55 +++++++++++++++++++-- 4 files changed, 119 insertions(+), 17 deletions(-) diff --git a/.github/workflows/freshness.yml b/.github/workflows/freshness.yml index 6e4fa2140..a31867052 100644 --- a/.github/workflows/freshness.yml +++ b/.github/workflows/freshness.yml @@ -9,9 +9,11 @@ name: Freshness # curated PGx tables with their sources: each row of # assets/pgx_contraindications.tsv with its CPIC pair (level, provisional) and # its DailyMed label, assets/pgx_inhibitors.tsv with the FDA table of CYP -# inhibitors, and assets/pgx_genes.tsv with the gene table of the newest -# pypgx. A row that no longer agrees shows as `drift` in the issue: a warning -# to fix the table, not a failed run. +# inhibitors (fda.gov refuses GitHub's runners, so the newest Wayback +# Machine capture of it, at most 92 days old, stands in), and +# assets/pgx_genes.tsv with the gene table of the newest pypgx. A row that no +# longer agrees shows as `drift` in the issue: a warning to fix the table, not +# a failed run. # # The issue is found by a marker in its body, not by the label alone, so an # issue another workflow files under the same label is never overwritten. A diff --git a/CHANGELOG.md b/CHANGELOG.md index a5b529961..b9821e8bb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- The monthly freshness issue now says when a curated drug table no longer matches its source. Three rows join its database table. Each row of `assets/pgx_contraindications.tsv` is compared with its CPIC pair (the pair exists, its level, still provisional) and with its DailyMed label (still published). `assets/pgx_inhibitors.tsv` is compared with the FDA table of CYP inhibitors: each row's class, and any strong or moderate CYP2D6, CYP2C19, CYP2C9 or CYP2B6 inhibitor, or strong CYP3A inhibitor, that has no row. `assets/pgx_genes.tsv` is compared with the gene table of the newest pypgx release. A row that differs shows as `drift` with the row named; it is a warning to fix the table, and the run stays green. A source that does not answer, or answers empty, is an error as for every other lookup. The freshness checks now also run on a pull request that changes one of the three tables. `og dev freshness --self-test` plants a row whose CPIC level moved from A to B and fails unless it shows as drift. No pipeline output changes. +- The monthly freshness issue now says when a curated drug table no longer matches its source. Three rows join its database table. Each row of `assets/pgx_contraindications.tsv` is compared with its CPIC pair (the pair exists, its level, still provisional) and with its DailyMed label (still published). `assets/pgx_inhibitors.tsv` is compared with the FDA table of CYP inhibitors: each row's class, and any strong or moderate CYP2D6, CYP2C19, CYP2C9 or CYP2B6 inhibitor, or strong CYP3A inhibitor, that has no row. fda.gov refuses GitHub's runners, so when it does not answer, the newest Wayback Machine capture of the page is read instead, the row names the capture date, and a capture older than 92 days is an error. `assets/pgx_genes.tsv` is compared with the gene table of the newest pypgx release. A row that differs shows as `drift` with the row named; it is a warning to fix the table, and the run stays green. A source that does not answer, or answers empty, is an error as for every other lookup. The freshness checks now also run on a pull request that changes one of the three tables. `og dev freshness --self-test` plants a row whose CPIC level moved from A to B and fails unless it shows as drift. No pipeline output changes. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index 6c17f78c3..6308d9b50 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -970,19 +970,72 @@ fn fda_parts(name: &str) -> Vec<&str> { .collect() } +/// The newest Wayback Machine capture the FDA table may be read from when +/// fda.gov refuses the host, in days. An older copy is an error: a check on +/// a stale copy is not a check. +pub const FDA_CAPTURE_MAX_AGE_DAYS: i64 = 92; + +/// The FDA table's page, and where it came from (empty: fda.gov itself). +/// fda.gov answers HTTP 404 to GitHub's runners, so when it refuses, the +/// newest Wayback Machine capture of the page is read instead, and the row +/// says so with the capture's date. +pub fn fda_page(c: &Ctx<'_>) -> Lookup<(String, String)> { + let direct = Request::get(FDA_CYP_TABLE, Want::Text) + .header("Accept", "text/html,application/xhtml+xml") + .header("Accept-Language", "en-US,en;q=0.9"); + let refused = match c.fetch.request(&direct) { + Ok((Body::Text(t), _)) => return Ok((t, String::new())), + Ok(_) => return Err(LookupError::Shape(format!("{FDA_CYP_TABLE}: no text body"))), + Err(e) => e, + }; + let fallback = || -> Lookup<(String, String)> { + let body = c.fetch.json(&format!( + "https://archive.org/wayback/available?url={FDA_CYP_TABLE}" + ))?; + let closest = match opt_field(&body, "archived_snapshots")? { + Some(s) => opt_field(s, "closest")?, + None => None, + }; + let Some(closest) = closest else { + return failed("no Wayback Machine capture of the FDA table"); + }; + if !matches!(opt_field(closest, "available")?, Some(Value::Bool(true))) + || need_str(closest, "status", "the capture's status")? != "200" + { + return failed("the newest Wayback Machine capture of the FDA table is not a page"); + } + let ts = need_str(closest, "timestamp", "the capture's timestamp")?; + let when: jiff::civil::Date = ts + .get(..8) + .and_then(|d| jiff::civil::Date::strptime("%Y%m%d", d).ok()) + .ok_or_else(|| LookupError::Shape(format!("capture timestamp {ts:?}")))?; + let today = c.now.to_zoned(jiff::tz::TimeZone::UTC).date(); + let age = i64::from((today - when).get_days()); + if age > FDA_CAPTURE_MAX_AGE_DAYS { + return failed(format!( + "the newest Wayback Machine capture of the FDA table is {age} days old" + )); + } + let html = c + .fetch + .text(&format!("https://web.archive.org/web/{ts}/{FDA_CYP_TABLE}"))?; + Ok(( + html, + format!( + ", read from the Wayback Machine capture of {} (fda.gov refused this host)", + when.strftime("%Y-%m-%d") + ), + )) + }; + fallback().map_err(|e| LookupError::Failed(format!("{refused}; and {e}"))) +} + /// `assets/pgx_inhibitors.tsv` against the FDA's table of CYP inhibitors: /// every row's class, and every strong or moderate inhibitor of a gene the /// table covers (strong only for CYP3A) that has no row. pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { let rows = curated(c, "pgx_inhibitors.tsv", &["Drug", "Gene", "Strength"])?; - // fda.gov answers 404 to a request that does not ask for a web page. - let req = Request::get(FDA_CYP_TABLE, Want::Text) - .header("Accept", "text/html,application/xhtml+xml") - .header("Accept-Language", "en-US,en;q=0.9"); - let html = match c.fetch.request(&req)?.0 { - Body::Text(t) => t, - _ => return Err(LookupError::Shape(format!("{FDA_CYP_TABLE}: no text body"))), - }; + let (html, via) = fda_page(c)?; let (date, fda) = fda_inhibitors(&html)?; let strength_of = |names: &[&FdaRow], g: &str| { let s: Vec<&str> = names @@ -1043,7 +1096,7 @@ pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { "Drug interactions (assets/pgx_inhibitors.tsv, step 27)", format!("{} rows, FDA classes read 2026-11-03", rows.len()), format!( - "the FDA table{} classes every row the same and has no inhibitor the table lacks", + "the FDA table{}{via} classes every row the same and has no inhibitor the table lacks", date.map(|d| format!(" (current as of {d})")) .unwrap_or_default() ), diff --git a/rust/crates/og-fresh/src/selftest.rs b/rust/crates/og-fresh/src/selftest.rs index 3883a15e5..b47e84cbb 100644 --- a/rust/crates/og-fresh/src/selftest.rs +++ b/rust/crates/og-fresh/src/selftest.rs @@ -697,6 +697,10 @@ pub fn run(out: &mut dyn Write) -> u8 { vec![ ("api.cpicpgx.org", cpic("A", true)), ("dailymed.nlm.nih.gov", dailymed(true)), + // Asked only when fda.gov refuses; before it, as their URLs + // name fda.gov too. + ("archive.org/wayback/available", None), + ("web.archive.org/web/", None), ( "fda.gov", fda(&[ @@ -725,12 +729,12 @@ pub fn run(out: &mut dyn Write) -> u8 { ); let mut drifted = agree(); drifted[0].1 = cpic("B", true); - drifted[2].1 = fda(&[ + drifted[4].1 = fda(&[ ("bupropion", " ", "2D6 moderate inhibitor"), ("lopinavir and ritonavir", "3A strong inhibitor", " "), ("newdrug", "2C19 strong inhibitor", " "), ]); - drifted[4].1 = + drifted[6].1 = text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",TRUE\n"); let (rows, e) = pgx_rows(drifted); let said = |rows: &[(String, String)], i: usize, what: &str| { @@ -788,8 +792,8 @@ pub fn run(out: &mut dyn Write) -> u8 { ); let mut broken = agree(); broken[0].1 = Some(Body::Json(Value::Array(vec![]))); - broken[2].1 = text("no table"); - broken[4].1 = None; + broken[4].1 = text("no table"); + broken[6].1 = None; let (rows, e) = pgx_rows(broken); check( rows.iter().all(|(st, _)| st == "ERROR") && e == 3, @@ -797,6 +801,49 @@ pub fn run(out: &mut dyn Write) -> u8 { "PGx tables: an empty CPIC answer, an FDA page without its table and a missing gene table are errors ({rows:?})" ), ); + // fda.gov refuses GitHub's runners: the newest Wayback Machine capture + // stands in, named in the row, unless it is too old. + let capture = |days_ago: i64| { + let when = jiff::Timestamp::now() + .to_zoned(jiff::tz::TimeZone::UTC) + .date() + .checked_sub(jiff::Span::new().days(days_ago)) + .expect("a date"); + let closest = obj(vec![ + ("available", Value::Bool(true)), + ("status", s("200")), + ( + "timestamp", + s(&format!("{}120000", when.strftime("%Y%m%d"))), + ), + ]); + let mut a = agree(); + a[2].1 = Some(Body::Json(obj(vec![( + "archived_snapshots", + obj(vec![("closest", closest)]), + )]))); + a[3].1 = a[4].1.take(); + a + }; + let (rows, e) = pgx_rows(capture(3)); + check( + rows.get(1).is_some_and(|(st, up)| { + st == "current" && up.contains("read from the Wayback Machine capture of") + }) && e == 0, + &format!( + "PGx tables: when fda.gov refuses, a recent Wayback Machine capture is read and named ({:?})", + rows.get(1) + ), + ); + let (rows, e) = pgx_rows(capture(lookups::FDA_CAPTURE_MAX_AGE_DAYS + 1)); + check( + rows.get(1).is_some_and(|(st, _)| st == "ERROR") && e == 1, + &format!( + "PGx tables: a Wayback Machine capture older than {} days is an error ({:?})", + lookups::FDA_CAPTURE_MAX_AGE_DAYS, + rows.get(1) + ), + ); // 2. A fake server: an empty or truncated 200 must fail, and the issue // logic. From 312302ee50ba01719df7ca097d87ce81cf7be2d0 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:30:05 +0100 Subject: [PATCH 078/110] fix(ancestry): refuse a genome with no target haplotype and never read a NaN fit as converged With no target haplotype every expected count is 0, so the EM update gave epsilon NaN, the convergence test dropped it and paint() returned Ok. check_input now refuses such a genome, the update is checked, and a NaN share counts as moved. The 22-chromosome 1 GB check is documented as a smoke check; the long-chromosome test is the memory evidence. --- rust/crates/og-admix/src/paint.rs | 13 +++++++++++-- rust/crates/og-admix/tests/anc_paint_engine.rs | 14 +++++++++++++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/rust/crates/og-admix/src/paint.rs b/rust/crates/og-admix/src/paint.rs index 71190b9ea..036d3e2e0 100644 --- a/rust/crates/og-admix/src/paint.rs +++ b/rust/crates/og-admix/src/paint.rs @@ -147,9 +147,14 @@ impl Params { } } - /// The largest share by which any parameter differs from `other`. + /// The largest share by which any parameter differs from `other`; + /// infinite when a share is not a number, so a NaN never reads as + /// converged. fn moved(&self, other: &Params) -> f64 { - let rel = |a: f64, b: f64| (a - b).abs() / b.abs().max(f64::MIN_POSITIVE); + let rel = |a: f64, b: f64| { + let r = (a - b).abs() / b.abs().max(f64::MIN_POSITIVE); + if r.is_nan() { f64::INFINITY } else { r } + }; let mut m = rel(self.generations, other.generations).max(rel(self.epsilon, other.epsilon)); for (a, b) in self .mu @@ -228,6 +233,9 @@ fn check_input(chroms: &[ChromInput], start: &Params, opts: &Options) -> Result< return Err(Error("no chromosome to paint".into())); }; start.check(first.panel.groups())?; + if chroms.iter().all(|c| c.targets.is_empty()) { + return Err(Error("no target haplotype to paint".into())); + } for c in chroms { let name = repr(&c.name); if c.panel.sizes() != first.panel.sizes() { @@ -328,6 +336,7 @@ pub fn paint(chroms: &[ChromInput], start: Params, opts: &Options) -> Result Vec { out } +/// The 1 GB bound is a smoke check (this genome peaks at a few MB); the +/// memory evidence is [`checkpoints_keep_a_long_chromosome_small`]. #[test] fn a_22_chromosome_painting_stays_under_1_gb_and_repeats_byte_for_byte() { let _g = lock(); @@ -625,6 +630,13 @@ fn bad_inputs_stop_with_a_reason() { .unwrap_err() .contains("target haplotype 1") ); + let mut c = t.chrom.clone(); + c.targets.clear(); + assert!( + run(&c, ok.clone(), 1) + .unwrap_err() + .contains("no target haplotype") + ); assert!(run(&t.chrom, ok, 0).unwrap_err().contains("thread")); assert!( RefPanel::new(vec![0, 0, 2], 3) From a7421f1c44aac8891c4d3dbb6135f0f7f5e6de5c Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Thu, 19 Nov 2026 23:38:30 +0100 Subject: [PATCH 079/110] fix(longread): check a basecall_model read from the BAM header like BASECALL_MODEL Step 02b put the uBAM header's basecall_model into the minimap2 -R string unchecked. A value with a backslash would be expanded by minimap2. Apply the same character rule; a bad header value is warned about and dropped. --- scripts/02b-alignment-longread.sh | 7 +++++++ tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/scripts/02b-alignment-longread.sh b/scripts/02b-alignment-longread.sh index d2123a5d1..fa16f1812 100755 --- a/scripts/02b-alignment-longread.sh +++ b/scripts/02b-alignment-longread.sh @@ -117,6 +117,13 @@ if [ "$PLATFORM" = ont ] && [ -z "$BASECALLER" ] && [[ "$REAL_INPUT" == *.bam ]] BASECALLER=$(run_in --cpus 1 --memory 1g -v "${PGP_ROOT}/bin:/pgp-bin:ro" "$SAMTOOLS_IMAGE" \ /pgp-bin/og longread clair3-model --basecaller-only --bam "/genome/${REAL_INPUT#"${REAL_GENOME}/"}") \ || { echo "NOTE: the basecaller model of the unaligned BAM could not be read (see above)." >&2; BASECALLER=""; } + # The header value goes into the minimap2 -R string too: same character rule, + # but a bad header is not the user's input, so warn and drop it. + case "$BASECALLER" in + *[!A-Za-z0-9._@+-]*) + echo "WARNING: ignoring a basecall_model in the BAM header with characters a model name never has: '${BASECALLER}'" >&2 + BASECALLER="" ;; + esac fi RG_DS="" if [ -n "$BASECALLER" ]; then diff --git a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh index c6daf5d23..f877ade82 100755 --- a/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh +++ b/tests/fake-docker/alignment-markdup-gvcf-sex-calling.sh @@ -208,3 +208,10 @@ docker_log_has 'minimap2 .*LB:sample1[^ ]*tDS:basecall_model=dna_r10\.4\.1_e8\.2 run_expect 0 longread-hifi env PLATFORM=hifi INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" BASECALL_MODEL=dna_r10.4.1_e8.2_400bps_sup@v5.0.0 "${SCRIPTS}/02b-alignment-longread.sh" sample1 if grep -q 'DS:basecall_model' "$FAKE_DOCKER_LOG"; then fail "step 02b wrote a basecaller model for HiFi reads"; fi run_expect 2 longread-bad-basecaller env PLATFORM=ont BASECALL_MODEL=$'sup\tx' "${SCRIPTS}/02b-alignment-longread.sh" sample1 +# A basecall_model in the uBAM header that holds a backslash: minimap2 would +# expand it inside -R, so step 02b warns and leaves DS out instead. +mkbam "${GENOME_DIR}/sample1/fastq/sample1.bam" $'@HD\tVN:1.6\n@RG\tID:run1\tPL:ONT\tDS:basecall_model=sup\\tx@v5.0.0\n' +: > "$FAKE_DOCKER_LOG" +run_expect 0 longread-ubam-bad-basecaller env PLATFORM=ont INPUT="${GENOME_DIR}/sample1/fastq/sample1.bam" "${SCRIPTS}/02b-alignment-longread.sh" sample1 +output_has longread-ubam-bad-basecaller 'ignoring a basecall_model in the BAM header' +if grep -q 'DS:basecall_model' "$FAKE_DOCKER_LOG"; then fail "step 02b put a basecall_model with a backslash into the read group"; fi From 13416359225f75a1a4aed8a24b40936aa0c9e020 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:00:26 +0100 Subject: [PATCH 080/110] fix(freshness): name the source on drift rows and refuse odd DailyMed and pypgx answers A drift row now names what it was compared with (the FDA table's date and the Wayback capture when one stood in). A DailyMed answer without a history list, and a pypgx SV value other than TRUE or FALSE, are errors instead of drift or current. The self-test covers both and asserts the FDA date it reads. Bead: pgx-34 --- rust/crates/og-fresh/src/lookups.rs | 63 +++++++++++++++++++++------- rust/crates/og-fresh/src/selftest.rs | 21 +++++++++- 2 files changed, 66 insertions(+), 18 deletions(-) diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index 6308d9b50..be202d1bd 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -788,13 +788,25 @@ fn col<'a>(row: &'a IndexMap, name: &str) -> &'a str { row.get(name).map_or("", String::as_str) } -/// The report row of a table check: `current` when nothing drifted, else -/// `drift` with each drifted row named. -fn table_row(item: &str, pinned: String, agree: String, drift: &[String], todo: &str) -> Found { +/// The report row of a table check: `current` with `agree` when nothing +/// drifted, else `drift` with each difference. Both name the `source` +/// compared with. +fn table_row( + item: &str, + pinned: String, + source: &str, + agree: &str, + drift: &[String], + todo: &str, +) -> Found { let upstream = if drift.is_empty() { - agree + format!("{source}: {agree}") } else { - format!("{} difference(s): {}", drift.len(), drift.join("; ")) + format!( + "{source}: {} difference(s): {}", + drift.len(), + drift.join("; ") + ) }; Found { row: DbRow { @@ -872,7 +884,14 @@ pub fn pgx_contraindications(c: &Ctx<'_>) -> Lookup { Some(d) => opt_field(d, "history")?, None => return failed(format!("DailyMed label {setid}: empty")), }; - let live = matches!(history, Some(Value::Array(h)) if !h.is_empty()); + // An empty history is a withdrawn label; no history, or one + // that is not a list, is an answer this does not know. + let Some(Value::Array(h)) = history else { + return Err(LookupError::Shape(format!( + "DailyMed label {setid}: history is not a list" + ))); + }; + let live = !h.is_empty(); labels.insert(setid.clone(), live); live } @@ -886,10 +905,8 @@ pub fn pgx_contraindications(c: &Ctx<'_>) -> Lookup { Ok(table_row( "Drug warnings for disease genes (assets/pgx_contraindications.tsv, step 27)", format!("{} rows, CPIC levels and FDA labels", rows.len()), - format!( - "CPIC lists every pair at the same level, provisional; {} label(s) published", - labels.len() - ), + &format!("the CPIC API and DailyMed ({} label(s))", labels.len()), + "every pair at the same level and provisional, every label published", &drift, "Read the CPIC pair and the label again, then fix, move or drop the row in \ assets/pgx_contraindications.tsv (its date and Note too) and rerun step 27.", @@ -1095,11 +1112,12 @@ pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { Ok(table_row( "Drug interactions (assets/pgx_inhibitors.tsv, step 27)", format!("{} rows, FDA classes read 2026-11-03", rows.len()), - format!( - "the FDA table{}{via} classes every row the same and has no inhibitor the table lacks", + &format!( + "the FDA table{}{via}", date.map(|d| format!(" (current as of {d})")) .unwrap_or_default() ), + "every row classed the same, no inhibitor the table lacks", &drift, "Read the FDA table again, then fix, add or drop the rows in assets/pgx_inhibitors.tsv \ (and the date in its header) and rerun step 27 with a medication list.", @@ -1147,9 +1165,21 @@ pub fn pgx_genes(c: &Ctx<'_>) -> Lookup { let mut sv: indexmap::IndexMap = indexmap::IndexMap::new(); for l in lines { let f = csv_fields(l); - if let (Some(g), Some(s)) = (f.get(gi), f.get(si)) { - sv.insert(g.clone(), s == "TRUE"); - } + let (Some(g), Some(s)) = (f.get(gi), f.get(si)) else { + return Err(LookupError::Shape(format!( + "pypgx {latest} gene-table.csv: a row without Gene or SV" + ))); + }; + let model = match s.as_str() { + "TRUE" => true, + "FALSE" => false, + other => { + return Err(LookupError::Shape(format!( + "pypgx {latest} gene-table.csv: {g} has SV {other:?}, not TRUE or FALSE" + ))); + } + }; + sv.insert(g.clone(), model); } if sv.is_empty() { return failed(format!("pypgx {latest} gene-table.csv: empty")); @@ -1184,7 +1214,8 @@ pub fn pgx_genes(c: &Ctx<'_>) -> Lookup { rows.len(), c.pins.get("PYPGX_BUNDLE_VERSION").unwrap_or("?") ), - format!("pypgx {latest}'s gene table agrees"), + &format!("pypgx {latest}'s gene table"), + "every row a pypgx gene, the bam rows exactly its copy-number models", &drift, "When PYPGX_IMAGE moves to this pypgx, change the rows of assets/pgx_genes.tsv \ with it (tests/test_pypgx_genes.sh checks them at the pin) and rerun step 32.", diff --git a/rust/crates/og-fresh/src/selftest.rs b/rust/crates/og-fresh/src/selftest.rs index b47e84cbb..75faef014 100644 --- a/rust/crates/og-fresh/src/selftest.rs +++ b/rust/crates/og-fresh/src/selftest.rs @@ -722,7 +722,12 @@ pub fn run(out: &mut dyn Write) -> u8 { }; let (rows, e) = pgx_rows(agree()); check( - rows.iter().all(|(st, _)| st == "current") && rows.len() == 3 && e == 0, + rows.iter().all(|(st, _)| st == "current") + && rows.len() == 3 + && e == 0 + && rows[1] + .1 + .starts_with("the FDA table (current as of 2026-05-29): "), &format!( "PGx tables: rows that agree with CPIC, DailyMed, the FDA and pypgx are current ({rows:?})" ), @@ -756,7 +761,7 @@ pub fn run(out: &mut dyn Write) -> u8 { said( &rows, 1, - "bupropion CYP2D6: the FDA says moderate, the table says strong", + "the FDA table (current as of 2026-05-29): 2 difference(s): bupropion CYP2D6: the FDA says moderate, the table says strong", ) && said( &rows, 1, @@ -801,6 +806,18 @@ pub fn run(out: &mut dyn Write) -> u8 { "PGx tables: an empty CPIC answer, an FDA page without its table and a missing gene table are errors ({rows:?})" ), ); + let mut odd = agree(); + odd[1].1 = Some(Body::Json(obj(vec![("data", obj(vec![]))]))); + odd[6].1 = text("Gene,Target,Exons,SV\nCYP2D6,TRUE,\"1,2\",TRUE\nCYP2C9,TRUE,\"3,4\",\n"); + let (rows, e) = pgx_rows(odd); + check( + rows.first().is_some_and(|(st, _)| st == "ERROR") + && rows.get(2).is_some_and(|(st, _)| st == "ERROR") + && e == 2, + &format!( + "PGx tables: a DailyMed answer without a history and an empty SV value are errors, not drift or current ({rows:?})" + ), + ); // fda.gov refuses GitHub's runners: the newest Wayback Machine capture // stands in, named in the row, unless it is too old. let capture = |days_ago: i64| { From 3073c74b11e6f5197b05b73fe616a80d06c17f67 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:04:41 +0100 Subject: [PATCH 081/110] fix(acmg): count the copies of a recessive gene hit, not the alt copies of its records Two variants phased on one copy, a combined allele counted with its own parts, or a record with no alt copy called could complete the two hits a recessive ACMG SF gene needs. The tier now counts haplotypes: a phased heterozygote needs a "|" GT, a non-empty PS and every copy called; a half call or a "|" GT without PS is phase unknown. Each finding of a two-hit gene gets pair (biallelic or possibly biallelic) and phase fields, and a ClinVar finding that is a combined allele keeps its combined_allele note. Bead: clin-01 Bead: clin-02 Bead: clin-03 Bead: clin-04 Bead: clin-06 Bead: clin-29 --- rust/crates/og-summary/src/collect/acmg.rs | 338 +++++++++++++-- .../tests/i411_sf_haplotype_count.rs | 384 ++++++++++++++++++ 2 files changed, 692 insertions(+), 30 deletions(-) create mode 100644 rust/crates/og-summary/tests/i411_sf_haplotype_count.rs diff --git a/rust/crates/og-summary/src/collect/acmg.rs b/rust/crates/og-summary/src/collect/acmg.rs index db3077299..c2f58b970 100644 --- a/rust/crates/og-summary/src/collect/acmg.rs +++ b/rust/crates/og-summary/src/collect/acmg.rs @@ -11,17 +11,30 @@ //! deletion counts as the second hit of a gene whose rule needs two //! ([`two_hits`](super::two_hits)), unless read-backed phase puts both on //! one copy. +//! +//! A gene whose rule needs two hits counts the copies of the gene hit, not +//! the alt copies of its records. A homozygote hits both copies. Phased +//! heterozygotes (a `|` GT with a phase set, PS) count the copies their +//! phase set covers: two in cis count once, two in trans twice. The two alt +//! alleles of one split call (`1/.` and `./1` at one position) sit on +//! different copies. Any other heterozygote counts once with its phase +//! unknown, so a pair of them is reported as possibly biallelic. A record +//! with no alt copy called counts nothing, and a combined allele of step 06 +//! counts once with its parts, unless it is unphased and two of its parts +//! are candidates on their own (they may sit on different copies). use super::assets::{ACMG_SF_VERSION, Key, Rule, acmg_sf_rules, carrier_genes}; use super::clinvar::{ COMMON_AF, Floor, Hit, HitRecords, allele_copies, floor_values, obj, opt_int, opt_s, }; use super::text::{self, digits, format_map, gt_field, info_map}; -use super::two_hits::{DeletionInputs, Spans, Variant, gene_deletions, two_hits}; +use super::two_hits::{ + DeletionInputs, Entry, Spans, Variant, Verdict, gene_deletions, phase_haps, two_hits, +}; use indexmap::IndexMap; use pycompat::json::Value; use pycompat::text::isdigit; -use std::collections::{HashMap, HashSet}; +use std::collections::{BTreeSet, HashMap, HashSet}; /// The genotype check's floors: step 06's GQ and DP, the alt read share a /// heterozygote must lie within and a homozygous alt call must reach. @@ -421,22 +434,134 @@ struct Cand { ploidy: usize, gt: String, ps: Option, + /// The parts of a combined allele (step 06's `PGP_JOINED_FROM`). + joined: Vec, +} + +/// One distinct variant of a gene as the verdict counts it: its alt +/// copies, ploidy, GT and phase set, and whether it stands for a combined +/// allele and its parts. +#[derive(Debug, Clone, PartialEq)] +struct Allele { + copies: usize, + ploidy: usize, + gt: String, + ps: Option, + combined: bool, +} + +impl Allele { + fn of(copies: usize, ploidy: usize) -> Allele { + Allele { + copies, + ploidy, + gt: String::new(), + ps: None, + combined: false, + } + } + + /// The copies read-backed phase puts the alt allele on, with its phase + /// set: only a `|` GT with every copy called and a non-empty PS. + fn phased(&self) -> Option<(&str, BTreeSet)> { + let ps = self.ps.as_deref().filter(|p| !p.is_empty())?; + let h = phase_haps(Some(&self.gt)).filter(|h| !h.is_empty())?; + Some((ps, h)) + } + + /// The copy a half call (`1/.`, `./1`) puts its alt allele on. + fn half(&self) -> Option { + let a: Vec<&str> = self.gt.split(['/', '|']).collect(); + match a.as_slice() { + [x, "."] if !matches!(*x, "0" | ".") => Some(0), + [".", y] if !matches!(*y, "0" | ".") => Some(1), + _ => None, + } + } +} + +/// How a gene whose rule needs two hits met it: `biallelic` when a call +/// proves both copies hit, `possibly biallelic` when the count needs a +/// heterozygote of unknown phase; and why. +type Pair = (&'static str, String); + +/// The copies of a gene hit, over its counted variants: the count, the +/// proof of two copies if a call gives one, and the phase sets in which +/// two or more variants sit on one copy (cis). +fn copies_hit(kept: &IndexMap) -> (usize, Option, Vec) { + let mut n = 0; + let mut proof: Option = None; + let mut sets: IndexMap<&str, (BTreeSet, usize)> = IndexMap::new(); + let mut halves: IndexMap<(&str, i128), (BTreeSet, usize)> = IndexMap::new(); + for (k, a) in kept { + let AKey::Small(key) = k else { + n += 1; + continue; + }; + if a.ploidy == 1 { + n += a.copies; + } else if a.copies >= 2 { + n += 2; + proof.get_or_insert_with(|| { + format!( + "homozygous: one call puts {}:{} {}>{} on both copies", + key.0, key.1, key.2, key.3 + ) + }); + } else if let Some((ps, h)) = a.phased() { + let s = sets.entry(ps).or_default(); + s.0.extend(h); + s.1 += 1; + } else if let Some(i) = a.half() { + let s = halves.entry((key.0.as_str(), key.1)).or_default(); + s.0.insert(i); + s.1 += 1; + } else { + n += 1; + } + } + let mut cis = Vec::new(); + for (ps, (h, count)) in &sets { + n += h.len(); + if h.len() >= 2 { + proof.get_or_insert_with(|| { + format!( + "in trans: read-backed phase puts them on different copies (phase set {ps})" + ) + }); + } else if *count >= 2 { + cis.push((*ps).to_owned()); + } + } + for ((chrom, pos), (h, count)) in &halves { + if h.len() >= 2 { + n += 2 + count - h.len(); + proof.get_or_insert_with(|| { + format!("in trans: the two alt alleles of one call at {chrom}:{pos}") + }); + } else { + n += count; + } + } + (n, proof, cis) } /// `sf_verdicts`: for each distinct variant of a gene, `None` (reported) or -/// the reason it is not, and the partial-deficiency note of a reported gene -/// with a hypomorph allele. +/// the reason it is not, the partial-deficiency note of a reported gene +/// with a hypomorph allele, and how a gene whose rule needs two hits met +/// it. `deletion` is the gene's pair with a called deletion, if any. fn sf_verdicts( gene: &str, rule: &Rule, - alleles: &IndexMap, -) -> (HashMap>, Option) { + alleles: &IndexMap, + deletion: Option<&Entry>, +) -> (HashMap>, Option, Option) { let sev = |k: &AKey| match k { AKey::Small(k) => rule.severity.get(k), _ => None, }; let mut out: IndexMap> = IndexMap::new(); - let mut kept: IndexMap = IndexMap::new(); + let mut kept: IndexMap = IndexMap::new(); for (k, cp) in alleles { match sev(k) { Some(a) if a.kind.as_deref() == Some("pseudodeficiency") => { @@ -449,37 +574,60 @@ fn sf_verdicts( ); } _ => { - kept.insert(k.clone(), *cp); + kept.insert(k.clone(), cp.clone()); } } } - let n: usize = kept.values().map(|(c, _)| c).sum(); + let (n, proof, cis) = copies_hit(&kept); let ri = rule.report_if.as_str(); - let hemi = kept.values().any(|(_, p)| *p == 1); - for (k, (c, p)) in &kept { + let hemi = kept.values().any(|a| a.ploidy == 1); + let counted = ri == "biallelic" || (ri == "hemizygous" && !hemi); + let combined = kept.values().any(|a| a.combined); + let one = if let Some(ps) = cis.first() { + format!( + "two heterozygous variants in cis: read-backed phase puts them on the same copy \ + (phase set {ps})" + ) + } else if combined { + "one heterozygous allele: a combined allele and its parts count once".to_owned() + } else { + "one heterozygous variant".to_owned() + }; + for (k, a) in &kept { let good = match ri { "any" | "het_female_too" => true, "biallelic" => n >= 2, "hemizygous" => hemi || n >= 2, - _ => matches!(k, AKey::Small(s) if rule.variants.contains_key(s)) && *c >= 2 && *p == 2, + _ => { + matches!(k, AKey::Small(s) if rule.variants.contains_key(s)) + && a.copies >= 2 + && a.ploidy == 2 + } }; let why = if good { None } else if ri == "hom_variant" { Some(format!("{gene} is reported only for: {}", rule.table_text)) } else if ri == "hemizygous" { - Some(format!( - "one heterozygous variant; {gene} is reported for {}", - rule.table_text - )) + Some(format!("{one}; {gene} is reported for {}", rule.table_text)) } else { Some(format!( - "one heterozygous variant; {gene} is reported with {}", + "{one}; {gene} is reported with {}", rule.table_text )) }; out.insert(k.clone(), why); } + let pair = (counted && n >= 2).then(|| match (proof, deletion) { + (Some(p), _) => ("biallelic", p), + (None, Some(e)) => (e.verdict.word(), format!("with {}: {}", e.deletion, e.why)), + (None, None) => ( + Verdict::PossiblyBiallelic.word(), + "phase unknown: no read-backed phase links the variants, so they may sit on the \ + same copy (cis)" + .to_owned(), + ), + }); let hypo: Vec<&str> = out .iter() .filter(|(_, why)| why.is_none()) @@ -492,7 +640,60 @@ fn sf_verdicts( hypo.join("; ") ) }); - (out.into_iter().collect(), partial) + (out.into_iter().collect(), partial, pair) +} + +/// `CHROM:POS:REF:ALT` joined by `|`, as step 06 writes `PGP_JOINED_FROM`. +fn joined_keys(v: &str) -> Vec { + v.split('|') + .filter_map(|p| { + let mut it = p.rsplitn(4, ':'); + let (alt, r, pos, chrom) = (it.next()?, it.next()?, it.next()?, it.next()?); + let pos = crate::int(pos).ok()?; + Some((chrom.to_owned(), pos, r.to_owned(), alt.to_owned())) + }) + .collect() +} + +/// The key each small candidate of a gene is counted under. A combined +/// allele and the parts of it that are candidates count once, under the +/// combined allele's key, when the combined call is phased or at most one +/// part is a candidate. An unphased combined allele with two or more parts +/// that are candidates counts through its parts, which may sit on +/// different copies. +fn counting_keys(cands: &[&Cand]) -> HashMap<(String, AKey), AKey> { + let mut map = HashMap::new(); + let present: HashSet<(&str, &Key)> = cands + .iter() + .filter_map(|x| match &x.key { + AKey::Small(k) => Some((x.gene.as_str(), k)), + _ => None, + }) + .collect(); + for x in cands.iter().filter(|x| !x.joined.is_empty()) { + let parts: Vec<&Key> = x + .joined + .iter() + .filter(|k| present.contains(&(x.gene.as_str(), *k))) + .collect(); + let phased = Allele { + gt: x.gt.clone(), + ps: x.ps.clone(), + ..Allele::of(x.copies, x.ploidy) + } + .phased() + .is_some(); + if phased || parts.len() <= 1 { + for p in parts { + map.entry((x.gene.clone(), AKey::Small(p.clone()))) + .or_insert_with(|| x.key.clone()); + } + } else { + map.entry((x.gene.clone(), x.key.clone())) + .or_insert_with(|| AKey::Small(parts[0].clone())); + } + } + map } /// `sf_structural`: step 05's class 4 and 5 SVs in genes whose rule allows @@ -574,6 +775,7 @@ fn sf_structural( ploidy: 2, gt: String::new(), ps: None, + joined: Vec::new(), }); } } @@ -633,6 +835,12 @@ fn tier(i: &Inputs) -> Result, String> { let row = Hit::parse(r, *floor)?; let gt = text::gt_of(r).to_owned(); let (copies, ploidy) = allele_copies(>); + let joined = joined_keys( + info_map(&r[7]) + .get("PGP_JOINED_FROM") + .copied() + .unwrap_or(""), + ); for g in row.gene.split(',') { if !rules.contains_key(g) { continue; @@ -644,6 +852,12 @@ fn tier(i: &Inputs) -> Result, String> { f.insert("significance".into(), Value::Str(row.significance.clone())); f.insert("stars".into(), Value::Int(row.stars.into())); f.insert("low_confidence".into(), Value::Bool(row.low_confidence)); + if row.combined_allele != "." { + f.insert( + "combined_allele".into(), + Value::Str(row.combined_allele.clone()), + ); + } clinvar.push(Cand { kind: Kind::ClinVar, gene: g.to_owned(), @@ -653,6 +867,7 @@ fn tier(i: &Inputs) -> Result, String> { ploidy, gt: gt.clone(), ps: gt_field(r, "PS"), + joined: joined.clone(), }); } } @@ -709,28 +924,64 @@ fn tier(i: &Inputs) -> Result, String> { ploidy, gt: x.genotype.clone(), ps: x.ps.clone(), + joined: Vec::new(), }); } } } let (svs, sv_checked, sv_note) = sf_structural(i.deletions, &rules); - // One verdict per gene, over its distinct variants. - let mut alleles: IndexMap> = IndexMap::new(); - for x in clinvar.iter().chain(&high) { + // One verdict per gene, over its distinct variants. A record with no + // alt copy called is no evidence of a hit and is not counted. + let small: Vec<&Cand> = clinvar + .iter() + .chain(&high) + .filter(|x| x.copies > 0) + .collect(); + let units = counting_keys(&small); + let unit = |x: &Cand| { + units + .get(&(x.gene.clone(), x.key.clone())) + .cloned() + .unwrap_or_else(|| x.key.clone()) + }; + let mut alleles: IndexMap> = IndexMap::new(); + // The candidates counted under their own key first, so a combined + // allele's own call stands for its parts. + let (own, folded): (Vec<&Cand>, Vec<&Cand>) = + small.iter().copied().partition(|x| unit(x) == x.key); + for x in &own { let p = if x.ploidy == 0 { 2 } else { x.ploidy }; alleles .entry(x.gene.clone()) .or_default() .entry(x.key.clone()) - .or_insert((x.copies.max(1), p)); + .or_insert(Allele { + gt: x.gt.clone(), + ps: x.ps.clone(), + ..Allele::of(x.copies, p) + }); + } + for x in &folded { + let p = if x.ploidy == 0 { 2 } else { x.ploidy }; + let a = alleles + .entry(x.gene.clone()) + .or_default() + .entry(unit(x)) + .or_insert(Allele { + gt: x.gt.clone(), + ps: x.ps.clone(), + ..Allele::of(x.copies, p) + }); + a.copies = a.copies.max(x.copies); + a.combined = true; } for x in &svs { alleles .entry(x.gene.clone()) .or_default() .entry(x.key.clone()) - .or_insert((1, 2)); + .or_insert(Allele::of(1, 2)); } let (spans, two_hit_note): (Spans, Option) = match carrier_genes(i.assets) { Ok(g) => (g.into_iter().map(|(k, v)| (k, v.span)).collect(), None), @@ -745,7 +996,7 @@ fn tier(i: &Inputs) -> Result, String> { let (dels, _, _) = gene_deletions(i.deletions, &spans); let mut seen = HashSet::new(); let mut variants = Vec::new(); - for x in clinvar.iter().chain(&high) { + for x in &own { let AKey::Small(k) = &x.key else { continue }; let pseudo = rules[&x.gene].severity_kind(k) == Some("pseudodeficiency"); if !pseudo && seen.insert((x.gene.clone(), k.clone())) { @@ -775,7 +1026,7 @@ fn tier(i: &Inputs) -> Result, String> { for g in found.entries.keys() { if matches!(rules[g].report_if.as_str(), "biallelic" | "hemizygous") { if let Some(a) = alleles.get_mut(g) { - a.insert(AKey::Deletion(g.clone()), (1, 2)); + a.insert(AKey::Deletion(g.clone()), Allele::of(1, 2)); } two.extend( found @@ -788,16 +1039,39 @@ fn tier(i: &Inputs) -> Result, String> { } let verdict: HashMap<&String, _> = alleles .iter() - .map(|(g, a)| (g, sf_verdicts(g, &rules[g], a))) + .map(|(g, a)| { + let del = found + .entries + .get(g) + .filter(|_| a.contains_key(&AKey::Deletion(g.clone()))); + (g, sf_verdicts(g, &rules[g], a, del)) + }) .collect(); let mut reported: [Vec; 3] = Default::default(); let mut not_reported = Vec::new(); for x in clinvar.into_iter().chain(high).chain(svs) { - let (whys, partial) = &verdict[&x.gene]; - let why = whys.get(&x.key).cloned().flatten(); + if x.copies == 0 { + not_reported.push(obj([ + ("gene", Value::Str(x.gene.clone())), + ("variant", x.fields["variant"].clone()), + ( + "genotype", + x.fields.get("genotype").cloned().unwrap_or(Value::Null), + ), + ("source", Value::Str(x.kind.source().into())), + ( + "reason", + Value::Str(format!("no alt copy called (GT {}): not counted", x.gt)), + ), + ])); + continue; + } + let key = unit(&x); + let (whys, partial, pair) = &verdict[&x.gene]; + let why = whys.get(&key).cloned().flatten(); let rule = &rules[&x.gene]; let mut f = x.fields; - if let AKey::Small(k) = &x.key + if let AKey::Small(k) = &key && found.hemi.contains_key(&(x.gene.clone(), k.clone())) { f.insert("genotype".into(), Value::Str("hemizygous".into())); @@ -813,11 +1087,15 @@ fn tier(i: &Inputs) -> Result, String> { f.insert("rule_note".into(), opt_s(rule.note.as_deref())); f.insert("severity".into(), opt_s(partial.as_deref())); if x.kind != Kind::Sv - && let AKey::Small(k) = &x.key + && let AKey::Small(k) = &key && let Some(t) = two.get(&(x.gene.clone(), k.clone())) { f.insert("two_hit".into(), Value::Str(t.clone())); } + if let Some((word, phase)) = pair { + f.insert("pair".into(), Value::Str((*word).into())); + f.insert("phase".into(), Value::Str(phase.clone())); + } reported[slot].push(Value::Object(f)); } Some(reason) => not_reported.push(obj([ diff --git a/rust/crates/og-summary/tests/i411_sf_haplotype_count.rs b/rust/crates/og-summary/tests/i411_sf_haplotype_count.rs new file mode 100644 index 000000000..496c0158f --- /dev/null +++ b/rust/crates/og-summary/tests/i411_sf_haplotype_count.rs @@ -0,0 +1,384 @@ +//! A recessive secondary finding needs two different copies of the gene. +//! +//! The ACMG SF tier used to add up the alt copies of a gene's records. So +//! two MUTYH variants that read-backed phase puts on one copy (cis), a +//! combined allele counted with its own parts, or a record with no alt copy +//! called could complete the two hits MUTYH needs. These cases run the tier +//! on synthetic hits with the shipped `assets/acmg_sf.tsv`. + +use indexmap::IndexMap; +use og_summary::collect::acmg::{ClinicalVcf, HighRecord, Inputs, acmg_sf}; +use og_summary::collect::clinvar::{Floor, HitRecords}; +use og_summary::collect::two_hits::DeletionInputs; +use pycompat::json::Value; + +const ASSETS: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../../assets"); + +// Two public MUTYH pathogenic sites (GRCh38). +const A: (i128, &str, &str) = (45_331_556, "C", "T"); +const B: (i128, &str, &str) = (45_332_803, "T", "C"); + +/// One step 06 hit in `gene`, Pathogenic with 2 stars, GT and PS as given, +/// and `info` added to INFO. +fn hit( + site: (i128, &str, &str), + gene: &str, + gt: &str, + ps: Option<&str>, + info: &str, +) -> Vec { + let (fmt, sample) = match ps { + Some(p) => ("GT:GQ:DP:PS", format!("{gt}:50:30:{p}")), + None => ("GT:GQ:DP", format!("{gt}:50:30")), + }; + let info = format!( + "GENEINFO={gene}:1;CLNSIG=Pathogenic;\ + CLNREVSTAT=criteria_provided,_multiple_submitters,_no_conflicts{info}" + ); + [ + "chr1", + &site.0.to_string(), + ".", + site.1, + site.2, + ".", + "PASS", + &info, + fmt, + &sample, + ] + .iter() + .map(|s| (*s).to_owned()) + .collect() +} + +fn no_deletions() -> DeletionInputs { + DeletionInputs { + annotsv: Ok(None), + step35: Ok(None), + } +} + +fn tier( + hits: Vec>, + high: IndexMap<(String, i128, String, String), HighRecord>, +) -> Value { + let h: Result = Ok((Floor::default(), hits)); + let c: Result = Ok(ClinicalVcf { + records: high.len(), + high: Ok(high), + }); + let d = no_deletions(); + acmg_sf(&Inputs { + assets: ASSETS, + hits: Some(&h), + clinical: Some(&c), + deletions: &d, + }) + .unwrap() +} + +fn rows<'a>(v: &'a Value, k: &str) -> Vec<&'a IndexMap> { + let Value::Object(m) = v else { panic!("{v:?}") }; + let Some(Value::Array(a)) = m.get(k) else { + panic!("{k}: {v:?}") + }; + a.iter() + .map(|x| match x { + Value::Object(o) => o, + _ => panic!("{x:?}"), + }) + .collect() +} + +fn s<'a>(m: &'a IndexMap, k: &str) -> &'a str { + match m.get(k) { + Some(Value::Str(x)) => x, + x => panic!("{k}: {x:?} in {m:?}"), + } +} + +type Row<'a> = &'a IndexMap; + +/// The MUTYH rows of the reported ClinVar hits and of `not_reported`. +fn mutyh(v: &Value) -> (Vec>, Vec>) { + let rep = rows(v, "clinvar_hits") + .into_iter() + .filter(|m| s(m, "gene") == "MUTYH") + .collect(); + let apart = rows(v, "not_reported") + .into_iter() + .filter(|m| s(m, "gene") == "MUTYH") + .collect(); + (rep, apart) +} + +fn none() -> IndexMap<(String, i128, String, String), HighRecord> { + IndexMap::new() +} + +#[test] +fn two_variants_phased_on_one_copy_are_no_finding() { + let v = tier( + vec![ + hit(A, "MUTYH", "0|1", Some("7"), ""), + hit(B, "MUTYH", "0|1", Some("7"), ""), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(rep.is_empty(), "a cis pair was reported: {rep:?}"); + assert_eq!(apart.len(), 2, "{apart:?}"); + for m in apart { + let r = s(m, "reason"); + assert!( + r.starts_with("two heterozygous variants in cis") && r.contains("phase set 7"), + "{r}" + ); + } +} + +#[test] +fn two_variants_phased_on_different_copies_are_biallelic() { + let v = tier( + vec![ + hit(A, "MUTYH", "0|1", Some("7"), ""), + hit(B, "MUTYH", "1|0", Some("7"), ""), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(apart.is_empty(), "{apart:?}"); + assert_eq!(rep.len(), 2); + for m in rep { + assert_eq!(s(m, "pair"), "biallelic"); + assert!(s(m, "phase").starts_with("in trans"), "{}", s(m, "phase")); + } +} + +#[test] +fn unphased_or_unlinked_pairs_are_reported_as_possibly_biallelic() { + for (ga, pa, gb, pb) in [ + ("0/1", None, "0/1", None), + // Two phase sets link nothing. + ("0|1", Some("7"), "0|1", Some("8")), + // A "|" GT with no phase set is not phased. + ("0|1", None, "0|1", None), + // A half call never puts its alt on a known copy. + ("1|.", Some("7"), "0|1", Some("7")), + ] { + let v = tier( + vec![hit(A, "MUTYH", ga, pa, ""), hit(B, "MUTYH", gb, pb, "")], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(apart.is_empty(), "{ga} {gb}: {apart:?}"); + assert_eq!(rep.len(), 2, "{ga} {gb}"); + for m in rep { + assert_eq!(s(m, "pair"), "possibly biallelic", "{ga} {gb}"); + assert!(s(m, "phase").starts_with("phase unknown"), "{ga} {gb}"); + } + } +} + +#[test] +fn the_two_alt_alleles_of_one_split_call_are_biallelic() { + let v = tier( + vec![ + hit((A.0, "C", "T"), "MUTYH", "1/.", None, ""), + hit((A.0, "C", "G"), "MUTYH", "./1", None, ""), + ], + none(), + ); + let (rep, _) = mutyh(&v); + assert_eq!(rep.len(), 2); + for m in rep { + assert_eq!(s(m, "pair"), "biallelic"); + assert!( + s(m, "phase").starts_with("in trans: the two alt alleles of one call"), + "{}", + s(m, "phase") + ); + } +} + +#[test] +fn a_homozygote_is_biallelic_and_one_heterozygote_is_not() { + let v = tier(vec![hit(A, "MUTYH", "1/1", None, "")], none()); + let (rep, _) = mutyh(&v); + assert_eq!(rep.len(), 1); + assert_eq!(s(rep[0], "pair"), "biallelic"); + assert!(s(rep[0], "phase").starts_with("homozygous")); + let v = tier(vec![hit(A, "MUTYH", "0/1", None, "")], none()); + let (rep, apart) = mutyh(&v); + assert!(rep.is_empty()); + assert!(s(apart[0], "reason").starts_with("one heterozygous variant;")); +} + +#[test] +fn a_record_with_no_alt_copy_called_completes_no_pair() { + for gt in ["./.", "0/0"] { + let v = tier( + vec![ + hit(A, "MUTYH", "0/1", None, ""), + hit(B, "MUTYH", gt, None, ""), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(rep.is_empty(), "GT {gt}: {rep:?}"); + assert_eq!(apart.len(), 2); + let none_row = apart + .iter() + .find(|m| s(m, "variant").contains("45332803")) + .unwrap(); + assert!( + s(none_row, "reason").starts_with("no alt copy called"), + "{gt}" + ); + } +} + +// A combined allele of step 06 and its parts (chr1:100 AGC>A and chr1:105 +// T>TGGG joined as chr1:101 GCCAT>CATGGG). +const PART1: (i128, &str, &str) = (100, "AGC", "A"); +const PART2: (i128, &str, &str) = (105, "T", "TGGG"); +const WHOLE: (i128, &str, &str) = (101, "GCCAT", "CATGGG"); +const JOINED: &str = ";PGP_JOINED_FROM=chr1:100:AGC:A|chr1:105:T:TGGG"; +const PART_OF: &str = ";PGP_PART_OF=chr1:101:GCCAT:CATGGG"; + +#[test] +fn a_combined_allele_counts_once_with_its_part() { + let v = tier( + vec![ + hit(PART1, "MUTYH", "0/1", None, PART_OF), + hit(WHOLE, "MUTYH", "0/1", None, JOINED), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(rep.is_empty(), "one allele was reported as two: {rep:?}"); + assert_eq!(apart.len(), 2); + assert!( + s(apart[0], "reason").contains("a combined allele and its parts count once"), + "{}", + s(apart[0], "reason") + ); +} + +#[test] +fn a_phased_combined_allele_counts_once_with_both_parts() { + let v = tier( + vec![ + hit(PART1, "MUTYH", "0|1", Some("90"), PART_OF), + hit(WHOLE, "MUTYH", "0|1", Some("90"), JOINED), + hit(PART2, "MUTYH", "0|1", Some("90"), PART_OF), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(rep.is_empty(), "{rep:?}"); + assert_eq!(apart.len(), 3); +} + +#[test] +fn an_unphased_combined_allele_with_two_candidate_parts_counts_its_parts() { + // The two parts may sit on different copies: possibly biallelic. + let v = tier( + vec![ + hit(PART1, "MUTYH", "0/1", None, PART_OF), + hit(WHOLE, "MUTYH", "0/1", None, JOINED), + hit(PART2, "MUTYH", "0/1", None, PART_OF), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(apart.is_empty(), "{apart:?}"); + assert_eq!(rep.len(), 3); + assert!(rep.iter().all(|m| s(m, "pair") == "possibly biallelic")); + let whole = rep + .iter() + .find(|m| s(m, "variant").contains("GCCAT")) + .unwrap(); + assert!( + s(whole, "combined_allele") + .ends_with("unphased, so the parts may sit on different haplotypes"), + "{}", + s(whole, "combined_allele") + ); +} + +#[test] +fn a_part_found_as_a_high_impact_record_counts_once_with_the_combined_allele() { + let mut genes = IndexMap::new(); + genes.insert("MUTYH".to_owned(), "frameshift_variant".to_owned()); + let mut high = IndexMap::new(); + high.insert( + ( + "chr1".to_owned(), + PART1.0, + PART1.1.to_owned(), + PART1.2.to_owned(), + ), + HighRecord { + genotype: "0/1".into(), + ps: None, + genes, + transcript: "MANE", + frequency: "rare", + weak: false, + why: Vec::new(), + gq: Some(50), + dp: Some(30), + ad: None, + }, + ); + let v = tier(vec![hit(WHOLE, "MUTYH", "0/1", None, JOINED)], high); + let (rep, _) = mutyh(&v); + assert!(rep.is_empty(), "{rep:?}"); + assert!( + rows(&v, "high_impact") + .iter() + .all(|m| s(m, "gene") != "MUTYH"), + "the part was reported as a second hit" + ); +} + +#[test] +fn a_combined_allele_with_an_unrelated_variant_is_still_two() { + let v = tier( + vec![ + hit(PART1, "MUTYH", "0/1", None, PART_OF), + hit(WHOLE, "MUTYH", "0/1", None, JOINED), + hit(A, "MUTYH", "0/1", None, ""), + ], + none(), + ); + let (rep, apart) = mutyh(&v); + assert!(apart.is_empty(), "{apart:?}"); + assert_eq!(rep.len(), 3); +} + +#[test] +fn a_hemizygous_rule_gene_also_counts_copies_not_records() { + // ABCD1 (rule hemizygous): two heterozygous variants of a woman in cis + // are one copy. + let v = tier( + vec![ + hit(A, "ABCD1", "0|1", Some("3"), ""), + hit(B, "ABCD1", "0|1", Some("3"), ""), + ], + none(), + ); + assert!( + rows(&v, "clinvar_hits") + .iter() + .all(|m| s(m, "gene") != "ABCD1") + ); + let apart: Vec<_> = rows(&v, "not_reported") + .into_iter() + .filter(|m| s(m, "gene") == "ABCD1") + .collect(); + assert_eq!(apart.len(), 2); + assert!(s(apart[0], "reason").contains("in cis")); +} From 0d3893b03a5e46686664e3042ce87f492f3ff4e0 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:04:41 +0100 Subject: [PATCH 082/110] fix(two-hits): a homozygous hypomorph inside a deletion is only possibly biallelic Nothing says whether the deletion is real. A full loss of function called homozygous hits both copies either way, so it stays biallelic with a reason that says so; a hypomorph is biallelic only with a real deletion. Bead: clin-32 --- .../crates/og-summary/src/collect/two_hits.rs | 38 +++++++++++++++++-- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/rust/crates/og-summary/src/collect/two_hits.rs b/rust/crates/og-summary/src/collect/two_hits.rs index de93590e5..3841788ac 100644 --- a/rust/crates/og-summary/src/collect/two_hits.rs +++ b/rust/crates/og-summary/src/collect/two_hits.rs @@ -14,7 +14,10 @@ //! variant sits inside the deletion and is called homozygous (one copy is //! left, and it carries the variant), or both calls carry read-backed phase //! (a `|` GT and the same PS) on different copies. On the same copy (cis) -//! they are no second hit; otherwise they are possibly in trans. +//! they are no second hit; otherwise they are possibly in trans. A +//! hypomorph called homozygous inside a deletion is only possibly +//! biallelic: the call alone cannot say whether the deletion is real, and +//! without it a homozygous hypomorph is no finding. //! //! The readers here take from step 05's and step 35's tables only what the //! rule needs. The AnnotSV and Parascopy sections themselves are read by @@ -173,10 +176,24 @@ pub fn pair_phase(dl: &Deletion, v: &Variant) -> (Verdict, String) { }); } if inside && v.copies >= 2 { + // Nothing here says whether the deletion is real and germline. A + // full loss of function called homozygous hits both copies either + // way; a hypomorph does so only together with a real deletion. + if let Some(a) = &v.allele { + return ( + Verdict::PossiblyBiallelic, + format!( + "a hypomorph ({a}) called homozygous inside a called deletion: biallelic (a \ + null plus the hypomorph) only if the deletion is real; confirm the deletion \ + (array or MLPA): without it this is a homozygous hypomorph, not a finding" + ), + ); + } return ( Verdict::Biallelic, - "the variant is called homozygous inside the deletion: it is hemizygous, on the one \ - copy the deletion leaves" + "the variant is called homozygous inside the deletion: hemizygous on the copy the \ + deletion leaves if the deletion is real, homozygous if not; both copies carry it \ + either way" .into(), ); } @@ -988,6 +1005,21 @@ mod tests { assert!(found.hemi.contains_key(&("G".to_owned(), v.key.clone()))); } + #[test] + fn homozygous_hypomorph_inside_a_deletion_is_only_possibly_biallelic() { + let mut v = var(150, "1/1", None); + v.allele = Some("c.-21G>A".into()); + let found = two_hits( + std::slice::from_ref(&v), + &HashMap::from([("G".to_owned(), vec![del(None, None)])]), + ); + let e = &found.entries["G"]; + assert_eq!(e.verdict, Verdict::PossiblyBiallelic); + assert_eq!(e.genotype, "het", "the genotype is not turned hemizygous"); + assert!(e.why.contains("only if the deletion is real"), "{}", e.why); + assert!(!found.hemi.contains_key(&("G".to_owned(), v.key.clone()))); + } + #[test] fn the_best_pair_of_a_gene_wins() { let v = var(500, "1|0", Some("7")); From 286b476351b876046b10bbc9a20e4b25352d7cbd Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:04:41 +0100 Subject: [PATCH 083/110] fix(carrier): keep the combined-allele note, and pair no record without an alt copy Bead: clin-29 Bead: clin-04 --- rust/crates/og-summary/src/collect/carrier.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/rust/crates/og-summary/src/collect/carrier.rs b/rust/crates/og-summary/src/collect/carrier.rs index 852e35bf3..e02396a91 100644 --- a/rust/crates/og-summary/src/collect/carrier.rs +++ b/rust/crates/og-summary/src/collect/carrier.rs @@ -3,7 +3,9 @@ //! list marks hypomorph or pseudodeficiency is set aside, never a carrier //! finding on its own. The genes of autosomal recessive conditions that a //! called deletion and a hit both reach are listed as two hits, and a hit -//! called homozygous inside a deletion is shown as hemizygous. +//! called homozygous inside a deletion is shown as hemizygous. A hit that +//! is part of step 06's combined allele, or the combined allele itself, +//! carries the note the ClinVar table prints for it. use super::assets::carrier_genes; use super::clinvar::{Floor, Hit, HitRecords, allele_copies, carrier_genotype, obj}; @@ -52,6 +54,12 @@ impl Carrier { item.insert("stars".into(), Value::Int(row.stars.into())); item.insert("inheritance".into(), Value::Str(x.inheritance.clone())); item.insert("condition".into(), Value::Str(x.condition.clone())); + if row.combined_allele != "." { + item.insert( + "combined_allele".into(), + Value::Str(row.combined_allele.clone()), + ); + } let sev = x.severity.get(&key); if let Some(s) = sev { item.insert( @@ -66,7 +74,8 @@ impl Carrier { }; items.push(item); aside.push(sev.is_some()); - if sev.is_none_or(|s| s.kind.as_deref() == Some("hypomorph")) { + // A record with no alt copy called is no hit to pair. + if copies > 0 && sev.is_none_or(|s| s.kind.as_deref() == Some("hypomorph")) { variants.push(( Variant { gene: g.to_owned(), From 3c9d5656f72b43243f53b869940b4067a0ba3fab Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:04:41 +0100 Subject: [PATCH 084/110] docs(acmg): state the haplotype rule in the four places it lives, and record the goldens The summary-collect goldens change only by the new pair, phase and combined_allele fields and the two-hit reason wording. Bead: clin-01 Bead: D14 --- CHANGELOG.md | 5 + assets/acmg_sf.tsv | 24 +- docs/23-clinical-filter.md | 2 +- docs/results/secondary-findings.md | 6 +- .../all-history/all-history.json | 21 +- .../golden/summary-collect/all-nf/all-nf.json | 19 +- .../golden/summary-collect/all/all.json | 21 +- .../summary-collect/cb-full/cb-full.json | 1111 +++++++++++++++++ .../golden/summary-collect/cb-nf/cb-nf.json | 771 ++++++++++++ .../summary-collect/cb-nfbad/cb-nfbad.json | 433 +++++++ .../summary-collect/cb-notbi/cb-notbi.json | 434 +++++++ .../cb-quoted-dosage/cb-quoted-dosage.json | 1111 +++++++++++++++++ .../cb-quoted-interval.json | 1111 +++++++++++++++++ .../cb-quoted-smn/cb-quoted-smn.json | 1111 +++++++++++++++++ .../cb-unicode-contig/cb-unicode-contig.json | 1111 +++++++++++++++++ 15 files changed, 7262 insertions(+), 29 deletions(-) create mode 100644 tests/parity/golden/summary-collect/cb-full/cb-full.json create mode 100644 tests/parity/golden/summary-collect/cb-nf/cb-nf.json create mode 100644 tests/parity/golden/summary-collect/cb-nfbad/cb-nfbad.json create mode 100644 tests/parity/golden/summary-collect/cb-notbi/cb-notbi.json create mode 100644 tests/parity/golden/summary-collect/cb-quoted-dosage/cb-quoted-dosage.json create mode 100644 tests/parity/golden/summary-collect/cb-quoted-interval/cb-quoted-interval.json create mode 100644 tests/parity/golden/summary-collect/cb-quoted-smn/cb-quoted-smn.json create mode 100644 tests/parity/golden/summary-collect/cb-unicode-contig/cb-unicode-contig.json diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..0a6be7ea1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- A recessive secondary finding now needs two different copies of the gene hit. The ACMG SF tier of `og summary collect` added up the alt copies of a gene's records, so three things completed the two hits that MUTYH, BTD, ATP7B and the other recessive genes need, and reported a carrier as affected: + - Two variants that read-backed phase puts on one copy (a `|` genotype and the same phase set, PS), as a provider VCF from DRAGEN or a long-read phaser can hold. They are now listed apart under `not_reported`, with the phase set. Two variants on different copies are biallelic. A `|` genotype with no PS, or a half call such as `1|.`, is phase unknown. + - A combined allele of step 06 counted together with its own parts, from ClinVar or as a HIGH-impact record. It now counts once, unless it is unphased and two of its parts are hits on their own: those may sit on different copies. + - A record with no alt copy called (`./.`, `0/0`), which counted as one copy. It now counts nothing and is listed apart with the reason. Steps 06 and 23 never write such a record, so no pipeline run changes. + Two variants of unknown phase are still reported, as the ACMG rule says. Each finding of a gene whose rule needs two hits now has two new fields: `pair`, `biallelic` (a homozygote, a phased trans pair, the two alt alleles of one split call, or a deletion pair the reads prove) or `possibly biallelic`, and `phase`, which says why. The reports do not show them yet. A ClinVar finding and a carrier-list entry that is a combined allele, or a part of one, now carry the note of the ClinVar table as `combined_allele`. In the two-hit rule, a hypomorph (such as the RBM8A low-expression allele) called homozygous inside a called deletion is now possibly biallelic, not biallelic, and is not shown as hemizygous: without a real deletion it is a homozygous hypomorph, which is no finding. A full loss-of-function variant there stays biallelic, and its reason now says it holds whether the deletion is real or not. No field is renamed or removed. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/assets/acmg_sf.tsv b/assets/acmg_sf.tsv index 66c1fed5b..873ffc099 100644 --- a/assets/acmg_sf.tsv +++ b/assets/acmg_sf.tsv @@ -1,5 +1,6 @@ # acmg_sf.tsv: the ACMG SF v3.3 secondary-findings genes and the reporting rule of each -# (bin/collect_summary.py acmg_sf_tier). One row per gene, 84 rows. Source: Lee et al., ACMG SF v3.3 +# (og summary collect, rust/crates/og-summary/src/collect/acmg.rs). One row per gene, 84 rows. +# Source: Lee et al., ACMG SF v3.3 # list for reporting of secondary findings in clinical exome and genome sequencing, Genet Med # 2025;27(8):101454 (PMID 40568962, doi:10.1016/j.gim.2025.101454), Table 1 and its footnotes, read # 2026-10-27. HGNC ids from rest.genenames.org on 2026-10-27; GRCh38 positions from Ensembl. @@ -8,14 +9,21 @@ # inheritance AD, AR, SD (semidominant) or XL, as Table 1 gives it # report_if when a P/LP variant (ClinVar, or a rare HIGH-impact record) is a secondary finding: # any one variant is enough -# biallelic two variants: a homozygote, or two different variants even when -# their phase is unknown (Table 1 footnote a); a called deletion -# of the gene (AnnotSV, step 35's copy number) counts as one of the -# two unless read-backed phase puts it on the variant's copy -# (bin/collect_summary.py two_hits); so it does for hemizygous +# biallelic both copies of the gene hit: a homozygote, or two different +# variants even when their phase is unknown (Table 1 footnote a; +# reported as possibly biallelic). Two variants that read-backed +# phase puts on one copy (a "|" GT and the same PS) are one copy +# and are not reported; a "|" GT with no PS, or a half call such +# as 1|., is phase unknown. A combined allele of step 06 counts +# once with its parts, and a record with no alt copy called counts +# nothing. A called deletion of the gene (AnnotSV, step 35's copy +# number) counts as one of the two unless read-backed phase puts +# it on the variant's copy (og-summary two_hits); so it does for +# hemizygous # hom_variant only a variant of the variants column, homozygous -# hemizygous a hemizygous or homozygous variant, or two heterozygous ones; a -# single heterozygous variant is not reported +# hemizygous a hemizygous or homozygous variant, or two heterozygous ones +# counted as for biallelic; a single heterozygous variant is not +# reported # het_female_too any variant, heterozygous females included # variants report_if hom_variant: the only variants that count, as chrom:pos:ref:alt (GRCh38) # and a name; "." for every other gene diff --git a/docs/23-clinical-filter.md b/docs/23-clinical-filter.md index 28388bf82..3139c0f79 100644 --- a/docs/23-clinical-filter.md +++ b/docs/23-clinical-filter.md @@ -88,7 +88,7 @@ The Nextflow `CLINICAL_FILTER` module applies the same tiers, ranking, frequency ### Secondary-findings genes (ACMG SF v3.3) -Both reports list, beside the clinical filter's counts, the secondary findings in the 84 genes of the ACMG SF v3.3 list (Lee et al., Genet Med 2025;27(8):101454; the genes in which the ACMG recommends reporting pathogenic variants found by chance, such as BRCA1, LDLR, MYBPC3 or TTN): the step 6 ClinVar hits in those genes, the clinical filter's records with a HIGH-impact consequence on the ranked transcript in them, and step 5's AnnotSV class 4 and 5 structural variants in the genes whose rule allows them. Each gene's rule from Table 1 of the list is a row of `assets/acmg_sf.tsv`: one variant in a dominant gene, two in a recessive one (MUTYH, BTD, ATP7B and others; a homozygote, or two variants of unknown phase), HFE only as homozygous p.C282Y, GLA and OTC also in a heterozygous female, ABCD1 hemizygous, homozygous or with two heterozygous variants. A variant the rule does not report is listed apart with the reason; a pseudodeficiency allele is not counted, and a BTD finding with the p.Asp444His hypomorph says partial, not profound. Of the reported HIGH-impact records the reports count as "rare HIGH impact" only the rare ones with a sound call; a weak call or an unknown frequency is listed with its mark and counted apart, and a common one is left out. The list version is `ACMG_SF_VERSION` in `og summary collect` (`rust/crates/og-summary`). It is a list to review with a clinician: a rare HIGH-impact variant is not a ClinVar classification. [Interpreting results](interpreting-results.md#carrier-status-is-not-disease) gives every rule. Step 17 (CPSR) reports the ACMG secondary findings with its own classification. +Both reports list, beside the clinical filter's counts, the secondary findings in the 84 genes of the ACMG SF v3.3 list (Lee et al., Genet Med 2025;27(8):101454; the genes in which the ACMG recommends reporting pathogenic variants found by chance, such as BRCA1, LDLR, MYBPC3 or TTN): the step 6 ClinVar hits in those genes, the clinical filter's records with a HIGH-impact consequence on the ranked transcript in them, and step 5's AnnotSV class 4 and 5 structural variants in the genes whose rule allows them. Each gene's rule from Table 1 of the list is a row of `assets/acmg_sf.tsv`: one variant in a dominant gene, two copies hit in a recessive one (MUTYH, BTD, ATP7B and others: a homozygote, two variants that read-backed phase puts on different copies, or two variants of unknown phase, which `summary.json` marks `"pair": "possibly biallelic"`; two variants phased on one copy are listed apart, a combined allele of step 6 counts once with its parts, and a record with no alt copy called counts nothing), HFE only as homozygous p.C282Y, GLA and OTC also in a heterozygous female, ABCD1 hemizygous, homozygous or with two heterozygous variants. A variant the rule does not report is listed apart with the reason; a pseudodeficiency allele is not counted, and a BTD finding with the p.Asp444His hypomorph says partial, not profound. Of the reported HIGH-impact records the reports count as "rare HIGH impact" only the rare ones with a sound call; a weak call or an unknown frequency is listed with its mark and counted apart, and a common one is left out. The list version is `ACMG_SF_VERSION` in `og summary collect` (`rust/crates/og-summary`). It is a list to review with a clinician: a rare HIGH-impact variant is not a ClinVar classification. [Interpreting results](interpreting-results.md#carrier-status-is-not-disease) gives every rule. Step 17 (CPSR) reports the ACMG secondary findings with its own classification. The `table_text` column of `assets/acmg_sf.tsv` quotes each gene's rule from Table 1 of the paper (doi:10.1016/j.gim.2025.101454), such as "All P and LP" or "P and LP (2 variants)". summary.json gives that text as the rule of each finding, and the reports use it in the reason a variant is not reported. These are short cited quotations of a factual reporting rule: six phrases, the longest 44 characters. "(See text)" after a rule points to the paper's section on the dilated cardiomyopathy (DCM) genes. The `note` column says what the table's footnotes add, in our own words. diff --git a/docs/results/secondary-findings.md b/docs/results/secondary-findings.md index 5afe3222e..544020d8e 100644 --- a/docs/results/secondary-findings.md +++ b/docs/results/secondary-findings.md @@ -12,12 +12,12 @@ The most common "pathogenic" finding in any genome is **heterozygous carrier sta - **Note — MUTYH**: Biallelic (homozygous or compound het) MUTYH carriers have a well-established high colorectal cancer risk. For **monoallelic** (single-copy) carriers, the evidence is more nuanced: some meta-analyses show a modest risk increase, but a counseling framework for moderate-penetrance CRC genes (Genetics in Medicine) notes that risk estimates for monoallelic MUTYH are conflicting and that screening recommendations (e.g., earlier colonoscopy) were historically tied to carriers with a CRC family history. Discuss with a genetic counselor, especially if you have a family history of CRC - Examples: GJB2 (hearing loss), CFTR (cystic fibrosis), HFE (hemochromatosis) -**Your own carrier list (step 24 report).** The ClinVar card of both reports is followed by a carrier list for this one sample, with no partner needed: every step 6 ClinVar hit in the 3,292 recessive and X-linked genes of `assets/carrier_genes.tsv` (the list of the [couple screen](../39-couple.md#the-carrier-list)). An allele that list marks as a hypomorph (for example BTD p.Asp444His or the GALT Duarte variants) or a pseudodeficiency allele (HEXA c.739C>T and c.745C>T, which lower the enzyme test result but cause no Tay-Sachs disease) is listed as set aside, never as a carrier finding on its own. +**Your own carrier list (step 24 report).** The ClinVar card of both reports is followed by a carrier list for this one sample, with no partner needed: every step 6 ClinVar hit in the 3,292 recessive and X-linked genes of `assets/carrier_genes.tsv` (the list of the [couple screen](../39-couple.md#the-carrier-list)). An allele that list marks as a hypomorph (for example BTD p.Asp444His or the GALT Duarte variants) or a pseudodeficiency allele (HEXA c.739C>T and c.745C>T, which lower the enzyme test result but cause no Tay-Sachs disease) is listed as set aside, never as a carrier finding on its own. A hit that is a combined allele of step 6 or a part of one keeps the note the ClinVar table prints for it (`combined_allele` in `summary.json`), and so does a secondary finding: an unphased combined allele says its parts may sit on different copies. **Secondary findings follow each gene's ACMG rule.** The secondary-findings card (step 23's section of the report) applies the reporting rule of each of the 84 ACMG SF v3.3 genes (Lee et al., Genet Med 2025;27(8):101454, Table 1), written gene by gene in `assets/acmg_sf.tsv`: - a dominant gene (BRCA1, LDLR, MYH7 and most others): one pathogenic or likely pathogenic variant is reported; -- a recessive gene (MUTYH, ATP7B, BTD, CYP27A1, GAA, RPE65, CASQ2, TRDN): two variants are needed, a homozygote or two different ones even when their phase is unknown. One heterozygous MUTYH variant is listed apart as not reported, with the reason; +- a recessive gene (MUTYH, ATP7B, BTD, CYP27A1, GAA, RPE65, CASQ2, TRDN): both copies of the gene must be hit. A homozygote, or two variants that read-backed phase puts on different copies (a `|` genotype with the same phase set, PS), are biallelic. Two different variants of unknown phase are still reported, as possibly biallelic: most short-read calls carry no phase, and they may sit on one copy. In `summary.json` each such finding has a `pair` field (`biallelic` or `possibly biallelic`) and a `phase` field that says why. Two variants that read-backed phase puts on the same copy (cis) hit one copy only, so they are listed apart with the phase set. A `|` genotype with no phase set, or a half call such as `1|.`, counts as phase unknown. The two alt alleles of one split call (`1/.` and `./1` at one position) sit on different copies. A combined allele of step 6 counts once with its parts, unless it is unphased and two of its parts are hits on their own. A record with no alt copy called counts nothing. One heterozygous MUTYH variant is listed apart as not reported, with the reason; - HFE: only homozygous p.Cys282Tyr. A heterozygous p.Cys282Tyr or a homozygous p.His63Asp is not reported; - X-linked: GLA (Fabry disease) and OTC are reported in a hemizygous male and a heterozygous female alike. ABCD1 (X-linked adrenoleukodystrophy) is reported hemizygous, homozygous or with two heterozygous variants, never for one heterozygous variant; - BTD with p.Asp444His: reported as partial, not profound, biotinidase deficiency; @@ -25,7 +25,7 @@ The most common "pathogenic" finding in any genome is **heterozygous carrier sta **Two hits across callers: a deletion plus a variant on the other copy.** Small-variant callers see one hit when the other copy of the gene is deleted. So the carrier list also joins the deletions the other engines call with the ClinVar hits, gene by gene (`og summary collect`, `two_hits`). The deletions come from AnnotSV's class 4 and 5 deletions (step 5), step 35's interval table (the recurrent regions of `bin/cn_loci.tsv`, such as 1q21.1), its HBA1/HBA2 count and Parascopy's SMN1 count. A recessive gene that a deletion and a hit both reach gets one line: -- **biallelic** when the reads show the two hits on different copies. Either the hit is called homozygous inside the deletion, so it sits on the one copy left (the line and the carrier list call it hemizygous), or both calls carry read-backed phase (a `|` genotype with the same phase set, PS) on different copies; +- **biallelic** when the reads show the two hits on different copies. Either the hit is called homozygous inside the deletion, so it sits on the one copy left (the line and the carrier list call it hemizygous; if the deletion is a false call, the hit is homozygous and both copies still carry it), or both calls carry read-backed phase (a `|` genotype with the same phase set, PS) on different copies. A low-expression (hypomorph) allele called homozygous inside a deletion is only **possibly biallelic**: it causes disease with a null allele only if the deletion is real, so confirm the deletion (array or MLPA); - **possibly biallelic** otherwise: the phase is unknown. Most short-read calls carry no phase, so this is the usual line. Step 05's checked table keeps no genotype column yet, and step 35's counts have no phase, so in a pipeline run a deletion pairs as possibly biallelic unless the hit is called homozygous inside it. A parent's genome (step 38, [family analysis](../multi-sample.md#family-analysis-step-38-opt-in)) or long reads can settle it; - no line when read-backed phase puts both on the same copy (cis): the other copy is intact. diff --git a/tests/parity/golden/summary-collect/all-history/all-history.json b/tests/parity/golden/summary-collect/all-history/all-history.json index e6d8efc33..62364b8b1 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -12716,7 +12716,8 @@ "significance": "Likely pathogenic", "stars": 1, "inheritance": "AR", - "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)" + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" }, { "gene": "BRCA1", @@ -12725,7 +12726,8 @@ "significance": "Pathogenic", "stars": 3, "inheritance": "AR", - "condition": "Fanconi anemia" + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" }, { "gene": "GLA", @@ -12734,7 +12736,8 @@ "significance": "Pathogenic", "stars": 0, "inheritance": "XL", - "condition": "Fabry disease" + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" }, { "gene": "HBA1", @@ -12774,7 +12777,7 @@ { "gene": "SMN1", "verdict": "biallelic", - "why": "the variant is called homozygous inside the deletion: it is hemizygous, on the one copy the deletion leaves", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", "deletion": "one SMN1 copy (Parascopy, step 35)", "variant": "chr5:70951946 C>T", "genotype": "hemizygous", @@ -15257,7 +15260,9 @@ "low_confidence": false, "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "BRCA1", @@ -15266,6 +15271,7 @@ "significance": "Pathogenic", "stars": 3, "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", "rule": "All P and LP", "rule_note": null, "severity": null @@ -15277,6 +15283,7 @@ "significance": "Pathogenic", "stars": 0, "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", "rule": "All hemi, het, homozygous P and LP", "rule_note": null, "severity": null @@ -15299,7 +15306,9 @@ "ad": "15,15", "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "MYBPC3", diff --git a/tests/parity/golden/summary-collect/all-nf/all-nf.json b/tests/parity/golden/summary-collect/all-nf/all-nf.json index e61cb5810..ecde747fd 100644 --- a/tests/parity/golden/summary-collect/all-nf/all-nf.json +++ b/tests/parity/golden/summary-collect/all-nf/all-nf.json @@ -12526,7 +12526,8 @@ "significance": "Likely pathogenic", "stars": 1, "inheritance": "AR", - "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)" + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" }, { "gene": "BRCA1", @@ -12535,7 +12536,8 @@ "significance": "Pathogenic", "stars": 3, "inheritance": "AR", - "condition": "Fanconi anemia" + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" }, { "gene": "GLA", @@ -12544,7 +12546,8 @@ "significance": "Pathogenic", "stars": 0, "inheritance": "XL", - "condition": "Fabry disease" + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" }, { "gene": "HBA1", @@ -13773,7 +13776,9 @@ "low_confidence": false, "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "BRCA1", @@ -13782,6 +13787,7 @@ "significance": "Pathogenic", "stars": 3, "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", "rule": "All P and LP", "rule_note": null, "severity": null @@ -13793,6 +13799,7 @@ "significance": "Pathogenic", "stars": 0, "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", "rule": "All hemi, het, homozygous P and LP", "rule_note": null, "severity": null @@ -13815,7 +13822,9 @@ "ad": "15,15", "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "MYBPC3", diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index fabbf7ce7..e942bfe27 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -12721,7 +12721,8 @@ "significance": "Likely pathogenic", "stars": 1, "inheritance": "AR", - "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)" + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" }, { "gene": "BRCA1", @@ -12730,7 +12731,8 @@ "significance": "Pathogenic", "stars": 3, "inheritance": "AR", - "condition": "Fanconi anemia" + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" }, { "gene": "GLA", @@ -12739,7 +12741,8 @@ "significance": "Pathogenic", "stars": 0, "inheritance": "XL", - "condition": "Fabry disease" + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" }, { "gene": "HBA1", @@ -12779,7 +12782,7 @@ { "gene": "SMN1", "verdict": "biallelic", - "why": "the variant is called homozygous inside the deletion: it is hemizygous, on the one copy the deletion leaves", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", "deletion": "one SMN1 copy (Parascopy, step 35)", "variant": "chr5:70951946 C>T", "genotype": "hemizygous", @@ -15262,7 +15265,9 @@ "low_confidence": false, "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "BRCA1", @@ -15271,6 +15276,7 @@ "significance": "Pathogenic", "stars": 3, "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", "rule": "All P and LP", "rule_note": null, "severity": null @@ -15282,6 +15288,7 @@ "significance": "Pathogenic", "stars": 0, "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", "rule": "All hemi, het, homozygous P and LP", "rule_note": null, "severity": null @@ -15304,7 +15311,9 @@ "ad": "15,15", "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "MYBPC3", diff --git a/tests/parity/golden/summary-collect/cb-full/cb-full.json b/tests/parity/golden/summary-collect/cb-full/cb-full.json new file mode 100644 index 000000000..86fc5522d --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-full/cb-full.json @@ -0,0 +1,1111 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": true, + "started_utc": "2020-01-01 00:00 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": 0.008, + "gnomad_genome_af": 0.007, + "rsids": [ + "rs113993960" + ], + "af": 0.008, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": 0.06, + "gnomad_genome_af": 0.05, + "rsids": [ + "rs99", + "rs1800562" + ], + "af": 0.06, + "common": true, + "cdna": { + "check": "clean", + "note": "", + "alt_reads": 20, + "alt_clipped": 0, + "ref_reads": 20, + "ref_clipped": 0, + "construct": null + } + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": 0.002, + "gnomad_genome_af": 0.0005, + "rsids": [ + "rs36053993" + ], + "af": 0.002, + "common": false, + "cdna": { + "check": "flagged", + "note": "possible cDNA/transgene contamination: check the reads", + "alt_reads": 12, + "alt_clipped": 6, + "ref_reads": 10, + "ref_clipped": 0, + "construct": "yes" + } + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": 0.03, + "gnomad_genome_af": null, + "rsids": [ + "rs80338939" + ], + "af": 0.03, + "common": true, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": "vep/S_vep.vcf.gz", + "note": null, + "common_af": 0.01 + }, + "cdna_flagged": 1, + "construct_sites": 1, + "cdna_scan": { + "note": "2 genes with spliced reads", + "loci": [ + { + "chrom": "chr1", + "start": 100, + "end": 200, + "junctions": 2, + "reads": 5, + "junction_list": "A:1-2,A:3-4" + } + ] + }, + "deep_intronic": [ + { + "chrom": "chr7", + "pos": 117639961, + "ref": "C", + "alt": "T", + "gene": "CFTR", + "hgvs": "c.3718-2477C>T", + "clinvar_id": "7129", + "call": "no call", + "detail": "" + } + ] + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy", + "hemizygous": "called homozygous inside one SMN1 copy (Parascopy, step 35)" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [ + { + "gene": "CFTR", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "CFTR_del deletion, 1 of 2 copies (read depth, step 35)", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "allele": null, + "condition": "Cystic fibrosis", + "inheritance": "AR" + }, + { + "gene": "GJB2", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "DEL chr13:20180000-20200000 (AnnotSV class 4, Manta)", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "allele": null, + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "inheritance": "AR" + }, + { + "gene": "HBA1", + "verdict": "possibly biallelic", + "why": "phase unknown, possibly in trans (no read-backed phase links the two calls)", + "deletion": "3 of 4 alpha-globin genes (read depth, step 35)", + "variant": "chr16:176700 G>A", + "genotype": "het", + "allele": null, + "condition": "Alpha-thalassemia", + "inheritance": "AR" + }, + { + "gene": "MUTYH", + "verdict": "biallelic", + "why": "in trans: read-backed phase puts them on different copies (phase set 45331000)", + "deletion": "DEL chr1:45338000-45340000 (AnnotSV class 5, Manta)", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "allele": null, + "condition": "MUTYH-related polyposis", + "inheritance": "AR" + }, + { + "gene": "SMN1", + "verdict": "biallelic", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", + "deletion": "one SMN1 copy (Parascopy, step 35)", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "allele": null, + "condition": "Spinal muscular atrophy", + "inheritance": "AR" + } + ], + "deletions_read": [ + "AnnotSV class 4 and 5 deletions (step 05)", + "step 35's interval table (read depth)", + "step 35's HBA1/HBA2 count", + "Parascopy's SMN1 count (step 35)" + ], + "deletions_not_read": [] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "ok", + "source": "pharmcat/S.report.json", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "3.4.0", + "html_report": true + } + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "ok", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes": [ + { + "gene": "CYP2D6", + "diplotype": "*1/*4", + "phenotype": "Intermediate Metabolizer", + "status": "non-normal" + }, + { + "gene": "CYP2C19", + "diplotype": "*1/*17", + "phenotype": "Rapid", + "status": "ambiguous" + }, + { + "gene": "CYP2C9", + "diplotype": "*1/*1", + "phenotype": "Normal", + "status": "normal" + }, + { + "gene": "DPYD", + "diplotype": null, + "phenotype": null, + "status": null + } + ], + "non_normal": 1, + "ambiguous": 1, + "not_called": 0, + "unclassified": 0, + "parse_failed": false, + "warnings": [ + "CYP2C19 has two possible phenotypes", + "last" + ] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "ok", + "source": "pypgx/S_pypgx_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_total": 6, + "genes_called": 3, + "cyp2d6": "*1/*2", + "cnv_call": { + "CYP2D6": "Normal", + "CYP2A6": "not called: pypgx failed", + "CYP2B6": "not called: the CYP2D6 depth check failed", + "SLCO1B1": "not called: pypgx gave no copy-number call" + }, + "not_callable": [ + "CYP2E1" + ], + "low_gq": [ + { + "gene": "UGT1A1", + "diplotype": "Indeterminate", + "min_gq": 12, + "weakest": "chr2:1:A:G" + }, + { + "gene": "SLCO1B1", + "diplotype": "*1/*5", + "min_gq": null, + "weakest": "" + } + ], + "cyp2d6_evidence": { + "phenotype": "Normal Metabolizer", + "defining_filter": "PASS", + "quality": "ok" + }, + "depth_check": { + "status": "ok", + "gene_mapq1_share": "0.99", + "body_mapq20_share": "0.95" + }, + "comparison": { + "conflicts": 1, + "one_tool_only": 2, + "concordant": 1 + } + } + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/S_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "*2/*1", + "filter": "PASS" + } + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "ok", + "source": "cpsr/S.cpsr.grch38.classification.tsv.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "html_report": true, + "classification_column": "CLASSIFICATION", + "classification": { + "Pathogenic": 1, + "Likely_Pathogenic": 1, + "VUS": 1, + "Benign": 1, + ".": 1 + }, + "plp": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "13:32338000 G>A", + "gene": "BRCA2", + "final": "Likely_Pathogenic", + "cpsr": "VUS", + "clinvar": null, + "authority": "CPSR", + "acmg_codes": null, + "dp": 40, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "5:112839000 A>T", + "gene": "APC", + "final": ".", + "cpsr": "Pathogenic", + "clinvar": null, + "authority": null, + "acmg_codes": null, + "dp": 30, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "disagreements": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "final_plp_own_benign": 1, + "own_class_column": "CPSR_CLASSIFICATION", + "low_confidence": 1, + "call_floor_dp": 8, + "cdna_flagged": 1 + } + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "ok", + "source": "clinical/S_clinical_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "variants": 5, + "by_impact": { + "HIGH": 3, + "MODERATE": 1, + ".": 1 + }, + "genes": 3, + "acmg_sf": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "two_hit": "biallelic with DEL chr1:45338000-45340000 (AnnotSV class 5, Manta): in trans: read-backed phase puts them on different copies (phase set 45331000)", + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [ + { + "gene": "MSH2", + "variant": "DEL chr2:47386000-47388000", + "acmg_class": "4", + "caller": "Delly", + "support": 1, + "via": "EPCAM exons 8 and 9, the 3' end (ENST00000263735)", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + }, + { + "gene": "BRCA1", + "variant": "DUP chr17:43000000-43100000", + "acmg_class": "4", + "caller": "CNVpytor", + "support": 1, + "via": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + } + ], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + }, + "frequency_unknown": 1, + "weak_calls": 2 + } + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "ok", + "source": "slivar/S_slivar_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "prioritized": 2, + "frequency_unknown": 1, + "compound_het_variants": 4, + "compound_het_genes": 2, + "compound_het_pairs": 26, + "compound_het_phase": { + "trans": 23, + "cis": 1, + "unknown": 1 + }, + "compound_het_trans": [ + { + "gene": "G1", + "variants": "chr1:10 A>G + chr1:15 C>T", + "reads": "1 of 2" + }, + { + "gene": "G2", + "variants": "chr1:20 A>G + chr1:25 C>T", + "reads": "2 of 3" + }, + { + "gene": "G3", + "variants": "chr1:30 A>G + chr1:35 C>T", + "reads": "3 of 4" + }, + { + "gene": "G4", + "variants": "chr1:40 A>G + chr1:45 C>T", + "reads": "4 of 5" + }, + { + "gene": "G5", + "variants": "chr1:50 A>G + chr1:55 C>T", + "reads": "5 of 6" + }, + { + "gene": "G6", + "variants": "chr1:60 A>G + chr1:65 C>T", + "reads": "6 of 7" + }, + { + "gene": "G7", + "variants": "chr1:70 A>G + chr1:75 C>T", + "reads": "7 of 8" + }, + { + "gene": "G8", + "variants": "chr1:80 A>G + chr1:85 C>T", + "reads": "8 of 9" + }, + { + "gene": "G9", + "variants": "chr1:90 A>G + chr1:95 C>T", + "reads": "9 of 10" + }, + { + "gene": "G10", + "variants": "chr1:100 A>G + chr1:105 C>T", + "reads": "10 of 11" + }, + { + "gene": "G11", + "variants": "chr1:110 A>G + chr1:115 C>T", + "reads": "11 of 12" + }, + { + "gene": "G12", + "variants": "chr1:120 A>G + chr1:125 C>T", + "reads": "12 of 13" + }, + { + "gene": "G13", + "variants": "chr1:130 A>G + chr1:135 C>T", + "reads": "13 of 14" + }, + { + "gene": "G14", + "variants": "chr1:140 A>G + chr1:145 C>T", + "reads": "14 of 15" + }, + { + "gene": "G15", + "variants": "chr1:150 A>G + chr1:155 C>T", + "reads": "15 of 16" + }, + { + "gene": "G16", + "variants": "chr1:160 A>G + chr1:165 C>T", + "reads": "16 of 17" + }, + { + "gene": "G17", + "variants": "chr1:170 A>G + chr1:175 C>T", + "reads": "17 of 18" + }, + { + "gene": "G18", + "variants": "chr1:180 A>G + chr1:185 C>T", + "reads": "18 of 19" + }, + { + "gene": "G19", + "variants": "chr1:190 A>G + chr1:195 C>T", + "reads": "19 of 20" + }, + { + "gene": "G20", + "variants": "chr1:200 A>G + chr1:205 C>T", + "reads": "20 of 21" + } + ] + } + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "*1/*4", + "pypgx": "*1/*2", + "Cyrius": "*2/*1" + }, + "agree": true, + "consensus": { + "result": "*1/*2", + "passed_to_pharmcat": true, + "reason": "pypgx and Cyrius agree", + "source": "pgx_consensus/S_pgx_consensus.tsv" + }, + "probable": null + } +} diff --git a/tests/parity/golden/summary-collect/cb-nf/cb-nf.json b/tests/parity/golden/summary-collect/cb-nf/cb-nf.json new file mode 100644 index 000000000..ea2911faa --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-nf/cb-nf.json @@ -0,0 +1,771 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": true, + "started_utc": "2020-01-01 00:00 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": null, + "note": "no VEP output (step 13) in this folder", + "common_af": 0.01 + } + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hom", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [ + { + "gene": "CFTR", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "CFTR_del deletion, 1 of 2 copies (read depth, step 35)", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "allele": null, + "condition": "Cystic fibrosis", + "inheritance": "AR" + } + ], + "deletions_read": [ + "AnnotSV class 4 and 5 deletions (step 05)", + "step 35's interval table (read depth)" + ], + "deletions_not_read": [ + "step 35's HBA1/HBA2 count: not called", + "Parascopy's SMN1 count: not resolved" + ] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "ok", + "source": "vcf/B.report.json", + "file_date": "2021-03-04 05:07 UTC", + "note": null, + "data": { + "version": "", + "html_report": false + } + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "stale", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2019-06-01 12:30 UTC", + "note": "from an earlier run (2019-06-01 12:30 UTC); step 27 was skipped in the run of 2020-01-01 00:00 UTC", + "data": { + "genes": [ + { + "gene": "CYP2D6", + "diplotype": "*4/*4", + "phenotype": "Poor", + "status": "not called" + } + ], + "non_normal": 0, + "ambiguous": 0, + "not_called": 1, + "unclassified": 0, + "parse_failed": false, + "warnings": [] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "ok", + "source": "pypgx/S_pypgx_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_total": 6, + "genes_called": 3, + "cyp2d6": "*1/*2", + "cnv_call": { + "CYP2D6": "Normal", + "CYP2A6": "not called: pypgx failed", + "CYP2B6": "not called: the CYP2D6 depth check failed", + "SLCO1B1": "not called: pypgx gave no copy-number call" + }, + "not_callable": [ + "CYP2E1" + ], + "low_gq": [ + { + "gene": "UGT1A1", + "diplotype": "Indeterminate", + "min_gq": 12, + "weakest": "chr2:1:A:G" + }, + { + "gene": "SLCO1B1", + "diplotype": "*1/*5", + "min_gq": null, + "weakest": "" + } + ], + "cyp2d6_evidence": { + "phenotype": "Normal Metabolizer", + "defining_filter": "PASS", + "quality": "ok" + } + } + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/T_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "*1/*2", + "filter": "LowQ" + } + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "ok", + "source": "cpsr/T.cpsr.grch37.classification.tsv.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "html_report": true, + "classification_column": "FINAL_CLASSIFICATION", + "classification": { + "Pathogenic": 1, + ".": 1 + }, + "plp": [ + { + "variant": ".", + "gene": "A", + "final": "Pathogenic", + "cpsr": "Benign", + "clinvar": null, + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false + } + ], + "disagreements": [], + "final_plp_own_benign": 1, + "own_class_column": "CPSR_CLASSIFICATION", + "low_confidence": 0, + "call_floor_dp": 8 + } + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "ok", + "source": "clinical/S_clinical.vcf.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "variants": 6, + "acmg_sf": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + } + } + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "ok", + "source": "slivar/S_prioritized.vcf.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "prioritized": 2, + "compound_het_pairs": 26, + "compound_het_phase": { + "trans": 23, + "cis": 1, + "unknown": 1 + }, + "compound_het_trans": [ + { + "gene": "G1", + "variants": "chr1:10 A>G + chr1:15 C>T", + "reads": "1 of 2" + }, + { + "gene": "G2", + "variants": "chr1:20 A>G + chr1:25 C>T", + "reads": "2 of 3" + }, + { + "gene": "G3", + "variants": "chr1:30 A>G + chr1:35 C>T", + "reads": "3 of 4" + }, + { + "gene": "G4", + "variants": "chr1:40 A>G + chr1:45 C>T", + "reads": "4 of 5" + }, + { + "gene": "G5", + "variants": "chr1:50 A>G + chr1:55 C>T", + "reads": "5 of 6" + }, + { + "gene": "G6", + "variants": "chr1:60 A>G + chr1:65 C>T", + "reads": "6 of 7" + }, + { + "gene": "G7", + "variants": "chr1:70 A>G + chr1:75 C>T", + "reads": "7 of 8" + }, + { + "gene": "G8", + "variants": "chr1:80 A>G + chr1:85 C>T", + "reads": "8 of 9" + }, + { + "gene": "G9", + "variants": "chr1:90 A>G + chr1:95 C>T", + "reads": "9 of 10" + }, + { + "gene": "G10", + "variants": "chr1:100 A>G + chr1:105 C>T", + "reads": "10 of 11" + }, + { + "gene": "G11", + "variants": "chr1:110 A>G + chr1:115 C>T", + "reads": "11 of 12" + }, + { + "gene": "G12", + "variants": "chr1:120 A>G + chr1:125 C>T", + "reads": "12 of 13" + }, + { + "gene": "G13", + "variants": "chr1:130 A>G + chr1:135 C>T", + "reads": "13 of 14" + }, + { + "gene": "G14", + "variants": "chr1:140 A>G + chr1:145 C>T", + "reads": "14 of 15" + }, + { + "gene": "G15", + "variants": "chr1:150 A>G + chr1:155 C>T", + "reads": "15 of 16" + }, + { + "gene": "G16", + "variants": "chr1:160 A>G + chr1:165 C>T", + "reads": "16 of 17" + }, + { + "gene": "G17", + "variants": "chr1:170 A>G + chr1:175 C>T", + "reads": "17 of 18" + }, + { + "gene": "G18", + "variants": "chr1:180 A>G + chr1:185 C>T", + "reads": "18 of 19" + }, + { + "gene": "G19", + "variants": "chr1:190 A>G + chr1:195 C>T", + "reads": "19 of 20" + }, + { + "gene": "G20", + "variants": "chr1:200 A>G + chr1:205 C>T", + "reads": "20 of 21" + } + ] + } + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "not called", + "pypgx": "*1/*2", + "Cyrius": "*1/*2 (not usable: Filter LowQ)" + }, + "agree": null, + "consensus": null, + "probable": { + "diplotype": "*1/*2", + "phenotype": "Normal Metabolizer", + "label": "probable (one caller: pypgx)" + } + } +} diff --git a/tests/parity/golden/summary-collect/cb-nfbad/cb-nfbad.json b/tests/parity/golden/summary-collect/cb-nfbad/cb-nfbad.json new file mode 100644 index 000000000..76b421bcc --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-nfbad/cb-nfbad.json @@ -0,0 +1,433 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": null, + "note": "no VEP output (step 13) in this folder", + "common_af": 0.01 + } + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hom", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [], + "deletions_read": [], + "deletions_not_read": [ + "AnnotSV (step 05): no table", + "step 35's interval table: none", + "step 35's HBA1/HBA2 count: not assessed: S_hba_copy_number.tsv has no status row", + "Parascopy's SMN1 count: not resolved" + ] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_clinical.vcf.gz: Compressed file ended before the end-of-stream marker was reached", + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": null, + "pypgx": null, + "Cyrius": null + }, + "agree": null, + "consensus": null, + "probable": null + } +} diff --git a/tests/parity/golden/summary-collect/cb-notbi/cb-notbi.json b/tests/parity/golden/summary-collect/cb-notbi/cb-notbi.json new file mode 100644 index 000000000..c7668ea8a --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-notbi/cb-notbi.json @@ -0,0 +1,434 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": null, + "note": "vep/S_vep.vcf.gz has no .tbi index", + "common_af": 0.01 + } + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hom", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [], + "deletions_read": [ + "step 35's HBA1/HBA2 count" + ], + "deletions_not_read": [ + "AnnotSV (step 05): no table", + "step 35's interval table: none", + "Parascopy's SMN1 count: not resolved" + ] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": null, + "pypgx": null, + "Cyrius": null + }, + "agree": null, + "consensus": null, + "probable": null + } +} diff --git a/tests/parity/golden/summary-collect/cb-quoted-dosage/cb-quoted-dosage.json b/tests/parity/golden/summary-collect/cb-quoted-dosage/cb-quoted-dosage.json new file mode 100644 index 000000000..86fc5522d --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-quoted-dosage/cb-quoted-dosage.json @@ -0,0 +1,1111 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": true, + "started_utc": "2020-01-01 00:00 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": 0.008, + "gnomad_genome_af": 0.007, + "rsids": [ + "rs113993960" + ], + "af": 0.008, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": 0.06, + "gnomad_genome_af": 0.05, + "rsids": [ + "rs99", + "rs1800562" + ], + "af": 0.06, + "common": true, + "cdna": { + "check": "clean", + "note": "", + "alt_reads": 20, + "alt_clipped": 0, + "ref_reads": 20, + "ref_clipped": 0, + "construct": null + } + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": 0.002, + "gnomad_genome_af": 0.0005, + "rsids": [ + "rs36053993" + ], + "af": 0.002, + "common": false, + "cdna": { + "check": "flagged", + "note": "possible cDNA/transgene contamination: check the reads", + "alt_reads": 12, + "alt_clipped": 6, + "ref_reads": 10, + "ref_clipped": 0, + "construct": "yes" + } + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": 0.03, + "gnomad_genome_af": null, + "rsids": [ + "rs80338939" + ], + "af": 0.03, + "common": true, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": "vep/S_vep.vcf.gz", + "note": null, + "common_af": 0.01 + }, + "cdna_flagged": 1, + "construct_sites": 1, + "cdna_scan": { + "note": "2 genes with spliced reads", + "loci": [ + { + "chrom": "chr1", + "start": 100, + "end": 200, + "junctions": 2, + "reads": 5, + "junction_list": "A:1-2,A:3-4" + } + ] + }, + "deep_intronic": [ + { + "chrom": "chr7", + "pos": 117639961, + "ref": "C", + "alt": "T", + "gene": "CFTR", + "hgvs": "c.3718-2477C>T", + "clinvar_id": "7129", + "call": "no call", + "detail": "" + } + ] + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy", + "hemizygous": "called homozygous inside one SMN1 copy (Parascopy, step 35)" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [ + { + "gene": "CFTR", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "CFTR_del deletion, 1 of 2 copies (read depth, step 35)", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "allele": null, + "condition": "Cystic fibrosis", + "inheritance": "AR" + }, + { + "gene": "GJB2", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "DEL chr13:20180000-20200000 (AnnotSV class 4, Manta)", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "allele": null, + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "inheritance": "AR" + }, + { + "gene": "HBA1", + "verdict": "possibly biallelic", + "why": "phase unknown, possibly in trans (no read-backed phase links the two calls)", + "deletion": "3 of 4 alpha-globin genes (read depth, step 35)", + "variant": "chr16:176700 G>A", + "genotype": "het", + "allele": null, + "condition": "Alpha-thalassemia", + "inheritance": "AR" + }, + { + "gene": "MUTYH", + "verdict": "biallelic", + "why": "in trans: read-backed phase puts them on different copies (phase set 45331000)", + "deletion": "DEL chr1:45338000-45340000 (AnnotSV class 5, Manta)", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "allele": null, + "condition": "MUTYH-related polyposis", + "inheritance": "AR" + }, + { + "gene": "SMN1", + "verdict": "biallelic", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", + "deletion": "one SMN1 copy (Parascopy, step 35)", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "allele": null, + "condition": "Spinal muscular atrophy", + "inheritance": "AR" + } + ], + "deletions_read": [ + "AnnotSV class 4 and 5 deletions (step 05)", + "step 35's interval table (read depth)", + "step 35's HBA1/HBA2 count", + "Parascopy's SMN1 count (step 35)" + ], + "deletions_not_read": [] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "ok", + "source": "pharmcat/S.report.json", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "3.4.0", + "html_report": true + } + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "ok", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes": [ + { + "gene": "CYP2D6", + "diplotype": "*1/*4", + "phenotype": "Intermediate Metabolizer", + "status": "non-normal" + }, + { + "gene": "CYP2C19", + "diplotype": "*1/*17", + "phenotype": "Rapid", + "status": "ambiguous" + }, + { + "gene": "CYP2C9", + "diplotype": "*1/*1", + "phenotype": "Normal", + "status": "normal" + }, + { + "gene": "DPYD", + "diplotype": null, + "phenotype": null, + "status": null + } + ], + "non_normal": 1, + "ambiguous": 1, + "not_called": 0, + "unclassified": 0, + "parse_failed": false, + "warnings": [ + "CYP2C19 has two possible phenotypes", + "last" + ] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "ok", + "source": "pypgx/S_pypgx_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_total": 6, + "genes_called": 3, + "cyp2d6": "*1/*2", + "cnv_call": { + "CYP2D6": "Normal", + "CYP2A6": "not called: pypgx failed", + "CYP2B6": "not called: the CYP2D6 depth check failed", + "SLCO1B1": "not called: pypgx gave no copy-number call" + }, + "not_callable": [ + "CYP2E1" + ], + "low_gq": [ + { + "gene": "UGT1A1", + "diplotype": "Indeterminate", + "min_gq": 12, + "weakest": "chr2:1:A:G" + }, + { + "gene": "SLCO1B1", + "diplotype": "*1/*5", + "min_gq": null, + "weakest": "" + } + ], + "cyp2d6_evidence": { + "phenotype": "Normal Metabolizer", + "defining_filter": "PASS", + "quality": "ok" + }, + "depth_check": { + "status": "ok", + "gene_mapq1_share": "0.99", + "body_mapq20_share": "0.95" + }, + "comparison": { + "conflicts": 1, + "one_tool_only": 2, + "concordant": 1 + } + } + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/S_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "*2/*1", + "filter": "PASS" + } + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "ok", + "source": "cpsr/S.cpsr.grch38.classification.tsv.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "html_report": true, + "classification_column": "CLASSIFICATION", + "classification": { + "Pathogenic": 1, + "Likely_Pathogenic": 1, + "VUS": 1, + "Benign": 1, + ".": 1 + }, + "plp": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "13:32338000 G>A", + "gene": "BRCA2", + "final": "Likely_Pathogenic", + "cpsr": "VUS", + "clinvar": null, + "authority": "CPSR", + "acmg_codes": null, + "dp": 40, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "5:112839000 A>T", + "gene": "APC", + "final": ".", + "cpsr": "Pathogenic", + "clinvar": null, + "authority": null, + "acmg_codes": null, + "dp": 30, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "disagreements": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "final_plp_own_benign": 1, + "own_class_column": "CPSR_CLASSIFICATION", + "low_confidence": 1, + "call_floor_dp": 8, + "cdna_flagged": 1 + } + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "ok", + "source": "clinical/S_clinical_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "variants": 5, + "by_impact": { + "HIGH": 3, + "MODERATE": 1, + ".": 1 + }, + "genes": 3, + "acmg_sf": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "two_hit": "biallelic with DEL chr1:45338000-45340000 (AnnotSV class 5, Manta): in trans: read-backed phase puts them on different copies (phase set 45331000)", + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [ + { + "gene": "MSH2", + "variant": "DEL chr2:47386000-47388000", + "acmg_class": "4", + "caller": "Delly", + "support": 1, + "via": "EPCAM exons 8 and 9, the 3' end (ENST00000263735)", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + }, + { + "gene": "BRCA1", + "variant": "DUP chr17:43000000-43100000", + "acmg_class": "4", + "caller": "CNVpytor", + "support": 1, + "via": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + } + ], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + }, + "frequency_unknown": 1, + "weak_calls": 2 + } + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "ok", + "source": "slivar/S_slivar_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "prioritized": 2, + "frequency_unknown": 1, + "compound_het_variants": 4, + "compound_het_genes": 2, + "compound_het_pairs": 26, + "compound_het_phase": { + "trans": 23, + "cis": 1, + "unknown": 1 + }, + "compound_het_trans": [ + { + "gene": "G1", + "variants": "chr1:10 A>G + chr1:15 C>T", + "reads": "1 of 2" + }, + { + "gene": "G2", + "variants": "chr1:20 A>G + chr1:25 C>T", + "reads": "2 of 3" + }, + { + "gene": "G3", + "variants": "chr1:30 A>G + chr1:35 C>T", + "reads": "3 of 4" + }, + { + "gene": "G4", + "variants": "chr1:40 A>G + chr1:45 C>T", + "reads": "4 of 5" + }, + { + "gene": "G5", + "variants": "chr1:50 A>G + chr1:55 C>T", + "reads": "5 of 6" + }, + { + "gene": "G6", + "variants": "chr1:60 A>G + chr1:65 C>T", + "reads": "6 of 7" + }, + { + "gene": "G7", + "variants": "chr1:70 A>G + chr1:75 C>T", + "reads": "7 of 8" + }, + { + "gene": "G8", + "variants": "chr1:80 A>G + chr1:85 C>T", + "reads": "8 of 9" + }, + { + "gene": "G9", + "variants": "chr1:90 A>G + chr1:95 C>T", + "reads": "9 of 10" + }, + { + "gene": "G10", + "variants": "chr1:100 A>G + chr1:105 C>T", + "reads": "10 of 11" + }, + { + "gene": "G11", + "variants": "chr1:110 A>G + chr1:115 C>T", + "reads": "11 of 12" + }, + { + "gene": "G12", + "variants": "chr1:120 A>G + chr1:125 C>T", + "reads": "12 of 13" + }, + { + "gene": "G13", + "variants": "chr1:130 A>G + chr1:135 C>T", + "reads": "13 of 14" + }, + { + "gene": "G14", + "variants": "chr1:140 A>G + chr1:145 C>T", + "reads": "14 of 15" + }, + { + "gene": "G15", + "variants": "chr1:150 A>G + chr1:155 C>T", + "reads": "15 of 16" + }, + { + "gene": "G16", + "variants": "chr1:160 A>G + chr1:165 C>T", + "reads": "16 of 17" + }, + { + "gene": "G17", + "variants": "chr1:170 A>G + chr1:175 C>T", + "reads": "17 of 18" + }, + { + "gene": "G18", + "variants": "chr1:180 A>G + chr1:185 C>T", + "reads": "18 of 19" + }, + { + "gene": "G19", + "variants": "chr1:190 A>G + chr1:195 C>T", + "reads": "19 of 20" + }, + { + "gene": "G20", + "variants": "chr1:200 A>G + chr1:205 C>T", + "reads": "20 of 21" + } + ] + } + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "*1/*4", + "pypgx": "*1/*2", + "Cyrius": "*2/*1" + }, + "agree": true, + "consensus": { + "result": "*1/*2", + "passed_to_pharmcat": true, + "reason": "pypgx and Cyrius agree", + "source": "pgx_consensus/S_pgx_consensus.tsv" + }, + "probable": null + } +} diff --git a/tests/parity/golden/summary-collect/cb-quoted-interval/cb-quoted-interval.json b/tests/parity/golden/summary-collect/cb-quoted-interval/cb-quoted-interval.json new file mode 100644 index 000000000..86fc5522d --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-quoted-interval/cb-quoted-interval.json @@ -0,0 +1,1111 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": true, + "started_utc": "2020-01-01 00:00 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": 0.008, + "gnomad_genome_af": 0.007, + "rsids": [ + "rs113993960" + ], + "af": 0.008, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": 0.06, + "gnomad_genome_af": 0.05, + "rsids": [ + "rs99", + "rs1800562" + ], + "af": 0.06, + "common": true, + "cdna": { + "check": "clean", + "note": "", + "alt_reads": 20, + "alt_clipped": 0, + "ref_reads": 20, + "ref_clipped": 0, + "construct": null + } + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": 0.002, + "gnomad_genome_af": 0.0005, + "rsids": [ + "rs36053993" + ], + "af": 0.002, + "common": false, + "cdna": { + "check": "flagged", + "note": "possible cDNA/transgene contamination: check the reads", + "alt_reads": 12, + "alt_clipped": 6, + "ref_reads": 10, + "ref_clipped": 0, + "construct": "yes" + } + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": 0.03, + "gnomad_genome_af": null, + "rsids": [ + "rs80338939" + ], + "af": 0.03, + "common": true, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": "vep/S_vep.vcf.gz", + "note": null, + "common_af": 0.01 + }, + "cdna_flagged": 1, + "construct_sites": 1, + "cdna_scan": { + "note": "2 genes with spliced reads", + "loci": [ + { + "chrom": "chr1", + "start": 100, + "end": 200, + "junctions": 2, + "reads": 5, + "junction_list": "A:1-2,A:3-4" + } + ] + }, + "deep_intronic": [ + { + "chrom": "chr7", + "pos": 117639961, + "ref": "C", + "alt": "T", + "gene": "CFTR", + "hgvs": "c.3718-2477C>T", + "clinvar_id": "7129", + "call": "no call", + "detail": "" + } + ] + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy", + "hemizygous": "called homozygous inside one SMN1 copy (Parascopy, step 35)" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [ + { + "gene": "CFTR", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "CFTR_del deletion, 1 of 2 copies (read depth, step 35)", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "allele": null, + "condition": "Cystic fibrosis", + "inheritance": "AR" + }, + { + "gene": "GJB2", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "DEL chr13:20180000-20200000 (AnnotSV class 4, Manta)", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "allele": null, + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "inheritance": "AR" + }, + { + "gene": "HBA1", + "verdict": "possibly biallelic", + "why": "phase unknown, possibly in trans (no read-backed phase links the two calls)", + "deletion": "3 of 4 alpha-globin genes (read depth, step 35)", + "variant": "chr16:176700 G>A", + "genotype": "het", + "allele": null, + "condition": "Alpha-thalassemia", + "inheritance": "AR" + }, + { + "gene": "MUTYH", + "verdict": "biallelic", + "why": "in trans: read-backed phase puts them on different copies (phase set 45331000)", + "deletion": "DEL chr1:45338000-45340000 (AnnotSV class 5, Manta)", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "allele": null, + "condition": "MUTYH-related polyposis", + "inheritance": "AR" + }, + { + "gene": "SMN1", + "verdict": "biallelic", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", + "deletion": "one SMN1 copy (Parascopy, step 35)", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "allele": null, + "condition": "Spinal muscular atrophy", + "inheritance": "AR" + } + ], + "deletions_read": [ + "AnnotSV class 4 and 5 deletions (step 05)", + "step 35's interval table (read depth)", + "step 35's HBA1/HBA2 count", + "Parascopy's SMN1 count (step 35)" + ], + "deletions_not_read": [] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "ok", + "source": "pharmcat/S.report.json", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "3.4.0", + "html_report": true + } + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "ok", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes": [ + { + "gene": "CYP2D6", + "diplotype": "*1/*4", + "phenotype": "Intermediate Metabolizer", + "status": "non-normal" + }, + { + "gene": "CYP2C19", + "diplotype": "*1/*17", + "phenotype": "Rapid", + "status": "ambiguous" + }, + { + "gene": "CYP2C9", + "diplotype": "*1/*1", + "phenotype": "Normal", + "status": "normal" + }, + { + "gene": "DPYD", + "diplotype": null, + "phenotype": null, + "status": null + } + ], + "non_normal": 1, + "ambiguous": 1, + "not_called": 0, + "unclassified": 0, + "parse_failed": false, + "warnings": [ + "CYP2C19 has two possible phenotypes", + "last" + ] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "ok", + "source": "pypgx/S_pypgx_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_total": 6, + "genes_called": 3, + "cyp2d6": "*1/*2", + "cnv_call": { + "CYP2D6": "Normal", + "CYP2A6": "not called: pypgx failed", + "CYP2B6": "not called: the CYP2D6 depth check failed", + "SLCO1B1": "not called: pypgx gave no copy-number call" + }, + "not_callable": [ + "CYP2E1" + ], + "low_gq": [ + { + "gene": "UGT1A1", + "diplotype": "Indeterminate", + "min_gq": 12, + "weakest": "chr2:1:A:G" + }, + { + "gene": "SLCO1B1", + "diplotype": "*1/*5", + "min_gq": null, + "weakest": "" + } + ], + "cyp2d6_evidence": { + "phenotype": "Normal Metabolizer", + "defining_filter": "PASS", + "quality": "ok" + }, + "depth_check": { + "status": "ok", + "gene_mapq1_share": "0.99", + "body_mapq20_share": "0.95" + }, + "comparison": { + "conflicts": 1, + "one_tool_only": 2, + "concordant": 1 + } + } + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/S_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "*2/*1", + "filter": "PASS" + } + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "ok", + "source": "cpsr/S.cpsr.grch38.classification.tsv.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "html_report": true, + "classification_column": "CLASSIFICATION", + "classification": { + "Pathogenic": 1, + "Likely_Pathogenic": 1, + "VUS": 1, + "Benign": 1, + ".": 1 + }, + "plp": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "13:32338000 G>A", + "gene": "BRCA2", + "final": "Likely_Pathogenic", + "cpsr": "VUS", + "clinvar": null, + "authority": "CPSR", + "acmg_codes": null, + "dp": 40, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "5:112839000 A>T", + "gene": "APC", + "final": ".", + "cpsr": "Pathogenic", + "clinvar": null, + "authority": null, + "acmg_codes": null, + "dp": 30, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "disagreements": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "final_plp_own_benign": 1, + "own_class_column": "CPSR_CLASSIFICATION", + "low_confidence": 1, + "call_floor_dp": 8, + "cdna_flagged": 1 + } + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "ok", + "source": "clinical/S_clinical_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "variants": 5, + "by_impact": { + "HIGH": 3, + "MODERATE": 1, + ".": 1 + }, + "genes": 3, + "acmg_sf": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "two_hit": "biallelic with DEL chr1:45338000-45340000 (AnnotSV class 5, Manta): in trans: read-backed phase puts them on different copies (phase set 45331000)", + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [ + { + "gene": "MSH2", + "variant": "DEL chr2:47386000-47388000", + "acmg_class": "4", + "caller": "Delly", + "support": 1, + "via": "EPCAM exons 8 and 9, the 3' end (ENST00000263735)", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + }, + { + "gene": "BRCA1", + "variant": "DUP chr17:43000000-43100000", + "acmg_class": "4", + "caller": "CNVpytor", + "support": 1, + "via": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + } + ], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + }, + "frequency_unknown": 1, + "weak_calls": 2 + } + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "ok", + "source": "slivar/S_slivar_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "prioritized": 2, + "frequency_unknown": 1, + "compound_het_variants": 4, + "compound_het_genes": 2, + "compound_het_pairs": 26, + "compound_het_phase": { + "trans": 23, + "cis": 1, + "unknown": 1 + }, + "compound_het_trans": [ + { + "gene": "G1", + "variants": "chr1:10 A>G + chr1:15 C>T", + "reads": "1 of 2" + }, + { + "gene": "G2", + "variants": "chr1:20 A>G + chr1:25 C>T", + "reads": "2 of 3" + }, + { + "gene": "G3", + "variants": "chr1:30 A>G + chr1:35 C>T", + "reads": "3 of 4" + }, + { + "gene": "G4", + "variants": "chr1:40 A>G + chr1:45 C>T", + "reads": "4 of 5" + }, + { + "gene": "G5", + "variants": "chr1:50 A>G + chr1:55 C>T", + "reads": "5 of 6" + }, + { + "gene": "G6", + "variants": "chr1:60 A>G + chr1:65 C>T", + "reads": "6 of 7" + }, + { + "gene": "G7", + "variants": "chr1:70 A>G + chr1:75 C>T", + "reads": "7 of 8" + }, + { + "gene": "G8", + "variants": "chr1:80 A>G + chr1:85 C>T", + "reads": "8 of 9" + }, + { + "gene": "G9", + "variants": "chr1:90 A>G + chr1:95 C>T", + "reads": "9 of 10" + }, + { + "gene": "G10", + "variants": "chr1:100 A>G + chr1:105 C>T", + "reads": "10 of 11" + }, + { + "gene": "G11", + "variants": "chr1:110 A>G + chr1:115 C>T", + "reads": "11 of 12" + }, + { + "gene": "G12", + "variants": "chr1:120 A>G + chr1:125 C>T", + "reads": "12 of 13" + }, + { + "gene": "G13", + "variants": "chr1:130 A>G + chr1:135 C>T", + "reads": "13 of 14" + }, + { + "gene": "G14", + "variants": "chr1:140 A>G + chr1:145 C>T", + "reads": "14 of 15" + }, + { + "gene": "G15", + "variants": "chr1:150 A>G + chr1:155 C>T", + "reads": "15 of 16" + }, + { + "gene": "G16", + "variants": "chr1:160 A>G + chr1:165 C>T", + "reads": "16 of 17" + }, + { + "gene": "G17", + "variants": "chr1:170 A>G + chr1:175 C>T", + "reads": "17 of 18" + }, + { + "gene": "G18", + "variants": "chr1:180 A>G + chr1:185 C>T", + "reads": "18 of 19" + }, + { + "gene": "G19", + "variants": "chr1:190 A>G + chr1:195 C>T", + "reads": "19 of 20" + }, + { + "gene": "G20", + "variants": "chr1:200 A>G + chr1:205 C>T", + "reads": "20 of 21" + } + ] + } + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "*1/*4", + "pypgx": "*1/*2", + "Cyrius": "*2/*1" + }, + "agree": true, + "consensus": { + "result": "*1/*2", + "passed_to_pharmcat": true, + "reason": "pypgx and Cyrius agree", + "source": "pgx_consensus/S_pgx_consensus.tsv" + }, + "probable": null + } +} diff --git a/tests/parity/golden/summary-collect/cb-quoted-smn/cb-quoted-smn.json b/tests/parity/golden/summary-collect/cb-quoted-smn/cb-quoted-smn.json new file mode 100644 index 000000000..86fc5522d --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-quoted-smn/cb-quoted-smn.json @@ -0,0 +1,1111 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": true, + "started_utc": "2020-01-01 00:00 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": 0.008, + "gnomad_genome_af": 0.007, + "rsids": [ + "rs113993960" + ], + "af": 0.008, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": 0.06, + "gnomad_genome_af": 0.05, + "rsids": [ + "rs99", + "rs1800562" + ], + "af": 0.06, + "common": true, + "cdna": { + "check": "clean", + "note": "", + "alt_reads": 20, + "alt_clipped": 0, + "ref_reads": 20, + "ref_clipped": 0, + "construct": null + } + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": 0.002, + "gnomad_genome_af": 0.0005, + "rsids": [ + "rs36053993" + ], + "af": 0.002, + "common": false, + "cdna": { + "check": "flagged", + "note": "possible cDNA/transgene contamination: check the reads", + "alt_reads": 12, + "alt_clipped": 6, + "ref_reads": 10, + "ref_clipped": 0, + "construct": "yes" + } + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": 0.03, + "gnomad_genome_af": null, + "rsids": [ + "rs80338939" + ], + "af": 0.03, + "common": true, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": "vep/S_vep.vcf.gz", + "note": null, + "common_af": 0.01 + }, + "cdna_flagged": 1, + "construct_sites": 1, + "cdna_scan": { + "note": "2 genes with spliced reads", + "loci": [ + { + "chrom": "chr1", + "start": 100, + "end": 200, + "junctions": 2, + "reads": 5, + "junction_list": "A:1-2,A:3-4" + } + ] + }, + "deep_intronic": [ + { + "chrom": "chr7", + "pos": 117639961, + "ref": "C", + "alt": "T", + "gene": "CFTR", + "hgvs": "c.3718-2477C>T", + "clinvar_id": "7129", + "call": "no call", + "detail": "" + } + ] + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy", + "hemizygous": "called homozygous inside one SMN1 copy (Parascopy, step 35)" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [ + { + "gene": "CFTR", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "CFTR_del deletion, 1 of 2 copies (read depth, step 35)", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "allele": null, + "condition": "Cystic fibrosis", + "inheritance": "AR" + }, + { + "gene": "GJB2", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "DEL chr13:20180000-20200000 (AnnotSV class 4, Manta)", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "allele": null, + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "inheritance": "AR" + }, + { + "gene": "HBA1", + "verdict": "possibly biallelic", + "why": "phase unknown, possibly in trans (no read-backed phase links the two calls)", + "deletion": "3 of 4 alpha-globin genes (read depth, step 35)", + "variant": "chr16:176700 G>A", + "genotype": "het", + "allele": null, + "condition": "Alpha-thalassemia", + "inheritance": "AR" + }, + { + "gene": "MUTYH", + "verdict": "biallelic", + "why": "in trans: read-backed phase puts them on different copies (phase set 45331000)", + "deletion": "DEL chr1:45338000-45340000 (AnnotSV class 5, Manta)", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "allele": null, + "condition": "MUTYH-related polyposis", + "inheritance": "AR" + }, + { + "gene": "SMN1", + "verdict": "biallelic", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", + "deletion": "one SMN1 copy (Parascopy, step 35)", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "allele": null, + "condition": "Spinal muscular atrophy", + "inheritance": "AR" + } + ], + "deletions_read": [ + "AnnotSV class 4 and 5 deletions (step 05)", + "step 35's interval table (read depth)", + "step 35's HBA1/HBA2 count", + "Parascopy's SMN1 count (step 35)" + ], + "deletions_not_read": [] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "ok", + "source": "pharmcat/S.report.json", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "3.4.0", + "html_report": true + } + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "ok", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes": [ + { + "gene": "CYP2D6", + "diplotype": "*1/*4", + "phenotype": "Intermediate Metabolizer", + "status": "non-normal" + }, + { + "gene": "CYP2C19", + "diplotype": "*1/*17", + "phenotype": "Rapid", + "status": "ambiguous" + }, + { + "gene": "CYP2C9", + "diplotype": "*1/*1", + "phenotype": "Normal", + "status": "normal" + }, + { + "gene": "DPYD", + "diplotype": null, + "phenotype": null, + "status": null + } + ], + "non_normal": 1, + "ambiguous": 1, + "not_called": 0, + "unclassified": 0, + "parse_failed": false, + "warnings": [ + "CYP2C19 has two possible phenotypes", + "last" + ] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "ok", + "source": "pypgx/S_pypgx_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_total": 6, + "genes_called": 3, + "cyp2d6": "*1/*2", + "cnv_call": { + "CYP2D6": "Normal", + "CYP2A6": "not called: pypgx failed", + "CYP2B6": "not called: the CYP2D6 depth check failed", + "SLCO1B1": "not called: pypgx gave no copy-number call" + }, + "not_callable": [ + "CYP2E1" + ], + "low_gq": [ + { + "gene": "UGT1A1", + "diplotype": "Indeterminate", + "min_gq": 12, + "weakest": "chr2:1:A:G" + }, + { + "gene": "SLCO1B1", + "diplotype": "*1/*5", + "min_gq": null, + "weakest": "" + } + ], + "cyp2d6_evidence": { + "phenotype": "Normal Metabolizer", + "defining_filter": "PASS", + "quality": "ok" + }, + "depth_check": { + "status": "ok", + "gene_mapq1_share": "0.99", + "body_mapq20_share": "0.95" + }, + "comparison": { + "conflicts": 1, + "one_tool_only": 2, + "concordant": 1 + } + } + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/S_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "*2/*1", + "filter": "PASS" + } + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "ok", + "source": "cpsr/S.cpsr.grch38.classification.tsv.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "html_report": true, + "classification_column": "CLASSIFICATION", + "classification": { + "Pathogenic": 1, + "Likely_Pathogenic": 1, + "VUS": 1, + "Benign": 1, + ".": 1 + }, + "plp": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "13:32338000 G>A", + "gene": "BRCA2", + "final": "Likely_Pathogenic", + "cpsr": "VUS", + "clinvar": null, + "authority": "CPSR", + "acmg_codes": null, + "dp": 40, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "5:112839000 A>T", + "gene": "APC", + "final": ".", + "cpsr": "Pathogenic", + "clinvar": null, + "authority": null, + "acmg_codes": null, + "dp": 30, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "disagreements": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "final_plp_own_benign": 1, + "own_class_column": "CPSR_CLASSIFICATION", + "low_confidence": 1, + "call_floor_dp": 8, + "cdna_flagged": 1 + } + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "ok", + "source": "clinical/S_clinical_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "variants": 5, + "by_impact": { + "HIGH": 3, + "MODERATE": 1, + ".": 1 + }, + "genes": 3, + "acmg_sf": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "two_hit": "biallelic with DEL chr1:45338000-45340000 (AnnotSV class 5, Manta): in trans: read-backed phase puts them on different copies (phase set 45331000)", + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [ + { + "gene": "MSH2", + "variant": "DEL chr2:47386000-47388000", + "acmg_class": "4", + "caller": "Delly", + "support": 1, + "via": "EPCAM exons 8 and 9, the 3' end (ENST00000263735)", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + }, + { + "gene": "BRCA1", + "variant": "DUP chr17:43000000-43100000", + "acmg_class": "4", + "caller": "CNVpytor", + "support": 1, + "via": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + } + ], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + }, + "frequency_unknown": 1, + "weak_calls": 2 + } + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "ok", + "source": "slivar/S_slivar_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "prioritized": 2, + "frequency_unknown": 1, + "compound_het_variants": 4, + "compound_het_genes": 2, + "compound_het_pairs": 26, + "compound_het_phase": { + "trans": 23, + "cis": 1, + "unknown": 1 + }, + "compound_het_trans": [ + { + "gene": "G1", + "variants": "chr1:10 A>G + chr1:15 C>T", + "reads": "1 of 2" + }, + { + "gene": "G2", + "variants": "chr1:20 A>G + chr1:25 C>T", + "reads": "2 of 3" + }, + { + "gene": "G3", + "variants": "chr1:30 A>G + chr1:35 C>T", + "reads": "3 of 4" + }, + { + "gene": "G4", + "variants": "chr1:40 A>G + chr1:45 C>T", + "reads": "4 of 5" + }, + { + "gene": "G5", + "variants": "chr1:50 A>G + chr1:55 C>T", + "reads": "5 of 6" + }, + { + "gene": "G6", + "variants": "chr1:60 A>G + chr1:65 C>T", + "reads": "6 of 7" + }, + { + "gene": "G7", + "variants": "chr1:70 A>G + chr1:75 C>T", + "reads": "7 of 8" + }, + { + "gene": "G8", + "variants": "chr1:80 A>G + chr1:85 C>T", + "reads": "8 of 9" + }, + { + "gene": "G9", + "variants": "chr1:90 A>G + chr1:95 C>T", + "reads": "9 of 10" + }, + { + "gene": "G10", + "variants": "chr1:100 A>G + chr1:105 C>T", + "reads": "10 of 11" + }, + { + "gene": "G11", + "variants": "chr1:110 A>G + chr1:115 C>T", + "reads": "11 of 12" + }, + { + "gene": "G12", + "variants": "chr1:120 A>G + chr1:125 C>T", + "reads": "12 of 13" + }, + { + "gene": "G13", + "variants": "chr1:130 A>G + chr1:135 C>T", + "reads": "13 of 14" + }, + { + "gene": "G14", + "variants": "chr1:140 A>G + chr1:145 C>T", + "reads": "14 of 15" + }, + { + "gene": "G15", + "variants": "chr1:150 A>G + chr1:155 C>T", + "reads": "15 of 16" + }, + { + "gene": "G16", + "variants": "chr1:160 A>G + chr1:165 C>T", + "reads": "16 of 17" + }, + { + "gene": "G17", + "variants": "chr1:170 A>G + chr1:175 C>T", + "reads": "17 of 18" + }, + { + "gene": "G18", + "variants": "chr1:180 A>G + chr1:185 C>T", + "reads": "18 of 19" + }, + { + "gene": "G19", + "variants": "chr1:190 A>G + chr1:195 C>T", + "reads": "19 of 20" + }, + { + "gene": "G20", + "variants": "chr1:200 A>G + chr1:205 C>T", + "reads": "20 of 21" + } + ] + } + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "*1/*4", + "pypgx": "*1/*2", + "Cyrius": "*2/*1" + }, + "agree": true, + "consensus": { + "result": "*1/*2", + "passed_to_pharmcat": true, + "reason": "pypgx and Cyrius agree", + "source": "pgx_consensus/S_pgx_consensus.tsv" + }, + "probable": null + } +} diff --git a/tests/parity/golden/summary-collect/cb-unicode-contig/cb-unicode-contig.json b/tests/parity/golden/summary-collect/cb-unicode-contig/cb-unicode-contig.json new file mode 100644 index 000000000..86fc5522d --- /dev/null +++ b/tests/parity/golden/summary-collect/cb-unicode-contig/cb-unicode-contig.json @@ -0,0 +1,1111 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:00 UTC", + "run": { + "status_file": true, + "started_utc": "2020-01-01 00:00 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "count": 8, + "by_stars": { + "4": 0, + "3": 2, + "2": 3, + "1": 1, + "0": 2 + }, + "hits": [ + { + "stars": 4, + "chrom": "chr7", + "pos": 117559590, + "ref": "ATCT", + "alt": "A", + "genotype": "het", + "gene": "CFTR", + "significance": "Pathogenic", + "review_status": "practice guideline", + "combined_allele": ".", + "dp": 30, + "gq": 15, + "low_confidence": true, + "gnomad_exome_af": 0.008, + "gnomad_genome_af": 0.007, + "rsids": [ + "rs113993960" + ], + "af": 0.008, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr17", + "pos": 43057100, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "BRCA1,NBR2", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "dp": 35, + "gq": 60, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 3, + "chrom": "chr6", + "pos": 26092913, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HFE", + "significance": "Pathogenic", + "review_status": "reviewed by expert panel", + "combined_allele": ".", + "dp": 40, + "gq": 99, + "low_confidence": false, + "gnomad_exome_af": 0.06, + "gnomad_genome_af": 0.05, + "rsids": [ + "rs99", + "rs1800562" + ], + "af": 0.06, + "common": true, + "cdna": { + "check": "clean", + "note": "", + "alt_reads": 20, + "alt_clipped": 0, + "ref_reads": 20, + "ref_clipped": 0, + "construct": null + } + }, + { + "stars": 2, + "chrom": "chr1", + "pos": 45331556, + "ref": "C", + "alt": "T", + "genotype": "het", + "gene": "MUTYH", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 30, + "gq": 50, + "low_confidence": false, + "gnomad_exome_af": 0.002, + "gnomad_genome_af": 0.0005, + "rsids": [ + "rs36053993" + ], + "af": 0.002, + "common": false, + "cdna": { + "check": "flagged", + "note": "possible cDNA/transgene contamination: check the reads", + "alt_reads": 12, + "alt_clipped": 6, + "ref_reads": 10, + "ref_clipped": 0, + "construct": "yes" + } + }, + { + "stars": 2, + "chrom": "chr16", + "pos": 176700, + "ref": "G", + "alt": "A", + "genotype": "het", + "gene": "HBA1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 2, + "chrom": "chr5", + "pos": 70951946, + "ref": "C", + "alt": "T", + "genotype": "hom", + "gene": "SMN1", + "significance": "Pathogenic", + "review_status": "criteria provided, multiple submitters, no conflicts", + "combined_allele": ".", + "dp": 31, + "gq": 45, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr13", + "pos": 20189473, + "ref": "C", + "alt": "T", + "genotype": "one copy, other copy not called ref (1/.)", + "gene": "GJB2", + "significance": "Likely pathogenic", + "review_status": "criteria provided, single submitter", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A", + "dp": 5, + "gq": 40, + "low_confidence": true, + "gnomad_exome_af": 0.03, + "gnomad_genome_af": null, + "rsids": [ + "rs80338939" + ], + "af": 0.03, + "common": true, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 1, + "chrom": "chr3", + "pos": 15645186, + "ref": "G", + "alt": "C", + "genotype": "het", + "gene": "BTD", + "significance": "Pathogenic/Likely pathogenic", + "review_status": "criteria provided, conflicting classifications", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chr2", + "pos": 100, + "ref": "A", + "alt": "G", + "genotype": "het", + "gene": ".", + "significance": ".", + "review_status": ".", + "combined_allele": ".", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "stars": 0, + "chrom": "chrX", + "pos": 101398000, + "ref": "C", + "alt": "T", + "genotype": "1", + "gene": "GLA", + "significance": "Pathogenic", + "review_status": "no assertion criteria provided", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "dp": null, + "gq": null, + "low_confidence": false, + "gnomad_exome_af": null, + "gnomad_genome_af": null, + "rsids": [], + "af": null, + "common": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "low_confidence": 2, + "call_floor": { + "GQ": 20, + "DP": 8 + }, + "frequency": { + "source": "vep/S_vep.vcf.gz", + "note": null, + "common_af": 0.01 + }, + "cdna_flagged": 1, + "construct_sites": 1, + "cdna_scan": { + "note": "2 genes with spliced reads", + "loci": [ + { + "chrom": "chr1", + "start": 100, + "end": 200, + "junctions": 2, + "reads": 5, + "junction_list": "A:1-2,A:3-4" + } + ] + }, + "deep_intronic": [ + { + "chrom": "chr7", + "pos": 117639961, + "ref": "C", + "alt": "T", + "gene": "CFTR", + "hgvs": "c.3718-2477C>T", + "clinvar_id": "7129", + "call": "no call", + "detail": "" + } + ] + } + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_on_list": 3292, + "list": "assets/carrier_genes.tsv", + "carriers": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "MUTYH-related polyposis" + }, + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Symptomatic form of HFE-related hemochromatosis" + }, + { + "gene": "CFTR", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 4, + "inheritance": "AR", + "condition": "Cystic fibrosis" + }, + { + "gene": "GJB2", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "significance": "Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "combined_allele": "combined allele of chr13:20189473 C>T + chr13:20189475 G>A" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "inheritance": "AR", + "condition": "Fanconi anemia", + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes" + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 0, + "inheritance": "XL", + "condition": "Fabry disease", + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record" + }, + { + "gene": "HBA1", + "variant": "chr16:176700 G>A", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Alpha-thalassemia" + }, + { + "gene": "SMN1", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "significance": "Pathogenic", + "stars": 2, + "inheritance": "AR", + "condition": "Spinal muscular atrophy", + "hemizygous": "called homozygous inside one SMN1 copy (Parascopy, step 35)" + } + ], + "set_aside": [ + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "significance": "Pathogenic/Likely pathogenic", + "stars": 1, + "inheritance": "AR", + "condition": "Biotinidase deficiency", + "kind": "hypomorph", + "name": "p.Asp444His (p.Asp424His on NM_001370658.1), partial biotinidase deficiency" + } + ], + "two_hits": { + "genes": [ + { + "gene": "CFTR", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "CFTR_del deletion, 1 of 2 copies (read depth, step 35)", + "variant": "chr7:117559590 ATCT>A", + "genotype": "het", + "allele": null, + "condition": "Cystic fibrosis", + "inheritance": "AR" + }, + { + "gene": "GJB2", + "verdict": "possibly biallelic", + "why": "a heterozygous call inside a called deletion: one of the two calls may be wrong; check the reads", + "deletion": "DEL chr13:20180000-20200000 (AnnotSV class 4, Manta)", + "variant": "chr13:20189473 C>T", + "genotype": "one copy, other copy not called ref (1/.)", + "allele": null, + "condition": "Nonsyndromic hearing loss, recessive (DFNB1A)", + "inheritance": "AR" + }, + { + "gene": "HBA1", + "verdict": "possibly biallelic", + "why": "phase unknown, possibly in trans (no read-backed phase links the two calls)", + "deletion": "3 of 4 alpha-globin genes (read depth, step 35)", + "variant": "chr16:176700 G>A", + "genotype": "het", + "allele": null, + "condition": "Alpha-thalassemia", + "inheritance": "AR" + }, + { + "gene": "MUTYH", + "verdict": "biallelic", + "why": "in trans: read-backed phase puts them on different copies (phase set 45331000)", + "deletion": "DEL chr1:45338000-45340000 (AnnotSV class 5, Manta)", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "allele": null, + "condition": "MUTYH-related polyposis", + "inheritance": "AR" + }, + { + "gene": "SMN1", + "verdict": "biallelic", + "why": "the variant is called homozygous inside the deletion: hemizygous on the copy the deletion leaves if the deletion is real, homozygous if not; both copies carry it either way", + "deletion": "one SMN1 copy (Parascopy, step 35)", + "variant": "chr5:70951946 C>T", + "genotype": "hemizygous", + "allele": null, + "condition": "Spinal muscular atrophy", + "inheritance": "AR" + } + ], + "deletions_read": [ + "AnnotSV class 4 and 5 deletions (step 05)", + "step 35's interval table (read depth)", + "step 35's HBA1/HBA2 count", + "Parascopy's SMN1 count (step 35)" + ], + "deletions_not_read": [] + } + } + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "ok", + "source": "pharmcat/S.report.json", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "3.4.0", + "html_report": true + } + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "ok", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes": [ + { + "gene": "CYP2D6", + "diplotype": "*1/*4", + "phenotype": "Intermediate Metabolizer", + "status": "non-normal" + }, + { + "gene": "CYP2C19", + "diplotype": "*1/*17", + "phenotype": "Rapid", + "status": "ambiguous" + }, + { + "gene": "CYP2C9", + "diplotype": "*1/*1", + "phenotype": "Normal", + "status": "normal" + }, + { + "gene": "DPYD", + "diplotype": null, + "phenotype": null, + "status": null + } + ], + "non_normal": 1, + "ambiguous": 1, + "not_called": 0, + "unclassified": 0, + "parse_failed": false, + "warnings": [ + "CYP2C19 has two possible phenotypes", + "last" + ] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "ok", + "source": "pypgx/S_pypgx_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes_total": 6, + "genes_called": 3, + "cyp2d6": "*1/*2", + "cnv_call": { + "CYP2D6": "Normal", + "CYP2A6": "not called: pypgx failed", + "CYP2B6": "not called: the CYP2D6 depth check failed", + "SLCO1B1": "not called: pypgx gave no copy-number call" + }, + "not_callable": [ + "CYP2E1" + ], + "low_gq": [ + { + "gene": "UGT1A1", + "diplotype": "Indeterminate", + "min_gq": 12, + "weakest": "chr2:1:A:G" + }, + { + "gene": "SLCO1B1", + "diplotype": "*1/*5", + "min_gq": null, + "weakest": "" + } + ], + "cyp2d6_evidence": { + "phenotype": "Normal Metabolizer", + "defining_filter": "PASS", + "quality": "ok" + }, + "depth_check": { + "status": "ok", + "gene_mapq1_share": "0.99", + "body_mapq20_share": "0.95" + }, + "comparison": { + "conflicts": 1, + "one_tool_only": 2, + "concordant": 1 + } + } + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/S_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "*2/*1", + "filter": "PASS" + } + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "ok", + "source": "cpsr/S.cpsr.grch38.classification.tsv.gz", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "html_report": true, + "classification_column": "CLASSIFICATION", + "classification": { + "Pathogenic": 1, + "Likely_Pathogenic": 1, + "VUS": 1, + "Benign": 1, + ".": 1 + }, + "plp": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "13:32338000 G>A", + "gene": "BRCA2", + "final": "Likely_Pathogenic", + "cpsr": "VUS", + "clinvar": null, + "authority": "CPSR", + "acmg_codes": null, + "dp": 40, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + }, + { + "variant": "5:112839000 A>T", + "gene": "APC", + "final": ".", + "cpsr": "Pathogenic", + "clinvar": null, + "authority": null, + "acmg_codes": null, + "dp": 30, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "disagreements": [ + { + "variant": "17:43057100 C>T", + "gene": "BRCA1", + "final": "Pathogenic", + "cpsr": "Likely_Benign", + "clinvar": "Pathogenic", + "authority": "ClinVar", + "acmg_codes": "PVS1", + "dp": 6, + "low_confidence": true, + "cdna": { + "check": "flagged", + "note": "splice", + "alt_reads": 5, + "alt_clipped": 5, + "ref_reads": 9, + "ref_clipped": 0, + "construct": null + } + }, + { + "variant": "2:47403000 A>G", + "gene": "MSH2", + "final": "VUS", + "cpsr": "LP", + "clinvar": "B", + "authority": null, + "acmg_codes": null, + "dp": null, + "low_confidence": false, + "cdna": { + "check": "not_checked", + "note": "not in the read-check table", + "alt_reads": null, + "alt_clipped": null, + "ref_reads": null, + "ref_clipped": null + } + } + ], + "final_plp_own_benign": 1, + "own_class_column": "CPSR_CLASSIFICATION", + "low_confidence": 1, + "call_floor_dp": 8, + "cdna_flagged": 1 + } + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "ok", + "source": "clinical/S_clinical_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "variants": 5, + "by_impact": { + "HIGH": 3, + "MODERATE": 1, + ".": 1 + }, + "genes": 3, + "acmg_sf": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "two_hit": "biallelic with DEL chr1:45338000-45340000 (AnnotSV class 5, Manta): in trans: read-backed phase puts them on different copies (phase set 45331000)", + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [ + { + "gene": "MSH2", + "variant": "DEL chr2:47386000-47388000", + "acmg_class": "4", + "caller": "Delly", + "support": 1, + "via": "EPCAM exons 8 and 9, the 3' end (ENST00000263735)", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + }, + { + "gene": "BRCA1", + "variant": "DUP chr17:43000000-43100000", + "acmg_class": "4", + "caller": "CNVpytor", + "support": 1, + "via": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + } + ], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + }, + "frequency_unknown": 1, + "weak_calls": 2 + } + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "ok", + "source": "slivar/S_slivar_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "prioritized": 2, + "frequency_unknown": 1, + "compound_het_variants": 4, + "compound_het_genes": 2, + "compound_het_pairs": 26, + "compound_het_phase": { + "trans": 23, + "cis": 1, + "unknown": 1 + }, + "compound_het_trans": [ + { + "gene": "G1", + "variants": "chr1:10 A>G + chr1:15 C>T", + "reads": "1 of 2" + }, + { + "gene": "G2", + "variants": "chr1:20 A>G + chr1:25 C>T", + "reads": "2 of 3" + }, + { + "gene": "G3", + "variants": "chr1:30 A>G + chr1:35 C>T", + "reads": "3 of 4" + }, + { + "gene": "G4", + "variants": "chr1:40 A>G + chr1:45 C>T", + "reads": "4 of 5" + }, + { + "gene": "G5", + "variants": "chr1:50 A>G + chr1:55 C>T", + "reads": "5 of 6" + }, + { + "gene": "G6", + "variants": "chr1:60 A>G + chr1:65 C>T", + "reads": "6 of 7" + }, + { + "gene": "G7", + "variants": "chr1:70 A>G + chr1:75 C>T", + "reads": "7 of 8" + }, + { + "gene": "G8", + "variants": "chr1:80 A>G + chr1:85 C>T", + "reads": "8 of 9" + }, + { + "gene": "G9", + "variants": "chr1:90 A>G + chr1:95 C>T", + "reads": "9 of 10" + }, + { + "gene": "G10", + "variants": "chr1:100 A>G + chr1:105 C>T", + "reads": "10 of 11" + }, + { + "gene": "G11", + "variants": "chr1:110 A>G + chr1:115 C>T", + "reads": "11 of 12" + }, + { + "gene": "G12", + "variants": "chr1:120 A>G + chr1:125 C>T", + "reads": "12 of 13" + }, + { + "gene": "G13", + "variants": "chr1:130 A>G + chr1:135 C>T", + "reads": "13 of 14" + }, + { + "gene": "G14", + "variants": "chr1:140 A>G + chr1:145 C>T", + "reads": "14 of 15" + }, + { + "gene": "G15", + "variants": "chr1:150 A>G + chr1:155 C>T", + "reads": "15 of 16" + }, + { + "gene": "G16", + "variants": "chr1:160 A>G + chr1:165 C>T", + "reads": "16 of 17" + }, + { + "gene": "G17", + "variants": "chr1:170 A>G + chr1:175 C>T", + "reads": "17 of 18" + }, + { + "gene": "G18", + "variants": "chr1:180 A>G + chr1:185 C>T", + "reads": "18 of 19" + }, + { + "gene": "G19", + "variants": "chr1:190 A>G + chr1:195 C>T", + "reads": "19 of 20" + }, + { + "gene": "G20", + "variants": "chr1:200 A>G + chr1:205 C>T", + "reads": "20 of 21" + } + ] + } + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "*1/*4", + "pypgx": "*1/*2", + "Cyrius": "*2/*1" + }, + "agree": true, + "consensus": { + "result": "*1/*2", + "passed_to_pharmcat": true, + "reason": "pypgx and Cyrius agree", + "source": "pgx_consensus/S_pgx_consensus.tsv" + }, + "probable": null + } +} From 1100d0bab77f33c7de4e7cefb4482a4cb47da7d1 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:24:32 +0100 Subject: [PATCH 085/110] fix(bloodtype): mark calls under GQ 20 or DP 8 as weak and keep their phase A present genotype was used whatever its quality. The reader now marks a call with GQ under 20 or DP (else MIN_DP) under 8 as weak, keeping its genotype, and keeps the haplotype of the marker's ALT and the phase set of a phased call, for the rules to use. Bead: trait-31 Bead: D10 --- rust/crates/og-bloodtype/src/genotypes.rs | 184 +++++++++++++++++++++- 1 file changed, 181 insertions(+), 3 deletions(-) diff --git a/rust/crates/og-bloodtype/src/genotypes.rs b/rust/crates/og-bloodtype/src/genotypes.rs index f2506464b..d3c4809ef 100644 --- a/rust/crates/og-bloodtype/src/genotypes.rs +++ b/rust/crates/og-bloodtype/src/genotypes.rs @@ -27,6 +27,12 @@ //! - a reference-only record whose REF is shorter than the marker's (an //! all-sites record or a gVCF block starting at a deletion marker) says //! nothing past its own bases, so the site reads as if it had no record. +//! +//! A call keeps its genotype whatever its quality, but one with a genotype +//! quality under [`MIN_GQ`] or a read depth under [`MIN_DEPTH`] (FORMAT `GQ`, +//! and `DP`, else a gVCF block's `MIN_DP`) is marked weak: the rules then give +//! the systems that use it confidence low. A phased call (`0|1`) keeps the +//! haplotype that carries the marker's ALT, and its phase set (`PS`). use crate::Error; use crate::markers::{Marker, Sites}; @@ -34,9 +40,13 @@ use indexmap::IndexMap; use std::collections::{BTreeMap, HashMap}; use std::path::Path; -/// Reads (MAPQ >= 20) before a site missing from the VCF counts as reference. +/// Reads (MAPQ >= 20) before a site missing from the VCF counts as reference, +/// and the read depth (FORMAT `DP`) under which a call is weak. pub const MIN_DEPTH: f64 = 8.0; +/// The genotype quality (FORMAT `GQ`) under which a call is weak. +pub const MIN_GQ: f64 = 20.0; + /// What is known at one site. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Status { @@ -68,6 +78,15 @@ impl Status { } } +/// The phase of a call: which of its two haplotypes carries the marker's +/// ALT (`0|1` is `[false, true]`), and its phase set (`PS`), `None` when the +/// record gives none (then the call is phased with the whole chromosome). +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Phase { + pub alt_on: [bool; 2], + pub block: Option, +} + /// What the VCF and the reads say at one site: status, alt copies (`None` /// when not known), read depth, note. #[derive(Debug, Clone, PartialEq)] @@ -77,6 +96,10 @@ pub struct Site { pub n: Option, pub depth: Option, pub note: String, + /// Why the call is weak (`GQ 5 under 20`), empty when it is not. + pub weak: String, + /// The phase of the call, when the VCF gives one. + pub phase: Option, } impl Site { @@ -87,6 +110,8 @@ impl Site { n: None, depth: None, note: String::new(), + weak: String::new(), + phase: None, } } } @@ -178,6 +203,9 @@ struct Reading { note: String, /// Called marker ALTs and their dosages, independent of VCF allele indices. alts: BTreeMap, + /// Why the call is weak, empty when it is not. + weak: String, + phase: Option, } impl Reading { @@ -188,10 +216,68 @@ impl Reading { n: None, note, alts: BTreeMap::new(), + weak: String::new(), + phase: None, } } } +/// The sample's FORMAT values a call's quality and phase come from. +#[derive(Debug, Clone, Default, PartialEq)] +struct Quality { + /// `GQ`, as written and as read. + gq: Option<(String, f64)>, + /// `DP`, else `MIN_DP`, as written and as read. + dp: Option<(String, f64)>, + /// The genotype is written with `|`. + phased: bool, + /// `PS`, when given and not `.`. + ps: Option, +} + +impl Quality { + /// The quality of the sample column `smp` under the keys `fmt`. + fn of(fmt: &[&str], smp: &[&str], gt: &str) -> Quality { + let get = |key: &str| { + fmt.iter() + .position(|k| *k == key) + .and_then(|i| smp.get(i)) + .copied() + .filter(|v| !v.is_empty() && *v != ".") + }; + let num = |key: &str| { + get(key).and_then(|v| { + pycompat::num::parse_float(v) + .ok() + .filter(|x| x.is_finite()) + .map(|x| (v.to_owned(), x)) + }) + }; + Quality { + gq: num("GQ"), + dp: num("DP").or_else(|| num("MIN_DP")), + phased: gt.contains('|') && !gt.contains('/'), + ps: get("PS").map(str::to_owned), + } + } + + /// Why a call with this quality is weak, empty when it is not. + fn weak(&self) -> String { + let mut why = Vec::new(); + if let Some((raw, gq)) = &self.gq + && *gq < MIN_GQ + { + why.push(format!("GQ {raw} under {}", MIN_GQ as i64)); + } + if let Some((raw, dp)) = &self.dp + && *dp < MIN_DEPTH + { + why.push(format!("DP {raw} under {}", MIN_DEPTH as i64)); + } + why.join(", ") + } +} + /// Everything the records said about one site so far. #[derive(Debug, Default)] struct Evidence { @@ -205,10 +291,15 @@ struct Evidence { alts: BTreeMap, /// Different calls of one ALT disagree about its dosage. incompatible: bool, + /// Why the first weak call of a marker ALT is weak. + alt_weak: Option, } impl Evidence { fn add(&mut self, r: Reading) { + if !r.alts.is_empty() && !r.weak.is_empty() && self.alt_weak.is_none() { + self.alt_weak = Some(r.weak.clone()); + } for (alt, &copies) in &r.alts { match self.alts.get(alt) { Some(&previous) if previous != copies => self.incompatible = true, @@ -255,6 +346,19 @@ impl Evidence { } else { b.n }; + // The copies of an ALT may come from several records: the call + // is weak when any of them is, and its phase is the record's only + // when one ALT was called. + site.weak = if b.weight == Weight::Alt && b.weak.is_empty() { + self.alt_weak.clone().unwrap_or_default() + } else { + b.weak.clone() + }; + site.phase = if b.weight == Weight::Alt && self.alts.len() == 1 { + b.phase.clone() + } else { + None + }; site.note = if b.status == Status::Called { let others = self.others.into_iter().filter(|o| *o != b.note); std::iter::once(b.note.clone()) @@ -318,10 +422,11 @@ fn apply_record( .copied() .unwrap_or("."); let alleles: Vec<&str> = gt.split(['/', '|']).collect(); + let quality = Quality::of(&fmt, &smp, gt); for (&at, names) in hits { if at == p { for &i in names { - if let Some(r) = read_record(&sites[i].row, rf, &alts, filt, &alleles) { + if let Some(r) = read_record(&sites[i].row, rf, &alts, filt, &alleles, &quality) { ev[i].add(r); } } @@ -368,6 +473,7 @@ fn read_record( alts: &[&str], filt: &str, alleles: &[&str], + quality: &Quality, ) -> Option { // A null row may list several ALTs (null alleles at one position): any of them counts. let wants: Vec<&str> = if r.ref_ == rf { @@ -433,6 +539,10 @@ fn read_record( } else { String::new() }; + let phase = quality.phased.then(|| Phase { + alt_on: [0, 1].map(|h| idx.iter().any(|i| i == alleles[h])), + block: quality.ps.clone(), + }); Some(Reading { weight: if n > 0 { Weight::Alt @@ -443,6 +553,8 @@ fn read_record( n: Some(n), note, alts: called_alts, + weak: quality.weak(), + phase, }) } @@ -658,7 +770,7 @@ mod tests { fn records(s: &mut Site, recs: &[Rec]) { let mut e = Evidence::default(); for (rf, alts, filt, alleles) in recs { - if let Some(r) = read_record(&s.row, rf, alts, filt, alleles) { + if let Some(r) = read_record(&s.row, rf, alts, filt, alleles, &Quality::default()) { e.add(r); } } @@ -793,6 +905,72 @@ mod tests { assert!(!changes_base("CG", &["C"], &[".", "."], 1)); } + /// The site as one record with these FORMAT keys and values leaves it. + fn with_format(r: &str, alt: &str, alleles: &[&str], fmt: &[&str], smp: &[&str]) -> Site { + let mut s = site(r, alt); + let mut e = Evidence::default(); + let q = Quality::of(fmt, smp, smp[0]); + if let Some(rd) = read_record(&s.row, r, &[alt], "PASS", alleles, &q) { + e.add(rd); + } + e.settle(&mut s); + s + } + + #[test] + fn a_call_under_the_gq_or_dp_floor_is_weak_and_keeps_its_genotype() { + let gt = |g: &str| g.split(['/', '|']).map(str::to_owned).collect::>(); + for (fmt, smp, want) in [ + ( + &["GT", "GQ", "DP"][..], + &["0/1", "0", "1"][..], + "GQ 0 under 20, DP 1 under 8", + ), + (&["GT", "GQ", "DP"], &["0/1", "19", "30"], "GQ 19 under 20"), + (&["GT", "GQ", "DP"], &["0/1", "20", "8"], ""), + (&["GT", "GQ", "MIN_DP"], &["0/1", "50", "3"], "DP 3 under 8"), + (&["GT", "DP", "MIN_DP"], &["0/1", "30", "3"], ""), + (&["GT", "GQ", "DP"], &["0/1", ".", "."], ""), + (&["GT"], &["0/1"], ""), + ] { + let a = gt(smp[0]); + let alleles: Vec<&str> = a.iter().map(String::as_str).collect(); + let s = with_format("G", "A", &alleles, fmt, smp); + assert_eq!( + (s.status, s.n, s.weak.as_str()), + (Status::Called, Some(1), want), + "{smp:?}" + ); + } + // A weak reference call is weak too; a no call is not marked. + let s = with_format("G", "A", &["0", "0"], &["GT", "GQ"], &["0/0", "3"]); + assert_eq!((s.n, s.weak.as_str()), (Some(0), "GQ 3 under 20")); + let s = with_format("G", "A", &[".", "."], &["GT", "GQ"], &["./.", "3"]); + assert_eq!((s.status, s.weak.as_str()), (Status::NoCall, "")); + } + + #[test] + fn a_phased_call_keeps_the_haplotype_of_the_alt() { + let s = with_format("G", "A", &["0", "1"], &["GT", "PS"], &["0|1", "100"]); + assert_eq!( + s.phase, + Some(Phase { + alt_on: [false, true], + block: Some("100".to_owned()) + }) + ); + let s = with_format("G", "A", &["1", "0"], &["GT", "PS"], &["1|0", "."]); + assert_eq!( + s.phase, + Some(Phase { + alt_on: [true, false], + block: None + }) + ); + let s = with_format("G", "A", &["0", "1"], &["GT"], &["0/1"]); + assert_eq!(s.phase, None); + } + #[test] fn depth_decides_a_site_with_no_record() { let mut g: Genotyped = IndexMap::new(); From 017ef8756f6215428709e7337358a9ce3c61fc27 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:24:32 +0100 Subject: [PATCH 086/110] fix(bloodtype): lower confidence for weak calls and stop reading a missing chr9 as type O A weak call gives its system confidence low and is named in the note. Without a BAM, a system with no VCF record at any of its sites reads not assessed instead of the reference phenotype at confidence medium. Duffy places a GATA box phased with one Fyb on the chromosome the VCF gives. An ABO A allele reads low, since no variant shows it. The ABO, RhD and null-row notes say what the DNA cannot check. The bloodtype parity goldens record these changes on purpose. Bead: trait-31 Bead: trait-28 Bead: trait-32 Bead: trait-33 Bead: trait-35 Bead: trait-36 Bead: trait-37 Bead: D10 --- rust/crates/og-bloodtype/src/rules.rs | 142 +++++++++++++++-- .../tests/port_tests_cn_traits.rs | 19 +-- rust/crates/og-bloodtype/tests/report.rs | 143 +++++++++++++++++- .../abo-ab-duffy-gata-kell-null/stdout | 56 +++++++ .../abo-ab-duffy-gata-kell-null/t.tsv | 56 +++++++ .../golden/bloodtype/abo-ab-no-bam/stdout | 56 +++++++ .../golden/bloodtype/abo-ab-no-bam/t.tsv | 56 +++++++ .../bloodtype/abo-bad-para-bombay-lan/t.tsv | 56 +++++++ .../abo-odd-fyx-kidd-two-nulls/t.tsv | 56 +++++++ .../bloodtype/bam-without-chr1-chr9/t.tsv | 56 +++++++ .../bloodtype/bgzip-no-index-abo/stdout | 56 +++++++ .../golden/bloodtype/bgzip-no-index-abo/t.tsv | 56 +++++++ .../golden/bloodtype/bombay-null-null/t.tsv | 56 +++++++ .../golden/bloodtype/gvcf-hna-disagree/t.tsv | 56 +++++++ tests/parity/golden/bloodtype/hna1c/t.tsv | 56 +++++++ .../golden/bloodtype/indexed-abo/stdout | 56 +++++++ .../parity/golden/bloodtype/indexed-abo/t.tsv | 56 +++++++ .../golden/bloodtype/indexed-blocks/t.tsv | 56 +++++++ .../golden/bloodtype/indexed-bombay/t.tsv | 56 +++++++ .../golden/bloodtype/indexed-gvcf/t.tsv | 56 +++++++ .../golden/bloodtype/indexed-nochr/stdout | 56 +++++++ .../golden/bloodtype/indexed-nochr/t.tsv | 56 +++++++ .../golden/bloodtype/indexed-vcf-quirks/t.tsv | 56 +++++++ .../golden/bloodtype/low-site-depth/t.tsv | 56 +++++++ .../golden/bloodtype/plain-nochr/stdout | 56 +++++++ .../parity/golden/bloodtype/plain-nochr/t.tsv | 56 +++++++ .../bloodtype/pseudogene-one-copy/stdout | 56 +++++++ .../bloodtype/pseudogene-one-copy/t.tsv | 56 +++++++ .../bloodtype/ref-blocks-second-record/t.tsv | 56 +++++++ .../parity/golden/bloodtype/ref-no-bam/stdout | 56 +++++++ .../parity/golden/bloodtype/ref-no-bam/t.tsv | 56 +++++++ tests/parity/golden/bloodtype/ref-reads/t.tsv | 56 +++++++ .../golden/bloodtype/rhd-boundary/t.tsv | 56 +++++++ .../golden/bloodtype/rhd-broken-flank/t.tsv | 56 +++++++ .../parity/golden/bloodtype/rhd-hybrid/t.tsv | 56 +++++++ .../golden/bloodtype/rhd-low-flank/t.tsv | 56 +++++++ tests/parity/golden/bloodtype/rhd-none/t.tsv | 56 +++++++ tests/parity/golden/bloodtype/rhd-one/t.tsv | 56 +++++++ tests/parity/golden/bloodtype/rhd-three/t.tsv | 56 +++++++ .../parity/golden/bloodtype/vcf-quirks/t.tsv | 56 +++++++ 40 files changed, 2348 insertions(+), 28 deletions(-) create mode 100644 tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/stdout create mode 100644 tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/t.tsv create mode 100644 tests/parity/golden/bloodtype/abo-ab-no-bam/stdout create mode 100644 tests/parity/golden/bloodtype/abo-ab-no-bam/t.tsv create mode 100644 tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv create mode 100644 tests/parity/golden/bloodtype/abo-odd-fyx-kidd-two-nulls/t.tsv create mode 100644 tests/parity/golden/bloodtype/bam-without-chr1-chr9/t.tsv create mode 100644 tests/parity/golden/bloodtype/bgzip-no-index-abo/stdout create mode 100644 tests/parity/golden/bloodtype/bgzip-no-index-abo/t.tsv create mode 100644 tests/parity/golden/bloodtype/bombay-null-null/t.tsv create mode 100644 tests/parity/golden/bloodtype/gvcf-hna-disagree/t.tsv create mode 100644 tests/parity/golden/bloodtype/hna1c/t.tsv create mode 100644 tests/parity/golden/bloodtype/indexed-abo/stdout create mode 100644 tests/parity/golden/bloodtype/indexed-abo/t.tsv create mode 100644 tests/parity/golden/bloodtype/indexed-blocks/t.tsv create mode 100644 tests/parity/golden/bloodtype/indexed-bombay/t.tsv create mode 100644 tests/parity/golden/bloodtype/indexed-gvcf/t.tsv create mode 100644 tests/parity/golden/bloodtype/indexed-nochr/stdout create mode 100644 tests/parity/golden/bloodtype/indexed-nochr/t.tsv create mode 100644 tests/parity/golden/bloodtype/indexed-vcf-quirks/t.tsv create mode 100644 tests/parity/golden/bloodtype/low-site-depth/t.tsv create mode 100644 tests/parity/golden/bloodtype/plain-nochr/stdout create mode 100644 tests/parity/golden/bloodtype/plain-nochr/t.tsv create mode 100644 tests/parity/golden/bloodtype/pseudogene-one-copy/stdout create mode 100644 tests/parity/golden/bloodtype/pseudogene-one-copy/t.tsv create mode 100644 tests/parity/golden/bloodtype/ref-blocks-second-record/t.tsv create mode 100644 tests/parity/golden/bloodtype/ref-no-bam/stdout create mode 100644 tests/parity/golden/bloodtype/ref-no-bam/t.tsv create mode 100644 tests/parity/golden/bloodtype/ref-reads/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-boundary/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-broken-flank/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-hybrid/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-low-flank/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-none/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-one/t.tsv create mode 100644 tests/parity/golden/bloodtype/rhd-three/t.tsv create mode 100644 tests/parity/golden/bloodtype/vcf-quirks/t.tsv diff --git a/rust/crates/og-bloodtype/src/rules.rs b/rust/crates/og-bloodtype/src/rules.rs index c1f8c654a..f7bf85e2c 100644 --- a/rust/crates/og-bloodtype/src/rules.rs +++ b/rust/crates/og-bloodtype/src/rules.rs @@ -1,11 +1,17 @@ //! The rules: from the sites to one row per blood group system. //! -//! Phase is not read: two variants of one system are placed on the -//! chromosomes the common alleles carry them on, and the note says so. +//! Phase is read for Duffy only: a GATA box phased with c.125G>A in one +//! phase set goes on the chromosome the VCF puts it on. Elsewhere two +//! variants of one system are placed on the chromosomes the common alleles +//! carry them on, and the note says so. //! Confidence: high (every site called or covered by reads), medium (a site //! read as reference with no depth to confirm it, or a null row of the //! system not determined), low (a site in a region where short reads are -//! unreliable, named in the note, or markers that disagree), not determined. +//! unreliable, named in the note, markers that disagree, a weak call (GQ +//! under 20 or DP under 8), or an ABO A allele, which is read from the +//! absence of the O and B variants), not determined. Without a BAM, a +//! system with no VCF record at any of its sites is not assessed: a VCF +//! that does not cover the gene would otherwise read as the reference. use crate::Error; use crate::genotypes::{Genotyped, Site, Status}; @@ -19,6 +25,10 @@ use std::sync::LazyLock; /// The exons an RHD-CE(3-7)-D hybrid takes from RHCE. pub const RHD_HYBRID_EXONS: [i64; 5] = [3, 4, 5, 6, 7]; pub const NOT_DETERMINED: &str = "not determined"; +pub const NOT_ASSESSED: &str = "not assessed"; + +/// The note of a system read from null rows, while the antigen reads present. +const NULL_LIMIT: &str = "a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen"; /// A two-allele site: its label and its phenotype template, where /// `{antigen}` is replaced by `+` or `-`. The antigen names are the marker @@ -297,6 +307,10 @@ impl Row { Row::new(system, NOT_DETERMINED, ".", NOT_DETERMINED, note) } + fn not_assessed(system: &str, note: impl Into) -> Row { + Row::new(system, NOT_ASSESSED, ".", NOT_ASSESSED, note) + } + fn add_note(&mut self, part: &str) { self.note = join_parts([self.note.as_str(), part]); } @@ -333,14 +347,14 @@ fn is_stray(s: &Site) -> bool { s.note.starts_with("another allele") } -/// Confidence from the sites a call used: low for a caveat or a stray -/// allele, medium for a site read as reference without depth, else high. -/// Another ALT at a null row's position is not that null allele and leaves -/// the antigens read, so it is only named in the note. +/// Confidence from the sites a call used: low for a caveat, a stray +/// allele or a weak call, medium for a site read as reference without +/// depth, else high. Another ALT at a null row's position is not that null +/// allele and leaves the antigens read, so it is only named in the note. fn level_of(used: &[&Site]) -> &'static str { let mut lv = "high"; for s in used { - if !s.row.caveat.is_empty() || (is_stray(s) && !s.row.is_null()) { + if !s.row.caveat.is_empty() || (is_stray(s) && !s.row.is_null()) || !s.weak.is_empty() { return "low"; } if s.status == Status::Assumed { @@ -359,6 +373,9 @@ fn notes_of(used: &[&Site], extra: Vec) -> String { if is_stray(s) { out.push(format!("{}: {}", s.row.hgvs, s.note)); } + if !s.weak.is_empty() { + out.push(format!("{}: weak call ({})", s.row.hgvs, s.weak)); + } } if used.iter().any(|s| s.status == Status::Assumed) { out.push( @@ -686,6 +703,9 @@ fn system_pairs(system: &str, names: &[&str], sites: &Genotyped) -> Row { } else { genos.join(" ") }; + if !nulls.is_empty() && nc.n < 2 { + extra.push(NULL_LIMIT.to_owned()); + } extra.extend(meaning(system, &lacks, &used)); let row = Row::new( system, @@ -716,13 +736,17 @@ fn system_null(ns: &NullSystem, sites: &Genotyped) -> Row { } else { Vec::new() }; + let mut extra = nc.extra.clone(); + if nc.n < 2 { + extra.push(NULL_LIMIT.to_owned()); + } let geno: Vec<&str> = rep(ns.ok, 2 - nc.n).chain(rep(ns.null, nc.n)).collect(); let row = Row::new( ns.system, if nc.n >= 2 { ns.minus } else { ns.plus }, geno.join("/"), conf, - notes_of(&used, nc.extra.clone()), + notes_of(&used, extra), ); with_lacks(row, &lacks, &used) } @@ -882,6 +906,19 @@ fn system_abo(sites: &Genotyped) -> Row { if pheno.is_empty() { pheno = "O".to_owned(); } + if n_a != 0 { + // A is what is left of a functional allele with neither c.802G>A + // nor c.803G>C: no variant shows it. + low = true; + extra.push( + "an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A" + .to_owned(), + ); + } + extra.push( + "ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed" + .to_owned(), + ); let conf = if low { "low" } else { level_of(&used) }; if n_b != 0 && n_a != 0 { extra.push("A and B on different chromosomes assumed (no phase)".to_owned()); @@ -906,7 +943,19 @@ fn system_duffy(sites: &Genotyped) -> Row { return unknown("Duffy", &missing, ""); } let (nb, ng) = (s125.n.unwrap_or(0), sg.n.unwrap_or(0)); - let sil_b = ng.min(nb); + // One GATA box and one Fyb: the VCF's phase says which chromosome it + // is on, when both calls are phased in one phase set. + let phased_on_a = match (&s125.phase, &sg.phase) { + (Some(p), Some(q)) if nb == 1 && ng == 1 && p.block == q.block => { + Some(p.alt_on != q.alt_on) + } + _ => None, + }; + let sil_b = if phased_on_a == Some(true) { + 0 + } else { + ng.min(nb) + }; let sil_a = ng - sil_b; let (a_expr, b_expr) = ((2 - nb) - sil_a, nb - sil_b); let (mut used, mut extra) = (vec![s125, sg], Vec::new()); @@ -928,11 +977,16 @@ fn system_duffy(sites: &Genotyped) -> Row { .chain(rep("FY*X", weak)) .chain(rep("FY*B GATA", sil_b)) .collect(); - if ng != 0 { - extra.push( + match phased_on_a { + Some(on_a) => extra.push(format!( + "c.-67T>C (GATA box) stops Duffy expression on red cells only; the VCF's phase puts it on the {} chromosome", + if on_a { "Fya" } else { "Fyb" } + )), + None if ng != 0 => extra.push( "c.-67T>C (GATA box) stops Duffy expression on red cells only; with no phase it is placed on the Fyb chromosome first, where it usually lies (FY*02N.01)" .to_owned(), - ); + ), + None => {} } Row::new( "Duffy", @@ -1134,6 +1188,12 @@ fn system_rhd(sites: &Genotyped, rhd: &RhdDepth, row: &Locus) -> Result 0 { + extra.push( + "an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed" + .to_owned(), + ); + } Ok(Row::new( "RhD", if call - n_psi > 0 { "D+" } else { "D-" }, @@ -1183,6 +1243,55 @@ fn missing_sites(sites: &Genotyped) -> Vec<&'static str> { out } +/// Every site a system's row reads (none for RhD, read from depth). +fn system_sites<'a>(system: &str, names: Option<&[&str]>, sites: &'a Genotyped) -> Vec<&'a Site> { + let named: &[&str] = match system { + "ABO" => &["ABO_261", "ABO_802", "ABO_803", "ABO_796", "ABO_1061"], + "Duffy" => &["FY_125", "FY_GATA", "FY_265"], + "HNA-1" => &[ + "FCGR3B_108", + "FCGR3B_114", + "FCGR3B_244", + "FCGR3B_316", + "FCGR3B_194", + "FCGR3B_233", + ], + "RhD" => return Vec::new(), + _ => names.unwrap_or_default(), + }; + let mut out: Vec<&Site> = named.iter().map(|n| site(sites, n)).collect(); + if names.is_some() || null_system(system).is_some() { + out.extend(null_rows(system, sites)); + } + out +} + +/// Without a BAM, a system none of whose sites has a VCF record is not +/// assessed: the VCF may not cover the gene at all (a file cut to some +/// chromosomes, a panel, a dropped contig), which reads the same as the +/// reference everywhere. +fn no_record(system: &str, names: Option<&[&str]>, sites: &Genotyped) -> Option { + let used = system_sites(system, names, sites); + if used.is_empty() || used.iter().any(|s| s.status != Status::Assumed) { + return None; + } + let mut chroms: Vec<&str> = Vec::new(); + for s in &used { + if !chroms.contains(&s.row.chrom.as_str()) { + chroms.push(&s.row.chrom); + } + } + Some(Row::not_assessed( + system, + format!( + "no VCF record at any of its {} site{} and no BAM: a VCF that does not cover {} would read as the reference", + used.len(), + if used.len() > 1 { "s" } else { "" }, + chroms.join(", ") + ), + )) +} + /// One row per system: the systems that lack a high-prevalence antigen /// first, each list in the base order of [`SYSTEMS`]. pub fn predict(sites: &Genotyped, rhd: &RhdDepth, rhd_row: &Locus) -> Result, Error> { @@ -1195,6 +1304,10 @@ pub fn predict(sites: &Genotyped, rhd: &RhdDepth, rhd_row: &Locus) -> Result system_abo(sites), ("RhD", _) => system_rhd(sites, rhd, rhd_row)?, @@ -1206,6 +1319,7 @@ pub fn predict(sites: &Genotyped, rhd: &RhdDepth, rhd_row: &Locus) -> ResultT, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed", @@ -1242,7 +1356,7 @@ pub fn evidence_rows( s.status.as_str().to_owned(), dot(s.n.map(|n| n.to_string())), dot(s.depth.map(|d| fixed(d, 1))), - s.note.clone(), + join_parts([s.note.as_str(), s.weak.as_str()]), ]); } let flank = rhd.flank().filter(|f| *f != 0.0); diff --git a/rust/crates/og-bloodtype/tests/port_tests_cn_traits.rs b/rust/crates/og-bloodtype/tests/port_tests_cn_traits.rs index cf0e4365f..6efbbf51f 100644 --- a/rust/crates/og-bloodtype/tests/port_tests_cn_traits.rs +++ b/rust/crates/og-bloodtype/tests/port_tests_cn_traits.rs @@ -12,8 +12,8 @@ //! 1. the table and the code agree (`og bloodtype check-markers`); a table //! missing a rule's site fails the check //! 2. nothing planted, reads everywhere: the reference alleles at -//! confidence high; without the BAM the same calls at medium, and RhD -//! not determined +//! confidence high; without the BAM a system with no VCF record at any +//! of its sites is not assessed, and RhD not determined //! 3. ABO: A1, A2, B, AB, O.02, and markers that do not add up //! 4. RhD from depth: two copies, one, none, the RHD pseudogene, a hybrid //! gene, low flank depth @@ -519,14 +519,9 @@ fn s02_nothing_planted() { c.eq("Kell high", r.cf("Kell").as_str(), "high"); let nobam = T(report(&[], NO_BAM)); c.eq( - "without the BAM, ABO is still O", - nobam.ph("ABO").as_str(), - "O", - ); - c.eq( - "without the BAM, confidence medium", - nobam.cf("ABO").as_str(), - "medium", + "without the BAM and with no ABO record, ABO is not assessed", + (nobam.ph("ABO"), nobam.cf("ABO")), + ("not assessed".into(), "not assessed".into()), ); c.eq( "without the BAM, RhD is not determined", @@ -585,9 +580,9 @@ fn s03_abo() { &d2, ); c.eq( - "A1B", + "A1B, low: no variant shows the A allele", (ab.ph("ABO"), ab.cf("ABO")), - ("A1B".into(), "high".into()), + ("A1B".into(), "low".into()), ); c.eq( "the A1 or A2 caveat is in the note", diff --git a/rust/crates/og-bloodtype/tests/report.rs b/rust/crates/og-bloodtype/tests/report.rs index 43de618cf..d38212d2d 100644 --- a/rust/crates/og-bloodtype/tests/report.rs +++ b/rust/crates/og-bloodtype/tests/report.rs @@ -317,7 +317,7 @@ fn the_abo_insertion_counts_after_a_reference_or_other_record() { &[line("chr9", 133257521, "T", ".", ".", "0/0"), ins("0/1")], Some(depth(&d, 2.0, &HashMap::new())), ); - assert_eq!(t["ABO"][..3], ["A1", "A1/O.01", "high"]); + assert_eq!(t["ABO"][..3], ["A1", "A1/O.01", "low"]); } #[test] @@ -361,7 +361,7 @@ fn a_shorter_reference_record_leaves_a_deletion_marker_to_the_reads() { ("absent".to_owned(), None, String::new()) ); let t = run(&d, &recs, Some(depth(&d, 2.0, &HashMap::new()))); - assert_eq!(t["ABO"][..3], ["A1", "A1/O.01", "high"], "{r}"); + assert_eq!(t["ABO"][..3], ["A1", "A1/O.01", "low"], "{r}"); // The deletion after it still counts, in either order. let del = line("chr9", 133255669, "CG", "C", "PASS", "0/1"); for recs in [[r.clone(), del.clone()], [del.clone(), r.clone()]] { @@ -540,3 +540,142 @@ fn incompatible_null_alt_dosages_are_no_call_in_both_readers() { } } } + +/// A one-sample VCF record at the marker `name` with these FORMAT keys and values. +fn recf(name: &str, fmt: &str, smp: &str) -> String { + let m = &read_markers(&markers()).unwrap()[name]; + format!( + "{}\t{}\t.\t{}\t{}\t50\tPASS\t.\t{fmt}\t{smp}\n", + m.chrom, m.pos, m.ref_, m.alt + ) +} + +#[test] +fn a_call_under_the_gq_and_dp_floor_lowers_confidence() { + let d = dir("weak"); + let reads = || Some(depth(&d, 2.0, &HashMap::new())); + // KEL c.578C>T 0/1 with GQ 0 and one read: K+k+ still, at confidence low. + let t = run(&d, &[recf("KEL_578", "GT:GQ:DP", "0/1:0:1")], reads()); + assert_eq!(t["Kell"][0], "K+k+ Kp(a-b+) Js(a-b+)"); + assert_eq!(t["Kell"][2], "low"); + assert!( + t["Kell"][3].contains("KEL c.578C>T: weak call (GQ 0 under 20, DP 1 under 8)"), + "{}", + t["Kell"][3] + ); + let ev = std::fs::read_to_string(d.join("e.tsv")).unwrap(); + let row = ev.lines().find(|l| l.contains("\tKEL_578\t")).unwrap(); + assert!(row.ends_with("GQ 0 under 20, DP 1 under 8"), "{row}"); + // The same call with GQ 20 and 8 reads, at the floors, stays high. + let t = run(&d, &[recf("KEL_578", "GT:GQ:DP", "0/1:20:8")], reads()); + assert_eq!( + t["Kell"][..3], + ["K+k+ Kp(a-b+) Js(a-b+)", "K/k Kpb/Kpb Jsb/Jsb", "high"] + ); + // A gVCF reference block with GQ 3 at a site: low too. + let t = run(&d, &[recf("JK_838", "GT:GQ:MIN_DP", "0/0:3:20")], reads()); + assert_eq!(t["Kidd"][..3], ["Jk(a+b-)", "Jka/Jka", "low"]); +} + +#[test] +fn a_vcf_with_no_chr9_record_reads_abo_not_assessed_without_a_bam() { + let d = dir("nochr9"); + // A VCF with records elsewhere, none on chr9, and no BAM: ABO is not + // assessed, not O; Kell, with its record, is read. + let t = run(&d, &[rec("KEL_578", "0/1")], None); + assert_eq!(t["ABO"][..3], ["not assessed", ".", "not assessed"]); + assert!(t["ABO"][3].contains("no VCF record at any of its 5 sites and no BAM")); + assert!(t["ABO"][3].contains("chr9")); + assert_eq!(t["Kell"][0], "K+k+ Kp(a-b+) Js(a-b+)"); + // One ABO record is enough to read the others as the reference. + let t = run(&d, &[rec("ABO_802", "0/0")], None); + assert_eq!(t["ABO"][..3], ["O", "O.01/O.01", "medium"]); + // A VCF with no record at all is no error: every system not assessed, + // and RhD not determined (it needs the BAM). + let t = run(&d, &[], None); + assert_eq!(t["ABO"][0], "not assessed"); + assert_eq!(t["Vel"][0], "not assessed"); + assert_eq!(t["RhD"][0], "not determined"); + // With reads the reads decide, as before. + let t = run(&d, &[], Some(depth(&d, 2.0, &HashMap::new()))); + assert_eq!(t["ABO"][..3], ["O", "O.01/O.01", "high"]); +} + +#[test] +fn a_phased_gata_box_goes_on_the_chromosome_the_vcf_gives() { + let d = dir("duffy-phase"); + let reads = || Some(depth(&d, 2.0, &HashMap::new())); + let duffy = |fy: &str, gata: &str| { + let t = run( + &d, + &[recf("FY_GATA", "GT:PS", gata), recf("FY_125", "GT:PS", fy)], + reads(), + ); + t["Duffy"].clone() + }; + // On the Fya chromosome: Fya silenced on red cells, Fyb expressed. + let r = duffy("0|1:7", "1|0:7"); + assert_eq!(r[..3], ["Fy(a-b+)", "FY*A GATA/FY*B", "high"]); + assert!( + r[3].contains("the VCF's phase puts it on the Fya chromosome"), + "{}", + r[3] + ); + // On the Fyb chromosome. + let r = duffy("0|1:7", "0|1:7"); + assert_eq!(r[..2], ["Fy(a+b-)", "FY*A/FY*B GATA"]); + assert!(r[3].contains("the VCF's phase puts it on the Fyb chromosome")); + // Two phase sets, or no phase: Fyb first, as before. + for (fy, gata) in [("0|1:7", "1|0:9"), ("0/1:.", "0/1:.")] { + let r = duffy(fy, gata); + assert_eq!(r[..2], ["Fy(a+b-)", "FY*A/FY*B GATA"], "{fy} {gata}"); + assert!(r[3].contains("with no phase it is placed on the Fyb chromosome first")); + } +} + +#[test] +fn an_abo_a_allele_reads_low_and_o_or_b_keeps_its_confidence() { + let d = dir("abo-a-low"); + let reads = || Some(depth(&d, 2.0, &HashMap::new())); + let t = run(&d, &[rec("ABO_261", "0/1")], reads()); + assert_eq!(t["ABO"][..3], ["A1", "A1/O.01", "low"]); + assert!(t["ABO"][3].contains("an A allele is read from a c.261 insertion")); + let t = run( + &d, + &[ + rec("ABO_261", "0/1"), + rec("ABO_803", "0/1"), + rec("ABO_796", "0/1"), + ], + reads(), + ); + assert_eq!(t["ABO"][..3], ["B", "B/O.01", "high"]); + assert!(t["ABO"][3].contains("ABO alleles outside these five variants")); + assert!(!t["ABO"][3].contains("an A allele is read")); +} + +#[test] +fn rows_state_what_dna_cannot_check() { + let d = dir("limits"); + let t = run(&d, &[], Some(depth(&d, 2.0, &HashMap::new()))); + assert!(t["RhD"][3].contains("RHD-CE-D hybrids that keep exons 3 to 7")); + for system in [ + "Vel", + "Langereis", + "Junior", + "H", + "Secretor", + "Kell", + "Kidd", + ] { + assert!( + t[system][3].contains("a null allele the table does not hold"), + "{system}: {}", + t[system][3] + ); + } + assert!(!t["Lutheran"][3].contains("null allele")); + // Both deleted: D-, and no D+ limit to state. + let t = run(&d, &[], Some(depth(&d, 0.0, &HashMap::new()))); + assert!(!t["RhD"][3].contains("RHD-CE-D hybrids")); +} diff --git a/tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/stdout b/tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/stdout new file mode 100644 index 000000000..38df98ddc --- /dev/null +++ b/tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + Kell K+k- Kp(a-b+) Js(a-b+) high + ABO A2B low + RhD D+ high + RhCE C-c+ E-e+ low + Duffy Fy(a+b-) high + Kidd Jk(a+b-) high + MNS M-N+ S-s+ low + Lutheran Lu(a-b+) high + Diego Di(a-b+) high + Dombrock Do(a-b+) high + Colton Co(a+b-) high + Vel Vel+ high + Langereis Lan+ high + Junior Jr(a+) high + H H+ high + Secretor secretor high + HPA-1 HPA-1(a+b-) high + HPA-2 HPA-2(a+b-) high + HPA-3 HPA-3(a+b-) high + HPA-4 HPA-4(a+b-) high + HPA-5 HPA-5(a+b-) high + HPA-6 HPA-6(a+b-) high + HPA-7 HPA-7(a+b-) high + HPA-8 HPA-8(a+b-) high + HPA-9 HPA-9(a+b-) high + HPA-10 HPA-10(a+b-) high + HPA-11 HPA-11(a+b-) high + HPA-12 HPA-12(a+b-) high + HPA-13 HPA-13(a+b-) high + HPA-14 HPA-14(a+b-) high + HPA-15 HPA-15(a+b-) high + HPA-16 HPA-16(a+b-) high + HPA-17 HPA-17(a+b-) high + HPA-18 HPA-18(a+b-) high + HPA-19 HPA-19(a+b-) high + HPA-20 HPA-20(a+b-) high + HPA-21 HPA-21(a+b-) high + HPA-22 HPA-22(a+b-) high + HPA-23 HPA-23(a+b-) high + HPA-24 HPA-24(a+b-) high + HPA-25 HPA-25(a+b-) high + HPA-26 HPA-26(a+b-) high + HPA-27 HPA-27(a+b-) high + HPA-28 HPA-28(a+b-) high + HPA-29 HPA-29(a+b-) high + HPA-30 HPA-30(a+b-) high + HPA-31 HPA-31(a+b-) high + HPA-32 HPA-32(a+b-) high + HPA-33 HPA-33(a+b-) high + HPA-34 HPA-34(a+b-) high + HPA-35 HPA-35(a+b-) high + HNA-1 HNA-1(a-b+c-) low + HNA-3 HNA-3(a-b+) high + HNA-4 HNA-4(a+b-) high + HNA-5 HNA-5(a+b-) high diff --git a/tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/t.tsv b/tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/t.tsv new file mode 100644 index 000000000..b557124a5 --- /dev/null +++ b/tests/parity/golden/bloodtype/abo-ab-duffy-gata-kell-null/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K+k- Kp(a-b+) Js(a-b+) K/null Kpb/null Jsb/null high null allele: KEL c.246T>A x1; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; lacks k, carried by most people (high prevalence) +ABO A2B A2/B low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; A and B on different chromosomes assumed (no phase) +RhD D+ RHD/RHD*08N.01 (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*B GATA high c.-67T>C (GATA box) stops Duffy expression on red cells only; with no phase it is placed on the Fyb chromosome first, where it usually lies (FY*02N.01) +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a+b-) 15a/15a high lacks HPA-15b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/abo-ab-no-bam/stdout b/tests/parity/golden/bloodtype/abo-ab-no-bam/stdout new file mode 100644 index 000000000..7381c46ad --- /dev/null +++ b/tests/parity/golden/bloodtype/abo-ab-no-bam/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + Kell K+k- Kp(a-b+) Js(a-b+) medium + ABO A2B low + RhD not determined not determined + RhCE not assessed not assessed + Duffy Fy(a+b-) medium + Kidd not assessed not assessed + MNS not assessed not assessed + Lutheran not assessed not assessed + Diego not assessed not assessed + Dombrock not assessed not assessed + Colton not assessed not assessed + Vel not assessed not assessed + Langereis not assessed not assessed + Junior not assessed not assessed + H not assessed not assessed + Secretor not assessed not assessed + HPA-1 not assessed not assessed + HPA-2 not assessed not assessed + HPA-3 not assessed not assessed + HPA-4 not assessed not assessed + HPA-5 not assessed not assessed + HPA-6 not assessed not assessed + HPA-7 not assessed not assessed + HPA-8 not assessed not assessed + HPA-9 not assessed not assessed + HPA-10 not assessed not assessed + HPA-11 not assessed not assessed + HPA-12 not assessed not assessed + HPA-13 not assessed not assessed + HPA-14 not assessed not assessed + HPA-15 HPA-15(a+b-) high + HPA-16 not assessed not assessed + HPA-17 not assessed not assessed + HPA-18 not assessed not assessed + HPA-19 not assessed not assessed + HPA-20 not assessed not assessed + HPA-21 not assessed not assessed + HPA-22 not assessed not assessed + HPA-23 not assessed not assessed + HPA-24 not assessed not assessed + HPA-25 not assessed not assessed + HPA-26 not assessed not assessed + HPA-27 not assessed not assessed + HPA-28 not assessed not assessed + HPA-29 not assessed not assessed + HPA-30 not assessed not assessed + HPA-31 not assessed not assessed + HPA-32 not assessed not assessed + HPA-33 not assessed not assessed + HPA-34 not assessed not assessed + HPA-35 not assessed not assessed + HNA-1 not assessed not assessed + HNA-3 not assessed not assessed + HNA-4 not assessed not assessed + HNA-5 not assessed not assessed diff --git a/tests/parity/golden/bloodtype/abo-ab-no-bam/t.tsv b/tests/parity/golden/bloodtype/abo-ab-no-bam/t.tsv new file mode 100644 index 000000000..f6ff12cb0 --- /dev/null +++ b/tests/parity/golden/bloodtype/abo-ab-no-bam/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K+k- Kp(a-b+) Js(a-b+) K/null Kpb/null Jsb/null medium null allele: KEL c.246T>A x1; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; sites with no VCF record read as reference (no BAM depth to confirm them); lacks k, carried by most people (high prevalence) +ABO A2B A2/B low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; A and B on different chromosomes assumed (no phase); sites with no VCF record read as reference (no BAM depth to confirm them) +RhD not determined . not determined needs the BAM: the common RhD-negative allele (RHD*01N.01) deletes the whole RHD gene, which a VCF does not show +RhCE not assessed . not assessed no VCF record at any of its 2 sites and no BAM: a VCF that does not cover chr1 would read as the reference +Duffy Fy(a+b-) FY*A/FY*B GATA medium c.-67T>C (GATA box) stops Duffy expression on red cells only; with no phase it is placed on the Fyb chromosome first, where it usually lies (FY*02N.01); sites with no VCF record read as reference (no BAM depth to confirm them) +Kidd not assessed . not assessed no VCF record at any of its 41 sites and no BAM: a VCF that does not cover chr18 would read as the reference +MNS not assessed . not assessed no VCF record at any of its 2 sites and no BAM: a VCF that does not cover chr4 would read as the reference +Lutheran not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr19 would read as the reference +Diego not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +Dombrock not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr12 would read as the reference +Colton not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr7 would read as the reference +Vel not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr1 would read as the reference +Langereis not assessed . not assessed no VCF record at any of its 36 sites and no BAM: a VCF that does not cover chr2 would read as the reference +Junior not assessed . not assessed no VCF record at any of its 23 sites and no BAM: a VCF that does not cover chr4 would read as the reference +H not assessed . not assessed no VCF record at any of its 34 sites and no BAM: a VCF that does not cover chr19 would read as the reference +Secretor not assessed . not assessed no VCF record at any of its 14 sites and no BAM: a VCF that does not cover chr19 would read as the reference +HPA-1 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-2 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-3 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-4 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-5 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-6 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-7 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-8 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-9 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-10 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-11 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-12 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr22 would read as the reference +HPA-13 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-14 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-15 HPA-15(a+b-) 15a/15a high lacks HPA-15b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-17 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-18 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-19 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-20 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-21 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-22 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-23 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-24 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-25 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-26 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-27 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-28 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-29 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-30 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-31 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr3 would read as the reference +HPA-32 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-33 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-34 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-35 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HNA-1 not assessed . not assessed no VCF record at any of its 6 sites and no BAM: a VCF that does not cover chr1 would read as the reference +HNA-3 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr19 would read as the reference +HNA-4 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr16 would read as the reference +HNA-5 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr16 would read as the reference diff --git a/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv b/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv new file mode 100644 index 000000000..6cee1eb25 --- /dev/null +++ b/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Langereis Lan- null/null low null alleles: ABCB6 c.717G>A x1, ABCB6 c.574C>T x1; two different null alleles, assumed to sit on different chromosomes (phase is not read); lacks Lan, carried by most people (high prevalence) +H H- (para-Bombay) h/h high null allele: FUT1 c.695G>A x2; lacks H, carried by most people (high prevalence); para-Bombay: a working FUT2 makes H in secretions, and red cells carry little or none +ABO not determined . not determined the markers do not add up to two ABO alleles (c.261 insertion x1, c.802G>A x1, c.803G>C x2); no FUT1 (H-): the red cells carry no H (or very little, para-Bombay), so these ABO alleles make little or no A or B on them and the cells usually group as O +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/null high null allele: SMIM1 c.64_80delAGCCTAGGGGCTGTGTC x1; a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/abo-odd-fyx-kidd-two-nulls/t.tsv b/tests/parity/golden/bloodtype/abo-odd-fyx-kidd-two-nulls/t.tsv new file mode 100644 index 000000000..d3d786a7a --- /dev/null +++ b/tests/parity/golden/bloodtype/abo-odd-fyx-kidd-two-nulls/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kidd Jk(a-b-) null/null low two null copies: no Kidd antigen on the red cells (Jk3-); null alleles: SLC14A1 c.118G>A x1, SLC14A1 c.151+1G>C x1; two different null alleles, assumed to sit on different chromosomes (phase is not read); each null copy is placed with the alleles the ISBT table finds it with first (SLC14A1 c.118G>A: Jkb; SLC14A1 c.151+1G>C: Jka; phase is not read); lacks Jk3, carried by most people (high prevalence) +ABO B B/O.01 low c.796C>A (x0) and c.803G>C (x1) disagree: a rare A or B allele; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a-b+w) FY*X/FY*X high +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/bam-without-chr1-chr9/t.tsv b/tests/parity/golden/bloodtype/bam-without-chr1-chr9/t.tsv new file mode 100644 index 000000000..feda5b398 --- /dev/null +++ b/tests/parity/golden/bloodtype/bam-without-chr1-chr9/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO not determined . not determined ABO c.261delG: no call (no VCF record and no depth row (the BAM has no such contig)); ABO c.802G>A: no call (no VCF record and no depth row (the BAM has no such contig)); ABO c.803G>C: no call (no VCF record and no depth row (the BAM has no such contig)) +RhD not determined . not determined no read depth over RHD and its flanks (the BAM has no chr1 contig) +RhCE not determined . not determined RHCE c.307C>T: no call (no VCF record and no depth row (the BAM has no such contig)); RHCE c.676G>C: no call (no VCF record and no depth row (the BAM has no such contig)) +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy not determined . not determined ACKR1 c.125G>A: no call (no VCF record and no depth row (the BAM has no such contig)); ACKR1 c.-67T>C: no call (no VCF record and no depth row (the BAM has no such contig)) +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel not determined . not determined no null row of Vel was determined; SMIM1 c.64_80delAGCCTAGGGGCTGTGTC: no call (no VCF record and no depth row (the BAM has no such contig)) +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 not determined . not determined FCGR3B c.108G>C: no call (no VCF record and no depth row (the BAM has no such contig)); FCGR3B c.114C>T: no call (no VCF record and no depth row (the BAM has no such contig)); FCGR3B c.244G>A: no call (no VCF record and no depth row (the BAM has no such contig)); FCGR3B c.316G>A: no call (no VCF record and no depth row (the BAM has no such contig)) +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/bgzip-no-index-abo/stdout b/tests/parity/golden/bloodtype/bgzip-no-index-abo/stdout new file mode 100644 index 000000000..38df98ddc --- /dev/null +++ b/tests/parity/golden/bloodtype/bgzip-no-index-abo/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + Kell K+k- Kp(a-b+) Js(a-b+) high + ABO A2B low + RhD D+ high + RhCE C-c+ E-e+ low + Duffy Fy(a+b-) high + Kidd Jk(a+b-) high + MNS M-N+ S-s+ low + Lutheran Lu(a-b+) high + Diego Di(a-b+) high + Dombrock Do(a-b+) high + Colton Co(a+b-) high + Vel Vel+ high + Langereis Lan+ high + Junior Jr(a+) high + H H+ high + Secretor secretor high + HPA-1 HPA-1(a+b-) high + HPA-2 HPA-2(a+b-) high + HPA-3 HPA-3(a+b-) high + HPA-4 HPA-4(a+b-) high + HPA-5 HPA-5(a+b-) high + HPA-6 HPA-6(a+b-) high + HPA-7 HPA-7(a+b-) high + HPA-8 HPA-8(a+b-) high + HPA-9 HPA-9(a+b-) high + HPA-10 HPA-10(a+b-) high + HPA-11 HPA-11(a+b-) high + HPA-12 HPA-12(a+b-) high + HPA-13 HPA-13(a+b-) high + HPA-14 HPA-14(a+b-) high + HPA-15 HPA-15(a+b-) high + HPA-16 HPA-16(a+b-) high + HPA-17 HPA-17(a+b-) high + HPA-18 HPA-18(a+b-) high + HPA-19 HPA-19(a+b-) high + HPA-20 HPA-20(a+b-) high + HPA-21 HPA-21(a+b-) high + HPA-22 HPA-22(a+b-) high + HPA-23 HPA-23(a+b-) high + HPA-24 HPA-24(a+b-) high + HPA-25 HPA-25(a+b-) high + HPA-26 HPA-26(a+b-) high + HPA-27 HPA-27(a+b-) high + HPA-28 HPA-28(a+b-) high + HPA-29 HPA-29(a+b-) high + HPA-30 HPA-30(a+b-) high + HPA-31 HPA-31(a+b-) high + HPA-32 HPA-32(a+b-) high + HPA-33 HPA-33(a+b-) high + HPA-34 HPA-34(a+b-) high + HPA-35 HPA-35(a+b-) high + HNA-1 HNA-1(a-b+c-) low + HNA-3 HNA-3(a-b+) high + HNA-4 HNA-4(a+b-) high + HNA-5 HNA-5(a+b-) high diff --git a/tests/parity/golden/bloodtype/bgzip-no-index-abo/t.tsv b/tests/parity/golden/bloodtype/bgzip-no-index-abo/t.tsv new file mode 100644 index 000000000..b557124a5 --- /dev/null +++ b/tests/parity/golden/bloodtype/bgzip-no-index-abo/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K+k- Kp(a-b+) Js(a-b+) K/null Kpb/null Jsb/null high null allele: KEL c.246T>A x1; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; lacks k, carried by most people (high prevalence) +ABO A2B A2/B low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; A and B on different chromosomes assumed (no phase) +RhD D+ RHD/RHD*08N.01 (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*B GATA high c.-67T>C (GATA box) stops Duffy expression on red cells only; with no phase it is placed on the Fyb chromosome first, where it usually lies (FY*02N.01) +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a+b-) 15a/15a high lacks HPA-15b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/bombay-null-null/t.tsv b/tests/parity/golden/bloodtype/bombay-null-null/t.tsv new file mode 100644 index 000000000..1bafc7a1e --- /dev/null +++ b/tests/parity/golden/bloodtype/bombay-null-null/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K-k- Kp(a-b-) Js(a-b-) null/null high two null copies: no Kell antigen on the red cells (Ku-); null allele: KEL c.246T>A x2; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); lacks k, Kpb, Jsb, Ku, carried by most people (high prevalence) +Kidd Jk(a-b-) null/null high two null copies: no Kidd antigen on the red cells (Jk3-); null allele: SLC14A1 c.342-1G>A, c.342-1G>C x2; each null copy is placed with Jkb, Jka first, the alleles the ISBT table finds it with (phase is not read); lacks Jk3, carried by most people (high prevalence) +H H- (Bombay, Oh) h/h high null allele: FUT1 c.695G>A x2; lacks H, carried by most people (high prevalence) +ABO O O.01/O.02 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; no FUT1 (H-): the red cells carry no H (or very little, para-Bombay), so these ABO alleles make little or no A or B on them and the cells usually group as O +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*A high +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor non-secretor se/se high null allele: FUT2 c.461G>A x2; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/gvcf-hna-disagree/t.tsv b/tests/parity/golden/bloodtype/gvcf-hna-disagree/t.tsv new file mode 100644 index 000000000..9f8dd2b4c --- /dev/null +++ b/tests/parity/golden/bloodtype/gvcf-hna-disagree/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kidd Jk(a-b-) null/null high two null copies: no Kidd antigen on the red cells (Jk3-); null allele: SLC14A1 c.342-1G>A, c.342-1G>C x2; each null copy is placed with Jkb, Jka first, the alleles the ISBT table finds it with (phase is not read); lacks Jk3, carried by most people (high prevalence) +HPA-21 HPA-21(a-b+) 21b/21b high lacks HPA-21a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions); lacks HPA-21a, carried by most people (high prevalence) +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; KEL c.1546C>T: another allele at this position (G>T, genotype 0/1) +Duffy Fy(a+b-) FY*A/FY*A high +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 not determined . not determined the FCGR3B markers do not agree on HNA-1a or HNA-1b (FCGR3B c.108G>C x1, FCGR3B c.114C>T x1, FCGR3B c.244G>A x1, FCGR3B c.316G>A x2): an FCGR3A read placed on FCGR3B, an extra FCGR3B copy, or a rare allele; FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/hna1c/t.tsv b/tests/parity/golden/bloodtype/hna1c/t.tsv new file mode 100644 index 000000000..5b5ec63ef --- /dev/null +++ b/tests/parity/golden/bloodtype/hna1c/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a+b+c+) FCGR3B*01/FCGR3B*03 low FCGR3B c.194A>G (x2) does not match the other FCGR3B markers; HNA-1c with no HNA-1b allele left for it: often an extra FCGR3B copy carrying FCGR3B*03; FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/indexed-abo/stdout b/tests/parity/golden/bloodtype/indexed-abo/stdout new file mode 100644 index 000000000..38df98ddc --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-abo/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + Kell K+k- Kp(a-b+) Js(a-b+) high + ABO A2B low + RhD D+ high + RhCE C-c+ E-e+ low + Duffy Fy(a+b-) high + Kidd Jk(a+b-) high + MNS M-N+ S-s+ low + Lutheran Lu(a-b+) high + Diego Di(a-b+) high + Dombrock Do(a-b+) high + Colton Co(a+b-) high + Vel Vel+ high + Langereis Lan+ high + Junior Jr(a+) high + H H+ high + Secretor secretor high + HPA-1 HPA-1(a+b-) high + HPA-2 HPA-2(a+b-) high + HPA-3 HPA-3(a+b-) high + HPA-4 HPA-4(a+b-) high + HPA-5 HPA-5(a+b-) high + HPA-6 HPA-6(a+b-) high + HPA-7 HPA-7(a+b-) high + HPA-8 HPA-8(a+b-) high + HPA-9 HPA-9(a+b-) high + HPA-10 HPA-10(a+b-) high + HPA-11 HPA-11(a+b-) high + HPA-12 HPA-12(a+b-) high + HPA-13 HPA-13(a+b-) high + HPA-14 HPA-14(a+b-) high + HPA-15 HPA-15(a+b-) high + HPA-16 HPA-16(a+b-) high + HPA-17 HPA-17(a+b-) high + HPA-18 HPA-18(a+b-) high + HPA-19 HPA-19(a+b-) high + HPA-20 HPA-20(a+b-) high + HPA-21 HPA-21(a+b-) high + HPA-22 HPA-22(a+b-) high + HPA-23 HPA-23(a+b-) high + HPA-24 HPA-24(a+b-) high + HPA-25 HPA-25(a+b-) high + HPA-26 HPA-26(a+b-) high + HPA-27 HPA-27(a+b-) high + HPA-28 HPA-28(a+b-) high + HPA-29 HPA-29(a+b-) high + HPA-30 HPA-30(a+b-) high + HPA-31 HPA-31(a+b-) high + HPA-32 HPA-32(a+b-) high + HPA-33 HPA-33(a+b-) high + HPA-34 HPA-34(a+b-) high + HPA-35 HPA-35(a+b-) high + HNA-1 HNA-1(a-b+c-) low + HNA-3 HNA-3(a-b+) high + HNA-4 HNA-4(a+b-) high + HNA-5 HNA-5(a+b-) high diff --git a/tests/parity/golden/bloodtype/indexed-abo/t.tsv b/tests/parity/golden/bloodtype/indexed-abo/t.tsv new file mode 100644 index 000000000..b557124a5 --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-abo/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K+k- Kp(a-b+) Js(a-b+) K/null Kpb/null Jsb/null high null allele: KEL c.246T>A x1; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; lacks k, carried by most people (high prevalence) +ABO A2B A2/B low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; A and B on different chromosomes assumed (no phase) +RhD D+ RHD/RHD*08N.01 (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*B GATA high c.-67T>C (GATA box) stops Duffy expression on red cells only; with no phase it is placed on the Fyb chromosome first, where it usually lies (FY*02N.01) +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a+b-) 15a/15a high lacks HPA-15b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/indexed-blocks/t.tsv b/tests/parity/golden/bloodtype/indexed-blocks/t.tsv new file mode 100644 index 000000000..2a5dd0d22 --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-blocks/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S+s+ N/N S/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/indexed-bombay/t.tsv b/tests/parity/golden/bloodtype/indexed-bombay/t.tsv new file mode 100644 index 000000000..1bafc7a1e --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-bombay/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K-k- Kp(a-b-) Js(a-b-) null/null high two null copies: no Kell antigen on the red cells (Ku-); null allele: KEL c.246T>A x2; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); lacks k, Kpb, Jsb, Ku, carried by most people (high prevalence) +Kidd Jk(a-b-) null/null high two null copies: no Kidd antigen on the red cells (Jk3-); null allele: SLC14A1 c.342-1G>A, c.342-1G>C x2; each null copy is placed with Jkb, Jka first, the alleles the ISBT table finds it with (phase is not read); lacks Jk3, carried by most people (high prevalence) +H H- (Bombay, Oh) h/h high null allele: FUT1 c.695G>A x2; lacks H, carried by most people (high prevalence) +ABO O O.01/O.02 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; no FUT1 (H-): the red cells carry no H (or very little, para-Bombay), so these ABO alleles make little or no A or B on them and the cells usually group as O +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*A high +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor non-secretor se/se high null allele: FUT2 c.461G>A x2; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/indexed-gvcf/t.tsv b/tests/parity/golden/bloodtype/indexed-gvcf/t.tsv new file mode 100644 index 000000000..9f8dd2b4c --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-gvcf/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kidd Jk(a-b-) null/null high two null copies: no Kidd antigen on the red cells (Jk3-); null allele: SLC14A1 c.342-1G>A, c.342-1G>C x2; each null copy is placed with Jkb, Jka first, the alleles the ISBT table finds it with (phase is not read); lacks Jk3, carried by most people (high prevalence) +HPA-21 HPA-21(a-b+) 21b/21b high lacks HPA-21a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions); lacks HPA-21a, carried by most people (high prevalence) +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; KEL c.1546C>T: another allele at this position (G>T, genotype 0/1) +Duffy Fy(a+b-) FY*A/FY*A high +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 not determined . not determined the FCGR3B markers do not agree on HNA-1a or HNA-1b (FCGR3B c.108G>C x1, FCGR3B c.114C>T x1, FCGR3B c.244G>A x1, FCGR3B c.316G>A x2): an FCGR3A read placed on FCGR3B, an extra FCGR3B copy, or a rare allele; FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/indexed-nochr/stdout b/tests/parity/golden/bloodtype/indexed-nochr/stdout new file mode 100644 index 000000000..d07df796f --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-nochr/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + ABO A1 low + RhD D+ high + RhCE C-c+ E-e+ low + Kell K-k+ Kp(a-b+) Js(a-b+) high + Duffy Fy(a+b+) high + Kidd Jk(a-b+) high + MNS M-N+ S-s+ low + Lutheran Lu(a-b+) high + Diego Di(a-b+) high + Dombrock Do(a-b+) high + Colton Co(a+b-) high + Vel Vel+ high + Langereis Lan+ high + Junior Jr(a+) high + H H+ high + Secretor secretor high + HPA-1 HPA-1(a+b-) high + HPA-2 HPA-2(a+b-) high + HPA-3 HPA-3(a+b-) high + HPA-4 HPA-4(a+b-) high + HPA-5 HPA-5(a+b-) high + HPA-6 HPA-6(a+b-) high + HPA-7 HPA-7(a+b-) high + HPA-8 HPA-8(a+b-) high + HPA-9 HPA-9(a+b-) high + HPA-10 HPA-10(a+b-) high + HPA-11 HPA-11(a+b-) high + HPA-12 HPA-12(a+b-) high + HPA-13 HPA-13(a+b-) high + HPA-14 HPA-14(a+b-) high + HPA-15 HPA-15(a-b+) high + HPA-16 HPA-16(a+b-) high + HPA-17 HPA-17(a+b-) high + HPA-18 HPA-18(a+b-) high + HPA-19 HPA-19(a+b-) high + HPA-20 HPA-20(a+b-) high + HPA-21 HPA-21(a+b-) high + HPA-22 HPA-22(a+b-) high + HPA-23 HPA-23(a+b-) high + HPA-24 HPA-24(a+b-) high + HPA-25 HPA-25(a+b-) high + HPA-26 HPA-26(a+b-) high + HPA-27 HPA-27(a+b-) high + HPA-28 HPA-28(a+b-) high + HPA-29 HPA-29(a+b-) high + HPA-30 HPA-30(a+b-) high + HPA-31 HPA-31(a+b-) high + HPA-32 HPA-32(a+b-) high + HPA-33 HPA-33(a+b-) high + HPA-34 HPA-34(a+b-) high + HPA-35 HPA-35(a+b-) high + HNA-1 HNA-1(a-b+c-) low + HNA-3 HNA-3(a-b+) high + HNA-4 HNA-4(a+b-) high + HNA-5 HNA-5(a+b-) high diff --git a/tests/parity/golden/bloodtype/indexed-nochr/t.tsv b/tests/parity/golden/bloodtype/indexed-nochr/t.tsv new file mode 100644 index 000000000..5fca1b719 --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-nochr/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO A1 A1/O.01 low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b+) FY*A/FY*B high +Kidd Jk(a-b+) Jkb/Jkb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/indexed-vcf-quirks/t.tsv b/tests/parity/golden/bloodtype/indexed-vcf-quirks/t.tsv new file mode 100644 index 000000000..d9d9298fb --- /dev/null +++ b/tests/parity/golden/bloodtype/indexed-vcf-quirks/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K-k- Kp(a-b-) Js(a-b-) null/null low two null copies: no Kell antigen on the red cells (Ku-); null allele: KEL c.223+1G>C, c.223+1G>A, c.223+1G>T x2; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); KEL c.578C>T: another allele at this position (G>C,A, genotype 1/2); lacks k, Kpb, Jsb, Ku, carried by most people (high prevalence) +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*A high +Kidd not determined . not determined SLC14A1 c.838G>A: no call (FILTER LowQual) +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran not determined . not determined BCAM c.230G>A: no call (genotype ./.) +Diego not determined . not determined SLC4A1 c.2561C>T: no call (genotype 1) +Dombrock Do(a+b+) Doa/Dob high +Colton not determined . not determined AQP1 c.134C>T: no call (genotype .) +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 not determined . not determined ITGB3 c.176T>C: no call (genotype .) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/low-site-depth/t.tsv b/tests/parity/golden/bloodtype/low-site-depth/t.tsv new file mode 100644 index 000000000..139a6670b --- /dev/null +++ b/tests/parity/golden/bloodtype/low-site-depth/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K/k not determined Kp(a-b+) Js(a-b+) Kpb/Kpb Jsb/Jsb low KEL c.578C>T: low depth (no VCF record and 3 reads at MAPQ 20 (fewer than 8)); 1 null row not determined (KEL c.246T>A: low depth); a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel not determined . not determined no null row of Vel was determined; SMIM1 c.64_80delAGCCTAGGGGCTGTGTC: low depth (no VCF record and 2 reads at MAPQ 20 (fewer than 8)) +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/plain-nochr/stdout b/tests/parity/golden/bloodtype/plain-nochr/stdout new file mode 100644 index 000000000..d07df796f --- /dev/null +++ b/tests/parity/golden/bloodtype/plain-nochr/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + ABO A1 low + RhD D+ high + RhCE C-c+ E-e+ low + Kell K-k+ Kp(a-b+) Js(a-b+) high + Duffy Fy(a+b+) high + Kidd Jk(a-b+) high + MNS M-N+ S-s+ low + Lutheran Lu(a-b+) high + Diego Di(a-b+) high + Dombrock Do(a-b+) high + Colton Co(a+b-) high + Vel Vel+ high + Langereis Lan+ high + Junior Jr(a+) high + H H+ high + Secretor secretor high + HPA-1 HPA-1(a+b-) high + HPA-2 HPA-2(a+b-) high + HPA-3 HPA-3(a+b-) high + HPA-4 HPA-4(a+b-) high + HPA-5 HPA-5(a+b-) high + HPA-6 HPA-6(a+b-) high + HPA-7 HPA-7(a+b-) high + HPA-8 HPA-8(a+b-) high + HPA-9 HPA-9(a+b-) high + HPA-10 HPA-10(a+b-) high + HPA-11 HPA-11(a+b-) high + HPA-12 HPA-12(a+b-) high + HPA-13 HPA-13(a+b-) high + HPA-14 HPA-14(a+b-) high + HPA-15 HPA-15(a-b+) high + HPA-16 HPA-16(a+b-) high + HPA-17 HPA-17(a+b-) high + HPA-18 HPA-18(a+b-) high + HPA-19 HPA-19(a+b-) high + HPA-20 HPA-20(a+b-) high + HPA-21 HPA-21(a+b-) high + HPA-22 HPA-22(a+b-) high + HPA-23 HPA-23(a+b-) high + HPA-24 HPA-24(a+b-) high + HPA-25 HPA-25(a+b-) high + HPA-26 HPA-26(a+b-) high + HPA-27 HPA-27(a+b-) high + HPA-28 HPA-28(a+b-) high + HPA-29 HPA-29(a+b-) high + HPA-30 HPA-30(a+b-) high + HPA-31 HPA-31(a+b-) high + HPA-32 HPA-32(a+b-) high + HPA-33 HPA-33(a+b-) high + HPA-34 HPA-34(a+b-) high + HPA-35 HPA-35(a+b-) high + HNA-1 HNA-1(a-b+c-) low + HNA-3 HNA-3(a-b+) high + HNA-4 HNA-4(a+b-) high + HNA-5 HNA-5(a+b-) high diff --git a/tests/parity/golden/bloodtype/plain-nochr/t.tsv b/tests/parity/golden/bloodtype/plain-nochr/t.tsv new file mode 100644 index 000000000..5fca1b719 --- /dev/null +++ b/tests/parity/golden/bloodtype/plain-nochr/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO A1 A1/O.01 low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b+) FY*A/FY*B high +Kidd Jk(a-b+) Jkb/Jkb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/pseudogene-one-copy/stdout b/tests/parity/golden/bloodtype/pseudogene-one-copy/stdout new file mode 100644 index 000000000..25c11a35d --- /dev/null +++ b/tests/parity/golden/bloodtype/pseudogene-one-copy/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + Kell K+k- Kp(a-b+) Js(a-b+) high + ABO A2B low + RhD D- high + RhCE C-c+ E-e+ low + Duffy Fy(a+b-) high + Kidd Jk(a+b-) high + MNS M-N+ S-s+ low + Lutheran Lu(a-b+) high + Diego Di(a-b+) high + Dombrock Do(a-b+) high + Colton Co(a+b-) high + Vel Vel+ high + Langereis Lan+ high + Junior Jr(a+) high + H H+ high + Secretor secretor high + HPA-1 HPA-1(a+b-) high + HPA-2 HPA-2(a+b-) high + HPA-3 HPA-3(a+b-) high + HPA-4 HPA-4(a+b-) high + HPA-5 HPA-5(a+b-) high + HPA-6 HPA-6(a+b-) high + HPA-7 HPA-7(a+b-) high + HPA-8 HPA-8(a+b-) high + HPA-9 HPA-9(a+b-) high + HPA-10 HPA-10(a+b-) high + HPA-11 HPA-11(a+b-) high + HPA-12 HPA-12(a+b-) high + HPA-13 HPA-13(a+b-) high + HPA-14 HPA-14(a+b-) high + HPA-15 HPA-15(a+b-) high + HPA-16 HPA-16(a+b-) high + HPA-17 HPA-17(a+b-) high + HPA-18 HPA-18(a+b-) high + HPA-19 HPA-19(a+b-) high + HPA-20 HPA-20(a+b-) high + HPA-21 HPA-21(a+b-) high + HPA-22 HPA-22(a+b-) high + HPA-23 HPA-23(a+b-) high + HPA-24 HPA-24(a+b-) high + HPA-25 HPA-25(a+b-) high + HPA-26 HPA-26(a+b-) high + HPA-27 HPA-27(a+b-) high + HPA-28 HPA-28(a+b-) high + HPA-29 HPA-29(a+b-) high + HPA-30 HPA-30(a+b-) high + HPA-31 HPA-31(a+b-) high + HPA-32 HPA-32(a+b-) high + HPA-33 HPA-33(a+b-) high + HPA-34 HPA-34(a+b-) high + HPA-35 HPA-35(a+b-) high + HNA-1 HNA-1(a-b+c-) low + HNA-3 HNA-3(a-b+) high + HNA-4 HNA-4(a+b-) high + HNA-5 HNA-5(a+b-) high diff --git a/tests/parity/golden/bloodtype/pseudogene-one-copy/t.tsv b/tests/parity/golden/bloodtype/pseudogene-one-copy/t.tsv new file mode 100644 index 000000000..9a23d33ca --- /dev/null +++ b/tests/parity/golden/bloodtype/pseudogene-one-copy/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K+k- Kp(a-b+) Js(a-b+) K/null Kpb/null Jsb/null high null allele: KEL c.246T>A x1; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; lacks k, carried by most people (high prevalence) +ABO A2B A2/B low A1 or A2 rests on ABO c.1061delC, a deletion in a run of C: short-read calls are less reliable here; an A allele is read from a c.261 insertion with neither c.802G>A nor c.803G>C, so an O allele that keeps c.261 (a non-deletional O) or a weak A subgroup also reads A; ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed; A and B on different chromosomes assumed (no phase) +RhD D- RHD*08N.01/RHD deleted (RHD copies by read depth 1.00) high weak and partial D (RHD missense alleles) are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*B GATA high c.-67T>C (GATA box) stops Duffy expression on red cells only; with no phase it is placed on the Fyb chromosome first, where it usually lies (FY*02N.01) +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a+b-) 15a/15a high lacks HPA-15b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/ref-blocks-second-record/t.tsv b/tests/parity/golden/bloodtype/ref-blocks-second-record/t.tsv new file mode 100644 index 000000000..2a5dd0d22 --- /dev/null +++ b/tests/parity/golden/bloodtype/ref-blocks-second-record/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S+s+ N/N S/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/ref-no-bam/stdout b/tests/parity/golden/bloodtype/ref-no-bam/stdout new file mode 100644 index 000000000..c15683e01 --- /dev/null +++ b/tests/parity/golden/bloodtype/ref-no-bam/stdout @@ -0,0 +1,56 @@ +Blood groups of S, predicted from the genome (not a serological typing): + ABO not assessed not assessed + RhD not determined not determined + RhCE not assessed not assessed + Kell not assessed not assessed + Duffy not assessed not assessed + Kidd not assessed not assessed + MNS not assessed not assessed + Lutheran not assessed not assessed + Diego not assessed not assessed + Dombrock not assessed not assessed + Colton not assessed not assessed + Vel not assessed not assessed + Langereis not assessed not assessed + Junior not assessed not assessed + H not assessed not assessed + Secretor not assessed not assessed + HPA-1 not assessed not assessed + HPA-2 not assessed not assessed + HPA-3 not assessed not assessed + HPA-4 not assessed not assessed + HPA-5 not assessed not assessed + HPA-6 not assessed not assessed + HPA-7 not assessed not assessed + HPA-8 not assessed not assessed + HPA-9 not assessed not assessed + HPA-10 not assessed not assessed + HPA-11 not assessed not assessed + HPA-12 not assessed not assessed + HPA-13 not assessed not assessed + HPA-14 not assessed not assessed + HPA-15 not assessed not assessed + HPA-16 not assessed not assessed + HPA-17 not assessed not assessed + HPA-18 not assessed not assessed + HPA-19 not assessed not assessed + HPA-20 not assessed not assessed + HPA-21 not assessed not assessed + HPA-22 not assessed not assessed + HPA-23 not assessed not assessed + HPA-24 not assessed not assessed + HPA-25 not assessed not assessed + HPA-26 not assessed not assessed + HPA-27 not assessed not assessed + HPA-28 not assessed not assessed + HPA-29 not assessed not assessed + HPA-30 not assessed not assessed + HPA-31 not assessed not assessed + HPA-32 not assessed not assessed + HPA-33 not assessed not assessed + HPA-34 not assessed not assessed + HPA-35 not assessed not assessed + HNA-1 not assessed not assessed + HNA-3 not assessed not assessed + HNA-4 not assessed not assessed + HNA-5 not assessed not assessed diff --git a/tests/parity/golden/bloodtype/ref-no-bam/t.tsv b/tests/parity/golden/bloodtype/ref-no-bam/t.tsv new file mode 100644 index 000000000..32e35dd8f --- /dev/null +++ b/tests/parity/golden/bloodtype/ref-no-bam/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO not assessed . not assessed no VCF record at any of its 5 sites and no BAM: a VCF that does not cover chr9 would read as the reference +RhD not determined . not determined needs the BAM: the common RhD-negative allele (RHD*01N.01) deletes the whole RHD gene, which a VCF does not show +RhCE not assessed . not assessed no VCF record at any of its 2 sites and no BAM: a VCF that does not cover chr1 would read as the reference +Kell not assessed . not assessed no VCF record at any of its 60 sites and no BAM: a VCF that does not cover chr7 would read as the reference +Duffy not assessed . not assessed no VCF record at any of its 3 sites and no BAM: a VCF that does not cover chr1 would read as the reference +Kidd not assessed . not assessed no VCF record at any of its 41 sites and no BAM: a VCF that does not cover chr18 would read as the reference +MNS not assessed . not assessed no VCF record at any of its 2 sites and no BAM: a VCF that does not cover chr4 would read as the reference +Lutheran not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr19 would read as the reference +Diego not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +Dombrock not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr12 would read as the reference +Colton not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr7 would read as the reference +Vel not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr1 would read as the reference +Langereis not assessed . not assessed no VCF record at any of its 36 sites and no BAM: a VCF that does not cover chr2 would read as the reference +Junior not assessed . not assessed no VCF record at any of its 23 sites and no BAM: a VCF that does not cover chr4 would read as the reference +H not assessed . not assessed no VCF record at any of its 34 sites and no BAM: a VCF that does not cover chr19 would read as the reference +Secretor not assessed . not assessed no VCF record at any of its 14 sites and no BAM: a VCF that does not cover chr19 would read as the reference +HPA-1 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-2 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-3 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-4 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-5 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-6 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-7 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-8 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-9 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-10 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-11 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-12 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr22 would read as the reference +HPA-13 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-14 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-15 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr6 would read as the reference +HPA-16 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-17 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-18 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-19 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-20 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-21 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-22 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-23 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-24 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-25 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr5 would read as the reference +HPA-26 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-27 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-28 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-29 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-30 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-31 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr3 would read as the reference +HPA-32 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-33 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-34 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HPA-35 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr17 would read as the reference +HNA-1 not assessed . not assessed no VCF record at any of its 6 sites and no BAM: a VCF that does not cover chr1 would read as the reference +HNA-3 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr19 would read as the reference +HNA-4 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr16 would read as the reference +HNA-5 not assessed . not assessed no VCF record at any of its 1 site and no BAM: a VCF that does not cover chr16 would read as the reference diff --git a/tests/parity/golden/bloodtype/ref-reads/t.tsv b/tests/parity/golden/bloodtype/ref-reads/t.tsv new file mode 100644 index 000000000..f9adef07c --- /dev/null +++ b/tests/parity/golden/bloodtype/ref-reads/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-boundary/t.tsv b/tests/parity/golden/bloodtype/rhd-boundary/t.tsv new file mode 100644 index 000000000..b4e6f7743 --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-boundary/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD deleted (RHD copies by read depth 1.45) low read depth 1.45 copies is near a copy-number boundary; weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-broken-flank/t.tsv b/tests/parity/golden/bloodtype/rhd-broken-flank/t.tsv new file mode 100644 index 000000000..969c8b5f6 --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-broken-flank/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD not determined . not determined BROKEN_CONTROL: control segment RHD_FLANK_DOWN of RHD has no read while the other controls have 30.0x; check its coordinates in bin/cn_loci.tsv (or the sample lacks that stretch) +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-hybrid/t.tsv b/tests/parity/golden/bloodtype/rhd-hybrid/t.tsv new file mode 100644 index 000000000..2d90e0a4a --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-hybrid/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD not determined RHD/RHD (RHD copies by read depth 1.60) not determined RHD exons 3, 4, 5, 6, 7 without RHD reads while the gene has 1.60 copies: the pattern of an RHD-RHCE hybrid gene (such as RHD*03N.01) or a partial deletion. Copies per exon: exon 1 1.60, exon 2 1.60, exon 3 0.00, exon 4 0.00, exon 5 0.00, exon 6 0.00, exon 7 0.00, exon 8 1.60, exon 9 1.60, exon 10 1.60 +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-low-flank/t.tsv b/tests/parity/golden/bloodtype/rhd-low-flank/t.tsv new file mode 100644 index 000000000..37daa8762 --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-low-flank/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD not determined . not determined too few reads beside RHD (6.0x) for a copy number (at least 10x) +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-none/t.tsv b/tests/parity/golden/bloodtype/rhd-none/t.tsv new file mode 100644 index 000000000..47f01d6a2 --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-none/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D- RHD deleted/RHD deleted (RHD copies by read depth 0.00) high weak and partial D (RHD missense alleles) are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-one/t.tsv b/tests/parity/golden/bloodtype/rhd-one/t.tsv new file mode 100644 index 000000000..6f7f8fe36 --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-one/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD deleted (RHD copies by read depth 1.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/rhd-three/t.tsv b/tests/parity/golden/bloodtype/rhd-three/t.tsv new file mode 100644 index 000000000..d1c427e75 --- /dev/null +++ b/tests/parity/golden/bloodtype/rhd-three/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 3.10) high read depth gives 3.10 RHD copies, more than two; weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Duffy Fy(a+b-) FY*A/FY*A high +Kidd Jk(a+b-) Jka/Jka high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran Lu(a-b+) Lub/Lub high +Diego Di(a-b+) Dib/Dib high +Dombrock Do(a-b+) Dob/Dob high +Colton Co(a+b-) Coa/Coa high +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 HPA-1(a+b-) 1a/1a high lacks HPA-1b: HPA-1a is the platelet antigen most often behind FNAIT and post-transfusion purpura in white populations: an HPA-1a-negative (HPA-1b/1b) mother can make anti-HPA-1a against an HPA-1a-positive baby; a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) diff --git a/tests/parity/golden/bloodtype/vcf-quirks/t.tsv b/tests/parity/golden/bloodtype/vcf-quirks/t.tsv new file mode 100644 index 000000000..d9d9298fb --- /dev/null +++ b/tests/parity/golden/bloodtype/vcf-quirks/t.tsv @@ -0,0 +1,56 @@ +system phenotype genotype confidence note +Kell K-k- Kp(a-b-) Js(a-b-) null/null low two null copies: no Kell antigen on the red cells (Ku-); null allele: KEL c.223+1G>C, c.223+1G>A, c.223+1G>T x2; each null copy is placed with k, Kpb, Jsb first, the alleles the ISBT table finds it with (phase is not read); KEL c.578C>T: another allele at this position (G>C,A, genotype 1/2); lacks k, Kpb, Jsb, Ku, carried by most people (high prevalence) +ABO O O.01/O.01 high ABO alleles outside these five variants (weak A and B subgroups, cis-AB, O alleles other than O.01 and O.02) are not assessed +RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed +RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD +Duffy Fy(a+b-) FY*A/FY*A high +Kidd not determined . not determined SLC14A1 c.838G>A: no call (FILTER LowQual) +MNS M-N+ S-s+ N/N s/s low GYPA, GYPB and GYPE are near copies: short reads can misplace these calls +Lutheran not determined . not determined BCAM c.230G>A: no call (genotype ./.) +Diego not determined . not determined SLC4A1 c.2561C>T: no call (genotype 1) +Dombrock Do(a+b+) Doa/Dob high +Colton not determined . not determined AQP1 c.134C>T: no call (genotype .) +Vel Vel+ Vel/Vel high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Langereis Lan+ Lan/Lan high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Junior Jr(a+) Jra/Jra high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +H H+ H/H high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen +Secretor secretor Se/Se high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen; weak secretor alleles (such as FUT2 c.418A>T, also written c.385A>T) and a deletion of the whole FUT2 gene are not assessed +HPA-1 not determined . not determined ITGB3 c.176T>C: no call (genotype .) +HPA-2 HPA-2(a+b-) 2a/2a high lacks HPA-2b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-3 HPA-3(a+b-) 3a/3a high lacks HPA-3b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-4 HPA-4(a+b-) 4a/4a high lacks HPA-4b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-5 HPA-5(a+b-) 5a/5a high lacks HPA-5b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-6 HPA-6(a+b-) 6a/6a high lacks HPA-6b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-7 HPA-7(a+b-) 7a/7a high lacks HPA-7b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-8 HPA-8(a+b-) 8a/8a high lacks HPA-8b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-9 HPA-9(a+b-) 9a/9a high lacks HPA-9b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-10 HPA-10(a+b-) 10a/10a high lacks HPA-10b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-11 HPA-11(a+b-) 11a/11a high lacks HPA-11b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-12 HPA-12(a+b-) 12a/12a high lacks HPA-12b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-13 HPA-13(a+b-) 13a/13a high lacks HPA-13b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-14 HPA-14(a+b-) 14a/14a high lacks HPA-14b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-15 HPA-15(a-b+) 15b/15b high lacks HPA-15a: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-16 HPA-16(a+b-) 16a/16a high lacks HPA-16b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-17 HPA-17(a+b-) 17a/17a high lacks HPA-17b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-18 HPA-18(a+b-) 18a/18a high lacks HPA-18b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-19 HPA-19(a+b-) 19a/19a high lacks HPA-19b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-20 HPA-20(a+b-) 20a/20a high lacks HPA-20b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-21 HPA-21(a+b-) 21a/21a high lacks HPA-21b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-22 HPA-22(a+b-) 22a/22a high lacks HPA-22b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-23 HPA-23(a+b-) 23a/23a high lacks HPA-23b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-24 HPA-24(a+b-) 24a/24a high lacks HPA-24b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-25 HPA-25(a+b-) 25a/25a high lacks HPA-25b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-26 HPA-26(a+b-) 26a/26a high lacks HPA-26b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-27 HPA-27(a+b-) 27a/27a high lacks HPA-27b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-28 HPA-28(a+b-) 28a/28a high lacks HPA-28b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-29 HPA-29(a+b-) 29a/29a high lacks HPA-29b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-30 HPA-30(a+b-) 30a/30a high lacks HPA-30b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-31 HPA-31(a+b-) 31a/31a high lacks HPA-31b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-32 HPA-32(a+b-) 32a/32a high lacks HPA-32b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-33 HPA-33(a+b-) 33a/33a high lacks HPA-33b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-34 HPA-34(a+b-) 34a/34a high lacks HPA-34b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HPA-35 HPA-35(a+b-) 35a/35a high lacks HPA-35b: a platelet antigen a person lacks can raise antibodies in a pregnancy (against the baby's platelets: fetal and neonatal alloimmune thrombocytopenia, FNAIT) or after a transfusion (post-transfusion purpura, refractoriness to platelet transfusions) +HNA-1 HNA-1(a-b+c-) FCGR3B*02/FCGR3B*02 low FCGR3B c.194A>G (x0) does not match the other FCGR3B markers; lacks HNA-1a, HNA-1c: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI); FCGR3B and FCGR3A are near copies and the FCGR3B copy number varies (none to four or more): short reads can misplace these calls, the copies are not counted, and HNA-1null (no FCGR3B) is not assessed +HNA-3 HNA-3(a-b+) 3b/3b high lacks HNA-3a: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-4 HNA-4(a+b-) 4a/4a high lacks HNA-4b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) +HNA-5 HNA-5(a+b-) 5a/5a high lacks HNA-5b: a neutrophil antigen a person lacks can raise antibodies in a pregnancy or after a transfusion; such antibodies cause neonatal alloimmune neutropenia and transfusion-related acute lung injury (TRALI) From 4a5da3fe609dfb005e6157c14e12a49a16c7c8f6 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:24:32 +0100 Subject: [PATCH 087/110] docs(bloodtype): say what a weak call, a missing record and phase do, and fix the position count The step page, the script and module headers, the VCF-only page and the e2e case now match the new rules. The crate doc said the VCF is read at 318 positions; the marker table has 271. Bead: trait-39 Bead: trait-33 --- CHANGELOG.md | 1 + docs/41-bloodtype.md | 28 +++++++++++++++++++++------- docs/vcf-first.md | 2 +- modules/local/bloodtype/main.nf | 6 ++++-- rust/crates/og-bloodtype/src/lib.rs | 2 +- scripts/41-bloodtype.sh | 5 +++-- tests/e2e/bloodtype-1.sh | 10 ++++++++-- 7 files changed, 39 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..73981bbf5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 41 (blood groups) no longer reads a VCF that does not cover a gene as the reference allele. Without a BAM, a system with no VCF record at any of its sites now reads `not assessed` (phenotype and confidence) instead of the reference phenotype at confidence medium, so a VCF with no chr9 record no longer reads ABO as O. A call with a genotype quality (`GQ`) under 20 or a read depth (`DP`, else `MIN_DP`) under 8 keeps its genotype but gives its system confidence low, and the note and the evidence file name the values. An ABO A allele now reads at confidence low, because no variant shows it: it is what is left of a functional allele with neither c.802G>A nor c.803G>C. Duffy reads the VCF's phase: a GATA box phased with one Fyb in one phase set goes on the chromosome the VCF gives (on Fya that is Fy(a-b+)). The notes now say what the DNA cannot check: the ABO alleles outside the five variants, RHD null and DEL alleles behind a D+, and null alleles the table does not hold. The table keeps its columns; `not assessed` is a new value in the phenotype and confidence columns. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/41-bloodtype.md b/docs/41-bloodtype.md index 650c9de24..d749dea21 100644 --- a/docs/41-bloodtype.md +++ b/docs/41-bloodtype.md @@ -36,7 +36,7 @@ Pinned in `versions.env`; [Image versions](versions.md) lists the current tags. - `${SAMPLE}/vcf/${SAMPLE}.vcf.gz`: one sample, from any caller. Its records near the marker sites are left-aligned first, so an indel need not be written the way the table writes it. Split and whole multi-allelic records, all-sites VCFs (a reference record and then the variant at one position) and gVCF reference blocks are read too: every record that covers a site counts, whatever their order (see below) - the reference (`REF_FASTA`, `reference/GRCh38_no_alt_analysis_set.fasta` by default) with its `.fai`, for the left-alignment; `--reference` in the Nextflow pipeline -- `${SAMPLE}/aligned/${SAMPLE}_sorted.bam` with its `.bai` (`ALIGN_DIR` as for the other BAM steps). Optional: without it RhD is not determined, and a site the VCF has no record for is read as the reference allele at confidence medium. +- `${SAMPLE}/aligned/${SAMPLE}_sorted.bam` with its `.bai` (`ALIGN_DIR` as for the other BAM steps). Optional: without it RhD is not determined, and a site the VCF has no record for is read as the reference allele at confidence medium. A system with no VCF record at any of its sites is then not assessed (see [Without the BAM](#without-the-bam)). ## Command @@ -54,7 +54,7 @@ With `run-all.sh`: `TOOLS=...,bloodtype`. It is opt-in and needs no data, so a r | RhD | read depth over RHD; c.487-19_504dup with c.609G>A | Copies = 2 x RHD depth / depth of the two flanks outside the RHD deletion (0 under 0.5, 1 under 1.5, else 2). The RHD pseudogene (RHD*08N.01) is an inactive copy. Exons 3 to 7 without RHD reads in a gene that is there is the pattern of an RHD-RHCE hybrid gene: RhD is then not determined | | RhCE | c.307C>T (C/c), c.676G>C (E/e) | one allele per copy of the variant | | Kell | c.578C>T (K/k), c.841C>T (Kp), c.1790T>C (Js) | the same | -| Duffy | c.125G>A (Fya/Fyb), c.-67T>C (GATA box), c.265C>T (FY*X) | The GATA box stops expression on red cells; with no phase it is placed on a Fyb chromosome first, where it usually lies (FY*02N.01). FY*X gives a weak Fyb (`b+w`) | +| Duffy | c.125G>A (Fya/Fyb), c.-67T>C (GATA box), c.265C>T (FY*X) | The GATA box stops expression on red cells. With one Fyb and one GATA box, both phased calls in one phase set (the same `PS`, or no `PS` on either), it goes on the chromosome the VCF gives: on the Fya chromosome that is Fy(a-b+). Else it is placed on a Fyb chromosome first, where it usually lies (FY*02N.01). FY*X gives a weak Fyb (`b+w`) | | Kidd, MNS, Lutheran, Diego, Dombrock, Colton | one variant each pair (c.838G>A; c.59T>C and c.143C>T; c.230G>A; c.2561C>T; c.793G>A; c.134C>T) | one allele per copy | | HPA-1, -2, -3, -4, -5, -6, -15 | ITGB3 c.176T>C, GP1BA c.482C>T, ITGA2B c.2621T>G, ITGB3 c.506G>A, ITGA2 c.1600G>A, ITGB3 c.1544G>A, CD109 c.2108C>A | one allele per copy; GRCh38 carries HPA-15b. HPA-6b is a low-frequency antigen, written HPA-6bw in the ISBT table | | HNA-1 | FCGR3B c.108G>C, c.114C>T, c.244G>A, c.316G>A (a or b); c.194A>G (checked); c.233C>A (c) | FCGR3B\*01 (HNA-1a) and \*02 (HNA-1b) differ at five bases. GRCh38 carries the \*02 base at four of them and the \*01 base at c.194, so the copies of HNA-1a are counted on the four, which must agree (else not determined), and c.194 is only checked: a c.194 that does not match is named in the note. FCGR3B\*03 (HNA-1c) is \*02 with c.233C>A and carries HNA-1b too. Without a call at c.233 an HNA-1b allele reads \*02 or \*03. Confidence is always low: FCGR3B and FCGR3A are near copies, and FCGR3B has from none to four or more copies, which the step does not count | @@ -64,7 +64,20 @@ With `run-all.sh`: `TOOLS=...,bloodtype`. It is opt-in and needs no data, so a r | HPA-7 to -14, -16 to -35 | one variant each in ITGB3, ITGA2B, ITGA2, GP1BB or GP9 | one allele per copy; the a antigen is on the reference allele, the low-prevalence b antigen on the other | | HNA-3, -4, -5 | SLC44A2 c.461G>A, ITGAM c.230G>A, ITGAL c.2372G>C | one allele per copy; GRCh38 carries HNA-3b | -A site the VCF has no record for is the reference allele when the BAM has at least 8 reads there at MAPQ 20, and not determined below that. Without the BAM it is read as reference, and the confidence says so. The step leaves out of `samtools bedcov` the rows on a contig the BAM has no `@SQ` line for (a BAM cut to a few chromosomes), because `bedcov` would stop on them. Those sites then have no depth row: the ones with no VCF record are not determined, and RhD is not determined without chr1. A record at a site whose REF is not the table's REF is a no call, because it says nothing about the table's ALT. There are two exceptions. A 0/0 call over a longer REF that starts with the table's REF is the reference allele. A 0/0 record over a shorter REF (an all-sites VCF's `C . 0/0`, or a gVCF block that starts at a deletion marker such as ABO c.1061delC) says nothing past its own base, so the site reads as one with no record: the reads decide. +A site the VCF has no record for is the reference allele when the BAM has at least 8 reads there at MAPQ 20, and not determined below that. Without the BAM it is read as reference, and the confidence says so (see [Without the BAM](#without-the-bam)). The step leaves out of `samtools bedcov` the rows on a contig the BAM has no `@SQ` line for (a BAM cut to a few chromosomes), because `bedcov` would stop on them. Those sites then have no depth row: the ones with no VCF record are not determined, and RhD is not determined without chr1. A record at a site whose REF is not the table's REF is a no call, because it says nothing about the table's ALT. There are two exceptions. A 0/0 call over a longer REF that starts with the table's REF is the reference allele. A 0/0 record over a shorter REF (an all-sites VCF's `C . 0/0`, or a gVCF block that starts at a deletion marker such as ABO c.1061delC) says nothing past its own base, so the site reads as one with no record: the reads decide. + +### Without the BAM + +A VCF lists where the genome differs from the reference. A site with no record is either the reference allele or a site the VCF does not cover, and only the reads tell the two apart. So without the BAM: + +- A system with a record at one of its sites at least is read, and its sites with no record count as the reference allele at confidence medium. The record shows that the VCF covers the gene. +- A system with no record at any of its sites is `not assessed` (phenotype and confidence), and the note names the sites' chromosome. A VCF with no chr9 record would otherwise read ABO as O, the group GRCh38 carries. + +A person who matches GRCh38 at every site of a system (group O at ABO, HPA-1a/1a, most null rows) also has no record there in a variants-only VCF, so that system is not assessed either. A gVCF has a record at every site and needs no BAM for this. RhD needs the BAM in every case. + +### Weak calls + +A call keeps its genotype, but it is weak when its genotype quality (FORMAT `GQ`) is under 20 or its read depth (FORMAT `DP`, else a gVCF block's `MIN_DP`) is under 8, the same depth a site with no record needs. A system that uses a weak call has confidence low, and its note names the site and the values (`KEL c.578C>T: weak call (GQ 0 under 20, DP 1 under 8)`). The evidence file adds the same values to the site's note. A record without `GQ` or `DP` is not checked. The allele balance of a call (the share of reads that carry the ALT) is not checked. ### Indels written another way @@ -99,8 +112,9 @@ Confidence: - **high**: every site was called in the VCF or covered by reads - **medium**: a site was read as reference with no BAM depth to confirm it, or one of the system's null rows was not determined (for example too few reads there) -- **low**: a site in a region where short reads are unreliable, named in the note (RHCE exon 2 for C/c, which is RHD-like on a C allele; GYPA, GYPB and GYPE, which are near copies), markers that disagree, another allele at a site of a two-antigen pair, or two different null alleles taken to sit on different chromosomes +- **low**: a site in a region where short reads are unreliable, named in the note (RHCE exon 2 for C/c, which is RHD-like on a C allele; GYPA, GYPB and GYPE, which are near copies), markers that disagree, another allele at a site of a two-antigen pair, two different null alleles taken to sit on different chromosomes, a weak call (see [Weak calls](#weak-calls)), or an ABO A allele (no variant shows A: it is a functional allele with neither c.802G>A nor c.803G>C, so a rare O allele that keeps c.261 or a weak A subgroup reads A too) - **not determined**: a needed site had no call or too few reads; RhD without the BAM, with flanks under 10x, or with the hybrid pattern +- **not assessed**: without the BAM, no VCF record at any of the system's sites Row order: first the systems where the genome predicts the person lacks a high-prevalence antigen, then the others in the table's order. The high-prevalence antigens are the ones in the marker table's `high_prevalence` column: ISBT's high-prevalence antigens Vel, Lan, Jra, H, k, Kpb, Jsb, Ku, Jk3, Lub, Dib and Coa, and for platelets HPA-1a and the a antigen of HPA-4 and of HPA-6 to HPA-35 except HPA-15, whose b antigen is a low-prevalence one. Such a row's note ends with `lacks , carried by most people (high prevalence)`. A genome with only the reference alleles lacks none of them, so its rows keep the table's order. @@ -121,9 +135,9 @@ Not measured on a whole genome. bcftools reads the VCF's records near the marker ## Notes -- RhD here is the number of RHD copies, not their kind: weak D and partial D (RHD missense alleles) are not assessed, and neither are the RHD-CE-D hybrids that keep exons 3 to 7. The common RhD-negative allele, the deletion of the whole gene (RHD*01N.01), is what the depth sees. -- Phase is not read. ABO assumes A and B sit on different chromosomes, Duffy places the GATA box on Fyb first. -- Rare and null alleles outside the table (null alleles of two or more variants, ABO's weak subgroups, cis-AB) are not assessed. A high-prevalence antigen reads positive when none of the table's null alleles is found, so a null allele the table does not hold goes unseen. Neither are HNA-2 (CD177), HNA-1d and HNA-1null (no FCGR3B gene) assessed. +- RhD here is the number of RHD copies, not their kind: weak D and partial D (RHD missense alleles) are not assessed, and neither are RHD null alleles other than RHD*08N.01, the RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles. The common RhD-negative allele, the deletion of the whole gene (RHD*01N.01), is what the depth sees. A D+ row's note says so. +- Phase is read for Duffy only (see the table). ABO assumes A and B sit on different chromosomes, and two different null alleles of one system are taken to sit on different chromosomes. +- Rare and null alleles outside the table (null alleles of two or more variants, ABO's weak subgroups, cis-AB) are not assessed. A high-prevalence antigen reads positive when none of the table's null alleles is found, so a null allele the table does not hold goes unseen: the note of each system read from null rows (Vel, Langereis, Junior, H, secretor, Kell, Kidd) says so while the antigen reads present. The ABO row's note names the ABO alleles outside its five variants. Neither are HNA-2 (CD177), HNA-1d and HNA-1null (no FCGR3B gene) assessed. - Every null row's allele was looked up in gnomAD v4 (genomes and exomes, 2026-11-03): 214 alleles, 53 of them not in gnomAD at all. Three were dropped because they are far more common than their null phenotype allows: FUT2 c.772G>A (rs602662, about 0.5 of chromosomes) and c.335C>T (rs200157007, 0.14 in South Asians) sit on the same haplotype as the common non-secretor allele c.461G>A, so with no phase they turned Se/se carriers into non-secretors; SLC14A1 c.810G>A (rs17675299, 0.08 in Finns) is far too common for a Kidd null. The rows kept that pass 1% in some population are known nulls of that population: FUT2 c.461G>A (the common non-secretor allele), SMIM1 c.64_80del (Vel), ABCG2 c.376C>T (Jr(a-), East Asians), SLC14A1 c.871T>C (Finns), and FUT2 c.812delC (rs1799761, 0.015 in African genomes). - Another ALT at a null row's position (for example G>T at the position of KEL c.1546C>T, rs8176034) is not that null allele: the note names it, and the confidence stays as the other sites set it. - Secretor status: weak secretor alleles (such as FUT2 c.418A>T, often written c.385A>T) and a deletion of the whole FUT2 gene are not assessed; the row's note says so. diff --git a/docs/vcf-first.md b/docs/vcf-first.md index 35cf56a68..703b7d992 100644 --- a/docs/vcf-first.md +++ b/docs/vcf-first.md @@ -7,7 +7,7 @@ Many providers send a VCF, the file that lists where your DNA differs from the r ## What runs on a VCF alone -With only `sample`, `vcf` and `vcf_index` in the [samplesheet](nextflow.md#samplesheet-format), these tools run: `pharmcat`, `cpic`, `clinvar`, `vep`, `vcfanno`, `slivar`, `clinical_filter`, `cpsr`, `roh`, `prs`, `ancestry`, `mito_haplogroup` and `html_report`. +With only `sample`, `vcf` and `vcf_index` in the [samplesheet](nextflow.md#samplesheet-format), these tools run: `pharmcat`, `cpic`, `clinvar`, `vep`, `vcfanno`, `slivar`, `clinical_filter`, `cpsr`, `roh`, `prs`, `ancestry`, `mito_haplogroup` and `html_report`. The blood groups (`bloodtype`) run too, with RhD not determined. Without reads, a site the VCF does not list may be the reference allele or a site the file does not cover, so a blood group system with no record at any of its sites reads "not assessed" ([Step 41](41-bloodtype.md#without-the-bam)). Everything that reads the aligned reads has nothing to work on, so it does not run: coverage (`mosdepth`, and `multiqc`, which reads it), structural variants and copy-number changes (`manta`, `delly`, `cnvpytor`, `duphold`, `annotsv`, `survivor_merge`), HLA typing, repeat expansions, telomere length, mitochondrial heteroplasmy and the read-depth CYP2D6 calls (`cyrius`, `pypgx`). If your provider can send the BAM or FASTQ, get it. The [Vendor Compatibility Guide](vendor-guide.md) says what each provider delivers. diff --git a/modules/local/bloodtype/main.nf b/modules/local/bloodtype/main.nf index c03d3ff6a..0c0316661 100644 --- a/modules/local/bloodtype/main.nf +++ b/modules/local/bloodtype/main.nf @@ -15,8 +15,10 @@ wrote further right in a repeat meets its marker; then og bloodtype report on that file and the depth, reading the marker sites through its index; without a BAM - ([] in its place) RhD is not determined and sites with - no VCF record are read as reference (confidence medium) + ([] in its place) RhD is not determined, sites with + no VCF record are read as reference (confidence medium), + and a system with no record at any of its sites is not + assessed Equivalent to: scripts/41-bloodtype.sh ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/rust/crates/og-bloodtype/src/lib.rs b/rust/crates/og-bloodtype/src/lib.rs index dbc178a6b..c6ed4e744 100644 --- a/rust/crates/og-bloodtype/src/lib.rs +++ b/rust/crates/og-bloodtype/src/lib.rs @@ -24,7 +24,7 @@ //! the top. //! //! What changes on purpose: the VCF is read through its `.tbi` or `.csi` -//! (318 positions, not the whole file), the catalog is read and the RHD row +//! (271 positions, not the whole file), the catalog is read and the RHD row //! assessed once, a rule site missing from the table is an `ERROR:` line, //! not a traceback, and each output is written whole or not at all. diff --git a/scripts/41-bloodtype.sh b/scripts/41-bloodtype.sh index 7371f5382..4e5ad002b 100755 --- a/scripts/41-bloodtype.sh +++ b/scripts/41-bloodtype.sh @@ -18,8 +18,9 @@ # Input: vcf/.vcf.gz; the reference (REF_FASTA) with its .fai; # aligned/_sorted.bam with its .bai # (ALIGN_DIR as for the other BAM steps), optional: without it RhD is -# not determined and sites the VCF has no record for are read as -# reference with confidence medium. +# not determined, sites the VCF has no record for are read as +# reference with confidence medium, and a system with no record at +# any of its sites is not assessed. # Output: bloodtype/_bloodtype.tsv one row per system # bloodtype/_bloodtype_evidence.tsv what the VCF and the reads said per site # bloodtype/_bloodtype_depth.tsv samtools bedcov over the sites and RHD (with a BAM) diff --git a/tests/e2e/bloodtype-1.sh b/tests/e2e/bloodtype-1.sh index ff8e0cb5a..c829c261d 100755 --- a/tests/e2e/bloodtype-1.sh +++ b/tests/e2e/bloodtype-1.sh @@ -16,7 +16,10 @@ # Kell (c.578C>T: K+k+); # - the same reads without any RHD read (both copies deleted) give D-, and # with half of them (one copy) D+ with one copy; -# - the VCF without a BAM gives RhD not determined and ABO O at medium; +# - the VCF without a BAM gives RhD not determined, and ABO, with no +# record at any of its sites (HG002 matches GRCh38 there), not assessed: +# without reads nothing tells that from a VCF that does not cover ABO; +# Kidd, with GIAB's record at c.838, is still read; # - ABO c.1061delC written two bases right (GG>G) gives A2/A2 as the table's # CG>C does, because step 41 left-aligns first (og on the VCF as written # reads A1/A1, the control), and a C>A,G 1/2 at c.803 keeps its one B copy; @@ -148,7 +151,10 @@ sample "$V" "${T}/truth.vcf.gz" step "$V" check_eq "without a BAM RhD is not determined" "$(cell "$V" RhD phenotype)" "not determined" check "and the step says why" has 'No BAM .*RhD needs read depth' "$(cat "$STEP_LOG")" -check_eq "without a BAM ABO is O at medium" "$(cell "$V" ABO phenotype)/$(cell "$V" ABO confidence)" "O/medium" +check_eq "without a BAM and with no ABO record, ABO is not assessed" \ + "$(cell "$V" ABO phenotype)/$(cell "$V" ABO confidence)" "not assessed/not assessed" +check "and the note says why" has 'no VCF record at any of its 5 sites and no BAM' "$(cell "$V" ABO note)" +check_eq "control: Kidd, with GIAB's record at c.838, is read without a BAM" "$(cell "$V" Kidd phenotype)" "Jk(a-b+)" # --- an indel written further right, and a multi-allelic record ------------------------ # og matches a marker by position, REF and ALT. A caller can write ABO c.1061delC From 262a4c06516e96d456528c43a5ee8c18bd209340 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:41:08 +0100 Subject: [PATCH 088/110] fix(bloodtype): read a gVCF block that reaches a marker through END as a reference call A reference block that starts before a marker and covers it through INFO/END was ignored, so without a BAM a gVCF could read a system as not assessed although it covers it. Such a block is now a reference call at the marker, with its GQ and MIN_DP. ABO's c.796C>A call now counts in the ABO confidence and notes, and the VCF-only page says the blood groups are opt-in. Bead: trait-28 Bead: D10 --- docs/41-bloodtype.md | 4 +- docs/vcf-first.md | 2 +- rust/crates/og-bloodtype/src/genotypes.rs | 93 ++++++++++++++++++++++- rust/crates/og-bloodtype/src/rules.rs | 3 + rust/crates/og-bloodtype/tests/report.rs | 35 +++++++++ 5 files changed, 130 insertions(+), 7 deletions(-) diff --git a/docs/41-bloodtype.md b/docs/41-bloodtype.md index d749dea21..cddab690e 100644 --- a/docs/41-bloodtype.md +++ b/docs/41-bloodtype.md @@ -64,7 +64,7 @@ With `run-all.sh`: `TOOLS=...,bloodtype`. It is opt-in and needs no data, so a r | HPA-7 to -14, -16 to -35 | one variant each in ITGB3, ITGA2B, ITGA2, GP1BB or GP9 | one allele per copy; the a antigen is on the reference allele, the low-prevalence b antigen on the other | | HNA-3, -4, -5 | SLC44A2 c.461G>A, ITGAM c.230G>A, ITGAL c.2372G>C | one allele per copy; GRCh38 carries HNA-3b | -A site the VCF has no record for is the reference allele when the BAM has at least 8 reads there at MAPQ 20, and not determined below that. Without the BAM it is read as reference, and the confidence says so (see [Without the BAM](#without-the-bam)). The step leaves out of `samtools bedcov` the rows on a contig the BAM has no `@SQ` line for (a BAM cut to a few chromosomes), because `bedcov` would stop on them. Those sites then have no depth row: the ones with no VCF record are not determined, and RhD is not determined without chr1. A record at a site whose REF is not the table's REF is a no call, because it says nothing about the table's ALT. There are two exceptions. A 0/0 call over a longer REF that starts with the table's REF is the reference allele. A 0/0 record over a shorter REF (an all-sites VCF's `C . 0/0`, or a gVCF block that starts at a deletion marker such as ABO c.1061delC) says nothing past its own base, so the site reads as one with no record: the reads decide. +A site the VCF has no record for is the reference allele when the BAM has at least 8 reads there at MAPQ 20, and not determined below that. Without the BAM it is read as reference, and the confidence says so (see [Without the BAM](#without-the-bam)). The step leaves out of `samtools bedcov` the rows on a contig the BAM has no `@SQ` line for (a BAM cut to a few chromosomes), because `bedcov` would stop on them. Those sites then have no depth row: the ones with no VCF record are not determined, and RhD is not determined without chr1. A record at a site whose REF is not the table's REF is a no call, because it says nothing about the table's ALT. There are two exceptions. A 0/0 call over a longer REF that starts with the table's REF is the reference allele. A 0/0 record over a shorter REF (an all-sites VCF's `C . 0/0`, or a gVCF block that starts at a deletion marker such as ABO c.1061delC) says nothing past its own base, so the site reads as one with no record: the reads decide. A gVCF reference block (ALT `.`, `<*>` or ``) whose `INFO/END` reaches the table's last REF base is a reference call there, wherever the block starts, with the block's `GQ` and `MIN_DP` (see [Weak calls](#weak-calls)). ### Without the BAM @@ -73,7 +73,7 @@ A VCF lists where the genome differs from the reference. A site with no record i - A system with a record at one of its sites at least is read, and its sites with no record count as the reference allele at confidence medium. The record shows that the VCF covers the gene. - A system with no record at any of its sites is `not assessed` (phenotype and confidence), and the note names the sites' chromosome. A VCF with no chr9 record would otherwise read ABO as O, the group GRCh38 carries. -A person who matches GRCh38 at every site of a system (group O at ABO, HPA-1a/1a, most null rows) also has no record there in a variants-only VCF, so that system is not assessed either. A gVCF has a record at every site and needs no BAM for this. RhD needs the BAM in every case. +A person who matches GRCh38 at every site of a system (group O at ABO, HPA-1a/1a, most null rows) also has no record there in a variants-only VCF, so that system is not assessed either. A gVCF covers every site with a record or a reference block, and needs no BAM for this. RhD needs the BAM in every case. ### Weak calls diff --git a/docs/vcf-first.md b/docs/vcf-first.md index 703b7d992..8a4758714 100644 --- a/docs/vcf-first.md +++ b/docs/vcf-first.md @@ -7,7 +7,7 @@ Many providers send a VCF, the file that lists where your DNA differs from the r ## What runs on a VCF alone -With only `sample`, `vcf` and `vcf_index` in the [samplesheet](nextflow.md#samplesheet-format), these tools run: `pharmcat`, `cpic`, `clinvar`, `vep`, `vcfanno`, `slivar`, `clinical_filter`, `cpsr`, `roh`, `prs`, `ancestry`, `mito_haplogroup` and `html_report`. The blood groups (`bloodtype`) run too, with RhD not determined. Without reads, a site the VCF does not list may be the reference allele or a site the file does not cover, so a blood group system with no record at any of its sites reads "not assessed" ([Step 41](41-bloodtype.md#without-the-bam)). +With only `sample`, `vcf` and `vcf_index` in the [samplesheet](nextflow.md#samplesheet-format), these tools run: `pharmcat`, `cpic`, `clinvar`, `vep`, `vcfanno`, `slivar`, `clinical_filter`, `cpsr`, `roh`, `prs`, `ancestry`, `mito_haplogroup` and `html_report`. The blood groups run too when `--tools` names `bloodtype` (it is opt-in), with RhD not determined. Without reads, a site the VCF does not list may be the reference allele or a site the file does not cover, so a blood group system with no record at any of its sites reads "not assessed" ([Step 41](41-bloodtype.md#without-the-bam)). Everything that reads the aligned reads has nothing to work on, so it does not run: coverage (`mosdepth`, and `multiqc`, which reads it), structural variants and copy-number changes (`manta`, `delly`, `cnvpytor`, `duphold`, `annotsv`, `survivor_merge`), HLA typing, repeat expansions, telomere length, mitochondrial heteroplasmy and the read-depth CYP2D6 calls (`cyrius`, `pypgx`). If your provider can send the BAM or FASTQ, get it. The [Vendor Compatibility Guide](vendor-guide.md) says what each provider delivers. diff --git a/rust/crates/og-bloodtype/src/genotypes.rs b/rust/crates/og-bloodtype/src/genotypes.rs index d3c4809ef..1a5c9ce65 100644 --- a/rust/crates/og-bloodtype/src/genotypes.rs +++ b/rust/crates/og-bloodtype/src/genotypes.rs @@ -26,7 +26,10 @@ //! calls of the same ALT count once, and incompatible dosages are no call; //! - a reference-only record whose REF is shorter than the marker's (an //! all-sites record or a gVCF block starting at a deletion marker) says -//! nothing past its own bases, so the site reads as if it had no record. +//! nothing past its own bases, so the site reads as if it had no record; +//! - a gVCF reference block (ALT `.`, `<*>` or ``) whose `INFO/END` +//! reaches the marker's last REF base is a reference call there, wherever +//! the block starts, with the block's quality. //! //! A call keeps its genotype whatever its quality, but one with a genotype //! quality under [`MIN_GQ`] or a read depth under [`MIN_DEPTH`] (FORMAT `GQ`, @@ -373,9 +376,47 @@ impl Evidence { } } +/// Whether every ALT of a record is a reference-only symbol: a gVCF +/// reference block (`.`, `<*>`, ``). +fn is_block(alts: &str) -> bool { + alts.split(',') + .all(|a| matches!(a, "." | "<*>" | "")) +} + +/// `INFO/END` as htslib reads it (`og_io::tabix`): the key at the start or +/// after a `;`, its leading digits. +fn info_end(info: &str) -> Option { + let at = if info.starts_with("END=") { + 4 + } else { + info.find(";END=")? + 5 + }; + let digits = info[at..].bytes().take_while(u8::is_ascii_digit).count(); + info[at..at + digits].parse().ok() +} + +/// What a reference block that covers a whole marker says about it: a +/// reference call, with the block's quality, unless its genotype is not +/// `0/0`. +fn read_block(alleles: &[&str], quality: &Quality) -> Reading { + if alleles.len() != 2 || !alleles.iter().all(|a| *a == "0") { + return Reading::no_call(Weight::Other, format!("genotype {}", alleles.join("/"))); + } + Reading { + weight: Weight::Reference, + status: Status::Called, + n: Some(0), + note: String::new(), + alts: BTreeMap::new(), + weak: quality.weak(), + phase: None, + } +} + /// Applies one record line (no line ending) to the sites it covers: those -/// at its position and those its REF spans. `only` keeps the sites at one -/// position (the index path reads each position's records on their own). +/// at its position, those its REF spans, and those a reference block covers +/// to its `INFO/END`. `only` keeps the sites at one position (the index +/// path reads each position's records on their own). fn apply_record( line: &str, by_pos: &ByPos, @@ -384,7 +425,7 @@ fn apply_record( only: Option, ) { let mut c = line.splitn(5, '\t'); - let (Some(chrom), Some(pos), Some(_), Some(rf), Some(_)) = + let (Some(chrom), Some(pos), Some(_), Some(rf), Some(rest)) = (c.next(), c.next(), c.next(), c.next(), c.next()) else { return; @@ -401,6 +442,15 @@ fn apply_record( return; }; let span = i64::try_from(rf.len().max(1)).unwrap_or(1); + // A reference block reaches its INFO/END (the index finds it there too). + let block_end = { + let mut r = rest.split('\t'); + match (r.next(), r.nth(2)) { + (Some(alt), Some(info)) if is_block(alt) => info_end(info).filter(|e| *e >= p), + _ => None, + } + }; + let span = block_end.map_or(span, |e| span.max(e - p + 1)); let mut hits = here .range(p..p.saturating_add(span)) .filter(|(at, _)| only.is_none_or(|o| o == **at)) @@ -423,7 +473,25 @@ fn apply_record( .unwrap_or("."); let alleles: Vec<&str> = gt.split(['/', '|']).collect(); let quality = Quality::of(&fmt, &smp, gt); + // A block covers a marker when it reaches the marker's last REF base. + let covers = |i: usize, at: i64| { + block_end.is_some_and(|e| { + at + i64::try_from(sites[i].row.ref_.len().max(1)).unwrap_or(1) - 1 <= e + }) + }; for (&at, names) in hits { + if names.iter().any(|&i| covers(i, at)) { + for &i in names { + if covers(i, at) { + ev[i].add(read_block(&alleles, &quality)); + } else if at == p + && let Some(r) = read_record(&sites[i].row, rf, &alts, filt, &alleles, &quality) + { + ev[i].add(r); + } + } + continue; + } if at == p { for &i in names { if let Some(r) = read_record(&sites[i].row, rf, &alts, filt, &alleles, &quality) { @@ -971,6 +1039,23 @@ mod tests { assert_eq!(s.phase, None); } + #[test] + fn a_reference_block_reads_to_its_end() { + assert_eq!(info_end("END=120"), Some(120)); + assert_eq!(info_end("MIN_DP=3;END=99;X=1"), Some(99)); + assert_eq!(info_end("SVEND=99;CIEND=5"), None); + assert_eq!(info_end("END=."), None); + assert!(is_block("<*>") && is_block(".") && is_block("")); + assert!(!is_block("A,<*>") && !is_block("")); + let q = Quality::of(&["GT", "GQ", "MIN_DP"], &["0/0", "3", "20"], "0/0"); + let r = read_block(&["0", "0"], &q); + assert_eq!( + (r.status, r.n, r.weak.as_str()), + (Status::Called, Some(0), "GQ 3 under 20") + ); + assert_eq!(read_block(&[".", "."], &q).status, Status::NoCall); + } + #[test] fn depth_decides_a_site_with_no_record() { let mut g: Genotyped = IndexMap::new(); diff --git a/rust/crates/og-bloodtype/src/rules.rs b/rust/crates/og-bloodtype/src/rules.rs index f7bf85e2c..c1d54bab9 100644 --- a/rust/crates/og-bloodtype/src/rules.rs +++ b/rust/crates/og-bloodtype/src/rules.rs @@ -893,6 +893,9 @@ fn system_abo(sites: &Genotyped) -> Row { .chain(rep("O.02", n_o2)), ); let s796 = site(sites, "ABO_796"); + if s796.n.is_some() { + used.push(s796); + } let mut low = false; if let Some(n796) = s796.n && n796 != n_b diff --git a/rust/crates/og-bloodtype/tests/report.rs b/rust/crates/og-bloodtype/tests/report.rs index d38212d2d..46971d0b4 100644 --- a/rust/crates/og-bloodtype/tests/report.rs +++ b/rust/crates/og-bloodtype/tests/report.rs @@ -679,3 +679,38 @@ fn rows_state_what_dna_cannot_check() { let t = run(&d, &[], Some(depth(&d, 0.0, &HashMap::new()))); assert!(!t["RhD"][3].contains("RHD-CE-D hybrids")); } + +#[test] +fn a_gvcf_block_that_reaches_a_marker_through_end_is_a_reference_call() { + let d = dir("block-end"); + let m = read_markers(&markers()).unwrap()["JK_838"].clone(); + let block = |gq: i64, end: i64| { + format!( + "{}\t{}\t.\tA\t<*>\t0\t.\tEND={end}\tGT:GQ:MIN_DP\t0/0:{gq}:20\n", + m.chrom, + m.pos - 10 + ) + }; + // A block from ten bases before the marker to past it, GQ 3: a weak + // reference call, the same through the index and a full pass. + let recs = [block(3, m.pos + 5)]; + assert_eq!( + site_both_ways(&d, &recs, "JK_838"), + ("called".to_owned(), Some(0), String::new()) + ); + // Without a BAM, Kidd is read from it (not "not assessed"), at low. + let t = run(&d, &recs, None); + assert_eq!(t["Kidd"][..3], ["Jk(a+b-)", "Jka/Jka", "low"]); + assert!( + t["Kidd"][3].contains("weak call (GQ 3 under 20)"), + "{}", + t["Kidd"][3] + ); + // GQ 50: the block's call, and the null rows read as reference: medium. + let t = run(&d, &[block(50, m.pos + 5)], None); + assert_eq!(t["Kidd"][..3], ["Jk(a+b-)", "Jka/Jka", "medium"]); + // A block that ends before the marker says nothing about it. + let recs = [block(50, m.pos - 1)]; + assert_eq!(site_both_ways(&d, &recs, "JK_838").0, "absent"); + assert_eq!(run(&d, &recs, None)["Kidd"][0], "not assessed"); +} From 32be2276f24785d3f5045d5e7d666b4a908bbc25 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 00:43:38 +0100 Subject: [PATCH 089/110] fix(freshness): stop showing a fixed read date on the drug interactions row The date lives in the header of assets/pgx_inhibitors.tsv; a hardcoded copy went stale the moment a maintainer refreshed the table. --- rust/crates/og-fresh/src/lookups.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index be202d1bd..e5224cec9 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -1111,7 +1111,7 @@ pub fn pgx_inhibitors(c: &Ctx<'_>) -> Lookup { } Ok(table_row( "Drug interactions (assets/pgx_inhibitors.tsv, step 27)", - format!("{} rows, FDA classes read 2026-11-03", rows.len()), + format!("{} rows, FDA classes", rows.len()), &format!( "the FDA table{}{via}", date.map(|d| format!(" (current as of {d})")) From 678520c18da281481cb984efefb325a26733ac45 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:04:24 +0100 Subject: [PATCH 090/110] test(acmg): a run without step 23 must get the secondary-findings card Red first: summary.json has no ACMG card when clinical/ is missing, and the agreement test compares every group b parity folder with and without its clinical VCF. summary-clinical.sh gets NO_ORACLE=1 so the test can write the folders without the oracle's helper modules. Bead: D11 Bead: D14 --- .../tests/screen_acmg_card_section.rs | 365 ++++++++++++++++++ tests/parity/gen/summary-clinical.sh | 17 +- 2 files changed, 375 insertions(+), 7 deletions(-) create mode 100644 rust/crates/og-summary/tests/screen_acmg_card_section.rs diff --git a/rust/crates/og-summary/tests/screen_acmg_card_section.rs b/rust/crates/og-summary/tests/screen_acmg_card_section.rs new file mode 100644 index 000000000..f783f956c --- /dev/null +++ b/rust/crates/og-summary/tests/screen_acmg_card_section.rs @@ -0,0 +1,365 @@ +//! The ACMG secondary-findings card is its own section, `acmg_sf`, and +//! follows step 06: a run without the VEP cache (no step 23, no +//! `clinical/` folder) still gets it from the ClinVar hits. +//! +//! 1. Red first: a folder with step 06's hits (a BRCA2 P/LP heterozygote, +//! two MUTYH heterozygotes) and no `clinical/` folder. Before the +//! section existed it got no card at all. +//! 2. Agreement: every summary-collect parity folder of group b +//! (`tests/parity/gen/summary-clinical.sh`) that has both the hits and +//! the clinical VCF, collected as it is and again without `clinical/`. +//! Without step 23 the card may lose only what the HIGH-impact source +//! brings: (a) every ClinVar row of the card without VEP is in the card +//! with VEP, unchanged; (b) every gene reported without VEP is reported +//! with VEP; (c) a row not reported without VEP stays as it is, or is +//! reported with VEP because a HIGH-impact row of its gene joined it. + +use og_summary::collect::{Group, Input, group_b, post}; +use pycompat::json::Value; +use std::path::{Path, PathBuf}; +use std::process::Command; + +fn repo() -> PathBuf { + Path::new(env!("CARGO_MANIFEST_DIR")).join("../../..") +} + +fn scratch(name: &str) -> PathBuf { + let d = std::env::temp_dir().join(format!( + "og-screen-acmg-{name}-{}", + std::process::id() + )); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(&d).unwrap(); + d +} + +fn put(p: &Path, text: &str) { + std::fs::create_dir_all(p.parent().unwrap()).unwrap(); + std::fs::write(p, text).unwrap(); +} + +fn input(dir: &Path, assets: &Path, group: Group) -> Input { + Input { + sample: "S".into(), + sample_dir: dir.to_str().unwrap().to_owned(), + declared_sex: None, + assets: assets.to_str().unwrap().to_owned(), + group, + tables: og_summary::collect::group_c::util::default_tables(), + } +} + +/// The sections of group b, as summary.json writes them. +fn sections_b(dir: &Path, assets: &Path) -> Value { + let v = group_b::collect(&input(dir, assets, Group::B)) + .unwrap() + .to_json(); + at(&v, &["sections"]).clone() +} + +fn at<'a>(v: &'a Value, path: &[&str]) -> &'a Value { + path.iter().fold(v, |v, k| match v { + Value::Object(m) => m + .get(*k) + .unwrap_or_else(|| panic!("no {k} in {path:?}: {v:?}")), + _ => panic!("{path:?} is no object at {k}"), + }) +} + +fn get<'a>(v: &'a Value, k: &str) -> Option<&'a Value> { + match v { + Value::Object(m) => m.get(k), + _ => None, + } +} + +fn s(v: &Value) -> &str { + match v { + Value::Str(x) => x, + _ => panic!("no string: {v:?}"), + } +} + +fn rows(card: &Value, list: &str) -> Vec { + match get(card, list) { + Some(Value::Array(a)) => a.clone(), + None => Vec::new(), + Some(x) => panic!("{list} is no list: {x:?}"), + } +} + +fn gene_variant(r: &Value) -> (String, String) { + ( + s(at(r, &["gene"])).to_owned(), + s(at(r, &["variant"])).to_owned(), + ) +} + +const HITS_HEAD: &str = "##fileformat=VCFv4.2\n##PGP_CALL_FLOOR=GQ=20,DP=8\n\ +#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tS\n"; +const PL: &str = "CLNREVSTAT=criteria_provided,_multiple_submitters,_no_conflicts"; + +/// Step 06's hits: a BRCA2 P/LP heterozygote and two MUTYH heterozygotes. +fn hits() -> String { + format!( + "{HITS_HEAD}\ +chr13\t32340300\t1\tC\tT\t.\tPASS\tGENEINFO=BRCA2:675;CLNSIG=Pathogenic;{PL}\tGT:GQ:DP\t0/1:60:35\n\ +chr1\t45331556\t2\tC\tT\t.\tPASS\tGENEINFO=MUTYH:4595;CLNSIG=Pathogenic;{PL}\tGT:GQ:DP\t0/1:50:30\n\ +chr1\t45332400\t3\tG\tA\t.\tPASS\tGENEINFO=MUTYH:4595;CLNSIG=Likely_pathogenic;{PL}\tGT:GQ:DP\t0/1:55:32\n" + ) +} + +#[test] +fn a_run_without_step_23_gets_the_card_from_the_clinvar_hits() { + let d = scratch("red"); + let sd = d.join("S"); + put(&sd.join("clinvar/S_clinvar_hits.vcf"), &hits()); + let assets = repo().join("assets"); + let secs = sections_b(&sd, &assets); + assert!( + get(&secs, "clinical").is_some_and(|c| s(at(c, &["state"])) == "missing"), + "no clinical section: step 23 did not run" + ); + let sec = get(&secs, "acmg_sf").expect("summary.json has no acmg_sf section"); + assert_eq!(s(at(sec, &["state"])), "ok", "{sec:?}"); + assert_eq!(s(at(sec, &["title"])), "ACMG secondary findings"); + assert_eq!( + s(at(sec, &["source"])), + "clinvar/S_clinvar_hits.vcf", + "the section's file is step 06's" + ); + let card = at(sec, &["data"]); + assert_eq!(at(card, &["genes_on_list"]), &Value::Int(84)); + let reported: Vec<(String, String)> = rows(card, "clinvar_hits") + .iter() + .map(|r| { + let rule = s(at(r, &["rule"])).to_owned(); + (s(at(r, &["gene"])).to_owned(), rule) + }) + .collect(); + assert_eq!( + reported, + [ + ("BRCA2".to_owned(), "All P and LP".to_owned()), + ("MUTYH".to_owned(), "P and LP (2 variants)".to_owned()), + ("MUTYH".to_owned(), "P and LP (2 variants)".to_owned()), + ], + "BRCA2 and the MUTYH pair are reported under their rules" + ); + assert!(rows(card, "not_reported").is_empty(), "{card:?}"); + assert_eq!(at(card, &["clinvar_checked"]), &Value::Bool(true)); + assert_eq!(at(card, &["high_impact_checked"]), &Value::Bool(false)); + let note = s(at(card, &["high_impact_note"])); + assert!( + note.starts_with("Rare HIGH-impact variants were not screened: step 23 (clinical filter) did not run") + && note.contains("not in ClinVar"), + "{note}" + ); + + // The run status gives step 23's reason; a failed step 23 is named. + let skip = "skipped (needs VEP, data not installed: vep_cache/homo_sapiens/116_GRCh38/info.txt)"; + for (word, want) in [ + (skip, format!("step 23 (clinical filter) was {skip}")), + ("failed (exit 1)", "step 23 (clinical filter) failed (exit 1)".to_owned()), + ] { + put( + &sd.join("logs/run_status.tsv"), + &format!("meta\tstarted_utc\t2020-01-01 00:00 UTC\nstep\t06\tok\nstep\t23\t{word}\n"), + ); + let secs = sections_b(&sd, &assets); + let note = s(at(&secs, &["acmg_sf", "data", "high_impact_note"])).to_owned(); + assert!(note.contains(&want), "{note}"); + } +} + +#[test] +fn the_section_follows_step_06_and_is_never_a_not_run_line_of_its_own() { + let d = scratch("state"); + let sd = d.join("S"); + std::fs::create_dir_all(&sd).unwrap(); + let assets = repo().join("assets"); + let secs = sections_b(&sd, &assets); + assert_eq!(s(at(&secs, &["acmg_sf", "state"])), "missing"); + put( + &sd.join("logs/run_status.tsv"), + "meta\tstarted_utc\t2020-01-01 00:00 UTC\nstep\t06\tfailed (exit 2)\n", + ); + let secs = sections_b(&sd, &assets); + assert_eq!(s(at(&secs, &["acmg_sf", "state"])), "failed"); + assert!(s(at(&secs, &["acmg_sf", "note"])).starts_with("step 06 failed")); + // The whole summary: ClinVar screen names the failed step once. + let all = post::collect(&input(&sd, &assets, Group::All)).unwrap(); + let not_run: Vec<&str> = match at(&all, &["not_run"]) { + Value::Array(a) => a.iter().map(s).collect(), + x => panic!("{x:?}"), + }; + assert!(not_run.contains(&"ClinVar screen (step 06 failed)"), "{not_run:?}"); + assert!( + !not_run.iter().any(|l| l.starts_with("ACMG secondary findings")), + "{not_run:?}" + ); +} + +/// The parity folders of group b, written by their generator. +fn parity_folders(d: &Path) -> PathBuf { + let script = repo().join("tests/parity/gen/summary-clinical.sh"); + let st = Command::new("bash") + .arg(&script) + .current_dir(d) + .env("NO_ORACLE", "1") + .status() + .expect("bash runs"); + assert!(st.success(), "{} failed", script.display()); + for f in ["cb_vep.vcf.gz", "cb_vep.vcf.gz.tbi"] { + std::fs::copy(repo().join("tests/parity/inputs/summary-collect").join(f), d.join(f)).unwrap(); + } + d.join("assets") +} + +/// Copies `from` to `to`, all but its `clinical/` folder (symlinks kept). +fn copy_without_clinical(from: &Path, to: &Path) { + let st = Command::new("cp") + .arg("-PR") + .arg(from) + .arg(to) + .status() + .unwrap(); + assert!(st.success()); + std::fs::remove_dir_all(to.join("clinical")).unwrap(); +} + +/// The three rules of the module doc, for one folder: the reasons it +/// breaks them, none when it keeps them. +fn agreement(with: &Value, without: &Value) -> Vec { + let mut bad = Vec::new(); + let high_genes: Vec = rows(with, "high_impact") + .iter() + .map(|r| gene_variant(r).0) + .collect(); + let with_cv = rows(with, "clinvar_hits"); + let without_cv = rows(without, "clinvar_hits"); + // (a) every ClinVar row without VEP, unchanged with VEP. + for r in &without_cv { + if !with_cv.contains(r) { + bad.push(format!("(a) ClinVar row without VEP not in the card with VEP: {r:?}")); + } + } + // (a') a ClinVar row only with VEP is one (c) explains. + let reported_with: Vec<(String, String)> = ["clinvar_hits", "high_impact", "structural"] + .iter() + .flat_map(|l| rows(with, l)) + .map(|r| gene_variant(&r)) + .collect(); + let not_without: Vec<(String, String)> = + rows(without, "not_reported").iter().map(gene_variant).collect(); + for r in &with_cv { + if !without_cv.contains(r) { + let gv = gene_variant(r); + let moved = not_without.contains(&gv) && high_genes.contains(&gv.0); + // A row whose fields grew (a two-hit line) is the same row. + let same = without_cv.iter().any(|w| gene_variant(w) == gv); + if !(moved || same) { + bad.push(format!("(a) ClinVar row only with VEP, not explained: {r:?}")); + } + } + } + // (b) every gene reported without VEP is reported with VEP. + for (g, _) in ["clinvar_hits", "structural"] + .iter() + .flat_map(|l| rows(without, l)) + .map(|r| gene_variant(&r)) + { + if !reported_with.iter().any(|(h, _)| *h == g) { + bad.push(format!("(b) {g} reported without VEP, not with VEP")); + } + } + // (c) a not-reported row stays, or is reported because a HIGH-impact + // row of its gene joined it. + let not_with = rows(with, "not_reported"); + for r in rows(without, "not_reported") { + let gv = gene_variant(&r); + let stays = not_with.contains(&r); + let joined = reported_with.contains(&gv) && high_genes.contains(&gv.0); + if !(stays || joined) { + bad.push(format!("(c) not reported without VEP, neither kept nor joined: {r:?}")); + } + } + bad +} + +#[test] +fn without_the_clinical_vcf_the_card_loses_only_what_the_high_impact_source_brings() { + let d = scratch("agree"); + let assets = parity_folders(&d); + let mut compared = Vec::new(); + let mut moved = 0; + let mut names: Vec<_> = std::fs::read_dir(&d) + .unwrap() + .map(|e| e.unwrap().path()) + .filter(|p| p.join("clinvar/S_clinvar_hits.vcf").is_file() && p.join("clinical").is_dir()) + .collect(); + names.sort(); + for dir in names { + let name = dir.file_name().unwrap().to_str().unwrap().to_owned(); + let bare = d.join(format!("{name}.noclinical")); + copy_without_clinical(&dir, &bare); + let with = sections_b(&dir, &assets); + let without = sections_b(&bare, &assets); + let wsec = at(&with, &["acmg_sf"]); + let nsec = at(&without, &["acmg_sf"]); + if s(at(wsec, &["state"])) != "ok" { + // A hits VCF that cannot be read is the same note either way. + assert_eq!(wsec, nsec, "{name}"); + continue; + } + let (w, n) = (at(wsec, &["data"]), at(nsec, &["data"])); + assert_eq!(at(n, &["high_impact_checked"]), &Value::Bool(false), "{name}"); + assert!( + s(at(n, &["high_impact_note"])).contains("did not run") + || s(at(n, &["high_impact_note"])).contains("wrote no clinical VCF"), + "{name}: {n:?}" + ); + if at(w, &["high_impact_checked"]) == &Value::Bool(false) { + // The clinical VCF is there and cannot be read: the card keeps + // its ClinVar rows and says why. + assert!( + s(at(w, &["high_impact_note"])).contains("clinical VCF cannot be read"), + "{name}: {w:?}" + ); + assert_eq!(rows(w, "clinvar_hits"), rows(n, "clinvar_hits"), "{name}"); + continue; + } + assert!(get(w, "high_impact_note").is_none(), "{name}: {w:?}"); + // The clinical section's own tier, with the same inputs, agrees. + assert_eq!( + Some(w), + get(at(&with, &["clinical", "data"]), "acmg_sf"), + "{name}: the card and the clinical section's tier differ" + ); + let bad = agreement(w, n); + assert!(bad.is_empty(), "{name}:\n{}", bad.join("\n")); + let not_with = rows(w, "not_reported"); + let n_moved = rows(n, "not_reported") + .iter() + .filter(|r| !not_with.contains(r)) + .count(); + eprintln!( + "{name}: ClinVar rows {} without VEP, {} with; not reported {} without, {} with; {n_moved} joined", + rows(n, "clinvar_hits").len(), + rows(w, "clinvar_hits").len(), + rows(n, "not_reported").len(), + not_with.len() + ); + moved += n_moved; + compared.push(name); + } + let _ = std::fs::remove_dir_all(&d); + assert!( + compared.len() >= 5, + "only {compared:?} compared: the generator lost its folders" + ); + assert!( + moved > 0, + "no row moved from not reported to reported with VEP: the folders no longer test rule (c)" + ); +} diff --git a/tests/parity/gen/summary-clinical.sh b/tests/parity/gen/summary-clinical.sh index 6d5cfbac3..2d0f7907e 100644 --- a/tests/parity/gen/summary-clinical.sh +++ b/tests/parity/gen/summary-clinical.sh @@ -31,14 +31,17 @@ NEW=202103040506.07 # after it NEWER=202103040507.00 # The helper modules of bin/collect_summary.py, as they were when the -# collector was last the summary's writer. +# collector was last the summary's writer. NO_ORACLE=1 leaves them out: +# og-summary's tests read the folders alone (tests/screen_acmg_card_section.rs). HELPERS=7c1470bc50933f48a1a0dde3c0e0b2b87bc48718 -git -C "$root" cat-file -e "${HELPERS}^{commit}" 2> /dev/null \ - || git -C "$root" fetch -q --depth=1 origin "$HELPERS" -mkdir -p pymods -for m in pgx_outside_calls clip_check annotsv_postfilter paraphase_report traits_report; do - git -C "$root" show "${HELPERS}:bin/${m}.py" > "pymods/${m}.py" -done +if [ "${NO_ORACLE:-}" != 1 ]; then + git -C "$root" cat-file -e "${HELPERS}^{commit}" 2> /dev/null \ + || git -C "$root" fetch -q --depth=1 origin "$HELPERS" + mkdir -p pymods + for m in pgx_outside_calls clip_check annotsv_postfilter paraphase_report traits_report; do + git -C "$root" show "${HELPERS}:bin/${m}.py" > "pymods/${m}.py" + done +fi mkdir -p assets for a in acmg_sf.tsv carrier_genes.tsv paralog_loci.tsv; do From b625fd2a80d2e820646f29c026d590fcabfc83cb Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:04:24 +0100 Subject: [PATCH 091/110] feat(acmg): write the secondary-findings card as its own section from step 06 sections.acmg_sf follows step 06: ok when the ClinVar hits VCF is there, not run or failed with step 06's reason otherwise. The verdicts come from the same acmg::acmg_sf the clinical section calls. Without step 23's clinical VCF the card says high_impact_checked false and high_impact_note names why and what it can miss; an unreadable clinical VCF costs only the HIGH-impact source. The clinical section keeps its nested card for the readers that still use it. The full-summary parity goldens gain the section. Bead: D11 Bead: D14 --- .../og-summary/src/collect/acmg_card.rs | 115 +- rust/crates/og-summary/src/collect/group_b.rs | 37 +- rust/crates/og-summary/src/collect/post.rs | 8 +- .../crates/og-summary/src/collect/sections.rs | 2 + .../summary-collect/all-bad/all-bad.json | 1517 +++++++++-------- .../all-default-out/history-bad/summary.json | 534 ++++++ .../summary-collect/all-empty/all-empty.json | 528 ++++++ .../all-failed/all-failed.json | 528 ++++++ .../all-history-bad/all-history-bad.json | 534 ++++++ .../all-history/all-history.json | 136 +- .../summary-collect/all-inf/all-inf.json | 11 +- .../golden/summary-collect/all-nf/all-nf.json | 135 +- .../golden/summary-collect/all/all.json | 135 +- tests/schema/summary.schema.json | 60 + 14 files changed, 3511 insertions(+), 769 deletions(-) create mode 100644 tests/parity/golden/summary-collect/all-default-out/history-bad/summary.json create mode 100644 tests/parity/golden/summary-collect/all-empty/all-empty.json create mode 100644 tests/parity/golden/summary-collect/all-failed/all-failed.json create mode 100644 tests/parity/golden/summary-collect/all-history-bad/all-history-bad.json diff --git a/rust/crates/og-summary/src/collect/acmg_card.rs b/rust/crates/og-summary/src/collect/acmg_card.rs index 9506a9040..d492a368d 100644 --- a/rust/crates/og-summary/src/collect/acmg_card.rs +++ b/rust/crates/og-summary/src/collect/acmg_card.rs @@ -1,2 +1,113 @@ -//! The summary section of the ACMG card, computed from the step 06 hits. -//! Empty until its unit of the 1.0.0 plan lands. +//! The ACMG secondary-findings card as its own summary section, +//! `acmg_sf`, whose state follows step 06: ok when step 06's ClinVar hits +//! VCF is there, not run (or failed) with step 06's reason otherwise. +//! +//! The card's main input needs no VEP: step 06's P/LP hits, step 05's +//! class 4 and 5 SVs and step 35's deletions, with each gene's rule from +//! `assets/acmg_sf.tsv`. Only the rare HIGH-impact source needs step 23's +//! clinical VCF, so a run without the VEP cache still gets the card. The +//! verdicts are [`acmg::acmg_sf`]'s, the one function the clinical section +//! also calls: with the clinical VCF when it is there and readable, without +//! it otherwise. Without it the card says `high_impact_checked: false` and +//! `high_impact_note` names why and what that can miss. + +use super::acmg::{self, ClinicalVcf}; +use super::clinvar::HitsVcf; +use super::two_hits::DeletionInputs; +use pycompat::json::Value; + +/// Why step 23's rare HIGH-impact records are not in the card. +#[derive(Debug, Clone, PartialEq)] +pub enum NoHighImpact { + /// The run status gives step 23's result (`failed (exit 1)`, + /// `skipped (needs VEP, ...)`, or `ok` with no clinical VCF left). + Step23(String), + /// No run status names step 23 (a Nextflow report, a folder without + /// `logs/run_status.tsv`). + NotRun, + /// The clinical VCF is there and cannot be read. + Unreadable(String), +} + +impl NoHighImpact { + /// `high_impact_note`: why, then what the card can miss. + pub fn note(&self) -> String { + let why = match self { + NoHighImpact::Step23(r) if r.starts_with("failed") => { + format!("step 23 (clinical filter) {r}") + } + NoHighImpact::Step23(r) if r.starts_with("skipped") => { + format!("step 23 (clinical filter) was {r}") + } + NoHighImpact::Step23(r) => { + format!("step 23 (clinical filter) was {r} but wrote no clinical VCF") + } + NoHighImpact::NotRun => { + "step 23 (clinical filter) did not run; it needs VEP's annotation (step 13) and \ + the VEP cache" + .to_owned() + } + NoHighImpact::Unreadable(e) => format!("step 23's clinical VCF cannot be read: {e}"), + }; + format!( + "Rare HIGH-impact variants were not screened: {why}. This card holds the ClinVar P/LP \ + hits and the class 4 and 5 structural variants only, so it can miss a predicted \ + loss-of-function variant that is not in ClinVar, alone or as the second hit of a \ + recessive gene." + ) + } +} + +/// What the card reads: the step 06 hits, the clinical VCF when step 23 +/// left one, the deletions of the two-hit rule, and step 23's result word +/// from the run status. +pub struct Inputs<'a> { + pub assets: &'a str, + pub hits: &'a HitsVcf, + pub clinical: Option<&'a Result>, + pub deletions: &'a DeletionInputs, + pub step23: Option<&'a str>, +} + +/// The data of the `acmg_sf` section. +#[derive(Debug, Clone, PartialEq)] +pub struct AcmgCard(pub Value); + +impl AcmgCard { + /// The card. An `Err` is the section's note (a hits record whose POS + /// is no integer); a rules list or a hits VCF that cannot be read gives + /// the card's `unavailable` form, as in the clinical section. + pub fn read(i: &Inputs) -> Result { + // A clinical VCF that cannot be read costs the HIGH-impact source + // only, never the ClinVar rows. + let (clinical, missing) = match i.clinical { + Some(Ok(c)) => match &c.high { + Ok(_) => (i.clinical, None), + Err(e) => (None, Some(NoHighImpact::Unreadable(e.clone()))), + }, + Some(Err(e)) => (None, Some(NoHighImpact::Unreadable(e.clone()))), + None => ( + None, + Some(i.step23.map_or(NoHighImpact::NotRun, |r| { + NoHighImpact::Step23(r.to_owned()) + })), + ), + }; + let mut v = acmg::acmg_sf(&acmg::Inputs { + assets: i.assets, + hits: Some(&i.hits.read), + clinical, + deletions: i.deletions, + })?; + if let (Value::Object(m), Some(why)) = (&mut v, missing) + && m.get("high_impact_checked") == Some(&Value::Bool(false)) + { + m.insert("high_impact_note".into(), Value::Str(why.note())); + } + Ok(AcmgCard(v)) + } + + pub fn to_json(&self) -> Value { + self.0.clone() + } +} diff --git a/rust/crates/og-summary/src/collect/group_b.rs b/rust/crates/og-summary/src/collect/group_b.rs index 81426f5bb..7da3e7096 100644 --- a/rust/crates/og-summary/src/collect/group_b.rs +++ b/rust/crates/og-summary/src/collect/group_b.rs @@ -1,15 +1,18 @@ //! Group b of `og summary collect`: the clinical sections. ClinVar, the //! carrier list, PharmCAT, CPIC, pypgx, Cyrius, CPSR, the clinical filter -//! with its ACMG secondary-findings tier, slivar, and the `cyp2d6` block. +//! with its ACMG secondary-findings tier, the ACMG card of its own +//! (`acmg_sf`, step 06), slivar, and the `cyp2d6` block. //! //! Each input is read once: the ClinVar hits VCF feeds the ClinVar -//! section, the ACMG tier, the carrier list and CPSR's call floor; the -//! clinical VCF feeds the record count and the ACMG tier; AnnotSV's table +//! section, the ACMG card, the ACMG tier, the carrier list and CPSR's call +//! floor; the clinical VCF feeds the record count, the ACMG card and the +//! ACMG tier; AnnotSV's table //! and step 35's copy-number tables feed both two-hit readings. The //! sections are read one at a time, so the peak memory is the biggest //! section's, not the sum. use super::acmg::{self, ClinicalVcf}; +use super::acmg_card::{self, AcmgCard}; use super::carrier::Carrier; use super::clinical::{Clinical, Slivar}; use super::clinvar::{ClinVar, Floor, HitsVcf}; @@ -22,7 +25,7 @@ use super::two_hits::{self, DeletionInputs}; use super::{Folder, Input, Read, read_at, with_mtime}; /// The sections `og summary collect --only b` reads, in summary.json's order. -pub const GROUP_B: [Spec; 9] = [ +pub const GROUP_B: [Spec; 10] = [ Spec { key: "clinvar", title: "ClinVar screen", @@ -33,6 +36,11 @@ pub const GROUP_B: [Spec; 9] = [ title: "Carrier list", step: "06", }, + Spec { + key: "acmg_sf", + title: "ACMG secondary findings", + step: "06", + }, Spec { key: "pharmcat", title: "PharmCAT", @@ -134,10 +142,27 @@ pub fn read(input: &Input, folder: &Folder) -> Vec
{ Some(h) => ClinVar::read(h, d, &side, &s) .and_then(|data| with_mtime(&h.path, h.rel.clone(), Data::ClinVar(data))), }; + let clinical_vcf = clinical_vcf_at.as_ref().map(|(v, _)| ClinicalVcf::read(v)); + // The card follows step 06: it needs the hits, not step 23. + let acmg_sf: Read = match &hits { + None => Ok(None), + Some(h) => AcmgCard::read(&acmg_card::Inputs { + assets: &input.assets, + hits: h, + clinical: clinical_vcf.as_ref(), + deletions: &deletions, + step23: folder + .run + .as_ref() + .and_then(|r| r.steps.get("23")) + .map(String::as_str), + }) + .and_then(|c| with_mtime(&h.path, h.rel.clone(), Data::AcmgSf(c))), + }; let clinical: Read = match clinical_table.clone().or_else(|| clinical_vcf_at.clone()) { None => Ok(None), Some((p, rel)) => { - let vcf = clinical_vcf_at.as_ref().map(|(v, _)| ClinicalVcf::read(v)); + let vcf = clinical_vcf; let tier = acmg::Inputs { assets: &input.assets, hits: hits.as_ref().map(|h| &h.read), @@ -155,7 +180,7 @@ pub fn read(input: &Input, folder: &Folder) -> Vec
{ let rest = read_rest(input, &s, index, &find, &hits, &deletions); let [carrier, pharmcat, cpic, pypgx, cyrius, cpsr, slivar] = rest; let reads = [ - clinvar, carrier, pharmcat, cpic, pypgx, cyrius, cpsr, clinical, slivar, + clinvar, carrier, acmg_sf, pharmcat, cpic, pypgx, cyrius, cpsr, clinical, slivar, ]; GROUP_B .iter() diff --git a/rust/crates/og-summary/src/collect/post.rs b/rust/crates/og-summary/src/collect/post.rs index 305bc87ac..b528b9b59 100644 --- a/rust/crates/og-summary/src/collect/post.rs +++ b/rust/crates/og-summary/src/collect/post.rs @@ -32,7 +32,7 @@ use pycompat::value::truthy; use std::path::Path; /// summary.json's sections, in its order. -pub const ORDER: [&str; 48] = [ +pub const ORDER: [&str; 49] = [ "coverage", "callability", "sex_check", @@ -43,6 +43,7 @@ pub const ORDER: [&str; 48] = [ "clinvar", "couple", "carrier", + "acmg_sf", "pharmcat", "cpic", "pypgx", @@ -85,8 +86,9 @@ pub const ORDER: [&str; 48] = [ /// Sections that are no step of their own, so never in `not_run`: the read /// count is written by alignment, which a run from a BAM or a VCF never -/// does; the couple screen and the carrier list come with other steps. -const NOT_A_STEP: [&str; 3] = ["read_count", "couple", "carrier"]; +/// does; the couple screen, the carrier list and the ACMG secondary-findings +/// card come with other steps (39 and 06), whose own sections say not run. +const NOT_A_STEP: [&str; 4] = ["read_count", "couple", "carrier", "acmg_sf"]; /// What no step assesses. const NOT_ASSESSED: [&str; 5] = [ diff --git a/rust/crates/og-summary/src/collect/sections.rs b/rust/crates/og-summary/src/collect/sections.rs index a354c126f..8b5e5f73f 100644 --- a/rust/crates/og-summary/src/collect/sections.rs +++ b/rust/crates/og-summary/src/collect/sections.rs @@ -24,6 +24,7 @@ pub enum Data { Json(Value), ClinVar(super::clinvar::ClinVar), Carrier(super::carrier::Carrier), + AcmgSf(super::acmg_card::AcmgCard), PharmCat(super::pgx::PharmCat), Cpic(super::pgx::Cpic), Pypgx(super::pgx::Pypgx), @@ -46,6 +47,7 @@ impl Data { Data::Json(v) => v.clone(), Data::ClinVar(d) => d.to_json(), Data::Carrier(d) => d.to_json(), + Data::AcmgSf(d) => d.to_json(), Data::PharmCat(d) => d.to_json(), Data::Cpic(d) => d.to_json(), Data::Pypgx(d) => d.to_json(), diff --git a/tests/parity/golden/summary-collect/all-bad/all-bad.json b/tests/parity/golden/summary-collect/all-bad/all-bad.json index 24bc28580..13c65ca8c 100644 --- a/tests/parity/golden/summary-collect/all-bad/all-bad.json +++ b/tests/parity/golden/summary-collect/all-bad/all-bad.json @@ -1,759 +1,768 @@ { - "schema_version": 2, - "sample": "S", - "generated_utc": "2026-11-15 00:19 UTC", - "run": { - "status_file": false, - "started_utc": null, - "declared_sex": null - }, - "databases": { - "clinvar_release": null, - "cpsr_clinvar_release": null, - "hla_database": null - }, - "manifest": [], - "sections": { - "coverage": { - "title": "Coverage (mosdepth)", - "step": "16b", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "ValueError: could not convert string to float: 'abc'", - "data": {} - }, - "callability": { - "title": "Gene callability (mosdepth)", - "step": "16b", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_callability.bed.gz is not mosdepth's thresholds table of one depth", - "data": {} - }, - "sex_check": { - "title": "Sex check (indexcov)", - "step": "16", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "indexcov-indexcov.ped has no sex column or no sample row", - "data": {} - }, - "sample_qc": { - "title": "Sample identity and contamination (somalier, VerifyBamID2)", - "step": "33", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_sample_qc.tsv has no inferred_sex row", - "data": {} - }, - "mosaic_sex_loss": { - "title": "Mosaic loss of chromosome Y or X", - "step": "33", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_sample_qc.tsv has no mosaic_call row (detected, not_detected, gain, not_estimated)", - "data": {} - }, - "read_count": { - "title": "Reads kept by alignment", - "step": "02", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_read_count.tsv has no whole number for input_reads", - "data": {} - }, - "variants": { - "title": "Variant calling", - "step": "03", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S.vcf.gz: Compressed file ended before the end-of-stream marker was reached", - "data": {} - }, - "clinvar": { - "title": "ClinVar screen", - "step": "06", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "ValueError: invalid literal for int() with base 10: 'x'", - "data": {} - }, - "couple": { - "title": "Couple carrier screen", - "step": "39", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_couple_carrier.tsv line 2 is not a row of S's couple table", - "data": {} - }, - "carrier": { - "title": "Carrier list", - "step": "06", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "ValueError: invalid literal for int() with base 10: 'x'", - "data": {} - }, - "pharmcat": { - "title": "PharmCAT", - "step": "07", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S.report.json: Expecting value: line 1 column 21 (char 20)", - "data": {} - }, - "cpic": { - "title": "CPIC drug-gene recommendations", - "step": "27", - "state": "ok", - "source": "cpic/S_phenotypes.tsv", - "file_date": "2021-03-04 05:06 UTC", - "note": null, - "data": { - "genes": [], - "non_normal": 0, - "ambiguous": 0, - "not_called": 0, - "unclassified": 0, - "parse_failed": true, - "warnings": [] - } - }, - "pypgx": { - "title": "pypgx", - "step": "32", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "KeyError: 'Gene'", - "data": {} - }, - "cyrius": { - "title": "Cyrius (CYP2D6)", - "step": "21", - "state": "ok", - "source": "cyrius/S_cyp2d6.tsv", - "file_date": "2021-03-04 05:06 UTC", - "note": null, - "data": { - "genotype": "none", - "filter": "" - } - }, - "parascopy": { - "title": "SMN1/SMN2 copy number (Parascopy, short reads)", - "step": "35", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_smn_copy_number.tsv lacks the chrom, start, end, agCN, agCN_filter, agCN_qual, psCN, psCN_qual or psCN_filter column", - "data": {} - }, - "paralogs": { - "title": "Paralog genes (Paraphase, PacBio HiFi)", - "step": "35b", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_paraphase_copy_number.tsv lacks the region, gene, copy_number or status column", - "data": {} - }, - "hla": { - "title": "HLA typing (T1K)", - "step": "08", - "state": "ok", - "source": "hla_t1k/S_hla_genotype.tsv", - "file_date": "2021-03-04 05:06 UTC", - "note": null, - "data": { - "loci": [ - { - "gene": "HLA-A", - "alleles": [ - "A*02:01" - ], - "quality": [ - "x" - ], - "low_confidence": true, - "withheld_from_pharmcat": true, - "candidates": [ - 1 - ], - "one_allele_type": false - } - ], - "derived": { - "coeliac": { - "status": "not_determined", - "reason": "HLA-DQA1 not typed; HLA-DQB1 not typed", - "dq2_5": null, - "dq2_5_phase": null, - "dq2_2": null, - "dq8": null, - "dqb1_02_dose": null - }, - "alleles": [ - { - "allele": "A*31:01", - "kind": "drug", - "association": "carbamazepine hypersensitivity reactions in Europeans", - "pmids": "21428769", - "citation": "McCormack 2011, N Engl J Med", - "state": "not_determined", - "reason": "HLA-A low confidence" - }, - { - "allele": "B*15:02", - "kind": "drug", - "association": "carbamazepine Stevens-Johnson syndrome in Han Chinese", - "pmids": "15057820", - "citation": "Chung 2004, Nature", - "state": "not_determined", - "reason": "HLA-B not typed" - }, - { - "allele": "B*57:01", - "kind": "drug", - "association": "abacavir hypersensitivity; flucloxacillin liver injury", - "pmids": "18256392,19483685", - "citation": "Mallal 2008, N Engl J Med; Daly 2009, Nat Genet", - "state": "not_determined", - "reason": "HLA-B not typed" - }, - { - "allele": "B*58:01", - "kind": "drug", - "association": "allopurinol severe skin reactions", - "pmids": "15743917", - "citation": "Hung 2005, Proc Natl Acad Sci U S A", - "state": "not_determined", - "reason": "HLA-B not typed" - }, - { - "allele": "B*27", - "kind": "disease", - "association": "ankylosing spondylitis", - "pmids": "4123836,4688372", - "citation": "Brewerton 1973, Lancet; Schlosstein 1973, N Engl J Med", - "state": "not_determined", - "reason": "HLA-B not typed" - }, - { - "allele": "C*06:02", - "kind": "disease", - "association": "psoriasis", - "pmids": "16642438", - "citation": "Nair 2006, Am J Hum Genet", - "state": "not_determined", - "reason": "HLA-C not typed" - }, - { - "allele": "DQB1*06:02", - "kind": "disease", - "association": "narcolepsy with cataplexy", - "pmids": "11179016", - "citation": "Mignot 2001, Am J Hum Genet", - "state": "not_determined", - "reason": "HLA-DQB1 not typed" - }, - { - "allele": "DRB1*15:01", - "kind": "disease", - "association": "multiple sclerosis", - "pmids": "12557126", - "citation": "Barcellos 2003, Am J Hum Genet", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - }, - { - "allele": "DRB1*01:01", - "kind": "disease", - "association": "rheumatoid arthritis, shared epitope allele", - "pmids": "2446635", - "citation": "Gregersen 1987, Arthritis Rheum", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - }, - { - "allele": "DRB1*04:01", - "kind": "disease", - "association": "rheumatoid arthritis, shared epitope allele", - "pmids": "2446635", - "citation": "Gregersen 1987, Arthritis Rheum", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - }, - { - "allele": "DRB1*04:04", - "kind": "disease", - "association": "rheumatoid arthritis, shared epitope allele", - "pmids": "2446635", - "citation": "Gregersen 1987, Arthritis Rheum", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - }, - { - "allele": "DRB1*04:05", - "kind": "disease", - "association": "rheumatoid arthritis, shared epitope allele", - "pmids": "2446635", - "citation": "Gregersen 1987, Arthritis Rheum", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - }, - { - "allele": "DRB1*04:08", - "kind": "disease", - "association": "rheumatoid arthritis, shared epitope allele", - "pmids": "2446635", - "citation": "Gregersen 1987, Arthritis Rheum", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - }, - { - "allele": "DRB1*14:02", - "kind": "disease", - "association": "rheumatoid arthritis, shared epitope allele", - "pmids": "2446635", - "citation": "Gregersen 1987, Arthritis Rheum", - "state": "not_determined", - "reason": "HLA-DRB1 not typed" - } - ] - } - } - }, - "prs": { - "title": "Polygenic risk scores", - "step": "25", - "state": "missing", - "source": null, - "file_date": null, - "note": null, - "data": {} - }, - "ancestry_fine": { - "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", - "step": "26b", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_ancestry_fine.tsv has no rows or lacks a column of ['code', 'fraction', 'group', 'high', 'level', 'low', 'se']", - "data": {} - }, - "manta": { - "title": "Structural variants (Manta)", - "step": "04", - "state": "missing", - "source": null, - "file_date": null, - "note": null, - "data": {} - }, - "delly": { - "title": "Structural variants (Delly)", - "step": "19", - "state": "missing", - "source": null, - "file_date": null, - "note": null, - "data": {} - }, - "cnvpytor": { - "title": "Copy number (CNVpytor)", - "step": "18", - "state": "missing", - "source": null, - "file_date": null, - "note": null, - "data": {} - }, - "sv_consensus": { - "title": "SV consensus merge", - "step": "22", - "state": "missing", - "source": null, - "file_date": null, - "note": null, - "data": {} - }, - "annotsv": { - "title": "Structural variants, class 4 and 5 (AnnotSV)", - "step": "05", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_sv_class4_5_checked.tsv lacks a column of ['ACMG_class', 'Caller', 'Common', 'Exon_edge', 'Population_AF', 'SV_chrom', 'SV_end', 'SV_start', 'SV_type']", - "data": {} - }, - "expansions": { - "title": "Repeat expansions (ExpansionHunter)", - "step": "09", - "state": "ok", - "source": "expansion_hunter/S_eh.vcf", - "file_date": "2021-03-04 05:06 UTC", - "note": null, - "data": { - "records": 2, - "key_loci": [ - { - "locus": "HTT", - "repeat_count": "not in output" - }, - { - "locus": "FMR1", - "repeat_count": "not in output" - }, - { - "locus": "C9ORF72", - "repeat_count": "not in output" - }, - { - "locus": "ATXN1", - "repeat_count": "not in output" - }, - { - "locus": "DMPK", - "repeat_count": "not in output" - } - ], - "loci": [ - { - "locus": "CFTR_T", - "repeat_count": "7/9", - "status": "", - "normal_max": "", - "pathologic_min": "", - "support": "SPANNING/SPANNING", - "adsp": "8/9", - "ci": "7-7/9-9", - "sizing": "sized", - "allele_sizing": "sized/sized", - "zone": "", - "zone_label": "", - "zone_citation": "" - }, - { - "locus": "CFTR_TG", - "repeat_count": "11/12", - "status": "", - "normal_max": "", - "pathologic_min": "", - "support": "SPANNING/FLANKING", - "adsp": "8/0", - "ci": "11-11/12-12", - "sizing": "flanking_only", - "allele_sizing": "sized/flanking_only", - "zone": "", - "zone_label": "", - "zone_citation": "" - } - ], - "stranger": false, - "stranger_outdated": false, - "unsized": [ - "CFTR_TG" - ], - "intermediate": [], - "readings": [ - { - "locus": "CFTR", - "repeat": "intron 9 (legacy IVS8) TG and poly-T tract", - "source": "Deignan et al. 2020, PMID 32404922", - "status": "not_sized", - "genotype": ".", - "phase": ".", - "reading": "ExpansionHunter did not size both tracts (TG 11/12, flanking_only; poly-T 7/9, sized): not read." - }, - { - "locus": "UGT1A1", - "repeat": "promoter TA repeat", - "source": "Gammal et al. 2016, PMID 26417955", - "status": "not_sized", - "genotype": ".", - "pharmcat": ".", - "agreement": "not_compared", - "reading": "not in step 09's output: STR_EXTRA_LOCI=yes ./scripts/setup.sh --strchive-data adds the repeat to the catalog (docs/09-str-expansions.md). PharmCAT (step 7) still reads UGT1A1 *28." - }, - { - "locus": "SLC6A4", - "repeat": "5-HTTLPR promoter length polymorphism", - "status": "not_tested", - "genotype": ".", - "reading": "not tested by any step. CPIC's 2023 SSRI guideline (Bousman et al. 2023, PMID 37032427) found that the data on SLC6A4 do not support its use in antidepressant prescribing, so a result would carry no recommendation.", - "source": "Bousman et al. 2023, PMID 37032427" - } - ] - } - }, - "telomere": { - "title": "Telomere content (TelomereHunter)", - "step": "10", - "state": "ok", - "source": "telomere/S/S_summary.tsv", - "file_date": "2021-03-04 05:06 UTC", - "note": null, - "data": { - "tel_content": "1.5", - "intratelomeric_reads": 40, - "read_check": "depth unknown (no total_reads or read_lengths in the summary): not checked" - } - }, - "roh": { - "title": "Runs of homozygosity", - "step": "11", - "state": "ok", - "source": "vcf/S_roh.txt", - "file_date": "2021-03-04 05:06 UTC", - "note": null, - "data": { - "segments": 0, - "total_mb": 0.0, - "largest_mb": 0.0, - "autosomal_over_5mb": [], - "masked_mb": 0.0, - "sex_chromosome_segments": 0, - "long_mb": 0.0, - "f_roh": null, - "relationship": null, - "upd_flag": null, - "scope": { - "source": "segments_only", - "autosomes": [], - "unmasked_bp": 0, - "partial": true, - "note": "Partial or unverified chromosome scope: no relationship band or UPD flag. F_ROH uses only the listed chromosomes, not callable bases." - } + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:58 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "coverage": { + "title": "Coverage (mosdepth)", + "step": "16b", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "ValueError: could not convert string to float: 'abc'", + "data": {} + }, + "callability": { + "title": "Gene callability (mosdepth)", + "step": "16b", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_callability.bed.gz is not mosdepth's thresholds table of one depth", + "data": {} + }, + "sex_check": { + "title": "Sex check (indexcov)", + "step": "16", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "indexcov-indexcov.ped has no sex column or no sample row", + "data": {} + }, + "sample_qc": { + "title": "Sample identity and contamination (somalier, VerifyBamID2)", + "step": "33", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_sample_qc.tsv has no inferred_sex row", + "data": {} + }, + "mosaic_sex_loss": { + "title": "Mosaic loss of chromosome Y or X", + "step": "33", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_sample_qc.tsv has no mosaic_call row (detected, not_detected, gain, not_estimated)", + "data": {} + }, + "read_count": { + "title": "Reads kept by alignment", + "step": "02", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_read_count.tsv has no whole number for input_reads", + "data": {} + }, + "variants": { + "title": "Variant calling", + "step": "03", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S.vcf.gz: Compressed file ended before the end-of-stream marker was reached", + "data": {} + }, + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "ValueError: invalid literal for int() with base 10: 'x'", + "data": {} + }, + "couple": { + "title": "Couple carrier screen", + "step": "39", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_couple_carrier.tsv line 2 is not a row of S's couple table", + "data": {} + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "ValueError: invalid literal for int() with base 10: 'x'", + "data": {} + }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "ValueError: invalid literal for int() with base 10: 'x'", + "data": {} + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S.report.json: Expecting value: line 1 column 21 (char 20)", + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "ok", + "source": "cpic/S_phenotypes.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genes": [], + "non_normal": 0, + "ambiguous": 0, + "not_called": 0, + "unclassified": 0, + "parse_failed": true, + "warnings": [] + } + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "KeyError: 'Gene'", + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "ok", + "source": "cyrius/S_cyp2d6.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "genotype": "none", + "filter": "" + } + }, + "parascopy": { + "title": "SMN1/SMN2 copy number (Parascopy, short reads)", + "step": "35", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_smn_copy_number.tsv lacks the chrom, start, end, agCN, agCN_filter, agCN_qual, psCN, psCN_qual or psCN_filter column", + "data": {} + }, + "paralogs": { + "title": "Paralog genes (Paraphase, PacBio HiFi)", + "step": "35b", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_paraphase_copy_number.tsv lacks the region, gene, copy_number or status column", + "data": {} + }, + "hla": { + "title": "HLA typing (T1K)", + "step": "08", + "state": "ok", + "source": "hla_t1k/S_hla_genotype.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "loci": [ + { + "gene": "HLA-A", + "alleles": [ + "A*02:01" + ], + "quality": [ + "x" + ], + "low_confidence": true, + "withheld_from_pharmcat": true, + "candidates": [ + 1 + ], + "one_allele_type": false + } + ], + "derived": { + "coeliac": { + "status": "not_determined", + "reason": "HLA-DQA1 not typed; HLA-DQB1 not typed", + "dq2_5": null, + "dq2_5_phase": null, + "dq2_2": null, + "dq8": null, + "dqb1_02_dose": null + }, + "alleles": [ + { + "allele": "A*31:01", + "kind": "drug", + "association": "carbamazepine hypersensitivity reactions in Europeans", + "pmids": "21428769", + "citation": "McCormack 2011, N Engl J Med", + "state": "not_determined", + "reason": "HLA-A low confidence" + }, + { + "allele": "B*15:02", + "kind": "drug", + "association": "carbamazepine Stevens-Johnson syndrome in Han Chinese", + "pmids": "15057820", + "citation": "Chung 2004, Nature", + "state": "not_determined", + "reason": "HLA-B not typed" + }, + { + "allele": "B*57:01", + "kind": "drug", + "association": "abacavir hypersensitivity; flucloxacillin liver injury", + "pmids": "18256392,19483685", + "citation": "Mallal 2008, N Engl J Med; Daly 2009, Nat Genet", + "state": "not_determined", + "reason": "HLA-B not typed" + }, + { + "allele": "B*58:01", + "kind": "drug", + "association": "allopurinol severe skin reactions", + "pmids": "15743917", + "citation": "Hung 2005, Proc Natl Acad Sci U S A", + "state": "not_determined", + "reason": "HLA-B not typed" + }, + { + "allele": "B*27", + "kind": "disease", + "association": "ankylosing spondylitis", + "pmids": "4123836,4688372", + "citation": "Brewerton 1973, Lancet; Schlosstein 1973, N Engl J Med", + "state": "not_determined", + "reason": "HLA-B not typed" + }, + { + "allele": "C*06:02", + "kind": "disease", + "association": "psoriasis", + "pmids": "16642438", + "citation": "Nair 2006, Am J Hum Genet", + "state": "not_determined", + "reason": "HLA-C not typed" + }, + { + "allele": "DQB1*06:02", + "kind": "disease", + "association": "narcolepsy with cataplexy", + "pmids": "11179016", + "citation": "Mignot 2001, Am J Hum Genet", + "state": "not_determined", + "reason": "HLA-DQB1 not typed" + }, + { + "allele": "DRB1*15:01", + "kind": "disease", + "association": "multiple sclerosis", + "pmids": "12557126", + "citation": "Barcellos 2003, Am J Hum Genet", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" + }, + { + "allele": "DRB1*01:01", + "kind": "disease", + "association": "rheumatoid arthritis, shared epitope allele", + "pmids": "2446635", + "citation": "Gregersen 1987, Arthritis Rheum", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" + }, + { + "allele": "DRB1*04:01", + "kind": "disease", + "association": "rheumatoid arthritis, shared epitope allele", + "pmids": "2446635", + "citation": "Gregersen 1987, Arthritis Rheum", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" + }, + { + "allele": "DRB1*04:04", + "kind": "disease", + "association": "rheumatoid arthritis, shared epitope allele", + "pmids": "2446635", + "citation": "Gregersen 1987, Arthritis Rheum", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" + }, + { + "allele": "DRB1*04:05", + "kind": "disease", + "association": "rheumatoid arthritis, shared epitope allele", + "pmids": "2446635", + "citation": "Gregersen 1987, Arthritis Rheum", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" + }, + { + "allele": "DRB1*04:08", + "kind": "disease", + "association": "rheumatoid arthritis, shared epitope allele", + "pmids": "2446635", + "citation": "Gregersen 1987, Arthritis Rheum", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" + }, + { + "allele": "DRB1*14:02", + "kind": "disease", + "association": "rheumatoid arthritis, shared epitope allele", + "pmids": "2446635", + "citation": "Gregersen 1987, Arthritis Rheum", + "state": "not_determined", + "reason": "HLA-DRB1 not typed" } - }, - "haplogroup": { - "title": "Mitochondrial haplogroup", - "step": "12", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_haplocheck.txt has no Contamination Status column", - "data": {} - }, - "y_haplogroup": { - "title": "Y-chromosome haplogroup (Yleaf)", - "step": "37", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_y_haplogroup.txt has no Hg column or no sample row", - "data": {} - }, - "y_tree": { - "title": "Y placement on the current public tree", - "step": "37", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_y_tree.txt lacks a column of Hg, Level, Tree", - "data": {} - }, - "y_str": { - "title": "Y-STR markers (HipSTR)", - "step": "45", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_y_str.tsv has a confidence other than high, low, no call or not callable", - "data": {} - }, - "consumer_export": { - "title": "Raw-data export (23andMe v5 layout)", - "step": "40", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_consumer_export.tsv has no whole-number 'sites' row", - "data": {} - }, - "bloodtype": { - "title": "Blood groups (predicted)", - "step": "41", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_bloodtype.tsv has no system, phenotype and confidence columns, or no row", - "data": {} - }, - "lpa": { - "title": "Lp(a): LPA KIV-2 repeat count", - "step": "46", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_lpa_kiv2.tsv has no status row (estimated, too little depth or not assessed)", - "data": {} - }, - "vntyper": { - "title": "MUC1 VNTR frameshifts (VNtyper)", - "step": "52", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_vntyper.tsv has no status row (positive, possible, negative, not assessed)", - "data": {} - }, - "locityper": { - "title": "Locityper second opinion at hard loci", - "step": "53", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_locityper.tsv lacks a row or one of the columns locus, region, status, genotype, haplotype_1, haplotype_2, quality, total_reads, unexplained_reads, weighted_distance, warnings, filter, reason", - "data": {} - }, - "mito": { - "title": "Mitochondrial variants", - "step": "20", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "KeyError: 'length'", - "data": {} - }, - "traits": { - "title": "Traits panel", - "step": "42", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_traits.tsv line 2 does not have one field per column", - "data": {} - }, - "archaic": { - "title": "Archaic ancestry (IBDmix)", - "step": "43", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_archaic.tsv has no percentage for neanderthal_percent", - "data": {} - }, - "ancient": { - "title": "Ancient populations (AADR PCA)", - "step": "44", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_ancient.tsv has no rows or lacks a column of ['country', 'dates', 'distance', 'group', 'locality', 'n', 'rank']", - "data": {} - }, - "viral": { - "title": "Viral DNA in the unmapped reads", - "step": "47", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_viral.tsv has no rows or lacks a column of virus, accession, reads, breadth, relative_depth, copies_per_cell, call", - "data": {} - }, - "exomiser": { - "title": "Symptom-driven ranking (Exomiser)", - "step": "48", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_exomiser_top.tsv lacks a column of rank, gene, moi, exomiser_score, phenotype_score, variant, genotype, consequence, hgvs, acmg, disease", - "data": {} - }, - "chip": { - "title": "Clonal haematopoiesis (CHIP)", - "step": "49", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_chip.tsv lacks a column of gene, protein_change, vaf, alt_reads, depth, status, note", - "data": {} - }, - "mei": { - "title": "Mobile element insertions (MEGAnE)", - "step": "50", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_mei.tsv is missing beside S_mei_sites.tsv", - "data": {} - }, - "mosaic": { - "title": "Mosaic chromosomal alterations (MoChA)", - "step": "51", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_mocha.tsv has 1 reported calls, S_mocha_summary.tsv says 2", - "data": {} - }, - "cpsr": { - "title": "Cancer predisposition (CPSR)", - "step": "17", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S.cpsr.grch38.classification.tsv.gz: Compressed file ended before the end-of-stream marker was reached", - "data": {} - }, - "clinical": { - "title": "Clinical variant filter", - "step": "23", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "ValueError: invalid literal for int() with base 10: 'x'", - "data": {} - }, - "slivar": { - "title": "Variant prioritization (slivar)", - "step": "31", - "state": "unreadable", - "source": null, - "file_date": null, - "note": "S_prioritized.vcf.gz: Compressed file ended before the end-of-stream marker was reached", - "data": {} + ] + } + } + }, + "prs": { + "title": "Polygenic risk scores", + "step": "25", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancestry_fine": { + "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", + "step": "26b", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_ancestry_fine.tsv has no rows or lacks a column of ['code', 'fraction', 'group', 'high', 'level', 'low', 'se']", + "data": {} + }, + "manta": { + "title": "Structural variants (Manta)", + "step": "04", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "delly": { + "title": "Structural variants (Delly)", + "step": "19", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cnvpytor": { + "title": "Copy number (CNVpytor)", + "step": "18", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sv_consensus": { + "title": "SV consensus merge", + "step": "22", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "annotsv": { + "title": "Structural variants, class 4 and 5 (AnnotSV)", + "step": "05", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_sv_class4_5_checked.tsv lacks a column of ['ACMG_class', 'Caller', 'Common', 'Exon_edge', 'Population_AF', 'SV_chrom', 'SV_end', 'SV_start', 'SV_type']", + "data": {} + }, + "expansions": { + "title": "Repeat expansions (ExpansionHunter)", + "step": "09", + "state": "ok", + "source": "expansion_hunter/S_eh.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "records": 2, + "key_loci": [ + { + "locus": "HTT", + "repeat_count": "not in output" + }, + { + "locus": "FMR1", + "repeat_count": "not in output" + }, + { + "locus": "C9ORF72", + "repeat_count": "not in output" + }, + { + "locus": "ATXN1", + "repeat_count": "not in output" + }, + { + "locus": "DMPK", + "repeat_count": "not in output" + } + ], + "loci": [ + { + "locus": "CFTR_T", + "repeat_count": "7/9", + "status": "", + "normal_max": "", + "pathologic_min": "", + "support": "SPANNING/SPANNING", + "adsp": "8/9", + "ci": "7-7/9-9", + "sizing": "sized", + "allele_sizing": "sized/sized", + "zone": "", + "zone_label": "", + "zone_citation": "" + }, + { + "locus": "CFTR_TG", + "repeat_count": "11/12", + "status": "", + "normal_max": "", + "pathologic_min": "", + "support": "SPANNING/FLANKING", + "adsp": "8/0", + "ci": "11-11/12-12", + "sizing": "flanking_only", + "allele_sizing": "sized/flanking_only", + "zone": "", + "zone_label": "", + "zone_citation": "" + } + ], + "stranger": false, + "stranger_outdated": false, + "unsized": [ + "CFTR_TG" + ], + "intermediate": [], + "readings": [ + { + "locus": "CFTR", + "repeat": "intron 9 (legacy IVS8) TG and poly-T tract", + "source": "Deignan et al. 2020, PMID 32404922", + "status": "not_sized", + "genotype": ".", + "phase": ".", + "reading": "ExpansionHunter did not size both tracts (TG 11/12, flanking_only; poly-T 7/9, sized): not read." + }, + { + "locus": "UGT1A1", + "repeat": "promoter TA repeat", + "source": "Gammal et al. 2016, PMID 26417955", + "status": "not_sized", + "genotype": ".", + "pharmcat": ".", + "agreement": "not_compared", + "reading": "not in step 09's output: STR_EXTRA_LOCI=yes ./scripts/setup.sh --strchive-data adds the repeat to the catalog (docs/09-str-expansions.md). PharmCAT (step 7) still reads UGT1A1 *28." + }, + { + "locus": "SLC6A4", + "repeat": "5-HTTLPR promoter length polymorphism", + "status": "not_tested", + "genotype": ".", + "reading": "not tested by any step. CPIC's 2023 SSRI guideline (Bousman et al. 2023, PMID 37032427) found that the data on SLC6A4 do not support its use in antidepressant prescribing, so a result would carry no recommendation.", + "source": "Bousman et al. 2023, PMID 37032427" + } + ] + } + }, + "telomere": { + "title": "Telomere content (TelomereHunter)", + "step": "10", + "state": "ok", + "source": "telomere/S/S_summary.tsv", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "tel_content": "1.5", + "intratelomeric_reads": 40, + "read_check": "depth unknown (no total_reads or read_lengths in the summary): not checked" + } + }, + "roh": { + "title": "Runs of homozygosity", + "step": "11", + "state": "ok", + "source": "vcf/S_roh.txt", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "segments": 0, + "total_mb": 0.0, + "largest_mb": 0.0, + "autosomal_over_5mb": [], + "masked_mb": 0.0, + "sex_chromosome_segments": 0, + "long_mb": 0.0, + "f_roh": null, + "relationship": null, + "upd_flag": null, + "scope": { + "source": "segments_only", + "autosomes": [], + "unmasked_bp": 0, + "partial": true, + "note": "Partial or unverified chromosome scope: no relationship band or UPD flag. F_ROH uses only the listed chromosomes, not callable bases." } + } + }, + "haplogroup": { + "title": "Mitochondrial haplogroup", + "step": "12", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_haplocheck.txt has no Contamination Status column", + "data": {} + }, + "y_haplogroup": { + "title": "Y-chromosome haplogroup (Yleaf)", + "step": "37", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_y_haplogroup.txt has no Hg column or no sample row", + "data": {} + }, + "y_tree": { + "title": "Y placement on the current public tree", + "step": "37", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_y_tree.txt lacks a column of Hg, Level, Tree", + "data": {} + }, + "y_str": { + "title": "Y-STR markers (HipSTR)", + "step": "45", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_y_str.tsv has a confidence other than high, low, no call or not callable", + "data": {} + }, + "consumer_export": { + "title": "Raw-data export (23andMe v5 layout)", + "step": "40", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_consumer_export.tsv has no whole-number 'sites' row", + "data": {} + }, + "bloodtype": { + "title": "Blood groups (predicted)", + "step": "41", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_bloodtype.tsv has no system, phenotype and confidence columns, or no row", + "data": {} + }, + "lpa": { + "title": "Lp(a): LPA KIV-2 repeat count", + "step": "46", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_lpa_kiv2.tsv has no status row (estimated, too little depth or not assessed)", + "data": {} + }, + "vntyper": { + "title": "MUC1 VNTR frameshifts (VNtyper)", + "step": "52", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_vntyper.tsv has no status row (positive, possible, negative, not assessed)", + "data": {} + }, + "locityper": { + "title": "Locityper second opinion at hard loci", + "step": "53", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_locityper.tsv lacks a row or one of the columns locus, region, status, genotype, haplotype_1, haplotype_2, quality, total_reads, unexplained_reads, weighted_distance, warnings, filter, reason", + "data": {} + }, + "mito": { + "title": "Mitochondrial variants", + "step": "20", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "KeyError: 'length'", + "data": {} + }, + "traits": { + "title": "Traits panel", + "step": "42", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_traits.tsv line 2 does not have one field per column", + "data": {} + }, + "archaic": { + "title": "Archaic ancestry (IBDmix)", + "step": "43", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_archaic.tsv has no percentage for neanderthal_percent", + "data": {} + }, + "ancient": { + "title": "Ancient populations (AADR PCA)", + "step": "44", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_ancient.tsv has no rows or lacks a column of ['country', 'dates', 'distance', 'group', 'locality', 'n', 'rank']", + "data": {} + }, + "viral": { + "title": "Viral DNA in the unmapped reads", + "step": "47", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_viral.tsv has no rows or lacks a column of virus, accession, reads, breadth, relative_depth, copies_per_cell, call", + "data": {} + }, + "exomiser": { + "title": "Symptom-driven ranking (Exomiser)", + "step": "48", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_exomiser_top.tsv lacks a column of rank, gene, moi, exomiser_score, phenotype_score, variant, genotype, consequence, hgvs, acmg, disease", + "data": {} + }, + "chip": { + "title": "Clonal haematopoiesis (CHIP)", + "step": "49", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_chip.tsv lacks a column of gene, protein_change, vaf, alt_reads, depth, status, note", + "data": {} + }, + "mei": { + "title": "Mobile element insertions (MEGAnE)", + "step": "50", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_mei.tsv is missing beside S_mei_sites.tsv", + "data": {} + }, + "mosaic": { + "title": "Mosaic chromosomal alterations (MoChA)", + "step": "51", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_mocha.tsv has 1 reported calls, S_mocha_summary.tsv says 2", + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S.cpsr.grch38.classification.tsv.gz: Compressed file ended before the end-of-stream marker was reached", + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "ValueError: invalid literal for int() with base 10: 'x'", + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "unreadable", + "source": null, + "file_date": null, + "note": "S_prioritized.vcf.gz: Compressed file ended before the end-of-stream marker was reached", + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": null, + "pypgx": null, + "Cyrius": "none" }, - "cyp2d6": { - "calls": { - "PharmCAT": null, - "pypgx": null, - "Cyrius": "none" - }, - "agree": null, - "consensus": null, - "probable": null - }, - "not_run": [ - "Polygenic risk scores", - "Structural variants (Manta)", - "Structural variants (Delly)", - "Copy number (CNVpytor)", - "SV consensus merge" - ], - "not_assessed": [ - "Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)", - "Methylation and imprinting", - "Repeat expansions outside the ExpansionHunter catalog", - "Phase: two variants in one gene are compound-het candidates, not confirmed", - "Variants of uncertain significance (not interpreted)", - "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums", - "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count (short reads) nor step 35b (Paraphase, PacBio HiFi) made a call", - "MUC1 VNTR frameshifts (ADTKD-MUC1): step 52 (VNtyper, opt-in) gave no reading; no standard caller sees them", - "Autosomal mosaic chromosomal alterations (large gains, losses and copy-neutral LOH in a share of the blood cells): step 51 (MoChA) did not assess this sample" - ] + "agree": null, + "consensus": null, + "probable": null + }, + "not_run": [ + "Polygenic risk scores", + "Structural variants (Manta)", + "Structural variants (Delly)", + "Copy number (CNVpytor)", + "SV consensus merge" + ], + "not_assessed": [ + "Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)", + "Methylation and imprinting", + "Repeat expansions outside the ExpansionHunter catalog", + "Phase: two variants in one gene are compound-het candidates, not confirmed", + "Variants of uncertain significance (not interpreted)", + "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums", + "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count (short reads) nor step 35b (Paraphase, PacBio HiFi) made a call", + "MUC1 VNTR frameshifts (ADTKD-MUC1): step 52 (VNtyper, opt-in) gave no reading; no standard caller sees them", + "Autosomal mosaic chromosomal alterations (large gains, losses and copy-neutral LOH in a share of the blood cells): step 51 (MoChA) did not assess this sample" + ] } diff --git a/tests/parity/golden/summary-collect/all-default-out/history-bad/summary.json b/tests/parity/golden/summary-collect/all-default-out/history-bad/summary.json new file mode 100644 index 000000000..519ac21be --- /dev/null +++ b/tests/parity/golden/summary-collect/all-default-out/history-bad/summary.json @@ -0,0 +1,534 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:58 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [ + [ + "run", + "written_utc", + "2021-03-04 05:06:07 UTC" + ] + ], + "sections": { + "coverage": { + "title": "Coverage (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "callability": { + "title": "Gene callability (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sex_check": { + "title": "Sex check (indexcov)", + "step": "16", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sample_qc": { + "title": "Sample identity and contamination (somalier, VerifyBamID2)", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic_sex_loss": { + "title": "Mosaic loss of chromosome Y or X", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "read_count": { + "title": "Reads kept by alignment", + "step": "02", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "variants": { + "title": "Variant calling", + "step": "03", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "couple": { + "title": "Couple carrier screen", + "step": "39", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "parascopy": { + "title": "SMN1/SMN2 copy number (Parascopy, short reads)", + "step": "35", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "paralogs": { + "title": "Paralog genes (Paraphase, PacBio HiFi)", + "step": "35b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "hla": { + "title": "HLA typing (T1K)", + "step": "08", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "prs": { + "title": "Polygenic risk scores", + "step": "25", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancestry_fine": { + "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", + "step": "26b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "manta": { + "title": "Structural variants (Manta)", + "step": "04", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "delly": { + "title": "Structural variants (Delly)", + "step": "19", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cnvpytor": { + "title": "Copy number (CNVpytor)", + "step": "18", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sv_consensus": { + "title": "SV consensus merge", + "step": "22", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "annotsv": { + "title": "Structural variants, class 4 and 5 (AnnotSV)", + "step": "05", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "expansions": { + "title": "Repeat expansions (ExpansionHunter)", + "step": "09", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "telomere": { + "title": "Telomere content (TelomereHunter)", + "step": "10", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "roh": { + "title": "Runs of homozygosity", + "step": "11", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "haplogroup": { + "title": "Mitochondrial haplogroup", + "step": "12", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_haplogroup": { + "title": "Y-chromosome haplogroup (Yleaf)", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_tree": { + "title": "Y placement on the current public tree", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_str": { + "title": "Y-STR markers (HipSTR)", + "step": "45", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "consumer_export": { + "title": "Raw-data export (23andMe v5 layout)", + "step": "40", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "bloodtype": { + "title": "Blood groups (predicted)", + "step": "41", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "lpa": { + "title": "Lp(a): LPA KIV-2 repeat count", + "step": "46", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "vntyper": { + "title": "MUC1 VNTR frameshifts (VNtyper)", + "step": "52", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "locityper": { + "title": "Locityper second opinion at hard loci", + "step": "53", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mito": { + "title": "Mitochondrial variants", + "step": "20", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "traits": { + "title": "Traits panel", + "step": "42", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "archaic": { + "title": "Archaic ancestry (IBDmix)", + "step": "43", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancient": { + "title": "Ancient populations (AADR PCA)", + "step": "44", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "viral": { + "title": "Viral DNA in the unmapped reads", + "step": "47", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "exomiser": { + "title": "Symptom-driven ranking (Exomiser)", + "step": "48", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "chip": { + "title": "Clonal haematopoiesis (CHIP)", + "step": "49", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mei": { + "title": "Mobile element insertions (MEGAnE)", + "step": "50", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic": { + "title": "Mosaic chromosomal alterations (MoChA)", + "step": "51", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": null, + "pypgx": null, + "Cyrius": null + }, + "agree": null, + "consensus": null, + "probable": null + }, + "not_run": [ + "Coverage (mosdepth)", + "Gene callability (mosdepth)", + "Sex check (indexcov)", + "Sample identity and contamination (somalier, VerifyBamID2)", + "Mosaic loss of chromosome Y or X", + "Variant calling", + "ClinVar screen", + "PharmCAT", + "CPIC drug-gene recommendations", + "pypgx", + "Cyrius (CYP2D6)", + "SMN1/SMN2 copy number (Parascopy, short reads)", + "Paralog genes (Paraphase, PacBio HiFi)", + "HLA typing (T1K)", + "Polygenic risk scores", + "Fine-grained ancestry (ADMIXTURE, RFMix)", + "Structural variants (Manta)", + "Structural variants (Delly)", + "Copy number (CNVpytor)", + "SV consensus merge", + "Structural variants, class 4 and 5 (AnnotSV)", + "Repeat expansions (ExpansionHunter)", + "Telomere content (TelomereHunter)", + "Runs of homozygosity", + "Mitochondrial haplogroup", + "Y-chromosome haplogroup (Yleaf)", + "Y placement on the current public tree", + "Y-STR markers (HipSTR)", + "Raw-data export (23andMe v5 layout)", + "Blood groups (predicted)", + "Lp(a): LPA KIV-2 repeat count", + "MUC1 VNTR frameshifts (VNtyper)", + "Locityper second opinion at hard loci", + "Mitochondrial variants", + "Traits panel", + "Archaic ancestry (IBDmix)", + "Ancient populations (AADR PCA)", + "Viral DNA in the unmapped reads", + "Symptom-driven ranking (Exomiser)", + "Clonal haematopoiesis (CHIP)", + "Mobile element insertions (MEGAnE)", + "Mosaic chromosomal alterations (MoChA)", + "Cancer predisposition (CPSR)", + "Clinical variant filter", + "Variant prioritization (slivar)" + ], + "not_assessed": [ + "Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)", + "Methylation and imprinting", + "Repeat expansions outside the ExpansionHunter catalog", + "Phase: two variants in one gene are compound-het candidates, not confirmed", + "Variants of uncertain significance (not interpreted)", + "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums", + "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count (short reads) nor step 35b (Paraphase, PacBio HiFi) made a call", + "Mobile element insertions (Alu, L1 and SVA, the FKTN, TAF1 and BBS1 SVA insertions among them): not looked for (step 50, MEGAnE, is opt-in)", + "MUC1 VNTR frameshifts (ADTKD-MUC1): step 52 (VNtyper, opt-in) gave no reading; no standard caller sees them", + "Autosomal mosaic chromosomal alterations (large gains, losses and copy-neutral LOH in a share of the blood cells): step 51 (MoChA) did not assess this sample" + ] +} diff --git a/tests/parity/golden/summary-collect/all-empty/all-empty.json b/tests/parity/golden/summary-collect/all-empty/all-empty.json new file mode 100644 index 000000000..b6d46c0f2 --- /dev/null +++ b/tests/parity/golden/summary-collect/all-empty/all-empty.json @@ -0,0 +1,528 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:58 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "coverage": { + "title": "Coverage (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "callability": { + "title": "Gene callability (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sex_check": { + "title": "Sex check (indexcov)", + "step": "16", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sample_qc": { + "title": "Sample identity and contamination (somalier, VerifyBamID2)", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic_sex_loss": { + "title": "Mosaic loss of chromosome Y or X", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "read_count": { + "title": "Reads kept by alignment", + "step": "02", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "variants": { + "title": "Variant calling", + "step": "03", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "couple": { + "title": "Couple carrier screen", + "step": "39", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "parascopy": { + "title": "SMN1/SMN2 copy number (Parascopy, short reads)", + "step": "35", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "paralogs": { + "title": "Paralog genes (Paraphase, PacBio HiFi)", + "step": "35b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "hla": { + "title": "HLA typing (T1K)", + "step": "08", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "prs": { + "title": "Polygenic risk scores", + "step": "25", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancestry_fine": { + "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", + "step": "26b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "manta": { + "title": "Structural variants (Manta)", + "step": "04", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "delly": { + "title": "Structural variants (Delly)", + "step": "19", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cnvpytor": { + "title": "Copy number (CNVpytor)", + "step": "18", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sv_consensus": { + "title": "SV consensus merge", + "step": "22", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "annotsv": { + "title": "Structural variants, class 4 and 5 (AnnotSV)", + "step": "05", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "expansions": { + "title": "Repeat expansions (ExpansionHunter)", + "step": "09", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "telomere": { + "title": "Telomere content (TelomereHunter)", + "step": "10", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "roh": { + "title": "Runs of homozygosity", + "step": "11", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "haplogroup": { + "title": "Mitochondrial haplogroup", + "step": "12", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_haplogroup": { + "title": "Y-chromosome haplogroup (Yleaf)", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_tree": { + "title": "Y placement on the current public tree", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_str": { + "title": "Y-STR markers (HipSTR)", + "step": "45", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "consumer_export": { + "title": "Raw-data export (23andMe v5 layout)", + "step": "40", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "bloodtype": { + "title": "Blood groups (predicted)", + "step": "41", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "lpa": { + "title": "Lp(a): LPA KIV-2 repeat count", + "step": "46", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "vntyper": { + "title": "MUC1 VNTR frameshifts (VNtyper)", + "step": "52", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "locityper": { + "title": "Locityper second opinion at hard loci", + "step": "53", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mito": { + "title": "Mitochondrial variants", + "step": "20", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "traits": { + "title": "Traits panel", + "step": "42", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "archaic": { + "title": "Archaic ancestry (IBDmix)", + "step": "43", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancient": { + "title": "Ancient populations (AADR PCA)", + "step": "44", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "viral": { + "title": "Viral DNA in the unmapped reads", + "step": "47", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "exomiser": { + "title": "Symptom-driven ranking (Exomiser)", + "step": "48", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "chip": { + "title": "Clonal haematopoiesis (CHIP)", + "step": "49", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mei": { + "title": "Mobile element insertions (MEGAnE)", + "step": "50", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic": { + "title": "Mosaic chromosomal alterations (MoChA)", + "step": "51", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": null, + "pypgx": null, + "Cyrius": null + }, + "agree": null, + "consensus": null, + "probable": null + }, + "not_run": [ + "Coverage (mosdepth)", + "Gene callability (mosdepth)", + "Sex check (indexcov)", + "Sample identity and contamination (somalier, VerifyBamID2)", + "Mosaic loss of chromosome Y or X", + "Variant calling", + "ClinVar screen", + "PharmCAT", + "CPIC drug-gene recommendations", + "pypgx", + "Cyrius (CYP2D6)", + "SMN1/SMN2 copy number (Parascopy, short reads)", + "Paralog genes (Paraphase, PacBio HiFi)", + "HLA typing (T1K)", + "Polygenic risk scores", + "Fine-grained ancestry (ADMIXTURE, RFMix)", + "Structural variants (Manta)", + "Structural variants (Delly)", + "Copy number (CNVpytor)", + "SV consensus merge", + "Structural variants, class 4 and 5 (AnnotSV)", + "Repeat expansions (ExpansionHunter)", + "Telomere content (TelomereHunter)", + "Runs of homozygosity", + "Mitochondrial haplogroup", + "Y-chromosome haplogroup (Yleaf)", + "Y placement on the current public tree", + "Y-STR markers (HipSTR)", + "Raw-data export (23andMe v5 layout)", + "Blood groups (predicted)", + "Lp(a): LPA KIV-2 repeat count", + "MUC1 VNTR frameshifts (VNtyper)", + "Locityper second opinion at hard loci", + "Mitochondrial variants", + "Traits panel", + "Archaic ancestry (IBDmix)", + "Ancient populations (AADR PCA)", + "Viral DNA in the unmapped reads", + "Symptom-driven ranking (Exomiser)", + "Clonal haematopoiesis (CHIP)", + "Mobile element insertions (MEGAnE)", + "Mosaic chromosomal alterations (MoChA)", + "Cancer predisposition (CPSR)", + "Clinical variant filter", + "Variant prioritization (slivar)" + ], + "not_assessed": [ + "Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)", + "Methylation and imprinting", + "Repeat expansions outside the ExpansionHunter catalog", + "Phase: two variants in one gene are compound-het candidates, not confirmed", + "Variants of uncertain significance (not interpreted)", + "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums", + "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count (short reads) nor step 35b (Paraphase, PacBio HiFi) made a call", + "Mobile element insertions (Alu, L1 and SVA, the FKTN, TAF1 and BBS1 SVA insertions among them): not looked for (step 50, MEGAnE, is opt-in)", + "MUC1 VNTR frameshifts (ADTKD-MUC1): step 52 (VNtyper, opt-in) gave no reading; no standard caller sees them", + "Autosomal mosaic chromosomal alterations (large gains, losses and copy-neutral LOH in a share of the blood cells): step 51 (MoChA) did not assess this sample" + ] +} diff --git a/tests/parity/golden/summary-collect/all-failed/all-failed.json b/tests/parity/golden/summary-collect/all-failed/all-failed.json new file mode 100644 index 000000000..e8350a12e --- /dev/null +++ b/tests/parity/golden/summary-collect/all-failed/all-failed.json @@ -0,0 +1,528 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:58 UTC", + "run": { + "status_file": true, + "started_utc": "2020-02-02 02:02 UTC", + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [], + "sections": { + "coverage": { + "title": "Coverage (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "callability": { + "title": "Gene callability (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sex_check": { + "title": "Sex check (indexcov)", + "step": "16", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sample_qc": { + "title": "Sample identity and contamination (somalier, VerifyBamID2)", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic_sex_loss": { + "title": "Mosaic loss of chromosome Y or X", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "read_count": { + "title": "Reads kept by alignment", + "step": "02", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "variants": { + "title": "Variant calling", + "step": "03", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "couple": { + "title": "Couple carrier screen", + "step": "39", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "failed", + "source": null, + "file_date": null, + "note": "step 27 failed in the run of 2020-02-02 02:02 UTC; its log is in logs/", + "data": {} + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "failed", + "source": null, + "file_date": null, + "note": "step 32 failed in the run of 2020-02-02 02:02 UTC; its log is in logs/", + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "failed", + "source": null, + "file_date": null, + "note": "step 21 failed in the run of 2020-02-02 02:02 UTC; its log is in logs/", + "data": {} + }, + "parascopy": { + "title": "SMN1/SMN2 copy number (Parascopy, short reads)", + "step": "35", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "paralogs": { + "title": "Paralog genes (Paraphase, PacBio HiFi)", + "step": "35b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "hla": { + "title": "HLA typing (T1K)", + "step": "08", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "prs": { + "title": "Polygenic risk scores", + "step": "25", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancestry_fine": { + "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", + "step": "26b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "manta": { + "title": "Structural variants (Manta)", + "step": "04", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "delly": { + "title": "Structural variants (Delly)", + "step": "19", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cnvpytor": { + "title": "Copy number (CNVpytor)", + "step": "18", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sv_consensus": { + "title": "SV consensus merge", + "step": "22", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "annotsv": { + "title": "Structural variants, class 4 and 5 (AnnotSV)", + "step": "05", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "expansions": { + "title": "Repeat expansions (ExpansionHunter)", + "step": "09", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "telomere": { + "title": "Telomere content (TelomereHunter)", + "step": "10", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "roh": { + "title": "Runs of homozygosity", + "step": "11", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "haplogroup": { + "title": "Mitochondrial haplogroup", + "step": "12", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_haplogroup": { + "title": "Y-chromosome haplogroup (Yleaf)", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_tree": { + "title": "Y placement on the current public tree", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_str": { + "title": "Y-STR markers (HipSTR)", + "step": "45", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "consumer_export": { + "title": "Raw-data export (23andMe v5 layout)", + "step": "40", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "bloodtype": { + "title": "Blood groups (predicted)", + "step": "41", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "lpa": { + "title": "Lp(a): LPA KIV-2 repeat count", + "step": "46", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "vntyper": { + "title": "MUC1 VNTR frameshifts (VNtyper)", + "step": "52", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "locityper": { + "title": "Locityper second opinion at hard loci", + "step": "53", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mito": { + "title": "Mitochondrial variants", + "step": "20", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "traits": { + "title": "Traits panel", + "step": "42", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "archaic": { + "title": "Archaic ancestry (IBDmix)", + "step": "43", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancient": { + "title": "Ancient populations (AADR PCA)", + "step": "44", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "viral": { + "title": "Viral DNA in the unmapped reads", + "step": "47", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "exomiser": { + "title": "Symptom-driven ranking (Exomiser)", + "step": "48", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "chip": { + "title": "Clonal haematopoiesis (CHIP)", + "step": "49", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mei": { + "title": "Mobile element insertions (MEGAnE)", + "step": "50", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic": { + "title": "Mosaic chromosomal alterations (MoChA)", + "step": "51", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": "failed (step 27)", + "pypgx": "failed (step 32)", + "Cyrius": "failed (step 21)" + }, + "agree": null, + "consensus": null, + "probable": null + }, + "not_run": [ + "Coverage (mosdepth)", + "Gene callability (mosdepth)", + "Sex check (indexcov)", + "Sample identity and contamination (somalier, VerifyBamID2)", + "Mosaic loss of chromosome Y or X", + "Variant calling", + "ClinVar screen", + "PharmCAT", + "CPIC drug-gene recommendations (step 27 failed)", + "pypgx (step 32 failed)", + "Cyrius (CYP2D6) (step 21 failed)", + "SMN1/SMN2 copy number (Parascopy, short reads)", + "Paralog genes (Paraphase, PacBio HiFi)", + "HLA typing (T1K)", + "Polygenic risk scores", + "Fine-grained ancestry (ADMIXTURE, RFMix)", + "Structural variants (Manta)", + "Structural variants (Delly)", + "Copy number (CNVpytor)", + "SV consensus merge", + "Structural variants, class 4 and 5 (AnnotSV)", + "Repeat expansions (ExpansionHunter)", + "Telomere content (TelomereHunter)", + "Runs of homozygosity", + "Mitochondrial haplogroup", + "Y-chromosome haplogroup (Yleaf)", + "Y placement on the current public tree", + "Y-STR markers (HipSTR)", + "Raw-data export (23andMe v5 layout)", + "Blood groups (predicted)", + "Lp(a): LPA KIV-2 repeat count", + "MUC1 VNTR frameshifts (VNtyper)", + "Locityper second opinion at hard loci", + "Mitochondrial variants", + "Traits panel", + "Archaic ancestry (IBDmix)", + "Ancient populations (AADR PCA)", + "Viral DNA in the unmapped reads", + "Symptom-driven ranking (Exomiser)", + "Clonal haematopoiesis (CHIP)", + "Mobile element insertions (MEGAnE)", + "Mosaic chromosomal alterations (MoChA)", + "Cancer predisposition (CPSR)", + "Clinical variant filter", + "Variant prioritization (slivar)" + ], + "not_assessed": [ + "Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)", + "Methylation and imprinting", + "Repeat expansions outside the ExpansionHunter catalog", + "Phase: two variants in one gene are compound-het candidates, not confirmed", + "Variants of uncertain significance (not interpreted)", + "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums", + "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count (short reads) nor step 35b (Paraphase, PacBio HiFi) made a call", + "Mobile element insertions (Alu, L1 and SVA, the FKTN, TAF1 and BBS1 SVA insertions among them): not looked for (step 50, MEGAnE, is opt-in)", + "MUC1 VNTR frameshifts (ADTKD-MUC1): step 52 (VNtyper, opt-in) gave no reading; no standard caller sees them", + "Autosomal mosaic chromosomal alterations (large gains, losses and copy-neutral LOH in a share of the blood cells): step 51 (MoChA) did not assess this sample" + ] +} diff --git a/tests/parity/golden/summary-collect/all-history-bad/all-history-bad.json b/tests/parity/golden/summary-collect/all-history-bad/all-history-bad.json new file mode 100644 index 000000000..519ac21be --- /dev/null +++ b/tests/parity/golden/summary-collect/all-history-bad/all-history-bad.json @@ -0,0 +1,534 @@ +{ + "schema_version": 2, + "sample": "S", + "generated_utc": "2026-11-19 23:58 UTC", + "run": { + "status_file": false, + "started_utc": null, + "declared_sex": null + }, + "databases": { + "clinvar_release": null, + "cpsr_clinvar_release": null, + "hla_database": null + }, + "manifest": [ + [ + "run", + "written_utc", + "2021-03-04 05:06:07 UTC" + ] + ], + "sections": { + "coverage": { + "title": "Coverage (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "callability": { + "title": "Gene callability (mosdepth)", + "step": "16b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sex_check": { + "title": "Sex check (indexcov)", + "step": "16", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sample_qc": { + "title": "Sample identity and contamination (somalier, VerifyBamID2)", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic_sex_loss": { + "title": "Mosaic loss of chromosome Y or X", + "step": "33", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "read_count": { + "title": "Reads kept by alignment", + "step": "02", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "variants": { + "title": "Variant calling", + "step": "03", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinvar": { + "title": "ClinVar screen", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "couple": { + "title": "Couple carrier screen", + "step": "39", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "carrier": { + "title": "Carrier list", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pharmcat": { + "title": "PharmCAT", + "step": "07", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpic": { + "title": "CPIC drug-gene recommendations", + "step": "27", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "pypgx": { + "title": "pypgx", + "step": "32", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cyrius": { + "title": "Cyrius (CYP2D6)", + "step": "21", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "parascopy": { + "title": "SMN1/SMN2 copy number (Parascopy, short reads)", + "step": "35", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "paralogs": { + "title": "Paralog genes (Paraphase, PacBio HiFi)", + "step": "35b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "hla": { + "title": "HLA typing (T1K)", + "step": "08", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "prs": { + "title": "Polygenic risk scores", + "step": "25", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancestry_fine": { + "title": "Fine-grained ancestry (ADMIXTURE, RFMix)", + "step": "26b", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "manta": { + "title": "Structural variants (Manta)", + "step": "04", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "delly": { + "title": "Structural variants (Delly)", + "step": "19", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cnvpytor": { + "title": "Copy number (CNVpytor)", + "step": "18", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "sv_consensus": { + "title": "SV consensus merge", + "step": "22", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "annotsv": { + "title": "Structural variants, class 4 and 5 (AnnotSV)", + "step": "05", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "expansions": { + "title": "Repeat expansions (ExpansionHunter)", + "step": "09", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "telomere": { + "title": "Telomere content (TelomereHunter)", + "step": "10", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "roh": { + "title": "Runs of homozygosity", + "step": "11", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "haplogroup": { + "title": "Mitochondrial haplogroup", + "step": "12", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_haplogroup": { + "title": "Y-chromosome haplogroup (Yleaf)", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_tree": { + "title": "Y placement on the current public tree", + "step": "37", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "y_str": { + "title": "Y-STR markers (HipSTR)", + "step": "45", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "consumer_export": { + "title": "Raw-data export (23andMe v5 layout)", + "step": "40", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "bloodtype": { + "title": "Blood groups (predicted)", + "step": "41", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "lpa": { + "title": "Lp(a): LPA KIV-2 repeat count", + "step": "46", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "vntyper": { + "title": "MUC1 VNTR frameshifts (VNtyper)", + "step": "52", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "locityper": { + "title": "Locityper second opinion at hard loci", + "step": "53", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mito": { + "title": "Mitochondrial variants", + "step": "20", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "traits": { + "title": "Traits panel", + "step": "42", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "archaic": { + "title": "Archaic ancestry (IBDmix)", + "step": "43", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "ancient": { + "title": "Ancient populations (AADR PCA)", + "step": "44", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "viral": { + "title": "Viral DNA in the unmapped reads", + "step": "47", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "exomiser": { + "title": "Symptom-driven ranking (Exomiser)", + "step": "48", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "chip": { + "title": "Clonal haematopoiesis (CHIP)", + "step": "49", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mei": { + "title": "Mobile element insertions (MEGAnE)", + "step": "50", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "mosaic": { + "title": "Mosaic chromosomal alterations (MoChA)", + "step": "51", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "cpsr": { + "title": "Cancer predisposition (CPSR)", + "step": "17", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "clinical": { + "title": "Clinical variant filter", + "step": "23", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, + "slivar": { + "title": "Variant prioritization (slivar)", + "step": "31", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + } + }, + "cyp2d6": { + "calls": { + "PharmCAT": null, + "pypgx": null, + "Cyrius": null + }, + "agree": null, + "consensus": null, + "probable": null + }, + "not_run": [ + "Coverage (mosdepth)", + "Gene callability (mosdepth)", + "Sex check (indexcov)", + "Sample identity and contamination (somalier, VerifyBamID2)", + "Mosaic loss of chromosome Y or X", + "Variant calling", + "ClinVar screen", + "PharmCAT", + "CPIC drug-gene recommendations", + "pypgx", + "Cyrius (CYP2D6)", + "SMN1/SMN2 copy number (Parascopy, short reads)", + "Paralog genes (Paraphase, PacBio HiFi)", + "HLA typing (T1K)", + "Polygenic risk scores", + "Fine-grained ancestry (ADMIXTURE, RFMix)", + "Structural variants (Manta)", + "Structural variants (Delly)", + "Copy number (CNVpytor)", + "SV consensus merge", + "Structural variants, class 4 and 5 (AnnotSV)", + "Repeat expansions (ExpansionHunter)", + "Telomere content (TelomereHunter)", + "Runs of homozygosity", + "Mitochondrial haplogroup", + "Y-chromosome haplogroup (Yleaf)", + "Y placement on the current public tree", + "Y-STR markers (HipSTR)", + "Raw-data export (23andMe v5 layout)", + "Blood groups (predicted)", + "Lp(a): LPA KIV-2 repeat count", + "MUC1 VNTR frameshifts (VNtyper)", + "Locityper second opinion at hard loci", + "Mitochondrial variants", + "Traits panel", + "Archaic ancestry (IBDmix)", + "Ancient populations (AADR PCA)", + "Viral DNA in the unmapped reads", + "Symptom-driven ranking (Exomiser)", + "Clonal haematopoiesis (CHIP)", + "Mobile element insertions (MEGAnE)", + "Mosaic chromosomal alterations (MoChA)", + "Cancer predisposition (CPSR)", + "Clinical variant filter", + "Variant prioritization (slivar)" + ], + "not_assessed": [ + "Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)", + "Methylation and imprinting", + "Repeat expansions outside the ExpansionHunter catalog", + "Phase: two variants in one gene are compound-het candidates, not confirmed", + "Variants of uncertain significance (not interpreted)", + "Polygenic score percentiles: no ancestry reference panel was used, so the scores are raw sums", + "HBA1/HBA2 copy number (alpha-thalassaemia deletions): neither step 35's read-depth count (short reads) nor step 35b (Paraphase, PacBio HiFi) made a call", + "Mobile element insertions (Alu, L1 and SVA, the FKTN, TAF1 and BBS1 SVA insertions among them): not looked for (step 50, MEGAnE, is opt-in)", + "MUC1 VNTR frameshifts (ADTKD-MUC1): step 52 (VNtyper, opt-in) gave no reading; no standard caller sees them", + "Autosomal mosaic chromosomal alterations (large gains, losses and copy-neutral LOH in a share of the blood cells): step 51 (MoChA) did not assess this sample" + ] +} diff --git a/tests/parity/golden/summary-collect/all-history/all-history.json b/tests/parity/golden/summary-collect/all-history/all-history.json index e6d8efc33..e8e8ff9d1 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-16 16:16 UTC", + "generated_utc": "2026-11-19 23:58 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12794,6 +12794,139 @@ } } }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + } + }, "pharmcat": { "title": "PharmCAT", "step": "07", @@ -15548,6 +15681,7 @@ "new_since": { "previous_utc": "2021-01-01 00:00 UTC", "sections": [ + "acmg_sf", "ancestry_fine", "ancient", "annotsv", diff --git a/tests/parity/golden/summary-collect/all-inf/all-inf.json b/tests/parity/golden/summary-collect/all-inf/all-inf.json index 99b10ea8d..52705535b 100644 --- a/tests/parity/golden/summary-collect/all-inf/all-inf.json +++ b/tests/parity/golden/summary-collect/all-inf/all-inf.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-13 23:22 UTC", + "generated_utc": "2026-11-19 23:58 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -137,6 +137,15 @@ "note": null, "data": {} }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "missing", + "source": null, + "file_date": null, + "note": null, + "data": {} + }, "pharmcat": { "title": "PharmCAT", "step": "07", diff --git a/tests/parity/golden/summary-collect/all-nf/all-nf.json b/tests/parity/golden/summary-collect/all-nf/all-nf.json index e61cb5810..25063129a 100644 --- a/tests/parity/golden/summary-collect/all-nf/all-nf.json +++ b/tests/parity/golden/summary-collect/all-nf/all-nf.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-15 22:16 UTC", + "generated_utc": "2026-11-19 23:58 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12603,6 +12603,139 @@ } } }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + } + }, "pharmcat": { "title": "PharmCAT", "step": "07", diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index fabbf7ce7..2f2b646f8 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-16 16:16 UTC", + "generated_utc": "2026-11-19 23:58 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12799,6 +12799,139 @@ } } }, + "acmg_sf": { + "title": "ACMG secondary findings", + "step": "06", + "state": "ok", + "source": "clinvar/S_clinvar_hits.vcf", + "file_date": "2021-03-04 05:06 UTC", + "note": null, + "data": { + "version": "ACMG SF v3.3", + "genes_on_list": 84, + "rules": "assets/acmg_sf.tsv", + "clinvar_hits": [ + { + "gene": "MUTYH", + "variant": "chr1:45331556 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 2, + "low_confidence": false, + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null + }, + { + "gene": "BRCA1", + "variant": "chr17:43057100 C>T", + "genotype": "het", + "significance": "Pathogenic", + "stars": 3, + "low_confidence": false, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "GLA", + "variant": "chrX:101398000 C>T", + "genotype": "1", + "significance": "Pathogenic", + "stars": 0, + "low_confidence": false, + "rule": "All hemi, het, homozygous P and LP", + "rule_note": null, + "severity": null + } + ], + "clinvar_checked": true, + "high_impact": [ + { + "gene": "MUTYH", + "variant": "chr1:45332000 G>A", + "genotype": "het", + "consequence": "stop_gained", + "transcript": "MANE", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": 40, + "dp": 30, + "ad": "15,15", + "rule": "P and LP (2 variants)", + "rule_note": null, + "severity": null + }, + { + "gene": "MYBPC3", + "variant": "chr11:47332000 G>A", + "genotype": "het", + "consequence": "splice_donor_variant,intron_variant", + "transcript": "ANY", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": false, + "call_note": null, + "gq": null, + "dp": null, + "ad": null, + "rule": "All P and LP", + "rule_note": null, + "severity": null + }, + { + "gene": "MSH2", + "variant": "chr2:47414000 A>AT", + "genotype": "het", + "consequence": "frameshift_variant", + "transcript": "CANONICAL", + "frequency": "rare", + "frequency_unknown": false, + "weak_call": true, + "call_note": "alt reads 0.07 of the depth on a heterozygote", + "gq": 50, + "dp": 30, + "ad": "28,2", + "rule": "All P and LP", + "rule_note": "A deletion of the 3' end of EPCAM silences MSH2 and counts as an MSH2 finding.", + "severity": null + } + ], + "high_impact_checked": true, + "high_impact_rare": 2, + "high_impact_weak": 1, + "high_impact_frequency_unknown": 0, + "structural": [], + "structural_checked": true, + "structural_note": null, + "not_reported": [ + { + "gene": "HFE", + "variant": "chr6:26092913 G>A", + "genotype": "het", + "source": "ClinVar", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + }, + { + "gene": "BTD", + "variant": "chr3:15645186 G>C", + "genotype": "het", + "source": "ClinVar", + "reason": "one heterozygous variant; BTD is reported with P and LP (2 variants)" + }, + { + "gene": "HFE", + "variant": "chr6:26093000 C>T", + "genotype": "hom", + "source": "HIGH impact", + "reason": "HFE is reported only for: HFE p.C282Y homozygotes only" + } + ], + "two_hit_note": null + } + }, "pharmcat": { "title": "PharmCAT", "step": "07", diff --git a/tests/schema/summary.schema.json b/tests/schema/summary.schema.json index df7c1dbe4..073ead0e1 100644 --- a/tests/schema/summary.schema.json +++ b/tests/schema/summary.schema.json @@ -1290,6 +1290,66 @@ } ] }, + "acmg_sf": { + "allOf": [ + { + "$ref": "#/definitions/section" + }, + { + "properties": { + "data": { + "type": "object", + "properties": { + "version": { + "type": "string" + }, + "unavailable": { + "type": "string" + }, + "clinvar_hits": { + "type": "array", + "items": { + "type": "object", + "required": [ + "gene", + "variant", + "genotype" + ] + } + }, + "clinvar_checked": { + "type": "boolean" + }, + "high_impact": { + "type": "array" + }, + "high_impact_checked": { + "type": "boolean" + }, + "high_impact_note": { + "type": "string" + }, + "structural": { + "type": "array" + }, + "not_reported": { + "type": "array", + "items": { + "type": "object", + "required": [ + "gene", + "variant", + "source", + "reason" + ] + } + } + } + } + } + } + ] + }, "cpsr": { "allOf": [ { From f77cc34696d9872b92d2df248ad409b0fda01c2c Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:04:24 +0100 Subject: [PATCH 092/110] docs(acmg): say where the secondary-findings card lives, and check it in e2e acmg-sf-rules-1-reports gains a cell without clinical/: the card is there with the 84 rules, says the HIGH-impact source was not screened and keeps every ClinVar row of the full run's card. nf-wiring-1-report-tables compares the card of the bash and the Nextflow summaries. Bead: D11 Bead: D14 --- CHANGELOG.md | 1 + docs/06-clinvar-screen.md | 2 ++ docs/23-clinical-filter.md | 2 ++ docs/24-html-report.md | 2 +- docs/results/secondary-findings.md | 4 ++- tests/e2e/acmg-sf-rules-1-reports.sh | 38 ++++++++++++++++++++++++++ tests/e2e/nf-wiring-1-report-tables.sh | 10 +++++-- 7 files changed, 55 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed5d083b5..c372b3de1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- summary.json has a new section, `acmg_sf`: the ACMG secondary-findings card, built from step 06's ClinVar hits on every run, with or without the VEP cache. Before, the card existed only inside step 23's clinical section, so a run without the VEP cache had no card at all. The new section's state follows step 06. Without step 23's clinical VCF it has `high_impact_checked: false` and a `high_impact_note` that says why and what it can miss (a predicted loss-of-function variant not in ClinVar). A clinical VCF that cannot be read no longer costs the ClinVar rows of this card. `sections.clinical.data.acmg_sf` stays as it was, and the reports still read the card there, so they show it only when step 23 ran. The first run after the update lists the new section under "New since" once. - Each `run-all.sh` run now ends with `bin/og facts`, which writes `facts/_genome_facts.json` in the format `ownhealth.genome-facts/v1`, readable by its owner only (mode 600). [OwnHealth](https://github.com/GeiserX/OwnHealth) imports this file, with the sample's VCF, to show the genome next to the rest of a person's record: `docs/ownhealth.md` says how. The file is a stable output under the 1.0 promise and is listed in the output contract. It is skipped when the HTML report fails, and an earlier run's file is removed before a run starts. A plain `nextflow run main.nf` does not write it yet; `bin/og facts` writes it by hand. - `og report index build --summary summary.json [--sample-dir DIR] -o _search_index.json` writes the run's search index in Rust. `og report index query --index FILE QUERY` answers one query with the rule of the live site's search box (`assets/live/plugins/search.js`); a cargo test runs that script under node against the Rust rule. The file is the one `bin/results_index.py` writes: the same terms, sections, anchors, counts and mentions, and the same answer to each query. No step calls the verb yet: step 24 and the Nextflow report still write the index with `bin/results_index.py`. One field is not written yet: `veil`, which tags an item that names a result a child's page keeps closed. It needs the live site's findings, which are not ported yet. - Step 37 and the Nextflow `Y_HAPLOGROUP` process run Yleaf through its own command line. `bin/yleaf_run.py`, our Python launcher that patched Yleaf at run time (its data folder, its reference, its samtools calls and its process pools), is gone. Yleaf 4.1.7 has the options the launcher stood in for: `-rp` reads the pileup the step makes beside the chrY BAM, `--ref-fasta` names the reference so it downloads none, and `--no-update-check` keeps it offline. Yleaf now predicts with the marker table and tree its image ships; the image test checks they are the files of the archive `setup.sh --yleaf-data` installs, whose positions the pileup is made at, and that Yleaf still has those options, that pileup file and the samtools flags the pileup uses. When no read falls on any marker, Yleaf stops before it predicts, so `og y yleaf-no-reads` writes the row it gives for too few markers (`Hg` NA, the BAM's mapped reads), as the launcher did. On the fixture's chrY slice the prediction table and every file Yleaf writes are the same, byte for byte, as with the launcher, and so is the empty-pileup row. No option, output file or column changes. Step 37 now stops with a clear message when `REF_FASTA` does not end in `.fa`, `.fasta` or `.fna` (a compressed FASTA, say): Yleaf's `--ref-fasta` takes no other name, and the Nextflow `--reference` already asks for a plain FASTA. `setup.sh` installs `.fasta`. diff --git a/docs/06-clinvar-screen.md b/docs/06-clinvar-screen.md index 408a289e6..3ef0aea0e 100644 --- a/docs/06-clinvar-screen.md +++ b/docs/06-clinvar-screen.md @@ -121,6 +121,8 @@ The [runtime table](hardware-requirements.md#runtime-per-step) gives the measure Both reports (step 24 and `generate-report.sh`) read the hits file and show gene, genotype (het, hom, or "one copy, other copy not called ref" for the half of a split `1/2` call), significance, review status, stars and the combined-allele note ("combined allele of ...", "part of a combined allele: ...", both followed by "; unphased, so the parts may sit on different haplotypes" on an unphased het call, or "possibly one allele with ...: check ClinVar for a combined record") for each hit, the best-reviewed first, with the ClinVar file's release date, the gnomAD frequency and the low-confidence mark. The headline count leaves the low-confidence calls out and a line beside it counts them. When the cDNA check table is there, both print its result beside each hit (the HTML hits table has a "cDNA read check" column) and the ClinVar card counts the flagged hits. Older versions of this step wrote `clinvar/isec/0002.vcf`; that file holds only the sample's side of the intersection, with no gene or significance, and nothing reads it any more. Rerun step 6 to get the hits file. +summary.json also has an ACMG secondary-findings card built from these hits, `sections.acmg_sf`. It follows this step, not step 23: it is there whenever the hits file is, also in a run without the VEP cache, and is not run (or failed) with this step's reason otherwise. It holds the hits in the 84 genes of the ACMG SF v3.3 list with each gene's rule applied, step 05's class 4 and 5 SVs in the genes whose rule allows them, and the deletions that count as a second hit. Step 23's rare HIGH-impact records join it when step 23 left its clinical VCF. Without that VCF the card says `high_impact_checked: false`, and `high_impact_note` names why (step 23 skipped, with the run's reason, failed, or its VCF unreadable) and what that can miss: a predicted loss-of-function variant that is not in ClinVar, alone or as the second hit of a recessive gene. [Step 23](23-clinical-filter.md#secondary-findings-genes-acmg-sf-v33) gives the rules. The reports still show the card from step 23's section, so they show it only when step 23 ran. + `${SAMPLE}_clinvar_hits.tsv` is the table to read or load elsewhere. To list the hits from the VCF yourself: ```bash diff --git a/docs/23-clinical-filter.md b/docs/23-clinical-filter.md index 28388bf82..ce1807e00 100644 --- a/docs/23-clinical-filter.md +++ b/docs/23-clinical-filter.md @@ -90,6 +90,8 @@ The Nextflow `CLINICAL_FILTER` module applies the same tiers, ranking, frequency Both reports list, beside the clinical filter's counts, the secondary findings in the 84 genes of the ACMG SF v3.3 list (Lee et al., Genet Med 2025;27(8):101454; the genes in which the ACMG recommends reporting pathogenic variants found by chance, such as BRCA1, LDLR, MYBPC3 or TTN): the step 6 ClinVar hits in those genes, the clinical filter's records with a HIGH-impact consequence on the ranked transcript in them, and step 5's AnnotSV class 4 and 5 structural variants in the genes whose rule allows them. Each gene's rule from Table 1 of the list is a row of `assets/acmg_sf.tsv`: one variant in a dominant gene, two in a recessive one (MUTYH, BTD, ATP7B and others; a homozygote, or two variants of unknown phase), HFE only as homozygous p.C282Y, GLA and OTC also in a heterozygous female, ABCD1 hemizygous, homozygous or with two heterozygous variants. A variant the rule does not report is listed apart with the reason; a pseudodeficiency allele is not counted, and a BTD finding with the p.Asp444His hypomorph says partial, not profound. Of the reported HIGH-impact records the reports count as "rare HIGH impact" only the rare ones with a sound call; a weak call or an unknown frequency is listed with its mark and counted apart, and a common one is left out. The list version is `ACMG_SF_VERSION` in `og summary collect` (`rust/crates/og-summary`). It is a list to review with a clinician: a rare HIGH-impact variant is not a ClinVar classification. [Interpreting results](interpreting-results.md#carrier-status-is-not-disease) gives every rule. Step 17 (CPSR) reports the ACMG secondary findings with its own classification. +summary.json holds the card twice. `sections.clinical.data.acmg_sf` is the card as both reports read it, there only when this step ran. `sections.acmg_sf` is the same card as a section of step 6: it is written whenever step 6's hits are there, so a run without the VEP cache still gets the ClinVar and SV findings. Without this step's clinical VCF it has `high_impact_checked: false` and a `high_impact_note` that names why (this step skipped, with the run's reason, failed, or its VCF unreadable) and what that can miss: a predicted loss-of-function variant that is not in ClinVar, alone or as the second hit of a recessive gene. With the clinical VCF the two cards are equal. A clinical VCF that cannot be read makes the clinical section's card unavailable, while `sections.acmg_sf` keeps its ClinVar rows and says the VCF could not be read. + The `table_text` column of `assets/acmg_sf.tsv` quotes each gene's rule from Table 1 of the paper (doi:10.1016/j.gim.2025.101454), such as "All P and LP" or "P and LP (2 variants)". summary.json gives that text as the rule of each finding, and the reports use it in the reason a variant is not reported. These are short cited quotations of a factual reporting rule: six phrases, the longest 44 characters. "(See text)" after a rule points to the paper's section on the dilated cardiomyopathy (DCM) genes. The `note` column says what the table's footnotes add, in our own words. ## Runtime diff --git a/docs/24-html-report.md b/docs/24-html-report.md index a46341805..b78de3d17 100644 --- a/docs/24-html-report.md +++ b/docs/24-html-report.md @@ -91,7 +91,7 @@ The cards, by chapter (cards not listed here are named in the chapter table abov - **ClinVar Screening** — hit count by review stars, the ClinVar file date, and the hits table best-reviewed first with a Stars column. The count's badge is yellow when there is a hit and gray when there is none, never green. Each hit shows its gnomAD allele frequency from step 13's VEP output, and a line says where the frequencies came from and how many hits are above 1%, or why every frequency is unknown: a common allele with a P/LP record is often low-penetrance, so read every hit with the frequency the card shows, and look up a hit whose frequency is unknown. A low-confidence line counts the hits whose call is under step 6's GQ or DP floor: they are listed but not counted in the total. When step 6's cDNA read check ran, the card also counts the hits it flagged - **Clinical Filter** and **slivar** — variant counts from steps 23 and 31 -- **Secondary-Findings Genes (ACMG SF v3.3)** — the step 06 ClinVar hits, the clinical filter's rare HIGH-impact records and step 05's class 4 and 5 SVs in the 84 genes of the ACMG list, each gene's reporting rule applied (`assets/acmg_sf.tsv`, for example HFE homozygous C282Y only), and the variants a rule does not report listed apart with the reason +- **Secondary-Findings Genes (ACMG SF v3.3)** — the step 06 ClinVar hits, the clinical filter's rare HIGH-impact records and step 05's class 4 and 5 SVs in the 84 genes of the ACMG list, each gene's reporting rule applied (`assets/acmg_sf.tsv`, for example HFE homozygous C282Y only), and the variants a rule does not report listed apart with the reason. The card is shown when step 23 ran. summary.json also writes it as its own section, `acmg_sf`, from step 06's hits, with or without step 23 ([step 06](06-clinvar-screen.md#output)) - **Cancer Predisposition** — CPSR status and the classification breakdown (read by column name from `${SAMPLE}.cpsr.grch38.classification.tsv.gz`) - **Structural Variants** — Manta, Delly, CNVpytor and the SURVIVOR consensus (2+ callers) counts; then step 05's class 4 and 5 SVs (AnnotSV) with their caller support, exon-edge and frequency checks. A call step 05's rules moved to class 3 (a coding tandem repeat, an immunoglobulin or T-cell receptor locus, the MHC, a pseudogene named by a disease gene's alias, or read depth that does not show the change) is listed apart with AnnotSV's class, the rule and the reason, and the class 4-5 count leaves it out - **Repeat Expansions** — a table of every locus, the five key loci (HTT, FMR1, C9orf72, ATXN1, DMPK) first, with its repeat count, Stranger's status and notes; and counts of the loci outside the normal range (step 9b, Stranger), of those short reads could not size (not counted as normal), and the loci in an intermediate range (`bin/str_intermediate_ranges.tsv`). When Stranger flags RFC1, or another locus where the motif decides (`expansion_hunter/${SAMPLE}_str_motifs.tsv`), the card adds the verdict of the read-level motif count (step 9b). A locus the repeat catalog gives no thresholds (its `NoThresholds` field in `expansion_hunter/${SAMPLE}_eh_catalog.json`: MUC1, CEL, TYMS and PLIN4 with the STRchive catalog, among others) is marked not graded, with the catalog's reason, never normal. Any other locus outside Stranger's catalog has no status and is counted apart. Without step 9b the card says Stranger did not run; a Stranger file older than the ExpansionHunter result it came from is not read, and the card says to rerun step 9b. Repeat-expansion calls from short reads can be wrong at some loci diff --git a/docs/results/secondary-findings.md b/docs/results/secondary-findings.md index 5afe3222e..6adc278cf 100644 --- a/docs/results/secondary-findings.md +++ b/docs/results/secondary-findings.md @@ -14,7 +14,7 @@ The most common "pathogenic" finding in any genome is **heterozygous carrier sta **Your own carrier list (step 24 report).** The ClinVar card of both reports is followed by a carrier list for this one sample, with no partner needed: every step 6 ClinVar hit in the 3,292 recessive and X-linked genes of `assets/carrier_genes.tsv` (the list of the [couple screen](../39-couple.md#the-carrier-list)). An allele that list marks as a hypomorph (for example BTD p.Asp444His or the GALT Duarte variants) or a pseudodeficiency allele (HEXA c.739C>T and c.745C>T, which lower the enzyme test result but cause no Tay-Sachs disease) is listed as set aside, never as a carrier finding on its own. -**Secondary findings follow each gene's ACMG rule.** The secondary-findings card (step 23's section of the report) applies the reporting rule of each of the 84 ACMG SF v3.3 genes (Lee et al., Genet Med 2025;27(8):101454, Table 1), written gene by gene in `assets/acmg_sf.tsv`: +**Secondary findings follow each gene's ACMG rule.** The secondary-findings card (step 23's section of the report; in summary.json also `sections.acmg_sf`, written from step 6's hits on every run, VEP cache or not) applies the reporting rule of each of the 84 ACMG SF v3.3 genes (Lee et al., Genet Med 2025;27(8):101454, Table 1), written gene by gene in `assets/acmg_sf.tsv`: - a dominant gene (BRCA1, LDLR, MYH7 and most others): one pathogenic or likely pathogenic variant is reported; - a recessive gene (MUTYH, ATP7B, BTD, CYP27A1, GAA, RPE65, CASQ2, TRDN): two variants are needed, a homozygote or two different ones even when their phase is unknown. One heterozygous MUTYH variant is listed apart as not reported, with the reason; @@ -31,6 +31,8 @@ The most common "pathogenic" finding in any genome is **heterozygous carrier sta Examples: an exon deletion of MUTYH plus a pathogenic MUTYH variant; three alpha-globin genes plus an HBA2 point variant; one SMN1 copy plus an SMN1 variant (short reads place few SMN1 variants reliably, so check with a targeted test); and the 1q21.1 deletion plus one of the two RBM8A low-expression alleles (c.-21G>A, rs139428292, or c.67+32G>C, rs201779890), the cause of TAR syndrome (thrombocytopenia with absent radius; Albers et al., Nat Genet 2012;44(4):435-439, PMID 22366785). On its own an RBM8A low-expression allele stays set aside. The [couple screen](../39-couple.md) (step 39) applies the same pairing between partners: a hypomorph allele of the list in one partner and a full loss of function in the same gene in the other (a ClinVar pathogenic variant, a Delly deletion) is a shared gene with its risk for a child; the allele in both partners, or in one alone, stays set aside. In the secondary-findings card a called deletion counts as one of the two variants a recessive gene needs, unless read-backed phase puts it on the variant's copy. The line under the carrier list names the deletion callers it read and the ones it could not read. A deletion AnnotSV ranks below class 4 is not counted. +Without step 23 (no VEP cache, or step 23 failed) the card in `sections.acmg_sf` holds the ClinVar hits and the SVs only, and its `high_impact_note` says so: a predicted loss-of-function variant that is not in ClinVar is not screened, alone or as the second hit of a recessive gene. + The TTN rule (truncating variants only) and the LMNA rule (missense only with cardiac evidence) are printed beside the finding, not applied. It is still a list to review with a clinician. --- diff --git a/tests/e2e/acmg-sf-rules-1-reports.sh b/tests/e2e/acmg-sf-rules-1-reports.sh index 7660081d8..3ce2098aa 100755 --- a/tests/e2e/acmg-sf-rules-1-reports.sh +++ b/tests/e2e/acmg-sf-rules-1-reports.sh @@ -9,6 +9,13 @@ # or "not made" line. Control: the same render without the assets # mount (what generate-report.sh did before it mounted assets/) fails # the same checks. +# 1b. No step 23 (a run without the VEP cache): og summary collect on the +# sample's step 06, 05 and 35 outputs with no clinical/ folder still +# writes the ACMG card (sections.acmg_sf) with the 84 rules, says the +# HIGH-impact source was not screened, and keeps every ClinVar row the +# full run's card has. Control: without step 06's hits the section is +# not run. The reports still read the card from the clinical section +# until they move to sections.acmg_sf. # 2. Nextflow: HTML_REPORT on the sample's ClinVar hits and clinical VCF, # with the two assets staged as main.nf stages them, applies the rules, # and its carrier list equals the bash one. Control: the same task @@ -75,6 +82,37 @@ check_eq "control: the text check fails without assets/" "$CT" red if [ -s "${CTL}/summary.json" ] && ! summary_ok "${CTL}/summary.json" > /dev/null; then CS=red; else CS=green; fi check_eq "control: the summary check fails without assets/" "$CS" red +# --- 1b. bash, no step 23 ---------------------------------------------------------- +# card JSON: the ACMG card of a summary.json, or null. +card() { jq -c '.sections.acmg_sf' "$1" 2> /dev/null; } +check "the full run's card is ok and screened the HIGH-impact records" \ + jq -e '.sections.acmg_sf | .state == "ok" and .data.genes_on_list == 84 and .data.high_impact_checked == true' "$SUM" +NC="${CASE_TMP}/no-step23" +rm -rf "$NC" +mkdir -p "${NC}/${SAMPLE}" +for d in clinvar annotsv sv_merged paralogs; do + [ ! -d "${SD}/${d}" ] || cp -R "${SD}/${d}" "${NC}/${SAMPLE}/" +done +"${REPO}/bin/og" summary collect --sample "$SAMPLE" --sample-dir "${NC}/${SAMPLE}" --assets "${REPO}/assets" \ + --out "${NC}/summary.json" > "${NC}/collect.log" 2>&1 +check_eq "og summary collect without clinical/ exits 0" "$?" 0 +echo " card without step 23: $(card "${NC}/summary.json" | cut -c1-300)" +check_eq "without step 23 the clinical section is not run" \ + "$(jq -r '.sections.clinical.state' "${NC}/summary.json" 2> /dev/null)" missing +check "without step 23 the card is ok with the 84 rules" \ + jq -e '.sections.acmg_sf | .state == "ok" and .data.genes_on_list == 84 and (.data | has("unavailable") | not)' "${NC}/summary.json" +check "and says the HIGH-impact source was not screened" \ + jq -e '.sections.acmg_sf.data | .high_impact_checked == false and (.high_impact_note | startswith("Rare HIGH-impact variants were not screened"))' "${NC}/summary.json" +# shellcheck disable=SC2016 # a jq program: $f and $n are jq variables +check "every ClinVar row of the card without step 23 is in the full run's card, unchanged" \ + jq -en --slurpfile f "$SUM" --slurpfile n "${NC}/summary.json" \ + '($n[0].sections.acmg_sf.data.clinvar_hits - $f[0].sections.acmg_sf.data.clinvar_hits) | length == 0' +rm -rf "${NC}/${SAMPLE}/clinvar" +"${REPO}/bin/og" summary collect --sample "$SAMPLE" --sample-dir "${NC}/${SAMPLE}" --assets "${REPO}/assets" \ + --out "${NC}/control.json" > /dev/null 2>&1 +check_eq "control: without step 06's hits the card is not run" \ + "$(jq -r '.sections.acmg_sf.state' "${NC}/control.json" 2> /dev/null)" missing + # --- 2. Nextflow -------------------------------------------------------------------- if ! command -v nextflow >/dev/null; then fail "nextflow is not on PATH"; finish; fi NP="${CASE_TMP}/project" diff --git a/tests/e2e/nf-wiring-1-report-tables.sh b/tests/e2e/nf-wiring-1-report-tables.sh index 3a5abadb5..96625a5f4 100755 --- a/tests/e2e/nf-wiring-1-report-tables.sh +++ b/tests/e2e/nf-wiring-1-report-tables.sh @@ -11,8 +11,9 @@ # hits, a VEP file with a gnomAD AF on each hit (3% on the planted one), # CPSR's table and its cDNA read check, step 02's read count and the # clinical filter's and slivar's summary tables. The read_count, clinvar, -# cpsr, clinical and slivar sections of the two summary.json files must -# be equal, with the AF, the CPSR classes and the flagged row in them. +# cpsr, clinical, slivar and acmg_sf sections of the two summary.json +# files must be equal, with the AF, the CPSR classes and the flagged row +# in them. # Control: the module as it was (no place for these tables) stops. # 3. main.nf passes them on: a stub run of every tool (-profile test_all) # stages each table in each HTML_REPORT task whose sample has the step's @@ -203,6 +204,11 @@ sys.exit(bad) PY } check "the five sections of the Nextflow summary equal the bash ones" same_sections "${SD}/summary.json" "$NF_SUM" +# The ACMG card (step 06's section) reads the same hits, clinical VCF and deletions in both. +# shellcheck disable=SC2016 # a jq program: $b, $n and $x are jq variables +check "the ACMG card of the Nextflow summary equals the bash one" \ + jq -en --slurpfile b "${SD}/summary.json" --slurpfile n "$NF_SUM" \ + '($b[0].sections.acmg_sf | del(.file_date)) as $x | $x.state == "ok" and $x == ($n[0].sections.acmg_sf | del(.file_date))' nf_py() { python3 -c "import json, sys; d = json.load(open(sys.argv[1]))['sections']; print($1)" "$NF_SUM" 2>/dev/null; } check_eq "the ClinVar hits' frequencies come from the VEP file" \ "$(nf_py "d['clinvar']['data']['frequency']['source']")" "vep/${S}_vep.vcf.gz" From 1048f98ffff7bf8f08866a621fccb31077e3ce04 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:04:47 +0100 Subject: [PATCH 093/110] style(acmg): cargo fmt Bead: D11 --- .../og-summary/src/collect/acmg_card.rs | 7 ++- .../tests/screen_acmg_card_section.rs | 57 +++++++++++++------ 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/rust/crates/og-summary/src/collect/acmg_card.rs b/rust/crates/og-summary/src/collect/acmg_card.rs index d492a368d..bc7e96a12 100644 --- a/rust/crates/og-summary/src/collect/acmg_card.rs +++ b/rust/crates/og-summary/src/collect/acmg_card.rs @@ -88,9 +88,10 @@ impl AcmgCard { Some(Err(e)) => (None, Some(NoHighImpact::Unreadable(e.clone()))), None => ( None, - Some(i.step23.map_or(NoHighImpact::NotRun, |r| { - NoHighImpact::Step23(r.to_owned()) - })), + Some( + i.step23 + .map_or(NoHighImpact::NotRun, |r| NoHighImpact::Step23(r.to_owned())), + ), ), }; let mut v = acmg::acmg_sf(&acmg::Inputs { diff --git a/rust/crates/og-summary/tests/screen_acmg_card_section.rs b/rust/crates/og-summary/tests/screen_acmg_card_section.rs index f783f956c..73af19fc3 100644 --- a/rust/crates/og-summary/tests/screen_acmg_card_section.rs +++ b/rust/crates/og-summary/tests/screen_acmg_card_section.rs @@ -24,10 +24,7 @@ fn repo() -> PathBuf { } fn scratch(name: &str) -> PathBuf { - let d = std::env::temp_dir().join(format!( - "og-screen-acmg-{name}-{}", - std::process::id() - )); + let d = std::env::temp_dir().join(format!("og-screen-acmg-{name}-{}", std::process::id())); let _ = std::fs::remove_dir_all(&d); std::fs::create_dir_all(&d).unwrap(); d @@ -151,16 +148,21 @@ fn a_run_without_step_23_gets_the_card_from_the_clinvar_hits() { assert_eq!(at(card, &["high_impact_checked"]), &Value::Bool(false)); let note = s(at(card, &["high_impact_note"])); assert!( - note.starts_with("Rare HIGH-impact variants were not screened: step 23 (clinical filter) did not run") - && note.contains("not in ClinVar"), + note.starts_with( + "Rare HIGH-impact variants were not screened: step 23 (clinical filter) did not run" + ) && note.contains("not in ClinVar"), "{note}" ); // The run status gives step 23's reason; a failed step 23 is named. - let skip = "skipped (needs VEP, data not installed: vep_cache/homo_sapiens/116_GRCh38/info.txt)"; + let skip = + "skipped (needs VEP, data not installed: vep_cache/homo_sapiens/116_GRCh38/info.txt)"; for (word, want) in [ (skip, format!("step 23 (clinical filter) was {skip}")), - ("failed (exit 1)", "step 23 (clinical filter) failed (exit 1)".to_owned()), + ( + "failed (exit 1)", + "step 23 (clinical filter) failed (exit 1)".to_owned(), + ), ] { put( &sd.join("logs/run_status.tsv"), @@ -193,9 +195,14 @@ fn the_section_follows_step_06_and_is_never_a_not_run_line_of_its_own() { Value::Array(a) => a.iter().map(s).collect(), x => panic!("{x:?}"), }; - assert!(not_run.contains(&"ClinVar screen (step 06 failed)"), "{not_run:?}"); assert!( - !not_run.iter().any(|l| l.starts_with("ACMG secondary findings")), + not_run.contains(&"ClinVar screen (step 06 failed)"), + "{not_run:?}" + ); + assert!( + !not_run + .iter() + .any(|l| l.starts_with("ACMG secondary findings")), "{not_run:?}" ); } @@ -211,7 +218,11 @@ fn parity_folders(d: &Path) -> PathBuf { .expect("bash runs"); assert!(st.success(), "{} failed", script.display()); for f in ["cb_vep.vcf.gz", "cb_vep.vcf.gz.tbi"] { - std::fs::copy(repo().join("tests/parity/inputs/summary-collect").join(f), d.join(f)).unwrap(); + std::fs::copy( + repo().join("tests/parity/inputs/summary-collect").join(f), + d.join(f), + ) + .unwrap(); } d.join("assets") } @@ -241,7 +252,9 @@ fn agreement(with: &Value, without: &Value) -> Vec { // (a) every ClinVar row without VEP, unchanged with VEP. for r in &without_cv { if !with_cv.contains(r) { - bad.push(format!("(a) ClinVar row without VEP not in the card with VEP: {r:?}")); + bad.push(format!( + "(a) ClinVar row without VEP not in the card with VEP: {r:?}" + )); } } // (a') a ClinVar row only with VEP is one (c) explains. @@ -250,8 +263,10 @@ fn agreement(with: &Value, without: &Value) -> Vec { .flat_map(|l| rows(with, l)) .map(|r| gene_variant(&r)) .collect(); - let not_without: Vec<(String, String)> = - rows(without, "not_reported").iter().map(gene_variant).collect(); + let not_without: Vec<(String, String)> = rows(without, "not_reported") + .iter() + .map(gene_variant) + .collect(); for r in &with_cv { if !without_cv.contains(r) { let gv = gene_variant(r); @@ -259,7 +274,9 @@ fn agreement(with: &Value, without: &Value) -> Vec { // A row whose fields grew (a two-hit line) is the same row. let same = without_cv.iter().any(|w| gene_variant(w) == gv); if !(moved || same) { - bad.push(format!("(a) ClinVar row only with VEP, not explained: {r:?}")); + bad.push(format!( + "(a) ClinVar row only with VEP, not explained: {r:?}" + )); } } } @@ -281,7 +298,9 @@ fn agreement(with: &Value, without: &Value) -> Vec { let stays = not_with.contains(&r); let joined = reported_with.contains(&gv) && high_genes.contains(&gv.0); if !(stays || joined) { - bad.push(format!("(c) not reported without VEP, neither kept nor joined: {r:?}")); + bad.push(format!( + "(c) not reported without VEP, neither kept nor joined: {r:?}" + )); } } bad @@ -313,7 +332,11 @@ fn without_the_clinical_vcf_the_card_loses_only_what_the_high_impact_source_brin continue; } let (w, n) = (at(wsec, &["data"]), at(nsec, &["data"])); - assert_eq!(at(n, &["high_impact_checked"]), &Value::Bool(false), "{name}"); + assert_eq!( + at(n, &["high_impact_checked"]), + &Value::Bool(false), + "{name}" + ); assert!( s(at(n, &["high_impact_note"])).contains("did not run") || s(at(n, &["high_impact_note"])).contains("wrote no clinical VCF"), From 2c9e3ec5d5683c6caa17154f2217dd9049b6ae3a Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:13:19 +0100 Subject: [PATCH 094/110] test(e2e): keep the platelet and copy-number cases true with not assessed systems and new RhD notes Without a BAM, the platelet case's control VCF had no record at the HPA-1, HNA-3 and HNA-4 sites, which now read not assessed; it now plants 0/0 there. The copy-number case compared step 41's whole RhD row with the tree before the engine, notes included; it now compares the phenotype, genotype and confidence, the engine's result. Bead: trait-28 Bead: trait-35 --- tests/e2e/cn-engine-1-parity.sh | 10 +++++++--- tests/e2e/platelet-antigens-1.sh | 11 ++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/e2e/cn-engine-1-parity.sh b/tests/e2e/cn-engine-1-parity.sh index a4b04c253..eddf0e962 100755 --- a/tests/e2e/cn-engine-1-parity.sh +++ b/tests/e2e/cn-engine-1-parity.sh @@ -7,8 +7,10 @@ # fixture's header, at full depth and at an eighth of it. For each BAM: # - step 46 of this tree and of the old tree write the same lpa table, byte # for byte; -# - step 41 of this tree and of the old tree write the same RhD row and the -# same RhD evidence rows (other systems may change after the engine); +# - step 41 of this tree and of the old tree write the same RhD row (its +# phenotype, genotype and confidence; step 41's notes are not the +# engine's) and the same RhD evidence rows (other systems may change +# after the engine); # - step 35's HBA block (bedcov all MAPQ and MAPQ >= 1, then the verdict) # writes the same table through og cn as the old hba_copy_number.py # does. @@ -110,7 +112,9 @@ for V in full thin; do done # Step 41: the header and the RhD rows only; other systems are not the engine's. for f in bloodtype evidence; do - for d in "$NEW" "$OLDO"; do awk -F'\t' 'NR == 1 || $1 == "RhD"' "${d}/${f}.tsv" > "${d}/${f}.rhd.tsv"; done + for d in "$NEW" "$OLDO"; do + awk -F'\t' -v OFS='\t' -v f="$f" 'NR == 1 || $1 == "RhD" {if (f == "bloodtype") NF = 4; print}' "${d}/${f}.tsv" > "${d}/${f}.rhd.tsv" + done check_ge "${V}: RhD rows in this tree's ${f} table" "$(($(wc -l < "${NEW}/${f}.rhd.tsv") - 1))" 1 done for f in lpa bloodtype.rhd evidence.rhd hba; do diff --git a/tests/e2e/platelet-antigens-1.sh b/tests/e2e/platelet-antigens-1.sh index e94eaae16..76017a53a 100755 --- a/tests/e2e/platelet-antigens-1.sh +++ b/tests/e2e/platelet-antigens-1.sh @@ -2,13 +2,14 @@ # Step 41's platelet (HPA) and neutrophil (HNA) antigens, through the real # step and its pinned images. The fixture's slices hold none of these genes, # so the case writes a synthetic VCF with planted genotypes at the sites of -# assets/bloodtype_markers.tsv (no BAM: every site with no record is read as -# the reference allele, confidence medium) and checks the rows: +# assets/bloodtype_markers.tsv (no BAM: a site with no record is read as the +# reference allele, confidence medium, when its system has a record at one +# of its sites; a system with none is not assessed) and checks the rows: # - HPA-1 1/1 is HPA-1(a-b+), and the note says the person lacks HPA-1a, # with FNAIT and anti-HPA-1a; # - HPA-6 0/1, HNA-3 0/1 and HNA-4 1/1 flip those systems; # - four FCGR3B markers 0/1 (with c.194 0/1) give HNA-1a/1b at confidence low; -# - control: the same step on a VCF with none of these records gives the +# - control: the same step on a VCF with 0/0 at those sites gives the # reference phenotypes, so the checks above see the planted genotypes. . "$(dirname "$0")/lib.sh" @@ -60,8 +61,8 @@ check_eq "HNA-1 from FCGR3B: a+b+, FCGR3B*01/FCGR3B*02, low" \ check "the evidence file has the HNA-1 sites as called" \ test "$(awk -F'\t' '$2 ~ /^FCGR3B_/ && $9 == "called"' "${G}/${P}/bloodtype/${P}_bloodtype_evidence.tsv" | wc -l)" -eq 5 -# --- control: none of these records ------------------------------------------------ -vcf "${T}/none.vcf.gz" KEL_578:0/1 +# --- control: the reference allele at these sites -------------------------------------- +vcf "${T}/none.vcf.gz" KEL_578:0/1 HPA1_176:0/0 HNA4_230:0/0 HNA3_461:0/0 R="${SAMPLE}plr" sample "$R" "${T}/none.vcf.gz" run_step 41-bloodtype.sh "$R"; check_step_exit 41-bloodtype.sh From 38063623ba56ecc60b8b1023ea63b41885b40b0e Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:25:41 +0100 Subject: [PATCH 095/110] fix(ci): drop the qc-1-sample-qc baseline line #522 made stale #522 (i411-sample-qc-honest) now calls below() directly in tests/e2e/qc-1-sample-qc.sh, so ShellCheck no longer reports SC2329 there. The baseline line came with main's ShellCheck scope change, which #522's branch predates, so the merged tree held a baseline line with no finding. Lint prints a notice for it; a stale line could also hide a new finding with the same text. --- tests/shellcheck-baseline.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/shellcheck-baseline.txt b/tests/shellcheck-baseline.txt index 398cace1a..66f24213c 100644 --- a/tests/shellcheck-baseline.txt +++ b/tests/shellcheck-baseline.txt @@ -190,7 +190,6 @@ tests/e2e/prs-scores-and-run-options-1-strand-sex.sh SC2013 for id in $(awk -F'\ tests/e2e/prs-scores-and-run-options-1-strand-sex.sh SC2016 check "control: the default run's pgsc_calc had no --keep_ambiguous" bash -c '! grep -q -- --keep_ambiguous "$1"' _ "${D}/prs/pgsc_calc.${STAMP1}/nextflow.log" tests/e2e/prs-scores-and-run-options-2-panel-chrx.sh SC2013 for id in $(awk -F'\t' '$1 ~ /^PGS[0-9]+$/ {print $1}' "${REPO}/assets/pgs_scores.tsv"); do tests/e2e/qc-1-sample-qc.sh SC2329 above() { [ -n "$1" ] && awk -v a="$1" -v b="$2" 'BEGIN { exit !(a + 0 > b + 0) }'; } -tests/e2e/qc-1-sample-qc.sh SC2329 below() { [ -n "$1" ] && awk -v a="$1" -v b="$2" 'BEGIN { exit !(a + 0 < b + 0) }'; } tests/e2e/reports-and-pgx-correctness-reports.sh SC2329 cleanup() { rm -f "$PRS" "$STATUS"; rmdir "${D}/prs" 2>/dev/null || true; } tests/e2e/reports-and-pgx-correctness-revel.sh SC2329 restore() { tests/e2e/run-all-launcher.sh SC2329 all_cached() { [ "$(status_count "$1" CACHED)" -ge 10 ] && [ "$(status_count "$1" COMPLETED)" -eq 0 ] && [ "$(status_count "$1" FAILED)" -eq 0 ]; } From 54d65da22bc5a46eb6bbd81d782ef386e638300f Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:31:49 +0100 Subject: [PATCH 096/110] test(render): expect the TAR pair as possibly biallelic A homozygous hypomorphic allele inside a deletion is one copy, so the two-hit verdict for RBM8A is now 'possibly biallelic'. The og-render clinical test still asserted the old 'biallelic' and was the one red test of Guard rust on this branch. Bead: clin-32 --- rust/crates/og-render/tests/clinical.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/crates/og-render/tests/clinical.rs b/rust/crates/og-render/tests/clinical.rs index 7c142c7ab..6bbd24cee 100644 --- a/rust/crates/og-render/tests/clinical.rs +++ b/rust/crates/og-render/tests/clinical.rs @@ -770,7 +770,7 @@ fn the_tar_deletion_and_the_rbm8a_allele_give_the_tar_line() { .filter(|x| s(at(x, &["gene"])) == "RBM8A") .collect(); assert_eq!(tw.len(), 1); - assert_eq!(s(at(tw[0], &["verdict"])), "biallelic"); + assert_eq!(s(at(tw[0], &["verdict"])), "possibly biallelic"); let lines = carrier::lines(&D::new(&c, "carrier")).unwrap(); let line: Vec<&String> = lines .iter() From 8e2025dcebc02f439baad57530e990d840efd8a5 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:53:16 +0100 Subject: [PATCH 097/110] fix(telomere): pass the shipped GRCh38 bands in both mirrors, never hg19 Step 10 warned and ran TelomereHunter without -b when the band file was missing, and the Nextflow module did so whenever --cytoband was unset (the default), so reads were sorted by hg19 band ends on GRCh38 positions. The script now installs assets/reference/cytoBand.hg38.txt first; the workflow passes that copy when --cytoband is unset. Bead: trait-46 Bead: trait-47 --- docs/00-reference-setup.md | 2 +- docs/getting-started.md | 2 +- docs/nextflow.md | 4 +- docs/parameters.md | 2 +- modules/local/telomere_hunter/main.nf | 31 ++++++++------ nextflow.config | 2 +- nextflow_schema.json | 2 +- scripts/10-telomere-hunter.sh | 50 +++++++++++------------ scripts/validate-setup.sh | 2 +- tests/fake-docker/bash-step-hla.sh | 7 ++-- tests/fake-docker/bash-step-setup-data.sh | 12 ++++++ workflows/bam_analysis.nf | 12 +++--- 12 files changed, 73 insertions(+), 55 deletions(-) diff --git a/docs/00-reference-setup.md b/docs/00-reference-setup.md index 63357393d..4a74a2b20 100644 --- a/docs/00-reference-setup.md +++ b/docs/00-reference-setup.md @@ -138,7 +138,7 @@ It downloads the new file under `clinvar/.refresh/`, checks the md5, builds both | File | Source | Used by | Without it | |---|---|---|---| | `reference/delly_human.hg38.excl.tsv` | Delly's GRCh38 exclude map at a pinned commit (sha256 checked) | step 19 (`delly sr -x`) | Delly runs without it: slower, and with calls in centromeres, telomeres and the unplaced scaffolds | -| `reference/cytoBand.hg38.txt` | UCSC's GRCh38 chromosome bands, chr1-22, X and Y, copied from `assets/reference/cytoBand.hg38.txt` (its README says how it was made). `validate-setup.sh` fails an installed copy that differs from it | step 10 (`telomerehunter -b`), Nextflow `--cytoband`; the genome map reads the asset itself | TelomereHunter falls back to its hg19 bands | +| `reference/cytoBand.hg38.txt` | UCSC's GRCh38 chromosome bands, chr1-22, X and Y, copied from `assets/reference/cytoBand.hg38.txt` (its README says how it was made). `validate-setup.sh` fails an installed copy that differs from it | step 10 (`telomerehunter2 -b`), Nextflow `--cytoband`; the genome map reads the asset itself | Step 10 installs it from `assets/reference` before it runs; Nextflow passes the asset itself | | `hla/IPD-IMGT-HLA_/hla.dat` | IPD-IMGT/HLA release `HLA_DB_RELEASE` (3.66.0) from the IMGTHLA repository (md5 checked) | step 8 | step 8 is skipped | | `reference/gencode.v50.basic.genes.gtf` | the gene lines of GENCODE 50's basic annotation (md5 checked) | step 8 (gene positions for T1K) | step 8 is skipped | | `reference/gencode.v50.basic.exons.bed` | the exon intervals of the same GENCODE 50 basic annotation, written from the same download as the gene lines (md5 checked) | steps 6 and 17 and Nextflow `--gencode_exons` with `clinvar` (cDNA read check); step 39 and `--gencode_exons` with `--pedigree` (deletions over an exon) | steps 6 and 17 and `CLINVAR_CDNA_CHECK` write every hit as `not_checked`; step 39 does not use deletions | diff --git a/docs/getting-started.md b/docs/getting-started.md index 9e37ca022..044cb6d34 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -199,7 +199,7 @@ Without `THREADS` or `--max_cpus`, `run-all.sh` passes the machine's CPU count a | 5 AnnotSV | `annotsv_annotations/Annotations_Human/` | `--annotsv_annotations` | | 32 pypgx | `reference/pypgx-bundle/` | `--pypgx_bundle` | | 25 PRS | `prs_scores/*.txt.gz` (`setup.sh` installs the scoring files) | `--pgs_scoring` | -| 10 TelomereHunter, 19 Delly | `reference/cytoBand.hg38.txt`, `reference/delly_human.hg38.excl.tsv` (optional) | `--cytoband`, `--delly_exclude` | +| 10 TelomereHunter, 19 Delly | `reference/cytoBand.hg38.txt` (optional: the repository's copy is used without it), `reference/delly_human.hg38.excl.tsv` (optional) | `--cytoband`, `--delly_exclude` | **Where things land.** Results go to `${GENOME_DIR}//`, in the folders of the pipeline's [output structure](nextflow.md#output-structure). Most match the single scripts' folders; the pipeline writes PharmCAT to `pharmcat/`, ROH to `roh/`, depth to `coverage/` and HLA types to `hla/`, where the scripts use `vcf/`, `vcf/`, `mosdepth/` and `hla_t1k/`. The reports read both. At the end `run-all.sh` renders the full HTML report (`_report.html`, step 24), the text report (`_report.txt`) and the `summary.json` both are made from. diff --git a/docs/nextflow.md b/docs/nextflow.md index 544cc1d86..b8cbc424b 100644 --- a/docs/nextflow.md +++ b/docs/nextflow.md @@ -84,8 +84,8 @@ nextflow run main.nf \ # only when it agrees with T1K (docs/08-hla-typing.md) # With pharmcat, PGX_CONSENSUS gives PharmCAT the HLA types of hla_typing and a CYP2D6 call only when # pypgx and cyrius agree (docs/36-pgx-consensus.md); PharmCAT then waits for those BAM steps. -# telomere_hunter (a default tool) takes --cytoband for GRCh38 bands; without it, -# TelomereHunter uses its own hg19 bands and the run logs a warning +# telomere_hunter (a default tool) gets GRCh38 bands: --cytoband , or without it +# the copy the repository ships (assets/reference/cytoBand.hg38.txt) # An unknown name in --tools stops the run. # --pedigree pedigree.tsv + --somalier_sites: the family workflow over the samplesheet rows # it names (two or more, each with a gVCF; docs/multi-sample.md) diff --git a/docs/parameters.md b/docs/parameters.md index b4cbdec3b..b1b1d0ab6 100644 --- a/docs/parameters.md +++ b/docs/parameters.md @@ -119,7 +119,7 @@ Paths to clinical and population genetics reference data. | `--annotsv_annotations` | none | AnnotSV annotation directory (contains Annotations_Human/), built once with AnnotSV's INSTALL_annotations.sh. Required by annotsv: the AnnotSV image ships no annotation data. | | `--delly_exclude` | none | Optional Delly exclude map, passed as `delly sr -x` (for example Delly's excludeTemplates/human.hg38.excl.tsv). | | `--manta_call_regions` | none | Optional bgzipped BED of the regions Manta calls on, passed as `configManta.py --callRegions`; its .tbi must sit beside it. For example chr1-22, X and Y, which keeps Manta off the ALT, decoy and unplaced contigs. | -| `--cytoband` | none | Optional UCSC GRCh38 chromosome bands (cytoBand.hg38.txt, chr1-22, X and Y; scripts/setup.sh installs it), passed as `telomerehunter -b`. Without it TelomereHunter uses its own hg19 bands. | +| `--cytoband` | none | UCSC GRCh38 chromosome bands (cytoBand.hg38.txt, chr1-22, X and Y), passed as `telomerehunter2 -b`. Without it the run passes the copy the repository ships, `assets/reference/cytoBand.hg38.txt` (the file scripts/setup.sh installs). | | `--somalier_sites` | none | somalier's GRCh38 sites VCF (sites.hg38.vcf.gz; scripts/setup.sh installs it under reference/somalier/). Required by sample_qc. | | `--verifybamid2_panel` | none | Folder holding VerifyBamID2's marker panel, the .UD, .mu and .bed files of one prefix (scripts/setup.sh installs the 1000 Genomes 100k GRCh38 panel under reference/verifybamid2/). Required by sample_qc. | | `--freemix_warn` | `0.03` | VerifyBamID2's FREEMIX (estimated share of reads from another person) above which sample_qc reports possible contamination. A warning only; it never stops the run. | diff --git a/modules/local/telomere_hunter/main.nf b/modules/local/telomere_hunter/main.nf index 9b51a7a4c..769bbb115 100644 --- a/modules/local/telomere_hunter/main.nf +++ b/modules/local/telomere_hunter/main.nf @@ -1,9 +1,10 @@ /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - TELOMERE_HUNTER — Telomere length estimation from WGS BAM + TELOMERE_HUNTER — relative telomere content from a WGS BAM (TelomereHunter2) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - Estimates telomere length via GC-corrected telomeric reads per million. - Higher tel_content values = longer telomeres. Provides biological age baseline. + tel_content: intratelomeric reads per million reads with 48-52% GC. A + higher value means more telomeric sequence. It is a relative research + measure for comparing samples from one platform, not an age. WARNING: Reads the entire BAM (~30-40 GB). Takes 30-60 minutes. @@ -19,7 +20,7 @@ process TELOMERE_HUNTER { input: tuple val(meta), path(bam), path(bai) - path(cytoband) // UCSC GRCh38 chromosome bands (--cytoband) or [] + path(cytoband) // UCSC GRCh38 chromosome bands: --cytoband, or the copy in assets/reference output: tuple val(meta), path("${meta.id}"), emit: telomere_results @@ -29,23 +30,29 @@ process TELOMERE_HUNTER { task.ext.when == null || task.ext.when script: - // Without -b TelomereHunter classifies reads by its own hg19 bands; - // workflows/bam_analysis.nf warns when --cytoband is not set. - // --plotNone: the Bioconda build's plots fail (its R has no dplyr, and its - // PyPDF2 is written for Python 3); the summary does not need them. - def band_arg = cytoband ? "-b ${cytoband}" : '' + // The bands are always given: workflows/bam_analysis.nf passes the copy in + // assets/reference when --cytoband is not set. + // ulimit: TelomereHunter2 writes one BAM per contig and merges them at + // once; a BAM with decoy contigs needs more than the 1,024 open files a + // container gets by default. Raising the soft limit to the hard one needs + // no privilege, under Docker or Singularity. + // --plotNone: nothing in the pipeline reads its plots. + // It has no --version: its own version is the "TelomereHunter2 " line + // of --help. """ - telomerehunter \\ + ulimit -n "\$(ulimit -Hn)" 2>/dev/null || true + telomerehunter2 \\ -ibt ${bam} \\ -o ./ \\ -p ${meta.id} \\ + -c ${task.cpus} \\ --plotNone \\ - ${band_arg} + -b ${cytoband} cat <<-END_VERSIONS > versions.yml "${task.process}": telomerehunter: ${task.container.replaceFirst(/^[^:@]+[:@]/, '')} - telomerehunter_reported: \$( { telomerehunter --version 2>&1 || true; } | awk '!v && match(\$0, /[0-9]+\\.[0-9]+(\\.[0-9]+)*/) { v = substr(\$0, RSTART, RLENGTH) } END { print (v != "" ? v : "unknown") }') + telomerehunter_reported: \$( { telomerehunter2 --help 2>&1 || true; } | awk '\$1 == "TelomereHunter2" && \$2 ~ /^[0-9]/ { v = \$2; exit } END { print (v != "" ? v : "unknown") }') END_VERSIONS """ diff --git a/nextflow.config b/nextflow.config index dca4b1106..b5ed47bcb 100644 --- a/nextflow.config +++ b/nextflow.config @@ -68,7 +68,7 @@ params { cnvpytor_resources = null // dir with pinned CNVpytor gc_*/mask_* .pytor files (see docs/00-reference-setup.md) delly_exclude = null // Delly exclude map passed as `delly sr -x` (optional, e.g. human.hg38.excl.tsv) manta_call_regions = null // bgzipped BED (.tbi beside it) passed as configManta.py --callRegions (optional) - cytoband = null // UCSC GRCh38 chromosome bands passed as telomerehunter -b (optional, cytoBand.hg38.txt) + cytoband = null // UCSC GRCh38 chromosome bands passed as telomerehunter2 -b (null: the copy in assets/reference) annotsv_annotations = null // AnnotSV annotation dir (holds Annotations_Human/), built once with INSTALL_annotations.sh somalier_sites = null // somalier's GRCh38 sites VCF (sample_qc; setup.sh installs reference/somalier/sites.hg38.vcf.gz) verifybamid2_panel = null // folder of VerifyBamID2's .UD/.mu/.bed panel (sample_qc; setup.sh installs reference/verifybamid2/) diff --git a/nextflow_schema.json b/nextflow_schema.json index c0bd21ac5..d80b8f1bd 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -499,7 +499,7 @@ "cytoband": { "type": "string", "format": "file-path", - "description": "Optional UCSC GRCh38 chromosome bands (cytoBand.hg38.txt, chr1-22, X and Y; scripts/setup.sh installs it), passed as `telomerehunter -b`. Without it TelomereHunter uses its own hg19 bands.", + "description": "UCSC GRCh38 chromosome bands (cytoBand.hg38.txt, chr1-22, X and Y), passed as `telomerehunter2 -b`. Without it the run passes the copy the repository ships, assets/reference/cytoBand.hg38.txt (the file scripts/setup.sh installs).", "fa_icon": "fas fa-file" }, "somalier_sites": { diff --git a/scripts/10-telomere-hunter.sh b/scripts/10-telomere-hunter.sh index 1e5dff7f1..5d68f5cbc 100755 --- a/scripts/10-telomere-hunter.sh +++ b/scripts/10-telomere-hunter.sh @@ -1,7 +1,8 @@ #!/usr/bin/env bash -# TelomereHunter — Estimate telomere length from WGS BAM -# Output: tel_content metric (GC-corrected telomeric reads per million) -# Higher values = longer telomeres. Provides biological age baseline. +# TelomereHunter2: relative telomere content from a WGS BAM +# Output: tel_content (intratelomeric reads per million reads with 48-52% GC). +# A higher value means more telomeric sequence. It is a relative research +# measure for comparing samples from one platform, not an age. set -euo pipefail SAMPLE=${1:?Usage: $0 } @@ -29,40 +30,39 @@ done mkdir -p "$OUTPUT_DIR" -# TelomereHunter sorts reads into intratelomeric, subtelomeric and junction -# classes by chromosome band, and without -b it uses its own hg19 bands -# (`telomerehunter --help`: "If no banding file is specified, the banding -# information of hg19 will be used"). The BAM is GRCh38, so UCSC's GRCh38 -# bands (installed by setup.sh) are passed. -BAND_ARGS=() -if BANDS=$(data_file cytoband); then - echo "Chromosome bands: ${BANDS}" - BAND_ARGS=(-b "$(cpath "$BANDS")") -else - echo "WARNING: the GRCh38 chromosome bands are not installed (${BANDS})." - echo " TelomereHunter falls back to its hg19 bands, so the subtelomeric and" - echo " junction read classes use hg19 band ends on GRCh38 positions." - echo " Install the bands with: ./scripts/setup.sh ${GENOME_DIR}" +# TelomereHunter2 sorts telomeric reads into intratelomeric, subtelomeric and +# junction classes by chromosome band. The BAM is GRCh38, so it always gets +# UCSC's GRCh38 bands: the copy setup.sh installs, or, when that is missing, +# the one the repository ships (assets/reference), installed here first. +if ! BANDS=$(data_file cytoband); then + echo "The GRCh38 chromosome bands are not installed (${BANDS}); installing the copy in assets/reference." + if ! install_data_file cytoband; then + echo "ERROR: could not install the GRCh38 chromosome bands to ${BANDS}" >&2 + exit 1 + fi fi +echo "Chromosome bands: ${BANDS}" -# TelomereHunter has no thread option; THREADS caps the container. -# --plotNone: the Bioconda build's plots fail (its R has no dplyr, and its -# PyPDF2 is written for Python 3, which stops the run after the summary is -# written). The summary and the TVR tables do not need them. +# -c: TelomereHunter2's worker count, THREADS as the container's CPU cap. +# --ulimit: it writes one BAM per contig and merges them at once. A BAM with +# decoy contigs (the HG002 test BAM has 2,580) needs more than the 1,024 open +# files a container gets by default ("Too many open files"). +# --plotNone: nothing in the pipeline reads its plots. run_in \ - --cpus "$THREADS" --memory 4g \ + --cpus "$THREADS" --memory 4g --ulimit nofile=65536:65536 \ "${TELOMEREHUNTER_IMAGE}" \ - telomerehunter \ + telomerehunter2 \ -ibt "/genome/${SAMPLE}/${ALIGN_DIR}/${SAMPLE}_sorted.bam" \ -o "/genome/${SAMPLE}/telomere/${SAMPLE}" \ -p "$SAMPLE" \ + -c "$THREADS" \ --plotNone \ - ${BAND_ARGS[@]+"${BAND_ARGS[@]}"} + -b "$(cpath "$BANDS")" echo "=== TelomereHunter complete ===" SUMMARY="${OUTPUT_DIR}/${SAMPLE}/${SAMPLE}_summary.tsv" if [ -f "$SUMMARY" ]; then echo "Summary: $SUMMARY" - TEL_CONTENT=$(awk -F'\t' 'NR==2 {print $11}' "$SUMMARY") + TEL_CONTENT=$(awk -F'\t' 'NR == 1 {for (i = 1; i <= NF; i++) if ($i == "tel_content") c = i; next} NR == 2 && c {print $c}' "$SUMMARY") echo "Telomere content: ${TEL_CONTENT}" fi diff --git a/scripts/validate-setup.sh b/scripts/validate-setup.sh index 5fab6348e..2d3631126 100755 --- a/scripts/validate-setup.sh +++ b/scripts/validate-setup.sh @@ -672,7 +672,7 @@ else for name in $DATA_FILES; do case "$name" in delly_exclude) what="Delly exclude map (step 19 runs without it, slower and with more artefacts)" ;; - cytoband) what="GRCh38 chromosome bands (step 10 falls back to hg19 bands)" ;; + cytoband) what="GRCh38 chromosome bands (step 10 installs them from assets/reference when missing)" ;; hla_dat) what="IPD-IMGT/HLA ${HLA_DB_RELEASE} (step 08 is skipped without it)" ;; gencode_genes) what="GENCODE ${GENCODE_RELEASE} gene coordinates (step 08 is skipped without them)" ;; gencode_exons) what="GENCODE ${GENCODE_RELEASE} exons (steps 06 and 17 skip their cDNA read check without them)" ;; diff --git a/tests/fake-docker/bash-step-hla.sh b/tests/fake-docker/bash-step-hla.sh index 3befd34ad..0cf811eaf 100755 --- a/tests/fake-docker/bash-step-hla.sh +++ b/tests/fake-docker/bash-step-hla.sh @@ -110,9 +110,10 @@ THREADS=2 ALIGN_DIR=aligned_bwamem2 run_expect 0 telomere-no-bands "${SCRIPTS}/1 output_has telomere-no-bands 'GRCh38 chromosome bands are not installed' docker_log_has '^run image=[^ ]*telomerehunter.* --cpus 2 .* -ibt /genome/sample1/aligned_bwamem2/sample1_sorted\.bam ' \ "step 10 did not use THREADS=2 and ALIGN_DIR=aligned_bwamem2" -if awk '/^run / && /telomerehunter/ && / -b / { found = 1 } END { exit !found }' "$FAKE_DOCKER_LOG"; then - fail "step 10 passed -b without an installed band file" -fi +# Missing bands are installed from assets/reference, never left to the tool's +# hg19 fallback (bash-step-setup-data checks the copy). +docker_log_has '^run image=[^ ]*telomerehunter.* -b /genome/reference/cytoBand\.hg38\.txt' \ + "step 10 did not install and pass the GRCh38 bands when they were missing" printf 'chr1\t0\t2300000\tp36.33\tgneg\n' > "${GENOME_DIR}/reference/cytoBand.hg38.txt" : > "$FAKE_DOCKER_LOG" run_expect 0 telomere "${SCRIPTS}/10-telomere-hunter.sh" sample1 diff --git a/tests/fake-docker/bash-step-setup-data.sh b/tests/fake-docker/bash-step-setup-data.sh index 1849987eb..ce63ec291 100755 --- a/tests/fake-docker/bash-step-setup-data.sh +++ b/tests/fake-docker/bash-step-setup-data.sh @@ -61,6 +61,18 @@ output_has validate 'Delly exclude map \(step 19 runs without it' output_has validate 'IPD-IMGT/HLA [0-9.]+ \(step 08 is skipped without it\) not found' output_has validate '\[OK\].*GRCh38 chromosome bands: present' +# --- step 10 without the bands: it installs the shipped GRCh38 copy and passes it --------- +# Before, step 10 warned and ran TelomereHunter with no -b, so the tool used its +# own hg19 band ends on GRCh38 positions. +rm -f "${GENOME_DIR}/reference/cytoBand.hg38.txt" +: > "$FAKE_DOCKER_LOG" +run_expect 0 telomere-no-bands "${SCRIPTS}/10-telomere-hunter.sh" sample1 +output_has telomere-no-bands 'installing the copy in assets/reference' +cmp -s "${REPO_ROOT}/assets/reference/cytoBand.hg38.txt" "${GENOME_DIR}/reference/cytoBand.hg38.txt" \ + || fail "step 10 did not install the chromosome bands from assets/reference" +docker_log_has '^run image=[^ ]*telomerehunter2:.* --ulimit nofile=65536:65536 .* telomerehunter2 -ibt /genome/sample1/aligned/sample1_sorted\.bam .* -b /genome/reference/cytoBand\.hg38\.txt *$' \ + "step 10 did not give TelomereHunter2 the GRCh38 bands" + # --- setup.sh --vep-cache: the VEP cache before the first run ------------------------ # The fake download serves a real tarball of the release versions.env pins, # with the CHECKSUMS line Ensembl publishes (BSD sum), so install_vep_cache diff --git a/workflows/bam_analysis.nf b/workflows/bam_analysis.nf index 71214cb51..c69eea0ad 100644 --- a/workflows/bam_analysis.nf +++ b/workflows/bam_analysis.nf @@ -47,7 +47,7 @@ workflow BAM_ANALYSIS { ch_expansion_catalog // channel: val(path) — ExpansionHunter variant catalog JSON ch_hla_dat // channel: val(path) — Pre-downloaded IPD-IMGT/HLA hla.dat ch_hla_genes // channel: val(path) — gene annotation (GTF) T1K takes coordinates from - ch_cytoband // channel: val(path) — UCSC GRCh38 chromosome bands or [] + ch_cytoband // channel: val(path) — UCSC GRCh38 chromosome bands or [] (then the copy in assets/reference) ch_somalier_sites // channel: val(path) — somalier sites VCF or [] ch_verifybamid2_panel // channel: val(path) — folder of VerifyBamID2's .UD/.mu/.bed panel or [] ch_kir_dat // channel: val(path) — IPD-KIR kir.dat (--kir) or [] @@ -180,12 +180,10 @@ workflow BAM_ANALYSIS { // Gates on: params.tools contains 'telomere_hunter' // if (params.tools && params.tools.split(',').collect{it.trim()}.contains('telomere_hunter')) { - if (!params.cytoband) { - log.warn "telomere_hunter: --cytoband is not set, so TelomereHunter classifies reads by its own hg19 " + - "chromosome bands on GRCh38 positions. Pass UCSC's GRCh38 bands (scripts/setup.sh installs " + - "reference/cytoBand.hg38.txt)." - } - TELOMERE_HUNTER(ch_bam, ch_cytoband) + // The BAM is GRCh38: without --cytoband the module gets the GRCh38 + // bands the repository ships, never TelomereHunter's own fallback. + ch_bands = ch_cytoband.map { f -> f instanceof List ? file("${projectDir}/assets/reference/cytoBand.hg38.txt", checkIfExists: true) : f } + TELOMERE_HUNTER(ch_bam, ch_bands) ch_telomere_results = TELOMERE_HUNTER.out.telomere_results ch_versions = ch_versions.mix(TELOMERE_HUNTER.out.versions) } From db50aaf685d46d97ce172fca6a139e37691234be Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:53:16 +0100 Subject: [PATCH 098/110] build(telomere): move step 10 to TelomereHunter2 1.0.12 TelomereHunter 1.1.0 is Python 2.7 code. TelomereHunter2 1.0.12 gives the same tel_content on the planted test BAM (5347.255643 with 1,100 reads, 5337.585253 with 1,098, both versions). Its image has no samtools, so the image test builds telo.bam with the samtools image (new input telobam). It needs more than 1,024 open files on a BAM with many contigs; the script and module raise the limit. Bead: trait-49 --- conf/containers.config | 2 +- docs/versions.md | 2 +- scripts/ci/image-smoke.sh | 26 +++++++++++++++++++++++++- tests/smoke/README.md | 1 + tests/smoke/commands.tsv | 2 +- tests/smoke/telomerehunter.sh | 29 ++++++++--------------------- versions.env | 2 +- 7 files changed, 38 insertions(+), 26 deletions(-) diff --git a/conf/containers.config b/conf/containers.config index 23b77f16a..f425b71d2 100644 --- a/conf/containers.config +++ b/conf/containers.config @@ -109,7 +109,7 @@ process { withName: 'SURVIVOR_PREP' { container = 'staphb/bcftools:1.24' } withName: 'SURVIVOR_SORT' { container = 'staphb/bcftools:1.24' } withName: 'T1K_BUILD' { container = 'quay.io/biocontainers/t1k:1.0.10--h5814d7d_0' } - withName: 'TELOMERE_HUNTER' { container = 'quay.io/biocontainers/telomerehunter:1.1.0--pyhdfd78af_0' } + withName: 'TELOMERE_HUNTER' { container = 'quay.io/biocontainers/telomerehunter2:1.0.12--pyhdfd78af_0' } withName: 'TRAITS' { container = 'python:3.15.2@sha256:d7a732b20de2f5d3cf977cbcf69aacf30dc928a37908ff9fdb7bb3503024c91a' } withName: 'TRAITS_PHASE' { container = 'quay.io/biocontainers/whatshap:2.8--py312h9b2995c_1' } withName: 'TRAITS_SITES' { container = 'staphb/bcftools:1.24' } diff --git a/docs/versions.md b/docs/versions.md index 8a20eeadc..6a4ac9b4e 100644 --- a/docs/versions.md +++ b/docs/versions.md @@ -34,7 +34,7 @@ This page is generated by `scripts/ci/gen-versions-doc.sh` from `versions.env` a | Variant annotation | pcgr | `PCGR_IMAGE` | `ghcr.io/sigven/pcgr` | `2.3.2` | Docker Hub sigven/pcgr stops at 2.2.5; 2.3.x is on ghcr.io | | Pharmacogenomics | pharmcat | `PHARMCAT_IMAGE` | `pgkb/pharmcat` | `3.4.0` | | | Pharmacogenomics | pypgx | `PYPGX_IMAGE` | `quay.io/biocontainers/pypgx` | `0.26.0--pyh7e72e81_0` | | -| Specialized analysis | telomerehunter | `TELOMEREHUNTER_IMAGE` | `quay.io/biocontainers/telomerehunter` | `1.1.0--pyhdfd78af_0` | run with --plotNone: the plots of this build fail (its R lacks dplyr) | +| Specialized analysis | telomerehunter2 | `TELOMEREHUNTER_IMAGE` | `quay.io/biocontainers/telomerehunter2` | `1.0.12--pyhdfd78af_0` | step 10: TelomereHunter2, same tel_content as TelomereHunter 1.1.0 on the planted test BAM; needs more than 1,024 open files | | Specialized analysis | haplogrep3 | `HAPLOGREP3_IMAGE` | `quay.io/biocontainers/haplogrep3` | `3.2.2--hdfd78af_1` | | | Specialized analysis | haplocheck | `HAPLOCHECK_IMAGE` | `quay.io/biocontainers/haplocheck` | `1.3.3--h2a3209d_2` | step 12: mtDNA contamination; legacy: no automated bumps (last release 2022) | | Specialized analysis | eklipse | `EKLIPSE_IMAGE` | `quay.io/biocontainers/eklipse:1.8--hdfd78af_6` | `sha256:edd58aa92dcd62a39328d20b044fc024978afce31f70ba5cd174279f85146705` | step 20: large mtDNA deletions; upstream has no release: the Bioconda recipe builds commit 3606cb2edac983d2623ddc667b49206c3d01373c (2022-02-03), AGPL-3.0, run as its own tool; legacy: no automated bumps (eKLIPse is no longer maintained) | diff --git a/scripts/ci/image-smoke.sh b/scripts/ci/image-smoke.sh index cb9360c1f..ca5b9f895 100755 --- a/scripts/ci/image-smoke.sh +++ b/scripts/ci/image-smoke.sh @@ -49,7 +49,7 @@ ROW_TIMEOUT=${ROW_TIMEOUT:-3600} GH_REPO=${GITHUB_REPOSITORY:-GeiserX/OwnGenome} TAG=$(tr -d '[:space:]' < "${REPO}/tests/fixtures/VERSION") SUMMARY=${GITHUB_STEP_SUMMARY:-/dev/null} -NEEDS_KNOWN="ref reads bam longreads longbam truth fullref slice vcf vcf50 pgxvcf revel sv dels bundle cyrius mito hlareads qc ehcatalog chain annotsv chrx" +NEEDS_KNOWN="ref reads bam longreads longbam truth fullref slice telobam vcf vcf50 pgxvcf revel sv dels bundle cyrius mito hlareads qc ehcatalog chain annotsv chrx" OPTS_KNOWN="root net full also= rw=" # The mini reference: chr20:10,000,001-10,500,000 of the fixture reference as @@ -487,6 +487,30 @@ need_slice() { hsam addreplacerg -r '@RG\tID:HG002\tSM:HG002\tPL:ILLUMINA' -o /in/HG002_slice.bam /fx/HG002_slice.bam && hsam index /in/HG002_slice.bam } +# The slice has no telomeric read, so its tel_content is 0 whatever +# TelomereHunter does. telo.bam is the slice plus 1,100 unmapped telomeric +# reads of 150 bp (600 TTAGGG, 400 CCCTAA, 100 TTAGGG with one TCAGGG in the +# middle), built with the samtools image: the TelomereHunter2 image has no +# samtools. PLANTED=0 plants none, the control that shows the tel_content +# check fails without them. cytoBand.hg38.txt is the repository's GRCh38 +# band file, which step 10 passes as -b. +need_telobam() { + need slice || return 1 + awk -v n="${PLANTED:-1}" 'BEGIN { + q = ""; for (i = 0; i < 150; i++) q = q "I" + if (!n) exit + for (i = 1; i <= 1100; i++) { + if (i <= 600) { s = ""; for (k = 0; k < 25; k++) s = s "TTAGGG" } + else if (i <= 1000) { s = ""; for (k = 0; k < 25; k++) s = s "CCCTAA" } + else { s = ""; for (k = 0; k < 12; k++) s = s "TTAGGG"; s = s "TCAGGG"; for (k = 0; k < 12; k++) s = s "TTAGGG" } + printf "telo%d\t4\t*\t0\t0\t*\t*\t0\t0\t%s\t%s\tRG:Z:HG002\n", i, s, q + } + }' > "${IN}/planted.sam" || return 1 + hrun "$SAMTOOLS_IMAGE" sh -c 'samtools view -h /in/HG002_slice.bam | cat - /in/planted.sam | samtools view -b -o /in/telo.bam -' && + hsam index /in/telo.bam || return 1 + rm -f "${IN}/planted.sam" + cp "${REPO}/assets/reference/cytoBand.hg38.txt" "${IN}/cytoBand.hg38.txt" +} need_vcf() { fx_get HG002_vep.vcf || return 1 hbcf view -Oz -o /in/sample.vcf.gz /fx/HG002_vep.vcf && hbcf index -f -t /in/sample.vcf.gz diff --git a/tests/smoke/README.md b/tests/smoke/README.md index 07610905d..58d050346 100644 --- a/tests/smoke/README.md +++ b/tests/smoke/README.md @@ -54,6 +54,7 @@ at the planted deletion), `vcf_field`, `tsv_cell`, `tsv_count`, `csv_cell`, | longreads, longbam | Synthetic HiFi reads from both truth haplotypes, and their alignment. | | fullref | The whole fixture reference, `ref.fa`. | | slice | The fixture's GIAB BAM, `HG002_slice.bam`, with a read group for sample HG002 added. | +| telobam | `telo.bam`: `slice` plus 1,100 unmapped telomeric reads (`PLANTED=0` plants none), and `cytoBand.hg38.txt`, the repository's GRCh38 bands. | | vcf, vcf50 | The fixture's VEP-annotated VCF, and its first 50 records without CSQ. | | pgxvcf | Every site of chr10:94.7-95.0 Mb (CYP2C19, CYP2C9) called from `slice` with bcftools, reference sites included: PharmCAT counts a missing position as missing, not as reference. | | revel, sv, cyrius | Fixture files: synthetic REVEL scores, the ten-record SV VCF, the Cyrius BAM. | diff --git a/tests/smoke/commands.tsv b/tests/smoke/commands.tsv index 685c453a7..59ecdbc75 100644 --- a/tests/smoke/commands.tsv +++ b/tests/smoke/commands.tsv @@ -36,7 +36,7 @@ VEP_IMAGE net vcf50 sh /smoke/vep-clinvar-custom.sh contains "ClinVar_CLNSIG in PCGR_IMAGE net vcf50 sh /smoke/pcgr.sh has "cpsr --version names the release line of the image tag (2.3.2 says cpsr 2.3.0)" "$(cat cpsr_version.txt)" "cpsr $(echo "${PCGR_IMAGE##*:}" | cut -d. -f1-2)"; same "records the bundled VEP annotates" "$(grep -v "^#" vep.vcf | grep -c "CSQ=")" 50; has "the pcgrr R package is the release of the image tag" "$(cat pcgrr_version.txt)" "^${PCGR_IMAGE##*:}"; same "flags of step 17 that cpsr --help does not list" "$(grep -c . cpsr_missing_flags.txt)" 0 PHARMCAT_IMAGE - fullref,pgxvcf python3 /pharmcat/pharmcat_vcf_preprocessor -vcf /in/pgx.vcf.gz -refFna /in/ref.fa -o /out/ -bf HG002 && java -jar /pharmcat/pharmcat.jar -vcf /out/HG002.preprocessed.vcf.bgz -o /out/ -bf HG002 -reporterJson -reporterHtml check_pharmcat "genes with a named diplotype in report.json" HG002.report.json PYPGX_IMAGE also=PYPGX_BUNDLE_VERSION fullref,slice,bundle sh /smoke/pypgx.sh has "CYP2D6 genotype" "$(cat CYP2D6.genotype.txt)" "^\*[0-9]" -TELOMEREHUNTER_IMAGE - slice sh /smoke/telomerehunter.sh same "intratelomeric reads (1,100 planted)" "$(tsv_cell th/HG002/HG002_summary.tsv intratel_reads)" 1100; between "tel_content of the planted reads (5347.26 with 1.1.0 on fixture-v7; 5594.23 before its chrY stretches)" "$(tsv_cell th/HG002/HG002_summary.tsv tel_content)" 5347 5348; between "TCAGGG per intratelomeric read (100 of 1,100)" "$(tsv_cell th/HG002/HG002_summary.tsv TCAGGG_arbitrary_context_norm_by_intratel_reads)" 0.09 0.092 +TELOMEREHUNTER_IMAGE - telobam sh /smoke/telomerehunter.sh same "intratelomeric reads (1,100 planted)" "$(tsv_cell th/HG002/HG002_summary.tsv intratelomeric_reads)" 1100; between "tel_content of the planted reads (5347.26 with TelomereHunter 1.1.0 and 2 1.0.12 on fixture-v8)" "$(tsv_cell th/HG002/HG002_summary.tsv tel_content)" 5347 5348; between "TCAGGG per intratelomeric read (100 of 1,100)" "$(tsv_cell th/HG002/HG002_summary.tsv TCAGGG_arbitrary_context_norm_by_intratel_reads)" 0.09 0.092 HAPLOGREP3_IMAGE - mito sh /smoke/haplogrep3.sh has "haplogroup" "$(tsv_cell haplogroup.txt Haplogroup)" "^[A-Z]"; at_least "haplogroup quality" "$(tsv_cell haplogroup.txt Quality)" 0.8 HAPLOCHECK_IMAGE - mito haplocheck --out /out/haplocheck.txt /in/mito.vcf.gz && cat /out/haplocheck.txt has "contamination status" "$(tsv_cell haplocheck.txt 'Contamination Status')" '^(YES|NO|ND)$'; at_least "mean read depth at the chrM variants haplocheck read" "$(tsv_cell haplocheck.txt 'Sample Coverage')" 50 EKLIPSE_IMAGE - - mkdir -p tmp && EK=$(command -v eKLIPse.py) && python3 "$EK" -out /out -tmp /out/tmp --test > eklipse.log 2>&1; tail -n 30 eklipse.log; find /out -name eKLIPse_deletions.csv > csv.txt nonempty "eKLIPse wrote its deletions table" "$(head -n 1 csv.txt | sed "s|^/out/||")"; at_least "deletions eKLIPse finds in its own test BAMs" "$(awk "NR > 1" "$(head -n 1 csv.txt | sed "s|^/out/||")" | wc -l)" 1; contains "the table has eKLIPse's header" "$(head -n 1 csv.txt | sed "s|^/out/||")" "^\"Title\";\"5' breakpoint\"" diff --git a/tests/smoke/telomerehunter.sh b/tests/smoke/telomerehunter.sh index eb34f43ed..52a8902d1 100644 --- a/tests/smoke/telomerehunter.sh +++ b/tests/smoke/telomerehunter.sh @@ -1,24 +1,11 @@ # shellcheck shell=sh -# TELOMEREHUNTER_IMAGE row. The fixture BAM has no telomeric read, so its -# tel_content is 0 whatever the tool does. This plants 1,100 unmapped -# telomeric reads of 150 bp (600 TTAGGG, 400 CCCTAA, 100 TTAGGG with one -# TCAGGG in the middle) with the image's own samtools, then runs TelomereHunter -# as step 10 does (--plotNone). PLANTED=0 plants none, the control that shows -# the tel_content check fails without them. +# TELOMEREHUNTER_IMAGE row: TelomereHunter2 on telo.bam (the slice plus 1,100 +# planted telomeric reads, input telobam) with the GRCh38 bands, as step 10 +# runs it. TelomereHunter2 writes one BAM per contig and merges them at once: +# the slice's 2,580 contigs need more than the default 1,024 open files, so +# the soft limit goes up to the hard one, as the Nextflow module does. set -e -n=${PLANTED:-1} -awk -v n="$n" 'BEGIN { - q = ""; for (i = 0; i < 150; i++) q = q "I" - if (!n) exit - for (i = 1; i <= 1100; i++) { - if (i <= 600) { s = ""; for (k = 0; k < 25; k++) s = s "TTAGGG" } - else if (i <= 1000) { s = ""; for (k = 0; k < 25; k++) s = s "CCCTAA" } - else { s = ""; for (k = 0; k < 12; k++) s = s "TTAGGG"; s = s "TCAGGG"; for (k = 0; k < 12; k++) s = s "TTAGGG" } - printf "telo%d\t4\t*\t0\t0\t*\t*\t0\t0\t%s\t%s\tRG:Z:HG002\n", i, s, q - } -}' > planted.sam -samtools view -h /in/HG002_slice.bam | cat - planted.sam | samtools view -b -o telo.bam - -samtools index telo.bam -echo "telo.bam: $(samtools view -c telo.bam) reads, $(samtools view -c -f 4 telo.bam) unmapped" -telomerehunter -ibt telo.bam -o th -p HG002 --plotNone +# shellcheck disable=SC3045 # the image's sh is bash, which has ulimit -n and -H +ulimit -n "$(ulimit -Hn)" +telomerehunter2 -ibt /in/telo.bam -o th -p HG002 -c 4 --plotNone -b /in/cytoBand.hg38.txt cat th/HG002/HG002_summary.tsv diff --git a/versions.env b/versions.env index 44d81f911..5925e6792 100644 --- a/versions.env +++ b/versions.env @@ -66,7 +66,7 @@ PHARMCAT_IMAGE="pgkb/pharmcat:3.4.0" PYPGX_IMAGE="quay.io/biocontainers/pypgx:0.26.0--pyh7e72e81_0" # --- Specialized analysis --- -TELOMEREHUNTER_IMAGE="quay.io/biocontainers/telomerehunter:1.1.0--pyhdfd78af_0" # run with --plotNone: the plots of this build fail (its R lacks dplyr) +TELOMEREHUNTER_IMAGE="quay.io/biocontainers/telomerehunter2:1.0.12--pyhdfd78af_0" # step 10: TelomereHunter2, same tel_content as TelomereHunter 1.1.0 on the planted test BAM; needs more than 1,024 open files HAPLOGREP3_IMAGE="quay.io/biocontainers/haplogrep3:3.2.2--hdfd78af_1" HAPLOCHECK_IMAGE="quay.io/biocontainers/haplocheck:1.3.3--h2a3209d_2" # step 12: mtDNA contamination; legacy: no automated bumps (last release 2022) EKLIPSE_IMAGE="quay.io/biocontainers/eklipse:1.8--hdfd78af_6@sha256:edd58aa92dcd62a39328d20b044fc024978afce31f70ba5cd174279f85146705" # step 20: large mtDNA deletions; upstream has no release: the Bioconda recipe builds commit 3606cb2edac983d2623ddc667b49206c3d01373c (2022-02-03), AGPL-3.0, run as its own tool; legacy: no automated bumps (eKLIPse is no longer maintained) From cd72dd138dc2c1d06f3371ac3af2f135211d6ddc Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:53:17 +0100 Subject: [PATCH 099/110] docs(telomere): describe tel_content as relative, never an age The step script and module called the value a biological age baseline. Reworded, the step doc covers TelomereHunter2 and the bands, and tests/test_telomere_wording.sh fails when a file that describes step 10 uses the phrase (with a planted control). Bead: trait-48 Bead: trait-49 --- CHANGELOG.md | 1 + docs/10-telomere-analysis.md | 38 +++++++++------- docs/results/traits-and-somatic.md | 2 +- tests/test_telomere_wording.sh | 72 ++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 18 deletions(-) create mode 100755 tests/test_telomere_wording.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index eb7a130e7..680a01596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased +- Step 10 (telomere content) always reads the GRCh38 chromosome bands now. When `reference/cytoBand.hg38.txt` was missing, `scripts/10-telomere-hunter.sh` warned and ran TelomereHunter without `-b`, so it sorted reads by its own hg19 band ends on GRCh38 positions; the Nextflow module did the same whenever `--cytoband` was not set, which is the default. The script now installs the copy the repository ships (`assets/reference/cytoBand.hg38.txt`) before it runs, and the pipeline passes that copy when `--cytoband` is not set. The step also moves from TelomereHunter 1.1.0, Python 2.7 code, to its maintained successor TelomereHunter2 1.0.12 (`TELOMEREHUNTER_IMAGE`, `quay.io/biocontainers/telomerehunter2`). On the image test's input both give the same `tel_content` (5347.255643 with 1,100 planted telomeric reads, 5337.585253 with 1,098), so earlier values stay comparable. THREADS now sets its worker count (`-c`), and the container gets a higher open-file limit, which it needs on a BAM with many contigs. Output change: `telomere///_summary.tsv` keeps its name, but its columns follow TelomereHunter2 (`tel_content` third, `intratelomeric_reads`, `tel_read_count`, `read_lengths`, plus three read-class counts). `summary.json` and the reports read both layouts by name and do not change. The docs no longer describe the value as an age measure: `tests/test_telomere_wording.sh` fails when a file that describes step 10 does. Part of #411 (trait-46, trait-47, trait-48, trait-49). - A third-party outage no longer fails the Freshness check of a pull request. Since 2026-11-18 rest.ensembl.org has not answered, and the pull-request job's dry run of `og dev freshness` failed on every pull request that touched `versions.env` or `og-fresh`. `og dev freshness --unreachable-warns` now lists a lookup whose upstream did not answer (no connection, a timeout, HTTP 5xx or 429 after the retries, or HTTP 403) under "Upstreams that did not answer" as a warning, and its database row reads `NO ANSWER`; it does not change the exit. The 403 counts because rest.ensembl.org came back on 2026-11-19 answering 403 to GitHub's runners and 200 elsewhere, which still failed the pull-request job. A 404, an empty answer or an answer in an odd shape still exits 1. `freshness.yml` passes the flag only in the pull-request dry run. Without the flag the report and the exit are as before, and the monthly report on main still counts an outage as an error in the issue. - Three statements in the docs were wrong. Troubleshooting said exit code 137 confirms a kill for memory, and checked it with `docker ps -a --latest`. 137 is any SIGKILL, and the step scripts run their containers with `--rm`, so that command shows an older, unrelated container. The page now says how to confirm a kill for memory: `docker events --filter event=oom`, the kernel log, or `.State.OOMKilled` for a container kept without `--rm`. The run-state and troubleshooting pages said `bin/og` does not run on a Mac and told Mac users to build `og` with cargo or run it in a container. `bin/og` runs the native macOS build that `scripts/setup.sh --og` installs, and the pages now say so; on a Mac, `og run headroom` reports the machine's memory as unknown. Troubleshooting, the FAQ and the lessons-learned page said the step scripts run their containers as root, and lessons-learned gave `:latest` images and `chmod 777` as current fixes. The step scripts run their containers as you; those entries are now marked as past fixes and name what the pipeline does today. Documentation only: no option, output or behaviour changes. - Lint's ShellCheck job now checks every tracked shell script, not only `scripts/`: the e2e cases and their library, the fake-docker and parity tests, `tests/*.sh`, `bin/og` and the fake tools, 482 files in all, at every ShellCheck level. The 265 findings these files hold today are listed in `tests/shellcheck-baseline.txt` and still pass; any other finding fails lint. A listed finding is matched by its file, its code and the text of its line, so it keeps matching when lines above it move, and a new line with the same mistake still fails. Each run plants an unquoted `$1` in a new test script and on a new line of a listed script, and fails if either passes or if the file search misses the new script or `bin/og`. The `scripts/` check at warning level stays as it was. Part of #411 (plat-10). diff --git a/docs/10-telomere-analysis.md b/docs/10-telomere-analysis.md index c08b7692b..b221395d1 100644 --- a/docs/10-telomere-analysis.md +++ b/docs/10-telomere-analysis.md @@ -7,26 +7,27 @@ Estimates relative telomere content from WGS BAM files by quantifying telomeric Telomere length correlates with cellular aging at a population level. Comparing telomere content between individuals of similar age, sequenced on the same platform, provides a rough relative comparison. However, telomere length alone is not established as a clinically important standalone risk marker for individuals — it provides only a rough estimate of aging rate and is influenced by many non-age factors (genetics, cell type, technical variables). ## Tool -- **TelomereHunter** (German Cancer Research Center) +- **TelomereHunter2** 1.0.12 (German Cancer Research Center; GPL-3.0), the maintained Python 3 successor of TelomereHunter ## Docker Image - `TELOMEREHUNTER_IMAGE` Pinned in `versions.env`; [Image versions](versions.md) lists the current tag. -> The image is the Bioconda build of TelomereHunter 1.1.0. It runs as you, not as root, and with `--plotNone`: its plots fail (its R has no `dplyr`, and its PyPDF2 is written for Python 3), and nothing in the pipeline reads them. It replaced a patched, digest-pinned build from a personal Docker Hub account. +> The image is the Bioconda build of TelomereHunter2. It runs as you, not as root, and with `--plotNone`: nothing in the pipeline reads its plots. ### Which TelomereHunter, and what changed -Step 10 runs TelomereHunter 1 (1.1.0). On the image test's input, the HG002 fixture BAM plus 1,100 planted unmapped telomeric reads (600 `TTAGGG`, 400 `CCCTAA`, 100 with one `TCAGGG`), three images were run side by side: +Step 10 runs TelomereHunter2 1.0.12. Until now it ran TelomereHunter 1.1.0, Python 2.7 code with its plots off. On the image test's input, the HG002 fixture BAM (fixture-v8) plus 1,100 planted unmapped telomeric reads (600 `TTAGGG`, 400 `CCCTAA`, 100 with one `TCAGGG`), both were run with the GRCh38 bands. The second run drops two planted reads: -| Image | intratel_reads | tel_content | TCAGGG per intratelomeric read | -|---|---|---|---| -| the earlier digest-pinned build | 1100 | 5594.234887 | 0.0909 | -| Bioconda TelomereHunter 1.1.0 (this step) | 1100 | 5594.234887 | 0.0909 | -| Bioconda TelomereHunter2 1.0.12 | 1100 | 5594.234887 | 0.0909 | +| Input | Image | intratelomeric reads | tel_content | TCAGGG per intratelomeric read | +|---|---|---|---|---| +| 1,100 planted | TelomereHunter 1.1.0 | 1100 | 5347.255643 | 0.0909 | +| 1,100 planted | TelomereHunter2 1.0.12 (this step) | 1100 | 5347.255643 | 0.0909 | +| 1,098 planted | TelomereHunter 1.1.0 | 1098 | 5337.585253 | 0.0911 | +| 1,098 planted | TelomereHunter2 1.0.12 (this step) | 1098 | 5337.585253 | 0.0911 | -So a value from an earlier run of this step stays comparable. TelomereHunter2 (GPL-3.0, Python 3, maintained) gives the same numbers on this input, but it is not switched in yet: without `-b` it skips the band classes instead of using hg19 bands, which the Nextflow warning and parameter help describe, and its summary has other columns in another order. Moving to it is a separate change. +So a value from an earlier run of this step stays comparable, and both versions move by the same amount when reads change. The summary file keeps its name, but TelomereHunter2 writes other columns in another order: `tel_content` is the third column, `intratel_reads` is now `intratelomeric_reads`, `tel_reads` is `tel_read_count`, `read_length` is `read_lengths`, and it adds the junction-spanning, subtelomeric and intrachromosomal read counts. The reports and `summary.json` read both layouts by column name, so they do not change. A script of your own that reads the summary by column position must read it by name. ## Command ```bash @@ -34,9 +35,11 @@ export GENOME_DIR=/path/to/your/data ./scripts/10-telomere-hunter.sh your_sample ``` -`ALIGN_DIR` (default `aligned`) picks the BAM, for example `ALIGN_DIR=aligned_bwamem2`. `THREADS` (default 4) caps the container's CPUs; TelomereHunter has no thread option of its own. +`ALIGN_DIR` (default `aligned`) picks the BAM, for example `ALIGN_DIR=aligned_bwamem2`. `THREADS` (default 4) caps the container's CPUs and is TelomereHunter2's worker count (`-c`). -TelomereHunter sorts telomeric reads into intratelomeric, subtelomeric and junction classes by chromosome band. Without `-b` it uses its own hg19 bands (`telomerehunter --help`: "If no banding file is specified, the banding information of hg19 will be used"), which put the band ends at hg19 positions on a GRCh38 BAM. The script passes UCSC's GRCh38 bands, which `setup.sh` installs as `reference/cytoBand.hg38.txt` (chr1-22, X and Y; see [reference setup](00-reference-setup.md#small-pinned-data-files)). When they are not installed it runs without `-b` and says so. What the script runs: +TelomereHunter2 sorts telomeric reads into intratelomeric, subtelomeric, junction-spanning and intrachromosomal classes by chromosome band. The BAM is GRCh38, so the script always passes UCSC's GRCh38 bands, `reference/cytoBand.hg38.txt` (chr1-22, X and Y; see [reference setup](00-reference-setup.md#small-pinned-data-files)). The repository ships that file in `assets/reference`, and `setup.sh` installs it. When it is not installed, the script installs it first and says so; it never runs without the bands. (TelomereHunter 1.1.0 used its own hg19 band ends without `-b`, and TelomereHunter2 leaves the band classes out.) The Nextflow pipeline passes `--cytoband` when it is set, and otherwise the copy in `assets/reference`. + +TelomereHunter2 writes one BAM per contig and merges them at once, so a BAM with decoy contigs (the HG002 test BAM has 2,580) needs more than the 1,024 open files a container gets by default. The script raises the container's limit with `--ulimit nofile=65536:65536`; the Nextflow module raises its soft limit to the hard one. Without that the run stops with "Too many open files". What the script runs: ```bash source versions.env # from the repository root @@ -44,29 +47,30 @@ SAMPLE=your_sample GENOME_DIR=/path/to/your/data docker run --rm --network none --user "$(id -u):$(id -g)" \ - --cpus 4 --memory 4g \ + --cpus 4 --memory 4g --ulimit nofile=65536:65536 \ -v ${GENOME_DIR}:/genome \ "${TELOMEREHUNTER_IMAGE}" \ - telomerehunter \ + telomerehunter2 \ -ibt /genome/${SAMPLE}/aligned/${SAMPLE}_sorted.bam \ -o /genome/${SAMPLE}/telomere/${SAMPLE} \ -p ${SAMPLE} \ + -c 4 \ --plotNone \ -b /genome/reference/cytoBand.hg38.txt # Output: telomere content report in ${GENOME_DIR}/${SAMPLE}/telomere/${SAMPLE}/ ``` -TelomereHunter uses `-ibt` (input BAM tumor) for a single-sample analysis. No `--tumor_only` flag is needed — when only `-ibt` is provided (without `-ibc` for a matched control BAM), TelomereHunter runs in single-sample mode automatically. +TelomereHunter2 uses `-ibt` (input BAM tumor) for a single-sample analysis. No `--tumor_only` flag is needed: with only `-ibt` (no `-ibc` for a matched control BAM), it runs in single-sample mode. ## Key Metric -- **`tel_content`** — intratelomeric reads per million reads with 48-52% GC, the GC content of telomeric repeats (TelomereHunter 1.1.0 divides the intratelomeric read count by `total_reads_with_tel_gc`). It is a relative telomere content, not a telomere length; the report labels it "Telomere content (relative)" +- **`tel_content`** — intratelomeric reads per million reads with 48-52% GC, the GC content of telomeric repeats (TelomereHunter2 divides the intratelomeric read count by `total_reads_with_tel_gc`, as TelomereHunter 1.1.0 did). It is a relative telomere content, not a telomere length; the report labels it "Telomere content (relative)" - Higher values indicate longer/more abundant telomeres -- Compare between samples of known age for relative ranking +- Compare only between samples sequenced on the same platform. The value is not an age ### Read-count check -The value rests on the intratelomeric reads (`intratel_reads` in TelomereHunter 1.1.0's summary). The reports print that count beside the value and warn "too few telomeric reads for a stable estimate" when it is below 2,000 per 30x of depth. The depth is the one TelomereHunter counted: `total_reads` times the read length (`read_lengths`, the largest when there are several) over 3.1 Gb. A typical 30x short-read genome has tens of thousands of intratelomeric reads, so the floor sits far below that: a sample under it has a library or platform problem, or reads too short for TelomereHunter's repeat threshold, and its value is not comparable. The floor is a first choice, not one fitted to many samples. A summary without `total_reads` or the read length gets the count and no check, and the report says so. +The value rests on the intratelomeric reads (`intratelomeric_reads` in TelomereHunter2's summary, `intratel_reads` in a summary TelomereHunter 1.1.0 wrote). The reports print that count beside the value and warn "too few telomeric reads for a stable estimate" when it is below 2,000 per 30x of depth. The depth is the one TelomereHunter counted: `total_reads` times the read length (`read_lengths`, the largest when there are several) over 3.1 Gb. A typical 30x short-read genome has tens of thousands of intratelomeric reads, so the floor sits far below that: a sample under it has a library or platform problem, or reads too short for TelomereHunter's repeat threshold, and its value is not comparable. The floor is a first choice, not one fitted to many samples. A summary without `total_reads` or the read length gets the count and no check, and the report says so. ## Important Notes - The container runs as you (`--user "$(id -u):$(id -g)"`), so the outputs are yours. A telomere directory an older version wrote as root has to be taken back first: `sudo chown -R "$(id -u):$(id -g)" "${GENOME_DIR}/${SAMPLE}/telomere"`. diff --git a/docs/results/traits-and-somatic.md b/docs/results/traits-and-somatic.md index 648d7851e..15641eba6 100644 --- a/docs/results/traits-and-somatic.md +++ b/docs/results/traits-and-somatic.md @@ -18,7 +18,7 @@ Telomeres are protective caps at the ends of chromosomes that shorten with cell ### Limitations - **Not a clinical telomere length measurement.** TelomereHunter was developed for cancer genome analysis, not as a validated healthy-population aging assay -- **Not a "biological age" readout.** While telomere length correlates with aging at a population level, it is a rough estimate of aging rate and is not established as a clinically important standalone risk marker for individuals (see Vaiserman & Krasnienkov, "Telomere Length as a Marker of Biological Age," 2021) +- **Not an age.** Telomere length follows age only across a population. For one person it is a rough estimate, and it is not an established standalone risk marker (Vaiserman and Krasnienkov 2021, Frontiers in Genetics 11:630186, https://doi.org/10.3389/fgene.2020.630186) - Short-read WGS systematically underestimates telomere length compared to dedicated assays (TRF, FlowFISH) - Useful only for **relative comparisons** between samples run on the same platform — not absolute measurements and not individual health predictions diff --git a/tests/test_telomere_wording.sh b/tests/test_telomere_wording.sh new file mode 100755 index 000000000..3dc6e1f6d --- /dev/null +++ b/tests/test_telomere_wording.sh @@ -0,0 +1,72 @@ +#!/usr/bin/env bash +# Step 10 measures a relative telomere content (intratelomeric reads per +# million reads with 48-52% GC). It is not an age, so no text that describes +# the step or its result may call it "biological age" (or ageing, aging). +# +# The files checked are the ones that describe step 10 or print its result. +# A listed file that a later change removes is skipped with a note; the step +# script and its Nextflow module must exist. +# +# 1. Control: the check run on a planted copy of the step script with the +# phrase fails, so the check can fail. +# 2. The real files: none has the phrase. +set -uo pipefail + +REPO="$(cd "$(dirname "$0")/.." && pwd)" +FILES=( + scripts/10-telomere-hunter.sh + modules/local/telomere_hunter/main.nf + docs/10-telomere-analysis.md + docs/results/traits-and-somatic.md + rust/crates/og-render/src/notes.rs + rust/crates/og-render/src/sections/telomere.rs + bin/render_report.py +) +REQUIRED="scripts/10-telomere-hunter.sh modules/local/telomere_hunter/main.nf" +PHRASE='biological[[:space:]-]+(age|ageing|aging)' +fails=0 +ok() { echo "PASS $*"; } +bad() { echo "FAIL $*"; fails=$((fails + 1)); } + +# check ROOT: print each line of the listed files under ROOT that has the +# phrase; exit 1 when one does or a required file is missing. +check() { + local root=$1 f rc=0 + for f in "${FILES[@]}"; do + if [ ! -f "${root}/${f}" ]; then + case " $REQUIRED " in + *" $f "*) echo "missing: ${f}"; rc=1 ;; + *) echo "note: ${f} is gone, skipped" ;; + esac + continue + fi + if grep -n -i -E "$PHRASE" "${root}/${f}" | sed "s|^|${f}:|"; then rc=1; fi + done + return "$rc" +} + +T=$(mktemp -d) +trap 'rm -rf "$T"' EXIT +for f in "${FILES[@]}"; do + [ -f "${REPO}/${f}" ] || continue + mkdir -p "${T}/$(dirname "$f")" + cp "${REPO}/${f}" "${T}/${f}" +done +printf '# Higher values = longer telomeres. Provides a Biological Age baseline.\n' >> "${T}/scripts/10-telomere-hunter.sh" +if out=$(check "$T"); then + bad "control: a planted 'Biological Age' line in the step script passed the check" +elif grep -q '^scripts/10-telomere-hunter.sh:[0-9]*:.*Biological Age' <<< "$out"; then + ok "control: the planted line fails the check and is named" +else + bad "control: the check failed without naming the planted line: ${out}" +fi + +if out=$(check "$REPO"); then + ok "no file that describes step 10 calls its result a biological age" +else + bad "step 10's wording:" + printf '%s\n' "$out" +fi + +[ "$fails" -eq 0 ] || { echo "${fails} check(s) failed"; exit 1; } +echo "all checks passed" From 22f66801037da067f3d0faa6e062669c3fd93a60 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 01:55:25 +0100 Subject: [PATCH 100/110] fix(bloodtype): name a weak c.1061delC call and keep the Bombay note off an unread ABO row Also correct the gVCF block wording (DP, else MIN_DP) and the platelet control label. --- CHANGELOG.md | 2 +- docs/41-bloodtype.md | 4 +-- rust/crates/og-bloodtype/src/rules.rs | 8 ++++++ rust/crates/og-bloodtype/tests/report.rs | 27 +++++++++++++++++++ tests/e2e/platelet-antigens-1.sh | 2 +- .../bloodtype/abo-bad-para-bombay-lan/t.tsv | 2 +- 6 files changed, 40 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b7e6b945..e16816b5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n ## Unreleased -- Step 41 (blood groups) no longer reads a VCF that does not cover a gene as the reference allele. Without a BAM, a system with no VCF record at any of its sites now reads `not assessed` (phenotype and confidence) instead of the reference phenotype at confidence medium, so a VCF with no chr9 record no longer reads ABO as O. A call with a genotype quality (`GQ`) under 20 or a read depth (`DP`, else `MIN_DP`) under 8 keeps its genotype but gives its system confidence low, and the note and the evidence file name the values. An ABO A allele now reads at confidence low, because no variant shows it: it is what is left of a functional allele with neither c.802G>A nor c.803G>C. Duffy reads the VCF's phase: a GATA box phased with one Fyb in one phase set goes on the chromosome the VCF gives (on Fya that is Fy(a-b+)). The notes now say what the DNA cannot check: the ABO alleles outside the five variants, RHD null and DEL alleles behind a D+, and null alleles the table does not hold. The table keeps its columns; `not assessed` is a new value in the phenotype and confidence columns. +- Step 41 (blood groups) no longer reads a VCF that does not cover a gene as the reference allele. Without a BAM, a system with no VCF record at any of its sites now reads `not assessed` (phenotype and confidence) instead of the reference phenotype at confidence medium, so a VCF with no chr9 record no longer reads ABO as O. A call with a genotype quality (`GQ`) under 20 or a read depth (`DP`, else `MIN_DP`) under 8 keeps its genotype but gives its system confidence low, and the note and the evidence file name the values. An ABO A allele now reads at confidence low, because no variant shows it: it is what is left of a functional allele with neither c.802G>A nor c.803G>C. Duffy reads the VCF's phase: a GATA box phased with one Fyb in one phase set goes on the chromosome the VCF gives (on Fya that is Fy(a-b+)). When H reads H- and ABO is `not assessed` or `not determined`, the ABO row no longer carries the Bombay note about its alleles. The notes now say what the DNA cannot check: the ABO alleles outside the five variants, RHD null and DEL alleles behind a D+, and null alleles the table does not hold. The table keeps its columns; `not assessed` is a new value in the phenotype and confidence columns. - A third-party outage no longer fails the Freshness check of a pull request. Since 2026-11-18 rest.ensembl.org has not answered, and the pull-request job's dry run of `og dev freshness` failed on every pull request that touched `versions.env` or `og-fresh`. `og dev freshness --unreachable-warns` now lists a lookup whose upstream did not answer (no connection, a timeout, HTTP 5xx or 429 after the retries, or HTTP 403) under "Upstreams that did not answer" as a warning, and its database row reads `NO ANSWER`; it does not change the exit. The 403 counts because rest.ensembl.org came back on 2026-11-19 answering 403 to GitHub's runners and 200 elsewhere, which still failed the pull-request job. A 404, an empty answer or an answer in an odd shape still exits 1. `freshness.yml` passes the flag only in the pull-request dry run. Without the flag the report and the exit are as before, and the monthly report on main still counts an outage as an error in the issue. - Three statements in the docs were wrong. Troubleshooting said exit code 137 confirms a kill for memory, and checked it with `docker ps -a --latest`. 137 is any SIGKILL, and the step scripts run their containers with `--rm`, so that command shows an older, unrelated container. The page now says how to confirm a kill for memory: `docker events --filter event=oom`, the kernel log, or `.State.OOMKilled` for a container kept without `--rm`. The run-state and troubleshooting pages said `bin/og` does not run on a Mac and told Mac users to build `og` with cargo or run it in a container. `bin/og` runs the native macOS build that `scripts/setup.sh --og` installs, and the pages now say so; on a Mac, `og run headroom` reports the machine's memory as unknown. Troubleshooting, the FAQ and the lessons-learned page said the step scripts run their containers as root, and lessons-learned gave `:latest` images and `chmod 777` as current fixes. The step scripts run their containers as you; those entries are now marked as past fixes and name what the pipeline does today. Documentation only: no option, output or behaviour changes. - Lint's ShellCheck job now checks every tracked shell script, not only `scripts/`: the e2e cases and their library, the fake-docker and parity tests, `tests/*.sh`, `bin/og` and the fake tools, 482 files in all, at every ShellCheck level. The 265 findings these files hold today are listed in `tests/shellcheck-baseline.txt` and still pass; any other finding fails lint. A listed finding is matched by its file, its code and the text of its line, so it keeps matching when lines above it move, and a new line with the same mistake still fails. Each run plants an unquoted `$1` in a new test script and on a new line of a listed script, and fails if either passes or if the file search misses the new script or `bin/og`. The `scripts/` check at warning level stays as it was. Part of #411 (plat-10). diff --git a/docs/41-bloodtype.md b/docs/41-bloodtype.md index cddab690e..2fc8e8d10 100644 --- a/docs/41-bloodtype.md +++ b/docs/41-bloodtype.md @@ -59,12 +59,12 @@ With `run-all.sh`: `TOOLS=...,bloodtype`. It is opt-in and needs no data, so a r | HPA-1, -2, -3, -4, -5, -6, -15 | ITGB3 c.176T>C, GP1BA c.482C>T, ITGA2B c.2621T>G, ITGB3 c.506G>A, ITGA2 c.1600G>A, ITGB3 c.1544G>A, CD109 c.2108C>A | one allele per copy; GRCh38 carries HPA-15b. HPA-6b is a low-frequency antigen, written HPA-6bw in the ISBT table | | HNA-1 | FCGR3B c.108G>C, c.114C>T, c.244G>A, c.316G>A (a or b); c.194A>G (checked); c.233C>A (c) | FCGR3B\*01 (HNA-1a) and \*02 (HNA-1b) differ at five bases. GRCh38 carries the \*02 base at four of them and the \*01 base at c.194, so the copies of HNA-1a are counted on the four, which must agree (else not determined), and c.194 is only checked: a c.194 that does not match is named in the note. FCGR3B\*03 (HNA-1c) is \*02 with c.233C>A and carries HNA-1b too. Without a call at c.233 an HNA-1b allele reads \*02 or \*03. Confidence is always low: FCGR3B and FCGR3A are near copies, and FCGR3B has from none to four or more copies, which the step does not count | | Vel, Langereis, Junior | SMIM1 c.64_80del; 36 ABCB6 null rows; 23 ABCG2 null rows | Read from the null rows alone: two null copies lack the antigen (Vel-, Lan-, Jr(a-)). One copy is a carrier, still positive. Two different null alleles, each once, are taken to sit on different chromosomes (no phase), so the antigen is lacking at confidence low | -| H, Secretor | 34 FUT1 null rows; 14 FUT2 null rows (c.461G>A among them, often written c.428G>A) | The same rule. Two FUT1 null copies give H- on red cells: `H- (Bombay, Oh)` with a non-secretor, `H- (para-Bombay)` with a secretor. The ABO row then says the red cells carry little or no A or B and usually group as O, whatever the ABO alleles are | +| H, Secretor | 34 FUT1 null rows; 14 FUT2 null rows (c.461G>A among them, often written c.428G>A) | The same rule. Two FUT1 null copies give H- on red cells: `H- (Bombay, Oh)` with a non-secretor, `H- (para-Bombay)` with a secretor. The ABO row then says the red cells carry little or no A or B and usually group as O, whatever the ABO alleles are; an ABO row that reads `not assessed` or `not determined` has no alleles to qualify and gets no such note | | Kell null (K0), Kidd null (Jk(a-b-)) | 57 KEL null rows; 40 SLC14A1 null rows, c.342-1G>A and c.871T>C among them | Each null copy silences one chromosome. With no phase it is placed on a chromosome with the antigens of the row's `null_on` column (k, Kpb and Jsb for KEL; Jka or Jkb, as the ISBT table finds it): one KEL null with K/k reads K+k-. Two null copies give K-k- Kp(a-b-) Js(a-b-) (lacking Ku) or Jk(a-b-) (lacking Jk3), also when an antigen site has no call. Two different nulls with different `null_on` alleles are each named with their own in the note | | HPA-7 to -14, -16 to -35 | one variant each in ITGB3, ITGA2B, ITGA2, GP1BB or GP9 | one allele per copy; the a antigen is on the reference allele, the low-prevalence b antigen on the other | | HNA-3, -4, -5 | SLC44A2 c.461G>A, ITGAM c.230G>A, ITGAL c.2372G>C | one allele per copy; GRCh38 carries HNA-3b | -A site the VCF has no record for is the reference allele when the BAM has at least 8 reads there at MAPQ 20, and not determined below that. Without the BAM it is read as reference, and the confidence says so (see [Without the BAM](#without-the-bam)). The step leaves out of `samtools bedcov` the rows on a contig the BAM has no `@SQ` line for (a BAM cut to a few chromosomes), because `bedcov` would stop on them. Those sites then have no depth row: the ones with no VCF record are not determined, and RhD is not determined without chr1. A record at a site whose REF is not the table's REF is a no call, because it says nothing about the table's ALT. There are two exceptions. A 0/0 call over a longer REF that starts with the table's REF is the reference allele. A 0/0 record over a shorter REF (an all-sites VCF's `C . 0/0`, or a gVCF block that starts at a deletion marker such as ABO c.1061delC) says nothing past its own base, so the site reads as one with no record: the reads decide. A gVCF reference block (ALT `.`, `<*>` or ``) whose `INFO/END` reaches the table's last REF base is a reference call there, wherever the block starts, with the block's `GQ` and `MIN_DP` (see [Weak calls](#weak-calls)). +A site the VCF has no record for is the reference allele when the BAM has at least 8 reads there at MAPQ 20, and not determined below that. Without the BAM it is read as reference, and the confidence says so (see [Without the BAM](#without-the-bam)). The step leaves out of `samtools bedcov` the rows on a contig the BAM has no `@SQ` line for (a BAM cut to a few chromosomes), because `bedcov` would stop on them. Those sites then have no depth row: the ones with no VCF record are not determined, and RhD is not determined without chr1. A record at a site whose REF is not the table's REF is a no call, because it says nothing about the table's ALT. There are two exceptions. A 0/0 call over a longer REF that starts with the table's REF is the reference allele. A 0/0 record over a shorter REF (an all-sites VCF's `C . 0/0`, or a gVCF block that starts at a deletion marker such as ABO c.1061delC) says nothing past its own base, so the site reads as one with no record: the reads decide. A gVCF reference block (ALT `.`, `<*>` or ``) whose `INFO/END` reaches the table's last REF base is a reference call there, wherever the block starts, with the block's `GQ` and `DP` (else `MIN_DP`) (see [Weak calls](#weak-calls)). ### Without the BAM diff --git a/rust/crates/og-bloodtype/src/rules.rs b/rust/crates/og-bloodtype/src/rules.rs index c1d54bab9..90cfc1836 100644 --- a/rust/crates/og-bloodtype/src/rules.rs +++ b/rust/crates/og-bloodtype/src/rules.rs @@ -880,6 +880,10 @@ fn system_abo(sites: &Genotyped) -> Row { } if s1061.status == Status::Assumed { used.push(s1061); + } else if !s1061.weak.is_empty() { + // Named here, not through `used`, so the caveat is not + // repeated; any A allele already reads low. + extra.push(format!("{}: weak call ({})", s1061.row.hgvs, s1061.weak)); } let n_a2 = n1061.min(n_a); alleles.extend(rep("A1", n_a - n_a2).chain(rep("A2", n_a2))); @@ -1230,6 +1234,10 @@ fn bombay(rows: &mut [Row]) { "para-Bombay: a working FUT2 makes H in secretions, and red cells carry little or none", ); } + // No ABO alleles were read: there is nothing for the note to qualify. + if rows[abo].phenotype == NOT_ASSESSED || rows[abo].phenotype == NOT_DETERMINED { + return; + } rows[abo].add_note( "no FUT1 (H-): the red cells carry no H (or very little, para-Bombay), so these ABO alleles make little or no A or B on them and the cells usually group as O", ); diff --git a/rust/crates/og-bloodtype/tests/report.rs b/rust/crates/og-bloodtype/tests/report.rs index 46971d0b4..ce97841d9 100644 --- a/rust/crates/og-bloodtype/tests/report.rs +++ b/rust/crates/og-bloodtype/tests/report.rs @@ -714,3 +714,30 @@ fn a_gvcf_block_that_reaches_a_marker_through_end_is_a_reference_call() { assert_eq!(site_both_ways(&d, &recs, "JK_838").0, "absent"); assert_eq!(run(&d, &recs, None)["Kidd"][0], "not assessed"); } + +#[test] +fn a_weak_abo_1061_call_is_named_and_h_minus_leaves_an_unread_abo_alone() { + let d = dir("abo-1061-bombay"); + let reads = || Some(depth(&d, 2.0, &HashMap::new())); + // A weak c.1061delC call under an A allele is named in the note, once. + let t = run( + &d, + &[ + rec("ABO_261", "0/1"), + recf("ABO_1061", "GT:GQ:DP", "0/0:3:30"), + ], + reads(), + ); + assert_eq!(t["ABO"][2], "low"); + assert!( + t["ABO"][3].contains("ABO c.1061delC: weak call (GQ 3 under 20)"), + "{}", + t["ABO"][3] + ); + // Two FUT1 null copies on chr19 and no chr9 record, no BAM: H-, and + // ABO, not assessed, gets no note about its alleles. + let t = run(&d, &[rec("FUT1_01N36", "1/1")], None); + assert!(t["H"][0].starts_with("H-"), "{}", t["H"][0]); + assert_eq!(t["ABO"][0], "not assessed"); + assert!(!t["ABO"][3].contains("no FUT1 (H-)"), "{}", t["ABO"][3]); +} diff --git a/tests/e2e/platelet-antigens-1.sh b/tests/e2e/platelet-antigens-1.sh index 76017a53a..6090e7516 100755 --- a/tests/e2e/platelet-antigens-1.sh +++ b/tests/e2e/platelet-antigens-1.sh @@ -66,7 +66,7 @@ vcf "${T}/none.vcf.gz" KEL_578:0/1 HPA1_176:0/0 HNA4_230:0/0 HNA3_461:0/0 R="${SAMPLE}plr" sample "$R" "${T}/none.vcf.gz" run_step 41-bloodtype.sh "$R"; check_step_exit 41-bloodtype.sh -check_eq "control: HPA-1 is HPA-1(a+b-) without the planted record" "$(cell "$R" HPA-1 phenotype)" "HPA-1(a+b-)" +check_eq "control: HPA-1 is HPA-1(a+b-) with 0/0 there" "$(cell "$R" HPA-1 phenotype)" "HPA-1(a+b-)" check_eq "control: HNA-4 is HNA-4(a+b-)" "$(cell "$R" HNA-4 phenotype)" "HNA-4(a+b-)" check_eq "control: HNA-3 is GRCh38's HNA-3(a-b+)" "$(cell "$R" HNA-3 phenotype)" "HNA-3(a-b+)" diff --git a/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv b/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv index 6cee1eb25..13e7678ae 100644 --- a/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv +++ b/tests/parity/golden/bloodtype/abo-bad-para-bombay-lan/t.tsv @@ -1,7 +1,7 @@ system phenotype genotype confidence note Langereis Lan- null/null low null alleles: ABCB6 c.717G>A x1, ABCB6 c.574C>T x1; two different null alleles, assumed to sit on different chromosomes (phase is not read); lacks Lan, carried by most people (high prevalence) H H- (para-Bombay) h/h high null allele: FUT1 c.695G>A x2; lacks H, carried by most people (high prevalence); para-Bombay: a working FUT2 makes H in secretions, and red cells carry little or none -ABO not determined . not determined the markers do not add up to two ABO alleles (c.261 insertion x1, c.802G>A x1, c.803G>C x2); no FUT1 (H-): the red cells carry no H (or very little, para-Bombay), so these ABO alleles make little or no A or B on them and the cells usually group as O +ABO not determined . not determined the markers do not add up to two ABO alleles (c.261 insertion x1, c.802G>A x1, c.803G>C x2) RhD D+ RHD/RHD (RHD copies by read depth 2.00) high weak and partial D (RHD missense alleles) are not assessed; an RHD gene that is there reads D+: RHD null alleles other than RHD*08N.01, RHD-CE-D hybrids that keep exons 3 to 7, and DEL alleles are not assessed RhCE C-c+ E-e+ c/c e/e low RHCE exon 2 of a C allele is RHD-like: short reads can place it on RHD Kell K-k+ Kp(a-b+) Js(a-b+) k/k Kpb/Kpb Jsb/Jsb high a null allele the table does not hold (one of two or more variants, or a large deletion) goes unseen From 8e9d9e8197693def6711cc8d7f95d2375430a620 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 02:29:39 +0100 Subject: [PATCH 101/110] fix(acmg): name a clinical VCF of an earlier run in the secondary-findings card When step 23 is not ok in this run and its clinical VCF predates the run, sections.acmg_sf still reads that VCF. The card now says so in high_impact_note, with the VCF's date and step 23's result, as the clinical section goes stale. --- docs/23-clinical-filter.md | 2 +- docs/results/secondary-findings.md | 2 +- .../og-summary/src/collect/acmg_card.rs | 40 ++++++++++--- rust/crates/og-summary/src/collect/group_b.rs | 22 +++++-- .../tests/screen_acmg_card_section.rs | 58 +++++++++++++++++++ 5 files changed, 110 insertions(+), 14 deletions(-) diff --git a/docs/23-clinical-filter.md b/docs/23-clinical-filter.md index ce1807e00..6e68c692d 100644 --- a/docs/23-clinical-filter.md +++ b/docs/23-clinical-filter.md @@ -90,7 +90,7 @@ The Nextflow `CLINICAL_FILTER` module applies the same tiers, ranking, frequency Both reports list, beside the clinical filter's counts, the secondary findings in the 84 genes of the ACMG SF v3.3 list (Lee et al., Genet Med 2025;27(8):101454; the genes in which the ACMG recommends reporting pathogenic variants found by chance, such as BRCA1, LDLR, MYBPC3 or TTN): the step 6 ClinVar hits in those genes, the clinical filter's records with a HIGH-impact consequence on the ranked transcript in them, and step 5's AnnotSV class 4 and 5 structural variants in the genes whose rule allows them. Each gene's rule from Table 1 of the list is a row of `assets/acmg_sf.tsv`: one variant in a dominant gene, two in a recessive one (MUTYH, BTD, ATP7B and others; a homozygote, or two variants of unknown phase), HFE only as homozygous p.C282Y, GLA and OTC also in a heterozygous female, ABCD1 hemizygous, homozygous or with two heterozygous variants. A variant the rule does not report is listed apart with the reason; a pseudodeficiency allele is not counted, and a BTD finding with the p.Asp444His hypomorph says partial, not profound. Of the reported HIGH-impact records the reports count as "rare HIGH impact" only the rare ones with a sound call; a weak call or an unknown frequency is listed with its mark and counted apart, and a common one is left out. The list version is `ACMG_SF_VERSION` in `og summary collect` (`rust/crates/og-summary`). It is a list to review with a clinician: a rare HIGH-impact variant is not a ClinVar classification. [Interpreting results](interpreting-results.md#carrier-status-is-not-disease) gives every rule. Step 17 (CPSR) reports the ACMG secondary findings with its own classification. -summary.json holds the card twice. `sections.clinical.data.acmg_sf` is the card as both reports read it, there only when this step ran. `sections.acmg_sf` is the same card as a section of step 6: it is written whenever step 6's hits are there, so a run without the VEP cache still gets the ClinVar and SV findings. Without this step's clinical VCF it has `high_impact_checked: false` and a `high_impact_note` that names why (this step skipped, with the run's reason, failed, or its VCF unreadable) and what that can miss: a predicted loss-of-function variant that is not in ClinVar, alone or as the second hit of a recessive gene. With the clinical VCF the two cards are equal. A clinical VCF that cannot be read makes the clinical section's card unavailable, while `sections.acmg_sf` keeps its ClinVar rows and says the VCF could not be read. +summary.json holds the card twice. `sections.clinical.data.acmg_sf` is the card as both reports read it, there only when this step ran. `sections.acmg_sf` is the same card as a section of step 6: it is written whenever step 6's hits are there, so a run without the VEP cache still gets the ClinVar and SV findings. Without this step's clinical VCF it has `high_impact_checked: false` and a `high_impact_note` that names why (this step skipped, with the run's reason, failed, or its VCF unreadable) and what that can miss: a predicted loss-of-function variant that is not in ClinVar, alone or as the second hit of a recessive gene. With the clinical VCF the two cards are equal, except when that VCF is from an earlier run (this step not ok in this run): then `sections.acmg_sf` adds a `high_impact_note` with the earlier VCF's date. A clinical VCF that cannot be read makes the clinical section's card unavailable, while `sections.acmg_sf` keeps its ClinVar rows and says the VCF could not be read. The `table_text` column of `assets/acmg_sf.tsv` quotes each gene's rule from Table 1 of the paper (doi:10.1016/j.gim.2025.101454), such as "All P and LP" or "P and LP (2 variants)". summary.json gives that text as the rule of each finding, and the reports use it in the reason a variant is not reported. These are short cited quotations of a factual reporting rule: six phrases, the longest 44 characters. "(See text)" after a rule points to the paper's section on the dilated cardiomyopathy (DCM) genes. The `note` column says what the table's footnotes add, in our own words. diff --git a/docs/results/secondary-findings.md b/docs/results/secondary-findings.md index 63df53e20..ee96e62c4 100644 --- a/docs/results/secondary-findings.md +++ b/docs/results/secondary-findings.md @@ -31,7 +31,7 @@ The most common "pathogenic" finding in any genome is **heterozygous carrier sta Examples: an exon deletion of MUTYH plus a pathogenic MUTYH variant; three alpha-globin genes plus an HBA2 point variant; one SMN1 copy plus an SMN1 variant (short reads place few SMN1 variants reliably, so check with a targeted test); and the 1q21.1 deletion plus one of the two RBM8A low-expression alleles (c.-21G>A, rs139428292, or c.67+32G>C, rs201779890), the cause of TAR syndrome (thrombocytopenia with absent radius; Albers et al., Nat Genet 2012;44(4):435-439, PMID 22366785). On its own an RBM8A low-expression allele stays set aside. The [couple screen](../39-couple.md) (step 39) applies the same pairing between partners: a hypomorph allele of the list in one partner and a full loss of function in the same gene in the other (a ClinVar pathogenic variant, a Delly deletion) is a shared gene with its risk for a child; the allele in both partners, or in one alone, stays set aside. In the secondary-findings card a called deletion counts as one of the two variants a recessive gene needs, unless read-backed phase puts it on the variant's copy. The line under the carrier list names the deletion callers it read and the ones it could not read. A deletion AnnotSV ranks below class 4 is not counted. -Without a readable clinical VCF from step 23 (no VEP cache, step 23 skipped or failed with no VCF left, or a VCF that cannot be read) the card in `sections.acmg_sf` holds the ClinVar hits and the SVs only, and its `high_impact_note` says so: a predicted loss-of-function variant that is not in ClinVar is not screened, alone or as the second hit of a recessive gene. A clinical VCF left by an earlier run is still read when step 23 failed in this run, as the clinical section reads it; that section then shows as stale. +Without a readable clinical VCF from step 23 (no VEP cache, step 23 skipped or failed with no VCF left, or a VCF that cannot be read) the card in `sections.acmg_sf` holds the ClinVar hits and the SVs only, and its `high_impact_note` says so: a predicted loss-of-function variant that is not in ClinVar is not screened, alone or as the second hit of a recessive gene. A clinical VCF left by an earlier run is still read when step 23 failed in this run, as the clinical section reads it; that section then shows as stale, and the card's `high_impact_note` gives the date of that earlier VCF and step 23's result in this run. The TTN rule (truncating variants only) and the LMNA rule (missense only with cardiac evidence) are printed beside the finding, not applied. It is still a list to review with a clinician. diff --git a/rust/crates/og-summary/src/collect/acmg_card.rs b/rust/crates/og-summary/src/collect/acmg_card.rs index bc7e96a12..dabb42721 100644 --- a/rust/crates/og-summary/src/collect/acmg_card.rs +++ b/rust/crates/og-summary/src/collect/acmg_card.rs @@ -9,7 +9,10 @@ //! verdicts are [`acmg::acmg_sf`]'s, the one function the clinical section //! also calls: with the clinical VCF when it is there and readable, without //! it otherwise. Without it the card says `high_impact_checked: false` and -//! `high_impact_note` names why and what that can miss. +//! `high_impact_note` names why and what that can miss. With a clinical +//! VCF left by an earlier run (step 23 not ok in this run, the VCF older +//! than the run's start) the card reads it and its `high_impact_note` says +//! the HIGH-impact source is from that earlier run. use super::acmg::{self, ClinicalVcf}; use super::clinvar::HitsVcf; @@ -59,14 +62,27 @@ impl NoHighImpact { } /// What the card reads: the step 06 hits, the clinical VCF when step 23 -/// left one, the deletions of the two-hit rule, and step 23's result word -/// from the run status. +/// left one, the deletions of the two-hit rule, step 23's result word +/// from the run status, and the clinical VCF's file date when it is from +/// an earlier run. pub struct Inputs<'a> { pub assets: &'a str, pub hits: &'a HitsVcf, pub clinical: Option<&'a Result>, pub deletions: &'a DeletionInputs, pub step23: Option<&'a str>, + /// The clinical VCF's file date (UTC minute) when step 23 was not ok in + /// this run and the VCF was written before the run started. + pub earlier_vcf: Option, +} + +/// `high_impact_note` for a card that read a clinical VCF of an earlier run. +pub fn earlier_note(date: &str, step23: Option<&str>) -> String { + let result = step23.filter(|r| !r.is_empty()).unwrap_or("not run"); + format!( + "Rare HIGH-impact variants come from the clinical VCF of an earlier run ({date}); step \ + 23 (clinical filter) was {result} in this run." + ) } /// The data of the `acmg_sf` section. @@ -100,10 +116,20 @@ impl AcmgCard { clinical, deletions: i.deletions, })?; - if let (Value::Object(m), Some(why)) = (&mut v, missing) - && m.get("high_impact_checked") == Some(&Value::Bool(false)) - { - m.insert("high_impact_note".into(), Value::Str(why.note())); + if let Value::Object(m) = &mut v { + let checked = m.get("high_impact_checked").cloned(); + match (missing, &i.earlier_vcf) { + (Some(why), _) if checked == Some(Value::Bool(false)) => { + m.insert("high_impact_note".into(), Value::Str(why.note())); + } + (None, Some(date)) if checked == Some(Value::Bool(true)) => { + m.insert( + "high_impact_note".into(), + Value::Str(earlier_note(date, i.step23)), + ); + } + _ => {} + } } Ok(AcmgCard(v)) } diff --git a/rust/crates/og-summary/src/collect/group_b.rs b/rust/crates/og-summary/src/collect/group_b.rs index 7da3e7096..ab338db0e 100644 --- a/rust/crates/og-summary/src/collect/group_b.rs +++ b/rust/crates/og-summary/src/collect/group_b.rs @@ -144,6 +144,21 @@ pub fn read(input: &Input, folder: &Folder) -> Vec
{ }; let clinical_vcf = clinical_vcf_at.as_ref().map(|(v, _)| ClinicalVcf::read(v)); // The card follows step 06: it needs the hits, not step 23. + let step23 = folder + .run + .as_ref() + .and_then(|r| r.steps.get("23")) + .map(String::as_str); + // A clinical VCF older than this run, with step 23 not ok in it, is an + // earlier run's: the card says so, as the clinical section goes stale. + let earlier_vcf = match (&folder.run, &clinical_vcf_at) { + (Some(run), Some((p, _))) if step23 != Some("ok") => run + .started_epoch + .zip(pycompat::mtime::mtime(p).ok()) + .filter(|&(started, m)| super::model::is_stale(m, started)) + .and_then(|(_, m)| super::time::utc_minute(m)), + _ => None, + }; let acmg_sf: Read = match &hits { None => Ok(None), Some(h) => AcmgCard::read(&acmg_card::Inputs { @@ -151,11 +166,8 @@ pub fn read(input: &Input, folder: &Folder) -> Vec
{ hits: h, clinical: clinical_vcf.as_ref(), deletions: &deletions, - step23: folder - .run - .as_ref() - .and_then(|r| r.steps.get("23")) - .map(String::as_str), + step23, + earlier_vcf, }) .and_then(|c| with_mtime(&h.path, h.rel.clone(), Data::AcmgSf(c))), }; diff --git a/rust/crates/og-summary/tests/screen_acmg_card_section.rs b/rust/crates/og-summary/tests/screen_acmg_card_section.rs index 73af19fc3..539218b06 100644 --- a/rust/crates/og-summary/tests/screen_acmg_card_section.rs +++ b/rust/crates/og-summary/tests/screen_acmg_card_section.rs @@ -386,3 +386,61 @@ fn without_the_clinical_vcf_the_card_loses_only_what_the_high_impact_source_brin "no row moved from not reported to reported with VEP: the folders no longer test rule (c)" ); } + +/// A clinical VCF left by an earlier run (step 23 not ok in this run, the +/// VCF written before the run started) is still read, and the card says +/// its HIGH-impact source is from that earlier run. With step 23 ok in +/// this run, or a VCF of this run, the card has no such note. +#[test] +fn a_clinical_vcf_of_an_earlier_run_is_named_in_the_card() { + let d = scratch("earlier"); + let assets = parity_folders(&d); + let mut names: Vec<_> = std::fs::read_dir(&d) + .unwrap() + .map(|e| e.unwrap().path()) + .filter(|p| p.join("clinvar/S_clinvar_hits.vcf").is_file() && p.join("clinical").is_dir()) + .collect(); + names.sort(); + let dir = names + .into_iter() + .find(|p| { + let secs = sections_b(p, &assets); + s(at(&secs, &["acmg_sf", "state"])) == "ok" + && at(&secs, &["acmg_sf", "data", "high_impact_checked"]) == &Value::Bool(true) + }) + .expect("a parity folder with a readable clinical VCF"); + let now = std::time::SystemTime::now() + .duration_since(std::time::UNIX_EPOCH) + .unwrap() + .as_secs(); + let status = |started: u64, step23: &str| { + put( + &dir.join("logs/run_status.tsv"), + &format!("meta\tstarted_epoch\t{started}\nstep\t06\tok\nstep\t23\t{step23}\n"), + ); + sections_b(&dir, &assets) + }; + // The run started after the VCF was written, and step 23 failed in it. + let secs = status(now + 3600, "failed (exit 1)"); + let card = at(&secs, &["acmg_sf", "data"]); + assert_eq!(at(card, &["high_impact_checked"]), &Value::Bool(true)); + let note = s(at(card, &["high_impact_note"])); + assert!( + note.starts_with( + "Rare HIGH-impact variants come from the clinical VCF of an earlier run (" + ) && note.ends_with("step 23 (clinical filter) was failed (exit 1) in this run."), + "{note}" + ); + assert_eq!(s(at(&secs, &["clinical", "state"])), "stale"); + // Step 23 ok in this run, or a VCF written after the run started (the + // generator dates its files in 2021, so a run of 1970 is before them): + // no note. + for (started, step23) in [(now + 3600, "ok"), (1, "failed (exit 1)")] { + let secs = status(started, step23); + assert!( + get(at(&secs, &["acmg_sf", "data"]), "high_impact_note").is_none(), + "{started} {step23}: {secs:?}" + ); + } + let _ = std::fs::remove_dir_all(&d); +} From 0e2b0adfb30624c6ae6cd4ee52c41ce951d7258a Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 02:39:25 +0100 Subject: [PATCH 102/110] fix(demo): the demo's Locityper table says uncalibrated at CYP2D6 and FCGR Since #519, og locityper report writes filter "uncalibrated" outside the HLA and KIR loci, but the demo sample still wrote "pass" for every locus, so the docs pictures and the live demo showed CYP2D6 and FCGR passing a filter the real pipeline no longer applies there. The demo now writes a made-up res.json.gz per locus (the same seeded values as before) and runs og locityper report on them, as its module comment promises, so the table cannot drift from the verb again. The Python remnant writer gets the same filter and reason. A new test in port_demo_sample.rs holds the demo table to og-reports' calibrated() and UNCALIBRATED; it failed on the FCGR row before the fix. --- CHANGELOG.md | 2 +- rust/crates/og-dev/src/demo/mod.rs | 3 +- rust/crates/og-dev/src/demo/pgx.rs | 54 +++++++++++++++++------------- rust/og/tests/port_demo_sample.rs | 28 ++++++++++++++++ tests/demo/make_demo_sample.py | 10 ++++-- 5 files changed, 68 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fad05e3c..dda3da6ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,7 +37,7 @@ Each release's notes. From 1.0.0 on, a major or minor release has hand-written n - Gene callability (step 16b and the Nextflow `MOSDEPTH` process) no longer counts a fragment twice. The gene pass ran mosdepth with `--fast-mode`, which counts every base from a read's start to its end: where the two mates of a pair overlap, a base counted two reads, and the bases of a deletion in a read counted as read. A gene that fewer than 10 fragments covered could reach 10x and read as read. The gene pass now runs without `--fast-mode`; the genome-wide 500 bp pass keeps it. The file name and columns of `_callability.bed.gz` do not change; its `10X` counts can be lower, so a gene near 90% can move to "not read". Step 16b skips a sample it already ran, so a sample from before this change keeps its old counts: delete `/mosdepth/_callability.bed.gz` and run step 16b again, and only the gene pass runs. On public HG002 30x, 4 of 1,553 genes moved (DHX40, SPATA31C2, GOLGA6L10 and UGT2B17), and the pass takes about 37% more CPU time, 3.5-4 min on a 10-core Mac mini. The step doc and `docs/lessons-learned.md` said `--fast-mode` drops the per-base output; `--no-per-base` does that, and they now say so. A new e2e case, `i411-callability-overlap-1-mates`, runs both paths on a small BAM with overlapping pairs and a deletion. - The output contract check now compares the contract with the last release, so a stable output cannot disappear between releases. Before, `og dev contract --static` compared the code with the contract of the same checkout only: a change that renamed a stable output in the code and in its row, removed a stable param with its row, or made a stable row experimental passed. `og dev contract --baseline FILE` checks every stable row of a release's contract against this one: still listed, still stable, the same format, every leg that wrote the file and every required field. New rows and changes to experimental and internal rows pass. Guard's `rust` job runs it against the contract of the newest `v1.x.y` tag; until 1.0.0 is tagged there is none, and the step says so. The HG002 e2e case now also checks 31 stable files the base run writes whose `e2e` cell was `-` (the clinical summary, the slivar, mitochondrial and pypgx tables, the ClinVar cDNA and deep-intronic tables, the gVCF, the read count, the charts and search index, the PharmCAT JSON and HTML, the coverage beds, the sex check, indexcov, the Stranger VCF of ExpansionHunter, the indexes of the clinical, slivar and mitochondrial VCFs, and the Mutect2 stats of chrM). `run_manifest.tsv`, those three indexes and the Mutect2 stats are now listed on both legs, since the step scripts write them too. No output changes. `.github/CODEOWNERS` now says it routes review requests: main requires its status checks, not an approving review. - Step 50 marks a known disease insertion (the FKTN, TAF1 and BBS1 SVAs of `assets/mei_sites.tsv`) seen only when MEGAnE's call there passed its own filters (FILTER `PASS`). Before, a call MEGAnE had flagged, such as `LC` for low confidence, also made the site read seen, so a call MEGAnE did not trust could read as carrier status. Now a site whose only calls are flagged reads `call filtered out (LC)` (with the call's flags) in the `status` column of `mei/_mei_sites.tsv`, and `call` names the flagged call. A `PASS` call in the same window still makes the site seen. That status value is new; the columns and the other values (seen, not seen, not callable) do not change. A window with zero depth and no call reads not callable, never not seen, as before; a new test now holds that. The calls table `mei/_mei.tsv` does not change: it lists flagged calls with their `filter`, as before. Tests: `rust/crates/og-reports/tests/i411_mei_seen_pass.rs`. Part of #411. -- Step 53 (Locityper) no longer shows a pass at CYP2D6 and FCGR. The authors set their quality filter (no warning, a weighted distance of 30 or less, few unexplained reads) on HLA and KIR genes only, but `og locityper report` applied it as pass or fail at every locus, so a CYP2D6 or FCGR call could read as a green pass that nobody had measured. The `filter` column now reads `pass` or `fail` only at a locus whose name starts with `HLA-` or `KIR`; at any other locus it reads `uncalibrated`, and `reason` says what the rule alone gives there (`... by its rule alone it passes`, or `... it fails:` with the reasons). Both reports show `uncalibrated` in grey and count only `pass` rows as passing. The step's last line adds the count of uncalibrated loci. `docs/53-locityper.md` also says that the cut of 30 comes from Locityper 0.17.3, whose weighted distance was a minimizer Jaccard distance, while the 1.7.14 the step runs gives an edit distance. No column or file name changes; the `filter` column has one new value. A cargo test, `rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs`, checks all five shipped loci; 12 parity goldens of `locityper-report` record the new rows. +- Step 53 (Locityper) no longer shows a pass at CYP2D6 and FCGR. The authors set their quality filter (no warning, a weighted distance of 30 or less, few unexplained reads) on HLA and KIR genes only, but `og locityper report` applied it as pass or fail at every locus, so a CYP2D6 or FCGR call could read as a green pass that nobody had measured. The `filter` column now reads `pass` or `fail` only at a locus whose name starts with `HLA-` or `KIR`; at any other locus it reads `uncalibrated`, and `reason` says what the rule alone gives there (`... by its rule alone it passes`, or `... it fails:` with the reasons). Both reports show `uncalibrated` in grey and count only `pass` rows as passing. The step's last line adds the count of uncalibrated loci. `docs/53-locityper.md` also says that the cut of 30 comes from Locityper 0.17.3, whose weighted distance was a minimizer Jaccard distance, while the 1.7.14 the step runs gives an edit distance. No column or file name changes; the `filter` column has one new value. A cargo test, `rust/crates/og-reports/tests/i411_locityper_uncalibrated.rs`, checks all five shipped loci; 12 parity goldens of `locityper-report` record the new rows. The docs demo sample (`og dev demo-sample`) now writes its step 53 table with `og locityper report` too, so the demo report shows CYP2D6 and FCGR as `uncalibrated` like a real run; `rust/og/tests/port_demo_sample.rs` checks it. - Step 45's Y-STR counts are on FamilyTreeDNA's scale at the 24 markers with a published counting rule. The marker set's regions did not always cover the repeat blocks a lab counts, so DYS19 read 16 where FamilyTreeDNA reads 15 on the same DNA, DYS449 read 36 for 29 and Y-GATA-H4 31 for 11. `assets/ystr_panel.tsv` now carries each marker's offset, from the GRCh38 sequence counted by NIST STRBase's repeat structure, and `og y str-report` adds it. A called marker with no published rule says in its note that its count is on the reference's scale. - `high` confidence now also needs at least 70% of the reads that span the repeat to show the called length (HipSTR's `MALLREADS`). Before, it meant read quality only: a call could be high while most reads showed another length. A record without `MALLREADS` is not high. - The panel's header says that FamilyTreeDNA's order, names and panels are reproduced only for comparison, that no FamilyTreeDNA text is copied, and that FamilyTreeDNA is a trademark of Gene by Gene. diff --git a/rust/crates/og-dev/src/demo/mod.rs b/rust/crates/og-dev/src/demo/mod.rs index 2d48168dc..f13b40f23 100644 --- a/rust/crates/og-dev/src/demo/mod.rs +++ b/rust/crates/og-dev/src/demo/mod.rs @@ -21,7 +21,8 @@ //! `og pgx cpic-report` (steps 36 and 27), `og prs table` (25), //! `og qc sample` and `og qc sex-loss` (33), `og ancestry-fine report` //! (26b), `og paraphase table` (35b), `og couple screen` (39), -//! `og traits table` (42) and `og ancient report` (44). The other tables are +//! `og traits table` (42), `og ancient report` (44) and +//! `og locityper report` (53). The other tables are //! written in their writers' columns, with the values those writers give for //! the made-up inputs named in each function. Each part lives in the file of //! its report chapter: [`qc`], [`clinical`], [`clinical_clinvar`], [`pgx`], diff --git a/rust/crates/og-dev/src/demo/pgx.rs b/rust/crates/og-dev/src/demo/pgx.rs index c00deb5ae..d196ae62a 100644 --- a/rust/crates/og-dev/src/demo/pgx.rs +++ b/rust/crates/og-dev/src/demo/pgx.rs @@ -3,7 +3,7 @@ //! step 36 passed their consensus on, step 27's CPIC tables, and the //! Locityper second opinion (step 53). -use super::{Ctx, Rng, Scratch, arg, copy, put, read, versions_env}; +use super::{Ctx, Rng, Scratch, arg, copy, put, put_gz, read, versions_env}; use pycompat::json::{self, Dump, Value}; use std::collections::HashMap; @@ -372,11 +372,11 @@ fn stale(ann: &Value, changed: &HashMap) -> bool { }) } -/// Step 53: what `og locityper report` writes for a made-up Locityper run -/// that called every locus of `assets/locityper_loci.bed` with two HPRC -/// panel haplotypes, made-up qualities and read counts, and passed the -/// authors' filter (no warning, a weighted distance under 30, few -/// unexplained reads). +/// Step 53: `og locityper report` over a made-up Locityper run that called +/// every locus of `assets/locityper_loci.bed` with two HPRC panel +/// haplotypes, made-up qualities and read counts, no warning and a small +/// weighted distance. So the HLA and KIR loci pass the authors' filter, and +/// the others (CYP2D6, FCGR) read "uncalibrated", as a real run says. pub fn locityper(ctx: &Ctx, rng: &mut Rng) -> Result<(), String> { let panel = [ "HG00438.1", @@ -386,34 +386,40 @@ pub fn locityper(ctx: &Ctx, rng: &mut Rng) -> Result<(), String> { "NA18906.1", "NA19240.2", ]; - let mut out = String::from( - "locus\tregion\tstatus\tgenotype\thaplotype_1\thaplotype_2\tquality\ttotal_reads\tunexplained_reads\tweighted_distance\twarnings\tfilter\treason\n", - ); - let bed = read(&ctx.asset("assets/locityper_loci.bed"))?; - for line in bed.lines() { + let bed = ctx.asset("assets/locityper_loci.bed"); + let tmp = Scratch::new("locityper")?; + for line in read(&bed)?.lines() { if line.trim().is_empty() || line.starts_with('#') { continue; } - let c: Vec<&str> = line.split('\t').collect(); - let [chrom, start, end, name, ..] = c[..] else { + let Some(name) = line.split('\t').nth(3) else { return Err(format!("assets/locityper_loci.bed: short row {line:?}")); }; - let start: i64 = start - .parse() - .map_err(|_| format!("assets/locityper_loci.bed: start {start:?}"))?; let haps = rng.sample_idx(panel.len(), 2); let (h1, h2) = (panel[haps[0]], panel[haps[1]]); let quality = rng.uniform(25.0, 60.0); let total = rng.int(800, 4000); let unexplained = rng.int(0, 30); let dist = rng.uniform(0.1, 3.0); - out.push_str(&format!( - "{name}\t{chrom}:{}-{end}\tcalled\t{h1},{h2}\t{h1}\t{h2}\t{quality:.1}\t{total}\t{unexplained}\t{dist:.3}\t.\tpass\t.\n", - start + 1 - )); + let locus = tmp.join(&format!("loci/{name}")); + put_gz( + &locus.join("res.json.gz"), + &format!( + "{{\"genotype\": \"{h1},{h2}\", \"quality\": {quality:.1}, \"total_reads\": {total}, \"unexpl_reads\": {unexplained}, \"weight_dist\": {dist:.3}, \"warnings\": []}}" + ), + )?; + put(&locus.join("success"), "")?; } - put( - &ctx.path(&format!("locityper/{}_locityper.tsv", ctx.sample)), - &out, - ) + let out = ctx.path(&format!("locityper/{}_locityper.tsv", ctx.sample)); + std::fs::create_dir_all(ctx.path("locityper")).map_err(|e| e.to_string())?; + ctx.og(&[ + "locityper", + "report", + "--gt-dir", + arg(&tmp.0), + "--loci", + arg(&bed), + "--out", + arg(&out), + ]) } diff --git a/rust/og/tests/port_demo_sample.rs b/rust/og/tests/port_demo_sample.rs index 1bf2cb2d0..1c371f9ba 100644 --- a/rust/og/tests/port_demo_sample.rs +++ b/rust/og/tests/port_demo_sample.rs @@ -145,6 +145,34 @@ fn demo_001_feeds_every_section_and_the_check_catches_a_missing_one() { let _ = std::fs::remove_dir_all(&root); } +#[test] +fn the_demo_step_53_table_reads_uncalibrated_outside_hla_and_kir() { + use og_reports::locityper::{UNCALIBRATED, calibrated}; + let root = dir("locityper"); + demo(&root, &[]); + let table = text(&root.join("DEMO-001/locityper/DEMO-001_locityper.tsv")); + let mut lines = table.lines(); + let head: Vec<&str> = lines.next().unwrap().split('\t').collect(); + let col = |name: &str| head.iter().position(|c| *c == name).unwrap(); + let (locus, filter, reason) = (col("locus"), col("filter"), col("reason")); + let mut seen = (0, 0); + for line in lines { + let c: Vec<&str> = line.split('\t').collect(); + if calibrated(c[locus]) { + seen.0 += 1; + assert_eq!((c[filter], c[reason]), ("pass", "."), "{line}"); + } else { + seen.1 += 1; + assert_eq!(c[filter], "uncalibrated", "{line}"); + assert!(c[reason].starts_with(UNCALIBRATED), "{line}"); + } + } + // assets/locityper_loci.bed holds HLA and KIR loci and two others + // (CYP2D6, FCGR), so both branches ran. + assert!(seen.0 > 0 && seen.1 > 0, "{seen:?}"); + let _ = std::fs::remove_dir_all(&root); +} + #[test] fn the_same_seed_writes_the_same_bytes() { let (a, b, c) = (dir("seed-a"), dir("seed-b"), dir("seed-c")); diff --git a/tests/demo/make_demo_sample.py b/tests/demo/make_demo_sample.py index 846ad70fb..b12892ddd 100755 --- a/tests/demo/make_demo_sample.py +++ b/tests/demo/make_demo_sample.py @@ -1408,8 +1408,9 @@ def vntyper(d): def locityper(d, rng): """Step 53: what og locityper report writes for a made-up Locityper run that called every locus of assets/locityper_loci.bed with two HPRC panel - haplotypes, made-up qualities and read counts, and passed the authors' - filter (no warning, a weighted distance under 30, few unexplained reads).""" + haplotypes, made-up qualities and read counts, no warning and a small + weighted distance: the HLA and KIR loci pass the authors' filter, the + others (CYP2D6, FCGR) read uncalibrated, as og locityper report says.""" panel = ["HG00438.1", "HG00733.2", "HG01891.1", "HG02257.2", "NA18906.1", "NA19240.2"] out = ["locus\tregion\tstatus\tgenotype\thaplotype_1\thaplotype_2\tquality\ttotal_reads\tunexplained_reads" "\tweighted_distance\twarnings\tfilter\treason\n"] @@ -1422,7 +1423,10 @@ def locityper(d, rng): quality, total = round(rng.uniform(25, 60), 1), rng.randint(800, 4000) unexpl, dist = rng.randint(0, 30), round(rng.uniform(0.1, 3), 3) out.append("\t".join([name, f"{chrom}:{int(start) + 1}-{end}", "called", ",".join(haps), *haps, - f"{quality:.1f}", str(total), str(unexpl), f"{dist:.3f}", ".", "pass", "."]) + "\n") + f"{quality:.1f}", str(total), str(unexpl), f"{dist:.3f}", ".", + *(("pass", ".") if name.startswith(("HLA-", "KIR")) else + ("uncalibrated", "the authors calibrated this filter on HLA and KIR loci " + "only; by its rule alone it passes"))]) + "\n") put(os.path.join(d, "locityper", f"{SAMPLE}_locityper.tsv"), "".join(out)) From 848a80bde1f108f324fd938bc91584ba4993edcf Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 02:41:01 +0100 Subject: [PATCH 103/110] fix(freshness): an FDA table nobody answers for stays a warning on pull requests The drug-interactions row reads the FDA table from the Wayback Machine, because fda.gov refuses GitHub's runners. It turned every error of that second read into a plain failure, so a day when archive.org does not answer would have failed the Freshness check of every pull request that touches the pinned versions. The row now keeps 'did not answer' as it is, and the dry run warns. A new test asks with a fetcher that never answers; it failed before this change. docs/53-locityper.md named Locityper 1.7.14 in one paragraph and 1.7.15 in another after two changes met. The step runs 1.7.15. --- docs/53-locityper.md | 2 +- rust/crates/og-fresh/src/lookups.rs | 52 ++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/docs/53-locityper.md b/docs/53-locityper.md index 85c01b669..79c5065af 100644 --- a/docs/53-locityper.md +++ b/docs/53-locityper.md @@ -71,7 +71,7 @@ The filter is the one the authors used for their HLA and KIR benchmark (Zenodo 1 The authors set that filter on HLA and KIR genes only, so the `filter` column reads pass or fail only at a locus whose name starts with `HLA-` or `KIR` (HLA-DRB1, HLA-DQB1 and KIR here). At any other locus, CYP2D6 and FCGR here, it reads `uncalibrated`: nobody has measured what a pass means there, so the table never shows one. The `reason` column then says what the rule alone gives, for example `the authors calibrated this filter on HLA and KIR loci only; by its rule alone it passes`, or `... it fails:` with the reasons. A locus of your own list (`LOCITYPER_LOCI`) follows the same rule by its name. The reports count only `pass` rows as passing. -At HLA and KIR the cut of 30 is also older than the distance it is applied to. The authors' results came from Locityper 0.17.3, where the weighted distance was a Jaccard distance between sets of minimizers (the Zenodo README). Locityper 1.7.0 changed the estimate, and the 1.7.14 this step runs gives it as an edit distance (`dist_type` `edit` in `res.json.gz`), from the alignments `locityper augment` writes. So a pass there is the authors' rule applied to a newer measure, not a result they benchmarked. +At HLA and KIR the cut of 30 is also older than the distance it is applied to. The authors' results came from Locityper 0.17.3, where the weighted distance was a Jaccard distance between sets of minimizers (the Zenodo README). Locityper 1.7.0 changed the estimate, and the 1.7.15 this step runs gives it as an edit distance (`dist_type` `edit` in `res.json.gz`), from the alignments `locityper augment` writes. So a pass there is the authors' rule applied to a newer measure, not a result they benchmarked. Locityper names haplotypes of panel people, such as `HG00733.1`, not alleles. The two callers are shown side by side and not compared: an allele name from T1K and a panel haplotype are not the same kind of answer. diff --git a/rust/crates/og-fresh/src/lookups.rs b/rust/crates/og-fresh/src/lookups.rs index e5224cec9..2716725f2 100644 --- a/rust/crates/og-fresh/src/lookups.rs +++ b/rust/crates/og-fresh/src/lookups.rs @@ -1044,7 +1044,15 @@ pub fn fda_page(c: &Ctx<'_>) -> Lookup<(String, String)> { ), )) }; - fallback().map_err(|e| LookupError::Failed(format!("{refused}; and {e}"))) + // Keep "did not answer" as it is: the pull-request dry run warns on it. + fallback().map_err(|e| { + let both = format!("{refused}; and {e}"); + if e.is_unreachable() { + LookupError::Unreachable(both) + } else { + LookupError::Failed(both) + } + }) } /// `assets/pgx_inhibitors.tsv` against the FDA's table of CYP inhibitors: @@ -1365,4 +1373,46 @@ mod tests { assert!(http_date("not a date").is_none()); assert_eq!(line_of("25.10.4"), "25.10"); } + + /// fda.gov refuses GitHub's runners, so the pull-request dry run always + /// reads the Wayback Machine. When that does not answer either, the error + /// must stay "did not answer", or `--unreachable-warns` cannot warn. + #[test] + fn an_fda_table_nobody_answers_for_is_unreachable() { + struct Down(crate::http::GitHub); + impl Fetch for Down { + fn github_api(&self) -> &crate::http::GitHub { + &self.0 + } + fn request(&self, req: &Request<'_>) -> Lookup<(Body, crate::http::Headers)> { + Err(LookupError::Unreachable(format!("{}: no answer", req.url))) + } + } + struct NoRegistry; + impl Registry for NoRegistry { + fn list_tags(&self, _: &str, _: &str) -> Lookup> { + Ok(vec![]) + } + fn manifest_digest(&self, _: &str, _: &str, _: &str) -> Lookup { + Ok(String::new()) + } + } + let down = Down(crate::http::GitHub { + api: "https://api.github.invalid".into(), + token: None, + }); + let pins = Pins::parse(""); + let c = Ctx { + fetch: &down, + registry: &NoRegistry, + pins: &pins, + versions: Path::new("/nonexistent"), + setup: Path::new("/nonexistent"), + common: Path::new("/nonexistent"), + now: jiff::Timestamp::now(), + }; + let e = fda_page(&c).unwrap_err(); + assert!(e.is_unreachable(), "{e}"); + assert!(e.to_string().contains("archive.org"), "{e}"); + } } From fa18468e315ca078b31489ff4e50733602a034a5 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 02:59:19 +0100 Subject: [PATCH 104/110] fix(report): map the acmg_sf section to the clinical-filter frame and keep it out of the search index --- rust/crates/og-render/src/chapters.rs | 2 +- rust/crates/og-render/src/index.rs | 7 +++++++ rust/crates/og-render/tests/port_report_core.rs | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/rust/crates/og-render/src/chapters.rs b/rust/crates/og-render/src/chapters.rs index ea46924ed..ba09cc68e 100644 --- a/rust/crates/og-render/src/chapters.rs +++ b/rust/crates/og-render/src/chapters.rs @@ -58,7 +58,7 @@ pub const CHAPTERS: [Chapter; 7] = [ sec( "clinical-filter", "Clinical filter and secondary findings", - &["clinical"], + &["clinical", "acmg_sf"], ), sec("cpsr", "Cancer predisposition", &["cpsr"]), sec("slivar", "Variant prioritization", &["slivar"]), diff --git a/rust/crates/og-render/src/index.rs b/rust/crates/og-render/src/index.rs index 5f7797a74..3f74d8619 100644 --- a/rust/crates/og-render/src/index.rs +++ b/rust/crates/og-render/src/index.rs @@ -450,6 +450,13 @@ pub fn build( if !matches!(s.get("state"), Some(Value::Str(st)) if st == "ok" || st == "stale") { continue; } + // The ACMG card of its own section is the card the clinical section + // also holds (`clinical.data.acmg_sf`), which the index already reads. + // Skip it so a gene is not listed twice, until the report readers + // move from the nested card to this section (i411-display-sf). + if key == "acmg_sf" { + continue; + } let field = |k: &str| s.get(k).cloned().unwrap_or(Value::Null); let mut add = |term: &str, txt: &str, locus: Option<&str>| { let items = terms.entry(term.to_owned()).or_default(); diff --git a/rust/crates/og-render/tests/port_report_core.rs b/rust/crates/og-render/tests/port_report_core.rs index b8d8d44ca..f4b27baaa 100644 --- a/rust/crates/og-render/tests/port_report_core.rs +++ b/rust/crates/og-render/tests/port_report_core.rs @@ -177,7 +177,7 @@ fn the_release_stands_next_to_the_commit_in_both_reports() { #[test] fn every_summary_key_is_in_exactly_one_section() { let keys: Vec<&str> = summary_keys().map(|s| s.key).collect(); - assert_eq!(keys.len(), 48); + assert_eq!(keys.len(), 49); assert_eq!(key_problems(&CHAPTERS, &keys), Vec::::new()); // Red controls: a key taken out, and a key in two sections, are caught. let cut: Vec<&str> = keys.iter().copied().filter(|k| *k != "telomere").collect(); From 9fe3ecea0c04efd7e1c798311fc26e29247aee27 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 03:40:54 +0100 Subject: [PATCH 105/110] fix(report): show acmg_sf with the clinical section so the HTML frame keeps parity --- rust/crates/og-render/src/chapters.rs | 26 ++++++++++++++++--- .../og-render/tests/port_report_core.rs | 19 ++++++++++++++ 2 files changed, 42 insertions(+), 3 deletions(-) diff --git a/rust/crates/og-render/src/chapters.rs b/rust/crates/og-render/src/chapters.rs index ba09cc68e..7ea79341b 100644 --- a/rust/crates/og-render/src/chapters.rs +++ b/rust/crates/og-render/src/chapters.rs @@ -58,7 +58,7 @@ pub const CHAPTERS: [Chapter; 7] = [ sec( "clinical-filter", "Clinical filter and secondary findings", - &["clinical", "acmg_sf"], + &["clinical"], ), sec("cpsr", "Cancer predisposition", &["cpsr"]), sec("slivar", "Variant prioritization", &["slivar"]), @@ -266,8 +266,21 @@ pub fn step_of(key: &str) -> &'static str { .map_or("?", |s| s.step) } +/// Summary keys no frame section lists, because the section of another key +/// already shows what they hold: `(key, the key whose section shows it)`. +/// `acmg_sf` is the secondary-findings card the clinical section also holds +/// as `clinical.data.acmg_sf`, and the reports read it there. Listing it in +/// the clinical-filter frame would change that section's step, state and +/// file date before any reader shows it. It moves into the frame when the +/// readers switch to `sections.acmg_sf` (i411-display-sf). +pub const SHOWN_WITH: &[(&str, &str)] = &[("acmg_sf", "clinical")]; + /// The section that shows summary key `key`. pub fn section_of(key: &str) -> Option<&'static Sec> { + let key = SHOWN_WITH + .iter() + .find(|(k, _)| *k == key) + .map_or(key, |(_, with)| *with); CHAPTERS .iter() .flat_map(|c| c.sections.iter()) @@ -283,12 +296,19 @@ pub fn section(sid: &str) -> Option<&'static Sec> { } /// What is wrong with a chapter table against the summary keys: a key no -/// section shows, a key two sections show, a key no collector writes. +/// section shows, a key two sections show, a key no collector writes. A key +/// of `SHOWN_WITH` counts as shown where its partner key is. pub fn key_problems(chapters: &[Chapter], keys: &[&str]) -> Vec { - let seen: Vec<&str> = chapters + let mut seen: Vec<&str> = chapters .iter() .flat_map(|c| c.sections.iter().flat_map(|s| s.keys.iter().copied())) .collect(); + let carried: Vec<&str> = SHOWN_WITH + .iter() + .filter(|(_, with)| seen.contains(with)) + .map(|(k, _)| *k) + .collect(); + seen.extend(carried); let mut out: Vec = keys .iter() .filter(|k| !seen.contains(k)) diff --git a/rust/crates/og-render/tests/port_report_core.rs b/rust/crates/og-render/tests/port_report_core.rs index f4b27baaa..6f846eeb6 100644 --- a/rust/crates/og-render/tests/port_report_core.rs +++ b/rust/crates/og-render/tests/port_report_core.rs @@ -202,6 +202,25 @@ fn every_summary_key_is_in_exactly_one_section() { let mut missing = key_problems(&short, &keys); missing.sort(); assert_eq!(missing, ["missing consumer_export", "missing viral"]); + // acmg_sf is shown with clinical, not as a frame key of its own: listing + // it in a section as well is a key shown twice, and the search index + // anchors it to the clinical-filter section. + let mut also = CHAPTERS.to_vec(); + also.push(Chapter { + id: "x", + title: "X", + question: "?", + sections: &[Sec { + id: "x", + title: "X", + keys: &["acmg_sf"], + }], + }); + assert_eq!(key_problems(&also, &keys), ["twice acmg_sf".to_owned()]); + assert_eq!( + og_render::chapters::section_of("acmg_sf").map(|s| s.id), + Some("clinical-filter") + ); } #[test] From 4321a1987ddfa2c807aa95bf840eae7bb023e0ba Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 03:45:39 +0100 Subject: [PATCH 106/110] docs(acmg): say when each summary card is there and when the two differ --- docs/23-clinical-filter.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/23-clinical-filter.md b/docs/23-clinical-filter.md index 6e68c692d..697ad788f 100644 --- a/docs/23-clinical-filter.md +++ b/docs/23-clinical-filter.md @@ -90,7 +90,7 @@ The Nextflow `CLINICAL_FILTER` module applies the same tiers, ranking, frequency Both reports list, beside the clinical filter's counts, the secondary findings in the 84 genes of the ACMG SF v3.3 list (Lee et al., Genet Med 2025;27(8):101454; the genes in which the ACMG recommends reporting pathogenic variants found by chance, such as BRCA1, LDLR, MYBPC3 or TTN): the step 6 ClinVar hits in those genes, the clinical filter's records with a HIGH-impact consequence on the ranked transcript in them, and step 5's AnnotSV class 4 and 5 structural variants in the genes whose rule allows them. Each gene's rule from Table 1 of the list is a row of `assets/acmg_sf.tsv`: one variant in a dominant gene, two in a recessive one (MUTYH, BTD, ATP7B and others; a homozygote, or two variants of unknown phase), HFE only as homozygous p.C282Y, GLA and OTC also in a heterozygous female, ABCD1 hemizygous, homozygous or with two heterozygous variants. A variant the rule does not report is listed apart with the reason; a pseudodeficiency allele is not counted, and a BTD finding with the p.Asp444His hypomorph says partial, not profound. Of the reported HIGH-impact records the reports count as "rare HIGH impact" only the rare ones with a sound call; a weak call or an unknown frequency is listed with its mark and counted apart, and a common one is left out. The list version is `ACMG_SF_VERSION` in `og summary collect` (`rust/crates/og-summary`). It is a list to review with a clinician: a rare HIGH-impact variant is not a ClinVar classification. [Interpreting results](interpreting-results.md#carrier-status-is-not-disease) gives every rule. Step 17 (CPSR) reports the ACMG secondary findings with its own classification. -summary.json holds the card twice. `sections.clinical.data.acmg_sf` is the card as both reports read it, there only when this step ran. `sections.acmg_sf` is the same card as a section of step 6: it is written whenever step 6's hits are there, so a run without the VEP cache still gets the ClinVar and SV findings. Without this step's clinical VCF it has `high_impact_checked: false` and a `high_impact_note` that names why (this step skipped, with the run's reason, failed, or its VCF unreadable) and what that can miss: a predicted loss-of-function variant that is not in ClinVar, alone or as the second hit of a recessive gene. With the clinical VCF the two cards are equal, except when that VCF is from an earlier run (this step not ok in this run): then `sections.acmg_sf` adds a `high_impact_note` with the earlier VCF's date. A clinical VCF that cannot be read makes the clinical section's card unavailable, while `sections.acmg_sf` keeps its ClinVar rows and says the VCF could not be read. +summary.json holds the card twice. `sections.clinical.data.acmg_sf` is the card as both reports read it. It is there whenever this step's summary table or clinical VCF can be read, also one left by an earlier run (then, when this step did not run ok, the clinical section is stale). `sections.acmg_sf` is the same card as a section of step 6: it is written whenever step 6's hits are there, so a run without the VEP cache still gets the ClinVar and SV findings. Without this step's clinical VCF it has `high_impact_checked: false` and a `high_impact_note` that names why (this step skipped, with the run's reason, failed, or its VCF unreadable) and what that can miss: a predicted loss-of-function variant that is not in ClinVar, alone or as the second hit of a recessive gene. With the clinical VCF the two cards are equal, except when that VCF is from an earlier run (this step not ok in this run): then `sections.acmg_sf` adds a `high_impact_note` with the earlier VCF's date. A clinical VCF that cannot be read, or whose HIGH-impact records cannot be parsed, makes the clinical section's card unavailable, while `sections.acmg_sf` keeps its ClinVar rows with `high_impact_checked: false` and says the VCF could not be read. The two cards then differ. The `table_text` column of `assets/acmg_sf.tsv` quotes each gene's rule from Table 1 of the paper (doi:10.1016/j.gim.2025.101454), such as "All P and LP" or "P and LP (2 variants)". summary.json gives that text as the rule of each finding, and the reports use it in the reason a variant is not reported. These are short cited quotations of a factual reporting rule: six phrases, the longest 44 characters. "(See text)" after a rule points to the paper's section on the dilated cardiomyopathy (DCM) genes. The `note` column says what the table's footnotes add, in our own words. From ca212fe8bfa169db2c98b8d7f7dac1f5dbe63cd5 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 10:48:49 +0100 Subject: [PATCH 107/110] ci(e2e): run the output contract case after the case that writes Stranger's VCF The base leg runs no step 09b, so HG002_eh_stranger.vcf exists only when bash-step-09-str ran earlier in the same shard. The contract case passed on main by shard placement; adding one case moved it to another shard and it failed. The needs column now keeps both in one shard, in order. --- scripts/ci/e2e-case-times.tsv | 2 +- tests/e2e/output-contract-1-hg002.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/ci/e2e-case-times.tsv b/scripts/ci/e2e-case-times.tsv index 0ec7006eb..b773cf399 100644 --- a/scripts/ci/e2e-case-times.tsv +++ b/scripts/ci/e2e-case-times.tsv @@ -121,7 +121,7 @@ nextflow-hardening-2-nf shard 643 bash-step-19-delly,nextflow-hardening-1-manta nextflow-report-parity-1-sections shard 206 clinvar-clip-check-1,comphet-phasing-1-reads nf-wiring-1-report-tables shard 300 clinvar-clip-check-1 nf-wiring-2-sv-str-tools shard 900 - -output-contract-1-hg002 shard 30 - +output-contract-1-hg002 shard 30 bash-step-09-str paralog-catalog-1-gba shard 114 - paralog-checks-and-doc-fixes-1-hba shard 57 - paralog-rows-1 shard 316 - diff --git a/tests/e2e/output-contract-1-hg002.sh b/tests/e2e/output-contract-1-hg002.sh index c09effcbd..0bbdc15f3 100755 --- a/tests/e2e/output-contract-1-hg002.sh +++ b/tests/e2e/output-contract-1-hg002.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash # The 1.0 output contract (assets/output_contract.tsv) on the HG002 base outputs: every stable file # the bash steps and the Nextflow run (case 60) wrote is there under its contracted name, with its -# required columns, VCF fields and JSON keys. Red control: a copy of the Nextflow results with one +# required columns, VCF fields and JSON keys. The base leg runs no step 09b: Stranger's VCF comes +# from bash-step-09-str, which the needs column of scripts/ci/e2e-case-times.tsv puts first. +# Red control: a copy of the Nextflow results with one # column dropped and one file renamed must fail, naming both. . "$(dirname "$0")/lib.sh" From c9961b9e88d2a352cad59c8606a35f6e847943a1 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:02:57 +0100 Subject: [PATCH 108/110] fix(ci): let a HIGH-impact row change the gene's pair in the ACMG card agreement test #531 (i411-sf-haplotype-count) gives each reported row of a recessive gene the gene's own verdict, `pair` and `phase`. #533 (screen-acmg-card-section) checks that every ClinVar row of the card without VEP is in the card with VEP, unchanged. Together, cb-full fails: with step 23's clinical VCF a HIGH-impact MUTYH row joins, and the gene's phase sentence names that pair instead of the deletion. The row's own fields are the same. Rule (a) now compares the row without `pair` and `phase` only when a HIGH-impact row of its gene joined it; any other change still fails. --- .../tests/screen_acmg_card_section.rs | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/rust/crates/og-summary/tests/screen_acmg_card_section.rs b/rust/crates/og-summary/tests/screen_acmg_card_section.rs index 539218b06..c3bb2b1d7 100644 --- a/rust/crates/og-summary/tests/screen_acmg_card_section.rs +++ b/rust/crates/og-summary/tests/screen_acmg_card_section.rs @@ -10,7 +10,8 @@ //! the clinical VCF, collected as it is and again without `clinical/`. //! Without step 23 the card may lose only what the HIGH-impact source //! brings: (a) every ClinVar row of the card without VEP is in the card -//! with VEP, unchanged; (b) every gene reported without VEP is reported +//! with VEP, unchanged, but for the gene's `pair` and `phase` when a +//! HIGH-impact row of its gene joined it; (b) every gene reported without VEP is reported //! with VEP; (c) a row not reported without VEP stays as it is, or is //! reported with VEP because a HIGH-impact row of its gene joined it. @@ -249,9 +250,22 @@ fn agreement(with: &Value, without: &Value) -> Vec { .collect(); let with_cv = rows(with, "clinvar_hits"); let without_cv = rows(without, "clinvar_hits"); - // (a) every ClinVar row without VEP, unchanged with VEP. + // (a) every ClinVar row without VEP, unchanged with VEP. `pair` and + // `phase` are the gene's verdict, not the row's: a HIGH-impact row of + // the gene can change which pair it names. + let own = |r: &Value| match r { + Value::Object(m) => { + let mut m = m.clone(); + m.shift_remove("pair"); + m.shift_remove("phase"); + Value::Object(m) + } + v => v.clone(), + }; for r in &without_cv { - if !with_cv.contains(r) { + let regated = + high_genes.contains(&gene_variant(r).0) && with_cv.iter().any(|w| own(w) == own(r)); + if !with_cv.contains(r) && !regated { bad.push(format!( "(a) ClinVar row without VEP not in the card with VEP: {r:?}" )); From da09f8ed8f9e8afae79a38e1740d4744e2f96338 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:26:12 +0100 Subject: [PATCH 109/110] fix(ci): give the summary-collect goldens' acmg_sf card the fields #531 adds #533 (screen-acmg-card-section) recorded the new sections.acmg_sf card in the all, all-nf and all-history goldens before #531 (i411-sf-haplotype-count) gave each row of the card its gene's `pair` and `phase` and kept the `combined_allele` note. The merged og writes the card with those fields, the same card as sections.clinical.data.acmg_sf, so oracle-diff reported 3 items that differ. The goldens are og's output for the merged tree; only those card rows and the masked generated_utc change. --- .../summary-collect/all-history/all-history.json | 12 +++++++++--- .../parity/golden/summary-collect/all-nf/all-nf.json | 12 +++++++++--- tests/parity/golden/summary-collect/all/all.json | 12 +++++++++--- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/tests/parity/golden/summary-collect/all-history/all-history.json b/tests/parity/golden/summary-collect/all-history/all-history.json index 4cb5c7ce6..1a66e86c7 100644 --- a/tests/parity/golden/summary-collect/all-history/all-history.json +++ b/tests/parity/golden/summary-collect/all-history/all-history.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-19 23:58 UTC", + "generated_utc": "2026-11-20 10:24 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12819,7 +12819,9 @@ "low_confidence": false, "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "BRCA1", @@ -12828,6 +12830,7 @@ "significance": "Pathogenic", "stars": 3, "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", "rule": "All P and LP", "rule_note": null, "severity": null @@ -12839,6 +12842,7 @@ "significance": "Pathogenic", "stars": 0, "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", "rule": "All hemi, het, homozygous P and LP", "rule_note": null, "severity": null @@ -12861,7 +12865,9 @@ "ad": "15,15", "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "MYBPC3", diff --git a/tests/parity/golden/summary-collect/all-nf/all-nf.json b/tests/parity/golden/summary-collect/all-nf/all-nf.json index 573e63938..e88319c52 100644 --- a/tests/parity/golden/summary-collect/all-nf/all-nf.json +++ b/tests/parity/golden/summary-collect/all-nf/all-nf.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-19 23:58 UTC", + "generated_utc": "2026-11-20 10:24 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12627,7 +12627,9 @@ "low_confidence": false, "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "BRCA1", @@ -12636,6 +12638,7 @@ "significance": "Pathogenic", "stars": 3, "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", "rule": "All P and LP", "rule_note": null, "severity": null @@ -12647,6 +12650,7 @@ "significance": "Pathogenic", "stars": 0, "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", "rule": "All hemi, het, homozygous P and LP", "rule_note": null, "severity": null @@ -12669,7 +12673,9 @@ "ad": "15,15", "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "MYBPC3", diff --git a/tests/parity/golden/summary-collect/all/all.json b/tests/parity/golden/summary-collect/all/all.json index 2f5f573b6..47472619f 100644 --- a/tests/parity/golden/summary-collect/all/all.json +++ b/tests/parity/golden/summary-collect/all/all.json @@ -1,7 +1,7 @@ { "schema_version": 2, "sample": "S", - "generated_utc": "2026-11-19 23:58 UTC", + "generated_utc": "2026-11-20 10:24 UTC", "run": { "status_file": true, "started_utc": "2020-01-01 00:00 UTC", @@ -12824,7 +12824,9 @@ "low_confidence": false, "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "BRCA1", @@ -12833,6 +12835,7 @@ "significance": "Pathogenic", "stars": 3, "low_confidence": false, + "combined_allele": "part of a combined allele: chr17:43057100 C>T, chr17:43057102 A>G; unphased, so the parts may sit on different haplotypes", "rule": "All P and LP", "rule_note": null, "severity": null @@ -12844,6 +12847,7 @@ "significance": "Pathogenic", "stars": 0, "low_confidence": false, + "combined_allele": "possibly one allele with chrX:101398004 G>A: check ClinVar for a combined record", "rule": "All hemi, het, homozygous P and LP", "rule_note": null, "severity": null @@ -12866,7 +12870,9 @@ "ad": "15,15", "rule": "P and LP (2 variants)", "rule_note": null, - "severity": null + "severity": null, + "pair": "biallelic", + "phase": "in trans: read-backed phase puts them on different copies (phase set 45331000)" }, { "gene": "MYBPC3", From b4134ad15ddda8388045afbaca6f4a52bff818f6 Mon Sep 17 00:00:00 2001 From: GeiserX <9169332+GeiserX@users.noreply.github.com> Date: Fri, 20 Nov 2026 11:37:33 +0100 Subject: [PATCH 110/110] fix(ci): apply the ACMG card's HIGH-impact pair rule in the e2e check too c9961b9e let a HIGH-impact row of a gene change that gene's pair and phase in the og-summary agreement test. The e2e case acmg-sf-rules-1-reports checks the same rule on a real run and still demanded strict equality, so the two copies of the rule disagreed. The jq check now ignores pair and phase only when a HIGH-impact row of that gene is in the full run's card; any other change still fails. Checked with jq on hand-made cards: a pair change with a HIGH-impact row passes, and a pair change without one, a changed field and a lost row all fail. The old check failed the first. --- tests/e2e/acmg-sf-rules-1-reports.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/e2e/acmg-sf-rules-1-reports.sh b/tests/e2e/acmg-sf-rules-1-reports.sh index 3ce2098aa..c31924c80 100755 --- a/tests/e2e/acmg-sf-rules-1-reports.sh +++ b/tests/e2e/acmg-sf-rules-1-reports.sh @@ -104,9 +104,18 @@ check "without step 23 the card is ok with the 84 rules" \ check "and says the HIGH-impact source was not screened" \ jq -e '.sections.acmg_sf.data | .high_impact_checked == false and (.high_impact_note | startswith("Rare HIGH-impact variants were not screened"))' "${NC}/summary.json" # shellcheck disable=SC2016 # a jq program: $f and $n are jq variables +# pair and phase are the gene's verdict, not the row's: a HIGH-impact row of +# the gene in the full run can change which pair it names (the same rule as +# rust/crates/og-summary/tests/screen_acmg_card_section.rs). check "every ClinVar row of the card without step 23 is in the full run's card, unchanged" \ jq -en --slurpfile f "$SUM" --slurpfile n "${NC}/summary.json" \ - '($n[0].sections.acmg_sf.data.clinvar_hits - $f[0].sections.acmg_sf.data.clinvar_hits) | length == 0' + '$f[0].sections.acmg_sf.data as $F + | [$F.high_impact[]?.gene] as $hg + | [$F.clinvar_hits[] | del(.pair, .phase)] as $own + | [$n[0].sections.acmg_sf.data.clinvar_hits[] as $r + | select(($F.clinvar_hits | index([$r])) == null) + | select(($hg | index([$r.gene])) == null or ($own | index([$r | del(.pair, .phase)])) == null)] + | length == 0' rm -rf "${NC}/${SAMPLE}/clinvar" "${REPO}/bin/og" summary collect --sample "$SAMPLE" --sample-dir "${NC}/${SAMPLE}" --assets "${REPO}/assets" \ --out "${NC}/control.json" > /dev/null 2>&1
- -
-
-

Genomic Analysis Report

-
- Sample: S  |  Generated: 2026-11-19 10:29 UTC -
-
- Pipeline commit: unknown  |  ClinVar file: unknown  |  ClinVar in CPSR's bundle: unknown  |  HLA database: unknown -
-
- -
-

Quality

-

Can I trust this data?

-
-
-
-

Quality Control

-

Steps 16b, 16, 33, 02 · Not run · link to this section

-

Mean depth is an average over the genome: some genes get far fewer reads, and the gene callability card lists those. The sex, identity and contamination checks catch a swapped or mixed sample, not every lab error.

-
Mean depthnot available
-
Inferred sex (indexcov)not available
-
Declared sexnot declared
-
Identity and contamination (step 33)Not run
-
-
-
-
-

Variant Calling

-

Step 03 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Counts of the calls DeepVariant made against the reference. A whole genome usually holds 4 to 5 million, most of them common. PASS calls passed the caller's filter; a count says nothing about health on its own.

-
Total variants1
-
PASS variants1
-
SNPs0
-
Indels1
-
-
-
-
-
-

Clinical

-

Is there anything to take to a doctor?

-
-
-
-

ClinVar Screening

-

Step 06 · Not run · link to this section

-
StatusNot run
-
-
-
-
-

Clinical Variant Filter

-

Step 23 · Not run · link to this section

-
StatusNot run
-
-
-
-
-

Cancer Predisposition

-

Step 17 · Not run · link to this section

-
StatusNot run
-
-
-
-
-

Variant Prioritization (slivar)

-

Step 31 · Not run · link to this section

-
StatusNot run
-
-
-
-
-

Symptom-Driven Ranking (Exomiser)

-

Step 48 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

A ranking to bring to a clinical geneticist, not a diagnosis: a high score means a rare, likely damaging variant in a gene linked to symptoms like these, not that it causes them, and an empty or low list does not rule a genetic cause out. Coding and splice variants only (docs/48-exomiser.md).

-
Symptoms searchedSeizure (HP:0001250), HP:0000001
- - - - - -
RankGeneInheritanceScoreSymptom matchVariantACMG (Exomiser)Linked diseaseViewer
1GENE1AD0.90.8chr1-1-A-G 0/1
missense p.X
LPD1
chr1-2-A-G 0/1
stop p.Y
PD1
2GENE2AR0.50.4chr2-1-A-G 1/1
splice c.1
VUSD2
-

The Viewer column opens the reads at each row in the genome viewer on this computer (start it first: scripts/owngenome-view.sh <sample>, docs/viewer.md).

-

Exomiser's own report: exomiser/S_exomiser.html

-
-

Files of this step, beside this report: Exomiser ranking table

-
-
-
-

Mobile Element Insertions

-

Step 50 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Alu, L1 and SVA copies the genome carries and the reference does not, found and genotyped by MEGAnE (Kojima et al. 2023) from short read pairs. Most are common and harmless; the catalog rows are insertions known to cause disease. Not callable: too few reads in that window to tell. Not seen is not proof of absence: short reads find an SVA's edges, not its body. Every call: mei/<sample>_mei.tsv.

-
Insertions called3 (ALU 2, L1 1)
-
GeneElementConditionInheritanceStatusDepthCall
FKTNSVAFukuyamaARcallable30not seen
TAF1SVAXDPXLnot callable2.
-
-
-
-
-

Repeat Expansions

-

Step 09 · Failed · link to this section

-
could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/str_intermediate_ranges.tsv'
-
StatusUnreadable
-
-
-
-
-

MUC1 VNTR Frameshifts (VNtyper)

-

Step 52 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

The MUC1 repeat is long and GC-rich, and short reads cover it unevenly. VNtyper looks only for known frameshifts in it: a negative result lowers the chance of those and does not rule out ADTKD-MUC1, and a positive one needs a clinical test (SNaPshot for dupC) to confirm it.

-
Resultnegative
-

Result: negative

-

.

-

VNtyper's coverage check: .

-

.

-

none

-
-
-
-
-

Mitochondrial Analysis

-

Step 20 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Length heteroplasmy in the D-loop poly-C tracts is found in most people and is usually technical; it is listed here and not counted as heteroplasmy.

-

A single large mtDNA deletion is often found in muscle and not in blood (except in Pearson syndrome), so a blood sample with none does not rule one out (docs/20-mtoolbox.md).

-

ClinVar and gnomAD v3.1 (chrM sites) annotate the calls in step 20. MITOMAP (mitomap.org) has the curated disease status of mtDNA variants; it is a manual lookup, as it refuses scripted requests.

-
chrM variants (PASS)7
-
Heteroplasmic (AF 0.05 to 0.95, outside the D-loop poly-C tracts)1
-
Length heteroplasmy in the D-loop poly-C tracts2
-

chrM:302 A>AC,ACC AF 0.3

-

chrM:16189 T>C AF 0.5

-
ClinVar pathogenic or likely pathogenic1
-
VariantAFClinVarReviewConditiongnomAD AF homgnomAD AF hetPoly-C tractViewer
chrM:3243 A>G0.40PathogeniccriteriaMELAS00chrM:3243
chrM:302 A>AC0.3.....yeschrM:302
chrM:500 C>T0.99Uncertain_significance....chrM:500
-

The Viewer column opens the reads at each row in the genome viewer on this computer (start it first: scripts/owngenome-view.sh <sample>, docs/viewer.md).

-

ClinVar 2026-10-01; gnomAD not annotated: no file

-
Confirmed disease variants3
-

m.3243A>G (MT-TL1) AF 0.40 filter PASS MELAS (mitochondrial encephalomyopathy, lactic acidosis and stroke-like episodes); maternally inherited diabetes and deafness; ClinVar 9589; PMID 2102678. Usually heteroplasmic; the level differs between tissues and is often lower in blood than in muscle or urine.

-

m.8344A>G (MT-TK) AF 0.30 filter weak_evidence MERRF (myoclonic epilepsy with ragged-red fibres); ClinVar 9579; PMID 2112427. Usually heteroplasmic; the level differs between tissues.

-

m.11778G>A (MT-ND4) AF 0.99 filter PASS Leber hereditary optic neuropathy (LHON); ClinVar 9708; PMID 3201231. Usually homoplasmic; not everyone who carries it loses vision.

-
Large deletions (eKLIPse)3
-
Named in the confirmed list1
-

m.8470_13446del (4977 bp) level 0.5% The common 4977 bp deletion, between two 13 bp direct repeats: Kearns-Sayre syndrome, chronic progressive external ophthalmoplegia (CPEO), Pearson syndrome; ClinVar 430680 (m.8483_13459del); PMID 2711184, 2541333, 20301382

-

m.101_199del (None bp) level 2.5%

-
mtDNA copies per cellnot assessed
-

mtDNA copy number: not assessed (unknown)

-
-
-
-
-

Lp(a): LPA KIV-2 Repeat Count

-

Step 46 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

The KIV-2 repeat count from read depth is a research estimate, not an Lp(a) level: the level is a blood test, and the count explains only part of the difference between people.

-
Genetic sign of high Lp(a)Yes
-

KIV-2 repeats (both chromosomes): 35 (95% interval 30 to 40), low

-

ok

-

KIV-2 4925G>A null allele (rs1484919544): present, 4 of 200 reads carry it

-

.

-

A null allele lowers the Lp(a) made from the copies it sits on; the Lp(a) blood test is the measure.

-

rs10455872: A/G (1 risk allele)

-

rs3798220: T|C (1 risk allele)

-

Genetic signs of a high Lp(a): 2 risk alleles at rs10455872 and rs3798220 and a low KIV-2 repeat count. Measure Lp(a) in blood.

-

.

-
-
-
-
-

Clonal Haematopoiesis (CHIP)

-

Step 49 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Clonal haematopoiesis is common with age and most people with it never get a blood cancer: a call here is not a diagnosis. A call is a change in a CHIP gene's published classes, found by Mutect2 without a matched normal; one at a VAF of 35% or more is left out as possibly inherited. docs/49-chip.md says how to read it.

-
CHIP calls1
-

DNMT3A R882H: VAF 0.05 (3 of 60 reads), .

-

Detection limit: a clone of VAF about 10% or more is found 8 times in 10 at this depth (median 33x over the genes' coding exons). CHIP starts at a VAF of 2%: smaller clones are likely missed, so no call does not rule one out.

-

Too shallow or not on the reference: ASXL1, SRSF2.

-

1 other protein changes listed, not counted: chip/S_chip.tsv.

-
-
-
-
-

Mosaic Chromosomal Alterations (MoChA)

-

Step 51 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Large gains, losses and copy-neutral losses of heterozygosity (CN-LOH) carried by a share of the blood cells, from MoChA on the phased heterozygous sites of chr1 to chr22. In a UK Biobank study they became more common with age and went with a higher risk of a later blood cancer (Loh et al. 2018). That is a population-level association, not a diagnosis; an event is confirmed on a new blood sample. Below the floor nothing is reported, and an event above it can still be missed. Every MoChA call, with the reason it was or was not reported: mosaic/<sample>_mocha.tsv.

-
Calls reported1
-
Cell-fraction floor0.05
-
TypeArmRegionMbCell fractionViewer
Lossqchr20:1-2100.1chr20:1-2
-

The Viewer column opens the reads at each row in the genome viewer on this computer (start it first: scripts/owngenome-view.sh <sample>, docs/viewer.md).

-

Reported at a cell fraction of 0.05 or more at 30x (read-sampling floor ., minimum .; . heterozygous sites on .)

-
-
-
-
-
-

Carrier

-

What could I pass on to a child?

-
-
-
-

Couple Carrier Screen

-

Step 39 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

A screen, not a diagnosis: the couple report (couple_<a>_<b>.md in the family folder) lists the genes, variant types and repeats it does not see. These counts are of its gene table: a carrier deletion allele from read depth (step 35), and a possible shared risk it adds, is in that report only. See a genetic counsellor before acting on a result, or on its absence (docs/39-couple.md).

-

Partner: P2. Genes where both carry a change: 1; X-linked findings: 1; genes where only one partner carries a change: 2

-

Shared: CFTR (Cystic fibrosis): 1 in 4. This sample: c.1521_1523del (P). P2: c.350G>A (LP)

-

X-linked: DMD (Duchenne): 1 in 4 sons. This sample: c.10G>T (P). P2: .

-
-
-
-
-

Paralog Genes (Paraphase)

-

Steps 35b, 35 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Paraphase reads PacBio HiFi reads only. A 'no call' means it saw one haplotype and the depth did not settle one copy or two. A research estimate, not a diagnostic test: confirm a result (for example an HBA deletion or one SMN1 copy) with a clinical laboratory.

-
StatusComplete
-
GeneCopy numberCallDetail
SMN12calledok
SMN22called.
HBA11called.
HBA22called.
PMS22called.
-
SMN1 by both toolsParaphase 2, Parascopy 1 (quality 31, filter PASS): they DISAGREE: check both before using either
-
Other Paraphase regions2 (1 with a call)
-
Variants on phased haplotypes3
-
-
-

SMN1/SMN2 Copy Number (Parascopy)

-

The other loci of step 35's catalog (assets/paralog_loci.tsv): agCN is the copies of the gene and its paralogs together, read only with filter PASS and quality 20 or more; which copy gained or lost one is not said. Not assessed names the reason (most often: no read over the locus).

-

Parascopy reads short reads at SMN1 and SMN2 and at the other loci of its catalog. A quality under 20 or a filter other than PASS leaves a copy unresolved. HBA1 and HBA2, CYP21A2 and the gene-dosage loci have no Parascopy model: step 35 counts them from read depth against flanking sequence (CYP21A2 also from six sites where it differs from its pseudogene CYP21A1P), which cannot say which chromosome lost or gained a copy. The copy-number intervals (ClinGen's recurrent CNV regions, carrier deletion alleles, the AZF regions) are read from depth too. A research estimate, not a diagnostic test: confirm a result with a clinical laboratory (MLPA or qPCR; gap-PCR for alpha-thalassaemia).

-
StatusComplete
-
SMN1 copies1 (quality 31, filter PASS)
-
SMN1 g.27134T>G silent-carrier marker (rs143838139)not seen, 0 of 31 reads carry it, about 0 copies
-
SMN1 marker readingno read carries the G
-
SMN1 marker caveatThe marker raises the chance that two SMN1 copies sit on one chromosome (2+0, a silent carrier); it does not prove 2+0, and a carrier test in a clinical laboratory confirms it.
-
SMN2 copies3 (quality 25, filter PASS)
-
SMN1 and SMN2 together (agCN) at exon 74 (quality 45.5, filter PASS)
-
Readingone SMN1 copy: the pattern of an SMA carrier
-
HBA1 and HBA2 together (alpha-globin genes, from depth). (.; estimate .)
-
CYP21A2 (RCCX module, from depth and six PSV sites). CYP21A2 copies, module total 4 of ., finding none
-
HP (haptoglobin) copies (from depth)2 (estimate 2.1). Reading: usual
-
LCE3B/LCE3C copies (from depth)1 (estimate 1.0). Reading: one deleted
-
CCL3L1/CCL3L3 copies (from depth)not assessed (low depth)
-
GenesCopies together (agCN)Reading
GBA1, GBAP14 (2 region(s), quality 35.25 or more, filter PASS)agCN of GBA1 and its pseudogene GBAP1 together, usually 4; under 4 means a copy is missing, as a recombinant GBA1-GBAP1 allele (Gaucher disease) can leave; over 4, an extra copy
STRC, STRCP1unreadable: S_strc_copy_number.tsv lacks the copy-number columns.
mytablenot assessed: no read over the locus.
pms2chr7:5970001-5980000 4 (quality 50, filter PASS); chr7:5980001-5990000 3 (quality 12, filter LowQual).
-
Copy-number intervals (ClinGen recurrent regions, carrier deletions, AZF; from depth)4 rows (3 called, 1 not assessed); 2 with a deletion or a duplication
-
RegionRowPlaceCopiesChange
AZFcAZFcchrY:23000001-260000000 of 1deletion
dupX1chr1:2-23 of 2duplication
-
-
-
-
-
-

Medicines

-

How might I respond to medicines?

-
-
-
-

Pharmacogenomics

-

Step 07 · Not run · link to this section

-
StatusNot run
-
-
-
-
-

CPIC Drug Recommendations

-

Step 27 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

CPIC recommendations follow the phenotype PharmCAT called. They are guidance for prescribers, not a prescription. A gene that was not called has no recommendation here, and that is not the same as a typical response.

-
StatusComplete
-
Genes with a non-normal phenotype1
-
Genes with more than one possible result0
-
Genes not called0
-
Genes called without a function phenotype (no drug guidance)0
-
TipRecommendations per gene: cpic/S_cpic_recommendations.txt
-
-
-

Genes With a Non-Normal or Unresolved Phenotype (CPIC)

- - - -
GeneDiplotypePhenotype
UGT1A1*1/*28Intermediate
-

Drugs for each gene: cpic/S_cpic_recommendations.txt

-
-

Files of this step, beside this report: CPIC recommendations per gene (text)

-
-
-
-

CYP2D6 Across Callers

-

Steps 32, 21 · Not run · link to this section

-

CYP2D6 sits beside its look-alike CYP2D7, and short reads often cannot tell them apart, so pypgx, Cyrius and step 36 can disagree or give no call. A disagreement or a missing call means the gene was not read reliably here; a clinical CYP2D6 test settles it.

-
PharmCAT (step 36's call)not run
-
pypgxnot run
-
Cyriusnot run
-
pypgx and Cyrius agreefewer than two usable calls
-
-
-
-
-

HLA Typing

-

Step 08 · Failed · link to this section

-
could not be read: FileNotFoundError: [Errno 2] No such file or directory: 'bin/hla_alleles.tsv'
-
StatusUnreadable
-
-
-
-
-

Locityper Second Opinion at Hard Loci

-

Step 53 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

A second opinion beside the primary caller, never the call itself. Locityper (Prodanov et al. 2025, Nat Genet, PMID 41107551) picks the two haplotypes of the HPRC pangenome panel that best explain the reads at each locus; it names haplotypes of panel people (<sample>.1 or .2), not alleles, so the two callers are shown side by side and not compared. Filter: the authors' HLA and KIR benchmark filter (no warning, weighted distance of 30 or less, fewer than 1000 or 20% unexplained reads). Every column: locityper/<sample>_locityper.tsv.

-
Loci called4 of 5 (3 pass the filter)
-
LocusLocityperFilterPrimary caller
HLA-DRB1h1 + h2 (quality 30, 1 of 100 reads unexplained, weighted distance 0.1; filter pass)passT1K (step 08) did not run
KIRk1 + k2 (quality 20, 1 of 100 reads unexplained, weighted distance 0.1; filter pass)passT1K's KIR pass (step 08, KIR=true) gave no call
CYP2D6not called: low depthfailpypgx (step 32) and Cyrius (step 21) did not run
FCGRf + f (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter fail: q)failno other step calls FCGR
ZZZz + z (quality 9, 1 of 1 reads unexplained, weighted distance 1; filter pass)passno other step calls this locus
-
-
-
-
-
-

Ancestry

-

Where do my ancestors come from?

-
-
-
-

Fine-Grained Ancestry

-

Step 26b · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Each name is a group of reference populations we put together and named, not a nationality. Continental groups are well apart; neighbouring regions are not: splits within Iberia are weak for every method, and Greek and Southern Italian ancestry overlap. Read a regional fraction with its bootstrap range. See docs/26b-ancestry-fine.md.

-

Continental groups

- - - - -
GroupFractionBootstrap range
West Eurasia95%93% to 97%
Africa5%.
-

Regional groups

- - - -
GroupFractionBootstrap range
Iberia60%50% to 70%
-

Left out of the model: Oceania. The panel has fewer than 10 unrelated reference people for it, so its ancestry is spread over the groups shown.

-
Painted genomenone; not painted: RFMix failed on chr21
- Chromosome painting: chromosomes 1 to 22, two haplotypes each, coloured by continental group -

■ Africa ■ West Eurasia (Europe, Middle East, North Africa) ■ Central and South Asia ■ East Asia ■ Americas (Native American) ■ Oceania ■ not painted

-
-
-
-
-

Mitochondrial Haplogroup

-

Step 12 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares.

-
StatusComplete
-
HaplogroupH5a1
-
Contamination (haplocheck)no (level .)
-
FamilyTreeDNA Discover (free, no upload)https://discover.familytreedna.com/mtdna/H5a1 (opens a website; the address carries the haplogroup)
-
YFull MTreehttps://www.yfull.com/mtree/H5a1/ (opens a website; the address carries the haplogroup)
- -
-
-
-
-

Y-Chromosome Haplogroup

-

Steps 37, 45 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares.

-
HaplogroupR1b1a1b1a1a2*(xR-L21)
-
Markers40
-
QC-score0.98
-
FamilyTreeDNA Discover (free, no upload)https://discover.familytreedna.com/y-dna/R1b1a1b1a1a2 (opens a website; the address carries the haplogroup)
-
YFull YTreehttps://www.yfull.com/tree/R1b1a1b1a1a2/ (opens a website; the address carries the haplogroup)
- -
-
-

Y Placement on the Current Public Tree

-

Nothing is uploaded by this pipeline. The docs link lists the files each service reads, which steps 12 and 37 write when they run, and what an upload shares.

-

A second placement, on a public tree release newer than the one Yleaf carries, walked from the reads by og y tree-place. The two can differ in depth and in name: branches get renamed and split between releases, and the position tables differ. A branch is taken when it has more derived than ancestral SNPs, and an ancestral call above it blocks the branches below unless the SNPs below outvote that one site. Every level is in y_haplogroup/<sample>_y_tree_path.tsv; docs/37-y-haplogroup.md says how the walk works.

-
BranchR-Z2105
-
Level12
-
TreeISOGG 2026
-

Path SNPs: 30 derived, . ancestral, . no call; 400 SNPs called at depth . or more

-
LevelBranchDerivedAncestralNo callAncestral SNPs
1A0-T1
2R
-
FamilyTreeDNA Discover (free, no upload)https://discover.familytreedna.com/y-dna/R-Z2105 (opens a website; the address carries the haplogroup)
-
YFull YTreehttps://www.yfull.com/tree/R-Z2105/ (opens a website; the address carries the haplogroup)
- -
-
-

Y-STR Markers (HipSTR)

-

Repeat counts read from the genome with HipSTR, in FamilyTreeDNA's Y-111 order. A count can differ from FamilyTreeDNA's by a fixed number of repeats at some markers, as labs count some repeat blocks differently: compare with a known result before trusting a difference. Multi-copy markers and repeats longer than the reads are not called. Every marker, with its reads and notes, is in y_str/<sample>_y_str.tsv; y_str/<sample>_y_str.csv is the same list for a spreadsheet.

-

Markers called: 1 high and 1 low confidence of 4; 1 no call, 1 not callable from short reads

-
PanelMarkerRepeatsConfidence
Y-12DYS39313high
Y-12DYS39024low
Y-25DYS464.not callable
-
-
-
-
-

Archaic Ancestry (Neanderthal, Denisovan)

-

Step 43 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

An estimate from IBDmix against the Altai and Vindija Neanderthals and the Altai Denisovan: a segment counts when either copy carries it, and part of what any person gets is old shared ancestry, not gene flow (Africans get some too). Every segment: archaic/<sample>_archaic_segments.tsv; docs/43-archaic.md says where the numbers end.

-
Neanderthal2.00%
-
Denisovan0.01%
-

Neanderthal: 2.00% (50.0 Mb in 120 segments)

-

Denisovan: 0.01% (0.2 Mb in 3 segments)

-

Analysed: 2500.0 Mb of the autosomes; modern frequencies: 1000 Genomes CEU

-

Longest segments:

-

a

-

b

-

j

-
-
-
-
-

Ancient Populations

-

Step 44 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Closeness on this PCA is genetic similarity, not descent: a genome near an ancient group shares ancestry with it and does not descend from those people. qpAdm models are not part of step 44; docs/44-ancient.md says how to read the plot.

-

AADR v62: 500000 of . sites used; axes from . present-day West Eurasians, . ancient people in . groups projected.

- - - - -
#Ancient groupDatesCountryPlacePeople
1Spain_BA2000 BCESpainx10
2France_NFrance5
- PC1 against PC2: present-day West Eurasians in grey, ancient people coloured by age, the sample marked -
-
-
-
-

Runs of Homozygosity

-

Step 11 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Long runs concentrated on one chromosome, with few elsewhere, are the sign of isodisomy: both copies of that chromosome from one parent. They can also be chance in a child of related parents. Which parent gave both copies cannot be told without the parents' samples, and a heterodisomy (two different copies from one parent) leaves no runs at all. The parents' genotypes confirm a UPD. Where an imprinted region is listed, a methylation test of that region tests for its imprinting disorder; on its own it does not prove a UPD (docs/11-roh-analysis.md).

-

F_ROH is the share of the autosomes (outside the bands) in runs of 5 MB or more.

-

Autosomes only: chrX and chrY are left out, and so is the part of a segment in a centromere or heterochromatin band (GRCh38 cytoband acen, gvar, stalk), where few markers map. No population allele frequencies were used (bcftools roh --AF-dflt 0.4): read the total and the short segments as rough; the long segments are the signal.

-
StatusComplete
-
ROH total37.5 MB
-
ROH largest segment27.0 MB
-
Segments3
-
Autosomal ROH > 5 MB2
-

chr2:10000001-17000000 7.0MB

-

chr15:23000001-50000000 27.0MB

-

F_ROH: 0.0128 (34.0 MB in runs of 5 MB or more); nearest: no band (one chromosome holds most of the runs)

-

** chr15 carries 27.0 MB, more than 50% of the length in runs of 5 MB or more: both copies may come from one parent (uniparental isodisomy) **

-

Imprinted 15q11-q13 (SNRPN, UBE3A): from the mother: -; from the father: - (PMID 22237428;27615419)

-

Left out in centromere and heterochromatin bands: 46.5 MB

-

Segments on chrX/chrY, not counted: 1

-
-
-
-
-
-

Traits and scores

-

What do studies say about my traits and risk scores?

-
-
-
-

Traits

-

Step 42 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Each reading is what the cited studies found on average in the people they studied, not a diagnosis. A row marked ancestry reads differently in other populations; its note says how.

-
Read / no genotype / other allele3 / 1 / 1
- - - - - - - - -
TraitGeneGenotypeReadingSource
Lp(a)LPA
rs10455872
A/Gone copy
.
PMID 1
Lp(a)LPA
rs3798220
T|Cone copy
.
PMID 1
R117HCFTR
rs78655421
G/Aone copy
.
PMID 1
xX
rs1
.no reads
.
PMID 1
xX
rs2
C/Cother
.
PMID 1
xX
rs3
C/TA low-quality call at this position (genotype quality 5, below 20): not read; check the reads.
.
PMID 1
-

Genotype rules (several sites read together)

- - - - -
TraitGene and sitesGenotypesResultReadingSource
bitterTAS2R38
rs1
C/GPAV/AVI (not phased)taster
.
PMID 1
kidneyAPOL1
rs73885319, rs60910145
A/G, T/TG0/G1
With G2: G1/G2
one G1
With G2: Two APOL1 risk copies (G1/G2): the high-risk genotype of Genovese 2010, which went with focal segmental glomerulosclerosis and hypertension-attributed kidney failure in African Americans. A risk factor, not a diagnosis.
G2 (rs71785313): 1 copy of the deletion called.
.
PMID 20647424
-

Every rule line: traits/S_genotype_rules.tsv

-
APOE and Alzheimer's disease: a risk factor, not a diagnosis. Many people choose not to learn their APOE result; docs/42-traits.md explains it. Open to show it. - - - -
TraitGeneGenotypeReadingSource
APOEAPOE
rs429358
T/Ce3/e4
.
PMID 1
-

Every row with its note: traits/S_traits.tsv

-
-
-
-
-

Polygenic Risk Scores (raw, not percentiles)

-

Step 25 · Complete · file date 2021-03-04 05:06 UTC · link to this section

- - - - -
ConditionPGSScoreVariants matchedPercentile
CADPGS0000180.5100/120raw score only
T2DPGS0000140.110/20raw score only
-

Percentile withheld: the input lists variants only, so each scoring site it leaves out adds nothing to the sum, and the raw sum cannot be compared with the reference panel's samples, whose genotypes are complete. A gVCF from step 3, or a chip VCF, lists the reference calls and keeps the percentile. Most PRS scores were developed in European-ancestry populations and predict less well for other ancestries, even with an ancestry-adjusted percentile. See docs/25-prs.md.

-
-
-
-
-

Blood Groups (predicted)

-

Step 41 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Predicted from the DNA at the variants that define each antigen, not typed from blood. RhD comes from the read depth over RHD; weak and partial D are not assessed. The evidence for each site is in bloodtype/<sample>_bloodtype_evidence.tsv.

-
ABOA
-
RhDRhD positive
-
SystemPredicted phenotypeGenotypeConfidence
ABOAA1/O1high
RhDRhD positive.medium
Kell.K-/k+.
-
-
-
-
-

Telomere content (relative)

-

Step 10 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

Relative telomere content (intratelomeric reads per million reads with 48-52% GC), not a telomere length: compare it only with samples of a similar age sequenced on the same platform (docs/10-telomere-analysis.md).

-
Telomere content1.5
-

Intratelomeric reads: 40 (floor 2,000 at 30.0x)

-
Warningtoo few telomeric reads for a stable estimate; do not compare this value.
-
-
-
-
-
-

Other and exports

-

What else did the run find or write?

-
-
-
-

Viral DNA in the Unmapped Reads

-

Step 47 · Complete · file date 2021-03-04 05:06 UTC · link to this section

-

From the reads that do not map to the human genome, realigned to a fixed set of human viral genomes. Not a test for an infection: most adults carry herpesviruses that stay in their cells, and reagents carry viral DNA too. HHV-6 integration follows Liu et al. 2020 (depth over the viral genome at 0.30 of the human depth or more). Every genome: viral/<sample>_viral.tsv.

-
HHV-6inherited integrated HHV-6B likely
-
VirusCallReadsBreadthDepth / humanCopies per cell
phiXspike-in5001.0..
HHV-6Binherited integrated HHV-6 likely20000.991.01.0
-
-
-
-
-
-

What this report leaves out

-

Which steps did not run, and what does no step look at?

-
-
-
-

Steps Not Run

-
    -
  • Coverage (mosdepth)
  • -
  • Gene callability (mosdepth)
  • -
  • Sex check (indexcov)
  • -
  • Sample identity and contamination (somalier, VerifyBamID2)
  • -
  • Mosaic loss of chromosome Y or X
  • -
  • ClinVar screen
  • -
  • PharmCAT
  • -
  • pypgx
  • -
  • Cyrius (CYP2D6)
  • -
  • Cancer predisposition (CPSR)
  • -
  • Clinical variant filter
  • -
  • Variant prioritization (slivar)
  • -
-
-
-
-
-

Not Assessed by This Pipeline

-
    -
  • Mosaic and low-fraction small variants (only chrM heteroplasmy is reported, and with step 49 the CHIP genes)
  • -
  • Methylation and imprinting
  • -
  • Repeat expansions outside the ExpansionHunter catalog
  • -
  • Phase: two variants in one gene are compound-het candidates, not confirmed
  • -
  • Variants of uncertain significance (not interpreted)
  • -
-
-
-
-
-
- Disclaimer: This report is for educational and research purposes only. - It is not a clinical diagnosis. Always discuss genomic findings with a qualified healthcare - professional before making any medical decisions. Variants of Uncertain Significance (VUS) - are not clinically actionable. -
- - -
-