Author: Zuguang Gu ( z.gu@dkfz.de )
Date: 2019-09-16
Package version: 1.0.1
Assume your matrix is stored in an object called mat
, to perform consensus partitioning,
you only need to run following code:
# code only for demonstration
mat = adjust_matrix(mat) # optional
rl = run_all_consensus_partition_methods(mat, mc.cores = ...)
cola_report(rl, output_dir = ..., mc.cores = ...)
In above code, there are three steps:
NA
s are removed. Rows with very low variance
are removed. NA
values are imputed if there are not too many in each row. Outliers are adjusted in each
row. This step is optional.hclust
,
kmeans
, skmeans::skmeans
, cluster::pam
and Mclust::mclust
. The default methods to
extract top n rows are sd
, cv
, MAD
and ATC
.To perform hierarchical partitioning, run following code:
# code only for demonstration
rh = hierarchical_partition(mat, mc.cores = ...)
cola_report(rh, output_dir = ..., mc.cores = ...)
For the hierarchical partition, you can only select one partition method and one top-value method.
The default partition method is kmeans
and the default top-value method is MAD
.
There are examples on real datasets for cola analysis that can be found at https://jokergoo.github.io/cola_examples/.