[khmer] ktable.get fails for 'long' arguments

Lester Mackey lmackey at stanford.edu
Mon Jun 24 17:11:38 PDT 2013


Dear khmer list,

I've discovered that ktable.get returns the correct kmer count when its
argument is an integer but not when its argument is a long.  This is
somewhat unintuitive, as ktable.forward_hash returns longs.  Here's a brief
example

>>> import khmer
>>> ktable = khmer.new_ktable(4);
>>> ktable.count('AAAA')
>>> ktable.count('AAAA')
1
>>> ktable.get(0)
1
>>> ktable.get(0L)
0
>>> ktable.forward_hash('AAAA')
0L
>>> ktable.get(ktable.forward_hash('AAAA'))
0
>>> ktable.get(int(ktable.forward_hash('AAAA')))
1

Yours,
Lester
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/khmer/attachments/20130624/901dfb20/attachment-0002.htm>


More information about the khmer mailing list