# How to force pilon to correct a reference with low coverage mapped reads?

I have mapped some reads to a reference and want to change SNPs in the reference to SNPs found in the reads, even at low coverage. For example, here is a screenshot of one reference in IGV that I would like to correct.

When I use pilon to try to correct the reference, however, no bases are ever changed, even if using the option --mindepth 1.

Here is the call that I am using:

java -Xmx100G -jar {params.pilon}\
--genome {input.ref}\
--frags {input.bam}\
--output {params.outname}\
--changes --fix all,amb,breaks,bases\
--mindepth 1


How can I use even low-coverage information to correct my reference?

Pilon will not consider fragments that are not proper pairs if the --frags option is used to pass the alignment .bam file. The reads mapped in the above IGV screenshot are unpaired.

Instead, if you want Pilon to consider all reads that map as legitimate and usable for correction, pass the .bam file with the --unpaired option instead.

To above corrected example would be:

java -Xmx100G -jar {params.pilon}\
--genome {input.ref}\
--unpaired {input.bam}\
--output {params.outname}\
--changes --fix all,amb,breaks,bases\