3632060685c8b5ca508635ff45b0c27bf0df0dc1
lrnassar
  Fri Aug 21 10:32:48 2026 -0700
Harden Cardiomyopathy VCEP scripts against silent data-source failures. refs #38139

- cmpVCEPProvisionalClass: a SpliceAI read failure (wrong/renamed bigBed path) now
stops the script with a clear error instead of returning an empty dict, which had
silently fired BP7 for every synonymous variant with the mouseover showing "no
record" as if it were a measurement. Also stop suppressing bigBedToBed's stderr.
- cmpVCEPWalsh2019: compare the ClinVar transcript by accession without the version
so a ClinVar version bump does not silently drop every matched row for a gene.

diff --git src/hg/makeDb/scripts/cardiomyopathyVCEP/cmpVCEPWalsh2019.py src/hg/makeDb/scripts/cardiomyopathyVCEP/cmpVCEPWalsh2019.py
index 035be445800..047e972548b 100644
--- src/hg/makeDb/scripts/cardiomyopathyVCEP/cmpVCEPWalsh2019.py
+++ src/hg/makeDb/scripts/cardiomyopathyVCEP/cmpVCEPWalsh2019.py
@@ -202,31 +202,33 @@
             if len(f) < 31:
                 continue
             name = f[2]
             gene = f[4]
             if gene not in OUR_GENES:
                 continue
             m = CV_NAME_RE.match(name)
             if not m:
                 continue
             # For genes with a specified Walsh transcript, match only ClinVar rows on THAT
             # transcript. Otherwise a classic-vs-MANE c.notation collision mis-places the
             # variant (TNNT2 classic c.275G>A [R92Q] vs MANE c.275G>A [G92E]); for TNNT2 this
             # drops the MANE-named rows so the entry falls to the hgvsToVcf-on-classic path.
             # Genes not in WALSH_TX (ACTC1/MYL2/MYL3/TPM1) use MANE == ClinVar's Name transcript,
             # so there is no collision and the (gene, c.notation) match stands.
-            if gene in WALSH_TX and m.group(1) != WALSH_TX[gene]:
+            # Compare the accession WITHOUT the version so a ClinVar transcript-version bump
+            # (e.g. NM_000256.3 -> .4) does not silently drop every row for that gene.
+            if gene in WALSH_TX and m.group(1).split('.')[0] != WALSH_TX[gene].split('.')[0]:
                 continue
             cdna = 'c.' + m.group(3)
             assembly = f[16]
             db = 'hg38' if assembly == 'GRCh38' else ('hg19' if assembly == 'GRCh37' else None)
             if db is None:
                 continue
             try:
                 start1 = int(f[19]); stop1 = int(f[20])
             except ValueError:
                 continue
             chrom_num = f[18]
             key = (gene, cdna)
             lookup.setdefault(key, {})[db] = {
                 'chrom': f'chr{chrom_num}',
                 'start': start1 - 1,