<p>One approach to this is to use whatever data you have to iteratively update the reference genome. You can keep chain files along the way so you can convert coordinates (e.g. in gff files) from the original reference to your new pseudoreference.</p>

<p>A simple approach might be:</p>

<ol>
<li>Align new data to existing reference</li>
<li>Call variants (e.g. samtools mpileup, GATK, or whatever is best for you)</li>
<li>Create new reference incorporating variants from 2</li>
<li>Rinse and repeat (i.e. go to 1)</li>
</ol>

<p>You can track some simple stats as you do this - e.g. the number of new variants should decrease, the number of reads mapped should increase, and the mismatch rate should decrease, with every iteration of the above loop. Once the pseudoreference stabilises, you know you can't do much more. </p>

CC BY-SA 3.0
2017-05-18T11:07:13.690Z
2017-05-18T11:07:13.690Z
roblanf
<p>You can use <a href="https://github.com/jts/nanopolish" rel="nofollow noreferrer">nanopolish</a> using the illumina reads. Also have a look at <a href="https://github.com/broadinstitute/pilon/wiki" rel="nofollow noreferrer">pilon</a>.</p>

CC BY-SA 3.0
2017-05-18T05:29:39.427Z
2017-05-18T13:58:52.057Z
2017-05-18T13:58:52.057Z
madhu bioinfo
<p>If it is a short-read draft assembly and you have long-reads (ONT or Pacbio) run <a href="https://github.com/warrenlr/LINKS" rel="nofollow noreferrer">links</a> to scaffold the genome and then run <a href="https://github.com/broadinstitute/pilon" rel="nofollow noreferrer">Pilon</a> iteratively to try to polish and fill gaps using the short-reads. </p>

CC BY-SA 3.0
2017-05-18T05:38:32.473Z
2017-05-18T05:38:32.473Z
haegglund
<p><a href="https://github.com/bede/kindel" rel="nofollow noreferrer">Kindel</a> (which I wrote) can infer consensus from low quality alignments of short reads to viral references, and extending it to work with single molecule reads and larger genomes is on my to-do list, though I imagine this will require some redesign.<br>
Presumably you're dealing with a bacterial or fungal genome in this case ? I do also have a basic C++ version, but it's a long way away from being user friendly. Anyway, it may be worth a look – feel free to get in touch with any issues you encounter. I'd use Pilon as mentioned above</p>

CC BY-SA 3.0
2017-08-04T19:08:28.877Z
2017-11-10T16:48:43.307Z
2017-11-10T16:48:43.307Z
bedeabc
<p>Depending on the coverage of your data and the complexity of the genome, you could either reassemble the genome <em>de novo</em> or run a reference guided (or reference assisted) assembly. It sounds like you're leaning more towards the latter.</p>

<p>There are a couple of reference-guided assembly tools available: <a href="https://doi.org/10.1093/bioinformatics/btu291" rel="nofollow noreferrer">AlignGraph</a> and <a href="https://www.ncbi.nlm.nih.gov/pubmed/24931998" rel="nofollow noreferrer">Ragout</a>. These may or may not be appropriate depending on the organism of interest and your data types. For example, these tools are very unlikely to work well on Oxford Nanopore reads which have not been error corrected using <a href="https://github.com/jts/nanopolish" rel="nofollow noreferrer">Nanopolish</a> or <a href="http://canu.readthedocs.io/en/latest/index.html" rel="nofollow noreferrer">Canu -correct</a>. </p>

CC BY-SA 3.0
2017-05-21T07:43:43.940Z
2017-05-21T21:36:50.493Z
2017-05-21T21:36:50.493Z
Daniel Standage
<p>I have a DNA sample which I know doesn't <em>quite</em> match my reference genome - my culture comes from a subpopulation which has undergone significant mutation since the reference was created.</p>
<p>The example I have in mind is E.coli. We've tried assembly using a couple of different tools and the de-novo assembly isn't as high quality as we would like, despite having tonnes of data. Approaching this from a Bayesian point of view, the reference genome provides a very good prior if we could use it wisely</p>
<p>From visual inspection with IGV, a significant number of both SNPs and SVs appear to be present, but an assembly built entirely from my own sequencing data is not high enough quality for my purposes.</p>
<p>How can I modify this reference genome to match my sample with new sequencing data (preferably with Oxford Nanopore Technologies long reads, but I can also use these to scaffold short reads if necessary), taking advantage of my knowledge that the existing reference is <em>mostly</em> very good, without having to access the reads which were originally used to construct the reference genome?</p>
<p>The goal of the project isn't to determine where the SVs are, I just need a reference that accurately represents my sample in order to use the data for downstream analysis (as the training set for machine learning.) So by a high quality reference, I mean one which represents as well as possible the sample that was sequenced. To make matters worse, this may not be the one which has the highest alignment identity if there are systematic sequencing errors, as in nanopore sequencing!</p>

<genome><phylogenetics><assembly>
Improve a reference genome with sequencing data
# Improve a reference genome with sequencing data

(Asked by: username_0 on 2017-05-18)

I have a DNA sample which I know doesn't *quite* match my reference genome - my culture comes from a subpopulation which has undergone significant mutation since the reference was created.

The example I have in mind is E.coli. We've tried assembly using a couple of different tools and the de-novo assembly isn't as high quality as we would like, despite having tonnes of data. Approaching this from a Bayesian point of view, the reference genome provides a very good prior if we could use it wisely

From visual inspection with IGV, a significant number of both SNPs and SVs appear to be present, but an assembly built entirely from my own sequencing data is not high enough quality for my purposes.

How can I modify this reference genome to match my sample with new sequencing data (preferably with Oxford Nanopore Technologies long reads, but I can also use these to scaffold short reads if necessary), taking advantage of my knowledge that the existing reference is *mostly* very good, without having to access the reads which were originally used to construct the reference genome?

The goal of the project isn't to determine where the SVs are, I just need a reference that accurately represents my sample in order to use the data for downstream analysis (as the training set for machine learning.) So by a high quality reference, I mean one which represents as well as possible the sample that was sequenced. To make matters worse, this may not be the one which has the highest alignment identity if there are systematic sequencing errors, as in nanopore sequencing!

**Tags:** genome, phylogenetics, assembly

---

## 5 answers

### Answer by username_5 on 2017-05-21. Score: 4 | Accepted answer

Depending on the coverage of your data and the complexity of the genome, you could either reassemble the genome *de novo* or run a reference guided (or reference assisted) assembly. It sounds like you're leaning more towards the latter.

There are a couple of reference-guided assembly tools available: [AlignGraph](https://doi.org/10.1093/bioinformatics/btu291) and [Ragout](https://www.ncbi.nlm.nih.gov/pubmed/24931998). These may or may not be appropriate depending on the organism of interest and your data types. For example, these tools are very unlikely to work well on Oxford Nanopore reads which have not been error corrected using [Nanopolish](https://github.com/jts/nanopolish) or [Canu -correct](http://canu.readthedocs.io/en/latest/index.html).


---

### Answer by username_1 on 2017-05-18. Score: 4

One approach to this is to use whatever data you have to iteratively update the reference genome. You can keep chain files along the way so you can convert coordinates (e.g. in gff files) from the original reference to your new pseudoreference.

A simple approach might be:

1. Align new data to existing reference
2. Call variants (e.g. samtools mpileup, GATK, or whatever is best for you)
3. Create new reference incorporating variants from 2
4. Rinse and repeat (i.e. go to 1)

You can track some simple stats as you do this - e.g. the number of new variants should decrease, the number of reads mapped should increase, and the mismatch rate should decrease, with every iteration of the above loop. Once the pseudoreference stabilises, you know you can't do much more.


---

### Answer by username_2 on 2017-05-18. Score: 3

You can use [nanopolish](https://github.com/jts/nanopolish) using the illumina reads. Also have a look at [pilon](https://github.com/broadinstitute/pilon/wiki).


---

### Answer by username_3 on 2017-05-18. Score: 3

If it is a short-read draft assembly and you have long-reads (ONT or Pacbio) run [links](https://github.com/warrenlr/LINKS) to scaffold the genome and then run [Pilon](https://github.com/broadinstitute/pilon) iteratively to try to polish and fill gaps using the short-reads.


---

### Answer by username_4 on 2017-08-04. Score: 0

[Kindel](https://github.com/bede/kindel) (which I wrote) can infer consensus from low quality alignments of short reads to viral references, and extending it to work with single molecule reads and larger genomes is on my to-do list, though I imagine this will require some redesign.  
Presumably you're dealing with a bacterial or fungal genome in this case ? I do also have a basic C++ version, but it's a long way away from being user friendly. Anyway, it may be worth a look – feel free to get in touch with any issues you encounter. I'd use Pilon as mentioned above


---

