feat: migrate multimapper-tiebreak RNG to in-tree splitmix64#118
Open
BenjaminDEMAILLE wants to merge 2 commits into
Open
feat: migrate multimapper-tiebreak RNG to in-tree splitmix64#118BenjaminDEMAILLE wants to merge 2 commits into
BenjaminDEMAILLE wants to merge 2 commits into
Conversation
Replace the `rand` crate (StdRng) with STAR-rs's splitmix64-based deterministic generator for the two RNG consumers ported so far: `shuffle_tied_prefix` (SE/PE `--outMultimapperOrder Random` tie-break) and `pick_primary_and_mapq` (transcriptome-space primary pick). Per docs-old/dev/porting-from-star-rs.md's RNG decision: this must land before STARsolo, whose UMI dedup depends on deterministic read order. Keeps the existing per-read seed (run_rng_seed + read-name hash, already thread-invariant); only the underlying generator changes, matching STAR-rs's own choice of an in-tree splitmix64 over a general-purpose PRNG crate (documented in STAR-rs's DIVERGENCES.md D16: STAR's own mt19937 output is itself thread-count-dependent, so no external crate's output is any more "correct" to match). Also migrates the test-only packed_stream.rs fuzz generator off `rand`, so the dependency can be dropped from Cargo.toml entirely. Gate green: cargo build --all-targets, clippy -D warnings, fmt, 455 tests.
Collaborator
|
This is worth adopting early, as it should clean up the comparisons/tests quite a lot. We can later assess if we continue to use this method at a later date. |
Collaborator
|
If you keep all your PRs on the same base commit, I can take care of merging them all. So no need to update each one. |
Contributor
Author
Oh fine so. will let you do the merge :) |
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.
Summary
randcrate (StdRng) with STAR-rs'ssplitmix64-based deterministic generator for the two RNG consumers:shuffle_tied_prefix(SE/PE--outMultimapperOrder Randomtie-break) andpick_primary_and_mapq(transcriptome-space primary pick).docs-old/dev/porting-from-star-rs.md's RNG decision: this must land before STARsolo, whose UMI dedup depends on deterministic read order.run_rng_seed+ read-name hash, already thread-invariant) — only the underlying generator changes, matching STAR-rs's own choice of an in-tree splitmix64 over a general-purpose PRNG crate (STAR-rs'sDIVERGENCES.mdD16: STAR's own mt19937 output is itself thread-count-dependent, so no external crate's output is any more "correct" to match).packed_stream.rsfuzz generator offrand, so the dependency drops fromCargo.tomlentirely.Test plan