cola Report for Hierarchical Partitioning - 'PollenGlia'

Date: 2021-07-26 10:23:01 CEST, cola version: 1.9.4

Document is loading...


Summary

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 9856 rows and 367 columns.
#>   Performed in total 1650 partitions.
#>   There are 7 groups under the following parameters:
#>     - min_samples: 6
#>     - mean_silhouette_cutoff: 0.9
#>     - min_n_signatures: 203 (signatures are selected based on:)
#>       - fdr_cutoff: 0.05
#>       - group_diff (scaled values): 0.5
#> 
#> Hierarchy of the partition:
#>   0, 367 cols
#>   |-- 01, 129 cols, 1046 signatures
#>   |   |-- 011, 44 cols, 33 signatures (c)
#>   |   |-- 012, 45 cols, 8 signatures (c)
#>   |   `-- 013, 40 cols, 44 signatures (c)
#>   |-- 02, 112 cols, 597 signatures
#>   |   |-- 021, 64 cols, 26 signatures (c)
#>   |   `-- 022, 48 cols, 177 signatures (c)
#>   `-- 03, 126 cols, 329 signatures
#>       |-- 031, 64 cols, 5 signatures (c)
#>       `-- 032, 62 cols, 5 signatures (c)
#> Stop reason:
#>   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 = lt$mat, anno = lt$anno, subset = 500, cores = 4)

Dimension of the input matrix:

mat = get_matrix(res_rh)
dim(mat)
#> [1] 9856  367

All the methods that were tried:

res_rh@param$combination_method
#> [[1]]
#> [1] "ATC"     "skmeans"

Density distribution

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)

plot of chunk density-heatmap

Some values about the hierarchy:

all_nodes(res_rh)
#>  [1] "0"   "01"  "011" "012" "013" "02"  "021" "022" "03"  "031" "032"
all_leaves(res_rh)
#> [1] "011" "012" "013" "021" "022" "031" "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       367         4074     0.413352   FALSE
#> 2   01 ATC:skmeans     2      3       129         1046     0.106128   FALSE
#> 3  011 ATC:skmeans     3      2        44           33     0.003348    TRUE
#> 4  012 ATC:skmeans     3      2        45            8     0.000812    TRUE
#> 5  013 ATC:skmeans     3      2        40           44     0.004464    TRUE
#> 6   02 ATC:skmeans     2      2       112          597     0.060572   FALSE
#> 7  021 ATC:skmeans     3      2        64           26     0.002638    TRUE
#> 8  022 ATC:skmeans     3      3        48          177     0.017959    TRUE
#> 9   03 ATC:skmeans     2      2       126          329     0.033381   FALSE
#> 10 031 ATC:skmeans     3      2        64            5     0.000507    TRUE
#> 11 032 ATC:skmeans     3      2        62            5     0.000507    TRUE

In the output from node_info(), there are the following columns:

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.

Suggest the best k

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 4 0.98 0.95 0.96 367 **
Node01 ATC:skmeans 3 1.00 0.98 0.99 129 **
Node011-leaf ATC:skmeans ✓ (c) 2 0.95 0.96 0.98 44 **
Node012-leaf ATC:skmeans ✓ (c) 2 0.91 0.92 0.97 45 *
Node013-leaf ATC:skmeans ✓ (c) 2 0.95 0.96 0.98 40 *
Node02 ATC:skmeans 2 1.00 0.97 0.99 112 **
Node021-leaf ATC:skmeans ✓ (c) 2 1.00 0.97 0.99 64 **
Node022-leaf ATC:skmeans ✓ (c) 3 1.00 0.99 0.99 48 **
Node03 ATC:skmeans 2 1.00 0.97 0.99 126 **
Node031-leaf ATC:skmeans ✓ (c) 2 1.00 0.94 0.98 64 **
Node032-leaf ATC:skmeans ✓ (c) 2 0.93 0.94 0.98 62 *

Stop reason: c) There were too few signatures.

**: 1-PAC > 0.95, *: 1-PAC > 0.9

Partition hierarchy

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 = 329))

plot of chunk tab-collect-classes-from-hierarchical-partition-1

collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 597))

plot of chunk tab-collect-classes-from-hierarchical-partition-2

collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 1046))

plot of chunk tab-collect-classes-from-hierarchical-partition-3

collect_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 4074))

plot of chunk tab-collect-classes-from-hierarchical-partition-4

Following shows the table of the partitions (You need to click the show/hide code output link to see it).

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 329))
#>  O10-A1 O10-A11 O10-A12  O10-A3  O10-A4  O10-A5  O10-A7  O10-A8  O10-A9  O10-B1 O10-B10 O10-B11 
#>   "022"   "031"   "022"   "012"   "021"   "032"   "032"   "032"   "013"   "011"   "032"   "032" 
#> O10-B12  O10-B2  O10-B5  O10-B6  O10-B7  O10-B9 O10-C10 O10-C11 O10-C12  O10-C2  O10-C4  O10-C5 
#>   "013"   "032"   "032"   "031"   "032"   "032"   "032"   "013"   "032"   "013"   "022"   "032" 
#>  O10-C6  O10-C9  O10-D1 O10-D11 O10-D12  O10-D2  O10-D3  O10-D5  O10-D6  O10-D8  O10-D9  O10-E1 
#>   "032"   "032"   "032"   "032"   "032"   "012"   "021"   "032"   "032"   "013"   "032"   "032" 
#> O10-E11 O10-E12  O10-E6  O10-E8  O10-E9  O10-F1 O10-F11 O10-F12  O10-F2  O10-F4  O10-F5  O10-F6 
#>   "032"   "032"   "032"   "012"   "013"   "031"   "031"   "032"   "013"   "012"   "031"   "021" 
#>  O10-F8  O10-F9  O10-G1 O10-G12  O10-G2  O10-G3  O10-G4  O10-G5  O10-G7  O10-H1  O10-H4  O10-H5 
#>   "012"   "032"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011" 
#>  O10-H6  O10-H7  O12-A1 O12-A12  O12-A2  O12-A3  O12-B1 O12-B12  O12-C1  O12-D1  O12-D2  O12-E1 
#>   "011"   "011"   "021"   "021"   "012"   "021"   "022"   "031"   "022"   "022"   "011"   "011" 
#> O12-E12 O12-F12  O12-F2  O12-G2  O12-H1  O12-H2   O7-A3   O7-A5   O7-A7   O7-A8   O7-A9   O7-B1 
#>   "021"   "031"   "021"   "022"   "021"   "022"   "032"   "022"   "022"   "021"   "031"   "021" 
#>  O7-B11  O7-B12   O7-B6   O7-B7   O7-B8   O7-B9   O7-C1  O7-C11   O7-C2   O7-C3   O7-C6   O7-C7 
#>   "032"   "022"   "032"   "032"   "022"   "021"   "031"   "032"   "022"   "022"   "021"   "032" 
#>   O7-D1  O7-D11  O7-D12   O7-D2   O7-D3   O7-D4   O7-D5  O7-E10  O7-E11   O7-E5   O7-E6   O7-F1 
#>   "021"   "021"   "021"   "021"   "012"   "031"   "013"   "032"   "032"   "021"   "022"   "021" 
#>  O7-F10  O7-F11   O7-F2   O7-F3   O7-F4   O7-F7   O7-F9  O7-G12   O7-G3   O7-G9   O7-H3   O7-H4 
#>   "022"   "021"   "031"   "031"   "021"   "032"   "032"   "022"   "011"   "022"   "021"   "022" 
#>   O7-H8   O8-A2   O8-A3   O8-A5   O8-A8   O8-A9   O8-B1   O8-B2   O8-B4   O8-B6   O8-B7   O8-B9 
#>   "022"   "031"   "032"   "022"   "032"   "021"   "022"   "031"   "032"   "032"   "032"   "032" 
#>  O8-C11  O8-C12   O8-C2   O8-C3   O8-C4   O8-C5   O8-C6   O8-C8   O8-D3   O8-D5   O8-D6   O8-D9 
#>   "031"   "032"   "021"   "031"   "031"   "032"   "032"   "032"   "031"   "031"   "031"   "031" 
#>   O8-E1  O8-E11   O8-E2   O8-E3   O8-E5   O8-E7   O8-E9  O8-F10  O8-F11  O8-F12   O8-F2   O8-F3 
#>   "012"   "032"   "031"   "021"   "031"   "022"   "032"   "011"   "032"   "032"   "022"   "032" 
#>   O8-F6   O8-F8   O8-F9   O8-G1  O8-G12   O8-G5   O8-G9   O8-H1  O8-H11   O8-H2   O8-H6  O9-A10 
#>   "022"   "021"   "011"   "031"   "032"   "032"   "011"   "011"   "022"   "021"   "012"   "031" 
#>  O9-A12   O9-A2   O9-A3   O9-A5   O9-A6   O9-A8   O9-A9  O9-B10  O9-B11  O9-B12   O9-B2   O9-B3 
#>   "022"   "013"   "022"   "021"   "021"   "031"   "013"   "013"   "013"   "031"   "031"   "013" 
#>   O9-B5   O9-B6   O9-B7   O9-B8  O9-C10   O9-C2   O9-C3   O9-C4   O9-C5   O9-C6   O9-C9   O9-D1 
#>   "021"   "031"   "031"   "021"   "013"   "031"   "013"   "031"   "013"   "031"   "013"   "013" 
#>  O9-D10  O9-D11  O9-D12   O9-D2   O9-D5   O9-D6   O9-D7   O9-D8   O9-E1  O9-E10  O9-E11  O9-E12 
#>   "011"   "013"   "031"   "021"   "012"   "031"   "022"   "022"   "022"   "013"   "011"   "031" 
#>   O9-E2   O9-E4   O9-E5   O9-E7   O9-E8   O9-E9   O9-F1  O9-F10  O9-F12   O9-F2   O9-F4   O9-F5 
#>   "021"   "031"   "013"   "013"   "011"   "013"   "021"   "013"   "013"   "013"   "021"   "021" 
#>   O9-F9  O9-G10  O9-G12   O9-G2   O9-G3   O9-G4   O9-G6   O9-G7   O9-G9  O9-H12   O9-H3   O9-H5 
#>   "031"   "011"   "013"   "013"   "031"   "011"   "013"   "031"   "021"   "022"   "013"   "022" 
#>   O9-H9  S37-A1 S37-A10  S37-A2  S37-A3  S37-A4  S37-A5  S37-A6  S37-A7  S37-A8  S37-A9  S37-B1 
#>   "011"   "012"   "012"   "022"   "012"   "031"   "021"   "021"   "031"   "022"   "011"   "013" 
#> S37-B10 S37-B11 S37-B12  S37-B2  S37-B3  S37-B4  S37-B5  S37-B6  S37-B7  S37-B9 S37-C10 S37-C12 
#>   "012"   "021"   "022"   "012"   "031"   "013"   "031"   "031"   "012"   "031"   "012"   "022" 
#>  S37-C3  S37-C4  S37-C6  S37-C7  S37-C8  S37-C9 S37-D10 S37-D11 S37-D12  S37-D2  S37-D4  S37-D6 
#>   "012"   "011"   "012"   "012"   "021"   "011"   "012"   "031"   "021"   "012"   "012"   "012" 
#>  S37-D8  S37-D9  S37-E1 S37-E10 S37-E11  S37-E2  S37-E3  S37-E5  S37-E6  S37-E7  S37-E8  S37-E9 
#>   "012"   "031"   "012"   "031"   "012"   "012"   "012"   "031"   "013"   "021"   "021"   "012" 
#>  S37-F1 S37-F10 S37-F12  S37-F2  S37-F3  S37-F5  S37-F7  S37-F9  S37-G1 S37-G10 S37-G12  S37-G2 
#>   "011"   "011"   "013"   "012"   "013"   "011"   "012"   "012"   "012"   "012"   "012"   "022" 
#>  S37-G3  S37-G4  S37-G5  S37-G6  S37-G7  S37-G8  S37-H2  S37-H4  S37-H7  S37-H8  S37-H9  S38-A1 
#>   "012"   "022"   "031"   "012"   "012"   "031"   "011"   "031"   "012"   "011"   "011"   "011" 
#> S38-A10 S38-A12  S38-A2  S38-A3  S38-A5  S38-A9 S38-B10 S38-B11  S38-B2  S38-B6  S38-B7  S38-B8 
#>   "011"   "022"   "021"   "031"   "021"   "021"   "032"   "013"   "021"   "011"   "021"   "021" 
#>  S38-B9  S38-C1 S38-C10 S38-C11  S38-C3  S38-C4  S38-C5  S38-C6  S38-C7  S38-C9  S38-D1 S38-D10 
#>   "022"   "032"   "032"   "032"   "021"   "012"   "032"   "031"   "031"   "022"   "021"   "032" 
#> S38-D11 S38-D12  S38-D2  S38-D4  S38-D5  S38-D6  S38-D7  S38-D8  S38-D9  S38-E1  S38-E2  S38-E3 
#>   "032"   "011"   "013"   "031"   "021"   "021"   "031"   "011"   "012"   "021"   "031"   "031" 
#>  S38-E4  S38-E5  S38-E6  S38-E7  S38-E8  S38-E9 S38-F10 S38-F11  S38-F2  S38-F3  S38-F5  S38-F6 
#>   "021"   "022"   "022"   "021"   "031"   "022"   "013"   "012"   "021"   "011"   "022"   "021" 
#>  S38-F7  S38-F8  S38-F9 S38-G10 S38-G12  S38-G4  S38-G5  S38-G6  S38-G7  S38-G8  S38-G9  S38-H1 
#>   "031"   "021"   "013"   "011"   "011"   "021"   "021"   "022"   "032"   "031"   "032"   "011" 
#> S38-H11  S38-H2  S38-H3  S38-H4  S38-H5  S38-H6  S38-H8 
#>   "013"   "021"   "031"   "012"   "022"   "021"   "012"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 597))
#>  O10-A1 O10-A11 O10-A12  O10-A3  O10-A4  O10-A5  O10-A7  O10-A8  O10-A9  O10-B1 O10-B10 O10-B11 
#>   "022"    "03"   "022"   "012"   "021"    "03"    "03"    "03"   "013"   "011"    "03"    "03" 
#> O10-B12  O10-B2  O10-B5  O10-B6  O10-B7  O10-B9 O10-C10 O10-C11 O10-C12  O10-C2  O10-C4  O10-C5 
#>   "013"    "03"    "03"    "03"    "03"    "03"    "03"   "013"    "03"   "013"   "022"    "03" 
#>  O10-C6  O10-C9  O10-D1 O10-D11 O10-D12  O10-D2  O10-D3  O10-D5  O10-D6  O10-D8  O10-D9  O10-E1 
#>    "03"    "03"    "03"    "03"    "03"   "012"   "021"    "03"    "03"   "013"    "03"    "03" 
#> O10-E11 O10-E12  O10-E6  O10-E8  O10-E9  O10-F1 O10-F11 O10-F12  O10-F2  O10-F4  O10-F5  O10-F6 
#>    "03"    "03"    "03"   "012"   "013"    "03"    "03"    "03"   "013"   "012"    "03"   "021" 
#>  O10-F8  O10-F9  O10-G1 O10-G12  O10-G2  O10-G3  O10-G4  O10-G5  O10-G7  O10-H1  O10-H4  O10-H5 
#>   "012"    "03"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011" 
#>  O10-H6  O10-H7  O12-A1 O12-A12  O12-A2  O12-A3  O12-B1 O12-B12  O12-C1  O12-D1  O12-D2  O12-E1 
#>   "011"   "011"   "021"   "021"   "012"   "021"   "022"    "03"   "022"   "022"   "011"   "011" 
#> O12-E12 O12-F12  O12-F2  O12-G2  O12-H1  O12-H2   O7-A3   O7-A5   O7-A7   O7-A8   O7-A9   O7-B1 
#>   "021"    "03"   "021"   "022"   "021"   "022"    "03"   "022"   "022"   "021"    "03"   "021" 
#>  O7-B11  O7-B12   O7-B6   O7-B7   O7-B8   O7-B9   O7-C1  O7-C11   O7-C2   O7-C3   O7-C6   O7-C7 
#>    "03"   "022"    "03"    "03"   "022"   "021"    "03"    "03"   "022"   "022"   "021"    "03" 
#>   O7-D1  O7-D11  O7-D12   O7-D2   O7-D3   O7-D4   O7-D5  O7-E10  O7-E11   O7-E5   O7-E6   O7-F1 
#>   "021"   "021"   "021"   "021"   "012"    "03"   "013"    "03"    "03"   "021"   "022"   "021" 
#>  O7-F10  O7-F11   O7-F2   O7-F3   O7-F4   O7-F7   O7-F9  O7-G12   O7-G3   O7-G9   O7-H3   O7-H4 
#>   "022"   "021"    "03"    "03"   "021"    "03"    "03"   "022"   "011"   "022"   "021"   "022" 
#>   O7-H8   O8-A2   O8-A3   O8-A5   O8-A8   O8-A9   O8-B1   O8-B2   O8-B4   O8-B6   O8-B7   O8-B9 
#>   "022"    "03"    "03"   "022"    "03"   "021"   "022"    "03"    "03"    "03"    "03"    "03" 
#>  O8-C11  O8-C12   O8-C2   O8-C3   O8-C4   O8-C5   O8-C6   O8-C8   O8-D3   O8-D5   O8-D6   O8-D9 
#>    "03"    "03"   "021"    "03"    "03"    "03"    "03"    "03"    "03"    "03"    "03"    "03" 
#>   O8-E1  O8-E11   O8-E2   O8-E3   O8-E5   O8-E7   O8-E9  O8-F10  O8-F11  O8-F12   O8-F2   O8-F3 
#>   "012"    "03"    "03"   "021"    "03"   "022"    "03"   "011"    "03"    "03"   "022"    "03" 
#>   O8-F6   O8-F8   O8-F9   O8-G1  O8-G12   O8-G5   O8-G9   O8-H1  O8-H11   O8-H2   O8-H6  O9-A10 
#>   "022"   "021"   "011"    "03"    "03"    "03"   "011"   "011"   "022"   "021"   "012"    "03" 
#>  O9-A12   O9-A2   O9-A3   O9-A5   O9-A6   O9-A8   O9-A9  O9-B10  O9-B11  O9-B12   O9-B2   O9-B3 
#>   "022"   "013"   "022"   "021"   "021"    "03"   "013"   "013"   "013"    "03"    "03"   "013" 
#>   O9-B5   O9-B6   O9-B7   O9-B8  O9-C10   O9-C2   O9-C3   O9-C4   O9-C5   O9-C6   O9-C9   O9-D1 
#>   "021"    "03"    "03"   "021"   "013"    "03"   "013"    "03"   "013"    "03"   "013"   "013" 
#>  O9-D10  O9-D11  O9-D12   O9-D2   O9-D5   O9-D6   O9-D7   O9-D8   O9-E1  O9-E10  O9-E11  O9-E12 
#>   "011"   "013"    "03"   "021"   "012"    "03"   "022"   "022"   "022"   "013"   "011"    "03" 
#>   O9-E2   O9-E4   O9-E5   O9-E7   O9-E8   O9-E9   O9-F1  O9-F10  O9-F12   O9-F2   O9-F4   O9-F5 
#>   "021"    "03"   "013"   "013"   "011"   "013"   "021"   "013"   "013"   "013"   "021"   "021" 
#>   O9-F9  O9-G10  O9-G12   O9-G2   O9-G3   O9-G4   O9-G6   O9-G7   O9-G9  O9-H12   O9-H3   O9-H5 
#>    "03"   "011"   "013"   "013"    "03"   "011"   "013"    "03"   "021"   "022"   "013"   "022" 
#>   O9-H9  S37-A1 S37-A10  S37-A2  S37-A3  S37-A4  S37-A5  S37-A6  S37-A7  S37-A8  S37-A9  S37-B1 
#>   "011"   "012"   "012"   "022"   "012"    "03"   "021"   "021"    "03"   "022"   "011"   "013" 
#> S37-B10 S37-B11 S37-B12  S37-B2  S37-B3  S37-B4  S37-B5  S37-B6  S37-B7  S37-B9 S37-C10 S37-C12 
#>   "012"   "021"   "022"   "012"    "03"   "013"    "03"    "03"   "012"    "03"   "012"   "022" 
#>  S37-C3  S37-C4  S37-C6  S37-C7  S37-C8  S37-C9 S37-D10 S37-D11 S37-D12  S37-D2  S37-D4  S37-D6 
#>   "012"   "011"   "012"   "012"   "021"   "011"   "012"    "03"   "021"   "012"   "012"   "012" 
#>  S37-D8  S37-D9  S37-E1 S37-E10 S37-E11  S37-E2  S37-E3  S37-E5  S37-E6  S37-E7  S37-E8  S37-E9 
#>   "012"    "03"   "012"    "03"   "012"   "012"   "012"    "03"   "013"   "021"   "021"   "012" 
#>  S37-F1 S37-F10 S37-F12  S37-F2  S37-F3  S37-F5  S37-F7  S37-F9  S37-G1 S37-G10 S37-G12  S37-G2 
#>   "011"   "011"   "013"   "012"   "013"   "011"   "012"   "012"   "012"   "012"   "012"   "022" 
#>  S37-G3  S37-G4  S37-G5  S37-G6  S37-G7  S37-G8  S37-H2  S37-H4  S37-H7  S37-H8  S37-H9  S38-A1 
#>   "012"   "022"    "03"   "012"   "012"    "03"   "011"    "03"   "012"   "011"   "011"   "011" 
#> S38-A10 S38-A12  S38-A2  S38-A3  S38-A5  S38-A9 S38-B10 S38-B11  S38-B2  S38-B6  S38-B7  S38-B8 
#>   "011"   "022"   "021"    "03"   "021"   "021"    "03"   "013"   "021"   "011"   "021"   "021" 
#>  S38-B9  S38-C1 S38-C10 S38-C11  S38-C3  S38-C4  S38-C5  S38-C6  S38-C7  S38-C9  S38-D1 S38-D10 
#>   "022"    "03"    "03"    "03"   "021"   "012"    "03"    "03"    "03"   "022"   "021"    "03" 
#> S38-D11 S38-D12  S38-D2  S38-D4  S38-D5  S38-D6  S38-D7  S38-D8  S38-D9  S38-E1  S38-E2  S38-E3 
#>    "03"   "011"   "013"    "03"   "021"   "021"    "03"   "011"   "012"   "021"    "03"    "03" 
#>  S38-E4  S38-E5  S38-E6  S38-E7  S38-E8  S38-E9 S38-F10 S38-F11  S38-F2  S38-F3  S38-F5  S38-F6 
#>   "021"   "022"   "022"   "021"    "03"   "022"   "013"   "012"   "021"   "011"   "022"   "021" 
#>  S38-F7  S38-F8  S38-F9 S38-G10 S38-G12  S38-G4  S38-G5  S38-G6  S38-G7  S38-G8  S38-G9  S38-H1 
#>    "03"   "021"   "013"   "011"   "011"   "021"   "021"   "022"    "03"    "03"    "03"   "011" 
#> S38-H11  S38-H2  S38-H3  S38-H4  S38-H5  S38-H6  S38-H8 
#>   "013"   "021"    "03"   "012"   "022"   "021"   "012"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 1046))
#>  O10-A1 O10-A11 O10-A12  O10-A3  O10-A4  O10-A5  O10-A7  O10-A8  O10-A9  O10-B1 O10-B10 O10-B11 
#>    "02"    "03"    "02"   "012"    "02"    "03"    "03"    "03"   "013"   "011"    "03"    "03" 
#> O10-B12  O10-B2  O10-B5  O10-B6  O10-B7  O10-B9 O10-C10 O10-C11 O10-C12  O10-C2  O10-C4  O10-C5 
#>   "013"    "03"    "03"    "03"    "03"    "03"    "03"   "013"    "03"   "013"    "02"    "03" 
#>  O10-C6  O10-C9  O10-D1 O10-D11 O10-D12  O10-D2  O10-D3  O10-D5  O10-D6  O10-D8  O10-D9  O10-E1 
#>    "03"    "03"    "03"    "03"    "03"   "012"    "02"    "03"    "03"   "013"    "03"    "03" 
#> O10-E11 O10-E12  O10-E6  O10-E8  O10-E9  O10-F1 O10-F11 O10-F12  O10-F2  O10-F4  O10-F5  O10-F6 
#>    "03"    "03"    "03"   "012"   "013"    "03"    "03"    "03"   "013"   "012"    "03"    "02" 
#>  O10-F8  O10-F9  O10-G1 O10-G12  O10-G2  O10-G3  O10-G4  O10-G5  O10-G7  O10-H1  O10-H4  O10-H5 
#>   "012"    "03"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011"   "011" 
#>  O10-H6  O10-H7  O12-A1 O12-A12  O12-A2  O12-A3  O12-B1 O12-B12  O12-C1  O12-D1  O12-D2  O12-E1 
#>   "011"   "011"    "02"    "02"   "012"    "02"    "02"    "03"    "02"    "02"   "011"   "011" 
#> O12-E12 O12-F12  O12-F2  O12-G2  O12-H1  O12-H2   O7-A3   O7-A5   O7-A7   O7-A8   O7-A9   O7-B1 
#>    "02"    "03"    "02"    "02"    "02"    "02"    "03"    "02"    "02"    "02"    "03"    "02" 
#>  O7-B11  O7-B12   O7-B6   O7-B7   O7-B8   O7-B9   O7-C1  O7-C11   O7-C2   O7-C3   O7-C6   O7-C7 
#>    "03"    "02"    "03"    "03"    "02"    "02"    "03"    "03"    "02"    "02"    "02"    "03" 
#>   O7-D1  O7-D11  O7-D12   O7-D2   O7-D3   O7-D4   O7-D5  O7-E10  O7-E11   O7-E5   O7-E6   O7-F1 
#>    "02"    "02"    "02"    "02"   "012"    "03"   "013"    "03"    "03"    "02"    "02"    "02" 
#>  O7-F10  O7-F11   O7-F2   O7-F3   O7-F4   O7-F7   O7-F9  O7-G12   O7-G3   O7-G9   O7-H3   O7-H4 
#>    "02"    "02"    "03"    "03"    "02"    "03"    "03"    "02"   "011"    "02"    "02"    "02" 
#>   O7-H8   O8-A2   O8-A3   O8-A5   O8-A8   O8-A9   O8-B1   O8-B2   O8-B4   O8-B6   O8-B7   O8-B9 
#>    "02"    "03"    "03"    "02"    "03"    "02"    "02"    "03"    "03"    "03"    "03"    "03" 
#>  O8-C11  O8-C12   O8-C2   O8-C3   O8-C4   O8-C5   O8-C6   O8-C8   O8-D3   O8-D5   O8-D6   O8-D9 
#>    "03"    "03"    "02"    "03"    "03"    "03"    "03"    "03"    "03"    "03"    "03"    "03" 
#>   O8-E1  O8-E11   O8-E2   O8-E3   O8-E5   O8-E7   O8-E9  O8-F10  O8-F11  O8-F12   O8-F2   O8-F3 
#>   "012"    "03"    "03"    "02"    "03"    "02"    "03"   "011"    "03"    "03"    "02"    "03" 
#>   O8-F6   O8-F8   O8-F9   O8-G1  O8-G12   O8-G5   O8-G9   O8-H1  O8-H11   O8-H2   O8-H6  O9-A10 
#>    "02"    "02"   "011"    "03"    "03"    "03"   "011"   "011"    "02"    "02"   "012"    "03" 
#>  O9-A12   O9-A2   O9-A3   O9-A5   O9-A6   O9-A8   O9-A9  O9-B10  O9-B11  O9-B12   O9-B2   O9-B3 
#>    "02"   "013"    "02"    "02"    "02"    "03"   "013"   "013"   "013"    "03"    "03"   "013" 
#>   O9-B5   O9-B6   O9-B7   O9-B8  O9-C10   O9-C2   O9-C3   O9-C4   O9-C5   O9-C6   O9-C9   O9-D1 
#>    "02"    "03"    "03"    "02"   "013"    "03"   "013"    "03"   "013"    "03"   "013"   "013" 
#>  O9-D10  O9-D11  O9-D12   O9-D2   O9-D5   O9-D6   O9-D7   O9-D8   O9-E1  O9-E10  O9-E11  O9-E12 
#>   "011"   "013"    "03"    "02"   "012"    "03"    "02"    "02"    "02"   "013"   "011"    "03" 
#>   O9-E2   O9-E4   O9-E5   O9-E7   O9-E8   O9-E9   O9-F1  O9-F10  O9-F12   O9-F2   O9-F4   O9-F5 
#>    "02"    "03"   "013"   "013"   "011"   "013"    "02"   "013"   "013"   "013"    "02"    "02" 
#>   O9-F9  O9-G10  O9-G12   O9-G2   O9-G3   O9-G4   O9-G6   O9-G7   O9-G9  O9-H12   O9-H3   O9-H5 
#>    "03"   "011"   "013"   "013"    "03"   "011"   "013"    "03"    "02"    "02"   "013"    "02" 
#>   O9-H9  S37-A1 S37-A10  S37-A2  S37-A3  S37-A4  S37-A5  S37-A6  S37-A7  S37-A8  S37-A9  S37-B1 
#>   "011"   "012"   "012"    "02"   "012"    "03"    "02"    "02"    "03"    "02"   "011"   "013" 
#> S37-B10 S37-B11 S37-B12  S37-B2  S37-B3  S37-B4  S37-B5  S37-B6  S37-B7  S37-B9 S37-C10 S37-C12 
#>   "012"    "02"    "02"   "012"    "03"   "013"    "03"    "03"   "012"    "03"   "012"    "02" 
#>  S37-C3  S37-C4  S37-C6  S37-C7  S37-C8  S37-C9 S37-D10 S37-D11 S37-D12  S37-D2  S37-D4  S37-D6 
#>   "012"   "011"   "012"   "012"    "02"   "011"   "012"    "03"    "02"   "012"   "012"   "012" 
#>  S37-D8  S37-D9  S37-E1 S37-E10 S37-E11  S37-E2  S37-E3  S37-E5  S37-E6  S37-E7  S37-E8  S37-E9 
#>   "012"    "03"   "012"    "03"   "012"   "012"   "012"    "03"   "013"    "02"    "02"   "012" 
#>  S37-F1 S37-F10 S37-F12  S37-F2  S37-F3  S37-F5  S37-F7  S37-F9  S37-G1 S37-G10 S37-G12  S37-G2 
#>   "011"   "011"   "013"   "012"   "013"   "011"   "012"   "012"   "012"   "012"   "012"    "02" 
#>  S37-G3  S37-G4  S37-G5  S37-G6  S37-G7  S37-G8  S37-H2  S37-H4  S37-H7  S37-H8  S37-H9  S38-A1 
#>   "012"    "02"    "03"   "012"   "012"    "03"   "011"    "03"   "012"   "011"   "011"   "011" 
#> S38-A10 S38-A12  S38-A2  S38-A3  S38-A5  S38-A9 S38-B10 S38-B11  S38-B2  S38-B6  S38-B7  S38-B8 
#>   "011"    "02"    "02"    "03"    "02"    "02"    "03"   "013"    "02"   "011"    "02"    "02" 
#>  S38-B9  S38-C1 S38-C10 S38-C11  S38-C3  S38-C4  S38-C5  S38-C6  S38-C7  S38-C9  S38-D1 S38-D10 
#>    "02"    "03"    "03"    "03"    "02"   "012"    "03"    "03"    "03"    "02"    "02"    "03" 
#> S38-D11 S38-D12  S38-D2  S38-D4  S38-D5  S38-D6  S38-D7  S38-D8  S38-D9  S38-E1  S38-E2  S38-E3 
#>    "03"   "011"   "013"    "03"    "02"    "02"    "03"   "011"   "012"    "02"    "03"    "03" 
#>  S38-E4  S38-E5  S38-E6  S38-E7  S38-E8  S38-E9 S38-F10 S38-F11  S38-F2  S38-F3  S38-F5  S38-F6 
#>    "02"    "02"    "02"    "02"    "03"    "02"   "013"   "012"    "02"   "011"    "02"    "02" 
#>  S38-F7  S38-F8  S38-F9 S38-G10 S38-G12  S38-G4  S38-G5  S38-G6  S38-G7  S38-G8  S38-G9  S38-H1 
#>    "03"    "02"   "013"   "011"   "011"    "02"    "02"    "02"    "03"    "03"    "03"   "011" 
#> S38-H11  S38-H2  S38-H3  S38-H4  S38-H5  S38-H6  S38-H8 
#>   "013"    "02"    "03"   "012"    "02"    "02"   "012"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 4074))
#>  O10-A1 O10-A11 O10-A12  O10-A3  O10-A4  O10-A5  O10-A7  O10-A8  O10-A9  O10-B1 O10-B10 O10-B11 
#>    "02"    "03"    "02"    "01"    "02"    "03"    "03"    "03"    "01"    "01"    "03"    "03" 
#> O10-B12  O10-B2  O10-B5  O10-B6  O10-B7  O10-B9 O10-C10 O10-C11 O10-C12  O10-C2  O10-C4  O10-C5 
#>    "01"    "03"    "03"    "03"    "03"    "03"    "03"    "01"    "03"    "01"    "02"    "03" 
#>  O10-C6  O10-C9  O10-D1 O10-D11 O10-D12  O10-D2  O10-D3  O10-D5  O10-D6  O10-D8  O10-D9  O10-E1 
#>    "03"    "03"    "03"    "03"    "03"    "01"    "02"    "03"    "03"    "01"    "03"    "03" 
#> O10-E11 O10-E12  O10-E6  O10-E8  O10-E9  O10-F1 O10-F11 O10-F12  O10-F2  O10-F4  O10-F5  O10-F6 
#>    "03"    "03"    "03"    "01"    "01"    "03"    "03"    "03"    "01"    "01"    "03"    "02" 
#>  O10-F8  O10-F9  O10-G1 O10-G12  O10-G2  O10-G3  O10-G4  O10-G5  O10-G7  O10-H1  O10-H4  O10-H5 
#>    "01"    "03"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01" 
#>  O10-H6  O10-H7  O12-A1 O12-A12  O12-A2  O12-A3  O12-B1 O12-B12  O12-C1  O12-D1  O12-D2  O12-E1 
#>    "01"    "01"    "02"    "02"    "01"    "02"    "02"    "03"    "02"    "02"    "01"    "01" 
#> O12-E12 O12-F12  O12-F2  O12-G2  O12-H1  O12-H2   O7-A3   O7-A5   O7-A7   O7-A8   O7-A9   O7-B1 
#>    "02"    "03"    "02"    "02"    "02"    "02"    "03"    "02"    "02"    "02"    "03"    "02" 
#>  O7-B11  O7-B12   O7-B6   O7-B7   O7-B8   O7-B9   O7-C1  O7-C11   O7-C2   O7-C3   O7-C6   O7-C7 
#>    "03"    "02"    "03"    "03"    "02"    "02"    "03"    "03"    "02"    "02"    "02"    "03" 
#>   O7-D1  O7-D11  O7-D12   O7-D2   O7-D3   O7-D4   O7-D5  O7-E10  O7-E11   O7-E5   O7-E6   O7-F1 
#>    "02"    "02"    "02"    "02"    "01"    "03"    "01"    "03"    "03"    "02"    "02"    "02" 
#>  O7-F10  O7-F11   O7-F2   O7-F3   O7-F4   O7-F7   O7-F9  O7-G12   O7-G3   O7-G9   O7-H3   O7-H4 
#>    "02"    "02"    "03"    "03"    "02"    "03"    "03"    "02"    "01"    "02"    "02"    "02" 
#>   O7-H8   O8-A2   O8-A3   O8-A5   O8-A8   O8-A9   O8-B1   O8-B2   O8-B4   O8-B6   O8-B7   O8-B9 
#>    "02"    "03"    "03"    "02"    "03"    "02"    "02"    "03"    "03"    "03"    "03"    "03" 
#>  O8-C11  O8-C12   O8-C2   O8-C3   O8-C4   O8-C5   O8-C6   O8-C8   O8-D3   O8-D5   O8-D6   O8-D9 
#>    "03"    "03"    "02"    "03"    "03"    "03"    "03"    "03"    "03"    "03"    "03"    "03" 
#>   O8-E1  O8-E11   O8-E2   O8-E3   O8-E5   O8-E7   O8-E9  O8-F10  O8-F11  O8-F12   O8-F2   O8-F3 
#>    "01"    "03"    "03"    "02"    "03"    "02"    "03"    "01"    "03"    "03"    "02"    "03" 
#>   O8-F6   O8-F8   O8-F9   O8-G1  O8-G12   O8-G5   O8-G9   O8-H1  O8-H11   O8-H2   O8-H6  O9-A10 
#>    "02"    "02"    "01"    "03"    "03"    "03"    "01"    "01"    "02"    "02"    "01"    "03" 
#>  O9-A12   O9-A2   O9-A3   O9-A5   O9-A6   O9-A8   O9-A9  O9-B10  O9-B11  O9-B12   O9-B2   O9-B3 
#>    "02"    "01"    "02"    "02"    "02"    "03"    "01"    "01"    "01"    "03"    "03"    "01" 
#>   O9-B5   O9-B6   O9-B7   O9-B8  O9-C10   O9-C2   O9-C3   O9-C4   O9-C5   O9-C6   O9-C9   O9-D1 
#>    "02"    "03"    "03"    "02"    "01"    "03"    "01"    "03"    "01"    "03"    "01"    "01" 
#>  O9-D10  O9-D11  O9-D12   O9-D2   O9-D5   O9-D6   O9-D7   O9-D8   O9-E1  O9-E10  O9-E11  O9-E12 
#>    "01"    "01"    "03"    "02"    "01"    "03"    "02"    "02"    "02"    "01"    "01"    "03" 
#>   O9-E2   O9-E4   O9-E5   O9-E7   O9-E8   O9-E9   O9-F1  O9-F10  O9-F12   O9-F2   O9-F4   O9-F5 
#>    "02"    "03"    "01"    "01"    "01"    "01"    "02"    "01"    "01"    "01"    "02"    "02" 
#>   O9-F9  O9-G10  O9-G12   O9-G2   O9-G3   O9-G4   O9-G6   O9-G7   O9-G9  O9-H12   O9-H3   O9-H5 
#>    "03"    "01"    "01"    "01"    "03"    "01"    "01"    "03"    "02"    "02"    "01"    "02" 
#>   O9-H9  S37-A1 S37-A10  S37-A2  S37-A3  S37-A4  S37-A5  S37-A6  S37-A7  S37-A8  S37-A9  S37-B1 
#>    "01"    "01"    "01"    "02"    "01"    "03"    "02"    "02"    "03"    "02"    "01"    "01" 
#> S37-B10 S37-B11 S37-B12  S37-B2  S37-B3  S37-B4  S37-B5  S37-B6  S37-B7  S37-B9 S37-C10 S37-C12 
#>    "01"    "02"    "02"    "01"    "03"    "01"    "03"    "03"    "01"    "03"    "01"    "02" 
#>  S37-C3  S37-C4  S37-C6  S37-C7  S37-C8  S37-C9 S37-D10 S37-D11 S37-D12  S37-D2  S37-D4  S37-D6 
#>    "01"    "01"    "01"    "01"    "02"    "01"    "01"    "03"    "02"    "01"    "01"    "01" 
#>  S37-D8  S37-D9  S37-E1 S37-E10 S37-E11  S37-E2  S37-E3  S37-E5  S37-E6  S37-E7  S37-E8  S37-E9 
#>    "01"    "03"    "01"    "03"    "01"    "01"    "01"    "03"    "01"    "02"    "02"    "01" 
#>  S37-F1 S37-F10 S37-F12  S37-F2  S37-F3  S37-F5  S37-F7  S37-F9  S37-G1 S37-G10 S37-G12  S37-G2 
#>    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "01"    "02" 
#>  S37-G3  S37-G4  S37-G5  S37-G6  S37-G7  S37-G8  S37-H2  S37-H4  S37-H7  S37-H8  S37-H9  S38-A1 
#>    "01"    "02"    "03"    "01"    "01"    "03"    "01"    "03"    "01"    "01"    "01"    "01" 
#> S38-A10 S38-A12  S38-A2  S38-A3  S38-A5  S38-A9 S38-B10 S38-B11  S38-B2  S38-B6  S38-B7  S38-B8 
#>    "01"    "02"    "02"    "03"    "02"    "02"    "03"    "01"    "02"    "01"    "02"    "02" 
#>  S38-B9  S38-C1 S38-C10 S38-C11  S38-C3  S38-C4  S38-C5  S38-C6  S38-C7  S38-C9  S38-D1 S38-D10 
#>    "02"    "03"    "03"    "03"    "02"    "01"    "03"    "03"    "03"    "02"    "02"    "03" 
#> S38-D11 S38-D12  S38-D2  S38-D4  S38-D5  S38-D6  S38-D7  S38-D8  S38-D9  S38-E1  S38-E2  S38-E3 
#>    "03"    "01"    "01"    "03"    "02"    "02"    "03"    "01"    "01"    "02"    "03"    "03" 
#>  S38-E4  S38-E5  S38-E6  S38-E7  S38-E8  S38-E9 S38-F10 S38-F11  S38-F2  S38-F3  S38-F5  S38-F6 
#>    "02"    "02"    "02"    "02"    "03"    "02"    "01"    "01"    "02"    "01"    "02"    "02" 
#>  S38-F7  S38-F8  S38-F9 S38-G10 S38-G12  S38-G4  S38-G5  S38-G6  S38-G7  S38-G8  S38-G9  S38-H1 
#>    "03"    "02"    "01"    "01"    "01"    "02"    "02"    "02"    "03"    "03"    "03"    "01" 
#> S38-H11  S38-H2  S38-H3  S38-H4  S38-H5  S38-H6  S38-H8 
#>    "01"    "02"    "03"    "01"    "02"    "02"    "01"

Top rows heatmap

Heatmaps of the top rows:

top_rows_heatmap(res_rh)

plot of chunk top-rows-heatmap

Top rows on each node:

top_rows_overlap(res_rh, method = "upset")

plot of chunk top-rows-overlap

UMAP plot

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 = 329),
    method = "UMAP", top_value_method = "SD", top_n = 1000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 329),
    method = "UMAP", top_value_method = "ATC", top_n = 1000, scale_rows = TRUE)

plot of chunk tab-dimension-reduction-by-depth-1

par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 597),
    method = "UMAP", top_value_method = "SD", top_n = 1000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 597),
    method = "UMAP", top_value_method = "ATC", top_n = 1000, scale_rows = TRUE)

plot of chunk tab-dimension-reduction-by-depth-2

par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 1046),
    method = "UMAP", top_value_method = "SD", top_n = 1000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 1046),
    method = "UMAP", top_value_method = "ATC", top_n = 1000, scale_rows = TRUE)

plot of chunk tab-dimension-reduction-by-depth-3

par(mfrow = c(1, 2))
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 4074),
    method = "UMAP", top_value_method = "SD", top_n = 1000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 4074),
    method = "UMAP", top_value_method = "ATC", top_n = 1000, scale_rows = TRUE)

plot of chunk tab-dimension-reduction-by-depth-4

Signature heatmap

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 = 329))

plot of chunk tab-get-signatures-from-hierarchical-partition-1

get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 597))

plot of chunk tab-get-signatures-from-hierarchical-partition-2

get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 1046))

plot of chunk tab-get-signatures-from-hierarchical-partition-3

get_signatures(res_rh, merge_node = merge_node_param(min_n_signatures = 4074))

plot of chunk tab-get-signatures-from-hierarchical-partition-4

Compare signatures from different nodes:

compare_signatures(res_rh, verbose = FALSE)

plot of chunk unnamed-chunk-24

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 to known annotations

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 = 329))
#>            Age Inferred.Cell.Type
#> class 6.34e-09          1.03e-117
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 597))
#>            Age Inferred.Cell.Type
#> class 5.21e-08          2.42e-119
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 1046))
#>            Age Inferred.Cell.Type
#> class 2.87e-08          2.67e-119
test_to_known_factors(res_rh, merge_node = merge_node_param(min_n_signatures = 4074))
#>            Age Inferred.Cell.Type
#> class 0.000943           1.49e-80

Results for each node


Node0

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 9277 rows and 367 columns.
#>   Top rows (928) 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)

plot of chunk node-0-collect-plots

The plots are:

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:

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)

plot of chunk node-0-select-partition-number

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.987       0.995         0.4332 0.566   0.566
#> 3 3 1.000           0.977       0.990         0.5409 0.751   0.567
#> 4 4 0.978           0.946       0.960         0.0779 0.943   0.829

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>         class entropy silhouette   p1   p2
#> O10-A1      2   0.000      0.990 0.00 1.00
#> O10-A11     1   0.000      0.997 1.00 0.00
#> O10-A12     2   0.000      0.990 0.00 1.00
#> O10-A3      1   0.000      0.997 1.00 0.00
#> O10-A4      2   0.000      0.990 0.00 1.00
#> O10-A5      1   0.000      0.997 1.00 0.00
#> O10-A7      1   0.000      0.997 1.00 0.00
#> O10-A8      1   0.000      0.997 1.00 0.00
#> O10-A9      1   0.000      0.997 1.00 0.00
#> O10-B1      1   0.000      0.997 1.00 0.00
#> O10-B10     1   0.000      0.997 1.00 0.00
#> O10-B11     1   0.000      0.997 1.00 0.00
#> O10-B12     1   0.000      0.997 1.00 0.00
#> O10-B2      1   0.000      0.997 1.00 0.00
#> O10-B5      1   0.000      0.997 1.00 0.00
#> O10-B6      1   0.000      0.997 1.00 0.00
#> O10-B7      1   0.000      0.997 1.00 0.00
#> O10-B9      1   0.000      0.997 1.00 0.00
#> O10-C10     1   0.000      0.997 1.00 0.00
#> O10-C11     1   0.000      0.997 1.00 0.00
#> O10-C12     1   0.000      0.997 1.00 0.00
#> O10-C2      1   0.000      0.997 1.00 0.00
#> O10-C4      2   0.000      0.990 0.00 1.00
#> O10-C5      1   0.000      0.997 1.00 0.00
#> O10-C6      1   0.000      0.997 1.00 0.00
#> O10-C9      1   0.000      0.997 1.00 0.00
#> O10-D1      2   0.855      0.617 0.28 0.72
#> O10-D11     1   0.000      0.997 1.00 0.00
#> O10-D12     1   0.000      0.997 1.00 0.00
#> O10-D2      1   0.000      0.997 1.00 0.00
#> O10-D3      2   0.000      0.990 0.00 1.00
#> O10-D5      1   0.000      0.997 1.00 0.00
#> O10-D6      1   0.000      0.997 1.00 0.00
#> O10-D8      1   0.000      0.997 1.00 0.00
#> O10-D9      1   0.000      0.997 1.00 0.00
#> O10-E1      1   0.000      0.997 1.00 0.00
#> O10-E11     1   0.000      0.997 1.00 0.00
#> O10-E12     1   0.000      0.997 1.00 0.00
#> O10-E6      1   0.000      0.997 1.00 0.00
#> O10-E8      1   0.000      0.997 1.00 0.00
#> O10-E9      1   0.000      0.997 1.00 0.00
#> O10-F1      1   0.000      0.997 1.00 0.00
#> O10-F11     1   0.000      0.997 1.00 0.00
#> O10-F12     1   0.000      0.997 1.00 0.00
#> O10-F2      1   0.000      0.997 1.00 0.00
#> O10-F4      1   0.000      0.997 1.00 0.00
#> O10-F5      1   0.000      0.997 1.00 0.00
#> O10-F6      2   0.000      0.990 0.00 1.00
#> O10-F8      1   0.000      0.997 1.00 0.00
#> O10-F9      1   0.000      0.997 1.00 0.00
#> O10-G1      1   0.000      0.997 1.00 0.00
#> O10-G12     1   0.000      0.997 1.00 0.00
#> O10-G2      1   0.000      0.997 1.00 0.00
#> O10-G3      1   0.925      0.479 0.66 0.34
#> O10-G4      1   0.000      0.997 1.00 0.00
#> O10-G5      1   0.000      0.997 1.00 0.00
#> O10-G7      1   0.000      0.997 1.00 0.00
#> O10-H1      1   0.000      0.997 1.00 0.00
#> O10-H4      1   0.000      0.997 1.00 0.00
#> O10-H5      1   0.000      0.997 1.00 0.00
#> O10-H6      1   0.000      0.997 1.00 0.00
#> O10-H7      1   0.000      0.997 1.00 0.00
#> O12-A1      2   0.000      0.990 0.00 1.00
#> O12-A12     2   0.000      0.990 0.00 1.00
#> O12-A2      1   0.000      0.997 1.00 0.00
#> O12-A3      2   0.000      0.990 0.00 1.00
#> O12-B1      2   0.000      0.990 0.00 1.00
#> O12-B12     1   0.000      0.997 1.00 0.00
#> O12-C1      2   0.000      0.990 0.00 1.00
#> O12-D1      2   0.000      0.990 0.00 1.00
#> O12-D2      1   0.000      0.997 1.00 0.00
#> O12-E1      1   0.000      0.997 1.00 0.00
#> O12-E12     2   0.000      0.990 0.00 1.00
#> O12-F12     1   0.000      0.997 1.00 0.00
#> O12-F2      2   0.000      0.990 0.00 1.00
#> O12-G2      2   0.000      0.990 0.00 1.00
#> O12-H1      2   0.000      0.990 0.00 1.00
#> O12-H2      2   0.000      0.990 0.00 1.00
#> O7-A3       1   0.000      0.997 1.00 0.00
#> O7-A5       2   0.000      0.990 0.00 1.00
#> O7-A7       2   0.000      0.990 0.00 1.00
#> O7-A8       2   0.000      0.990 0.00 1.00
#> O7-A9       1   0.000      0.997 1.00 0.00
#> O7-B1       2   0.000      0.990 0.00 1.00
#> O7-B11      1   0.000      0.997 1.00 0.00
#> O7-B12      2   0.000      0.990 0.00 1.00
#> O7-B6       1   0.000      0.997 1.00 0.00
#> O7-B7       1   0.000      0.997 1.00 0.00
#> O7-B8       2   0.000      0.990 0.00 1.00
#> O7-B9       2   0.000      0.990 0.00 1.00
#> O7-C1       1   0.000      0.997 1.00 0.00
#> O7-C11      1   0.000      0.997 1.00 0.00
#> O7-C2       2   0.000      0.990 0.00 1.00
#> O7-C3       2   0.000      0.990 0.00 1.00
#> O7-C6       2   0.000      0.990 0.00 1.00
#> O7-C7       1   0.000      0.997 1.00 0.00
#> O7-D1       2   0.000      0.990 0.00 1.00
#> O7-D11      2   0.000      0.990 0.00 1.00
#> O7-D12      2   0.000      0.990 0.00 1.00
#> O7-D2       2   0.000      0.990 0.00 1.00
#> O7-D3       1   0.000      0.997 1.00 0.00
#> O7-D4       1   0.000      0.997 1.00 0.00
#> O7-D5       1   0.000      0.997 1.00 0.00
#> O7-E10      1   0.000      0.997 1.00 0.00
#> O7-E11      1   0.327      0.934 0.94 0.06
#> O7-E5       2   0.000      0.990 0.00 1.00
#> O7-E6       2   0.000      0.990 0.00 1.00
#> O7-F1       2   0.000      0.990 0.00 1.00
#> O7-F10      2   0.000      0.990 0.00 1.00
#> O7-F11      2   0.000      0.990 0.00 1.00
#> O7-F2       1   0.000      0.997 1.00 0.00
#> O7-F3       1   0.000      0.997 1.00 0.00
#> O7-F4       2   0.000      0.990 0.00 1.00
#> O7-F7       1   0.000      0.997 1.00 0.00
#> O7-F9       1   0.000      0.997 1.00 0.00
#> O7-G12      2   0.000      0.990 0.00 1.00
#> O7-G3       1   0.000      0.997 1.00 0.00
#> O7-G9       2   0.000      0.990 0.00 1.00
#> O7-H3       2   0.000      0.990 0.00 1.00
#> O7-H4       2   0.000      0.990 0.00 1.00
#> O7-H8       2   0.000      0.990 0.00 1.00
#> O8-A2       1   0.000      0.997 1.00 0.00
#> O8-A3       1   0.000      0.997 1.00 0.00
#> O8-A5       2   0.000      0.990 0.00 1.00
#> O8-A8       1   0.000      0.997 1.00 0.00
#> O8-A9       2   0.000      0.990 0.00 1.00
#> O8-B1       2   0.000      0.990 0.00 1.00
#> O8-B2       1   0.000      0.997 1.00 0.00
#> O8-B4       1   0.000      0.997 1.00 0.00
#> O8-B6       1   0.000      0.997 1.00 0.00
#> O8-B7       1   0.000      0.997 1.00 0.00
#> O8-B9       1   0.000      0.997 1.00 0.00
#> O8-C11      1   0.000      0.997 1.00 0.00
#> O8-C12      1   0.000      0.997 1.00 0.00
#> O8-C2       2   0.000      0.990 0.00 1.00
#> O8-C3       1   0.000      0.997 1.00 0.00
#> O8-C4       1   0.000      0.997 1.00 0.00
#> O8-C5       1   0.141      0.977 0.98 0.02
#> O8-C6       1   0.000      0.997 1.00 0.00
#> O8-C8       1   0.000      0.997 1.00 0.00
#> O8-D3       1   0.000      0.997 1.00 0.00
#> O8-D5       1   0.000      0.997 1.00 0.00
#> O8-D6       1   0.000      0.997 1.00 0.00
#> O8-D9       1   0.000      0.997 1.00 0.00
#> O8-E1       1   0.000      0.997 1.00 0.00
#> O8-E11      1   0.000      0.997 1.00 0.00
#> O8-E2       1   0.000      0.997 1.00 0.00
#> O8-E3       2   0.000      0.990 0.00 1.00
#> O8-E5       1   0.000      0.997 1.00 0.00
#> O8-E7       2   0.000      0.990 0.00 1.00
#> O8-E9       1   0.000      0.997 1.00 0.00
#> O8-F10      1   0.000      0.997 1.00 0.00
#> O8-F11      1   0.000      0.997 1.00 0.00
#> O8-F12      1   0.000      0.997 1.00 0.00
#> O8-F2       2   0.000      0.990 0.00 1.00
#> O8-F3       1   0.000      0.997 1.00 0.00
#> O8-F6       2   0.000      0.990 0.00 1.00
#> O8-F8       2   0.000      0.990 0.00 1.00
#> O8-F9       1   0.000      0.997 1.00 0.00
#> O8-G1       1   0.000      0.997 1.00 0.00
#> O8-G12      1   0.000      0.997 1.00 0.00
#> O8-G5       1   0.000      0.997 1.00 0.00
#> O8-G9       1   0.000      0.997 1.00 0.00
#> O8-H1       1   0.000      0.997 1.00 0.00
#> O8-H11      2   0.000      0.990 0.00 1.00
#> O8-H2       2   0.000      0.990 0.00 1.00
#> O8-H6       1   0.000      0.997 1.00 0.00
#> O9-A10      1   0.000      0.997 1.00 0.00
#> O9-A12      2   0.000      0.990 0.00 1.00
#> O9-A2       1   0.000      0.997 1.00 0.00
#> O9-A3       2   0.000      0.990 0.00 1.00
#> O9-A5       2   0.000      0.990 0.00 1.00
#> O9-A6       2   0.000      0.990 0.00 1.00
#> O9-A8       1   0.000      0.997 1.00 0.00
#> O9-A9       1   0.000      0.997 1.00 0.00
#> O9-B10      1   0.000      0.997 1.00 0.00
#> O9-B11      1   0.000      0.997 1.00 0.00
#> O9-B12      1   0.000      0.997 1.00 0.00
#> O9-B2       1   0.000      0.997 1.00 0.00
#> O9-B3       1   0.000      0.997 1.00 0.00
#> O9-B5       2   0.000      0.990 0.00 1.00
#> O9-B6       1   0.000      0.997 1.00 0.00
#> O9-B7       1   0.000      0.997 1.00 0.00
#> O9-B8       2   0.000      0.990 0.00 1.00
#> O9-C10      1   0.000      0.997 1.00 0.00
#> O9-C2       1   0.000      0.997 1.00 0.00
#> O9-C3       1   0.000      0.997 1.00 0.00
#> O9-C4       1   0.141      0.977 0.98 0.02
#> O9-C5       1   0.000      0.997 1.00 0.00
#> O9-C6       1   0.000      0.997 1.00 0.00
#> O9-C9       1   0.000      0.997 1.00 0.00
#> O9-D1       1   0.000      0.997 1.00 0.00
#> O9-D10      1   0.000      0.997 1.00 0.00
#> O9-D11      1   0.000      0.997 1.00 0.00
#> O9-D12      2   0.925      0.492 0.34 0.66
#> O9-D2       2   0.000      0.990 0.00 1.00
#> O9-D5       1   0.000      0.997 1.00 0.00
#> O9-D6       1   0.000      0.997 1.00 0.00
#> O9-D7       2   0.000      0.990 0.00 1.00
#> O9-D8       2   0.000      0.990 0.00 1.00
#> O9-E1       2   0.000      0.990 0.00 1.00
#> O9-E10      1   0.000      0.997 1.00 0.00
#> O9-E11      1   0.000      0.997 1.00 0.00
#> O9-E12      1   0.000      0.997 1.00 0.00
#> O9-E2       2   0.000      0.990 0.00 1.00
#> O9-E4       1   0.000      0.997 1.00 0.00
#> O9-E5       1   0.000      0.997 1.00 0.00
#> O9-E7       1   0.000      0.997 1.00 0.00
#> O9-E8       1   0.000      0.997 1.00 0.00
#> O9-E9       1   0.000      0.997 1.00 0.00
#> O9-F1       2   0.000      0.990 0.00 1.00
#> O9-F10      1   0.000      0.997 1.00 0.00
#> O9-F12      1   0.000      0.997 1.00 0.00
#> O9-F2       1   0.000      0.997 1.00 0.00
#> O9-F4       2   0.000      0.990 0.00 1.00
#> O9-F5       2   0.000      0.990 0.00 1.00
#> O9-F9       1   0.000      0.997 1.00 0.00
#> O9-G10      1   0.000      0.997 1.00 0.00
#> O9-G12      1   0.000      0.997 1.00 0.00
#> O9-G2       1   0.000      0.997 1.00 0.00
#> O9-G3       1   0.000      0.997 1.00 0.00
#> O9-G4       1   0.000      0.997 1.00 0.00
#> O9-G6       1   0.000      0.997 1.00 0.00
#> O9-G7       1   0.000      0.997 1.00 0.00
#> O9-G9       2   0.000      0.990 0.00 1.00
#> O9-H12      2   0.000      0.990 0.00 1.00
#> O9-H3       1   0.000      0.997 1.00 0.00
#> O9-H5       2   0.000      0.990 0.00 1.00
#> O9-H9       1   0.000      0.997 1.00 0.00
#> S37-A1      1   0.000      0.997 1.00 0.00
#> S37-A10     1   0.000      0.997 1.00 0.00
#> S37-A2      2   0.000      0.990 0.00 1.00
#> S37-A3      1   0.000      0.997 1.00 0.00
#> S37-A4      1   0.000      0.997 1.00 0.00
#> S37-A5      2   0.000      0.990 0.00 1.00
#> S37-A6      2   0.000      0.990 0.00 1.00
#> S37-A7      1   0.000      0.997 1.00 0.00
#> S37-A8      2   0.000      0.990 0.00 1.00
#> S37-A9      1   0.000      0.997 1.00 0.00
#> S37-B1      1   0.000      0.997 1.00 0.00
#> S37-B10     1   0.000      0.997 1.00 0.00
#> S37-B11     2   0.000      0.990 0.00 1.00
#> S37-B12     2   0.000      0.990 0.00 1.00
#> S37-B2      1   0.000      0.997 1.00 0.00
#> S37-B3      1   0.000      0.997 1.00 0.00
#> S37-B4      1   0.000      0.997 1.00 0.00
#> S37-B5      1   0.000      0.997 1.00 0.00
#> S37-B6      1   0.000      0.997 1.00 0.00
#> S37-B7      1   0.000      0.997 1.00 0.00
#> S37-B9      1   0.000      0.997 1.00 0.00
#> S37-C10     1   0.000      0.997 1.00 0.00
#> S37-C12     2   0.000      0.990 0.00 1.00
#> S37-C3      1   0.000      0.997 1.00 0.00
#> S37-C4      1   0.000      0.997 1.00 0.00
#> S37-C6      1   0.000      0.997 1.00 0.00
#> S37-C7      1   0.000      0.997 1.00 0.00
#> S37-C8      2   0.000      0.990 0.00 1.00
#> S37-C9      1   0.000      0.997 1.00 0.00
#> S37-D10     1   0.000      0.997 1.00 0.00
#> S37-D11     1   0.000      0.997 1.00 0.00
#> S37-D12     2   0.000      0.990 0.00 1.00
#> S37-D2      1   0.000      0.997 1.00 0.00
#> S37-D4      1   0.000      0.997 1.00 0.00
#> S37-D6      1   0.000      0.997 1.00 0.00
#> S37-D8      1   0.000      0.997 1.00 0.00
#> S37-D9      1   0.000      0.997 1.00 0.00
#> S37-E1      1   0.000      0.997 1.00 0.00
#> S37-E10     1   0.000      0.997 1.00 0.00
#> S37-E11     1   0.000      0.997 1.00 0.00
#> S37-E2      1   0.000      0.997 1.00 0.00
#> S37-E3      1   0.000      0.997 1.00 0.00
#> S37-E5      1   0.000      0.997 1.00 0.00
#> S37-E6      1   0.000      0.997 1.00 0.00
#> S37-E7      2   0.000      0.990 0.00 1.00
#> S37-E8      2   0.000      0.990 0.00 1.00
#> S37-E9      1   0.000      0.997 1.00 0.00
#> S37-F1      1   0.000      0.997 1.00 0.00
#> S37-F10     1   0.000      0.997 1.00 0.00
#> S37-F12     1   0.000      0.997 1.00 0.00
#> S37-F2      1   0.000      0.997 1.00 0.00
#> S37-F3      1   0.000      0.997 1.00 0.00
#> S37-F5      1   0.000      0.997 1.00 0.00
#> S37-F7      1   0.000      0.997 1.00 0.00
#> S37-F9      1   0.000      0.997 1.00 0.00
#> S37-G1      1   0.000      0.997 1.00 0.00
#> S37-G10     1   0.000      0.997 1.00 0.00
#> S37-G12     1   0.000      0.997 1.00 0.00
#> S37-G2      2   0.000      0.990 0.00 1.00
#> S37-G3      2   0.722      0.751 0.20 0.80
#> S37-G4      2   0.000      0.990 0.00 1.00
#> S37-G5      1   0.000      0.997 1.00 0.00
#> S37-G6      1   0.000      0.997 1.00 0.00
#> S37-G7      1   0.000      0.997 1.00 0.00
#> S37-G8      1   0.000      0.997 1.00 0.00
#> S37-H2      1   0.000      0.997 1.00 0.00
#> S37-H4      1   0.000      0.997 1.00 0.00
#> S37-H7      1   0.000      0.997 1.00 0.00
#> S37-H8      1   0.000      0.997 1.00 0.00
#> S37-H9      1   0.000      0.997 1.00 0.00
#> S38-A1      1   0.000      0.997 1.00 0.00
#> S38-A10     1   0.000      0.997 1.00 0.00
#> S38-A12     2   0.000      0.990 0.00 1.00
#> S38-A2      2   0.000      0.990 0.00 1.00
#> S38-A3      1   0.000      0.997 1.00 0.00
#> S38-A5      2   0.000      0.990 0.00 1.00
#> S38-A9      2   0.000      0.990 0.00 1.00
#> S38-B10     1   0.000      0.997 1.00 0.00
#> S38-B11     1   0.000      0.997 1.00 0.00
#> S38-B2      2   0.000      0.990 0.00 1.00
#> S38-B6      1   0.000      0.997 1.00 0.00
#> S38-B7      2   0.000      0.990 0.00 1.00
#> S38-B8      2   0.000      0.990 0.00 1.00
#> S38-B9      2   0.000      0.990 0.00 1.00
#> S38-C1      1   0.904      0.524 0.68 0.32
#> S38-C10     1   0.000      0.997 1.00 0.00
#> S38-C11     1   0.000      0.997 1.00 0.00
#> S38-C3      2   0.000      0.990 0.00 1.00
#> S38-C4      1   0.000      0.997 1.00 0.00
#> S38-C5      1   0.000      0.997 1.00 0.00
#> S38-C6      1   0.000      0.997 1.00 0.00
#> S38-C7      1   0.000      0.997 1.00 0.00
#> S38-C9      2   0.000      0.990 0.00 1.00
#> S38-D1      2   0.000      0.990 0.00 1.00
#> S38-D10     1   0.000      0.997 1.00 0.00
#> S38-D11     1   0.000      0.997 1.00 0.00
#> S38-D12     1   0.000      0.997 1.00 0.00
#> S38-D2      1   0.000      0.997 1.00 0.00
#> S38-D4      2   0.958      0.394 0.38 0.62
#> S38-D5      2   0.000      0.990 0.00 1.00
#> S38-D6      2   0.000      0.990 0.00 1.00
#> S38-D7      1   0.000      0.997 1.00 0.00
#> S38-D8      1   0.000      0.997 1.00 0.00
#> S38-D9      1   0.000      0.997 1.00 0.00
#> S38-E1      2   0.000      0.990 0.00 1.00
#> S38-E2      1   0.000      0.997 1.00 0.00
#> S38-E3      1   0.000      0.997 1.00 0.00
#> S38-E4      2   0.000      0.990 0.00 1.00
#> S38-E5      2   0.000      0.990 0.00 1.00
#> S38-E6      2   0.000      0.990 0.00 1.00
#> S38-E7      2   0.000      0.990 0.00 1.00
#> S38-E8      1   0.000      0.997 1.00 0.00
#> S38-E9      2   0.000      0.990 0.00 1.00
#> S38-F10     1   0.000      0.997 1.00 0.00
#> S38-F11     1   0.000      0.997 1.00 0.00
#> S38-F2      2   0.000      0.990 0.00 1.00
#> S38-F3      1   0.000      0.997 1.00 0.00
#> S38-F5      2   0.000      0.990 0.00 1.00
#> S38-F6      2   0.000      0.990 0.00 1.00
#> S38-F7      1   0.000      0.997 1.00 0.00
#> S38-F8      2   0.000      0.990 0.00 1.00
#> S38-F9      1   0.000      0.997 1.00 0.00
#> S38-G10     1   0.000      0.997 1.00 0.00
#> S38-G12     1   0.000      0.997 1.00 0.00
#> S38-G4      2   0.000      0.990 0.00 1.00
#> S38-G5      2   0.000      0.990 0.00 1.00
#> S38-G6      2   0.000      0.990 0.00 1.00
#> S38-G7      1   0.000      0.997 1.00 0.00
#> S38-G8      1   0.000      0.997 1.00 0.00
#> S38-G9      1   0.000      0.997 1.00 0.00
#> S38-H1      1   0.000      0.997 1.00 0.00
#> S38-H11     1   0.000      0.997 1.00 0.00
#> S38-H2      2   0.000      0.990 0.00 1.00
#> S38-H3      1   0.000      0.997 1.00 0.00
#> S38-H4      1   0.000      0.997 1.00 0.00
#> S38-H5      2   0.000      0.990 0.00 1.00
#> S38-H6      2   0.000      0.990 0.00 1.00
#> S38-H8      1   0.000      0.997 1.00 0.00

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>         class entropy silhouette   p1   p2   p3
#> O10-A1      2  0.0000      1.000 0.00 1.00 0.00
#> O10-A11     3  0.0000      0.981 0.00 0.00 1.00
#> O10-A12     2  0.0000      1.000 0.00 1.00 0.00
#> O10-A3      1  0.1529      0.950 0.96 0.00 0.04
#> O10-A4      2  0.0000      1.000 0.00 1.00 0.00
#> O10-A5      3  0.0000      0.981 0.00 0.00 1.00
#> O10-A7      3  0.0000      0.981 0.00 0.00 1.00
#> O10-A8      3  0.0000      0.981 0.00 0.00 1.00
#> O10-A9      1  0.4555      0.750 0.80 0.00 0.20
#> O10-B1      1  0.0000      0.989 1.00 0.00 0.00
#> O10-B10     3  0.0000      0.981 0.00 0.00 1.00
#> O10-B11     3  0.0000      0.981 0.00 0.00 1.00
#> O10-B12     1  0.0000      0.989 1.00 0.00 0.00
#> O10-B2      3  0.0000      0.981 0.00 0.00 1.00
#> O10-B5      3  0.0000      0.981 0.00 0.00 1.00
#> O10-B6      3  0.0000      0.981 0.00 0.00 1.00
#> O10-B7      3  0.0000      0.981 0.00 0.00 1.00
#> O10-B9      3  0.0000      0.981 0.00 0.00 1.00
#> O10-C10     3  0.0000      0.981 0.00 0.00 1.00
#> O10-C11     1  0.0000      0.989 1.00 0.00 0.00
#> O10-C12     3  0.0000      0.981 0.00 0.00 1.00
#> O10-C2      1  0.0000      0.989 1.00 0.00 0.00
#> O10-C4      2  0.0000      1.000 0.00 1.00 0.00
#> O10-C5      3  0.0000      0.981 0.00 0.00 1.00
#> O10-C6      3  0.0000      0.981 0.00 0.00 1.00
#> O10-C9      3  0.0000      0.981 0.00 0.00 1.00
#> O10-D1      3  0.0000      0.981 0.00 0.00 1.00
#> O10-D11     3  0.0892      0.965 0.02 0.00 0.98
#> O10-D12     3  0.0000      0.981 0.00 0.00 1.00
#> O10-D2      1  0.5216      0.646 0.74 0.00 0.26
#> O10-D3      2  0.0000      1.000 0.00 1.00 0.00
#> O10-D5      3  0.0000      0.981 0.00 0.00 1.00
#> O10-D6      3  0.0000      0.981 0.00 0.00 1.00
#> O10-D8      1  0.0000      0.989 1.00 0.00 0.00
#> O10-D9      3  0.0000      0.981 0.00 0.00 1.00
#> O10-E1      3  0.0000      0.981 0.00 0.00 1.00
#> O10-E11     3  0.0000      0.981 0.00 0.00 1.00
#> O10-E12     3  0.0000      0.981 0.00 0.00 1.00
#> O10-E6      3  0.0000      0.981 0.00 0.00 1.00
#> O10-E8      1  0.0000      0.989 1.00 0.00 0.00
#> O10-E9      1  0.0000      0.989 1.00 0.00 0.00
#> O10-F1      3  0.0000      0.981 0.00 0.00 1.00
#> O10-F11     3  0.0000      0.981 0.00 0.00 1.00
#> O10-F12     3  0.0892      0.965 0.02 0.00 0.98
#> O10-F2      1  0.0000      0.989 1.00 0.00 0.00
#> O10-F4      1  0.0000      0.989 1.00 0.00 0.00
#> O10-F5      3  0.1529      0.948 0.04 0.00 0.96
#> O10-F6      2  0.0000      1.000 0.00 1.00 0.00
#> O10-F8      1  0.3686      0.834 0.86 0.00 0.14
#> O10-F9      3  0.0000      0.981 0.00 0.00 1.00
#> O10-G1      1  0.0000      0.989 1.00 0.00 0.00
#> O10-G12     1  0.0000      0.989 1.00 0.00 0.00
#> O10-G2      1  0.0000      0.989 1.00 0.00 0.00
#> O10-G3      1  0.0000      0.989 1.00 0.00 0.00
#> O10-G4      1  0.0000      0.989 1.00 0.00 0.00
#> O10-G5      1  0.0000      0.989 1.00 0.00 0.00
#> O10-G7      1  0.0000      0.989 1.00 0.00 0.00
#> O10-H1      1  0.0000      0.989 1.00 0.00 0.00
#> O10-H4      1  0.0000      0.989 1.00 0.00 0.00
#> O10-H5      1  0.0000      0.989 1.00 0.00 0.00
#> O10-H6      1  0.0000      0.989 1.00 0.00 0.00
#> O10-H7      1  0.0000      0.989 1.00 0.00 0.00
#> O12-A1      2  0.0000      1.000 0.00 1.00 0.00
#> O12-A12     2  0.0000      1.000 0.00 1.00 0.00
#> O12-A2      1  0.0000      0.989 1.00 0.00 0.00
#> O12-A3      2  0.0000      1.000 0.00 1.00 0.00
#> O12-B1      2  0.0000      1.000 0.00 1.00 0.00
#> O12-B12     3  0.0000      0.981 0.00 0.00 1.00
#> O12-C1      2  0.0000      1.000 0.00 1.00 0.00
#> O12-D1      2  0.0000      1.000 0.00 1.00 0.00
#> O12-D2      1  0.0000      0.989 1.00 0.00 0.00
#> O12-E1      1  0.0000      0.989 1.00 0.00 0.00
#> O12-E12     2  0.0000      1.000 0.00 1.00 0.00
#> O12-F12     3  0.0000      0.981 0.00 0.00 1.00
#> O12-F2      2  0.0000      1.000 0.00 1.00 0.00
#> O12-G2      2  0.0000      1.000 0.00 1.00 0.00
#> O12-H1      2  0.0000      1.000 0.00 1.00 0.00
#> O12-H2      2  0.0000      1.000 0.00 1.00 0.00
#> O7-A3       3  0.0000      0.981 0.00 0.00 1.00
#> O7-A5       2  0.0000      1.000 0.00 1.00 0.00
#> O7-A7       2  0.0000      1.000 0.00 1.00 0.00
#> O7-A8       2  0.0000      1.000 0.00 1.00 0.00
#> O7-A9       3  0.0000      0.981 0.00 0.00 1.00
#> O7-B1       2  0.0000      1.000 0.00 1.00 0.00
#> O7-B11      3  0.0000      0.981 0.00 0.00 1.00
#> O7-B12      2  0.0000      1.000 0.00 1.00 0.00
#> O7-B6       3  0.0000      0.981 0.00 0.00 1.00
#> O7-B7       3  0.0000      0.981 0.00 0.00 1.00
#> O7-B8       2  0.0000      1.000 0.00 1.00 0.00
#> O7-B9       2  0.0000      1.000 0.00 1.00 0.00
#> O7-C1       3  0.0000      0.981 0.00 0.00 1.00
#> O7-C11      3  0.0000      0.981 0.00 0.00 1.00
#> O7-C2       2  0.0000      1.000 0.00 1.00 0.00
#> O7-C3       2  0.0000      1.000 0.00 1.00 0.00
#> O7-C6       2  0.0000      1.000 0.00 1.00 0.00
#> O7-C7       3  0.0000      0.981 0.00 0.00 1.00
#> O7-D1       2  0.0000      1.000 0.00 1.00 0.00
#> O7-D11      2  0.0000      1.000 0.00 1.00 0.00
#> O7-D12      2  0.0000      1.000 0.00 1.00 0.00
#> O7-D2       2  0.0000      1.000 0.00 1.00 0.00
#> O7-D3       1  0.0000      0.989 1.00 0.00 0.00
#> O7-D4       3  0.0000      0.981 0.00 0.00 1.00
#> O7-D5       1  0.0000      0.989 1.00 0.00 0.00
#> O7-E10      3  0.0000      0.981 0.00 0.00 1.00
#> O7-E11      3  0.0000      0.981 0.00 0.00 1.00
#> O7-E5       2  0.0000      1.000 0.00 1.00 0.00
#> O7-E6       2  0.0000      1.000 0.00 1.00 0.00
#> O7-F1       2  0.0000      1.000 0.00 1.00 0.00
#> O7-F10      2  0.0000      1.000 0.00 1.00 0.00
#> O7-F11      2  0.0000      1.000 0.00 1.00 0.00
#> O7-F2       3  0.0000      0.981 0.00 0.00 1.00
#> O7-F3       3  0.0000      0.981 0.00 0.00 1.00
#> O7-F4       2  0.0000      1.000 0.00 1.00 0.00
#> O7-F7       3  0.0000      0.981 0.00 0.00 1.00
#> O7-F9       3  0.0000      0.981 0.00 0.00 1.00
#> O7-G12      2  0.0000      1.000 0.00 1.00 0.00
#> O7-G3       1  0.0000      0.989 1.00 0.00 0.00
#> O7-G9       2  0.0000      1.000 0.00 1.00 0.00
#> O7-H3       2  0.0000      1.000 0.00 1.00 0.00
#> O7-H4       2  0.0000      1.000 0.00 1.00 0.00
#> O7-H8       2  0.0000      1.000 0.00 1.00 0.00
#> O8-A2       3  0.0000      0.981 0.00 0.00 1.00
#> O8-A3       3  0.0000      0.981 0.00 0.00 1.00
#> O8-A5       2  0.0000      1.000 0.00 1.00 0.00
#> O8-A8       3  0.0000      0.981 0.00 0.00 1.00
#> O8-A9       2  0.0000      1.000 0.00 1.00 0.00
#> O8-B1       2  0.0000      1.000 0.00 1.00 0.00
#> O8-B2       3  0.0000      0.981 0.00 0.00 1.00
#> O8-B4       3  0.0000      0.981 0.00 0.00 1.00
#> O8-B6       3  0.0000      0.981 0.00 0.00 1.00
#> O8-B7       3  0.0000      0.981 0.00 0.00 1.00
#> O8-B9       3  0.0000      0.981 0.00 0.00 1.00
#> O8-C11      3  0.0000      0.981 0.00 0.00 1.00
#> O8-C12      3  0.0000      0.981 0.00 0.00 1.00
#> O8-C2       2  0.0000      1.000 0.00 1.00 0.00
#> O8-C3       3  0.0000      0.981 0.00 0.00 1.00
#> O8-C4       3  0.0000      0.981 0.00 0.00 1.00
#> O8-C5       3  0.0000      0.981 0.00 0.00 1.00
#> O8-C6       3  0.0000      0.981 0.00 0.00 1.00
#> O8-C8       3  0.0000      0.981 0.00 0.00 1.00
#> O8-D3       3  0.0000      0.981 0.00 0.00 1.00
#> O8-D5       3  0.0000      0.981 0.00 0.00 1.00
#> O8-D6       3  0.4291      0.789 0.18 0.00 0.82
#> O8-D9       3  0.0000      0.981 0.00 0.00 1.00
#> O8-E1       1  0.4796      0.716 0.78 0.00 0.22
#> O8-E11      3  0.0000      0.981 0.00 0.00 1.00
#> O8-E2       3  0.0000      0.981 0.00 0.00 1.00
#> O8-E3       2  0.0000      1.000 0.00 1.00 0.00
#> O8-E5       3  0.0000      0.981 0.00 0.00 1.00
#> O8-E7       2  0.0000      1.000 0.00 1.00 0.00
#> O8-E9       3  0.0000      0.981 0.00 0.00 1.00
#> O8-F10      1  0.0000      0.989 1.00 0.00 0.00
#> O8-F11      3  0.0000      0.981 0.00 0.00 1.00
#> O8-F12      3  0.0000      0.981 0.00 0.00 1.00
#> O8-F2       2  0.0000      1.000 0.00 1.00 0.00
#> O8-F3       3  0.0000      0.981 0.00 0.00 1.00
#> O8-F6       2  0.0000      1.000 0.00 1.00 0.00
#> O8-F8       2  0.0000      1.000 0.00 1.00 0.00
#> O8-F9       1  0.0000      0.989 1.00 0.00 0.00
#> O8-G1       3  0.2959      0.890 0.10 0.00 0.90
#> O8-G12      3  0.0000      0.981 0.00 0.00 1.00
#> O8-G5       3  0.0000      0.981 0.00 0.00 1.00
#> O8-G9       1  0.0000      0.989 1.00 0.00 0.00
#> O8-H1       1  0.0000      0.989 1.00 0.00 0.00
#> O8-H11      2  0.0000      1.000 0.00 1.00 0.00
#> O8-H2       2  0.0000      1.000 0.00 1.00 0.00
#> O8-H6       1  0.0000      0.989 1.00 0.00 0.00
#> O9-A10      3  0.0000      0.981 0.00 0.00 1.00
#> O9-A12      2  0.0000      1.000 0.00 1.00 0.00
#> O9-A2       1  0.0000      0.989 1.00 0.00 0.00
#> O9-A3       2  0.0000      1.000 0.00 1.00 0.00
#> O9-A5       2  0.0000      1.000 0.00 1.00 0.00
#> O9-A6       2  0.0000      1.000 0.00 1.00 0.00
#> O9-A8       3  0.0000      0.981 0.00 0.00 1.00
#> O9-A9       1  0.0000      0.989 1.00 0.00 0.00
#> O9-B10      1  0.0000      0.989 1.00 0.00 0.00
#> O9-B11      1  0.0000      0.989 1.00 0.00 0.00
#> O9-B12      3  0.0000      0.981 0.00 0.00 1.00
#> O9-B2       3  0.0000      0.981 0.00 0.00 1.00
#> O9-B3       1  0.0000      0.989 1.00 0.00 0.00
#> O9-B5       2  0.0000      1.000 0.00 1.00 0.00
#> O9-B6       3  0.0000      0.981 0.00 0.00 1.00
#> O9-B7       3  0.0000      0.981 0.00 0.00 1.00
#> O9-B8       2  0.0000      1.000 0.00 1.00 0.00
#> O9-C10      1  0.0000      0.989 1.00 0.00 0.00
#> O9-C2       3  0.3340      0.867 0.12 0.00 0.88
#> O9-C3       1  0.0000      0.989 1.00 0.00 0.00
#> O9-C4       3  0.0000      0.981 0.00 0.00 1.00
#> O9-C5       1  0.0000      0.989 1.00 0.00 0.00
#> O9-C6       3  0.0000      0.981 0.00 0.00 1.00
#> O9-C9       1  0.0000      0.989 1.00 0.00 0.00
#> O9-D1       1  0.0000      0.989 1.00 0.00 0.00
#> O9-D10      1  0.0000      0.989 1.00 0.00 0.00
#> O9-D11      1  0.0000      0.989 1.00 0.00 0.00
#> O9-D12      3  0.1529      0.946 0.00 0.04 0.96
#> O9-D2       2  0.0000      1.000 0.00 1.00 0.00
#> O9-D5       1  0.0000      0.989 1.00 0.00 0.00
#> O9-D6       3  0.0000      0.981 0.00 0.00 1.00
#> O9-D7       2  0.0000      1.000 0.00 1.00 0.00
#> O9-D8       2  0.0000      1.000 0.00 1.00 0.00
#> O9-E1       2  0.0000      1.000 0.00 1.00 0.00
#> O9-E10      1  0.0000      0.989 1.00 0.00 0.00
#> O9-E11      1  0.0000      0.989 1.00 0.00 0.00
#> O9-E12      3  0.0000      0.981 0.00 0.00 1.00
#> O9-E2       2  0.0000      1.000 0.00 1.00 0.00
#> O9-E4       3  0.0000      0.981 0.00 0.00 1.00
#> O9-E5       1  0.0000      0.989 1.00 0.00 0.00
#> O9-E7       1  0.0000      0.989 1.00 0.00 0.00
#> O9-E8       1  0.0000      0.989 1.00 0.00 0.00
#> O9-E9       1  0.0000      0.989 1.00 0.00 0.00
#> O9-F1       2  0.0000      1.000 0.00 1.00 0.00
#> O9-F10      1  0.0000      0.989 1.00 0.00 0.00
#> O9-F12      1  0.0000      0.989 1.00 0.00 0.00
#> O9-F2       1  0.0000      0.989 1.00 0.00 0.00
#> O9-F4       2  0.0000      1.000 0.00 1.00 0.00
#> O9-F5       2  0.0000      1.000 0.00 1.00 0.00
#> O9-F9       3  0.0000      0.981 0.00 0.00 1.00
#> O9-G10      1  0.0000      0.989 1.00 0.00 0.00
#> O9-G12      1  0.0000      0.989 1.00 0.00 0.00
#> O9-G2       1  0.0000      0.989 1.00 0.00 0.00
#> O9-G3       3  0.5560      0.587 0.30 0.00 0.70
#> O9-G4       1  0.0000      0.989 1.00 0.00 0.00
#> O9-G6       1  0.0000      0.989 1.00 0.00 0.00
#> O9-G7       3  0.0000      0.981 0.00 0.00 1.00
#> O9-G9       2  0.0000      1.000 0.00 1.00 0.00
#> O9-H12      2  0.0000      1.000 0.00 1.00 0.00
#> O9-H3       1  0.0000      0.989 1.00 0.00 0.00
#> O9-H5       2  0.0000      1.000 0.00 1.00 0.00
#> O9-H9       1  0.0000      0.989 1.00 0.00 0.00
#> S37-A1      1  0.0000      0.989 1.00 0.00 0.00
#> S37-A10     1  0.0000      0.989 1.00 0.00 0.00
#> S37-A2      2  0.0000      1.000 0.00 1.00 0.00
#> S37-A3      1  0.0892      0.970 0.98 0.00 0.02
#> S37-A4      3  0.0000      0.981 0.00 0.00 1.00
#> S37-A5      2  0.0000      1.000 0.00 1.00 0.00
#> S37-A6      2  0.0000      1.000 0.00 1.00 0.00
#> S37-A7      3  0.0000      0.981 0.00 0.00 1.00
#> S37-A8      2  0.0000      1.000 0.00 1.00 0.00
#> S37-A9      1  0.0000      0.989 1.00 0.00 0.00
#> S37-B1      1  0.0000      0.989 1.00 0.00 0.00
#> S37-B10     1  0.0000      0.989 1.00 0.00 0.00
#> S37-B11     2  0.0000      1.000 0.00 1.00 0.00
#> S37-B12     2  0.0000      1.000 0.00 1.00 0.00
#> S37-B2      1  0.0000      0.989 1.00 0.00 0.00
#> S37-B3      3  0.5397      0.627 0.28 0.00 0.72
#> S37-B4      1  0.0000      0.989 1.00 0.00 0.00
#> S37-B5      3  0.0000      0.981 0.00 0.00 1.00
#> S37-B6      3  0.0000      0.981 0.00 0.00 1.00
#> S37-B7      1  0.0000      0.989 1.00 0.00 0.00
#> S37-B9      3  0.0000      0.981 0.00 0.00 1.00
#> S37-C10     1  0.0000      0.989 1.00 0.00 0.00
#> S37-C12     2  0.0000      1.000 0.00 1.00 0.00
#> S37-C3      1  0.0000      0.989 1.00 0.00 0.00
#> S37-C4      1  0.0000      0.989 1.00 0.00 0.00
#> S37-C6      1  0.6126      0.321 0.60 0.00 0.40
#> S37-C7      1  0.0000      0.989 1.00 0.00 0.00
#> S37-C8      2  0.0000      1.000 0.00 1.00 0.00
#> S37-C9      1  0.0000      0.989 1.00 0.00 0.00
#> S37-D10     1  0.0000      0.989 1.00 0.00 0.00
#> S37-D11     3  0.0000      0.981 0.00 0.00 1.00
#> S37-D12     2  0.0000      1.000 0.00 1.00 0.00
#> S37-D2      1  0.0000      0.989 1.00 0.00 0.00
#> S37-D4      1  0.0000      0.989 1.00 0.00 0.00
#> S37-D6      1  0.0000      0.989 1.00 0.00 0.00
#> S37-D8      1  0.0000      0.989 1.00 0.00 0.00
#> S37-D9      3  0.4291      0.789 0.18 0.00 0.82
#> S37-E1      1  0.0000      0.989 1.00 0.00 0.00
#> S37-E10     3  0.5397      0.625 0.28 0.00 0.72
#> S37-E11     1  0.0000      0.989 1.00 0.00 0.00
#> S37-E2      1  0.0000      0.989 1.00 0.00 0.00
#> S37-E3      1  0.0000      0.989 1.00 0.00 0.00
#> S37-E5      3  0.1529      0.948 0.04 0.00 0.96
#> S37-E6      1  0.0000      0.989 1.00 0.00 0.00
#> S37-E7      2  0.0000      1.000 0.00 1.00 0.00
#> S37-E8      2  0.0000      1.000 0.00 1.00 0.00
#> S37-E9      1  0.0000      0.989 1.00 0.00 0.00
#> S37-F1      1  0.0000      0.989 1.00 0.00 0.00
#> S37-F10     1  0.0000      0.989 1.00 0.00 0.00
#> S37-F12     1  0.0000      0.989 1.00 0.00 0.00
#> S37-F2      1  0.0892      0.970 0.98 0.00 0.02
#> S37-F3      1  0.0000      0.989 1.00 0.00 0.00
#> S37-F5      1  0.0000      0.989 1.00 0.00 0.00
#> S37-F7      1  0.0000      0.989 1.00 0.00 0.00
#> S37-F9      1  0.0000      0.989 1.00 0.00 0.00
#> S37-G1      1  0.2959      0.885 0.90 0.00 0.10
#> S37-G10     1  0.0000      0.989 1.00 0.00 0.00
#> S37-G12     1  0.0000      0.989 1.00 0.00 0.00
#> S37-G2      2  0.0000      1.000 0.00 1.00 0.00
#> S37-G3      1  0.0000      0.989 1.00 0.00 0.00
#> S37-G4      2  0.0000      1.000 0.00 1.00 0.00
#> S37-G5      3  0.0000      0.981 0.00 0.00 1.00
#> S37-G6      1  0.0000      0.989 1.00 0.00 0.00
#> S37-G7      1  0.0000      0.989 1.00 0.00 0.00
#> S37-G8      3  0.0000      0.981 0.00 0.00 1.00
#> S37-H2      1  0.0000      0.989 1.00 0.00 0.00
#> S37-H4      3  0.2959      0.889 0.10 0.00 0.90
#> S37-H7      1  0.0000      0.989 1.00 0.00 0.00
#> S37-H8      1  0.0000      0.989 1.00 0.00 0.00
#> S37-H9      1  0.0000      0.989 1.00 0.00 0.00
#> S38-A1      1  0.0000      0.989 1.00 0.00 0.00
#> S38-A10     1  0.0000      0.989 1.00 0.00 0.00
#> S38-A12     2  0.0000      1.000 0.00 1.00 0.00
#> S38-A2      2  0.0000      1.000 0.00 1.00 0.00
#> S38-A3      3  0.1529      0.948 0.04 0.00 0.96
#> S38-A5      2  0.0000      1.000 0.00 1.00 0.00
#> S38-A9      2  0.0000      1.000 0.00 1.00 0.00
#> S38-B10     3  0.0000      0.981 0.00 0.00 1.00
#> S38-B11     1  0.0000      0.989 1.00 0.00 0.00
#> S38-B2      2  0.0000      1.000 0.00 1.00 0.00
#> S38-B6      1  0.0000      0.989 1.00 0.00 0.00
#> S38-B7      2  0.0000      1.000 0.00 1.00 0.00
#> S38-B8      2  0.0000      1.000 0.00 1.00 0.00
#> S38-B9      2  0.0000      1.000 0.00 1.00 0.00
#> S38-C1      3  0.2066      0.927 0.00 0.06 0.94
#> S38-C10     3  0.0000      0.981 0.00 0.00 1.00
#> S38-C11     3  0.2959      0.889 0.10 0.00 0.90
#> S38-C3      2  0.0000      1.000 0.00 1.00 0.00
#> S38-C4      1  0.0000      0.989 1.00 0.00 0.00
#> S38-C5      3  0.0000      0.981 0.00 0.00 1.00
#> S38-C6      3  0.0000      0.981 0.00 0.00 1.00
#> S38-C7      3  0.0000      0.981 0.00 0.00 1.00
#> S38-C9      2  0.0000      1.000 0.00 1.00 0.00
#> S38-D1      2  0.0000      1.000 0.00 1.00 0.00
#> S38-D10     3  0.2959      0.889 0.10 0.00 0.90
#> S38-D11     3  0.0000      0.981 0.00 0.00 1.00
#> S38-D12     1  0.0000      0.989 1.00 0.00 0.00
#> S38-D2      1  0.0000      0.989 1.00 0.00 0.00
#> S38-D4      3  0.4291      0.780 0.00 0.18 0.82
#> S38-D5      2  0.0000      1.000 0.00 1.00 0.00
#> S38-D6      2  0.0000      1.000 0.00 1.00 0.00
#> S38-D7      3  0.4291      0.789 0.18 0.00 0.82
#> S38-D8      1  0.0000      0.989 1.00 0.00 0.00
#> S38-D9      1  0.0000      0.989 1.00 0.00 0.00
#> S38-E1      2  0.0000      1.000 0.00 1.00 0.00
#> S38-E2      3  0.0000      0.981 0.00 0.00 1.00
#> S38-E3      3  0.0892      0.965 0.02 0.00 0.98
#> S38-E4      2  0.0000      1.000 0.00 1.00 0.00
#> S38-E5      2  0.0000      1.000 0.00 1.00 0.00
#> S38-E6      2  0.0000      1.000 0.00 1.00 0.00
#> S38-E7      2  0.1529      0.958 0.00 0.96 0.04
#> S38-E8      3  0.0000      0.981 0.00 0.00 1.00
#> S38-E9      2  0.0000      1.000 0.00 1.00 0.00
#> S38-F10     1  0.0000      0.989 1.00 0.00 0.00
#> S38-F11     1  0.0000      0.989 1.00 0.00 0.00
#> S38-F2      2  0.0000      1.000 0.00 1.00 0.00
#> S38-F3      1  0.0000      0.989 1.00 0.00 0.00
#> S38-F5      2  0.0000      1.000 0.00 1.00 0.00
#> S38-F6      2  0.0000      1.000 0.00 1.00 0.00
#> S38-F7      3  0.0000      0.981 0.00 0.00 1.00
#> S38-F8      2  0.0000      1.000 0.00 1.00 0.00
#> S38-F9      1  0.0000      0.989 1.00 0.00 0.00
#> S38-G10     1  0.0000      0.989 1.00 0.00 0.00
#> S38-G12     1  0.0000      0.989 1.00 0.00 0.00
#> S38-G4      2  0.0000      1.000 0.00 1.00 0.00
#> S38-G5      2  0.0000      1.000 0.00 1.00 0.00
#> S38-G6      2  0.0000      1.000 0.00 1.00 0.00
#> S38-G7      3  0.0000      0.981 0.00 0.00 1.00
#> S38-G8      3  0.0000      0.981 0.00 0.00 1.00
#> S38-G9      3  0.0000      0.981 0.00 0.00 1.00
#> S38-H1      1  0.0000      0.989 1.00 0.00 0.00
#> S38-H11     1  0.0000      0.989 1.00 0.00 0.00
#> S38-H2      2  0.0000      1.000 0.00 1.00 0.00
#> S38-H3      3  0.0000      0.981 0.00 0.00 1.00
#> S38-H4      1  0.0000      0.989 1.00 0.00 0.00
#> S38-H5      2  0.0000      1.000 0.00 1.00 0.00
#> S38-H6      2  0.0000      1.000 0.00 1.00 0.00
#> S38-H8      1  0.0000      0.989 1.00 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>         class entropy silhouette   p1   p2   p3   p4
#> O10-A1      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O10-A11     3  0.1411      0.945 0.02 0.00 0.96 0.02
#> O10-A12     4  0.2011      0.975 0.00 0.08 0.00 0.92
#> O10-A3      1  0.1411      0.937 0.96 0.00 0.02 0.02
#> O10-A4      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O10-A5      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-A7      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-A8      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O10-A9      1  0.4936      0.563 0.70 0.00 0.28 0.02
#> O10-B1      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-B10     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-B11     3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O10-B12     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-B2      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-B5      3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O10-B6      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-B7      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-B9      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-C10     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-C11     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-C12     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-C2      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-C4      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O10-C5      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-C6      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-C9      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-D1      3  0.4790      0.366 0.00 0.38 0.62 0.00
#> O10-D11     3  0.2335      0.925 0.06 0.00 0.92 0.02
#> O10-D12     3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O10-D2      1  0.4642      0.640 0.74 0.00 0.24 0.02
#> O10-D3      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O10-D5      3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O10-D6      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-D8      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-D9      3  0.1411      0.945 0.02 0.00 0.96 0.02
#> O10-E1      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-E11     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-E12     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O10-E6      3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O10-E8      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-E9      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O10-F1      3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O10-F11     3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O10-F12     3  0.2335      0.925 0.06 0.00 0.92 0.02
#> O10-F2      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O10-F4      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-F5      3  0.2706      0.909 0.08 0.00 0.90 0.02
#> O10-F6      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O10-F8      1  0.3606      0.801 0.84 0.00 0.14 0.02
#> O10-F9      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O10-G1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-G12     1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-G2      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-G3      1  0.5713      0.475 0.62 0.34 0.00 0.04
#> O10-G4      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-G5      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-G7      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-H1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-H4      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-H5      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-H6      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O10-H7      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O12-A1      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O12-A12     2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O12-A2      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O12-A3      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O12-B1      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O12-B12     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O12-C1      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O12-D1      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O12-D2      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O12-E1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O12-E12     4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O12-F12     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O12-F2      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O12-G2      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O12-H1      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O12-H2      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-A3       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-A5       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-A7       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-A8       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-A9       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-B1       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-B11      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-B12      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-B6       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-B7       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-B8       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-B9       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-C1       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-C11      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-C2       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-C3       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-C6       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-C7       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-D1       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-D11      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-D12      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-D2       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-D3       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O7-D4       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-D5       1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O7-E10      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-E11      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-E5       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-E6       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-F1       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-F10      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-F11      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-F2       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-F3       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-F4       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-F7       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-F9       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O7-G12      4  0.2011      0.975 0.00 0.08 0.00 0.92
#> O7-G3       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O7-G9       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-H3       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O7-H4       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O7-H8       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O8-A2       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-A3       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-A5       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O8-A8       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-A9       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O8-B1       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O8-B2       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-B4       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-B6       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-B7       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-B9       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-C11      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-C12      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-C2       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O8-C3       3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O8-C4       3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O8-C5       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-C6       3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O8-C8       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-D3       3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O8-D5       3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O8-D6       3  0.4472      0.752 0.22 0.00 0.76 0.02
#> O8-D9       3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O8-E1       1  0.4642      0.642 0.74 0.00 0.24 0.02
#> O8-E11      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O8-E2       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-E3       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O8-E5       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-E7       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O8-E9       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-F10      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O8-F11      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-F12      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-F2       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O8-F3       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-F6       4  0.2011      0.975 0.00 0.08 0.00 0.92
#> O8-F8       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O8-F9       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O8-G1       3  0.3606      0.849 0.14 0.00 0.84 0.02
#> O8-G12      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-G5       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O8-G9       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O8-H1       1  0.0707      0.964 0.98 0.00 0.00 0.02
#> O8-H11      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O8-H2       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O8-H6       1  0.0707      0.964 0.98 0.00 0.00 0.02
#> O9-A10      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-A12      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-A2       1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-A3       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-A5       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-A6       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-A8       3  0.1411      0.945 0.02 0.00 0.96 0.02
#> O9-A9       1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-B10      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-B11      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-B12      3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O9-B2       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-B3       1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-B5       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-B6       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-B7       3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O9-B8       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-C10      1  0.0707      0.964 0.98 0.00 0.00 0.02
#> O9-C2       3  0.3335      0.871 0.12 0.00 0.86 0.02
#> O9-C3       1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-C4       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-C5       1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-C6       3  0.2335      0.925 0.06 0.00 0.92 0.02
#> O9-C9       1  0.0707      0.964 0.98 0.00 0.00 0.02
#> O9-D1       1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-D10      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-D11      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-D12      2  0.4277      0.625 0.00 0.72 0.28 0.00
#> O9-D2       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-D5       1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-D6       3  0.0707      0.951 0.00 0.00 0.98 0.02
#> O9-D7       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-D8       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-E1       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-E10      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-E11      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-E12      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-E2       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-E4       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-E5       1  0.0707      0.964 0.98 0.00 0.00 0.02
#> O9-E7       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-E8       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-E9       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-F1       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-F10      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-F12      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-F2       1  0.0707      0.964 0.98 0.00 0.00 0.02
#> O9-F4       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-F5       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-F9       3  0.0000      0.954 0.00 0.00 1.00 0.00
#> O9-G10      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-G12      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-G2       1  0.0707      0.952 0.98 0.00 0.00 0.02
#> O9-G3       3  0.5271      0.535 0.34 0.00 0.64 0.02
#> O9-G4       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-G6       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> O9-G7       3  0.1913      0.937 0.04 0.00 0.94 0.02
#> O9-G9       2  0.0000      0.983 0.00 1.00 0.00 0.00
#> O9-H12      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-H3       1  0.0000      0.963 1.00 0.00 0.00 0.00
#> O9-H5       4  0.1637      0.992 0.00 0.06 0.00 0.94
#> O9-H9       1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-A1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-A10     1  0.0707      0.964 0.98 0.00 0.00 0.02
#> S37-A2      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S37-A3      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> S37-A4      3  0.2335      0.926 0.06 0.00 0.92 0.02
#> S37-A5      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S37-A6      4  0.2345      0.955 0.00 0.10 0.00 0.90
#> S37-A7      3  0.1411      0.945 0.02 0.00 0.96 0.02
#> S37-A8      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S37-A9      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-B1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-B10     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-B11     4  0.2011      0.975 0.00 0.08 0.00 0.92
#> S37-B12     4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S37-B2      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-B3      3  0.5062      0.619 0.30 0.00 0.68 0.02
#> S37-B4      1  0.0707      0.964 0.98 0.00 0.00 0.02
#> S37-B5      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S37-B6      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S37-B7      1  0.0707      0.964 0.98 0.00 0.00 0.02
#> S37-B9      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> S37-C10     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-C12     4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S37-C3      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-C4      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-C6      1  0.5173      0.466 0.66 0.00 0.32 0.02
#> S37-C7      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-C8      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S37-C9      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-D10     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-D11     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> S37-D12     2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S37-D2      1  0.0707      0.964 0.98 0.00 0.00 0.02
#> S37-D4      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> S37-D6      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-D8      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-D9      3  0.4284      0.776 0.20 0.00 0.78 0.02
#> S37-E1      1  0.0707      0.952 0.98 0.00 0.00 0.02
#> S37-E10     3  0.5355      0.488 0.36 0.00 0.62 0.02
#> S37-E11     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-E2      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-E3      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-E5      3  0.3853      0.827 0.16 0.00 0.82 0.02
#> S37-E6      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-E7      4  0.4134      0.735 0.00 0.26 0.00 0.74
#> S37-E8      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S37-E9      1  0.0707      0.964 0.98 0.00 0.00 0.02
#> S37-F1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-F10     1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-F12     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-F2      1  0.1411      0.937 0.96 0.00 0.02 0.02
#> S37-F3      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-F5      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-F7      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-F9      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-G1      1  0.3335      0.826 0.86 0.00 0.12 0.02
#> S37-G10     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-G12     1  0.0707      0.952 0.98 0.00 0.00 0.02
#> S37-G2      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S37-G3      4  0.0707      0.917 0.02 0.00 0.00 0.98
#> S37-G4      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S37-G5      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S37-G6      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-G7      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S37-G8      3  0.1411      0.945 0.02 0.00 0.96 0.02
#> S37-H2      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-H4      3  0.3335      0.871 0.12 0.00 0.86 0.02
#> S37-H7      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-H8      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S37-H9      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-A1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-A10     1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-A12     4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-A2      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-A3      3  0.2706      0.909 0.08 0.00 0.90 0.02
#> S38-A5      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-A9      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-B10     3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-B11     1  0.1411      0.937 0.96 0.00 0.02 0.02
#> S38-B2      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-B6      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-B7      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-B8      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-B9      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-C1      2  0.4907      0.293 0.00 0.58 0.42 0.00
#> S38-C10     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> S38-C11     3  0.3853      0.827 0.16 0.00 0.82 0.02
#> S38-C3      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-C4      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-C5      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-C6      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-C7      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-C9      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-D1      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-D10     3  0.4079      0.803 0.18 0.00 0.80 0.02
#> S38-D11     3  0.0000      0.954 0.00 0.00 1.00 0.00
#> S38-D12     1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-D2      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S38-D4      2  0.2345      0.865 0.00 0.90 0.10 0.00
#> S38-D5      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-D6      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-D7      3  0.4936      0.654 0.28 0.00 0.70 0.02
#> S38-D8      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-D9      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S38-E1      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-E2      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-E3      3  0.3853      0.827 0.16 0.00 0.82 0.02
#> S38-E4      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-E5      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-E6      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-E7      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-E8      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-E9      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-F10     1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S38-F11     1  0.0707      0.952 0.98 0.00 0.00 0.02
#> S38-F2      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-F3      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-F5      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-F6      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-F7      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-F8      4  0.2011      0.975 0.00 0.08 0.00 0.92
#> S38-F9      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S38-G10     1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-G12     1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-G4      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-G5      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-G6      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-G7      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-G8      3  0.0000      0.954 0.00 0.00 1.00 0.00
#> S38-G9      3  0.1913      0.937 0.04 0.00 0.94 0.02
#> S38-H1      1  0.1211      0.963 0.96 0.00 0.00 0.04
#> S38-H11     1  0.0707      0.952 0.98 0.00 0.00 0.02
#> S38-H2      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-H3      3  0.0707      0.951 0.00 0.00 0.98 0.02
#> S38-H4      1  0.0000      0.963 1.00 0.00 0.00 0.00
#> S38-H5      4  0.1637      0.992 0.00 0.06 0.00 0.94
#> S38-H6      2  0.0000      0.983 0.00 1.00 0.00 0.00
#> S38-H8      1  0.0000      0.963 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)

plot of chunk tab-node-0-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-node-0-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-node-0-consensus-heatmap-3

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-node-0-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-node-0-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-node-0-membership-heatmap-3

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:

get_signatures(res, k = 2)

plot of chunk tab-node-0-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-node-0-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-node-0-get-signatures-3

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-node-0-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-node-0-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-node-0-get-signatures-no-scale-3

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk node-0-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-node-0-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-node-0-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-node-0-dimension-reduction-3

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-0-collect-classes

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 Age(p-value) Inferred.Cell.Type(p-value) k
#> ATC:skmeans      364      1.00000                    4.93e-66 2
#> ATC:skmeans      366      0.00122                    1.47e-80 3
#> ATC:skmeans      362      0.00174                    1.36e-79 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.


Node01

Parent node: Node0. Child nodes: Node011-leaf , Node012-leaf , Node013-leaf , Node021-leaf , Node022-leaf , Node031-leaf , 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 9180 rows and 129 columns.
#>   Top rows (578) 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)

plot of chunk node-01-collect-plots

The plots are:

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:

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)

plot of chunk node-01-select-partition-number

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.00           0.976       0.990         0.4796 0.518   0.518
#> 3 3  1.00           0.981       0.992         0.3993 0.744   0.536
#> 4 4  0.79           0.758       0.871         0.0882 0.984   0.953

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>         class entropy silhouette   p1   p2
#> O10-A3      2   0.000      0.996 0.00 1.00
#> O10-A9      2   0.000      0.996 0.00 1.00
#> O10-B1      1   0.000      0.979 1.00 0.00
#> O10-B12     2   0.000      0.996 0.00 1.00
#> O10-C11     2   0.000      0.996 0.00 1.00
#> O10-C2      2   0.000      0.996 0.00 1.00
#> O10-D2      2   0.000      0.996 0.00 1.00
#> O10-D8      2   0.000      0.996 0.00 1.00
#> O10-E8      2   0.000      0.996 0.00 1.00
#> O10-E9      2   0.000      0.996 0.00 1.00
#> O10-F2      2   0.000      0.996 0.00 1.00
#> O10-F4      1   0.680      0.786 0.82 0.18
#> O10-F8      2   0.000      0.996 0.00 1.00
#> O10-G1      1   0.000      0.979 1.00 0.00
#> O10-G12     1   0.000      0.979 1.00 0.00
#> O10-G2      1   0.000      0.979 1.00 0.00
#> O10-G3      1   0.000      0.979 1.00 0.00
#> O10-G4      1   0.000      0.979 1.00 0.00
#> O10-G5      1   0.000      0.979 1.00 0.00
#> O10-G7      1   0.000      0.979 1.00 0.00
#> O10-H1      1   0.000      0.979 1.00 0.00
#> O10-H4      1   0.000      0.979 1.00 0.00
#> O10-H5      1   0.000      0.979 1.00 0.00
#> O10-H6      1   0.000      0.979 1.00 0.00
#> O10-H7      1   0.000      0.979 1.00 0.00
#> O12-A2      1   0.000      0.979 1.00 0.00
#> O12-D2      1   0.000      0.979 1.00 0.00
#> O12-E1      1   0.000      0.979 1.00 0.00
#> O7-D3       2   0.827      0.639 0.26 0.74
#> O7-D5       2   0.000      0.996 0.00 1.00
#> O7-G3       1   0.000      0.979 1.00 0.00
#> O8-E1       2   0.000      0.996 0.00 1.00
#> O8-F10      1   0.000      0.979 1.00 0.00
#> O8-F9       1   0.000      0.979 1.00 0.00
#> O8-G9       1   0.000      0.979 1.00 0.00
#> O8-H1       1   0.000      0.979 1.00 0.00
#> O8-H6       2   0.000      0.996 0.00 1.00
#> O9-A2       2   0.000      0.996 0.00 1.00
#> O9-A9       2   0.000      0.996 0.00 1.00
#> O9-B10      2   0.000      0.996 0.00 1.00
#> O9-B11      2   0.000      0.996 0.00 1.00
#> O9-B3       2   0.000      0.996 0.00 1.00
#> O9-C10      2   0.000      0.996 0.00 1.00
#> O9-C3       2   0.000      0.996 0.00 1.00
#> O9-C5       2   0.000      0.996 0.00 1.00
#> O9-C9       2   0.000      0.996 0.00 1.00
#> O9-D1       1   0.242      0.944 0.96 0.04
#> O9-D10      1   0.000      0.979 1.00 0.00
#> O9-D11      2   0.000      0.996 0.00 1.00
#> O9-D5       2   0.000      0.996 0.00 1.00
#> O9-E10      2   0.000      0.996 0.00 1.00
#> O9-E11      1   0.000      0.979 1.00 0.00
#> O9-E5       2   0.000      0.996 0.00 1.00
#> O9-E7       2   0.000      0.996 0.00 1.00
#> O9-E8       1   0.000      0.979 1.00 0.00
#> O9-E9       2   0.000      0.996 0.00 1.00
#> O9-F10      2   0.000      0.996 0.00 1.00
#> O9-F12      2   0.000      0.996 0.00 1.00
#> O9-F2       2   0.000      0.996 0.00 1.00
#> O9-G10      1   0.000      0.979 1.00 0.00
#> O9-G12      2   0.000      0.996 0.00 1.00
#> O9-G2       2   0.000      0.996 0.00 1.00
#> O9-G4       1   0.000      0.979 1.00 0.00
#> O9-G6       2   0.000      0.996 0.00 1.00
#> O9-H3       1   0.943      0.456 0.64 0.36
#> O9-H9       1   0.000      0.979 1.00 0.00
#> S37-A1      2   0.000      0.996 0.00 1.00
#> S37-A10     2   0.000      0.996 0.00 1.00
#> S37-A3      2   0.000      0.996 0.00 1.00
#> S37-A9      1   0.000      0.979 1.00 0.00
#> S37-B1      1   0.722      0.757 0.80 0.20
#> S37-B10     2   0.000      0.996 0.00 1.00
#> S37-B2      2   0.000      0.996 0.00 1.00
#> S37-B4      2   0.000      0.996 0.00 1.00
#> S37-B7      2   0.000      0.996 0.00 1.00
#> S37-C10     2   0.000      0.996 0.00 1.00
#> S37-C3      2   0.000      0.996 0.00 1.00
#> S37-C4      1   0.000      0.979 1.00 0.00
#> S37-C6      2   0.000      0.996 0.00 1.00
#> S37-C7      2   0.000      0.996 0.00 1.00
#> S37-C9      1   0.000      0.979 1.00 0.00
#> S37-D10     2   0.000      0.996 0.00 1.00
#> S37-D2      2   0.141      0.976 0.02 0.98
#> S37-D4      2   0.000      0.996 0.00 1.00
#> S37-D6      2   0.000      0.996 0.00 1.00
#> S37-D8      2   0.000      0.996 0.00 1.00
#> S37-E1      2   0.000      0.996 0.00 1.00
#> S37-E11     2   0.000      0.996 0.00 1.00
#> S37-E2      1   0.827      0.661 0.74 0.26
#> S37-E3      2   0.000      0.996 0.00 1.00
#> S37-E6      2   0.000      0.996 0.00 1.00
#> S37-E9      2   0.000      0.996 0.00 1.00
#> S37-F1      1   0.000      0.979 1.00 0.00
#> S37-F10     1   0.000      0.979 1.00 0.00
#> S37-F12     2   0.000      0.996 0.00 1.00
#> S37-F2      2   0.000      0.996 0.00 1.00
#> S37-F3      2   0.000      0.996 0.00 1.00
#> S37-F5      1   0.000      0.979 1.00 0.00
#> S37-F7      2   0.000      0.996 0.00 1.00
#> S37-F9      2   0.000      0.996 0.00 1.00
#> S37-G1      2   0.000      0.996 0.00 1.00
#> S37-G10     2   0.000      0.996 0.00 1.00
#> S37-G12     2   0.000      0.996 0.00 1.00
#> S37-G3      2   0.000      0.996 0.00 1.00
#> S37-G6      2   0.000      0.996 0.00 1.00
#> S37-G7      2   0.000      0.996 0.00 1.00
#> S37-H2      1   0.000      0.979 1.00 0.00
#> S37-H7      1   0.141      0.962 0.98 0.02
#> S37-H8      1   0.000      0.979 1.00 0.00
#> S37-H9      1   0.000      0.979 1.00 0.00
#> S38-A1      1   0.000      0.979 1.00 0.00
#> S38-A10     1   0.000      0.979 1.00 0.00
#> S38-B11     2   0.000      0.996 0.00 1.00
#> S38-B6      1   0.000      0.979 1.00 0.00
#> S38-C4      2   0.000      0.996 0.00 1.00
#> S38-D12     1   0.000      0.979 1.00 0.00
#> S38-D2      2   0.000      0.996 0.00 1.00
#> S38-D8      1   0.000      0.979 1.00 0.00
#> S38-D9      2   0.000      0.996 0.00 1.00
#> S38-F10     2   0.000      0.996 0.00 1.00
#> S38-F11     2   0.000      0.996 0.00 1.00
#> S38-F3      1   0.000      0.979 1.00 0.00
#> S38-F9      2   0.000      0.996 0.00 1.00
#> S38-G10     1   0.000      0.979 1.00 0.00
#> S38-G12     1   0.000      0.979 1.00 0.00
#> S38-H1      1   0.000      0.979 1.00 0.00
#> S38-H11     2   0.000      0.996 0.00 1.00
#> S38-H4      2   0.000      0.996 0.00 1.00
#> S38-H8      2   0.000      0.996 0.00 1.00

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>         class entropy silhouette   p1   p2   p3
#> O10-A3      2  0.0000      0.993 0.00 1.00 0.00
#> O10-A9      3  0.0000      0.988 0.00 0.00 1.00
#> O10-B1      1  0.4291      0.776 0.82 0.00 0.18
#> O10-B12     3  0.0000      0.988 0.00 0.00 1.00
#> O10-C11     3  0.0000      0.988 0.00 0.00 1.00
#> O10-C2      3  0.0000      0.988 0.00 0.00 1.00
#> O10-D2      2  0.0000      0.993 0.00 1.00 0.00
#> O10-D8      3  0.0000      0.988 0.00 0.00 1.00
#> O10-E8      2  0.0000      0.993 0.00 1.00 0.00
#> O10-E9      3  0.0000      0.988 0.00 0.00 1.00
#> O10-F2      3  0.0000      0.988 0.00 0.00 1.00
#> O10-F4      2  0.0000      0.993 0.00 1.00 0.00
#> O10-F8      2  0.0000      0.993 0.00 1.00 0.00
#> O10-G1      1  0.0000      0.996 1.00 0.00 0.00
#> O10-G12     1  0.0000      0.996 1.00 0.00 0.00
#> O10-G2      1  0.0000      0.996 1.00 0.00 0.00
#> O10-G3      1  0.0000      0.996 1.00 0.00 0.00
#> O10-G4      1  0.0000      0.996 1.00 0.00 0.00
#> O10-G5      1  0.0000      0.996 1.00 0.00 0.00
#> O10-G7      1  0.0000      0.996 1.00 0.00 0.00
#> O10-H1      1  0.0000      0.996 1.00 0.00 0.00
#> O10-H4      1  0.0000      0.996 1.00 0.00 0.00
#> O10-H5      1  0.0000      0.996 1.00 0.00 0.00
#> O10-H6      1  0.0000      0.996 1.00 0.00 0.00
#> O10-H7      1  0.0000      0.996 1.00 0.00 0.00
#> O12-A2      2  0.4002      0.810 0.16 0.84 0.00
#> O12-D2      1  0.0000      0.996 1.00 0.00 0.00
#> O12-E1      1  0.0000      0.996 1.00 0.00 0.00
#> O7-D3       2  0.5334      0.811 0.06 0.82 0.12
#> O7-D5       3  0.0000      0.988 0.00 0.00 1.00
#> O7-G3       1  0.0000      0.996 1.00 0.00 0.00
#> O8-E1       2  0.0000      0.993 0.00 1.00 0.00
#> O8-F10      1  0.0000      0.996 1.00 0.00 0.00
#> O8-F9       1  0.0000      0.996 1.00 0.00 0.00
#> O8-G9       1  0.0000      0.996 1.00 0.00 0.00
#> O8-H1       1  0.0000      0.996 1.00 0.00 0.00
#> O8-H6       2  0.0000      0.993 0.00 1.00 0.00
#> O9-A2       3  0.0000      0.988 0.00 0.00 1.00
#> O9-A9       3  0.0000      0.988 0.00 0.00 1.00
#> O9-B10      3  0.0000      0.988 0.00 0.00 1.00
#> O9-B11      3  0.0000      0.988 0.00 0.00 1.00
#> O9-B3       3  0.0000      0.988 0.00 0.00 1.00
#> O9-C10      3  0.0000      0.988 0.00 0.00 1.00
#> O9-C3       3  0.0000      0.988 0.00 0.00 1.00
#> O9-C5       3  0.0000      0.988 0.00 0.00 1.00
#> O9-C9       3  0.0000      0.988 0.00 0.00 1.00
#> O9-D1       3  0.6280      0.139 0.46 0.00 0.54
#> O9-D10      1  0.0000      0.996 1.00 0.00 0.00
#> O9-D11      3  0.0000      0.988 0.00 0.00 1.00
#> O9-D5       2  0.0000      0.993 0.00 1.00 0.00
#> O9-E10      3  0.0000      0.988 0.00 0.00 1.00
#> O9-E11      1  0.0000      0.996 1.00 0.00 0.00
#> O9-E5       3  0.0000      0.988 0.00 0.00 1.00
#> O9-E7       3  0.0000      0.988 0.00 0.00 1.00
#> O9-E8       1  0.0000      0.996 1.00 0.00 0.00
#> O9-E9       3  0.0000      0.988 0.00 0.00 1.00
#> O9-F10      3  0.0000      0.988 0.00 0.00 1.00
#> O9-F12      3  0.0000      0.988 0.00 0.00 1.00
#> O9-F2       3  0.0000      0.988 0.00 0.00 1.00
#> O9-G10      1  0.0000      0.996 1.00 0.00 0.00
#> O9-G12      3  0.0000      0.988 0.00 0.00 1.00
#> O9-G2       3  0.0000      0.988 0.00 0.00 1.00
#> O9-G4       1  0.0000      0.996 1.00 0.00 0.00
#> O9-G6       3  0.0000      0.988 0.00 0.00 1.00
#> O9-H3       3  0.0000      0.988 0.00 0.00 1.00
#> O9-H9       1  0.0000      0.996 1.00 0.00 0.00
#> S37-A1      2  0.0000      0.993 0.00 1.00 0.00
#> S37-A10     2  0.0000      0.993 0.00 1.00 0.00
#> S37-A3      2  0.0000      0.993 0.00 1.00 0.00
#> S37-A9      1  0.0000      0.996 1.00 0.00 0.00
#> S37-B1      3  0.0892      0.968 0.02 0.00 0.98
#> S37-B10     2  0.0000      0.993 0.00 1.00 0.00
#> S37-B2      2  0.0000      0.993 0.00 1.00 0.00
#> S37-B4      3  0.0000      0.988 0.00 0.00 1.00
#> S37-B7      2  0.0000      0.993 0.00 1.00 0.00
#> S37-C10     2  0.0000      0.993 0.00 1.00 0.00
#> S37-C3      2  0.0000      0.993 0.00 1.00 0.00
#> S37-C4      1  0.0000      0.996 1.00 0.00 0.00
#> S37-C6      2  0.0000      0.993 0.00 1.00 0.00
#> S37-C7      2  0.0000      0.993 0.00 1.00 0.00
#> S37-C9      1  0.0000      0.996 1.00 0.00 0.00
#> S37-D10     2  0.0000      0.993 0.00 1.00 0.00
#> S37-D2      2  0.0000      0.993 0.00 1.00 0.00
#> S37-D4      2  0.0000      0.993 0.00 1.00 0.00
#> S37-D6      2  0.0000      0.993 0.00 1.00 0.00
#> S37-D8      2  0.0000      0.993 0.00 1.00 0.00
#> S37-E1      2  0.0000      0.993 0.00 1.00 0.00
#> S37-E11     2  0.0000      0.993 0.00 1.00 0.00
#> S37-E2      2  0.0000      0.993 0.00 1.00 0.00
#> S37-E3      2  0.0000      0.993 0.00 1.00 0.00
#> S37-E6      3  0.0000      0.988 0.00 0.00 1.00
#> S37-E9      2  0.0000      0.993 0.00 1.00 0.00
#> S37-F1      1  0.0000      0.996 1.00 0.00 0.00
#> S37-F10     1  0.0000      0.996 1.00 0.00 0.00
#> S37-F12     3  0.0000      0.988 0.00 0.00 1.00
#> S37-F2      2  0.0000      0.993 0.00 1.00 0.00
#> S37-F3      3  0.0000      0.988 0.00 0.00 1.00
#> S37-F5      1  0.0000      0.996 1.00 0.00 0.00
#> S37-F7      2  0.0000      0.993 0.00 1.00 0.00
#> S37-F9      2  0.0000      0.993 0.00 1.00 0.00
#> S37-G1      2  0.0000      0.993 0.00 1.00 0.00
#> S37-G10     2  0.0000      0.993 0.00 1.00 0.00
#> S37-G12     2  0.0000      0.993 0.00 1.00 0.00
#> S37-G3      2  0.0000      0.993 0.00 1.00 0.00
#> S37-G6      2  0.0000      0.993 0.00 1.00 0.00
#> S37-G7      2  0.0000      0.993 0.00 1.00 0.00
#> S37-H2      1  0.0000      0.996 1.00 0.00 0.00
#> S37-H7      2  0.0000      0.993 0.00 1.00 0.00
#> S37-H8      1  0.0000      0.996 1.00 0.00 0.00
#> S37-H9      1  0.0000      0.996 1.00 0.00 0.00
#> S38-A1      1  0.0000      0.996 1.00 0.00 0.00
#> S38-A10     1  0.0000      0.996 1.00 0.00 0.00
#> S38-B11     3  0.0000      0.988 0.00 0.00 1.00
#> S38-B6      1  0.0000      0.996 1.00 0.00 0.00
#> S38-C4      2  0.0000      0.993 0.00 1.00 0.00
#> S38-D12     1  0.0000      0.996 1.00 0.00 0.00
#> S38-D2      3  0.0000      0.988 0.00 0.00 1.00
#> S38-D8      1  0.0000      0.996 1.00 0.00 0.00
#> S38-D9      2  0.0000      0.993 0.00 1.00 0.00
#> S38-F10     3  0.0000      0.988 0.00 0.00 1.00
#> S38-F11     2  0.0000      0.993 0.00 1.00 0.00
#> S38-F3      1  0.0000      0.996 1.00 0.00 0.00
#> S38-F9      3  0.0000      0.988 0.00 0.00 1.00
#> S38-G10     1  0.0000      0.996 1.00 0.00 0.00
#> S38-G12     1  0.0000      0.996 1.00 0.00 0.00
#> S38-H1      1  0.0000      0.996 1.00 0.00 0.00
#> S38-H11     3  0.0000      0.988 0.00 0.00 1.00
#> S38-H4      2  0.0000      0.993 0.00 1.00 0.00
#> S38-H8      2  0.0000      0.993 0.00 1.00 0.00

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>         class entropy silhouette   p1   p2   p3   p4
#> O10-A3      2  0.4855      0.474 0.00 0.60 0.00 0.40
#> O10-A9      3  0.4855      0.578 0.00 0.00 0.60 0.40
#> O10-B1      4  0.6262      0.597 0.06 0.00 0.40 0.54
#> O10-B12     3  0.4907      0.560 0.00 0.00 0.58 0.42
#> O10-C11     3  0.4907      0.560 0.00 0.00 0.58 0.42
#> O10-C2      3  0.4907      0.560 0.00 0.00 0.58 0.42
#> O10-D2      2  0.4855      0.448 0.00 0.60 0.00 0.40
#> O10-D8      3  0.4907      0.560 0.00 0.00 0.58 0.42
#> O10-E8      2  0.4790      0.478 0.00 0.62 0.00 0.38
#> O10-E9      3  0.4907      0.560 0.00 0.00 0.58 0.42
#> O10-F2      3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O10-F4      2  0.2345      0.820 0.00 0.90 0.00 0.10
#> O10-F8      2  0.2647      0.782 0.00 0.88 0.00 0.12
#> O10-G1      1  0.2921      0.852 0.86 0.00 0.00 0.14
#> O10-G12     1  0.4134      0.743 0.74 0.00 0.00 0.26
#> O10-G2      1  0.4134      0.743 0.74 0.00 0.00 0.26
#> O10-G3      1  0.2921      0.853 0.86 0.00 0.00 0.14
#> O10-G4      1  0.2011      0.884 0.92 0.00 0.00 0.08
#> O10-G5      1  0.4134      0.743 0.74 0.00 0.00 0.26
#> O10-G7      1  0.4134      0.743 0.74 0.00 0.00 0.26
#> O10-H1      1  0.3172      0.838 0.84 0.00 0.00 0.16
#> O10-H4      1  0.3172      0.838 0.84 0.00 0.00 0.16
#> O10-H5      1  0.3172      0.838 0.84 0.00 0.00 0.16
#> O10-H6      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> O10-H7      1  0.1637      0.893 0.94 0.00 0.00 0.06
#> O12-A2      2  0.4977      0.179 0.00 0.54 0.00 0.46
#> O12-D2      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> O12-E1      1  0.1637      0.894 0.94 0.00 0.00 0.06
#> O7-D3       4  0.7010      0.107 0.02 0.34 0.08 0.56
#> O7-D5       3  0.0707      0.781 0.00 0.00 0.98 0.02
#> O7-G3       1  0.0000      0.909 1.00 0.00 0.00 0.00
#> O8-E1       2  0.0000      0.849 0.00 1.00 0.00 0.00
#> O8-F10      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> O8-F9       1  0.0000      0.909 1.00 0.00 0.00 0.00
#> O8-G9       1  0.0000      0.909 1.00 0.00 0.00 0.00
#> O8-H1       1  0.4977      0.431 0.54 0.00 0.00 0.46
#> O8-H6       2  0.4277      0.680 0.00 0.72 0.00 0.28
#> O9-A2       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-A9       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-B10      3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-B11      3  0.1637      0.752 0.00 0.00 0.94 0.06
#> O9-B3       3  0.3975      0.395 0.00 0.00 0.76 0.24
#> O9-C10      3  0.0707      0.781 0.00 0.00 0.98 0.02
#> O9-C3       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-C5       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-C9       3  0.3172      0.735 0.00 0.00 0.84 0.16
#> O9-D1       4  0.6262      0.598 0.06 0.00 0.40 0.54
#> O9-D10      1  0.2647      0.851 0.88 0.00 0.00 0.12
#> O9-D11      3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-D5       2  0.0707      0.848 0.00 0.98 0.00 0.02
#> O9-E10      3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-E11      1  0.2647      0.850 0.88 0.00 0.00 0.12
#> O9-E5       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-E7       3  0.0707      0.765 0.00 0.00 0.98 0.02
#> O9-E8       1  0.1637      0.890 0.94 0.00 0.00 0.06
#> O9-E9       3  0.2011      0.771 0.00 0.00 0.92 0.08
#> O9-F10      3  0.0707      0.781 0.00 0.00 0.98 0.02
#> O9-F12      3  0.3610      0.713 0.00 0.00 0.80 0.20
#> O9-F2       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-G10      1  0.3172      0.838 0.84 0.00 0.00 0.16
#> O9-G12      3  0.1211      0.779 0.00 0.00 0.96 0.04
#> O9-G2       3  0.0000      0.778 0.00 0.00 1.00 0.00
#> O9-G4       1  0.4332      0.776 0.80 0.00 0.04 0.16
#> O9-G6       3  0.0707      0.781 0.00 0.00 0.98 0.02
#> O9-H3       3  0.4472      0.407 0.02 0.00 0.76 0.22
#> O9-H9       1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S37-A1      2  0.0707      0.847 0.00 0.98 0.00 0.02
#> S37-A10     2  0.2011      0.835 0.00 0.92 0.00 0.08
#> S37-A3      2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-A9      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S37-B1      3  0.3335      0.681 0.02 0.00 0.86 0.12
#> S37-B10     2  0.1211      0.844 0.00 0.96 0.00 0.04
#> S37-B2      2  0.2647      0.809 0.00 0.88 0.00 0.12
#> S37-B4      3  0.2921      0.730 0.00 0.00 0.86 0.14
#> S37-B7      2  0.2345      0.825 0.00 0.90 0.00 0.10
#> S37-C10     2  0.0707      0.847 0.00 0.98 0.00 0.02
#> S37-C3      2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-C4      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S37-C6      2  0.2345      0.823 0.00 0.90 0.00 0.10
#> S37-C7      2  0.1211      0.844 0.00 0.96 0.00 0.04
#> S37-C9      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S37-D10     2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-D2      2  0.3975      0.674 0.00 0.76 0.00 0.24
#> S37-D4      2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-D6      2  0.1637      0.840 0.00 0.94 0.00 0.06
#> S37-D8      2  0.2647      0.808 0.00 0.88 0.00 0.12
#> S37-E1      2  0.2011      0.837 0.00 0.92 0.00 0.08
#> S37-E11     2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-E2      2  0.1637      0.841 0.00 0.94 0.00 0.06
#> S37-E3      2  0.1211      0.838 0.00 0.96 0.00 0.04
#> S37-E6      3  0.2011      0.770 0.00 0.00 0.92 0.08
#> S37-E9      2  0.0707      0.847 0.00 0.98 0.00 0.02
#> S37-F1      1  0.0707      0.901 0.98 0.00 0.00 0.02
#> S37-F10     1  0.2345      0.853 0.90 0.00 0.00 0.10
#> S37-F12     3  0.0707      0.781 0.00 0.00 0.98 0.02
#> S37-F2      2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-F3      3  0.0707      0.779 0.00 0.00 0.98 0.02
#> S37-F5      1  0.1637      0.884 0.94 0.00 0.00 0.06
#> S37-F7      2  0.3172      0.774 0.00 0.84 0.00 0.16
#> S37-F9      2  0.2011      0.834 0.00 0.92 0.00 0.08
#> S37-G1      2  0.1211      0.839 0.00 0.96 0.00 0.04
#> S37-G10     2  0.0707      0.845 0.00 0.98 0.00 0.02
#> S37-G12     2  0.0000      0.849 0.00 1.00 0.00 0.00
#> S37-G3      2  0.5957      0.330 0.00 0.54 0.04 0.42
#> S37-G6      2  0.0707      0.845 0.00 0.98 0.00 0.02
#> S37-G7      2  0.2345      0.824 0.00 0.90 0.00 0.10
#> S37-H2      1  0.6323      0.263 0.50 0.06 0.00 0.44
#> S37-H7      2  0.2921      0.793 0.00 0.86 0.00 0.14
#> S37-H8      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S37-H9      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-A1      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-A10     1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-B11     3  0.4522      0.630 0.00 0.00 0.68 0.32
#> S38-B6      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-C4      2  0.4907      0.414 0.00 0.58 0.00 0.42
#> S38-D12     1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-D2      3  0.4713      0.609 0.00 0.00 0.64 0.36
#> S38-D8      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-D9      2  0.4855      0.448 0.00 0.60 0.00 0.40
#> S38-F10     3  0.4855      0.578 0.00 0.00 0.60 0.40
#> S38-F11     2  0.4790      0.478 0.00 0.62 0.00 0.38
#> S38-F3      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-F9      3  0.4907      0.560 0.00 0.00 0.58 0.42
#> S38-G10     1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-G12     1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-H1      1  0.0000      0.909 1.00 0.00 0.00 0.00
#> S38-H11     3  0.4855      0.578 0.00 0.00 0.60 0.40
#> S38-H4      2  0.1211      0.846 0.00 0.96 0.00 0.04
#> S38-H8      2  0.0707      0.845 0.00 0.98 0.00 0.02

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-node-01-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-node-01-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-node-01-consensus-heatmap-3

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-node-01-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-node-01-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-node-01-membership-heatmap-3

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:

get_signatures(res, k = 2)

plot of chunk tab-node-01-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-node-01-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-node-01-get-signatures-3

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-node-01-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-node-01-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-node-01-get-signatures-no-scale-3

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk node-01-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-node-01-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-node-01-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-node-01-dimension-reduction-3

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-01-collect-classes

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 Age(p-value) Inferred.Cell.Type(p-value) k
#> ATC:skmeans      128     2.60e-01                    4.38e-03 2
#> ATC:skmeans      128     4.61e-06                    1.88e-19 3
#> ATC:skmeans      116     1.53e-06                    4.78e-18 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.


Node02

Parent node: Node0. Child nodes: Node011-leaf , Node012-leaf , Node013-leaf , Node021-leaf , Node022-leaf , Node031-leaf , 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 9164 rows and 112 columns.
#>   Top rows (877) 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)

plot of chunk node-02-collect-plots

The plots are:

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:

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)

plot of chunk node-02-select-partition-number

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.972       0.988          0.498 0.506   0.506
#> 3 3 0.711           0.822       0.899          0.289 0.819   0.653
#> 4 4 0.759           0.805       0.908          0.137 0.847   0.613

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>         class entropy silhouette   p1   p2
#> O10-A1      2   0.000      1.000 0.00 1.00
#> O10-A12     2   0.000      1.000 0.00 1.00
#> O10-A4      1   0.000      0.980 1.00 0.00
#> O10-C4      2   0.000      1.000 0.00 1.00
#> O10-D3      1   0.000      0.980 1.00 0.00
#> O10-F6      1   0.000      0.980 1.00 0.00
#> O12-A1      1   0.000      0.980 1.00 0.00
#> O12-A12     1   0.000      0.980 1.00 0.00
#> O12-A3      1   0.000      0.980 1.00 0.00
#> O12-B1      2   0.000      1.000 0.00 1.00
#> O12-C1      2   0.000      1.000 0.00 1.00
#> O12-D1      2   0.141      0.979 0.02 0.98
#> O12-E12     1   0.327      0.924 0.94 0.06
#> O12-F2      1   0.000      0.980 1.00 0.00
#> O12-G2      2   0.000      1.000 0.00 1.00
#> O12-H1      1   0.995      0.159 0.54 0.46
#> O12-H2      2   0.000      1.000 0.00 1.00
#> O7-A5       2   0.000      1.000 0.00 1.00
#> O7-A7       2   0.000      1.000 0.00 1.00
#> O7-A8       1   0.000      0.980 1.00 0.00
#> O7-B1       1   0.000      0.980 1.00 0.00
#> O7-B12      2   0.000      1.000 0.00 1.00
#> O7-B8       2   0.000      1.000 0.00 1.00
#> O7-B9       1   0.000      0.980 1.00 0.00
#> O7-C2       2   0.000      1.000 0.00 1.00
#> O7-C3       2   0.000      1.000 0.00 1.00
#> O7-C6       1   0.881      0.586 0.70 0.30
#> O7-D1       1   0.000      0.980 1.00 0.00
#> O7-D11      1   0.000      0.980 1.00 0.00
#> O7-D12      1   0.242      0.944 0.96 0.04
#> O7-D2       1   0.000      0.980 1.00 0.00
#> O7-E5       1   0.000      0.980 1.00 0.00
#> O7-E6       2   0.000      1.000 0.00 1.00
#> O7-F1       1   0.000      0.980 1.00 0.00
#> O7-F10      2   0.000      1.000 0.00 1.00
#> O7-F11      1   0.000      0.980 1.00 0.00
#> O7-F4       1   0.000      0.980 1.00 0.00
#> O7-G12      2   0.000      1.000 0.00 1.00
#> O7-G9       2   0.000      1.000 0.00 1.00
#> O7-H3       1   0.000      0.980 1.00 0.00
#> O7-H4       2   0.000      1.000 0.00 1.00
#> O7-H8       2   0.000      1.000 0.00 1.00
#> O8-A5       2   0.000      1.000 0.00 1.00
#> O8-A9       1   0.000      0.980 1.00 0.00
#> O8-B1       2   0.000      1.000 0.00 1.00
#> O8-C2       1   0.000      0.980 1.00 0.00
#> O8-E3       1   0.000      0.980 1.00 0.00
#> O8-E7       2   0.000      1.000 0.00 1.00
#> O8-F2       2   0.000      1.000 0.00 1.00
#> O8-F6       2   0.000      1.000 0.00 1.00
#> O8-F8       1   0.000      0.980 1.00 0.00
#> O8-H11      2   0.000      1.000 0.00 1.00
#> O8-H2       1   0.904      0.546 0.68 0.32
#> O9-A12      2   0.000      1.000 0.00 1.00
#> O9-A3       2   0.000      1.000 0.00 1.00
#> O9-A5       1   0.000      0.980 1.00 0.00
#> O9-A6       1   0.000      0.980 1.00 0.00
#> O9-B5       1   0.469      0.881 0.90 0.10
#> O9-B8       1   0.000      0.980 1.00 0.00
#> O9-D2       1   0.000      0.980 1.00 0.00
#> O9-D7       2   0.000      1.000 0.00 1.00
#> O9-D8       2   0.000      1.000 0.00 1.00
#> O9-E1       2   0.000      1.000 0.00 1.00
#> O9-E2       1   0.000      0.980 1.00 0.00
#> O9-F1       1   0.000      0.980 1.00 0.00
#> O9-F4       1   0.000      0.980 1.00 0.00
#> O9-F5       1   0.000      0.980 1.00 0.00
#> O9-G9       1   0.000      0.980 1.00 0.00
#> O9-H12      2   0.000      1.000 0.00 1.00
#> O9-H5       2   0.000      1.000 0.00 1.00
#> S37-A2      2   0.000      1.000 0.00 1.00
#> S37-A5      1   0.000      0.980 1.00 0.00
#> S37-A6      1   0.000      0.980 1.00 0.00
#> S37-A8      2   0.000      1.000 0.00 1.00
#> S37-B11     1   0.000      0.980 1.00 0.00
#> S37-B12     2   0.000      1.000 0.00 1.00
#> S37-C12     2   0.000      1.000 0.00 1.00
#> S37-C8      1   0.000      0.980 1.00 0.00
#> S37-D12     1   0.000      0.980 1.00 0.00
#> S37-E7      1   0.000      0.980 1.00 0.00
#> S37-E8      1   0.000      0.980 1.00 0.00
#> S37-G2      2   0.000      1.000 0.00 1.00
#> S37-G4      2   0.000      1.000 0.00 1.00
#> S38-A12     2   0.000      1.000 0.00 1.00
#> S38-A2      1   0.000      0.980 1.00 0.00
#> S38-A5      1   0.000      0.980 1.00 0.00
#> S38-A9      1   0.000      0.980 1.00 0.00
#> S38-B2      1   0.000      0.980 1.00 0.00
#> S38-B7      1   0.000      0.980 1.00 0.00
#> S38-B8      1   0.000      0.980 1.00 0.00
#> S38-B9      2   0.000      1.000 0.00 1.00
#> S38-C3      1   0.000      0.980 1.00 0.00
#> S38-C9      2   0.000      1.000 0.00 1.00
#> S38-D1      1   0.000      0.980 1.00 0.00
#> S38-D5      1   0.000      0.980 1.00 0.00
#> S38-D6      1   0.000      0.980 1.00 0.00
#> S38-E1      1   0.000      0.980 1.00 0.00
#> S38-E4      1   0.000      0.980 1.00 0.00
#> S38-E5      2   0.000      1.000 0.00 1.00
#> S38-E6      2   0.000      1.000 0.00 1.00
#> S38-E7      1   0.000      0.980 1.00 0.00
#> S38-E9      2   0.000      1.000 0.00 1.00
#> S38-F2      1   0.000      0.980 1.00 0.00
#> S38-F5      2   0.000      1.000 0.00 1.00
#> S38-F6      1   0.000      0.980 1.00 0.00
#> S38-F8      1   0.000      0.980 1.00 0.00
#> S38-G4      1   0.000      0.980 1.00 0.00
#> S38-G5      1   0.000      0.980 1.00 0.00
#> S38-G6      2   0.000      1.000 0.00 1.00
#> S38-H2      1   0.000      0.980 1.00 0.00
#> S38-H5      2   0.000      1.000 0.00 1.00
#> S38-H6      1   0.000      0.980 1.00 0.00

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>         class entropy silhouette   p1   p2   p3
#> O10-A1      3  0.0892     0.7458 0.00 0.02 0.98
#> O10-A12     3  0.2537     0.6988 0.00 0.08 0.92
#> O10-A4      1  0.0000     0.9404 1.00 0.00 0.00
#> O10-C4      2  0.2959     0.8623 0.00 0.90 0.10
#> O10-D3      1  0.0000     0.9404 1.00 0.00 0.00
#> O10-F6      1  0.0000     0.9404 1.00 0.00 0.00
#> O12-A1      1  0.0000     0.9404 1.00 0.00 0.00
#> O12-A12     1  0.0000     0.9404 1.00 0.00 0.00
#> O12-A3      3  0.4002     0.7621 0.16 0.00 0.84
#> O12-B1      2  0.0000     0.8567 0.00 1.00 0.00
#> O12-C1      2  0.0000     0.8567 0.00 1.00 0.00
#> O12-D1      2  0.3686     0.6969 0.14 0.86 0.00
#> O12-E12     1  0.4796     0.6878 0.78 0.22 0.00
#> O12-F2      1  0.0000     0.9404 1.00 0.00 0.00
#> O12-G2      2  0.0000     0.8567 0.00 1.00 0.00
#> O12-H1      1  0.5560     0.5660 0.70 0.30 0.00
#> O12-H2      2  0.5706     0.7607 0.00 0.68 0.32
#> O7-A5       2  0.5216     0.8285 0.00 0.74 0.26
#> O7-A7       2  0.5216     0.8285 0.00 0.74 0.26
#> O7-A8       3  0.5560     0.6345 0.30 0.00 0.70
#> O7-B1       3  0.4796     0.7224 0.22 0.00 0.78
#> O7-B12      2  0.5216     0.8285 0.00 0.74 0.26
#> O7-B8       2  0.5216     0.8285 0.00 0.74 0.26
#> O7-B9       3  0.3340     0.7782 0.12 0.00 0.88
#> O7-C2       2  0.5216     0.8285 0.00 0.74 0.26
#> O7-C3       2  0.5216     0.8285 0.00 0.74 0.26
#> O7-C6       3  0.0000     0.7563 0.00 0.00 1.00
#> O7-D1       1  0.0000     0.9404 1.00 0.00 0.00
#> O7-D11      3  0.2959     0.7775 0.10 0.00 0.90
#> O7-D12      3  0.0000     0.7563 0.00 0.00 1.00
#> O7-D2       1  0.2959     0.8723 0.90 0.00 0.10
#> O7-E5       1  0.5397     0.5866 0.72 0.00 0.28
#> O7-E6       2  0.2537     0.8617 0.00 0.92 0.08
#> O7-F1       1  0.0000     0.9404 1.00 0.00 0.00
#> O7-F10      2  0.5216     0.8285 0.00 0.74 0.26
#> O7-F11      1  0.0000     0.9404 1.00 0.00 0.00
#> O7-F4       3  0.5397     0.6647 0.28 0.00 0.72
#> O7-G12      3  0.2537     0.6988 0.00 0.08 0.92
#> O7-G9       2  0.5216     0.8285 0.00 0.74 0.26
#> O7-H3       1  0.3340     0.8500 0.88 0.00 0.12
#> O7-H4       2  0.1529     0.8612 0.00 0.96 0.04
#> O7-H8       2  0.5216     0.8285 0.00 0.74 0.26
#> O8-A5       2  0.0000     0.8567 0.00 1.00 0.00
#> O8-A9       1  0.2066     0.9079 0.94 0.00 0.06
#> O8-B1       2  0.0000     0.8567 0.00 1.00 0.00
#> O8-C2       1  0.0000     0.9404 1.00 0.00 0.00
#> O8-E3       1  0.1529     0.9200 0.96 0.00 0.04
#> O8-E7       2  0.5216     0.8285 0.00 0.74 0.26
#> O8-F2       2  0.2537     0.8629 0.00 0.92 0.08
#> O8-F6       3  0.2066     0.7167 0.00 0.06 0.94
#> O8-F8       3  0.5216     0.6872 0.26 0.00 0.74
#> O8-H11      2  0.4002     0.8569 0.00 0.84 0.16
#> O8-H2       3  0.0000     0.7563 0.00 0.00 1.00
#> O9-A12      2  0.4002     0.8569 0.00 0.84 0.16
#> O9-A3       2  0.0000     0.8567 0.00 1.00 0.00
#> O9-A5       1  0.0000     0.9404 1.00 0.00 0.00
#> O9-A6       1  0.2066     0.9079 0.94 0.00 0.06
#> O9-B5       3  0.0000     0.7563 0.00 0.00 1.00
#> O9-B8       1  0.0000     0.9404 1.00 0.00 0.00
#> O9-D2       1  0.0000     0.9404 1.00 0.00 0.00
#> O9-D7       2  0.0000     0.8567 0.00 1.00 0.00
#> O9-D8       2  0.0000     0.8567 0.00 1.00 0.00
#> O9-E1       2  0.0000     0.8567 0.00 1.00 0.00
#> O9-E2       1  0.0000     0.9404 1.00 0.00 0.00
#> O9-F1       1  0.4796     0.6852 0.78 0.22 0.00
#> O9-F4       1  0.0000     0.9404 1.00 0.00 0.00
#> O9-F5       1  0.1529     0.9211 0.96 0.00 0.04
#> O9-G9       1  0.0000     0.9404 1.00 0.00 0.00
#> O9-H12      2  0.5216     0.8285 0.00 0.74 0.26
#> O9-H5       2  0.0000     0.8567 0.00 1.00 0.00
#> S37-A2      2  0.0000     0.8567 0.00 1.00 0.00
#> S37-A5      1  0.2537     0.8918 0.92 0.00 0.08
#> S37-A6      1  0.0000     0.9404 1.00 0.00 0.00
#> S37-A8      2  0.0000     0.8567 0.00 1.00 0.00
#> S37-B11     1  0.4551     0.7883 0.84 0.02 0.14
#> S37-B12     2  0.4291     0.8531 0.00 0.82 0.18
#> S37-C12     2  0.3340     0.8617 0.00 0.88 0.12
#> S37-C8      1  0.0000     0.9404 1.00 0.00 0.00
#> S37-D12     1  0.2537     0.8918 0.92 0.00 0.08
#> S37-E7      1  0.0000     0.9404 1.00 0.00 0.00
#> S37-E8      1  0.0000     0.9404 1.00 0.00 0.00
#> S37-G2      2  0.0000     0.8567 0.00 1.00 0.00
#> S37-G4      2  0.0000     0.8567 0.00 1.00 0.00
#> S38-A12     2  0.5216     0.8285 0.00 0.74 0.26
#> S38-A2      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-A5      1  0.1529     0.9209 0.96 0.00 0.04
#> S38-A9      1  0.0892     0.9314 0.98 0.00 0.02
#> S38-B2      1  0.2066     0.9079 0.94 0.00 0.06
#> S38-B7      3  0.5216     0.6872 0.26 0.00 0.74
#> S38-B8      1  0.6302    -0.0649 0.52 0.00 0.48
#> S38-B9      3  0.6309    -0.4318 0.00 0.50 0.50
#> S38-C3      1  0.2066     0.9079 0.94 0.00 0.06
#> S38-C9      3  0.2537     0.6988 0.00 0.08 0.92
#> S38-D1      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-D5      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-D6      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-E1      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-E4      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-E5      2  0.4796     0.8417 0.00 0.78 0.22
#> S38-E6      2  0.5216     0.8285 0.00 0.74 0.26
#> S38-E7      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-E9      2  0.0000     0.8567 0.00 1.00 0.00
#> S38-F2      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-F5      2  0.0000     0.8567 0.00 1.00 0.00
#> S38-F6      3  0.5216     0.6872 0.26 0.00 0.74
#> S38-F8      3  0.5835     0.5793 0.34 0.00 0.66
#> S38-G4      3  0.5397     0.6647 0.28 0.00 0.72
#> S38-G5      1  0.0000     0.9404 1.00 0.00 0.00
#> S38-G6      2  0.5216     0.8285 0.00 0.74 0.26
#> S38-H2      1  0.0892     0.9314 0.98 0.00 0.02
#> S38-H5      3  0.4291     0.5481 0.00 0.18 0.82
#> S38-H6      1  0.0000     0.9404 1.00 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>         class entropy silhouette   p1   p2   p3   p4
#> O10-A1      3  0.5860      0.266 0.00 0.38 0.58 0.04
#> O10-A12     2  0.3606      0.784 0.00 0.84 0.14 0.02
#> O10-A4      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O10-C4      2  0.3610      0.730 0.00 0.80 0.00 0.20
#> O10-D3      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O10-F6      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O12-A1      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O12-A12     1  0.0707      0.897 0.98 0.00 0.02 0.00
#> O12-A3      3  0.0707      0.897 0.00 0.00 0.98 0.02
#> O12-B1      4  0.3975      0.663 0.00 0.24 0.00 0.76
#> O12-C1      4  0.0707      0.885 0.00 0.02 0.00 0.98
#> O12-D1      4  0.0707      0.873 0.02 0.00 0.00 0.98
#> O12-E12     4  0.4977      0.120 0.46 0.00 0.00 0.54
#> O12-F2      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O12-G2      4  0.2921      0.794 0.00 0.14 0.00 0.86
#> O12-H1      4  0.0707      0.873 0.02 0.00 0.00 0.98
#> O12-H2      2  0.0707      0.884 0.00 0.98 0.02 0.00
#> O7-A5       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-A7       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-A8       3  0.1211      0.879 0.04 0.00 0.96 0.00
#> O7-B1       3  0.0000      0.899 0.00 0.00 1.00 0.00
#> O7-B12      2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-B8       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-B9       3  0.0000      0.899 0.00 0.00 1.00 0.00
#> O7-C2       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-C3       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-C6       3  0.0707      0.897 0.00 0.00 0.98 0.02
#> O7-D1       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O7-D11      3  0.0707      0.897 0.00 0.00 0.98 0.02
#> O7-D12      3  0.0000      0.899 0.00 0.00 1.00 0.00
#> O7-D2       1  0.4994      0.218 0.52 0.00 0.48 0.00
#> O7-E5       3  0.3975      0.625 0.24 0.00 0.76 0.00
#> O7-E6       4  0.4713      0.425 0.00 0.36 0.00 0.64
#> O7-F1       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O7-F10      2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-F11      1  0.2647      0.843 0.88 0.00 0.12 0.00
#> O7-F4       3  0.0707      0.891 0.02 0.00 0.98 0.00
#> O7-G12      2  0.3037      0.823 0.00 0.88 0.10 0.02
#> O7-G9       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O7-H3       1  0.4907      0.408 0.58 0.00 0.42 0.00
#> O7-H4       2  0.4948      0.228 0.00 0.56 0.00 0.44
#> O7-H8       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O8-A5       4  0.1211      0.881 0.00 0.04 0.00 0.96
#> O8-A9       1  0.3975      0.737 0.76 0.00 0.24 0.00
#> O8-B1       4  0.1211      0.881 0.00 0.04 0.00 0.96
#> O8-C2       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O8-E3       1  0.3801      0.750 0.78 0.00 0.22 0.00
#> O8-E7       2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O8-F2       2  0.4134      0.639 0.00 0.74 0.00 0.26
#> O8-F6       2  0.5487      0.328 0.00 0.58 0.40 0.02
#> O8-F8       3  0.0000      0.899 0.00 0.00 1.00 0.00
#> O8-H11      2  0.1637      0.862 0.00 0.94 0.00 0.06
#> O8-H2       3  0.0707      0.897 0.00 0.00 0.98 0.02
#> O9-A12      2  0.2647      0.816 0.00 0.88 0.00 0.12
#> O9-A3       4  0.0707      0.885 0.00 0.02 0.00 0.98
#> O9-A5       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O9-A6       1  0.4134      0.711 0.74 0.00 0.26 0.00
#> O9-B5       3  0.0707      0.897 0.00 0.00 0.98 0.02
#> O9-B8       1  0.0707      0.897 0.98 0.00 0.02 0.00
#> O9-D2       1  0.0707      0.897 0.98 0.00 0.02 0.00
#> O9-D7       2  0.4855      0.348 0.00 0.60 0.00 0.40
#> O9-D8       2  0.4790      0.404 0.00 0.62 0.00 0.38
#> O9-E1       4  0.0707      0.885 0.00 0.02 0.00 0.98
#> O9-E2       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O9-F1       4  0.2921      0.762 0.14 0.00 0.00 0.86
#> O9-F4       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O9-F5       1  0.3400      0.796 0.82 0.00 0.18 0.00
#> O9-G9       1  0.0000      0.904 1.00 0.00 0.00 0.00
#> O9-H12      2  0.0000      0.891 0.00 1.00 0.00 0.00
#> O9-H5       4  0.0707      0.885 0.00 0.02 0.00 0.98
#> S37-A2      4  0.0707      0.885 0.00 0.02 0.00 0.98
#> S37-A5      1  0.3975      0.731 0.76 0.00 0.24 0.00
#> S37-A6      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S37-A8      4  0.0707      0.885 0.00 0.02 0.00 0.98
#> S37-B11     1  0.4894      0.722 0.78 0.00 0.12 0.10
#> S37-B12     2  0.1637      0.863 0.00 0.94 0.00 0.06
#> S37-C12     2  0.2011      0.848 0.00 0.92 0.00 0.08
#> S37-C8      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S37-D12     1  0.4790      0.483 0.62 0.00 0.38 0.00
#> S37-E7      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S37-E8      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S37-G2      4  0.4522      0.517 0.00 0.32 0.00 0.68
#> S37-G4      4  0.0707      0.885 0.00 0.02 0.00 0.98
#> S38-A12     2  0.0000      0.891 0.00 1.00 0.00 0.00
#> S38-A2      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-A5      1  0.4624      0.568 0.66 0.00 0.34 0.00
#> S38-A9      1  0.3172      0.813 0.84 0.00 0.16 0.00
#> S38-B2      1  0.4277      0.673 0.72 0.00 0.28 0.00
#> S38-B7      3  0.0000      0.899 0.00 0.00 1.00 0.00
#> S38-B8      3  0.3801      0.669 0.22 0.00 0.78 0.00
#> S38-B9      2  0.0707      0.882 0.00 0.98 0.00 0.02
#> S38-C3      1  0.3975      0.735 0.76 0.00 0.24 0.00
#> S38-C9      2  0.3335      0.805 0.00 0.86 0.12 0.02
#> S38-D1      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-D5      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-D6      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-E1      1  0.0707      0.897 0.98 0.00 0.02 0.00
#> S38-E4      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-E5      2  0.0000      0.891 0.00 1.00 0.00 0.00
#> S38-E6      2  0.0000      0.891 0.00 1.00 0.00 0.00
#> S38-E7      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-E9      4  0.1211      0.881 0.00 0.04 0.00 0.96
#> S38-F2      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-F5      4  0.1211      0.881 0.00 0.04 0.00 0.96
#> S38-F6      3  0.0707      0.897 0.00 0.00 0.98 0.02
#> S38-F8      3  0.4936      0.604 0.28 0.00 0.70 0.02
#> S38-G4      3  0.1637      0.867 0.06 0.00 0.94 0.00
#> S38-G5      1  0.0000      0.904 1.00 0.00 0.00 0.00
#> S38-G6      2  0.0000      0.891 0.00 1.00 0.00 0.00
#> S38-H2      1  0.2011      0.868 0.92 0.00 0.08 0.00
#> S38-H5      2  0.1913      0.864 0.00 0.94 0.04 0.02
#> S38-H6      1  0.0000      0.904 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)

plot of chunk tab-node-02-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-node-02-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-node-02-consensus-heatmap-3

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-node-02-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-node-02-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-node-02-membership-heatmap-3

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:

get_signatures(res, k = 2)

plot of chunk tab-node-02-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-node-02-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-node-02-get-signatures-3

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-node-02-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-node-02-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-node-02-get-signatures-no-scale-3

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk node-02-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-node-02-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-node-02-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-node-02-dimension-reduction-3

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-02-collect-classes

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 Age(p-value) Inferred.Cell.Type(p-value) k
#> ATC:skmeans      111        0.293                    6.16e-03 2
#> ATC:skmeans      110        0.192                    1.33e-03 3
#> ATC:skmeans      102        0.309                    4.29e-08 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.


Node03

Parent node: Node0. Child nodes: Node011-leaf , Node012-leaf , Node013-leaf , Node021-leaf , Node022-leaf , Node031-leaf , 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 9177 rows and 126 columns.
#>   Top rows (644) 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)

plot of chunk node-03-collect-plots

The plots are:

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:

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)

plot of chunk node-03-select-partition-number

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.999           0.968       0.986          0.504 0.496   0.496
#> 3 3 0.848           0.867       0.940          0.251 0.851   0.707
#> 4 4 0.698           0.763       0.888          0.127 0.890   0.720

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.

show/hide code output

cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#>         class entropy silhouette   p1   p2
#> O10-A11     1   0.000      0.981 1.00 0.00
#> O10-A5      2   0.000      0.990 0.00 1.00
#> O10-A7      2   0.000      0.990 0.00 1.00
#> O10-A8      2   0.000      0.990 0.00 1.00
#> O10-B10     2   0.000      0.990 0.00 1.00
#> O10-B11     2   0.000      0.990 0.00 1.00
#> O10-B2      2   0.000      0.990 0.00 1.00
#> O10-B5      2   0.000      0.990 0.00 1.00
#> O10-B6      1   0.327      0.924 0.94 0.06
#> O10-B7      2   0.000      0.990 0.00 1.00
#> O10-B9      2   0.000      0.990 0.00 1.00
#> O10-C10     2   0.000      0.990 0.00 1.00
#> O10-C12     2   0.000      0.990 0.00 1.00
#> O10-C5      2   0.000      0.990 0.00 1.00
#> O10-C6      2   0.000      0.990 0.00 1.00
#> O10-C9      2   0.000      0.990 0.00 1.00
#> O10-D1      2   0.000      0.990 0.00 1.00
#> O10-D11     2   0.000      0.990 0.00 1.00
#> O10-D12     2   0.000      0.990 0.00 1.00
#> O10-D5      2   0.000      0.990 0.00 1.00
#> O10-D6      2   0.000      0.990 0.00 1.00
#> O10-D9      2   0.000      0.990 0.00 1.00
#> O10-E1      2   0.000      0.990 0.00 1.00
#> O10-E11     2   0.000      0.990 0.00 1.00
#> O10-E12     2   0.000      0.990 0.00 1.00
#> O10-E6      2   0.000      0.990 0.00 1.00
#> O10-F1      1   0.000      0.981 1.00 0.00
#> O10-F11     1   0.000      0.981 1.00 0.00
#> O10-F12     2   0.141      0.973 0.02 0.98
#> O10-F5      1   0.000      0.981 1.00 0.00
#> O10-F9      2   0.000      0.990 0.00 1.00
#> O12-B12     1   0.000      0.981 1.00 0.00
#> O12-F12     1   0.000      0.981 1.00 0.00
#> O7-A3       2   0.000      0.990 0.00 1.00
#> O7-A9       1   0.000      0.981 1.00 0.00
#> O7-B11      2   0.000      0.990 0.00 1.00
#> O7-B6       2   0.000      0.990 0.00 1.00
#> O7-B7       2   0.000      0.990 0.00 1.00
#> O7-C1       1   0.000      0.981 1.00 0.00
#> O7-C11      2   0.000      0.990 0.00 1.00
#> O7-C7       2   0.000      0.990 0.00 1.00
#> O7-D4       1   0.000      0.981 1.00 0.00
#> O7-E10      2   0.000      0.990 0.00 1.00
#> O7-E11      2   0.000      0.990 0.00 1.00
#> O7-F2       1   0.000      0.981 1.00 0.00
#> O7-F3       1   0.000      0.981 1.00 0.00
#> O7-F7       2   0.000      0.990 0.00 1.00
#> O7-F9       2   0.000      0.990 0.00 1.00
#> O8-A2       1   0.000      0.981 1.00 0.00
#> O8-A3       2   0.827      0.649 0.26 0.74
#> O8-A8       2   0.242      0.955 0.04 0.96
#> O8-B2       1   0.000      0.981 1.00 0.00
#> O8-B4       2   0.000      0.990 0.00 1.00
#> O8-B6       2   0.327      0.935 0.06 0.94
#> O8-B7       2   0.000      0.990 0.00 1.00
#> O8-B9       2   0.000      0.990 0.00 1.00
#> O8-C11      1   0.904      0.543 0.68 0.32
#> O8-C12      2   0.000      0.990 0.00 1.00
#> O8-C3       1   0.827      0.662 0.74 0.26
#> O8-C4       1   0.000      0.981 1.00 0.00
#> O8-C5       2   0.000      0.990 0.00 1.00
#> O8-C6       2   0.141      0.973 0.02 0.98
#> O8-C8       2   0.000      0.990 0.00 1.00
#> O8-D3       1   0.000      0.981 1.00 0.00
#> O8-D5       1   0.000      0.981 1.00 0.00
#> O8-D6       1   0.000      0.981 1.00 0.00
#> O8-D9       1   0.000      0.981 1.00 0.00
#> O8-E11      2   0.242      0.955 0.04 0.96
#> O8-E2       1   0.000      0.981 1.00 0.00
#> O8-E5       1   0.000      0.981 1.00 0.00
#> O8-E9       2   0.000      0.990 0.00 1.00
#> O8-F11      2   0.000      0.990 0.00 1.00
#> O8-F12      2   0.000      0.990 0.00 1.00
#> O8-F3       2   0.000      0.990 0.00 1.00
#> O8-G1       1   0.000      0.981 1.00 0.00
#> O8-G12      2   0.000      0.990 0.00 1.00
#> O8-G5       2   0.000      0.990 0.00 1.00
#> O9-A10      1   0.000      0.981 1.00 0.00
#> O9-A8       1   0.000      0.981 1.00 0.00
#> O9-B12      1   0.000      0.981 1.00 0.00
#> O9-B2       1   0.000      0.981 1.00 0.00
#> O9-B6       1   0.000      0.981 1.00 0.00
#> O9-B7       1   0.000      0.981 1.00 0.00
#> O9-C2       1   0.000      0.981 1.00 0.00
#> O9-C4       1   0.000      0.981 1.00 0.00
#> O9-C6       1   0.000      0.981 1.00 0.00
#> O9-D12      1   0.000      0.981 1.00 0.00
#> O9-D6       1   0.000      0.981 1.00 0.00
#> O9-E12      1   0.000      0.981 1.00 0.00
#> O9-E4       1   0.000      0.981 1.00 0.00
#> O9-F9       1   0.000      0.981 1.00 0.00
#> O9-G3       1   0.000      0.981 1.00 0.00
#> O9-G7       1   0.000      0.981 1.00 0.00
#> S37-A4      1   0.000      0.981 1.00 0.00
#> S37-A7      1   0.000      0.981 1.00 0.00
#> S37-B3      1   0.000      0.981 1.00 0.00
#> S37-B5      1   0.000      0.981 1.00 0.00
#> S37-B6      1   0.000      0.981 1.00 0.00
#> S37-B9      1   0.000      0.981 1.00 0.00
#> S37-D11     1   0.000      0.981 1.00 0.00
#> S37-D9      1   0.000      0.981 1.00 0.00
#> S37-E10     1   0.000      0.981 1.00 0.00
#> S37-E5      1   0.000      0.981 1.00 0.00
#> S37-G5      1   0.000      0.981 1.00 0.00
#> S37-G8      1   0.000      0.981 1.00 0.00
#> S37-H4      1   0.000      0.981 1.00 0.00
#> S38-A3      1   0.000      0.981 1.00 0.00
#> S38-B10     2   0.327      0.934 0.06 0.94
#> S38-C1      2   0.469      0.889 0.10 0.90
#> S38-C10     2   0.000      0.990 0.00 1.00
#> S38-C11     2   0.000      0.990 0.00 1.00
#> S38-C5      2   0.000      0.990 0.00 1.00
#> S38-C6      1   0.000      0.981 1.00 0.00
#> S38-C7      1   0.000      0.981 1.00 0.00
#> S38-D10     2   0.000      0.990 0.00 1.00
#> S38-D11     2   0.000      0.990 0.00 1.00
#> S38-D4      1   0.000      0.981 1.00 0.00
#> S38-D7      1   0.000      0.981 1.00 0.00
#> S38-E2      1   0.000      0.981 1.00 0.00
#> S38-E3      1   0.855      0.622 0.72 0.28
#> S38-E8      1   0.000      0.981 1.00 0.00
#> S38-F7      1   0.827      0.661 0.74 0.26
#> S38-G7      2   0.000      0.990 0.00 1.00
#> S38-G8      1   0.000      0.981 1.00 0.00
#> S38-G9      2   0.000      0.990 0.00 1.00
#> S38-H3      1   0.000      0.981 1.00 0.00

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>         class entropy silhouette   p1   p2   p3
#> O10-A11     1  0.1529      0.925 0.96 0.00 0.04
#> O10-A5      2  0.5016      0.679 0.00 0.76 0.24
#> O10-A7      2  0.0000      0.939 0.00 1.00 0.00
#> O10-A8      2  0.0000      0.939 0.00 1.00 0.00
#> O10-B10     2  0.0000      0.939 0.00 1.00 0.00
#> O10-B11     2  0.0000      0.939 0.00 1.00 0.00
#> O10-B2      2  0.0000      0.939 0.00 1.00 0.00
#> O10-B5      2  0.0000      0.939 0.00 1.00 0.00
#> O10-B6      1  0.5948      0.445 0.64 0.36 0.00
#> O10-B7      2  0.0892      0.927 0.00 0.98 0.02
#> O10-B9      2  0.0000      0.939 0.00 1.00 0.00
#> O10-C10     2  0.0000      0.939 0.00 1.00 0.00
#> O10-C12     2  0.0000      0.939 0.00 1.00 0.00
#> O10-C5      2  0.0000      0.939 0.00 1.00 0.00
#> O10-C6      2  0.0000      0.939 0.00 1.00 0.00
#> O10-C9      2  0.0000      0.939 0.00 1.00 0.00
#> O10-D1      2  0.0000      0.939 0.00 1.00 0.00
#> O10-D11     2  0.0000      0.939 0.00 1.00 0.00
#> O10-D12     2  0.0000      0.939 0.00 1.00 0.00
#> O10-D5      2  0.3340      0.838 0.00 0.88 0.12
#> O10-D6      2  0.0892      0.927 0.00 0.98 0.02
#> O10-D9      2  0.0000      0.939 0.00 1.00 0.00
#> O10-E1      2  0.0892      0.927 0.00 0.98 0.02
#> O10-E11     2  0.0000      0.939 0.00 1.00 0.00
#> O10-E12     2  0.0000      0.939 0.00 1.00 0.00
#> O10-E6      2  0.0000      0.939 0.00 1.00 0.00
#> O10-F1      1  0.0000      0.951 1.00 0.00 0.00
#> O10-F11     1  0.0000      0.951 1.00 0.00 0.00
#> O10-F12     2  0.4555      0.735 0.00 0.80 0.20
#> O10-F5      1  0.0000      0.951 1.00 0.00 0.00
#> O10-F9      3  0.2537      0.858 0.00 0.08 0.92
#> O12-B12     1  0.0000      0.951 1.00 0.00 0.00
#> O12-F12     1  0.0000      0.951 1.00 0.00 0.00
#> O7-A3       2  0.3572      0.871 0.04 0.90 0.06
#> O7-A9       1  0.0892      0.941 0.98 0.00 0.02
#> O7-B11      2  0.0000      0.939 0.00 1.00 0.00
#> O7-B6       2  0.5216      0.631 0.00 0.74 0.26
#> O7-B7       3  0.5835      0.524 0.00 0.34 0.66
#> O7-C1       1  0.0892      0.941 0.98 0.00 0.02
#> O7-C11      2  0.0000      0.939 0.00 1.00 0.00
#> O7-C7       2  0.1529      0.920 0.00 0.96 0.04
#> O7-D4       1  0.0000      0.951 1.00 0.00 0.00
#> O7-E10      3  0.6302      0.124 0.00 0.48 0.52
#> O7-E11      2  0.0000      0.939 0.00 1.00 0.00
#> O7-F2       1  0.5397      0.613 0.72 0.00 0.28
#> O7-F3       1  0.0892      0.941 0.98 0.00 0.02
#> O7-F7       2  0.0892      0.927 0.00 0.98 0.02
#> O7-F9       2  0.2959      0.860 0.00 0.90 0.10
#> O8-A2       3  0.6244      0.158 0.44 0.00 0.56
#> O8-A3       3  0.0892      0.880 0.00 0.02 0.98
#> O8-A8       3  0.0892      0.880 0.00 0.02 0.98
#> O8-B2       1  0.4555      0.747 0.80 0.00 0.20
#> O8-B4       3  0.2959      0.845 0.00 0.10 0.90
#> O8-B6       3  0.6229      0.631 0.02 0.28 0.70
#> O8-B7       3  0.0892      0.880 0.00 0.02 0.98
#> O8-B9       2  0.0000      0.939 0.00 1.00 0.00
#> O8-C11      3  0.0892      0.869 0.02 0.00 0.98
#> O8-C12      3  0.2066      0.866 0.00 0.06 0.94
#> O8-C3       1  0.9593     -0.160 0.42 0.20 0.38
#> O8-C4       1  0.4291      0.773 0.82 0.00 0.18
#> O8-C5       3  0.0892      0.880 0.00 0.02 0.98
#> O8-C6       3  0.0892      0.880 0.00 0.02 0.98
#> O8-C8       3  0.5016      0.709 0.00 0.24 0.76
#> O8-D3       3  0.0892      0.869 0.02 0.00 0.98
#> O8-D5       3  0.0892      0.869 0.02 0.00 0.98
#> O8-D6       1  0.2537      0.890 0.92 0.00 0.08
#> O8-D9       1  0.0892      0.939 0.98 0.00 0.02
#> O8-E11      3  0.1529      0.875 0.00 0.04 0.96
#> O8-E2       1  0.0892      0.940 0.98 0.00 0.02
#> O8-E5       1  0.2066      0.909 0.94 0.00 0.06
#> O8-E9       3  0.0892      0.880 0.00 0.02 0.98
#> O8-F11      2  0.6045      0.357 0.00 0.62 0.38
#> O8-F12      3  0.0892      0.880 0.00 0.02 0.98
#> O8-F3       3  0.4291      0.773 0.00 0.18 0.82
#> O8-G1       1  0.0000      0.951 1.00 0.00 0.00
#> O8-G12      3  0.0892      0.880 0.00 0.02 0.98
#> O8-G5       2  0.5016      0.673 0.00 0.76 0.24
#> O9-A10      1  0.0000      0.951 1.00 0.00 0.00
#> O9-A8       1  0.0000      0.951 1.00 0.00 0.00
#> O9-B12      1  0.0000      0.951 1.00 0.00 0.00
#> O9-B2       1  0.0000      0.951 1.00 0.00 0.00
#> O9-B6       1  0.0000      0.951 1.00 0.00 0.00
#> O9-B7       1  0.0000      0.951 1.00 0.00 0.00
#> O9-C2       1  0.0000      0.951 1.00 0.00 0.00
#> O9-C4       1  0.0892      0.941 0.98 0.00 0.02
#> O9-C6       1  0.0000      0.951 1.00 0.00 0.00
#> O9-D12      1  0.0892      0.941 0.98 0.00 0.02
#> O9-D6       1  0.0000      0.951 1.00 0.00 0.00
#> O9-E12      1  0.0000      0.951 1.00 0.00 0.00
#> O9-E4       1  0.0892      0.941 0.98 0.00 0.02
#> O9-F9       1  0.0000      0.951 1.00 0.00 0.00
#> O9-G3       1  0.0000      0.951 1.00 0.00 0.00
#> O9-G7       1  0.0000      0.951 1.00 0.00 0.00
#> S37-A4      1  0.0000      0.951 1.00 0.00 0.00
#> S37-A7      1  0.1529      0.925 0.96 0.00 0.04
#> S37-B3      1  0.0000      0.951 1.00 0.00 0.00
#> S37-B5      1  0.1529      0.925 0.96 0.00 0.04
#> S37-B6      1  0.0000      0.951 1.00 0.00 0.00
#> S37-B9      1  0.0000      0.951 1.00 0.00 0.00
#> S37-D11     1  0.0000      0.951 1.00 0.00 0.00
#> S37-D9      1  0.0000      0.951 1.00 0.00 0.00
#> S37-E10     1  0.0000      0.951 1.00 0.00 0.00
#> S37-E5      1  0.0000      0.951 1.00 0.00 0.00
#> S37-G5      1  0.0000      0.951 1.00 0.00 0.00
#> S37-G8      1  0.0000      0.951 1.00 0.00 0.00
#> S37-H4      1  0.0000      0.951 1.00 0.00 0.00
#> S38-A3      1  0.0000      0.951 1.00 0.00 0.00
#> S38-B10     2  0.2414      0.894 0.04 0.94 0.02
#> S38-C1      2  0.7884      0.490 0.10 0.64 0.26
#> S38-C10     2  0.2066      0.909 0.00 0.94 0.06
#> S38-C11     2  0.0000      0.939 0.00 1.00 0.00
#> S38-C5      2  0.0000      0.939 0.00 1.00 0.00
#> S38-C6      1  0.0000      0.951 1.00 0.00 0.00
#> S38-C7      1  0.0000      0.951 1.00 0.00 0.00
#> S38-D10     2  0.0000      0.939 0.00 1.00 0.00
#> S38-D11     2  0.0892      0.927 0.00 0.98 0.02
#> S38-D4      1  0.0892      0.941 0.98 0.00 0.02
#> S38-D7      1  0.0000      0.951 1.00 0.00 0.00
#> S38-E2      1  0.3340      0.826 0.88 0.12 0.00
#> S38-E3      2  0.4551      0.758 0.14 0.84 0.02
#> S38-E8      1  0.0000      0.951 1.00 0.00 0.00
#> S38-F7      1  0.7464      0.268 0.56 0.40 0.04
#> S38-G7      2  0.0892      0.927 0.00 0.98 0.02
#> S38-G8      1  0.0000      0.951 1.00 0.00 0.00
#> S38-G9      2  0.0000      0.939 0.00 1.00 0.00
#> S38-H3      1  0.0892      0.941 0.98 0.00 0.02

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>         class entropy silhouette   p1   p2   p3   p4
#> O10-A11     1  0.1637     0.8735 0.94 0.00 0.06 0.00
#> O10-A5      2  0.2706     0.8385 0.00 0.90 0.08 0.02
#> O10-A7      2  0.2411     0.8593 0.00 0.92 0.04 0.04
#> O10-A8      2  0.1211     0.8719 0.00 0.96 0.00 0.04
#> O10-B10     2  0.0707     0.8783 0.00 0.98 0.00 0.02
#> O10-B11     2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-B2      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-B5      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-B6      1  0.7004     0.2275 0.58 0.22 0.00 0.20
#> O10-B7      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-B9      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-C10     2  0.0707     0.8766 0.00 0.98 0.02 0.00
#> O10-C12     2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-C5      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-C6      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-C9      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-D1      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-D11     2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-D12     2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-D5      2  0.2647     0.8140 0.00 0.88 0.12 0.00
#> O10-D6      2  0.1211     0.8703 0.00 0.96 0.04 0.00
#> O10-D9      2  0.0707     0.8783 0.00 0.98 0.00 0.02
#> O10-E1      2  0.2345     0.8425 0.00 0.90 0.00 0.10
#> O10-E11     2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-E12     2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-E6      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O10-F1      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O10-F11     1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> O10-F12     2  0.3972     0.8012 0.00 0.84 0.08 0.08
#> O10-F5      1  0.0707     0.8958 0.98 0.00 0.00 0.02
#> O10-F9      3  0.5677     0.6731 0.00 0.14 0.72 0.14
#> O12-B12     1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> O12-F12     1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> O7-A3       4  0.1411     0.7027 0.00 0.02 0.02 0.96
#> O7-A9       4  0.4797     0.6797 0.26 0.00 0.02 0.72
#> O7-B11      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O7-B6       2  0.2921     0.7982 0.00 0.86 0.14 0.00
#> O7-B7       2  0.6336    -0.0826 0.00 0.48 0.46 0.06
#> O7-C1       4  0.0707     0.7183 0.02 0.00 0.00 0.98
#> O7-C11      2  0.0707     0.8783 0.00 0.98 0.00 0.02
#> O7-C7       2  0.5570     0.3024 0.00 0.54 0.02 0.44
#> O7-D4       1  0.2345     0.8428 0.90 0.00 0.00 0.10
#> O7-E10      3  0.7310     0.3307 0.00 0.36 0.48 0.16
#> O7-E11      2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O7-F2       1  0.5661     0.5697 0.70 0.00 0.22 0.08
#> O7-F3       4  0.4642     0.6901 0.24 0.00 0.02 0.74
#> O7-F7       2  0.3400     0.7845 0.00 0.82 0.00 0.18
#> O7-F9       2  0.2345     0.8317 0.00 0.90 0.10 0.00
#> O8-A2       3  0.6714     0.1640 0.36 0.00 0.54 0.10
#> O8-A3       3  0.0000     0.8155 0.00 0.00 1.00 0.00
#> O8-A8       3  0.0000     0.8155 0.00 0.00 1.00 0.00
#> O8-B2       1  0.4642     0.6397 0.74 0.00 0.24 0.02
#> O8-B4       3  0.3801     0.7038 0.00 0.22 0.78 0.00
#> O8-B6       3  0.7168     0.5399 0.04 0.28 0.60 0.08
#> O8-B7       3  0.0000     0.8155 0.00 0.00 1.00 0.00
#> O8-B9       2  0.0000     0.8833 0.00 1.00 0.00 0.00
#> O8-C11      3  0.1411     0.8026 0.02 0.00 0.96 0.02
#> O8-C12      3  0.2345     0.7908 0.00 0.10 0.90 0.00
#> O8-C3       1  0.7664     0.3133 0.58 0.14 0.24 0.04
#> O8-C4       1  0.5327     0.6176 0.72 0.00 0.22 0.06
#> O8-C5       3  0.0000     0.8155 0.00 0.00 1.00 0.00
#> O8-C6       3  0.5291     0.6916 0.00 0.08 0.74 0.18
#> O8-C8       3  0.4936     0.6289 0.00 0.28 0.70 0.02
#> O8-D3       3  0.0707     0.8081 0.02 0.00 0.98 0.00
#> O8-D5       3  0.0000     0.8155 0.00 0.00 1.00 0.00
#> O8-D6       1  0.2011     0.8580 0.92 0.00 0.08 0.00
#> O8-D9       1  0.3247     0.8344 0.88 0.00 0.06 0.06
#> O8-E11      3  0.3522     0.7945 0.02 0.06 0.88 0.04
#> O8-E2       1  0.1913     0.8784 0.94 0.00 0.04 0.02
#> O8-E5       1  0.2011     0.8550 0.92 0.00 0.08 0.00
#> O8-E9       3  0.0707     0.8176 0.00 0.02 0.98 0.00
#> O8-F11      2  0.3400     0.7482 0.00 0.82 0.18 0.00
#> O8-F12      3  0.1637     0.8106 0.00 0.06 0.94 0.00
#> O8-F3       2  0.5606    -0.0443 0.00 0.50 0.48 0.02
#> O8-G1       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O8-G12      3  0.0707     0.8176 0.00 0.02 0.98 0.00
#> O8-G5       2  0.4949     0.6970 0.00 0.76 0.18 0.06
#> O9-A10      1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> O9-A8       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-B12      1  0.2011     0.8563 0.92 0.00 0.00 0.08
#> O9-B2       1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> O9-B6       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-B7       1  0.1637     0.8711 0.94 0.00 0.00 0.06
#> O9-C2       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-C4       4  0.5606     0.2056 0.48 0.00 0.02 0.50
#> O9-C6       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-D12      1  0.4994    -0.1250 0.52 0.00 0.00 0.48
#> O9-D6       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-E12      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-E4       4  0.4936     0.6589 0.28 0.00 0.02 0.70
#> O9-F9       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-G3       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> O9-G7       1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-A4      1  0.4277     0.5654 0.72 0.00 0.00 0.28
#> S37-A7      1  0.2011     0.8586 0.92 0.00 0.08 0.00
#> S37-B3      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-B5      1  0.2706     0.8566 0.90 0.00 0.02 0.08
#> S37-B6      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-B9      1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> S37-D11     1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-D9      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-E10     1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> S37-E5      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-G5      1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> S37-G8      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S37-H4      1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> S38-A3      1  0.2647     0.8113 0.88 0.00 0.00 0.12
#> S38-B10     4  0.3606     0.6117 0.00 0.14 0.02 0.84
#> S38-C1      4  0.0707     0.7046 0.00 0.00 0.02 0.98
#> S38-C10     2  0.4977     0.2800 0.00 0.54 0.00 0.46
#> S38-C11     2  0.4284     0.7448 0.00 0.78 0.02 0.20
#> S38-C5      2  0.1211     0.8711 0.00 0.96 0.00 0.04
#> S38-C6      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S38-C7      4  0.4522     0.5813 0.32 0.00 0.00 0.68
#> S38-D10     2  0.4406     0.6406 0.00 0.70 0.00 0.30
#> S38-D11     4  0.2345     0.6556 0.00 0.10 0.00 0.90
#> S38-D4      4  0.2706     0.7334 0.08 0.00 0.02 0.90
#> S38-D7      1  0.3801     0.6707 0.78 0.00 0.00 0.22
#> S38-E2      4  0.3400     0.7058 0.18 0.00 0.00 0.82
#> S38-E3      4  0.0000     0.7056 0.00 0.00 0.00 1.00
#> S38-E8      1  0.0707     0.8999 0.98 0.00 0.00 0.02
#> S38-F7      4  0.7896     0.4518 0.30 0.18 0.02 0.50
#> S38-G7      2  0.4855     0.4669 0.00 0.60 0.00 0.40
#> S38-G8      1  0.0000     0.9035 1.00 0.00 0.00 0.00
#> S38-G9      2  0.2647     0.8299 0.00 0.88 0.00 0.12
#> S38-H3      4  0.2921     0.7349 0.14 0.00 0.00 0.86

Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.

consensus_heatmap(res, k = 2)

plot of chunk tab-node-03-consensus-heatmap-1

consensus_heatmap(res, k = 3)

plot of chunk tab-node-03-consensus-heatmap-2

consensus_heatmap(res, k = 4)

plot of chunk tab-node-03-consensus-heatmap-3

Heatmaps for the membership of samples in all partitions to see how consistent they are:

membership_heatmap(res, k = 2)

plot of chunk tab-node-03-membership-heatmap-1

membership_heatmap(res, k = 3)

plot of chunk tab-node-03-membership-heatmap-2

membership_heatmap(res, k = 4)

plot of chunk tab-node-03-membership-heatmap-3

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:

get_signatures(res, k = 2)

plot of chunk tab-node-03-get-signatures-1

get_signatures(res, k = 3)

plot of chunk tab-node-03-get-signatures-2

get_signatures(res, k = 4)

plot of chunk tab-node-03-get-signatures-3

Signature heatmaps where rows are not scaled:

get_signatures(res, k = 2, scale_rows = FALSE)

plot of chunk tab-node-03-get-signatures-no-scale-1

get_signatures(res, k = 3, scale_rows = FALSE)

plot of chunk tab-node-03-get-signatures-no-scale-2

get_signatures(res, k = 4, scale_rows = FALSE)

plot of chunk tab-node-03-get-signatures-no-scale-3

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk node-03-signature_compare

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:

  1. which_row: row indices corresponding to the input matrix.
  2. fdr: FDR for the differential test.
  3. mean_x: The mean value in group x.
  4. scaled_mean_x: The mean value in group x after rows are scaled.
  5. 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")

plot of chunk tab-node-03-dimension-reduction-1

dimension_reduction(res, k = 3, method = "UMAP")

plot of chunk tab-node-03-dimension-reduction-2

dimension_reduction(res, k = 4, method = "UMAP")

plot of chunk tab-node-03-dimension-reduction-3

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-03-collect-classes

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 Age(p-value) Inferred.Cell.Type(p-value) k
#> ATC:skmeans      126     6.32e-03                    1.53e-01 2
#> ATC:skmeans      119     1.93e-03                    1.07e-01 3
#> ATC:skmeans      114     3.72e-05                    2.01e-06 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.

Session info

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      parallel  stats4    stats     graphics  grDevices utils     datasets  methods  
#> [10] base     
#> 
#> other attached packages:
#>  [1] genefilter_1.74.0           ComplexHeatmap_2.8.0        markdown_1.1               
#>  [4] knitr_1.33                  scRNAseq_2.6.1              SingleCellExperiment_1.14.1
#>  [7] SummarizedExperiment_1.22.0 Biobase_2.52.0              GenomicRanges_1.44.0       
#> [10] GenomeInfoDb_1.28.1         IRanges_2.26.0              S4Vectors_0.30.0           
#> [13] BiocGenerics_0.38.0         MatrixGenerics_1.4.0        matrixStats_0.59.0         
#> [16] cola_1.9.4                 
#> 
#> loaded via a namespace (and not attached):
#>   [1] circlize_0.4.13               AnnotationHub_3.0.1           BiocFileCache_2.0.0          
#>   [4] lazyeval_0.2.2                polylabelr_0.2.0              splines_4.1.0                
#>   [7] Polychrome_1.3.1              BiocParallel_1.26.1           ggplot2_3.3.5                
#>  [10] digest_0.6.27                 foreach_1.5.1                 ensembldb_2.16.3             
#>  [13] htmltools_0.5.1.1             viridis_0.6.1                 fansi_0.5.0                  
#>  [16] magrittr_2.0.1                memoise_2.0.0                 cluster_2.1.2                
#>  [19] doParallel_1.0.16             Biostrings_2.60.1             annotate_1.70.0              
#>  [22] askpass_1.1                   prettyunits_1.1.1             colorspace_2.0-2             
#>  [25] blob_1.2.1                    rappdirs_0.3.3                xfun_0.24                    
#>  [28] dplyr_1.0.7                   crayon_1.4.1                  RCurl_1.98-1.3               
#>  [31] microbenchmark_1.4-7          jsonlite_1.7.2                impute_1.66.0                
#>  [34] brew_1.0-6                    survival_3.2-11               iterators_1.0.13             
#>  [37] glue_1.4.2                    polyclip_1.10-0               gtable_0.3.0                 
#>  [40] zlibbioc_1.38.0               XVector_0.32.0                GetoptLong_1.0.5             
#>  [43] DelayedArray_0.18.0           shape_1.4.6                   scales_1.1.1                 
#>  [46] data.tree_1.0.0               DBI_1.1.1                     Rcpp_1.0.7                   
#>  [49] viridisLite_0.4.0             xtable_1.8-4                  progress_1.2.2               
#>  [52] clue_0.3-59                   reticulate_1.20               bit_4.0.4                    
#>  [55] mclust_5.4.7                  umap_0.2.7.0                  httr_1.4.2                   
#>  [58] RColorBrewer_1.1-2            ellipsis_0.3.2                pkgconfig_2.0.3              
#>  [61] XML_3.99-0.6                  dbplyr_2.1.1                  utf8_1.2.1                   
#>  [64] tidyselect_1.1.1              rlang_0.4.11                  later_1.2.0                  
#>  [67] AnnotationDbi_1.54.1          munsell_0.5.0                 BiocVersion_3.13.1           
#>  [70] tools_4.1.0                   cachem_1.0.5                  generics_0.1.0               
#>  [73] RSQLite_2.2.7                 ExperimentHub_2.0.0           evaluate_0.14                
#>  [76] stringr_1.4.0                 fastmap_1.1.0                 yaml_2.2.1                   
#>  [79] bit64_4.0.5                   purrr_0.3.4                   dendextend_1.15.1            
#>  [82] KEGGREST_1.32.0               AnnotationFilter_1.16.0       mime_0.11                    
#>  [85] slam_0.1-48                   xml2_1.3.2                    biomaRt_2.48.2               
#>  [88] compiler_4.1.0                rstudioapi_0.13               filelock_1.0.2               
#>  [91] curl_4.3.2                    png_0.1-7                     interactiveDisplayBase_1.30.0
#>  [94] tibble_3.1.2                  stringi_1.7.3                 highr_0.9                    
#>  [97] GenomicFeatures_1.44.0        RSpectra_0.16-0               lattice_0.20-44              
#> [100] ProtGenerics_1.24.0           Matrix_1.3-4                  vctrs_0.3.8                  
#> [103] pillar_1.6.1                  lifecycle_1.0.0               BiocManager_1.30.16          
#> [106] eulerr_6.1.0                  GlobalOptions_0.1.2           bitops_1.0-7                 
#> [109] irlba_2.3.3                   httpuv_1.6.1                  rtracklayer_1.52.0           
#> [112] R6_2.5.0                      BiocIO_1.2.0                  promises_1.2.0.1             
#> [115] gridExtra_2.3                 codetools_0.2-18              assertthat_0.2.1             
#> [118] openssl_1.4.4                 rjson_0.2.20                  GenomicAlignments_1.28.0     
#> [121] Rsamtools_2.8.0               GenomeInfoDbData_1.2.6        hms_1.1.0                    
#> [124] skmeans_0.2-13                Cairo_1.5-12.2                scatterplot3d_0.3-41         
#> [127] shiny_1.6.0                   restfulr_0.0.13