On 2016-05-18 18:35, Lin, Chih-Hsu wrote:
> Thanks for your reply. I used UCSC hg19 from Illumina iGenomes. Is the value
> 8192 abnormally large for NM tag? This is a BAM from RNA-seq, so there is an
> intron of 8192 nt. How does NM compute? Does NM consider CIGAR "N" into
> account? Thanks.
>
> The same read after conversion:
> DF9F08P1:388:C737JACXX:1:1207:17084:11061 163 chr1 10412727 255 68M8192N8M =
> 10412789 138
> GTTGATGCCATCCTCTCCCTAAATATTATTTCTGCCAAGTACCTGAAGTCTTCCCACAACTCTAGCAGGACCTTCT
> CCCFFFFFHHHHGJJJJJJIJIJJIJIJJJJJJJJJJJJHHIJJJIIJGIBGIIJJJJJJJJIJJJJIJJJJIJJH
> AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 YS:i:0 YT:Z:CP XS:A:+ NH:i:1 MD:Z:76
> NM:i:8192
Thank you for the details.
Clearly it's taken this from the 8192N component of the cigar string,
which is probably a bug (in my code infact although I was sure until I
saw this that it didn't use N). Having said that, the SAM specification
doesn't appear to actually state which cigar elements are used in
defining NM, but it doesn't make sense that it could be larger than the
length of the sequence. (Does it also include D? I'll check that when I
get to the office.) It's clearly poorly defined and needs a spec update
as well as a code fix.
Thanks for the bug report. Hopefully samtools calmd will compute the
value 0 so I could look at the cigar elements that command uses and
follow the same logic.
James
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Samtools-help mailing list
Samtools-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/samtools-help