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

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

<p>To above corrected example would be:</p>

<pre><code>java -Xmx100G -jar {params.pilon}\
  --genome {input.ref}\
  --unpaired {input.bam}\
  --output {params.outname}\
  --changes --fix all,amb,breaks,bases\
  --threads {threads}\
  --mindepth 1
</code></pre>

CC BY-SA 4.0
2018-08-02T17:26:42.623Z
2018-08-02T17:26:42.623Z
conchoecia
<p>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. </p>

<p><a href="https://i.sstatic.net/zlUhX.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/zlUhX.png" alt="enter image description here"></a></p>

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

<p>Here is the call that I am using:</p>

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

<p>How can I use even low-coverage information to correct my reference?</p>

<sam><reference-genome><read-correction>
How to force pilon to correct a reference with low coverage mapped reads?
# How to force pilon to correct a reference with low coverage mapped reads?

(Asked by: username_0 on 2018-08-02)

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\
  --threads {threads}\
  --mindepth 1

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

**Tags:** sam, reference-genome, read-correction

---

## 1 answers

### Answer by username_0 on 2018-08-02. Score: 1 | Accepted answer

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\
  --threads {threads}\
  --mindepth 1


---

