ClusterCount: ClusterCount

Description Usage Arguments Examples

View source: R/ClusterCount.R

Description

Counts the number of clusters at a specfied height on a dendrogram generated from an ECFP distance matrix

Usage

1
ClusterCount(compounds, cpd.identifier, height = 0.8)

Arguments

compounds

data table of compounds from a specific plate

cpd.identifier

character string identifying compounds: Broad ID, InChIKey, etc...

height

numeric value to cut dendrogram defaults to 0.8

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
hashes <- round(rnorm(50, 100000000, 1000), 1)

compounds <- data.table('ECFP_4[1]' = sample(hashes, 100, replace=TRUE),
                        'ECFP_4[2]' = sample(hashes, 100, replace=TRUE),
                        'ECFP_4[3]' = sample(hashes, 100, replace=TRUE),
                        'ECFP_4[4]' = sample(hashes, 100, replace=TRUE),
                        'ECFP_4[5]' = sample(hashes, 100, replace=TRUE))

compounds$InChIKey <- sapply(1:dim(compounds)[1], function(x)
                             paste(sample(LETTERS, 10, replace=TRUE), collapse=''))

ClusterCount(compounds, 'InChIKey')

BenjaminChittick/Plate-Based-Diversity documentation built on May 5, 2019, 2:41 p.m.