I use bwa to algin Illumina PE reads to references, commands are:
bwa aln -o 1 -l 32 -k 2 -t 16 -L -i 5 reference R1>R1.sai
bwa aln -o 1 -l 32 -k 2 -t 16 -L -i 5 reference R2>R2.sai
bwa sampe -a 900 -r "@RG\tID:E${k}a_PE\tSM:wheat_${k}\tLB:E${k}\tPI:350" -f PE.sam R1.sai R2.sai R1 R2
samtools view -b -u -t ref.fa.fai -S PE.sam -o -|samtools sort -m 2G - PE.bam
There is an error report :Line 12270525, sequence length 98 vs 89 from CIGAR
So the command was used : head -12270525 PE.sam |tail -1 and the result was:
HWI-ST1255:50:C0M14ACXX:8:1114:10824:26280 147 scaffold883 24446 15 2S22M50I2M13S = 24349 -121 AAAAAGAAAAAGAAAAAGAAAAAGAAAAAGGAAGGAAGTTGTGGAAAATGAAATGAAAGAAAAAGAAAAAGAAAAAGAAAAAAAAAAGAAAAAGAAA EEDEDEFFDBFHEGHHHGJIIJIGEJJJIJHIIJJJIIHHJIIIIIIFGIGCGIJJJIIIIJIIEJJIFJIIIIIJJJJJJJJJJHGHHGFFFFFC@C RG:Z:E4a_PE XT:A:M NM:i:50 SM:i:15 AM:i:15 XM:i:0 XO:i:1 XG:i:50 MD:Z:24
The sequnce length and CIGAR are both 98, what's the problem?
Thank you !
what's your version of BWA ?