<p>If your goal is to compare to the NCBI version I'd suggest using <a href="https://github.com/ablab/quast" rel="nofollow noreferrer">QUAST</a> to compare the two assemblies, supplying the NCBI assembly as the reference genome (<code>-r</code> option I think). This will not guarantee anything, but you would expect the two assemblies to be fairly syntenic and to have good overlap of sequences. The tool includes visualization, but you could also use an approach like <a href="https://academic.oup.com/bioinformatics/article-abstract/26/20/2620/194655" rel="nofollow noreferrer">circoletto</a> or <a href="http://blog.dnanexus.com/2018-01-11-dot-an-interactive-dot-plot-viewer-for-comparative-genomics#" rel="nofollow noreferrer">dot plots</a> for something a little more intuitive/simpler.</p>
<p>I'd expect your genome to be quite a bit higher quality even as a metagenome-derived assembly due to nanopore contiguity, I'm not sure that using the NCBI reference to improve yours is a great idea. I'd instead suggest following @M__'s suggestion to scaffold with your nanopore reads (you will have to map them onto your full metagenome first, though approach may differ based on what the scaffolder wants). I'm not up on the current methods here but <a href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-021-04451-7" rel="nofollow noreferrer">here</a> is a recent tool. If you have 10 pieces I'd expect to be able to close at least some of that using nanopore (even old).</p>
<p>If you do choose to use the reference to improve, the tool that people seem to be using now is <a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-022-02823-7" rel="nofollow noreferrer">RagTag</a>.</p>

CC BY-SA 4.0
2023-01-19T13:51:49.990Z
I've tried a couple of things that were suggested: in the end, LongStitch, which you've linked to, proved the best option, and it looks like it got the main genome to 3-4 pieces with some potential plasmids on the side (will have to check). Thank you!
Laura
CC BY-SA 4.0
2023-01-19T16:57:49.083Z
@Laura great to know, glad that this seems to have been helpful!
Maximilian Press
CC BY-SA 4.0
2023-01-10T18:19:19.223Z
2023-01-10T18:19:19.223Z
Maximilian Press
<p><strong>Summary</strong>
What I am saying in this post is there approximates to 3 &quot;generations&quot; of <em>in silico</em> gap-closers/polishes:</p>
<ol>
<li>GapFiller - amongst other &quot;early&quot;  generations (2012);</li>
<li>medaka/racon/Nanopolish/Pilon (2014 - 2018 inclusively)</li>
<li>Nextpolish/PEPPER/Apollo/Homopolish/NeuralPolish (2020 onwards).</li>
</ol>
<p>The trendy approach is combining 2. and 3. I can't guarantee it will work for cyanobacteria gap-closing, but the shear volume of algorithms dedicated to this purpose, infers they must be delivering results.</p>
<p><strong>Background</strong>
Whats the issue with a reference genome? The key thing about <em>many</em>  bacteria is their ability to &quot;dump&quot; genes and then regain them via plasmid associated recombination. This can occur extensively within a single species. This makes reference associated assembly essentially impossible in many bacteria - <em>particularly against the official NCBI reference genome</em>. Hence, the official <em>NCBI reference gene</em>, is not like a human genome reference - which is a gold standard. With due to respect to those who have dedicated time to presenting the <em>official bacterial reference genomes</em> are not very useful.</p>
<p>This BioStars post <a href="https://www.biostars.org/p/462167/" rel="nofollow noreferrer">here</a> demonstrates that even <em>Mycobacteria tuberculosis</em> would not assemble via a reference genome and TB in context is one of the most conserved genomes in bacteria, the SNP behaviour is famously limited.</p>
<p>If attempting a reference genome it is worth considering the following:</p>
<ol>
<li>Any amount of genetic divergence can result <em>genetic island</em> phenomena and non-contiguous genomes that will make assembly difficult, therefore a complete genome as close to the target genome as possible is a good reference.</li>
</ol>
<ul>
<li>For example, simply Blasting sections of you genome to look for a consistent reference that is close to yours. A custom database of complete genomes for your species my be useful, but just sending bits of your target onto the NCBI website will be useful. The idea is to get lots of bits of the genome matching the closest strain.</li>
</ul>
<ol start="2">
<li>QUAST was going to be my suggestion too.</li>
<li>Mapping via e.g. <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5802927/" rel="nofollow noreferrer">Mummer4</a> against the reference genome as the &quot;scaffold&quot;.</li>
</ol>
<p><strong>Key question:</strong></p>
<blockquote>
<p>The same strain also has 1-2 very fragmented genomes (100s of pieces) available in NCBI at scaffold level. The reads themselves are not available, so I can't just add them to the assembly.</p>
</blockquote>
<p>I'm not sure what &quot;not available&quot; means.</p>
<p><strong>Key suggestion: Polishing</strong>
The other approach are recent <em>de novo</em> assemblers and <em>in silico</em> &quot;polishing&quot;. What I'm recommending is to first try &quot;polishing&quot;. This doesn't exclude subsequent reference genome assemblies - <em>not at all</em> - but it's a way to improve the <em>de novo</em> assemblies and if there are still issues then consider a reference genome.</p>
<p>Firstly I would read someone who is <em>really</em> up to date, e.g.</p>
<blockquote>
<p><a href="https://www.nature.com/articles/s41598-021-00178-w" rel="nofollow noreferrer">Comparative evaluation of Nanopore polishing tools for microbial genome assembly and polishing strategies for downstream analysis</a></p>
</blockquote>
<p>They are <a href="https://github.com/nanoporetech/medaka" rel="nofollow noreferrer">medaka</a> fans and are using this as part of a combination approach. medaka was part of the established stable of &quot;polishers&quot;</p>
<ul>
<li><a href="https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-13-S14-S8" rel="nofollow noreferrer">GapFiller</a> - I don't think this is useful.</li>
<li><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5411768/" rel="nofollow noreferrer">racon</a> is specifically for long reads</li>
<li>Nanopolish <a href="https://www.nature.com/articles/nmeth.3444" rel="nofollow noreferrer">here</a></li>
</ul>
<p>The authors prefer medaka then goes on to describe</p>
<blockquote>
<p><a href="https://academic.oup.com/bioinformatics/article/36/7/2253/5645175" rel="nofollow noreferrer">Nextpolish</a>, <a href="https://www.nature.com/articles/s41592-021-01299-w" rel="nofollow noreferrer">PEPPER</a>, Apollo, Homopolish, and NeuralPolish</p>
</blockquote>
<p>Much more recent from 2020 ... thats a lot of polishing tools. Note, PEPPER and Apollo are often used for algorithms names - make sure its 2020 onwards, with PEPPER being 2021. They suggest medaka x PEPPER.</p>
<p>I really think this combination polishing approach with an established (medaka) and one the very latest polishing algorithms, such as PEPPER (2021) is really worth trying. If it doesn't work for the specific purpose it will certainly improve the contig quality. However, given the shear volume of work dedicated to this area then there has to be good reason.</p>
<p>By the same token that</p>
<blockquote>
<p>Money doesnt give happiness, but sure gives a better standard of misery.</p>
</blockquote>
<p>Then ...</p>
<blockquote>
<p>Polishing might not give gap closure, but sure gives a better standard of quality to the same old bunch of miserable contigs</p>
</blockquote>
<hr />
<p><strong><em>de novo</em> Assembly</strong>
Maybe <a href="https://academic.oup.com/bioinformatics/article/32/14/2103/1742895" rel="nofollow noreferrer">Miniasm</a>? I'd look at &quot;polishing&quot; the <em>de novo</em> assembly you have.</p>
<p>RagTag as a SPAdes alternative is interesting @MaximilianPress</p>

CC BY-SA 4.0
2023-01-19T13:57:05.593Z
I'm not convinced long-read polishing is as useful for hybrid data, but I've given medaka and pilon (short-read polishing) a try. It didn't work in this particular case (at best moved some indels around, at worst it made more), but that's more because I've only tested things on my absolutely worst sample. Either way, it didn't work in this case, but now I know about these tools, so I wanted to say thank you!
Laura
CC BY-SA 4.0
2023-01-19T15:16:52.947Z
@Laura one day the algorithms will catch up with the problem, they always do, but clearly not today. So, I'm really sorry it's not worked. Keep in mind the 2020+ tools. From a distance its seems an exciting future, where all *de novo* assemblies would be resolved via combination gap-filling and polishing. I was too optimistic ... for now. That means complex mapping - and a lot of work, via QUAST, Mummer and Daniel Standage's recommendations (his suggests looked cool).
M__
CC BY-SA 4.0
2023-01-14T23:12:47.037Z
2023-01-16T13:03:14.997Z
2023-01-16T13:03:14.997Z
M__
<p>I have what at first sight appears to be a high-quality MAG (~10 pieces, high completion%) that I built from a hybrid assembly (Illumina + Nanopore data) from a cyanobacterium.</p>
<p>Workflow:
Quality control (BBDuk) &gt; Hybrid assembly (Unicycler) &gt; co-binning multiple different samples (vamb) &gt; Quality control (CheckM, anvi'o)</p>
<p>*The Nanopore data is pretty old, and therefore I'd thought Unicycler might be a safer bet rather than long-read-first assemblers, due to the higher error rate</p>
<p>The same strain also has 1-2 very fragmented genomes (100s of pieces) available in NCBI at scaffold level. The reads themselves are not available, so I can't just add them to the assembly.</p>
<p>Is there a way to use the available NCBI genome(s) to try to check/polish mine? (I've checked out <a href="https://bioinformatics.stackexchange.com/q/97/4401">Improve a reference genome with sequencing data</a> but it's already a few years old so I imagine different tools might be applicable)</p>
<p>Thank you for your time!</p>

CC BY-SA 4.0
2023-01-09T16:49:10.157Z
In bacteria *de novo* assemblies are the norm because they shift their genomes about a lot (which @Laura will know). A reference genome would be easy - even `Spades` would do this and that is likely a long way from the optimal approach. First question, which genome? Secondly, this is an impressive data set - long read, short read why not simply use advanced gap closing algorithms and the latest *de novo* assemblers?
M__
CC BY-SA 4.0
2023-01-09T19:27:48.760Z
Can you please explain *how* you built this genome in the first place? That will help to avoid answers that duplicate things you've already tried.
gringer
CC BY-SA 4.0
2023-01-10T12:31:26.577Z
@M__ Thank you! Edited the question with more details, including workflow. I've used de novo assembly (never used reference-guided assembly before). But I can't help but wonder whether I can close some of the gaps still remaining by considering the NCBI genomes as well. Perhaps not - I imagine the gaps are characterized by repetitive sequences that would break any assembly...but maybe? One of the NCBI genomes is the same strain from the same culture collection that I used, so I thought there's a chance that rearrangements would not have happened. I'm not sure if this is a good idea.
Laura
CC BY-SA 4.0
2023-01-10T13:03:56.343Z
@Laura I will put an answer together this week. Mine is old technology in this area for this technique. However, I personally don't think any reference genome approach will be an improvement, I think it will result in alternative gaps. I'll highlight an alternative modern *de novo* approach as well.
M__
CC BY-SA 4.0
2023-01-11T18:58:47.550Z
What is your input data? Is it isolate or metagenome? On one hand, you mentioned MAG (metagenome-assembled genome) and vamb. On the other hand, you are running Unicycler – I thought Unicycler wouldn't work well with metagenome samples? Also, how "old" is your Nanopore data? Flye/Canu can handle >10% error rate. If you have FAST5 files for the Nanopore data, redo base calling with the latest basecaller. This might dramatically improve the base accuracy. Your assembly seems to have much higher quality than the NCBI one. I would ignore the NCBI assembly.
user172818
CC BY-SA 4.0
2023-01-12T10:42:18.843Z
@user172818 Isolate or metagenome - both? Low-diversity metagenome. For my field of work (cyanobacteria), the vast majority of isolates are not axenic. (in this case, the metagenome had 3 MAGs). I know Unicycler isn't technically recommended for those, but I wasn't sure what else to use that could handle older long-read data (~2018) as well as incorporate Illumina reads (which I don't think Flye/Canu do). No fast5 files anymore, only fastq. I'm probably missing something obvious, because I still have a lot of gaps in my knowledge. This is why I ask ; )
Laura
CC BY-SA 4.0
2023-01-12T17:40:22.890Z
many metagenome assemblers can handle this kind of thing (old NP + ILMN), for example, [hybridspades](https://academic.oup.com/bioinformatics/article/32/7/1009/1743807), [OPERA-MS](https://pubmed.ncbi.nlm.nih.gov/31359005/), probably others
Maximilian Press
<genome><assembly><nanopore><illumina>
Improving prokaryotic assembly with other contig/scaffold-level data?
# Improving prokaryotic assembly with other contig/scaffold-level data?

(Asked by: username_0 on 2023-01-09)

I have what at first sight appears to be a high-quality MAG (~10 pieces, high completion%) that I built from a hybrid assembly (Illumina + Nanopore data) from a cyanobacterium.

Workflow:
Quality control (BBDuk) > Hybrid assembly (Unicycler) > co-binning multiple different samples (vamb) > Quality control (CheckM, anvi'o)

\*The Nanopore data is pretty old, and therefore I'd thought Unicycler might be a safer bet rather than long-read-first assemblers, due to the higher error rate

The same strain also has 1-2 very fragmented genomes (100s of pieces) available in NCBI at scaffold level. The reads themselves are not available, so I can't just add them to the assembly.

Is there a way to use the available NCBI genome(s) to try to check/polish mine? (I've checked out [Improve a reference genome with sequencing data](https://bioinformatics.stackexchange.com/q/97/4401) but it's already a few years old so I imagine different tools might be applicable)

Thank you for your time!

**Tags:** genome, assembly, nanopore, illumina
> **Comments:**
> **username_1**: In bacteria *de novo* assemblies are the norm because they shift their genomes about a lot (which @Laura will know). A reference genome would be easy - even `Spades` would do this and that is likely a long way from the optimal approach. First question, which genome? Secondly, this is an impressive data set - long read, short read why not simply use advanced gap closing algorithms and the latest *de novo* assemblers?  
> **username_2**: Can you please explain *how* you built this genome in the first place? That will help to avoid answers that duplicate things you've already tried.  
> **username_0**: @M__ Thank you! Edited the question with more details, including workflow. I've used de novo assembly (never used reference-guided assembly before). But I can't help but wonder whether I can close some of the gaps still remaining by considering the NCBI genomes as well. Perhaps not - I imagine the gaps are characterized by repetitive sequences that would break any assembly...but maybe? One of the NCBI genomes is the same strain from the same culture collection that I used, so I thought there's a chance that rearrangements would not have happened. I'm not sure if this is a good idea.  
> **username_1**: @Laura I will put an answer together this week. Mine is old technology in this area for this technique. However, I personally don't think any reference genome approach will be an improvement, I think it will result in alternative gaps. I'll highlight an alternative modern *de novo* approach as well.  
> **username_3**: What is your input data? Is it isolate or metagenome? On one hand, you mentioned MAG (metagenome-assembled genome) and vamb. On the other hand, you are running Unicycler – I thought Unicycler wouldn't work well with metagenome samples? Also, how "old" is your Nanopore data? Flye/Canu can handle >10% error rate. If you have FAST5 files for the Nanopore data, redo base calling with the latest basecaller. This might dramatically improve the base accuracy. Your assembly seems to have much higher quality than the NCBI one. I would ignore the NCBI assembly.  
> **username_0**: @user172818 Isolate or metagenome - both? Low-diversity metagenome. For my field of work (cyanobacteria), the vast majority of isolates are not axenic. (in this case, the metagenome had 3 MAGs). I know Unicycler isn't technically recommended for those, but I wasn't sure what else to use that could handle older long-read data (~2018) as well as incorporate Illumina reads (which I don't think Flye/Canu do). No fast5 files anymore, only fastq. I'm probably missing something obvious, because I still have a lot of gaps in my knowledge. This is why I ask ; )  
> **username_4**: many metagenome assemblers can handle this kind of thing (old NP + ILMN), for example, [hybridspades](https://academic.oup.com/bioinformatics/article/32/7/1009/1743807), [OPERA-MS](https://pubmed.ncbi.nlm.nih.gov/31359005/), probably others  

---

## 2 answers

### Answer by username_4 on 2023-01-10. Score: 2 | Accepted answer

If your goal is to compare to the NCBI version I'd suggest using [QUAST](https://github.com/ablab/quast) to compare the two assemblies, supplying the NCBI assembly as the reference genome (`-r` option I think). This will not guarantee anything, but you would expect the two assemblies to be fairly syntenic and to have good overlap of sequences. The tool includes visualization, but you could also use an approach like [circoletto](https://academic.oup.com/bioinformatics/article-abstract/26/20/2620/194655) or [dot plots](http://blog.dnanexus.com/2018-01-11-dot-an-interactive-dot-plot-viewer-for-comparative-genomics#) for something a little more intuitive/simpler.

I'd expect your genome to be quite a bit higher quality even as a metagenome-derived assembly due to nanopore contiguity, I'm not sure that using the NCBI reference to improve yours is a great idea. I'd instead suggest following @M\_\_'s suggestion to scaffold with your nanopore reads (you will have to map them onto your full metagenome first, though approach may differ based on what the scaffolder wants). I'm not up on the current methods here but [here](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-021-04451-7) is a recent tool. If you have 10 pieces I'd expect to be able to close at least some of that using nanopore (even old).

If you do choose to use the reference to improve, the tool that people seem to be using now is [RagTag](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-022-02823-7).

> **Comments:**
> **username_0**: I've tried a couple of things that were suggested: in the end, LongStitch, which you've linked to, proved the best option, and it looks like it got the main genome to 3-4 pieces with some potential plasmids on the side (will have to check). Thank you!  
> **username_4**: @Laura great to know, glad that this seems to have been helpful!  

---

### Answer by username_1 on 2023-01-14. Score: 2

**Summary**
What I am saying in this post is there approximates to 3 "generations" of *in silico* gap-closers/polishes:

1. GapFiller - amongst other "early" generations (2012);
2. medaka/racon/Nanopolish/Pilon (2014 - 2018 inclusively)
3. Nextpolish/PEPPER/Apollo/Homopolish/NeuralPolish (2020 onwards).

The trendy approach is combining 2. and 3. I can't guarantee it will work for cyanobacteria gap-closing, but the shear volume of algorithms dedicated to this purpose, infers they must be delivering results.

**Background**
Whats the issue with a reference genome? The key thing about *many* bacteria is their ability to "dump" genes and then regain them via plasmid associated recombination. This can occur extensively within a single species. This makes reference associated assembly essentially impossible in many bacteria - *particularly against the official NCBI reference genome*. Hence, the official *NCBI reference gene*, is not like a human genome reference - which is a gold standard. With due to respect to those who have dedicated time to presenting the *official bacterial reference genomes* are not very useful.

This BioStars post [here](https://www.biostars.org/p/462167/) demonstrates that even *Mycobacteria tuberculosis* would not assemble via a reference genome and TB in context is one of the most conserved genomes in bacteria, the SNP behaviour is famously limited.

If attempting a reference genome it is worth considering the following:

1. Any amount of genetic divergence can result *genetic island* phenomena and non-contiguous genomes that will make assembly difficult, therefore a complete genome as close to the target genome as possible is a good reference.

* For example, simply Blasting sections of you genome to look for a consistent reference that is close to yours. A custom database of complete genomes for your species my be useful, but just sending bits of your target onto the NCBI website will be useful. The idea is to get lots of bits of the genome matching the closest strain.

2. QUAST was going to be my suggestion too.
3. Mapping via e.g. [Mummer4](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5802927/) against the reference genome as the "scaffold".

**Key question:**

> The same strain also has 1-2 very fragmented genomes (100s of pieces) available in NCBI at scaffold level. The reads themselves are not available, so I can't just add them to the assembly.

I'm not sure what "not available" means.

**Key suggestion: Polishing**
The other approach are recent *de novo* assemblers and *in silico* "polishing". What I'm recommending is to first try "polishing". This doesn't exclude subsequent reference genome assemblies - *not at all* - but it's a way to improve the *de novo* assemblies and if there are still issues then consider a reference genome.

Firstly I would read someone who is *really* up to date, e.g.

> [Comparative evaluation of Nanopore polishing tools for microbial genome assembly and polishing strategies for downstream analysis](https://www.nature.com/articles/s41598-021-00178-w)

They are [medaka](https://github.com/nanoporetech/medaka) fans and are using this as part of a combination approach. medaka was part of the established stable of "polishers"

* [GapFiller](https://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-13-S14-S8) - I don't think this is useful.
* [racon](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5411768/) is specifically for long reads
* Nanopolish [here](https://www.nature.com/articles/nmeth.3444)

The authors prefer medaka then goes on to describe

> [Nextpolish](https://academic.oup.com/bioinformatics/article/36/7/2253/5645175), [PEPPER](https://www.nature.com/articles/s41592-021-01299-w), Apollo, Homopolish, and NeuralPolish

Much more recent from 2020 ... thats a lot of polishing tools. Note, PEPPER and Apollo are often used for algorithms names - make sure its 2020 onwards, with PEPPER being 2021. They suggest medaka x PEPPER.

I really think this combination polishing approach with an established (medaka) and one the very latest polishing algorithms, such as PEPPER (2021) is really worth trying. If it doesn't work for the specific purpose it will certainly improve the contig quality. However, given the shear volume of work dedicated to this area then there has to be good reason.

By the same token that

> Money doesnt give happiness, but sure gives a better standard of misery.

Then ...

> Polishing might not give gap closure, but sure gives a better standard of quality to the same old bunch of miserable contigs

---

***de novo* Assembly**
Maybe [Miniasm](https://academic.oup.com/bioinformatics/article/32/14/2103/1742895)? I'd look at "polishing" the *de novo* assembly you have.

RagTag as a SPAdes alternative is interesting @MaximilianPress

> **Comments:**
> **username_0**: I'm not convinced long-read polishing is as useful for hybrid data, but I've given medaka and pilon (short-read polishing) a try. It didn't work in this particular case (at best moved some indels around, at worst it made more), but that's more because I've only tested things on my absolutely worst sample. Either way, it didn't work in this case, but now I know about these tools, so I wanted to say thank you!  
> **username_1**: @Laura one day the algorithms will catch up with the problem, they always do, but clearly not today. So, I'm really sorry it's not worked. Keep in mind the 2020+ tools. From a distance its seems an exciting future, where all *de novo* assemblies would be resolved via combination gap-filling and polishing. I was too optimistic ... for now. That means complex mapping - and a lot of work, via QUAST, Mummer and Daniel Standage's recommendations (his suggests looked cool).  

---

