cola Report for Hierarchical Partitioning - 'TCGA_THYM_methylation'

Date: 2021-07-22 16:22:51 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 4 combinations of top-value methods and partitioning methods.
#>   On a matrix with 376018 rows and 126 columns.
#>   Performed in total 29400 partitions.
#>   There are 15 groups under the following parameters:
#>     - min_samples: 6
#>     - mean_silhouette_cutoff: 0.9
#>     - min_n_signatures: 1000 (signatures are selected based on:)
#>       - fdr_cutoff: 0.05
#>       - group_diff: 0.25
#> 
#> Hierarchy of the partition:
#>   0, 126 cols
#>   |-- 01, 69 cols, 3265 signatures
#>   |   |-- 011, 33 cols, 601 signatures (c)
#>   |   `-- 012, 36 cols, 8310 signatures
#>   |       |-- 0121, 11 cols (b)
#>   |       |-- 0122, 14 cols, 330 signatures (c)
#>   |       |-- 0123, 3 cols (b)
#>   |       `-- 0124, 8 cols (b)
#>   |-- 02, 19 cols, 4048 signatures
#>   |   |-- 021, 5 cols (b)
#>   |   |-- 022, 5 cols (b)
#>   |   |-- 023, 4 cols (b)
#>   |   `-- 024, 5 cols (b)
#>   |-- 03, 24 cols, 10559 signatures
#>   |   |-- 031, 8 cols (b)
#>   |   |-- 032, 8 cols (b)
#>   |   |-- 033, 5 cols (b)
#>   |   `-- 034, 3 cols (b)
#>   `-- 04, 14 cols, 7591 signatures
#>       |-- 041, 7 cols (b)
#>       `-- 042, 7 cols (b)
#> Stop reason:
#>   b) Subgroup had too few columns.
#>   c) There were too few signatures.
#> 
#> Following methods can be applied to this 'HierarchicalPartition' object:
#>  [1] "all_leaves"            "all_nodes"             "cola_report"           "collect_classes"      
#>  [5] "colnames"              "compare_signatures"    "dimension_reduction"   "functional_enrichment"
#>  [9] "get_anno_col"          "get_anno"              "get_children_nodes"    "get_classes"          
#> [13] "get_matrix"            "get_signatures"        "is_leaf_node"          "max_depth"            
#> [17] "merge_node"            "ncol"                  "node_info"             "node_level"           
#> [21] "nrow"                  "rownames"              "show"                  "split_node"           
#> [25] "suggest_best_k"        "test_to_known_factors" "top_rows_heatmap"      "top_rows_overlap"     
#> 
#> You can get result for a single node by e.g. object["01"]

The call of hierarchical_partition() was:

#> hierarchical_partition(data = mat, top_n = 1000, top_value_method = c("SD", "ATC"), 
#>     partition_method = c("kmeans", "skmeans"), subset = 500, group_diff = 0.25, min_n_signatures = 1000, 
#>     filter_fun = function(mat) {
#>         s = rowSds(mat)
#>         order(-s)[1:30000]
#>     }, max_k = 8, scale_rows = FALSE, cores = 4)

Dimension of the input matrix:

mat = get_matrix(res_rh)
dim(mat)
#> [1] 376018    126

All the methods that were tried:

res_rh@param$combination_method
#> [[1]]
#> [1] "SD"     "kmeans"
#> 
#> [[2]]
#> [1] "ATC"    "kmeans"
#> 
#> [[3]]
#> [1] "SD"      "skmeans"
#> 
#> [[4]]
#> [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, 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"  "0121" "0122" "0123" "0124" "02"   "021"  "022"  "023"  "024" 
#> [14] "03"   "031"  "032"  "033"  "034"  "04"   "041"  "042"
all_leaves(res_rh)
#>  [1] "011"  "0121" "0122" "0123" "0124" "021"  "022"  "023"  "024"  "031"  "032"  "033"  "034" 
#> [14] "041"  "042"
node_info(res_rh)
#>      id best_method depth best_k n_columns n_signatures p_signatures is_leaf
#> 1     0  SD:skmeans     1      4       126        54876     0.145940   FALSE
#> 2    01   SD:kmeans     2      2        69         3265     0.008683   FALSE
#> 3   011 ATC:skmeans     3      4        33          601     0.001598    TRUE
#> 4   012  ATC:kmeans     3      4        36         8310     0.022100   FALSE
#> 5  0121 not applied     4     NA        11           NA           NA    TRUE
#> 6  0122 ATC:skmeans     4      3        14          330     0.000878    TRUE
#> 7  0123 not applied     4     NA         3           NA           NA    TRUE
#> 8  0124 not applied     4     NA         8           NA           NA    TRUE
#> 9    02   SD:kmeans     2      4        19         4048     0.010765   FALSE
#> 10  021 not applied     3     NA         5           NA           NA    TRUE
#> 11  022 not applied     3     NA         5           NA           NA    TRUE
#> 12  023 not applied     3     NA         4           NA           NA    TRUE
#> 13  024 not applied     3     NA         5           NA           NA    TRUE
#> 14   03  SD:skmeans     2      4        24        10559     0.028081   FALSE
#> 15  031 not applied     3     NA         8           NA           NA    TRUE
#> 16  032 not applied     3     NA         8           NA           NA    TRUE
#> 17  033 not applied     3     NA         5           NA           NA    TRUE
#> 18  034 not applied     3     NA         3           NA           NA    TRUE
#> 19   04 ATC:skmeans     2      2        14         7591     0.020188   FALSE
#> 20  041 not applied     3     NA         7           NA           NA    TRUE
#> 21  042 not applied     3     NA         7           NA           NA    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 SD:skmeans 5 0.99 0.95 0.96 126 **
Node01 SD:kmeans 2 1.00 1.00 1.00 69 **
Node011-leaf ATC:skmeans ✓ (c) 5 0.92 0.88 0.94 33 *
Node012 ATC:kmeans 7 0.92 0.94 0.90 36 *
Node0121-leaf not applied ✓ (b) 11
Node0122-leaf ATC:skmeans ✓ (c) 3 1.00 1.00 1.00 14 **
Node0123-leaf not applied ✓ (b) 3
Node0124-leaf not applied ✓ (b) 8
Node02 SD:kmeans 4 0.91 0.96 0.95 19 *
Node021-leaf not applied ✓ (b) 5
Node022-leaf not applied ✓ (b) 5
Node023-leaf not applied ✓ (b) 4
Node024-leaf not applied ✓ (b) 5
Node03 SD:skmeans 4 1.00 1.00 1.00 24 **
Node031-leaf not applied ✓ (b) 8
Node032-leaf not applied ✓ (b) 8
Node033-leaf not applied ✓ (b) 5
Node034-leaf not applied ✓ (b) 3
Node04 ATC:skmeans 7 0.90 0.72 0.97 14 *
Node041-leaf not applied ✓ (b) 7
Node042-leaf not applied ✓ (b) 7

Stop reason: b) Subgroup had too few columns. 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 = 3265))

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

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

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

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

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

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

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

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

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

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

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

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 = 3265))
#> TCGA.3S.A8YW.01 TCGA.ZB.A96K.01 TCGA.XU.A930.01 TCGA.ZB.A965.01 TCGA.4V.A9QN.01 TCGA.ZB.A96G.01 
#>           "041"           "032"           "031"           "022"           "042"           "011" 
#> TCGA.XM.A8R8.01 TCGA.XU.AAXX.01 TCGA.ZT.A8OM.01 TCGA.3S.AAYX.01 TCGA.ZB.A96M.01 TCGA.XU.A936.01 
#>          "0123"          "0124"          "0122"          "0121"           "033"           "041" 
#> TCGA.5U.AB0F.01 TCGA.X7.A8DJ.01 TCGA.ZB.A96D.01 TCGA.ZB.A96Q.01 TCGA.X7.A8DG.01 TCGA.X7.A8D9.01 
#>          "0122"           "011"          "0122"           "032"           "011"           "033" 
#> TCGA.5V.A9RR.01 TCGA.4V.A9QI.01 TCGA.ZB.A96C.01 TCGA.4V.A9QX.01 TCGA.XU.A931.01 TCGA.ZB.A961.01 
#>           "032"           "011"           "024"          "0122"           "042"           "031" 
#> TCGA.4X.A9FB.01 TCGA.YT.A95E.01 TCGA.X7.A8D7.01 TCGA.4V.A9QQ.01 TCGA.ZB.A969.01 TCGA.X7.A8M4.01 
#>           "011"           "011"          "0121"          "0124"           "023"           "011" 
#> TCGA.XM.A8RC.01 TCGA.4V.A9QJ.01 TCGA.XM.AAZ2.01 TCGA.X7.A8M1.01 TCGA.XM.A8RG.01 TCGA.4X.A9FD.01 
#>           "031"           "011"           "024"           "032"           "021"           "034" 
#> TCGA.X7.A8D6.01 TCGA.ZC.AAAF.01 TCGA.3G.AB0Q.01 TCGA.4X.A9FA.01 TCGA.5K.AAAP.01 TCGA.XM.A8RF.01 
#>          "0121"          "0122"           "024"           "024"           "032"           "023" 
#> TCGA.4X.A9FC.01 TCGA.3T.AA9L.01 TCGA.XU.A92W.01 TCGA.X7.A8DI.01 TCGA.ZL.A9V6.01 TCGA.XU.AAXY.01 
#>          "0124"          "0121"           "011"          "0124"           "021"           "011" 
#> TCGA.4V.A9QU.01 TCGA.X7.A8DF.01 TCGA.XU.A932.01 TCGA.XU.A92Z.01 TCGA.3G.AB0O.01 TCGA.XU.A92X.01 
#>          "0122"           "011"           "011"           "042"           "011"           "031" 
#> TCGA.XU.A92O.01 TCGA.5G.A9ZZ.01 TCGA.X7.A8M7.01 TCGA.XM.A8R9.01 TCGA.XM.AAZ1.01 TCGA.X7.A8DE.01 
#>           "021"           "034"           "011"          "0123"           "011"          "0122" 
#> TCGA.X7.A8D7.11 TCGA.ZB.A962.01 TCGA.YT.A95D.01 TCGA.X7.A8M8.01 TCGA.X7.A8D6.11 TCGA.4V.A9QT.01 
#>          "0121"           "022"           "024"           "011"          "0123"          "0121" 
#> TCGA.3G.AB14.01 TCGA.5U.AB0D.01 TCGA.YT.A95F.01 TCGA.XM.A8RL.01 TCGA.4V.A9QR.01 TCGA.XM.A8RI.01 
#>           "031"           "041"           "033"           "011"           "034"           "031" 
#> TCGA.XM.A8RE.01 TCGA.XM.A8RH.01 TCGA.ZC.AAAH.01 TCGA.XH.A853.01 TCGA.X7.A8DD.01 TCGA.4V.A9QL.01 
#>          "0121"          "0124"           "011"           "011"          "0124"           "033" 
#> TCGA.ZB.A96A.01 TCGA.XU.AAY0.01 TCGA.XM.A8RB.01 TCGA.ZB.A96R.01 TCGA.ZB.A96V.01 TCGA.XM.A8RD.01 
#>           "011"          "0122"          "0121"           "011"           "041"          "0122" 
#> TCGA.X7.A8M0.01 TCGA.ZB.A96I.01 TCGA.ZB.A96F.01 TCGA.X7.A8DC.01 TCGA.X7.A8M5.01 TCGA.ZB.A966.01 
#>           "033"           "042"           "031"           "011"           "042"           "041" 
#> TCGA.XU.A92V.01 TCGA.YT.A95H.01 TCGA.ZC.AAAA.01 TCGA.XU.A92R.01 TCGA.YT.A95G.01 TCGA.XU.A933.01 
#>           "042"           "011"           "011"          "0122"          "0122"           "041" 
#> TCGA.XU.A92U.01 TCGA.3Q.A9WF.01 TCGA.XU.AAXV.01 TCGA.X7.A8D8.01 TCGA.ZB.A96L.01 TCGA.XU.AAXW.01 
#>           "011"           "011"          "0122"           "032"           "023"          "0124" 
#> TCGA.4V.A9QW.01 TCGA.XU.AAXZ.01 TCGA.X7.A8DB.01 TCGA.ZB.A96O.01 TCGA.ZB.A96H.01 TCGA.4V.A9QM.01 
#>           "011"           "011"          "0121"          "0121"           "021"           "032" 
#> TCGA.XU.AAY1.01 TCGA.4V.A9QS.01 TCGA.XU.A92T.01 TCGA.X7.A8M6.01 TCGA.3G.AB0T.01 TCGA.ZC.AAA7.01 
#>          "0124"          "0122"           "022"           "011"           "011"           "041" 
#> TCGA.4X.A9F9.01 TCGA.XU.A92Y.01 TCGA.ZB.A96B.01 TCGA.3G.AB19.01 TCGA.XM.AAZ3.01 TCGA.X7.A8M3.01 
#>          "0121"          "0122"           "011"           "023"           "021"           "042" 
#> TCGA.ZB.A964.01 TCGA.5U.AB0E.01 TCGA.XU.A92Q.01 TCGA.ZB.A96P.01 TCGA.ZB.A96E.01 TCGA.ZB.A963.01 
#>           "022"           "031"           "022"           "011"           "032"           "011"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 4048))
#> TCGA.3S.A8YW.01 TCGA.ZB.A96K.01 TCGA.XU.A930.01 TCGA.ZB.A965.01 TCGA.4V.A9QN.01 TCGA.ZB.A96G.01 
#>           "041"           "032"           "031"           "022"           "042"            "01" 
#> TCGA.XM.A8R8.01 TCGA.XU.AAXX.01 TCGA.ZT.A8OM.01 TCGA.3S.AAYX.01 TCGA.ZB.A96M.01 TCGA.XU.A936.01 
#>            "01"            "01"            "01"            "01"           "033"           "041" 
#> TCGA.5U.AB0F.01 TCGA.X7.A8DJ.01 TCGA.ZB.A96D.01 TCGA.ZB.A96Q.01 TCGA.X7.A8DG.01 TCGA.X7.A8D9.01 
#>            "01"            "01"            "01"           "032"            "01"           "033" 
#> TCGA.5V.A9RR.01 TCGA.4V.A9QI.01 TCGA.ZB.A96C.01 TCGA.4V.A9QX.01 TCGA.XU.A931.01 TCGA.ZB.A961.01 
#>           "032"            "01"           "024"            "01"           "042"           "031" 
#> TCGA.4X.A9FB.01 TCGA.YT.A95E.01 TCGA.X7.A8D7.01 TCGA.4V.A9QQ.01 TCGA.ZB.A969.01 TCGA.X7.A8M4.01 
#>            "01"            "01"            "01"            "01"           "023"            "01" 
#> TCGA.XM.A8RC.01 TCGA.4V.A9QJ.01 TCGA.XM.AAZ2.01 TCGA.X7.A8M1.01 TCGA.XM.A8RG.01 TCGA.4X.A9FD.01 
#>           "031"            "01"           "024"           "032"           "021"           "034" 
#> TCGA.X7.A8D6.01 TCGA.ZC.AAAF.01 TCGA.3G.AB0Q.01 TCGA.4X.A9FA.01 TCGA.5K.AAAP.01 TCGA.XM.A8RF.01 
#>            "01"            "01"           "024"           "024"           "032"           "023" 
#> TCGA.4X.A9FC.01 TCGA.3T.AA9L.01 TCGA.XU.A92W.01 TCGA.X7.A8DI.01 TCGA.ZL.A9V6.01 TCGA.XU.AAXY.01 
#>            "01"            "01"            "01"            "01"           "021"            "01" 
#> TCGA.4V.A9QU.01 TCGA.X7.A8DF.01 TCGA.XU.A932.01 TCGA.XU.A92Z.01 TCGA.3G.AB0O.01 TCGA.XU.A92X.01 
#>            "01"            "01"            "01"           "042"            "01"           "031" 
#> TCGA.XU.A92O.01 TCGA.5G.A9ZZ.01 TCGA.X7.A8M7.01 TCGA.XM.A8R9.01 TCGA.XM.AAZ1.01 TCGA.X7.A8DE.01 
#>           "021"           "034"            "01"            "01"            "01"            "01" 
#> TCGA.X7.A8D7.11 TCGA.ZB.A962.01 TCGA.YT.A95D.01 TCGA.X7.A8M8.01 TCGA.X7.A8D6.11 TCGA.4V.A9QT.01 
#>            "01"           "022"           "024"            "01"            "01"            "01" 
#> TCGA.3G.AB14.01 TCGA.5U.AB0D.01 TCGA.YT.A95F.01 TCGA.XM.A8RL.01 TCGA.4V.A9QR.01 TCGA.XM.A8RI.01 
#>           "031"           "041"           "033"            "01"           "034"           "031" 
#> TCGA.XM.A8RE.01 TCGA.XM.A8RH.01 TCGA.ZC.AAAH.01 TCGA.XH.A853.01 TCGA.X7.A8DD.01 TCGA.4V.A9QL.01 
#>            "01"            "01"            "01"            "01"            "01"           "033" 
#> TCGA.ZB.A96A.01 TCGA.XU.AAY0.01 TCGA.XM.A8RB.01 TCGA.ZB.A96R.01 TCGA.ZB.A96V.01 TCGA.XM.A8RD.01 
#>            "01"            "01"            "01"            "01"           "041"            "01" 
#> TCGA.X7.A8M0.01 TCGA.ZB.A96I.01 TCGA.ZB.A96F.01 TCGA.X7.A8DC.01 TCGA.X7.A8M5.01 TCGA.ZB.A966.01 
#>           "033"           "042"           "031"            "01"           "042"           "041" 
#> TCGA.XU.A92V.01 TCGA.YT.A95H.01 TCGA.ZC.AAAA.01 TCGA.XU.A92R.01 TCGA.YT.A95G.01 TCGA.XU.A933.01 
#>           "042"            "01"            "01"            "01"            "01"           "041" 
#> TCGA.XU.A92U.01 TCGA.3Q.A9WF.01 TCGA.XU.AAXV.01 TCGA.X7.A8D8.01 TCGA.ZB.A96L.01 TCGA.XU.AAXW.01 
#>            "01"            "01"            "01"           "032"           "023"            "01" 
#> TCGA.4V.A9QW.01 TCGA.XU.AAXZ.01 TCGA.X7.A8DB.01 TCGA.ZB.A96O.01 TCGA.ZB.A96H.01 TCGA.4V.A9QM.01 
#>            "01"            "01"            "01"            "01"           "021"           "032" 
#> TCGA.XU.AAY1.01 TCGA.4V.A9QS.01 TCGA.XU.A92T.01 TCGA.X7.A8M6.01 TCGA.3G.AB0T.01 TCGA.ZC.AAA7.01 
#>            "01"            "01"           "022"            "01"            "01"           "041" 
#> TCGA.4X.A9F9.01 TCGA.XU.A92Y.01 TCGA.ZB.A96B.01 TCGA.3G.AB19.01 TCGA.XM.AAZ3.01 TCGA.X7.A8M3.01 
#>            "01"            "01"            "01"           "023"           "021"           "042" 
#> TCGA.ZB.A964.01 TCGA.5U.AB0E.01 TCGA.XU.A92Q.01 TCGA.ZB.A96P.01 TCGA.ZB.A96E.01 TCGA.ZB.A963.01 
#>           "022"           "031"           "022"            "01"           "032"            "01"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 7591))
#> TCGA.3S.A8YW.01 TCGA.ZB.A96K.01 TCGA.XU.A930.01 TCGA.ZB.A965.01 TCGA.4V.A9QN.01 TCGA.ZB.A96G.01 
#>           "041"           "032"           "031"            "02"           "042"            "01" 
#> TCGA.XM.A8R8.01 TCGA.XU.AAXX.01 TCGA.ZT.A8OM.01 TCGA.3S.AAYX.01 TCGA.ZB.A96M.01 TCGA.XU.A936.01 
#>            "01"            "01"            "01"            "01"           "033"           "041" 
#> TCGA.5U.AB0F.01 TCGA.X7.A8DJ.01 TCGA.ZB.A96D.01 TCGA.ZB.A96Q.01 TCGA.X7.A8DG.01 TCGA.X7.A8D9.01 
#>            "01"            "01"            "01"           "032"            "01"           "033" 
#> TCGA.5V.A9RR.01 TCGA.4V.A9QI.01 TCGA.ZB.A96C.01 TCGA.4V.A9QX.01 TCGA.XU.A931.01 TCGA.ZB.A961.01 
#>           "032"            "01"            "02"            "01"           "042"           "031" 
#> TCGA.4X.A9FB.01 TCGA.YT.A95E.01 TCGA.X7.A8D7.01 TCGA.4V.A9QQ.01 TCGA.ZB.A969.01 TCGA.X7.A8M4.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.XM.A8RC.01 TCGA.4V.A9QJ.01 TCGA.XM.AAZ2.01 TCGA.X7.A8M1.01 TCGA.XM.A8RG.01 TCGA.4X.A9FD.01 
#>           "031"            "01"            "02"           "032"            "02"           "034" 
#> TCGA.X7.A8D6.01 TCGA.ZC.AAAF.01 TCGA.3G.AB0Q.01 TCGA.4X.A9FA.01 TCGA.5K.AAAP.01 TCGA.XM.A8RF.01 
#>            "01"            "01"            "02"            "02"           "032"            "02" 
#> TCGA.4X.A9FC.01 TCGA.3T.AA9L.01 TCGA.XU.A92W.01 TCGA.X7.A8DI.01 TCGA.ZL.A9V6.01 TCGA.XU.AAXY.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.4V.A9QU.01 TCGA.X7.A8DF.01 TCGA.XU.A932.01 TCGA.XU.A92Z.01 TCGA.3G.AB0O.01 TCGA.XU.A92X.01 
#>            "01"            "01"            "01"           "042"            "01"           "031" 
#> TCGA.XU.A92O.01 TCGA.5G.A9ZZ.01 TCGA.X7.A8M7.01 TCGA.XM.A8R9.01 TCGA.XM.AAZ1.01 TCGA.X7.A8DE.01 
#>            "02"           "034"            "01"            "01"            "01"            "01" 
#> TCGA.X7.A8D7.11 TCGA.ZB.A962.01 TCGA.YT.A95D.01 TCGA.X7.A8M8.01 TCGA.X7.A8D6.11 TCGA.4V.A9QT.01 
#>            "01"            "02"            "02"            "01"            "01"            "01" 
#> TCGA.3G.AB14.01 TCGA.5U.AB0D.01 TCGA.YT.A95F.01 TCGA.XM.A8RL.01 TCGA.4V.A9QR.01 TCGA.XM.A8RI.01 
#>           "031"           "041"           "033"            "01"           "034"           "031" 
#> TCGA.XM.A8RE.01 TCGA.XM.A8RH.01 TCGA.ZC.AAAH.01 TCGA.XH.A853.01 TCGA.X7.A8DD.01 TCGA.4V.A9QL.01 
#>            "01"            "01"            "01"            "01"            "01"           "033" 
#> TCGA.ZB.A96A.01 TCGA.XU.AAY0.01 TCGA.XM.A8RB.01 TCGA.ZB.A96R.01 TCGA.ZB.A96V.01 TCGA.XM.A8RD.01 
#>            "01"            "01"            "01"            "01"           "041"            "01" 
#> TCGA.X7.A8M0.01 TCGA.ZB.A96I.01 TCGA.ZB.A96F.01 TCGA.X7.A8DC.01 TCGA.X7.A8M5.01 TCGA.ZB.A966.01 
#>           "033"           "042"           "031"            "01"           "042"           "041" 
#> TCGA.XU.A92V.01 TCGA.YT.A95H.01 TCGA.ZC.AAAA.01 TCGA.XU.A92R.01 TCGA.YT.A95G.01 TCGA.XU.A933.01 
#>           "042"            "01"            "01"            "01"            "01"           "041" 
#> TCGA.XU.A92U.01 TCGA.3Q.A9WF.01 TCGA.XU.AAXV.01 TCGA.X7.A8D8.01 TCGA.ZB.A96L.01 TCGA.XU.AAXW.01 
#>            "01"            "01"            "01"           "032"            "02"            "01" 
#> TCGA.4V.A9QW.01 TCGA.XU.AAXZ.01 TCGA.X7.A8DB.01 TCGA.ZB.A96O.01 TCGA.ZB.A96H.01 TCGA.4V.A9QM.01 
#>            "01"            "01"            "01"            "01"            "02"           "032" 
#> TCGA.XU.AAY1.01 TCGA.4V.A9QS.01 TCGA.XU.A92T.01 TCGA.X7.A8M6.01 TCGA.3G.AB0T.01 TCGA.ZC.AAA7.01 
#>            "01"            "01"            "02"            "01"            "01"           "041" 
#> TCGA.4X.A9F9.01 TCGA.XU.A92Y.01 TCGA.ZB.A96B.01 TCGA.3G.AB19.01 TCGA.XM.AAZ3.01 TCGA.X7.A8M3.01 
#>            "01"            "01"            "01"            "02"            "02"           "042" 
#> TCGA.ZB.A964.01 TCGA.5U.AB0E.01 TCGA.XU.A92Q.01 TCGA.ZB.A96P.01 TCGA.ZB.A96E.01 TCGA.ZB.A963.01 
#>            "02"           "031"            "02"            "01"           "032"            "01"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 8310))
#> TCGA.3S.A8YW.01 TCGA.ZB.A96K.01 TCGA.XU.A930.01 TCGA.ZB.A965.01 TCGA.4V.A9QN.01 TCGA.ZB.A96G.01 
#>            "04"           "032"           "031"            "02"            "04"            "01" 
#> TCGA.XM.A8R8.01 TCGA.XU.AAXX.01 TCGA.ZT.A8OM.01 TCGA.3S.AAYX.01 TCGA.ZB.A96M.01 TCGA.XU.A936.01 
#>            "01"            "01"            "01"            "01"           "033"            "04" 
#> TCGA.5U.AB0F.01 TCGA.X7.A8DJ.01 TCGA.ZB.A96D.01 TCGA.ZB.A96Q.01 TCGA.X7.A8DG.01 TCGA.X7.A8D9.01 
#>            "01"            "01"            "01"           "032"            "01"           "033" 
#> TCGA.5V.A9RR.01 TCGA.4V.A9QI.01 TCGA.ZB.A96C.01 TCGA.4V.A9QX.01 TCGA.XU.A931.01 TCGA.ZB.A961.01 
#>           "032"            "01"            "02"            "01"            "04"           "031" 
#> TCGA.4X.A9FB.01 TCGA.YT.A95E.01 TCGA.X7.A8D7.01 TCGA.4V.A9QQ.01 TCGA.ZB.A969.01 TCGA.X7.A8M4.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.XM.A8RC.01 TCGA.4V.A9QJ.01 TCGA.XM.AAZ2.01 TCGA.X7.A8M1.01 TCGA.XM.A8RG.01 TCGA.4X.A9FD.01 
#>           "031"            "01"            "02"           "032"            "02"           "034" 
#> TCGA.X7.A8D6.01 TCGA.ZC.AAAF.01 TCGA.3G.AB0Q.01 TCGA.4X.A9FA.01 TCGA.5K.AAAP.01 TCGA.XM.A8RF.01 
#>            "01"            "01"            "02"            "02"           "032"            "02" 
#> TCGA.4X.A9FC.01 TCGA.3T.AA9L.01 TCGA.XU.A92W.01 TCGA.X7.A8DI.01 TCGA.ZL.A9V6.01 TCGA.XU.AAXY.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.4V.A9QU.01 TCGA.X7.A8DF.01 TCGA.XU.A932.01 TCGA.XU.A92Z.01 TCGA.3G.AB0O.01 TCGA.XU.A92X.01 
#>            "01"            "01"            "01"            "04"            "01"           "031" 
#> TCGA.XU.A92O.01 TCGA.5G.A9ZZ.01 TCGA.X7.A8M7.01 TCGA.XM.A8R9.01 TCGA.XM.AAZ1.01 TCGA.X7.A8DE.01 
#>            "02"           "034"            "01"            "01"            "01"            "01" 
#> TCGA.X7.A8D7.11 TCGA.ZB.A962.01 TCGA.YT.A95D.01 TCGA.X7.A8M8.01 TCGA.X7.A8D6.11 TCGA.4V.A9QT.01 
#>            "01"            "02"            "02"            "01"            "01"            "01" 
#> TCGA.3G.AB14.01 TCGA.5U.AB0D.01 TCGA.YT.A95F.01 TCGA.XM.A8RL.01 TCGA.4V.A9QR.01 TCGA.XM.A8RI.01 
#>           "031"            "04"           "033"            "01"           "034"           "031" 
#> TCGA.XM.A8RE.01 TCGA.XM.A8RH.01 TCGA.ZC.AAAH.01 TCGA.XH.A853.01 TCGA.X7.A8DD.01 TCGA.4V.A9QL.01 
#>            "01"            "01"            "01"            "01"            "01"           "033" 
#> TCGA.ZB.A96A.01 TCGA.XU.AAY0.01 TCGA.XM.A8RB.01 TCGA.ZB.A96R.01 TCGA.ZB.A96V.01 TCGA.XM.A8RD.01 
#>            "01"            "01"            "01"            "01"            "04"            "01" 
#> TCGA.X7.A8M0.01 TCGA.ZB.A96I.01 TCGA.ZB.A96F.01 TCGA.X7.A8DC.01 TCGA.X7.A8M5.01 TCGA.ZB.A966.01 
#>           "033"            "04"           "031"            "01"            "04"            "04" 
#> TCGA.XU.A92V.01 TCGA.YT.A95H.01 TCGA.ZC.AAAA.01 TCGA.XU.A92R.01 TCGA.YT.A95G.01 TCGA.XU.A933.01 
#>            "04"            "01"            "01"            "01"            "01"            "04" 
#> TCGA.XU.A92U.01 TCGA.3Q.A9WF.01 TCGA.XU.AAXV.01 TCGA.X7.A8D8.01 TCGA.ZB.A96L.01 TCGA.XU.AAXW.01 
#>            "01"            "01"            "01"           "032"            "02"            "01" 
#> TCGA.4V.A9QW.01 TCGA.XU.AAXZ.01 TCGA.X7.A8DB.01 TCGA.ZB.A96O.01 TCGA.ZB.A96H.01 TCGA.4V.A9QM.01 
#>            "01"            "01"            "01"            "01"            "02"           "032" 
#> TCGA.XU.AAY1.01 TCGA.4V.A9QS.01 TCGA.XU.A92T.01 TCGA.X7.A8M6.01 TCGA.3G.AB0T.01 TCGA.ZC.AAA7.01 
#>            "01"            "01"            "02"            "01"            "01"            "04" 
#> TCGA.4X.A9F9.01 TCGA.XU.A92Y.01 TCGA.ZB.A96B.01 TCGA.3G.AB19.01 TCGA.XM.AAZ3.01 TCGA.X7.A8M3.01 
#>            "01"            "01"            "01"            "02"            "02"            "04" 
#> TCGA.ZB.A964.01 TCGA.5U.AB0E.01 TCGA.XU.A92Q.01 TCGA.ZB.A96P.01 TCGA.ZB.A96E.01 TCGA.ZB.A963.01 
#>            "02"           "031"            "02"            "01"           "032"            "01"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 10559))
#> TCGA.3S.A8YW.01 TCGA.ZB.A96K.01 TCGA.XU.A930.01 TCGA.ZB.A965.01 TCGA.4V.A9QN.01 TCGA.ZB.A96G.01 
#>            "04"           "032"           "031"            "02"            "04"            "01" 
#> TCGA.XM.A8R8.01 TCGA.XU.AAXX.01 TCGA.ZT.A8OM.01 TCGA.3S.AAYX.01 TCGA.ZB.A96M.01 TCGA.XU.A936.01 
#>            "01"            "01"            "01"            "01"           "033"            "04" 
#> TCGA.5U.AB0F.01 TCGA.X7.A8DJ.01 TCGA.ZB.A96D.01 TCGA.ZB.A96Q.01 TCGA.X7.A8DG.01 TCGA.X7.A8D9.01 
#>            "01"            "01"            "01"           "032"            "01"           "033" 
#> TCGA.5V.A9RR.01 TCGA.4V.A9QI.01 TCGA.ZB.A96C.01 TCGA.4V.A9QX.01 TCGA.XU.A931.01 TCGA.ZB.A961.01 
#>           "032"            "01"            "02"            "01"            "04"           "031" 
#> TCGA.4X.A9FB.01 TCGA.YT.A95E.01 TCGA.X7.A8D7.01 TCGA.4V.A9QQ.01 TCGA.ZB.A969.01 TCGA.X7.A8M4.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.XM.A8RC.01 TCGA.4V.A9QJ.01 TCGA.XM.AAZ2.01 TCGA.X7.A8M1.01 TCGA.XM.A8RG.01 TCGA.4X.A9FD.01 
#>           "031"            "01"            "02"           "032"            "02"           "034" 
#> TCGA.X7.A8D6.01 TCGA.ZC.AAAF.01 TCGA.3G.AB0Q.01 TCGA.4X.A9FA.01 TCGA.5K.AAAP.01 TCGA.XM.A8RF.01 
#>            "01"            "01"            "02"            "02"           "032"            "02" 
#> TCGA.4X.A9FC.01 TCGA.3T.AA9L.01 TCGA.XU.A92W.01 TCGA.X7.A8DI.01 TCGA.ZL.A9V6.01 TCGA.XU.AAXY.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.4V.A9QU.01 TCGA.X7.A8DF.01 TCGA.XU.A932.01 TCGA.XU.A92Z.01 TCGA.3G.AB0O.01 TCGA.XU.A92X.01 
#>            "01"            "01"            "01"            "04"            "01"           "031" 
#> TCGA.XU.A92O.01 TCGA.5G.A9ZZ.01 TCGA.X7.A8M7.01 TCGA.XM.A8R9.01 TCGA.XM.AAZ1.01 TCGA.X7.A8DE.01 
#>            "02"           "034"            "01"            "01"            "01"            "01" 
#> TCGA.X7.A8D7.11 TCGA.ZB.A962.01 TCGA.YT.A95D.01 TCGA.X7.A8M8.01 TCGA.X7.A8D6.11 TCGA.4V.A9QT.01 
#>            "01"            "02"            "02"            "01"            "01"            "01" 
#> TCGA.3G.AB14.01 TCGA.5U.AB0D.01 TCGA.YT.A95F.01 TCGA.XM.A8RL.01 TCGA.4V.A9QR.01 TCGA.XM.A8RI.01 
#>           "031"            "04"           "033"            "01"           "034"           "031" 
#> TCGA.XM.A8RE.01 TCGA.XM.A8RH.01 TCGA.ZC.AAAH.01 TCGA.XH.A853.01 TCGA.X7.A8DD.01 TCGA.4V.A9QL.01 
#>            "01"            "01"            "01"            "01"            "01"           "033" 
#> TCGA.ZB.A96A.01 TCGA.XU.AAY0.01 TCGA.XM.A8RB.01 TCGA.ZB.A96R.01 TCGA.ZB.A96V.01 TCGA.XM.A8RD.01 
#>            "01"            "01"            "01"            "01"            "04"            "01" 
#> TCGA.X7.A8M0.01 TCGA.ZB.A96I.01 TCGA.ZB.A96F.01 TCGA.X7.A8DC.01 TCGA.X7.A8M5.01 TCGA.ZB.A966.01 
#>           "033"            "04"           "031"            "01"            "04"            "04" 
#> TCGA.XU.A92V.01 TCGA.YT.A95H.01 TCGA.ZC.AAAA.01 TCGA.XU.A92R.01 TCGA.YT.A95G.01 TCGA.XU.A933.01 
#>            "04"            "01"            "01"            "01"            "01"            "04" 
#> TCGA.XU.A92U.01 TCGA.3Q.A9WF.01 TCGA.XU.AAXV.01 TCGA.X7.A8D8.01 TCGA.ZB.A96L.01 TCGA.XU.AAXW.01 
#>            "01"            "01"            "01"           "032"            "02"            "01" 
#> TCGA.4V.A9QW.01 TCGA.XU.AAXZ.01 TCGA.X7.A8DB.01 TCGA.ZB.A96O.01 TCGA.ZB.A96H.01 TCGA.4V.A9QM.01 
#>            "01"            "01"            "01"            "01"            "02"           "032" 
#> TCGA.XU.AAY1.01 TCGA.4V.A9QS.01 TCGA.XU.A92T.01 TCGA.X7.A8M6.01 TCGA.3G.AB0T.01 TCGA.ZC.AAA7.01 
#>            "01"            "01"            "02"            "01"            "01"            "04" 
#> TCGA.4X.A9F9.01 TCGA.XU.A92Y.01 TCGA.ZB.A96B.01 TCGA.3G.AB19.01 TCGA.XM.AAZ3.01 TCGA.X7.A8M3.01 
#>            "01"            "01"            "01"            "02"            "02"            "04" 
#> TCGA.ZB.A964.01 TCGA.5U.AB0E.01 TCGA.XU.A92Q.01 TCGA.ZB.A96P.01 TCGA.ZB.A96E.01 TCGA.ZB.A963.01 
#>            "02"           "031"            "02"            "01"           "032"            "01"

show/hide code output

get_classes(res_rh, merge_node = merge_node_param(min_n_signatures = 54876))
#> TCGA.3S.A8YW.01 TCGA.ZB.A96K.01 TCGA.XU.A930.01 TCGA.ZB.A965.01 TCGA.4V.A9QN.01 TCGA.ZB.A96G.01 
#>            "04"            "03"            "03"            "02"            "04"            "01" 
#> TCGA.XM.A8R8.01 TCGA.XU.AAXX.01 TCGA.ZT.A8OM.01 TCGA.3S.AAYX.01 TCGA.ZB.A96M.01 TCGA.XU.A936.01 
#>            "01"            "01"            "01"            "01"            "03"            "04" 
#> TCGA.5U.AB0F.01 TCGA.X7.A8DJ.01 TCGA.ZB.A96D.01 TCGA.ZB.A96Q.01 TCGA.X7.A8DG.01 TCGA.X7.A8D9.01 
#>            "01"            "01"            "01"            "03"            "01"            "03" 
#> TCGA.5V.A9RR.01 TCGA.4V.A9QI.01 TCGA.ZB.A96C.01 TCGA.4V.A9QX.01 TCGA.XU.A931.01 TCGA.ZB.A961.01 
#>            "03"            "01"            "02"            "01"            "04"            "03" 
#> TCGA.4X.A9FB.01 TCGA.YT.A95E.01 TCGA.X7.A8D7.01 TCGA.4V.A9QQ.01 TCGA.ZB.A969.01 TCGA.X7.A8M4.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.XM.A8RC.01 TCGA.4V.A9QJ.01 TCGA.XM.AAZ2.01 TCGA.X7.A8M1.01 TCGA.XM.A8RG.01 TCGA.4X.A9FD.01 
#>            "03"            "01"            "02"            "03"            "02"            "03" 
#> TCGA.X7.A8D6.01 TCGA.ZC.AAAF.01 TCGA.3G.AB0Q.01 TCGA.4X.A9FA.01 TCGA.5K.AAAP.01 TCGA.XM.A8RF.01 
#>            "01"            "01"            "02"            "02"            "03"            "02" 
#> TCGA.4X.A9FC.01 TCGA.3T.AA9L.01 TCGA.XU.A92W.01 TCGA.X7.A8DI.01 TCGA.ZL.A9V6.01 TCGA.XU.AAXY.01 
#>            "01"            "01"            "01"            "01"            "02"            "01" 
#> TCGA.4V.A9QU.01 TCGA.X7.A8DF.01 TCGA.XU.A932.01 TCGA.XU.A92Z.01 TCGA.3G.AB0O.01 TCGA.XU.A92X.01 
#>            "01"            "01"            "01"            "04"            "01"            "03" 
#> TCGA.XU.A92O.01 TCGA.5G.A9ZZ.01 TCGA.X7.A8M7.01 TCGA.XM.A8R9.01 TCGA.XM.AAZ1.01 TCGA.X7.A8DE.01 
#>            "02"            "03"            "01"            "01"            "01"            "01" 
#> TCGA.X7.A8D7.11 TCGA.ZB.A962.01 TCGA.YT.A95D.01 TCGA.X7.A8M8.01 TCGA.X7.A8D6.11 TCGA.4V.A9QT.01 
#>            "01"            "02"            "02"            "01"            "01"            "01" 
#> TCGA.3G.AB14.01 TCGA.5U.AB0D.01 TCGA.YT.A95F.01 TCGA.XM.A8RL.01 TCGA.4V.A9QR.01 TCGA.XM.A8RI.01 
#>            "03"            "04"            "03"            "01"            "03"            "03" 
#> TCGA.XM.A8RE.01 TCGA.XM.A8RH.01 TCGA.ZC.AAAH.01 TCGA.XH.A853.01 TCGA.X7.A8DD.01 TCGA.4V.A9QL.01 
#>            "01"            "01"            "01"            "01"            "01"            "03" 
#> TCGA.ZB.A96A.01 TCGA.XU.AAY0.01 TCGA.XM.A8RB.01 TCGA.ZB.A96R.01 TCGA.ZB.A96V.01 TCGA.XM.A8RD.01 
#>            "01"            "01"            "01"            "01"            "04"            "01" 
#> TCGA.X7.A8M0.01 TCGA.ZB.A96I.01 TCGA.ZB.A96F.01 TCGA.X7.A8DC.01 TCGA.X7.A8M5.01 TCGA.ZB.A966.01 
#>            "03"            "04"            "03"            "01"            "04"            "04" 
#> TCGA.XU.A92V.01 TCGA.YT.A95H.01 TCGA.ZC.AAAA.01 TCGA.XU.A92R.01 TCGA.YT.A95G.01 TCGA.XU.A933.01 
#>            "04"            "01"            "01"            "01"            "01"            "04" 
#> TCGA.XU.A92U.01 TCGA.3Q.A9WF.01 TCGA.XU.AAXV.01 TCGA.X7.A8D8.01 TCGA.ZB.A96L.01 TCGA.XU.AAXW.01 
#>            "01"            "01"            "01"            "03"            "02"            "01" 
#> TCGA.4V.A9QW.01 TCGA.XU.AAXZ.01 TCGA.X7.A8DB.01 TCGA.ZB.A96O.01 TCGA.ZB.A96H.01 TCGA.4V.A9QM.01 
#>            "01"            "01"            "01"            "01"            "02"            "03" 
#> TCGA.XU.AAY1.01 TCGA.4V.A9QS.01 TCGA.XU.A92T.01 TCGA.X7.A8M6.01 TCGA.3G.AB0T.01 TCGA.ZC.AAA7.01 
#>            "01"            "01"            "02"            "01"            "01"            "04" 
#> TCGA.4X.A9F9.01 TCGA.XU.A92Y.01 TCGA.ZB.A96B.01 TCGA.3G.AB19.01 TCGA.XM.AAZ3.01 TCGA.X7.A8M3.01 
#>            "01"            "01"            "01"            "02"            "02"            "04" 
#> TCGA.ZB.A964.01 TCGA.5U.AB0E.01 TCGA.XU.A92Q.01 TCGA.ZB.A96P.01 TCGA.ZB.A96E.01 TCGA.ZB.A963.01 
#>            "02"            "03"            "02"            "01"            "03"            "01"

Top rows heatmap

Heatmaps of the top rows:

top_rows_heatmap(res_rh)

plot of chunk top-rows-heatmap

#> Error in h(simpleError(msg, call)) : 
#>   error in evaluating the argument 'object' in selecting a method for function 'draw': no applicable method for 'height' applied to an object of class "list"

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 = 3265),
    method = "UMAP", top_value_method = "SD", top_n = 40000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 3265),
    method = "UMAP", top_value_method = "ATC", top_n = 40000, 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 = 4048),
    method = "UMAP", top_value_method = "SD", top_n = 40000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 4048),
    method = "UMAP", top_value_method = "ATC", top_n = 40000, 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 = 7591),
    method = "UMAP", top_value_method = "SD", top_n = 40000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 7591),
    method = "UMAP", top_value_method = "ATC", top_n = 40000, 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 = 8310),
    method = "UMAP", top_value_method = "SD", top_n = 40000, scale_rows = FALSE)
dimension_reduction(res_rh, merge_node = merge_node_param(min_n_signatures = 8310),
    method = "UMAP", top_value_method = "ATC", top_n = 40000, scale_rows = TRUE)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

Results for each node


Node0

Child nodes: Node01 , Node02 , Node03 , Node04 .

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, 5, 6, 7, 8.
#>   On a matrix with 30000 rows and 126 columns.
#>   Top rows (1000) are extracted by 'SD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 350 partitions by row resampling.
#>   Best k for subgroups seems to be 5.
#> 
#> 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.988       0.996         0.3939 0.610   0.610
#> 3 3 1.000           0.956       0.982         0.4981 0.745   0.600
#> 4 4 1.000           0.984       0.994         0.0789 0.934   0.844
#> 5 5 0.987           0.950       0.962         0.0448 0.949   0.865
#> 6 6 0.797           0.926       0.876         0.1453 0.847   0.557
#> 7 7 0.732           0.807       0.850         0.0407 0.984   0.920
#> 8 8 0.708           0.727       0.806         0.0219 0.985   0.919

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3 4

There is also optional best \(k\) = 2 3 4 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
#> TCGA.3S.A8YW.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A96K.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A930.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A965.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4V.A9QN.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A96G.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8R8.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.AAXX.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZT.A8OM.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3S.AAYX.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96M.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A936.01     1   1.000    -0.0018 0.50 0.50
#> TCGA.5U.AB0F.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DJ.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96D.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96Q.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DG.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8D9.01     1   0.000     0.9945 1.00 0.00
#> TCGA.5V.A9RR.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4V.A9QI.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96C.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4V.A9QX.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A931.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A961.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4X.A9FB.01     1   0.000     0.9945 1.00 0.00
#> TCGA.YT.A95E.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8D7.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QQ.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A969.01     2   0.000     0.9994 0.00 1.00
#> TCGA.X7.A8M4.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RC.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QJ.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.AAZ2.01     2   0.000     0.9994 0.00 1.00
#> TCGA.X7.A8M1.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RG.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4X.A9FD.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8D6.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZC.AAAF.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3G.AB0Q.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4X.A9FA.01     2   0.000     0.9994 0.00 1.00
#> TCGA.5K.AAAP.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RF.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4X.A9FC.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3T.AA9L.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92W.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DI.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZL.A9V6.01     2   0.000     0.9994 0.00 1.00
#> TCGA.XU.AAXY.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QU.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DF.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A932.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92Z.01     2   0.000     0.9994 0.00 1.00
#> TCGA.3G.AB0O.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92X.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92O.01     2   0.000     0.9994 0.00 1.00
#> TCGA.5G.A9ZZ.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8M7.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8R9.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.AAZ1.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DE.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8D7.11     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A962.01     2   0.000     0.9994 0.00 1.00
#> TCGA.YT.A95D.01     2   0.000     0.9994 0.00 1.00
#> TCGA.X7.A8M8.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8D6.11     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QT.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3G.AB14.01     1   0.000     0.9945 1.00 0.00
#> TCGA.5U.AB0D.01     2   0.000     0.9994 0.00 1.00
#> TCGA.YT.A95F.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RL.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QR.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RI.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RE.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RH.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZC.AAAH.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XH.A853.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DD.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QL.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96A.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.AAY0.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RB.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96R.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96V.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XM.A8RD.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8M0.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96I.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A96F.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DC.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8M5.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A966.01     2   0.141     0.9794 0.02 0.98
#> TCGA.XU.A92V.01     2   0.000     0.9994 0.00 1.00
#> TCGA.YT.A95H.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZC.AAAA.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92R.01     1   0.000     0.9945 1.00 0.00
#> TCGA.YT.A95G.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A933.01     2   0.000     0.9994 0.00 1.00
#> TCGA.XU.A92U.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3Q.A9WF.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.AAXV.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8D8.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A96L.01     2   0.000     0.9994 0.00 1.00
#> TCGA.XU.AAXW.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QW.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.AAXZ.01     1   0.000     0.9945 1.00 0.00
#> TCGA.X7.A8DB.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96O.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96H.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4V.A9QM.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.AAY1.01     1   0.000     0.9945 1.00 0.00
#> TCGA.4V.A9QS.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92T.01     2   0.000     0.9994 0.00 1.00
#> TCGA.X7.A8M6.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3G.AB0T.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZC.AAA7.01     2   0.000     0.9994 0.00 1.00
#> TCGA.4X.A9F9.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92Y.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96B.01     1   0.000     0.9945 1.00 0.00
#> TCGA.3G.AB19.01     2   0.000     0.9994 0.00 1.00
#> TCGA.XM.AAZ3.01     2   0.000     0.9994 0.00 1.00
#> TCGA.X7.A8M3.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A964.01     2   0.000     0.9994 0.00 1.00
#> TCGA.5U.AB0E.01     1   0.000     0.9945 1.00 0.00
#> TCGA.XU.A92Q.01     2   0.000     0.9994 0.00 1.00
#> TCGA.ZB.A96P.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A96E.01     1   0.000     0.9945 1.00 0.00
#> TCGA.ZB.A963.01     1   0.000     0.9945 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
#> TCGA.3S.A8YW.01     2  0.1529      0.925 0.00 0.96 0.04
#> TCGA.ZB.A96K.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XU.A930.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.ZB.A965.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.4V.A9QN.01     3  0.6192      0.291 0.00 0.42 0.58
#> TCGA.ZB.A96G.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.A8R8.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.AAXX.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZT.A8OM.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3S.AAYX.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96M.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XU.A936.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.5U.AB0F.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DJ.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96D.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96Q.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DG.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8D9.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.5V.A9RR.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.4V.A9QI.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96C.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.4V.A9QX.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A931.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.ZB.A961.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.4X.A9FB.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.YT.A95E.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8D7.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.4V.A9QQ.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A969.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.X7.A8M4.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.A8RC.01     1  0.2537      0.913 0.92 0.00 0.08
#> TCGA.4V.A9QJ.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.AAZ2.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.X7.A8M1.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XM.A8RG.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.4X.A9FD.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.X7.A8D6.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZC.AAAF.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3G.AB0Q.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.4X.A9FA.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.5K.AAAP.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XM.A8RF.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.4X.A9FC.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3T.AA9L.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A92W.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DI.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZL.A9V6.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.XU.AAXY.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.4V.A9QU.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DF.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A932.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A92Z.01     3  0.5560      0.579 0.00 0.30 0.70
#> TCGA.3G.AB0O.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A92X.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XU.A92O.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.5G.A9ZZ.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.X7.A8M7.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.A8R9.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.AAZ1.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DE.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8D7.11     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A962.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.YT.A95D.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.X7.A8M8.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8D6.11     1  0.0892      0.978 0.98 0.00 0.02
#> TCGA.4V.A9QT.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3G.AB14.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.5U.AB0D.01     2  0.5706      0.499 0.00 0.68 0.32
#> TCGA.YT.A95F.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XM.A8RL.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.4V.A9QR.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XM.A8RI.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XM.A8RE.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.A8RH.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZC.AAAH.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XH.A853.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DD.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.4V.A9QL.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.ZB.A96A.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.AAY0.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XM.A8RB.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96R.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96V.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XM.A8RD.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8M0.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.ZB.A96I.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.ZB.A96F.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.X7.A8DC.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8M5.01     3  0.5948      0.453 0.00 0.36 0.64
#> TCGA.ZB.A966.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XU.A92V.01     2  0.6126      0.292 0.00 0.60 0.40
#> TCGA.YT.A95H.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZC.AAAA.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A92R.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.YT.A95G.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A933.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.XU.A92U.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3Q.A9WF.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.AAXV.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8D8.01     3  0.4291      0.769 0.00 0.18 0.82
#> TCGA.ZB.A96L.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.XU.AAXW.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.4V.A9QW.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.AAXZ.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.X7.A8DB.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96O.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96H.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.4V.A9QM.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XU.AAY1.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.4V.A9QS.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A92T.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.X7.A8M6.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3G.AB0T.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZC.AAA7.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.4X.A9F9.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.XU.A92Y.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96B.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.3G.AB19.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.XM.AAZ3.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.X7.A8M3.01     3  0.2959      0.862 0.00 0.10 0.90
#> TCGA.ZB.A964.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.5U.AB0E.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.XU.A92Q.01     2  0.0000      0.962 0.00 1.00 0.00
#> TCGA.ZB.A96P.01     1  0.0000      0.999 1.00 0.00 0.00
#> TCGA.ZB.A96E.01     3  0.0000      0.953 0.00 0.00 1.00
#> TCGA.ZB.A963.01     1  0.0000      0.999 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
#> TCGA.3S.A8YW.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.ZB.A96K.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XU.A930.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.ZB.A965.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4V.A9QN.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.ZB.A96G.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.A8R8.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.AAXX.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZT.A8OM.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3S.AAYX.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96M.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XU.A936.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.5U.AB0F.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8DJ.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96D.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96Q.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.X7.A8DG.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8D9.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.5V.A9RR.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.4V.A9QI.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96C.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4V.A9QX.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A931.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.ZB.A961.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.4X.A9FB.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.YT.A95E.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8D7.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.4V.A9QQ.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A969.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.X7.A8M4.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.A8RC.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.4V.A9QJ.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.AAZ2.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.X7.A8M1.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XM.A8RG.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4X.A9FD.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.X7.A8D6.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZC.AAAF.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3G.AB0Q.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4X.A9FA.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.5K.AAAP.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XM.A8RF.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4X.A9FC.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3T.AA9L.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A92W.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8DI.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZL.A9V6.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.XU.AAXY.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.4V.A9QU.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8DF.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A932.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A92Z.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.3G.AB0O.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A92X.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XU.A92O.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.5G.A9ZZ.01     3  0.4713      0.440 0.00  0 0.64 0.36
#> TCGA.X7.A8M7.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.A8R9.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.AAZ1.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8DE.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8D7.11     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A962.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.YT.A95D.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.X7.A8M8.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8D6.11     1  0.4790      0.383 0.62  0 0.38 0.00
#> TCGA.4V.A9QT.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3G.AB14.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.5U.AB0D.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.YT.A95F.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XM.A8RL.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.4V.A9QR.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XM.A8RI.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XM.A8RE.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.A8RH.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZC.AAAH.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XH.A853.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8DD.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.4V.A9QL.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.ZB.A96A.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.AAY0.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XM.A8RB.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96R.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96V.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.XM.A8RD.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8M0.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.ZB.A96I.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.ZB.A96F.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.X7.A8DC.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8M5.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.ZB.A966.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.XU.A92V.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.YT.A95H.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZC.AAAA.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A92R.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.YT.A95G.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A933.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.XU.A92U.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3Q.A9WF.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.AAXV.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8D8.01     3  0.0707      0.965 0.00  0 0.98 0.02
#> TCGA.ZB.A96L.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.XU.AAXW.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.4V.A9QW.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.AAXZ.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.X7.A8DB.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96O.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96H.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4V.A9QM.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XU.AAY1.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.4V.A9QS.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A92T.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.X7.A8M6.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3G.AB0T.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZC.AAA7.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.4X.A9F9.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.XU.A92Y.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96B.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.3G.AB19.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.XM.AAZ3.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.X7.A8M3.01     4  0.0000      1.000 0.00  0 0.00 1.00
#> TCGA.ZB.A964.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.5U.AB0E.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.ZB.A96P.01     1  0.0000      0.994 1.00  0 0.00 0.00
#> TCGA.ZB.A96E.01     3  0.0000      0.983 0.00  0 1.00 0.00
#> TCGA.ZB.A963.01     1  0.0000      0.994 1.00  0 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>                 class entropy silhouette   p1   p2   p3   p4   p5
#> TCGA.3S.A8YW.01     4  0.0000      0.969 0.00 0.00 0.00 1.00 0.00
#> TCGA.ZB.A96K.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.XU.A930.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A965.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QN.01     4  0.1043      0.967 0.00 0.00 0.00 0.96 0.04
#> TCGA.ZB.A96G.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XM.A8R8.01     3  0.4287      0.204 0.46 0.00 0.54 0.00 0.00
#> TCGA.XU.AAXX.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZT.A8OM.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.3S.AAYX.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96M.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.XU.A936.01     4  0.0000      0.969 0.00 0.00 0.00 1.00 0.00
#> TCGA.5U.AB0F.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DJ.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.ZB.A96D.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96Q.01     1  0.5050      0.602 0.70 0.00 0.12 0.00 0.18
#> TCGA.X7.A8DG.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8D9.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.5V.A9RR.01     5  0.1732      0.940 0.00 0.00 0.08 0.00 0.92
#> TCGA.4V.A9QI.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.ZB.A96C.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QX.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A931.01     4  0.1043      0.967 0.00 0.00 0.00 0.96 0.04
#> TCGA.ZB.A961.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.4X.A9FB.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.YT.A95E.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8D7.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QQ.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A969.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8M4.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XM.A8RC.01     3  0.0609      0.889 0.00 0.00 0.98 0.00 0.02
#> TCGA.4V.A9QJ.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XM.AAZ2.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8M1.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.XM.A8RG.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.4X.A9FD.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.X7.A8D6.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZC.AAAF.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.3G.AB0Q.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.4X.A9FA.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.5K.AAAP.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.XM.A8RF.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.4X.A9FC.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.3T.AA9L.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92W.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8DI.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZL.A9V6.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.AAXY.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.4V.A9QU.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DF.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.A932.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.A92Z.01     4  0.1410      0.958 0.00 0.00 0.00 0.94 0.06
#> TCGA.3G.AB0O.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.A92X.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.XU.A92O.01     2  0.0609      0.983 0.00 0.98 0.00 0.00 0.02
#> TCGA.5G.A9ZZ.01     3  0.1410      0.858 0.00 0.00 0.94 0.06 0.00
#> TCGA.X7.A8M7.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XM.A8R9.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.AAZ1.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8DE.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D7.11     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A962.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.YT.A95D.01     2  0.0609      0.983 0.00 0.98 0.00 0.00 0.02
#> TCGA.X7.A8M8.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8D6.11     3  0.1410      0.839 0.06 0.00 0.94 0.00 0.00
#> TCGA.4V.A9QT.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.3G.AB14.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.5U.AB0D.01     4  0.0000      0.969 0.00 0.00 0.00 1.00 0.00
#> TCGA.YT.A95F.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.XM.A8RL.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.4V.A9QR.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RI.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RE.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RH.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZC.AAAH.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XH.A853.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8DD.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QL.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.ZB.A96A.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.AAY0.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RB.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96R.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.ZB.A96V.01     4  0.2516      0.827 0.00 0.00 0.14 0.86 0.00
#> TCGA.XM.A8RD.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M0.01     3  0.1732      0.827 0.00 0.00 0.92 0.00 0.08
#> TCGA.ZB.A96I.01     4  0.1043      0.967 0.00 0.00 0.00 0.96 0.04
#> TCGA.ZB.A96F.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.X7.A8DC.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8M5.01     4  0.1410      0.958 0.00 0.00 0.00 0.94 0.06
#> TCGA.ZB.A966.01     4  0.0000      0.969 0.00 0.00 0.00 1.00 0.00
#> TCGA.XU.A92V.01     5  0.2929      0.703 0.00 0.00 0.00 0.18 0.82
#> TCGA.YT.A95H.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.ZC.AAAA.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.A92R.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.YT.A95G.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A933.01     4  0.0000      0.969 0.00 0.00 0.00 1.00 0.00
#> TCGA.XU.A92U.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.3Q.A9WF.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.AAXV.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D8.01     5  0.1732      0.940 0.00 0.00 0.08 0.00 0.92
#> TCGA.ZB.A96L.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.AAXW.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QW.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.XU.AAXZ.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.X7.A8DB.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96O.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96H.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QM.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.XU.AAY1.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QS.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92T.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8M6.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.3G.AB0T.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.ZC.AAA7.01     4  0.0000      0.969 0.00 0.00 0.00 1.00 0.00
#> TCGA.4X.A9F9.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Y.01     1  0.0000      0.966 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96B.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.3G.AB19.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.AAZ3.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8M3.01     4  0.1043      0.967 0.00 0.00 0.00 0.96 0.04
#> TCGA.ZB.A964.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.5U.AB0E.01     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000      0.998 0.00 1.00 0.00 0.00 0.00
#> TCGA.ZB.A96P.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06
#> TCGA.ZB.A96E.01     5  0.2280      0.967 0.00 0.00 0.12 0.00 0.88
#> TCGA.ZB.A963.01     1  0.1410      0.966 0.94 0.00 0.00 0.00 0.06

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6
#> TCGA.3S.A8YW.01     4  0.0547      0.913 0.00 0.00 0.00 0.98 0.00 0.02
#> TCGA.ZB.A96K.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XU.A930.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.ZB.A965.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QN.01     4  0.2631      0.894 0.00 0.00 0.00 0.82 0.00 0.18
#> TCGA.ZB.A96G.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8R8.01     6  0.4723      0.743 0.18 0.00 0.14 0.00 0.00 0.68
#> TCGA.XU.AAXX.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZT.A8OM.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.3S.AAYX.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZB.A96M.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XU.A936.01     4  0.1267      0.903 0.00 0.00 0.00 0.94 0.00 0.06
#> TCGA.5U.AB0F.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.X7.A8DJ.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.ZB.A96D.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.ZB.A96Q.01     1  0.5331      0.442 0.62 0.00 0.02 0.00 0.26 0.10
#> TCGA.X7.A8DG.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D9.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.5V.A9RR.01     5  0.0547      0.946 0.00 0.00 0.00 0.00 0.98 0.02
#> TCGA.4V.A9QI.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96C.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QX.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.XU.A931.01     4  0.2631      0.894 0.00 0.00 0.00 0.82 0.00 0.18
#> TCGA.ZB.A961.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.4X.A9FB.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.YT.A95E.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.X7.A8D7.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.4V.A9QQ.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZB.A969.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M4.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.XM.A8RC.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QJ.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.XM.AAZ2.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M1.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XM.A8RG.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FD.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8D6.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZC.AAAF.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.3G.AB0Q.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FA.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.5K.AAAP.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XM.A8RF.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FC.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.3T.AA9L.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.XU.A92W.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DI.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.ZL.A9V6.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.AAXY.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QU.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.X7.A8DF.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.XU.A932.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Z.01     4  0.1814      0.910 0.00 0.00 0.00 0.90 0.00 0.10
#> TCGA.3G.AB0O.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92X.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     2  0.1480      0.950 0.00 0.94 0.00 0.00 0.02 0.04
#> TCGA.5G.A9ZZ.01     3  0.1807      0.913 0.00 0.00 0.92 0.02 0.00 0.06
#> TCGA.X7.A8M7.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8R9.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.XM.AAZ1.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.X7.A8DE.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.X7.A8D7.11     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZB.A962.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.YT.A95D.01     2  0.1480      0.950 0.00 0.94 0.00 0.00 0.02 0.04
#> TCGA.X7.A8M8.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D6.11     3  0.1556      0.880 0.00 0.00 0.92 0.00 0.00 0.08
#> TCGA.4V.A9QT.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.3G.AB14.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.5U.AB0D.01     4  0.0547      0.913 0.00 0.00 0.00 0.98 0.00 0.02
#> TCGA.YT.A95F.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XM.A8RL.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QR.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RI.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RE.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.XM.A8RH.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZC.AAAH.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XH.A853.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DD.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.4V.A9QL.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.ZB.A96A.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.XU.AAY0.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.XM.A8RB.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZB.A96R.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96V.01     4  0.1807      0.894 0.00 0.00 0.02 0.92 0.00 0.06
#> TCGA.XM.A8RD.01     6  0.3499      0.921 0.32 0.00 0.00 0.00 0.00 0.68
#> TCGA.X7.A8M0.01     3  0.3829      0.733 0.00 0.00 0.76 0.00 0.18 0.06
#> TCGA.ZB.A96I.01     4  0.2631      0.894 0.00 0.00 0.00 0.82 0.00 0.18
#> TCGA.ZB.A96F.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8DC.01     1  0.0937      0.921 0.96 0.00 0.00 0.00 0.00 0.04
#> TCGA.X7.A8M5.01     4  0.3523      0.865 0.00 0.00 0.00 0.78 0.04 0.18
#> TCGA.ZB.A966.01     4  0.1267      0.903 0.00 0.00 0.00 0.94 0.00 0.06
#> TCGA.XU.A92V.01     5  0.4094      0.706 0.00 0.00 0.00 0.08 0.74 0.18
#> TCGA.YT.A95H.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.ZC.AAAA.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.XU.A92R.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.YT.A95G.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.XU.A933.01     4  0.0547      0.913 0.00 0.00 0.00 0.98 0.00 0.02
#> TCGA.XU.A92U.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.3Q.A9WF.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.AAXV.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.X7.A8D8.01     5  0.0937      0.934 0.00 0.00 0.00 0.00 0.96 0.04
#> TCGA.ZB.A96L.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.AAXW.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.4V.A9QW.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.XU.AAXZ.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.X7.A8DB.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZB.A96O.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.ZB.A96H.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QM.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XU.AAY1.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.4V.A9QS.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.XU.A92T.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M6.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.3G.AB0T.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08
#> TCGA.ZC.AAA7.01     4  0.1267      0.903 0.00 0.00 0.00 0.94 0.00 0.06
#> TCGA.4X.A9F9.01     6  0.3756      0.911 0.40 0.00 0.00 0.00 0.00 0.60
#> TCGA.XU.A92Y.01     6  0.3409      0.922 0.30 0.00 0.00 0.00 0.00 0.70
#> TCGA.ZB.A96B.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.3G.AB19.01     2  0.0547      0.980 0.00 0.98 0.00 0.00 0.00 0.02
#> TCGA.XM.AAZ3.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M3.01     4  0.2631      0.894 0.00 0.00 0.00 0.82 0.00 0.18
#> TCGA.ZB.A964.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.5U.AB0E.01     3  0.0000      0.967 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000      0.993 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96P.01     1  0.0000      0.927 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96E.01     5  0.0547      0.969 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.ZB.A963.01     1  0.1556      0.911 0.92 0.00 0.00 0.00 0.00 0.08

show/hide code output

cbind(get_classes(res, k = 7), get_membership(res, k = 7))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7
#> TCGA.3S.A8YW.01     4  0.4451     0.4181 0.00 0.00 0.00 0.64 0.00 0.10 0.26
#> TCGA.ZB.A96K.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.XU.A930.01     3  0.0504     0.9020 0.00 0.00 0.98 0.02 0.00 0.00 0.00
#> TCGA.ZB.A965.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QN.01     7  0.3294     0.6215 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.ZB.A96G.01     1  0.0000     0.9063 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8R8.01     6  0.4507     0.7158 0.08 0.00 0.04 0.06 0.00 0.76 0.06
#> TCGA.XU.AAXX.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZT.A8OM.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.3S.AAYX.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZB.A96M.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.XU.A936.01     4  0.0863     0.6984 0.00 0.00 0.04 0.96 0.00 0.00 0.00
#> TCGA.5U.AB0F.01     6  0.3199     0.8125 0.14 0.00 0.00 0.00 0.00 0.80 0.06
#> TCGA.X7.A8DJ.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.ZB.A96D.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.ZB.A96Q.01     5  0.5686     0.4162 0.18 0.00 0.02 0.00 0.62 0.12 0.06
#> TCGA.X7.A8DG.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.X7.A8D9.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.5V.A9RR.01     5  0.2912     0.7008 0.00 0.00 0.00 0.00 0.82 0.04 0.14
#> TCGA.4V.A9QI.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.ZB.A96C.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QX.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.XU.A931.01     7  0.3294     0.6215 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.ZB.A961.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FB.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.YT.A95E.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.X7.A8D7.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.4V.A9QQ.01     6  0.4070     0.7892 0.30 0.00 0.00 0.02 0.00 0.66 0.02
#> TCGA.ZB.A969.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M4.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.XM.A8RC.01     3  0.0863     0.8715 0.04 0.00 0.96 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QJ.01     1  0.1928     0.8952 0.90 0.00 0.00 0.00 0.00 0.08 0.02
#> TCGA.XM.AAZ2.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M1.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.XM.A8RG.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FD.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D6.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZC.AAAF.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.3G.AB0Q.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FA.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5K.AAAP.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.XM.A8RF.01     2  0.0504     0.9467 0.00 0.98 0.00 0.00 0.00 0.00 0.02
#> TCGA.4X.A9FC.01     6  0.2081     0.8207 0.14 0.00 0.00 0.00 0.00 0.86 0.00
#> TCGA.3T.AA9L.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.XU.A92W.01     1  0.0000     0.9063 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DI.01     6  0.2081     0.8207 0.14 0.00 0.00 0.00 0.00 0.86 0.00
#> TCGA.ZL.A9V6.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.AAXY.01     1  0.0000     0.9063 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QU.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.X7.A8DF.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.XU.A932.01     1  0.0000     0.9063 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Z.01     7  0.5429     0.1605 0.00 0.00 0.00 0.40 0.02 0.12 0.46
#> TCGA.3G.AB0O.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.XU.A92X.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     2  0.3991     0.7033 0.00 0.72 0.00 0.00 0.02 0.04 0.22
#> TCGA.5G.A9ZZ.01     3  0.3294     0.5244 0.00 0.00 0.66 0.34 0.00 0.00 0.00
#> TCGA.X7.A8M7.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.XM.A8R9.01     6  0.3199     0.8125 0.14 0.00 0.00 0.00 0.00 0.80 0.06
#> TCGA.XM.AAZ1.01     1  0.2278     0.8843 0.88 0.00 0.00 0.00 0.00 0.08 0.04
#> TCGA.X7.A8DE.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.X7.A8D7.11     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZB.A962.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.YT.A95D.01     2  0.3991     0.7033 0.00 0.72 0.00 0.00 0.02 0.04 0.22
#> TCGA.X7.A8M8.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.X7.A8D6.11     3  0.4191     0.4606 0.00 0.00 0.64 0.00 0.00 0.30 0.06
#> TCGA.4V.A9QT.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.3G.AB14.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.5U.AB0D.01     4  0.4451     0.4181 0.00 0.00 0.00 0.64 0.00 0.10 0.26
#> TCGA.YT.A95F.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.XM.A8RL.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.4V.A9QR.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RI.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RE.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.XM.A8RH.01     6  0.4269     0.7710 0.36 0.00 0.00 0.02 0.00 0.60 0.02
#> TCGA.ZC.AAAH.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.XH.A853.01     1  0.1006     0.9063 0.96 0.00 0.00 0.00 0.00 0.02 0.02
#> TCGA.X7.A8DD.01     6  0.4269     0.7710 0.36 0.00 0.00 0.02 0.00 0.60 0.02
#> TCGA.4V.A9QL.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.ZB.A96A.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.XU.AAY0.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.XM.A8RB.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZB.A96R.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.ZB.A96V.01     4  0.0863     0.6984 0.00 0.00 0.04 0.96 0.00 0.00 0.00
#> TCGA.XM.A8RD.01     6  0.3052     0.8151 0.20 0.00 0.00 0.00 0.00 0.78 0.02
#> TCGA.X7.A8M0.01     5  0.5638     0.0221 0.00 0.00 0.32 0.32 0.36 0.00 0.00
#> TCGA.ZB.A96I.01     7  0.3294     0.6215 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.ZB.A96F.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DC.01     1  0.1664     0.9009 0.92 0.00 0.00 0.00 0.00 0.06 0.02
#> TCGA.X7.A8M5.01     7  0.4574     0.4631 0.00 0.00 0.00 0.12 0.10 0.06 0.72
#> TCGA.ZB.A966.01     4  0.0863     0.6984 0.00 0.00 0.04 0.96 0.00 0.00 0.00
#> TCGA.XU.A92V.01     7  0.4108     0.3391 0.00 0.00 0.00 0.00 0.28 0.06 0.66
#> TCGA.YT.A95H.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.ZC.AAAA.01     1  0.2016     0.8945 0.90 0.00 0.00 0.00 0.00 0.06 0.04
#> TCGA.XU.A92R.01     6  0.2912     0.8146 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.YT.A95G.01     6  0.3199     0.8125 0.14 0.00 0.00 0.00 0.00 0.80 0.06
#> TCGA.XU.A933.01     4  0.4451     0.4181 0.00 0.00 0.00 0.64 0.00 0.10 0.26
#> TCGA.XU.A92U.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.3Q.A9WF.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.XU.AAXV.01     6  0.3086     0.8204 0.16 0.00 0.00 0.00 0.00 0.80 0.04
#> TCGA.X7.A8D8.01     5  0.3519     0.6133 0.00 0.00 0.00 0.00 0.74 0.04 0.22
#> TCGA.ZB.A96L.01     2  0.0863     0.9340 0.00 0.96 0.00 0.00 0.00 0.00 0.04
#> TCGA.XU.AAXW.01     6  0.4269     0.7710 0.36 0.00 0.00 0.02 0.00 0.60 0.02
#> TCGA.4V.A9QW.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02
#> TCGA.XU.AAXZ.01     1  0.2016     0.8945 0.90 0.00 0.00 0.00 0.00 0.06 0.04
#> TCGA.X7.A8DB.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZB.A96O.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.ZB.A96H.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QM.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.XU.AAY1.01     6  0.2081     0.8207 0.14 0.00 0.00 0.00 0.00 0.86 0.00
#> TCGA.4V.A9QS.01     6  0.3086     0.8204 0.16 0.00 0.00 0.00 0.00 0.80 0.04
#> TCGA.XU.A92T.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M6.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.3G.AB0T.01     1  0.2016     0.8945 0.90 0.00 0.00 0.00 0.00 0.06 0.04
#> TCGA.ZC.AAA7.01     4  0.0863     0.6984 0.00 0.00 0.04 0.96 0.00 0.00 0.00
#> TCGA.4X.A9F9.01     6  0.4317     0.7594 0.38 0.00 0.00 0.02 0.00 0.58 0.02
#> TCGA.XU.A92Y.01     6  0.2912     0.8175 0.14 0.00 0.00 0.00 0.00 0.82 0.04
#> TCGA.ZB.A96B.01     1  0.0504     0.9065 0.98 0.00 0.00 0.00 0.00 0.00 0.02
#> TCGA.3G.AB19.01     2  0.2422     0.8180 0.00 0.82 0.00 0.00 0.00 0.00 0.18
#> TCGA.XM.AAZ3.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M3.01     7  0.3294     0.6215 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.ZB.A964.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5U.AB0E.01     3  0.0000     0.9161 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000     0.9577 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96P.01     1  0.1006     0.8956 0.96 0.00 0.00 0.02 0.00 0.00 0.02
#> TCGA.ZB.A96E.01     5  0.0504     0.8583 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.ZB.A963.01     1  0.2163     0.8858 0.88 0.00 0.00 0.00 0.00 0.10 0.02

show/hide code output

cbind(get_classes(res, k = 8), get_membership(res, k = 8))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7   p8
#> TCGA.3S.A8YW.01     7  0.5802    0.46244 0.10 0.00 0.00 0.32 0.00 0.00 0.46 0.12
#> TCGA.ZB.A96K.01     5  0.0941    0.88894 0.00 0.00 0.02 0.00 0.96 0.00 0.00 0.02
#> TCGA.XU.A930.01     3  0.1091    0.85101 0.00 0.00 0.94 0.06 0.00 0.00 0.00 0.00
#> TCGA.ZB.A965.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QN.01     7  0.0471    0.65686 0.00 0.00 0.00 0.02 0.00 0.00 0.98 0.00
#> TCGA.ZB.A96G.01     1  0.3270    0.80722 0.80 0.00 0.00 0.06 0.00 0.12 0.00 0.02
#> TCGA.XM.A8R8.01     6  0.4031    0.52063 0.02 0.00 0.00 0.16 0.00 0.72 0.00 0.10
#> TCGA.XU.AAXX.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZT.A8OM.01     6  0.0471    0.70638 0.00 0.00 0.00 0.00 0.00 0.98 0.00 0.02
#> TCGA.3S.AAYX.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZB.A96M.01     5  0.0471    0.88680 0.00 0.00 0.02 0.00 0.98 0.00 0.00 0.00
#> TCGA.XU.A936.01     4  0.1804    0.69499 0.00 0.00 0.02 0.90 0.00 0.00 0.08 0.00
#> TCGA.5U.AB0F.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.X7.A8DJ.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.ZB.A96D.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.ZB.A96Q.01     5  0.5988    0.39026 0.04 0.00 0.02 0.08 0.60 0.14 0.00 0.12
#> TCGA.X7.A8DG.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.X7.A8D9.01     5  0.0471    0.88680 0.00 0.00 0.02 0.00 0.98 0.00 0.00 0.00
#> TCGA.5V.A9RR.01     5  0.3237    0.24683 0.00 0.00 0.00 0.00 0.60 0.00 0.00 0.40
#> TCGA.4V.A9QI.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.ZB.A96C.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QX.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.XU.A931.01     7  0.1275    0.64586 0.00 0.00 0.00 0.04 0.00 0.00 0.94 0.02
#> TCGA.ZB.A961.01     3  0.0471    0.89145 0.00 0.00 0.98 0.02 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FB.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.YT.A95E.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.X7.A8D7.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.4V.A9QQ.01     6  0.4672    0.67037 0.28 0.00 0.00 0.00 0.02 0.60 0.00 0.10
#> TCGA.ZB.A969.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M4.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.XM.A8RC.01     3  0.1091    0.84832 0.00 0.00 0.94 0.06 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QJ.01     1  0.4293    0.78196 0.68 0.00 0.00 0.10 0.00 0.20 0.00 0.02
#> TCGA.XM.AAZ2.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M1.01     5  0.0941    0.88894 0.00 0.00 0.02 0.00 0.96 0.00 0.00 0.02
#> TCGA.XM.A8RG.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FD.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D6.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZC.AAAF.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.3G.AB0Q.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FA.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5K.AAAP.01     5  0.0941    0.88894 0.00 0.00 0.02 0.00 0.96 0.00 0.00 0.02
#> TCGA.XM.A8RF.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FC.01     6  0.1557    0.71030 0.00 0.00 0.00 0.00 0.02 0.92 0.00 0.06
#> TCGA.3T.AA9L.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.XU.A92W.01     1  0.2224    0.80416 0.86 0.00 0.00 0.02 0.00 0.12 0.00 0.00
#> TCGA.X7.A8DI.01     6  0.1557    0.71030 0.00 0.00 0.00 0.00 0.02 0.92 0.00 0.06
#> TCGA.ZL.A9V6.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.AAXY.01     1  0.2224    0.80416 0.86 0.00 0.00 0.02 0.00 0.12 0.00 0.00
#> TCGA.4V.A9QU.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.X7.A8DF.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.XU.A932.01     1  0.2224    0.80416 0.86 0.00 0.00 0.02 0.00 0.12 0.00 0.00
#> TCGA.XU.A92Z.01     7  0.4999    0.38438 0.02 0.00 0.00 0.12 0.00 0.00 0.52 0.34
#> TCGA.3G.AB0O.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.XU.A92X.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     8  0.3318    0.27475 0.00 0.46 0.00 0.00 0.00 0.00 0.00 0.54
#> TCGA.5G.A9ZZ.01     4  0.3658    0.29992 0.00 0.00 0.40 0.58 0.00 0.00 0.00 0.02
#> TCGA.X7.A8M7.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.XM.A8R9.01     6  0.1804    0.68806 0.00 0.00 0.00 0.02 0.00 0.90 0.00 0.08
#> TCGA.XM.AAZ1.01     1  0.4841    0.76240 0.64 0.00 0.00 0.10 0.00 0.20 0.00 0.06
#> TCGA.X7.A8DE.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.X7.A8D7.11     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZB.A962.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.YT.A95D.01     8  0.3318    0.27475 0.00 0.46 0.00 0.00 0.00 0.00 0.00 0.54
#> TCGA.X7.A8M8.01     1  0.1765    0.79829 0.88 0.00 0.00 0.00 0.00 0.12 0.00 0.00
#> TCGA.X7.A8D6.11     3  0.4940    0.19854 0.00 0.00 0.48 0.02 0.00 0.40 0.00 0.10
#> TCGA.4V.A9QT.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.3G.AB14.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5U.AB0D.01     7  0.5802    0.46244 0.10 0.00 0.00 0.32 0.00 0.00 0.46 0.12
#> TCGA.YT.A95F.01     5  0.0471    0.88680 0.00 0.00 0.02 0.00 0.98 0.00 0.00 0.00
#> TCGA.XM.A8RL.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.4V.A9QR.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RI.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RE.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.XM.A8RH.01     6  0.4740    0.66395 0.30 0.00 0.00 0.00 0.02 0.58 0.00 0.10
#> TCGA.ZC.AAAH.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.XH.A853.01     1  0.3270    0.80722 0.80 0.00 0.00 0.06 0.00 0.12 0.00 0.02
#> TCGA.X7.A8DD.01     6  0.4740    0.66395 0.30 0.00 0.00 0.00 0.02 0.58 0.00 0.10
#> TCGA.4V.A9QL.01     5  0.0471    0.88680 0.00 0.00 0.02 0.00 0.98 0.00 0.00 0.00
#> TCGA.ZB.A96A.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.XU.AAY0.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.XM.A8RB.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZB.A96R.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.ZB.A96V.01     4  0.1804    0.69499 0.00 0.00 0.02 0.90 0.00 0.00 0.08 0.00
#> TCGA.XM.A8RD.01     6  0.3102    0.71503 0.08 0.00 0.00 0.00 0.02 0.82 0.00 0.08
#> TCGA.X7.A8M0.01     4  0.5306    0.26464 0.00 0.00 0.12 0.48 0.36 0.00 0.00 0.04
#> TCGA.ZB.A96I.01     7  0.2071    0.61808 0.00 0.00 0.04 0.04 0.00 0.00 0.90 0.02
#> TCGA.ZB.A96F.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8DC.01     1  0.4865    0.77089 0.64 0.00 0.00 0.08 0.00 0.20 0.00 0.08
#> TCGA.X7.A8M5.01     8  0.3658    0.08263 0.00 0.00 0.00 0.00 0.02 0.00 0.40 0.58
#> TCGA.ZB.A966.01     4  0.1804    0.69499 0.00 0.00 0.02 0.90 0.00 0.00 0.08 0.00
#> TCGA.XU.A92V.01     8  0.4482    0.28278 0.00 0.00 0.00 0.00 0.14 0.00 0.26 0.60
#> TCGA.YT.A95H.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.ZC.AAAA.01     1  0.4841    0.76240 0.64 0.00 0.00 0.10 0.00 0.20 0.00 0.06
#> TCGA.XU.A92R.01     6  0.0808    0.69266 0.00 0.00 0.00 0.00 0.00 0.96 0.00 0.04
#> TCGA.YT.A95G.01     6  0.2591    0.69640 0.04 0.00 0.00 0.02 0.00 0.86 0.00 0.08
#> TCGA.XU.A933.01     7  0.5938    0.44862 0.12 0.00 0.00 0.32 0.00 0.00 0.44 0.12
#> TCGA.XU.A92U.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.3Q.A9WF.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.XU.AAXV.01     6  0.2348    0.71058 0.04 0.00 0.00 0.02 0.00 0.88 0.00 0.06
#> TCGA.X7.A8D8.01     8  0.3299   -0.00968 0.00 0.00 0.00 0.00 0.44 0.00 0.00 0.56
#> TCGA.ZB.A96L.01     2  0.1341    0.88476 0.00 0.92 0.00 0.00 0.00 0.00 0.00 0.08
#> TCGA.XU.AAXW.01     6  0.4740    0.66382 0.30 0.00 0.00 0.00 0.02 0.58 0.00 0.10
#> TCGA.4V.A9QW.01     1  0.5280    0.71545 0.54 0.00 0.00 0.08 0.00 0.30 0.00 0.08
#> TCGA.XU.AAXZ.01     1  0.4276    0.78597 0.70 0.00 0.00 0.08 0.00 0.18 0.00 0.04
#> TCGA.X7.A8DB.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZB.A96O.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.ZB.A96H.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QM.01     5  0.0941    0.88894 0.00 0.00 0.02 0.00 0.96 0.00 0.00 0.02
#> TCGA.XU.AAY1.01     6  0.1275    0.71010 0.00 0.00 0.00 0.00 0.02 0.94 0.00 0.04
#> TCGA.4V.A9QS.01     6  0.2071    0.70769 0.04 0.00 0.00 0.02 0.00 0.90 0.00 0.04
#> TCGA.XU.A92T.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M6.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.3G.AB0T.01     1  0.4650    0.76662 0.66 0.00 0.00 0.08 0.00 0.20 0.00 0.06
#> TCGA.ZC.AAA7.01     4  0.2265    0.67645 0.00 0.00 0.02 0.88 0.00 0.00 0.08 0.02
#> TCGA.4X.A9F9.01     6  0.4798    0.65227 0.32 0.00 0.00 0.00 0.02 0.56 0.00 0.10
#> TCGA.XU.A92Y.01     6  0.2591    0.69640 0.04 0.00 0.00 0.02 0.00 0.86 0.00 0.08
#> TCGA.ZB.A96B.01     1  0.3002    0.80750 0.82 0.00 0.00 0.04 0.00 0.12 0.00 0.02
#> TCGA.3G.AB19.01     2  0.2406    0.68709 0.00 0.80 0.00 0.00 0.00 0.00 0.00 0.20
#> TCGA.XM.AAZ3.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M3.01     7  0.0471    0.65686 0.00 0.00 0.00 0.02 0.00 0.00 0.98 0.00
#> TCGA.ZB.A964.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5U.AB0E.01     3  0.0000    0.90619 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000    0.97789 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96P.01     1  0.2224    0.79070 0.86 0.00 0.00 0.00 0.00 0.12 0.00 0.02
#> TCGA.ZB.A96E.01     5  0.0941    0.88894 0.00 0.00 0.02 0.00 0.96 0.00 0.00 0.02
#> TCGA.ZB.A963.01     1  0.5332    0.68876 0.52 0.00 0.00 0.08 0.00 0.32 0.00 0.08

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

consensus_heatmap(res, k = 7)

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

consensus_heatmap(res, k = 8)

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

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

membership_heatmap(res, k = 7)

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

membership_heatmap(res, k = 8)

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

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.

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

get_signatures(res, k = 7)

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

get_signatures(res, k = 8)

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-0-collect-classes

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 , Node021-leaf , Node022-leaf , Node023-leaf , Node024-leaf , Node031-leaf , Node032-leaf , Node033-leaf , Node034-leaf , Node041-leaf , Node042-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, 5, 6, 7, 8.
#>   On a matrix with 30000 rows and 69 columns.
#>   Top rows (1000) are extracted by 'SD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 350 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-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.000           1.000       1.000         0.5069 0.494   0.494
#> 3 3 0.704           0.682       0.861         0.1881 0.962   0.922
#> 4 4 0.607           0.597       0.791         0.1175 0.897   0.775
#> 5 5 0.542           0.663       0.759         0.0761 0.931   0.814
#> 6 6 0.589           0.546       0.664         0.0632 0.898   0.703
#> 7 7 0.602           0.458       0.682         0.0557 0.835   0.481
#> 8 8 0.619           0.406       0.656         0.0221 0.894   0.550

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
#> TCGA.ZB.A96G.01     1       0          1  1  0
#> TCGA.XM.A8R8.01     2       0          1  0  1
#> TCGA.XU.AAXX.01     2       0          1  0  1
#> TCGA.ZT.A8OM.01     2       0          1  0  1
#> TCGA.3S.AAYX.01     2       0          1  0  1
#> TCGA.5U.AB0F.01     2       0          1  0  1
#> TCGA.X7.A8DJ.01     1       0          1  1  0
#> TCGA.ZB.A96D.01     2       0          1  0  1
#> TCGA.X7.A8DG.01     1       0          1  1  0
#> TCGA.4V.A9QI.01     1       0          1  1  0
#> TCGA.4V.A9QX.01     2       0          1  0  1
#> TCGA.4X.A9FB.01     1       0          1  1  0
#> TCGA.YT.A95E.01     1       0          1  1  0
#> TCGA.X7.A8D7.01     2       0          1  0  1
#> TCGA.4V.A9QQ.01     2       0          1  0  1
#> TCGA.X7.A8M4.01     1       0          1  1  0
#> TCGA.4V.A9QJ.01     1       0          1  1  0
#> TCGA.X7.A8D6.01     2       0          1  0  1
#> TCGA.ZC.AAAF.01     2       0          1  0  1
#> TCGA.4X.A9FC.01     2       0          1  0  1
#> TCGA.3T.AA9L.01     2       0          1  0  1
#> TCGA.XU.A92W.01     1       0          1  1  0
#> TCGA.X7.A8DI.01     2       0          1  0  1
#> TCGA.XU.AAXY.01     1       0          1  1  0
#> TCGA.4V.A9QU.01     2       0          1  0  1
#> TCGA.X7.A8DF.01     1       0          1  1  0
#> TCGA.XU.A932.01     1       0          1  1  0
#> TCGA.3G.AB0O.01     1       0          1  1  0
#> TCGA.X7.A8M7.01     1       0          1  1  0
#> TCGA.XM.A8R9.01     2       0          1  0  1
#> TCGA.XM.AAZ1.01     1       0          1  1  0
#> TCGA.X7.A8DE.01     2       0          1  0  1
#> TCGA.X7.A8D7.11     2       0          1  0  1
#> TCGA.X7.A8M8.01     1       0          1  1  0
#> TCGA.X7.A8D6.11     2       0          1  0  1
#> TCGA.4V.A9QT.01     2       0          1  0  1
#> TCGA.XM.A8RL.01     1       0          1  1  0
#> TCGA.XM.A8RE.01     2       0          1  0  1
#> TCGA.XM.A8RH.01     2       0          1  0  1
#> TCGA.ZC.AAAH.01     1       0          1  1  0
#> TCGA.XH.A853.01     1       0          1  1  0
#> TCGA.X7.A8DD.01     2       0          1  0  1
#> TCGA.ZB.A96A.01     1       0          1  1  0
#> TCGA.XU.AAY0.01     2       0          1  0  1
#> TCGA.XM.A8RB.01     2       0          1  0  1
#> TCGA.ZB.A96R.01     1       0          1  1  0
#> TCGA.XM.A8RD.01     2       0          1  0  1
#> TCGA.X7.A8DC.01     1       0          1  1  0
#> TCGA.YT.A95H.01     1       0          1  1  0
#> TCGA.ZC.AAAA.01     1       0          1  1  0
#> TCGA.XU.A92R.01     2       0          1  0  1
#> TCGA.YT.A95G.01     2       0          1  0  1
#> TCGA.XU.A92U.01     1       0          1  1  0
#> TCGA.3Q.A9WF.01     1       0          1  1  0
#> TCGA.XU.AAXV.01     2       0          1  0  1
#> TCGA.XU.AAXW.01     2       0          1  0  1
#> TCGA.4V.A9QW.01     1       0          1  1  0
#> TCGA.XU.AAXZ.01     1       0          1  1  0
#> TCGA.X7.A8DB.01     2       0          1  0  1
#> TCGA.ZB.A96O.01     2       0          1  0  1
#> TCGA.XU.AAY1.01     2       0          1  0  1
#> TCGA.4V.A9QS.01     2       0          1  0  1
#> TCGA.X7.A8M6.01     1       0          1  1  0
#> TCGA.3G.AB0T.01     1       0          1  1  0
#> TCGA.4X.A9F9.01     2       0          1  0  1
#> TCGA.XU.A92Y.01     2       0          1  0  1
#> TCGA.ZB.A96B.01     1       0          1  1  0
#> TCGA.ZB.A96P.01     1       0          1  1  0
#> TCGA.ZB.A963.01     1       0          1  1  0

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>                 class entropy silhouette   p1   p2   p3
#> TCGA.ZB.A96G.01     1  0.2959     0.6610 0.90 0.00 0.10
#> TCGA.XM.A8R8.01     2  0.5835     0.7490 0.00 0.66 0.34
#> TCGA.XU.AAXX.01     2  0.3686     0.8804 0.00 0.86 0.14
#> TCGA.ZT.A8OM.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.3S.AAYX.01     2  0.5948     0.7332 0.00 0.64 0.36
#> TCGA.5U.AB0F.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.X7.A8DJ.01     1  0.4555     0.5279 0.80 0.00 0.20
#> TCGA.ZB.A96D.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.X7.A8DG.01     1  0.2066     0.6849 0.94 0.00 0.06
#> TCGA.4V.A9QI.01     1  0.5560    -0.1529 0.70 0.00 0.30
#> TCGA.4V.A9QX.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.4X.A9FB.01     1  0.0000     0.6952 1.00 0.00 0.00
#> TCGA.YT.A95E.01     1  0.6126    -0.5512 0.60 0.00 0.40
#> TCGA.X7.A8D7.01     2  0.5706     0.7739 0.00 0.68 0.32
#> TCGA.4V.A9QQ.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.X7.A8M4.01     1  0.0892     0.6910 0.98 0.00 0.02
#> TCGA.4V.A9QJ.01     1  0.4291     0.6066 0.82 0.00 0.18
#> TCGA.X7.A8D6.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.ZC.AAAF.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.4X.A9FC.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.3T.AA9L.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.XU.A92W.01     1  0.2537     0.6845 0.92 0.00 0.08
#> TCGA.X7.A8DI.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.XU.AAXY.01     1  0.3686     0.6203 0.86 0.00 0.14
#> TCGA.4V.A9QU.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.X7.A8DF.01     1  0.2537     0.6837 0.92 0.00 0.08
#> TCGA.XU.A932.01     1  0.4291     0.5490 0.82 0.00 0.18
#> TCGA.3G.AB0O.01     1  0.5560    -0.0934 0.70 0.00 0.30
#> TCGA.X7.A8M7.01     1  0.6045    -0.2944 0.62 0.00 0.38
#> TCGA.XM.A8R9.01     2  0.0892     0.9108 0.00 0.98 0.02
#> TCGA.XM.AAZ1.01     1  0.1529     0.6907 0.96 0.00 0.04
#> TCGA.X7.A8DE.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.X7.A8D7.11     2  0.5706     0.7739 0.00 0.68 0.32
#> TCGA.X7.A8M8.01     3  0.6244     0.8451 0.44 0.00 0.56
#> TCGA.X7.A8D6.11     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.4V.A9QT.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.XM.A8RL.01     1  0.2959     0.6466 0.90 0.00 0.10
#> TCGA.XM.A8RE.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.XM.A8RH.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.ZC.AAAH.01     1  0.0000     0.6952 1.00 0.00 0.00
#> TCGA.XH.A853.01     3  0.6302     0.8975 0.48 0.00 0.52
#> TCGA.X7.A8DD.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.ZB.A96A.01     1  0.2537     0.6837 0.92 0.00 0.08
#> TCGA.XU.AAY0.01     2  0.6045     0.7374 0.00 0.62 0.38
#> TCGA.XM.A8RB.01     2  0.5397     0.7983 0.00 0.72 0.28
#> TCGA.ZB.A96R.01     1  0.0892     0.6910 0.98 0.00 0.02
#> TCGA.XM.A8RD.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.X7.A8DC.01     1  0.3686     0.6054 0.86 0.00 0.14
#> TCGA.YT.A95H.01     1  0.2066     0.6825 0.94 0.00 0.06
#> TCGA.ZC.AAAA.01     1  0.2066     0.6960 0.94 0.00 0.06
#> TCGA.XU.A92R.01     2  0.5706     0.7538 0.00 0.68 0.32
#> TCGA.YT.A95G.01     2  0.0892     0.9108 0.00 0.98 0.02
#> TCGA.XU.A92U.01     1  0.4002     0.6445 0.84 0.00 0.16
#> TCGA.3Q.A9WF.01     3  0.6309     0.8689 0.50 0.00 0.50
#> TCGA.XU.AAXV.01     2  0.2959     0.8951 0.00 0.90 0.10
#> TCGA.XU.AAXW.01     2  0.5835     0.7490 0.00 0.66 0.34
#> TCGA.4V.A9QW.01     1  0.3686     0.6054 0.86 0.00 0.14
#> TCGA.XU.AAXZ.01     1  0.3686     0.6397 0.86 0.00 0.14
#> TCGA.X7.A8DB.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.ZB.A96O.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.XU.AAY1.01     2  0.5706     0.7538 0.00 0.68 0.32
#> TCGA.4V.A9QS.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.X7.A8M6.01     1  0.1529     0.6864 0.96 0.00 0.04
#> TCGA.3G.AB0T.01     1  0.6045    -0.5804 0.62 0.00 0.38
#> TCGA.4X.A9F9.01     2  0.0000     0.9152 0.00 1.00 0.00
#> TCGA.XU.A92Y.01     2  0.2066     0.9051 0.00 0.94 0.06
#> TCGA.ZB.A96B.01     1  0.6302    -0.8733 0.52 0.00 0.48
#> TCGA.ZB.A96P.01     1  0.2066     0.6685 0.94 0.00 0.06
#> TCGA.ZB.A963.01     1  0.4555     0.5249 0.80 0.00 0.20

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>                 class entropy silhouette   p1   p2   p3   p4
#> TCGA.ZB.A96G.01     1  0.4227      0.598 0.82 0.00 0.12 0.06
#> TCGA.XM.A8R8.01     4  0.4713      0.984 0.00 0.36 0.00 0.64
#> TCGA.XU.AAXX.01     2  0.4292      0.700 0.00 0.82 0.08 0.10
#> TCGA.ZT.A8OM.01     2  0.3198      0.801 0.00 0.88 0.08 0.04
#> TCGA.3S.AAYX.01     4  0.4624      0.958 0.00 0.34 0.00 0.66
#> TCGA.5U.AB0F.01     2  0.0707      0.825 0.00 0.98 0.00 0.02
#> TCGA.X7.A8DJ.01     1  0.7004      0.354 0.58 0.00 0.20 0.22
#> TCGA.ZB.A96D.01     2  0.1211      0.816 0.00 0.96 0.00 0.04
#> TCGA.X7.A8DG.01     1  0.1913      0.612 0.94 0.00 0.04 0.02
#> TCGA.4V.A9QI.01     1  0.6510     -0.129 0.54 0.00 0.38 0.08
#> TCGA.4V.A9QX.01     2  0.0000      0.828 0.00 1.00 0.00 0.00
#> TCGA.4X.A9FB.01     1  0.1637      0.621 0.94 0.00 0.00 0.06
#> TCGA.YT.A95E.01     1  0.5594     -0.365 0.52 0.00 0.46 0.02
#> TCGA.X7.A8D7.01     2  0.7602     -0.490 0.00 0.42 0.20 0.38
#> TCGA.4V.A9QQ.01     2  0.0000      0.828 0.00 1.00 0.00 0.00
#> TCGA.X7.A8M4.01     1  0.4553      0.553 0.78 0.00 0.04 0.18
#> TCGA.4V.A9QJ.01     1  0.6286      0.443 0.66 0.00 0.20 0.14
#> TCGA.X7.A8D6.01     2  0.2830      0.810 0.00 0.90 0.06 0.04
#> TCGA.ZC.AAAF.01     2  0.2011      0.789 0.00 0.92 0.00 0.08
#> TCGA.4X.A9FC.01     2  0.0000      0.828 0.00 1.00 0.00 0.00
#> TCGA.3T.AA9L.01     2  0.1637      0.801 0.00 0.94 0.00 0.06
#> TCGA.XU.A92W.01     1  0.4227      0.593 0.82 0.00 0.12 0.06
#> TCGA.X7.A8DI.01     2  0.1211      0.816 0.00 0.96 0.00 0.04
#> TCGA.XU.AAXY.01     1  0.2647      0.584 0.88 0.00 0.12 0.00
#> TCGA.4V.A9QU.01     2  0.1211      0.821 0.00 0.96 0.00 0.04
#> TCGA.X7.A8DF.01     1  0.5784      0.522 0.70 0.00 0.10 0.20
#> TCGA.XU.A932.01     1  0.2345      0.583 0.90 0.00 0.10 0.00
#> TCGA.3G.AB0O.01     1  0.5636      0.315 0.68 0.00 0.26 0.06
#> TCGA.X7.A8M7.01     3  0.7372      0.157 0.42 0.00 0.42 0.16
#> TCGA.XM.A8R9.01     2  0.2011      0.789 0.00 0.92 0.00 0.08
#> TCGA.XM.AAZ1.01     1  0.1913      0.613 0.94 0.00 0.02 0.04
#> TCGA.X7.A8DE.01     2  0.1637      0.801 0.00 0.94 0.00 0.06
#> TCGA.X7.A8D7.11     2  0.7602     -0.490 0.00 0.42 0.20 0.38
#> TCGA.X7.A8M8.01     3  0.4797      0.772 0.26 0.00 0.72 0.02
#> TCGA.X7.A8D6.11     2  0.2830      0.810 0.00 0.90 0.06 0.04
#> TCGA.4V.A9QT.01     2  0.2411      0.820 0.00 0.92 0.04 0.04
#> TCGA.XM.A8RL.01     1  0.3335      0.565 0.86 0.00 0.12 0.02
#> TCGA.XM.A8RE.01     2  0.1913      0.819 0.00 0.94 0.04 0.02
#> TCGA.XM.A8RH.01     2  0.2706      0.802 0.00 0.90 0.08 0.02
#> TCGA.ZC.AAAH.01     1  0.2011      0.614 0.92 0.00 0.00 0.08
#> TCGA.XH.A853.01     3  0.4134      0.784 0.26 0.00 0.74 0.00
#> TCGA.X7.A8DD.01     2  0.1913      0.819 0.00 0.94 0.04 0.02
#> TCGA.ZB.A96A.01     1  0.6110      0.484 0.66 0.00 0.10 0.24
#> TCGA.XU.AAY0.01     4  0.4624      0.957 0.00 0.34 0.00 0.66
#> TCGA.XM.A8RB.01     2  0.6299     -0.414 0.00 0.52 0.06 0.42
#> TCGA.ZB.A96R.01     1  0.4088      0.590 0.82 0.00 0.04 0.14
#> TCGA.XM.A8RD.01     2  0.2011      0.789 0.00 0.92 0.00 0.08
#> TCGA.X7.A8DC.01     1  0.7674      0.143 0.46 0.00 0.28 0.26
#> TCGA.YT.A95H.01     1  0.6110      0.469 0.66 0.00 0.10 0.24
#> TCGA.ZC.AAAA.01     1  0.3037      0.600 0.88 0.00 0.10 0.02
#> TCGA.XU.A92R.01     4  0.4713      0.984 0.00 0.36 0.00 0.64
#> TCGA.YT.A95G.01     2  0.0000      0.828 0.00 1.00 0.00 0.00
#> TCGA.XU.A92U.01     1  0.6122      0.498 0.68 0.00 0.16 0.16
#> TCGA.3Q.A9WF.01     3  0.4277      0.776 0.28 0.00 0.72 0.00
#> TCGA.XU.AAXV.01     2  0.4491      0.733 0.00 0.80 0.06 0.14
#> TCGA.XU.AAXW.01     4  0.4713      0.984 0.00 0.36 0.00 0.64
#> TCGA.4V.A9QW.01     1  0.7583      0.134 0.48 0.00 0.28 0.24
#> TCGA.XU.AAXZ.01     1  0.4079      0.556 0.80 0.00 0.18 0.02
#> TCGA.X7.A8DB.01     2  0.1913      0.828 0.00 0.94 0.04 0.02
#> TCGA.ZB.A96O.01     2  0.1913      0.819 0.00 0.94 0.04 0.02
#> TCGA.XU.AAY1.01     4  0.4713      0.984 0.00 0.36 0.00 0.64
#> TCGA.4V.A9QS.01     2  0.2706      0.802 0.00 0.90 0.08 0.02
#> TCGA.X7.A8M6.01     1  0.3037      0.591 0.88 0.00 0.10 0.02
#> TCGA.3G.AB0T.01     1  0.5594     -0.398 0.52 0.00 0.46 0.02
#> TCGA.4X.A9F9.01     2  0.1913      0.815 0.00 0.94 0.04 0.02
#> TCGA.XU.A92Y.01     2  0.2411      0.820 0.00 0.92 0.04 0.04
#> TCGA.ZB.A96B.01     3  0.5355      0.693 0.36 0.00 0.62 0.02
#> TCGA.ZB.A96P.01     1  0.2830      0.609 0.90 0.00 0.06 0.04
#> TCGA.ZB.A963.01     1  0.4642      0.465 0.74 0.00 0.24 0.02

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>                 class entropy silhouette   p1   p2   p3   p4   p5
#> TCGA.ZB.A96G.01     5  0.3697     0.6545 0.00 0.00 0.10 0.08 0.82
#> TCGA.XM.A8R8.01     4  0.2732     0.8161 0.00 0.16 0.00 0.84 0.00
#> TCGA.XU.AAXX.01     2  0.5425     0.6837 0.32 0.60 0.00 0.08 0.00
#> TCGA.ZT.A8OM.01     2  0.4132     0.7726 0.26 0.72 0.00 0.02 0.00
#> TCGA.3S.AAYX.01     4  0.2732     0.8161 0.00 0.16 0.00 0.84 0.00
#> TCGA.5U.AB0F.01     2  0.2280     0.7993 0.12 0.88 0.00 0.00 0.00
#> TCGA.X7.A8DJ.01     5  0.6604     0.4200 0.12 0.00 0.22 0.06 0.60
#> TCGA.ZB.A96D.01     2  0.0609     0.8189 0.02 0.98 0.00 0.00 0.00
#> TCGA.X7.A8DG.01     5  0.1043     0.6756 0.00 0.00 0.04 0.00 0.96
#> TCGA.4V.A9QI.01     5  0.6983    -0.2067 0.10 0.00 0.38 0.06 0.46
#> TCGA.4V.A9QX.01     2  0.2280     0.8154 0.12 0.88 0.00 0.00 0.00
#> TCGA.4X.A9FB.01     5  0.1648     0.6772 0.00 0.00 0.02 0.04 0.94
#> TCGA.YT.A95E.01     3  0.5220     0.5338 0.02 0.00 0.58 0.02 0.38
#> TCGA.X7.A8D7.01     4  0.8468     0.5422 0.28 0.22 0.18 0.32 0.00
#> TCGA.4V.A9QQ.01     2  0.0609     0.8202 0.02 0.98 0.00 0.00 0.00
#> TCGA.X7.A8M4.01     5  0.4096     0.6128 0.20 0.00 0.00 0.04 0.76
#> TCGA.4V.A9QJ.01     5  0.5727     0.4043 0.34 0.00 0.10 0.00 0.56
#> TCGA.X7.A8D6.01     2  0.3424     0.7975 0.24 0.76 0.00 0.00 0.00
#> TCGA.ZC.AAAF.01     2  0.2012     0.8013 0.06 0.92 0.00 0.02 0.00
#> TCGA.4X.A9FC.01     2  0.0000     0.8220 0.00 1.00 0.00 0.00 0.00
#> TCGA.3T.AA9L.01     2  0.2873     0.8007 0.12 0.86 0.00 0.02 0.00
#> TCGA.XU.A92W.01     5  0.3390     0.6572 0.00 0.00 0.10 0.06 0.84
#> TCGA.X7.A8DI.01     2  0.1410     0.8113 0.06 0.94 0.00 0.00 0.00
#> TCGA.XU.AAXY.01     5  0.4225     0.6261 0.02 0.00 0.12 0.06 0.80
#> TCGA.4V.A9QU.01     2  0.1043     0.8143 0.04 0.96 0.00 0.00 0.00
#> TCGA.X7.A8DF.01     5  0.5205     0.5407 0.28 0.00 0.04 0.02 0.66
#> TCGA.XU.A932.01     5  0.4855     0.5887 0.04 0.00 0.14 0.06 0.76
#> TCGA.3G.AB0O.01     5  0.6124     0.0749 0.10 0.00 0.30 0.02 0.58
#> TCGA.X7.A8M7.01     3  0.6671     0.4236 0.24 0.00 0.42 0.00 0.34
#> TCGA.XM.A8R9.01     2  0.3291     0.8077 0.12 0.84 0.00 0.04 0.00
#> TCGA.XM.AAZ1.01     5  0.0609     0.6765 0.00 0.00 0.02 0.00 0.98
#> TCGA.X7.A8DE.01     2  0.1043     0.8161 0.04 0.96 0.00 0.00 0.00
#> TCGA.X7.A8D7.11     4  0.8468     0.5422 0.28 0.22 0.18 0.32 0.00
#> TCGA.X7.A8M8.01     3  0.3922     0.7470 0.00 0.00 0.78 0.04 0.18
#> TCGA.X7.A8D6.11     2  0.3424     0.7975 0.24 0.76 0.00 0.00 0.00
#> TCGA.4V.A9QT.01     2  0.2732     0.7978 0.16 0.84 0.00 0.00 0.00
#> TCGA.XM.A8RL.01     5  0.2610     0.6573 0.02 0.00 0.06 0.02 0.90
#> TCGA.XM.A8RE.01     2  0.3690     0.7784 0.20 0.78 0.00 0.02 0.00
#> TCGA.XM.A8RH.01     2  0.3999     0.7824 0.24 0.74 0.00 0.02 0.00
#> TCGA.ZC.AAAH.01     5  0.0609     0.6791 0.00 0.00 0.00 0.02 0.98
#> TCGA.XH.A853.01     3  0.3922     0.7470 0.00 0.00 0.78 0.04 0.18
#> TCGA.X7.A8DD.01     2  0.3999     0.7677 0.24 0.74 0.00 0.02 0.00
#> TCGA.ZB.A96A.01     5  0.5548     0.5883 0.22 0.00 0.06 0.04 0.68
#> TCGA.XU.AAY0.01     4  0.3106     0.8050 0.02 0.14 0.00 0.84 0.00
#> TCGA.XM.A8RB.01     4  0.7439     0.2973 0.22 0.36 0.04 0.38 0.00
#> TCGA.ZB.A96R.01     5  0.2077     0.6728 0.04 0.00 0.00 0.04 0.92
#> TCGA.XM.A8RD.01     2  0.1648     0.8073 0.04 0.94 0.00 0.02 0.00
#> TCGA.X7.A8DC.01     5  0.5447     0.3124 0.44 0.00 0.06 0.00 0.50
#> TCGA.YT.A95H.01     5  0.4644     0.5519 0.28 0.00 0.00 0.04 0.68
#> TCGA.ZC.AAAA.01     5  0.3700     0.6592 0.06 0.00 0.08 0.02 0.84
#> TCGA.XU.A92R.01     4  0.2929     0.8107 0.00 0.18 0.00 0.82 0.00
#> TCGA.YT.A95G.01     2  0.2929     0.8196 0.18 0.82 0.00 0.00 0.00
#> TCGA.XU.A92U.01     5  0.4644     0.5477 0.28 0.00 0.04 0.00 0.68
#> TCGA.3Q.A9WF.01     3  0.3922     0.7470 0.00 0.00 0.78 0.04 0.18
#> TCGA.XU.AAXV.01     2  0.5555     0.6287 0.22 0.64 0.00 0.14 0.00
#> TCGA.XU.AAXW.01     4  0.2732     0.8161 0.00 0.16 0.00 0.84 0.00
#> TCGA.4V.A9QW.01     5  0.5447     0.3124 0.44 0.00 0.06 0.00 0.50
#> TCGA.XU.AAXZ.01     5  0.2516     0.6454 0.00 0.00 0.14 0.00 0.86
#> TCGA.X7.A8DB.01     2  0.2929     0.8077 0.18 0.82 0.00 0.00 0.00
#> TCGA.ZB.A96O.01     2  0.4252     0.7529 0.28 0.70 0.00 0.02 0.00
#> TCGA.XU.AAY1.01     4  0.2929     0.8107 0.00 0.18 0.00 0.82 0.00
#> TCGA.4V.A9QS.01     2  0.4456     0.7296 0.32 0.66 0.00 0.02 0.00
#> TCGA.X7.A8M6.01     5  0.4106     0.5968 0.04 0.00 0.14 0.02 0.80
#> TCGA.3G.AB0T.01     3  0.6355     0.5048 0.10 0.00 0.50 0.02 0.38
#> TCGA.4X.A9F9.01     2  0.2020     0.8183 0.10 0.90 0.00 0.00 0.00
#> TCGA.XU.A92Y.01     2  0.4254     0.7598 0.22 0.74 0.00 0.04 0.00
#> TCGA.ZB.A96B.01     3  0.5293     0.7151 0.06 0.00 0.68 0.02 0.24
#> TCGA.ZB.A96P.01     5  0.3455     0.6503 0.06 0.00 0.04 0.04 0.86
#> TCGA.ZB.A963.01     5  0.3274     0.5649 0.00 0.00 0.22 0.00 0.78

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6
#> TCGA.ZB.A96G.01     5  0.4088     0.5298 0.10 0.00 0.02 0.00 0.78 0.10
#> TCGA.XM.A8R8.01     4  0.1480     0.9525 0.02 0.04 0.00 0.94 0.00 0.00
#> TCGA.XU.AAXX.01     2  0.4879     0.3727 0.04 0.72 0.00 0.12 0.00 0.12
#> TCGA.ZT.A8OM.01     2  0.3111     0.5030 0.02 0.84 0.00 0.02 0.00 0.12
#> TCGA.3S.AAYX.01     4  0.2474     0.9059 0.08 0.04 0.00 0.88 0.00 0.00
#> TCGA.5U.AB0F.01     2  0.4199     0.6499 0.00 0.60 0.38 0.02 0.00 0.00
#> TCGA.X7.A8DJ.01     5  0.5366    -0.2341 0.46 0.00 0.02 0.00 0.46 0.06
#> TCGA.ZB.A96D.01     2  0.4246     0.6527 0.00 0.58 0.40 0.02 0.00 0.00
#> TCGA.X7.A8DG.01     5  0.3544     0.5065 0.12 0.00 0.00 0.00 0.80 0.08
#> TCGA.4V.A9QI.01     5  0.6764    -0.1805 0.30 0.00 0.22 0.02 0.44 0.02
#> TCGA.4V.A9QX.01     2  0.3819     0.6702 0.00 0.70 0.28 0.00 0.00 0.02
#> TCGA.4X.A9FB.01     5  0.3985     0.4510 0.14 0.00 0.00 0.00 0.76 0.10
#> TCGA.YT.A95E.01     5  0.5742     0.2316 0.04 0.00 0.16 0.02 0.66 0.12
#> TCGA.X7.A8D7.01     6  0.5354     1.0000 0.00 0.16 0.00 0.26 0.00 0.58
#> TCGA.4V.A9QQ.01     2  0.4310     0.6469 0.00 0.54 0.44 0.02 0.00 0.00
#> TCGA.X7.A8M4.01     5  0.5364     0.0178 0.30 0.00 0.00 0.00 0.56 0.14
#> TCGA.4V.A9QJ.01     1  0.5672     0.4400 0.52 0.00 0.02 0.00 0.36 0.10
#> TCGA.X7.A8D6.01     2  0.5313     0.5897 0.02 0.70 0.16 0.04 0.00 0.08
#> TCGA.ZC.AAAF.01     2  0.5020     0.6404 0.02 0.56 0.38 0.04 0.00 0.00
#> TCGA.4X.A9FC.01     2  0.4199     0.6621 0.00 0.60 0.38 0.02 0.00 0.00
#> TCGA.3T.AA9L.01     2  0.5304     0.6487 0.06 0.62 0.28 0.04 0.00 0.00
#> TCGA.XU.A92W.01     5  0.3997     0.5177 0.14 0.00 0.02 0.00 0.78 0.06
#> TCGA.X7.A8DI.01     2  0.4310     0.6469 0.00 0.54 0.44 0.02 0.00 0.00
#> TCGA.XU.AAXY.01     5  0.2345     0.5722 0.02 0.00 0.02 0.00 0.90 0.06
#> TCGA.4V.A9QU.01     2  0.4764     0.6479 0.00 0.54 0.42 0.02 0.00 0.02
#> TCGA.X7.A8DF.01     1  0.4482     0.5169 0.60 0.00 0.00 0.00 0.36 0.04
#> TCGA.XU.A932.01     5  0.3103     0.5562 0.04 0.00 0.04 0.00 0.86 0.06
#> TCGA.3G.AB0O.01     5  0.5313     0.3810 0.16 0.00 0.08 0.02 0.70 0.04
#> TCGA.X7.A8M7.01     1  0.5626     0.0305 0.54 0.00 0.10 0.02 0.34 0.00
#> TCGA.XM.A8R9.01     2  0.4502     0.6268 0.00 0.74 0.14 0.10 0.00 0.02
#> TCGA.XM.AAZ1.01     5  0.3985     0.4382 0.10 0.00 0.00 0.00 0.76 0.14
#> TCGA.X7.A8DE.01     2  0.5337     0.6610 0.02 0.60 0.32 0.02 0.00 0.04
#> TCGA.X7.A8D7.11     6  0.5354     1.0000 0.00 0.16 0.00 0.26 0.00 0.58
#> TCGA.X7.A8M8.01     3  0.6259     0.9008 0.10 0.00 0.54 0.00 0.28 0.08
#> TCGA.X7.A8D6.11     2  0.5313     0.5897 0.02 0.70 0.16 0.04 0.00 0.08
#> TCGA.4V.A9QT.01     2  0.5258     0.6586 0.06 0.66 0.24 0.02 0.00 0.02
#> TCGA.XM.A8RL.01     5  0.3321     0.5422 0.10 0.00 0.00 0.00 0.82 0.08
#> TCGA.XM.A8RE.01     2  0.4838     0.6027 0.02 0.70 0.18 0.00 0.00 0.10
#> TCGA.XM.A8RH.01     2  0.3537     0.5562 0.04 0.84 0.02 0.02 0.00 0.08
#> TCGA.ZC.AAAH.01     5  0.4328     0.3812 0.18 0.00 0.00 0.00 0.72 0.10
#> TCGA.XH.A853.01     3  0.6259     0.9008 0.10 0.00 0.54 0.00 0.28 0.08
#> TCGA.X7.A8DD.01     2  0.3846     0.5615 0.00 0.80 0.08 0.02 0.00 0.10
#> TCGA.ZB.A96A.01     1  0.5071     0.4616 0.52 0.00 0.00 0.00 0.40 0.08
#> TCGA.XU.AAY0.01     4  0.0937     0.9560 0.00 0.04 0.00 0.96 0.00 0.00
#> TCGA.XM.A8RB.01     2  0.7396    -0.5104 0.04 0.36 0.04 0.34 0.00 0.22
#> TCGA.ZB.A96R.01     5  0.4929     0.1344 0.28 0.00 0.00 0.00 0.62 0.10
#> TCGA.XM.A8RD.01     2  0.5469     0.6393 0.08 0.68 0.18 0.04 0.00 0.02
#> TCGA.X7.A8DC.01     1  0.3315     0.6076 0.78 0.00 0.02 0.00 0.20 0.00
#> TCGA.YT.A95H.01     1  0.4576     0.5115 0.56 0.00 0.00 0.00 0.40 0.04
#> TCGA.ZC.AAAA.01     5  0.2581     0.5446 0.12 0.00 0.00 0.00 0.86 0.02
#> TCGA.XU.A92R.01     4  0.1480     0.9503 0.00 0.04 0.00 0.94 0.00 0.02
#> TCGA.YT.A95G.01     2  0.3258     0.6528 0.02 0.84 0.10 0.04 0.00 0.00
#> TCGA.XU.A92U.01     1  0.5265     0.4784 0.50 0.00 0.00 0.00 0.40 0.10
#> TCGA.3Q.A9WF.01     3  0.6128     0.8860 0.08 0.00 0.54 0.00 0.30 0.08
#> TCGA.XU.AAXV.01     2  0.5313     0.4768 0.08 0.70 0.04 0.16 0.00 0.02
#> TCGA.XU.AAXW.01     4  0.1480     0.9528 0.02 0.04 0.00 0.94 0.00 0.00
#> TCGA.4V.A9QW.01     1  0.3315     0.6076 0.78 0.00 0.02 0.00 0.20 0.00
#> TCGA.XU.AAXZ.01     5  0.2512     0.5572 0.06 0.00 0.00 0.00 0.88 0.06
#> TCGA.X7.A8DB.01     2  0.4690     0.6424 0.00 0.70 0.22 0.04 0.00 0.04
#> TCGA.ZB.A96O.01     2  0.4392     0.4732 0.02 0.76 0.04 0.02 0.00 0.16
#> TCGA.XU.AAY1.01     4  0.1480     0.9503 0.00 0.04 0.00 0.94 0.00 0.02
#> TCGA.4V.A9QS.01     2  0.3318     0.4765 0.02 0.82 0.00 0.02 0.00 0.14
#> TCGA.X7.A8M6.01     5  0.3660     0.5218 0.16 0.00 0.00 0.00 0.78 0.06
#> TCGA.3G.AB0T.01     5  0.6559    -0.1800 0.26 0.00 0.20 0.02 0.50 0.02
#> TCGA.4X.A9F9.01     2  0.5337     0.6543 0.02 0.60 0.32 0.02 0.00 0.04
#> TCGA.XU.A92Y.01     2  0.4530     0.5290 0.02 0.78 0.06 0.08 0.00 0.06
#> TCGA.ZB.A96B.01     3  0.6654     0.7201 0.12 0.00 0.42 0.02 0.40 0.04
#> TCGA.ZB.A96P.01     5  0.4094     0.5021 0.18 0.00 0.00 0.00 0.74 0.08
#> TCGA.ZB.A963.01     5  0.3073     0.5540 0.08 0.00 0.00 0.00 0.84 0.08

show/hide code output

cbind(get_classes(res, k = 7), get_membership(res, k = 7))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7
#> TCGA.ZB.A96G.01     5   0.340     0.4626 0.00 0.02 0.04 0.00 0.80 0.14 0.00
#> TCGA.XM.A8R8.01     4   0.143     0.7669 0.00 0.08 0.00 0.92 0.00 0.00 0.00
#> TCGA.XU.AAXX.01     7   0.166     0.6454 0.02 0.00 0.00 0.06 0.00 0.00 0.92
#> TCGA.ZT.A8OM.01     7   0.315     0.6618 0.04 0.06 0.06 0.00 0.00 0.00 0.84
#> TCGA.3S.AAYX.01     4   0.251     0.7329 0.04 0.06 0.00 0.88 0.00 0.00 0.02
#> TCGA.5U.AB0F.01     2   0.319     0.7090 0.02 0.76 0.00 0.00 0.00 0.00 0.22
#> TCGA.X7.A8DJ.01     1   0.721     0.1692 0.38 0.04 0.10 0.02 0.36 0.10 0.00
#> TCGA.ZB.A96D.01     2   0.226     0.7219 0.00 0.84 0.00 0.00 0.00 0.00 0.16
#> TCGA.X7.A8DG.01     5   0.101     0.4854 0.02 0.00 0.02 0.00 0.96 0.00 0.00
#> TCGA.4V.A9QI.01     3   0.774     0.2373 0.22 0.08 0.34 0.02 0.28 0.06 0.00
#> TCGA.4V.A9QX.01     2   0.407     0.5987 0.04 0.62 0.00 0.00 0.00 0.00 0.34
#> TCGA.4X.A9FB.01     5   0.447     0.4215 0.06 0.02 0.00 0.02 0.72 0.18 0.00
#> TCGA.YT.A95E.01     5   0.706    -0.0626 0.06 0.04 0.30 0.02 0.44 0.14 0.00
#> TCGA.X7.A8D7.01     6   0.526     1.0000 0.00 0.00 0.00 0.26 0.00 0.52 0.22
#> TCGA.4V.A9QQ.01     2   0.378     0.7147 0.02 0.72 0.02 0.00 0.00 0.00 0.24
#> TCGA.X7.A8M4.01     5   0.508     0.2308 0.24 0.00 0.00 0.00 0.56 0.20 0.00
#> TCGA.4V.A9QJ.01     5   0.468    -0.0653 0.42 0.00 0.00 0.02 0.52 0.04 0.00
#> TCGA.X7.A8D6.01     7   0.595     0.2546 0.08 0.26 0.08 0.00 0.00 0.02 0.56
#> TCGA.ZC.AAAF.01     2   0.435     0.7210 0.02 0.68 0.02 0.00 0.00 0.02 0.26
#> TCGA.4X.A9FC.01     2   0.391     0.7164 0.00 0.70 0.06 0.00 0.00 0.00 0.24
#> TCGA.3T.AA9L.01     2   0.453     0.7014 0.02 0.64 0.02 0.00 0.00 0.02 0.30
#> TCGA.XU.A92W.01     5   0.505     0.4050 0.10 0.04 0.02 0.02 0.72 0.10 0.00
#> TCGA.X7.A8DI.01     2   0.432     0.7062 0.00 0.70 0.04 0.00 0.00 0.04 0.22
#> TCGA.XU.AAXY.01     5   0.489     0.4382 0.04 0.02 0.08 0.00 0.70 0.16 0.00
#> TCGA.4V.A9QU.01     2   0.453     0.6829 0.04 0.72 0.02 0.00 0.00 0.04 0.18
#> TCGA.X7.A8DF.01     5   0.394    -0.1290 0.42 0.00 0.02 0.00 0.56 0.00 0.00
#> TCGA.XU.A932.01     5   0.566     0.3984 0.08 0.02 0.08 0.00 0.62 0.20 0.00
#> TCGA.3G.AB0O.01     5   0.750    -0.3274 0.12 0.06 0.30 0.02 0.40 0.10 0.00
#> TCGA.X7.A8M7.01     1   0.637    -0.2590 0.40 0.06 0.30 0.00 0.24 0.00 0.00
#> TCGA.XM.A8R9.01     7   0.528     0.1614 0.04 0.34 0.04 0.00 0.00 0.02 0.56
#> TCGA.XM.AAZ1.01     5   0.320     0.4632 0.06 0.00 0.00 0.00 0.80 0.14 0.00
#> TCGA.X7.A8DE.01     2   0.508     0.6467 0.02 0.62 0.04 0.00 0.00 0.04 0.28
#> TCGA.X7.A8D7.11     6   0.526     1.0000 0.00 0.00 0.00 0.26 0.00 0.52 0.22
#> TCGA.X7.A8M8.01     3   0.189     0.6522 0.00 0.00 0.88 0.00 0.12 0.00 0.00
#> TCGA.X7.A8D6.11     7   0.595     0.2546 0.08 0.26 0.08 0.00 0.00 0.02 0.56
#> TCGA.4V.A9QT.01     2   0.587     0.5052 0.10 0.52 0.02 0.00 0.00 0.04 0.32
#> TCGA.XM.A8RL.01     5   0.449     0.4450 0.06 0.02 0.04 0.00 0.74 0.14 0.00
#> TCGA.XM.A8RE.01     7   0.453     0.5091 0.02 0.18 0.04 0.00 0.00 0.04 0.72
#> TCGA.XM.A8RH.01     7   0.228     0.6567 0.04 0.08 0.00 0.00 0.00 0.00 0.88
#> TCGA.ZC.AAAH.01     5   0.403     0.3938 0.12 0.00 0.00 0.00 0.72 0.16 0.00
#> TCGA.XH.A853.01     3   0.189     0.6522 0.00 0.00 0.88 0.00 0.12 0.00 0.00
#> TCGA.X7.A8DD.01     7   0.238     0.6566 0.02 0.12 0.00 0.00 0.00 0.00 0.86
#> TCGA.ZB.A96A.01     5   0.497     0.0182 0.34 0.02 0.02 0.00 0.58 0.04 0.00
#> TCGA.XU.AAY0.01     4   0.340     0.6569 0.06 0.04 0.00 0.82 0.00 0.00 0.08
#> TCGA.XM.A8RB.01     4   0.749    -0.3282 0.10 0.16 0.00 0.34 0.00 0.08 0.32
#> TCGA.ZB.A96R.01     5   0.574     0.1856 0.24 0.02 0.00 0.02 0.56 0.16 0.00
#> TCGA.XM.A8RD.01     2   0.534     0.3212 0.06 0.50 0.00 0.02 0.00 0.02 0.40
#> TCGA.X7.A8DC.01     1   0.391     0.5615 0.70 0.00 0.06 0.00 0.24 0.00 0.00
#> TCGA.YT.A95H.01     5   0.500    -0.1005 0.40 0.00 0.00 0.00 0.48 0.12 0.00
#> TCGA.ZC.AAAA.01     5   0.523     0.3748 0.18 0.00 0.06 0.00 0.64 0.12 0.00
#> TCGA.XU.A92R.01     4   0.272     0.7360 0.04 0.12 0.00 0.84 0.00 0.00 0.00
#> TCGA.YT.A95G.01     7   0.331     0.4543 0.02 0.24 0.00 0.00 0.00 0.00 0.74
#> TCGA.XU.A92U.01     5   0.508     0.1993 0.28 0.02 0.00 0.04 0.62 0.04 0.00
#> TCGA.3Q.A9WF.01     3   0.189     0.6522 0.00 0.00 0.88 0.00 0.12 0.00 0.00
#> TCGA.XU.AAXV.01     7   0.520     0.5930 0.04 0.14 0.02 0.08 0.00 0.02 0.70
#> TCGA.XU.AAXW.01     4   0.143     0.7669 0.00 0.08 0.00 0.92 0.00 0.00 0.00
#> TCGA.4V.A9QW.01     1   0.391     0.5615 0.70 0.00 0.06 0.00 0.24 0.00 0.00
#> TCGA.XU.AAXZ.01     5   0.291     0.4747 0.00 0.02 0.02 0.02 0.86 0.08 0.00
#> TCGA.X7.A8DB.01     2   0.581     0.3555 0.06 0.50 0.02 0.00 0.00 0.06 0.36
#> TCGA.ZB.A96O.01     7   0.291     0.6620 0.02 0.08 0.02 0.00 0.00 0.02 0.86
#> TCGA.XU.AAY1.01     4   0.228     0.7605 0.04 0.08 0.00 0.88 0.00 0.00 0.00
#> TCGA.4V.A9QS.01     7   0.101     0.6769 0.02 0.00 0.02 0.00 0.00 0.00 0.96
#> TCGA.X7.A8M6.01     5   0.537     0.3716 0.20 0.02 0.04 0.00 0.64 0.10 0.00
#> TCGA.3G.AB0T.01     3   0.718     0.2759 0.24 0.06 0.36 0.02 0.30 0.02 0.00
#> TCGA.4X.A9F9.01     2   0.407     0.6137 0.04 0.62 0.00 0.00 0.00 0.00 0.34
#> TCGA.XU.A92Y.01     7   0.374     0.6615 0.04 0.08 0.02 0.02 0.00 0.02 0.82
#> TCGA.ZB.A96B.01     3   0.639     0.5605 0.10 0.04 0.58 0.02 0.20 0.06 0.00
#> TCGA.ZB.A96P.01     5   0.608     0.3553 0.20 0.02 0.04 0.00 0.54 0.20 0.00
#> TCGA.ZB.A963.01     5   0.424     0.4320 0.00 0.02 0.10 0.02 0.76 0.10 0.00

show/hide code output

cbind(get_classes(res, k = 8), get_membership(res, k = 8))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7   p8
#> TCGA.ZB.A96G.01     5   0.651     0.0713 0.14 0.04 0.00 0.00 0.48 0.14 0.00 0.20
#> TCGA.XM.A8R8.01     4   0.156     0.9337 0.00 0.00 0.00 0.92 0.00 0.00 0.06 0.02
#> TCGA.XU.AAXX.01     7   0.397     0.5423 0.00 0.10 0.10 0.02 0.00 0.02 0.76 0.00
#> TCGA.ZT.A8OM.01     7   0.286     0.6025 0.00 0.00 0.08 0.00 0.00 0.00 0.82 0.10
#> TCGA.3S.AAYX.01     4   0.286     0.8864 0.00 0.00 0.00 0.84 0.00 0.02 0.06 0.08
#> TCGA.5U.AB0F.01     2   0.417     0.6885 0.00 0.70 0.02 0.02 0.00 0.00 0.22 0.04
#> TCGA.X7.A8DJ.01     1   0.652     0.1193 0.44 0.08 0.00 0.00 0.30 0.08 0.00 0.10
#> TCGA.ZB.A96D.01     2   0.502     0.7009 0.02 0.62 0.02 0.02 0.00 0.02 0.28 0.02
#> TCGA.X7.A8DG.01     5   0.255     0.1962 0.04 0.00 0.00 0.00 0.84 0.00 0.00 0.12
#> TCGA.4V.A9QI.01     1   0.491     0.3446 0.66 0.00 0.10 0.00 0.18 0.02 0.00 0.04
#> TCGA.4V.A9QX.01     2   0.592     0.3483 0.00 0.46 0.06 0.00 0.00 0.06 0.36 0.06
#> TCGA.4X.A9FB.01     5   0.128     0.2919 0.04 0.00 0.00 0.00 0.94 0.00 0.00 0.02
#> TCGA.YT.A95E.01     5   0.767    -0.0165 0.28 0.02 0.16 0.04 0.36 0.06 0.00 0.08
#> TCGA.X7.A8D7.01     6   0.377     1.0000 0.00 0.00 0.00 0.08 0.00 0.70 0.22 0.00
#> TCGA.4V.A9QQ.01     2   0.308     0.6721 0.00 0.66 0.00 0.00 0.00 0.00 0.34 0.00
#> TCGA.X7.A8M4.01     5   0.528    -0.1649 0.16 0.02 0.00 0.00 0.58 0.02 0.00 0.22
#> TCGA.4V.A9QJ.01     8   0.454     0.7670 0.12 0.00 0.00 0.00 0.32 0.00 0.00 0.56
#> TCGA.X7.A8D6.01     7   0.640     0.2826 0.00 0.16 0.06 0.02 0.00 0.04 0.52 0.20
#> TCGA.ZC.AAAF.01     2   0.523     0.6746 0.02 0.66 0.04 0.02 0.00 0.02 0.20 0.04
#> TCGA.4X.A9FC.01     2   0.408     0.5821 0.00 0.56 0.02 0.00 0.00 0.00 0.40 0.02
#> TCGA.3T.AA9L.01     2   0.606     0.6240 0.02 0.56 0.10 0.02 0.00 0.04 0.24 0.02
#> TCGA.XU.A92W.01     1   0.710    -0.0392 0.36 0.02 0.02 0.00 0.26 0.16 0.00 0.18
#> TCGA.X7.A8DI.01     2   0.489     0.6736 0.02 0.62 0.04 0.00 0.00 0.02 0.28 0.02
#> TCGA.XU.AAXY.01     5   0.558     0.2482 0.22 0.00 0.00 0.00 0.54 0.16 0.00 0.08
#> TCGA.4V.A9QU.01     2   0.590     0.5370 0.00 0.54 0.08 0.04 0.00 0.02 0.28 0.04
#> TCGA.X7.A8DF.01     1   0.598    -0.2113 0.38 0.06 0.00 0.00 0.32 0.00 0.00 0.24
#> TCGA.XU.A932.01     5   0.578     0.2522 0.22 0.00 0.00 0.00 0.52 0.14 0.00 0.12
#> TCGA.3G.AB0O.01     1   0.531     0.1134 0.56 0.00 0.04 0.02 0.32 0.02 0.00 0.04
#> TCGA.X7.A8M7.01     1   0.313     0.3558 0.84 0.02 0.04 0.00 0.06 0.00 0.00 0.04
#> TCGA.XM.A8R9.01     7   0.410     0.3405 0.00 0.20 0.02 0.00 0.00 0.00 0.70 0.08
#> TCGA.XM.AAZ1.01     5   0.424    -0.1459 0.04 0.00 0.00 0.04 0.66 0.00 0.00 0.26
#> TCGA.X7.A8DE.01     2   0.553     0.6176 0.02 0.52 0.04 0.02 0.00 0.02 0.36 0.02
#> TCGA.X7.A8D7.11     6   0.377     1.0000 0.00 0.00 0.00 0.08 0.00 0.70 0.22 0.00
#> TCGA.X7.A8M8.01     3   0.286     0.9911 0.20 0.00 0.78 0.00 0.02 0.00 0.00 0.00
#> TCGA.X7.A8D6.11     7   0.640     0.2826 0.00 0.16 0.06 0.02 0.00 0.04 0.52 0.20
#> TCGA.4V.A9QT.01     2   0.628     0.5113 0.00 0.54 0.12 0.04 0.00 0.04 0.22 0.04
#> TCGA.XM.A8RL.01     5   0.345     0.3223 0.12 0.00 0.00 0.02 0.80 0.04 0.00 0.02
#> TCGA.XM.A8RE.01     7   0.378     0.4609 0.00 0.16 0.04 0.00 0.00 0.02 0.76 0.02
#> TCGA.XM.A8RH.01     7   0.161     0.6015 0.00 0.04 0.04 0.00 0.00 0.00 0.92 0.00
#> TCGA.ZC.AAAH.01     5   0.141     0.2816 0.02 0.02 0.00 0.00 0.94 0.00 0.00 0.02
#> TCGA.XH.A853.01     3   0.330     0.9822 0.20 0.02 0.76 0.00 0.02 0.00 0.00 0.00
#> TCGA.X7.A8DD.01     7   0.227     0.5832 0.00 0.08 0.00 0.00 0.00 0.02 0.88 0.02
#> TCGA.ZB.A96A.01     5   0.553    -0.1532 0.24 0.04 0.00 0.00 0.50 0.00 0.00 0.22
#> TCGA.XU.AAY0.01     4   0.156     0.8986 0.00 0.00 0.00 0.90 0.00 0.00 0.10 0.00
#> TCGA.XM.A8RB.01     7   0.806    -0.1196 0.00 0.14 0.12 0.16 0.00 0.12 0.36 0.10
#> TCGA.ZB.A96R.01     5   0.374     0.1425 0.18 0.02 0.00 0.00 0.74 0.00 0.00 0.06
#> TCGA.XM.A8RD.01     7   0.437    -0.1780 0.00 0.34 0.02 0.02 0.00 0.00 0.60 0.02
#> TCGA.X7.A8DC.01     1   0.539     0.1276 0.54 0.08 0.00 0.00 0.10 0.00 0.00 0.28
#> TCGA.YT.A95H.01     5   0.613    -0.1144 0.36 0.06 0.00 0.00 0.40 0.02 0.00 0.16
#> TCGA.ZC.AAAA.01     1   0.520    -0.0790 0.46 0.02 0.02 0.00 0.44 0.04 0.00 0.02
#> TCGA.XU.A92R.01     4   0.128     0.9420 0.00 0.02 0.00 0.94 0.00 0.00 0.04 0.00
#> TCGA.YT.A95G.01     7   0.272     0.4802 0.00 0.18 0.02 0.00 0.00 0.00 0.80 0.00
#> TCGA.XU.A92U.01     8   0.503     0.7560 0.08 0.00 0.00 0.04 0.38 0.00 0.00 0.50
#> TCGA.3Q.A9WF.01     3   0.286     0.9911 0.20 0.00 0.78 0.00 0.02 0.00 0.00 0.00
#> TCGA.XU.AAXV.01     7   0.326     0.5610 0.00 0.06 0.02 0.02 0.00 0.02 0.84 0.04
#> TCGA.XU.AAXW.01     4   0.174     0.9405 0.00 0.02 0.00 0.92 0.00 0.00 0.04 0.02
#> TCGA.4V.A9QW.01     1   0.539     0.1276 0.54 0.08 0.00 0.00 0.10 0.00 0.00 0.28
#> TCGA.XU.AAXZ.01     5   0.651     0.0895 0.20 0.02 0.02 0.04 0.50 0.02 0.00 0.20
#> TCGA.X7.A8DB.01     7   0.596    -0.0184 0.00 0.32 0.08 0.02 0.00 0.02 0.50 0.06
#> TCGA.ZB.A96O.01     7   0.207     0.6066 0.00 0.04 0.04 0.00 0.00 0.00 0.90 0.02
#> TCGA.XU.AAY1.01     4   0.128     0.9420 0.00 0.02 0.00 0.94 0.00 0.00 0.04 0.00
#> TCGA.4V.A9QS.01     7   0.345     0.5829 0.00 0.06 0.08 0.00 0.00 0.00 0.80 0.06
#> TCGA.X7.A8M6.01     1   0.549     0.1053 0.54 0.02 0.02 0.02 0.34 0.04 0.00 0.02
#> TCGA.3G.AB0T.01     1   0.403     0.2614 0.72 0.00 0.16 0.00 0.10 0.02 0.00 0.00
#> TCGA.4X.A9F9.01     2   0.498     0.5887 0.00 0.58 0.08 0.00 0.00 0.02 0.30 0.02
#> TCGA.XU.A92Y.01     7   0.227     0.6067 0.00 0.02 0.00 0.02 0.00 0.00 0.88 0.08
#> TCGA.ZB.A96B.01     1   0.489    -0.2120 0.56 0.02 0.34 0.00 0.06 0.02 0.00 0.00
#> TCGA.ZB.A96P.01     5   0.513     0.1712 0.34 0.00 0.00 0.00 0.52 0.10 0.00 0.04
#> TCGA.ZB.A963.01     5   0.705     0.0955 0.20 0.04 0.04 0.04 0.46 0.02 0.00 0.20

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

consensus_heatmap(res, k = 7)

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

consensus_heatmap(res, k = 8)

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

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

membership_heatmap(res, k = 7)

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

membership_heatmap(res, k = 8)

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

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.

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

get_signatures(res, k = 7)

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

get_signatures(res, k = 8)

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-01-collect-classes

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.


Node012

Parent node: Node01. Child nodes: Node0121-leaf , Node0122-leaf , Node0123-leaf , Node0124-leaf .

The object with results only for a single top-value method and a single partitioning method can be extracted as:

res = res_rh["012"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6, 7, 8.
#>   On a matrix with 30000 rows and 36 columns.
#>   Top rows (1000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 350 partitions by row resampling.
#>   Best k for subgroups seems to be 7.
#> 
#> 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-012-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-012-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           1.000       1.000         0.5132 0.487   0.487
#> 3 3 0.692           0.580       0.762         0.2302 0.870   0.738
#> 4 4 1.000           0.993       0.994         0.1369 0.867   0.663
#> 5 5 0.882           0.591       0.752         0.0777 0.937   0.774
#> 6 6 0.908           0.664       0.798         0.0601 0.884   0.535
#> 7 7 0.923           0.937       0.898         0.0275 0.930   0.633
#> 8 8 0.879           0.918       0.882         0.0170 0.978   0.848

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 7
#> attr(,"optional")
#> [1] 2 4 6

There is also optional best \(k\) = 2 4 6 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
#> TCGA.XM.A8R8.01     2       0          1  0  1
#> TCGA.XU.AAXX.01     1       0          1  1  0
#> TCGA.ZT.A8OM.01     2       0          1  0  1
#> TCGA.3S.AAYX.01     1       0          1  1  0
#> TCGA.5U.AB0F.01     2       0          1  0  1
#> TCGA.ZB.A96D.01     2       0          1  0  1
#> TCGA.4V.A9QX.01     2       0          1  0  1
#> TCGA.X7.A8D7.01     1       0          1  1  0
#> TCGA.4V.A9QQ.01     1       0          1  1  0
#> TCGA.X7.A8D6.01     1       0          1  1  0
#> TCGA.ZC.AAAF.01     2       0          1  0  1
#> TCGA.4X.A9FC.01     1       0          1  1  0
#> TCGA.3T.AA9L.01     1       0          1  1  0
#> TCGA.X7.A8DI.01     1       0          1  1  0
#> TCGA.4V.A9QU.01     2       0          1  0  1
#> TCGA.XM.A8R9.01     2       0          1  0  1
#> TCGA.X7.A8DE.01     2       0          1  0  1
#> TCGA.X7.A8D7.11     1       0          1  1  0
#> TCGA.X7.A8D6.11     2       0          1  0  1
#> TCGA.4V.A9QT.01     1       0          1  1  0
#> TCGA.XM.A8RE.01     1       0          1  1  0
#> TCGA.XM.A8RH.01     1       0          1  1  0
#> TCGA.X7.A8DD.01     1       0          1  1  0
#> TCGA.XU.AAY0.01     2       0          1  0  1
#> TCGA.XM.A8RB.01     1       0          1  1  0
#> TCGA.XM.A8RD.01     2       0          1  0  1
#> TCGA.XU.A92R.01     2       0          1  0  1
#> TCGA.YT.A95G.01     2       0          1  0  1
#> TCGA.XU.AAXV.01     2       0          1  0  1
#> TCGA.XU.AAXW.01     1       0          1  1  0
#> TCGA.X7.A8DB.01     1       0          1  1  0
#> TCGA.ZB.A96O.01     1       0          1  1  0
#> TCGA.XU.AAY1.01     1       0          1  1  0
#> TCGA.4V.A9QS.01     2       0          1  0  1
#> TCGA.4X.A9F9.01     1       0          1  1  0
#> TCGA.XU.A92Y.01     2       0          1  0  1

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>                 class entropy silhouette   p1   p2   p3
#> TCGA.XM.A8R8.01     3   0.628      0.353 0.00 0.46 0.54
#> TCGA.XU.AAXX.01     1   0.628      0.468 0.54 0.00 0.46
#> TCGA.ZT.A8OM.01     2   0.628      0.369 0.00 0.54 0.46
#> TCGA.3S.AAYX.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.5U.AB0F.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.ZB.A96D.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.4V.A9QX.01     2   0.628      0.369 0.00 0.54 0.46
#> TCGA.X7.A8D7.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.4V.A9QQ.01     3   0.966     -0.021 0.24 0.30 0.46
#> TCGA.X7.A8D6.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.ZC.AAAF.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.4X.A9FC.01     1   0.628      0.468 0.54 0.00 0.46
#> TCGA.3T.AA9L.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.X7.A8DI.01     1   0.628      0.468 0.54 0.00 0.46
#> TCGA.4V.A9QU.01     2   0.628      0.369 0.00 0.54 0.46
#> TCGA.XM.A8R9.01     3   0.628      0.353 0.00 0.46 0.54
#> TCGA.X7.A8DE.01     2   0.628      0.369 0.00 0.54 0.46
#> TCGA.X7.A8D7.11     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.X7.A8D6.11     3   0.628      0.353 0.00 0.46 0.54
#> TCGA.4V.A9QT.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.XM.A8RE.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.XM.A8RH.01     1   0.628      0.468 0.54 0.00 0.46
#> TCGA.X7.A8DD.01     1   0.334      0.746 0.88 0.00 0.12
#> TCGA.XU.AAY0.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.XM.A8RB.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.XM.A8RD.01     2   0.628      0.369 0.00 0.54 0.46
#> TCGA.XU.A92R.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.YT.A95G.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.XU.AAXV.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.XU.AAXW.01     1   0.628      0.468 0.54 0.00 0.46
#> TCGA.X7.A8DB.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.ZB.A96O.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.XU.AAY1.01     3   0.966     -0.021 0.24 0.30 0.46
#> TCGA.4V.A9QS.01     2   0.000      0.665 0.00 1.00 0.00
#> TCGA.4X.A9F9.01     1   0.000      0.814 1.00 0.00 0.00
#> TCGA.XU.A92Y.01     2   0.000      0.665 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
#> TCGA.XM.A8R8.01     3  0.0000      0.993 0.00 0.00 1.00 0.00
#> TCGA.XU.AAXX.01     4  0.0707      0.986 0.02 0.00 0.00 0.98
#> TCGA.ZT.A8OM.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.3S.AAYX.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.5U.AB0F.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.ZB.A96D.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.4V.A9QX.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.X7.A8D7.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QQ.01     4  0.0707      0.976 0.00 0.02 0.00 0.98
#> TCGA.X7.A8D6.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.ZC.AAAF.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.4X.A9FC.01     4  0.0707      0.976 0.00 0.02 0.00 0.98
#> TCGA.3T.AA9L.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.X7.A8DI.01     4  0.0707      0.986 0.02 0.00 0.00 0.98
#> TCGA.4V.A9QU.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.XM.A8R9.01     3  0.0707      0.986 0.00 0.00 0.98 0.02
#> TCGA.X7.A8DE.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.X7.A8D7.11     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.X7.A8D6.11     3  0.0000      0.993 0.00 0.00 1.00 0.00
#> TCGA.4V.A9QT.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RE.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RH.01     4  0.0707      0.986 0.02 0.00 0.00 0.98
#> TCGA.X7.A8DD.01     4  0.0707      0.986 0.02 0.00 0.00 0.98
#> TCGA.XU.AAY0.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RB.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RD.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.XU.A92R.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.YT.A95G.01     2  0.0707      0.981 0.00 0.98 0.00 0.02
#> TCGA.XU.AAXV.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.XU.AAXW.01     4  0.0707      0.986 0.02 0.00 0.00 0.98
#> TCGA.X7.A8DB.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.ZB.A96O.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.XU.AAY1.01     4  0.0707      0.976 0.00 0.02 0.00 0.98
#> TCGA.4V.A9QS.01     2  0.0000      0.997 0.00 1.00 0.00 0.00
#> TCGA.4X.A9F9.01     1  0.0000      1.000 1.00 0.00 0.00 0.00
#> TCGA.XU.A92Y.01     2  0.0707      0.981 0.00 0.98 0.00 0.02

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>                 class entropy silhouette   p1   p2   p3 p4   p5
#> TCGA.XM.A8R8.01     3   0.423      0.966 0.00 0.00 0.58  0 0.42
#> TCGA.XU.AAXX.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.ZT.A8OM.01     2   0.000      0.457 0.00 1.00 0.00  0 0.00
#> TCGA.3S.AAYX.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.5U.AB0F.01     5   0.431      0.781 0.00 0.50 0.00  0 0.50
#> TCGA.ZB.A96D.01     2   0.430     -0.792 0.00 0.52 0.00  0 0.48
#> TCGA.4V.A9QX.01     2   0.000      0.457 0.00 1.00 0.00  0 0.00
#> TCGA.X7.A8D7.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.4V.A9QQ.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.X7.A8D6.01     1   0.000      0.644 1.00 0.00 0.00  0 0.00
#> TCGA.ZC.AAAF.01     2   0.431     -0.852 0.00 0.50 0.00  0 0.50
#> TCGA.4X.A9FC.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.3T.AA9L.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.X7.A8DI.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.4V.A9QU.01     2   0.000      0.457 0.00 1.00 0.00  0 0.00
#> TCGA.XM.A8R9.01     3   0.430      0.943 0.00 0.00 0.52  0 0.48
#> TCGA.X7.A8DE.01     2   0.000      0.457 0.00 1.00 0.00  0 0.00
#> TCGA.X7.A8D7.11     1   0.000      0.644 1.00 0.00 0.00  0 0.00
#> TCGA.X7.A8D6.11     3   0.418      0.968 0.00 0.00 0.60  0 0.40
#> TCGA.4V.A9QT.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.XM.A8RE.01     1   0.000      0.644 1.00 0.00 0.00  0 0.00
#> TCGA.XM.A8RH.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.X7.A8DD.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.XU.AAY0.01     2   0.431     -0.852 0.00 0.50 0.00  0 0.50
#> TCGA.XM.A8RB.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.XM.A8RD.01     2   0.000      0.457 0.00 1.00 0.00  0 0.00
#> TCGA.XU.A92R.01     5   0.431      0.781 0.00 0.50 0.00  0 0.50
#> TCGA.YT.A95G.01     5   0.423      0.813 0.00 0.42 0.00  0 0.58
#> TCGA.XU.AAXV.01     2   0.430     -0.792 0.00 0.52 0.00  0 0.48
#> TCGA.XU.AAXW.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.X7.A8DB.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.ZB.A96O.01     1   0.418      0.883 0.60 0.00 0.40  0 0.00
#> TCGA.XU.AAY1.01     4   0.000      1.000 0.00 0.00 0.00  1 0.00
#> TCGA.4V.A9QS.01     2   0.430     -0.792 0.00 0.52 0.00  0 0.48
#> TCGA.4X.A9F9.01     1   0.413      0.875 0.62 0.00 0.38  0 0.00
#> TCGA.XU.A92Y.01     5   0.423      0.813 0.00 0.42 0.00  0 0.58

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6
#> TCGA.XM.A8R8.01     3  0.1267      0.900 0.00 0.00 0.94 0.00 0.00 0.06
#> TCGA.XU.AAXX.01     4  0.0000      0.869 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZT.A8OM.01     2  0.0547      1.000 0.00 0.98 0.00 0.00 0.02 0.00
#> TCGA.3S.AAYX.01     1  0.3869     -1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.5U.AB0F.01     5  0.0000      0.939 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.ZB.A96D.01     5  0.0547      0.936 0.00 0.02 0.00 0.00 0.98 0.00
#> TCGA.4V.A9QX.01     2  0.0547      1.000 0.00 0.98 0.00 0.00 0.02 0.00
#> TCGA.X7.A8D7.01     1  0.3869     -1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.4V.A9QQ.01     4  0.3076      0.869 0.00 0.00 0.00 0.76 0.00 0.24
#> TCGA.X7.A8D6.01     1  0.0000      0.339 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZC.AAAF.01     5  0.0547      0.936 0.00 0.00 0.00 0.00 0.98 0.02
#> TCGA.4X.A9FC.01     4  0.3076      0.869 0.00 0.00 0.00 0.76 0.00 0.24
#> TCGA.3T.AA9L.01     6  0.3869      1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.X7.A8DI.01     4  0.3076      0.869 0.00 0.00 0.00 0.76 0.00 0.24
#> TCGA.4V.A9QU.01     2  0.0547      1.000 0.00 0.98 0.00 0.00 0.02 0.00
#> TCGA.XM.A8R9.01     3  0.2981      0.844 0.00 0.02 0.82 0.00 0.00 0.16
#> TCGA.X7.A8DE.01     2  0.0547      1.000 0.00 0.98 0.00 0.00 0.02 0.00
#> TCGA.X7.A8D7.11     1  0.0000      0.339 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D6.11     3  0.0000      0.908 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QT.01     6  0.3869      1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.XM.A8RE.01     1  0.0000      0.339 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RH.01     4  0.0000      0.869 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.X7.A8DD.01     4  0.0000      0.869 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XU.AAY0.01     5  0.0000      0.939 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.XM.A8RB.01     6  0.3869      1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.XM.A8RD.01     2  0.0547      1.000 0.00 0.98 0.00 0.00 0.02 0.00
#> TCGA.XU.A92R.01     5  0.0547      0.936 0.00 0.00 0.00 0.00 0.98 0.02
#> TCGA.YT.A95G.01     5  0.2981      0.826 0.00 0.02 0.00 0.00 0.82 0.16
#> TCGA.XU.AAXV.01     5  0.1092      0.931 0.00 0.02 0.00 0.00 0.96 0.02
#> TCGA.XU.AAXW.01     4  0.0000      0.869 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.X7.A8DB.01     6  0.3869      1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.ZB.A96O.01     1  0.3869     -1.000 0.50 0.00 0.00 0.00 0.00 0.50
#> TCGA.XU.AAY1.01     4  0.3076      0.869 0.00 0.00 0.00 0.76 0.00 0.24
#> TCGA.4V.A9QS.01     5  0.1092      0.931 0.00 0.02 0.00 0.00 0.96 0.02
#> TCGA.4X.A9F9.01     1  0.3864     -0.920 0.52 0.00 0.00 0.00 0.00 0.48
#> TCGA.XU.A92Y.01     5  0.2981      0.826 0.00 0.02 0.00 0.00 0.82 0.16

show/hide code output

cbind(get_classes(res, k = 7), get_membership(res, k = 7))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7
#> TCGA.XM.A8R8.01     3  0.3370      0.774 0.16 0.00 0.78 0.00 0.00 0.00 0.06
#> TCGA.XU.AAXX.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.ZT.A8OM.01     2  0.0504      1.000 0.00 0.98 0.00 0.00 0.02 0.00 0.00
#> TCGA.3S.AAYX.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.5U.AB0F.01     5  0.0000      0.901 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A96D.01     5  0.0504      0.896 0.00 0.02 0.00 0.00 0.98 0.00 0.00
#> TCGA.4V.A9QX.01     2  0.0504      1.000 0.00 0.98 0.00 0.00 0.02 0.00 0.00
#> TCGA.X7.A8D7.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.4V.A9QQ.01     7  0.4328      0.934 0.06 0.00 0.00 0.34 0.00 0.00 0.60
#> TCGA.X7.A8D6.01     1  0.3139      1.000 0.70 0.00 0.00 0.00 0.00 0.30 0.00
#> TCGA.ZC.AAAF.01     5  0.1006      0.892 0.02 0.00 0.00 0.00 0.96 0.00 0.02
#> TCGA.4X.A9FC.01     7  0.3294      0.978 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.3T.AA9L.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.X7.A8DI.01     7  0.3294      0.978 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.4V.A9QU.01     2  0.0504      1.000 0.00 0.98 0.00 0.00 0.02 0.00 0.00
#> TCGA.XM.A8R9.01     3  0.3680      0.752 0.06 0.02 0.78 0.00 0.00 0.00 0.14
#> TCGA.X7.A8DE.01     2  0.0504      1.000 0.00 0.98 0.00 0.00 0.02 0.00 0.00
#> TCGA.X7.A8D7.11     1  0.3139      1.000 0.70 0.00 0.00 0.00 0.00 0.30 0.00
#> TCGA.X7.A8D6.11     3  0.0000      0.821 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QT.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.XM.A8RE.01     1  0.3139      1.000 0.70 0.00 0.00 0.00 0.00 0.30 0.00
#> TCGA.XM.A8RH.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8DD.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.AAY0.01     5  0.0000      0.901 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RB.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.XM.A8RD.01     2  0.0504      1.000 0.00 0.98 0.00 0.00 0.02 0.00 0.00
#> TCGA.XU.A92R.01     5  0.1006      0.892 0.02 0.00 0.00 0.00 0.96 0.00 0.02
#> TCGA.YT.A95G.01     5  0.4479      0.645 0.06 0.02 0.00 0.00 0.66 0.00 0.26
#> TCGA.XU.AAXV.01     5  0.0504      0.896 0.00 0.02 0.00 0.00 0.98 0.00 0.00
#> TCGA.XU.AAXW.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8DB.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.ZB.A96O.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.XU.AAY1.01     7  0.3294      0.978 0.00 0.00 0.00 0.34 0.00 0.00 0.66
#> TCGA.4V.A9QS.01     5  0.0000      0.901 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.4X.A9F9.01     6  0.0504      0.971 0.02 0.00 0.00 0.00 0.00 0.98 0.00
#> TCGA.XU.A92Y.01     5  0.4479      0.645 0.06 0.02 0.00 0.00 0.66 0.00 0.26

show/hide code output

cbind(get_classes(res, k = 8), get_membership(res, k = 8))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7   p8
#> TCGA.XM.A8R8.01     3  0.4856      0.574 0.24 0.00 0.62 0.08 0.00 0.00 0.00 0.06
#> TCGA.XU.AAXX.01     4  0.2756      0.947 0.00 0.00 0.00 0.74 0.00 0.00 0.26 0.00
#> TCGA.ZT.A8OM.01     2  0.0000      0.981 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.3S.AAYX.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.5U.AB0F.01     5  0.0000      0.895 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.ZB.A96D.01     5  0.0941      0.882 0.00 0.02 0.00 0.00 0.96 0.00 0.00 0.02
#> TCGA.4V.A9QX.01     2  0.0000      0.981 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D7.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.4V.A9QQ.01     7  0.0471      0.980 0.00 0.00 0.00 0.00 0.00 0.00 0.98 0.02
#> TCGA.X7.A8D6.01     1  0.2938      0.931 0.70 0.00 0.00 0.00 0.00 0.30 0.00 0.00
#> TCGA.ZC.AAAF.01     5  0.1341      0.859 0.00 0.00 0.00 0.08 0.92 0.00 0.00 0.00
#> TCGA.4X.A9FC.01     7  0.0000      0.993 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.3T.AA9L.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.X7.A8DI.01     7  0.0000      0.993 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.4V.A9QU.01     2  0.0471      0.979 0.00 0.98 0.00 0.00 0.00 0.00 0.00 0.02
#> TCGA.XM.A8R9.01     3  0.3015      0.457 0.00 0.00 0.68 0.00 0.00 0.00 0.00 0.32
#> TCGA.X7.A8DE.01     2  0.0471      0.979 0.00 0.98 0.00 0.00 0.00 0.00 0.00 0.02
#> TCGA.X7.A8D7.11     1  0.4857      0.857 0.52 0.00 0.00 0.00 0.00 0.30 0.00 0.18
#> TCGA.X7.A8D6.11     3  0.0000      0.670 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QT.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RE.01     1  0.2938      0.931 0.70 0.00 0.00 0.00 0.00 0.30 0.00 0.00
#> TCGA.XM.A8RH.01     4  0.4191      0.947 0.02 0.00 0.00 0.66 0.00 0.00 0.26 0.06
#> TCGA.X7.A8DD.01     4  0.4191      0.947 0.02 0.00 0.00 0.66 0.00 0.00 0.26 0.06
#> TCGA.XU.AAY0.01     5  0.0000      0.895 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RB.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RD.01     2  0.0941      0.959 0.00 0.96 0.00 0.02 0.00 0.00 0.00 0.02
#> TCGA.XU.A92R.01     5  0.1341      0.859 0.00 0.00 0.00 0.08 0.92 0.00 0.00 0.00
#> TCGA.YT.A95G.01     8  0.3142      1.000 0.00 0.00 0.00 0.00 0.36 0.00 0.00 0.64
#> TCGA.XU.AAXV.01     5  0.2132      0.841 0.04 0.00 0.00 0.08 0.88 0.00 0.00 0.00
#> TCGA.XU.AAXW.01     4  0.2756      0.947 0.00 0.00 0.00 0.74 0.00 0.00 0.26 0.00
#> TCGA.X7.A8DB.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A96O.01     6  0.0000      0.996 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XU.AAY1.01     7  0.0000      0.993 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.4V.A9QS.01     5  0.2132      0.841 0.04 0.00 0.00 0.08 0.88 0.00 0.00 0.00
#> TCGA.4X.A9F9.01     6  0.0471      0.970 0.02 0.00 0.00 0.00 0.00 0.98 0.00 0.00
#> TCGA.XU.A92Y.01     8  0.3142      1.000 0.00 0.00 0.00 0.00 0.36 0.00 0.00 0.64

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-012-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

plot of chunk tab-node-012-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-node-012-consensus-heatmap-5

consensus_heatmap(res, k = 7)

plot of chunk tab-node-012-consensus-heatmap-6

consensus_heatmap(res, k = 8)

plot of chunk tab-node-012-consensus-heatmap-7

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-012-membership-heatmap-1

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

plot of chunk tab-node-012-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-node-012-membership-heatmap-5

membership_heatmap(res, k = 7)

plot of chunk tab-node-012-membership-heatmap-6

membership_heatmap(res, k = 8)

plot of chunk tab-node-012-membership-heatmap-7

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.

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

plot of chunk tab-node-012-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-node-012-get-signatures-5

get_signatures(res, k = 7)

plot of chunk tab-node-012-get-signatures-6

get_signatures(res, k = 8)

plot of chunk tab-node-012-get-signatures-7

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk node-012-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-012-dimension-reduction-1

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

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

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

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

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

plot of chunk tab-node-012-dimension-reduction-4

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

plot of chunk tab-node-012-dimension-reduction-5

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

plot of chunk tab-node-012-dimension-reduction-6

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

plot of chunk tab-node-012-dimension-reduction-7

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-012-collect-classes

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 , Node021-leaf , Node022-leaf , Node023-leaf , Node024-leaf , Node031-leaf , Node032-leaf , Node033-leaf , Node034-leaf , Node041-leaf , Node042-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, 5, 6, 7, 8.
#>   On a matrix with 30000 rows and 19 columns.
#>   Top rows (1000) are extracted by 'SD' method.
#>   Subgroups are detected by 'kmeans' method.
#>   Performed in total 350 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-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 0.135           0.425       0.754         0.4960 0.474   0.474
#> 3 3 0.374           0.669       0.820         0.3763 0.690   0.430
#> 4 4 0.906           0.961       0.953         0.1411 0.836   0.517
#> 5 5 0.895           0.889       0.912         0.0486 1.000   1.000
#> 6 6 0.842           0.842       0.858         0.0325 0.977   0.889
#> 7 7 0.830           0.792       0.848         0.0339 0.942   0.688
#> 8 8 0.825           0.565       0.776         0.0207 0.977   0.818

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 4

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
#> TCGA.ZB.A965.01     2   0.999      0.391 0.48 0.52
#> TCGA.ZB.A96C.01     2   0.680      0.397 0.18 0.82
#> TCGA.ZB.A969.01     2   0.722      0.373 0.20 0.80
#> TCGA.XM.AAZ2.01     1   0.925      0.405 0.66 0.34
#> TCGA.XM.A8RG.01     1   0.000      0.646 1.00 0.00
#> TCGA.3G.AB0Q.01     1   0.990     -0.252 0.56 0.44
#> TCGA.4X.A9FA.01     1   0.680      0.490 0.82 0.18
#> TCGA.XM.A8RF.01     1   0.995      0.255 0.54 0.46
#> TCGA.ZL.A9V6.01     1   0.000      0.646 1.00 0.00
#> TCGA.XU.A92O.01     1   0.000      0.646 1.00 0.00
#> TCGA.ZB.A962.01     2   0.904      0.500 0.32 0.68
#> TCGA.YT.A95D.01     2   0.680      0.397 0.18 0.82
#> TCGA.ZB.A96L.01     2   0.722      0.373 0.20 0.80
#> TCGA.ZB.A96H.01     1   0.141      0.625 0.98 0.02
#> TCGA.XU.A92T.01     2   0.904      0.500 0.32 0.68
#> TCGA.3G.AB19.01     1   0.995      0.255 0.54 0.46
#> TCGA.XM.AAZ3.01     1   0.000      0.646 1.00 0.00
#> TCGA.ZB.A964.01     2   0.999      0.391 0.48 0.52
#> TCGA.XU.A92Q.01     2   0.999      0.391 0.48 0.52

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>                 class entropy silhouette   p1   p2   p3
#> TCGA.ZB.A965.01     2   0.000      1.000 0.00 1.00 0.00
#> TCGA.ZB.A96C.01     3   0.788      0.489 0.10 0.26 0.64
#> TCGA.ZB.A969.01     3   0.383      0.604 0.02 0.10 0.88
#> TCGA.XM.AAZ2.01     1   0.613      0.233 0.60 0.00 0.40
#> TCGA.XM.A8RG.01     1   0.296      0.789 0.90 0.10 0.00
#> TCGA.3G.AB0Q.01     3   0.991      0.217 0.30 0.30 0.40
#> TCGA.4X.A9FA.01     1   0.685      0.241 0.60 0.02 0.38
#> TCGA.XM.A8RF.01     3   0.540      0.446 0.28 0.00 0.72
#> TCGA.ZL.A9V6.01     1   0.296      0.789 0.90 0.10 0.00
#> TCGA.XU.A92O.01     1   0.296      0.789 0.90 0.10 0.00
#> TCGA.ZB.A962.01     2   0.000      1.000 0.00 1.00 0.00
#> TCGA.YT.A95D.01     3   0.788      0.489 0.10 0.26 0.64
#> TCGA.ZB.A96L.01     3   0.383      0.604 0.02 0.10 0.88
#> TCGA.ZB.A96H.01     1   0.296      0.789 0.90 0.10 0.00
#> TCGA.XU.A92T.01     2   0.000      1.000 0.00 1.00 0.00
#> TCGA.3G.AB19.01     3   0.540      0.446 0.28 0.00 0.72
#> TCGA.XM.AAZ3.01     1   0.296      0.789 0.90 0.10 0.00
#> TCGA.ZB.A964.01     2   0.000      1.000 0.00 1.00 0.00
#> TCGA.XU.A92Q.01     2   0.000      1.000 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
#> TCGA.ZB.A965.01     2  0.1913      0.965 0.00 0.94 0.04 0.02
#> TCGA.ZB.A96C.01     4  0.2011      0.953 0.00 0.08 0.00 0.92
#> TCGA.ZB.A969.01     3  0.1211      0.936 0.00 0.00 0.96 0.04
#> TCGA.XM.AAZ2.01     4  0.2706      0.913 0.08 0.02 0.00 0.90
#> TCGA.XM.A8RG.01     1  0.0000      0.990 1.00 0.00 0.00 0.00
#> TCGA.3G.AB0Q.01     4  0.2011      0.953 0.00 0.08 0.00 0.92
#> TCGA.4X.A9FA.01     4  0.2335      0.931 0.06 0.02 0.00 0.92
#> TCGA.XM.A8RF.01     3  0.3198      0.937 0.04 0.00 0.88 0.08
#> TCGA.ZL.A9V6.01     1  0.0000      0.990 1.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     1  0.0000      0.990 1.00 0.00 0.00 0.00
#> TCGA.ZB.A962.01     2  0.0000      0.975 0.00 1.00 0.00 0.00
#> TCGA.YT.A95D.01     4  0.2011      0.953 0.00 0.08 0.00 0.92
#> TCGA.ZB.A96L.01     3  0.1211      0.936 0.00 0.00 0.96 0.04
#> TCGA.ZB.A96H.01     1  0.1211      0.960 0.96 0.00 0.04 0.00
#> TCGA.XU.A92T.01     2  0.0707      0.986 0.00 0.98 0.00 0.02
#> TCGA.3G.AB19.01     3  0.3198      0.937 0.04 0.00 0.88 0.08
#> TCGA.XM.AAZ3.01     1  0.0000      0.990 1.00 0.00 0.00 0.00
#> TCGA.ZB.A964.01     2  0.0707      0.986 0.00 0.98 0.00 0.02
#> TCGA.XU.A92Q.01     2  0.0707      0.986 0.00 0.98 0.00 0.02

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>                 class entropy silhouette   p1   p2   p3   p4   p5
#> TCGA.ZB.A965.01     2   0.165      0.899 0.02 0.94 0.04 0.00 0.00
#> TCGA.ZB.A96C.01     4   0.293      0.885 0.00 0.00 0.18 0.82 0.00
#> TCGA.ZB.A969.01     5   0.000      0.817 0.00 0.00 0.00 0.00 1.00
#> TCGA.XM.AAZ2.01     4   0.000      0.925 0.00 0.00 0.00 1.00 0.00
#> TCGA.XM.A8RG.01     1   0.252      0.904 0.86 0.00 0.14 0.00 0.00
#> TCGA.3G.AB0Q.01     4   0.000      0.925 0.00 0.00 0.00 1.00 0.00
#> TCGA.4X.A9FA.01     4   0.000      0.925 0.00 0.00 0.00 1.00 0.00
#> TCGA.XM.A8RF.01     5   0.406      0.817 0.00 0.00 0.36 0.00 0.64
#> TCGA.ZL.A9V6.01     1   0.000      0.948 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     1   0.000      0.948 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A962.01     2   0.368      0.741 0.00 0.72 0.28 0.00 0.00
#> TCGA.YT.A95D.01     4   0.293      0.885 0.00 0.00 0.18 0.82 0.00
#> TCGA.ZB.A96L.01     5   0.000      0.817 0.00 0.00 0.00 0.00 1.00
#> TCGA.ZB.A96H.01     1   0.104      0.932 0.96 0.00 0.04 0.00 0.00
#> TCGA.XU.A92T.01     2   0.000      0.928 0.00 1.00 0.00 0.00 0.00
#> TCGA.3G.AB19.01     5   0.406      0.817 0.00 0.00 0.36 0.00 0.64
#> TCGA.XM.AAZ3.01     1   0.173      0.933 0.92 0.00 0.08 0.00 0.00
#> TCGA.ZB.A964.01     2   0.000      0.928 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2   0.000      0.928 0.00 1.00 0.00 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6
#> TCGA.ZB.A965.01     2  0.3073      0.787 0.00 0.84 0.08 0.00 0.00 0.08
#> TCGA.ZB.A96C.01     4  0.0000      0.771 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A969.01     6  0.3647      1.000 0.00 0.00 0.00 0.00 0.36 0.64
#> TCGA.XM.AAZ2.01     4  0.4144      0.811 0.00 0.00 0.36 0.62 0.00 0.02
#> TCGA.XM.A8RG.01     1  0.4067      0.762 0.70 0.00 0.26 0.00 0.00 0.04
#> TCGA.3G.AB0Q.01     4  0.3499      0.839 0.00 0.00 0.32 0.68 0.00 0.00
#> TCGA.4X.A9FA.01     4  0.3499      0.839 0.00 0.00 0.32 0.68 0.00 0.00
#> TCGA.XM.A8RF.01     5  0.0000      0.978 0.00 0.00 0.00 0.00 1.00 0.00
#> TCGA.ZL.A9V6.01     1  0.0000      0.874 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     1  0.0000      0.874 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A962.01     2  0.5712      0.491 0.00 0.52 0.26 0.00 0.00 0.22
#> TCGA.YT.A95D.01     4  0.0000      0.771 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A96L.01     6  0.3647      1.000 0.00 0.00 0.00 0.00 0.36 0.64
#> TCGA.ZB.A96H.01     1  0.2474      0.814 0.88 0.00 0.08 0.00 0.00 0.04
#> TCGA.XU.A92T.01     2  0.0547      0.852 0.00 0.98 0.00 0.00 0.00 0.02
#> TCGA.3G.AB19.01     5  0.0547      0.978 0.00 0.00 0.02 0.00 0.98 0.00
#> TCGA.XM.AAZ3.01     1  0.2790      0.842 0.84 0.00 0.14 0.00 0.00 0.02
#> TCGA.ZB.A964.01     2  0.0000      0.856 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000      0.856 0.00 1.00 0.00 0.00 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 7), get_membership(res, k = 7))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7
#> TCGA.ZB.A965.01     2  0.5086      0.458 0.00 0.64 0.22 0.00 0.00 0.06 0.08
#> TCGA.ZB.A96C.01     7  0.3358      1.000 0.00 0.00 0.00 0.36 0.00 0.00 0.64
#> TCGA.ZB.A969.01     6  0.2832      0.981 0.00 0.00 0.00 0.00 0.24 0.76 0.00
#> TCGA.XM.AAZ2.01     4  0.1928      0.872 0.00 0.00 0.00 0.90 0.00 0.08 0.02
#> TCGA.XM.A8RG.01     1  0.5412      0.601 0.60 0.00 0.08 0.00 0.00 0.08 0.24
#> TCGA.3G.AB0Q.01     4  0.0000      0.937 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.4X.A9FA.01     4  0.0000      0.937 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RF.01     5  0.0504      0.981 0.00 0.00 0.02 0.00 0.98 0.00 0.00
#> TCGA.ZL.A9V6.01     1  0.0000      0.781 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92O.01     1  0.0000      0.781 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A962.01     3  0.3221      0.000 0.00 0.32 0.68 0.00 0.00 0.00 0.00
#> TCGA.YT.A95D.01     7  0.3358      1.000 0.00 0.00 0.00 0.36 0.00 0.00 0.64
#> TCGA.ZB.A96L.01     6  0.3307      0.981 0.00 0.00 0.00 0.00 0.24 0.74 0.02
#> TCGA.ZB.A96H.01     1  0.4457      0.575 0.72 0.00 0.16 0.00 0.00 0.06 0.06
#> TCGA.XU.A92T.01     2  0.0504      0.809 0.00 0.98 0.02 0.00 0.00 0.00 0.00
#> TCGA.3G.AB19.01     5  0.0000      0.981 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.AAZ3.01     1  0.3086      0.738 0.80 0.00 0.04 0.00 0.00 0.00 0.16
#> TCGA.ZB.A964.01     2  0.0000      0.812 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.0000      0.812 0.00 1.00 0.00 0.00 0.00 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 8), get_membership(res, k = 8))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7   p8
#> TCGA.ZB.A965.01     2  0.4756      0.373 0.00 0.56 0.00 0.00 0.00 0.04 0.06 0.34
#> TCGA.ZB.A96C.01     7  0.3193      1.000 0.00 0.00 0.00 0.38 0.00 0.00 0.62 0.00
#> TCGA.ZB.A969.01     6  0.3299      0.944 0.00 0.00 0.00 0.00 0.18 0.76 0.06 0.00
#> TCGA.XM.AAZ2.01     4  0.3637      0.730 0.00 0.00 0.04 0.80 0.00 0.02 0.06 0.08
#> TCGA.XM.A8RG.01     1  0.5532      0.255 0.64 0.00 0.08 0.00 0.00 0.10 0.10 0.08
#> TCGA.3G.AB0Q.01     4  0.0000      0.864 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FA.01     4  0.0000      0.864 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RF.01     5  0.3185      0.833 0.00 0.00 0.04 0.00 0.82 0.00 0.08 0.06
#> TCGA.ZL.A9V6.01     1  0.3318     -0.246 0.54 0.00 0.00 0.00 0.00 0.00 0.00 0.46
#> TCGA.XU.A92O.01     1  0.3318     -0.246 0.54 0.00 0.00 0.00 0.00 0.00 0.00 0.46
#> TCGA.ZB.A962.01     3  0.2114      0.000 0.00 0.16 0.84 0.00 0.00 0.00 0.00 0.00
#> TCGA.YT.A95D.01     7  0.3193      1.000 0.00 0.00 0.00 0.38 0.00 0.00 0.62 0.00
#> TCGA.ZB.A96L.01     6  0.2267      0.944 0.00 0.00 0.00 0.00 0.18 0.82 0.00 0.00
#> TCGA.ZB.A96H.01     8  0.2938      0.000 0.30 0.00 0.00 0.00 0.00 0.00 0.00 0.70
#> TCGA.XU.A92T.01     2  0.0941      0.770 0.00 0.96 0.02 0.00 0.00 0.00 0.02 0.00
#> TCGA.3G.AB19.01     5  0.0000      0.833 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.AAZ3.01     1  0.0000      0.287 1.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A964.01     2  0.0808      0.771 0.00 0.96 0.04 0.00 0.00 0.00 0.00 0.00
#> TCGA.XU.A92Q.01     2  0.1408      0.767 0.00 0.94 0.02 0.00 0.00 0.02 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-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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

consensus_heatmap(res, k = 7)

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

consensus_heatmap(res, k = 8)

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

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

membership_heatmap(res, k = 7)

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

membership_heatmap(res, k = 8)

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

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.

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

get_signatures(res, k = 7)

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

get_signatures(res, k = 8)

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-02-collect-classes

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 , Node021-leaf , Node022-leaf , Node023-leaf , Node024-leaf , Node031-leaf , Node032-leaf , Node033-leaf , Node034-leaf , Node041-leaf , Node042-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, 5, 6, 7, 8.
#>   On a matrix with 30000 rows and 24 columns.
#>   Top rows (1000) are extracted by 'SD' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 350 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-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.482           0.935       0.945         0.5121 0.482   0.482
#> 3 3 1.000           1.000       1.000         0.3590 0.714   0.466
#> 4 4 1.000           0.998       0.996         0.0777 0.946   0.821
#> 5 5 0.945           0.916       0.967         0.0420 0.975   0.899
#> 6 6 0.853           0.820       0.907         0.0386 1.000   1.000
#> 7 7 0.866           0.645       0.883         0.0325 0.953   0.790
#> 8 8 0.846           0.636       0.873         0.0223 0.986   0.918

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] 3

There is also optional best \(k\) = 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
#> TCGA.ZB.A96K.01     2   0.529      0.943 0.12 0.88
#> TCGA.XU.A930.01     1   0.000      0.959 1.00 0.00
#> TCGA.ZB.A96M.01     2   0.000      0.910 0.00 1.00
#> TCGA.ZB.A96Q.01     2   0.529      0.943 0.12 0.88
#> TCGA.X7.A8D9.01     2   0.000      0.910 0.00 1.00
#> TCGA.5V.A9RR.01     2   0.529      0.943 0.12 0.88
#> TCGA.ZB.A961.01     1   0.000      0.959 1.00 0.00
#> TCGA.XM.A8RC.01     1   0.000      0.959 1.00 0.00
#> TCGA.X7.A8M1.01     2   0.529      0.943 0.12 0.88
#> TCGA.4X.A9FD.01     1   0.529      0.891 0.88 0.12
#> TCGA.5K.AAAP.01     2   0.529      0.943 0.12 0.88
#> TCGA.XU.A92X.01     1   0.000      0.959 1.00 0.00
#> TCGA.5G.A9ZZ.01     1   0.529      0.891 0.88 0.12
#> TCGA.3G.AB14.01     1   0.000      0.959 1.00 0.00
#> TCGA.YT.A95F.01     2   0.000      0.910 0.00 1.00
#> TCGA.4V.A9QR.01     1   0.529      0.891 0.88 0.12
#> TCGA.XM.A8RI.01     1   0.000      0.959 1.00 0.00
#> TCGA.4V.A9QL.01     2   0.000      0.910 0.00 1.00
#> TCGA.X7.A8M0.01     2   0.000      0.910 0.00 1.00
#> TCGA.ZB.A96F.01     1   0.000      0.959 1.00 0.00
#> TCGA.X7.A8D8.01     2   0.529      0.943 0.12 0.88
#> TCGA.4V.A9QM.01     2   0.529      0.943 0.12 0.88
#> TCGA.5U.AB0E.01     1   0.000      0.959 1.00 0.00
#> TCGA.ZB.A96E.01     2   0.529      0.943 0.12 0.88

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>                 class entropy silhouette p1 p2 p3
#> TCGA.ZB.A96K.01     2       0          1  0  1  0
#> TCGA.XU.A930.01     1       0          1  1  0  0
#> TCGA.ZB.A96M.01     3       0          1  0  0  1
#> TCGA.ZB.A96Q.01     2       0          1  0  1  0
#> TCGA.X7.A8D9.01     3       0          1  0  0  1
#> TCGA.5V.A9RR.01     2       0          1  0  1  0
#> TCGA.ZB.A961.01     1       0          1  1  0  0
#> TCGA.XM.A8RC.01     1       0          1  1  0  0
#> TCGA.X7.A8M1.01     2       0          1  0  1  0
#> TCGA.4X.A9FD.01     3       0          1  0  0  1
#> TCGA.5K.AAAP.01     2       0          1  0  1  0
#> TCGA.XU.A92X.01     1       0          1  1  0  0
#> TCGA.5G.A9ZZ.01     3       0          1  0  0  1
#> TCGA.3G.AB14.01     1       0          1  1  0  0
#> TCGA.YT.A95F.01     3       0          1  0  0  1
#> TCGA.4V.A9QR.01     3       0          1  0  0  1
#> TCGA.XM.A8RI.01     1       0          1  1  0  0
#> TCGA.4V.A9QL.01     3       0          1  0  0  1
#> TCGA.X7.A8M0.01     3       0          1  0  0  1
#> TCGA.ZB.A96F.01     1       0          1  1  0  0
#> TCGA.X7.A8D8.01     2       0          1  0  1  0
#> TCGA.4V.A9QM.01     2       0          1  0  1  0
#> TCGA.5U.AB0E.01     1       0          1  1  0  0
#> TCGA.ZB.A96E.01     2       0          1  0  1  0

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>                 class entropy silhouette   p1 p2   p3   p4
#> TCGA.ZB.A96K.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.XU.A930.01     1  0.0707      0.985 0.98  0 0.00 0.02
#> TCGA.ZB.A96M.01     3  0.0000      1.000 0.00  0 1.00 0.00
#> TCGA.ZB.A96Q.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.X7.A8D9.01     3  0.0000      1.000 0.00  0 1.00 0.00
#> TCGA.5V.A9RR.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.ZB.A961.01     1  0.0707      0.985 0.98  0 0.00 0.02
#> TCGA.XM.A8RC.01     1  0.0000      0.995 1.00  0 0.00 0.00
#> TCGA.X7.A8M1.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4X.A9FD.01     4  0.0707      1.000 0.00  0 0.02 0.98
#> TCGA.5K.AAAP.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.XU.A92X.01     1  0.0000      0.995 1.00  0 0.00 0.00
#> TCGA.5G.A9ZZ.01     4  0.0707      1.000 0.00  0 0.02 0.98
#> TCGA.3G.AB14.01     1  0.0000      0.995 1.00  0 0.00 0.00
#> TCGA.YT.A95F.01     3  0.0000      1.000 0.00  0 1.00 0.00
#> TCGA.4V.A9QR.01     4  0.0707      1.000 0.00  0 0.02 0.98
#> TCGA.XM.A8RI.01     1  0.0000      0.995 1.00  0 0.00 0.00
#> TCGA.4V.A9QL.01     3  0.0000      1.000 0.00  0 1.00 0.00
#> TCGA.X7.A8M0.01     3  0.0000      1.000 0.00  0 1.00 0.00
#> TCGA.ZB.A96F.01     1  0.0000      0.995 1.00  0 0.00 0.00
#> TCGA.X7.A8D8.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.4V.A9QM.01     2  0.0000      1.000 0.00  1 0.00 0.00
#> TCGA.5U.AB0E.01     1  0.0000      0.995 1.00  0 0.00 0.00
#> TCGA.ZB.A96E.01     2  0.0000      1.000 0.00  1 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>                 class entropy silhouette   p1   p2   p3   p4   p5
#> TCGA.ZB.A96K.01     2  0.0000      0.967 0.00 1.00 0.00 0.00 0.00
#> TCGA.XU.A930.01     5  0.2929      0.000 0.18 0.00 0.00 0.00 0.82
#> TCGA.ZB.A96M.01     3  0.0000      0.989 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A96Q.01     2  0.1732      0.938 0.00 0.92 0.00 0.00 0.08
#> TCGA.X7.A8D9.01     3  0.0000      0.989 0.00 0.00 1.00 0.00 0.00
#> TCGA.5V.A9RR.01     2  0.0000      0.967 0.00 1.00 0.00 0.00 0.00
#> TCGA.ZB.A961.01     1  0.1410      0.904 0.94 0.00 0.00 0.00 0.06
#> TCGA.XM.A8RC.01     1  0.2020      0.903 0.90 0.00 0.00 0.00 0.10
#> TCGA.X7.A8M1.01     2  0.0000      0.967 0.00 1.00 0.00 0.00 0.00
#> TCGA.4X.A9FD.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00
#> TCGA.5K.AAAP.01     2  0.1410      0.948 0.00 0.94 0.00 0.00 0.06
#> TCGA.XU.A92X.01     1  0.0000      0.938 1.00 0.00 0.00 0.00 0.00
#> TCGA.5G.A9ZZ.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00
#> TCGA.3G.AB14.01     1  0.1043      0.930 0.96 0.00 0.00 0.00 0.04
#> TCGA.YT.A95F.01     3  0.0000      0.989 0.00 0.00 1.00 0.00 0.00
#> TCGA.4V.A9QR.01     4  0.0000      1.000 0.00 0.00 0.00 1.00 0.00
#> TCGA.XM.A8RI.01     1  0.2020      0.903 0.90 0.00 0.00 0.00 0.10
#> TCGA.4V.A9QL.01     3  0.0000      0.989 0.00 0.00 1.00 0.00 0.00
#> TCGA.X7.A8M0.01     3  0.1043      0.954 0.00 0.00 0.96 0.04 0.00
#> TCGA.ZB.A96F.01     1  0.0000      0.938 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8D8.01     2  0.0000      0.967 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QM.01     2  0.0000      0.967 0.00 1.00 0.00 0.00 0.00
#> TCGA.5U.AB0E.01     1  0.0609      0.931 0.98 0.00 0.00 0.00 0.02
#> TCGA.ZB.A96E.01     2  0.2280      0.911 0.00 0.88 0.00 0.00 0.12

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6
#> TCGA.ZB.A96K.01     2  0.1814      0.860 0.00 0.90 0.00 0.00 0.10 0.00
#> TCGA.XU.A930.01     6  0.0937      0.000 0.04 0.00 0.00 0.00 0.00 0.96
#> TCGA.ZB.A96M.01     3  0.0000      0.966 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.ZB.A96Q.01     2  0.2790      0.789 0.00 0.84 0.00 0.00 0.14 0.02
#> TCGA.X7.A8D9.01     3  0.0000      0.966 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.5V.A9RR.01     2  0.2454      0.847 0.00 0.84 0.00 0.00 0.16 0.00
#> TCGA.ZB.A961.01     1  0.4873      0.409 0.52 0.00 0.00 0.00 0.42 0.06
#> TCGA.XM.A8RC.01     1  0.2728      0.803 0.86 0.00 0.00 0.00 0.10 0.04
#> TCGA.X7.A8M1.01     2  0.0000      0.854 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4X.A9FD.01     4  0.0547      0.977 0.00 0.00 0.00 0.98 0.02 0.00
#> TCGA.5K.AAAP.01     2  0.1556      0.831 0.00 0.92 0.00 0.00 0.08 0.00
#> TCGA.XU.A92X.01     1  0.1807      0.843 0.92 0.00 0.00 0.00 0.06 0.02
#> TCGA.5G.A9ZZ.01     4  0.0547      0.977 0.00 0.00 0.00 0.98 0.02 0.00
#> TCGA.3G.AB14.01     1  0.1556      0.842 0.92 0.00 0.00 0.00 0.08 0.00
#> TCGA.YT.A95F.01     3  0.0000      0.966 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.4V.A9QR.01     4  0.0000      0.983 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.XM.A8RI.01     1  0.2512      0.826 0.88 0.00 0.00 0.00 0.06 0.06
#> TCGA.4V.A9QL.01     3  0.0000      0.966 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.X7.A8M0.01     3  0.2794      0.852 0.00 0.00 0.86 0.06 0.08 0.00
#> TCGA.ZB.A96F.01     1  0.0937      0.850 0.96 0.00 0.00 0.00 0.04 0.00
#> TCGA.X7.A8D8.01     2  0.2454      0.847 0.00 0.84 0.00 0.00 0.16 0.00
#> TCGA.4V.A9QM.01     2  0.2260      0.853 0.00 0.86 0.00 0.00 0.14 0.00
#> TCGA.5U.AB0E.01     1  0.1092      0.851 0.96 0.00 0.00 0.00 0.02 0.02
#> TCGA.ZB.A96E.01     2  0.3679      0.722 0.00 0.76 0.00 0.00 0.20 0.04

show/hide code output

cbind(get_classes(res, k = 7), get_membership(res, k = 7))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7
#> TCGA.ZB.A96K.01     2  0.0863     0.7733 0.00 0.96 0.00 0.00 0.00 0.00 0.04
#> TCGA.XU.A930.01     6  0.0504     0.0000 0.02 0.00 0.00 0.00 0.00 0.98 0.00
#> TCGA.ZB.A96M.01     3  0.0000     0.9126 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96Q.01     2  0.3496    -0.0681 0.00 0.58 0.00 0.00 0.00 0.00 0.42
#> TCGA.X7.A8D9.01     3  0.0000     0.9126 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.5V.A9RR.01     2  0.0504     0.7796 0.00 0.98 0.00 0.00 0.00 0.00 0.02
#> TCGA.ZB.A961.01     5  0.3413     0.0000 0.38 0.00 0.00 0.00 0.62 0.00 0.00
#> TCGA.XM.A8RC.01     1  0.4107     0.6165 0.70 0.00 0.00 0.00 0.24 0.02 0.04
#> TCGA.X7.A8M1.01     2  0.0863     0.7714 0.00 0.96 0.00 0.00 0.00 0.00 0.04
#> TCGA.4X.A9FD.01     4  0.0000     0.9818 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.5K.AAAP.01     2  0.3139     0.3934 0.00 0.70 0.00 0.00 0.00 0.00 0.30
#> TCGA.XU.A92X.01     1  0.1671     0.6934 0.90 0.00 0.00 0.00 0.10 0.00 0.00
#> TCGA.5G.A9ZZ.01     4  0.1006     0.9633 0.00 0.00 0.00 0.96 0.02 0.00 0.02
#> TCGA.3G.AB14.01     1  0.2278     0.6982 0.88 0.00 0.00 0.00 0.08 0.00 0.04
#> TCGA.YT.A95F.01     3  0.0000     0.9126 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QR.01     4  0.0000     0.9818 0.00 0.00 0.00 1.00 0.00 0.00 0.00
#> TCGA.XM.A8RI.01     1  0.3863     0.6453 0.74 0.00 0.00 0.00 0.20 0.04 0.02
#> TCGA.4V.A9QL.01     3  0.0000     0.9126 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M0.01     3  0.5507     0.5747 0.00 0.00 0.64 0.06 0.10 0.02 0.18
#> TCGA.ZB.A96F.01     1  0.1006     0.7359 0.96 0.00 0.00 0.00 0.02 0.00 0.02
#> TCGA.X7.A8D8.01     2  0.0863     0.7691 0.00 0.96 0.00 0.00 0.00 0.00 0.04
#> TCGA.4V.A9QM.01     2  0.0504     0.7796 0.00 0.98 0.00 0.00 0.00 0.00 0.02
#> TCGA.5U.AB0E.01     1  0.1006     0.7447 0.96 0.00 0.00 0.00 0.02 0.00 0.02
#> TCGA.ZB.A96E.01     7  0.3517     0.0000 0.00 0.28 0.00 0.00 0.02 0.00 0.70

show/hide code output

cbind(get_classes(res, k = 8), get_membership(res, k = 8))
#>                 class entropy silhouette   p1   p2   p3   p4   p5   p6   p7   p8
#> TCGA.ZB.A96K.01     2  0.0941      0.740 0.00 0.96 0.00 0.00 0.00 0.00 0.02 0.02
#> TCGA.XU.A930.01     6  0.0000      0.000 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00
#> TCGA.ZB.A96M.01     3  0.0000      1.000 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.ZB.A96Q.01     2  0.3318     -0.118 0.00 0.54 0.00 0.00 0.00 0.00 0.46 0.00
#> TCGA.X7.A8D9.01     3  0.0000      1.000 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5V.A9RR.01     2  0.1887      0.699 0.00 0.90 0.00 0.00 0.00 0.00 0.06 0.04
#> TCGA.ZB.A961.01     5  0.0471      0.000 0.02 0.00 0.00 0.00 0.98 0.00 0.00 0.00
#> TCGA.XM.A8RC.01     1  0.5024      0.673 0.64 0.00 0.00 0.00 0.02 0.04 0.10 0.20
#> TCGA.X7.A8M1.01     2  0.1765      0.698 0.00 0.88 0.00 0.00 0.00 0.00 0.12 0.00
#> TCGA.4X.A9FD.01     4  0.1607      0.910 0.00 0.00 0.00 0.92 0.00 0.00 0.04 0.04
#> TCGA.5K.AAAP.01     2  0.3291      0.469 0.00 0.70 0.00 0.00 0.00 0.00 0.28 0.02
#> TCGA.XU.A92X.01     1  0.3054      0.763 0.80 0.00 0.00 0.00 0.12 0.00 0.00 0.08
#> TCGA.5G.A9ZZ.01     4  0.1091      0.918 0.00 0.00 0.00 0.94 0.00 0.00 0.00 0.06
#> TCGA.3G.AB14.01     1  0.2591      0.786 0.86 0.00 0.00 0.00 0.02 0.00 0.08 0.04
#> TCGA.YT.A95F.01     3  0.0000      1.000 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.4V.A9QR.01     4  0.0000      0.935 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00
#> TCGA.XM.A8RI.01     1  0.4202      0.748 0.74 0.00 0.00 0.00 0.02 0.04 0.06 0.14
#> TCGA.4V.A9QL.01     3  0.0000      1.000 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.X7.A8M0.01     8  0.3618      0.000 0.00 0.00 0.38 0.02 0.00 0.00 0.00 0.60
#> TCGA.ZB.A96F.01     1  0.1741      0.793 0.92 0.00 0.00 0.00 0.02 0.00 0.04 0.02
#> TCGA.X7.A8D8.01     2  0.1557      0.713 0.00 0.92 0.00 0.00 0.00 0.00 0.06 0.02
#> TCGA.4V.A9QM.01     2  0.0000      0.741 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00
#> TCGA.5U.AB0E.01     1  0.1804      0.783 0.90 0.00 0.00 0.00 0.08 0.02 0.00 0.00
#> TCGA.ZB.A96E.01     7  0.3404      0.000 0.00 0.24 0.00 0.00 0.00 0.00 0.72 0.04

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

consensus_heatmap(res, k = 5)

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

consensus_heatmap(res, k = 6)

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

consensus_heatmap(res, k = 7)

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

consensus_heatmap(res, k = 8)

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

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

membership_heatmap(res, k = 5)

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

membership_heatmap(res, k = 6)

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

membership_heatmap(res, k = 7)

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

membership_heatmap(res, k = 8)

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

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.

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

get_signatures(res, k = 5)

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

get_signatures(res, k = 6)

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

get_signatures(res, k = 7)

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

get_signatures(res, k = 8)

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

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

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

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

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

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

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

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

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

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

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-03-collect-classes

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.


Node04

Parent node: Node0. Child nodes: Node011-leaf , Node012 , Node021-leaf , Node022-leaf , Node023-leaf , Node024-leaf , Node031-leaf , Node032-leaf , Node033-leaf , Node034-leaf , Node041-leaf , Node042-leaf .

The object with results only for a single top-value method and a single partitioning method can be extracted as:

res = res_rh["04"]

A summary of res and all the functions that can be applied to it:

res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6, 7, 8.
#>   On a matrix with 30000 rows and 14 columns.
#>   Top rows (1000) are extracted by 'ATC' method.
#>   Subgroups are detected by 'skmeans' method.
#>   Performed in total 350 partitions by row resampling.
#>   Best k for subgroups seems to be 7.
#> 
#> 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-04-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-04-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           1.000       1.000         0.5389 0.462   0.462
#> 3 3 1.000           0.929       1.000         0.1222 0.934   0.857
#> 4 4 1.000           0.920       0.997         0.1787 0.890   0.722
#> 5 5 0.901           0.749       0.966         0.0338 0.989   0.962
#> 6 6 0.945           0.753       0.989         0.0977 0.912   0.680
#> 7 7 0.901           0.723       0.973         0.0788 0.934   0.647
#> 8 8 0.912           0.528       0.950         0.0291 0.989   0.909

suggest_best_k() suggests the best \(k\) based on these statistics. The rules are as follows:

suggest_best_k(res)
#> [1] 7
#> attr(,"optional")
#> [1] 2 4 6

There is also optional best \(k\) = 2 4 6 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
#> TCGA.3S.A8YW.01     1       0          1  1  0
#> TCGA.4V.A9QN.01     2       0          1  0  1
#> TCGA.XU.A936.01     1       0          1  1  0
#> TCGA.XU.A931.01     2       0          1  0  1
#> TCGA.XU.A92Z.01     2       0          1  0  1
#> TCGA.5U.AB0D.01     1       0          1  1  0
#> TCGA.ZB.A96V.01     1       0          1  1  0
#> TCGA.ZB.A96I.01     2       0          1  0  1
#> TCGA.X7.A8M5.01     2       0          1  0  1
#> TCGA.ZB.A966.01     1       0          1  1  0
#> TCGA.XU.A92V.01     2       0          1  0  1
#> TCGA.XU.A933.01     1       0          1  1  0
#> TCGA.ZC.AAA7.01     1       0          1  1  0
#> TCGA.X7.A8M3.01     2       0          1  0  1

show/hide code output

cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#>                 class entropy silhouette p1 p2 p3
#> TCGA.3S.A8YW.01     1       0          1  1  0  0
#> TCGA.4V.A9QN.01     2       0          1  0  1  0
#> TCGA.XU.A936.01     1       0          1  1  0  0
#> TCGA.XU.A931.01     2       0          1  0  1  0
#> TCGA.XU.A92Z.01     3       0          0  0  0  1
#> TCGA.5U.AB0D.01     1       0          1  1  0  0
#> TCGA.ZB.A96V.01     1       0          1  1  0  0
#> TCGA.ZB.A96I.01     2       0          1  0  1  0
#> TCGA.X7.A8M5.01     2       0          1  0  1  0
#> TCGA.ZB.A966.01     1       0          1  1  0  0
#> TCGA.XU.A92V.01     2       0          1  0  1  0
#> TCGA.XU.A933.01     1       0          1  1  0  0
#> TCGA.ZC.AAA7.01     1       0          1  1  0  0
#> TCGA.X7.A8M3.01     2       0          1  0  1  0

show/hide code output

cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#>                 class entropy silhouette   p1 p2 p3   p4
#> TCGA.3S.A8YW.01     1   0.000      1.000 1.00  0  0 0.00
#> TCGA.4V.A9QN.01     2   0.000      1.000 0.00  1  0 0.00
#> TCGA.XU.A936.01     4   0.121      0.938 0.04  0  0 0.96
#> TCGA.XU.A931.01     2   0.000      1.000 0.00  1  0 0.00
#> TCGA.XU.A92Z.01     3   0.000      0.000 0.00  0  1 0.00
#> TCGA.5U.AB0D.01     1   0.000      1.000 1.00  0  0 0.00
#> TCGA.ZB.A96V.01     1   0.000      1.000 1.00  0  0 0.00
#> TCGA.ZB.A96I.01     2   0.000      1.000 0.00  1  0 0.00
#> TCGA.X7.A8M5.01     2   0.000      1.000 0.00  1  0 0.00
#> TCGA.ZB.A966.01     4   0.000      0.938 0.00  0  0 1.00
#> TCGA.XU.A92V.01     2   0.000      1.000 0.00  1  0 0.00
#> TCGA.XU.A933.01     1   0.000      1.000 1.00  0  0 0.00
#> TCGA.ZC.AAA7.01     1   0.000      1.000 1.00  0  0 0.00
#> TCGA.X7.A8M3.01     2   0.000      1.000 0.00  1  0 0.00

show/hide code output

cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#>                 class entropy silhouette   p1   p2 p3   p4   p5
#> TCGA.3S.A8YW.01     1  0.0000      1.000 1.00 0.00  0 0.00 0.00
#> TCGA.4V.A9QN.01     2  0.0000      0.938 0.00 1.00  0 0.00 0.00
#> TCGA.XU.A936.01     4  0.0609      0.000 0.02 0.00  0 0.98 0.00
#> TCGA.XU.A931.01     2  0.0000      0.938 0.00 1.00  0 0.00 0.00
#> TCGA.XU.A92Z.01     3  0.0000      0.000 0.00 0.00  1 0.00 0.00
#> TCGA.5U.AB0D.01     1  0.0000      1.000 1.00 0.00  0 0.00 0.00
#> TCGA.ZB.A96V.01     1  0.0000      1.000 1.00 0.00  0 0.00 0.00
#> TCGA.ZB.A96I.01     2  0.0000      0.938 0.00 1.00  0 0.00 0.00
#> TCGA.X7.A8M5.01     2  0.3106      0.870 0.00 0.84  0 0.02 0.14
#> TCGA.ZB.A966.01     5  0.2516      0.000 0.00 0.00  0 0.14 0.86
#> TCGA.XU.A92V.01     2  0.3106      0.870 0.00 0.84  0 0.02 0.14
#> TCGA.XU.A933.01     1  0.0000      1.000 1.00 0.00  0 0.00 0.00
#> TCGA.ZC.AAA7.01     1  0.0000      1.000 1.00 0.00  0 0.00 0.00
#> TCGA.X7.A8M3.01     2  0.0000      0.938 0.00 1.00  0 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#>                 class entropy silhouette p1   p2 p3 p4 p5   p6
#> TCGA.3S.A8YW.01     1  0.0000      1.000  1 0.00  0  0  0 0.00
#> TCGA.4V.A9QN.01     2  0.0000      0.993  0 1.00  0  0  0 0.00
#> TCGA.XU.A936.01     4  0.0000      0.000  0 0.00  0  1  0 0.00
#> TCGA.XU.A931.01     2  0.0000      0.993  0 1.00  0  0  0 0.00
#> TCGA.XU.A92Z.01     3  0.0000      0.000  0 0.00  1  0  0 0.00
#> TCGA.5U.AB0D.01     1  0.0000      1.000  1 0.00  0  0  0 0.00
#> TCGA.ZB.A96V.01     1  0.0000      1.000  1 0.00  0  0  0 0.00
#> TCGA.ZB.A96I.01     2  0.0547      0.978  0 0.98  0  0  0 0.02
#> TCGA.X7.A8M5.01     6  0.0000      0.793  0 0.00  0  0  0 1.00
#> TCGA.ZB.A966.01     5  0.0000      0.000  0 0.00  0  0  1 0.00
#> TCGA.XU.A92V.01     6  0.2260      0.796  0 0.14  0  0  0 0.86
#> TCGA.XU.A933.01     1  0.0000      1.000  1 0.00  0  0  0 0.00
#> TCGA.ZC.AAA7.01     1  0.0000      1.000  1 0.00  0  0  0 0.00
#> TCGA.X7.A8M3.01     2  0.0000      0.993  0 1.00  0  0  0 0.00

show/hide code output

cbind(get_classes(res, k = 7), get_membership(res, k = 7))
#>                 class entropy silhouette   p1   p2 p3 p4 p5   p6   p7
#> TCGA.3S.A8YW.01     1  0.0000      1.000 1.00 0.00  0  0  0 0.00 0.00
#> TCGA.4V.A9QN.01     2  0.0000      0.970 0.00 1.00  0  0  0 0.00 0.00
#> TCGA.XU.A936.01     4  0.0000      0.000 0.00 0.00  0  1  0 0.00 0.00
#> TCGA.XU.A931.01     2  0.0000      0.970 0.00 1.00  0  0  0 0.00 0.00
#> TCGA.XU.A92Z.01     3  0.0000      0.000 0.00 0.00  1  0  0 0.00 0.00
#> TCGA.5U.AB0D.01     1  0.0000      1.000 1.00 0.00  0  0  0 0.00 0.00
#> TCGA.ZB.A96V.01     7  0.0504      0.811 0.02 0.00  0  0  0 0.00 0.98
#> TCGA.ZB.A96I.01     2  0.1433      0.906 0.00 0.92  0  0  0 0.08 0.00
#> TCGA.X7.A8M5.01     6  0.0000      0.843 0.00 0.00  0  0  0 1.00 0.00
#> TCGA.ZB.A966.01     5  0.0000      0.000 0.00 0.00  0  0  1 0.00 0.00
#> TCGA.XU.A92V.01     6  0.2163      0.844 0.00 0.10  0  0  0 0.88 0.02
#> TCGA.XU.A933.01     1  0.0000      1.000 1.00 0.00  0  0  0 0.00 0.00
#> TCGA.ZC.AAA7.01     7  0.2259      0.813 0.16 0.00  0  0  0 0.00 0.84
#> TCGA.X7.A8M3.01     2  0.0000      0.970 0.00 1.00  0  0  0 0.00 0.00

show/hide code output

cbind(get_classes(res, k = 8), get_membership(res, k = 8))
#>                 class entropy silhouette   p1   p2 p3 p4 p5   p6   p7   p8
#> TCGA.3S.A8YW.01     1   0.000      1.000 1.00 0.00  0  0  0 0.00 0.00 0.00
#> TCGA.4V.A9QN.01     2   0.000      0.818 0.00 1.00  0  0  0 0.00 0.00 0.00
#> TCGA.XU.A936.01     4   0.000      0.000 0.00 0.00  0  1  0 0.00 0.00 0.00
#> TCGA.XU.A931.01     2   0.109      0.805 0.00 0.94  0  0  0 0.00 0.00 0.06
#> TCGA.XU.A92Z.01     3   0.000      0.000 0.00 0.00  1  0  0 0.00 0.00 0.00
#> TCGA.5U.AB0D.01     1   0.000      1.000 1.00 0.00  0  0  0 0.00 0.00 0.00
#> TCGA.ZB.A96V.01     7   0.000      0.839 0.00 0.00  0  0  0 0.00 1.00 0.00
#> TCGA.ZB.A96I.01     2   0.332      0.273 0.00 0.54  0  0  0 0.00 0.00 0.46
#> TCGA.X7.A8M5.01     6   0.000      0.000 0.00 0.00  0  0  0 1.00 0.00 0.00
#> TCGA.ZB.A966.01     5   0.000      0.000 0.00 0.00  0  0  1 0.00 0.00 0.00
#> TCGA.XU.A92V.01     8   0.109      0.000 0.00 0.00  0  0  0 0.06 0.00 0.94
#> TCGA.XU.A933.01     1   0.000      1.000 1.00 0.00  0  0  0 0.00 0.00 0.00
#> TCGA.ZC.AAA7.01     7   0.176      0.840 0.12 0.00  0  0  0 0.00 0.88 0.00
#> TCGA.X7.A8M3.01     2   0.000      0.818 0.00 1.00  0  0  0 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-04-consensus-heatmap-1

consensus_heatmap(res, k = 3)

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

consensus_heatmap(res, k = 4)

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

consensus_heatmap(res, k = 5)

plot of chunk tab-node-04-consensus-heatmap-4

consensus_heatmap(res, k = 6)

plot of chunk tab-node-04-consensus-heatmap-5

consensus_heatmap(res, k = 7)

plot of chunk tab-node-04-consensus-heatmap-6

consensus_heatmap(res, k = 8)

plot of chunk tab-node-04-consensus-heatmap-7

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-04-membership-heatmap-1

membership_heatmap(res, k = 3)

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

membership_heatmap(res, k = 4)

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

membership_heatmap(res, k = 5)

plot of chunk tab-node-04-membership-heatmap-4

membership_heatmap(res, k = 6)

plot of chunk tab-node-04-membership-heatmap-5

membership_heatmap(res, k = 7)

plot of chunk tab-node-04-membership-heatmap-6

membership_heatmap(res, k = 8)

plot of chunk tab-node-04-membership-heatmap-7

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.

get_signatures(res, k = 2)

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

get_signatures(res, k = 3)

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

get_signatures(res, k = 4)

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

get_signatures(res, k = 5)

plot of chunk tab-node-04-get-signatures-4

get_signatures(res, k = 6)

plot of chunk tab-node-04-get-signatures-5

get_signatures(res, k = 7)

plot of chunk tab-node-04-get-signatures-6

get_signatures(res, k = 8)

plot of chunk tab-node-04-get-signatures-7

Compare the overlap of signatures from different k:

compare_signatures(res)

plot of chunk node-04-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-04-dimension-reduction-1

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

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

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

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

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

plot of chunk tab-node-04-dimension-reduction-4

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

plot of chunk tab-node-04-dimension-reduction-5

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

plot of chunk tab-node-04-dimension-reduction-6

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

plot of chunk tab-node-04-dimension-reduction-7

Following heatmap shows how subgroups are split when increasing k:

collect_classes(res)

plot of chunk node-04-collect-classes

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      stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] genefilter_1.74.0    ComplexHeatmap_2.8.0 markdown_1.1         knitr_1.33          
#> [5] matrixStats_0.59.0   cola_1.9.4          
#> 
#> loaded via a namespace (and not attached):
#>   [1] bitops_1.0-7           bit64_4.0.5            doParallel_1.0.16      RColorBrewer_1.1-2    
#>   [5] httr_1.4.2             GenomeInfoDb_1.28.1    data.tree_1.0.0        tools_4.1.0           
#>   [9] utf8_1.2.1             R6_2.5.0               irlba_2.3.3            DBI_1.1.1             
#>  [13] BiocGenerics_0.38.0    colorspace_2.0-2       GetoptLong_1.0.5       gridExtra_2.3         
#>  [17] tidyselect_1.1.1       bit_4.0.4              compiler_4.1.0         Biobase_2.52.0        
#>  [21] Cairo_1.5-12.2         xml2_1.3.2             microbenchmark_1.4-7   slam_0.1-48           
#>  [25] scales_1.1.1           askpass_1.1            stringr_1.4.0          digest_0.6.27         
#>  [29] XVector_0.32.0         pkgconfig_2.0.3        umap_0.2.7.0           fastmap_1.1.0         
#>  [33] highr_0.9              rlang_0.4.11           GlobalOptions_0.1.2    rstudioapi_0.13       
#>  [37] RSQLite_2.2.7          impute_1.66.0          generics_0.1.0         shape_1.4.6           
#>  [41] jsonlite_1.7.2         mclust_5.4.7           dplyr_1.0.7            dendextend_1.15.1     
#>  [45] RCurl_1.98-1.3         magrittr_2.0.1         GenomeInfoDbData_1.2.6 Matrix_1.3-4          
#>  [49] fansi_0.5.0            Rcpp_1.0.7             munsell_0.5.0          S4Vectors_0.30.0      
#>  [53] viridis_0.6.1          reticulate_1.20        lifecycle_1.0.0        scatterplot3d_0.3-41  
#>  [57] stringi_1.7.3          zlibbioc_1.38.0        blob_1.2.1             parallel_4.1.0        
#>  [61] crayon_1.4.1           lattice_0.20-44        Biostrings_2.60.1      splines_4.1.0         
#>  [65] annotate_1.70.0        circlize_0.4.13        KEGGREST_1.32.0        polylabelr_0.2.0      
#>  [69] pillar_1.6.1           rjson_0.2.20           codetools_0.2-18       stats4_4.1.0          
#>  [73] XML_3.99-0.6           glue_1.4.2             evaluate_0.14          png_0.1-7             
#>  [77] vctrs_0.3.8            foreach_1.5.1          polyclip_1.10-0        purrr_0.3.4           
#>  [81] gtable_0.3.0           openssl_1.4.4          assertthat_0.2.1       clue_0.3-59           
#>  [85] cachem_1.0.5           ggplot2_3.3.5          xfun_0.24              eulerr_6.1.0          
#>  [89] xtable_1.8-4           skmeans_0.2-13         RSpectra_0.16-0        viridisLite_0.4.0     
#>  [93] survival_3.2-11        tibble_3.1.2           Polychrome_1.3.1       iterators_1.0.13      
#>  [97] AnnotationDbi_1.54.1   memoise_2.0.0          IRanges_2.26.0         cluster_2.1.2         
#> [101] ellipsis_0.3.2         brew_1.0-6