Skip to content

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

@MillironX

Description

@MillironX

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions