Summary
- Classify STRC-family haplotypes from both configured identity signals: the pivot SNV and the 314 bp STRCP1 deletion.
- Label only agreeing marker pairs as STRC or STRCP1; label discordant, missing, truncated, or internally inconsistent evidence as
unknownhap. - Report
gene_cn: nullwhen any haplotype identity is unknown while retaining independently supportedtotal_cn. - Omit unknown haplotypes from the default locus-specific VCF instead of projecting them onto STRC.
- Add a public HG005 truth fixture and integration test for the independently established 3 STRC + 1 STRCP1 copy structure.
This PR is based directly on main. The complementary regression-only PR #83 covers Python-to-Rust parity on HG00733 but is not a dependency.
Problem
The STRC caller previously classified any haplotype containing deletion category 3 as STRCP1 and every other haplotype as STRC. That forced missing deletion evidence into STRC and forced discordant pivot/deletion pairs into one of the two loci. The VCF split had the same fallback: every name not containing strcp1 went to the STRC reference.
This change makes uncertainty explicit rather than turning incomplete evidence into a locus assignment.
Behavior
| Pivot | 314 bp deletion | Output |
|---|---|---|
reference (1) | absent | STRC |
alternate (2) | present (3) | STRCP1 |
reference (1) | present (3) | unknownhap |
alternate (2) | absent | unknownhap |
| missing, truncated, or inconsistent | any | unknownhap |
The deletion evidence reader supports both representations already produced by the phaser: a synthetic deletion site or category 3 spread across heterozygous sites inside the deletion interval. Mixed deletion/non-deletion evidence is unresolved.
An unknownhap is an abstention, not a gene-conversion or hybrid call. The default two-reference VCF omits it. Explicit --gene1only retains its existing behavior of projecting all named haplotypes onto the main-gene reference.
Independent HG005 gate
The new 524-read locus fixture comes from the public NIST GIAB HG005 Sequel II CCS alignment. The expected locus structure is supported by MLPA and divergent-marker refinement in the Tsai et al. preprint; the source is not peer reviewed, so this is a locus/CN benchmark rather than clinical validation.
The integration test reproduces:
- total CN 4
- STRC CN 3
- STRCP1 CN 1
- region depth 81/85 and intergenic depth 34
NM_153700.2:c.5125A>G(chr15:43600074 T>C) on exactly one STRC copy- agreeing
(1,1)STRC and(2,3)STRCP1 identity-marker pairs
Validation
HG38=<GRCh38-no-alt.fasta> cargo test --workspace --all-targets
cargo test: 145 passed (6 suites, 40.74s)
cargo fmt --all -- --check
git diff --check
samtools quickcheck -v tests/data/bams/HG005.strc.bamFocused unit coverage includes agreeing, discordant, missing, truncated, synthetic-deletion, internal-deletion, mixed-evidence, copy-counting, and VCF-routing cases.
I also cloned the published head commit 0063b992032e5bb0f297a492d43683b5005309e7 into a detached clean worktree, built it in release mode, and ran the full HG005 CLI gate twice. Both calls were byte-identical (JSON SHA-256 1b6fc27923f611f74dc0f02c28f67ebf1054c9971be611d4759adb003e1d073b) and passed every locus/CN check. The fixture interval hash also matches the depth probes embedded at this exact commit.
cargo clippy --workspace --all-targets completes with no errors and the repository’s existing 69 warnings; none point to the added STRC classifier, VCF routing helper, or HG005 test.
Provenance
- Source BAM:
https://ftp.ncbi.nlm.nih.gov/ReferenceSamples/giab/data/ChineseTrio/HG005_NA24631_son/PacBio_SequelII_CCS_11kb/HG005_GRCh38/HG005_GRCh38.haplotag.10x.bam - Official source BAM MD5:
ec0bbf687f0fd5d0053cbeb761111deb - Official BAI MD5, locally verified:
b1c28c3258e4f0f097ff6a4c6fa3ed43 - Truth source:
https://doi.org/10.1101/2024.11.05.24316795 - Reference:
GCA_000001405.15 GRCh38 no-alt analysis set - Reference FASTA MD5:
30f1a99359a5993edbf8c8bc885825a7 - Fixture reads: 524
- Fixture BAM SHA-256:
030e1e35b2c6d8c11b07c0580bb1aa929d199c0026f83b1e67a7bca9860efc6e - Fixture BAI SHA-256:
8afb34b8910163db60367f815ac6ddffb0552d39234e344ac402cfe93350c446
Scope
This establishes conservative locus identity and copy-number behavior on public HiFi data. It does not establish pathogenicity, clinically validate Paraphase, or claim that every unknownhap is a conversion event.