Conversation
Bug fixes: - Fix incorrect error message in ThreadsLowMem constructor - Replace 20x exit(1) with throw for proper exception handling - Fix memory leak: raw HMM* → unique_ptr - Fix sign-extension in pair_key (int → uint32_t cast) - Fix sign bug in rho computation (visible at scale) Performance: - Replace unordered_map traceback storage with std::deque arena - Replace std::set neighbor search with boolean array scan in Matcher - Add periodic pruning every 500 sites (bounds memory, improves cache) - Replace hash maps with flat vectors in ThreadsLowMem/ViterbiState - Add NumPy batch API for Matcher, Viterbi, and hets phases - Use const int* in process_site to avoid bounds-check overhead - Improve move semantics and reference passing Testing: - Add 69 C++ unit tests (444 assertions) via Catch2
C++ bug fixes:
- AlleleAges.cpp: fix infinite loops from self-ref in carrier chain
and trace path, add target<0 guard for out-of-bounds crash
- DataConsistency.cpp: fix infinite loop in carrier traversal, fix
silent mismatch skipping from self-ref targets (replaced with sample 0)
Optimizations:
- Vectorized emission probabilities in fwbw.py
- Optimized sparse posterior construction and VCF writing in impute.py
Tests:
- 152 new unit/property/integration tests covering infer, convert, map,
impute, vcf, normalization, and allele ages
- Benchmarks for imputation scaling and compression
Cleanup:
- Removed dead phase.py (broken imports, no CLI registration)
- allele_ages: remove unnecessary np.array() conversion in per-site loop,
replace multiprocessing.Manager().dict() with pool.imap() return values
- map: lazy-import ray (~1s startup saving when single-threaded),
remove per-variant time.time() instrumentation from hot loop
- convert: lazy-import tszip (~0.7s saving when writing .argn only),
skip guaranteed-fail noise=0.0 retry, narrow bare except to RuntimeError
- Add bulk C++ functions for estimate_ages and run_consistency,
eliminating per-site Python/C++ round-trips
- Replace click with argparse (saves ~224ms import time)
- Replace h5py with C++ HDF5 reader/writer (saves ~235ms import time)
- Move h5py from core to dev dependency
- Port forward/backward LS algorithm from numba to C++
- Add VariantMetadata lightweight class replacing pandas DataFrame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug fixes:
Performance:
Testing: