Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Add method to remove sequence match info from cigar #90

Open
MillironX opened this issue Apr 9, 2023 · 1 comment
Open

Comments

@MillironX
Copy link
Member

Expected Behavior

I would like a way to tell if the two alignments are the same regardless of sequence, such that

Alignment("1=1X") == Alignment("2M")

Current Behavior

Alignment("1=1X") == Alignment("2M")

# returns false

☝️ This behavior is correct!

Possible Solution / Implementation

The current behavior is entirely correct, but it doesn't let me compare alignments that have matching against those that don't. I propose a new function

remove_match_ops(::T) where {T<:Union{String,Alignment,AlignedSequence,PairwiseAlignment,PairwiseAlignmentResult}}

that would remove the = (sequence match) and X (sequence mismatch) operations from the CIGAR of the alignment and return a T where those operations would be replaced by M (match) operations and adjacent match operations merged.

@kescobo
Copy link
Member

kescobo commented Apr 10, 2023

I don't work much with CIGAR, but I can't think of an objection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants