This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Inconsistent Alignments Produced By Bwa Sampe Vs Bwa Mem [Solved: Was Not Bwa But Indelrealigner]

I've aligned my reads with two versions of bwa:

  • bwa-0.6.2 sampe
  • bwa-0.7.5a mem

Here is a screenshot of IGV (it's haloplex, that's why I get those vertical clusters of reads)

http://i.imgur.com/mKVbQRY.pngmd5-0da56900a9b0c721b8487f6814da9a99

sampe found a 21bp deletion (circled in blue) while mem didn't it (see below). How can I explain this ? Here is a comparaison of the reads in that region

#READ-Name    compare    sampe.sam(chrom:pos=flag/cigar)    mem.sam(chrom:pos=flag/cigar)
HWI-1KL149:56:D2513ACXX:1:1105:2873:34609/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:1105:2873:34609/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:1108:9653:29360/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:1108:9653:29360/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:1216:11311:17867/1    NE    chrom:xxxx530=83/12S57M21D31M    chrom:xxxx528=83/10S88M2S
HWI-1KL149:56:D2513ACXX:1:1216:11311:17867/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:1216:5061:40076/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:1216:5061:40076/2    NE    chrom:xxxx389=163/95M5S    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:1304:1508:5563/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:1304:1508:5563/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:1316:14376:53279/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:1316:14376:53279/2    NE    chrom:xxxx389=163/97M3S    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2106:17460:28922/1    EQ    chrom:xxxx817=83/100M    chrom:xxxx817=83/100M
HWI-1KL149:56:D2513ACXX:1:2106:17460:28922/2    NE    chrom:xxxx555=163/32M21D60M8S    chrom:xxxx555=163/32M21D68M
HWI-1KL149:56:D2513ACXX:1:2107:1791:84494/1    NE    chrom:xxxx522=83/4S65M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2107:1791:84494/2    NE    chrom:xxxx389=163/42M58S    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2116:18094:31238/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2116:18094:31238/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2206:2114:60989/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2206:2114:60989/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2211:4062:21441/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2211:4062:21441/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2213:5370:62530/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2213:5370:62530/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2303:12033:82789/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2303:12033:82789/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2304:9324:7003/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:1:2304:9324:7003/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:1:2314:4989:17142/1    NE    chrom:xxxx528=83/10S59M21D31M    chrom:xxxx528=83/10S88M2S
HWI-1KL149:56:D2513ACXX:1:2314:4989:17142/2    NE    chrom:xxxx389=163/82M18S    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:1102:4558:67357/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:1102:4558:67357/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:1107:18152:71354/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:1107:18152:71354/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:1209:16449:9982/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:1209:16449:9982/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:1314:17951:51466/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:1314:17951:51466/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:2102:20151:30908/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:2102:20151:30908/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:2105:4479:17460/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:2105:4479:17460/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:2109:13921:24074/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:2109:13921:24074/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:2112:5665:25455/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:2112:5665:25455/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:2301:12793:90459/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:2301:12793:90459/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M
HWI-1KL149:56:D2513ACXX:2:2305:1854:98774/1    NE    chrom:xxxx518=83/69M21D31M    chrom:xxxx518=83/98M2S
HWI-1KL149:56:D2513ACXX:2:2305:1854:98774/2    EQ    chrom:xxxx389=163/100M    chrom:xxxx389=163/100M

Furthermore, in 'sampe' some reads have been soft clipped in 3' (red circle), those reads have a poor quality in 3'

@HWI-1KL149:56:D2513ACXX:2:2313:19605:15345 2:N:0:GATGAATC
AAGCCGCGAGGCCGGAATGCGGCGGGGGGAAGTAGACCCGGCGAAAGTAATACAATGCGGATTTTGGAGGGAGAAGCAAGAATAACCTTGATGGCATGCA
+
@@?DB@DDCAF,2A:AEA3AE@A@BEE>B:BGC:@?FFCA';8B7;BB####################################################

does this explain the soft-clipping ?

Pierre

bwa comparison

I don't think that this is about randomness, compare these two alignments of the same read

10S59M21D31M    10S88M2S

That is a head-scratcher.

what is also strange that it would soft clip on low quality when the sequence matches.

I would expect a soft clip on low quality if the sequences do not match.

I'm not terribly adept at looking at cigar strings and interpreting them by eye. For the section in question are the reads with the deletion just not aligned there anymore when you use bwa mem? It looks like you have fewer reads in bwa mem for that "block" of reads. So, are they aligned somewhere else now with a better alternative alignment or are they just unaligned?

they're aligned at the same place e.g. for the 1st read in my list HWI-1KL149:56:D2513ACXX:1:1105:2873:34609/1 . Both mapped at chrom:xxxx518 sampe is 69M21D31M = 69 matches, 21 deletion 31 matches while mem is 98M2S=98 matches 2 soft clip

are the 98M mostly mis-matches?

one of those bioinformatics peculiarities where M means both match and mismatch

Yeah I think for the reads in question seeing the actual reference sequence and sequence of the reads might make it clearer.

Hum, there is something strange in my data; I cannot reproduce those results today. :-( I need to check things. Sorry for the inconvenience. I'll temporarily close that post. :-/

sorry: I found, the problem : the main cause is NOT bwa but a difference between the versions of GATK IndelRealigner.

I think this is still something worth knowing about. Can you update us with the version of IndelRealigner in question? Someone may stumble across this with a similar issue someday.

0 answers

No answers yet.

Log in to answer this question.