Skip to content

Cigar returns unmatches as leading deletions #61

Description

@cgjosephlee

I'm trying to align some palindrome sequences, and there is a weird behavior of cigar string.

import parasail

def test():
    a = 'AAAAGACTTGGCTCGACAACGC'
    b = 'GCGTTGTCGAGCCAAGTCTTTT'  # reverse complement of a
    c = a + b[0:10]
    m = parasail.matrix_create("ACGT", 3, -4)
    r = parasail.sw_trace_striped_8(b, c, 4, 4, m)
    print(r.cigar.beg_ref, r.end_ref)
    print(r.cigar.beg_query, r.end_query)
    print(r.cigar.decode)


# output
# 0 31
# 0 9
# b'22D10='

Cigar string starts with a 22D. The begin and end positions are wrong as well, should be (22,32) in ref and (0,10) in query since there is 10= in cigar.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions