Question: SPAdes assembler k-mer > default 127 possible?
gravatar for Anand Rao
3.3 years ago by
Anand Rao330
United States
Anand Rao330 wrote:

This is cross-posted with Increasing kmer limit in SPAdes, but because I may never receive a reply from that post, which is > 1 year old, I am re-posting afresh.

Based on assembly stats comparison at choice of k-mer size for metagenomic assembly, between k-mer=20 Vs higher values, I seek answers to these questions:

1.. Is increase of k-mer > 127 possible with SPAdes?

2.. Is it NECESSARY to check k-mer values > 127 for SPAdes? [Read length trimming, prior to SPAdes assembly, yielded trimmed length distribution of - 41- 150bp]

I've got 2*150bp (PE data) for fungal spores (haploid genome) where I want to play with higher k-mer values to assess any improvement in assembly contiguity and completeness. So sharing your experience would help me. Thank you!

genome assembly spades k-mer • 2.0k views
ADD COMMENTlink modified 2.5 years ago by ikangkim40 • written 3.3 years ago by Anand Rao330
gravatar for Brian Bushnell
3.3 years ago by
Walnut Creek, USA
Brian Bushnell17k wrote:

With 150bp reads, it is very unlikely that you will benefit from K>127, which is convenient because you can't do that with Spades. You can extend reads by merging them or with Tadpole, though, which will often improve the assembly. If you download BBMap, there is a suggested procedure for this process in bbmap/pipelines/

Incidentally, Tadpole supports arbitrarily long values of K, but Spades will still generally give a substantially more contiguous assembly.

ADD COMMENTlink written 3.3 years ago by Brian Bushnell17k

OK, good to know k>127 is not possible with SPAdes.

This is possibly premature question, I've gotta first read your

suggested procedure for this process in bbmap/pipelines/ :)

But is your recommendation to extend reads using Tadpole, and THEN using SPAdes on these results?

I'll take a look at BBTools 37.5, after the admins of my univ. HPCC install it. I am assuming this merge you talk of does not use, or else you might have suggested that instead....

ADD REPLYlink written 3.3 years ago by Anand Rao330

No, the the assembler options are just there to give the usage syntax because I tend to forget it; you only need to use one of them. The choice of assembler kind of depends on the dataset.

As for BBMerge, yes, I am talking about that when I say "merge" :)

ADD REPLYlink written 3.3 years ago by Brian Bushnell17k
gravatar for ikangkim
2.5 years ago by
ikangkim40 wrote:

The above page may be helpful for you. I tried with SPAdes 3.11.1 and succeeded.

In brief,

(1) To use k-mer > 127, you have to download and compile source code.

(2) Edit "" file as below and run the script.

cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$PREFIX" -DSPADES_MAX_K=251 $* "$BASEDIR/src"

(3) After compile, edit "" file in /SPAdes-3.xx.x/share/spades/spades_pipeline as below. (maybe around line 40 in the section #other constants)

MAX_K = 251

(Note that 251 was just my preference.)

ADD COMMENTlink written 2.5 years ago by ikangkim40
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1206 users visited in the last hour