cluster.sizestat {ChemmineR}R Documentation

generate statistics on sizes of clusters

Description

'cluster.sizestat' is used to do simple statistics on sizes of clusters generated by 'cmp.cluster'. It will return a dataframe which maps a cluster size to the number of clusters with that size. It is often used along with 'cluster.visualize'.

Usage

cluster.sizestat(cls, cluster.result=1)

Arguments

cls The clustering result returned by 'cmp.cluster'
cluster.result If multiple cutoff values are used in clustering process, this argument tells which cutoff value is to be considered here.

Details

'cluster.sizestat' depends on the format that is returned by 'cmp.cluster' - it will treat the first column as the indecies, and the second column as the cluster sizes of effective clustering. Because of this, when multiple cutoffs are used when 'cmp.cluster' is called, 'cluster.sizestat' will only consider the clustering result of the first cutoff. If you want to work on an alternative cutoff, you have to manually reorder/remove columns.

Value

Returns a data frame of two columns.
cluster size This column lists cluster sizes
count This column lists number of clusters of a cluster size

Author(s)

Y. Eddie Cao

See Also

cmp.cluster, cluster.visualize

Examples

# load sample database from web
db <- cmp.parse("http://bioweb.ucr.edu/ChemMineV2/static/example_db.sdf")
# cluster it
clusters <- cmp.cluster(db, cutoff=0.65)
# statistics on sizes of clusters
sizestat <- cluster.sizestat(clusters)

[Package ChemmineR version 1.8.0 Index]