Repository navigation
feat: pair orientation, MQ, discordant count, fixmate-exact TLEN - #5
Open
jayhesselberth wants to merge 1 commit into
Open
jayhesselberth wants to merge 1 commit into
jayhesselberth wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Closes #4
Most of #4 already landed in #3 (
-1/-2,--interleaved, paired uBAM, joint pair scoring on the existing score rows for CPU and GPU, pair-aware chunking, proper-pair flags,MC,--sort coordinate,--secondary). This PR closes the remaining gaps against the issue.Changes
--pair-orientation fr|rf|ff(defaultfr), carried asPairOrientationinPairOptions.fris the existing behaviour.rf: opposite strands, reverse mate starts at or before the forward mate.ff: same strand, mate 1 upstream.MQ(mate MAPQ) is now written next toMC.MC:Z:*is written when the mate is unmapped, assamtools fixmatedoes.TLENnow followssamtools fixmate(partner 5' end minus own 5' end) so a fixmate round trip is a no-op. It is identical to the old span for ordinary FR pairs, and differs for same-strand and overhanging pairs.samtools collate/samtools sort -n.align_paired.rs(renamed or split from the existing ones), plusjoint_score_breaks_tie_a_mate_cannot,discordant_pair_flags_and_counts,non_adjacent_bam_mates_say_to_collate,pair_orientation_ff_makes_same_strand_pair_proper, and libraryorientation_rf_and_ff. The single-end golden test moved fromalign_unpaired.rstoalign_paired::single_end_output_unchanged(golden file untouched, so single-end output is byte-identical). Fixture: one extradiscordantpair appended to the synthesized pairs files (gen_pair_fixture.py, no real data).How the equality tests were checked to fail
Each was run against a deliberately broken implementation and failed, then the break was reverted:
joint_score_breaks_tie_a_mate_cannotfastq_pair_matches_interleaved_and_ubamsort_coordinate_matches_samtools_and_fixmatesingle_end_output_unchangeddiscordant_pair_flags_and_countsmate_name_mismatch_is_an_errororientation_rf_and_ffffgeometry always truedevice_gpu_output_is_byte_identicalcompiles under--features gpu(clippy clean) but was not run: no GPU here.Checks
cargo fmt --all --check,cargo clippy --workspace --all-targets -- -D warnings(also with--features gpu),cargo nextest run --workspace(126 passed),cargo test --doc --workspace.🤖 Generated with Claude Code