Open drs357 opened 5 years ago
Hi,
I had that when I ran Pilon in parallel for multiple contigs. In order to avoid that Pilon reads in a huge BAM file, I first extracted the reads from the BAM file that mapped to the contig I wanted to correct and then ran Pilon. It turned out that if you extract the reads using samtools view -b <BAM> <region>
, then reads whose mate was either unmapped or mapped to a different contig retained the SAM flag indicating that they are paired, although the mate itself was missing (I guess it may also happen when you run Bowtie2 with the --no-unal switch, but I am not sure). And that's what Pilon didn't like. I ended up writing a short script that fixed the SAM flags.
I hope it helps
Hello, I am getting this error when running pilon