This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MEGAHIT assembly k-mer exceeds read length – is the result still reliable?

Hi all,

I’m using MEGAHIT to assemble metagenomic data and encountered a question about the assembly parameters: My raw reads are 100 bp in length. Using MEGAHIT’s default multi-k iterative strategy, the final contigs include a maximum k-mer of 119 bp. As I understand it, when k > read length, MEGAHIT extends the graph using contigs from previous iterations rather than relying on direct read overlap.

My questions are: Are contigs generated with k > read length still reliable for downstream analyses

What potential pitfalls or artifacts should I be aware of in this scenario?

Thanks in advance for any advice or experiences you can share!

megahit assembly

I hope this helps but I think it would help for you to read the megahit manuscript and the github wiki

MEGAHIT uses multiple k-mer sizes to iteratively improve the de Bruijn graph. In your case, the 119bp max k-mer size being the largest k-mer size to be used if MEGAHIT finds that increasing the k-mer size continues to improve the graph. Your minimum k-mer size will likely be much lower than your read length and the max k-mer length acts on the assembly graph not the actual reads.

Thank you for your detailed explanation and for pointing me to the MEGAHIT manuscript and the GitHub wiki. I did go through both carefully, but I have to admit that as a beginner I still find some of the concepts a bit difficult to grasp. Could you help me confirm whether my understanding is correct? It seems that in its default mode, MEGAHIT already picks reasonable parameters and handles assembly quite well by itself. I've come across many tutorials suggesting that the k-mer size should be kept smaller than the longest read, yet MEGAHIT's default behavior appears to automatically choose a maximum k-mer that can be larger than the read length, based on the read length. I'm curious whether this default strategy has deliberate benefits — for instance, could applying a larger maximum k-mer at the graph level be better suited for extending assemblies and generating longer contigs?

I would really appreciate your confirmation or any further clarification.

0 answers

No answers yet.

Log in to answer this question.