Dear all,

I have indexed the C. elegans reference genome with:

    bwa index output/genome/ref/seq/celegans.fa

and then aligned my de novo assembly to the reference with:

    bwa mem -t 8 -x intractg output/genome/ref/seq/celegans.fa input/assembly/celegans/hgap/bristol/assembly.fa > output/alignment/pacbio/bwa/ref/bristolAssembly.sam

I then 

    samtools view -bS output/alignment/pacbio/bwa/ref/bristolAssembly.sam > output/alignment/pacbio/bwa/ref/bristolAssembly.bam
    
    samtools sort output/alignment/pacbio/bwa/ref/bristolAssembly.bam -o output/alignment/pacbio/bwa/ref/bristolAssemblySorted.bam
    
    samtools index output/alignment/pacbio/bwa/ref/bristolAssemblySorted.bam

to visualise the alignment in IGV.

This is what I get: [http://cristian-riccio.ch/wp-content/uploads/2017/07/igv_snapshot.png][1]

You can see that my assembly is the same as the reference, just shifted by 12 bases or so. Has anyone any suggestions about how to solve this problem?

Thanks.

Best,

C.


  [1]: http://cristian-riccio.ch/wp-content/uploads/2017/07/igv_snapshot.png
Solved finally!

[http://cristian-riccio.ch/wp-content/uploads/2017/07/igv_snapshotSolution.png][1]

I used this command instead, penalising gap extensions less.

    bwa mem -t 8 -E0.5 -x intractg output/genome/ref/seq/celegans.fa input/assembly/celegans/hgap/bristol/assembly.fa > output/alignment/pacbio/bwa/ref/bristolAssembly.sam

The assembly comes from pacbio, and this technology is 12% indel error in the raw reads, that might be why the contigs also need a bit more lee-ways on indels for alignment.

I figured it out with a colleague because we looked at the start of the chromosomes and it started off aligned and got misaligned when there was a larger indel in my assembly.

Thanks to all for the suggestions.

Best,

C.


  [1]: http://cristian-riccio.ch/wp-content/uploads/2017/07/igv_snapshotSolution.png