This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Low mapping in Metagenome assembly

Hi everyone,

I am working with soil metagenomic samples, and I am seeing a consistent problem: my MEGAHIT assemblies give <20% read mapping back to the assembly.

This is the command I am using:

megahit \
  -1 ${read1} \
  -2 ${read2} \
  --presets meta-large \
  --min-contig-len 1000 \
  -t ${task.cpus} \
  -o megahit_out

A few details:

These are soil samples I have also used the same MEGAHIT command on epiphyte and low-biomass metagenomes, and in those cases the results were much better Here, however, the assemblies consistently recruit less than 20% of the reads I have ~3 TB of sequencing data, so a full co-assembly is not feasible

I understand soil communities are much more complex and diverse, so I am wondering whether this low mapping is mainly due to:

very high community complexity / strain heterogeneity, insufficient depth per sample, assembly settings that are not optimal for soil, preprocessing issues, or the --min-contig-len 1000 cutoff removing too much assembled sequence.

My questions are:

  1. Is <20% mapping back to assembly still expected/normal for complex soil metagenomes, or is it a sign that something is wrong?
  2. Would you recommend changing MEGAHIT parameters for soil datasets, for example trying: different k-mer settings, no preset / different preset, lower --min-contig-len, more aggressive error correction / read filtering?
  3. Since I cannot do a full co-assembly, would it make sense to do: sample-wise assembly only, clustered co-assemblies (by treatment/site/timepoint), or some type of digital normalization/subsampling?
  4. Are there specific diagnostics I should check first, such as: fraction of duplicate reads, host/plant contamination, read quality after trimming, complexity estimates, short contig fraction, N50/assembly size compared with expected community complexity?

these are my assembly stats - My N50 is around 1300 bp on average.

If anyone has worked on soil metagenomes with MEGAHIT and has suggestions for improving assembly recovery or interpreting low mapping rates, I would really appreciate your advice.

Thanks in advance.

microbiome assembly alignment metagenomics

I'd be interest to know if you have tried mapping against a published set of assembed contigs from long read data from a "similar" environment. That's probably not what you want to do for discovery of new taxa, but does it help the mapping rate at all ?

2 answers

I have been in this exact situation before: 30 metagenomic samples from forest soil, about 100 million PE reads per sample, mapping rates between 10–30%, and a low N50 of 2–3 kb. As Mensur suggested, sometimes with certain kinds of samples, "it is what it is".

What helped me a little bit was switching from megahit to metaspades using its default parameters. I got "better" N50, and with comebin I managed to get from 5 to 20 MAGs per sample.

or the --min-contig-len 1000 cutoff removing too much assembled sequence.

This is the most likely answer, given an extremely low N50 value. You seem to have a very fragmented assembly with a large number of tiny contigs. I don't think that's going to generate any meaningful insights. If you want to convince yourself that this is the reason, simply repeat the assembly without --min-contig-len 1000 and you will most likely get a higher percent of mapped reads. Not that it will make a difference in the end, because those small contigs will not bin well.

Don't think there is anything wrong with your command line, and can't think of anything you can do to fix this. Maybe doing error correction before the assembly will help, or try SPAdes which does error correction automatically. If you have very high sequencing depth, doing digital subsampling down to 100-200x might help.

Log in to answer this question.