[khmer] counting 31-mers with khmer

C. Titus Brown ctb at msu.edu
Thu Jun 20 06:27:18 PDT 2013


On Thu, Jun 20, 2013 at 08:31:52AM -0400, Rajat wrote:
> Hi Prof ,
> I tried to follow the example at
> http://khmer.readthedocs.org/en/latest/ktable.html to extract kmers using
> khmer. It works fine for small values of k (<=15) but exits without any
> output as soon as I make k>=16. In
> http://khmer.readthedocs.org/en/latest/ktable.html they mention that it
> does not work for k>12 on their machines. However, it is mentioned in
> http://khmer.readthedocs.org/en/latest/introduction.html that khmer can
> count kmers for k<=32. Could you point me to some examples that I can
> follow to count 31 mers with khmer?

Hi Rajat,

please see this recent thread on the khmer mailing list:

http://lists.idyll.org/pipermail/khmer/2013-June/thread.html#start

Briefly, ktable does the "dumb thing" and allocates 4**k bytes of memory,
which only works up to ~k=15 on many computers.  The counting hash data
structure will count for much larger k.

You can also take a look at this IPython Notebook:

http://nbviewer.ipython.org/urls/raw.github.com/ngs-docs/ngs-notebooks/master/ngs-5x-kmer-abundance-distributions-2013.ipynb

for information on getting k-mer abundance distributions.

best,
--titus
-- 
C. Titus Brown, ctb at msu.edu




More information about the khmer mailing list