Secondary alignment tracking for anvi-profile #2371
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.
This PR adds functionality to track secondary alignments in BAM files for accurate reporting of coverages if the user requested from the mapping software for individual reads to be aligned to multiple places.
Partially addressing the feature request by @FlorianTrigodet in #2369.
In its current state, the PR is partially complete as there is a known bug in it that in some cases leads to the following error when profiling SNVs:
Solution for this requires insights into whether we should carry over more information into the
read
instance for the secondary alignment for the primary alignment when we update the 'sequence' information at these locations:We update query sequence, but probably we need to update one or more things to address the SNVs error. Until then, using the flag
--skip-SNV-profiling
along with--track-secondary-alignments
is the only option to avoid catastrophic failures during the profiling of secondary alignments.