-
Notifications
You must be signed in to change notification settings - Fork 369
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
ValidateSamFile wrong NM tag computation #1963
Comments
The tool calls It seems to me that this Note that although the SAM spec does state that "ambiguity codes in both sequence and reference that match each other, such as ‘N’ in both, or compatible codes such as ‘A’ and ‘R’, are still counted as mismatches", the spec also acknowledges that "historically this has been ill-defined and both data and tools exist that disagree with this definition." |
The problem seems to be that if both the reference and read base is One potential idea (in case this is really the issue) might be to add something like https://github.com/samtools/htsjdk/blob/127f3de750acb6a59fe1ceb5865ebbaee938847f/src/main/java/htsjdk/samtools/util/SequenceUtil.java#L184 (but without the |
This was exactly the issue and I thought I had a fix for it, only to discover @michaelgatzen already has something in place from a while back: samtools/htsjdk#1536 |
Bug Report
Affected tool(s)
picard ValidateSameFile
Affected version(s)
Description
Calling
picard ValidateSamFile
with a reference sometimes producesERROR:INVALID_TAG_NM
even though the read alignment on the reference and CIGAR code match.Steps to reproduce
test.sam
containing the following linesExpected behavior
The validation should succeed. The first read alignment and its CIGAR correspond. The second read perfectly matches the reference, but the final 29 'N's should be considered mismatches according to the NM specification given in "Sequence Alignment/Map Optional Fields Specification" (see at the bottom of p.3).
Actual behavior
Picard produces the following INVALID_TAG_NM errors:
The text was updated successfully, but these errors were encountered: