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

Cigar returns unmatches as leading deletions #61

Open
cgjosephlee opened this issue May 21, 2021 · 0 comments
Open

Cigar returns unmatches as leading deletions #61

cgjosephlee opened this issue May 21, 2021 · 0 comments

Comments

@cgjosephlee
Copy link

cgjosephlee commented May 21, 2021

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.

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

No branches or pull requests

1 participant