PageRenderTime 330ms CodeModel.GetById 326ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/fingerprint/man/fingerprint.Rd

http://github.com/rajarshi/cdkr
Unknown | 80 lines | 75 code | 5 blank | 0 comment | 0 complexity | 49b6393f52ba81a7d27388712fa5311a MD5 | raw file
 1\name{fingerprint-class}
 2\docType{class}
 3\alias{fingerprint-class}
 4
 5\alias{euc.vector,fingerprint-method}
 6\alias{fold,fingerprint-method}
 7\alias{random.fingerprint,numeric,numeric-method}
 8
 9\title{Class "fingerpint"}
10\description{This class represents binary fingerprints, usually
11  generated by a variety of cheminformatics software, but not
12  restricted to such
13  }
14\section{Objects from the Class}{
15Objects can be created by calls of the form \code{new("fingerprint", ...)}.
16	Fingerprints can traditionally thought of as a vector of 1's and
17	0's. However for large fingerprints this is inefficient and
18	instead we simply store the positions of the bits that are
19	on. Certain operations also need to know the length of the
20	original bit string and this length is stored in the object at
21	construction. Even though we store extra information along with
22	the bit positions, conceptually we still consider the objects as
23	simple bit strings. Thus the usual bitwise logical operations
24	(&, |, !, xor) can be applied to objects of this class.
25}
26\section{Slots}{
27	 \describe{
28    \item{\code{bits}:}{Object of class \code{"numeric"} ~~ A vector
29      indicating the bit positions that are on. }
30    \item{\code{nbit}:}{Object of class \code{"numeric"} ~~ Indicates the length of the original bit string.}
31    \item{\code{folded}:}{Object of class \code{"logical"} ~~ Indicates
32      whether the fingerprint has been folded.}
33    \item{\code{provider}:}{Object of class \code{"character"} ~~
34      Indicates the source of the fingerprint. Can be useful to keep
35      track of what software generated the fingerprint.}
36    \item{\code{name}:}{Object of class \code{"character"} ~~
37      The name associated with the fingerprint. If not name is available
38    this gets set to an empty string}
39    \item{\code{misc}:}{Object of class \code{"list"} ~~
40    A holder for arbitrary items that may have been stored along with the fingerprint. Only
41    certain formats allow extra items to be stored with the fingerprint, so in many cases
42    this field is just an empty list}
43
44  }
45}
46\section{Methods}{
47  \describe{
48    \item{distance}{\code{signature(fp1 = "fingerprint", fp2 = "fingerprint", method = "missing", a = "missing", b = "missing")}: ... }
49    \item{distance}{\code{signature(fp1 = "fingerprint", fp2 = "fingerprint", method = "character", a = "missing", b = "missing")}: ... }
50    \item{euc.vector}{\code{signature(fp = "fingerprint")}: ... }
51    \item{fold}{\code{signature(fp = "fingerprint")}: ... }
52    \item{random.fingerprint}{\code{signature(nbit = "numeric", on = "numeric")}: ... }    
53	 }
54}
55\author{Rajarshi Guha \email{rajarshi.guha@gmail.com}}
56\seealso{
57  \code{\link{fp.read}}, \code{\link{fp.read.to.matrix}}
58  \code{\link{fp.sim.matrix}}, \code{\link{fp.to.matrix}},
59  \code{\link{fp.factor.matrix}}
60  \code{\link{random.fingerprint}}
61  }
62
63\examples{
64## make fingerprints
65x <- new("fingerprint", nbit=128, bits=sample(1:128, 100))
66y <- x
67distance(x,y) # should be 1
68x <- new("fingerprint", nbit=128, bits=sample(1:128, 100))
69distance(x,y)
70folded <- fold(x)
71
72## binary operations on fingerprints
73x <- new("fingerprint", nbit=8, bits=c(1,2,3,6,8))
74y <- new("fingerprint", nbit=8, bits=c(1,2,4,5,7,8))
75x & y
76x | y
77!x
78}
79\keyword{classes}
80\keyword{logic}