run_all_consensus_partition_methods {cola} | R Documentation |
Consensus partition for all combinations of methods
run_all_consensus_partition_methods(data, top_value_method = all_top_value_methods(), partition_method = all_partition_methods(), max_k = 6, top_n = seq(min(1000, round(nrow(data)*0.1)), min(5000, round(nrow(data)*0.5)), length.out = 5), mc.cores = 1, anno = NULL, anno_col = NULL, p_sampling = 0.8, partition_repeat = 50, scale_rows = NULL, verbose = TRUE)
data |
a numeric matrix where subgroups are found by columns. |
top_value_method |
method which are used to extract top n rows. Allowed methods are in |
partition_method |
method which are used to do partition on samples. Allowed methods are in |
max_k |
maximal number of partitions to try. The function will try |
top_n |
number of rows with top values. The value can be a vector with length > 1. When n > 5000, the function only randomly sample 5000 rows from top n rows. If |
mc.cores |
number of cores to use. |
anno |
a data frame with known annotation of columns. |
anno_col |
a list of colors (color is defined as a named vector) for the annotations. If |
p_sampling |
proportion of the top n rows to sample. |
partition_repeat |
number of repeats for the random sampling. |
scale_rows |
whether to scale rows. If it is |
verbose |
whether print messages. |
The function runs consensus partitions by consensus_partition
for all combinations of top-value methods and parittion methods.
It also adjsuts the class IDs for all methods and for all k to make them as consistent as possible.
A ConsensusPartitionList-class
object. Simply type object in the interactive R session
to see which functions can be applied on it.
Zuguang Gu <z.gu@dkfz.de>
## Not run: set.seed(123) m = cbind(rbind(matrix(rnorm(20*20, mean = 1), nr = 20), matrix(rnorm(20*20, mean = -1), nr = 20)), rbind(matrix(rnorm(20*20, mean = -1), nr = 20), matrix(rnorm(20*20, mean = 1), nr = 20)) ) + matrix(rnorm(40*40), nr = 40) rl = run_all_consensus_partition_methods(data = m, top_n = c(20, 30, 40)) ## End(Not run) data(cola_rl) cola_rl