genome/bam-readcount

WARNING

Closed this issue · 3 comments

WHEN I run bam-readcount bam-readcount -f ../mydata/genome/hg38/hg38-genomefa/Homo_sapiens_assembly38.fasta -l ../mydata/genome/hg38/hg38-genomefa/intervallist/S07604514_Regions.bed ../mydata/03.gatk/a.BQSR/SCA_295_T.MarkDuplicates.BQSR.bam, it showed "WARNING: In read A00877:607:HVKLVDSXY:1:1219:13593:33458: Couldn't find single-end mapping quality. Check to see if the SM tag is in BAM" all the time, what the matter. Hope your response! Appreciate!

apldx commented

Most likely your aligner did not output a SM tag with the alignments (note: this is the per-alignment SM tag, not the RG SM field) to the BAM file. bwa, for example, does not output SM. To reduce clutter to STDERR, you can use -w1 to show each type of warning only once, or -w0 to suppress them entirely. Here's a bit more on the SM tag: https://www.biostars.org/p/95912/ and in the SAM tags spec: https://samtools.github.io/hts-specs/SAMtags.pdf

Most likely your aligner did not output a SM tag with the alignments (note: this is the per-alignment SM tag, not the RG SM field) to the BAM file. bwa, for example, does not output SM. To reduce clutter to STDERR, you can use -w1 to show each type of warning only once, or -w0 to suppress them entirely. Here's a bit more on the SM tag: https://www.biostars.org/p/95912/ and in the SAM tags spec: https://samtools.github.io/hts-specs/SAMtags.pdf

Thanks very much for your reply. I wondered whether the WARNING would affected the final output results? If not, I will ignore the WARNING. If it do, what I can do, I use bwa for mapping, should I need to resort to other aligner software? Hope your response. Appreciate!

apldx commented

We use bwa a lot, and so use -w1 a lot! In the absence of SM, in the output statistics the avg_se_mapping_quality field will be based on the usual mapping quality. If you're not using that field, safe to ignore. This is something we might want to think about changing as it comes up often.