FPset-class {ChemmineR} | R Documentation

## Class `"FPset"`

### Description

Container for storing fingerprints of many compounds. This container is used for structure similarity searching of compounds.

### Objects from the Class

Objects can be created by calls of the form `new("FPset", ...)`.

### Slots

`fpma`:

  Object of class `"matrix"` with compound identifiers stored in row names

`foldCount`:

  Object of class `"numeric"`

`type`:

  Object of class `"character"`

### Methods

[

  `signature(x = "FPset")`: subsetting of class with bracket operator

[[

  `signature(x = "FPset")`: returns single component as `FP` object

[<-

  `signature(x = "FPset")`: replacement method for several components

as.character

  `signature(x = "FPset")`: returns content as named character vector

as.matrix

  `signature(x = "FPset")`: returns content as numeric matrix

c

  `signature(x = "FPset")`: concatenates any number of `FPset` containers

cid

  `signature(x = "FPset")`: returns all compound identifiers from row names

cid<-

  `signature(x = "FPset")`: replacement method for compound identifiers

coerce

  `signature(from = "FPset", to = "FP")`: `as(fpset, "FP")`

coerce

  `signature(from = "matrix", to = "FPset")`: `as(fpma, "FPset")`

coerce

  `signature(from = "character", to = "FPset")`: `as(fpchar, "FPset")`

length

  `signature(x = "FPset")`: returns number of entries stored in object

show

  `signature(object = "FPset")`: prints summary of `FPset`

view

  `signature(x = "FPset")`: prints extended summary of `FPset`

fold

  `signature(x = "FPset")`: fold fingerprint in half

foldCount

  `signature(x = "FPset")`: number of times this object has been folded

fptype

  `signature(x = "FPset")`: the type of these fingerprints

numBits

  `signature(x = "FPset")`: the number of bits in these fingerprints

### Author(s)

Thomas Girke

### References

Chen X and Reynolds CH (2002). "Performance of similarity measures in 2D fragment-based similarity searching: comparison of structural descriptors and similarity coefficients", in J Chem Inf Comput Sci.

### See Also

Related classes: SDF, SDFset, SDFstr, AP, APset, FP.

### Examples

    showClass("FPset")

    ## Instance of FPset class
    data(apset)
    (fpset <- desc2fp(apset))
    view(fpset)

    ## Class usage
    fpset[1:4] # behaves like a list
    fpset[[1]] # returns FP object
    length(fpset) # number of compounds
    cid(fpset) # returns compound ids
    fpset[1] <- 0 # replacement
    cid(fpset) <- 1:length(fpset) # replaces compound ids
    c(fpset[1:4], fpset[11:14]) # concatenation

    ## Coerce FPset from/to other objects
    fpma <- as.matrix(fpset) # coerces to matrix
    fpchar <- as.character(fpset) # coerces to character strings
    as(fpma, "FPset")
    as(fpchar, "FPset")

    ## Compound similarity searching with FPset
    fpSim(x=fpset[1], y=fpset, method="Tanimoto", cutoff=0.4, top=4)

[Package ChemmineR version 3.46.0 Index]