Repository navigation
6.3.0 — configurable observe_molecules; secondary/supplementary filters fixed
✨ Added
-
observe_molecules()takes the settings it actually uses. New keyword arguments
filters,quality,alignment,umi_tag,threads,apply_baqandlibrary_type
sit alongside the existingconfig=, which keeps working; an individual argument
overrides the matchingconfigfield.Previously the only way to change a setting was to build a whole
GbcmsDnaConfig, whose
four required fields —variant_file,bam_files,reference_fasta,output— have
zero overlap with the seven this entry point reads. Two of them must name files that
exist on disk. So adjusting one filter meant fabricating an output directory and a variant
path that are never touched: paths that look load-bearing and are not.Found by the first real consumer (mulligan) needing a non-default read filter.
umi_tagis the one argument whereNoneis an explicit choice rather than an omission —
it means "group by read pair, not UMI family" and overridesconfigaccordingly. Every
other argument treatsNoneas "not supplied". Without that distinction, a caller passing
umi_tag=Nonealongside a config that sets one would silently inherit it and change what
counts as a molecule.
🐛 Fixed
-
--filter-secondaryand--filter-supplementarynow change the result when turned
off. They previously could not change any output: an unconditional skip in the
counting loop discarded those records before fragment evidence, regardless of the
flags. Measured across all six read filters on real MSK-ACCESS data, these were the only
two that did nothing (duplicates,improper_pairandindelall worked).
(#82)Default runs are byte-identical — both filters still default to on, so such records
never reach the cache. Verified on real data: total depth unchanged at 1202 across 40
loci, and binned↔legacy parity holds.Turning a filter off now admits those records to fragment-level evidence
(dpf/rdf/adf) and to the per-molecule observation export. They still never
contribute to read-leveldp/rd/ad: a supplementary shares a QNAME with its primary
and is the same physical read, so counting both would report depth 2 where one read
exists. Fragments are immune either way —hash_moleculekeys on QNAME, so a primary and
its supplementary collapse into one.What this fixes concretely: a locus reached only by a supplementary segment used to
reportdpf=0— not a filtered read but a wrong answer, since a molecule demonstrably
covers it. That is what made a molecule spanning a large deletion invisible to
cross-locus phasing.New consequence to be aware of: with the filter off, an admitted supplementary raises
dpfwhile leavingdpunchanged, so the two stop moving together. The observation
export reconciles withdpf, and that invariant is verified under both settings.