RDKitMinimalLib.jl icon indicating copy to clipboard operation
RDKitMinimalLib.jl copied to clipboard

get_fp() as bits instead of bit string

Open timoleistner opened this issue 1 year ago • 0 comments

The get_rdkit_fp and get_morgan_fp functions both return a bit string instead of a BitVector which I would expect from a fingerprint of that kind.

which can be easily solved with the following:

fingerprint = parse.(Bool, collect(get_morgan_fp(mol)))
fingerprints = [parse.(Bool, x) for x in collect.(get_morgan_fp.(mols))]

Nevertheless I think it would be better to directly return a BitVector from the get_fp() functions for use in subsequent machine learning methods.

Edit: There is also get_rdkit_fp_as_bytes() which does in fact not return a vector of bytes but a vector of UInt8's. But this is a bit simpler to fix: reinterpret(Bool, get_rdkit_fp_as_bytes(mol))

timoleistner avatar Nov 17 '23 11:11 timoleistner