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

make_a_table.py exception on BAM files without NH tag. #1

Open
hdangsoccer opened this issue Jul 25, 2018 · 2 comments
Open

make_a_table.py exception on BAM files without NH tag. #1

hdangsoccer opened this issue Jul 25, 2018 · 2 comments

Comments

@hdangsoccer
Copy link

Hi, I encountered an exception from make_a_table,py script (discard_non_unique_mappings function) when using BAM files from HISAT2/samtools/picard, where some reads have no NH tag. According to HISAT2 manual, the tags are optional, so it is perhaps not a good assumption that NH and NM tags will always be there.
I got around the issue by adding a "try, except, continue" around the code to skip those reads.
Thanks for making the project freely available!
Regards,
Hong

@muffato
Copy link

muffato commented Jul 25, 2018

Dear Hong,

Yes you're right, the script currently assumes both NH and NM tags are present. NH is used to detect unique reads, NM to indicate the number of mismatches; both are added by TopHat (which we used for the paper).
Does HISAT2 provide an equivalent tag to NH ? If so I can add that option to the script. Otherwise, the script can either (i) discard the reads where the tag is not present or (ii) not filter the reads (assuming they're all unique mappings).

Regards,
Matthieu

@hdangsoccer
Copy link
Author

hdangsoccer commented Jul 25, 2018 via email

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

2 participants