[khmer] ktable.get fails for 'long' arguments
Jordan Fish
jrdn.fish at gmail.com
Mon Jun 24 18:33:20 PDT 2013
Should be able to pull from bleeding-edge to get a fix for this.
Note you can also just pass the string directly to ktable.get, ie:
ktable.get('AAAA')
On Mon, Jun 24, 2013 at 8:11 PM, Lester Mackey <lmackey at stanford.edu> wrote:
> 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
>
> _______________________________________________
> khmer mailing list
> khmer at lists.idyll.org
> http://lists.idyll.org/listinfo/khmer
>
More information about the khmer
mailing list