-
Notifications
You must be signed in to change notification settings - Fork 425
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
Question about SAM output tags #25
Comments
For tags, see the table at the bottom of NM gives the number of mismatches and gaps. You can count the number of gaps from CIGAR. The difference gives the number of mismatches. |
Thank you @lh3 , that worked perfectly! |
Hi Dr. Li:
answered below: # mismatches = NM-D-I-"ambiguous bases" |
@Blosberg , according my understanding, the number of gaps is the number of insertions and deletions from the CIGAR output, so I ended up using #mismatches=NM-I-D. |
I forgot what the SAM spec says, but for minimap2:
NM does not count reference skip |
@npavlovikj , @lh3 , |
For people who encounter this issue via Google in the future, here is the table of tags as of minimap 2.10:
|
Tag dv:f:
|
Also added asm20 to command line help (#151)
Hi, Thanks, |
I also cannot see the dv tag in my whole-genome alignments. Have there been any updates on why this occurs? Thanks, |
dv is approximate. It is only outputted when you don't perform base alignment. |
how to decode a sma file output? what this header means? there was no explanation in the manual. 15e6db9f-7f75-400a-9e8e-a49e5892710d 256 gi|253771435|ref|NC_012947.1| 3013928 0 I hope someone can help me. |
@Raanaroohanitaziani please read the SAM spec. |
thanks for your reply. I am not sure how I can find the SAM spec for minimap2. I appreciate it if you can help me with this. |
I just noticed that there is a mysterious SAM annotation tag ("zd:i", with small integer values) present in some of my alignments, which doesn't seem to be documented in the man page. (I have minimap 2.24) What does this "zd" tag represent? |
I just noticed this today too, cannot seem to find the "zd" flag anywhere. mybe something to do with the z-drop score? |
@lh3 is there a way to disable the output of the Minimap2-specific tags? They can cause issues in other tools such as GATK, e.g.: |
That was a GATK bug and has been fixed. |
Thank you @lh3, I had seen that that was a GATK bug that had been fixed -- I mostly provided that example to illustrate one reason why someone might want to disable the minimap2-specific tags in the output. I take it that's not an option? |
Not an option. It is not worth increasing tech debt for such rare bugs in downstream tools. Complicating the code base for these will make minimap2 harder to maintain in future. |
Hello, sorry for this question, but how is supplementary alignment determined (the algorithm)? I know it is chimeric reads, but I was really surprised to have 60% of chimeric reads in my samples 🤔 |
Hi,
I generated "sam" file using "minimap2", and I noticed there are some additional tags in the output compared to the standard "sam" format, e.g. "tp:A:P cm:i:8 s1:i:46 s2:i:0 NM:i:264 ms:i:194 AS:i:194 nn:i:0". I was wondering if you can tell me what do the tags "tp", "cm", "ms" and "nn" mean.
Next, I want to extract the number of matches and mismatches from the cigar alignment. However, the "sam" file contains only the tag M, which stands for both matches and mismatches, so I was wondering if any of these additional tags can help me differentiate between the both. If not, can you please suggest me a way to do that ?
Thank you,
Natasha
The text was updated successfully, but these errors were encountered: