Skip to content

Larger k-mer sizes

The default maximum k-mer size for a source installation is 63. (The Bioconda package is built for 127.)

To set the maximum k-mer size capacity to some MAX_K, pass -DINSTANCE_COUNT=<instance_count> to cmake, where <instance_count> is the number of k values Cuttlefish should support:

instance_count = (MAX_K + 1) / 2

For example, to support a MAX_K of 127:

Terminal window
cmake -DINSTANCE_COUNT=64 ..

The division by two is because Cuttlefish supports only odd k values, for theoretical reasons — an even k admits a k-mer that is its own reverse complement, which breaks the canonical-vertex correspondence.

MAX_K is currently supported up to 255. Please contact the authors if you need support for a larger one.

There is none for smaller k. Cuttlefish uses only as many bytes as a k-mer actually requires, rounded up to a multiple of 8. Raising the maximum k-mer size capacity therefore does not affect performance at smaller k — it only adds template instantiations to the build.