fingerprint-class {fingerprint} | R Documentation |
This class represents binary fingerprints, usually generated by a variety of cheminformatics software, but not restricted to such
Objects can be created by calls of the form new("fingerprint", ...)
.
Fingerprints can traditionally thought of as a vector of 1's and
0's. However for large fingerprints this is inefficient and
instead we simply store the positions of the bits that are
on. Certain operations also need to know the length of the
original bit string and this length is stored in the object at
construction. Even though we store extra information along with
the bit positions, conceptually we still consider the objects as
simple bit strings. Thus the usual bitwise logical operations
(&, |, !, xor) can be applied to objects of this class.
bits
:"numeric"
~~ A vector
indicating the bit positions that are on. nbit
:"numeric"
~~ Indicates the length of the original bit string.folded
:"logical"
~~ Indicates
whether the fingerprint has been folded.provider
:"character"
~~
Indicates the source of the fingerprint. Can be useful to keep
track of what software generated the fingerprint.name
:"character"
~~
The name associated with the fingerprint. If not name is available
this gets set to an empty stringsignature(fp1 = "fingerprint", fp2 = "fingerprint", method = "missing")
: ... signature(fp1 = "fingerprint", fp2 = "fingerprint", method = "character")
: ... signature(fp = "fingerprint")
: ... signature(fp = "fingerprint")
: ... signature(nbit = "numeric", on = "numeric")
: ... Rajarshi Guha rguha@indiana.edu
fp.read
, fp.read.to.matrix
fp.sim.matrix
, fp.to.matrix
,
fp.factor.matrix
random.fingerprint
## make fingerprints x <- new("fingerprint", nbit=128, bits=sample(1:128, 100)) y <- x distance(x,y) # should be 1 x <- new("fingerprint", nbit=128, bits=sample(1:128, 100)) distance(x,y) folded <- fold(x) ## binary operations on fingerprints x <- new("fingerprint", nbit=8, bits=c(1,2,3,6,8)) y <- new("fingerprint", nbit=8, bits=c(1,2,4,5,7,8)) x & y x | y !x