From 7bc1761720046a540a1f6adeafd04cf0ef9dc873 Mon Sep 17 00:00:00 2001 From: Glenn Hickey Date: Fri, 14 Aug 2026 14:31:25 -0400 Subject: [PATCH 1/2] Trim unsupported alleles off the sites filterAC0 keeps filterAC0 is a record-level filter: `bcftools view -e MAX(AC)=0` decides whether to emit a row, never what is in it. So a bubble carrying 200 traversals of which one is genotyped comes through with all 200 alleles and all 200 AT strings attached. Dropping the whole site instead is what the plain `AC=0` form used to do, and that was worse -- the point here is that neither end of the record-level choice is what the option is for. Add `bcftools view -a` behind it. vg declares AC/AF Number=A and AT Number=R, so bcftools subsets all three in step with ALT and renumbers the GT indices; AN and NS need no fixup pass, since trimming changes which alleles ALT lists, not which samples are called. Order is load-bearing. `-a` first would trim every allele off a site nothing carries, leaving ALT=. with no AC at all, and MAX(AC)=0 does not match a missing tag -- the empty record would then survive the filter that exists to remove it. chunked_vcfwave is deliberately untouched: it runs `norm -m -any` ahead of its own AC=0, so the split already makes that a per-allele decision. .raw.vcf.gz never goes through vcfbub() and still keeps every traversal. Co-Authored-By: Claude Opus 5 (1M context) --- src/cactus/cactus_progressive_config.xml | 2 +- src/cactus/refmap/cactus_graphmap_join.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/cactus/cactus_progressive_config.xml b/src/cactus/cactus_progressive_config.xml index 13a3da8f0..ff0cd7a1a 100644 --- a/src/cactus/cactus_progressive_config.xml +++ b/src/cactus/cactus_progressive_config.xml @@ -491,7 +491,7 @@ - + Date: Fri, 14 Aug 2026 15:13:32 -0400 Subject: [PATCH 2/2] log input vcf path --- src/cactus/refmap/cactus_graphmap_join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cactus/refmap/cactus_graphmap_join.py b/src/cactus/refmap/cactus_graphmap_join.py index 28336fc86..6dd3aef31 100644 --- a/src/cactus/refmap/cactus_graphmap_join.py +++ b/src/cactus/refmap/cactus_graphmap_join.py @@ -2072,7 +2072,7 @@ def signature_ploidies(sig): out_file.write(b'\t'.join(toks) + b'\n') if raw_out_path != out_vcf_path: - cactus_call(parameters=['bgzip', '--threads', str(threads)], infile=raw_out_path, + cactus_call(parameters=['bgzip', raw_out_path, '--threads', str(threads)], infile=raw_out_path, outfile=out_vcf_path) os.remove(raw_out_path)