Hi all,

I am currently trying to perform a new assembly using paired and mate paired reads. I first mapped my paired-end on a reference genome. Now I would like to extract from the mapping only the covered portions and get contigs from my reads (not a consensus with the reference genome including N between the uncovered portions). I would like then to use the paired-end reads and the mate paired to scaffold my assembly.

I there a proper way to do that ? I think maybe mpileup could help, but until now I only managed to produced consensus.

Extra question, which software would you recommend to perform the scaffolding ? Does any one exist allowing different insert size ?

Thank you very much!

Clément
<p>Here is an approach that might do what you want, I&#39;ve tested it with some random data - In the first panel are mappings of some simulated reads with some SNPs, below are the mappings of the two generated contigs.</p>

<p><img alt="" src="http://i.imgur.com/WUYcOBs.png" style="height:217px; width:640px" /></p>

<p>To generate the consensus contigs I used two modules from <a href="https://github.com/BioInf-Wuerzburg/proovread">proovread</a>, a correction software I have written. You will need to clone/install it from github and you will need a recent version of samtools for it to run.</p>

<pre>
# generate consensus (ignoring reference)
bam2cns --bam reads-to-ref.bam --ref ref.fa --prefix cns.fq

# trim no-coverage regions and convert to fasta
SeqFilter --in cns.fq --out cns.trimmed.fa \
 --fasta --min-length 100 \
 --phred-offset 33 --trim-win 1,1
</pre>
