How To Fix A Bam-Readcount Sm Error: "Couldn'T Grab Single-End Mapping Quality For Read"
3
1
Entering edit mode
11.6 years ago
amnonim ▴ 10

Hi I'm using bam-readcount to get coverage per nucleotide as part of our exome-seq variant annotation pipeline, following bwa and gatk when i run bam-readcount, i get the following error for each position: "Couldn't grab single-end mapping quality for read HWUSI-EAS753:41:FC:4:79:2401:16705. Check to see if SM tag is in BAM" Is there a way to overcome this error?

Thanks

• 6.4k views
ADD COMMENT
3
Entering edit mode
11.6 years ago
ernfrid ▴ 400

This error message has to do with the SM tags on the read which is the single-ended mapping quality. Some aligners do not report this so bam-readcount reports this warning when it cannot grab the value. It does not invalidate your results and you can safely ignore this error, but you should not use the single ended mapping quality field of the output.

ADD COMMENT
2
Entering edit mode

Yes I know, question is >4 years old, but in case anyone reads this: there is the -w option in bam-readcount, which specifies how many of these warnings are emitted. Set to 0 or 1 and be done with it.

ADD REPLY
1
Entering edit mode
11.6 years ago

If I remember correctly, this is a warning, not an error. If you're simply looking for read counts and don't care about the mapping qualities, you're all right.

ADD COMMENT
0
Entering edit mode

Edit: I got it right, but ernfrid's should be treated as canonical - he wrote the tool :)

ADD REPLY
0
Entering edit mode
11.6 years ago

The SM tag is often required in the @RG header pragma.

To fix this problem use samtools to print the header. Edit the header with emacs or vim. Reheader your bamfile again using samtools.

example of correct SM:

@RG    ID:m1_100bp    SM:m1
@RG    ID:m1_50bp    SM:m1
ADD COMMENT
0
Entering edit mode

The SM tag in question is not the read-group "Sample" tag in the header. This warning is about the SM tag indicating "Template-independent mapping quality" which is an integer value per read alignment.

ADD REPLY

Login before adding your answer.

Traffic: 2742 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6