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

cs-string support for mappy #183

Closed
cvdelannoy opened this issue Jun 12, 2018 · 2 comments
Closed

cs-string support for mappy #183

cvdelannoy opened this issue Jun 12, 2018 · 2 comments

Comments

@cvdelannoy
Copy link
Contributor

I like the cs-string optionally generated by minimap2 to assess mismatches. Can we get the option to generate cs-strings in mappy as well?

@lh3
Copy link
Owner

lh3 commented Jun 12, 2018

It is hard to expose the cs tag to mappy due to the internal data structure of minimap2/mappy. I will think about it but can't make promise.

@lh3
Copy link
Owner

lh3 commented Jul 25, 2018

Done on the master branch. To enable the cs output, you need to add cs=True when calling Aligner.map(). Mappy doesn't write cs by default.

a = mp.Aligner("ref.fa")
for hit in a.map(seq, cs=True):
    print("{}\t{}\t{}\t{}".format(hit.ctg, hit.r_st, hit.r_en, hit.cigar_str))

I am closing this issue. If you see bugs, please create a new issue. Thank you.

@lh3 lh3 closed this as completed Jul 25, 2018
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