coClustering: Co-clustering measure of cluster preservation between two...

View source: R/coClustering.R

coClusteringR Documentation

Co-clustering measure of cluster preservation between two clusterings


The function calculates the co-clustering statistics for each module in the reference clustering.


coClustering(clusters.ref, clusters.test, tupletSize = 2, unassignedLabel = 0)



Reference input clustering. A vector in which each element gives the cluster label of an object.


Test input clustering. Must be a vector of the same size as cluster.ref.


Co-clutering tuplet size.


Optional specification of a clustering label that denotes unassigned objects. Objects with this label are excluded from the calculation.


Co-clustering of cluster q in the reference clustering and cluster q' in the test clustering measures the overlap of clusters q and q' by the number of tuplets that can be chosen from the overlap of clusters q and q' relative to the number of tuplets in cluster q. To arrive at a co-clustering measure for cluster q, we sum the co-clustering of q and q' over all clusters q' in the test clustering. A value close to 1 indicates high preservation of the reference cluster in the test clustering, while a value close to zero indicates a low preservation.


A vector in which each component corresponds to a cluster in the reference clustering. Entries give the co-clustering measure of cluster preservation.


Peter Langfelder


For example, see Langfelder P, Luo R, Oldham MC, Horvath S (2011) Is My Network Module Preserved and Reproducible? PLoS Comput Biol 7(1): e1001057. Co-clustering is discussed in the Methods Supplement (Supplementary text 1) of that article.

See Also

modulePreservation for a large suite of module preservation statistics coClustering.permutationTest for a permutation test for co-clustering significance


  # An example with random (unrelated) clusters:

  nModules = 10;
  nGenes = 1000;
  cl1 = sample(c(1:nModules), nGenes, replace = TRUE);
  cl2 = sample(c(1:nModules), nGenes, replace = TRUE);
  coClustering(cl1, cl2)

  # For the same reference and test clustering:

  coClustering(cl1, cl1)

WGCNA documentation built on May 29, 2024, 5:47 a.m.

Related to coClustering in WGCNA...