Question: GATB - Bloom filter for k-mers
0
gravatar for karel.brinda
2.2 years ago by
France
karel.brinda0 wrote:

Hello,

I would like to use the GATB library for creating a Bloom filter for k-mers. Please, could you have a look on this code and recommend me what should I correct?
http://pastebin.com/8vgiTTjx

I am currently getting this error:
http://pastebin.com/MFWyWamx

Thanks!

gatb • 643 views
ADD COMMENTlink modified 2.2 years ago • written 2.2 years ago by karel.brinda0
1
gravatar for edrezen
2.2 years ago by
edrezen670
France
edrezen670 wrote:

Hello,

The issue is indeed on line 19 when you try to insert an item in the Bloom filter.

Actually, the 'kmer' object (of class ModelDirect::Kmer) is not of type Type (which is only the numerical value of the kmer); it holds several methods, including an accessor value() to the actual numerical value of the kmer.

So, the correction of your code should be:

bloom->insert (kmer.value());

Can you tell me if it works ?

 

ADD COMMENTlink written 2.2 years ago by edrezen670
0
gravatar for karel.brinda
2.2 years ago by
France
karel.brinda0 wrote:

Great, it works. Thank you!!! Btw. it seems that the method contains for Bloom is not const. Is there any reason for it?

ADD COMMENTlink written 2.2 years ago by karel.brinda0

You are welcome.

Thank you for your remark; actually there is no special reason why it is not const, and it wouldn't hurt to turn it const (maybe in a next release)

ADD REPLYlink written 2.2 years ago by edrezen670
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 791 users visited in the last hour