Cluter merging with size restrictions
This function merges clusters by correlation of the first principal components such that the resulting merged clusters do not exceed a given maximum size.
sizeRestrictedClusterMerge( datExpr, clusters, clusterSizes = NULL, centers = NULL, maxSize, networkType = "unsigned", verbose = 0, indent = 0)
datExpr |
Data on which the clustering is based (e.g., expression data). Variables are in columns and observations (samples) in rows. |
clusters |
A vector with element per variable (column) in |
clusterSizes |
Optional pre-calculated cluster sizes. If not given, will be determined from given |
centers |
Optional pre-calculaed cluster centers (first principal components/singular vectors). If not given, will be calculated from given data and cluster assignments. |
maxSize |
Maximum allowed size of merged clusters. If any of the given |
networkType |
One of |
verbose |
integer level of verbosity. Zero means silent, higher values make the output progressively more and more verbose. |
indent |
indentation for diagnostic messages. Zero means no indentation, each unit adds two spaces. |
The function iteratively merges two closest clusters subject to the constraint that the merged cluster size cannot exceed maxSize. Merging stops when no two clusters can be merged without exceeding the maximum size.
A list with two components
clusters |
A numeric vector with one component per input gene, giving the cluster number in which the gene is assigned. |
centers |
Cluster centers, that is their first principal components/singular vectors. |
Peter Langfelder
The last step in projectiveKMeans
uses this function.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.