refactor(step3): shared MT-only BAM + auto 10th-percentile filter (MT-restricted)
EXTRACT_MT moved to its own module and run ONCE in step 3 core; the MT-only BAM feeds modkit (pileup/extract/summary/entropy) AND heteroplasmy, so every modkit threshold estimate is MT-restricted (no nuclear contamination) and the extraction is not duplicated. modkit filtering: replaced the fixed --filter-threshold 0.75 with the automatic 10th-percentile estimate (--filter-percentile; --filter-quantile on summary) + --seed for deterministic sampling. min-coverage raised 3->10 (entropy/localize/motif), parametrized (modkit_min_coverage). Param het_include_supplementary renamed mt_keep_supplementary (now global to the shared MT BAM: also governs methylation F7-A). EXTRACT_MT guards against a mt_contig mismatch (fails if 0 reads) since it now gates all of step 3. New params: modkit_filter_percentile, modkit_seed, modkit_min_coverage. Docs: new #extract_mt section, #modkit/#modkit_entropy updated off the old 0.75/min-cov-3, README param renamed. Reviewed adversarially: no blockers; join silent-drop and entropy determinism verified as pre-existing/non-bugs.
Loading
Please register or sign in to comment