GATB - Bloom filter for k-mers
1
0
Entering edit mode
9.9 years ago

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 • 2.5k views
ADD COMMENT
1
Entering edit mode
9.9 years ago
edrezen ▴ 730

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 3088 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6