[khmer] Counting kmers and disabling reverse complement

Jordan Fish jrdn.fish at gmail.com
Thu Jun 20 16:22:01 PDT 2013


On Thu, Jun 20, 2013 at 4:40 PM, Lester Mackey <lmackey at stanford.edu> wrote:

> Thanks Titus,
>
>  > Does the counting hash have a built-in way to enumerate used hash table
>> > entries without having to iterate over every hash table entry?
>>
>> Err, no :).  Are you using ktable or counting hash?  If the latter then
>> you
>> absolutely need to keep an explicit list of query k-mers.
>>
>> > On a slightly related note, if I have 16GB of memory to work with, is it
>> > advisable to choose hash_size = min(4**k, 16e9)/4 and n_tables = 4 when
>> > calling new_counting_hash for k-mer counting?
>>
>> If I wanted to minimize the amount of memory used when k is small (i.e.,
> when 4**k bytes is much smaller than 16GB), would setting hash_size =
> 4**(k-1) and n_tables = 4 or
> hash_size = 4**k and n_tables = 1 be sufficient for a small false positive
> rate?
>

Those configurations should give you small error rates (4^k shouldn't have
any false positives at all...), but there aren't any hard and fast rules.
 However if you're really worried about false positives and are working
with small k values you really should just use the ktable class.



>
>
> Thanks,
> Lester
>
>>
>> >  > >
>> > > > > On Fri, Jun 14, 2013 at 3:22 AM, Lester Mackey <
>> lmackey at stanford.edu
>> > > >wrote:
>> > > > >
>> > > > >> Dear khmer Discussion List,
>> > > > >>
>> > > > >> If my goal is to obtain a vector of kmer counts quickly from a
>> FASTA
>> > > or
>> > > > >> FASTQ file, is there any reason to prefer ktable to one of your
>> other
>> > > data
>> > > > >> structures, like the counting hash table?
>> > > > >>
>> > > > >
>> > > > >> I've noticed that ktable hashes a kmer and its reverse
>> complement to
>> > > the
>> > > > >> same bin.  Is there an easy way to disable this feature (and
>> thereby
>> > > count
>> > > > >> each kmer and reverse complement separately)?
>> > > > >>
>> > > > >> Thanks,
>> > > > >> Lester
>> > > > >>
>> > > > >> _______________________________________________
>> > > > >> khmer mailing list
>> > > > >> khmer at lists.idyll.org
>> > > > >> http://lists.idyll.org/listinfo/khmer
>> > > > >>
>> > > > >>
>> > > > >
>> > >
>> > > > _______________________________________________
>> > > > khmer mailing list
>> > > > khmer at lists.idyll.org
>> > > > http://lists.idyll.org/listinfo/khmer
>> > >
>> > >
>> > > --
>> > > C. Titus Brown, ctb at msu.edu
>> > >
>>
>> --
>> C. Titus Brown, ctb at msu.edu
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/khmer/attachments/20130620/947b5241/attachment-0002.htm>


More information about the khmer mailing list