Date: 2021-07-22 16:12:18 CEST, cola version: 1.9.4
Document is loading...
First the variable is renamed to res_rh
.
res_rh = rh
The partition hierarchy and all available functions which can be applied to res_rh
object.
res_rh
#> A 'HierarchicalPartition' object with 'ATC:skmeans' method.
#> On a matrix with 12005 rows and 271 columns.
#> Performed in total 2550 partitions.
#> There are 11 groups under the following parameters:
#> - min_samples: 6
#> - mean_silhouette_cutoff: 0.9
#> - min_n_signatures: 151 (signatures are selected based on:)
#> - fdr_cutoff: 0.05
#> - group_diff (scaled values): 0.5
#>
#> Hierarchy of the partition:
#> 0, 271 cols
#> |-- 01, 102 cols, 796 signatures
#> | |-- 011, 60 cols, 94 signatures (c)
#> | `-- 012, 42 cols, 422 signatures
#> | |-- 0121, 20 cols (a)
#> | |-- 0122, 13 cols, 0 signatures (c)
#> | `-- 0123, 9 cols (b)
#> |-- 02, 100 cols, 1634 signatures
#> | |-- 021, 44 cols, 111 signatures (c)
#> | |-- 022, 35 cols (a)
#> | `-- 023, 21 cols, 30 signatures (c)
#> `-- 03, 69 cols, 606 signatures
#> |-- 031, 39 cols, 548 signatures
#> | |-- 0311, 12 cols, 4 signatures (c)
#> | |-- 0312, 19 cols, 13 signatures (c)
#> | `-- 0313, 8 cols (b)
#> `-- 032, 30 cols, 0 signatures (c)
#> Stop reason:
#> a) Mean silhouette score was too small
#> b) Subgroup had too few columns.
#> c) There were too few signatures.
#>
#> Following methods can be applied to this 'HierarchicalPartition' object:
#> [1] "all_leaves" "all_nodes" "cola_report" "collect_classes"
#> [5] "colnames" "compare_signatures" "dimension_reduction" "functional_enrichment"
#> [9] "get_anno_col" "get_anno" "get_children_nodes" "get_classes"
#> [13] "get_matrix" "get_signatures" "is_leaf_node" "max_depth"
#> [17] "merge_node" "ncol" "node_info" "node_level"
#> [21] "nrow" "rownames" "show" "split_node"
#> [25] "suggest_best_k" "test_to_known_factors" "top_rows_heatmap" "top_rows_overlap"
#>
#> You can get result for a single node by e.g. object["01"]
The call of hierarchical_partition()
was:
#> hierarchical_partition(data = m, anno = anno, anno_col = anno_col, cores = 4)
Dimension of the input matrix:
mat = get_matrix(res_rh)
dim(mat)
#> [1] 12005 271
All the methods that were tried:
res_rh@param$combination_method
#> [[1]]
#> [1] "ATC" "skmeans"
The density distribution for each sample is visualized as one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.
library(ComplexHeatmap)
densityHeatmap(mat, top_annotation = HeatmapAnnotation(df = get_anno(res_rh),
col = get_anno_col(res_rh)), ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 1)
Some values about the hierarchy:
all_nodes(res_rh)
#> [1] "0" "01" "011" "012" "0121" "0122" "0123" "02" "021" "022" "023" "03" "031"
#> [14] "0311" "0312" "0313" "032"
all_leaves(res_rh)
#> [1] "011" "0121" "0122" "0123" "021" "022" "023" "0311" "0312" "0313" "032"
node_info(res_rh)
#> id best_method depth best_k n_columns n_signatures p_signatures is_leaf
#> 1 0 ATC:skmeans 1 3 271 3037 0.252978 FALSE
#> 2 01 ATC:skmeans 2 2 102 796 0.066306 FALSE
#> 3 011 ATC:skmeans 3 2 60 94 0.007830 TRUE
#> 4 012 ATC:skmeans 3 3 42 422 0.035152 FALSE
#> 5 0121 ATC:skmeans 4 3 20 NA NA TRUE
#> 6 0122 ATC:skmeans 4 2 13 0 0.000000 TRUE
#> 7 0123 not applied 4 NA 9 NA NA TRUE
#> 8 02 ATC:skmeans 2 3 100 1634 0.136110 FALSE
#> 9 021 ATC:skmeans 3 2 44 111 0.009246 TRUE
#> 10 022 ATC:skmeans 3 2 35 NA NA TRUE
#> 11 023 ATC:skmeans 3 2 21 30 0.002499 TRUE
#> 12 03 ATC:skmeans 2 2 69 606 0.050479 FALSE
#> 13 031 ATC:skmeans 3 3 39 548 0.045648 FALSE
#> 14 0311 ATC:skmeans 4 3 12 4 0.000333 TRUE
#> 15 0312 ATC:skmeans 4 3 19 13 0.001083 TRUE
#> 16 0313 not applied 4 NA 8 NA NA TRUE
#> 17 032 ATC:skmeans 3 2 30 0 0.000000 TRUE
In the output from node_info()
, there are the following columns:
id
: The node id.best_method
: The best method selected.depth
: Depth of the node in the hierarchy.best_k
: Best number of groups of the partition on that node.n_columns
: Number of columns in the submatrix.n_signatures
: Number of signatures with the best_k
.p_signatures
: Proportion of hte signatures in total number of rows in the matrix.is_leaf
: Whether the node is a leaf.Labels of nodes are encoded in a special way. The number of digits correspond to the depth of the node in the hierarchy and the value of the digits correspond to the index of the subgroup in the current node, E.g. a label of “012” means the node is the second subgroup of the partition which is the first subgroup of the root node.
Following table shows the best k
(number of partitions) for each node in the
partition hierarchy. Clicking on the node name in the table goes to the
corresponding section for the partitioning on that node.
The cola vignette explains the definition of the metrics used for determining the best number of partitions.
suggest_best_k(res_rh)
Node | Best method | Is leaf | Best k | 1-PAC | Mean silhouette | Concordance | #samples | |
---|---|---|---|---|---|---|---|---|
Node0 | ATC:skmeans | 3 | 1.00 | 0.97 | 0.99 | 271 | ** | |
Node01 | ATC:skmeans | 2 | 1.00 | 1.00 | 1.00 | 102 | ** | |
Node011-leaf | ATC:skmeans | ✓ (c) | 2 | 0.96 | 0.95 | 0.98 | 60 | ** |
Node012 | ATC:skmeans | 4 | 0.99 | 0.94 | 0.97 | 42 | ** | |
Node0121-leaf | ATC:skmeans | ✓ (a) | 3 | 0.69 | 0.87 | 0.94 | 20 | |
Node0122-leaf | ATC:skmeans | ✓ (c) | 2 | 1.00 | 0.99 | 1.00 | 13 | ** |
Node0123-leaf | not applied | ✓ (b) | 9 | |||||
Node02 | ATC:skmeans | 3 | 1.00 | 0.97 | 0.99 | 100 | ** | |
Node021-leaf | ATC:skmeans | ✓ (c) | 3 | 0.97 | 0.92 | 0.96 | 44 | ** |
Node022-leaf | ATC:skmeans | ✓ (a) | 2 | 0.70 | 0.89 | 0.95 | 35 | |
Node023-leaf | ATC:skmeans | ✓ (c) | 2 | 1.00 | 0.97 | 0.99 | 21 | ** |
Node03 | ATC:skmeans | 2 | 1.00 | 1.00 | 1.00 | 69 | ** | |
Node031 | ATC:skmeans | 3 | 1.00 | 0.99 | 1.00 | 39 | ** | |
Node0311-leaf | ATC:skmeans | ✓ (c) | 3 | 1.00 | 0.99 | 1.00 | 12 | ** |
Node0312-leaf | ATC:skmeans | ✓ (c) | 3 | 0.92 | 0.99 | 0.99 | 19 | * |
Node0313-leaf | not applied | ✓ (b) | 8 | |||||
Node032-leaf | ATC:skmeans | ✓ (c) | 2 | 1.00 | 0.97 | 0.99 | 30 | ** |
Stop reason: a) Mean silhouette score was too small b) Subgroup had too few columns. c) There were too few signatures.
**: 1-PAC > 0.95, *: 1-PAC > 0.9
The nodes of the hierarchy can be merged by setting the merge_node
parameters. Here we
control the hierarchy with the min_n_signatures
parameter. The value of min_n_signatures
is
from node_info()
.
collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 422))
collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 548))
collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 606))
collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 796))
collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 1634))
collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 3037))
Following shows the table of the partitions (You need to click the show/hide code output link to see it).
get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 422))
#> T0_CT_A01 T0_CT_A03 T0_CT_A05 T0_CT_A06 T0_CT_A07 T0_CT_A08 T0_CT_A10 T0_CT_A11 T0_CT_B01
#> "032" "0312" "0312" "032" "0312" "021" "032" "032" "032"
#> T0_CT_B03 T0_CT_B05 T0_CT_B07 T0_CT_B08 T0_CT_B09 T0_CT_C02 T0_CT_C03 T0_CT_C05 T0_CT_C06
#> "0311" "032" "032" "0311" "0312" "0311" "021" "011" "011"
#> T0_CT_C07 T0_CT_C08 T0_CT_C09 T0_CT_C11 T0_CT_C12 T0_CT_D01 T0_CT_D02 T0_CT_D03 T0_CT_D05
#> "032" "0312" "011" "011" "0312" "032" "032" "0311" "032"
#> T0_CT_D06 T0_CT_D07 T0_CT_D08 T0_CT_D09 T0_CT_D11 T0_CT_D12 T0_CT_E01 T0_CT_E03 T0_CT_E04
#> "0311" "032" "0311" "011" "011" "0312" "0311" "032" "011"
#> T0_CT_E05 T0_CT_E06 T0_CT_E07 T0_CT_E08 T0_CT_E09 T0_CT_E10 T0_CT_E11 T0_CT_E12 T0_CT_F01
#> "022" "032" "0312" "0311" "032" "032" "0312" "032" "0312"
#> T0_CT_F02 T0_CT_F03 T0_CT_F04 T0_CT_F05 T0_CT_F06 T0_CT_F07 T0_CT_F09 T0_CT_F11 T0_CT_F12
#> "0312" "0312" "0312" "032" "0311" "032" "011" "032" "0312"
#> T0_CT_G01 T0_CT_G02 T0_CT_G03 T0_CT_G04 T0_CT_G07 T0_CT_G08 T0_CT_G09 T0_CT_G11 T0_CT_H01
#> "0312" "032" "032" "0311" "0311" "0311" "022" "032" "022"
#> T0_CT_H02 T0_CT_H04 T0_CT_H05 T0_CT_H08 T0_CT_H09 T0_CT_H12 T24_CT_A01 T24_CT_A03 T24_CT_A04
#> "032" "032" "032" "032" "032" "032" "021" "011" "011"
#> T24_CT_A05 T24_CT_A07 T24_CT_A08 T24_CT_A09 T24_CT_A10 T24_CT_B01 T24_CT_B02 T24_CT_B03 T24_CT_B05
#> "0312" "011" "021" "021" "022" "022" "021" "0123" "011"
#> T24_CT_B06 T24_CT_B07 T24_CT_B08 T24_CT_B09 T24_CT_B11 T24_CT_C01 T24_CT_C02 T24_CT_C03 T24_CT_C05
#> "011" "021" "011" "021" "0312" "021" "011" "021" "011"
#> T24_CT_C07 T24_CT_C08 T24_CT_C09 T24_CT_C10 T24_CT_C11 T24_CT_C12 T24_CT_D01 T24_CT_D02 T24_CT_D03
#> "011" "011" "011" "021" "022" "011" "011" "011" "011"
#> T24_CT_D04 T24_CT_D05 T24_CT_D06 T24_CT_D07 T24_CT_D08 T24_CT_D09 T24_CT_D10 T24_CT_D11 T24_CT_E01
#> "021" "022" "021" "022" "011" "011" "011" "011" "022"
#> T24_CT_E02 T24_CT_E04 T24_CT_E05 T24_CT_E07 T24_CT_E09 T24_CT_E11 T24_CT_E12 T24_CT_F01 T24_CT_F02
#> "021" "0122" "021" "0123" "021" "021" "011" "011" "011"
#> T24_CT_F03 T24_CT_F04 T24_CT_F05 T24_CT_F07 T24_CT_F08 T24_CT_F09 T24_CT_F10 T24_CT_F11 T24_CT_F12
#> "022" "022" "022" "022" "021" "011" "022" "022" "0313"
#> T24_CT_G01 T24_CT_G02 T24_CT_G03 T24_CT_G04 T24_CT_G05 T24_CT_G06 T24_CT_G08 T24_CT_G10 T24_CT_G11
#> "011" "021" "021" "011" "011" "021" "021" "011" "021"
#> T24_CT_G12 T24_CT_H01 T24_CT_H02 T24_CT_H03 T24_CT_H05 T24_CT_H07 T24_CT_H09 T24_CT_H12 T48_CT_A01
#> "021" "0312" "021" "011" "022" "022" "021" "021" "0122"
#> T48_CT_A02 T48_CT_A03 T48_CT_A04 T48_CT_A05 T48_CT_A06 T48_CT_A07 T48_CT_A08 T48_CT_A09 T48_CT_A10
#> "0122" "021" "011" "0123" "021" "0313" "0122" "022" "011"
#> T48_CT_A11 T48_CT_A12 T48_CT_B01 T48_CT_B02 T48_CT_B03 T48_CT_B04 T48_CT_B06 T48_CT_B08 T48_CT_B10
#> "011" "022" "011" "011" "021" "021" "011" "021" "011"
#> T48_CT_B11 T48_CT_B12 T48_CT_C01 T48_CT_C02 T48_CT_C03 T48_CT_C04 T48_CT_C05 T48_CT_C06 T48_CT_C07
#> "0122" "022" "011" "021" "011" "021" "0123" "0123" "022"
#> T48_CT_C09 T48_CT_C10 T48_CT_C11 T48_CT_D01 T48_CT_D02 T48_CT_D03 T48_CT_D04 T48_CT_D06 T48_CT_D07
#> "0122" "022" "0122" "011" "022" "021" "011" "0122" "011"
#> T48_CT_D08 T48_CT_D09 T48_CT_D10 T48_CT_D11 T48_CT_D12 T48_CT_E01 T48_CT_E02 T48_CT_E03 T48_CT_E04
#> "021" "011" "022" "0122" "021" "0123" "022" "0123" "022"
#> T48_CT_E05 T48_CT_E06 T48_CT_E07 T48_CT_E08 T48_CT_E10 T48_CT_E11 T48_CT_E12 T48_CT_F01 T48_CT_F02
#> "011" "021" "021" "011" "021" "022" "0313" "011" "022"
#> T48_CT_F03 T48_CT_F05 T48_CT_F07 T48_CT_F09 T48_CT_F10 T48_CT_F11 T48_CT_G01 T48_CT_G02 T48_CT_G03
#> "022" "011" "022" "011" "022" "021" "021" "0122" "011"
#> T48_CT_G07 T48_CT_G08 T48_CT_G09 T48_CT_G10 T48_CT_G11 T48_CT_G12 T48_CT_H01 T48_CT_H02 T48_CT_H04
#> "011" "0123" "0123" "0312" "022" "011" "011" "022" "021"
#> T48_CT_H05 T48_CT_H06 T48_CT_H07 T48_CT_H08 T48_CT_H11 T48_CT_H12 T72_CT_A01 T72_CT_A05 T72_CT_A08
#> "011" "011" "022" "0122" "022" "0122" "0121" "0121" "023"
#> T72_CT_A09 T72_CT_A11 T72_CT_B01 T72_CT_B02 T72_CT_B03 T72_CT_B04 T72_CT_B05 T72_CT_B06 T72_CT_B08
#> "0121" "0121" "0121" "023" "023" "023" "023" "023" "0313"
#> T72_CT_B09 T72_CT_B11 T72_CT_B12 T72_CT_C04 T72_CT_C06 T72_CT_C07 T72_CT_C09 T72_CT_C11 T72_CT_D01
#> "021" "023" "0121" "0121" "023" "0122" "023" "0313" "0121"
#> T72_CT_D03 T72_CT_D04 T72_CT_D05 T72_CT_D07 T72_CT_D10 T72_CT_D11 T72_CT_E04 T72_CT_E05 T72_CT_E07
#> "023" "0121" "023" "023" "023" "023" "023" "0121" "0121"
#> T72_CT_F01 T72_CT_F05 T72_CT_F07 T72_CT_F10 T72_CT_F11 T72_CT_G03 T72_CT_G04 T72_CT_G06 T72_CT_G08
#> "0121" "0121" "023" "0121" "0121" "023" "023" "0121" "032"
#> T72_CT_G10 T72_CT_G11 T72_CT_H01 T72_CT_H03 T72_CT_H05 T72_CT_H08 T72_CT_H09 T72_CT_H10 T72_CT_H11
#> "0121" "023" "0121" "0121" "0313" "0313" "0313" "023" "023"
#> T72_CT_H12
#> "0121"
get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 548))
#> T0_CT_A01 T0_CT_A03 T0_CT_A05 T0_CT_A06 T0_CT_A07 T0_CT_A08 T0_CT_A10 T0_CT_A11 T0_CT_B01
#> "032" "0312" "0312" "032" "0312" "021" "032" "032" "032"
#> T0_CT_B03 T0_CT_B05 T0_CT_B07 T0_CT_B08 T0_CT_B09 T0_CT_C02 T0_CT_C03 T0_CT_C05 T0_CT_C06
#> "0311" "032" "032" "0311" "0312" "0311" "021" "011" "011"
#> T0_CT_C07 T0_CT_C08 T0_CT_C09 T0_CT_C11 T0_CT_C12 T0_CT_D01 T0_CT_D02 T0_CT_D03 T0_CT_D05
#> "032" "0312" "011" "011" "0312" "032" "032" "0311" "032"
#> T0_CT_D06 T0_CT_D07 T0_CT_D08 T0_CT_D09 T0_CT_D11 T0_CT_D12 T0_CT_E01 T0_CT_E03 T0_CT_E04
#> "0311" "032" "0311" "011" "011" "0312" "0311" "032" "011"
#> T0_CT_E05 T0_CT_E06 T0_CT_E07 T0_CT_E08 T0_CT_E09 T0_CT_E10 T0_CT_E11 T0_CT_E12 T0_CT_F01
#> "022" "032" "0312" "0311" "032" "032" "0312" "032" "0312"
#> T0_CT_F02 T0_CT_F03 T0_CT_F04 T0_CT_F05 T0_CT_F06 T0_CT_F07 T0_CT_F09 T0_CT_F11 T0_CT_F12
#> "0312" "0312" "0312" "032" "0311" "032" "011" "032" "0312"
#> T0_CT_G01 T0_CT_G02 T0_CT_G03 T0_CT_G04 T0_CT_G07 T0_CT_G08 T0_CT_G09 T0_CT_G11 T0_CT_H01
#> "0312" "032" "032" "0311" "0311" "0311" "022" "032" "022"
#> T0_CT_H02 T0_CT_H04 T0_CT_H05 T0_CT_H08 T0_CT_H09 T0_CT_H12 T24_CT_A01 T24_CT_A03 T24_CT_A04
#> "032" "032" "032" "032" "032" "032" "021" "011" "011"
#> T24_CT_A05 T24_CT_A07 T24_CT_A08 T24_CT_A09 T24_CT_A10 T24_CT_B01 T24_CT_B02 T24_CT_B03 T24_CT_B05
#> "0312" "011" "021" "021" "022" "022" "021" "012" "011"
#> T24_CT_B06 T24_CT_B07 T24_CT_B08 T24_CT_B09 T24_CT_B11 T24_CT_C01 T24_CT_C02 T24_CT_C03 T24_CT_C05
#> "011" "021" "011" "021" "0312" "021" "011" "021" "011"
#> T24_CT_C07 T24_CT_C08 T24_CT_C09 T24_CT_C10 T24_CT_C11 T24_CT_C12 T24_CT_D01 T24_CT_D02 T24_CT_D03
#> "011" "011" "011" "021" "022" "011" "011" "011" "011"
#> T24_CT_D04 T24_CT_D05 T24_CT_D06 T24_CT_D07 T24_CT_D08 T24_CT_D09 T24_CT_D10 T24_CT_D11 T24_CT_E01
#> "021" "022" "021" "022" "011" "011" "011" "011" "022"
#> T24_CT_E02 T24_CT_E04 T24_CT_E05 T24_CT_E07 T24_CT_E09 T24_CT_E11 T24_CT_E12 T24_CT_F01 T24_CT_F02
#> "021" "012" "021" "012" "021" "021" "011" "011" "011"
#> T24_CT_F03 T24_CT_F04 T24_CT_F05 T24_CT_F07 T24_CT_F08 T24_CT_F09 T24_CT_F10 T24_CT_F11 T24_CT_F12
#> "022" "022" "022" "022" "021" "011" "022" "022" "0313"
#> T24_CT_G01 T24_CT_G02 T24_CT_G03 T24_CT_G04 T24_CT_G05 T24_CT_G06 T24_CT_G08 T24_CT_G10 T24_CT_G11
#> "011" "021" "021" "011" "011" "021" "021" "011" "021"
#> T24_CT_G12 T24_CT_H01 T24_CT_H02 T24_CT_H03 T24_CT_H05 T24_CT_H07 T24_CT_H09 T24_CT_H12 T48_CT_A01
#> "021" "0312" "021" "011" "022" "022" "021" "021" "012"
#> T48_CT_A02 T48_CT_A03 T48_CT_A04 T48_CT_A05 T48_CT_A06 T48_CT_A07 T48_CT_A08 T48_CT_A09 T48_CT_A10
#> "012" "021" "011" "012" "021" "0313" "012" "022" "011"
#> T48_CT_A11 T48_CT_A12 T48_CT_B01 T48_CT_B02 T48_CT_B03 T48_CT_B04 T48_CT_B06 T48_CT_B08 T48_CT_B10
#> "011" "022" "011" "011" "021" "021" "011" "021" "011"
#> T48_CT_B11 T48_CT_B12 T48_CT_C01 T48_CT_C02 T48_CT_C03 T48_CT_C04 T48_CT_C05 T48_CT_C06 T48_CT_C07
#> "012" "022" "011" "021" "011" "021" "012" "012" "022"
#> T48_CT_C09 T48_CT_C10 T48_CT_C11 T48_CT_D01 T48_CT_D02 T48_CT_D03 T48_CT_D04 T48_CT_D06 T48_CT_D07
#> "012" "022" "012" "011" "022" "021" "011" "012" "011"
#> T48_CT_D08 T48_CT_D09 T48_CT_D10 T48_CT_D11 T48_CT_D12 T48_CT_E01 T48_CT_E02 T48_CT_E03 T48_CT_E04
#> "021" "011" "022" "012" "021" "012" "022" "012" "022"
#> T48_CT_E05 T48_CT_E06 T48_CT_E07 T48_CT_E08 T48_CT_E10 T48_CT_E11 T48_CT_E12 T48_CT_F01 T48_CT_F02
#> "011" "021" "021" "011" "021" "022" "0313" "011" "022"
#> T48_CT_F03 T48_CT_F05 T48_CT_F07 T48_CT_F09 T48_CT_F10 T48_CT_F11 T48_CT_G01 T48_CT_G02 T48_CT_G03
#> "022" "011" "022" "011" "022" "021" "021" "012" "011"
#> T48_CT_G07 T48_CT_G08 T48_CT_G09 T48_CT_G10 T48_CT_G11 T48_CT_G12 T48_CT_H01 T48_CT_H02 T48_CT_H04
#> "011" "012" "012" "0312" "022" "011" "011" "022" "021"
#> T48_CT_H05 T48_CT_H06 T48_CT_H07 T48_CT_H08 T48_CT_H11 T48_CT_H12 T72_CT_A01 T72_CT_A05 T72_CT_A08
#> "011" "011" "022" "012" "022" "012" "012" "012" "023"
#> T72_CT_A09 T72_CT_A11 T72_CT_B01 T72_CT_B02 T72_CT_B03 T72_CT_B04 T72_CT_B05 T72_CT_B06 T72_CT_B08
#> "012" "012" "012" "023" "023" "023" "023" "023" "0313"
#> T72_CT_B09 T72_CT_B11 T72_CT_B12 T72_CT_C04 T72_CT_C06 T72_CT_C07 T72_CT_C09 T72_CT_C11 T72_CT_D01
#> "021" "023" "012" "012" "023" "012" "023" "0313" "012"
#> T72_CT_D03 T72_CT_D04 T72_CT_D05 T72_CT_D07 T72_CT_D10 T72_CT_D11 T72_CT_E04 T72_CT_E05 T72_CT_E07
#> "023" "012" "023" "023" "023" "023" "023" "012" "012"
#> T72_CT_F01 T72_CT_F05 T72_CT_F07 T72_CT_F10 T72_CT_F11 T72_CT_G03 T72_CT_G04 T72_CT_G06 T72_CT_G08
#> "012" "012" "023" "012" "012" "023" "023" "012" "032"
#> T72_CT_G10 T72_CT_G11 T72_CT_H01 T72_CT_H03 T72_CT_H05 T72_CT_H08 T72_CT_H09 T72_CT_H10 T72_CT_H11
#> "012" "023" "012" "012" "0313" "0313" "0313" "023" "023"
#> T72_CT_H12
#> "012"
get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 606))
#> T0_CT_A01 T0_CT_A03 T0_CT_A05 T0_CT_A06 T0_CT_A07 T0_CT_A08 T0_CT_A10 T0_CT_A11 T0_CT_B01
#> "032" "031" "031" "032" "031" "021" "032" "032" "032"
#> T0_CT_B03 T0_CT_B05 T0_CT_B07 T0_CT_B08 T0_CT_B09 T0_CT_C02 T0_CT_C03 T0_CT_C05 T0_CT_C06
#> "031" "032" "032" "031" "031" "031" "021" "011" "011"
#> T0_CT_C07 T0_CT_C08 T0_CT_C09 T0_CT_C11 T0_CT_C12 T0_CT_D01 T0_CT_D02 T0_CT_D03 T0_CT_D05
#> "032" "031" "011" "011" "031" "032" "032" "031" "032"
#> T0_CT_D06 T0_CT_D07 T0_CT_D08 T0_CT_D09 T0_CT_D11 T0_CT_D12 T0_CT_E01 T0_CT_E03 T0_CT_E04
#> "031" "032" "031" "011" "011" "031" "031" "032" "011"
#> T0_CT_E05 T0_CT_E06 T0_CT_E07 T0_CT_E08 T0_CT_E09 T0_CT_E10 T0_CT_E11 T0_CT_E12 T0_CT_F01
#> "022" "032" "031" "031" "032" "032" "031" "032" "031"
#> T0_CT_F02 T0_CT_F03 T0_CT_F04 T0_CT_F05 T0_CT_F06 T0_CT_F07 T0_CT_F09 T0_CT_F11 T0_CT_F12
#> "031" "031" "031" "032" "031" "032" "011" "032" "031"
#> T0_CT_G01 T0_CT_G02 T0_CT_G03 T0_CT_G04 T0_CT_G07 T0_CT_G08 T0_CT_G09 T0_CT_G11 T0_CT_H01
#> "031" "032" "032" "031" "031" "031" "022" "032" "022"
#> T0_CT_H02 T0_CT_H04 T0_CT_H05 T0_CT_H08 T0_CT_H09 T0_CT_H12 T24_CT_A01 T24_CT_A03 T24_CT_A04
#> "032" "032" "032" "032" "032" "032" "021" "011" "011"
#> T24_CT_A05 T24_CT_A07 T24_CT_A08 T24_CT_A09 T24_CT_A10 T24_CT_B01 T24_CT_B02 T24_CT_B03 T24_CT_B05
#> "031" "011" "021" "021" "022" "022" "021" "012" "011"
#> T24_CT_B06 T24_CT_B07 T24_CT_B08 T24_CT_B09 T24_CT_B11 T24_CT_C01 T24_CT_C02 T24_CT_C03 T24_CT_C05
#> "011" "021" "011" "021" "031" "021" "011" "021" "011"
#> T24_CT_C07 T24_CT_C08 T24_CT_C09 T24_CT_C10 T24_CT_C11 T24_CT_C12 T24_CT_D01 T24_CT_D02 T24_CT_D03
#> "011" "011" "011" "021" "022" "011" "011" "011" "011"
#> T24_CT_D04 T24_CT_D05 T24_CT_D06 T24_CT_D07 T24_CT_D08 T24_CT_D09 T24_CT_D10 T24_CT_D11 T24_CT_E01
#> "021" "022" "021" "022" "011" "011" "011" "011" "022"
#> T24_CT_E02 T24_CT_E04 T24_CT_E05 T24_CT_E07 T24_CT_E09 T24_CT_E11 T24_CT_E12 T24_CT_F01 T24_CT_F02
#> "021" "012" "021" "012" "021" "021" "011" "011" "011"
#> T24_CT_F03 T24_CT_F04 T24_CT_F05 T24_CT_F07 T24_CT_F08 T24_CT_F09 T24_CT_F10 T24_CT_F11 T24_CT_F12
#> "022" "022" "022" "022" "021" "011" "022" "022" "031"
#> T24_CT_G01 T24_CT_G02 T24_CT_G03 T24_CT_G04 T24_CT_G05 T24_CT_G06 T24_CT_G08 T24_CT_G10 T24_CT_G11
#> "011" "021" "021" "011" "011" "021" "021" "011" "021"
#> T24_CT_G12 T24_CT_H01 T24_CT_H02 T24_CT_H03 T24_CT_H05 T24_CT_H07 T24_CT_H09 T24_CT_H12 T48_CT_A01
#> "021" "031" "021" "011" "022" "022" "021" "021" "012"
#> T48_CT_A02 T48_CT_A03 T48_CT_A04 T48_CT_A05 T48_CT_A06 T48_CT_A07 T48_CT_A08 T48_CT_A09 T48_CT_A10
#> "012" "021" "011" "012" "021" "031" "012" "022" "011"
#> T48_CT_A11 T48_CT_A12 T48_CT_B01 T48_CT_B02 T48_CT_B03 T48_CT_B04 T48_CT_B06 T48_CT_B08 T48_CT_B10
#> "011" "022" "011" "011" "021" "021" "011" "021" "011"
#> T48_CT_B11 T48_CT_B12 T48_CT_C01 T48_CT_C02 T48_CT_C03 T48_CT_C04 T48_CT_C05 T48_CT_C06 T48_CT_C07
#> "012" "022" "011" "021" "011" "021" "012" "012" "022"
#> T48_CT_C09 T48_CT_C10 T48_CT_C11 T48_CT_D01 T48_CT_D02 T48_CT_D03 T48_CT_D04 T48_CT_D06 T48_CT_D07
#> "012" "022" "012" "011" "022" "021" "011" "012" "011"
#> T48_CT_D08 T48_CT_D09 T48_CT_D10 T48_CT_D11 T48_CT_D12 T48_CT_E01 T48_CT_E02 T48_CT_E03 T48_CT_E04
#> "021" "011" "022" "012" "021" "012" "022" "012" "022"
#> T48_CT_E05 T48_CT_E06 T48_CT_E07 T48_CT_E08 T48_CT_E10 T48_CT_E11 T48_CT_E12 T48_CT_F01 T48_CT_F02
#> "011" "021" "021" "011" "021" "022" "031" "011" "022"
#> T48_CT_F03 T48_CT_F05 T48_CT_F07 T48_CT_F09 T48_CT_F10 T48_CT_F11 T48_CT_G01 T48_CT_G02 T48_CT_G03
#> "022" "011" "022" "011" "022" "021" "021" "012" "011"
#> T48_CT_G07 T48_CT_G08 T48_CT_G09 T48_CT_G10 T48_CT_G11 T48_CT_G12 T48_CT_H01 T48_CT_H02 T48_CT_H04
#> "011" "012" "012" "031" "022" "011" "011" "022" "021"
#> T48_CT_H05 T48_CT_H06 T48_CT_H07 T48_CT_H08 T48_CT_H11 T48_CT_H12 T72_CT_A01 T72_CT_A05 T72_CT_A08
#> "011" "011" "022" "012" "022" "012" "012" "012" "023"
#> T72_CT_A09 T72_CT_A11 T72_CT_B01 T72_CT_B02 T72_CT_B03 T72_CT_B04 T72_CT_B05 T72_CT_B06 T72_CT_B08
#> "012" "012" "012" "023" "023" "023" "023" "023" "031"
#> T72_CT_B09 T72_CT_B11 T72_CT_B12 T72_CT_C04 T72_CT_C06 T72_CT_C07 T72_CT_C09 T72_CT_C11 T72_CT_D01
#> "021" "023" "012" "012" "023" "012" "023" "031" "012"
#> T72_CT_D03 T72_CT_D04 T72_CT_D05 T72_CT_D07 T72_CT_D10 T72_CT_D11 T72_CT_E04 T72_CT_E05 T72_CT_E07
#> "023" "012" "023" "023" "023" "023" "023" "012" "012"
#> T72_CT_F01 T72_CT_F05 T72_CT_F07 T72_CT_F10 T72_CT_F11 T72_CT_G03 T72_CT_G04 T72_CT_G06 T72_CT_G08
#> "012" "012" "023" "012" "012" "023" "023" "012" "032"
#> T72_CT_G10 T72_CT_G11 T72_CT_H01 T72_CT_H03 T72_CT_H05 T72_CT_H08 T72_CT_H09 T72_CT_H10 T72_CT_H11
#> "012" "023" "012" "012" "031" "031" "031" "023" "023"
#> T72_CT_H12
#> "012"
get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 796))
#> T0_CT_A01 T0_CT_A03 T0_CT_A05 T0_CT_A06 T0_CT_A07 T0_CT_A08 T0_CT_A10 T0_CT_A11 T0_CT_B01
#> "03" "03" "03" "03" "03" "021" "03" "03" "03"
#> T0_CT_B03 T0_CT_B05 T0_CT_B07 T0_CT_B08 T0_CT_B09 T0_CT_C02 T0_CT_C03 T0_CT_C05 T0_CT_C06
#> "03" "03" "03" "03" "03" "03" "021" "011" "011"
#> T0_CT_C07 T0_CT_C08 T0_CT_C09 T0_CT_C11 T0_CT_C12 T0_CT_D01 T0_CT_D02 T0_CT_D03 T0_CT_D05
#> "03" "03" "011" "011" "03" "03" "03" "03" "03"
#> T0_CT_D06 T0_CT_D07 T0_CT_D08 T0_CT_D09 T0_CT_D11 T0_CT_D12 T0_CT_E01 T0_CT_E03 T0_CT_E04
#> "03" "03" "03" "011" "011" "03" "03" "03" "011"
#> T0_CT_E05 T0_CT_E06 T0_CT_E07 T0_CT_E08 T0_CT_E09 T0_CT_E10 T0_CT_E11 T0_CT_E12 T0_CT_F01
#> "022" "03" "03" "03" "03" "03" "03" "03" "03"
#> T0_CT_F02 T0_CT_F03 T0_CT_F04 T0_CT_F05 T0_CT_F06 T0_CT_F07 T0_CT_F09 T0_CT_F11 T0_CT_F12
#> "03" "03" "03" "03" "03" "03" "011" "03" "03"
#> T0_CT_G01 T0_CT_G02 T0_CT_G03 T0_CT_G04 T0_CT_G07 T0_CT_G08 T0_CT_G09 T0_CT_G11 T0_CT_H01
#> "03" "03" "03" "03" "03" "03" "022" "03" "022"
#> T0_CT_H02 T0_CT_H04 T0_CT_H05 T0_CT_H08 T0_CT_H09 T0_CT_H12 T24_CT_A01 T24_CT_A03 T24_CT_A04
#> "03" "03" "03" "03" "03" "03" "021" "011" "011"
#> T24_CT_A05 T24_CT_A07 T24_CT_A08 T24_CT_A09 T24_CT_A10 T24_CT_B01 T24_CT_B02 T24_CT_B03 T24_CT_B05
#> "03" "011" "021" "021" "022" "022" "021" "012" "011"
#> T24_CT_B06 T24_CT_B07 T24_CT_B08 T24_CT_B09 T24_CT_B11 T24_CT_C01 T24_CT_C02 T24_CT_C03 T24_CT_C05
#> "011" "021" "011" "021" "03" "021" "011" "021" "011"
#> T24_CT_C07 T24_CT_C08 T24_CT_C09 T24_CT_C10 T24_CT_C11 T24_CT_C12 T24_CT_D01 T24_CT_D02 T24_CT_D03
#> "011" "011" "011" "021" "022" "011" "011" "011" "011"
#> T24_CT_D04 T24_CT_D05 T24_CT_D06 T24_CT_D07 T24_CT_D08 T24_CT_D09 T24_CT_D10 T24_CT_D11 T24_CT_E01
#> "021" "022" "021" "022" "011" "011" "011" "011" "022"
#> T24_CT_E02 T24_CT_E04 T24_CT_E05 T24_CT_E07 T24_CT_E09 T24_CT_E11 T24_CT_E12 T24_CT_F01 T24_CT_F02
#> "021" "012" "021" "012" "021" "021" "011" "011" "011"
#> T24_CT_F03 T24_CT_F04 T24_CT_F05 T24_CT_F07 T24_CT_F08 T24_CT_F09 T24_CT_F10 T24_CT_F11 T24_CT_F12
#> "022" "022" "022" "022" "021" "011" "022" "022" "03"
#> T24_CT_G01 T24_CT_G02 T24_CT_G03 T24_CT_G04 T24_CT_G05 T24_CT_G06 T24_CT_G08 T24_CT_G10 T24_CT_G11
#> "011" "021" "021" "011" "011" "021" "021" "011" "021"
#> T24_CT_G12 T24_CT_H01 T24_CT_H02 T24_CT_H03 T24_CT_H05 T24_CT_H07 T24_CT_H09 T24_CT_H12 T48_CT_A01
#> "021" "03" "021" "011" "022" "022" "021" "021" "012"
#> T48_CT_A02 T48_CT_A03 T48_CT_A04 T48_CT_A05 T48_CT_A06 T48_CT_A07 T48_CT_A08 T48_CT_A09 T48_CT_A10
#> "012" "021" "011" "012" "021" "03" "012" "022" "011"
#> T48_CT_A11 T48_CT_A12 T48_CT_B01 T48_CT_B02 T48_CT_B03 T48_CT_B04 T48_CT_B06 T48_CT_B08 T48_CT_B10
#> "011" "022" "011" "011" "021" "021" "011" "021" "011"
#> T48_CT_B11 T48_CT_B12 T48_CT_C01 T48_CT_C02 T48_CT_C03 T48_CT_C04 T48_CT_C05 T48_CT_C06 T48_CT_C07
#> "012" "022" "011" "021" "011" "021" "012" "012" "022"
#> T48_CT_C09 T48_CT_C10 T48_CT_C11 T48_CT_D01 T48_CT_D02 T48_CT_D03 T48_CT_D04 T48_CT_D06 T48_CT_D07
#> "012" "022" "012" "011" "022" "021" "011" "012" "011"
#> T48_CT_D08 T48_CT_D09 T48_CT_D10 T48_CT_D11 T48_CT_D12 T48_CT_E01 T48_CT_E02 T48_CT_E03 T48_CT_E04
#> "021" "011" "022" "012" "021" "012" "022" "012" "022"
#> T48_CT_E05 T48_CT_E06 T48_CT_E07 T48_CT_E08 T48_CT_E10 T48_CT_E11 T48_CT_E12 T48_CT_F01 T48_CT_F02
#> "011" "021" "021" "011" "021" "022" "03" "011" "022"
#> T48_CT_F03 T48_CT_F05 T48_CT_F07 T48_CT_F09 T48_CT_F10 T48_CT_F11 T48_CT_G01 T48_CT_G02 T48_CT_G03
#> "022" "011" "022" "011" "022" "021" "021" "012" "011"
#> T48_CT_G07 T48_CT_G08 T48_CT_G09 T48_CT_G10 T48_CT_G11 T48_CT_G12 T48_CT_H01 T48_CT_H02 T48_CT_H04
#> "011" "012" "012" "03" "022" "011" "011" "022" "021"
#> T48_CT_H05 T48_CT_H06 T48_CT_H07 T48_CT_H08 T48_CT_H11 T48_CT_H12 T72_CT_A01 T72_CT_A05 T72_CT_A08
#> "011" "011" "022" "012" "022" "012" "012" "012" "023"
#> T72_CT_A09 T72_CT_A11 T72_CT_B01 T72_CT_B02 T72_CT_B03 T72_CT_B04 T72_CT_B05 T72_CT_B06 T72_CT_B08
#> "012" "012" "012" "023" "023" "023" "023" "023" "03"
#> T72_CT_B09 T72_CT_B11 T72_CT_B12 T72_CT_C04 T72_CT_C06 T72_CT_C07 T72_CT_C09 T72_CT_C11 T72_CT_D01
#> "021" "023" "012" "012" "023" "012" "023" "03" "012"
#> T72_CT_D03 T72_CT_D04 T72_CT_D05 T72_CT_D07 T72_CT_D10 T72_CT_D11 T72_CT_E04 T72_CT_E05 T72_CT_E07
#> "023" "012" "023" "023" "023" "023" "023" "012" "012"
#> T72_CT_F01 T72_CT_F05 T72_CT_F07 T72_CT_F10 T72_CT_F11 T72_CT_G03 T72_CT_G04 T72_CT_G06 T72_CT_G08
#> "012" "012" "023" "012" "012" "023" "023" "012" "03"
#> T72_CT_G10 T72_CT_G11 T72_CT_H01 T72_CT_H03 T72_CT_H05 T72_CT_H08 T72_CT_H09 T72_CT_H10 T72_CT_H11
#> "012" "023" "012" "012" "03" "03" "03" "023" "023"
#> T72_CT_H12
#> "012"
get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 1634))
#> T0_CT_A01 T0_CT_A03 T0_CT_A05 T0_CT_A06 T0_CT_A07 T0_CT_A08 T0_CT_A10 T0_CT_A11 T0_CT_B01
#> "03" "03" "03" "03" "03" "021" "03" "03" "03"
#> T0_CT_B03 T0_CT_B05 T0_CT_B07 T0_CT_B08 T0_CT_B09 T0_CT_C02 T0_CT_C03 T0_CT_C05 T0_CT_C06
#> "03" "03" "03" "03" "03" "03" "021" "01" "01"
#> T0_CT_C07 T0_CT_C08 T0_CT_C09 T0_CT_C11 T0_CT_C12 T0_CT_D01 T0_CT_D02 T0_CT_D03 T0_CT_D05
#> "03" "03" "01" "01" "03" "03" "03" "03" "03"
#> T0_CT_D06 T0_CT_D07 T0_CT_D08 T0_CT_D09 T0_CT_D11 T0_CT_D12 T0_CT_E01 T0_CT_E03 T0_CT_E04
#> "03" "03" "03" "01" "01" "03" "03" "03" "01"
#> T0_CT_E05 T0_CT_E06 T0_CT_E07 T0_CT_E08 T0_CT_E09 T0_CT_E10 T0_CT_E11 T0_CT_E12 T0_CT_F01
#> "022" "03" "03" "03" "03" "03" "03" "03" "03"
#> T0_CT_F02 T0_CT_F03 T0_CT_F04 T0_CT_F05 T0_CT_F06 T0_CT_F07 T0_CT_F09 T0_CT_F11 T0_CT_F12
#> "03" "03" "03" "03" "03" "03" "01" "03" "03"
#> T0_CT_G01 T0_CT_G02 T0_CT_G03 T0_CT_G04 T0_CT_G07 T0_CT_G08 T0_CT_G09 T0_CT_G11 T0_CT_H01
#> "03" "03" "03" "03" "03" "03" "022" "03" "022"
#> T0_CT_H02 T0_CT_H04 T0_CT_H05 T0_CT_H08 T0_CT_H09 T0_CT_H12 T24_CT_A01 T24_CT_A03 T24_CT_A04
#> "03" "03" "03" "03" "03" "03" "021" "01" "01"
#> T24_CT_A05 T24_CT_A07 T24_CT_A08 T24_CT_A09 T24_CT_A10 T24_CT_B01 T24_CT_B02 T24_CT_B03 T24_CT_B05
#> "03" "01" "021" "021" "022" "022" "021" "01" "01"
#> T24_CT_B06 T24_CT_B07 T24_CT_B08 T24_CT_B09 T24_CT_B11 T24_CT_C01 T24_CT_C02 T24_CT_C03 T24_CT_C05
#> "01" "021" "01" "021" "03" "021" "01" "021" "01"
#> T24_CT_C07 T24_CT_C08 T24_CT_C09 T24_CT_C10 T24_CT_C11 T24_CT_C12 T24_CT_D01 T24_CT_D02 T24_CT_D03
#> "01" "01" "01" "021" "022" "01" "01" "01" "01"
#> T24_CT_D04 T24_CT_D05 T24_CT_D06 T24_CT_D07 T24_CT_D08 T24_CT_D09 T24_CT_D10 T24_CT_D11 T24_CT_E01
#> "021" "022" "021" "022" "01" "01" "01" "01" "022"
#> T24_CT_E02 T24_CT_E04 T24_CT_E05 T24_CT_E07 T24_CT_E09 T24_CT_E11 T24_CT_E12 T24_CT_F01 T24_CT_F02
#> "021" "01" "021" "01" "021" "021" "01" "01" "01"
#> T24_CT_F03 T24_CT_F04 T24_CT_F05 T24_CT_F07 T24_CT_F08 T24_CT_F09 T24_CT_F10 T24_CT_F11 T24_CT_F12
#> "022" "022" "022" "022" "021" "01" "022" "022" "03"
#> T24_CT_G01 T24_CT_G02 T24_CT_G03 T24_CT_G04 T24_CT_G05 T24_CT_G06 T24_CT_G08 T24_CT_G10 T24_CT_G11
#> "01" "021" "021" "01" "01" "021" "021" "01" "021"
#> T24_CT_G12 T24_CT_H01 T24_CT_H02 T24_CT_H03 T24_CT_H05 T24_CT_H07 T24_CT_H09 T24_CT_H12 T48_CT_A01
#> "021" "03" "021" "01" "022" "022" "021" "021" "01"
#> T48_CT_A02 T48_CT_A03 T48_CT_A04 T48_CT_A05 T48_CT_A06 T48_CT_A07 T48_CT_A08 T48_CT_A09 T48_CT_A10
#> "01" "021" "01" "01" "021" "03" "01" "022" "01"
#> T48_CT_A11 T48_CT_A12 T48_CT_B01 T48_CT_B02 T48_CT_B03 T48_CT_B04 T48_CT_B06 T48_CT_B08 T48_CT_B10
#> "01" "022" "01" "01" "021" "021" "01" "021" "01"
#> T48_CT_B11 T48_CT_B12 T48_CT_C01 T48_CT_C02 T48_CT_C03 T48_CT_C04 T48_CT_C05 T48_CT_C06 T48_CT_C07
#> "01" "022" "01" "021" "01" "021" "01" "01" "022"
#> T48_CT_C09 T48_CT_C10 T48_CT_C11 T48_CT_D01 T48_CT_D02 T48_CT_D03 T48_CT_D04 T48_CT_D06 T48_CT_D07
#> "01" "022" "01" "01" "022" "021" "01" "01" "01"
#> T48_CT_D08 T48_CT_D09 T48_CT_D10 T48_CT_D11 T48_CT_D12 T48_CT_E01 T48_CT_E02 T48_CT_E03 T48_CT_E04
#> "021" "01" "022" "01" "021" "01" "022" "01" "022"
#> T48_CT_E05 T48_CT_E06 T48_CT_E07 T48_CT_E08 T48_CT_E10 T48_CT_E11 T48_CT_E12 T48_CT_F01 T48_CT_F02
#> "01" "021" "021" "01" "021" "022" "03" "01" "022"
#> T48_CT_F03 T48_CT_F05 T48_CT_F07 T48_CT_F09 T48_CT_F10 T48_CT_F11 T48_CT_G01 T48_CT_G02 T48_CT_G03
#> "022" "01" "022" "01" "022" "021" "021" "01" "01"
#> T48_CT_G07 T48_CT_G08 T48_CT_G09 T48_CT_G10 T48_CT_G11 T48_CT_G12 T48_CT_H01 T48_CT_H02 T48_CT_H04
#> "01" "01" "01" "03" "022" "01" "01" "022" "021"
#> T48_CT_H05 T48_CT_H06 T48_CT_H07 T48_CT_H08 T48_CT_H11 T48_CT_H12 T72_CT_A01 T72_CT_A05 T72_CT_A08
#> "01" "01" "022" "01" "022" "01" "01" "01" "023"
#> T72_CT_A09 T72_CT_A11 T72_CT_B01 T72_CT_B02 T72_CT_B03 T72_CT_B04 T72_CT_B05 T72_CT_B06 T72_CT_B08
#> "01" "01" "01" "023" "023" "023" "023" "023" "03"
#> T72_CT_B09 T72_CT_B11 T72_CT_B12 T72_CT_C04 T72_CT_C06 T72_CT_C07 T72_CT_C09 T72_CT_C11 T72_CT_D01
#> "021" "023" "01" "01" "023" "01" "023" "03" "01"
#> T72_CT_D03 T72_CT_D04 T72_CT_D05 T72_CT_D07 T72_CT_D10 T72_CT_D11 T72_CT_E04 T72_CT_E05 T72_CT_E07
#> "023" "01" "023" "023" "023" "023" "023" "01" "01"
#> T72_CT_F01 T72_CT_F05 T72_CT_F07 T72_CT_F10 T72_CT_F11 T72_CT_G03 T72_CT_G04 T72_CT_G06 T72_CT_G08
#> "01" "01" "023" "01" "01" "023" "023" "01" "03"
#> T72_CT_G10 T72_CT_G11 T72_CT_H01 T72_CT_H03 T72_CT_H05 T72_CT_H08 T72_CT_H09 T72_CT_H10 T72_CT_H11
#> "01" "023" "01" "01" "03" "03" "03" "023" "023"
#> T72_CT_H12
#> "01"
get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 3037))
#> T0_CT_A01 T0_CT_A03 T0_CT_A05 T0_CT_A06 T0_CT_A07 T0_CT_A08 T0_CT_A10 T0_CT_A11 T0_CT_B01
#> "03" "03" "03" "03" "03" "02" "03" "03" "03"
#> T0_CT_B03 T0_CT_B05 T0_CT_B07 T0_CT_B08 T0_CT_B09 T0_CT_C02 T0_CT_C03 T0_CT_C05 T0_CT_C06
#> "03" "03" "03" "03" "03" "03" "02" "01" "01"
#> T0_CT_C07 T0_CT_C08 T0_CT_C09 T0_CT_C11 T0_CT_C12 T0_CT_D01 T0_CT_D02 T0_CT_D03 T0_CT_D05
#> "03" "03" "01" "01" "03" "03" "03" "03" "03"
#> T0_CT_D06 T0_CT_D07 T0_CT_D08 T0_CT_D09 T0_CT_D11 T0_CT_D12 T0_CT_E01 T0_CT_E03 T0_CT_E04
#> "03" "03" "03" "01" "01" "03" "03" "03" "01"
#> T0_CT_E05 T0_CT_E06 T0_CT_E07 T0_CT_E08 T0_CT_E09 T0_CT_E10 T0_CT_E11 T0_CT_E12 T0_CT_F01
#> "02" "03" "03" "03" "03" "03" "03" "03" "03"
#> T0_CT_F02 T0_CT_F03 T0_CT_F04 T0_CT_F05 T0_CT_F06 T0_CT_F07 T0_CT_F09 T0_CT_F11 T0_CT_F12
#> "03" "03" "03" "03" "03" "03" "01" "03" "03"
#> T0_CT_G01 T0_CT_G02 T0_CT_G03 T0_CT_G04 T0_CT_G07 T0_CT_G08 T0_CT_G09 T0_CT_G11 T0_CT_H01
#> "03" "03" "03" "03" "03" "03" "02" "03" "02"
#> T0_CT_H02 T0_CT_H04 T0_CT_H05 T0_CT_H08 T0_CT_H09 T0_CT_H12 T24_CT_A01 T24_CT_A03 T24_CT_A04
#> "03" "03" "03" "03" "03" "03" "02" "01" "01"
#> T24_CT_A05 T24_CT_A07 T24_CT_A08 T24_CT_A09 T24_CT_A10 T24_CT_B01 T24_CT_B02 T24_CT_B03 T24_CT_B05
#> "03" "01" "02" "02" "02" "02" "02" "01" "01"
#> T24_CT_B06 T24_CT_B07 T24_CT_B08 T24_CT_B09 T24_CT_B11 T24_CT_C01 T24_CT_C02 T24_CT_C03 T24_CT_C05
#> "01" "02" "01" "02" "03" "02" "01" "02" "01"
#> T24_CT_C07 T24_CT_C08 T24_CT_C09 T24_CT_C10 T24_CT_C11 T24_CT_C12 T24_CT_D01 T24_CT_D02 T24_CT_D03
#> "01" "01" "01" "02" "02" "01" "01" "01" "01"
#> T24_CT_D04 T24_CT_D05 T24_CT_D06 T24_CT_D07 T24_CT_D08 T24_CT_D09 T24_CT_D10 T24_CT_D11 T24_CT_E01
#> "02" "02" "02" "02" "01" "01" "01" "01" "02"
#> T24_CT_E02 T24_CT_E04 T24_CT_E05 T24_CT_E07 T24_CT_E09 T24_CT_E11 T24_CT_E12 T24_CT_F01 T24_CT_F02
#> "02" "01" "02" "01" "02" "02" "01" "01" "01"
#> T24_CT_F03 T24_CT_F04 T24_CT_F05 T24_CT_F07 T24_CT_F08 T24_CT_F09 T24_CT_F10 T24_CT_F11 T24_CT_F12
#> "02" "02" "02" "02" "02" "01" "02" "02" "03"
#> T24_CT_G01 T24_CT_G02 T24_CT_G03 T24_CT_G04 T24_CT_G05 T24_CT_G06 T24_CT_G08 T24_CT_G10 T24_CT_G11
#> "01" "02" "02" "01" "01" "02" "02" "01" "02"
#> T24_CT_G12 T24_CT_H01 T24_CT_H02 T24_CT_H03 T24_CT_H05 T24_CT_H07 T24_CT_H09 T24_CT_H12 T48_CT_A01
#> "02" "03" "02" "01" "02" "02" "02" "02" "01"
#> T48_CT_A02 T48_CT_A03 T48_CT_A04 T48_CT_A05 T48_CT_A06 T48_CT_A07 T48_CT_A08 T48_CT_A09 T48_CT_A10
#> "01" "02" "01" "01" "02" "03" "01" "02" "01"
#> T48_CT_A11 T48_CT_A12 T48_CT_B01 T48_CT_B02 T48_CT_B03 T48_CT_B04 T48_CT_B06 T48_CT_B08 T48_CT_B10
#> "01" "02" "01" "01" "02" "02" "01" "02" "01"
#> T48_CT_B11 T48_CT_B12 T48_CT_C01 T48_CT_C02 T48_CT_C03 T48_CT_C04 T48_CT_C05 T48_CT_C06 T48_CT_C07
#> "01" "02" "01" "02" "01" "02" "01" "01" "02"
#> T48_CT_C09 T48_CT_C10 T48_CT_C11 T48_CT_D01 T48_CT_D02 T48_CT_D03 T48_CT_D04 T48_CT_D06 T48_CT_D07
#> "01" "02" "01" "01" "02" "02" "01" "01" "01"
#> T48_CT_D08 T48_CT_D09 T48_CT_D10 T48_CT_D11 T48_CT_D12 T48_CT_E01 T48_CT_E02 T48_CT_E03 T48_CT_E04
#> "02" "01" "02" "01" "02" "01" "02" "01" "02"
#> T48_CT_E05 T48_CT_E06 T48_CT_E07 T48_CT_E08 T48_CT_E10 T48_CT_E11 T48_CT_E12 T48_CT_F01 T48_CT_F02
#> "01" "02" "02" "01" "02" "02" "03" "01" "02"
#> T48_CT_F03 T48_CT_F05 T48_CT_F07 T48_CT_F09 T48_CT_F10 T48_CT_F11 T48_CT_G01 T48_CT_G02 T48_CT_G03
#> "02" "01" "02" "01" "02" "02" "02" "01" "01"
#> T48_CT_G07 T48_CT_G08 T48_CT_G09 T48_CT_G10 T48_CT_G11 T48_CT_G12 T48_CT_H01 T48_CT_H02 T48_CT_H04
#> "01" "01" "01" "03" "02" "01" "01" "02" "02"
#> T48_CT_H05 T48_CT_H06 T48_CT_H07 T48_CT_H08 T48_CT_H11 T48_CT_H12 T72_CT_A01 T72_CT_A05 T72_CT_A08
#> "01" "01" "02" "01" "02" "01" "01" "01" "02"
#> T72_CT_A09 T72_CT_A11 T72_CT_B01 T72_CT_B02 T72_CT_B03 T72_CT_B04 T72_CT_B05 T72_CT_B06 T72_CT_B08
#> "01" "01" "01" "02" "02" "02" "02" "02" "03"
#> T72_CT_B09 T72_CT_B11 T72_CT_B12 T72_CT_C04 T72_CT_C06 T72_CT_C07 T72_CT_C09 T72_CT_C11 T72_CT_D01
#> "02" "02" "01" "01" "02" "01" "02" "03" "01"
#> T72_CT_D03 T72_CT_D04 T72_CT_D05 T72_CT_D07 T72_CT_D10 T72_CT_D11 T72_CT_E04 T72_CT_E05 T72_CT_E07
#> "02" "01" "02" "02" "02" "02" "02" "01" "01"
#> T72_CT_F01 T72_CT_F05 T72_CT_F07 T72_CT_F10 T72_CT_F11 T72_CT_G03 T72_CT_G04 T72_CT_G06 T72_CT_G08
#> "01" "01" "02" "01" "01" "02" "02" "01" "03"
#> T72_CT_G10 T72_CT_G11 T72_CT_H01 T72_CT_H03 T72_CT_H05 T72_CT_H08 T72_CT_H09 T72_CT_H10 T72_CT_H11
#> "01" "02" "01" "01" "03" "03" "03" "02" "02"
#> T72_CT_H12
#> "01"
Heatmaps of the top rows:
top_rows_heatmap(res_rh)
Top rows on each node:
top_rows_overlap(res_rh, method = "upset")
UMAP plot which shows how samples are separated.
par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 422),
method = "UMAP", top_value_method = "SD", top_n = 1400, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 422),
method = "UMAP", top_value_method = "ATC", top_n = 1400, scale_rows = TRUE)
par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 548),
method = "UMAP", top_value_method = "SD", top_n = 1400, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 548),
method = "UMAP", top_value_method = "ATC", top_n = 1400, scale_rows = TRUE)
par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 606),
method = "UMAP", top_value_method = "SD", top_n = 1400, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 606),
method = "UMAP", top_value_method = "ATC", top_n = 1400, scale_rows = TRUE)
par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 796),
method = "UMAP", top_value_method = "SD", top_n = 1400, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 796),
method = "UMAP", top_value_method = "ATC", top_n = 1400, scale_rows = TRUE)
par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 1634),
method = "UMAP", top_value_method = "SD", top_n = 1400, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 1634),
method = "UMAP", top_value_method = "ATC", top_n = 1400, scale_rows = TRUE)
par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 3037),
method = "UMAP", top_value_method = "SD", top_n = 1400, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 3037),
method = "UMAP", top_value_method = "ATC", top_n = 1400, scale_rows = TRUE)
Signatures on the heatmap are the union of all signatures found on every node on the hierarchy. The number of k-means on rows are automatically selected by the function.
get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 422))
get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 548))
get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 606))
get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 796))
get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 1634))
get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 3037))
Compare signatures from different nodes:
compare_signatures(res_rh, verbose = FALSE)
If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs. Note it only works on every node and the final signatures
are the union of all signatures of all nodes.
# code only for demonstration
# e.g. to show the top 500 most significant rows on each node.
tb = get_signature(res_rh, top_signatures = 500)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 422))
#> Hours Media State
#> class 2.4e-75 4.58e-35 2.27e-55
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 548))
#> Hours Media State
#> class 5.51e-63 1.93e-36 2.79e-53
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 606))
#> Hours Media State
#> class 2.24e-59 3.48e-32 5.31e-56
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 796))
#> Hours Media State
#> class 6.05e-60 1.57e-31 1.87e-57
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 1634))
#> Hours Media State
#> class 1.48e-51 7.41e-32 1.26e-54
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 3037))
#> Hours Media State
#> class 6.78e-31 1.25e-33 4.13e-58
Child nodes: Node01 , Node02 , Node03 .
The object with results only for a single top-value method and a single partitioning method can be extracted as:
res = res_rh["0"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4.
#> On a matrix with 11404 rows and 271 columns.
#> Top rows (1140) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 150 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_partitions"
#> [7] "compare_signatures" "consensus_heatmap" "dimension_reduction"
#> [10] "functional_enrichment" "get_anno_col" "get_anno"
#> [13] "get_classes" "get_consensus" "get_matrix"
#> [16] "get_membership" "get_param" "get_signatures"
#> [19] "get_stats" "is_best_k" "is_stable_k"
#> [22] "membership_heatmap" "ncol" "nrow"
#> [25] "plot_ecdf" "predict_classes" "rownames"
#> [28] "select_partition_number" "show" "suggest_best_k"
#> [31] "test_to_known_factors" "top_rows_heatmap"
collect_plots()
function collects all the plots made from res
for all k
(number of subgroups)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, higher 1-PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.988 0.995 0.487 0.513 0.513
#> 3 3 1.000 0.974 0.990 0.353 0.775 0.582
#> 4 4 0.755 0.734 0.877 0.108 0.921 0.778
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following is the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall subgroup
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> T0_CT_A01 1 0.000 0.996 1.00 0.00
#> T0_CT_A03 1 0.000 0.996 1.00 0.00
#> T0_CT_A05 1 0.000 0.996 1.00 0.00
#> T0_CT_A06 1 0.000 0.996 1.00 0.00
#> T0_CT_A07 1 0.000 0.996 1.00 0.00
#> T0_CT_A08 2 0.000 0.993 0.00 1.00
#> T0_CT_A10 1 0.000 0.996 1.00 0.00
#> T0_CT_A11 1 0.242 0.956 0.96 0.04
#> T0_CT_B01 1 0.000 0.996 1.00 0.00
#> T0_CT_B03 1 0.000 0.996 1.00 0.00
#> T0_CT_B05 2 0.000 0.993 0.00 1.00
#> T0_CT_B07 1 0.000 0.996 1.00 0.00
#> T0_CT_B08 1 0.000 0.996 1.00 0.00
#> T0_CT_B09 1 0.000 0.996 1.00 0.00
#> T0_CT_C02 1 0.000 0.996 1.00 0.00
#> T0_CT_C03 2 0.000 0.993 0.00 1.00
#> T0_CT_C05 1 0.000 0.996 1.00 0.00
#> T0_CT_C06 1 0.943 0.435 0.64 0.36
#> T0_CT_C07 1 0.141 0.977 0.98 0.02
#> T0_CT_C08 1 0.000 0.996 1.00 0.00
#> T0_CT_C09 1 0.000 0.996 1.00 0.00
#> T0_CT_C11 1 0.000 0.996 1.00 0.00
#> T0_CT_C12 1 0.000 0.996 1.00 0.00
#> T0_CT_D01 1 0.000 0.996 1.00 0.00
#> T0_CT_D02 1 0.000 0.996 1.00 0.00
#> T0_CT_D03 1 0.000 0.996 1.00 0.00
#> T0_CT_D05 1 0.000 0.996 1.00 0.00
#> T0_CT_D06 1 0.000 0.996 1.00 0.00
#> T0_CT_D07 1 0.000 0.996 1.00 0.00
#> T0_CT_D08 1 0.000 0.996 1.00 0.00
#> T0_CT_D09 1 0.000 0.996 1.00 0.00
#> T0_CT_D11 1 0.000 0.996 1.00 0.00
#> T0_CT_D12 1 0.000 0.996 1.00 0.00
#> T0_CT_E01 1 0.000 0.996 1.00 0.00
#> T0_CT_E03 1 0.000 0.996 1.00 0.00
#> T0_CT_E04 1 0.000 0.996 1.00 0.00
#> T0_CT_E05 2 0.000 0.993 0.00 1.00
#> T0_CT_E06 1 0.000 0.996 1.00 0.00
#> T0_CT_E07 1 0.000 0.996 1.00 0.00
#> T0_CT_E08 1 0.000 0.996 1.00 0.00
#> T0_CT_E09 1 0.000 0.996 1.00 0.00
#> T0_CT_E10 1 0.000 0.996 1.00 0.00
#> T0_CT_E11 1 0.000 0.996 1.00 0.00
#> T0_CT_E12 1 0.000 0.996 1.00 0.00
#> T0_CT_F01 1 0.000 0.996 1.00 0.00
#> T0_CT_F02 1 0.000 0.996 1.00 0.00
#> T0_CT_F03 1 0.000 0.996 1.00 0.00
#> T0_CT_F04 1 0.000 0.996 1.00 0.00
#> T0_CT_F05 1 0.000 0.996 1.00 0.00
#> T0_CT_F06 1 0.000 0.996 1.00 0.00
#> T0_CT_F07 1 0.000 0.996 1.00 0.00
#> T0_CT_F09 1 0.000 0.996 1.00 0.00
#> T0_CT_F11 1 0.000 0.996 1.00 0.00
#> T0_CT_F12 1 0.000 0.996 1.00 0.00
#> T0_CT_G01 1 0.000 0.996 1.00 0.00
#> T0_CT_G02 2 0.943 0.439 0.36 0.64
#> T0_CT_G03 1 0.000 0.996 1.00 0.00
#> T0_CT_G04 1 0.000 0.996 1.00 0.00
#> T0_CT_G07 1 0.000 0.996 1.00 0.00
#> T0_CT_G08 1 0.000 0.996 1.00 0.00
#> T0_CT_G09 2 0.000 0.993 0.00 1.00
#> T0_CT_G11 1 0.469 0.888 0.90 0.10
#> T0_CT_H01 2 0.000 0.993 0.00 1.00
#> T0_CT_H02 1 0.000 0.996 1.00 0.00
#> T0_CT_H04 1 0.000 0.996 1.00 0.00
#> T0_CT_H05 1 0.141 0.977 0.98 0.02
#> T0_CT_H08 1 0.000 0.996 1.00 0.00
#> T0_CT_H09 1 0.000 0.996 1.00 0.00
#> T0_CT_H12 1 0.000 0.996 1.00 0.00
#> T24_CT_A01 2 0.000 0.993 0.00 1.00
#> T24_CT_A03 1 0.000 0.996 1.00 0.00
#> T24_CT_A04 1 0.000 0.996 1.00 0.00
#> T24_CT_A05 2 0.000 0.993 0.00 1.00
#> T24_CT_A07 1 0.000 0.996 1.00 0.00
#> T24_CT_A08 2 0.000 0.993 0.00 1.00
#> T24_CT_A09 2 0.000 0.993 0.00 1.00
#> T24_CT_A10 2 0.000 0.993 0.00 1.00
#> T24_CT_B01 2 0.000 0.993 0.00 1.00
#> T24_CT_B02 2 0.000 0.993 0.00 1.00
#> T24_CT_B03 1 0.242 0.956 0.96 0.04
#> T24_CT_B05 1 0.000 0.996 1.00 0.00
#> T24_CT_B06 1 0.000 0.996 1.00 0.00
#> T24_CT_B07 2 0.000 0.993 0.00 1.00
#> T24_CT_B08 1 0.000 0.996 1.00 0.00
#> T24_CT_B09 2 0.000 0.993 0.00 1.00
#> T24_CT_B11 2 0.634 0.808 0.16 0.84
#> T24_CT_C01 2 0.000 0.993 0.00 1.00
#> T24_CT_C02 1 0.000 0.996 1.00 0.00
#> T24_CT_C03 2 0.000 0.993 0.00 1.00
#> T24_CT_C05 1 0.000 0.996 1.00 0.00
#> T24_CT_C07 1 0.000 0.996 1.00 0.00
#> T24_CT_C08 1 0.000 0.996 1.00 0.00
#> T24_CT_C09 1 0.000 0.996 1.00 0.00
#> T24_CT_C10 2 0.000 0.993 0.00 1.00
#> T24_CT_C11 2 0.000 0.993 0.00 1.00
#> T24_CT_C12 1 0.000 0.996 1.00 0.00
#> T24_CT_D01 1 0.000 0.996 1.00 0.00
#> T24_CT_D02 1 0.000 0.996 1.00 0.00
#> T24_CT_D03 1 0.000 0.996 1.00 0.00
#> T24_CT_D04 2 0.000 0.993 0.00 1.00
#> T24_CT_D05 2 0.000 0.993 0.00 1.00
#> T24_CT_D06 2 0.000 0.993 0.00 1.00
#> T24_CT_D07 2 0.000 0.993 0.00 1.00
#> T24_CT_D08 1 0.000 0.996 1.00 0.00
#> T24_CT_D09 1 0.000 0.996 1.00 0.00
#> T24_CT_D10 1 0.000 0.996 1.00 0.00
#> T24_CT_D11 1 0.000 0.996 1.00 0.00
#> T24_CT_E01 2 0.000 0.993 0.00 1.00
#> T24_CT_E02 2 0.000 0.993 0.00 1.00
#> T24_CT_E04 1 0.000 0.996 1.00 0.00
#> T24_CT_E05 2 0.000 0.993 0.00 1.00
#> T24_CT_E07 2 0.000 0.993 0.00 1.00
#> T24_CT_E09 2 0.000 0.993 0.00 1.00
#> T24_CT_E11 2 0.000 0.993 0.00 1.00
#> T24_CT_E12 1 0.000 0.996 1.00 0.00
#> T24_CT_F01 1 0.000 0.996 1.00 0.00
#> T24_CT_F02 1 0.000 0.996 1.00 0.00
#> T24_CT_F03 2 0.000 0.993 0.00 1.00
#> T24_CT_F04 2 0.000 0.993 0.00 1.00
#> T24_CT_F05 2 0.000 0.993 0.00 1.00
#> T24_CT_F07 2 0.000 0.993 0.00 1.00
#> T24_CT_F08 2 0.000 0.993 0.00 1.00
#> T24_CT_F09 1 0.000 0.996 1.00 0.00
#> T24_CT_F10 2 0.000 0.993 0.00 1.00
#> T24_CT_F11 2 0.000 0.993 0.00 1.00
#> T24_CT_F12 1 0.000 0.996 1.00 0.00
#> T24_CT_G01 1 0.000 0.996 1.00 0.00
#> T24_CT_G02 2 0.000 0.993 0.00 1.00
#> T24_CT_G03 2 0.000 0.993 0.00 1.00
#> T24_CT_G04 1 0.000 0.996 1.00 0.00
#> T24_CT_G05 1 0.000 0.996 1.00 0.00
#> T24_CT_G06 2 0.000 0.993 0.00 1.00
#> T24_CT_G08 2 0.000 0.993 0.00 1.00
#> T24_CT_G10 1 0.000 0.996 1.00 0.00
#> T24_CT_G11 2 0.000 0.993 0.00 1.00
#> T24_CT_G12 2 0.000 0.993 0.00 1.00
#> T24_CT_H01 1 0.000 0.996 1.00 0.00
#> T24_CT_H02 2 0.000 0.993 0.00 1.00
#> T24_CT_H03 1 0.000 0.996 1.00 0.00
#> T24_CT_H05 2 0.000 0.993 0.00 1.00
#> T24_CT_H07 2 0.000 0.993 0.00 1.00
#> T24_CT_H09 2 0.000 0.993 0.00 1.00
#> T24_CT_H12 2 0.000 0.993 0.00 1.00
#> T48_CT_A01 1 0.000 0.996 1.00 0.00
#> T48_CT_A02 1 0.000 0.996 1.00 0.00
#> T48_CT_A03 2 0.000 0.993 0.00 1.00
#> T48_CT_A04 1 0.000 0.996 1.00 0.00
#> T48_CT_A05 2 0.000 0.993 0.00 1.00
#> T48_CT_A06 2 0.000 0.993 0.00 1.00
#> T48_CT_A07 1 0.000 0.996 1.00 0.00
#> T48_CT_A08 1 0.000 0.996 1.00 0.00
#> T48_CT_A09 2 0.000 0.993 0.00 1.00
#> T48_CT_A10 1 0.000 0.996 1.00 0.00
#> T48_CT_A11 1 0.000 0.996 1.00 0.00
#> T48_CT_A12 2 0.000 0.993 0.00 1.00
#> T48_CT_B01 1 0.000 0.996 1.00 0.00
#> T48_CT_B02 1 0.000 0.996 1.00 0.00
#> T48_CT_B03 2 0.000 0.993 0.00 1.00
#> T48_CT_B04 2 0.000 0.993 0.00 1.00
#> T48_CT_B06 1 0.000 0.996 1.00 0.00
#> T48_CT_B08 2 0.000 0.993 0.00 1.00
#> T48_CT_B10 1 0.000 0.996 1.00 0.00
#> T48_CT_B11 1 0.000 0.996 1.00 0.00
#> T48_CT_B12 2 0.000 0.993 0.00 1.00
#> T48_CT_C01 1 0.000 0.996 1.00 0.00
#> T48_CT_C02 2 0.000 0.993 0.00 1.00
#> T48_CT_C03 1 0.000 0.996 1.00 0.00
#> T48_CT_C04 2 0.000 0.993 0.00 1.00
#> T48_CT_C05 1 0.000 0.996 1.00 0.00
#> T48_CT_C06 1 0.000 0.996 1.00 0.00
#> T48_CT_C07 2 0.000 0.993 0.00 1.00
#> T48_CT_C09 1 0.000 0.996 1.00 0.00
#> T48_CT_C10 2 0.000 0.993 0.00 1.00
#> T48_CT_C11 1 0.000 0.996 1.00 0.00
#> T48_CT_D01 2 0.000 0.993 0.00 1.00
#> T48_CT_D02 2 0.000 0.993 0.00 1.00
#> T48_CT_D03 2 0.000 0.993 0.00 1.00
#> T48_CT_D04 1 0.000 0.996 1.00 0.00
#> T48_CT_D06 1 0.000 0.996 1.00 0.00
#> T48_CT_D07 1 0.000 0.996 1.00 0.00
#> T48_CT_D08 2 0.000 0.993 0.00 1.00
#> T48_CT_D09 1 0.000 0.996 1.00 0.00
#> T48_CT_D10 2 0.000 0.993 0.00 1.00
#> T48_CT_D11 1 0.000 0.996 1.00 0.00
#> T48_CT_D12 2 0.000 0.993 0.00 1.00
#> T48_CT_E01 2 0.000 0.993 0.00 1.00
#> T48_CT_E02 2 0.000 0.993 0.00 1.00
#> T48_CT_E03 2 0.000 0.993 0.00 1.00
#> T48_CT_E04 2 0.000 0.993 0.00 1.00
#> T48_CT_E05 1 0.000 0.996 1.00 0.00
#> T48_CT_E06 2 0.000 0.993 0.00 1.00
#> T48_CT_E07 2 0.000 0.993 0.00 1.00
#> T48_CT_E08 1 0.000 0.996 1.00 0.00
#> T48_CT_E10 2 0.000 0.993 0.00 1.00
#> T48_CT_E11 2 0.000 0.993 0.00 1.00
#> T48_CT_E12 1 0.000 0.996 1.00 0.00
#> T48_CT_F01 1 0.000 0.996 1.00 0.00
#> T48_CT_F02 2 0.000 0.993 0.00 1.00
#> T48_CT_F03 2 0.000 0.993 0.00 1.00
#> T48_CT_F05 1 0.000 0.996 1.00 0.00
#> T48_CT_F07 2 0.000 0.993 0.00 1.00
#> T48_CT_F09 1 0.000 0.996 1.00 0.00
#> T48_CT_F10 2 0.000 0.993 0.00 1.00
#> T48_CT_F11 2 0.000 0.993 0.00 1.00
#> T48_CT_G01 2 0.000 0.993 0.00 1.00
#> T48_CT_G02 1 0.000 0.996 1.00 0.00
#> T48_CT_G03 1 0.000 0.996 1.00 0.00
#> T48_CT_G07 1 0.000 0.996 1.00 0.00
#> T48_CT_G08 1 0.000 0.996 1.00 0.00
#> T48_CT_G09 2 0.000 0.993 0.00 1.00
#> T48_CT_G10 2 0.000 0.993 0.00 1.00
#> T48_CT_G11 2 0.000 0.993 0.00 1.00
#> T48_CT_G12 1 0.000 0.996 1.00 0.00
#> T48_CT_H01 1 0.000 0.996 1.00 0.00
#> T48_CT_H02 2 0.000 0.993 0.00 1.00
#> T48_CT_H04 2 0.000 0.993 0.00 1.00
#> T48_CT_H05 1 0.000 0.996 1.00 0.00
#> T48_CT_H06 1 0.000 0.996 1.00 0.00
#> T48_CT_H07 2 0.000 0.993 0.00 1.00
#> T48_CT_H08 1 0.000 0.996 1.00 0.00
#> T48_CT_H11 2 0.000 0.993 0.00 1.00
#> T48_CT_H12 1 0.000 0.996 1.00 0.00
#> T72_CT_A01 1 0.000 0.996 1.00 0.00
#> T72_CT_A05 1 0.000 0.996 1.00 0.00
#> T72_CT_A08 2 0.000 0.993 0.00 1.00
#> T72_CT_A09 1 0.000 0.996 1.00 0.00
#> T72_CT_A11 1 0.000 0.996 1.00 0.00
#> T72_CT_B01 1 0.000 0.996 1.00 0.00
#> T72_CT_B02 2 0.000 0.993 0.00 1.00
#> T72_CT_B03 2 0.000 0.993 0.00 1.00
#> T72_CT_B04 2 0.000 0.993 0.00 1.00
#> T72_CT_B05 2 0.000 0.993 0.00 1.00
#> T72_CT_B06 2 0.000 0.993 0.00 1.00
#> T72_CT_B08 1 0.000 0.996 1.00 0.00
#> T72_CT_B09 2 0.000 0.993 0.00 1.00
#> T72_CT_B11 2 0.000 0.993 0.00 1.00
#> T72_CT_B12 1 0.000 0.996 1.00 0.00
#> T72_CT_C04 1 0.000 0.996 1.00 0.00
#> T72_CT_C06 2 0.000 0.993 0.00 1.00
#> T72_CT_C07 1 0.000 0.996 1.00 0.00
#> T72_CT_C09 2 0.000 0.993 0.00 1.00
#> T72_CT_C11 1 0.000 0.996 1.00 0.00
#> T72_CT_D01 1 0.000 0.996 1.00 0.00
#> T72_CT_D03 2 0.000 0.993 0.00 1.00
#> T72_CT_D04 1 0.000 0.996 1.00 0.00
#> T72_CT_D05 2 0.000 0.993 0.00 1.00
#> T72_CT_D07 2 0.000 0.993 0.00 1.00
#> T72_CT_D10 2 0.000 0.993 0.00 1.00
#> T72_CT_D11 2 0.000 0.993 0.00 1.00
#> T72_CT_E04 2 0.000 0.993 0.00 1.00
#> T72_CT_E05 1 0.000 0.996 1.00 0.00
#> T72_CT_E07 1 0.327 0.935 0.94 0.06
#> T72_CT_F01 1 0.000 0.996 1.00 0.00
#> T72_CT_F05 1 0.000 0.996 1.00 0.00
#> T72_CT_F07 2 0.000 0.993 0.00 1.00
#> T72_CT_F10 1 0.000 0.996 1.00 0.00
#> T72_CT_F11 1 0.000 0.996 1.00 0.00
#> T72_CT_G03 2 0.000 0.993 0.00 1.00
#> T72_CT_G04 2 0.000 0.993 0.00 1.00
#> T72_CT_G06 1 0.000 0.996 1.00 0.00
#> T72_CT_G08 2 0.827 0.650 0.26 0.74
#> T72_CT_G10 1 0.000 0.996 1.00 0.00
#> T72_CT_G11 2 0.000 0.993 0.00 1.00
#> T72_CT_H01 1 0.000 0.996 1.00 0.00
#> T72_CT_H03 1 0.000 0.996 1.00 0.00
#> T72_CT_H05 1 0.000 0.996 1.00 0.00
#> T72_CT_H08 1 0.000 0.996 1.00 0.00
#> T72_CT_H09 1 0.000 0.996 1.00 0.00
#> T72_CT_H10 2 0.000 0.993 0.00 1.00
#> T72_CT_H11 2 0.000 0.993 0.00 1.00
#> T72_CT_H12 1 0.000 0.996 1.00 0.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> T0_CT_A01 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_A03 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_A05 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_A06 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_A07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_A08 2 0.0000 0.994 0.00 1.00 0.00
#> T0_CT_A10 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_A11 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_B01 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_B03 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_B05 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_B07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_B08 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_B09 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_C02 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_C03 2 0.0000 0.994 0.00 1.00 0.00
#> T0_CT_C05 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_C06 1 0.9456 0.255 0.48 0.32 0.20
#> T0_CT_C07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_C08 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_C09 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_C11 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_C12 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D01 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D02 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D03 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D05 3 0.5560 0.580 0.30 0.00 0.70
#> T0_CT_D06 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D08 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_D09 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_D11 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_D12 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E01 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E03 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E04 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_E05 2 0.0000 0.994 0.00 1.00 0.00
#> T0_CT_E06 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E08 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E09 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E10 3 0.4291 0.781 0.18 0.00 0.82
#> T0_CT_E11 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_E12 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F01 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F02 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F03 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F04 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F05 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F06 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F09 1 0.0000 0.990 1.00 0.00 0.00
#> T0_CT_F11 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_F12 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G01 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G02 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G03 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G04 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G07 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G08 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_G09 2 0.0000 0.994 0.00 1.00 0.00
#> T0_CT_G11 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_H01 2 0.0000 0.994 0.00 1.00 0.00
#> T0_CT_H02 3 0.4291 0.781 0.18 0.00 0.82
#> T0_CT_H04 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_H05 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_H08 3 0.0000 0.980 0.00 0.00 1.00
#> T0_CT_H09 3 0.6126 0.352 0.40 0.00 0.60
#> T0_CT_H12 3 0.0000 0.980 0.00 0.00 1.00
#> T24_CT_A01 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_A03 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_A04 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_A05 3 0.0000 0.980 0.00 0.00 1.00
#> T24_CT_A07 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_A08 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_A09 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_A10 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_B01 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_B02 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_B03 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_B05 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_B06 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_B07 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_B08 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_B09 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_B11 3 0.0000 0.980 0.00 0.00 1.00
#> T24_CT_C01 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_C02 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_C03 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_C05 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_C07 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_C08 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_C09 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_C10 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_C11 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_C12 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D01 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D02 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D03 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D04 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_D05 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_D06 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_D07 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_D08 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D09 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D10 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_D11 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_E01 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_E02 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_E04 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_E05 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_E07 1 0.5016 0.683 0.76 0.24 0.00
#> T24_CT_E09 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_E11 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_E12 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_F01 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_F02 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_F03 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_F04 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_F05 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_F07 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_F08 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_F09 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_F10 2 0.6280 0.137 0.46 0.54 0.00
#> T24_CT_F11 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_F12 3 0.0000 0.980 0.00 0.00 1.00
#> T24_CT_G01 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_G02 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_G03 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_G04 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_G05 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_G06 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_G08 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_G10 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_G11 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_G12 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_H01 3 0.0000 0.980 0.00 0.00 1.00
#> T24_CT_H02 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_H03 1 0.0000 0.990 1.00 0.00 0.00
#> T24_CT_H05 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_H07 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_H09 2 0.0000 0.994 0.00 1.00 0.00
#> T24_CT_H12 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_A01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A02 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A03 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_A04 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A05 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A06 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_A07 3 0.0000 0.980 0.00 0.00 1.00
#> T48_CT_A08 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A09 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_A10 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A11 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_A12 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_B01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_B02 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_B03 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_B04 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_B06 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_B08 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_B10 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_B11 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_B12 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_C01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_C02 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_C03 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_C04 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_C05 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_C06 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_C07 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_C09 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_C10 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_C11 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D02 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_D03 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_D04 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D06 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D07 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D08 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_D09 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D10 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_D11 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_D12 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_E02 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E03 1 0.3340 0.854 0.88 0.12 0.00
#> T48_CT_E04 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E05 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_E06 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E07 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E08 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_E10 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E11 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_E12 3 0.0000 0.980 0.00 0.00 1.00
#> T48_CT_F01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_F02 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_F03 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_F05 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_F07 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_F09 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_F10 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_F11 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_G01 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_G02 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_G03 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_G07 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_G08 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_G09 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_G10 3 0.0000 0.980 0.00 0.00 1.00
#> T48_CT_G11 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_G12 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_H01 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_H02 2 0.0892 0.973 0.02 0.98 0.00
#> T48_CT_H04 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_H05 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_H06 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_H07 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_H08 1 0.0000 0.990 1.00 0.00 0.00
#> T48_CT_H11 2 0.0000 0.994 0.00 1.00 0.00
#> T48_CT_H12 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_A01 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_A05 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_A08 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_A09 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_A11 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_B01 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_B02 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_B03 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_B04 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_B05 2 0.1529 0.950 0.04 0.96 0.00
#> T72_CT_B06 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_B08 3 0.0000 0.980 0.00 0.00 1.00
#> T72_CT_B09 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_B11 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_B12 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_C04 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_C06 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_C07 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_C09 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_C11 3 0.0000 0.980 0.00 0.00 1.00
#> T72_CT_D01 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_D03 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_D04 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_D05 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_D07 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_D10 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_D11 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_E04 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_E05 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_E07 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_F01 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_F05 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_F07 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_F10 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_F11 1 0.2066 0.929 0.94 0.00 0.06
#> T72_CT_G03 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_G04 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_G06 1 0.0892 0.971 0.98 0.00 0.02
#> T72_CT_G08 3 0.5560 0.569 0.00 0.30 0.70
#> T72_CT_G10 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_G11 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_H01 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_H03 1 0.0000 0.990 1.00 0.00 0.00
#> T72_CT_H05 3 0.0000 0.980 0.00 0.00 1.00
#> T72_CT_H08 3 0.0000 0.980 0.00 0.00 1.00
#> T72_CT_H09 3 0.0000 0.980 0.00 0.00 1.00
#> T72_CT_H10 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_H11 2 0.0000 0.994 0.00 1.00 0.00
#> T72_CT_H12 1 0.0000 0.990 1.00 0.00 0.00
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> T0_CT_A01 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_A03 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_A05 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_A06 3 0.3400 0.8432 0.00 0.00 0.82 0.18
#> T0_CT_A07 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_A08 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T0_CT_A10 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_A11 2 0.8662 0.1490 0.10 0.52 0.18 0.20
#> T0_CT_B01 3 0.5784 0.7149 0.10 0.00 0.70 0.20
#> T0_CT_B03 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_B05 3 0.5147 0.7779 0.00 0.06 0.74 0.20
#> T0_CT_B07 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T0_CT_B08 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_B09 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_C02 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_C03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T0_CT_C05 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_C06 4 0.5062 0.3927 0.30 0.02 0.00 0.68
#> T0_CT_C07 3 0.2345 0.8931 0.00 0.00 0.90 0.10
#> T0_CT_C08 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_C09 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_C11 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_C12 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_D01 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T0_CT_D02 3 0.3172 0.8569 0.00 0.00 0.84 0.16
#> T0_CT_D03 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_D05 1 0.7738 0.2096 0.44 0.00 0.26 0.30
#> T0_CT_D06 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_D07 3 0.2345 0.8931 0.00 0.00 0.90 0.10
#> T0_CT_D08 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_D09 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_D11 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_D12 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E01 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E03 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E04 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_E05 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T0_CT_E06 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E07 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E08 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E09 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E10 1 0.5784 0.6459 0.70 0.00 0.10 0.20
#> T0_CT_E11 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_E12 3 0.0707 0.9325 0.00 0.00 0.98 0.02
#> T0_CT_F01 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_F02 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_F03 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_F04 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_F05 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T0_CT_F06 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_F07 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T0_CT_F09 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T0_CT_F11 3 0.2345 0.8931 0.00 0.00 0.90 0.10
#> T0_CT_F12 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_G01 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_G02 3 0.5486 0.7585 0.00 0.08 0.72 0.20
#> T0_CT_G03 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_G04 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_G07 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_G08 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T0_CT_G09 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T0_CT_G11 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T0_CT_H01 4 0.4948 0.0208 0.00 0.44 0.00 0.56
#> T0_CT_H02 1 0.6049 0.6186 0.68 0.00 0.12 0.20
#> T0_CT_H04 3 0.1637 0.9138 0.00 0.00 0.94 0.06
#> T0_CT_H05 3 0.6797 0.5777 0.16 0.00 0.60 0.24
#> T0_CT_H08 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T0_CT_H09 1 0.5147 0.6918 0.74 0.00 0.06 0.20
#> T0_CT_H12 3 0.3610 0.8290 0.00 0.00 0.80 0.20
#> T24_CT_A01 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_A03 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_A04 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T24_CT_A05 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T24_CT_A07 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_A08 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_A09 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_A10 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T24_CT_B01 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_B02 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_B03 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_B05 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_B06 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_B07 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_B08 1 0.2345 0.8294 0.90 0.00 0.00 0.10
#> T24_CT_B09 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_B11 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T24_CT_C01 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_C02 1 0.1211 0.8623 0.96 0.00 0.00 0.04
#> T24_CT_C03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_C05 1 0.2345 0.8294 0.90 0.00 0.00 0.10
#> T24_CT_C07 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_C08 1 0.2345 0.8294 0.90 0.00 0.00 0.10
#> T24_CT_C09 1 0.1211 0.8623 0.96 0.00 0.00 0.04
#> T24_CT_C10 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_C11 2 0.4522 0.4499 0.00 0.68 0.00 0.32
#> T24_CT_C12 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_D01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_D02 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_D03 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T24_CT_D04 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_D05 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_D06 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_D07 2 0.0707 0.7711 0.00 0.98 0.00 0.02
#> T24_CT_D08 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_D09 1 0.1637 0.8522 0.94 0.00 0.00 0.06
#> T24_CT_D10 1 0.0707 0.8714 0.98 0.00 0.00 0.02
#> T24_CT_D11 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_E01 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T24_CT_E02 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_E04 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_E05 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_E07 4 0.7021 0.4698 0.40 0.12 0.00 0.48
#> T24_CT_E09 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_E11 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_E12 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_F01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_F02 1 0.2011 0.8412 0.92 0.00 0.00 0.08
#> T24_CT_F03 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T24_CT_F04 2 0.4406 0.4806 0.00 0.70 0.00 0.30
#> T24_CT_F05 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T24_CT_F07 2 0.3400 0.6323 0.00 0.82 0.00 0.18
#> T24_CT_F08 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_F09 1 0.2345 0.8294 0.90 0.00 0.00 0.10
#> T24_CT_F10 4 0.7121 0.5688 0.30 0.16 0.00 0.54
#> T24_CT_F11 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T24_CT_F12 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T24_CT_G01 1 0.2345 0.8294 0.90 0.00 0.00 0.10
#> T24_CT_G02 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_G03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_G04 1 0.0707 0.8715 0.98 0.00 0.00 0.02
#> T24_CT_G05 1 0.2345 0.8294 0.90 0.00 0.00 0.10
#> T24_CT_G06 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_G08 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_G10 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_G11 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_G12 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_H01 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T24_CT_H02 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_H03 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T24_CT_H05 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T24_CT_H07 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_H09 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T24_CT_H12 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_A01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_A02 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_A03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_A04 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_A05 4 0.3610 0.6935 0.20 0.00 0.00 0.80
#> T48_CT_A06 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_A07 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T48_CT_A08 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_A09 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_A10 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_A11 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_A12 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_B01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_B02 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_B03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_B04 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_B06 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_B08 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_B10 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_B11 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_B12 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_C01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_C02 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_C03 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_C04 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_C05 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_C06 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_C07 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_C09 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_C10 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_C11 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_D01 1 0.4994 -0.2050 0.52 0.00 0.00 0.48
#> T48_CT_D02 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_D03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_D04 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_D06 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_D07 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_D08 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_D09 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_D10 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_D11 1 0.3610 0.7539 0.80 0.00 0.00 0.20
#> T48_CT_D12 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_E01 4 0.3610 0.6935 0.20 0.00 0.00 0.80
#> T48_CT_E02 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_E03 4 0.3610 0.6935 0.20 0.00 0.00 0.80
#> T48_CT_E04 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_E05 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_E06 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_E07 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_E08 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_E10 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_E11 2 0.4624 0.4171 0.00 0.66 0.00 0.34
#> T48_CT_E12 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T48_CT_F01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_F02 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_F03 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_F05 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_F07 2 0.3610 0.6094 0.00 0.80 0.00 0.20
#> T48_CT_F09 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_F10 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_F11 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_G01 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_G02 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_G03 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_G07 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_G08 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_G09 4 0.4406 0.6002 0.30 0.00 0.00 0.70
#> T48_CT_G10 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T48_CT_G11 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_G12 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_H01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_H02 4 0.4581 0.7316 0.12 0.08 0.00 0.80
#> T48_CT_H04 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T48_CT_H05 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_H06 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_H07 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_H08 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T48_CT_H11 2 0.4994 0.1508 0.00 0.52 0.00 0.48
#> T48_CT_H12 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T72_CT_A01 1 0.4277 0.6264 0.72 0.00 0.00 0.28
#> T72_CT_A05 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_A08 2 0.4977 0.1883 0.00 0.54 0.00 0.46
#> T72_CT_A09 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_A11 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_B01 1 0.0707 0.8692 0.98 0.00 0.00 0.02
#> T72_CT_B02 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_B03 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_B04 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_B05 4 0.4332 0.7163 0.16 0.04 0.00 0.80
#> T72_CT_B06 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_B08 3 0.3975 0.6810 0.00 0.00 0.76 0.24
#> T72_CT_B09 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_B11 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_B12 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_C04 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T72_CT_C06 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_C07 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T72_CT_C09 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_C11 3 0.3801 0.7096 0.00 0.00 0.78 0.22
#> T72_CT_D01 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_D03 2 0.4522 0.2801 0.00 0.68 0.00 0.32
#> T72_CT_D04 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_D05 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_D07 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_D10 4 0.4581 0.7311 0.12 0.08 0.00 0.80
#> T72_CT_D11 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_E04 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_E05 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_E07 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_F01 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_F05 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_F07 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_F10 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_F11 1 0.7198 0.3600 0.52 0.00 0.16 0.32
#> T72_CT_G03 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_G04 2 0.0000 0.7850 0.00 1.00 0.00 0.00
#> T72_CT_G06 1 0.7198 0.3792 0.52 0.00 0.16 0.32
#> T72_CT_G08 4 0.4332 0.6538 0.00 0.04 0.16 0.80
#> T72_CT_G10 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_G11 4 0.4977 0.0415 0.00 0.46 0.00 0.54
#> T72_CT_H01 1 0.0000 0.8795 1.00 0.00 0.00 0.00
#> T72_CT_H03 1 0.4522 0.5747 0.68 0.00 0.00 0.32
#> T72_CT_H05 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T72_CT_H08 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T72_CT_H09 3 0.0000 0.9413 0.00 0.00 1.00 0.00
#> T72_CT_H10 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_H11 4 0.3610 0.7260 0.00 0.20 0.00 0.80
#> T72_CT_H12 1 0.4522 0.5747 0.68 0.00 0.00 0.32
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
As soon as the classes for columns are determined, the signatures that are significantly different between subgroups can be looked for. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. To get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows (which is done by automatically selecting number of clusters).If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs:
# code only for demonstration
# e.g. to show the top 500 most significant rows
tb = get_signature(res, k = ..., top_signatures = 500)
If the signatures are defined as these which are uniquely high in current group, diff_method
argument
can be set to "uniquely_high_in_one_group"
:
# code only for demonstration
tb = get_signature(res, k = ..., diff_method = "uniquely_high_in_one_group")
UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n_sample Hours(p-value) Media(p-value) State(p-value) k
#> ATC:skmeans 269 1.24e-08 1.40e-09 5.87e-38 2
#> ATC:skmeans 268 6.57e-31 1.06e-33 1.12e-57 3
#> ATC:skmeans 235 8.32e-32 5.41e-28 2.16e-50 4
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
Parent node: Node0. Child nodes: Node011-leaf , Node012 , Node021-leaf , Node022-leaf , Node023-leaf , Node031 , Node032-leaf .
The object with results only for a single top-value method and a single partitioning method can be extracted as:
res = res_rh["01"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4.
#> On a matrix with 11395 rows and 102 columns.
#> Top rows (1140) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 150 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_partitions"
#> [7] "compare_signatures" "consensus_heatmap" "dimension_reduction"
#> [10] "functional_enrichment" "get_anno_col" "get_anno"
#> [13] "get_classes" "get_consensus" "get_matrix"
#> [16] "get_membership" "get_param" "get_signatures"
#> [19] "get_stats" "is_best_k" "is_stable_k"
#> [22] "membership_heatmap" "ncol" "nrow"
#> [25] "plot_ecdf" "predict_classes" "rownames"
#> [28] "select_partition_number" "show" "suggest_best_k"
#> [31] "test_to_known_factors" "top_rows_heatmap"
collect_plots()
function collects all the plots made from res
for all k
(number of subgroups)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, higher 1-PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.996 0.998 0.489 0.511 0.511
#> 3 3 0.786 0.884 0.943 0.342 0.679 0.454
#> 4 4 0.863 0.880 0.943 0.137 0.775 0.456
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following is the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall subgroup
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> T0_CT_C05 1 0.000 1.000 1.00 0.00
#> T0_CT_C06 1 0.000 1.000 1.00 0.00
#> T0_CT_C09 1 0.000 1.000 1.00 0.00
#> T0_CT_C11 1 0.000 1.000 1.00 0.00
#> T0_CT_D09 1 0.000 1.000 1.00 0.00
#> T0_CT_D11 1 0.000 1.000 1.00 0.00
#> T0_CT_E04 1 0.000 1.000 1.00 0.00
#> T0_CT_F09 1 0.000 1.000 1.00 0.00
#> T24_CT_A03 1 0.000 1.000 1.00 0.00
#> T24_CT_A04 1 0.000 1.000 1.00 0.00
#> T24_CT_A07 1 0.000 1.000 1.00 0.00
#> T24_CT_B03 2 0.000 0.996 0.00 1.00
#> T24_CT_B05 1 0.000 1.000 1.00 0.00
#> T24_CT_B06 1 0.000 1.000 1.00 0.00
#> T24_CT_B08 1 0.000 1.000 1.00 0.00
#> T24_CT_C02 1 0.000 1.000 1.00 0.00
#> T24_CT_C05 1 0.000 1.000 1.00 0.00
#> T24_CT_C07 1 0.000 1.000 1.00 0.00
#> T24_CT_C08 1 0.000 1.000 1.00 0.00
#> T24_CT_C09 1 0.000 1.000 1.00 0.00
#> T24_CT_C12 1 0.000 1.000 1.00 0.00
#> T24_CT_D01 1 0.000 1.000 1.00 0.00
#> T24_CT_D02 1 0.000 1.000 1.00 0.00
#> T24_CT_D03 1 0.000 1.000 1.00 0.00
#> T24_CT_D08 1 0.000 1.000 1.00 0.00
#> T24_CT_D09 1 0.000 1.000 1.00 0.00
#> T24_CT_D10 1 0.000 1.000 1.00 0.00
#> T24_CT_D11 1 0.000 1.000 1.00 0.00
#> T24_CT_E04 2 0.242 0.959 0.04 0.96
#> T24_CT_E07 2 0.000 0.996 0.00 1.00
#> T24_CT_E12 1 0.000 1.000 1.00 0.00
#> T24_CT_F01 1 0.000 1.000 1.00 0.00
#> T24_CT_F02 1 0.000 1.000 1.00 0.00
#> T24_CT_F09 1 0.000 1.000 1.00 0.00
#> T24_CT_G01 1 0.000 1.000 1.00 0.00
#> T24_CT_G04 1 0.000 1.000 1.00 0.00
#> T24_CT_G05 1 0.000 1.000 1.00 0.00
#> T24_CT_G10 1 0.000 1.000 1.00 0.00
#> T24_CT_H03 1 0.000 1.000 1.00 0.00
#> T48_CT_A01 2 0.000 0.996 0.00 1.00
#> T48_CT_A02 2 0.000 0.996 0.00 1.00
#> T48_CT_A04 1 0.000 1.000 1.00 0.00
#> T48_CT_A05 2 0.000 0.996 0.00 1.00
#> T48_CT_A08 2 0.000 0.996 0.00 1.00
#> T48_CT_A10 1 0.000 1.000 1.00 0.00
#> T48_CT_A11 1 0.000 1.000 1.00 0.00
#> T48_CT_B01 1 0.000 1.000 1.00 0.00
#> T48_CT_B02 1 0.000 1.000 1.00 0.00
#> T48_CT_B06 1 0.000 1.000 1.00 0.00
#> T48_CT_B10 1 0.000 1.000 1.00 0.00
#> T48_CT_B11 2 0.402 0.916 0.08 0.92
#> T48_CT_C01 1 0.000 1.000 1.00 0.00
#> T48_CT_C03 1 0.000 1.000 1.00 0.00
#> T48_CT_C05 2 0.000 0.996 0.00 1.00
#> T48_CT_C06 2 0.000 0.996 0.00 1.00
#> T48_CT_C09 2 0.000 0.996 0.00 1.00
#> T48_CT_C11 2 0.000 0.996 0.00 1.00
#> T48_CT_D01 1 0.000 1.000 1.00 0.00
#> T48_CT_D04 1 0.000 1.000 1.00 0.00
#> T48_CT_D06 2 0.000 0.996 0.00 1.00
#> T48_CT_D07 1 0.000 1.000 1.00 0.00
#> T48_CT_D09 1 0.000 1.000 1.00 0.00
#> T48_CT_D11 2 0.000 0.996 0.00 1.00
#> T48_CT_E01 2 0.000 0.996 0.00 1.00
#> T48_CT_E03 2 0.000 0.996 0.00 1.00
#> T48_CT_E05 1 0.000 1.000 1.00 0.00
#> T48_CT_E08 1 0.000 1.000 1.00 0.00
#> T48_CT_F01 1 0.000 1.000 1.00 0.00
#> T48_CT_F05 1 0.000 1.000 1.00 0.00
#> T48_CT_F09 1 0.000 1.000 1.00 0.00
#> T48_CT_G02 2 0.000 0.996 0.00 1.00
#> T48_CT_G03 1 0.000 1.000 1.00 0.00
#> T48_CT_G07 1 0.000 1.000 1.00 0.00
#> T48_CT_G08 2 0.000 0.996 0.00 1.00
#> T48_CT_G09 2 0.000 0.996 0.00 1.00
#> T48_CT_G12 1 0.000 1.000 1.00 0.00
#> T48_CT_H01 1 0.000 1.000 1.00 0.00
#> T48_CT_H05 1 0.000 1.000 1.00 0.00
#> T48_CT_H06 1 0.000 1.000 1.00 0.00
#> T48_CT_H08 2 0.000 0.996 0.00 1.00
#> T48_CT_H12 2 0.327 0.938 0.06 0.94
#> T72_CT_A01 2 0.000 0.996 0.00 1.00
#> T72_CT_A05 2 0.000 0.996 0.00 1.00
#> T72_CT_A09 2 0.000 0.996 0.00 1.00
#> T72_CT_A11 2 0.000 0.996 0.00 1.00
#> T72_CT_B01 2 0.000 0.996 0.00 1.00
#> T72_CT_B12 2 0.000 0.996 0.00 1.00
#> T72_CT_C04 2 0.000 0.996 0.00 1.00
#> T72_CT_C07 2 0.000 0.996 0.00 1.00
#> T72_CT_D01 2 0.000 0.996 0.00 1.00
#> T72_CT_D04 2 0.000 0.996 0.00 1.00
#> T72_CT_E05 2 0.000 0.996 0.00 1.00
#> T72_CT_E07 2 0.000 0.996 0.00 1.00
#> T72_CT_F01 2 0.000 0.996 0.00 1.00
#> T72_CT_F05 2 0.000 0.996 0.00 1.00
#> T72_CT_F10 2 0.000 0.996 0.00 1.00
#> T72_CT_F11 2 0.000 0.996 0.00 1.00
#> T72_CT_G06 2 0.000 0.996 0.00 1.00
#> T72_CT_G10 2 0.000 0.996 0.00 1.00
#> T72_CT_H01 2 0.000 0.996 0.00 1.00
#> T72_CT_H03 2 0.000 0.996 0.00 1.00
#> T72_CT_H12 2 0.000 0.996 0.00 1.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> T0_CT_C05 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_C06 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_C09 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_C11 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_D09 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_D11 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_E04 1 0.0000 0.965 1.00 0.00 0.00
#> T0_CT_F09 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_A03 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_A04 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_A07 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_B03 3 0.2537 0.859 0.00 0.08 0.92
#> T24_CT_B05 3 0.1529 0.871 0.04 0.00 0.96
#> T24_CT_B06 1 0.3686 0.856 0.86 0.00 0.14
#> T24_CT_B08 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_C02 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_C05 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_C07 3 0.0000 0.884 0.00 0.00 1.00
#> T24_CT_C08 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_C09 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_C12 3 0.0000 0.884 0.00 0.00 1.00
#> T24_CT_D01 3 0.5560 0.579 0.30 0.00 0.70
#> T24_CT_D02 3 0.5948 0.471 0.36 0.00 0.64
#> T24_CT_D03 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_D08 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_D09 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_D10 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_D11 1 0.2066 0.932 0.94 0.00 0.06
#> T24_CT_E04 3 0.0000 0.884 0.00 0.00 1.00
#> T24_CT_E07 3 0.0000 0.884 0.00 0.00 1.00
#> T24_CT_E12 1 0.2537 0.914 0.92 0.00 0.08
#> T24_CT_F01 3 0.2959 0.836 0.10 0.00 0.90
#> T24_CT_F02 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_F09 1 0.0892 0.951 0.98 0.02 0.00
#> T24_CT_G01 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_G04 1 0.5706 0.488 0.68 0.00 0.32
#> T24_CT_G05 1 0.0000 0.965 1.00 0.00 0.00
#> T24_CT_G10 3 0.0000 0.884 0.00 0.00 1.00
#> T24_CT_H03 1 0.0892 0.955 0.98 0.00 0.02
#> T48_CT_A01 3 0.6126 0.393 0.00 0.40 0.60
#> T48_CT_A02 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_A04 1 0.2537 0.914 0.92 0.00 0.08
#> T48_CT_A05 3 0.2959 0.849 0.00 0.10 0.90
#> T48_CT_A08 3 0.2537 0.859 0.00 0.08 0.92
#> T48_CT_A10 1 0.2537 0.914 0.92 0.00 0.08
#> T48_CT_A11 3 0.6126 0.348 0.40 0.00 0.60
#> T48_CT_B01 1 0.0000 0.965 1.00 0.00 0.00
#> T48_CT_B02 3 0.4291 0.761 0.18 0.00 0.82
#> T48_CT_B06 1 0.0000 0.965 1.00 0.00 0.00
#> T48_CT_B10 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_B11 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_C01 3 0.5835 0.478 0.34 0.00 0.66
#> T48_CT_C03 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_C05 3 0.3340 0.836 0.00 0.12 0.88
#> T48_CT_C06 3 0.2537 0.859 0.00 0.08 0.92
#> T48_CT_C09 3 0.4555 0.757 0.00 0.20 0.80
#> T48_CT_C11 3 0.0892 0.880 0.00 0.02 0.98
#> T48_CT_D01 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_D04 1 0.0000 0.965 1.00 0.00 0.00
#> T48_CT_D06 3 0.3686 0.820 0.00 0.14 0.86
#> T48_CT_D07 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_D09 3 0.0892 0.878 0.02 0.00 0.98
#> T48_CT_D11 2 0.5706 0.532 0.32 0.68 0.00
#> T48_CT_E01 3 0.3340 0.836 0.00 0.12 0.88
#> T48_CT_E03 3 0.3340 0.836 0.00 0.12 0.88
#> T48_CT_E05 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_E08 1 0.1529 0.942 0.96 0.00 0.04
#> T48_CT_F01 3 0.2959 0.836 0.10 0.00 0.90
#> T48_CT_F05 3 0.5397 0.616 0.28 0.00 0.72
#> T48_CT_F09 3 0.0000 0.884 0.00 0.00 1.00
#> T48_CT_G02 3 0.4002 0.801 0.00 0.16 0.84
#> T48_CT_G03 3 0.0892 0.878 0.02 0.00 0.98
#> T48_CT_G07 1 0.3340 0.876 0.88 0.00 0.12
#> T48_CT_G08 3 0.2537 0.859 0.00 0.08 0.92
#> T48_CT_G09 3 0.2959 0.849 0.00 0.10 0.90
#> T48_CT_G12 1 0.4555 0.772 0.80 0.00 0.20
#> T48_CT_H01 1 0.2959 0.897 0.90 0.00 0.10
#> T48_CT_H05 1 0.0000 0.965 1.00 0.00 0.00
#> T48_CT_H06 3 0.2537 0.850 0.08 0.00 0.92
#> T48_CT_H08 2 0.4796 0.681 0.00 0.78 0.22
#> T48_CT_H12 3 0.0000 0.884 0.00 0.00 1.00
#> T72_CT_A01 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_A05 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_A09 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_A11 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_B01 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_B12 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_C04 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_C07 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_D01 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_D04 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_E05 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_E07 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_F01 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_F05 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_F10 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_F11 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_G06 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_G10 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_H01 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_H03 2 0.0000 0.973 0.00 1.00 0.00
#> T72_CT_H12 2 0.0000 0.973 0.00 1.00 0.00
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> T0_CT_C05 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T0_CT_C06 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T0_CT_C09 3 0.4907 0.3709 0.42 0.00 0.58 0.00
#> T0_CT_C11 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T0_CT_D09 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T0_CT_D11 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T0_CT_E04 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T0_CT_F09 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_A03 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_A04 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_A07 3 0.4134 0.6800 0.26 0.00 0.74 0.00
#> T24_CT_B03 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T24_CT_B05 3 0.0707 0.8699 0.00 0.00 0.98 0.02
#> T24_CT_B06 3 0.1637 0.8551 0.06 0.00 0.94 0.00
#> T24_CT_B08 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_C02 3 0.4907 0.3696 0.42 0.00 0.58 0.00
#> T24_CT_C05 1 0.1211 0.9112 0.96 0.00 0.04 0.00
#> T24_CT_C07 3 0.2345 0.8335 0.00 0.00 0.90 0.10
#> T24_CT_C08 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_C09 3 0.3801 0.7321 0.22 0.00 0.78 0.00
#> T24_CT_C12 3 0.4855 0.3822 0.00 0.00 0.60 0.40
#> T24_CT_D01 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T24_CT_D02 3 0.4949 0.7255 0.18 0.00 0.76 0.06
#> T24_CT_D03 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_D08 1 0.4790 0.2868 0.62 0.00 0.38 0.00
#> T24_CT_D09 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_D10 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_D11 3 0.3400 0.7773 0.18 0.00 0.82 0.00
#> T24_CT_E04 4 0.2647 0.8763 0.00 0.00 0.12 0.88
#> T24_CT_E07 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T24_CT_E12 3 0.2345 0.8334 0.10 0.00 0.90 0.00
#> T24_CT_F01 3 0.0707 0.8699 0.00 0.00 0.98 0.02
#> T24_CT_F02 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_F09 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_G01 1 0.0000 0.9401 1.00 0.00 0.00 0.00
#> T24_CT_G04 1 0.4731 0.7337 0.78 0.00 0.06 0.16
#> T24_CT_G05 1 0.1211 0.9108 0.96 0.00 0.04 0.00
#> T24_CT_G10 3 0.4522 0.5530 0.00 0.00 0.68 0.32
#> T24_CT_H03 3 0.2011 0.8464 0.08 0.00 0.92 0.00
#> T48_CT_A01 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_A02 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_A04 3 0.3610 0.7522 0.20 0.00 0.80 0.00
#> T48_CT_A05 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_A08 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_A10 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_A11 3 0.0707 0.8694 0.02 0.00 0.98 0.00
#> T48_CT_B01 3 0.4790 0.4657 0.38 0.00 0.62 0.00
#> T48_CT_B02 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_B06 1 0.1637 0.8923 0.94 0.00 0.06 0.00
#> T48_CT_B10 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_B11 4 0.1211 0.9563 0.00 0.00 0.04 0.96
#> T48_CT_C01 3 0.5767 0.5599 0.06 0.00 0.66 0.28
#> T48_CT_C03 3 0.1211 0.8619 0.00 0.00 0.96 0.04
#> T48_CT_C05 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_C06 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_C09 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_C11 4 0.0707 0.9707 0.00 0.00 0.02 0.98
#> T48_CT_D01 3 0.1211 0.8637 0.00 0.00 0.96 0.04
#> T48_CT_D04 1 0.0707 0.9271 0.98 0.00 0.00 0.02
#> T48_CT_D06 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_D07 3 0.2647 0.8053 0.00 0.00 0.88 0.12
#> T48_CT_D09 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_D11 1 0.1637 0.8893 0.94 0.06 0.00 0.00
#> T48_CT_E01 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_E03 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_E05 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_E08 1 0.4994 -0.0164 0.52 0.00 0.48 0.00
#> T48_CT_F01 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_F05 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_F09 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_G02 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_G03 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_G07 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_G08 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_G09 4 0.0000 0.9840 0.00 0.00 0.00 1.00
#> T48_CT_G12 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_H01 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_H05 3 0.3801 0.7322 0.22 0.00 0.78 0.00
#> T48_CT_H06 3 0.0000 0.8740 0.00 0.00 1.00 0.00
#> T48_CT_H08 4 0.1637 0.9316 0.00 0.06 0.00 0.94
#> T48_CT_H12 4 0.1637 0.9392 0.00 0.00 0.06 0.94
#> T72_CT_A01 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_A05 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_A09 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_A11 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_B01 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_B12 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_C04 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_C07 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_D01 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_D04 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_E05 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_E07 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_F01 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_F05 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_F10 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_F11 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_G06 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_G10 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_H01 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_H03 2 0.0000 1.0000 0.00 1.00 0.00 0.00
#> T72_CT_H12 2 0.0000 1.0000 0.00 1.00 0.00 0.00
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
As soon as the classes for columns are determined, the signatures that are significantly different between subgroups can be looked for. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. To get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows (which is done by automatically selecting number of clusters).If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs:
# code only for demonstration
# e.g. to show the top 500 most significant rows
tb = get_signature(res, k = ..., top_signatures = 500)
If the signatures are defined as these which are uniquely high in current group, diff_method
argument
can be set to "uniquely_high_in_one_group"
:
# code only for demonstration
tb = get_signature(res, k = ..., diff_method = "uniquely_high_in_one_group")
UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n_sample Hours(p-value) Media(p-value) State(p-value) k
#> ATC:skmeans 102 1.80e-10 3.65e-02 5.63e-04 2
#> ATC:skmeans 97 7.53e-22 1.15e-03 3.56e-05 3
#> ATC:skmeans 96 4.29e-25 2.54e-05 8.48e-07 4
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
Parent node: Node01. Child nodes: Node0121-leaf , Node0122-leaf , Node0123-leaf , Node0311-leaf , Node0312-leaf , Node0313-leaf .
The object with results only for a single top-value method and a single partitioning method can be extracted as:
res = res_rh["012"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4.
#> On a matrix with 11362 rows and 42 columns.
#> Top rows (932) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 150 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_partitions"
#> [7] "compare_signatures" "consensus_heatmap" "dimension_reduction"
#> [10] "functional_enrichment" "get_anno_col" "get_anno"
#> [13] "get_classes" "get_consensus" "get_matrix"
#> [16] "get_membership" "get_param" "get_signatures"
#> [19] "get_stats" "is_best_k" "is_stable_k"
#> [22] "membership_heatmap" "ncol" "nrow"
#> [25] "plot_ecdf" "predict_classes" "rownames"
#> [28] "select_partition_number" "show" "suggest_best_k"
#> [31] "test_to_known_factors" "top_rows_heatmap"
collect_plots()
function collects all the plots made from res
for all k
(number of subgroups)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, higher 1-PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.512 0.489 0.489
#> 3 3 1.000 0.977 0.990 0.265 0.813 0.637
#> 4 4 0.985 0.943 0.966 0.163 0.863 0.627
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following is the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall subgroup
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> T24_CT_B03 2 0 1 0 1
#> T24_CT_E04 2 0 1 0 1
#> T24_CT_E07 2 0 1 0 1
#> T48_CT_A01 2 0 1 0 1
#> T48_CT_A02 2 0 1 0 1
#> T48_CT_A05 2 0 1 0 1
#> T48_CT_A08 2 0 1 0 1
#> T48_CT_B11 2 0 1 0 1
#> T48_CT_C05 2 0 1 0 1
#> T48_CT_C06 2 0 1 0 1
#> T48_CT_C09 2 0 1 0 1
#> T48_CT_C11 2 0 1 0 1
#> T48_CT_D06 2 0 1 0 1
#> T48_CT_D11 1 0 1 1 0
#> T48_CT_E01 2 0 1 0 1
#> T48_CT_E03 2 0 1 0 1
#> T48_CT_G02 2 0 1 0 1
#> T48_CT_G08 2 0 1 0 1
#> T48_CT_G09 2 0 1 0 1
#> T48_CT_H08 2 0 1 0 1
#> T48_CT_H12 2 0 1 0 1
#> T72_CT_A01 1 0 1 1 0
#> T72_CT_A05 1 0 1 1 0
#> T72_CT_A09 1 0 1 1 0
#> T72_CT_A11 1 0 1 1 0
#> T72_CT_B01 1 0 1 1 0
#> T72_CT_B12 1 0 1 1 0
#> T72_CT_C04 1 0 1 1 0
#> T72_CT_C07 1 0 1 1 0
#> T72_CT_D01 1 0 1 1 0
#> T72_CT_D04 1 0 1 1 0
#> T72_CT_E05 1 0 1 1 0
#> T72_CT_E07 1 0 1 1 0
#> T72_CT_F01 1 0 1 1 0
#> T72_CT_F05 1 0 1 1 0
#> T72_CT_F10 1 0 1 1 0
#> T72_CT_F11 1 0 1 1 0
#> T72_CT_G06 1 0 1 1 0
#> T72_CT_G10 1 0 1 1 0
#> T72_CT_H01 1 0 1 1 0
#> T72_CT_H03 1 0 1 1 0
#> T72_CT_H12 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> T24_CT_B03 3 0.000 0.992 0.00 0.00 1.00
#> T24_CT_E04 2 0.000 0.966 0.00 1.00 0.00
#> T24_CT_E07 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_A01 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_A02 2 0.502 0.695 0.00 0.76 0.24
#> T48_CT_A05 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_A08 2 0.254 0.902 0.00 0.92 0.08
#> T48_CT_B11 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_C05 3 0.207 0.934 0.00 0.06 0.94
#> T48_CT_C06 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_C09 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_C11 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_D06 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_D11 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_E01 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_E03 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_G02 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_G08 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_G09 3 0.000 0.992 0.00 0.00 1.00
#> T48_CT_H08 2 0.000 0.966 0.00 1.00 0.00
#> T48_CT_H12 2 0.000 0.966 0.00 1.00 0.00
#> T72_CT_A01 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_A05 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_A09 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_A11 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_B01 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_B12 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_C04 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_C07 2 0.207 0.906 0.06 0.94 0.00
#> T72_CT_D01 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_D04 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_E05 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_E07 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_F01 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_F05 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_F10 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_F11 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_G06 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_G10 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_H01 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_H03 1 0.000 1.000 1.00 0.00 0.00
#> T72_CT_H12 1 0.000 1.000 1.00 0.00 0.00
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> T24_CT_B03 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T24_CT_E04 2 0.0707 0.978 0.00 0.98 0.00 0.02
#> T24_CT_E07 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_A01 2 0.1211 0.977 0.00 0.96 0.00 0.04
#> T48_CT_A02 2 0.0000 0.975 0.00 1.00 0.00 0.00
#> T48_CT_A05 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_A08 2 0.0000 0.975 0.00 1.00 0.00 0.00
#> T48_CT_B11 2 0.1211 0.977 0.00 0.96 0.00 0.04
#> T48_CT_C05 3 0.4624 0.476 0.00 0.34 0.66 0.00
#> T48_CT_C06 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_C09 2 0.0707 0.964 0.00 0.98 0.02 0.00
#> T48_CT_C11 2 0.1211 0.977 0.00 0.96 0.00 0.04
#> T48_CT_D06 2 0.1211 0.977 0.00 0.96 0.00 0.04
#> T48_CT_D11 4 0.0707 0.912 0.00 0.02 0.00 0.98
#> T48_CT_E01 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_E03 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_G02 2 0.0000 0.975 0.00 1.00 0.00 0.00
#> T48_CT_G08 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_G09 3 0.0000 0.952 0.00 0.00 1.00 0.00
#> T48_CT_H08 2 0.2011 0.928 0.00 0.92 0.00 0.08
#> T48_CT_H12 2 0.0707 0.978 0.00 0.98 0.00 0.02
#> T72_CT_A01 4 0.1211 0.953 0.04 0.00 0.00 0.96
#> T72_CT_A05 4 0.1211 0.953 0.04 0.00 0.00 0.96
#> T72_CT_A09 1 0.0000 0.973 1.00 0.00 0.00 0.00
#> T72_CT_A11 1 0.2011 0.925 0.92 0.00 0.00 0.08
#> T72_CT_B01 4 0.1211 0.953 0.04 0.00 0.00 0.96
#> T72_CT_B12 1 0.0707 0.971 0.98 0.00 0.00 0.02
#> T72_CT_C04 4 0.1211 0.953 0.04 0.00 0.00 0.96
#> T72_CT_C07 4 0.0000 0.924 0.00 0.00 0.00 1.00
#> T72_CT_D01 1 0.0707 0.971 0.98 0.00 0.00 0.02
#> T72_CT_D04 1 0.0000 0.973 1.00 0.00 0.00 0.00
#> T72_CT_E05 1 0.0000 0.973 1.00 0.00 0.00 0.00
#> T72_CT_E07 1 0.2706 0.902 0.90 0.00 0.02 0.08
#> T72_CT_F01 1 0.0707 0.966 0.98 0.00 0.00 0.02
#> T72_CT_F05 1 0.1211 0.955 0.96 0.00 0.00 0.04
#> T72_CT_F10 1 0.1211 0.961 0.96 0.00 0.00 0.04
#> T72_CT_F11 1 0.0707 0.971 0.98 0.00 0.00 0.02
#> T72_CT_G06 4 0.3801 0.750 0.22 0.00 0.00 0.78
#> T72_CT_G10 1 0.0000 0.973 1.00 0.00 0.00 0.00
#> T72_CT_H01 4 0.1211 0.953 0.04 0.00 0.00 0.96
#> T72_CT_H03 1 0.0000 0.973 1.00 0.00 0.00 0.00
#> T72_CT_H12 1 0.0000 0.973 1.00 0.00 0.00 0.00
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
As soon as the classes for columns are determined, the signatures that are significantly different between subgroups can be looked for. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. To get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows (which is done by automatically selecting number of clusters).If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs:
# code only for demonstration
# e.g. to show the top 500 most significant rows
tb = get_signature(res, k = ..., top_signatures = 500)
If the signatures are defined as these which are uniquely high in current group, diff_method
argument
can be set to "uniquely_high_in_one_group"
:
# code only for demonstration
tb = get_signature(res, k = ..., diff_method = "uniquely_high_in_one_group")
UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n_sample Hours(p-value) Media(p-value) State(p-value) k
#> ATC:skmeans 42 5.04e-09 NA 0.029392 2
#> ATC:skmeans 42 4.59e-08 NA 0.000692 3
#> ATC:skmeans 41 5.85e-07 NA 0.000242 4
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
Parent node: Node0. Child nodes: Node011-leaf , Node012 , Node021-leaf , Node022-leaf , Node023-leaf , Node031 , Node032-leaf .
The object with results only for a single top-value method and a single partitioning method can be extracted as:
res = res_rh["02"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4.
#> On a matrix with 11388 rows and 100 columns.
#> Top rows (1139) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 150 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_partitions"
#> [7] "compare_signatures" "consensus_heatmap" "dimension_reduction"
#> [10] "functional_enrichment" "get_anno_col" "get_anno"
#> [13] "get_classes" "get_consensus" "get_matrix"
#> [16] "get_membership" "get_param" "get_signatures"
#> [19] "get_stats" "is_best_k" "is_stable_k"
#> [22] "membership_heatmap" "ncol" "nrow"
#> [25] "plot_ecdf" "predict_classes" "rownames"
#> [28] "select_partition_number" "show" "suggest_best_k"
#> [31] "test_to_known_factors" "top_rows_heatmap"
collect_plots()
function collects all the plots made from res
for all k
(number of subgroups)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, higher 1-PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.958 0.965 0.985 0.504 0.496 0.496
#> 3 3 1.000 0.968 0.988 0.287 0.771 0.575
#> 4 4 0.854 0.889 0.949 0.155 0.857 0.618
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following is the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall subgroup
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> T0_CT_A08 1 0.000 0.988 1.00 0.00
#> T0_CT_C03 1 0.000 0.988 1.00 0.00
#> T0_CT_E05 2 0.000 0.979 0.00 1.00
#> T0_CT_G09 2 0.000 0.979 0.00 1.00
#> T0_CT_H01 2 0.000 0.979 0.00 1.00
#> T24_CT_A01 1 0.000 0.988 1.00 0.00
#> T24_CT_A08 1 0.000 0.988 1.00 0.00
#> T24_CT_A09 1 0.000 0.988 1.00 0.00
#> T24_CT_A10 2 0.141 0.963 0.02 0.98
#> T24_CT_B01 1 0.000 0.988 1.00 0.00
#> T24_CT_B02 1 0.000 0.988 1.00 0.00
#> T24_CT_B07 1 0.000 0.988 1.00 0.00
#> T24_CT_B09 1 0.000 0.988 1.00 0.00
#> T24_CT_C01 1 0.000 0.988 1.00 0.00
#> T24_CT_C03 1 0.000 0.988 1.00 0.00
#> T24_CT_C10 1 0.000 0.988 1.00 0.00
#> T24_CT_C11 1 0.584 0.835 0.86 0.14
#> T24_CT_D04 1 0.000 0.988 1.00 0.00
#> T24_CT_D05 1 0.000 0.988 1.00 0.00
#> T24_CT_D06 1 0.000 0.988 1.00 0.00
#> T24_CT_D07 1 0.000 0.988 1.00 0.00
#> T24_CT_E01 2 0.000 0.979 0.00 1.00
#> T24_CT_E02 1 0.000 0.988 1.00 0.00
#> T24_CT_E05 1 0.000 0.988 1.00 0.00
#> T24_CT_E09 1 0.000 0.988 1.00 0.00
#> T24_CT_E11 1 0.000 0.988 1.00 0.00
#> T24_CT_F03 2 0.000 0.979 0.00 1.00
#> T24_CT_F04 1 0.722 0.751 0.80 0.20
#> T24_CT_F05 2 0.000 0.979 0.00 1.00
#> T24_CT_F07 1 0.000 0.988 1.00 0.00
#> T24_CT_F08 1 0.000 0.988 1.00 0.00
#> T24_CT_F10 2 0.000 0.979 0.00 1.00
#> T24_CT_F11 2 0.000 0.979 0.00 1.00
#> T24_CT_G02 1 0.000 0.988 1.00 0.00
#> T24_CT_G03 1 0.000 0.988 1.00 0.00
#> T24_CT_G06 1 0.000 0.988 1.00 0.00
#> T24_CT_G08 1 0.000 0.988 1.00 0.00
#> T24_CT_G11 1 0.000 0.988 1.00 0.00
#> T24_CT_G12 1 0.000 0.988 1.00 0.00
#> T24_CT_H02 1 0.000 0.988 1.00 0.00
#> T24_CT_H05 1 0.760 0.720 0.78 0.22
#> T24_CT_H07 2 0.795 0.689 0.24 0.76
#> T24_CT_H09 1 0.000 0.988 1.00 0.00
#> T24_CT_H12 1 0.000 0.988 1.00 0.00
#> T48_CT_A03 1 0.000 0.988 1.00 0.00
#> T48_CT_A06 1 0.000 0.988 1.00 0.00
#> T48_CT_A09 2 0.000 0.979 0.00 1.00
#> T48_CT_A12 2 0.000 0.979 0.00 1.00
#> T48_CT_B03 1 0.000 0.988 1.00 0.00
#> T48_CT_B04 1 0.000 0.988 1.00 0.00
#> T48_CT_B08 1 0.000 0.988 1.00 0.00
#> T48_CT_B12 2 0.000 0.979 0.00 1.00
#> T48_CT_C02 1 0.000 0.988 1.00 0.00
#> T48_CT_C04 1 0.000 0.988 1.00 0.00
#> T48_CT_C07 2 0.000 0.979 0.00 1.00
#> T48_CT_C10 2 0.141 0.963 0.02 0.98
#> T48_CT_D02 2 0.000 0.979 0.00 1.00
#> T48_CT_D03 1 0.000 0.988 1.00 0.00
#> T48_CT_D08 1 0.000 0.988 1.00 0.00
#> T48_CT_D10 2 0.000 0.979 0.00 1.00
#> T48_CT_D12 1 0.000 0.988 1.00 0.00
#> T48_CT_E02 2 0.000 0.979 0.00 1.00
#> T48_CT_E04 2 0.000 0.979 0.00 1.00
#> T48_CT_E06 1 0.000 0.988 1.00 0.00
#> T48_CT_E07 1 0.000 0.988 1.00 0.00
#> T48_CT_E10 1 0.000 0.988 1.00 0.00
#> T48_CT_E11 2 0.000 0.979 0.00 1.00
#> T48_CT_F02 2 0.000 0.979 0.00 1.00
#> T48_CT_F03 2 0.529 0.859 0.12 0.88
#> T48_CT_F07 2 0.000 0.979 0.00 1.00
#> T48_CT_F10 2 0.925 0.491 0.34 0.66
#> T48_CT_F11 1 0.141 0.969 0.98 0.02
#> T48_CT_G01 1 0.000 0.988 1.00 0.00
#> T48_CT_G11 2 0.000 0.979 0.00 1.00
#> T48_CT_H02 2 0.000 0.979 0.00 1.00
#> T48_CT_H04 1 0.000 0.988 1.00 0.00
#> T48_CT_H07 2 0.000 0.979 0.00 1.00
#> T48_CT_H11 2 0.000 0.979 0.00 1.00
#> T72_CT_A08 2 0.000 0.979 0.00 1.00
#> T72_CT_B02 2 0.000 0.979 0.00 1.00
#> T72_CT_B03 2 0.000 0.979 0.00 1.00
#> T72_CT_B04 2 0.242 0.944 0.04 0.96
#> T72_CT_B05 2 0.000 0.979 0.00 1.00
#> T72_CT_B06 2 0.000 0.979 0.00 1.00
#> T72_CT_B09 1 0.000 0.988 1.00 0.00
#> T72_CT_B11 2 0.000 0.979 0.00 1.00
#> T72_CT_C06 2 0.000 0.979 0.00 1.00
#> T72_CT_C09 2 0.000 0.979 0.00 1.00
#> T72_CT_D03 2 0.000 0.979 0.00 1.00
#> T72_CT_D05 2 0.000 0.979 0.00 1.00
#> T72_CT_D07 2 0.000 0.979 0.00 1.00
#> T72_CT_D10 2 0.000 0.979 0.00 1.00
#> T72_CT_D11 2 0.000 0.979 0.00 1.00
#> T72_CT_E04 2 0.000 0.979 0.00 1.00
#> T72_CT_F07 2 0.000 0.979 0.00 1.00
#> T72_CT_G03 1 0.000 0.988 1.00 0.00
#> T72_CT_G04 2 0.680 0.782 0.18 0.82
#> T72_CT_G11 2 0.000 0.979 0.00 1.00
#> T72_CT_H10 2 0.000 0.979 0.00 1.00
#> T72_CT_H11 2 0.000 0.979 0.00 1.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> T0_CT_A08 1 0.0000 0.9806 1.00 0.00 0.0
#> T0_CT_C03 1 0.4002 0.8045 0.84 0.16 0.0
#> T0_CT_E05 2 0.0000 0.9874 0.00 1.00 0.0
#> T0_CT_G09 2 0.0000 0.9874 0.00 1.00 0.0
#> T0_CT_H01 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_A01 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_A08 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_A09 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_A10 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_B01 2 0.0892 0.9650 0.02 0.98 0.0
#> T24_CT_B02 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_B07 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_B09 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_C01 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_C03 1 0.6302 0.0938 0.52 0.48 0.0
#> T24_CT_C10 1 0.2537 0.8992 0.92 0.08 0.0
#> T24_CT_C11 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_D04 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_D05 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_D06 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_D07 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_E01 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_E02 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_E05 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_E09 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_E11 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_F03 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_F04 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_F05 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_F07 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_F08 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_F10 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_F11 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_G02 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_G03 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_G06 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_G08 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_G11 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_G12 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_H02 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_H05 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_H07 2 0.0000 0.9874 0.00 1.00 0.0
#> T24_CT_H09 1 0.0000 0.9806 1.00 0.00 0.0
#> T24_CT_H12 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_A03 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_A06 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_A09 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_A12 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_B03 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_B04 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_B08 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_B12 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_C02 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_C04 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_C07 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_C10 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_D02 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_D03 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_D08 1 0.1529 0.9419 0.96 0.04 0.0
#> T48_CT_D10 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_D12 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_E02 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_E04 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_E06 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_E07 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_E10 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_E11 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_F02 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_F03 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_F07 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_F10 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_F11 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_G01 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_G11 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_H02 2 0.6126 0.3309 0.00 0.60 0.4
#> T48_CT_H04 1 0.0000 0.9806 1.00 0.00 0.0
#> T48_CT_H07 2 0.0000 0.9874 0.00 1.00 0.0
#> T48_CT_H11 2 0.0000 0.9874 0.00 1.00 0.0
#> T72_CT_A08 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_B02 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_B03 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_B04 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_B05 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_B06 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_B09 1 0.0000 0.9806 1.00 0.00 0.0
#> T72_CT_B11 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_C06 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_C09 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_D03 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_D05 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_D07 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_D10 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_D11 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_E04 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_F07 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_G03 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_G04 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_G11 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_H10 3 0.0000 1.0000 0.00 0.00 1.0
#> T72_CT_H11 3 0.0000 1.0000 0.00 0.00 1.0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> T0_CT_A08 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T0_CT_C03 4 0.4755 0.692 0.20 0.04 0.00 0.76
#> T0_CT_E05 2 0.0707 0.952 0.00 0.98 0.00 0.02
#> T0_CT_G09 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T0_CT_H01 2 0.0707 0.953 0.00 0.98 0.00 0.02
#> T24_CT_A01 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_A08 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T24_CT_A09 4 0.0707 0.917 0.02 0.00 0.00 0.98
#> T24_CT_A10 2 0.1211 0.938 0.00 0.96 0.00 0.04
#> T24_CT_B01 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_B02 4 0.3400 0.752 0.18 0.00 0.00 0.82
#> T24_CT_B07 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T24_CT_B09 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T24_CT_C01 1 0.1211 0.877 0.96 0.00 0.00 0.04
#> T24_CT_C03 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_C10 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_C11 2 0.4522 0.547 0.00 0.68 0.00 0.32
#> T24_CT_D04 1 0.3400 0.777 0.82 0.00 0.00 0.18
#> T24_CT_D05 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_D06 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_D07 4 0.0707 0.915 0.00 0.02 0.00 0.98
#> T24_CT_E01 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T24_CT_E02 4 0.3801 0.694 0.22 0.00 0.00 0.78
#> T24_CT_E05 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T24_CT_E09 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_E11 1 0.3610 0.754 0.80 0.00 0.00 0.20
#> T24_CT_F03 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T24_CT_F04 4 0.3975 0.651 0.00 0.24 0.00 0.76
#> T24_CT_F05 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T24_CT_F07 4 0.2647 0.826 0.00 0.12 0.00 0.88
#> T24_CT_F08 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_F10 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T24_CT_F11 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T24_CT_G02 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T24_CT_G03 1 0.4624 0.502 0.66 0.00 0.00 0.34
#> T24_CT_G06 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_G08 4 0.2345 0.853 0.10 0.00 0.00 0.90
#> T24_CT_G11 1 0.4907 0.282 0.58 0.00 0.00 0.42
#> T24_CT_G12 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T24_CT_H02 1 0.4948 0.313 0.56 0.00 0.00 0.44
#> T24_CT_H05 2 0.4522 0.557 0.00 0.68 0.00 0.32
#> T24_CT_H07 2 0.1211 0.938 0.00 0.96 0.00 0.04
#> T24_CT_H09 4 0.1211 0.904 0.04 0.00 0.00 0.96
#> T24_CT_H12 1 0.4406 0.623 0.70 0.00 0.00 0.30
#> T48_CT_A03 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_A06 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_A09 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_A12 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_B03 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_B04 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_B08 1 0.1637 0.870 0.94 0.00 0.00 0.06
#> T48_CT_B12 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_C02 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_C04 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_C07 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_C10 2 0.0707 0.949 0.02 0.98 0.00 0.00
#> T48_CT_D02 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_D03 1 0.3801 0.735 0.78 0.00 0.00 0.22
#> T48_CT_D08 1 0.6449 0.577 0.64 0.14 0.00 0.22
#> T48_CT_D10 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_D12 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_E02 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_E04 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_E06 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_E07 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_E10 1 0.2647 0.830 0.88 0.00 0.00 0.12
#> T48_CT_E11 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_F02 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_F03 2 0.0707 0.953 0.00 0.98 0.00 0.02
#> T48_CT_F07 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_F10 2 0.0707 0.952 0.00 0.98 0.00 0.02
#> T48_CT_F11 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_G01 4 0.0000 0.927 0.00 0.00 0.00 1.00
#> T48_CT_G11 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_H02 2 0.3610 0.737 0.00 0.80 0.20 0.00
#> T48_CT_H04 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T48_CT_H07 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T48_CT_H11 2 0.0000 0.964 0.00 1.00 0.00 0.00
#> T72_CT_A08 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_B02 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_B03 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_B04 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_B05 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_B06 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_B09 1 0.0000 0.897 1.00 0.00 0.00 0.00
#> T72_CT_B11 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_C06 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_C09 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_D03 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_D05 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_D07 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_D10 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_D11 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_E04 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_F07 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_G03 1 0.2345 0.821 0.90 0.00 0.10 0.00
#> T72_CT_G04 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_G11 3 0.3172 0.805 0.00 0.16 0.84 0.00
#> T72_CT_H10 3 0.0000 0.990 0.00 0.00 1.00 0.00
#> T72_CT_H11 3 0.0000 0.990 0.00 0.00 1.00 0.00
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
As soon as the classes for columns are determined, the signatures that are significantly different between subgroups can be looked for. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. To get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows (which is done by automatically selecting number of clusters).If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs:
# code only for demonstration
# e.g. to show the top 500 most significant rows
tb = get_signature(res, k = ..., top_signatures = 500)
If the signatures are defined as these which are uniquely high in current group, diff_method
argument
can be set to "uniquely_high_in_one_group"
:
# code only for demonstration
tb = get_signature(res, k = ..., diff_method = "uniquely_high_in_one_group")
UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n_sample Hours(p-value) Media(p-value) State(p-value) k
#> ATC:skmeans 99 9.32e-07 0.908 0.959 2
#> ATC:skmeans 98 2.77e-18 0.347 0.386 3
#> ATC:skmeans 98 3.21e-20 0.441 0.514 4
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
Parent node: Node0. Child nodes: Node011-leaf , Node012 , Node021-leaf , Node022-leaf , Node023-leaf , Node031 , Node032-leaf .
The object with results only for a single top-value method and a single partitioning method can be extracted as:
res = res_rh["03"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4.
#> On a matrix with 11388 rows and 69 columns.
#> Top rows (1139) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 150 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_partitions"
#> [7] "compare_signatures" "consensus_heatmap" "dimension_reduction"
#> [10] "functional_enrichment" "get_anno_col" "get_anno"
#> [13] "get_classes" "get_consensus" "get_matrix"
#> [16] "get_membership" "get_param" "get_signatures"
#> [19] "get_stats" "is_best_k" "is_stable_k"
#> [22] "membership_heatmap" "ncol" "nrow"
#> [25] "plot_ecdf" "predict_classes" "rownames"
#> [28] "select_partition_number" "show" "suggest_best_k"
#> [31] "test_to_known_factors" "top_rows_heatmap"
collect_plots()
function collects all the plots made from res
for all k
(number of subgroups)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, higher 1-PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.4992 0.501 0.501
#> 3 3 0.858 0.946 0.963 0.3259 0.817 0.641
#> 4 4 0.652 0.727 0.810 0.0956 0.945 0.840
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following is the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall subgroup
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> T0_CT_A01 2 0 1 0 1
#> T0_CT_A03 1 0 1 1 0
#> T0_CT_A05 1 0 1 1 0
#> T0_CT_A06 2 0 1 0 1
#> T0_CT_A07 1 0 1 1 0
#> T0_CT_A10 2 0 1 0 1
#> T0_CT_A11 2 0 1 0 1
#> T0_CT_B01 2 0 1 0 1
#> T0_CT_B03 1 0 1 1 0
#> T0_CT_B05 2 0 1 0 1
#> T0_CT_B07 2 0 1 0 1
#> T0_CT_B08 1 0 1 1 0
#> T0_CT_B09 1 0 1 1 0
#> T0_CT_C02 1 0 1 1 0
#> T0_CT_C07 2 0 1 0 1
#> T0_CT_C08 1 0 1 1 0
#> T0_CT_C12 1 0 1 1 0
#> T0_CT_D01 2 0 1 0 1
#> T0_CT_D02 2 0 1 0 1
#> T0_CT_D03 1 0 1 1 0
#> T0_CT_D05 2 0 1 0 1
#> T0_CT_D06 1 0 1 1 0
#> T0_CT_D07 2 0 1 0 1
#> T0_CT_D08 1 0 1 1 0
#> T0_CT_D12 1 0 1 1 0
#> T0_CT_E01 1 0 1 1 0
#> T0_CT_E03 2 0 1 0 1
#> T0_CT_E06 2 0 1 0 1
#> T0_CT_E07 1 0 1 1 0
#> T0_CT_E08 1 0 1 1 0
#> T0_CT_E09 2 0 1 0 1
#> T0_CT_E10 2 0 1 0 1
#> T0_CT_E11 1 0 1 1 0
#> T0_CT_E12 2 0 1 0 1
#> T0_CT_F01 1 0 1 1 0
#> T0_CT_F02 1 0 1 1 0
#> T0_CT_F03 1 0 1 1 0
#> T0_CT_F04 1 0 1 1 0
#> T0_CT_F05 2 0 1 0 1
#> T0_CT_F06 1 0 1 1 0
#> T0_CT_F07 2 0 1 0 1
#> T0_CT_F11 2 0 1 0 1
#> T0_CT_F12 1 0 1 1 0
#> T0_CT_G01 1 0 1 1 0
#> T0_CT_G02 2 0 1 0 1
#> T0_CT_G03 2 0 1 0 1
#> T0_CT_G04 1 0 1 1 0
#> T0_CT_G07 1 0 1 1 0
#> T0_CT_G08 1 0 1 1 0
#> T0_CT_G11 2 0 1 0 1
#> T0_CT_H02 2 0 1 0 1
#> T0_CT_H04 2 0 1 0 1
#> T0_CT_H05 2 0 1 0 1
#> T0_CT_H08 2 0 1 0 1
#> T0_CT_H09 2 0 1 0 1
#> T0_CT_H12 2 0 1 0 1
#> T24_CT_A05 1 0 1 1 0
#> T24_CT_B11 1 0 1 1 0
#> T24_CT_F12 1 0 1 1 0
#> T24_CT_H01 1 0 1 1 0
#> T48_CT_A07 1 0 1 1 0
#> T48_CT_E12 1 0 1 1 0
#> T48_CT_G10 1 0 1 1 0
#> T72_CT_B08 1 0 1 1 0
#> T72_CT_C11 1 0 1 1 0
#> T72_CT_G08 2 0 1 0 1
#> T72_CT_H05 1 0 1 1 0
#> T72_CT_H08 1 0 1 1 0
#> T72_CT_H09 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> T0_CT_A01 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_A03 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_A05 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_A06 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_A07 1 0.0892 0.949 0.98 0.00 0.02
#> T0_CT_A10 1 0.5406 0.722 0.78 0.20 0.02
#> T0_CT_A11 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_B01 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_B03 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_B05 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_B07 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_B08 3 0.0892 0.914 0.02 0.00 0.98
#> T0_CT_B09 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_C02 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_C07 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_C08 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_C12 1 0.0892 0.949 0.98 0.00 0.02
#> T0_CT_D01 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_D02 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_D03 3 0.2959 0.905 0.10 0.00 0.90
#> T0_CT_D05 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_D06 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_D07 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_D08 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_D12 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_E01 3 0.2959 0.881 0.10 0.00 0.90
#> T0_CT_E03 2 0.0892 0.977 0.02 0.98 0.00
#> T0_CT_E06 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_E07 1 0.2537 0.912 0.92 0.00 0.08
#> T0_CT_E08 3 0.0892 0.914 0.02 0.00 0.98
#> T0_CT_E09 2 0.2537 0.917 0.00 0.92 0.08
#> T0_CT_E10 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_E11 1 0.3340 0.879 0.88 0.00 0.12
#> T0_CT_E12 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_F01 1 0.0892 0.950 0.98 0.00 0.02
#> T0_CT_F02 1 0.3340 0.880 0.88 0.00 0.12
#> T0_CT_F03 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_F04 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_F05 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_F06 3 0.3686 0.886 0.14 0.00 0.86
#> T0_CT_F07 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_F11 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_F12 1 0.0000 0.959 1.00 0.00 0.00
#> T0_CT_G01 1 0.2537 0.908 0.92 0.00 0.08
#> T0_CT_G02 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_G03 2 0.1529 0.956 0.04 0.96 0.00
#> T0_CT_G04 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_G07 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_G08 3 0.0000 0.913 0.00 0.00 1.00
#> T0_CT_G11 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_H02 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_H04 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_H05 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_H08 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_H09 2 0.0000 0.995 0.00 1.00 0.00
#> T0_CT_H12 2 0.0000 0.995 0.00 1.00 0.00
#> T24_CT_A05 1 0.2066 0.926 0.94 0.00 0.06
#> T24_CT_B11 1 0.0000 0.959 1.00 0.00 0.00
#> T24_CT_F12 3 0.4555 0.859 0.20 0.00 0.80
#> T24_CT_H01 1 0.0000 0.959 1.00 0.00 0.00
#> T48_CT_A07 3 0.4002 0.884 0.16 0.00 0.84
#> T48_CT_E12 3 0.4796 0.832 0.22 0.00 0.78
#> T48_CT_G10 1 0.0000 0.959 1.00 0.00 0.00
#> T72_CT_B08 3 0.3686 0.894 0.14 0.00 0.86
#> T72_CT_C11 3 0.4555 0.859 0.20 0.00 0.80
#> T72_CT_G08 2 0.0000 0.995 0.00 1.00 0.00
#> T72_CT_H05 3 0.3686 0.894 0.14 0.00 0.86
#> T72_CT_H08 3 0.4555 0.859 0.20 0.00 0.80
#> T72_CT_H09 1 0.0000 0.959 1.00 0.00 0.00
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> T0_CT_A01 2 0.6855 0.594 0.04 0.62 0.06 0.28
#> T0_CT_A03 1 0.0707 0.820 0.98 0.00 0.02 0.00
#> T0_CT_A05 1 0.0707 0.820 0.98 0.00 0.02 0.00
#> T0_CT_A06 2 0.2345 0.870 0.00 0.90 0.00 0.10
#> T0_CT_A07 1 0.0707 0.820 0.98 0.00 0.02 0.00
#> T0_CT_A10 4 0.7414 -0.276 0.34 0.18 0.00 0.48
#> T0_CT_A11 2 0.2647 0.858 0.00 0.88 0.00 0.12
#> T0_CT_B01 2 0.0707 0.876 0.00 0.98 0.00 0.02
#> T0_CT_B03 3 0.0000 0.756 0.00 0.00 1.00 0.00
#> T0_CT_B05 2 0.2345 0.866 0.00 0.90 0.00 0.10
#> T0_CT_B07 2 0.2345 0.866 0.00 0.90 0.00 0.10
#> T0_CT_B08 3 0.2011 0.733 0.08 0.00 0.92 0.00
#> T0_CT_B09 1 0.0707 0.820 0.98 0.00 0.02 0.00
#> T0_CT_C02 3 0.0000 0.756 0.00 0.00 1.00 0.00
#> T0_CT_C07 2 0.3801 0.833 0.00 0.78 0.00 0.22
#> T0_CT_C08 1 0.4284 0.754 0.78 0.00 0.02 0.20
#> T0_CT_C12 1 0.0707 0.820 0.98 0.00 0.02 0.00
#> T0_CT_D01 2 0.2647 0.861 0.00 0.88 0.00 0.12
#> T0_CT_D02 2 0.1211 0.877 0.00 0.96 0.00 0.04
#> T0_CT_D03 3 0.4522 0.474 0.32 0.00 0.68 0.00
#> T0_CT_D05 2 0.2011 0.868 0.00 0.92 0.00 0.08
#> T0_CT_D06 3 0.1211 0.746 0.00 0.00 0.96 0.04
#> T0_CT_D07 2 0.3400 0.843 0.00 0.82 0.00 0.18
#> T0_CT_D08 3 0.0000 0.756 0.00 0.00 1.00 0.00
#> T0_CT_D12 1 0.4642 0.740 0.74 0.00 0.02 0.24
#> T0_CT_E01 3 0.4134 0.575 0.26 0.00 0.74 0.00
#> T0_CT_E03 2 0.4713 0.727 0.00 0.64 0.00 0.36
#> T0_CT_E06 2 0.4277 0.793 0.00 0.72 0.00 0.28
#> T0_CT_E07 1 0.6110 0.672 0.66 0.00 0.10 0.24
#> T0_CT_E08 3 0.2011 0.732 0.08 0.00 0.92 0.00
#> T0_CT_E09 2 0.7674 0.431 0.00 0.46 0.28 0.26
#> T0_CT_E10 2 0.2647 0.858 0.00 0.88 0.00 0.12
#> T0_CT_E11 1 0.6649 0.572 0.56 0.00 0.10 0.34
#> T0_CT_E12 2 0.3400 0.838 0.00 0.82 0.00 0.18
#> T0_CT_F01 1 0.4227 0.784 0.82 0.00 0.06 0.12
#> T0_CT_F02 1 0.5962 0.690 0.66 0.00 0.08 0.26
#> T0_CT_F03 1 0.2335 0.817 0.92 0.00 0.02 0.06
#> T0_CT_F04 1 0.4284 0.765 0.78 0.00 0.02 0.20
#> T0_CT_F05 2 0.2647 0.858 0.00 0.88 0.00 0.12
#> T0_CT_F06 3 0.5606 0.167 0.48 0.00 0.50 0.02
#> T0_CT_F07 2 0.2011 0.868 0.00 0.92 0.00 0.08
#> T0_CT_F11 2 0.2921 0.853 0.00 0.86 0.00 0.14
#> T0_CT_F12 1 0.1211 0.819 0.96 0.00 0.00 0.04
#> T0_CT_G01 1 0.0707 0.820 0.98 0.00 0.02 0.00
#> T0_CT_G02 2 0.1211 0.874 0.00 0.96 0.00 0.04
#> T0_CT_G03 2 0.5962 0.714 0.08 0.66 0.00 0.26
#> T0_CT_G04 3 0.1211 0.746 0.00 0.00 0.96 0.04
#> T0_CT_G07 3 0.0000 0.756 0.00 0.00 1.00 0.00
#> T0_CT_G08 3 0.1211 0.741 0.00 0.00 0.96 0.04
#> T0_CT_G11 2 0.0000 0.877 0.00 1.00 0.00 0.00
#> T0_CT_H02 2 0.1637 0.871 0.00 0.94 0.00 0.06
#> T0_CT_H04 2 0.3801 0.830 0.00 0.78 0.00 0.22
#> T0_CT_H05 2 0.0707 0.876 0.00 0.98 0.00 0.02
#> T0_CT_H08 2 0.2345 0.866 0.00 0.90 0.00 0.10
#> T0_CT_H09 2 0.1211 0.874 0.00 0.96 0.00 0.04
#> T0_CT_H12 2 0.0707 0.876 0.00 0.98 0.00 0.02
#> T24_CT_A05 1 0.6879 0.486 0.52 0.02 0.06 0.40
#> T24_CT_B11 1 0.0000 0.816 1.00 0.00 0.00 0.00
#> T24_CT_F12 4 0.7544 0.699 0.20 0.00 0.34 0.46
#> T24_CT_H01 1 0.0000 0.816 1.00 0.00 0.00 0.00
#> T48_CT_A07 3 0.7869 -0.459 0.34 0.00 0.38 0.28
#> T48_CT_E12 4 0.7550 0.687 0.22 0.00 0.30 0.48
#> T48_CT_G10 1 0.3172 0.753 0.84 0.00 0.00 0.16
#> T72_CT_B08 4 0.7581 0.687 0.20 0.00 0.36 0.44
#> T72_CT_C11 4 0.7654 0.703 0.22 0.00 0.34 0.44
#> T72_CT_G08 2 0.2647 0.841 0.00 0.88 0.00 0.12
#> T72_CT_H05 4 0.7581 0.687 0.20 0.00 0.36 0.44
#> T72_CT_H08 4 0.7654 0.703 0.22 0.00 0.34 0.44
#> T72_CT_H09 4 0.6831 0.416 0.42 0.00 0.10 0.48
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
As soon as the classes for columns are determined, the signatures that are significantly different between subgroups can be looked for. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. To get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows (which is done by automatically selecting number of clusters).If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs:
# code only for demonstration
# e.g. to show the top 500 most significant rows
tb = get_signature(res, k = ..., top_signatures = 500)
If the signatures are defined as these which are uniquely high in current group, diff_method
argument
can be set to "uniquely_high_in_one_group"
:
# code only for demonstration
tb = get_signature(res, k = ..., diff_method = "uniquely_high_in_one_group")
UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n_sample Hours(p-value) Media(p-value) State(p-value) k
#> ATC:skmeans 69 3.34e-02 9.92e-03 0.895 2
#> ATC:skmeans 69 3.53e-02 1.19e-02 0.497 3
#> ATC:skmeans 62 1.24e-06 6.19e-08 0.745 4
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
Parent node: Node03. Child nodes: Node0121-leaf , Node0122-leaf , Node0123-leaf , Node0311-leaf , Node0312-leaf , Node0313-leaf .
The object with results only for a single top-value method and a single partitioning method can be extracted as:
res = res_rh["031"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4.
#> On a matrix with 11354 rows and 39 columns.
#> Top rows (1040) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 150 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_partitions"
#> [7] "compare_signatures" "consensus_heatmap" "dimension_reduction"
#> [10] "functional_enrichment" "get_anno_col" "get_anno"
#> [13] "get_classes" "get_consensus" "get_matrix"
#> [16] "get_membership" "get_param" "get_signatures"
#> [19] "get_stats" "is_best_k" "is_stable_k"
#> [22] "membership_heatmap" "ncol" "nrow"
#> [25] "plot_ecdf" "predict_classes" "rownames"
#> [28] "select_partition_number" "show" "suggest_best_k"
#> [31] "test_to_known_factors" "top_rows_heatmap"
collect_plots()
function collects all the plots made from res
for all k
(number of subgroups)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, higher 1-PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.979 0.981 0.512 0.487 0.487
#> 3 3 1.000 0.991 0.996 0.257 0.852 0.701
#> 4 4 0.896 0.908 0.951 0.178 0.887 0.683
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following is the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall subgroup
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> T0_CT_A03 2 0.242 0.982 0.04 0.96
#> T0_CT_A05 2 0.000 0.974 0.00 1.00
#> T0_CT_A07 2 0.000 0.974 0.00 1.00
#> T0_CT_B03 1 0.000 0.984 1.00 0.00
#> T0_CT_B08 1 0.000 0.984 1.00 0.00
#> T0_CT_B09 2 0.000 0.974 0.00 1.00
#> T0_CT_C02 1 0.000 0.984 1.00 0.00
#> T0_CT_C08 2 0.242 0.982 0.04 0.96
#> T0_CT_C12 2 0.242 0.982 0.04 0.96
#> T0_CT_D03 1 0.000 0.984 1.00 0.00
#> T0_CT_D06 1 0.000 0.984 1.00 0.00
#> T0_CT_D08 1 0.000 0.984 1.00 0.00
#> T0_CT_D12 2 0.242 0.982 0.04 0.96
#> T0_CT_E01 1 0.000 0.984 1.00 0.00
#> T0_CT_E07 2 0.242 0.982 0.04 0.96
#> T0_CT_E08 1 0.000 0.984 1.00 0.00
#> T0_CT_E11 2 0.242 0.982 0.04 0.96
#> T0_CT_F01 2 0.242 0.982 0.04 0.96
#> T0_CT_F02 2 0.242 0.982 0.04 0.96
#> T0_CT_F03 2 0.242 0.982 0.04 0.96
#> T0_CT_F04 2 0.242 0.982 0.04 0.96
#> T0_CT_F06 1 0.000 0.984 1.00 0.00
#> T0_CT_F12 2 0.242 0.982 0.04 0.96
#> T0_CT_G01 2 0.242 0.982 0.04 0.96
#> T0_CT_G04 1 0.000 0.984 1.00 0.00
#> T0_CT_G07 1 0.000 0.984 1.00 0.00
#> T0_CT_G08 1 0.000 0.984 1.00 0.00
#> T24_CT_A05 2 0.000 0.974 0.00 1.00
#> T24_CT_B11 2 0.000 0.974 0.00 1.00
#> T24_CT_F12 1 0.242 0.972 0.96 0.04
#> T24_CT_H01 2 0.000 0.974 0.00 1.00
#> T48_CT_A07 1 0.242 0.972 0.96 0.04
#> T48_CT_E12 1 0.242 0.972 0.96 0.04
#> T48_CT_G10 2 0.000 0.974 0.00 1.00
#> T72_CT_B08 1 0.242 0.972 0.96 0.04
#> T72_CT_C11 1 0.242 0.972 0.96 0.04
#> T72_CT_H05 1 0.242 0.972 0.96 0.04
#> T72_CT_H08 1 0.242 0.972 0.96 0.04
#> T72_CT_H09 2 0.000 0.974 0.00 1.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> T0_CT_A03 2 0.0 0.99 0.00 1.00 0
#> T0_CT_A05 2 0.0 0.99 0.00 1.00 0
#> T0_CT_A07 2 0.0 0.99 0.00 1.00 0
#> T0_CT_B03 1 0.0 1.00 1.00 0.00 0
#> T0_CT_B08 1 0.0 1.00 1.00 0.00 0
#> T0_CT_B09 2 0.0 0.99 0.00 1.00 0
#> T0_CT_C02 1 0.0 1.00 1.00 0.00 0
#> T0_CT_C08 2 0.0 0.99 0.00 1.00 0
#> T0_CT_C12 2 0.0 0.99 0.00 1.00 0
#> T0_CT_D03 1 0.0 1.00 1.00 0.00 0
#> T0_CT_D06 1 0.0 1.00 1.00 0.00 0
#> T0_CT_D08 1 0.0 1.00 1.00 0.00 0
#> T0_CT_D12 2 0.0 0.99 0.00 1.00 0
#> T0_CT_E01 1 0.0 1.00 1.00 0.00 0
#> T0_CT_E07 2 0.0 0.99 0.00 1.00 0
#> T0_CT_E08 1 0.0 1.00 1.00 0.00 0
#> T0_CT_E11 2 0.4 0.81 0.16 0.84 0
#> T0_CT_F01 2 0.0 0.99 0.00 1.00 0
#> T0_CT_F02 2 0.0 0.99 0.00 1.00 0
#> T0_CT_F03 2 0.0 0.99 0.00 1.00 0
#> T0_CT_F04 2 0.0 0.99 0.00 1.00 0
#> T0_CT_F06 1 0.0 1.00 1.00 0.00 0
#> T0_CT_F12 2 0.0 0.99 0.00 1.00 0
#> T0_CT_G01 2 0.0 0.99 0.00 1.00 0
#> T0_CT_G04 1 0.0 1.00 1.00 0.00 0
#> T0_CT_G07 1 0.0 1.00 1.00 0.00 0
#> T0_CT_G08 1 0.0 1.00 1.00 0.00 0
#> T24_CT_A05 2 0.0 0.99 0.00 1.00 0
#> T24_CT_B11 2 0.0 0.99 0.00 1.00 0
#> T24_CT_F12 3 0.0 1.00 0.00 0.00 1
#> T24_CT_H01 2 0.0 0.99 0.00 1.00 0
#> T48_CT_A07 3 0.0 1.00 0.00 0.00 1
#> T48_CT_E12 3 0.0 1.00 0.00 0.00 1
#> T48_CT_G10 2 0.0 0.99 0.00 1.00 0
#> T72_CT_B08 3 0.0 1.00 0.00 0.00 1
#> T72_CT_C11 3 0.0 1.00 0.00 0.00 1
#> T72_CT_H05 3 0.0 1.00 0.00 0.00 1
#> T72_CT_H08 3 0.0 1.00 0.00 0.00 1
#> T72_CT_H09 3 0.0 1.00 0.00 0.00 1
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> T0_CT_A03 2 0.3801 0.777 0.00 0.78 0 0.22
#> T0_CT_A05 4 0.0707 0.916 0.00 0.02 0 0.98
#> T0_CT_A07 4 0.3172 0.767 0.00 0.16 0 0.84
#> T0_CT_B03 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_B08 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_B09 4 0.0000 0.923 0.00 0.00 0 1.00
#> T0_CT_C02 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_C08 2 0.0000 0.862 0.00 1.00 0 0.00
#> T0_CT_C12 2 0.3975 0.755 0.00 0.76 0 0.24
#> T0_CT_D03 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_D06 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_D08 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_D12 2 0.1211 0.848 0.00 0.96 0 0.04
#> T0_CT_E01 1 0.1637 0.937 0.94 0.06 0 0.00
#> T0_CT_E07 2 0.0000 0.862 0.00 1.00 0 0.00
#> T0_CT_E08 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_E11 2 0.0000 0.862 0.00 1.00 0 0.00
#> T0_CT_F01 2 0.2345 0.851 0.00 0.90 0 0.10
#> T0_CT_F02 2 0.0000 0.862 0.00 1.00 0 0.00
#> T0_CT_F03 2 0.1637 0.858 0.00 0.94 0 0.06
#> T0_CT_F04 2 0.2011 0.830 0.00 0.92 0 0.08
#> T0_CT_F06 1 0.1211 0.957 0.96 0.04 0 0.00
#> T0_CT_F12 2 0.4994 0.274 0.00 0.52 0 0.48
#> T0_CT_G01 2 0.3610 0.790 0.00 0.80 0 0.20
#> T0_CT_G04 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_G07 1 0.0000 0.990 1.00 0.00 0 0.00
#> T0_CT_G08 1 0.0000 0.990 1.00 0.00 0 0.00
#> T24_CT_A05 4 0.3172 0.790 0.00 0.16 0 0.84
#> T24_CT_B11 4 0.0707 0.923 0.00 0.02 0 0.98
#> T24_CT_F12 3 0.0000 1.000 0.00 0.00 1 0.00
#> T24_CT_H01 4 0.0000 0.923 0.00 0.00 0 1.00
#> T48_CT_A07 3 0.0000 1.000 0.00 0.00 1 0.00
#> T48_CT_E12 3 0.0000 1.000 0.00 0.00 1 0.00
#> T48_CT_G10 4 0.0707 0.923 0.00 0.02 0 0.98
#> T72_CT_B08 3 0.0000 1.000 0.00 0.00 1 0.00
#> T72_CT_C11 3 0.0000 1.000 0.00 0.00 1 0.00
#> T72_CT_H05 3 0.0000 1.000 0.00 0.00 1 0.00
#> T72_CT_H08 3 0.0000 1.000 0.00 0.00 1 0.00
#> T72_CT_H09 3 0.0000 1.000 0.00 0.00 1 0.00
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
As soon as the classes for columns are determined, the signatures that are significantly different between subgroups can be looked for. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. To get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows (which is done by automatically selecting number of clusters).If there are too many signatures, top_signatures = ...
can be set to only show the
signatures with the highest FDRs:
# code only for demonstration
# e.g. to show the top 500 most significant rows
tb = get_signature(res, k = ..., top_signatures = 500)
If the signatures are defined as these which are uniquely high in current group, diff_method
argument
can be set to "uniquely_high_in_one_group"
:
# code only for demonstration
tb = get_signature(res, k = ..., diff_method = "uniquely_high_in_one_group")
UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n_sample Hours(p-value) Media(p-value) State(p-value) k
#> ATC:skmeans 39 3.28e-01 6.50e-01 NA 2
#> ATC:skmeans 39 1.13e-05 5.63e-06 NA 3
#> ATC:skmeans 38 2.36e-06 1.34e-06 NA 4
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
sessionInfo()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#>
#> Matrix products: default
#> BLAS/LAPACK: /usr/lib64/libopenblas-r0.3.3.so
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
#> [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
#> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
#> [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] grid stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] genefilter_1.74.0 ComplexHeatmap_2.8.0 markdown_1.1 knitr_1.33
#> [5] HSMMSingleCell_1.12.0 RColorBrewer_1.1-2 cola_1.9.4
#>
#> loaded via a namespace (and not attached):
#> [1] colorspace_2.0-2 rjson_0.2.20 ellipsis_0.3.2 mclust_5.4.7
#> [5] circlize_0.4.13 XVector_0.32.0 GlobalOptions_0.1.2 clue_0.3-59
#> [9] rstudioapi_0.13 bit64_4.0.5 AnnotationDbi_1.54.1 Polychrome_1.3.1
#> [13] RSpectra_0.16-0 fansi_0.5.0 xml2_1.3.2 codetools_0.2-18
#> [17] splines_4.1.0 doParallel_1.0.16 cachem_1.0.5 impute_1.66.0
#> [21] polyclip_1.10-0 jsonlite_1.7.2 Cairo_1.5-12.2 umap_0.2.7.0
#> [25] annotate_1.70.0 cluster_2.1.2 png_0.1-7 data.tree_1.0.0
#> [29] compiler_4.1.0 httr_1.4.2 assertthat_0.2.1 Matrix_1.3-4
#> [33] fastmap_1.1.0 tools_4.1.0 gtable_0.3.0 glue_1.4.2
#> [37] GenomeInfoDbData_1.2.6 dplyr_1.0.7 Rcpp_1.0.7 slam_0.1-48
#> [41] Biobase_2.52.0 eulerr_6.1.0 vctrs_0.3.8 Biostrings_2.60.1
#> [45] iterators_1.0.13 polylabelr_0.2.0 xfun_0.24 stringr_1.4.0
#> [49] lifecycle_1.0.0 irlba_2.3.3 XML_3.99-0.6 dendextend_1.15.1
#> [53] zlibbioc_1.38.0 scales_1.1.1 microbenchmark_1.4-7 parallel_4.1.0
#> [57] memoise_2.0.0 reticulate_1.20 gridExtra_2.3 ggplot2_3.3.5
#> [61] stringi_1.7.3 RSQLite_2.2.7 highr_0.9 S4Vectors_0.30.0
#> [65] foreach_1.5.1 BiocGenerics_0.38.0 shape_1.4.6 GenomeInfoDb_1.28.1
#> [69] rlang_0.4.11 pkgconfig_2.0.3 matrixStats_0.59.0 bitops_1.0-7
#> [73] evaluate_0.14 lattice_0.20-44 purrr_0.3.4 bit_4.0.4
#> [77] tidyselect_1.1.1 magrittr_2.0.1 R6_2.5.0 IRanges_2.26.0
#> [81] generics_0.1.0 DBI_1.1.1 pillar_1.6.1 survival_3.2-11
#> [85] KEGGREST_1.32.0 scatterplot3d_0.3-41 RCurl_1.98-1.3 tibble_3.1.2
#> [89] crayon_1.4.1 utf8_1.2.1 skmeans_0.2-13 viridis_0.6.1
#> [93] GetoptLong_1.0.5 blob_1.2.1 digest_0.6.27 xtable_1.8-4
#> [97] brew_1.0-6 openssl_1.4.4 stats4_4.1.0 munsell_0.5.0
#> [101] viridisLite_0.4.0 askpass_1.1