Hi all, I wanted to ask if there’s a possibility t...
# genomeassembler
y
Hi all, I wanted to ask if there’s a possibility to incorporate quickmerge (https://github.com/mahulchak/quickmerge) at the end of the pipeline. This would allow us to generate a consensus assembly by merging the outputs from both Flye and Hifiasm assemblies. The quickmerge command is straightforward—it only requires a simple script and the nucmer tool. Typically, it’s executed as follows:
quickmerge -d hifiasm_assembly.fasta -q flye_assembly.fasta -hco 5.0 -c 1.5 -l 500000 -ml 10000 > merged_assembly.fasta
From my experience, incorporating quickmerge significantly enhances the quality and utility of the final assembly. If everyone agrees, I can first implement this locally and submit a pull request afterward. However, for quickmerge integration to be effective, the genome assembly pipeline must produce two separate assemblies—one from Flye and one from Hifiasm (++ and perhaps it may need additional step for purging/polishing to avoid potential artifacts from both sources). @Niklas Schandry, you might want to briefly explore this approach first, and we can discuss further if you want. Let me know your thoughts!
m
If I'm not wrong the
flye_on_hifiasm
assembler option is pretty close to this (scaffolding to hifiasm asm) - I haven't used this strategy before, but I have used
quickmerge
for ont-flye/hifi-hifiasm and found it surprisingly good
n
Adding quickmerge sounds like a good idea to me
So I looked into this a bit, and it is not really clear to me how / if this is different from
flye_on_hifiasm
; as far as I understand the results should be similar, it seems that ragtag and quickmerge should do the same thing? I am not against adding things, but I wonder if it would be a meaningful improvement
But it might be a good idea to actually complement the ragtag scaffold that is done with ragtag patch to get rid of gaps
m
I'm not familiar with the approach of using
ragtag scaffold
for a hybrid assembly, but does it perform well at bridging gaps between contigs (i.e., merging)? I figured it is more specialised to scaffold a fragmented assembly onto a chromosome scale reference... I guess the argument for
quickmerge
is that it is designed to merge assemblies in a hybrid approach, and although it was originally for illumina/long-read hybrids, it does seem to be used fairly often for ont/hifi hifi/hifi hybrids (e.g, https://www.nature.com/articles/s41588-024-01715-9 https://www.nature.com/articles/s41467-024-48643-0) Not introducing NNNNNNs is also an advantage I suppose I've only ever used
quickmerge
for a hybrid that was already basically T2T, so can't speak for its performance on more fragmented assemblies!
n
Yeah looking into it again, I think ragtag scaffold is not the correct strategy, and ragtag patch would do what quickmerge does
I am also generally fine with having both, and leaving this up to the user
I will replace ragtag scaffold with patch for the merging of ONT and HiFi, I think for reference scaffolding scaffold is probably still the better approach
m
aye ragtag would definitely be my go-to method for reference scaffolding, v useful to have
👍 1
y
The main idea is to first generate draft assemblies using different strategies and methods, and then combine these into a single simplified, overlapping, consensus assembly. It might be beneficial to perform patching before scaffolding, particularly for both ONT- and HiFi-based assemblies. RagTag scaffolding can then be applied afterward..
n
yeah thats the idea behind
flye_on_hifiasm
(probably not very well executed)
y
I’ve used Flye multiple times on both ONT and HiFi reads, and frankly, it often produces false-positive inversions at the end of chromosomes. This is likely due to its limited capability in accurately identifying repetitive regions, resulting in incorrect orientation of contigs. Therefore, I’m somewhat hesitant about relying solely on Flye assemblies.. it's completely up to you, this comment is from my experiences only..
n
The idea is: as far as i am aware, flye is generally considered to be the go-to assembler for ONT, while hifiasm if the one for hifi, so it would be patching a flye assembly with the hifi assembly, assuming that hifiasm is better at resolving repeats while ONT generally gives longer reads? The pipeline supports flye with either ONT or HiFi; hifiasm with ONT, or hifi or both or the consensus strategy? I am a bit confused regarding your comment of relying solely on flye assemblies
y
oh okay, sorry for any confusion caused by my previous comment. my intention was to emphasize that relying solely on Flye assemblies as the single or definitive source might lead to inaccuracies. i strongly recommend complementing Flye assemblies with additional steps, such as patching, merging, or other integrative methods, to ensure the quality and accuracy of the final assembly. However, as the pipeline apparently already incorporates other combinations alongside Flye, it should be fine.
m
The other thing to consider is the new
hifiasm --ont
mode 👀 - was testing it today and am getting 10 fold higher N50s versus flye-ont with R10.4.1 reads. It's still labelled as beta tho, so probably leave it to mature a bit...
n
Is that different from what is currently in there as
ont_hifiasm
? https://github.com/nf-core/genomeassembler/blob/master/conf/modules.config#L166
m
oops didn't clock that
n
Hifiasm can do three things: HiFi, ONT, and both (--ul)