Closed MillironX closed 1 year ago
@jakobnissen, @CiaranOMara, could I get a review from one of you?
Base: 87.60% // Head: 88.20% // Increases project coverage by +0.59%
:tada:
Coverage data is based on head (
96f8ee7
) compared to base (b92ccf3
). Patch coverage: 100.00% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
LGTM. Thanks for putting in the work. W.r.t #44 - we should roll back the change, then merge #72, then we can apply this. This debacle all suggests to me that moving forward, we need to be more careful about what is API and what is internals, but let's have that change later.
I agree with @jakobnissen, we should postpone merging this until #44 and #72 are both in master
, rather than reverting 349e204.
Failed downstream is expected: this is a breaking change due to the inclusion of #44.
Types of changes
This PR implements the following changes:
:clipboard: Additional detail
Adds support for the
OP_PAD
operation, and fixes the implementation of theOP_HARD_CLIP
operation. I have dubbed these two operations 'meta' operations, as they contain information about the origin and context of the alignment, but have no bearing on the content (i.e. reference or query) of the alignment.New features
ismetaop
, which returnstrue
if passedOP_PAD
orOP_HARD_CLIP
OP_PAD
operation no longer throws an errorOP_HARD_CLIP
orOP_SOFT_CLIP
in the wrong place According to the SAM specification, these have to be present at the end of an alignment, with soft clips optionally buffering hard clips from the rest of the alignmentChanged functionality
cigar(::Alignment)
now uses theAlignmentAnchor.alnpos
to print operation lengthOP_HARD_CLIP
is no longer considered an insert operation, andisinsertop(OP_HARD_CLIP)
now returnsfalse
OP_PAD
indicates it's supported nowJustification
BioAlignments should be able to handle all of the operations defined by the SAM specification. As it currently is, BioAlignments is unable even to parse the alignments in Section 1.1 "An example" of the specification. While the work on clips may seem out-of-scope for a change adding an operation support, the way clips work and pads work are very similar and needed to be considered together.
Example
Using query sequence "r002" from Section 1.1 of the SAM specification:
BioAlignments 2.0.0
This PR
My testing also indicates that this fixes #56,
BioAlignments 2.0.0
This PR
:ballot_box_with_check: Checklist
docs/src/
.[UNRELEASED]
section of the manually curatedCHANGELOG.md
file for this repository.