ksahlin / strobealign

Aligns short reads using dynamic seed size with strobemers
MIT License
128 stars 16 forks source link

Refactor aln.cpp #368

Closed marcelm closed 7 months ago

marcelm commented 7 months ago

This renames:

Also, InsertSizeDistribution is moved to a separate file.

The main change is to factor out an output_aligned_pairs() function. The rescue_read() and align_paired() functions previously did two things:

When working on random alignment selection for #367, I noticed that the code outputting to SAM was duplicated (and had slightly diverged already). This commit moves that part to a new function output_aligned_pairs(). Now rescue_read() and align_paired() just return a vector of ScoredAlignmentPairs.

This should fix at least two bugs:

ksahlin commented 7 months ago

I haven't had the time to look at all the changes in this PR in detail. But I agree with the name changes and with what you describe, without reservation.

If this PR is holding up any other development, or if you think its mostly non-controversial changes, I suggest a merge without a careful check.

marcelm commented 7 months ago

Do you want to review this PR more closely or shall I just merge it?

ksahlin commented 7 months ago

Won't have time anytime soon unfortunately . Yes please go ahead and merge.