Users beware. Tophat2 produces thousands of CIGAR alignments that are just plain wrong. As an example, see the following .bam file line:
M01478:14:000000000-A5C8R:1:1106:17706:4022 256 CYDV_S1_L001_R1_trimmed_(paired)_contigs_50/104 4239 3 1M184N110M * CTGCTCTGCCCTATGCGATCTGTCCGATCGATCCTTCCAGACCATTGTGGAGGACGAAGATGTTGTTGATACCCCGAACGGACCGTGGCTCCCTGTGCAGGATGATGGTGT DEEEEFFFFFCFGGGGGGGGGGHHHGGGGGGHHGHHHHHHHGHHHHHHHGHHGGHGGGGGHHHHHHHHHHHHHHHGGGGGGGGGGGHGGHHGGHHHHHHHHGHHHHHHGHG AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:111 YT:Z:UU XS:A:- NH:i:2 CC:Z:= CP:i:4423 HI:i:0
The CIGAR indicates a single match/mismatch, then 184 nucleotides that are missing from the read relative to the reference and then 110 match/mismatches. Obviously, this has to be wrong. There is no way you can predict that a single nucleotide matches a position 184 nucleotides upstream of the rest of an alignment, when there are about 40 intervening base positions that are equally valid matches. Furthermore, in this particular example, there is no mismatch. The first nucleotide precisely matches the nucleotide upstream of the 110 aligned nucleotides. In other words, Tophat is just "making stuff up"! Note: no paired end reads were used in this Tophat run.
M01478:14:000000000-A5C8R:1:1106:17706:4022 256 CYDV_S1_L001_R1_trimmed_(paired)_contigs_50/104 4239 3 1M184N110M * CTGCTCTGCCCTATGCGATCTGTCCGATCGATCCTTCCAGACCATTGTGGAGGACGAAGATGTTGTTGATACCCCGAACGGACCGTGGCTCCCTGTGCAGGATGATGGTGT DEEEEFFFFFCFGGGGGGGGGGHHHGGGGGGHHGHHHHHHHGHHHHHHHGHHGGHGGGGGHHHHHHHHHHHHHHHGGGGGGGGGGGHGGHHGGHHHHHHHHGHHHHHHGHG AS:i:0 XN:i:0 XM:i:0 XO:i:0 XG:i:0 NM:i:0 MD:Z:111 YT:Z:UU XS:A:- NH:i:2 CC:Z:= CP:i:4423 HI:i:0
The CIGAR indicates a single match/mismatch, then 184 nucleotides that are missing from the read relative to the reference and then 110 match/mismatches. Obviously, this has to be wrong. There is no way you can predict that a single nucleotide matches a position 184 nucleotides upstream of the rest of an alignment, when there are about 40 intervening base positions that are equally valid matches. Furthermore, in this particular example, there is no mismatch. The first nucleotide precisely matches the nucleotide upstream of the 110 aligned nucleotides. In other words, Tophat is just "making stuff up"! Note: no paired end reads were used in this Tophat run.
Comment