Date: 2019-12-25 20:17:16 CET, cola version: 1.3.2
Document is loading...
All available functions which can be applied to this res_list
object:
res_list
#> A 'ConsensusPartitionList' object with 24 methods.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows are extracted by 'SD, CV, MAD, ATC' methods.
#> Subgroups are detected by 'hclust, kmeans, skmeans, pam, mclust, NMF' method.
#> Number of partitions are tried for k = 2, 3, 4, 5, 6.
#> Performed in total 30000 partitions by row resampling.
#>
#> Following methods can be applied to this 'ConsensusPartitionList' object:
#> [1] "cola_report" "collect_classes" "collect_plots" "collect_stats"
#> [5] "colnames" "functional_enrichment" "get_anno_col" "get_anno"
#> [9] "get_classes" "get_matrix" "get_membership" "get_stats"
#> [13] "is_best_k" "is_stable_k" "ncol" "nrow"
#> [17] "rownames" "show" "suggest_best_k" "test_to_known_factors"
#> [21] "top_rows_heatmap" "top_rows_overlap"
#>
#> You can get result for a single method by, e.g. object["SD", "hclust"] or object["SD:hclust"]
#> or a subset of methods by object[c("SD", "CV")], c("hclust", "kmeans")]
The call of run_all_consensus_partition_methods()
was:
#> run_all_consensus_partition_methods(data = mat, mc.cores = 4, anno = anno)
Dimension of the input matrix:
mat = get_matrix(res_list)
dim(mat)
#> [1] 21168 105
The density distribution for each sample is visualized as in one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.
library(ComplexHeatmap)
densityHeatmap(mat, top_annotation = HeatmapAnnotation(df = get_anno(res_list),
col = get_anno_col(res_list)), ylab = "value", cluster_columns = TRUE, show_column_names = FALSE,
mc.cores = 4)
Folowing table shows the best k
(number of partitions) for each combination
of top-value methods and partition methods. Clicking on the method name in
the table goes to the section for a single combination of methods.
The cola vignette explains the definition of the metrics used for determining the best number of partitions.
suggest_best_k(res_list)
The best k | 1-PAC | Mean silhouette | Concordance | Optional k | ||
---|---|---|---|---|---|---|
MAD:mclust | 2 | 1.000 | 0.992 | 0.996 | ** | |
ATC:kmeans | 2 | 1.000 | 0.980 | 0.986 | ** | |
ATC:mclust | 2 | 1.000 | 0.970 | 0.977 | ** | |
ATC:NMF | 2 | 1.000 | 0.964 | 0.985 | ** | |
SD:mclust | 5 | 0.994 | 0.946 | 0.974 | ** | 2,3 |
SD:skmeans | 3 | 0.984 | 0.944 | 0.972 | ** | |
CV:skmeans | 3 | 0.981 | 0.943 | 0.974 | ** | |
ATC:pam | 6 | 0.951 | 0.901 | 0.962 | ** | 2,4,5 |
ATC:skmeans | 5 | 0.948 | 0.926 | 0.966 | * | 2,3 |
MAD:skmeans | 3 | 0.920 | 0.883 | 0.945 | * | |
MAD:NMF | 2 | 0.900 | 0.919 | 0.966 | * | |
SD:NMF | 2 | 0.899 | 0.925 | 0.968 | ||
SD:pam | 4 | 0.890 | 0.917 | 0.962 | ||
MAD:pam | 4 | 0.882 | 0.892 | 0.956 | ||
CV:NMF | 2 | 0.875 | 0.921 | 0.965 | ||
CV:pam | 5 | 0.860 | 0.854 | 0.931 | ||
CV:kmeans | 3 | 0.789 | 0.919 | 0.942 | ||
CV:mclust | 2 | 0.694 | 0.945 | 0.963 | ||
ATC:hclust | 2 | 0.666 | 0.877 | 0.934 | ||
CV:hclust | 4 | 0.548 | 0.738 | 0.825 | ||
MAD:hclust | 2 | 0.418 | 0.734 | 0.864 | ||
SD:hclust | 3 | 0.402 | 0.772 | 0.845 | ||
MAD:kmeans | 2 | 0.375 | 0.871 | 0.908 | ||
SD:kmeans | 2 | 0.309 | 0.853 | 0.898 |
**: 1-PAC > 0.95, *: 1-PAC > 0.9
Cumulative distribution function curves of consensus matrix for all methods.
collect_plots(res_list, fun = plot_ecdf)
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)
Signature heatmaps for all methods. (What is a signature heatmap?)
Note in following heatmaps, rows are scaled.
collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)
The statistics used for measuring the stability of consensus partitioning. (How are they defined?)
get_stats(res_list, k = 2)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 2 0.899 0.925 0.968 0.479 0.519 0.519
#> CV:NMF 2 0.875 0.921 0.965 0.487 0.508 0.508
#> MAD:NMF 2 0.900 0.919 0.966 0.483 0.512 0.512
#> ATC:NMF 2 1.000 0.964 0.985 0.469 0.534 0.534
#> SD:skmeans 2 0.766 0.887 0.951 0.493 0.512 0.512
#> CV:skmeans 2 0.686 0.768 0.912 0.502 0.495 0.495
#> MAD:skmeans 2 0.761 0.897 0.952 0.494 0.508 0.508
#> ATC:skmeans 2 1.000 0.988 0.996 0.483 0.519 0.519
#> SD:mclust 2 1.000 0.988 0.996 0.432 0.572 0.572
#> CV:mclust 2 0.694 0.945 0.963 0.440 0.572 0.572
#> MAD:mclust 2 1.000 0.992 0.996 0.429 0.572 0.572
#> ATC:mclust 2 1.000 0.970 0.977 0.453 0.545 0.545
#> SD:kmeans 2 0.309 0.853 0.898 0.418 0.558 0.558
#> CV:kmeans 2 0.312 0.687 0.841 0.414 0.558 0.558
#> MAD:kmeans 2 0.375 0.871 0.908 0.424 0.558 0.558
#> ATC:kmeans 2 1.000 0.980 0.986 0.441 0.558 0.558
#> SD:pam 2 0.411 0.770 0.873 0.476 0.505 0.505
#> CV:pam 2 0.353 0.765 0.836 0.436 0.529 0.529
#> MAD:pam 2 0.436 0.799 0.832 0.471 0.534 0.534
#> ATC:pam 2 0.978 0.960 0.983 0.466 0.534 0.534
#> SD:hclust 2 0.380 0.787 0.875 0.371 0.605 0.605
#> CV:hclust 2 0.274 0.689 0.823 0.369 0.605 0.605
#> MAD:hclust 2 0.418 0.734 0.864 0.414 0.596 0.596
#> ATC:hclust 2 0.666 0.877 0.934 0.408 0.565 0.565
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.857 0.875 0.950 0.352 0.695 0.481
#> CV:NMF 3 0.844 0.868 0.944 0.352 0.706 0.485
#> MAD:NMF 3 0.860 0.882 0.946 0.358 0.697 0.475
#> ATC:NMF 3 0.782 0.874 0.940 0.362 0.714 0.515
#> SD:skmeans 3 0.984 0.944 0.972 0.338 0.711 0.496
#> CV:skmeans 3 0.981 0.943 0.974 0.314 0.766 0.562
#> MAD:skmeans 3 0.920 0.883 0.945 0.345 0.687 0.459
#> ATC:skmeans 3 0.972 0.931 0.969 0.353 0.788 0.606
#> SD:mclust 3 1.000 0.961 0.977 0.420 0.793 0.644
#> CV:mclust 3 0.773 0.928 0.955 0.299 0.832 0.712
#> MAD:mclust 3 0.631 0.793 0.881 0.288 0.810 0.669
#> ATC:mclust 3 0.499 0.597 0.791 0.352 0.692 0.496
#> SD:kmeans 3 0.617 0.775 0.872 0.413 0.726 0.551
#> CV:kmeans 3 0.789 0.919 0.942 0.442 0.726 0.551
#> MAD:kmeans 3 0.601 0.781 0.876 0.412 0.736 0.566
#> ATC:kmeans 3 0.630 0.778 0.852 0.401 0.773 0.603
#> SD:pam 3 0.638 0.851 0.910 0.251 0.861 0.728
#> CV:pam 3 0.653 0.804 0.905 0.366 0.850 0.718
#> MAD:pam 3 0.826 0.862 0.938 0.322 0.809 0.653
#> ATC:pam 3 0.623 0.751 0.866 0.352 0.694 0.483
#> SD:hclust 3 0.402 0.772 0.845 0.445 0.900 0.838
#> CV:hclust 3 0.378 0.676 0.822 0.464 0.827 0.725
#> MAD:hclust 3 0.378 0.679 0.785 0.371 0.914 0.857
#> ATC:hclust 3 0.692 0.833 0.903 0.298 0.919 0.859
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.791 0.800 0.909 0.145 0.780 0.467
#> CV:NMF 4 0.660 0.712 0.848 0.129 0.805 0.505
#> MAD:NMF 4 0.717 0.780 0.889 0.132 0.759 0.423
#> ATC:NMF 4 0.692 0.786 0.871 0.130 0.786 0.494
#> SD:skmeans 4 0.758 0.781 0.891 0.119 0.823 0.547
#> CV:skmeans 4 0.664 0.740 0.850 0.124 0.864 0.628
#> MAD:skmeans 4 0.686 0.730 0.865 0.118 0.827 0.548
#> ATC:skmeans 4 0.899 0.902 0.939 0.112 0.914 0.758
#> SD:mclust 4 0.745 0.773 0.861 0.102 0.689 0.376
#> CV:mclust 4 0.730 0.900 0.921 0.125 0.929 0.836
#> MAD:mclust 4 0.686 0.845 0.914 0.228 0.701 0.397
#> ATC:mclust 4 0.765 0.908 0.946 0.141 0.907 0.755
#> SD:kmeans 4 0.636 0.779 0.838 0.206 0.886 0.719
#> CV:kmeans 4 0.651 0.772 0.848 0.179 0.875 0.694
#> MAD:kmeans 4 0.620 0.727 0.818 0.198 0.791 0.529
#> ATC:kmeans 4 0.695 0.785 0.790 0.167 0.906 0.748
#> SD:pam 4 0.890 0.917 0.962 0.186 0.923 0.796
#> CV:pam 4 0.638 0.436 0.759 0.196 0.791 0.546
#> MAD:pam 4 0.882 0.892 0.956 0.126 0.917 0.783
#> ATC:pam 4 0.957 0.905 0.952 0.133 0.921 0.777
#> SD:hclust 4 0.463 0.663 0.778 0.296 0.764 0.556
#> CV:hclust 4 0.548 0.738 0.825 0.176 0.865 0.726
#> MAD:hclust 4 0.476 0.611 0.751 0.222 0.789 0.612
#> ATC:hclust 4 0.539 0.461 0.753 0.266 0.751 0.514
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.763 0.718 0.854 0.0784 0.872 0.556
#> CV:NMF 5 0.699 0.669 0.815 0.0745 0.855 0.510
#> MAD:NMF 5 0.714 0.693 0.836 0.0764 0.895 0.622
#> ATC:NMF 5 0.657 0.698 0.820 0.0934 0.853 0.519
#> SD:skmeans 5 0.705 0.613 0.800 0.0794 0.850 0.506
#> CV:skmeans 5 0.650 0.554 0.767 0.0763 0.873 0.567
#> MAD:skmeans 5 0.666 0.546 0.730 0.0731 0.862 0.536
#> ATC:skmeans 5 0.948 0.926 0.966 0.0895 0.896 0.645
#> SD:mclust 5 0.994 0.946 0.974 0.1646 0.873 0.604
#> CV:mclust 5 0.736 0.773 0.874 0.2068 0.821 0.532
#> MAD:mclust 5 0.785 0.454 0.716 0.1433 0.769 0.407
#> ATC:mclust 5 0.889 0.921 0.938 0.1258 0.871 0.599
#> SD:kmeans 5 0.751 0.810 0.855 0.1010 0.864 0.587
#> CV:kmeans 5 0.651 0.664 0.791 0.0967 0.870 0.601
#> MAD:kmeans 5 0.742 0.759 0.843 0.0940 0.803 0.432
#> ATC:kmeans 5 0.788 0.865 0.888 0.0929 0.890 0.640
#> SD:pam 5 0.871 0.911 0.952 0.1215 0.878 0.614
#> CV:pam 5 0.860 0.854 0.931 0.1114 0.809 0.477
#> MAD:pam 5 0.865 0.883 0.943 0.1204 0.876 0.620
#> ATC:pam 5 0.933 0.888 0.956 0.1182 0.885 0.619
#> SD:hclust 5 0.566 0.673 0.788 0.0633 0.958 0.864
#> CV:hclust 5 0.556 0.691 0.812 0.0966 0.968 0.915
#> MAD:hclust 5 0.558 0.683 0.782 0.0921 0.846 0.579
#> ATC:hclust 5 0.647 0.697 0.813 0.0882 0.823 0.516
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.763 0.591 0.766 0.0405 0.929 0.689
#> CV:NMF 6 0.729 0.608 0.789 0.0409 0.915 0.619
#> MAD:NMF 6 0.737 0.632 0.794 0.0407 0.916 0.621
#> ATC:NMF 6 0.706 0.632 0.789 0.0398 0.952 0.775
#> SD:skmeans 6 0.736 0.606 0.757 0.0414 0.901 0.581
#> CV:skmeans 6 0.677 0.507 0.707 0.0400 0.933 0.694
#> MAD:skmeans 6 0.706 0.634 0.772 0.0414 0.918 0.635
#> ATC:skmeans 6 0.894 0.856 0.925 0.0311 0.962 0.827
#> SD:mclust 6 0.873 0.841 0.894 0.0308 1.000 1.000
#> CV:mclust 6 0.758 0.780 0.843 0.0593 0.930 0.692
#> MAD:mclust 6 0.813 0.792 0.885 0.0509 0.868 0.513
#> ATC:mclust 6 0.806 0.746 0.864 0.0338 0.866 0.494
#> SD:kmeans 6 0.781 0.671 0.788 0.0484 0.972 0.870
#> CV:kmeans 6 0.704 0.670 0.785 0.0495 0.957 0.815
#> MAD:kmeans 6 0.756 0.776 0.834 0.0485 0.945 0.749
#> ATC:kmeans 6 0.850 0.749 0.857 0.0434 0.967 0.844
#> SD:pam 6 0.854 0.703 0.877 0.0375 0.936 0.715
#> CV:pam 6 0.841 0.778 0.894 0.0241 0.978 0.897
#> MAD:pam 6 0.867 0.747 0.877 0.0356 0.960 0.822
#> ATC:pam 6 0.951 0.901 0.962 0.0347 0.968 0.846
#> SD:hclust 6 0.622 0.657 0.760 0.0650 0.915 0.705
#> CV:hclust 6 0.611 0.523 0.726 0.0898 0.838 0.551
#> MAD:hclust 6 0.653 0.672 0.787 0.0534 0.980 0.913
#> ATC:hclust 6 0.663 0.653 0.798 0.0325 0.971 0.899
Following heatmap plots the partition for each combination of methods and the lightness correspond to the silhouette scores for samples in each method. On top the consensus subgroup is inferred from all methods by taking the mean silhouette scores as weight.
collect_stats(res_list, k = 2)
collect_stats(res_list, k = 3)
collect_stats(res_list, k = 4)
collect_stats(res_list, k = 5)
collect_stats(res_list, k = 6)
Collect partitions from all methods:
collect_classes(res_list, k = 2)
collect_classes(res_list, k = 3)
collect_classes(res_list, k = 4)
collect_classes(res_list, k = 5)
collect_classes(res_list, k = 6)
Overlap of top rows from different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "euler")
top_rows_overlap(res_list, top_n = 2000, method = "euler")
top_rows_overlap(res_list, top_n = 3000, method = "euler")
top_rows_overlap(res_list, top_n = 4000, method = "euler")
top_rows_overlap(res_list, top_n = 5000, method = "euler")
Also visualize the correspondance of rankings between different top-row methods:
top_rows_overlap(res_list, top_n = 1000, method = "correspondance")
top_rows_overlap(res_list, top_n = 2000, method = "correspondance")
top_rows_overlap(res_list, top_n = 3000, method = "correspondance")
top_rows_overlap(res_list, top_n = 4000, method = "correspondance")
top_rows_overlap(res_list, top_n = 5000, method = "correspondance")
Heatmaps of the top rows:
top_rows_heatmap(res_list, top_n = 1000)
top_rows_heatmap(res_list, top_n = 2000)
top_rows_heatmap(res_list, top_n = 3000)
top_rows_heatmap(res_list, top_n = 4000)
top_rows_heatmap(res_list, top_n = 5000)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res_list, k = 2)
#> n disease.state(p) k
#> SD:NMF 101 4.70e-12 2
#> CV:NMF 101 4.00e-11 2
#> MAD:NMF 102 7.44e-11 2
#> ATC:NMF 104 7.94e-12 2
#> SD:skmeans 102 2.24e-11 2
#> CV:skmeans 88 8.13e-12 2
#> MAD:skmeans 103 2.97e-10 2
#> ATC:skmeans 104 6.66e-11 2
#> SD:mclust 104 3.35e-14 2
#> CV:mclust 105 3.23e-14 2
#> MAD:mclust 105 3.23e-14 2
#> ATC:mclust 105 1.39e-11 2
#> SD:kmeans 105 3.75e-13 2
#> CV:kmeans 87 2.02e-14 2
#> MAD:kmeans 105 3.75e-13 2
#> ATC:kmeans 105 1.55e-11 2
#> SD:pam 101 1.32e-09 2
#> CV:pam 97 3.07e-11 2
#> MAD:pam 102 4.33e-12 2
#> ATC:pam 103 3.81e-12 2
#> SD:hclust 103 3.78e-13 2
#> CV:hclust 97 3.63e-15 2
#> MAD:hclust 97 5.54e-13 2
#> ATC:hclust 101 2.68e-12 2
test_to_known_factors(res_list, k = 3)
#> n disease.state(p) k
#> SD:NMF 98 1.05e-22 3
#> CV:NMF 99 1.09e-22 3
#> MAD:NMF 101 2.98e-22 3
#> ATC:NMF 101 2.81e-23 3
#> SD:skmeans 103 2.33e-22 3
#> CV:skmeans 103 1.00e-22 3
#> MAD:skmeans 99 1.19e-21 3
#> ATC:skmeans 102 5.92e-19 3
#> SD:mclust 105 3.47e-23 3
#> CV:mclust 104 1.86e-27 3
#> MAD:mclust 97 9.91e-27 3
#> ATC:mclust 61 8.46e-10 3
#> SD:kmeans 88 6.83e-21 3
#> CV:kmeans 105 1.08e-27 3
#> MAD:kmeans 103 1.13e-27 3
#> ATC:kmeans 101 8.08e-19 3
#> SD:pam 103 5.30e-26 3
#> CV:pam 99 7.59e-26 3
#> MAD:pam 100 3.50e-26 3
#> ATC:pam 93 2.31e-14 3
#> SD:hclust 99 7.00e-28 3
#> CV:hclust 86 2.70e-29 3
#> MAD:hclust 95 9.20e-28 3
#> ATC:hclust 99 1.77e-25 3
test_to_known_factors(res_list, k = 4)
#> n disease.state(p) k
#> SD:NMF 94 2.32e-31 4
#> CV:NMF 89 7.26e-25 4
#> MAD:NMF 95 1.58e-27 4
#> ATC:NMF 95 5.26e-28 4
#> SD:skmeans 93 3.58e-29 4
#> CV:skmeans 93 1.13e-27 4
#> MAD:skmeans 89 4.42e-28 4
#> ATC:skmeans 105 3.81e-29 4
#> SD:mclust 98 6.92e-31 4
#> CV:mclust 103 1.38e-30 4
#> MAD:mclust 102 4.92e-28 4
#> ATC:mclust 103 3.43e-31 4
#> SD:kmeans 95 6.75e-34 4
#> CV:kmeans 96 7.41e-36 4
#> MAD:kmeans 91 1.94e-32 4
#> ATC:kmeans 96 1.11e-28 4
#> SD:pam 102 4.46e-33 4
#> CV:pam 71 1.16e-26 4
#> MAD:pam 102 1.33e-33 4
#> ATC:pam 101 5.41e-28 4
#> SD:hclust 88 8.74e-26 4
#> CV:hclust 90 7.15e-35 4
#> MAD:hclust 69 4.32e-27 4
#> ATC:hclust 49 1.30e-19 4
test_to_known_factors(res_list, k = 5)
#> n disease.state(p) k
#> SD:NMF 86 3.55e-28 5
#> CV:NMF 84 5.63e-28 5
#> MAD:NMF 85 1.71e-25 5
#> ATC:NMF 86 1.14e-27 5
#> SD:skmeans 74 1.77e-25 5
#> CV:skmeans 61 1.57e-24 5
#> MAD:skmeans 66 1.58e-22 5
#> ATC:skmeans 102 1.67e-30 5
#> SD:mclust 104 1.99e-34 5
#> CV:mclust 95 4.58e-35 5
#> MAD:mclust 53 1.39e-18 5
#> ATC:mclust 102 5.23e-34 5
#> SD:kmeans 99 1.04e-34 5
#> CV:kmeans 85 1.47e-27 5
#> MAD:kmeans 92 7.29e-32 5
#> ATC:kmeans 101 3.73e-30 5
#> SD:pam 105 1.59e-39 5
#> CV:pam 97 1.14e-37 5
#> MAD:pam 102 1.93e-39 5
#> ATC:pam 99 6.00e-25 5
#> SD:hclust 82 9.69e-26 5
#> CV:hclust 89 2.02e-31 5
#> MAD:hclust 84 3.00e-32 5
#> ATC:hclust 90 5.45e-28 5
test_to_known_factors(res_list, k = 6)
#> n disease.state(p) k
#> SD:NMF 61 1.54e-18 6
#> CV:NMF 68 1.59e-20 6
#> MAD:NMF 67 6.11e-23 6
#> ATC:NMF 76 9.82e-27 6
#> SD:skmeans 68 8.81e-23 6
#> CV:skmeans 54 1.71e-23 6
#> MAD:skmeans 77 5.51e-30 6
#> ATC:skmeans 99 6.43e-30 6
#> SD:mclust 102 1.58e-33 6
#> CV:mclust 100 1.74e-33 6
#> MAD:mclust 96 2.45e-33 6
#> ATC:mclust 91 4.00e-28 6
#> SD:kmeans 81 1.25e-28 6
#> CV:kmeans 90 5.07e-31 6
#> MAD:kmeans 96 1.17e-33 6
#> ATC:kmeans 88 6.55e-29 6
#> SD:pam 83 6.17e-32 6
#> CV:pam 95 2.25e-37 6
#> MAD:pam 90 2.08e-33 6
#> ATC:pam 99 2.51e-29 6
#> SD:hclust 78 6.48e-28 6
#> CV:hclust 64 9.51e-23 6
#> MAD:hclust 86 7.79e-33 6
#> ATC:hclust 78 1.23e-27 6
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "hclust"]
# you can also extract it by
# res = res_list["SD:hclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.380 0.787 0.875 0.3714 0.605 0.605
#> 3 3 0.402 0.772 0.845 0.4448 0.900 0.838
#> 4 4 0.463 0.663 0.778 0.2963 0.764 0.556
#> 5 5 0.566 0.673 0.788 0.0633 0.958 0.864
#> 6 6 0.622 0.657 0.760 0.0650 0.915 0.705
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0376 0.730 0.996 0.004
#> GSM149100 1 0.0376 0.730 0.996 0.004
#> GSM149101 1 0.0376 0.730 0.996 0.004
#> GSM149102 1 0.0376 0.730 0.996 0.004
#> GSM149103 2 0.7528 0.735 0.216 0.784
#> GSM149104 1 0.0376 0.730 0.996 0.004
#> GSM149105 1 0.0376 0.730 0.996 0.004
#> GSM149106 2 0.8267 0.635 0.260 0.740
#> GSM149107 1 0.0376 0.730 0.996 0.004
#> GSM149108 1 0.0376 0.730 0.996 0.004
#> GSM149109 1 0.0376 0.730 0.996 0.004
#> GSM149110 1 0.0376 0.730 0.996 0.004
#> GSM149111 1 0.0376 0.730 0.996 0.004
#> GSM149112 1 0.0376 0.730 0.996 0.004
#> GSM149113 1 0.0376 0.730 0.996 0.004
#> GSM149114 1 0.0376 0.730 0.996 0.004
#> GSM149115 2 0.8909 0.421 0.308 0.692
#> GSM149116 1 0.9866 0.542 0.568 0.432
#> GSM149117 2 0.0672 0.892 0.008 0.992
#> GSM149118 1 0.9866 0.542 0.568 0.432
#> GSM149119 1 0.9866 0.542 0.568 0.432
#> GSM149120 1 0.9866 0.542 0.568 0.432
#> GSM149121 2 0.6438 0.805 0.164 0.836
#> GSM149122 1 0.9866 0.542 0.568 0.432
#> GSM149123 1 0.9866 0.542 0.568 0.432
#> GSM149124 1 0.9866 0.542 0.568 0.432
#> GSM149125 1 0.9866 0.542 0.568 0.432
#> GSM149126 1 0.9866 0.542 0.568 0.432
#> GSM149127 1 0.9866 0.542 0.568 0.432
#> GSM149128 1 0.9866 0.542 0.568 0.432
#> GSM149129 1 0.9866 0.542 0.568 0.432
#> GSM149130 2 0.6801 0.753 0.180 0.820
#> GSM149131 2 0.6712 0.755 0.176 0.824
#> GSM149132 1 0.9866 0.542 0.568 0.432
#> GSM149133 1 0.9963 0.453 0.536 0.464
#> GSM149134 2 0.5408 0.849 0.124 0.876
#> GSM149135 2 0.0672 0.894 0.008 0.992
#> GSM149136 2 0.0672 0.894 0.008 0.992
#> GSM149137 2 0.0672 0.894 0.008 0.992
#> GSM149138 2 0.5408 0.849 0.124 0.876
#> GSM149139 2 0.0672 0.894 0.008 0.992
#> GSM149140 2 0.0672 0.894 0.008 0.992
#> GSM149141 2 0.5629 0.856 0.132 0.868
#> GSM149142 2 0.2043 0.892 0.032 0.968
#> GSM149143 2 0.5737 0.855 0.136 0.864
#> GSM149144 2 0.0376 0.890 0.004 0.996
#> GSM149145 2 0.5629 0.856 0.132 0.868
#> GSM149146 2 0.0672 0.891 0.008 0.992
#> GSM149147 2 0.0672 0.894 0.008 0.992
#> GSM149148 2 0.0672 0.894 0.008 0.992
#> GSM149149 2 0.0672 0.894 0.008 0.992
#> GSM149150 2 0.2236 0.892 0.036 0.964
#> GSM149151 2 0.1843 0.893 0.028 0.972
#> GSM149152 2 0.4298 0.879 0.088 0.912
#> GSM149153 2 0.5629 0.856 0.132 0.868
#> GSM149154 2 0.5842 0.852 0.140 0.860
#> GSM149155 2 0.0376 0.890 0.004 0.996
#> GSM149156 2 0.0938 0.895 0.012 0.988
#> GSM149157 2 0.3733 0.885 0.072 0.928
#> GSM149158 2 0.1184 0.895 0.016 0.984
#> GSM149159 2 0.6973 0.810 0.188 0.812
#> GSM149160 2 0.3274 0.889 0.060 0.940
#> GSM149161 2 0.1184 0.895 0.016 0.984
#> GSM149162 2 0.0000 0.892 0.000 1.000
#> GSM149163 2 0.0376 0.890 0.004 0.996
#> GSM149164 2 0.4431 0.877 0.092 0.908
#> GSM149165 2 0.1843 0.895 0.028 0.972
#> GSM149166 2 0.0672 0.891 0.008 0.992
#> GSM149167 2 0.0938 0.895 0.012 0.988
#> GSM149168 2 0.7299 0.793 0.204 0.796
#> GSM149169 2 0.1184 0.895 0.016 0.984
#> GSM149170 2 0.6887 0.812 0.184 0.816
#> GSM149171 2 0.6973 0.808 0.188 0.812
#> GSM149172 2 0.8327 0.712 0.264 0.736
#> GSM149173 2 0.8016 0.741 0.244 0.756
#> GSM149174 2 0.1184 0.895 0.016 0.984
#> GSM149175 2 0.8016 0.742 0.244 0.756
#> GSM149176 2 0.4161 0.875 0.084 0.916
#> GSM149177 2 0.6973 0.778 0.188 0.812
#> GSM149178 2 0.9170 0.575 0.332 0.668
#> GSM149179 2 0.0938 0.894 0.012 0.988
#> GSM149180 2 0.0376 0.890 0.004 0.996
#> GSM149181 2 0.4562 0.878 0.096 0.904
#> GSM149182 2 0.0376 0.890 0.004 0.996
#> GSM149183 2 0.0376 0.890 0.004 0.996
#> GSM149184 2 0.0938 0.894 0.012 0.988
#> GSM149185 2 0.5842 0.848 0.140 0.860
#> GSM149186 2 0.1843 0.896 0.028 0.972
#> GSM149187 2 0.0376 0.890 0.004 0.996
#> GSM149188 2 0.0376 0.890 0.004 0.996
#> GSM149189 2 0.8713 0.668 0.292 0.708
#> GSM149190 2 0.0938 0.895 0.012 0.988
#> GSM149191 2 0.5629 0.857 0.132 0.868
#> GSM149192 2 0.1843 0.894 0.028 0.972
#> GSM149193 2 0.0938 0.894 0.012 0.988
#> GSM149194 2 0.5294 0.864 0.120 0.880
#> GSM149195 2 0.9393 0.533 0.356 0.644
#> GSM149196 2 0.0938 0.894 0.012 0.988
#> GSM149197 2 0.0376 0.890 0.004 0.996
#> GSM149198 2 0.5519 0.846 0.128 0.872
#> GSM149199 2 0.0672 0.895 0.008 0.992
#> GSM149200 2 0.6887 0.812 0.184 0.816
#> GSM149201 2 0.0376 0.890 0.004 0.996
#> GSM149202 2 0.6887 0.812 0.184 0.816
#> GSM149203 2 0.7299 0.793 0.204 0.796
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149100 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149101 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149102 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149103 2 0.6247 0.7234 0.044 0.744 0.212
#> GSM149104 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149105 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149106 2 0.6596 0.6564 0.040 0.704 0.256
#> GSM149107 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149108 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149109 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149110 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149111 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149112 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149113 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149114 3 0.0000 1.0000 0.000 0.000 1.000
#> GSM149115 1 0.5443 0.5393 0.736 0.260 0.004
#> GSM149116 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149117 2 0.3038 0.8055 0.104 0.896 0.000
#> GSM149118 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149119 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149120 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149121 1 0.6936 -0.3100 0.524 0.460 0.016
#> GSM149122 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149123 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149124 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149125 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149126 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149127 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149128 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149129 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149130 1 0.6410 0.0699 0.576 0.420 0.004
#> GSM149131 1 0.6460 -0.0128 0.556 0.440 0.004
#> GSM149132 1 0.3038 0.8283 0.896 0.000 0.104
#> GSM149133 1 0.4094 0.8014 0.872 0.028 0.100
#> GSM149134 2 0.6825 0.3772 0.492 0.496 0.012
#> GSM149135 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149136 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149137 2 0.5529 0.6750 0.296 0.704 0.000
#> GSM149138 2 0.6825 0.3772 0.492 0.496 0.012
#> GSM149139 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149140 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149141 2 0.7317 0.7515 0.208 0.696 0.096
#> GSM149142 2 0.5201 0.7531 0.236 0.760 0.004
#> GSM149143 2 0.6243 0.7968 0.124 0.776 0.100
#> GSM149144 2 0.1031 0.8190 0.024 0.976 0.000
#> GSM149145 2 0.7317 0.7515 0.208 0.696 0.096
#> GSM149146 2 0.0661 0.8194 0.008 0.988 0.004
#> GSM149147 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149148 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149149 2 0.5497 0.6801 0.292 0.708 0.000
#> GSM149150 2 0.4963 0.7825 0.200 0.792 0.008
#> GSM149151 2 0.5016 0.7487 0.240 0.760 0.000
#> GSM149152 2 0.6935 0.6704 0.312 0.652 0.036
#> GSM149153 2 0.7317 0.7515 0.208 0.696 0.096
#> GSM149154 2 0.7603 0.7271 0.236 0.668 0.096
#> GSM149155 2 0.0424 0.8185 0.008 0.992 0.000
#> GSM149156 2 0.1643 0.8248 0.044 0.956 0.000
#> GSM149157 2 0.4689 0.8216 0.096 0.852 0.052
#> GSM149158 2 0.3272 0.8191 0.104 0.892 0.004
#> GSM149159 2 0.5743 0.7810 0.044 0.784 0.172
#> GSM149160 2 0.4479 0.8230 0.096 0.860 0.044
#> GSM149161 2 0.3272 0.8191 0.104 0.892 0.004
#> GSM149162 2 0.1529 0.8245 0.040 0.960 0.000
#> GSM149163 2 0.0424 0.8185 0.008 0.992 0.000
#> GSM149164 2 0.6007 0.7995 0.184 0.768 0.048
#> GSM149165 2 0.1267 0.8233 0.004 0.972 0.024
#> GSM149166 2 0.1989 0.8170 0.048 0.948 0.004
#> GSM149167 2 0.3551 0.8088 0.132 0.868 0.000
#> GSM149168 2 0.5901 0.7694 0.040 0.768 0.192
#> GSM149169 2 0.3349 0.8182 0.108 0.888 0.004
#> GSM149170 2 0.5692 0.7754 0.040 0.784 0.176
#> GSM149171 2 0.5746 0.7727 0.040 0.780 0.180
#> GSM149172 2 0.7053 0.7141 0.064 0.692 0.244
#> GSM149173 2 0.6715 0.7279 0.056 0.716 0.228
#> GSM149174 2 0.3272 0.8191 0.104 0.892 0.004
#> GSM149175 2 0.7515 0.7241 0.100 0.680 0.220
#> GSM149176 2 0.3272 0.8226 0.016 0.904 0.080
#> GSM149177 2 0.5905 0.7579 0.044 0.772 0.184
#> GSM149178 2 0.7353 0.6314 0.052 0.632 0.316
#> GSM149179 2 0.0592 0.8208 0.012 0.988 0.000
#> GSM149180 2 0.0892 0.8214 0.020 0.980 0.000
#> GSM149181 2 0.3765 0.8164 0.028 0.888 0.084
#> GSM149182 2 0.0424 0.8185 0.008 0.992 0.000
#> GSM149183 2 0.0000 0.8196 0.000 1.000 0.000
#> GSM149184 2 0.0747 0.8213 0.016 0.984 0.000
#> GSM149185 2 0.4915 0.7988 0.036 0.832 0.132
#> GSM149186 2 0.1636 0.8230 0.020 0.964 0.016
#> GSM149187 2 0.1031 0.8232 0.024 0.976 0.000
#> GSM149188 2 0.0000 0.8196 0.000 1.000 0.000
#> GSM149189 2 0.6621 0.6965 0.032 0.684 0.284
#> GSM149190 2 0.2448 0.8227 0.076 0.924 0.000
#> GSM149191 2 0.5892 0.8024 0.100 0.796 0.104
#> GSM149192 2 0.1267 0.8237 0.004 0.972 0.024
#> GSM149193 2 0.1015 0.8223 0.012 0.980 0.008
#> GSM149194 2 0.5737 0.8088 0.104 0.804 0.092
#> GSM149195 2 0.7492 0.6077 0.052 0.608 0.340
#> GSM149196 2 0.0747 0.8213 0.016 0.984 0.000
#> GSM149197 2 0.0237 0.8187 0.004 0.996 0.000
#> GSM149198 2 0.6955 0.3793 0.488 0.496 0.016
#> GSM149199 2 0.2261 0.8237 0.068 0.932 0.000
#> GSM149200 2 0.5692 0.7754 0.040 0.784 0.176
#> GSM149201 2 0.0424 0.8185 0.008 0.992 0.000
#> GSM149202 2 0.5581 0.7775 0.036 0.788 0.176
#> GSM149203 2 0.5901 0.7694 0.040 0.768 0.192
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149100 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149101 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149102 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149103 2 0.7219 0.4179 0.176 0.604 0.204 0.016
#> GSM149104 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149105 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149106 2 0.6806 0.4345 0.112 0.620 0.256 0.012
#> GSM149107 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149108 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149109 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149110 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149111 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149112 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149113 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149114 3 0.0336 1.0000 0.000 0.000 0.992 0.008
#> GSM149115 4 0.5963 0.5716 0.116 0.196 0.000 0.688
#> GSM149116 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149117 2 0.4070 0.6445 0.132 0.824 0.000 0.044
#> GSM149118 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149119 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149120 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149121 1 0.5883 0.3143 0.640 0.060 0.000 0.300
#> GSM149122 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149123 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149124 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149125 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149126 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149127 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149128 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149129 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149130 4 0.7238 0.2453 0.172 0.304 0.000 0.524
#> GSM149131 4 0.7309 0.1868 0.172 0.324 0.000 0.504
#> GSM149132 4 0.1474 0.8980 0.000 0.000 0.052 0.948
#> GSM149133 4 0.2814 0.8686 0.032 0.008 0.052 0.908
#> GSM149134 1 0.5559 0.3900 0.696 0.064 0.000 0.240
#> GSM149135 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149136 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149137 2 0.6711 0.5268 0.308 0.576 0.000 0.116
#> GSM149138 1 0.5559 0.3900 0.696 0.064 0.000 0.240
#> GSM149139 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149140 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149141 1 0.6268 0.5786 0.692 0.216 0.044 0.048
#> GSM149142 2 0.6212 0.4859 0.380 0.560 0.000 0.060
#> GSM149143 1 0.5709 0.6535 0.704 0.236 0.044 0.016
#> GSM149144 2 0.1042 0.6943 0.008 0.972 0.000 0.020
#> GSM149145 1 0.6302 0.5807 0.688 0.220 0.044 0.048
#> GSM149146 2 0.0967 0.6902 0.016 0.976 0.004 0.004
#> GSM149147 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149148 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149149 2 0.6693 0.5307 0.304 0.580 0.000 0.116
#> GSM149150 2 0.5937 0.5088 0.340 0.608 0.000 0.052
#> GSM149151 2 0.6212 0.4905 0.380 0.560 0.000 0.060
#> GSM149152 1 0.7258 -0.2869 0.484 0.400 0.012 0.104
#> GSM149153 1 0.6302 0.5807 0.688 0.220 0.044 0.048
#> GSM149154 1 0.6023 0.6027 0.732 0.160 0.044 0.064
#> GSM149155 2 0.0188 0.6916 0.004 0.996 0.000 0.000
#> GSM149156 2 0.3266 0.6680 0.168 0.832 0.000 0.000
#> GSM149157 2 0.5389 0.4767 0.328 0.648 0.020 0.004
#> GSM149158 2 0.4690 0.6237 0.260 0.724 0.000 0.016
#> GSM149159 1 0.6746 0.6342 0.568 0.316 0.116 0.000
#> GSM149160 2 0.5421 0.5241 0.308 0.664 0.020 0.008
#> GSM149161 2 0.4630 0.6304 0.252 0.732 0.000 0.016
#> GSM149162 2 0.2921 0.6851 0.140 0.860 0.000 0.000
#> GSM149163 2 0.0188 0.6916 0.004 0.996 0.000 0.000
#> GSM149164 1 0.6626 0.5595 0.628 0.284 0.028 0.060
#> GSM149165 2 0.3836 0.5468 0.168 0.816 0.016 0.000
#> GSM149166 2 0.3231 0.6724 0.116 0.868 0.004 0.012
#> GSM149167 2 0.5105 0.6291 0.276 0.696 0.000 0.028
#> GSM149168 1 0.6506 0.6827 0.628 0.240 0.132 0.000
#> GSM149169 2 0.4675 0.6271 0.244 0.736 0.000 0.020
#> GSM149170 1 0.6595 0.6686 0.604 0.276 0.120 0.000
#> GSM149171 1 0.6547 0.6753 0.616 0.260 0.124 0.000
#> GSM149172 1 0.6688 0.6732 0.636 0.176 0.184 0.004
#> GSM149173 1 0.6813 0.6761 0.632 0.196 0.164 0.008
#> GSM149174 2 0.4630 0.6220 0.252 0.732 0.000 0.016
#> GSM149175 1 0.7192 0.6823 0.628 0.184 0.160 0.028
#> GSM149176 2 0.4673 0.6147 0.132 0.792 0.076 0.000
#> GSM149177 2 0.7230 0.3789 0.220 0.592 0.176 0.012
#> GSM149178 1 0.7920 0.5520 0.484 0.236 0.268 0.012
#> GSM149179 2 0.1637 0.6798 0.060 0.940 0.000 0.000
#> GSM149180 2 0.1798 0.6909 0.040 0.944 0.000 0.016
#> GSM149181 1 0.6337 0.4350 0.476 0.464 0.060 0.000
#> GSM149182 2 0.0657 0.6888 0.012 0.984 0.000 0.004
#> GSM149183 2 0.2408 0.6487 0.104 0.896 0.000 0.000
#> GSM149184 2 0.2011 0.6792 0.080 0.920 0.000 0.000
#> GSM149185 1 0.6698 0.5756 0.532 0.372 0.096 0.000
#> GSM149186 2 0.4746 0.0309 0.368 0.632 0.000 0.000
#> GSM149187 2 0.2647 0.6892 0.120 0.880 0.000 0.000
#> GSM149188 2 0.2589 0.6355 0.116 0.884 0.000 0.000
#> GSM149189 1 0.7054 0.6566 0.572 0.196 0.232 0.000
#> GSM149190 2 0.3893 0.6546 0.196 0.796 0.000 0.008
#> GSM149191 1 0.5536 0.6499 0.696 0.252 0.048 0.004
#> GSM149192 2 0.2335 0.6723 0.060 0.920 0.020 0.000
#> GSM149193 2 0.4222 0.3436 0.272 0.728 0.000 0.000
#> GSM149194 1 0.6181 0.3036 0.536 0.420 0.036 0.008
#> GSM149195 1 0.7172 0.5787 0.572 0.128 0.288 0.012
#> GSM149196 2 0.2530 0.6639 0.100 0.896 0.004 0.000
#> GSM149197 2 0.1118 0.6841 0.036 0.964 0.000 0.000
#> GSM149198 1 0.5458 0.3916 0.704 0.060 0.000 0.236
#> GSM149199 2 0.3450 0.6782 0.156 0.836 0.000 0.008
#> GSM149200 1 0.6595 0.6686 0.604 0.276 0.120 0.000
#> GSM149201 2 0.0779 0.6901 0.016 0.980 0.000 0.004
#> GSM149202 1 0.6617 0.6666 0.600 0.280 0.120 0.000
#> GSM149203 1 0.6478 0.6828 0.632 0.236 0.132 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149103 2 0.6324 0.4152 0.024 0.644 0.184 0.016 0.132
#> GSM149104 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149106 2 0.5104 0.4352 0.012 0.692 0.252 0.016 0.028
#> GSM149107 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 1.0000 0.000 0.000 1.000 0.000 0.000
#> GSM149115 4 0.5477 0.4085 0.132 0.220 0.000 0.648 0.000
#> GSM149116 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149117 2 0.1869 0.6280 0.028 0.936 0.000 0.028 0.008
#> GSM149118 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149119 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149120 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149121 1 0.2011 0.9229 0.908 0.000 0.000 0.088 0.004
#> GSM149122 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149123 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149124 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149125 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149126 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149127 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149128 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149129 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149130 4 0.6370 0.0864 0.176 0.344 0.000 0.480 0.000
#> GSM149131 4 0.6381 0.0553 0.172 0.364 0.000 0.464 0.000
#> GSM149132 4 0.0609 0.8778 0.000 0.000 0.020 0.980 0.000
#> GSM149133 4 0.1934 0.8393 0.040 0.008 0.020 0.932 0.000
#> GSM149134 1 0.0865 0.9683 0.972 0.000 0.000 0.024 0.004
#> GSM149135 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149136 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149137 2 0.5060 0.4437 0.344 0.616 0.000 0.032 0.008
#> GSM149138 1 0.1153 0.9650 0.964 0.008 0.000 0.024 0.004
#> GSM149139 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149140 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149141 5 0.6431 0.5370 0.252 0.116 0.020 0.012 0.600
#> GSM149142 2 0.6086 0.4520 0.320 0.556 0.000 0.008 0.116
#> GSM149143 5 0.4280 0.7089 0.152 0.044 0.008 0.008 0.788
#> GSM149144 2 0.3127 0.6687 0.020 0.848 0.000 0.004 0.128
#> GSM149145 5 0.6409 0.5445 0.248 0.116 0.020 0.012 0.604
#> GSM149146 2 0.2694 0.6618 0.004 0.864 0.000 0.004 0.128
#> GSM149147 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149148 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149149 2 0.4929 0.4561 0.340 0.624 0.000 0.032 0.004
#> GSM149150 2 0.6418 0.5201 0.264 0.544 0.000 0.008 0.184
#> GSM149151 2 0.5832 0.4428 0.320 0.580 0.000 0.008 0.092
#> GSM149152 2 0.7380 0.1343 0.396 0.408 0.008 0.044 0.144
#> GSM149153 5 0.6409 0.5445 0.248 0.116 0.020 0.012 0.604
#> GSM149154 5 0.5969 0.5342 0.288 0.056 0.020 0.016 0.620
#> GSM149155 2 0.2471 0.6634 0.000 0.864 0.000 0.000 0.136
#> GSM149156 2 0.5164 0.6280 0.084 0.660 0.000 0.000 0.256
#> GSM149157 2 0.6380 0.3846 0.124 0.452 0.004 0.004 0.416
#> GSM149158 2 0.5957 0.5786 0.148 0.572 0.000 0.000 0.280
#> GSM149159 5 0.3347 0.7297 0.028 0.100 0.012 0.004 0.856
#> GSM149160 2 0.6265 0.4442 0.132 0.484 0.004 0.000 0.380
#> GSM149161 2 0.5935 0.5885 0.152 0.580 0.000 0.000 0.268
#> GSM149162 2 0.5037 0.6506 0.088 0.684 0.000 0.000 0.228
#> GSM149163 2 0.2516 0.6652 0.000 0.860 0.000 0.000 0.140
#> GSM149164 5 0.5481 0.5924 0.236 0.108 0.000 0.004 0.652
#> GSM149165 2 0.4166 0.4874 0.004 0.648 0.000 0.000 0.348
#> GSM149166 2 0.1799 0.6446 0.020 0.940 0.000 0.012 0.028
#> GSM149167 2 0.5946 0.5997 0.184 0.592 0.000 0.000 0.224
#> GSM149168 5 0.1679 0.7495 0.020 0.016 0.012 0.004 0.948
#> GSM149169 2 0.5987 0.5875 0.156 0.572 0.000 0.000 0.272
#> GSM149170 5 0.2162 0.7522 0.008 0.064 0.012 0.000 0.916
#> GSM149171 5 0.1996 0.7526 0.012 0.048 0.012 0.000 0.928
#> GSM149172 5 0.3146 0.7098 0.052 0.012 0.056 0.004 0.876
#> GSM149173 5 0.2710 0.7255 0.044 0.012 0.040 0.004 0.900
#> GSM149174 2 0.6007 0.5777 0.152 0.564 0.000 0.000 0.284
#> GSM149175 5 0.4158 0.7011 0.100 0.028 0.044 0.008 0.820
#> GSM149176 2 0.4897 0.5714 0.008 0.704 0.036 0.008 0.244
#> GSM149177 2 0.6549 0.3394 0.020 0.588 0.128 0.012 0.252
#> GSM149178 5 0.6578 0.5408 0.052 0.172 0.168 0.000 0.608
#> GSM149179 2 0.3366 0.6424 0.004 0.784 0.000 0.000 0.212
#> GSM149180 2 0.3716 0.6606 0.020 0.800 0.000 0.008 0.172
#> GSM149181 5 0.3885 0.5476 0.008 0.268 0.000 0.000 0.724
#> GSM149182 2 0.2833 0.6604 0.004 0.852 0.000 0.004 0.140
#> GSM149183 2 0.3741 0.6040 0.004 0.732 0.000 0.000 0.264
#> GSM149184 2 0.3491 0.6371 0.004 0.768 0.000 0.000 0.228
#> GSM149185 5 0.3403 0.6855 0.008 0.160 0.012 0.000 0.820
#> GSM149186 5 0.4538 0.0729 0.008 0.452 0.000 0.000 0.540
#> GSM149187 2 0.4679 0.6576 0.068 0.716 0.000 0.000 0.216
#> GSM149188 2 0.3814 0.5892 0.004 0.720 0.000 0.000 0.276
#> GSM149189 5 0.4070 0.7040 0.020 0.048 0.124 0.000 0.808
#> GSM149190 2 0.5639 0.6143 0.124 0.616 0.000 0.000 0.260
#> GSM149191 5 0.3728 0.7224 0.124 0.044 0.004 0.004 0.824
#> GSM149192 2 0.3521 0.6341 0.004 0.764 0.000 0.000 0.232
#> GSM149193 2 0.4522 0.2427 0.008 0.552 0.000 0.000 0.440
#> GSM149194 5 0.5842 0.3995 0.128 0.236 0.004 0.004 0.628
#> GSM149195 5 0.4709 0.6034 0.060 0.016 0.176 0.000 0.748
#> GSM149196 2 0.3715 0.6130 0.004 0.736 0.000 0.000 0.260
#> GSM149197 2 0.3160 0.6495 0.004 0.808 0.000 0.000 0.188
#> GSM149198 1 0.1106 0.9661 0.964 0.000 0.000 0.024 0.012
#> GSM149199 2 0.5288 0.6411 0.100 0.656 0.000 0.000 0.244
#> GSM149200 5 0.2162 0.7522 0.008 0.064 0.012 0.000 0.916
#> GSM149201 2 0.2877 0.6626 0.004 0.848 0.000 0.004 0.144
#> GSM149202 5 0.2228 0.7511 0.008 0.068 0.012 0.000 0.912
#> GSM149203 5 0.1777 0.7496 0.020 0.020 0.012 0.004 0.944
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 2 0.8033 0.09921 0.252 0.404 0.168 0.000 0.100 0.076
#> GSM149104 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 2 0.7286 0.07502 0.244 0.428 0.240 0.000 0.016 0.072
#> GSM149107 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0363 0.98804 0.012 0.000 0.988 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.99909 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 4 0.5187 0.44777 0.256 0.104 0.000 0.628 0.000 0.012
#> GSM149116 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 2 0.5358 0.05043 0.300 0.604 0.000 0.016 0.008 0.072
#> GSM149118 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 6 0.4201 0.91439 0.196 0.000 0.000 0.068 0.004 0.732
#> GSM149122 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 4 0.5899 0.06698 0.384 0.144 0.000 0.460 0.000 0.012
#> GSM149131 4 0.5894 -0.00154 0.392 0.156 0.000 0.444 0.000 0.008
#> GSM149132 4 0.0000 0.88326 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.1367 0.84251 0.044 0.000 0.000 0.944 0.000 0.012
#> GSM149134 6 0.2964 0.96256 0.204 0.000 0.000 0.000 0.004 0.792
#> GSM149135 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149136 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149137 1 0.4138 0.85594 0.692 0.276 0.000 0.020 0.000 0.012
#> GSM149138 6 0.3134 0.95910 0.208 0.004 0.000 0.000 0.004 0.784
#> GSM149139 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149140 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149141 5 0.5859 0.48775 0.332 0.068 0.004 0.004 0.552 0.040
#> GSM149142 1 0.5327 0.72136 0.612 0.280 0.000 0.000 0.084 0.024
#> GSM149143 5 0.5001 0.65638 0.196 0.080 0.004 0.004 0.696 0.020
#> GSM149144 2 0.2129 0.59966 0.056 0.904 0.000 0.000 0.000 0.040
#> GSM149145 5 0.5847 0.49165 0.328 0.068 0.004 0.004 0.556 0.040
#> GSM149146 2 0.1856 0.60029 0.032 0.920 0.000 0.000 0.000 0.048
#> GSM149147 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149148 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149149 1 0.4103 0.86683 0.684 0.288 0.000 0.020 0.000 0.008
#> GSM149150 1 0.5798 0.43711 0.464 0.420 0.000 0.000 0.084 0.032
#> GSM149151 1 0.5271 0.75072 0.624 0.272 0.000 0.000 0.076 0.028
#> GSM149152 1 0.5611 0.45708 0.692 0.092 0.000 0.024 0.124 0.068
#> GSM149153 5 0.5847 0.49165 0.328 0.068 0.004 0.004 0.556 0.040
#> GSM149154 5 0.5260 0.52261 0.348 0.028 0.004 0.008 0.584 0.028
#> GSM149155 2 0.1320 0.61164 0.036 0.948 0.000 0.000 0.000 0.016
#> GSM149156 2 0.4619 0.53015 0.192 0.704 0.000 0.000 0.096 0.008
#> GSM149157 2 0.6175 0.30346 0.256 0.472 0.000 0.000 0.260 0.012
#> GSM149158 2 0.5804 0.35641 0.304 0.548 0.000 0.000 0.124 0.024
#> GSM149159 5 0.4552 0.62381 0.048 0.240 0.004 0.000 0.696 0.012
#> GSM149160 2 0.6245 0.28236 0.292 0.464 0.000 0.000 0.228 0.016
#> GSM149161 2 0.5677 0.36238 0.308 0.556 0.000 0.000 0.116 0.020
#> GSM149162 2 0.4093 0.52082 0.204 0.736 0.000 0.000 0.056 0.004
#> GSM149163 2 0.1391 0.61142 0.040 0.944 0.000 0.000 0.000 0.016
#> GSM149164 5 0.6331 0.54202 0.248 0.100 0.000 0.000 0.552 0.100
#> GSM149165 2 0.2738 0.58248 0.004 0.820 0.000 0.000 0.176 0.000
#> GSM149166 2 0.4814 0.29758 0.244 0.668 0.000 0.000 0.012 0.076
#> GSM149167 2 0.5678 0.13038 0.424 0.460 0.000 0.000 0.100 0.016
#> GSM149168 5 0.3797 0.69751 0.048 0.124 0.004 0.000 0.804 0.020
#> GSM149169 2 0.5628 0.37138 0.304 0.564 0.000 0.000 0.112 0.020
#> GSM149170 5 0.3229 0.67225 0.008 0.188 0.004 0.000 0.796 0.004
#> GSM149171 5 0.3025 0.69230 0.008 0.152 0.004 0.000 0.828 0.008
#> GSM149172 5 0.3125 0.63567 0.060 0.012 0.004 0.000 0.856 0.068
#> GSM149173 5 0.3036 0.66535 0.044 0.040 0.008 0.000 0.872 0.036
#> GSM149174 2 0.5743 0.37318 0.296 0.560 0.000 0.000 0.120 0.024
#> GSM149175 5 0.3943 0.62818 0.128 0.008 0.004 0.004 0.792 0.064
#> GSM149176 2 0.5576 0.49881 0.108 0.684 0.012 0.000 0.128 0.068
#> GSM149177 2 0.8102 0.12500 0.244 0.392 0.100 0.000 0.188 0.076
#> GSM149178 5 0.7291 0.43819 0.132 0.104 0.104 0.000 0.552 0.108
#> GSM149179 2 0.2463 0.62119 0.020 0.892 0.000 0.000 0.068 0.020
#> GSM149180 2 0.2271 0.62139 0.036 0.908 0.000 0.000 0.032 0.024
#> GSM149181 5 0.3899 0.39537 0.004 0.404 0.000 0.000 0.592 0.000
#> GSM149182 2 0.1176 0.61152 0.020 0.956 0.000 0.000 0.000 0.024
#> GSM149183 2 0.1918 0.62194 0.008 0.904 0.000 0.000 0.088 0.000
#> GSM149184 2 0.2149 0.62396 0.016 0.900 0.000 0.000 0.080 0.004
#> GSM149185 5 0.3772 0.57220 0.008 0.296 0.004 0.000 0.692 0.000
#> GSM149186 2 0.3747 0.12975 0.000 0.604 0.000 0.000 0.396 0.000
#> GSM149187 2 0.4130 0.55668 0.164 0.760 0.000 0.000 0.060 0.016
#> GSM149188 2 0.2070 0.61664 0.008 0.892 0.000 0.000 0.100 0.000
#> GSM149189 5 0.5539 0.64000 0.044 0.112 0.072 0.000 0.708 0.064
#> GSM149190 2 0.5082 0.45609 0.260 0.636 0.000 0.000 0.092 0.012
#> GSM149191 5 0.4869 0.66340 0.176 0.092 0.000 0.000 0.704 0.028
#> GSM149192 2 0.1584 0.62763 0.008 0.928 0.000 0.000 0.064 0.000
#> GSM149193 2 0.3390 0.39549 0.000 0.704 0.000 0.000 0.296 0.000
#> GSM149194 5 0.6172 0.32088 0.216 0.284 0.000 0.000 0.484 0.016
#> GSM149195 5 0.5448 0.52351 0.084 0.012 0.108 0.000 0.700 0.096
#> GSM149196 2 0.2408 0.61780 0.012 0.876 0.000 0.000 0.108 0.004
#> GSM149197 2 0.0909 0.62471 0.012 0.968 0.000 0.000 0.020 0.000
#> GSM149198 6 0.2871 0.95828 0.192 0.000 0.000 0.000 0.004 0.804
#> GSM149199 2 0.4498 0.52954 0.188 0.720 0.000 0.000 0.080 0.012
#> GSM149200 5 0.3229 0.67225 0.008 0.188 0.004 0.000 0.796 0.004
#> GSM149201 2 0.1237 0.61526 0.020 0.956 0.000 0.000 0.004 0.020
#> GSM149202 5 0.3261 0.66958 0.008 0.192 0.004 0.000 0.792 0.004
#> GSM149203 5 0.3298 0.69101 0.056 0.072 0.004 0.000 0.848 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:hclust 103 3.78e-13 2
#> SD:hclust 99 7.00e-28 3
#> SD:hclust 88 8.74e-26 4
#> SD:hclust 82 9.69e-26 5
#> SD:hclust 78 6.48e-28 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "kmeans"]
# you can also extract it by
# res = res_list["SD:kmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.309 0.853 0.898 0.4175 0.558 0.558
#> 3 3 0.617 0.775 0.872 0.4135 0.726 0.551
#> 4 4 0.636 0.779 0.838 0.2056 0.886 0.719
#> 5 5 0.751 0.810 0.855 0.1010 0.864 0.587
#> 6 6 0.781 0.671 0.788 0.0484 0.972 0.870
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.671 0.848 0.824 0.176
#> GSM149100 1 0.671 0.848 0.824 0.176
#> GSM149101 1 0.671 0.848 0.824 0.176
#> GSM149102 1 0.671 0.848 0.824 0.176
#> GSM149103 1 0.861 0.755 0.716 0.284
#> GSM149104 1 0.671 0.848 0.824 0.176
#> GSM149105 1 0.671 0.848 0.824 0.176
#> GSM149106 1 0.671 0.848 0.824 0.176
#> GSM149107 1 0.671 0.848 0.824 0.176
#> GSM149108 1 0.671 0.848 0.824 0.176
#> GSM149109 1 0.671 0.848 0.824 0.176
#> GSM149110 1 0.671 0.848 0.824 0.176
#> GSM149111 1 0.671 0.848 0.824 0.176
#> GSM149112 1 0.671 0.848 0.824 0.176
#> GSM149113 1 0.671 0.848 0.824 0.176
#> GSM149114 1 0.671 0.848 0.824 0.176
#> GSM149115 2 0.866 0.676 0.288 0.712
#> GSM149116 1 0.605 0.833 0.852 0.148
#> GSM149117 2 0.552 0.815 0.128 0.872
#> GSM149118 1 0.605 0.833 0.852 0.148
#> GSM149119 1 0.605 0.833 0.852 0.148
#> GSM149120 1 0.605 0.833 0.852 0.148
#> GSM149121 1 0.605 0.833 0.852 0.148
#> GSM149122 1 0.605 0.833 0.852 0.148
#> GSM149123 1 0.605 0.833 0.852 0.148
#> GSM149124 1 0.605 0.833 0.852 0.148
#> GSM149125 1 0.605 0.833 0.852 0.148
#> GSM149126 1 0.605 0.833 0.852 0.148
#> GSM149127 1 0.605 0.833 0.852 0.148
#> GSM149128 1 0.605 0.833 0.852 0.148
#> GSM149129 1 0.605 0.833 0.852 0.148
#> GSM149130 2 0.821 0.719 0.256 0.744
#> GSM149131 2 0.866 0.676 0.288 0.712
#> GSM149132 1 0.605 0.833 0.852 0.148
#> GSM149133 1 0.605 0.833 0.852 0.148
#> GSM149134 2 0.844 0.699 0.272 0.728
#> GSM149135 2 0.821 0.719 0.256 0.744
#> GSM149136 2 0.821 0.719 0.256 0.744
#> GSM149137 2 0.821 0.719 0.256 0.744
#> GSM149138 2 0.821 0.719 0.256 0.744
#> GSM149139 2 0.821 0.719 0.256 0.744
#> GSM149140 2 0.821 0.719 0.256 0.744
#> GSM149141 2 0.506 0.827 0.112 0.888
#> GSM149142 2 0.000 0.916 0.000 1.000
#> GSM149143 2 0.506 0.827 0.112 0.888
#> GSM149144 2 0.000 0.916 0.000 1.000
#> GSM149145 2 0.506 0.827 0.112 0.888
#> GSM149146 2 0.000 0.916 0.000 1.000
#> GSM149147 2 0.821 0.719 0.256 0.744
#> GSM149148 2 0.821 0.719 0.256 0.744
#> GSM149149 2 0.821 0.719 0.256 0.744
#> GSM149150 2 0.000 0.916 0.000 1.000
#> GSM149151 2 0.781 0.742 0.232 0.768
#> GSM149152 2 0.821 0.719 0.256 0.744
#> GSM149153 2 0.506 0.827 0.112 0.888
#> GSM149154 1 0.738 0.813 0.792 0.208
#> GSM149155 2 0.000 0.916 0.000 1.000
#> GSM149156 2 0.000 0.916 0.000 1.000
#> GSM149157 2 0.000 0.916 0.000 1.000
#> GSM149158 2 0.000 0.916 0.000 1.000
#> GSM149159 2 0.000 0.916 0.000 1.000
#> GSM149160 2 0.000 0.916 0.000 1.000
#> GSM149161 2 0.000 0.916 0.000 1.000
#> GSM149162 2 0.000 0.916 0.000 1.000
#> GSM149163 2 0.000 0.916 0.000 1.000
#> GSM149164 2 0.000 0.916 0.000 1.000
#> GSM149165 2 0.000 0.916 0.000 1.000
#> GSM149166 2 0.000 0.916 0.000 1.000
#> GSM149167 2 0.000 0.916 0.000 1.000
#> GSM149168 2 0.000 0.916 0.000 1.000
#> GSM149169 2 0.000 0.916 0.000 1.000
#> GSM149170 2 0.000 0.916 0.000 1.000
#> GSM149171 2 0.000 0.916 0.000 1.000
#> GSM149172 2 0.416 0.853 0.084 0.916
#> GSM149173 2 0.000 0.916 0.000 1.000
#> GSM149174 2 0.000 0.916 0.000 1.000
#> GSM149175 1 0.909 0.746 0.676 0.324
#> GSM149176 2 0.000 0.916 0.000 1.000
#> GSM149177 2 0.118 0.905 0.016 0.984
#> GSM149178 2 0.000 0.916 0.000 1.000
#> GSM149179 2 0.000 0.916 0.000 1.000
#> GSM149180 2 0.000 0.916 0.000 1.000
#> GSM149181 2 0.000 0.916 0.000 1.000
#> GSM149182 2 0.000 0.916 0.000 1.000
#> GSM149183 2 0.000 0.916 0.000 1.000
#> GSM149184 2 0.000 0.916 0.000 1.000
#> GSM149185 2 0.000 0.916 0.000 1.000
#> GSM149186 2 0.000 0.916 0.000 1.000
#> GSM149187 2 0.000 0.916 0.000 1.000
#> GSM149188 2 0.000 0.916 0.000 1.000
#> GSM149189 2 0.000 0.916 0.000 1.000
#> GSM149190 2 0.000 0.916 0.000 1.000
#> GSM149191 2 0.000 0.916 0.000 1.000
#> GSM149192 2 0.000 0.916 0.000 1.000
#> GSM149193 2 0.000 0.916 0.000 1.000
#> GSM149194 2 0.000 0.916 0.000 1.000
#> GSM149195 1 0.671 0.848 0.824 0.176
#> GSM149196 2 0.000 0.916 0.000 1.000
#> GSM149197 2 0.000 0.916 0.000 1.000
#> GSM149198 2 0.844 0.697 0.272 0.728
#> GSM149199 2 0.000 0.916 0.000 1.000
#> GSM149200 2 0.000 0.916 0.000 1.000
#> GSM149201 2 0.000 0.916 0.000 1.000
#> GSM149202 2 0.000 0.916 0.000 1.000
#> GSM149203 2 0.000 0.916 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149100 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149101 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149103 3 0.1753 0.9208 0.000 0.048 0.952
#> GSM149104 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149105 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149106 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149109 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149110 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149111 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149112 3 0.0237 0.9935 0.004 0.000 0.996
#> GSM149113 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149115 1 0.0237 0.5597 0.996 0.004 0.000
#> GSM149116 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149117 1 0.6295 0.0642 0.528 0.472 0.000
#> GSM149118 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149119 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149120 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149121 1 0.0237 0.5597 0.996 0.004 0.000
#> GSM149122 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149123 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149124 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149125 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149126 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149127 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149128 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149129 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149130 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149131 1 0.0237 0.5597 0.996 0.004 0.000
#> GSM149132 1 0.5873 0.4507 0.684 0.004 0.312
#> GSM149133 1 0.5690 0.4618 0.708 0.004 0.288
#> GSM149134 1 0.3532 0.5941 0.884 0.108 0.008
#> GSM149135 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149136 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149137 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149138 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149139 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149140 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149141 2 0.5541 0.7077 0.252 0.740 0.008
#> GSM149142 2 0.5529 0.6468 0.296 0.704 0.000
#> GSM149143 2 0.5335 0.7402 0.232 0.760 0.008
#> GSM149144 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149145 2 0.5335 0.7380 0.232 0.760 0.008
#> GSM149146 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149147 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149148 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149149 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149150 2 0.2796 0.8876 0.092 0.908 0.000
#> GSM149151 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149152 1 0.6075 0.5159 0.676 0.316 0.008
#> GSM149153 2 0.5335 0.7380 0.232 0.760 0.008
#> GSM149154 1 0.9876 0.4764 0.412 0.288 0.300
#> GSM149155 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149157 2 0.0892 0.9256 0.020 0.980 0.000
#> GSM149158 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149159 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149160 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149161 2 0.3619 0.8562 0.136 0.864 0.000
#> GSM149162 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149164 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149165 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149166 2 0.2448 0.8977 0.076 0.924 0.000
#> GSM149167 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149168 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149169 2 0.4062 0.8322 0.164 0.836 0.000
#> GSM149170 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149171 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149172 2 0.0892 0.9197 0.000 0.980 0.020
#> GSM149173 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149174 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149175 1 0.9991 0.4191 0.344 0.312 0.344
#> GSM149176 2 0.1411 0.9185 0.036 0.964 0.000
#> GSM149177 2 0.2280 0.9080 0.052 0.940 0.008
#> GSM149178 2 0.1170 0.9243 0.016 0.976 0.008
#> GSM149179 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149189 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149190 2 0.2356 0.9000 0.072 0.928 0.000
#> GSM149191 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149194 2 0.3941 0.8403 0.156 0.844 0.000
#> GSM149195 3 0.0000 0.9938 0.000 0.000 1.000
#> GSM149196 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149198 1 0.3532 0.5941 0.884 0.108 0.008
#> GSM149199 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149200 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149201 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.9327 0.000 1.000 0.000
#> GSM149203 2 0.0000 0.9327 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149100 3 0.0376 0.966 0.004 0.000 0.992 0.004
#> GSM149101 3 0.0376 0.966 0.004 0.000 0.992 0.004
#> GSM149102 3 0.0376 0.966 0.004 0.000 0.992 0.004
#> GSM149103 3 0.3463 0.841 0.004 0.032 0.868 0.096
#> GSM149104 3 0.0376 0.966 0.004 0.000 0.992 0.004
#> GSM149105 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149106 3 0.0469 0.962 0.000 0.000 0.988 0.012
#> GSM149107 3 0.0524 0.966 0.004 0.000 0.988 0.008
#> GSM149108 3 0.0376 0.966 0.004 0.000 0.992 0.004
#> GSM149109 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149110 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149111 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149112 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149113 3 0.0188 0.966 0.000 0.000 0.996 0.004
#> GSM149114 3 0.0524 0.966 0.004 0.000 0.988 0.008
#> GSM149115 1 0.4543 0.155 0.676 0.000 0.000 0.324
#> GSM149116 4 0.5913 0.979 0.180 0.000 0.124 0.696
#> GSM149117 1 0.4212 0.694 0.772 0.216 0.000 0.012
#> GSM149118 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149119 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149120 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149121 4 0.4679 0.735 0.352 0.000 0.000 0.648
#> GSM149122 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149123 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149124 4 0.5913 0.979 0.180 0.000 0.124 0.696
#> GSM149125 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149126 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149127 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149128 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149129 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149130 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149131 1 0.1389 0.790 0.952 0.000 0.000 0.048
#> GSM149132 4 0.5874 0.981 0.176 0.000 0.124 0.700
#> GSM149133 4 0.5784 0.954 0.200 0.000 0.100 0.700
#> GSM149134 1 0.1118 0.801 0.964 0.000 0.000 0.036
#> GSM149135 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149136 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149137 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149138 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149139 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149140 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149141 1 0.6201 0.635 0.664 0.124 0.000 0.212
#> GSM149142 1 0.5256 0.657 0.732 0.204 0.000 0.064
#> GSM149143 1 0.6138 0.632 0.648 0.092 0.000 0.260
#> GSM149144 2 0.5678 0.499 0.316 0.640 0.000 0.044
#> GSM149145 1 0.6248 0.631 0.660 0.128 0.000 0.212
#> GSM149146 2 0.0804 0.792 0.012 0.980 0.000 0.008
#> GSM149147 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149148 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149149 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149150 2 0.6036 0.530 0.292 0.636 0.000 0.072
#> GSM149151 1 0.1767 0.829 0.944 0.044 0.000 0.012
#> GSM149152 1 0.1022 0.837 0.968 0.032 0.000 0.000
#> GSM149153 1 0.6248 0.631 0.660 0.128 0.000 0.212
#> GSM149154 1 0.5425 0.705 0.752 0.020 0.052 0.176
#> GSM149155 2 0.1388 0.789 0.012 0.960 0.000 0.028
#> GSM149156 2 0.1938 0.784 0.012 0.936 0.000 0.052
#> GSM149157 2 0.3833 0.755 0.080 0.848 0.000 0.072
#> GSM149158 2 0.5937 0.447 0.340 0.608 0.000 0.052
#> GSM149159 2 0.4711 0.717 0.024 0.740 0.000 0.236
#> GSM149160 2 0.6265 0.439 0.340 0.588 0.000 0.072
#> GSM149161 2 0.5827 0.492 0.316 0.632 0.000 0.052
#> GSM149162 2 0.1854 0.785 0.012 0.940 0.000 0.048
#> GSM149163 2 0.1488 0.788 0.012 0.956 0.000 0.032
#> GSM149164 2 0.7793 0.268 0.356 0.396 0.000 0.248
#> GSM149165 2 0.1411 0.788 0.020 0.960 0.000 0.020
#> GSM149166 2 0.4406 0.675 0.192 0.780 0.000 0.028
#> GSM149167 2 0.5920 0.456 0.336 0.612 0.000 0.052
#> GSM149168 2 0.4609 0.717 0.024 0.752 0.000 0.224
#> GSM149169 2 0.6187 0.192 0.432 0.516 0.000 0.052
#> GSM149170 2 0.4574 0.717 0.024 0.756 0.000 0.220
#> GSM149171 2 0.4678 0.711 0.024 0.744 0.000 0.232
#> GSM149172 2 0.4776 0.708 0.024 0.732 0.000 0.244
#> GSM149173 2 0.4609 0.715 0.024 0.752 0.000 0.224
#> GSM149174 2 0.5937 0.447 0.340 0.608 0.000 0.052
#> GSM149175 1 0.6888 0.659 0.664 0.064 0.068 0.204
#> GSM149176 2 0.3910 0.710 0.156 0.820 0.000 0.024
#> GSM149177 2 0.4881 0.672 0.196 0.756 0.000 0.048
#> GSM149178 2 0.5995 0.676 0.096 0.672 0.000 0.232
#> GSM149179 2 0.0657 0.792 0.012 0.984 0.000 0.004
#> GSM149180 2 0.0657 0.792 0.012 0.984 0.000 0.004
#> GSM149181 2 0.2002 0.784 0.020 0.936 0.000 0.044
#> GSM149182 2 0.0657 0.792 0.012 0.984 0.000 0.004
#> GSM149183 2 0.1109 0.792 0.004 0.968 0.000 0.028
#> GSM149184 2 0.1042 0.792 0.008 0.972 0.000 0.020
#> GSM149185 2 0.4574 0.717 0.024 0.756 0.000 0.220
#> GSM149186 2 0.0927 0.792 0.008 0.976 0.000 0.016
#> GSM149187 2 0.1388 0.789 0.012 0.960 0.000 0.028
#> GSM149188 2 0.0707 0.792 0.000 0.980 0.000 0.020
#> GSM149189 2 0.4711 0.709 0.024 0.740 0.000 0.236
#> GSM149190 2 0.5144 0.634 0.216 0.732 0.000 0.052
#> GSM149191 2 0.4993 0.712 0.028 0.712 0.000 0.260
#> GSM149192 2 0.0707 0.792 0.000 0.980 0.000 0.020
#> GSM149193 2 0.0817 0.791 0.000 0.976 0.000 0.024
#> GSM149194 2 0.6324 0.434 0.340 0.584 0.000 0.076
#> GSM149195 3 0.5133 0.695 0.024 0.016 0.740 0.220
#> GSM149196 2 0.0895 0.792 0.004 0.976 0.000 0.020
#> GSM149197 2 0.1488 0.788 0.012 0.956 0.000 0.032
#> GSM149198 1 0.1118 0.801 0.964 0.000 0.000 0.036
#> GSM149199 2 0.1938 0.784 0.012 0.936 0.000 0.052
#> GSM149200 2 0.4574 0.717 0.024 0.756 0.000 0.220
#> GSM149201 2 0.0469 0.792 0.012 0.988 0.000 0.000
#> GSM149202 2 0.4574 0.717 0.024 0.756 0.000 0.220
#> GSM149203 2 0.4711 0.717 0.024 0.740 0.000 0.236
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0451 0.970 0.000 0.000 0.988 0.008 0.004
#> GSM149100 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149101 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149102 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149103 3 0.4380 0.650 0.012 0.000 0.728 0.020 0.240
#> GSM149104 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149105 3 0.0000 0.973 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.1538 0.934 0.008 0.000 0.948 0.008 0.036
#> GSM149107 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149108 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149109 3 0.0451 0.970 0.000 0.000 0.988 0.008 0.004
#> GSM149110 3 0.0451 0.970 0.000 0.000 0.988 0.008 0.004
#> GSM149111 3 0.0000 0.973 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0451 0.970 0.000 0.000 0.988 0.008 0.004
#> GSM149113 3 0.0000 0.973 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0162 0.974 0.000 0.000 0.996 0.000 0.004
#> GSM149115 1 0.3284 0.829 0.828 0.000 0.000 0.148 0.024
#> GSM149116 4 0.2354 0.964 0.012 0.000 0.076 0.904 0.008
#> GSM149117 1 0.4672 0.688 0.748 0.176 0.000 0.012 0.064
#> GSM149118 4 0.2116 0.967 0.008 0.000 0.076 0.912 0.004
#> GSM149119 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149120 4 0.2116 0.967 0.008 0.000 0.076 0.912 0.004
#> GSM149121 4 0.4654 0.400 0.348 0.000 0.000 0.628 0.024
#> GSM149122 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149123 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149124 4 0.2354 0.964 0.012 0.000 0.076 0.904 0.008
#> GSM149125 4 0.2116 0.967 0.008 0.000 0.076 0.912 0.004
#> GSM149126 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149127 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149128 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149129 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149130 1 0.2227 0.931 0.916 0.004 0.000 0.048 0.032
#> GSM149131 1 0.2036 0.930 0.920 0.000 0.000 0.056 0.024
#> GSM149132 4 0.1956 0.968 0.008 0.000 0.076 0.916 0.000
#> GSM149133 4 0.2364 0.955 0.020 0.000 0.064 0.908 0.008
#> GSM149134 1 0.1872 0.931 0.928 0.000 0.000 0.052 0.020
#> GSM149135 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149136 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149137 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149138 1 0.1960 0.933 0.928 0.004 0.000 0.048 0.020
#> GSM149139 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149140 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149141 5 0.5145 0.480 0.332 0.020 0.000 0.024 0.624
#> GSM149142 1 0.5505 0.557 0.704 0.168 0.000 0.036 0.092
#> GSM149143 5 0.5636 0.558 0.276 0.044 0.000 0.040 0.640
#> GSM149144 2 0.3511 0.771 0.072 0.848 0.000 0.012 0.068
#> GSM149145 5 0.5129 0.484 0.328 0.020 0.000 0.024 0.628
#> GSM149146 2 0.2789 0.802 0.008 0.880 0.000 0.020 0.092
#> GSM149147 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149148 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149149 1 0.1357 0.940 0.948 0.004 0.000 0.048 0.000
#> GSM149150 5 0.7061 0.244 0.176 0.324 0.000 0.032 0.468
#> GSM149151 1 0.1280 0.926 0.960 0.008 0.000 0.024 0.008
#> GSM149152 1 0.2609 0.914 0.896 0.004 0.000 0.052 0.048
#> GSM149153 5 0.5129 0.484 0.328 0.020 0.000 0.024 0.628
#> GSM149154 5 0.5338 0.494 0.320 0.000 0.028 0.028 0.624
#> GSM149155 2 0.0290 0.817 0.000 0.992 0.000 0.000 0.008
#> GSM149156 2 0.2095 0.803 0.024 0.928 0.000 0.028 0.020
#> GSM149157 2 0.5217 0.704 0.088 0.736 0.000 0.040 0.136
#> GSM149158 2 0.5246 0.698 0.136 0.732 0.000 0.036 0.096
#> GSM149159 5 0.4048 0.738 0.016 0.196 0.000 0.016 0.772
#> GSM149160 2 0.6039 0.629 0.156 0.660 0.000 0.040 0.144
#> GSM149161 2 0.4931 0.720 0.108 0.760 0.000 0.036 0.096
#> GSM149162 2 0.1200 0.811 0.016 0.964 0.000 0.012 0.008
#> GSM149163 2 0.0324 0.816 0.004 0.992 0.000 0.000 0.004
#> GSM149164 5 0.6146 0.590 0.148 0.164 0.000 0.040 0.648
#> GSM149165 2 0.2753 0.775 0.000 0.856 0.000 0.008 0.136
#> GSM149166 2 0.3591 0.788 0.028 0.836 0.000 0.020 0.116
#> GSM149167 2 0.5338 0.700 0.124 0.728 0.000 0.040 0.108
#> GSM149168 5 0.3559 0.746 0.008 0.176 0.000 0.012 0.804
#> GSM149169 2 0.5658 0.651 0.180 0.688 0.000 0.036 0.096
#> GSM149170 5 0.3388 0.735 0.000 0.200 0.000 0.008 0.792
#> GSM149171 5 0.3086 0.745 0.000 0.180 0.000 0.004 0.816
#> GSM149172 5 0.2352 0.754 0.008 0.092 0.000 0.004 0.896
#> GSM149173 5 0.3388 0.735 0.000 0.200 0.000 0.008 0.792
#> GSM149174 2 0.5246 0.698 0.136 0.732 0.000 0.036 0.096
#> GSM149175 5 0.4561 0.614 0.220 0.004 0.028 0.012 0.736
#> GSM149176 2 0.4289 0.765 0.024 0.764 0.000 0.020 0.192
#> GSM149177 2 0.5502 0.570 0.036 0.612 0.000 0.028 0.324
#> GSM149178 5 0.3209 0.746 0.020 0.100 0.000 0.020 0.860
#> GSM149179 2 0.2408 0.805 0.000 0.892 0.000 0.016 0.092
#> GSM149180 2 0.2408 0.805 0.000 0.892 0.000 0.016 0.092
#> GSM149181 2 0.3720 0.672 0.000 0.760 0.000 0.012 0.228
#> GSM149182 2 0.2293 0.807 0.000 0.900 0.000 0.016 0.084
#> GSM149183 2 0.2304 0.799 0.000 0.892 0.000 0.008 0.100
#> GSM149184 2 0.3194 0.779 0.000 0.832 0.000 0.020 0.148
#> GSM149185 5 0.3487 0.727 0.000 0.212 0.000 0.008 0.780
#> GSM149186 2 0.2920 0.780 0.000 0.852 0.000 0.016 0.132
#> GSM149187 2 0.0404 0.817 0.000 0.988 0.000 0.000 0.012
#> GSM149188 2 0.2411 0.794 0.000 0.884 0.000 0.008 0.108
#> GSM149189 5 0.3360 0.749 0.004 0.168 0.000 0.012 0.816
#> GSM149190 2 0.3730 0.768 0.048 0.840 0.000 0.028 0.084
#> GSM149191 5 0.3599 0.720 0.020 0.140 0.000 0.016 0.824
#> GSM149192 2 0.2358 0.797 0.000 0.888 0.000 0.008 0.104
#> GSM149193 2 0.2909 0.776 0.000 0.848 0.000 0.012 0.140
#> GSM149194 2 0.6105 0.618 0.168 0.652 0.000 0.040 0.140
#> GSM149195 5 0.4194 0.512 0.004 0.000 0.276 0.012 0.708
#> GSM149196 2 0.2920 0.780 0.000 0.852 0.000 0.016 0.132
#> GSM149197 2 0.0486 0.816 0.004 0.988 0.000 0.004 0.004
#> GSM149198 1 0.1800 0.930 0.932 0.000 0.000 0.048 0.020
#> GSM149199 2 0.2269 0.802 0.020 0.920 0.000 0.028 0.032
#> GSM149200 5 0.3388 0.735 0.000 0.200 0.000 0.008 0.792
#> GSM149201 2 0.1942 0.810 0.000 0.920 0.000 0.012 0.068
#> GSM149202 5 0.3496 0.734 0.000 0.200 0.000 0.012 0.788
#> GSM149203 5 0.3488 0.745 0.008 0.180 0.000 0.008 0.804
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.1410 0.9206 0.000 0.000 0.944 0.004 0.008 0.044
#> GSM149100 3 0.1003 0.9284 0.000 0.000 0.964 0.004 0.004 0.028
#> GSM149101 3 0.0922 0.9285 0.000 0.000 0.968 0.004 0.004 0.024
#> GSM149102 3 0.0922 0.9285 0.000 0.000 0.968 0.004 0.004 0.024
#> GSM149103 3 0.6340 0.1417 0.012 0.000 0.492 0.028 0.132 0.336
#> GSM149104 3 0.0922 0.9285 0.000 0.000 0.968 0.004 0.004 0.024
#> GSM149105 3 0.0951 0.9270 0.000 0.000 0.968 0.008 0.004 0.020
#> GSM149106 3 0.3250 0.7680 0.004 0.000 0.808 0.016 0.004 0.168
#> GSM149107 3 0.1149 0.9276 0.000 0.000 0.960 0.008 0.008 0.024
#> GSM149108 3 0.1003 0.9284 0.000 0.000 0.964 0.004 0.004 0.028
#> GSM149109 3 0.1410 0.9206 0.000 0.000 0.944 0.004 0.008 0.044
#> GSM149110 3 0.1410 0.9206 0.000 0.000 0.944 0.004 0.008 0.044
#> GSM149111 3 0.0951 0.9270 0.000 0.000 0.968 0.008 0.004 0.020
#> GSM149112 3 0.1410 0.9206 0.000 0.000 0.944 0.004 0.008 0.044
#> GSM149113 3 0.0951 0.9270 0.000 0.000 0.968 0.008 0.004 0.020
#> GSM149114 3 0.1036 0.9278 0.000 0.000 0.964 0.008 0.004 0.024
#> GSM149115 1 0.2325 0.8428 0.892 0.000 0.000 0.048 0.000 0.060
#> GSM149116 4 0.1823 0.9823 0.028 0.000 0.008 0.932 0.004 0.028
#> GSM149117 1 0.5803 0.4021 0.584 0.160 0.000 0.012 0.008 0.236
#> GSM149118 4 0.1116 0.9928 0.028 0.000 0.008 0.960 0.000 0.004
#> GSM149119 4 0.1476 0.9896 0.028 0.000 0.008 0.948 0.004 0.012
#> GSM149120 4 0.1116 0.9928 0.028 0.000 0.008 0.960 0.000 0.004
#> GSM149121 1 0.5217 0.2033 0.504 0.000 0.000 0.412 0.004 0.080
#> GSM149122 4 0.1261 0.9923 0.028 0.000 0.008 0.956 0.004 0.004
#> GSM149123 4 0.0972 0.9932 0.028 0.000 0.008 0.964 0.000 0.000
#> GSM149124 4 0.1823 0.9823 0.028 0.000 0.008 0.932 0.004 0.028
#> GSM149125 4 0.1375 0.9918 0.028 0.000 0.008 0.952 0.004 0.008
#> GSM149126 4 0.0972 0.9932 0.028 0.000 0.008 0.964 0.000 0.000
#> GSM149127 4 0.1261 0.9923 0.028 0.000 0.008 0.956 0.004 0.004
#> GSM149128 4 0.0972 0.9932 0.028 0.000 0.008 0.964 0.000 0.000
#> GSM149129 4 0.0972 0.9932 0.028 0.000 0.008 0.964 0.000 0.000
#> GSM149130 1 0.1524 0.8624 0.932 0.000 0.000 0.008 0.000 0.060
#> GSM149131 1 0.1461 0.8669 0.940 0.000 0.000 0.016 0.000 0.044
#> GSM149132 4 0.0972 0.9932 0.028 0.000 0.008 0.964 0.000 0.000
#> GSM149133 4 0.1080 0.9903 0.032 0.000 0.004 0.960 0.000 0.004
#> GSM149134 1 0.2264 0.8447 0.888 0.000 0.000 0.012 0.004 0.096
#> GSM149135 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149136 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149137 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149138 1 0.2002 0.8547 0.908 0.000 0.000 0.012 0.004 0.076
#> GSM149139 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149140 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149141 6 0.6524 0.3835 0.204 0.004 0.004 0.016 0.372 0.400
#> GSM149142 1 0.5824 0.0354 0.472 0.148 0.000 0.000 0.008 0.372
#> GSM149143 5 0.6687 -0.2969 0.156 0.028 0.004 0.012 0.400 0.400
#> GSM149144 2 0.2703 0.6369 0.004 0.824 0.000 0.000 0.000 0.172
#> GSM149145 6 0.6524 0.3835 0.204 0.004 0.004 0.016 0.372 0.400
#> GSM149146 2 0.3676 0.6448 0.000 0.808 0.000 0.012 0.088 0.092
#> GSM149147 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149148 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149149 1 0.0363 0.8762 0.988 0.000 0.000 0.012 0.000 0.000
#> GSM149150 6 0.7507 0.3072 0.084 0.200 0.004 0.016 0.296 0.400
#> GSM149151 1 0.0000 0.8693 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.2264 0.8242 0.888 0.000 0.000 0.012 0.004 0.096
#> GSM149153 6 0.6524 0.3835 0.204 0.004 0.004 0.016 0.372 0.400
#> GSM149154 5 0.6473 -0.2362 0.244 0.000 0.004 0.020 0.452 0.280
#> GSM149155 2 0.0405 0.6810 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM149156 2 0.3271 0.6038 0.000 0.760 0.000 0.000 0.008 0.232
#> GSM149157 2 0.5438 0.4022 0.024 0.536 0.000 0.000 0.068 0.372
#> GSM149158 2 0.4799 0.4728 0.040 0.592 0.000 0.000 0.012 0.356
#> GSM149159 5 0.1857 0.6808 0.000 0.044 0.000 0.004 0.924 0.028
#> GSM149160 2 0.5893 0.3485 0.048 0.500 0.000 0.000 0.076 0.376
#> GSM149161 2 0.4462 0.4904 0.020 0.612 0.000 0.000 0.012 0.356
#> GSM149162 2 0.2879 0.6326 0.000 0.816 0.000 0.004 0.004 0.176
#> GSM149163 2 0.0260 0.6794 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM149164 6 0.6552 0.0754 0.040 0.184 0.000 0.000 0.368 0.408
#> GSM149165 2 0.3957 0.5329 0.000 0.696 0.000 0.004 0.280 0.020
#> GSM149166 2 0.3908 0.5978 0.008 0.772 0.000 0.012 0.028 0.180
#> GSM149167 2 0.4913 0.4255 0.040 0.540 0.000 0.000 0.012 0.408
#> GSM149168 5 0.1562 0.6897 0.000 0.032 0.000 0.004 0.940 0.024
#> GSM149169 2 0.5094 0.4412 0.060 0.564 0.000 0.000 0.012 0.364
#> GSM149170 5 0.1075 0.6922 0.000 0.048 0.000 0.000 0.952 0.000
#> GSM149171 5 0.0865 0.6931 0.000 0.036 0.000 0.000 0.964 0.000
#> GSM149172 5 0.2398 0.6444 0.000 0.020 0.000 0.000 0.876 0.104
#> GSM149173 5 0.1219 0.6919 0.000 0.048 0.000 0.000 0.948 0.004
#> GSM149174 2 0.4810 0.4692 0.040 0.588 0.000 0.000 0.012 0.360
#> GSM149175 5 0.6167 -0.1951 0.144 0.000 0.008 0.016 0.476 0.356
#> GSM149176 2 0.4981 0.5048 0.008 0.684 0.004 0.016 0.060 0.228
#> GSM149177 6 0.6828 0.1577 0.020 0.380 0.004 0.024 0.168 0.404
#> GSM149178 5 0.5298 0.2422 0.012 0.032 0.004 0.024 0.596 0.332
#> GSM149179 2 0.3347 0.6539 0.000 0.824 0.000 0.004 0.104 0.068
#> GSM149180 2 0.3244 0.6566 0.000 0.832 0.000 0.004 0.100 0.064
#> GSM149181 2 0.4371 0.3589 0.000 0.580 0.000 0.000 0.392 0.028
#> GSM149182 2 0.3148 0.6600 0.000 0.840 0.000 0.004 0.092 0.064
#> GSM149183 2 0.2100 0.6721 0.000 0.884 0.000 0.004 0.112 0.000
#> GSM149184 2 0.4674 0.5720 0.000 0.696 0.000 0.004 0.180 0.120
#> GSM149185 5 0.1471 0.6783 0.000 0.064 0.000 0.004 0.932 0.000
#> GSM149186 2 0.3968 0.6117 0.000 0.756 0.000 0.004 0.180 0.060
#> GSM149187 2 0.0717 0.6815 0.000 0.976 0.000 0.000 0.016 0.008
#> GSM149188 2 0.2773 0.6482 0.000 0.828 0.000 0.004 0.164 0.004
#> GSM149189 5 0.4125 0.5074 0.004 0.036 0.000 0.016 0.752 0.192
#> GSM149190 2 0.3518 0.5843 0.000 0.732 0.000 0.000 0.012 0.256
#> GSM149191 5 0.3183 0.5472 0.000 0.060 0.000 0.000 0.828 0.112
#> GSM149192 2 0.2632 0.6505 0.000 0.832 0.000 0.004 0.164 0.000
#> GSM149193 2 0.3660 0.6178 0.000 0.772 0.000 0.004 0.188 0.036
#> GSM149194 2 0.5956 0.3287 0.052 0.488 0.000 0.000 0.076 0.384
#> GSM149195 5 0.5314 0.3419 0.004 0.000 0.128 0.016 0.652 0.200
#> GSM149196 2 0.4024 0.6112 0.000 0.752 0.000 0.004 0.180 0.064
#> GSM149197 2 0.0551 0.6802 0.000 0.984 0.000 0.004 0.004 0.008
#> GSM149198 1 0.2408 0.8385 0.876 0.000 0.000 0.012 0.004 0.108
#> GSM149199 2 0.3023 0.6164 0.000 0.784 0.000 0.000 0.004 0.212
#> GSM149200 5 0.1075 0.6922 0.000 0.048 0.000 0.000 0.952 0.000
#> GSM149201 2 0.2344 0.6746 0.000 0.892 0.000 0.004 0.076 0.028
#> GSM149202 5 0.1765 0.6724 0.000 0.052 0.000 0.000 0.924 0.024
#> GSM149203 5 0.1788 0.6757 0.000 0.028 0.000 0.004 0.928 0.040
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:kmeans 105 3.75e-13 2
#> SD:kmeans 88 6.83e-21 3
#> SD:kmeans 95 6.75e-34 4
#> SD:kmeans 99 1.04e-34 5
#> SD:kmeans 81 1.25e-28 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "skmeans"]
# you can also extract it by
# res = res_list["SD:skmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.766 0.887 0.951 0.4927 0.512 0.512
#> 3 3 0.984 0.944 0.972 0.3381 0.711 0.496
#> 4 4 0.758 0.781 0.891 0.1193 0.823 0.547
#> 5 5 0.705 0.613 0.800 0.0794 0.850 0.506
#> 6 6 0.736 0.606 0.757 0.0414 0.901 0.581
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.968492 1.000 0.000
#> GSM149100 1 0.0000 0.968492 1.000 0.000
#> GSM149101 1 0.0000 0.968492 1.000 0.000
#> GSM149102 1 0.0000 0.968492 1.000 0.000
#> GSM149103 1 0.0000 0.968492 1.000 0.000
#> GSM149104 1 0.0000 0.968492 1.000 0.000
#> GSM149105 1 0.0000 0.968492 1.000 0.000
#> GSM149106 1 0.0000 0.968492 1.000 0.000
#> GSM149107 1 0.0000 0.968492 1.000 0.000
#> GSM149108 1 0.0000 0.968492 1.000 0.000
#> GSM149109 1 0.0000 0.968492 1.000 0.000
#> GSM149110 1 0.0000 0.968492 1.000 0.000
#> GSM149111 1 0.0000 0.968492 1.000 0.000
#> GSM149112 1 0.0000 0.968492 1.000 0.000
#> GSM149113 1 0.0000 0.968492 1.000 0.000
#> GSM149114 1 0.0000 0.968492 1.000 0.000
#> GSM149115 1 0.0000 0.968492 1.000 0.000
#> GSM149116 1 0.0000 0.968492 1.000 0.000
#> GSM149117 2 0.0000 0.929623 0.000 1.000
#> GSM149118 1 0.0000 0.968492 1.000 0.000
#> GSM149119 1 0.0000 0.968492 1.000 0.000
#> GSM149120 1 0.0000 0.968492 1.000 0.000
#> GSM149121 1 0.0000 0.968492 1.000 0.000
#> GSM149122 1 0.0000 0.968492 1.000 0.000
#> GSM149123 1 0.0000 0.968492 1.000 0.000
#> GSM149124 1 0.0000 0.968492 1.000 0.000
#> GSM149125 1 0.0000 0.968492 1.000 0.000
#> GSM149126 1 0.0000 0.968492 1.000 0.000
#> GSM149127 1 0.0000 0.968492 1.000 0.000
#> GSM149128 1 0.0000 0.968492 1.000 0.000
#> GSM149129 1 0.0000 0.968492 1.000 0.000
#> GSM149130 2 0.8909 0.616017 0.308 0.692
#> GSM149131 1 0.0000 0.968492 1.000 0.000
#> GSM149132 1 0.0000 0.968492 1.000 0.000
#> GSM149133 1 0.0000 0.968492 1.000 0.000
#> GSM149134 1 0.0376 0.964889 0.996 0.004
#> GSM149135 2 0.8081 0.705005 0.248 0.752
#> GSM149136 2 0.8081 0.705005 0.248 0.752
#> GSM149137 2 0.8081 0.705005 0.248 0.752
#> GSM149138 2 0.8499 0.666302 0.276 0.724
#> GSM149139 2 0.8608 0.654443 0.284 0.716
#> GSM149140 2 0.8081 0.705005 0.248 0.752
#> GSM149141 1 0.9460 0.364726 0.636 0.364
#> GSM149142 2 0.0000 0.929623 0.000 1.000
#> GSM149143 1 0.9775 0.207493 0.588 0.412
#> GSM149144 2 0.0000 0.929623 0.000 1.000
#> GSM149145 1 0.7056 0.731936 0.808 0.192
#> GSM149146 2 0.0000 0.929623 0.000 1.000
#> GSM149147 2 0.8713 0.641822 0.292 0.708
#> GSM149148 2 0.8608 0.654443 0.284 0.716
#> GSM149149 2 0.8713 0.641822 0.292 0.708
#> GSM149150 2 0.0000 0.929623 0.000 1.000
#> GSM149151 2 0.7056 0.768359 0.192 0.808
#> GSM149152 1 0.0672 0.961182 0.992 0.008
#> GSM149153 2 0.9393 0.517419 0.356 0.644
#> GSM149154 1 0.0000 0.968492 1.000 0.000
#> GSM149155 2 0.0000 0.929623 0.000 1.000
#> GSM149156 2 0.0000 0.929623 0.000 1.000
#> GSM149157 2 0.0000 0.929623 0.000 1.000
#> GSM149158 2 0.0000 0.929623 0.000 1.000
#> GSM149159 2 0.0000 0.929623 0.000 1.000
#> GSM149160 2 0.0000 0.929623 0.000 1.000
#> GSM149161 2 0.0000 0.929623 0.000 1.000
#> GSM149162 2 0.0000 0.929623 0.000 1.000
#> GSM149163 2 0.0000 0.929623 0.000 1.000
#> GSM149164 2 0.0000 0.929623 0.000 1.000
#> GSM149165 2 0.0000 0.929623 0.000 1.000
#> GSM149166 2 0.0000 0.929623 0.000 1.000
#> GSM149167 2 0.0000 0.929623 0.000 1.000
#> GSM149168 2 0.0000 0.929623 0.000 1.000
#> GSM149169 2 0.0000 0.929623 0.000 1.000
#> GSM149170 2 0.0000 0.929623 0.000 1.000
#> GSM149171 2 0.0000 0.929623 0.000 1.000
#> GSM149172 1 0.7299 0.715648 0.796 0.204
#> GSM149173 2 0.0376 0.927029 0.004 0.996
#> GSM149174 2 0.0000 0.929623 0.000 1.000
#> GSM149175 1 0.0000 0.968492 1.000 0.000
#> GSM149176 2 0.0000 0.929623 0.000 1.000
#> GSM149177 2 0.1843 0.911395 0.028 0.972
#> GSM149178 2 0.6623 0.768405 0.172 0.828
#> GSM149179 2 0.0000 0.929623 0.000 1.000
#> GSM149180 2 0.0000 0.929623 0.000 1.000
#> GSM149181 2 0.0000 0.929623 0.000 1.000
#> GSM149182 2 0.0000 0.929623 0.000 1.000
#> GSM149183 2 0.0000 0.929623 0.000 1.000
#> GSM149184 2 0.0000 0.929623 0.000 1.000
#> GSM149185 2 0.0000 0.929623 0.000 1.000
#> GSM149186 2 0.0000 0.929623 0.000 1.000
#> GSM149187 2 0.0000 0.929623 0.000 1.000
#> GSM149188 2 0.0000 0.929623 0.000 1.000
#> GSM149189 2 0.0376 0.927015 0.004 0.996
#> GSM149190 2 0.0000 0.929623 0.000 1.000
#> GSM149191 2 0.0000 0.929623 0.000 1.000
#> GSM149192 2 0.0000 0.929623 0.000 1.000
#> GSM149193 2 0.0000 0.929623 0.000 1.000
#> GSM149194 2 0.0000 0.929623 0.000 1.000
#> GSM149195 1 0.0000 0.968492 1.000 0.000
#> GSM149196 2 0.0000 0.929623 0.000 1.000
#> GSM149197 2 0.0000 0.929623 0.000 1.000
#> GSM149198 1 0.0000 0.968492 1.000 0.000
#> GSM149199 2 0.0000 0.929623 0.000 1.000
#> GSM149200 2 0.0000 0.929623 0.000 1.000
#> GSM149201 2 0.0000 0.929623 0.000 1.000
#> GSM149202 2 0.0000 0.929623 0.000 1.000
#> GSM149203 2 0.9998 -0.000773 0.492 0.508
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149116 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149117 1 0.1529 0.944 0.960 0.040 0.000
#> GSM149118 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149119 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149120 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149121 1 0.0592 0.980 0.988 0.000 0.012
#> GSM149122 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149123 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149124 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149125 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149126 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149127 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149128 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149129 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149130 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149131 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149132 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149133 1 0.1411 0.978 0.964 0.000 0.036
#> GSM149134 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149135 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149136 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149137 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149138 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149139 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149140 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149141 3 0.2066 0.941 0.060 0.000 0.940
#> GSM149142 2 0.1411 0.941 0.036 0.964 0.000
#> GSM149143 3 0.3851 0.868 0.136 0.004 0.860
#> GSM149144 2 0.0592 0.957 0.012 0.988 0.000
#> GSM149145 3 0.1411 0.953 0.036 0.000 0.964
#> GSM149146 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149147 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149148 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149149 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149150 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149151 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149152 1 0.0000 0.981 1.000 0.000 0.000
#> GSM149153 3 0.1411 0.953 0.036 0.000 0.964
#> GSM149154 3 0.3267 0.867 0.116 0.000 0.884
#> GSM149155 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149158 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149159 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149160 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149161 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149162 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149164 2 0.0892 0.953 0.020 0.980 0.000
#> GSM149165 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149166 2 0.0237 0.960 0.004 0.996 0.000
#> GSM149167 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149168 2 0.2261 0.910 0.000 0.932 0.068
#> GSM149169 2 0.1163 0.947 0.028 0.972 0.000
#> GSM149170 2 0.2878 0.883 0.000 0.904 0.096
#> GSM149171 2 0.6305 0.097 0.000 0.516 0.484
#> GSM149172 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149173 2 0.4750 0.734 0.000 0.784 0.216
#> GSM149174 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149175 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149176 2 0.0237 0.960 0.004 0.996 0.000
#> GSM149177 3 0.4782 0.801 0.016 0.164 0.820
#> GSM149178 3 0.1529 0.947 0.000 0.040 0.960
#> GSM149179 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149189 3 0.1643 0.943 0.000 0.044 0.956
#> GSM149190 2 0.0424 0.958 0.008 0.992 0.000
#> GSM149191 2 0.2537 0.899 0.000 0.920 0.080
#> GSM149192 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149194 2 0.0747 0.955 0.016 0.984 0.000
#> GSM149195 3 0.0000 0.975 0.000 0.000 1.000
#> GSM149196 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149198 1 0.0237 0.981 0.996 0.000 0.004
#> GSM149199 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149200 2 0.3686 0.835 0.000 0.860 0.140
#> GSM149201 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.961 0.000 1.000 0.000
#> GSM149203 2 0.6215 0.287 0.000 0.572 0.428
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149100 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149101 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149102 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149103 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149104 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149105 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149106 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149107 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149108 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149109 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149110 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149111 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149112 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149113 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149114 3 0.0188 0.9184 0.000 0.000 0.996 0.004
#> GSM149115 4 0.2530 0.8682 0.112 0.000 0.000 0.888
#> GSM149116 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149117 1 0.6164 0.5247 0.644 0.092 0.000 0.264
#> GSM149118 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149121 4 0.0336 0.9717 0.008 0.000 0.000 0.992
#> GSM149122 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149130 1 0.4730 0.3982 0.636 0.000 0.000 0.364
#> GSM149131 4 0.3569 0.7563 0.196 0.000 0.000 0.804
#> GSM149132 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0000 0.9786 0.000 0.000 0.000 1.000
#> GSM149134 1 0.4072 0.5676 0.748 0.000 0.000 0.252
#> GSM149135 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149136 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149137 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149138 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149139 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149140 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149141 1 0.5297 -0.0281 0.548 0.004 0.444 0.004
#> GSM149142 1 0.0817 0.7356 0.976 0.024 0.000 0.000
#> GSM149143 1 0.2602 0.7116 0.908 0.008 0.076 0.008
#> GSM149144 1 0.4605 0.5449 0.664 0.336 0.000 0.000
#> GSM149145 3 0.5028 0.3937 0.400 0.004 0.596 0.000
#> GSM149146 2 0.0707 0.9020 0.020 0.980 0.000 0.000
#> GSM149147 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149148 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149149 1 0.1716 0.7389 0.936 0.000 0.000 0.064
#> GSM149150 2 0.5004 0.3178 0.392 0.604 0.004 0.000
#> GSM149151 1 0.1637 0.7391 0.940 0.000 0.000 0.060
#> GSM149152 1 0.4746 0.3998 0.632 0.000 0.000 0.368
#> GSM149153 3 0.5158 0.2134 0.472 0.004 0.524 0.000
#> GSM149154 3 0.4599 0.7658 0.088 0.000 0.800 0.112
#> GSM149155 2 0.1022 0.8991 0.032 0.968 0.000 0.000
#> GSM149156 2 0.1211 0.8962 0.040 0.960 0.000 0.000
#> GSM149157 2 0.4713 0.3715 0.360 0.640 0.000 0.000
#> GSM149158 1 0.4454 0.5845 0.692 0.308 0.000 0.000
#> GSM149159 2 0.1109 0.8957 0.028 0.968 0.004 0.000
#> GSM149160 1 0.4431 0.5827 0.696 0.304 0.000 0.000
#> GSM149161 1 0.4746 0.4856 0.632 0.368 0.000 0.000
#> GSM149162 2 0.1211 0.8962 0.040 0.960 0.000 0.000
#> GSM149163 2 0.1211 0.8962 0.040 0.960 0.000 0.000
#> GSM149164 1 0.4088 0.6494 0.764 0.232 0.004 0.000
#> GSM149165 2 0.0469 0.9021 0.012 0.988 0.000 0.000
#> GSM149166 2 0.4134 0.6218 0.260 0.740 0.000 0.000
#> GSM149167 1 0.4679 0.5178 0.648 0.352 0.000 0.000
#> GSM149168 2 0.1284 0.8920 0.024 0.964 0.012 0.000
#> GSM149169 1 0.3266 0.7034 0.832 0.168 0.000 0.000
#> GSM149170 2 0.1629 0.8854 0.024 0.952 0.024 0.000
#> GSM149171 2 0.3659 0.7824 0.024 0.840 0.136 0.000
#> GSM149172 3 0.2761 0.8523 0.016 0.064 0.908 0.012
#> GSM149173 2 0.2882 0.8381 0.024 0.892 0.084 0.000
#> GSM149174 1 0.4477 0.5793 0.688 0.312 0.000 0.000
#> GSM149175 3 0.0336 0.9159 0.000 0.000 0.992 0.008
#> GSM149176 2 0.3172 0.7764 0.160 0.840 0.000 0.000
#> GSM149177 3 0.6759 0.3481 0.108 0.344 0.548 0.000
#> GSM149178 3 0.3636 0.7461 0.008 0.172 0.820 0.000
#> GSM149179 2 0.0707 0.9020 0.020 0.980 0.000 0.000
#> GSM149180 2 0.0707 0.9020 0.020 0.980 0.000 0.000
#> GSM149181 2 0.0707 0.8977 0.020 0.980 0.000 0.000
#> GSM149182 2 0.0707 0.9020 0.020 0.980 0.000 0.000
#> GSM149183 2 0.0469 0.9036 0.012 0.988 0.000 0.000
#> GSM149184 2 0.0188 0.9032 0.004 0.996 0.000 0.000
#> GSM149185 2 0.0895 0.8964 0.020 0.976 0.004 0.000
#> GSM149186 2 0.0336 0.9032 0.008 0.992 0.000 0.000
#> GSM149187 2 0.1022 0.8995 0.032 0.968 0.000 0.000
#> GSM149188 2 0.0188 0.9032 0.004 0.996 0.000 0.000
#> GSM149189 2 0.5611 0.2510 0.024 0.564 0.412 0.000
#> GSM149190 1 0.4981 0.2433 0.536 0.464 0.000 0.000
#> GSM149191 2 0.3691 0.8335 0.076 0.856 0.068 0.000
#> GSM149192 2 0.0592 0.9037 0.016 0.984 0.000 0.000
#> GSM149193 2 0.0000 0.9026 0.000 1.000 0.000 0.000
#> GSM149194 1 0.4250 0.6147 0.724 0.276 0.000 0.000
#> GSM149195 3 0.0000 0.9156 0.000 0.000 1.000 0.000
#> GSM149196 2 0.0336 0.9030 0.008 0.992 0.000 0.000
#> GSM149197 2 0.1211 0.8962 0.040 0.960 0.000 0.000
#> GSM149198 1 0.4994 0.0682 0.520 0.000 0.000 0.480
#> GSM149199 2 0.2281 0.8533 0.096 0.904 0.000 0.000
#> GSM149200 2 0.1929 0.8777 0.024 0.940 0.036 0.000
#> GSM149201 2 0.0707 0.9020 0.020 0.980 0.000 0.000
#> GSM149202 2 0.1004 0.8950 0.024 0.972 0.004 0.000
#> GSM149203 2 0.5321 0.5597 0.032 0.672 0.296 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149100 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149101 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149102 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149103 3 0.0727 0.9083 0.004 0.004 0.980 0.000 0.012
#> GSM149104 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149105 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149106 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149107 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149108 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149109 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149110 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149111 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149112 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149113 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149114 3 0.0162 0.9227 0.000 0.000 0.996 0.004 0.000
#> GSM149115 4 0.4307 -0.0853 0.496 0.000 0.000 0.504 0.000
#> GSM149116 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.5803 0.5593 0.660 0.224 0.000 0.076 0.040
#> GSM149118 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.2074 0.8414 0.104 0.000 0.000 0.896 0.000
#> GSM149122 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.2930 0.7101 0.832 0.000 0.000 0.164 0.004
#> GSM149131 1 0.4138 0.3621 0.616 0.000 0.000 0.384 0.000
#> GSM149132 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 0.9542 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.1792 0.7730 0.916 0.000 0.000 0.084 0.000
#> GSM149135 1 0.0290 0.8110 0.992 0.000 0.000 0.008 0.000
#> GSM149136 1 0.0290 0.8110 0.992 0.000 0.000 0.008 0.000
#> GSM149137 1 0.0290 0.8110 0.992 0.000 0.000 0.008 0.000
#> GSM149138 1 0.0162 0.8109 0.996 0.000 0.000 0.004 0.000
#> GSM149139 1 0.0290 0.8110 0.992 0.000 0.000 0.008 0.000
#> GSM149140 1 0.0290 0.8110 0.992 0.000 0.000 0.008 0.000
#> GSM149141 1 0.6779 0.2840 0.508 0.028 0.316 0.000 0.148
#> GSM149142 1 0.3949 0.5065 0.696 0.300 0.000 0.000 0.004
#> GSM149143 1 0.7982 0.2049 0.408 0.316 0.080 0.008 0.188
#> GSM149144 2 0.2370 0.6234 0.040 0.904 0.000 0.000 0.056
#> GSM149145 3 0.6878 0.0576 0.372 0.024 0.448 0.000 0.156
#> GSM149146 2 0.4567 0.1107 0.004 0.544 0.004 0.000 0.448
#> GSM149147 1 0.0162 0.8109 0.996 0.000 0.000 0.004 0.000
#> GSM149148 1 0.0162 0.8109 0.996 0.000 0.000 0.004 0.000
#> GSM149149 1 0.0162 0.8109 0.996 0.000 0.000 0.004 0.000
#> GSM149150 5 0.6597 0.2405 0.232 0.268 0.004 0.000 0.496
#> GSM149151 1 0.0162 0.8109 0.996 0.000 0.000 0.004 0.000
#> GSM149152 1 0.3550 0.6367 0.760 0.004 0.000 0.236 0.000
#> GSM149153 1 0.7068 0.0803 0.424 0.028 0.372 0.000 0.176
#> GSM149154 3 0.6528 0.5033 0.180 0.004 0.612 0.168 0.036
#> GSM149155 2 0.3395 0.5047 0.000 0.764 0.000 0.000 0.236
#> GSM149156 2 0.1121 0.6175 0.000 0.956 0.000 0.000 0.044
#> GSM149157 2 0.3697 0.5471 0.080 0.820 0.000 0.000 0.100
#> GSM149158 2 0.2424 0.5847 0.132 0.868 0.000 0.000 0.000
#> GSM149159 5 0.3796 0.4137 0.000 0.300 0.000 0.000 0.700
#> GSM149160 2 0.4489 0.5088 0.140 0.764 0.004 0.000 0.092
#> GSM149161 2 0.1792 0.6046 0.084 0.916 0.000 0.000 0.000
#> GSM149162 2 0.2127 0.6085 0.000 0.892 0.000 0.000 0.108
#> GSM149163 2 0.2561 0.5885 0.000 0.856 0.000 0.000 0.144
#> GSM149164 2 0.5876 0.2856 0.140 0.608 0.004 0.000 0.248
#> GSM149165 5 0.4045 0.3931 0.000 0.356 0.000 0.000 0.644
#> GSM149166 2 0.5255 0.3890 0.068 0.644 0.004 0.000 0.284
#> GSM149167 2 0.2462 0.5928 0.112 0.880 0.000 0.000 0.008
#> GSM149168 5 0.2732 0.5571 0.000 0.160 0.000 0.000 0.840
#> GSM149169 2 0.3586 0.4773 0.264 0.736 0.000 0.000 0.000
#> GSM149170 5 0.1168 0.6122 0.000 0.032 0.008 0.000 0.960
#> GSM149171 5 0.1012 0.6061 0.000 0.020 0.012 0.000 0.968
#> GSM149172 3 0.4902 0.2298 0.000 0.008 0.520 0.012 0.460
#> GSM149173 5 0.1106 0.6112 0.000 0.024 0.012 0.000 0.964
#> GSM149174 2 0.2806 0.5712 0.152 0.844 0.000 0.000 0.004
#> GSM149175 3 0.2325 0.8565 0.000 0.000 0.904 0.068 0.028
#> GSM149176 2 0.4748 0.2648 0.016 0.596 0.004 0.000 0.384
#> GSM149177 5 0.8052 0.1475 0.088 0.288 0.280 0.000 0.344
#> GSM149178 5 0.4826 0.3551 0.008 0.024 0.324 0.000 0.644
#> GSM149179 2 0.4440 0.0580 0.000 0.528 0.004 0.000 0.468
#> GSM149180 2 0.4297 0.0599 0.000 0.528 0.000 0.000 0.472
#> GSM149181 5 0.3109 0.5426 0.000 0.200 0.000 0.000 0.800
#> GSM149182 2 0.4235 0.1681 0.000 0.576 0.000 0.000 0.424
#> GSM149183 2 0.4268 0.0596 0.000 0.556 0.000 0.000 0.444
#> GSM149184 5 0.4350 0.2800 0.000 0.408 0.004 0.000 0.588
#> GSM149185 5 0.1671 0.6077 0.000 0.076 0.000 0.000 0.924
#> GSM149186 5 0.4242 0.2269 0.000 0.428 0.000 0.000 0.572
#> GSM149187 2 0.3305 0.5217 0.000 0.776 0.000 0.000 0.224
#> GSM149188 5 0.4283 0.1694 0.000 0.456 0.000 0.000 0.544
#> GSM149189 5 0.2770 0.5585 0.004 0.008 0.124 0.000 0.864
#> GSM149190 2 0.2077 0.6224 0.040 0.920 0.000 0.000 0.040
#> GSM149191 5 0.4582 0.1851 0.000 0.416 0.012 0.000 0.572
#> GSM149192 5 0.4300 0.1154 0.000 0.476 0.000 0.000 0.524
#> GSM149193 5 0.4161 0.3079 0.000 0.392 0.000 0.000 0.608
#> GSM149194 2 0.4524 0.4906 0.208 0.736 0.004 0.000 0.052
#> GSM149195 3 0.1043 0.8978 0.000 0.000 0.960 0.000 0.040
#> GSM149196 5 0.4288 0.3195 0.000 0.384 0.004 0.000 0.612
#> GSM149197 2 0.2561 0.5879 0.000 0.856 0.000 0.000 0.144
#> GSM149198 1 0.4283 0.5451 0.692 0.000 0.012 0.292 0.004
#> GSM149199 2 0.1478 0.6177 0.000 0.936 0.000 0.000 0.064
#> GSM149200 5 0.1041 0.6121 0.000 0.032 0.004 0.000 0.964
#> GSM149201 2 0.4210 0.2088 0.000 0.588 0.000 0.000 0.412
#> GSM149202 5 0.1341 0.6114 0.000 0.056 0.000 0.000 0.944
#> GSM149203 5 0.5277 0.4035 0.000 0.228 0.108 0.000 0.664
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.2320 0.8313 0.000 0.000 0.864 0.000 0.004 0.132
#> GSM149104 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0865 0.9154 0.000 0.000 0.964 0.000 0.000 0.036
#> GSM149107 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.9382 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.4219 0.4093 0.592 0.000 0.000 0.388 0.000 0.020
#> GSM149116 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.6493 0.2573 0.520 0.284 0.000 0.044 0.012 0.140
#> GSM149118 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.3087 0.7317 0.176 0.000 0.000 0.808 0.004 0.012
#> GSM149122 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.2968 0.7656 0.852 0.004 0.000 0.092 0.000 0.052
#> GSM149131 1 0.4045 0.5649 0.664 0.000 0.000 0.312 0.000 0.024
#> GSM149132 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0000 0.9842 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149134 1 0.1857 0.8003 0.924 0.000 0.000 0.044 0.004 0.028
#> GSM149135 1 0.0146 0.8190 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149136 1 0.0146 0.8190 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149137 1 0.0363 0.8181 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM149138 1 0.0692 0.8153 0.976 0.000 0.000 0.000 0.004 0.020
#> GSM149139 1 0.0146 0.8187 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149140 1 0.0000 0.8189 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 6 0.7053 0.1884 0.288 0.004 0.112 0.000 0.144 0.452
#> GSM149142 1 0.5772 -0.1072 0.468 0.184 0.000 0.000 0.000 0.348
#> GSM149143 6 0.6652 0.3222 0.224 0.072 0.052 0.000 0.076 0.576
#> GSM149144 2 0.2425 0.4497 0.024 0.884 0.000 0.000 0.004 0.088
#> GSM149145 6 0.7064 0.2149 0.212 0.000 0.168 0.000 0.148 0.472
#> GSM149146 2 0.4595 0.5293 0.000 0.668 0.000 0.000 0.248 0.084
#> GSM149147 1 0.0458 0.8161 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM149148 1 0.0260 0.8183 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM149149 1 0.0260 0.8183 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM149150 6 0.7445 -0.0220 0.128 0.288 0.000 0.000 0.248 0.336
#> GSM149151 1 0.0790 0.8118 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM149152 1 0.3601 0.7087 0.792 0.008 0.000 0.160 0.000 0.040
#> GSM149153 6 0.7027 0.2125 0.220 0.000 0.148 0.000 0.156 0.476
#> GSM149154 3 0.7402 0.2458 0.200 0.000 0.488 0.148 0.028 0.136
#> GSM149155 2 0.2070 0.5579 0.000 0.892 0.000 0.000 0.100 0.008
#> GSM149156 2 0.3489 0.2385 0.000 0.708 0.000 0.000 0.004 0.288
#> GSM149157 2 0.5114 -0.1714 0.020 0.484 0.000 0.000 0.040 0.456
#> GSM149158 2 0.4671 -0.0863 0.044 0.532 0.000 0.000 0.000 0.424
#> GSM149159 5 0.4117 0.6101 0.000 0.112 0.000 0.000 0.748 0.140
#> GSM149160 6 0.5295 0.1523 0.040 0.428 0.000 0.000 0.032 0.500
#> GSM149161 2 0.4355 -0.0336 0.024 0.556 0.000 0.000 0.000 0.420
#> GSM149162 2 0.3240 0.4333 0.000 0.812 0.000 0.000 0.040 0.148
#> GSM149163 2 0.1829 0.5329 0.000 0.920 0.000 0.000 0.056 0.024
#> GSM149164 6 0.6186 0.2495 0.032 0.312 0.004 0.000 0.136 0.516
#> GSM149165 2 0.4751 0.2895 0.000 0.500 0.000 0.000 0.452 0.048
#> GSM149166 2 0.4911 0.4864 0.048 0.712 0.000 0.000 0.076 0.164
#> GSM149167 2 0.4649 -0.0318 0.036 0.560 0.000 0.000 0.004 0.400
#> GSM149168 5 0.2442 0.7267 0.000 0.048 0.000 0.000 0.884 0.068
#> GSM149169 6 0.5262 0.1273 0.096 0.448 0.000 0.000 0.000 0.456
#> GSM149170 5 0.1341 0.7431 0.000 0.024 0.000 0.000 0.948 0.028
#> GSM149171 5 0.1074 0.7413 0.000 0.012 0.000 0.000 0.960 0.028
#> GSM149172 5 0.5101 0.4573 0.000 0.004 0.232 0.008 0.652 0.104
#> GSM149173 5 0.1672 0.7386 0.000 0.016 0.004 0.000 0.932 0.048
#> GSM149174 2 0.4636 -0.1119 0.040 0.516 0.000 0.000 0.000 0.444
#> GSM149175 3 0.4712 0.6918 0.008 0.000 0.732 0.040 0.048 0.172
#> GSM149176 2 0.5498 0.4379 0.020 0.616 0.000 0.000 0.136 0.228
#> GSM149177 6 0.7759 -0.0532 0.032 0.328 0.104 0.000 0.184 0.352
#> GSM149178 5 0.6911 0.2037 0.004 0.064 0.188 0.000 0.432 0.312
#> GSM149179 2 0.4869 0.5009 0.000 0.628 0.000 0.000 0.276 0.096
#> GSM149180 2 0.4595 0.5318 0.000 0.668 0.000 0.000 0.248 0.084
#> GSM149181 5 0.4045 0.3459 0.000 0.268 0.000 0.000 0.696 0.036
#> GSM149182 2 0.4176 0.5567 0.000 0.716 0.000 0.000 0.220 0.064
#> GSM149183 2 0.3575 0.5350 0.000 0.708 0.000 0.000 0.284 0.008
#> GSM149184 2 0.5104 0.3882 0.000 0.540 0.000 0.000 0.372 0.088
#> GSM149185 5 0.2039 0.7190 0.000 0.076 0.000 0.000 0.904 0.020
#> GSM149186 2 0.4818 0.4305 0.000 0.572 0.000 0.000 0.364 0.064
#> GSM149187 2 0.2704 0.5635 0.000 0.844 0.000 0.000 0.140 0.016
#> GSM149188 2 0.3830 0.4517 0.000 0.620 0.000 0.000 0.376 0.004
#> GSM149189 5 0.4083 0.6460 0.000 0.024 0.072 0.000 0.780 0.124
#> GSM149190 2 0.3454 0.3086 0.012 0.760 0.000 0.000 0.004 0.224
#> GSM149191 5 0.5778 0.1739 0.000 0.176 0.004 0.000 0.508 0.312
#> GSM149192 2 0.4206 0.4498 0.000 0.620 0.000 0.000 0.356 0.024
#> GSM149193 2 0.4500 0.4133 0.000 0.572 0.000 0.000 0.392 0.036
#> GSM149194 6 0.5642 0.2054 0.072 0.388 0.000 0.000 0.032 0.508
#> GSM149195 3 0.2815 0.8064 0.000 0.000 0.848 0.000 0.120 0.032
#> GSM149196 2 0.5050 0.3356 0.000 0.508 0.000 0.000 0.416 0.076
#> GSM149197 2 0.2001 0.5171 0.000 0.912 0.000 0.000 0.040 0.048
#> GSM149198 1 0.4335 0.6770 0.736 0.000 0.000 0.180 0.012 0.072
#> GSM149199 2 0.2871 0.3581 0.000 0.804 0.000 0.000 0.004 0.192
#> GSM149200 5 0.1003 0.7429 0.000 0.020 0.000 0.000 0.964 0.016
#> GSM149201 2 0.3713 0.5662 0.000 0.744 0.000 0.000 0.224 0.032
#> GSM149202 5 0.2134 0.7091 0.000 0.052 0.000 0.000 0.904 0.044
#> GSM149203 5 0.4750 0.6181 0.000 0.044 0.088 0.000 0.732 0.136
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:skmeans 102 2.24e-11 2
#> SD:skmeans 103 2.33e-22 3
#> SD:skmeans 93 3.58e-29 4
#> SD:skmeans 74 1.77e-25 5
#> SD:skmeans 68 8.81e-23 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "pam"]
# you can also extract it by
# res = res_list["SD:pam"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.411 0.770 0.873 0.4757 0.505 0.505
#> 3 3 0.638 0.851 0.910 0.2515 0.861 0.728
#> 4 4 0.890 0.917 0.962 0.1857 0.923 0.796
#> 5 5 0.871 0.911 0.952 0.1215 0.878 0.614
#> 6 6 0.854 0.703 0.877 0.0375 0.936 0.715
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 2 0.9209 0.562 0.336 0.664
#> GSM149100 2 0.7528 0.698 0.216 0.784
#> GSM149101 1 0.8661 0.549 0.712 0.288
#> GSM149102 2 0.9209 0.562 0.336 0.664
#> GSM149103 2 0.2043 0.866 0.032 0.968
#> GSM149104 2 0.9209 0.562 0.336 0.664
#> GSM149105 2 0.8861 0.603 0.304 0.696
#> GSM149106 1 0.8499 0.748 0.724 0.276
#> GSM149107 2 0.9427 0.331 0.360 0.640
#> GSM149108 2 0.9209 0.562 0.336 0.664
#> GSM149109 2 0.9209 0.562 0.336 0.664
#> GSM149110 2 0.8499 0.636 0.276 0.724
#> GSM149111 2 0.6623 0.741 0.172 0.828
#> GSM149112 2 0.9209 0.562 0.336 0.664
#> GSM149113 2 0.9209 0.562 0.336 0.664
#> GSM149114 2 0.8861 0.377 0.304 0.696
#> GSM149115 1 0.0000 0.777 1.000 0.000
#> GSM149116 1 0.0000 0.777 1.000 0.000
#> GSM149117 1 0.9248 0.700 0.660 0.340
#> GSM149118 1 0.0000 0.777 1.000 0.000
#> GSM149119 1 0.0000 0.777 1.000 0.000
#> GSM149120 1 0.0000 0.777 1.000 0.000
#> GSM149121 1 0.0000 0.777 1.000 0.000
#> GSM149122 1 0.0000 0.777 1.000 0.000
#> GSM149123 1 0.0000 0.777 1.000 0.000
#> GSM149124 1 0.0000 0.777 1.000 0.000
#> GSM149125 1 0.0000 0.777 1.000 0.000
#> GSM149126 1 0.0000 0.777 1.000 0.000
#> GSM149127 1 0.0000 0.777 1.000 0.000
#> GSM149128 1 0.0000 0.777 1.000 0.000
#> GSM149129 1 0.0000 0.777 1.000 0.000
#> GSM149130 1 0.7528 0.784 0.784 0.216
#> GSM149131 1 0.5059 0.792 0.888 0.112
#> GSM149132 1 0.0000 0.777 1.000 0.000
#> GSM149133 1 0.0000 0.777 1.000 0.000
#> GSM149134 1 0.7139 0.790 0.804 0.196
#> GSM149135 1 0.7453 0.786 0.788 0.212
#> GSM149136 1 0.8955 0.724 0.688 0.312
#> GSM149137 1 0.7376 0.787 0.792 0.208
#> GSM149138 1 0.9209 0.703 0.664 0.336
#> GSM149139 1 0.7219 0.789 0.800 0.200
#> GSM149140 1 0.7376 0.787 0.792 0.208
#> GSM149141 2 0.5629 0.741 0.132 0.868
#> GSM149142 1 0.9209 0.703 0.664 0.336
#> GSM149143 1 0.9850 0.579 0.572 0.428
#> GSM149144 1 0.9248 0.700 0.660 0.340
#> GSM149145 1 0.9970 0.495 0.532 0.468
#> GSM149146 2 0.0000 0.890 0.000 1.000
#> GSM149147 1 0.7883 0.775 0.764 0.236
#> GSM149148 1 0.7376 0.787 0.792 0.208
#> GSM149149 1 0.7376 0.787 0.792 0.208
#> GSM149150 2 0.0000 0.890 0.000 1.000
#> GSM149151 1 0.9209 0.703 0.664 0.336
#> GSM149152 1 0.3114 0.786 0.944 0.056
#> GSM149153 2 0.5408 0.753 0.124 0.876
#> GSM149154 1 0.5408 0.790 0.876 0.124
#> GSM149155 2 0.0000 0.890 0.000 1.000
#> GSM149156 2 0.0000 0.890 0.000 1.000
#> GSM149157 2 0.0000 0.890 0.000 1.000
#> GSM149158 1 0.9850 0.579 0.572 0.428
#> GSM149159 2 0.0000 0.890 0.000 1.000
#> GSM149160 2 0.0672 0.884 0.008 0.992
#> GSM149161 2 0.8499 0.426 0.276 0.724
#> GSM149162 2 0.0000 0.890 0.000 1.000
#> GSM149163 2 0.0000 0.890 0.000 1.000
#> GSM149164 2 0.0000 0.890 0.000 1.000
#> GSM149165 2 0.0000 0.890 0.000 1.000
#> GSM149166 1 0.9522 0.666 0.628 0.372
#> GSM149167 1 0.9933 0.530 0.548 0.452
#> GSM149168 2 0.0000 0.890 0.000 1.000
#> GSM149169 1 0.9552 0.660 0.624 0.376
#> GSM149170 2 0.0000 0.890 0.000 1.000
#> GSM149171 2 0.0000 0.890 0.000 1.000
#> GSM149172 2 0.0000 0.890 0.000 1.000
#> GSM149173 2 0.0000 0.890 0.000 1.000
#> GSM149174 1 0.9248 0.700 0.660 0.340
#> GSM149175 2 0.7376 0.679 0.208 0.792
#> GSM149176 2 0.0672 0.884 0.008 0.992
#> GSM149177 2 0.5059 0.779 0.112 0.888
#> GSM149178 2 0.0000 0.890 0.000 1.000
#> GSM149179 2 0.0000 0.890 0.000 1.000
#> GSM149180 2 0.0000 0.890 0.000 1.000
#> GSM149181 2 0.0000 0.890 0.000 1.000
#> GSM149182 2 0.0000 0.890 0.000 1.000
#> GSM149183 2 0.0000 0.890 0.000 1.000
#> GSM149184 2 0.0000 0.890 0.000 1.000
#> GSM149185 2 0.0000 0.890 0.000 1.000
#> GSM149186 2 0.0000 0.890 0.000 1.000
#> GSM149187 2 0.0000 0.890 0.000 1.000
#> GSM149188 2 0.0000 0.890 0.000 1.000
#> GSM149189 2 0.0000 0.890 0.000 1.000
#> GSM149190 2 0.2236 0.862 0.036 0.964
#> GSM149191 2 0.0000 0.890 0.000 1.000
#> GSM149192 2 0.0000 0.890 0.000 1.000
#> GSM149193 2 0.0000 0.890 0.000 1.000
#> GSM149194 1 0.9850 0.579 0.572 0.428
#> GSM149195 2 0.0000 0.890 0.000 1.000
#> GSM149196 2 0.0000 0.890 0.000 1.000
#> GSM149197 2 0.0938 0.881 0.012 0.988
#> GSM149198 1 0.8608 0.683 0.716 0.284
#> GSM149199 2 0.2423 0.858 0.040 0.960
#> GSM149200 2 0.0000 0.890 0.000 1.000
#> GSM149201 2 0.0000 0.890 0.000 1.000
#> GSM149202 2 0.0000 0.890 0.000 1.000
#> GSM149203 2 0.0000 0.890 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149103 3 0.4702 0.662 0.000 0.212 0.788
#> GSM149104 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.981 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149116 1 0.0237 0.770 0.996 0.000 0.004
#> GSM149117 1 0.5397 0.786 0.720 0.280 0.000
#> GSM149118 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149119 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149120 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149121 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149122 1 0.0592 0.765 0.988 0.000 0.012
#> GSM149123 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149124 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149125 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149126 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149127 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149128 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149130 1 0.4796 0.804 0.780 0.220 0.000
#> GSM149131 1 0.3116 0.804 0.892 0.108 0.000
#> GSM149132 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149133 1 0.0000 0.773 1.000 0.000 0.000
#> GSM149134 1 0.4235 0.810 0.824 0.176 0.000
#> GSM149135 1 0.5363 0.789 0.724 0.276 0.000
#> GSM149136 1 0.5363 0.789 0.724 0.276 0.000
#> GSM149137 1 0.5363 0.789 0.724 0.276 0.000
#> GSM149138 1 0.5363 0.789 0.724 0.276 0.000
#> GSM149139 1 0.4605 0.807 0.796 0.204 0.000
#> GSM149140 1 0.5291 0.792 0.732 0.268 0.000
#> GSM149141 2 0.3551 0.790 0.132 0.868 0.000
#> GSM149142 1 0.5363 0.789 0.724 0.276 0.000
#> GSM149143 1 0.6045 0.658 0.620 0.380 0.000
#> GSM149144 1 0.5497 0.775 0.708 0.292 0.000
#> GSM149145 1 0.6483 0.512 0.544 0.452 0.004
#> GSM149146 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149147 1 0.5327 0.791 0.728 0.272 0.000
#> GSM149148 1 0.5327 0.791 0.728 0.272 0.000
#> GSM149149 1 0.5291 0.792 0.732 0.268 0.000
#> GSM149150 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149151 1 0.5363 0.789 0.724 0.276 0.000
#> GSM149152 1 0.1643 0.787 0.956 0.044 0.000
#> GSM149153 2 0.3482 0.796 0.128 0.872 0.000
#> GSM149154 1 0.3551 0.802 0.868 0.132 0.000
#> GSM149155 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149158 1 0.6095 0.639 0.608 0.392 0.000
#> GSM149159 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149160 2 0.0747 0.939 0.016 0.984 0.000
#> GSM149161 2 0.5431 0.446 0.284 0.716 0.000
#> GSM149162 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149164 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149165 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149166 1 0.5760 0.738 0.672 0.328 0.000
#> GSM149167 1 0.6180 0.593 0.584 0.416 0.000
#> GSM149168 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149169 1 0.5835 0.719 0.660 0.340 0.000
#> GSM149170 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149171 2 0.1964 0.903 0.000 0.944 0.056
#> GSM149172 2 0.0892 0.936 0.000 0.980 0.020
#> GSM149173 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149174 1 0.5431 0.782 0.716 0.284 0.000
#> GSM149175 2 0.6576 0.645 0.192 0.740 0.068
#> GSM149176 2 0.0592 0.943 0.012 0.988 0.000
#> GSM149177 2 0.3752 0.782 0.144 0.856 0.000
#> GSM149178 2 0.1964 0.903 0.000 0.944 0.056
#> GSM149179 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149189 2 0.1964 0.903 0.000 0.944 0.056
#> GSM149190 2 0.1964 0.902 0.056 0.944 0.000
#> GSM149191 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149194 1 0.6111 0.633 0.604 0.396 0.000
#> GSM149195 2 0.6280 0.098 0.000 0.540 0.460
#> GSM149196 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149197 2 0.1163 0.929 0.028 0.972 0.000
#> GSM149198 1 0.5178 0.725 0.744 0.256 0.000
#> GSM149199 2 0.2066 0.897 0.060 0.940 0.000
#> GSM149200 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149201 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.951 0.000 1.000 0.000
#> GSM149203 2 0.0000 0.951 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149103 3 0.0469 0.982 0.000 0.012 0.988 0.000
#> GSM149104 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149107 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> GSM149115 1 0.1211 0.913 0.960 0.000 0.000 0.040
#> GSM149116 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149117 1 0.2345 0.870 0.900 0.100 0.000 0.000
#> GSM149118 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149121 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149122 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149130 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149131 1 0.0188 0.935 0.996 0.000 0.000 0.004
#> GSM149132 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0000 1.000 0.000 0.000 0.000 1.000
#> GSM149134 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149141 2 0.3266 0.796 0.168 0.832 0.000 0.000
#> GSM149142 1 0.0592 0.933 0.984 0.016 0.000 0.000
#> GSM149143 1 0.1637 0.902 0.940 0.060 0.000 0.000
#> GSM149144 1 0.1302 0.915 0.956 0.044 0.000 0.000
#> GSM149145 1 0.4406 0.595 0.700 0.300 0.000 0.000
#> GSM149146 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149147 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149150 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149151 1 0.0469 0.934 0.988 0.012 0.000 0.000
#> GSM149152 1 0.0336 0.934 0.992 0.000 0.000 0.008
#> GSM149153 2 0.3801 0.724 0.220 0.780 0.000 0.000
#> GSM149154 1 0.3402 0.791 0.832 0.004 0.000 0.164
#> GSM149155 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149156 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149157 2 0.1302 0.917 0.044 0.956 0.000 0.000
#> GSM149158 1 0.0817 0.928 0.976 0.024 0.000 0.000
#> GSM149159 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149160 2 0.2408 0.873 0.104 0.896 0.000 0.000
#> GSM149161 2 0.4967 0.168 0.452 0.548 0.000 0.000
#> GSM149162 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149163 2 0.0817 0.929 0.024 0.976 0.000 0.000
#> GSM149164 2 0.1637 0.906 0.060 0.940 0.000 0.000
#> GSM149165 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149166 1 0.4776 0.450 0.624 0.376 0.000 0.000
#> GSM149167 1 0.1022 0.924 0.968 0.032 0.000 0.000
#> GSM149168 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149169 1 0.0000 0.936 1.000 0.000 0.000 0.000
#> GSM149170 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149171 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149172 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149173 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149174 1 0.0592 0.933 0.984 0.016 0.000 0.000
#> GSM149175 2 0.6217 0.475 0.016 0.624 0.044 0.316
#> GSM149176 2 0.0469 0.936 0.012 0.988 0.000 0.000
#> GSM149177 2 0.3400 0.783 0.180 0.820 0.000 0.000
#> GSM149178 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149179 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149180 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149181 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149182 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149183 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149184 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149185 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149186 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149188 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149189 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149190 2 0.4103 0.673 0.256 0.744 0.000 0.000
#> GSM149191 2 0.1022 0.923 0.032 0.968 0.000 0.000
#> GSM149192 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149193 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149194 1 0.1637 0.904 0.940 0.060 0.000 0.000
#> GSM149195 2 0.4543 0.545 0.000 0.676 0.324 0.000
#> GSM149196 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149197 2 0.2973 0.825 0.144 0.856 0.000 0.000
#> GSM149198 1 0.4740 0.750 0.788 0.132 0.000 0.080
#> GSM149199 2 0.2760 0.843 0.128 0.872 0.000 0.000
#> GSM149200 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149201 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149202 2 0.0000 0.941 0.000 1.000 0.000 0.000
#> GSM149203 2 0.0657 0.934 0.012 0.984 0.004 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149104 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149107 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.0162 0.945 0.996 0.000 0.000 0.004 0.000
#> GSM149116 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.1725 0.906 0.936 0.020 0.000 0.000 0.044
#> GSM149118 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149122 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0162 0.945 0.996 0.004 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149141 5 0.2561 0.806 0.144 0.000 0.000 0.000 0.856
#> GSM149142 1 0.2338 0.857 0.884 0.112 0.000 0.000 0.004
#> GSM149143 1 0.2813 0.809 0.832 0.168 0.000 0.000 0.000
#> GSM149144 2 0.2361 0.872 0.096 0.892 0.000 0.000 0.012
#> GSM149145 1 0.3612 0.706 0.764 0.008 0.000 0.000 0.228
#> GSM149146 5 0.2377 0.833 0.000 0.128 0.000 0.000 0.872
#> GSM149147 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149151 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0290 0.943 0.992 0.000 0.000 0.008 0.000
#> GSM149153 5 0.3274 0.714 0.220 0.000 0.000 0.000 0.780
#> GSM149154 1 0.3180 0.855 0.856 0.076 0.000 0.068 0.000
#> GSM149155 2 0.1792 0.900 0.000 0.916 0.000 0.000 0.084
#> GSM149156 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000
#> GSM149157 2 0.0162 0.927 0.000 0.996 0.000 0.000 0.004
#> GSM149158 2 0.0290 0.926 0.008 0.992 0.000 0.000 0.000
#> GSM149159 5 0.3109 0.774 0.000 0.200 0.000 0.000 0.800
#> GSM149160 2 0.0451 0.926 0.004 0.988 0.000 0.000 0.008
#> GSM149161 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000
#> GSM149162 2 0.1121 0.922 0.000 0.956 0.000 0.000 0.044
#> GSM149163 2 0.1121 0.922 0.000 0.956 0.000 0.000 0.044
#> GSM149164 2 0.3109 0.749 0.000 0.800 0.000 0.000 0.200
#> GSM149165 5 0.0880 0.898 0.000 0.032 0.000 0.000 0.968
#> GSM149166 2 0.2873 0.869 0.020 0.860 0.000 0.000 0.120
#> GSM149167 2 0.0162 0.927 0.004 0.996 0.000 0.000 0.000
#> GSM149168 5 0.2074 0.858 0.000 0.104 0.000 0.000 0.896
#> GSM149169 2 0.0162 0.927 0.004 0.996 0.000 0.000 0.000
#> GSM149170 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149171 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149172 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149173 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149174 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000
#> GSM149175 5 0.5189 0.536 0.012 0.000 0.044 0.300 0.644
#> GSM149176 2 0.3684 0.674 0.000 0.720 0.000 0.000 0.280
#> GSM149177 5 0.4469 0.746 0.148 0.096 0.000 0.000 0.756
#> GSM149178 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149179 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149180 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149181 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149182 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149183 2 0.1851 0.900 0.000 0.912 0.000 0.000 0.088
#> GSM149184 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149185 5 0.0290 0.907 0.000 0.008 0.000 0.000 0.992
#> GSM149186 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149187 5 0.3586 0.685 0.000 0.264 0.000 0.000 0.736
#> GSM149188 5 0.3242 0.744 0.000 0.216 0.000 0.000 0.784
#> GSM149189 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149190 2 0.1579 0.920 0.024 0.944 0.000 0.000 0.032
#> GSM149191 5 0.2852 0.805 0.000 0.172 0.000 0.000 0.828
#> GSM149192 5 0.1608 0.879 0.000 0.072 0.000 0.000 0.928
#> GSM149193 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149194 2 0.2605 0.797 0.148 0.852 0.000 0.000 0.000
#> GSM149195 5 0.3707 0.627 0.000 0.000 0.284 0.000 0.716
#> GSM149196 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149197 2 0.1121 0.922 0.000 0.956 0.000 0.000 0.044
#> GSM149198 1 0.5659 0.658 0.692 0.032 0.000 0.128 0.148
#> GSM149199 2 0.0000 0.927 0.000 1.000 0.000 0.000 0.000
#> GSM149200 5 0.0162 0.909 0.000 0.004 0.000 0.000 0.996
#> GSM149201 5 0.3074 0.764 0.000 0.196 0.000 0.000 0.804
#> GSM149202 5 0.0000 0.910 0.000 0.000 0.000 0.000 1.000
#> GSM149203 5 0.2127 0.854 0.000 0.108 0.000 0.000 0.892
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.0146 0.99623 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149104 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149107 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.99975 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149116 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.1663 0.87530 0.912 0.000 0.000 0.000 0.000 0.088
#> GSM149118 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149122 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0000 1.00000 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149134 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 5 0.4095 0.14230 0.008 0.000 0.000 0.000 0.512 0.480
#> GSM149142 1 0.1806 0.87517 0.908 0.088 0.000 0.000 0.000 0.004
#> GSM149143 2 0.3864 -0.18211 0.480 0.520 0.000 0.000 0.000 0.000
#> GSM149144 2 0.4705 -0.02528 0.044 0.480 0.000 0.000 0.000 0.476
#> GSM149145 6 0.6142 -0.00933 0.296 0.020 0.000 0.000 0.188 0.496
#> GSM149146 5 0.2912 0.65660 0.000 0.000 0.000 0.000 0.784 0.216
#> GSM149147 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.0363 0.84944 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM149151 1 0.0000 0.95221 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0260 0.94638 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM149153 6 0.5553 0.03266 0.156 0.000 0.000 0.000 0.324 0.520
#> GSM149154 1 0.3112 0.81306 0.840 0.104 0.000 0.052 0.000 0.004
#> GSM149155 6 0.3864 -0.05494 0.000 0.480 0.000 0.000 0.000 0.520
#> GSM149156 2 0.3765 0.17096 0.000 0.596 0.000 0.000 0.000 0.404
#> GSM149157 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149158 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149159 5 0.3868 0.23789 0.000 0.492 0.000 0.000 0.508 0.000
#> GSM149160 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149161 2 0.0790 0.63163 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM149162 6 0.3867 -0.07244 0.000 0.488 0.000 0.000 0.000 0.512
#> GSM149163 6 0.3864 -0.05494 0.000 0.480 0.000 0.000 0.000 0.520
#> GSM149164 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149165 5 0.2219 0.74045 0.000 0.000 0.000 0.000 0.864 0.136
#> GSM149166 2 0.3869 -0.05392 0.000 0.500 0.000 0.000 0.000 0.500
#> GSM149167 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149168 5 0.2178 0.75853 0.000 0.132 0.000 0.000 0.868 0.000
#> GSM149169 2 0.0146 0.64710 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149170 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149171 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149172 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149173 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149174 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149175 6 0.6327 0.01289 0.004 0.000 0.016 0.256 0.244 0.480
#> GSM149176 2 0.5372 -0.03746 0.000 0.484 0.000 0.000 0.404 0.112
#> GSM149177 5 0.5007 0.60685 0.136 0.100 0.000 0.000 0.712 0.052
#> GSM149178 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149179 5 0.1075 0.83760 0.000 0.000 0.000 0.000 0.952 0.048
#> GSM149180 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149181 5 0.0632 0.84675 0.000 0.000 0.000 0.000 0.976 0.024
#> GSM149182 5 0.1007 0.83351 0.000 0.000 0.000 0.000 0.956 0.044
#> GSM149183 6 0.4460 -0.02953 0.000 0.452 0.000 0.000 0.028 0.520
#> GSM149184 5 0.1075 0.83760 0.000 0.000 0.000 0.000 0.952 0.048
#> GSM149185 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149186 5 0.1075 0.83760 0.000 0.000 0.000 0.000 0.952 0.048
#> GSM149187 6 0.4091 0.01221 0.000 0.008 0.000 0.000 0.472 0.520
#> GSM149188 6 0.3993 0.00244 0.000 0.004 0.000 0.000 0.476 0.520
#> GSM149189 5 0.0937 0.84319 0.000 0.000 0.000 0.000 0.960 0.040
#> GSM149190 2 0.3168 0.50402 0.024 0.804 0.000 0.000 0.000 0.172
#> GSM149191 2 0.3862 -0.23582 0.000 0.524 0.000 0.000 0.476 0.000
#> GSM149192 5 0.4797 0.37484 0.000 0.356 0.000 0.000 0.580 0.064
#> GSM149193 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149194 2 0.0000 0.64923 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149195 5 0.3101 0.57964 0.000 0.000 0.244 0.000 0.756 0.000
#> GSM149196 5 0.1075 0.83760 0.000 0.000 0.000 0.000 0.952 0.048
#> GSM149197 6 0.3868 -0.07637 0.000 0.492 0.000 0.000 0.000 0.508
#> GSM149198 1 0.6082 0.27922 0.516 0.324 0.000 0.040 0.120 0.000
#> GSM149199 2 0.3851 0.06325 0.000 0.540 0.000 0.000 0.000 0.460
#> GSM149200 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149201 6 0.3864 -0.00827 0.000 0.000 0.000 0.000 0.480 0.520
#> GSM149202 5 0.0000 0.85073 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149203 5 0.3390 0.56088 0.000 0.296 0.000 0.000 0.704 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:pam 101 1.32e-09 2
#> SD:pam 103 5.30e-26 3
#> SD:pam 102 4.46e-33 4
#> SD:pam 105 1.59e-39 5
#> SD:pam 83 6.17e-32 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "mclust"]
# you can also extract it by
# res = res_list["SD:mclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.988 0.996 0.4317 0.572 0.572
#> 3 3 1.000 0.961 0.977 0.4201 0.793 0.644
#> 4 4 0.745 0.773 0.861 0.1023 0.689 0.376
#> 5 5 0.994 0.946 0.974 0.1646 0.873 0.604
#> 6 6 0.873 0.841 0.894 0.0308 1.000 1.000
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
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 2 0.0000 0.994 0.000 1.000
#> GSM149100 2 0.0000 0.994 0.000 1.000
#> GSM149101 2 0.0000 0.994 0.000 1.000
#> GSM149102 2 0.0000 0.994 0.000 1.000
#> GSM149103 2 0.0000 0.994 0.000 1.000
#> GSM149104 2 0.0000 0.994 0.000 1.000
#> GSM149105 2 0.0000 0.994 0.000 1.000
#> GSM149106 2 0.0000 0.994 0.000 1.000
#> GSM149107 2 0.0000 0.994 0.000 1.000
#> GSM149108 2 0.0000 0.994 0.000 1.000
#> GSM149109 2 0.0000 0.994 0.000 1.000
#> GSM149110 2 0.0000 0.994 0.000 1.000
#> GSM149111 2 0.0000 0.994 0.000 1.000
#> GSM149112 2 0.0000 0.994 0.000 1.000
#> GSM149113 2 0.0000 0.994 0.000 1.000
#> GSM149114 2 0.0000 0.994 0.000 1.000
#> GSM149115 1 0.0000 1.000 1.000 0.000
#> GSM149116 1 0.0000 1.000 1.000 0.000
#> GSM149117 1 0.0376 0.996 0.996 0.004
#> GSM149118 1 0.0000 1.000 1.000 0.000
#> GSM149119 1 0.0000 1.000 1.000 0.000
#> GSM149120 1 0.0000 1.000 1.000 0.000
#> GSM149121 1 0.0000 1.000 1.000 0.000
#> GSM149122 1 0.0000 1.000 1.000 0.000
#> GSM149123 1 0.0000 1.000 1.000 0.000
#> GSM149124 1 0.0000 1.000 1.000 0.000
#> GSM149125 1 0.0000 1.000 1.000 0.000
#> GSM149126 1 0.0000 1.000 1.000 0.000
#> GSM149127 1 0.0000 1.000 1.000 0.000
#> GSM149128 1 0.0000 1.000 1.000 0.000
#> GSM149129 1 0.0000 1.000 1.000 0.000
#> GSM149130 1 0.0000 1.000 1.000 0.000
#> GSM149131 1 0.0000 1.000 1.000 0.000
#> GSM149132 1 0.0000 1.000 1.000 0.000
#> GSM149133 1 0.0000 1.000 1.000 0.000
#> GSM149134 1 0.0000 1.000 1.000 0.000
#> GSM149135 1 0.0000 1.000 1.000 0.000
#> GSM149136 1 0.0000 1.000 1.000 0.000
#> GSM149137 1 0.0000 1.000 1.000 0.000
#> GSM149138 1 0.0000 1.000 1.000 0.000
#> GSM149139 1 0.0000 1.000 1.000 0.000
#> GSM149140 1 0.0000 1.000 1.000 0.000
#> GSM149141 2 0.0000 0.994 0.000 1.000
#> GSM149142 2 0.9922 0.188 0.448 0.552
#> GSM149143 2 0.0000 0.994 0.000 1.000
#> GSM149144 2 0.0000 0.994 0.000 1.000
#> GSM149145 2 0.0000 0.994 0.000 1.000
#> GSM149146 2 0.0000 0.994 0.000 1.000
#> GSM149147 1 0.0000 1.000 1.000 0.000
#> GSM149148 1 0.0000 1.000 1.000 0.000
#> GSM149149 1 0.0000 1.000 1.000 0.000
#> GSM149150 2 0.0000 0.994 0.000 1.000
#> GSM149151 1 0.0000 1.000 1.000 0.000
#> GSM149152 1 0.0000 1.000 1.000 0.000
#> GSM149153 2 0.0000 0.994 0.000 1.000
#> GSM149154 2 0.0672 0.986 0.008 0.992
#> GSM149155 2 0.0000 0.994 0.000 1.000
#> GSM149156 2 0.0000 0.994 0.000 1.000
#> GSM149157 2 0.0000 0.994 0.000 1.000
#> GSM149158 2 0.0000 0.994 0.000 1.000
#> GSM149159 2 0.0000 0.994 0.000 1.000
#> GSM149160 2 0.0000 0.994 0.000 1.000
#> GSM149161 2 0.0000 0.994 0.000 1.000
#> GSM149162 2 0.0000 0.994 0.000 1.000
#> GSM149163 2 0.0000 0.994 0.000 1.000
#> GSM149164 2 0.0000 0.994 0.000 1.000
#> GSM149165 2 0.0000 0.994 0.000 1.000
#> GSM149166 2 0.0000 0.994 0.000 1.000
#> GSM149167 2 0.0000 0.994 0.000 1.000
#> GSM149168 2 0.0000 0.994 0.000 1.000
#> GSM149169 2 0.0000 0.994 0.000 1.000
#> GSM149170 2 0.0000 0.994 0.000 1.000
#> GSM149171 2 0.0000 0.994 0.000 1.000
#> GSM149172 2 0.0000 0.994 0.000 1.000
#> GSM149173 2 0.0000 0.994 0.000 1.000
#> GSM149174 2 0.0000 0.994 0.000 1.000
#> GSM149175 2 0.0376 0.990 0.004 0.996
#> GSM149176 2 0.0000 0.994 0.000 1.000
#> GSM149177 2 0.0000 0.994 0.000 1.000
#> GSM149178 2 0.0000 0.994 0.000 1.000
#> GSM149179 2 0.0000 0.994 0.000 1.000
#> GSM149180 2 0.0000 0.994 0.000 1.000
#> GSM149181 2 0.0000 0.994 0.000 1.000
#> GSM149182 2 0.0000 0.994 0.000 1.000
#> GSM149183 2 0.0000 0.994 0.000 1.000
#> GSM149184 2 0.0000 0.994 0.000 1.000
#> GSM149185 2 0.0000 0.994 0.000 1.000
#> GSM149186 2 0.0000 0.994 0.000 1.000
#> GSM149187 2 0.0000 0.994 0.000 1.000
#> GSM149188 2 0.0000 0.994 0.000 1.000
#> GSM149189 2 0.0000 0.994 0.000 1.000
#> GSM149190 2 0.0000 0.994 0.000 1.000
#> GSM149191 2 0.0000 0.994 0.000 1.000
#> GSM149192 2 0.0000 0.994 0.000 1.000
#> GSM149193 2 0.0000 0.994 0.000 1.000
#> GSM149194 2 0.0000 0.994 0.000 1.000
#> GSM149195 2 0.0000 0.994 0.000 1.000
#> GSM149196 2 0.0000 0.994 0.000 1.000
#> GSM149197 2 0.0000 0.994 0.000 1.000
#> GSM149198 1 0.0000 1.000 1.000 0.000
#> GSM149199 2 0.0000 0.994 0.000 1.000
#> GSM149200 2 0.0000 0.994 0.000 1.000
#> GSM149201 2 0.0000 0.994 0.000 1.000
#> GSM149202 2 0.0000 0.994 0.000 1.000
#> GSM149203 2 0.0000 0.994 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149103 2 0.0892 0.980 0.000 0.980 0.020
#> GSM149104 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149106 3 0.1753 0.924 0.000 0.048 0.952
#> GSM149107 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.964 0.000 0.000 1.000
#> GSM149115 1 0.1337 0.952 0.972 0.016 0.012
#> GSM149116 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149117 3 0.2031 0.939 0.032 0.016 0.952
#> GSM149118 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149119 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149120 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149121 1 0.1015 0.953 0.980 0.012 0.008
#> GSM149122 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149123 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149124 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149125 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149126 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149127 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149128 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149130 1 0.5318 0.774 0.780 0.016 0.204
#> GSM149131 1 0.1337 0.952 0.972 0.016 0.012
#> GSM149132 1 0.0000 0.955 1.000 0.000 0.000
#> GSM149133 1 0.0424 0.955 0.992 0.000 0.008
#> GSM149134 1 0.1337 0.952 0.972 0.016 0.012
#> GSM149135 1 0.2804 0.938 0.924 0.016 0.060
#> GSM149136 1 0.2998 0.934 0.916 0.016 0.068
#> GSM149137 1 0.2998 0.934 0.916 0.016 0.068
#> GSM149138 1 0.3091 0.932 0.912 0.016 0.072
#> GSM149139 1 0.2152 0.946 0.948 0.016 0.036
#> GSM149140 1 0.2703 0.940 0.928 0.016 0.056
#> GSM149141 2 0.0747 0.984 0.000 0.984 0.016
#> GSM149142 2 0.0747 0.984 0.000 0.984 0.016
#> GSM149143 2 0.4346 0.780 0.000 0.816 0.184
#> GSM149144 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149145 2 0.0747 0.984 0.000 0.984 0.016
#> GSM149146 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149147 1 0.3091 0.932 0.912 0.016 0.072
#> GSM149148 1 0.3091 0.932 0.912 0.016 0.072
#> GSM149149 1 0.3091 0.932 0.912 0.016 0.072
#> GSM149150 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149151 1 0.5681 0.732 0.748 0.016 0.236
#> GSM149152 3 0.3528 0.880 0.092 0.016 0.892
#> GSM149153 2 0.0747 0.984 0.000 0.984 0.016
#> GSM149154 3 0.0747 0.953 0.000 0.016 0.984
#> GSM149155 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149157 2 0.0237 0.990 0.000 0.996 0.004
#> GSM149158 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149159 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149160 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149161 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149162 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149164 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149165 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149166 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149167 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149168 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149169 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149170 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149171 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149172 3 0.4796 0.703 0.000 0.220 0.780
#> GSM149173 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149174 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149175 3 0.0747 0.953 0.000 0.016 0.984
#> GSM149176 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149177 2 0.1964 0.945 0.000 0.944 0.056
#> GSM149178 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149179 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149189 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149190 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149191 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149194 2 0.0424 0.989 0.000 0.992 0.008
#> GSM149195 2 0.1860 0.949 0.000 0.948 0.052
#> GSM149196 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149198 3 0.4539 0.801 0.148 0.016 0.836
#> GSM149199 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149200 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149201 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.991 0.000 1.000 0.000
#> GSM149203 2 0.0237 0.989 0.000 0.996 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149100 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149101 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149102 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149103 1 0.662 0.599 0.532 0.088 0.380 0.000
#> GSM149104 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149105 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149106 1 0.692 0.460 0.544 0.328 0.128 0.000
#> GSM149107 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149108 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149109 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149110 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149111 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149112 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149113 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149114 3 0.498 0.910 0.000 0.464 0.536 0.000
#> GSM149115 1 0.484 0.291 0.604 0.000 0.000 0.396
#> GSM149116 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149117 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149118 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149119 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149120 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149121 1 0.487 0.280 0.596 0.000 0.000 0.404
#> GSM149122 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149123 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149124 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149125 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149126 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149127 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149128 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149129 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149130 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149131 1 0.130 0.597 0.956 0.000 0.000 0.044
#> GSM149132 4 0.000 0.961 0.000 0.000 0.000 1.000
#> GSM149133 4 0.478 0.325 0.376 0.000 0.000 0.624
#> GSM149134 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149135 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149136 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149137 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149138 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149139 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149140 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149141 1 0.558 0.591 0.536 0.020 0.444 0.000
#> GSM149142 1 0.498 0.584 0.540 0.000 0.460 0.000
#> GSM149143 1 0.578 0.616 0.584 0.036 0.380 0.000
#> GSM149144 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149145 1 0.558 0.590 0.536 0.020 0.444 0.000
#> GSM149146 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149147 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149148 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149149 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149150 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149151 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149152 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149153 1 0.538 0.587 0.536 0.012 0.452 0.000
#> GSM149154 1 0.220 0.591 0.916 0.080 0.004 0.000
#> GSM149155 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149156 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149157 3 0.711 -0.598 0.408 0.128 0.464 0.000
#> GSM149158 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149159 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149160 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149161 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149162 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149163 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149164 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149165 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149166 1 0.540 0.546 0.512 0.012 0.476 0.000
#> GSM149167 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149168 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149169 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149170 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149171 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149172 1 0.699 0.594 0.524 0.128 0.348 0.000
#> GSM149173 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149174 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149175 1 0.599 0.504 0.656 0.264 0.080 0.000
#> GSM149176 1 0.541 0.545 0.508 0.012 0.480 0.000
#> GSM149177 1 0.576 0.587 0.528 0.028 0.444 0.000
#> GSM149178 1 0.551 0.540 0.508 0.016 0.476 0.000
#> GSM149179 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149180 2 0.540 0.978 0.012 0.520 0.468 0.000
#> GSM149181 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149182 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149183 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149184 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149185 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149186 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149187 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149188 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149189 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149190 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149191 1 0.615 0.475 0.488 0.048 0.464 0.000
#> GSM149192 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149193 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149194 1 0.500 0.563 0.516 0.000 0.484 0.000
#> GSM149195 1 0.660 0.357 0.520 0.396 0.084 0.000
#> GSM149196 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149197 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149198 1 0.000 0.616 1.000 0.000 0.000 0.000
#> GSM149199 2 0.550 0.976 0.016 0.520 0.464 0.000
#> GSM149200 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149201 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149202 2 0.498 0.997 0.000 0.536 0.464 0.000
#> GSM149203 2 0.550 0.966 0.016 0.524 0.460 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149103 2 0.0451 0.953 0.004 0.988 0.008 0.000 0.000
#> GSM149104 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149106 2 0.4101 0.520 0.004 0.664 0.332 0.000 0.000
#> GSM149107 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 0.993 0.000 0.000 1.000 0.000 0.000
#> GSM149115 4 0.1544 0.932 0.068 0.000 0.000 0.932 0.000
#> GSM149116 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.1908 0.868 0.908 0.092 0.000 0.000 0.000
#> GSM149118 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.1544 0.932 0.068 0.000 0.000 0.932 0.000
#> GSM149122 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.0404 0.951 0.988 0.000 0.000 0.012 0.000
#> GSM149132 4 0.0000 0.990 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0162 0.988 0.004 0.000 0.000 0.996 0.000
#> GSM149134 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149141 2 0.0162 0.955 0.004 0.996 0.000 0.000 0.000
#> GSM149142 2 0.0671 0.960 0.004 0.980 0.000 0.000 0.016
#> GSM149143 2 0.0510 0.949 0.016 0.984 0.000 0.000 0.000
#> GSM149144 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149145 2 0.0162 0.955 0.004 0.996 0.000 0.000 0.000
#> GSM149146 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149147 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149150 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149151 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149153 2 0.0162 0.955 0.004 0.996 0.000 0.000 0.000
#> GSM149154 1 0.4268 0.182 0.556 0.444 0.000 0.000 0.000
#> GSM149155 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149156 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149157 5 0.3480 0.695 0.000 0.248 0.000 0.000 0.752
#> GSM149158 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149159 5 0.0404 0.966 0.000 0.012 0.000 0.000 0.988
#> GSM149160 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149161 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149162 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149163 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149164 2 0.0451 0.958 0.004 0.988 0.000 0.000 0.008
#> GSM149165 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149166 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149167 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149168 5 0.0794 0.959 0.000 0.028 0.000 0.000 0.972
#> GSM149169 2 0.0671 0.960 0.004 0.980 0.000 0.000 0.016
#> GSM149170 5 0.0794 0.959 0.000 0.028 0.000 0.000 0.972
#> GSM149171 5 0.0794 0.959 0.000 0.028 0.000 0.000 0.972
#> GSM149172 2 0.1205 0.930 0.004 0.956 0.040 0.000 0.000
#> GSM149173 5 0.0794 0.959 0.000 0.028 0.000 0.000 0.972
#> GSM149174 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149175 2 0.4689 0.601 0.048 0.688 0.264 0.000 0.000
#> GSM149176 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149177 2 0.0162 0.955 0.004 0.996 0.000 0.000 0.000
#> GSM149178 2 0.0162 0.955 0.004 0.996 0.000 0.000 0.000
#> GSM149179 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149180 5 0.2648 0.834 0.000 0.152 0.000 0.000 0.848
#> GSM149181 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149182 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149183 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149184 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149185 5 0.0290 0.967 0.000 0.008 0.000 0.000 0.992
#> GSM149186 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149187 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149188 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149189 5 0.0794 0.959 0.000 0.028 0.000 0.000 0.972
#> GSM149190 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149191 5 0.3336 0.745 0.000 0.228 0.000 0.000 0.772
#> GSM149192 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149193 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149194 2 0.0609 0.961 0.000 0.980 0.000 0.000 0.020
#> GSM149195 3 0.1952 0.896 0.004 0.084 0.912 0.000 0.000
#> GSM149196 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149197 5 0.0162 0.967 0.000 0.004 0.000 0.000 0.996
#> GSM149198 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149199 5 0.1341 0.930 0.000 0.056 0.000 0.000 0.944
#> GSM149200 5 0.0794 0.959 0.000 0.028 0.000 0.000 0.972
#> GSM149201 5 0.0000 0.969 0.000 0.000 0.000 0.000 1.000
#> GSM149202 5 0.0404 0.966 0.000 0.012 0.000 0.000 0.988
#> GSM149203 5 0.2124 0.904 0.004 0.096 0.000 0.000 0.900
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149100 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149101 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149102 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149103 6 0.3360 0.8139 0.000 0.000 0.004 0.000 NA 0.732
#> GSM149104 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149105 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149106 6 0.5556 0.6263 0.000 0.000 0.188 0.000 NA 0.548
#> GSM149107 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149108 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149109 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149110 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149111 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149112 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149113 3 0.0000 0.9759 0.000 0.000 1.000 0.000 NA 0.000
#> GSM149114 3 0.0146 0.9720 0.000 0.000 0.996 0.000 NA 0.004
#> GSM149115 4 0.6113 0.5431 0.176 0.000 0.000 0.572 NA 0.048
#> GSM149116 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149117 1 0.4356 0.7494 0.724 0.000 0.000 0.000 NA 0.140
#> GSM149118 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149119 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149120 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149121 4 0.6059 0.5572 0.168 0.000 0.000 0.580 NA 0.048
#> GSM149122 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149123 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149124 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149125 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149126 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149127 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149128 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149129 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149130 1 0.2070 0.8807 0.908 0.000 0.000 0.000 NA 0.048
#> GSM149131 1 0.3618 0.8019 0.776 0.000 0.000 0.000 NA 0.048
#> GSM149132 4 0.0000 0.9404 0.000 0.000 0.000 1.000 NA 0.000
#> GSM149133 4 0.3364 0.7996 0.024 0.000 0.000 0.780 NA 0.000
#> GSM149134 1 0.0260 0.9120 0.992 0.000 0.000 0.000 NA 0.000
#> GSM149135 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149136 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149137 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149138 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149139 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149140 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149141 6 0.3221 0.8152 0.000 0.000 0.000 0.000 NA 0.736
#> GSM149142 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149143 6 0.3266 0.8109 0.000 0.000 0.000 0.000 NA 0.728
#> GSM149144 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149145 6 0.3221 0.8152 0.000 0.000 0.000 0.000 NA 0.736
#> GSM149146 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149147 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149148 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149149 1 0.0000 0.9136 1.000 0.000 0.000 0.000 NA 0.000
#> GSM149150 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149151 1 0.0909 0.9048 0.968 0.000 0.000 0.000 NA 0.020
#> GSM149152 1 0.3276 0.8410 0.816 0.000 0.000 0.000 NA 0.052
#> GSM149153 6 0.3221 0.8152 0.000 0.000 0.000 0.000 NA 0.736
#> GSM149154 1 0.6088 -0.0266 0.380 0.000 0.000 0.000 NA 0.340
#> GSM149155 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149156 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149157 2 0.5071 0.3497 0.000 0.520 0.000 0.000 NA 0.400
#> GSM149158 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149159 2 0.3862 0.7158 0.000 0.608 0.000 0.000 NA 0.004
#> GSM149160 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149161 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149162 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149163 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149164 6 0.0713 0.8910 0.000 0.000 0.000 0.000 NA 0.972
#> GSM149165 2 0.1267 0.8471 0.000 0.940 0.000 0.000 NA 0.000
#> GSM149166 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149167 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149168 2 0.3804 0.6972 0.000 0.576 0.000 0.000 NA 0.000
#> GSM149169 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149170 2 0.3804 0.6972 0.000 0.576 0.000 0.000 NA 0.000
#> GSM149171 2 0.3804 0.6972 0.000 0.576 0.000 0.000 NA 0.000
#> GSM149172 6 0.4895 0.7371 0.000 0.000 0.124 0.000 NA 0.648
#> GSM149173 2 0.3804 0.6972 0.000 0.576 0.000 0.000 NA 0.000
#> GSM149174 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149175 6 0.6162 0.5920 0.032 0.000 0.148 0.000 NA 0.500
#> GSM149176 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149177 6 0.2135 0.8662 0.000 0.000 0.000 0.000 NA 0.872
#> GSM149178 6 0.1714 0.8768 0.000 0.000 0.000 0.000 NA 0.908
#> GSM149179 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149180 2 0.3371 0.6058 0.000 0.708 0.000 0.000 NA 0.292
#> GSM149181 2 0.1141 0.8484 0.000 0.948 0.000 0.000 NA 0.000
#> GSM149182 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149183 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149184 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149185 2 0.2178 0.8275 0.000 0.868 0.000 0.000 NA 0.000
#> GSM149186 2 0.0458 0.8534 0.000 0.984 0.000 0.000 NA 0.000
#> GSM149187 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149188 2 0.0458 0.8534 0.000 0.984 0.000 0.000 NA 0.000
#> GSM149189 2 0.3930 0.6975 0.000 0.576 0.000 0.000 NA 0.004
#> GSM149190 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149191 2 0.5631 0.4533 0.000 0.508 0.000 0.000 NA 0.324
#> GSM149192 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149193 2 0.1204 0.8477 0.000 0.944 0.000 0.000 NA 0.000
#> GSM149194 6 0.0000 0.8960 0.000 0.000 0.000 0.000 NA 1.000
#> GSM149195 3 0.4479 0.5601 0.000 0.028 0.700 0.000 NA 0.240
#> GSM149196 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149197 2 0.0146 0.8531 0.000 0.996 0.000 0.000 NA 0.004
#> GSM149198 1 0.2201 0.8783 0.900 0.000 0.000 0.000 NA 0.048
#> GSM149199 2 0.2135 0.7871 0.000 0.872 0.000 0.000 NA 0.128
#> GSM149200 2 0.3804 0.6972 0.000 0.576 0.000 0.000 NA 0.000
#> GSM149201 2 0.0000 0.8543 0.000 1.000 0.000 0.000 NA 0.000
#> GSM149202 2 0.3377 0.7986 0.000 0.784 0.000 0.000 NA 0.028
#> GSM149203 2 0.5685 0.5481 0.000 0.528 0.000 0.000 NA 0.240
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:mclust 104 3.35e-14 2
#> SD:mclust 105 3.47e-23 3
#> SD:mclust 98 6.92e-31 4
#> SD:mclust 104 1.99e-34 5
#> SD:mclust 102 1.58e-33 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "NMF"]
# you can also extract it by
# res = res_list["SD:NMF"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.899 0.925 0.968 0.4787 0.519 0.519
#> 3 3 0.857 0.875 0.950 0.3521 0.695 0.481
#> 4 4 0.791 0.800 0.909 0.1450 0.780 0.467
#> 5 5 0.763 0.718 0.854 0.0784 0.872 0.556
#> 6 6 0.763 0.591 0.766 0.0405 0.929 0.689
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.955 1.000 0.000
#> GSM149100 1 0.0000 0.955 1.000 0.000
#> GSM149101 1 0.0000 0.955 1.000 0.000
#> GSM149102 1 0.0000 0.955 1.000 0.000
#> GSM149103 1 0.0000 0.955 1.000 0.000
#> GSM149104 1 0.0000 0.955 1.000 0.000
#> GSM149105 1 0.0000 0.955 1.000 0.000
#> GSM149106 1 0.0000 0.955 1.000 0.000
#> GSM149107 1 0.0000 0.955 1.000 0.000
#> GSM149108 1 0.0000 0.955 1.000 0.000
#> GSM149109 1 0.0000 0.955 1.000 0.000
#> GSM149110 1 0.0000 0.955 1.000 0.000
#> GSM149111 1 0.0000 0.955 1.000 0.000
#> GSM149112 1 0.0000 0.955 1.000 0.000
#> GSM149113 1 0.0000 0.955 1.000 0.000
#> GSM149114 1 0.0000 0.955 1.000 0.000
#> GSM149115 1 0.7219 0.756 0.800 0.200
#> GSM149116 1 0.0000 0.955 1.000 0.000
#> GSM149117 2 0.0000 0.972 0.000 1.000
#> GSM149118 1 0.0000 0.955 1.000 0.000
#> GSM149119 1 0.0000 0.955 1.000 0.000
#> GSM149120 1 0.0000 0.955 1.000 0.000
#> GSM149121 1 0.0000 0.955 1.000 0.000
#> GSM149122 1 0.0000 0.955 1.000 0.000
#> GSM149123 1 0.0000 0.955 1.000 0.000
#> GSM149124 1 0.0000 0.955 1.000 0.000
#> GSM149125 1 0.0000 0.955 1.000 0.000
#> GSM149126 1 0.0000 0.955 1.000 0.000
#> GSM149127 1 0.0000 0.955 1.000 0.000
#> GSM149128 1 0.0000 0.955 1.000 0.000
#> GSM149129 1 0.0000 0.955 1.000 0.000
#> GSM149130 2 0.2603 0.939 0.044 0.956
#> GSM149131 1 0.7376 0.743 0.792 0.208
#> GSM149132 1 0.0000 0.955 1.000 0.000
#> GSM149133 1 0.0000 0.955 1.000 0.000
#> GSM149134 1 0.5294 0.851 0.880 0.120
#> GSM149135 2 0.0000 0.972 0.000 1.000
#> GSM149136 2 0.0000 0.972 0.000 1.000
#> GSM149137 2 0.0000 0.972 0.000 1.000
#> GSM149138 2 0.0000 0.972 0.000 1.000
#> GSM149139 2 0.3879 0.909 0.076 0.924
#> GSM149140 2 0.0376 0.969 0.004 0.996
#> GSM149141 2 0.9608 0.357 0.384 0.616
#> GSM149142 2 0.0000 0.972 0.000 1.000
#> GSM149143 1 0.9795 0.301 0.584 0.416
#> GSM149144 2 0.0000 0.972 0.000 1.000
#> GSM149145 1 0.7883 0.704 0.764 0.236
#> GSM149146 2 0.0000 0.972 0.000 1.000
#> GSM149147 2 0.4022 0.905 0.080 0.920
#> GSM149148 2 0.4298 0.896 0.088 0.912
#> GSM149149 2 0.3584 0.916 0.068 0.932
#> GSM149150 2 0.0000 0.972 0.000 1.000
#> GSM149151 2 0.0000 0.972 0.000 1.000
#> GSM149152 2 0.9833 0.244 0.424 0.576
#> GSM149153 2 0.3431 0.921 0.064 0.936
#> GSM149154 1 0.0000 0.955 1.000 0.000
#> GSM149155 2 0.0000 0.972 0.000 1.000
#> GSM149156 2 0.0000 0.972 0.000 1.000
#> GSM149157 2 0.0000 0.972 0.000 1.000
#> GSM149158 2 0.0000 0.972 0.000 1.000
#> GSM149159 2 0.0000 0.972 0.000 1.000
#> GSM149160 2 0.0000 0.972 0.000 1.000
#> GSM149161 2 0.0000 0.972 0.000 1.000
#> GSM149162 2 0.0000 0.972 0.000 1.000
#> GSM149163 2 0.0000 0.972 0.000 1.000
#> GSM149164 2 0.0000 0.972 0.000 1.000
#> GSM149165 2 0.0000 0.972 0.000 1.000
#> GSM149166 2 0.0000 0.972 0.000 1.000
#> GSM149167 2 0.0000 0.972 0.000 1.000
#> GSM149168 2 0.0000 0.972 0.000 1.000
#> GSM149169 2 0.0000 0.972 0.000 1.000
#> GSM149170 2 0.0000 0.972 0.000 1.000
#> GSM149171 2 0.0672 0.966 0.008 0.992
#> GSM149172 1 0.9393 0.474 0.644 0.356
#> GSM149173 2 0.0376 0.969 0.004 0.996
#> GSM149174 2 0.0000 0.972 0.000 1.000
#> GSM149175 1 0.0000 0.955 1.000 0.000
#> GSM149176 2 0.0000 0.972 0.000 1.000
#> GSM149177 2 0.2948 0.932 0.052 0.948
#> GSM149178 2 0.6973 0.762 0.188 0.812
#> GSM149179 2 0.0000 0.972 0.000 1.000
#> GSM149180 2 0.0000 0.972 0.000 1.000
#> GSM149181 2 0.0000 0.972 0.000 1.000
#> GSM149182 2 0.0000 0.972 0.000 1.000
#> GSM149183 2 0.0000 0.972 0.000 1.000
#> GSM149184 2 0.0000 0.972 0.000 1.000
#> GSM149185 2 0.0000 0.972 0.000 1.000
#> GSM149186 2 0.0000 0.972 0.000 1.000
#> GSM149187 2 0.0000 0.972 0.000 1.000
#> GSM149188 2 0.0000 0.972 0.000 1.000
#> GSM149189 2 0.2043 0.948 0.032 0.968
#> GSM149190 2 0.0000 0.972 0.000 1.000
#> GSM149191 2 0.0000 0.972 0.000 1.000
#> GSM149192 2 0.0000 0.972 0.000 1.000
#> GSM149193 2 0.0000 0.972 0.000 1.000
#> GSM149194 2 0.0000 0.972 0.000 1.000
#> GSM149195 1 0.0000 0.955 1.000 0.000
#> GSM149196 2 0.0000 0.972 0.000 1.000
#> GSM149197 2 0.0000 0.972 0.000 1.000
#> GSM149198 1 0.7056 0.767 0.808 0.192
#> GSM149199 2 0.0000 0.972 0.000 1.000
#> GSM149200 2 0.0000 0.972 0.000 1.000
#> GSM149201 2 0.0000 0.972 0.000 1.000
#> GSM149202 2 0.0000 0.972 0.000 1.000
#> GSM149203 2 0.6343 0.801 0.160 0.840
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149116 1 0.0237 0.963 0.996 0.000 0.004
#> GSM149117 1 0.6299 0.108 0.524 0.476 0.000
#> GSM149118 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149119 1 0.0237 0.963 0.996 0.000 0.004
#> GSM149120 1 0.0237 0.963 0.996 0.000 0.004
#> GSM149121 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149122 1 0.0424 0.960 0.992 0.000 0.008
#> GSM149123 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149124 1 0.0237 0.963 0.996 0.000 0.004
#> GSM149125 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149126 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149127 1 0.0237 0.963 0.996 0.000 0.004
#> GSM149128 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149130 1 0.0237 0.963 0.996 0.004 0.000
#> GSM149131 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149132 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149133 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149134 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149135 1 0.0592 0.958 0.988 0.012 0.000
#> GSM149136 1 0.2537 0.887 0.920 0.080 0.000
#> GSM149137 1 0.1031 0.947 0.976 0.024 0.000
#> GSM149138 1 0.0892 0.951 0.980 0.020 0.000
#> GSM149139 1 0.0237 0.963 0.996 0.004 0.000
#> GSM149140 1 0.0424 0.961 0.992 0.008 0.000
#> GSM149141 2 0.4121 0.783 0.000 0.832 0.168
#> GSM149142 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149143 2 0.7209 0.375 0.036 0.604 0.360
#> GSM149144 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149145 3 0.1753 0.886 0.000 0.048 0.952
#> GSM149146 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149147 1 0.0237 0.963 0.996 0.004 0.000
#> GSM149148 1 0.0237 0.963 0.996 0.004 0.000
#> GSM149149 1 0.0237 0.963 0.996 0.004 0.000
#> GSM149150 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149151 1 0.5178 0.659 0.744 0.256 0.000
#> GSM149152 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149153 2 0.3879 0.802 0.000 0.848 0.152
#> GSM149154 3 0.6274 0.157 0.456 0.000 0.544
#> GSM149155 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149158 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149159 2 0.1163 0.922 0.000 0.972 0.028
#> GSM149160 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149161 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149162 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149164 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149165 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149166 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149167 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149168 2 0.3192 0.846 0.000 0.888 0.112
#> GSM149169 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149170 2 0.6168 0.306 0.000 0.588 0.412
#> GSM149171 3 0.5254 0.631 0.000 0.264 0.736
#> GSM149172 3 0.4654 0.718 0.000 0.208 0.792
#> GSM149173 2 0.6095 0.353 0.000 0.608 0.392
#> GSM149174 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149175 3 0.1529 0.886 0.040 0.000 0.960
#> GSM149176 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149177 2 0.5363 0.624 0.000 0.724 0.276
#> GSM149178 3 0.5291 0.627 0.000 0.268 0.732
#> GSM149179 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149181 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149182 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149185 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149186 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149188 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149189 3 0.3192 0.831 0.000 0.112 0.888
#> GSM149190 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149191 2 0.3192 0.847 0.000 0.888 0.112
#> GSM149192 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149193 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149194 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149195 3 0.0000 0.915 0.000 0.000 1.000
#> GSM149196 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149198 1 0.0000 0.964 1.000 0.000 0.000
#> GSM149199 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149200 2 0.6225 0.238 0.000 0.568 0.432
#> GSM149201 2 0.0000 0.942 0.000 1.000 0.000
#> GSM149202 2 0.0237 0.940 0.000 0.996 0.004
#> GSM149203 3 0.6260 0.169 0.000 0.448 0.552
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.8932 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.8932 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149102 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149103 3 0.0336 0.8923 0.008 0.000 0.992 0.000
#> GSM149104 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149105 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149106 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149107 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149108 3 0.0000 0.8932 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0188 0.8919 0.000 0.004 0.996 0.000
#> GSM149110 3 0.0000 0.8932 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149112 3 0.0188 0.8919 0.000 0.004 0.996 0.000
#> GSM149113 3 0.0000 0.8932 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0188 0.8934 0.004 0.000 0.996 0.000
#> GSM149115 4 0.0707 0.9415 0.020 0.000 0.000 0.980
#> GSM149116 4 0.0188 0.9511 0.000 0.000 0.004 0.996
#> GSM149117 4 0.5308 0.5578 0.036 0.280 0.000 0.684
#> GSM149118 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0336 0.9480 0.000 0.000 0.008 0.992
#> GSM149120 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149121 4 0.0817 0.9384 0.024 0.000 0.000 0.976
#> GSM149122 4 0.0188 0.9511 0.000 0.000 0.004 0.996
#> GSM149123 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0188 0.9511 0.000 0.000 0.004 0.996
#> GSM149125 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149130 4 0.4643 0.4377 0.344 0.000 0.000 0.656
#> GSM149131 4 0.1302 0.9220 0.044 0.000 0.000 0.956
#> GSM149132 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0000 0.9529 0.000 0.000 0.000 1.000
#> GSM149134 1 0.3266 0.7424 0.832 0.000 0.000 0.168
#> GSM149135 1 0.1637 0.8351 0.940 0.000 0.000 0.060
#> GSM149136 1 0.1118 0.8412 0.964 0.000 0.000 0.036
#> GSM149137 1 0.1302 0.8398 0.956 0.000 0.000 0.044
#> GSM149138 1 0.1118 0.8402 0.964 0.000 0.000 0.036
#> GSM149139 1 0.2469 0.8054 0.892 0.000 0.000 0.108
#> GSM149140 1 0.2011 0.8254 0.920 0.000 0.000 0.080
#> GSM149141 1 0.2466 0.7848 0.900 0.004 0.096 0.000
#> GSM149142 1 0.0188 0.8409 0.996 0.004 0.000 0.000
#> GSM149143 1 0.3219 0.7142 0.836 0.000 0.164 0.000
#> GSM149144 1 0.4830 0.3639 0.608 0.392 0.000 0.000
#> GSM149145 3 0.4941 0.2642 0.436 0.000 0.564 0.000
#> GSM149146 2 0.0707 0.9191 0.020 0.980 0.000 0.000
#> GSM149147 1 0.0817 0.8417 0.976 0.000 0.000 0.024
#> GSM149148 1 0.1118 0.8412 0.964 0.000 0.000 0.036
#> GSM149149 1 0.1637 0.8344 0.940 0.000 0.000 0.060
#> GSM149150 2 0.4998 0.0162 0.488 0.512 0.000 0.000
#> GSM149151 1 0.0817 0.8424 0.976 0.000 0.000 0.024
#> GSM149152 1 0.4996 0.0909 0.516 0.000 0.000 0.484
#> GSM149153 1 0.3219 0.7196 0.836 0.000 0.164 0.000
#> GSM149154 3 0.5125 0.3887 0.388 0.000 0.604 0.008
#> GSM149155 2 0.1211 0.9121 0.040 0.960 0.000 0.000
#> GSM149156 2 0.1118 0.9160 0.036 0.964 0.000 0.000
#> GSM149157 1 0.5000 0.0057 0.504 0.496 0.000 0.000
#> GSM149158 1 0.1792 0.8263 0.932 0.068 0.000 0.000
#> GSM149159 2 0.0336 0.9171 0.008 0.992 0.000 0.000
#> GSM149160 1 0.1022 0.8383 0.968 0.032 0.000 0.000
#> GSM149161 1 0.4193 0.6178 0.732 0.268 0.000 0.000
#> GSM149162 2 0.1389 0.9099 0.048 0.952 0.000 0.000
#> GSM149163 2 0.1389 0.9073 0.048 0.952 0.000 0.000
#> GSM149164 1 0.0707 0.8413 0.980 0.020 0.000 0.000
#> GSM149165 2 0.0188 0.9192 0.004 0.996 0.000 0.000
#> GSM149166 2 0.4431 0.5551 0.304 0.696 0.000 0.000
#> GSM149167 1 0.3801 0.7001 0.780 0.220 0.000 0.000
#> GSM149168 2 0.1059 0.9093 0.016 0.972 0.012 0.000
#> GSM149169 1 0.0469 0.8415 0.988 0.012 0.000 0.000
#> GSM149170 2 0.1151 0.9056 0.008 0.968 0.024 0.000
#> GSM149171 2 0.2799 0.8321 0.008 0.884 0.108 0.000
#> GSM149172 3 0.4524 0.7084 0.028 0.204 0.768 0.000
#> GSM149173 2 0.1767 0.8901 0.012 0.944 0.044 0.000
#> GSM149174 1 0.2589 0.7986 0.884 0.116 0.000 0.000
#> GSM149175 3 0.1576 0.8679 0.048 0.000 0.948 0.004
#> GSM149176 2 0.3726 0.7221 0.212 0.788 0.000 0.000
#> GSM149177 3 0.6219 0.3575 0.068 0.344 0.588 0.000
#> GSM149178 3 0.3547 0.7798 0.016 0.144 0.840 0.000
#> GSM149179 2 0.1211 0.9122 0.040 0.960 0.000 0.000
#> GSM149180 2 0.0921 0.9169 0.028 0.972 0.000 0.000
#> GSM149181 2 0.0000 0.9179 0.000 1.000 0.000 0.000
#> GSM149182 2 0.1022 0.9156 0.032 0.968 0.000 0.000
#> GSM149183 2 0.0336 0.9198 0.008 0.992 0.000 0.000
#> GSM149184 2 0.0336 0.9198 0.008 0.992 0.000 0.000
#> GSM149185 2 0.0188 0.9177 0.004 0.996 0.000 0.000
#> GSM149186 2 0.0336 0.9198 0.008 0.992 0.000 0.000
#> GSM149187 2 0.0592 0.9197 0.016 0.984 0.000 0.000
#> GSM149188 2 0.0188 0.9192 0.004 0.996 0.000 0.000
#> GSM149189 2 0.4992 0.0189 0.000 0.524 0.476 0.000
#> GSM149190 1 0.4981 0.1496 0.536 0.464 0.000 0.000
#> GSM149191 3 0.7921 0.0214 0.328 0.324 0.348 0.000
#> GSM149192 2 0.0469 0.9198 0.012 0.988 0.000 0.000
#> GSM149193 2 0.0336 0.9198 0.008 0.992 0.000 0.000
#> GSM149194 1 0.1474 0.8322 0.948 0.052 0.000 0.000
#> GSM149195 3 0.0804 0.8860 0.008 0.012 0.980 0.000
#> GSM149196 2 0.0336 0.9198 0.008 0.992 0.000 0.000
#> GSM149197 2 0.1792 0.8924 0.068 0.932 0.000 0.000
#> GSM149198 1 0.2589 0.7933 0.884 0.000 0.000 0.116
#> GSM149199 2 0.3024 0.8094 0.148 0.852 0.000 0.000
#> GSM149200 2 0.1209 0.9022 0.004 0.964 0.032 0.000
#> GSM149201 2 0.0592 0.9197 0.016 0.984 0.000 0.000
#> GSM149202 2 0.0592 0.9190 0.016 0.984 0.000 0.000
#> GSM149203 2 0.3793 0.8065 0.044 0.844 0.112 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0451 0.91614 0.000 0.004 0.988 0.000 0.008
#> GSM149100 3 0.0451 0.91614 0.000 0.004 0.988 0.000 0.008
#> GSM149101 3 0.0162 0.91651 0.000 0.004 0.996 0.000 0.000
#> GSM149102 3 0.0324 0.91682 0.000 0.004 0.992 0.000 0.004
#> GSM149103 3 0.0290 0.91425 0.000 0.000 0.992 0.000 0.008
#> GSM149104 3 0.0000 0.91665 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0162 0.91686 0.000 0.000 0.996 0.000 0.004
#> GSM149106 3 0.0324 0.91435 0.000 0.004 0.992 0.000 0.004
#> GSM149107 3 0.0000 0.91665 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0162 0.91686 0.000 0.000 0.996 0.000 0.004
#> GSM149109 3 0.0404 0.91501 0.000 0.000 0.988 0.000 0.012
#> GSM149110 3 0.0451 0.91614 0.000 0.004 0.988 0.000 0.008
#> GSM149111 3 0.0324 0.91682 0.000 0.004 0.992 0.000 0.004
#> GSM149112 3 0.0510 0.91353 0.000 0.000 0.984 0.000 0.016
#> GSM149113 3 0.0000 0.91665 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0162 0.91572 0.000 0.000 0.996 0.000 0.004
#> GSM149115 4 0.1168 0.95669 0.032 0.008 0.000 0.960 0.000
#> GSM149116 4 0.0162 0.97242 0.000 0.000 0.000 0.996 0.004
#> GSM149117 2 0.3449 0.60302 0.016 0.852 0.004 0.100 0.028
#> GSM149118 4 0.0000 0.97394 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0162 0.97242 0.000 0.000 0.000 0.996 0.004
#> GSM149120 4 0.0290 0.97303 0.008 0.000 0.000 0.992 0.000
#> GSM149121 4 0.1043 0.95392 0.040 0.000 0.000 0.960 0.000
#> GSM149122 4 0.0451 0.97318 0.008 0.000 0.000 0.988 0.004
#> GSM149123 4 0.0162 0.97411 0.004 0.000 0.000 0.996 0.000
#> GSM149124 4 0.0162 0.97242 0.000 0.000 0.000 0.996 0.004
#> GSM149125 4 0.0162 0.97411 0.004 0.000 0.000 0.996 0.000
#> GSM149126 4 0.0162 0.97411 0.004 0.000 0.000 0.996 0.000
#> GSM149127 4 0.0324 0.97353 0.004 0.000 0.000 0.992 0.004
#> GSM149128 4 0.0000 0.97394 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.97394 0.000 0.000 0.000 1.000 0.000
#> GSM149130 4 0.3727 0.72316 0.216 0.016 0.000 0.768 0.000
#> GSM149131 4 0.1952 0.91153 0.084 0.004 0.000 0.912 0.000
#> GSM149132 4 0.0000 0.97394 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0404 0.97147 0.012 0.000 0.000 0.988 0.000
#> GSM149134 1 0.2352 0.84035 0.912 0.008 0.000 0.048 0.032
#> GSM149135 1 0.1750 0.84954 0.936 0.036 0.000 0.028 0.000
#> GSM149136 1 0.0865 0.85446 0.972 0.024 0.000 0.004 0.000
#> GSM149137 1 0.1403 0.85430 0.952 0.024 0.000 0.024 0.000
#> GSM149138 1 0.1074 0.85531 0.968 0.004 0.000 0.012 0.016
#> GSM149139 1 0.1608 0.83811 0.928 0.000 0.000 0.072 0.000
#> GSM149140 1 0.1471 0.85508 0.952 0.020 0.000 0.024 0.004
#> GSM149141 1 0.4160 0.77649 0.804 0.016 0.068 0.000 0.112
#> GSM149142 1 0.1041 0.85024 0.964 0.032 0.000 0.000 0.004
#> GSM149143 1 0.2635 0.82918 0.888 0.008 0.016 0.000 0.088
#> GSM149144 2 0.3551 0.57961 0.220 0.772 0.000 0.000 0.008
#> GSM149145 1 0.4916 0.56472 0.668 0.012 0.288 0.000 0.032
#> GSM149146 2 0.1331 0.66161 0.000 0.952 0.000 0.008 0.040
#> GSM149147 1 0.0404 0.85521 0.988 0.000 0.000 0.012 0.000
#> GSM149148 1 0.0404 0.85521 0.988 0.000 0.000 0.012 0.000
#> GSM149149 1 0.1106 0.85480 0.964 0.012 0.000 0.024 0.000
#> GSM149150 2 0.6825 0.04413 0.328 0.340 0.000 0.000 0.332
#> GSM149151 1 0.1059 0.85538 0.968 0.020 0.000 0.008 0.004
#> GSM149152 1 0.4695 0.13742 0.524 0.008 0.000 0.464 0.004
#> GSM149153 1 0.3129 0.82200 0.872 0.020 0.076 0.000 0.032
#> GSM149154 1 0.4706 0.76145 0.772 0.004 0.092 0.016 0.116
#> GSM149155 2 0.1571 0.66696 0.004 0.936 0.000 0.000 0.060
#> GSM149156 2 0.4876 0.35656 0.028 0.576 0.000 0.000 0.396
#> GSM149157 5 0.5952 0.24007 0.324 0.128 0.000 0.000 0.548
#> GSM149158 1 0.4475 0.53276 0.692 0.276 0.000 0.000 0.032
#> GSM149159 5 0.2179 0.76272 0.004 0.100 0.000 0.000 0.896
#> GSM149160 1 0.3090 0.80252 0.856 0.040 0.000 0.000 0.104
#> GSM149161 2 0.5100 0.11144 0.448 0.516 0.000 0.000 0.036
#> GSM149162 2 0.4697 0.34603 0.020 0.592 0.000 0.000 0.388
#> GSM149163 2 0.1626 0.66934 0.016 0.940 0.000 0.000 0.044
#> GSM149164 1 0.4676 0.42804 0.592 0.012 0.004 0.000 0.392
#> GSM149165 5 0.4126 0.43721 0.000 0.380 0.000 0.000 0.620
#> GSM149166 2 0.1444 0.66038 0.040 0.948 0.000 0.000 0.012
#> GSM149167 2 0.5220 0.13140 0.440 0.516 0.000 0.000 0.044
#> GSM149168 5 0.1571 0.77891 0.004 0.060 0.000 0.000 0.936
#> GSM149169 1 0.1943 0.83316 0.924 0.056 0.000 0.000 0.020
#> GSM149170 5 0.1478 0.78207 0.000 0.064 0.000 0.000 0.936
#> GSM149171 5 0.2020 0.77568 0.000 0.100 0.000 0.000 0.900
#> GSM149172 5 0.2220 0.72757 0.008 0.016 0.052 0.004 0.920
#> GSM149173 5 0.1732 0.77697 0.000 0.080 0.000 0.000 0.920
#> GSM149174 1 0.5083 0.48639 0.652 0.280 0.000 0.000 0.068
#> GSM149175 3 0.5881 0.56351 0.208 0.012 0.636 0.000 0.144
#> GSM149176 2 0.1403 0.66292 0.024 0.952 0.000 0.000 0.024
#> GSM149177 3 0.4024 0.68039 0.000 0.220 0.752 0.000 0.028
#> GSM149178 3 0.5230 0.21885 0.000 0.044 0.504 0.000 0.452
#> GSM149179 2 0.1410 0.65722 0.000 0.940 0.000 0.000 0.060
#> GSM149180 5 0.4201 0.42518 0.000 0.408 0.000 0.000 0.592
#> GSM149181 5 0.3274 0.70957 0.000 0.220 0.000 0.000 0.780
#> GSM149182 2 0.2179 0.63017 0.000 0.888 0.000 0.000 0.112
#> GSM149183 2 0.4251 0.33973 0.000 0.624 0.000 0.004 0.372
#> GSM149184 2 0.3752 0.42361 0.000 0.708 0.000 0.000 0.292
#> GSM149185 5 0.2074 0.78096 0.000 0.104 0.000 0.000 0.896
#> GSM149186 2 0.4297 0.01265 0.000 0.528 0.000 0.000 0.472
#> GSM149187 2 0.4045 0.38034 0.000 0.644 0.000 0.000 0.356
#> GSM149188 2 0.4211 0.37465 0.000 0.636 0.000 0.004 0.360
#> GSM149189 5 0.3670 0.72524 0.000 0.068 0.112 0.000 0.820
#> GSM149190 2 0.4522 0.55161 0.248 0.708 0.000 0.000 0.044
#> GSM149191 5 0.2708 0.70006 0.072 0.020 0.016 0.000 0.892
#> GSM149192 5 0.4452 -0.00195 0.000 0.496 0.000 0.004 0.500
#> GSM149193 5 0.3561 0.66446 0.000 0.260 0.000 0.000 0.740
#> GSM149194 1 0.2708 0.82056 0.884 0.044 0.000 0.000 0.072
#> GSM149195 3 0.4489 0.36397 0.000 0.008 0.572 0.000 0.420
#> GSM149196 5 0.4114 0.50480 0.000 0.376 0.000 0.000 0.624
#> GSM149197 2 0.2124 0.66885 0.028 0.916 0.000 0.000 0.056
#> GSM149198 1 0.2544 0.83830 0.900 0.008 0.000 0.028 0.064
#> GSM149199 2 0.4138 0.62791 0.064 0.776 0.000 0.000 0.160
#> GSM149200 5 0.1608 0.78372 0.000 0.072 0.000 0.000 0.928
#> GSM149201 2 0.3398 0.57561 0.000 0.780 0.000 0.004 0.216
#> GSM149202 5 0.2230 0.77961 0.000 0.116 0.000 0.000 0.884
#> GSM149203 5 0.1857 0.76614 0.000 0.060 0.008 0.004 0.928
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0547 0.9291 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM149100 3 0.0547 0.9291 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM149101 3 0.0000 0.9317 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9317 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.0363 0.9272 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM149104 3 0.0000 0.9317 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0363 0.9311 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM149106 3 0.0405 0.9292 0.000 0.000 0.988 0.004 0.000 0.008
#> GSM149107 3 0.0260 0.9304 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149108 3 0.0260 0.9318 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149109 3 0.0632 0.9290 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM149110 3 0.0632 0.9276 0.000 0.000 0.976 0.000 0.000 0.024
#> GSM149111 3 0.0363 0.9312 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM149112 3 0.0713 0.9257 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM149113 3 0.0146 0.9314 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149114 3 0.0363 0.9289 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM149115 4 0.1152 0.9369 0.044 0.000 0.000 0.952 0.000 0.004
#> GSM149116 4 0.1080 0.9428 0.004 0.000 0.000 0.960 0.004 0.032
#> GSM149117 2 0.4184 0.6831 0.028 0.780 0.000 0.048 0.008 0.136
#> GSM149118 4 0.0291 0.9580 0.004 0.000 0.000 0.992 0.000 0.004
#> GSM149119 4 0.0291 0.9567 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM149120 4 0.0291 0.9580 0.004 0.000 0.000 0.992 0.000 0.004
#> GSM149121 4 0.1531 0.9152 0.068 0.000 0.000 0.928 0.000 0.004
#> GSM149122 4 0.0000 0.9591 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0260 0.9587 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149124 4 0.1080 0.9428 0.004 0.000 0.000 0.960 0.004 0.032
#> GSM149125 4 0.0146 0.9589 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM149126 4 0.0146 0.9594 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149127 4 0.0146 0.9594 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149128 4 0.0146 0.9594 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149129 4 0.0436 0.9582 0.004 0.000 0.000 0.988 0.004 0.004
#> GSM149130 4 0.4754 0.5797 0.260 0.020 0.000 0.668 0.000 0.052
#> GSM149131 4 0.1556 0.9062 0.080 0.000 0.000 0.920 0.000 0.000
#> GSM149132 4 0.0291 0.9588 0.004 0.000 0.000 0.992 0.000 0.004
#> GSM149133 4 0.0520 0.9580 0.008 0.000 0.000 0.984 0.000 0.008
#> GSM149134 1 0.4284 0.4798 0.720 0.000 0.000 0.056 0.008 0.216
#> GSM149135 1 0.1485 0.6640 0.944 0.024 0.000 0.028 0.000 0.004
#> GSM149136 1 0.1167 0.6652 0.960 0.012 0.000 0.020 0.000 0.008
#> GSM149137 1 0.1364 0.6654 0.952 0.020 0.000 0.016 0.000 0.012
#> GSM149138 1 0.2361 0.6225 0.880 0.000 0.000 0.012 0.004 0.104
#> GSM149139 1 0.1075 0.6621 0.952 0.000 0.000 0.048 0.000 0.000
#> GSM149140 1 0.1616 0.6681 0.940 0.012 0.000 0.028 0.000 0.020
#> GSM149141 1 0.5989 -0.2106 0.424 0.000 0.020 0.000 0.132 0.424
#> GSM149142 1 0.1320 0.6652 0.948 0.016 0.000 0.000 0.000 0.036
#> GSM149143 1 0.4872 0.5227 0.644 0.008 0.008 0.000 0.052 0.288
#> GSM149144 2 0.1434 0.7689 0.048 0.940 0.000 0.000 0.000 0.012
#> GSM149145 1 0.6274 0.1907 0.548 0.000 0.176 0.000 0.052 0.224
#> GSM149146 2 0.1480 0.7790 0.000 0.940 0.000 0.000 0.020 0.040
#> GSM149147 1 0.0820 0.6673 0.972 0.000 0.000 0.012 0.000 0.016
#> GSM149148 1 0.1003 0.6678 0.964 0.000 0.000 0.020 0.000 0.016
#> GSM149149 1 0.0935 0.6651 0.964 0.000 0.000 0.032 0.000 0.004
#> GSM149150 6 0.7046 0.3262 0.148 0.112 0.004 0.000 0.276 0.460
#> GSM149151 1 0.2001 0.6426 0.912 0.008 0.000 0.012 0.000 0.068
#> GSM149152 1 0.4569 0.2236 0.564 0.000 0.000 0.396 0.000 0.040
#> GSM149153 1 0.5922 0.2623 0.596 0.000 0.084 0.000 0.080 0.240
#> GSM149154 1 0.3258 0.6433 0.848 0.000 0.008 0.016 0.036 0.092
#> GSM149155 2 0.1225 0.7748 0.000 0.952 0.000 0.000 0.012 0.036
#> GSM149156 5 0.6520 0.2964 0.040 0.180 0.000 0.000 0.428 0.352
#> GSM149157 6 0.6522 -0.3208 0.188 0.036 0.000 0.000 0.388 0.388
#> GSM149158 1 0.5554 0.4728 0.580 0.160 0.000 0.000 0.008 0.252
#> GSM149159 5 0.4114 0.3873 0.008 0.008 0.000 0.000 0.628 0.356
#> GSM149160 1 0.5576 0.4534 0.572 0.036 0.000 0.000 0.076 0.316
#> GSM149161 1 0.6044 0.1982 0.432 0.348 0.000 0.000 0.004 0.216
#> GSM149162 5 0.6556 0.3168 0.032 0.244 0.000 0.000 0.436 0.288
#> GSM149163 2 0.1801 0.7630 0.004 0.924 0.000 0.000 0.016 0.056
#> GSM149164 1 0.5945 0.3316 0.496 0.008 0.000 0.000 0.192 0.304
#> GSM149165 5 0.4449 0.4948 0.004 0.196 0.000 0.000 0.712 0.088
#> GSM149166 2 0.2001 0.7749 0.012 0.912 0.000 0.000 0.008 0.068
#> GSM149167 1 0.6363 0.2149 0.424 0.308 0.000 0.000 0.016 0.252
#> GSM149168 5 0.3089 0.4590 0.004 0.008 0.000 0.000 0.800 0.188
#> GSM149169 1 0.3952 0.5810 0.736 0.052 0.000 0.000 0.000 0.212
#> GSM149170 5 0.0458 0.4701 0.000 0.000 0.000 0.000 0.984 0.016
#> GSM149171 5 0.3349 0.2654 0.000 0.008 0.000 0.000 0.748 0.244
#> GSM149172 5 0.3765 -0.0603 0.000 0.000 0.000 0.000 0.596 0.404
#> GSM149173 5 0.3769 0.0552 0.000 0.004 0.000 0.000 0.640 0.356
#> GSM149174 1 0.6251 0.4092 0.516 0.120 0.000 0.000 0.056 0.308
#> GSM149175 6 0.7108 0.3548 0.216 0.000 0.164 0.000 0.156 0.464
#> GSM149176 2 0.2532 0.7679 0.012 0.884 0.000 0.000 0.024 0.080
#> GSM149177 3 0.4940 0.5325 0.004 0.216 0.668 0.000 0.004 0.108
#> GSM149178 6 0.5392 0.2391 0.012 0.020 0.044 0.000 0.376 0.548
#> GSM149179 2 0.2488 0.7575 0.000 0.880 0.000 0.000 0.044 0.076
#> GSM149180 5 0.5928 -0.0710 0.000 0.220 0.000 0.000 0.436 0.344
#> GSM149181 5 0.2630 0.4752 0.000 0.064 0.000 0.000 0.872 0.064
#> GSM149182 2 0.3492 0.6875 0.000 0.804 0.000 0.000 0.120 0.076
#> GSM149183 5 0.5508 0.1921 0.000 0.428 0.000 0.000 0.444 0.128
#> GSM149184 5 0.6233 -0.0225 0.004 0.328 0.000 0.000 0.368 0.300
#> GSM149185 5 0.1616 0.4697 0.000 0.020 0.000 0.000 0.932 0.048
#> GSM149186 5 0.4781 0.4094 0.000 0.296 0.000 0.000 0.624 0.080
#> GSM149187 5 0.5918 0.2602 0.000 0.348 0.000 0.000 0.436 0.216
#> GSM149188 5 0.5278 0.2440 0.000 0.412 0.000 0.000 0.488 0.100
#> GSM149189 5 0.2925 0.4470 0.000 0.012 0.060 0.000 0.864 0.064
#> GSM149190 2 0.5537 0.4786 0.216 0.620 0.000 0.000 0.024 0.140
#> GSM149191 5 0.4755 0.3358 0.044 0.008 0.000 0.000 0.596 0.352
#> GSM149192 5 0.5488 0.4460 0.000 0.216 0.000 0.000 0.568 0.216
#> GSM149193 5 0.3254 0.4783 0.000 0.124 0.000 0.000 0.820 0.056
#> GSM149194 1 0.4574 0.5437 0.680 0.020 0.000 0.000 0.040 0.260
#> GSM149195 3 0.5832 -0.1481 0.000 0.000 0.428 0.000 0.384 0.188
#> GSM149196 5 0.5096 0.2443 0.000 0.132 0.000 0.000 0.616 0.252
#> GSM149197 2 0.3120 0.6999 0.008 0.832 0.000 0.000 0.028 0.132
#> GSM149198 1 0.4859 0.3153 0.616 0.000 0.000 0.020 0.040 0.324
#> GSM149199 2 0.6424 0.3079 0.068 0.536 0.000 0.000 0.160 0.236
#> GSM149200 5 0.1501 0.4518 0.000 0.000 0.000 0.000 0.924 0.076
#> GSM149201 2 0.3620 0.6038 0.000 0.772 0.000 0.000 0.184 0.044
#> GSM149202 5 0.3420 0.2657 0.000 0.012 0.000 0.000 0.748 0.240
#> GSM149203 5 0.4009 0.3933 0.004 0.008 0.000 0.000 0.632 0.356
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> SD:NMF 101 4.70e-12 2
#> SD:NMF 98 1.05e-22 3
#> SD:NMF 94 2.32e-31 4
#> SD:NMF 86 3.55e-28 5
#> SD:NMF 61 1.54e-18 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "hclust"]
# you can also extract it by
# res = res_list["CV:hclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.274 0.689 0.823 0.3693 0.605 0.605
#> 3 3 0.378 0.676 0.822 0.4640 0.827 0.725
#> 4 4 0.548 0.738 0.825 0.1759 0.865 0.726
#> 5 5 0.556 0.691 0.812 0.0966 0.968 0.915
#> 6 6 0.611 0.523 0.726 0.0898 0.838 0.551
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.8499 0.6614 0.724 0.276
#> GSM149100 1 0.8443 0.6645 0.728 0.272
#> GSM149101 1 0.8443 0.6645 0.728 0.272
#> GSM149102 1 0.8443 0.6645 0.728 0.272
#> GSM149103 2 0.9427 0.1819 0.360 0.640
#> GSM149104 1 0.8443 0.6645 0.728 0.272
#> GSM149105 1 0.8443 0.6645 0.728 0.272
#> GSM149106 2 0.9996 -0.3028 0.488 0.512
#> GSM149107 1 0.8443 0.6645 0.728 0.272
#> GSM149108 1 0.8443 0.6645 0.728 0.272
#> GSM149109 1 0.8499 0.6614 0.724 0.276
#> GSM149110 1 0.8499 0.6614 0.724 0.276
#> GSM149111 1 0.8443 0.6645 0.728 0.272
#> GSM149112 1 0.8499 0.6614 0.724 0.276
#> GSM149113 1 0.8443 0.6645 0.728 0.272
#> GSM149114 1 0.8443 0.6645 0.728 0.272
#> GSM149115 2 0.9909 0.0507 0.444 0.556
#> GSM149116 1 0.9248 0.5778 0.660 0.340
#> GSM149117 2 0.7745 0.6124 0.228 0.772
#> GSM149118 1 0.9358 0.5670 0.648 0.352
#> GSM149119 1 0.9286 0.5761 0.656 0.344
#> GSM149120 1 0.9358 0.5670 0.648 0.352
#> GSM149121 2 0.9795 0.1632 0.416 0.584
#> GSM149122 1 0.9286 0.5761 0.656 0.344
#> GSM149123 1 0.9635 0.4999 0.612 0.388
#> GSM149124 1 0.9286 0.5759 0.656 0.344
#> GSM149125 1 0.9286 0.5761 0.656 0.344
#> GSM149126 1 0.9552 0.5279 0.624 0.376
#> GSM149127 1 0.9286 0.5761 0.656 0.344
#> GSM149128 1 0.9522 0.5363 0.628 0.372
#> GSM149129 1 0.9522 0.5363 0.628 0.372
#> GSM149130 2 0.9491 0.3269 0.368 0.632
#> GSM149131 2 0.8608 0.5472 0.284 0.716
#> GSM149132 1 0.9522 0.5363 0.628 0.372
#> GSM149133 1 0.9993 0.2421 0.516 0.484
#> GSM149134 2 0.7883 0.6403 0.236 0.764
#> GSM149135 2 0.7950 0.6191 0.240 0.760
#> GSM149136 2 0.7950 0.6191 0.240 0.760
#> GSM149137 2 0.8207 0.5931 0.256 0.744
#> GSM149138 2 0.8267 0.6013 0.260 0.740
#> GSM149139 2 0.7950 0.6191 0.240 0.760
#> GSM149140 2 0.7950 0.6191 0.240 0.760
#> GSM149141 2 0.4298 0.8123 0.088 0.912
#> GSM149142 2 0.5178 0.7676 0.116 0.884
#> GSM149143 2 0.3733 0.8220 0.072 0.928
#> GSM149144 2 0.1414 0.8315 0.020 0.980
#> GSM149145 2 0.4161 0.8156 0.084 0.916
#> GSM149146 2 0.1184 0.8332 0.016 0.984
#> GSM149147 2 0.7950 0.6191 0.240 0.760
#> GSM149148 2 0.7950 0.6191 0.240 0.760
#> GSM149149 2 0.7950 0.6191 0.240 0.760
#> GSM149150 2 0.3114 0.8211 0.056 0.944
#> GSM149151 2 0.7602 0.6469 0.220 0.780
#> GSM149152 2 0.8713 0.5300 0.292 0.708
#> GSM149153 2 0.4161 0.8156 0.084 0.916
#> GSM149154 2 0.4022 0.8179 0.080 0.920
#> GSM149155 2 0.0672 0.8311 0.008 0.992
#> GSM149156 2 0.0672 0.8330 0.008 0.992
#> GSM149157 2 0.2043 0.8331 0.032 0.968
#> GSM149158 2 0.1633 0.8334 0.024 0.976
#> GSM149159 2 0.3733 0.8203 0.072 0.928
#> GSM149160 2 0.2043 0.8331 0.032 0.968
#> GSM149161 2 0.0938 0.8326 0.012 0.988
#> GSM149162 2 0.0672 0.8311 0.008 0.992
#> GSM149163 2 0.0672 0.8311 0.008 0.992
#> GSM149164 2 0.6048 0.7840 0.148 0.852
#> GSM149165 2 0.1633 0.8334 0.024 0.976
#> GSM149166 2 0.4562 0.7846 0.096 0.904
#> GSM149167 2 0.4939 0.8004 0.108 0.892
#> GSM149168 2 0.3733 0.8188 0.072 0.928
#> GSM149169 2 0.1184 0.8326 0.016 0.984
#> GSM149170 2 0.3274 0.8246 0.060 0.940
#> GSM149171 2 0.3879 0.8181 0.076 0.924
#> GSM149172 2 0.4562 0.8067 0.096 0.904
#> GSM149173 2 0.5408 0.7693 0.124 0.876
#> GSM149174 2 0.1184 0.8326 0.016 0.984
#> GSM149175 2 0.4690 0.8030 0.100 0.900
#> GSM149176 2 0.1184 0.8332 0.016 0.984
#> GSM149177 2 0.9129 0.3044 0.328 0.672
#> GSM149178 2 0.7299 0.6565 0.204 0.796
#> GSM149179 2 0.1414 0.8338 0.020 0.980
#> GSM149180 2 0.2043 0.8269 0.032 0.968
#> GSM149181 2 0.3114 0.8265 0.056 0.944
#> GSM149182 2 0.1184 0.8293 0.016 0.984
#> GSM149183 2 0.1633 0.8343 0.024 0.976
#> GSM149184 2 0.2043 0.8352 0.032 0.968
#> GSM149185 2 0.4161 0.8158 0.084 0.916
#> GSM149186 2 0.2043 0.8329 0.032 0.968
#> GSM149187 2 0.1414 0.8350 0.020 0.980
#> GSM149188 2 0.1184 0.8332 0.016 0.984
#> GSM149189 2 0.5178 0.7888 0.116 0.884
#> GSM149190 2 0.0672 0.8330 0.008 0.992
#> GSM149191 2 0.4022 0.8204 0.080 0.920
#> GSM149192 2 0.1633 0.8347 0.024 0.976
#> GSM149193 2 0.3431 0.8269 0.064 0.936
#> GSM149194 2 0.2948 0.8321 0.052 0.948
#> GSM149195 2 0.7602 0.6295 0.220 0.780
#> GSM149196 2 0.1843 0.8343 0.028 0.972
#> GSM149197 2 0.0938 0.8323 0.012 0.988
#> GSM149198 2 0.7883 0.6403 0.236 0.764
#> GSM149199 2 0.0672 0.8311 0.008 0.992
#> GSM149200 2 0.3584 0.8216 0.068 0.932
#> GSM149201 2 0.0672 0.8311 0.008 0.992
#> GSM149202 2 0.3274 0.8259 0.060 0.940
#> GSM149203 2 0.3584 0.8229 0.068 0.932
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.1289 0.96063 0.000 0.032 0.968
#> GSM149100 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149101 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149102 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149103 2 0.8983 0.21955 0.140 0.508 0.352
#> GSM149104 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149105 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149106 3 0.8652 0.36002 0.140 0.284 0.576
#> GSM149107 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149108 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149109 3 0.1289 0.96063 0.000 0.032 0.968
#> GSM149110 3 0.1289 0.96063 0.000 0.032 0.968
#> GSM149111 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149112 3 0.1289 0.96063 0.000 0.032 0.968
#> GSM149113 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149114 3 0.1163 0.96345 0.000 0.028 0.972
#> GSM149115 1 0.7222 0.64751 0.684 0.244 0.072
#> GSM149116 1 0.5558 0.71164 0.800 0.048 0.152
#> GSM149117 2 0.6836 0.07984 0.412 0.572 0.016
#> GSM149118 1 0.5696 0.72272 0.796 0.056 0.148
#> GSM149119 1 0.5659 0.71773 0.796 0.052 0.152
#> GSM149120 1 0.5696 0.72272 0.796 0.056 0.148
#> GSM149121 1 0.7366 0.62078 0.668 0.260 0.072
#> GSM149122 1 0.5659 0.71773 0.796 0.052 0.152
#> GSM149123 1 0.6271 0.72960 0.772 0.088 0.140
#> GSM149124 1 0.5497 0.71437 0.804 0.048 0.148
#> GSM149125 1 0.5659 0.71773 0.796 0.052 0.152
#> GSM149126 1 0.6087 0.73147 0.780 0.076 0.144
#> GSM149127 1 0.5659 0.71773 0.796 0.052 0.152
#> GSM149128 1 0.6001 0.73156 0.784 0.072 0.144
#> GSM149129 1 0.6001 0.73156 0.784 0.072 0.144
#> GSM149130 1 0.7905 0.49510 0.588 0.340 0.072
#> GSM149131 1 0.7909 0.20146 0.496 0.448 0.056
#> GSM149132 1 0.6001 0.73156 0.784 0.072 0.144
#> GSM149133 1 0.7756 0.69085 0.672 0.200 0.128
#> GSM149134 1 0.7164 0.06581 0.524 0.452 0.024
#> GSM149135 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149136 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149137 1 0.6955 0.03610 0.492 0.492 0.016
#> GSM149138 1 0.6754 0.15387 0.556 0.432 0.012
#> GSM149139 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149140 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149141 2 0.4807 0.79431 0.060 0.848 0.092
#> GSM149142 2 0.5292 0.61859 0.228 0.764 0.008
#> GSM149143 2 0.4569 0.80142 0.068 0.860 0.072
#> GSM149144 2 0.1525 0.80818 0.032 0.964 0.004
#> GSM149145 2 0.4725 0.79662 0.060 0.852 0.088
#> GSM149146 2 0.1182 0.81117 0.012 0.976 0.012
#> GSM149147 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149148 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149149 2 0.6944 0.00297 0.468 0.516 0.016
#> GSM149150 2 0.3415 0.78846 0.080 0.900 0.020
#> GSM149151 2 0.6779 0.09871 0.444 0.544 0.012
#> GSM149152 2 0.7278 -0.02348 0.456 0.516 0.028
#> GSM149153 2 0.4725 0.79662 0.060 0.852 0.088
#> GSM149154 2 0.4458 0.80155 0.056 0.864 0.080
#> GSM149155 2 0.0829 0.80794 0.012 0.984 0.004
#> GSM149156 2 0.1182 0.81573 0.012 0.976 0.012
#> GSM149157 2 0.3213 0.81229 0.060 0.912 0.028
#> GSM149158 2 0.3045 0.80931 0.064 0.916 0.020
#> GSM149159 2 0.3499 0.80884 0.028 0.900 0.072
#> GSM149160 2 0.3310 0.80998 0.064 0.908 0.028
#> GSM149161 2 0.1711 0.81290 0.032 0.960 0.008
#> GSM149162 2 0.0829 0.80794 0.012 0.984 0.004
#> GSM149163 2 0.0829 0.80794 0.012 0.984 0.004
#> GSM149164 2 0.7187 0.64554 0.232 0.692 0.076
#> GSM149165 2 0.1636 0.81508 0.016 0.964 0.020
#> GSM149166 2 0.4755 0.66943 0.184 0.808 0.008
#> GSM149167 2 0.4731 0.76353 0.128 0.840 0.032
#> GSM149168 2 0.3590 0.80654 0.028 0.896 0.076
#> GSM149169 2 0.2446 0.81075 0.052 0.936 0.012
#> GSM149170 2 0.3045 0.81150 0.020 0.916 0.064
#> GSM149171 2 0.3973 0.80397 0.032 0.880 0.088
#> GSM149172 2 0.5020 0.78576 0.056 0.836 0.108
#> GSM149173 2 0.6191 0.72579 0.084 0.776 0.140
#> GSM149174 2 0.2446 0.81075 0.052 0.936 0.012
#> GSM149175 2 0.5094 0.78251 0.056 0.832 0.112
#> GSM149176 2 0.1182 0.81117 0.012 0.976 0.012
#> GSM149177 2 0.8853 0.29214 0.140 0.540 0.320
#> GSM149178 2 0.8042 0.53578 0.116 0.636 0.248
#> GSM149179 2 0.1337 0.81261 0.016 0.972 0.012
#> GSM149180 2 0.2663 0.80606 0.044 0.932 0.024
#> GSM149181 2 0.2947 0.81234 0.020 0.920 0.060
#> GSM149182 2 0.1267 0.80594 0.024 0.972 0.004
#> GSM149183 2 0.1482 0.81741 0.012 0.968 0.020
#> GSM149184 2 0.2313 0.81616 0.024 0.944 0.032
#> GSM149185 2 0.4007 0.80399 0.036 0.880 0.084
#> GSM149186 2 0.2176 0.81766 0.020 0.948 0.032
#> GSM149187 2 0.1315 0.81795 0.008 0.972 0.020
#> GSM149188 2 0.1015 0.81475 0.012 0.980 0.008
#> GSM149189 2 0.4865 0.77742 0.032 0.832 0.136
#> GSM149190 2 0.1491 0.81383 0.016 0.968 0.016
#> GSM149191 2 0.4281 0.80634 0.056 0.872 0.072
#> GSM149192 2 0.1636 0.81734 0.020 0.964 0.016
#> GSM149193 2 0.3434 0.81318 0.032 0.904 0.064
#> GSM149194 2 0.3983 0.80809 0.068 0.884 0.048
#> GSM149195 2 0.8079 0.52538 0.108 0.624 0.268
#> GSM149196 2 0.2056 0.81650 0.024 0.952 0.024
#> GSM149197 2 0.0848 0.81478 0.008 0.984 0.008
#> GSM149198 1 0.7164 0.06581 0.524 0.452 0.024
#> GSM149199 2 0.0829 0.80959 0.012 0.984 0.004
#> GSM149200 2 0.3461 0.81071 0.024 0.900 0.076
#> GSM149201 2 0.0829 0.80794 0.012 0.984 0.004
#> GSM149202 2 0.3337 0.81372 0.032 0.908 0.060
#> GSM149203 2 0.3856 0.81071 0.040 0.888 0.072
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0524 0.9628 0.000 0.008 0.988 0.004
#> GSM149100 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149101 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149102 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149103 2 0.8211 0.1263 0.040 0.452 0.360 0.148
#> GSM149104 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149105 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149106 3 0.7265 0.3614 0.016 0.236 0.592 0.156
#> GSM149107 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149108 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149109 3 0.0524 0.9628 0.000 0.008 0.988 0.004
#> GSM149110 3 0.0524 0.9628 0.000 0.008 0.988 0.004
#> GSM149111 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149112 3 0.0524 0.9628 0.000 0.008 0.988 0.004
#> GSM149113 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149114 3 0.0376 0.9653 0.000 0.004 0.992 0.004
#> GSM149115 4 0.5520 0.4081 0.244 0.060 0.000 0.696
#> GSM149116 4 0.1798 0.7519 0.016 0.000 0.040 0.944
#> GSM149117 4 0.7415 -0.2221 0.144 0.416 0.004 0.436
#> GSM149118 4 0.1452 0.7632 0.000 0.008 0.036 0.956
#> GSM149119 4 0.1211 0.7627 0.000 0.000 0.040 0.960
#> GSM149120 4 0.1305 0.7637 0.000 0.004 0.036 0.960
#> GSM149121 4 0.5682 0.3125 0.352 0.036 0.000 0.612
#> GSM149122 4 0.1211 0.7627 0.000 0.000 0.040 0.960
#> GSM149123 4 0.2222 0.7565 0.032 0.004 0.032 0.932
#> GSM149124 4 0.1706 0.7542 0.016 0.000 0.036 0.948
#> GSM149125 4 0.1211 0.7627 0.000 0.000 0.040 0.960
#> GSM149126 4 0.2115 0.7621 0.024 0.004 0.036 0.936
#> GSM149127 4 0.1211 0.7627 0.000 0.000 0.040 0.960
#> GSM149128 4 0.2007 0.7632 0.020 0.004 0.036 0.940
#> GSM149129 4 0.2007 0.7632 0.020 0.004 0.036 0.940
#> GSM149130 4 0.6881 0.0278 0.280 0.128 0.004 0.588
#> GSM149131 4 0.7505 -0.5043 0.412 0.156 0.004 0.428
#> GSM149132 4 0.2007 0.7632 0.020 0.004 0.036 0.940
#> GSM149133 4 0.5030 0.6101 0.160 0.032 0.028 0.780
#> GSM149134 1 0.1406 0.4422 0.960 0.024 0.000 0.016
#> GSM149135 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149136 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149137 1 0.7241 0.6679 0.536 0.188 0.000 0.276
#> GSM149138 1 0.3496 0.4832 0.872 0.052 0.004 0.072
#> GSM149139 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149140 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149141 2 0.5537 0.8059 0.088 0.776 0.092 0.044
#> GSM149142 2 0.6423 0.3985 0.256 0.644 0.008 0.092
#> GSM149143 2 0.5293 0.8187 0.088 0.792 0.072 0.048
#> GSM149144 2 0.1635 0.8414 0.044 0.948 0.000 0.008
#> GSM149145 2 0.5453 0.8076 0.092 0.780 0.088 0.040
#> GSM149146 2 0.1339 0.8451 0.024 0.964 0.008 0.004
#> GSM149147 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149148 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149149 1 0.7714 0.7813 0.484 0.236 0.004 0.276
#> GSM149150 2 0.4260 0.7737 0.116 0.828 0.008 0.048
#> GSM149151 1 0.7778 0.7410 0.472 0.264 0.004 0.260
#> GSM149152 4 0.8238 -0.3552 0.256 0.308 0.016 0.420
#> GSM149153 2 0.5453 0.8076 0.092 0.780 0.088 0.040
#> GSM149154 2 0.5232 0.8190 0.076 0.796 0.080 0.048
#> GSM149155 2 0.0895 0.8404 0.020 0.976 0.000 0.004
#> GSM149156 2 0.1631 0.8525 0.020 0.956 0.016 0.008
#> GSM149157 2 0.3934 0.8404 0.076 0.860 0.036 0.028
#> GSM149158 2 0.3813 0.8384 0.080 0.864 0.028 0.028
#> GSM149159 2 0.3863 0.8428 0.036 0.864 0.072 0.028
#> GSM149160 2 0.4003 0.8383 0.080 0.856 0.036 0.028
#> GSM149161 2 0.2284 0.8467 0.036 0.932 0.012 0.020
#> GSM149162 2 0.0895 0.8404 0.020 0.976 0.000 0.004
#> GSM149163 2 0.0895 0.8404 0.020 0.976 0.000 0.004
#> GSM149164 2 0.6948 0.5195 0.324 0.576 0.080 0.020
#> GSM149165 2 0.1640 0.8474 0.020 0.956 0.012 0.012
#> GSM149166 2 0.5136 0.5826 0.056 0.752 0.004 0.188
#> GSM149167 2 0.5971 0.7119 0.136 0.740 0.036 0.088
#> GSM149168 2 0.4010 0.8411 0.044 0.856 0.076 0.024
#> GSM149169 2 0.3363 0.8395 0.072 0.884 0.020 0.024
#> GSM149170 2 0.3215 0.8477 0.020 0.892 0.064 0.024
#> GSM149171 2 0.4126 0.8392 0.040 0.848 0.088 0.024
#> GSM149172 2 0.5320 0.8095 0.088 0.780 0.108 0.024
#> GSM149173 2 0.6177 0.7103 0.152 0.696 0.144 0.008
#> GSM149174 2 0.3363 0.8395 0.072 0.884 0.020 0.024
#> GSM149175 2 0.5411 0.8057 0.084 0.776 0.112 0.028
#> GSM149176 2 0.1486 0.8451 0.024 0.960 0.008 0.008
#> GSM149177 2 0.8077 0.1971 0.036 0.484 0.332 0.148
#> GSM149178 2 0.7598 0.4751 0.180 0.548 0.256 0.016
#> GSM149179 2 0.1486 0.8464 0.024 0.960 0.008 0.008
#> GSM149180 2 0.2521 0.8351 0.060 0.916 0.020 0.004
#> GSM149181 2 0.3138 0.8486 0.020 0.896 0.060 0.024
#> GSM149182 2 0.1209 0.8395 0.032 0.964 0.000 0.004
#> GSM149183 2 0.1377 0.8551 0.008 0.964 0.020 0.008
#> GSM149184 2 0.2700 0.8391 0.044 0.916 0.020 0.020
#> GSM149185 2 0.4231 0.8384 0.048 0.844 0.084 0.024
#> GSM149186 2 0.2521 0.8557 0.016 0.924 0.032 0.028
#> GSM149187 2 0.1174 0.8551 0.000 0.968 0.020 0.012
#> GSM149188 2 0.1114 0.8479 0.016 0.972 0.008 0.004
#> GSM149189 2 0.4934 0.8103 0.048 0.792 0.140 0.020
#> GSM149190 2 0.1362 0.8512 0.020 0.964 0.012 0.004
#> GSM149191 2 0.4946 0.8296 0.088 0.808 0.072 0.032
#> GSM149192 2 0.1640 0.8551 0.020 0.956 0.012 0.012
#> GSM149193 2 0.3272 0.8514 0.036 0.892 0.052 0.020
#> GSM149194 2 0.4638 0.8337 0.092 0.824 0.052 0.032
#> GSM149195 2 0.7395 0.4819 0.172 0.548 0.272 0.008
#> GSM149196 2 0.2221 0.8486 0.024 0.936 0.020 0.020
#> GSM149197 2 0.1124 0.8514 0.012 0.972 0.012 0.004
#> GSM149198 1 0.1406 0.4422 0.960 0.024 0.000 0.016
#> GSM149199 2 0.1004 0.8442 0.024 0.972 0.000 0.004
#> GSM149200 2 0.3536 0.8475 0.028 0.876 0.076 0.020
#> GSM149201 2 0.0895 0.8404 0.020 0.976 0.000 0.004
#> GSM149202 2 0.3353 0.8516 0.036 0.888 0.056 0.020
#> GSM149203 2 0.4551 0.8388 0.060 0.832 0.072 0.036
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0324 0.9059 0.000 0.004 0.992 0.000 0.004
#> GSM149100 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.8279 -0.3157 0.108 0.320 0.336 0.004 0.232
#> GSM149104 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.6621 0.2546 0.108 0.060 0.588 0.000 0.244
#> GSM149107 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0162 0.9082 0.000 0.000 0.996 0.000 0.004
#> GSM149109 3 0.0451 0.9057 0.000 0.004 0.988 0.000 0.008
#> GSM149110 3 0.0324 0.9059 0.000 0.004 0.992 0.000 0.004
#> GSM149111 3 0.0000 0.9098 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0451 0.9057 0.000 0.004 0.988 0.000 0.008
#> GSM149113 3 0.0290 0.9053 0.000 0.000 0.992 0.000 0.008
#> GSM149114 3 0.0290 0.9053 0.000 0.000 0.992 0.000 0.008
#> GSM149115 4 0.5212 0.1829 0.416 0.016 0.000 0.548 0.020
#> GSM149116 4 0.0451 0.8753 0.004 0.000 0.000 0.988 0.008
#> GSM149117 5 0.6383 0.0000 0.312 0.092 0.000 0.036 0.560
#> GSM149118 4 0.0671 0.8873 0.016 0.004 0.000 0.980 0.000
#> GSM149119 4 0.0162 0.8867 0.004 0.000 0.000 0.996 0.000
#> GSM149120 4 0.0566 0.8873 0.012 0.004 0.000 0.984 0.000
#> GSM149121 4 0.5976 0.0749 0.424 0.016 0.000 0.492 0.068
#> GSM149122 4 0.0162 0.8867 0.004 0.000 0.000 0.996 0.000
#> GSM149123 4 0.1662 0.8690 0.056 0.004 0.000 0.936 0.004
#> GSM149124 4 0.0579 0.8781 0.008 0.000 0.000 0.984 0.008
#> GSM149125 4 0.0162 0.8867 0.004 0.000 0.000 0.996 0.000
#> GSM149126 4 0.1285 0.8827 0.036 0.004 0.000 0.956 0.004
#> GSM149127 4 0.0162 0.8867 0.004 0.000 0.000 0.996 0.000
#> GSM149128 4 0.0955 0.8864 0.028 0.004 0.000 0.968 0.000
#> GSM149129 4 0.0955 0.8864 0.028 0.004 0.000 0.968 0.000
#> GSM149130 1 0.6067 0.2705 0.488 0.076 0.000 0.420 0.016
#> GSM149131 1 0.5404 0.5003 0.636 0.100 0.000 0.264 0.000
#> GSM149132 4 0.0955 0.8864 0.028 0.004 0.000 0.968 0.000
#> GSM149133 4 0.4436 0.6284 0.224 0.028 0.000 0.736 0.012
#> GSM149134 1 0.4453 0.2384 0.660 0.008 0.000 0.008 0.324
#> GSM149135 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149136 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149137 1 0.4308 0.4820 0.808 0.056 0.000 0.048 0.088
#> GSM149138 1 0.5038 0.3272 0.692 0.032 0.000 0.028 0.248
#> GSM149139 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149140 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149141 2 0.4339 0.7465 0.052 0.824 0.036 0.024 0.064
#> GSM149142 2 0.6222 0.2407 0.376 0.516 0.000 0.020 0.088
#> GSM149143 2 0.4164 0.7506 0.060 0.828 0.016 0.024 0.072
#> GSM149144 2 0.4873 0.6891 0.068 0.688 0.000 0.000 0.244
#> GSM149145 2 0.4253 0.7477 0.048 0.828 0.032 0.024 0.068
#> GSM149146 2 0.4218 0.7332 0.040 0.760 0.004 0.000 0.196
#> GSM149147 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149148 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149149 1 0.4300 0.6702 0.772 0.132 0.000 0.096 0.000
#> GSM149150 2 0.5388 0.6573 0.152 0.680 0.000 0.004 0.164
#> GSM149151 1 0.4693 0.6298 0.756 0.148 0.000 0.084 0.012
#> GSM149152 1 0.7791 0.1182 0.420 0.236 0.000 0.268 0.076
#> GSM149153 2 0.4253 0.7477 0.048 0.828 0.032 0.024 0.068
#> GSM149154 2 0.4084 0.7526 0.048 0.836 0.024 0.024 0.068
#> GSM149155 2 0.4584 0.7032 0.056 0.716 0.000 0.000 0.228
#> GSM149156 2 0.2932 0.7859 0.032 0.864 0.000 0.000 0.104
#> GSM149157 2 0.3148 0.7823 0.072 0.864 0.004 0.000 0.060
#> GSM149158 2 0.3338 0.7809 0.068 0.852 0.004 0.000 0.076
#> GSM149159 2 0.2359 0.7762 0.016 0.912 0.008 0.004 0.060
#> GSM149160 2 0.3277 0.7814 0.068 0.856 0.004 0.000 0.072
#> GSM149161 2 0.3323 0.7790 0.056 0.844 0.000 0.000 0.100
#> GSM149162 2 0.4584 0.7032 0.056 0.716 0.000 0.000 0.228
#> GSM149163 2 0.4584 0.7032 0.056 0.716 0.000 0.000 0.228
#> GSM149164 2 0.6529 0.5134 0.204 0.604 0.032 0.004 0.156
#> GSM149165 2 0.3011 0.7825 0.016 0.844 0.000 0.000 0.140
#> GSM149166 2 0.6515 0.0897 0.196 0.440 0.000 0.000 0.364
#> GSM149167 2 0.5293 0.6307 0.180 0.704 0.004 0.008 0.104
#> GSM149168 2 0.2275 0.7735 0.008 0.912 0.008 0.004 0.068
#> GSM149169 2 0.3242 0.7796 0.072 0.852 0.000 0.000 0.076
#> GSM149170 2 0.1766 0.7838 0.012 0.940 0.004 0.004 0.040
#> GSM149171 2 0.2856 0.7738 0.012 0.888 0.024 0.004 0.072
#> GSM149172 2 0.3798 0.7469 0.028 0.840 0.040 0.004 0.088
#> GSM149173 2 0.5361 0.6839 0.056 0.740 0.080 0.004 0.120
#> GSM149174 2 0.3242 0.7796 0.072 0.852 0.000 0.000 0.076
#> GSM149175 2 0.3996 0.7453 0.028 0.832 0.044 0.008 0.088
#> GSM149176 2 0.4039 0.7448 0.036 0.776 0.004 0.000 0.184
#> GSM149177 2 0.8316 -0.2597 0.108 0.364 0.308 0.008 0.212
#> GSM149178 2 0.7020 0.4668 0.076 0.576 0.216 0.004 0.128
#> GSM149179 2 0.4114 0.7472 0.044 0.776 0.004 0.000 0.176
#> GSM149180 2 0.4913 0.7162 0.056 0.720 0.016 0.000 0.208
#> GSM149181 2 0.1605 0.7846 0.012 0.944 0.000 0.004 0.040
#> GSM149182 2 0.4666 0.6949 0.056 0.704 0.000 0.000 0.240
#> GSM149183 2 0.3099 0.7822 0.028 0.848 0.000 0.000 0.124
#> GSM149184 2 0.3242 0.7700 0.012 0.816 0.000 0.000 0.172
#> GSM149185 2 0.2770 0.7752 0.016 0.892 0.016 0.004 0.072
#> GSM149186 2 0.2670 0.7980 0.028 0.888 0.000 0.004 0.080
#> GSM149187 2 0.2707 0.7903 0.024 0.876 0.000 0.000 0.100
#> GSM149188 2 0.4233 0.7325 0.044 0.748 0.000 0.000 0.208
#> GSM149189 2 0.3850 0.7597 0.012 0.832 0.080 0.004 0.072
#> GSM149190 2 0.3267 0.7808 0.044 0.844 0.000 0.000 0.112
#> GSM149191 2 0.3199 0.7670 0.044 0.872 0.012 0.004 0.068
#> GSM149192 2 0.3795 0.7800 0.044 0.808 0.000 0.004 0.144
#> GSM149193 2 0.3127 0.7932 0.028 0.868 0.008 0.004 0.092
#> GSM149194 2 0.3213 0.7754 0.072 0.860 0.004 0.000 0.064
#> GSM149195 2 0.6735 0.4832 0.056 0.596 0.220 0.004 0.124
#> GSM149196 2 0.3060 0.7903 0.024 0.848 0.000 0.000 0.128
#> GSM149197 2 0.3495 0.7688 0.032 0.816 0.000 0.000 0.152
#> GSM149198 1 0.4453 0.2384 0.660 0.008 0.000 0.008 0.324
#> GSM149199 2 0.3152 0.7759 0.024 0.840 0.000 0.000 0.136
#> GSM149200 2 0.2186 0.7862 0.012 0.924 0.016 0.004 0.044
#> GSM149201 2 0.4584 0.7032 0.056 0.716 0.000 0.000 0.228
#> GSM149202 2 0.2774 0.7935 0.020 0.888 0.008 0.004 0.080
#> GSM149203 2 0.2858 0.7735 0.024 0.880 0.004 0.004 0.088
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0458 0.8645 0.000 0.000 0.984 0.000 0.016 0.000
#> GSM149100 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149101 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149102 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149103 3 0.8368 -0.2337 0.088 0.208 0.328 0.000 0.268 0.108
#> GSM149104 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149105 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149106 3 0.6405 0.2787 0.088 0.184 0.592 0.000 0.012 0.124
#> GSM149107 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149108 3 0.0622 0.8627 0.000 0.000 0.980 0.000 0.012 0.008
#> GSM149109 3 0.0508 0.8633 0.000 0.004 0.984 0.000 0.012 0.000
#> GSM149110 3 0.0458 0.8645 0.000 0.000 0.984 0.000 0.016 0.000
#> GSM149111 3 0.0260 0.8675 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149112 3 0.0508 0.8633 0.000 0.004 0.984 0.000 0.012 0.000
#> GSM149113 3 0.0146 0.8614 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM149114 3 0.0146 0.8614 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM149115 4 0.5132 0.1401 0.428 0.016 0.000 0.516 0.008 0.032
#> GSM149116 4 0.1464 0.8337 0.004 0.016 0.000 0.944 0.000 0.036
#> GSM149117 6 0.6586 0.0000 0.304 0.304 0.000 0.016 0.004 0.372
#> GSM149118 4 0.0692 0.8741 0.020 0.000 0.000 0.976 0.004 0.000
#> GSM149119 4 0.0146 0.8725 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149120 4 0.0603 0.8743 0.016 0.000 0.000 0.980 0.004 0.000
#> GSM149121 4 0.5464 0.0479 0.448 0.000 0.000 0.460 0.016 0.076
#> GSM149122 4 0.0146 0.8725 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149123 4 0.1555 0.8552 0.060 0.000 0.000 0.932 0.004 0.004
#> GSM149124 4 0.1749 0.8329 0.008 0.024 0.000 0.932 0.000 0.036
#> GSM149125 4 0.0146 0.8725 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149126 4 0.1155 0.8706 0.036 0.000 0.000 0.956 0.004 0.004
#> GSM149127 4 0.0146 0.8725 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149128 4 0.0858 0.8739 0.028 0.000 0.000 0.968 0.004 0.000
#> GSM149129 4 0.0858 0.8739 0.028 0.000 0.000 0.968 0.004 0.000
#> GSM149130 1 0.5969 0.2456 0.496 0.036 0.000 0.392 0.060 0.016
#> GSM149131 1 0.5579 0.4661 0.640 0.044 0.000 0.236 0.068 0.012
#> GSM149132 4 0.0858 0.8739 0.028 0.000 0.000 0.968 0.004 0.000
#> GSM149133 4 0.4158 0.6174 0.236 0.000 0.000 0.720 0.020 0.024
#> GSM149134 1 0.4376 0.1332 0.592 0.012 0.000 0.000 0.012 0.384
#> GSM149135 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149136 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149137 1 0.3590 0.4459 0.836 0.072 0.000 0.024 0.012 0.056
#> GSM149138 1 0.5032 0.2510 0.640 0.020 0.000 0.020 0.028 0.292
#> GSM149139 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149140 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149141 5 0.3566 0.5396 0.048 0.044 0.012 0.016 0.852 0.028
#> GSM149142 1 0.6417 -0.1341 0.384 0.324 0.000 0.008 0.280 0.004
#> GSM149143 5 0.3186 0.5458 0.056 0.040 0.008 0.016 0.868 0.012
#> GSM149144 2 0.3741 0.7005 0.032 0.756 0.000 0.000 0.208 0.004
#> GSM149145 5 0.3402 0.5415 0.044 0.044 0.008 0.016 0.860 0.028
#> GSM149146 2 0.3614 0.7302 0.004 0.728 0.004 0.000 0.260 0.004
#> GSM149147 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149148 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149149 1 0.4235 0.6323 0.784 0.068 0.000 0.072 0.076 0.000
#> GSM149150 2 0.5652 0.4207 0.132 0.520 0.000 0.000 0.340 0.008
#> GSM149151 1 0.4362 0.6013 0.772 0.068 0.000 0.060 0.100 0.000
#> GSM149152 1 0.7873 0.0979 0.452 0.112 0.000 0.220 0.136 0.080
#> GSM149153 5 0.3402 0.5415 0.044 0.044 0.008 0.016 0.860 0.028
#> GSM149154 5 0.3097 0.5451 0.048 0.032 0.008 0.016 0.876 0.020
#> GSM149155 2 0.2994 0.7238 0.004 0.788 0.000 0.000 0.208 0.000
#> GSM149156 2 0.4371 0.5834 0.020 0.580 0.000 0.000 0.396 0.004
#> GSM149157 5 0.5157 0.1473 0.060 0.356 0.000 0.000 0.568 0.016
#> GSM149158 5 0.5053 0.1137 0.056 0.368 0.000 0.000 0.564 0.012
#> GSM149159 5 0.3411 0.4237 0.004 0.232 0.000 0.000 0.756 0.008
#> GSM149160 5 0.5023 0.1497 0.056 0.356 0.000 0.000 0.576 0.012
#> GSM149161 2 0.4957 0.4153 0.048 0.520 0.000 0.000 0.424 0.008
#> GSM149162 2 0.3052 0.7264 0.004 0.780 0.000 0.000 0.216 0.000
#> GSM149163 2 0.2994 0.7238 0.004 0.788 0.000 0.000 0.208 0.000
#> GSM149164 5 0.6416 0.3213 0.160 0.104 0.000 0.000 0.568 0.168
#> GSM149165 2 0.3967 0.6367 0.000 0.632 0.000 0.000 0.356 0.012
#> GSM149166 2 0.6370 0.1201 0.144 0.580 0.000 0.000 0.144 0.132
#> GSM149167 5 0.6441 0.2802 0.164 0.276 0.000 0.004 0.512 0.044
#> GSM149168 5 0.3052 0.4501 0.000 0.216 0.000 0.000 0.780 0.004
#> GSM149169 5 0.5258 -0.0265 0.060 0.408 0.000 0.000 0.516 0.016
#> GSM149170 5 0.4078 0.2017 0.000 0.340 0.000 0.000 0.640 0.020
#> GSM149171 5 0.3359 0.4652 0.000 0.196 0.008 0.000 0.784 0.012
#> GSM149172 5 0.2542 0.5388 0.008 0.036 0.012 0.000 0.896 0.048
#> GSM149173 5 0.5621 0.4370 0.020 0.156 0.024 0.000 0.660 0.140
#> GSM149174 5 0.5258 -0.0265 0.060 0.408 0.000 0.000 0.516 0.016
#> GSM149175 5 0.2756 0.5356 0.008 0.040 0.012 0.004 0.888 0.048
#> GSM149176 2 0.3851 0.7247 0.004 0.700 0.004 0.000 0.284 0.008
#> GSM149177 3 0.8421 -0.2769 0.092 0.228 0.296 0.000 0.280 0.104
#> GSM149178 5 0.7381 0.2902 0.028 0.176 0.104 0.000 0.480 0.212
#> GSM149179 2 0.3724 0.7268 0.004 0.708 0.004 0.000 0.280 0.004
#> GSM149180 2 0.4417 0.6766 0.016 0.704 0.000 0.000 0.236 0.044
#> GSM149181 5 0.4118 0.1674 0.000 0.352 0.000 0.000 0.628 0.020
#> GSM149182 2 0.3152 0.7149 0.008 0.792 0.000 0.000 0.196 0.004
#> GSM149183 2 0.3945 0.6396 0.000 0.612 0.000 0.000 0.380 0.008
#> GSM149184 2 0.4740 0.4191 0.008 0.584 0.000 0.000 0.368 0.040
#> GSM149185 5 0.3770 0.4035 0.000 0.244 0.000 0.000 0.728 0.028
#> GSM149186 5 0.4325 -0.2303 0.000 0.456 0.000 0.000 0.524 0.020
#> GSM149187 2 0.4262 0.5466 0.012 0.560 0.000 0.000 0.424 0.004
#> GSM149188 2 0.3468 0.7217 0.000 0.728 0.000 0.000 0.264 0.008
#> GSM149189 5 0.4385 0.4630 0.000 0.188 0.048 0.000 0.736 0.028
#> GSM149190 2 0.4560 0.5907 0.028 0.592 0.000 0.000 0.372 0.008
#> GSM149191 5 0.2703 0.5458 0.028 0.080 0.000 0.000 0.876 0.016
#> GSM149192 2 0.3930 0.5871 0.000 0.576 0.000 0.000 0.420 0.004
#> GSM149193 5 0.4746 -0.0836 0.004 0.424 0.000 0.000 0.532 0.040
#> GSM149194 5 0.4790 0.3520 0.056 0.272 0.000 0.000 0.656 0.016
#> GSM149195 5 0.7001 0.3125 0.016 0.144 0.108 0.000 0.520 0.212
#> GSM149196 2 0.4546 0.4512 0.012 0.540 0.000 0.000 0.432 0.016
#> GSM149197 2 0.3607 0.6831 0.000 0.652 0.000 0.000 0.348 0.000
#> GSM149198 1 0.4376 0.1332 0.592 0.012 0.000 0.000 0.012 0.384
#> GSM149199 2 0.3967 0.6473 0.012 0.632 0.000 0.000 0.356 0.000
#> GSM149200 5 0.4479 0.2076 0.000 0.336 0.004 0.000 0.624 0.036
#> GSM149201 2 0.3052 0.7254 0.004 0.780 0.000 0.000 0.216 0.000
#> GSM149202 5 0.4584 0.0071 0.000 0.404 0.000 0.000 0.556 0.040
#> GSM149203 5 0.3028 0.5292 0.008 0.104 0.000 0.000 0.848 0.040
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:hclust 97 3.63e-15 2
#> CV:hclust 86 2.70e-29 3
#> CV:hclust 90 7.15e-35 4
#> CV:hclust 89 2.02e-31 5
#> CV:hclust 64 9.51e-23 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "kmeans"]
# you can also extract it by
# res = res_list["CV:kmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.312 0.687 0.841 0.4139 0.558 0.558
#> 3 3 0.789 0.919 0.942 0.4416 0.726 0.551
#> 4 4 0.651 0.772 0.848 0.1794 0.875 0.694
#> 5 5 0.651 0.664 0.791 0.0967 0.870 0.601
#> 6 6 0.704 0.670 0.785 0.0495 0.957 0.815
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.8207 0.7047 0.744 0.256
#> GSM149100 1 0.8207 0.7047 0.744 0.256
#> GSM149101 1 0.8207 0.7047 0.744 0.256
#> GSM149102 1 0.8207 0.7047 0.744 0.256
#> GSM149103 1 0.8207 0.7047 0.744 0.256
#> GSM149104 1 0.8207 0.7047 0.744 0.256
#> GSM149105 1 0.8207 0.7047 0.744 0.256
#> GSM149106 1 0.8207 0.7047 0.744 0.256
#> GSM149107 1 0.8207 0.7047 0.744 0.256
#> GSM149108 1 0.8207 0.7047 0.744 0.256
#> GSM149109 1 0.8207 0.7047 0.744 0.256
#> GSM149110 1 0.8207 0.7047 0.744 0.256
#> GSM149111 1 0.8207 0.7047 0.744 0.256
#> GSM149112 1 0.8207 0.7047 0.744 0.256
#> GSM149113 1 0.8207 0.7047 0.744 0.256
#> GSM149114 1 0.8207 0.7047 0.744 0.256
#> GSM149115 1 0.9988 -0.0393 0.520 0.480
#> GSM149116 1 0.7745 0.6697 0.772 0.228
#> GSM149117 2 0.9710 0.3869 0.400 0.600
#> GSM149118 1 0.7745 0.6697 0.772 0.228
#> GSM149119 1 0.7745 0.6697 0.772 0.228
#> GSM149120 1 0.7745 0.6697 0.772 0.228
#> GSM149121 1 0.7883 0.6585 0.764 0.236
#> GSM149122 1 0.7745 0.6697 0.772 0.228
#> GSM149123 1 0.7745 0.6697 0.772 0.228
#> GSM149124 1 0.7745 0.6697 0.772 0.228
#> GSM149125 1 0.7745 0.6697 0.772 0.228
#> GSM149126 1 0.7745 0.6697 0.772 0.228
#> GSM149127 1 0.7745 0.6697 0.772 0.228
#> GSM149128 1 0.7745 0.6697 0.772 0.228
#> GSM149129 1 0.7745 0.6697 0.772 0.228
#> GSM149130 2 0.9815 0.3477 0.420 0.580
#> GSM149131 2 0.9815 0.3477 0.420 0.580
#> GSM149132 1 0.7745 0.6697 0.772 0.228
#> GSM149133 1 0.7745 0.6697 0.772 0.228
#> GSM149134 2 0.9775 0.3654 0.412 0.588
#> GSM149135 2 0.9754 0.3735 0.408 0.592
#> GSM149136 2 0.9732 0.3811 0.404 0.596
#> GSM149137 2 0.9775 0.3654 0.412 0.588
#> GSM149138 2 0.9732 0.3811 0.404 0.596
#> GSM149139 2 0.9775 0.3654 0.412 0.588
#> GSM149140 2 0.9732 0.3811 0.404 0.596
#> GSM149141 2 0.6343 0.6697 0.160 0.840
#> GSM149142 2 0.0672 0.8336 0.008 0.992
#> GSM149143 2 0.6623 0.6640 0.172 0.828
#> GSM149144 2 0.0672 0.8336 0.008 0.992
#> GSM149145 2 0.6247 0.6755 0.156 0.844
#> GSM149146 2 0.0376 0.8314 0.004 0.996
#> GSM149147 2 0.9775 0.3654 0.412 0.588
#> GSM149148 2 0.9775 0.3654 0.412 0.588
#> GSM149149 2 0.9775 0.3654 0.412 0.588
#> GSM149150 2 0.0672 0.8336 0.008 0.992
#> GSM149151 2 0.9732 0.3811 0.404 0.596
#> GSM149152 2 0.9996 0.1253 0.488 0.512
#> GSM149153 2 0.5519 0.7132 0.128 0.872
#> GSM149154 1 0.8207 0.6369 0.744 0.256
#> GSM149155 2 0.0672 0.8336 0.008 0.992
#> GSM149156 2 0.0672 0.8336 0.008 0.992
#> GSM149157 2 0.0938 0.8332 0.012 0.988
#> GSM149158 2 0.0672 0.8336 0.008 0.992
#> GSM149159 2 0.0376 0.8314 0.004 0.996
#> GSM149160 2 0.0672 0.8336 0.008 0.992
#> GSM149161 2 0.0672 0.8336 0.008 0.992
#> GSM149162 2 0.0672 0.8336 0.008 0.992
#> GSM149163 2 0.0672 0.8336 0.008 0.992
#> GSM149164 2 0.0672 0.8336 0.008 0.992
#> GSM149165 2 0.0376 0.8314 0.004 0.996
#> GSM149166 2 0.0672 0.8336 0.008 0.992
#> GSM149167 2 0.0672 0.8336 0.008 0.992
#> GSM149168 2 0.0376 0.8314 0.004 0.996
#> GSM149169 2 0.0672 0.8336 0.008 0.992
#> GSM149170 2 0.0376 0.8314 0.004 0.996
#> GSM149171 2 0.0376 0.8314 0.004 0.996
#> GSM149172 2 0.3431 0.7859 0.064 0.936
#> GSM149173 2 0.0376 0.8314 0.004 0.996
#> GSM149174 2 0.0672 0.8336 0.008 0.992
#> GSM149175 2 0.9996 -0.2958 0.488 0.512
#> GSM149176 2 0.0000 0.8324 0.000 1.000
#> GSM149177 2 0.4690 0.7470 0.100 0.900
#> GSM149178 2 0.2423 0.8076 0.040 0.960
#> GSM149179 2 0.0000 0.8324 0.000 1.000
#> GSM149180 2 0.0376 0.8333 0.004 0.996
#> GSM149181 2 0.0376 0.8314 0.004 0.996
#> GSM149182 2 0.0672 0.8336 0.008 0.992
#> GSM149183 2 0.0376 0.8314 0.004 0.996
#> GSM149184 2 0.0376 0.8314 0.004 0.996
#> GSM149185 2 0.0376 0.8314 0.004 0.996
#> GSM149186 2 0.0376 0.8314 0.004 0.996
#> GSM149187 2 0.0672 0.8336 0.008 0.992
#> GSM149188 2 0.0376 0.8314 0.004 0.996
#> GSM149189 2 0.0938 0.8241 0.012 0.988
#> GSM149190 2 0.0672 0.8336 0.008 0.992
#> GSM149191 2 0.0376 0.8314 0.004 0.996
#> GSM149192 2 0.0376 0.8314 0.004 0.996
#> GSM149193 2 0.0376 0.8314 0.004 0.996
#> GSM149194 2 0.0672 0.8336 0.008 0.992
#> GSM149195 1 0.8207 0.7047 0.744 0.256
#> GSM149196 2 0.0376 0.8314 0.004 0.996
#> GSM149197 2 0.0672 0.8336 0.008 0.992
#> GSM149198 2 0.9732 0.3794 0.404 0.596
#> GSM149199 2 0.0672 0.8336 0.008 0.992
#> GSM149200 2 0.0376 0.8314 0.004 0.996
#> GSM149201 2 0.0376 0.8333 0.004 0.996
#> GSM149202 2 0.0376 0.8314 0.004 0.996
#> GSM149203 2 0.0938 0.8282 0.012 0.988
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149100 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149101 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149102 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149103 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149104 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149105 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149106 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149107 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149108 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149109 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149110 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149111 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149112 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149113 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149114 3 0.0747 1.000 0.000 0.016 0.984
#> GSM149115 1 0.0475 0.819 0.992 0.004 0.004
#> GSM149116 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149117 1 0.3030 0.825 0.904 0.092 0.004
#> GSM149118 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149119 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149120 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149121 1 0.0424 0.817 0.992 0.000 0.008
#> GSM149122 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149123 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149124 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149125 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149126 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149127 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149128 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149129 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149130 1 0.0424 0.820 0.992 0.008 0.000
#> GSM149131 1 0.0237 0.819 0.996 0.004 0.000
#> GSM149132 1 0.4033 0.809 0.856 0.008 0.136
#> GSM149133 1 0.3454 0.816 0.888 0.008 0.104
#> GSM149134 1 0.2866 0.826 0.916 0.076 0.008
#> GSM149135 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149136 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149137 1 0.4110 0.810 0.844 0.152 0.004
#> GSM149138 1 0.4700 0.796 0.812 0.180 0.008
#> GSM149139 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149140 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149141 2 0.5285 0.648 0.244 0.752 0.004
#> GSM149142 2 0.3112 0.897 0.096 0.900 0.004
#> GSM149143 2 0.4755 0.764 0.184 0.808 0.008
#> GSM149144 2 0.1453 0.966 0.024 0.968 0.008
#> GSM149145 2 0.1878 0.949 0.044 0.952 0.004
#> GSM149146 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149147 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149148 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149149 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149150 2 0.0424 0.980 0.008 0.992 0.000
#> GSM149151 1 0.4575 0.798 0.812 0.184 0.004
#> GSM149152 1 0.2774 0.829 0.920 0.072 0.008
#> GSM149153 2 0.1878 0.949 0.044 0.952 0.004
#> GSM149154 1 0.5678 0.794 0.776 0.192 0.032
#> GSM149155 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149157 2 0.0237 0.981 0.000 0.996 0.004
#> GSM149158 2 0.0983 0.973 0.016 0.980 0.004
#> GSM149159 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149160 2 0.0983 0.973 0.016 0.980 0.004
#> GSM149161 2 0.0983 0.973 0.016 0.980 0.004
#> GSM149162 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149164 2 0.1585 0.965 0.028 0.964 0.008
#> GSM149165 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149166 2 0.0237 0.981 0.004 0.996 0.000
#> GSM149167 2 0.0983 0.973 0.016 0.980 0.004
#> GSM149168 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149169 2 0.1267 0.968 0.024 0.972 0.004
#> GSM149170 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149171 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149172 2 0.0237 0.980 0.000 0.996 0.004
#> GSM149173 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149174 2 0.0983 0.973 0.016 0.980 0.004
#> GSM149175 1 0.7528 0.671 0.648 0.280 0.072
#> GSM149176 2 0.0237 0.981 0.004 0.996 0.000
#> GSM149177 2 0.0237 0.981 0.004 0.996 0.000
#> GSM149178 2 0.0424 0.980 0.008 0.992 0.000
#> GSM149179 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149180 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149181 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149182 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149183 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149185 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149186 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149189 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149190 2 0.0475 0.979 0.004 0.992 0.004
#> GSM149191 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149193 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149194 2 0.0983 0.973 0.016 0.980 0.004
#> GSM149195 3 0.0983 0.996 0.004 0.016 0.980
#> GSM149196 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149197 2 0.0237 0.981 0.004 0.996 0.000
#> GSM149198 1 0.4912 0.780 0.796 0.196 0.008
#> GSM149199 2 0.0000 0.982 0.000 1.000 0.000
#> GSM149200 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149201 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149202 2 0.0237 0.980 0.004 0.996 0.000
#> GSM149203 2 0.0237 0.980 0.000 0.996 0.004
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.9813 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0188 0.9813 0.004 0.000 0.996 0.000
#> GSM149101 3 0.0336 0.9810 0.008 0.000 0.992 0.000
#> GSM149102 3 0.0336 0.9810 0.008 0.000 0.992 0.000
#> GSM149103 3 0.0469 0.9728 0.012 0.000 0.988 0.000
#> GSM149104 3 0.0188 0.9813 0.004 0.000 0.996 0.000
#> GSM149105 3 0.0000 0.9813 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0376 0.9788 0.004 0.000 0.992 0.004
#> GSM149107 3 0.0336 0.9810 0.008 0.000 0.992 0.000
#> GSM149108 3 0.0336 0.9810 0.008 0.000 0.992 0.000
#> GSM149109 3 0.0000 0.9813 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.9813 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.9813 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.9813 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0188 0.9812 0.004 0.000 0.996 0.000
#> GSM149114 3 0.0336 0.9810 0.008 0.000 0.992 0.000
#> GSM149115 4 0.4730 0.2883 0.364 0.000 0.000 0.636
#> GSM149116 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149117 1 0.6548 0.5961 0.608 0.116 0.000 0.276
#> GSM149118 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149119 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149120 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149121 4 0.3444 0.6970 0.184 0.000 0.000 0.816
#> GSM149122 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149123 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149124 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149125 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149126 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149127 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149128 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149129 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149130 1 0.4907 0.4144 0.580 0.000 0.000 0.420
#> GSM149131 1 0.4925 0.3937 0.572 0.000 0.000 0.428
#> GSM149132 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149133 4 0.1118 0.9526 0.000 0.000 0.036 0.964
#> GSM149134 1 0.3942 0.6691 0.764 0.000 0.000 0.236
#> GSM149135 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149136 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149137 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149138 1 0.3764 0.6912 0.816 0.012 0.000 0.172
#> GSM149139 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149140 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149141 1 0.4775 0.4462 0.740 0.232 0.000 0.028
#> GSM149142 1 0.4655 0.4811 0.684 0.312 0.000 0.004
#> GSM149143 1 0.4238 0.5373 0.796 0.176 0.000 0.028
#> GSM149144 2 0.4175 0.7206 0.212 0.776 0.000 0.012
#> GSM149145 1 0.5279 -0.0347 0.588 0.400 0.000 0.012
#> GSM149146 2 0.1109 0.8334 0.028 0.968 0.000 0.004
#> GSM149147 1 0.4904 0.7067 0.744 0.040 0.000 0.216
#> GSM149148 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149149 1 0.4974 0.7055 0.736 0.040 0.000 0.224
#> GSM149150 2 0.4095 0.8083 0.192 0.792 0.000 0.016
#> GSM149151 1 0.4793 0.7066 0.756 0.040 0.000 0.204
#> GSM149152 1 0.4831 0.6463 0.704 0.016 0.000 0.280
#> GSM149153 1 0.5279 -0.0347 0.588 0.400 0.000 0.012
#> GSM149154 1 0.4673 0.6769 0.796 0.032 0.016 0.156
#> GSM149155 2 0.1545 0.8292 0.040 0.952 0.000 0.008
#> GSM149156 2 0.1661 0.8309 0.052 0.944 0.000 0.004
#> GSM149157 2 0.3870 0.7441 0.208 0.788 0.000 0.004
#> GSM149158 2 0.4401 0.6414 0.272 0.724 0.000 0.004
#> GSM149159 2 0.3494 0.8142 0.172 0.824 0.000 0.004
#> GSM149160 2 0.4509 0.6368 0.288 0.708 0.000 0.004
#> GSM149161 2 0.4053 0.7022 0.228 0.768 0.000 0.004
#> GSM149162 2 0.1635 0.8296 0.044 0.948 0.000 0.008
#> GSM149163 2 0.1545 0.8292 0.040 0.952 0.000 0.008
#> GSM149164 1 0.5780 -0.4073 0.496 0.476 0.000 0.028
#> GSM149165 2 0.1807 0.8412 0.052 0.940 0.000 0.008
#> GSM149166 2 0.2480 0.8207 0.088 0.904 0.000 0.008
#> GSM149167 2 0.4608 0.5886 0.304 0.692 0.000 0.004
#> GSM149168 2 0.3895 0.8059 0.184 0.804 0.000 0.012
#> GSM149169 2 0.4920 0.4425 0.368 0.628 0.000 0.004
#> GSM149170 2 0.3808 0.8072 0.176 0.812 0.000 0.012
#> GSM149171 2 0.4059 0.7960 0.200 0.788 0.000 0.012
#> GSM149172 2 0.4387 0.7830 0.236 0.752 0.000 0.012
#> GSM149173 2 0.4253 0.7879 0.208 0.776 0.000 0.016
#> GSM149174 2 0.4539 0.6405 0.272 0.720 0.000 0.008
#> GSM149175 1 0.5271 0.5821 0.768 0.144 0.012 0.076
#> GSM149176 2 0.2859 0.8330 0.112 0.880 0.000 0.008
#> GSM149177 2 0.3937 0.8077 0.188 0.800 0.000 0.012
#> GSM149178 2 0.4838 0.7663 0.252 0.724 0.000 0.024
#> GSM149179 2 0.2124 0.8413 0.068 0.924 0.000 0.008
#> GSM149180 2 0.3447 0.8261 0.128 0.852 0.000 0.020
#> GSM149181 2 0.3047 0.8271 0.116 0.872 0.000 0.012
#> GSM149182 2 0.1576 0.8322 0.048 0.948 0.000 0.004
#> GSM149183 2 0.0817 0.8388 0.024 0.976 0.000 0.000
#> GSM149184 2 0.3161 0.8267 0.124 0.864 0.000 0.012
#> GSM149185 2 0.3937 0.8033 0.188 0.800 0.000 0.012
#> GSM149186 2 0.1807 0.8426 0.052 0.940 0.000 0.008
#> GSM149187 2 0.1661 0.8309 0.052 0.944 0.000 0.004
#> GSM149188 2 0.0779 0.8392 0.016 0.980 0.000 0.004
#> GSM149189 2 0.4059 0.7977 0.200 0.788 0.000 0.012
#> GSM149190 2 0.3583 0.7518 0.180 0.816 0.000 0.004
#> GSM149191 2 0.4399 0.7985 0.224 0.760 0.000 0.016
#> GSM149192 2 0.0707 0.8408 0.020 0.980 0.000 0.000
#> GSM149193 2 0.1824 0.8400 0.060 0.936 0.000 0.004
#> GSM149194 2 0.4401 0.6525 0.272 0.724 0.000 0.004
#> GSM149195 3 0.4939 0.7344 0.188 0.024 0.768 0.020
#> GSM149196 2 0.3047 0.8303 0.116 0.872 0.000 0.012
#> GSM149197 2 0.1661 0.8309 0.052 0.944 0.000 0.004
#> GSM149198 1 0.3080 0.6523 0.880 0.024 0.000 0.096
#> GSM149199 2 0.1635 0.8296 0.044 0.948 0.000 0.008
#> GSM149200 2 0.3895 0.8036 0.184 0.804 0.000 0.012
#> GSM149201 2 0.1109 0.8324 0.028 0.968 0.000 0.004
#> GSM149202 2 0.3937 0.8022 0.188 0.800 0.000 0.012
#> GSM149203 2 0.4098 0.7989 0.204 0.784 0.000 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0807 0.98395 0.012 0.000 0.976 0.000 0.012
#> GSM149100 3 0.0912 0.98416 0.012 0.000 0.972 0.000 0.016
#> GSM149101 3 0.0566 0.98446 0.004 0.000 0.984 0.000 0.012
#> GSM149102 3 0.0566 0.98446 0.004 0.000 0.984 0.000 0.012
#> GSM149103 3 0.1310 0.96389 0.024 0.000 0.956 0.000 0.020
#> GSM149104 3 0.0451 0.98484 0.004 0.000 0.988 0.000 0.008
#> GSM149105 3 0.0579 0.98453 0.008 0.000 0.984 0.000 0.008
#> GSM149106 3 0.1211 0.96914 0.024 0.000 0.960 0.000 0.016
#> GSM149107 3 0.0566 0.98446 0.004 0.000 0.984 0.000 0.012
#> GSM149108 3 0.0566 0.98446 0.004 0.000 0.984 0.000 0.012
#> GSM149109 3 0.0693 0.98374 0.008 0.000 0.980 0.000 0.012
#> GSM149110 3 0.0693 0.98374 0.008 0.000 0.980 0.000 0.012
#> GSM149111 3 0.0579 0.98453 0.008 0.000 0.984 0.000 0.008
#> GSM149112 3 0.0693 0.98374 0.008 0.000 0.980 0.000 0.012
#> GSM149113 3 0.0451 0.98351 0.008 0.000 0.988 0.000 0.004
#> GSM149114 3 0.0579 0.98348 0.008 0.000 0.984 0.000 0.008
#> GSM149115 1 0.5538 0.31320 0.504 0.000 0.000 0.428 0.068
#> GSM149116 4 0.1278 0.94131 0.004 0.000 0.016 0.960 0.020
#> GSM149117 1 0.6796 0.62515 0.612 0.124 0.000 0.128 0.136
#> GSM149118 4 0.1179 0.94321 0.004 0.000 0.016 0.964 0.016
#> GSM149119 4 0.0510 0.94837 0.000 0.000 0.016 0.984 0.000
#> GSM149120 4 0.1074 0.94447 0.004 0.000 0.016 0.968 0.012
#> GSM149121 4 0.6025 -0.01234 0.384 0.000 0.000 0.496 0.120
#> GSM149122 4 0.0510 0.94837 0.000 0.000 0.016 0.984 0.000
#> GSM149123 4 0.0671 0.94869 0.000 0.000 0.016 0.980 0.004
#> GSM149124 4 0.1461 0.93658 0.004 0.000 0.016 0.952 0.028
#> GSM149125 4 0.0510 0.94837 0.000 0.000 0.016 0.984 0.000
#> GSM149126 4 0.0671 0.94869 0.000 0.000 0.016 0.980 0.004
#> GSM149127 4 0.0510 0.94837 0.000 0.000 0.016 0.984 0.000
#> GSM149128 4 0.0671 0.94869 0.000 0.000 0.016 0.980 0.004
#> GSM149129 4 0.0671 0.94869 0.000 0.000 0.016 0.980 0.004
#> GSM149130 1 0.5088 0.68122 0.668 0.000 0.000 0.252 0.080
#> GSM149131 1 0.4645 0.68776 0.688 0.000 0.000 0.268 0.044
#> GSM149132 4 0.0671 0.94869 0.000 0.000 0.016 0.980 0.004
#> GSM149133 4 0.2266 0.90744 0.008 0.000 0.016 0.912 0.064
#> GSM149134 1 0.4467 0.71744 0.752 0.000 0.000 0.084 0.164
#> GSM149135 1 0.3124 0.81388 0.844 0.016 0.000 0.136 0.004
#> GSM149136 1 0.3247 0.81449 0.840 0.016 0.000 0.136 0.008
#> GSM149137 1 0.3312 0.80831 0.840 0.012 0.000 0.132 0.016
#> GSM149138 1 0.4315 0.72701 0.772 0.004 0.000 0.068 0.156
#> GSM149139 1 0.3247 0.81449 0.840 0.016 0.000 0.136 0.008
#> GSM149140 1 0.3247 0.81449 0.840 0.016 0.000 0.136 0.008
#> GSM149141 5 0.4897 0.37415 0.352 0.028 0.000 0.004 0.616
#> GSM149142 1 0.6073 -0.00104 0.496 0.392 0.000 0.004 0.108
#> GSM149143 5 0.5636 0.24148 0.416 0.044 0.000 0.016 0.524
#> GSM149144 2 0.3209 0.64182 0.076 0.860 0.000 0.004 0.060
#> GSM149145 5 0.5516 0.51662 0.296 0.096 0.000 0.000 0.608
#> GSM149146 2 0.1697 0.67291 0.008 0.932 0.000 0.000 0.060
#> GSM149147 1 0.3312 0.81323 0.840 0.016 0.000 0.132 0.012
#> GSM149148 1 0.3247 0.81449 0.840 0.016 0.000 0.136 0.008
#> GSM149149 1 0.3247 0.81449 0.840 0.016 0.000 0.136 0.008
#> GSM149150 2 0.5815 0.03592 0.104 0.540 0.000 0.000 0.356
#> GSM149151 1 0.3218 0.81210 0.848 0.016 0.000 0.124 0.012
#> GSM149152 1 0.4827 0.75524 0.724 0.000 0.000 0.160 0.116
#> GSM149153 5 0.5516 0.51662 0.296 0.096 0.000 0.000 0.608
#> GSM149154 1 0.5868 0.26324 0.516 0.000 0.004 0.088 0.392
#> GSM149155 2 0.0324 0.68334 0.004 0.992 0.000 0.000 0.004
#> GSM149156 2 0.2610 0.67414 0.028 0.892 0.000 0.004 0.076
#> GSM149157 2 0.5855 0.44239 0.148 0.616 0.000 0.004 0.232
#> GSM149158 2 0.5332 0.53553 0.196 0.680 0.000 0.004 0.120
#> GSM149159 5 0.4613 0.54710 0.020 0.360 0.000 0.000 0.620
#> GSM149160 2 0.6130 0.41423 0.196 0.584 0.000 0.004 0.216
#> GSM149161 2 0.5063 0.56203 0.164 0.712 0.000 0.004 0.120
#> GSM149162 2 0.1179 0.68428 0.016 0.964 0.000 0.004 0.016
#> GSM149163 2 0.0727 0.68370 0.012 0.980 0.000 0.004 0.004
#> GSM149164 5 0.6056 0.40072 0.208 0.164 0.000 0.012 0.616
#> GSM149165 2 0.3779 0.49265 0.012 0.752 0.000 0.000 0.236
#> GSM149166 2 0.1740 0.68004 0.012 0.932 0.000 0.000 0.056
#> GSM149167 2 0.5652 0.50561 0.212 0.644 0.000 0.004 0.140
#> GSM149168 5 0.4252 0.58076 0.008 0.340 0.000 0.000 0.652
#> GSM149169 2 0.5823 0.45807 0.252 0.612 0.000 0.004 0.132
#> GSM149170 5 0.4299 0.54595 0.004 0.388 0.000 0.000 0.608
#> GSM149171 5 0.3949 0.61507 0.004 0.300 0.000 0.000 0.696
#> GSM149172 5 0.3519 0.63165 0.008 0.216 0.000 0.000 0.776
#> GSM149173 5 0.4109 0.60457 0.012 0.288 0.000 0.000 0.700
#> GSM149174 2 0.5289 0.53230 0.196 0.684 0.000 0.004 0.116
#> GSM149175 5 0.4962 0.37241 0.316 0.020 0.004 0.012 0.648
#> GSM149176 2 0.3821 0.56245 0.020 0.764 0.000 0.000 0.216
#> GSM149177 2 0.5733 -0.14509 0.084 0.476 0.000 0.000 0.440
#> GSM149178 5 0.4656 0.57123 0.036 0.268 0.000 0.004 0.692
#> GSM149179 2 0.2843 0.63037 0.008 0.848 0.000 0.000 0.144
#> GSM149180 2 0.4309 0.35574 0.016 0.676 0.000 0.000 0.308
#> GSM149181 2 0.4527 0.10500 0.012 0.596 0.000 0.000 0.392
#> GSM149182 2 0.1628 0.67362 0.008 0.936 0.000 0.000 0.056
#> GSM149183 2 0.2136 0.66969 0.008 0.904 0.000 0.000 0.088
#> GSM149184 2 0.4957 -0.02712 0.028 0.528 0.000 0.000 0.444
#> GSM149185 5 0.4392 0.55348 0.008 0.380 0.000 0.000 0.612
#> GSM149186 2 0.3563 0.57403 0.012 0.780 0.000 0.000 0.208
#> GSM149187 2 0.2284 0.68019 0.028 0.912 0.000 0.004 0.056
#> GSM149188 2 0.2462 0.64430 0.008 0.880 0.000 0.000 0.112
#> GSM149189 5 0.4127 0.60987 0.008 0.312 0.000 0.000 0.680
#> GSM149190 2 0.4220 0.61829 0.116 0.788 0.000 0.004 0.092
#> GSM149191 5 0.4874 0.53176 0.040 0.328 0.000 0.000 0.632
#> GSM149192 2 0.2909 0.65593 0.012 0.848 0.000 0.000 0.140
#> GSM149193 2 0.2798 0.62212 0.008 0.852 0.000 0.000 0.140
#> GSM149194 2 0.6079 0.43267 0.196 0.592 0.000 0.004 0.208
#> GSM149195 5 0.4668 0.22860 0.024 0.000 0.352 0.000 0.624
#> GSM149196 2 0.4917 0.05048 0.028 0.556 0.000 0.000 0.416
#> GSM149197 2 0.2284 0.67981 0.028 0.912 0.000 0.004 0.056
#> GSM149198 1 0.4201 0.69913 0.752 0.000 0.000 0.044 0.204
#> GSM149199 2 0.2053 0.68157 0.024 0.924 0.000 0.004 0.048
#> GSM149200 5 0.4299 0.54511 0.004 0.388 0.000 0.000 0.608
#> GSM149201 2 0.1282 0.67657 0.004 0.952 0.000 0.000 0.044
#> GSM149202 5 0.4403 0.54865 0.008 0.384 0.000 0.000 0.608
#> GSM149203 5 0.3756 0.62965 0.008 0.248 0.000 0.000 0.744
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.1082 0.94576 0.004 0.000 0.956 0.000 0.000 NA
#> GSM149100 3 0.1500 0.94881 0.000 0.000 0.936 0.000 0.012 NA
#> GSM149101 3 0.1391 0.94887 0.000 0.000 0.944 0.000 0.016 NA
#> GSM149102 3 0.1391 0.94887 0.000 0.000 0.944 0.000 0.016 NA
#> GSM149103 3 0.3129 0.85726 0.004 0.000 0.820 0.000 0.024 NA
#> GSM149104 3 0.1390 0.94996 0.004 0.000 0.948 0.000 0.016 NA
#> GSM149105 3 0.0291 0.95016 0.000 0.000 0.992 0.000 0.004 NA
#> GSM149106 3 0.2744 0.89420 0.000 0.000 0.840 0.000 0.016 NA
#> GSM149107 3 0.2011 0.94346 0.004 0.000 0.912 0.000 0.020 NA
#> GSM149108 3 0.2126 0.94734 0.004 0.000 0.904 0.000 0.020 NA
#> GSM149109 3 0.1082 0.94576 0.004 0.000 0.956 0.000 0.000 NA
#> GSM149110 3 0.1082 0.94576 0.004 0.000 0.956 0.000 0.000 NA
#> GSM149111 3 0.0291 0.95016 0.000 0.000 0.992 0.000 0.004 NA
#> GSM149112 3 0.1082 0.94576 0.004 0.000 0.956 0.000 0.000 NA
#> GSM149113 3 0.1863 0.93850 0.004 0.000 0.920 0.000 0.016 NA
#> GSM149114 3 0.2373 0.93528 0.004 0.000 0.888 0.000 0.024 NA
#> GSM149115 1 0.5599 0.52065 0.564 0.000 0.000 0.276 0.008 NA
#> GSM149116 4 0.1610 0.93733 0.000 0.000 0.000 0.916 0.000 NA
#> GSM149117 1 0.6543 0.49138 0.472 0.100 0.000 0.028 0.036 NA
#> GSM149118 4 0.1075 0.95506 0.000 0.000 0.000 0.952 0.000 NA
#> GSM149119 4 0.0146 0.96979 0.000 0.000 0.000 0.996 0.000 NA
#> GSM149120 4 0.1007 0.95796 0.000 0.000 0.000 0.956 0.000 NA
#> GSM149121 1 0.6267 0.23656 0.396 0.000 0.000 0.368 0.012 NA
#> GSM149122 4 0.0146 0.96979 0.000 0.000 0.000 0.996 0.000 NA
#> GSM149123 4 0.0000 0.97027 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149124 4 0.1910 0.92066 0.000 0.000 0.000 0.892 0.000 NA
#> GSM149125 4 0.0260 0.96941 0.000 0.000 0.000 0.992 0.000 NA
#> GSM149126 4 0.0000 0.97027 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149127 4 0.0146 0.96979 0.000 0.000 0.000 0.996 0.000 NA
#> GSM149128 4 0.0000 0.97027 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149129 4 0.0000 0.97027 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149130 1 0.4909 0.69148 0.680 0.000 0.000 0.144 0.008 NA
#> GSM149131 1 0.3874 0.73286 0.776 0.000 0.000 0.156 0.008 NA
#> GSM149132 4 0.0000 0.97027 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149133 4 0.2553 0.87823 0.000 0.000 0.000 0.848 0.008 NA
#> GSM149134 1 0.4748 0.66755 0.684 0.000 0.000 0.036 0.040 NA
#> GSM149135 1 0.1901 0.78520 0.912 0.004 0.000 0.076 0.000 NA
#> GSM149136 1 0.1788 0.78559 0.916 0.004 0.000 0.076 0.000 NA
#> GSM149137 1 0.2487 0.78152 0.888 0.004 0.000 0.076 0.004 NA
#> GSM149138 1 0.4620 0.67118 0.704 0.000 0.000 0.032 0.044 NA
#> GSM149139 1 0.1644 0.78581 0.920 0.004 0.000 0.076 0.000 NA
#> GSM149140 1 0.1644 0.78581 0.920 0.004 0.000 0.076 0.000 NA
#> GSM149141 5 0.5497 0.50818 0.208 0.012 0.000 0.000 0.608 NA
#> GSM149142 1 0.6140 -0.16652 0.432 0.404 0.000 0.000 0.028 NA
#> GSM149143 5 0.6207 0.24168 0.340 0.016 0.000 0.000 0.448 NA
#> GSM149144 2 0.2101 0.68250 0.052 0.912 0.000 0.000 0.008 NA
#> GSM149145 5 0.5582 0.51978 0.220 0.020 0.000 0.000 0.608 NA
#> GSM149146 2 0.3525 0.62967 0.008 0.816 0.000 0.000 0.096 NA
#> GSM149147 1 0.1644 0.78581 0.920 0.004 0.000 0.076 0.000 NA
#> GSM149148 1 0.1644 0.78581 0.920 0.004 0.000 0.076 0.000 NA
#> GSM149149 1 0.1644 0.78581 0.920 0.004 0.000 0.076 0.000 NA
#> GSM149150 2 0.6805 -0.13003 0.104 0.404 0.000 0.000 0.376 NA
#> GSM149151 1 0.1769 0.78119 0.924 0.004 0.000 0.060 0.000 NA
#> GSM149152 1 0.5413 0.68364 0.636 0.000 0.000 0.080 0.044 NA
#> GSM149153 5 0.5582 0.51978 0.220 0.020 0.000 0.000 0.608 NA
#> GSM149154 1 0.6287 -0.00369 0.448 0.004 0.000 0.044 0.396 NA
#> GSM149155 2 0.0603 0.68813 0.000 0.980 0.000 0.000 0.004 NA
#> GSM149156 2 0.2981 0.66999 0.016 0.848 0.000 0.000 0.020 NA
#> GSM149157 2 0.6027 0.52661 0.112 0.620 0.000 0.000 0.128 NA
#> GSM149158 2 0.5600 0.56263 0.184 0.636 0.000 0.000 0.040 NA
#> GSM149159 5 0.3715 0.63059 0.000 0.188 0.000 0.000 0.764 NA
#> GSM149160 2 0.6286 0.50609 0.196 0.576 0.000 0.000 0.088 NA
#> GSM149161 2 0.5260 0.58970 0.148 0.676 0.000 0.000 0.036 NA
#> GSM149162 2 0.0653 0.69151 0.004 0.980 0.000 0.000 0.004 NA
#> GSM149163 2 0.0436 0.69083 0.004 0.988 0.000 0.000 0.004 NA
#> GSM149164 5 0.7197 0.26127 0.136 0.148 0.000 0.000 0.360 NA
#> GSM149165 2 0.5293 0.28039 0.004 0.568 0.000 0.000 0.320 NA
#> GSM149166 2 0.2209 0.67742 0.024 0.900 0.000 0.000 0.004 NA
#> GSM149167 2 0.6095 0.52741 0.192 0.584 0.000 0.000 0.056 NA
#> GSM149168 5 0.2703 0.65648 0.000 0.172 0.000 0.000 0.824 NA
#> GSM149169 2 0.5868 0.52324 0.228 0.592 0.000 0.000 0.040 NA
#> GSM149170 5 0.3014 0.64809 0.000 0.184 0.000 0.000 0.804 NA
#> GSM149171 5 0.2263 0.68143 0.000 0.100 0.000 0.000 0.884 NA
#> GSM149172 5 0.2910 0.67826 0.000 0.068 0.000 0.000 0.852 NA
#> GSM149173 5 0.2702 0.67956 0.004 0.092 0.000 0.000 0.868 NA
#> GSM149174 2 0.5564 0.56060 0.188 0.636 0.000 0.000 0.036 NA
#> GSM149175 5 0.5329 0.52835 0.180 0.012 0.000 0.004 0.648 NA
#> GSM149176 2 0.5423 0.46660 0.020 0.632 0.000 0.000 0.204 NA
#> GSM149177 5 0.7016 0.33583 0.072 0.272 0.000 0.000 0.404 NA
#> GSM149178 5 0.5242 0.62599 0.036 0.076 0.000 0.000 0.648 NA
#> GSM149179 2 0.4468 0.52992 0.008 0.712 0.000 0.000 0.204 NA
#> GSM149180 2 0.5216 0.33648 0.012 0.600 0.000 0.000 0.300 NA
#> GSM149181 5 0.4962 0.19302 0.000 0.416 0.000 0.000 0.516 NA
#> GSM149182 2 0.2905 0.64702 0.000 0.852 0.000 0.000 0.084 NA
#> GSM149183 2 0.2843 0.64567 0.000 0.848 0.000 0.000 0.116 NA
#> GSM149184 5 0.5882 0.18755 0.008 0.360 0.000 0.000 0.472 NA
#> GSM149185 5 0.3014 0.64809 0.000 0.184 0.000 0.000 0.804 NA
#> GSM149186 2 0.4460 0.43820 0.000 0.644 0.000 0.000 0.304 NA
#> GSM149187 2 0.2186 0.68866 0.012 0.908 0.000 0.000 0.024 NA
#> GSM149188 2 0.3892 0.56379 0.000 0.752 0.000 0.000 0.188 NA
#> GSM149189 5 0.3657 0.67766 0.000 0.100 0.000 0.000 0.792 NA
#> GSM149190 2 0.3647 0.65899 0.068 0.812 0.000 0.000 0.016 NA
#> GSM149191 5 0.5184 0.55175 0.012 0.188 0.000 0.000 0.652 NA
#> GSM149192 2 0.3930 0.57606 0.004 0.728 0.000 0.000 0.236 NA
#> GSM149193 2 0.3892 0.54558 0.000 0.740 0.000 0.000 0.212 NA
#> GSM149194 2 0.6327 0.50295 0.196 0.572 0.000 0.000 0.092 NA
#> GSM149195 5 0.5302 0.51372 0.020 0.000 0.160 0.000 0.652 NA
#> GSM149196 5 0.5819 0.20026 0.008 0.368 0.000 0.000 0.476 NA
#> GSM149197 2 0.2345 0.68576 0.016 0.896 0.000 0.000 0.016 NA
#> GSM149198 1 0.4801 0.64414 0.672 0.000 0.000 0.016 0.068 NA
#> GSM149199 2 0.1624 0.69097 0.012 0.936 0.000 0.000 0.008 NA
#> GSM149200 5 0.2980 0.65111 0.000 0.180 0.000 0.000 0.808 NA
#> GSM149201 2 0.2474 0.65720 0.000 0.880 0.000 0.000 0.080 NA
#> GSM149202 5 0.3189 0.64743 0.000 0.184 0.000 0.000 0.796 NA
#> GSM149203 5 0.3327 0.67434 0.000 0.088 0.000 0.000 0.820 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:kmeans 87 2.02e-14 2
#> CV:kmeans 105 1.08e-27 3
#> CV:kmeans 96 7.41e-36 4
#> CV:kmeans 85 1.47e-27 5
#> CV:kmeans 90 5.07e-31 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "skmeans"]
# you can also extract it by
# res = res_list["CV:skmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.686 0.768 0.912 0.5021 0.495 0.495
#> 3 3 0.981 0.943 0.974 0.3143 0.766 0.562
#> 4 4 0.664 0.740 0.850 0.1244 0.864 0.628
#> 5 5 0.650 0.554 0.767 0.0763 0.873 0.567
#> 6 6 0.677 0.507 0.707 0.0400 0.933 0.694
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.8770 1.000 0.000
#> GSM149100 1 0.0000 0.8770 1.000 0.000
#> GSM149101 1 0.0000 0.8770 1.000 0.000
#> GSM149102 1 0.0000 0.8770 1.000 0.000
#> GSM149103 1 0.0000 0.8770 1.000 0.000
#> GSM149104 1 0.0000 0.8770 1.000 0.000
#> GSM149105 1 0.0000 0.8770 1.000 0.000
#> GSM149106 1 0.0000 0.8770 1.000 0.000
#> GSM149107 1 0.0000 0.8770 1.000 0.000
#> GSM149108 1 0.0000 0.8770 1.000 0.000
#> GSM149109 1 0.0000 0.8770 1.000 0.000
#> GSM149110 1 0.0000 0.8770 1.000 0.000
#> GSM149111 1 0.0000 0.8770 1.000 0.000
#> GSM149112 1 0.0000 0.8770 1.000 0.000
#> GSM149113 1 0.0000 0.8770 1.000 0.000
#> GSM149114 1 0.0000 0.8770 1.000 0.000
#> GSM149115 1 0.2043 0.8592 0.968 0.032
#> GSM149116 1 0.0000 0.8770 1.000 0.000
#> GSM149117 1 0.9866 0.2987 0.568 0.432
#> GSM149118 1 0.0000 0.8770 1.000 0.000
#> GSM149119 1 0.0000 0.8770 1.000 0.000
#> GSM149120 1 0.0000 0.8770 1.000 0.000
#> GSM149121 1 0.0000 0.8770 1.000 0.000
#> GSM149122 1 0.0000 0.8770 1.000 0.000
#> GSM149123 1 0.0000 0.8770 1.000 0.000
#> GSM149124 1 0.0000 0.8770 1.000 0.000
#> GSM149125 1 0.0000 0.8770 1.000 0.000
#> GSM149126 1 0.0000 0.8770 1.000 0.000
#> GSM149127 1 0.0000 0.8770 1.000 0.000
#> GSM149128 1 0.0000 0.8770 1.000 0.000
#> GSM149129 1 0.0000 0.8770 1.000 0.000
#> GSM149130 1 0.3584 0.8356 0.932 0.068
#> GSM149131 1 0.5059 0.8012 0.888 0.112
#> GSM149132 1 0.0000 0.8770 1.000 0.000
#> GSM149133 1 0.0000 0.8770 1.000 0.000
#> GSM149134 1 0.8144 0.6427 0.748 0.252
#> GSM149135 1 0.9993 0.1675 0.516 0.484
#> GSM149136 2 0.9977 -0.0466 0.472 0.528
#> GSM149137 1 0.9944 0.2520 0.544 0.456
#> GSM149138 2 0.9970 -0.0311 0.468 0.532
#> GSM149139 1 0.9922 0.2736 0.552 0.448
#> GSM149140 2 0.9983 -0.0613 0.476 0.524
#> GSM149141 1 0.3584 0.8303 0.932 0.068
#> GSM149142 2 0.0000 0.9191 0.000 1.000
#> GSM149143 1 0.5178 0.7995 0.884 0.116
#> GSM149144 2 0.0000 0.9191 0.000 1.000
#> GSM149145 1 0.7219 0.7080 0.800 0.200
#> GSM149146 2 0.0000 0.9191 0.000 1.000
#> GSM149147 1 0.9944 0.2521 0.544 0.456
#> GSM149148 1 0.9988 0.1809 0.520 0.480
#> GSM149149 1 0.9710 0.3890 0.600 0.400
#> GSM149150 2 0.0000 0.9191 0.000 1.000
#> GSM149151 2 0.9996 -0.1047 0.488 0.512
#> GSM149152 1 0.0672 0.8728 0.992 0.008
#> GSM149153 1 0.9996 0.0929 0.512 0.488
#> GSM149154 1 0.0000 0.8770 1.000 0.000
#> GSM149155 2 0.0000 0.9191 0.000 1.000
#> GSM149156 2 0.0000 0.9191 0.000 1.000
#> GSM149157 2 0.0000 0.9191 0.000 1.000
#> GSM149158 2 0.0000 0.9191 0.000 1.000
#> GSM149159 2 0.0000 0.9191 0.000 1.000
#> GSM149160 2 0.0000 0.9191 0.000 1.000
#> GSM149161 2 0.0000 0.9191 0.000 1.000
#> GSM149162 2 0.0000 0.9191 0.000 1.000
#> GSM149163 2 0.0000 0.9191 0.000 1.000
#> GSM149164 2 0.3431 0.8630 0.064 0.936
#> GSM149165 2 0.0000 0.9191 0.000 1.000
#> GSM149166 2 0.0000 0.9191 0.000 1.000
#> GSM149167 2 0.0000 0.9191 0.000 1.000
#> GSM149168 2 0.0672 0.9126 0.008 0.992
#> GSM149169 2 0.0000 0.9191 0.000 1.000
#> GSM149170 2 0.1633 0.8985 0.024 0.976
#> GSM149171 2 0.9323 0.4214 0.348 0.652
#> GSM149172 1 0.9963 0.1141 0.536 0.464
#> GSM149173 2 0.3879 0.8482 0.076 0.924
#> GSM149174 2 0.0000 0.9191 0.000 1.000
#> GSM149175 1 0.0000 0.8770 1.000 0.000
#> GSM149176 2 0.0000 0.9191 0.000 1.000
#> GSM149177 1 0.9996 0.0753 0.512 0.488
#> GSM149178 2 0.9358 0.4160 0.352 0.648
#> GSM149179 2 0.0000 0.9191 0.000 1.000
#> GSM149180 2 0.0000 0.9191 0.000 1.000
#> GSM149181 2 0.0000 0.9191 0.000 1.000
#> GSM149182 2 0.0000 0.9191 0.000 1.000
#> GSM149183 2 0.0000 0.9191 0.000 1.000
#> GSM149184 2 0.0000 0.9191 0.000 1.000
#> GSM149185 2 0.0000 0.9191 0.000 1.000
#> GSM149186 2 0.0000 0.9191 0.000 1.000
#> GSM149187 2 0.0000 0.9191 0.000 1.000
#> GSM149188 2 0.0000 0.9191 0.000 1.000
#> GSM149189 2 0.8763 0.5258 0.296 0.704
#> GSM149190 2 0.0000 0.9191 0.000 1.000
#> GSM149191 2 0.0000 0.9191 0.000 1.000
#> GSM149192 2 0.0000 0.9191 0.000 1.000
#> GSM149193 2 0.0000 0.9191 0.000 1.000
#> GSM149194 2 0.0000 0.9191 0.000 1.000
#> GSM149195 1 0.0000 0.8770 1.000 0.000
#> GSM149196 2 0.0000 0.9191 0.000 1.000
#> GSM149197 2 0.0000 0.9191 0.000 1.000
#> GSM149198 1 0.8608 0.6003 0.716 0.284
#> GSM149199 2 0.0000 0.9191 0.000 1.000
#> GSM149200 2 0.0000 0.9191 0.000 1.000
#> GSM149201 2 0.0000 0.9191 0.000 1.000
#> GSM149202 2 0.0000 0.9191 0.000 1.000
#> GSM149203 2 0.9608 0.3362 0.384 0.616
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149116 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149117 1 0.0237 0.9902 0.996 0.000 0.004
#> GSM149118 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149119 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149120 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149121 1 0.0237 0.9902 0.996 0.000 0.004
#> GSM149122 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149123 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149124 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149125 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149126 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149127 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149128 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149129 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149130 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149131 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149132 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149133 1 0.0424 0.9900 0.992 0.000 0.008
#> GSM149134 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149135 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149136 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149137 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149138 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149139 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149140 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149141 3 0.2625 0.8829 0.084 0.000 0.916
#> GSM149142 2 0.0592 0.9739 0.012 0.988 0.000
#> GSM149143 3 0.7187 0.0522 0.480 0.024 0.496
#> GSM149144 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149145 3 0.0424 0.9355 0.008 0.000 0.992
#> GSM149146 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149147 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149148 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149149 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149150 2 0.0237 0.9788 0.004 0.996 0.000
#> GSM149151 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149152 1 0.0237 0.9902 0.996 0.000 0.004
#> GSM149153 3 0.2116 0.9161 0.012 0.040 0.948
#> GSM149154 1 0.4291 0.7773 0.820 0.000 0.180
#> GSM149155 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149158 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149159 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149160 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149161 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149162 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149164 2 0.6677 0.6983 0.088 0.744 0.168
#> GSM149165 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149166 2 0.0237 0.9786 0.000 0.996 0.004
#> GSM149167 2 0.0892 0.9671 0.020 0.980 0.000
#> GSM149168 2 0.0237 0.9786 0.000 0.996 0.004
#> GSM149169 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149170 2 0.2261 0.9220 0.000 0.932 0.068
#> GSM149171 3 0.3686 0.8253 0.000 0.140 0.860
#> GSM149172 3 0.2845 0.8940 0.012 0.068 0.920
#> GSM149173 2 0.5178 0.6604 0.000 0.744 0.256
#> GSM149174 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149175 3 0.3619 0.8222 0.136 0.000 0.864
#> GSM149176 2 0.0237 0.9788 0.004 0.996 0.000
#> GSM149177 3 0.2939 0.8909 0.012 0.072 0.916
#> GSM149178 3 0.1163 0.9271 0.000 0.028 0.972
#> GSM149179 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149184 2 0.0592 0.9729 0.000 0.988 0.012
#> GSM149185 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149189 3 0.1411 0.9223 0.000 0.036 0.964
#> GSM149190 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149191 2 0.2796 0.8955 0.000 0.908 0.092
#> GSM149192 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149194 2 0.0237 0.9792 0.004 0.996 0.000
#> GSM149195 3 0.0000 0.9394 0.000 0.000 1.000
#> GSM149196 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149198 1 0.0000 0.9902 1.000 0.000 0.000
#> GSM149199 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149200 2 0.2261 0.9216 0.000 0.932 0.068
#> GSM149201 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.9806 0.000 1.000 0.000
#> GSM149203 3 0.6888 0.2083 0.016 0.432 0.552
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149103 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149104 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149107 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 0.8800 0.000 0.000 1.000 0.000
#> GSM149115 4 0.1302 0.8991 0.044 0.000 0.000 0.956
#> GSM149116 4 0.0188 0.9249 0.000 0.000 0.004 0.996
#> GSM149117 4 0.4057 0.7584 0.152 0.032 0.000 0.816
#> GSM149118 4 0.0188 0.9249 0.000 0.000 0.004 0.996
#> GSM149119 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149120 4 0.0188 0.9249 0.000 0.000 0.004 0.996
#> GSM149121 4 0.1022 0.9092 0.032 0.000 0.000 0.968
#> GSM149122 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149123 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149124 4 0.0188 0.9249 0.000 0.000 0.004 0.996
#> GSM149125 4 0.0188 0.9249 0.000 0.000 0.004 0.996
#> GSM149126 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149127 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149128 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149129 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149130 4 0.2281 0.8554 0.096 0.000 0.000 0.904
#> GSM149131 4 0.2704 0.8231 0.124 0.000 0.000 0.876
#> GSM149132 4 0.0376 0.9257 0.004 0.000 0.004 0.992
#> GSM149133 4 0.0188 0.9249 0.000 0.000 0.004 0.996
#> GSM149134 1 0.4500 0.5925 0.684 0.000 0.000 0.316
#> GSM149135 1 0.3837 0.7077 0.776 0.000 0.000 0.224
#> GSM149136 1 0.3726 0.7148 0.788 0.000 0.000 0.212
#> GSM149137 1 0.4164 0.6727 0.736 0.000 0.000 0.264
#> GSM149138 1 0.3444 0.7197 0.816 0.000 0.000 0.184
#> GSM149139 1 0.3975 0.6917 0.760 0.000 0.000 0.240
#> GSM149140 1 0.3688 0.7158 0.792 0.000 0.000 0.208
#> GSM149141 3 0.7029 0.5702 0.232 0.032 0.632 0.104
#> GSM149142 1 0.2593 0.6760 0.892 0.104 0.000 0.004
#> GSM149143 1 0.6528 0.5852 0.684 0.024 0.176 0.116
#> GSM149144 2 0.4955 0.2861 0.444 0.556 0.000 0.000
#> GSM149145 3 0.4603 0.7553 0.160 0.032 0.796 0.012
#> GSM149146 2 0.1716 0.8459 0.064 0.936 0.000 0.000
#> GSM149147 1 0.3649 0.7173 0.796 0.000 0.000 0.204
#> GSM149148 1 0.3688 0.7159 0.792 0.000 0.000 0.208
#> GSM149149 1 0.3837 0.7063 0.776 0.000 0.000 0.224
#> GSM149150 2 0.4194 0.7015 0.228 0.764 0.000 0.008
#> GSM149151 1 0.3569 0.7195 0.804 0.000 0.000 0.196
#> GSM149152 4 0.3764 0.6718 0.216 0.000 0.000 0.784
#> GSM149153 3 0.5746 0.6446 0.256 0.044 0.688 0.012
#> GSM149154 4 0.7796 -0.0753 0.360 0.000 0.248 0.392
#> GSM149155 2 0.2011 0.8369 0.080 0.920 0.000 0.000
#> GSM149156 2 0.2647 0.8253 0.120 0.880 0.000 0.000
#> GSM149157 2 0.4992 0.2114 0.476 0.524 0.000 0.000
#> GSM149158 1 0.4877 0.1734 0.592 0.408 0.000 0.000
#> GSM149159 2 0.2530 0.8413 0.100 0.896 0.004 0.000
#> GSM149160 1 0.4624 0.3572 0.660 0.340 0.000 0.000
#> GSM149161 2 0.5132 0.3104 0.448 0.548 0.000 0.004
#> GSM149162 2 0.2408 0.8354 0.104 0.896 0.000 0.000
#> GSM149163 2 0.2281 0.8330 0.096 0.904 0.000 0.000
#> GSM149164 1 0.6547 0.5733 0.700 0.168 0.072 0.060
#> GSM149165 2 0.1191 0.8466 0.024 0.968 0.004 0.004
#> GSM149166 2 0.4571 0.7023 0.252 0.736 0.008 0.004
#> GSM149167 1 0.4776 0.5001 0.712 0.272 0.000 0.016
#> GSM149168 2 0.3384 0.8208 0.116 0.860 0.024 0.000
#> GSM149169 1 0.3528 0.6044 0.808 0.192 0.000 0.000
#> GSM149170 2 0.3216 0.8106 0.076 0.880 0.044 0.000
#> GSM149171 3 0.6633 0.2165 0.084 0.416 0.500 0.000
#> GSM149172 3 0.7768 0.5612 0.092 0.232 0.592 0.084
#> GSM149173 2 0.5479 0.6917 0.088 0.748 0.156 0.008
#> GSM149174 1 0.4679 0.3378 0.648 0.352 0.000 0.000
#> GSM149175 3 0.5947 0.4795 0.060 0.000 0.628 0.312
#> GSM149176 2 0.2944 0.8189 0.128 0.868 0.004 0.000
#> GSM149177 3 0.6965 0.6367 0.084 0.192 0.664 0.060
#> GSM149178 3 0.5495 0.7028 0.096 0.176 0.728 0.000
#> GSM149179 2 0.1211 0.8469 0.040 0.960 0.000 0.000
#> GSM149180 2 0.1792 0.8447 0.068 0.932 0.000 0.000
#> GSM149181 2 0.1557 0.8349 0.056 0.944 0.000 0.000
#> GSM149182 2 0.1211 0.8467 0.040 0.960 0.000 0.000
#> GSM149183 2 0.1118 0.8485 0.036 0.964 0.000 0.000
#> GSM149184 2 0.3558 0.8138 0.052 0.880 0.044 0.024
#> GSM149185 2 0.2081 0.8272 0.084 0.916 0.000 0.000
#> GSM149186 2 0.1022 0.8484 0.032 0.968 0.000 0.000
#> GSM149187 2 0.2216 0.8388 0.092 0.908 0.000 0.000
#> GSM149188 2 0.1118 0.8490 0.036 0.964 0.000 0.000
#> GSM149189 3 0.4793 0.7171 0.040 0.204 0.756 0.000
#> GSM149190 2 0.4843 0.4530 0.396 0.604 0.000 0.000
#> GSM149191 2 0.6445 0.5833 0.304 0.600 0.096 0.000
#> GSM149192 2 0.1637 0.8505 0.060 0.940 0.000 0.000
#> GSM149193 2 0.0921 0.8434 0.028 0.972 0.000 0.000
#> GSM149194 1 0.4907 0.1304 0.580 0.420 0.000 0.000
#> GSM149195 3 0.1209 0.8651 0.032 0.004 0.964 0.000
#> GSM149196 2 0.1489 0.8411 0.044 0.952 0.000 0.004
#> GSM149197 2 0.2589 0.8248 0.116 0.884 0.000 0.000
#> GSM149198 1 0.4632 0.6619 0.740 0.004 0.012 0.244
#> GSM149199 2 0.2868 0.8121 0.136 0.864 0.000 0.000
#> GSM149200 2 0.3051 0.8136 0.088 0.884 0.028 0.000
#> GSM149201 2 0.1302 0.8455 0.044 0.956 0.000 0.000
#> GSM149202 2 0.2149 0.8246 0.088 0.912 0.000 0.000
#> GSM149203 2 0.8928 0.1409 0.156 0.428 0.324 0.092
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.0727 0.8429 0.004 0.004 0.980 0.000 0.012
#> GSM149104 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.0486 0.8469 0.004 0.004 0.988 0.000 0.004
#> GSM149107 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 0.8525 0.000 0.000 1.000 0.000 0.000
#> GSM149115 4 0.4064 0.6385 0.272 0.004 0.000 0.716 0.008
#> GSM149116 4 0.0162 0.8775 0.004 0.000 0.000 0.996 0.000
#> GSM149117 4 0.6920 0.4332 0.240 0.124 0.000 0.564 0.072
#> GSM149118 4 0.0000 0.8787 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.8787 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0162 0.8783 0.000 0.000 0.000 0.996 0.004
#> GSM149121 4 0.3474 0.7348 0.192 0.004 0.000 0.796 0.008
#> GSM149122 4 0.0162 0.8783 0.000 0.000 0.000 0.996 0.004
#> GSM149123 4 0.0162 0.8789 0.004 0.000 0.000 0.996 0.000
#> GSM149124 4 0.0451 0.8761 0.000 0.004 0.000 0.988 0.008
#> GSM149125 4 0.0162 0.8783 0.000 0.000 0.000 0.996 0.004
#> GSM149126 4 0.0162 0.8789 0.004 0.000 0.000 0.996 0.000
#> GSM149127 4 0.0000 0.8787 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0162 0.8789 0.004 0.000 0.000 0.996 0.000
#> GSM149129 4 0.0162 0.8789 0.004 0.000 0.000 0.996 0.000
#> GSM149130 4 0.4776 0.5805 0.296 0.008 0.000 0.668 0.028
#> GSM149131 4 0.4654 0.4803 0.348 0.008 0.000 0.632 0.012
#> GSM149132 4 0.0162 0.8789 0.004 0.000 0.000 0.996 0.000
#> GSM149133 4 0.1124 0.8628 0.036 0.000 0.000 0.960 0.004
#> GSM149134 1 0.3848 0.6972 0.788 0.000 0.000 0.172 0.040
#> GSM149135 1 0.1478 0.8109 0.936 0.000 0.000 0.064 0.000
#> GSM149136 1 0.1430 0.8132 0.944 0.004 0.000 0.052 0.000
#> GSM149137 1 0.2720 0.7895 0.880 0.004 0.000 0.096 0.020
#> GSM149138 1 0.2157 0.8074 0.920 0.004 0.000 0.040 0.036
#> GSM149139 1 0.2136 0.7986 0.904 0.000 0.000 0.088 0.008
#> GSM149140 1 0.1270 0.8132 0.948 0.000 0.000 0.052 0.000
#> GSM149141 3 0.8617 0.0664 0.256 0.024 0.344 0.096 0.280
#> GSM149142 1 0.5154 0.2465 0.580 0.372 0.000 0.000 0.048
#> GSM149143 1 0.8532 0.4632 0.504 0.136 0.136 0.088 0.136
#> GSM149144 2 0.3966 0.5289 0.132 0.796 0.000 0.000 0.072
#> GSM149145 3 0.7156 0.4447 0.168 0.028 0.544 0.020 0.240
#> GSM149146 2 0.3928 0.3675 0.004 0.700 0.000 0.000 0.296
#> GSM149147 1 0.1764 0.8090 0.940 0.012 0.000 0.036 0.012
#> GSM149148 1 0.1270 0.8132 0.948 0.000 0.000 0.052 0.000
#> GSM149149 1 0.1410 0.8114 0.940 0.000 0.000 0.060 0.000
#> GSM149150 5 0.6576 0.1526 0.184 0.352 0.000 0.004 0.460
#> GSM149151 1 0.1756 0.8090 0.940 0.008 0.000 0.036 0.016
#> GSM149152 4 0.5268 0.2303 0.416 0.004 0.012 0.548 0.020
#> GSM149153 3 0.7811 0.2824 0.240 0.052 0.444 0.012 0.252
#> GSM149154 1 0.7980 0.3555 0.456 0.008 0.216 0.228 0.092
#> GSM149155 2 0.2389 0.5127 0.004 0.880 0.000 0.000 0.116
#> GSM149156 2 0.3064 0.5236 0.036 0.856 0.000 0.000 0.108
#> GSM149157 2 0.5477 0.3883 0.132 0.648 0.000 0.000 0.220
#> GSM149158 2 0.5137 0.4485 0.228 0.676 0.000 0.000 0.096
#> GSM149159 5 0.4781 0.1669 0.020 0.428 0.000 0.000 0.552
#> GSM149160 2 0.6008 0.3612 0.292 0.560 0.000 0.000 0.148
#> GSM149161 2 0.4298 0.4933 0.184 0.756 0.000 0.000 0.060
#> GSM149162 2 0.2707 0.5354 0.024 0.876 0.000 0.000 0.100
#> GSM149163 2 0.1952 0.5273 0.004 0.912 0.000 0.000 0.084
#> GSM149164 1 0.8503 -0.0322 0.308 0.304 0.084 0.020 0.284
#> GSM149165 2 0.4583 -0.0135 0.004 0.528 0.004 0.000 0.464
#> GSM149166 2 0.5002 0.4783 0.132 0.720 0.004 0.000 0.144
#> GSM149167 2 0.6104 0.3715 0.304 0.564 0.000 0.008 0.124
#> GSM149168 5 0.4486 0.5121 0.020 0.228 0.020 0.000 0.732
#> GSM149169 2 0.5635 0.1293 0.428 0.496 0.000 0.000 0.076
#> GSM149170 5 0.4100 0.5632 0.016 0.172 0.028 0.000 0.784
#> GSM149171 5 0.4537 0.5296 0.012 0.060 0.168 0.000 0.760
#> GSM149172 5 0.7216 0.3086 0.044 0.040 0.296 0.080 0.540
#> GSM149173 5 0.4426 0.5657 0.008 0.124 0.080 0.004 0.784
#> GSM149174 2 0.5164 0.4413 0.256 0.660 0.000 0.000 0.084
#> GSM149175 3 0.7735 0.2874 0.096 0.000 0.448 0.284 0.172
#> GSM149176 2 0.5620 0.1629 0.060 0.548 0.008 0.000 0.384
#> GSM149177 3 0.7981 0.2614 0.104 0.192 0.504 0.020 0.180
#> GSM149178 5 0.7130 0.0547 0.040 0.096 0.420 0.016 0.428
#> GSM149179 2 0.4696 0.0849 0.016 0.556 0.000 0.000 0.428
#> GSM149180 5 0.4974 0.1321 0.028 0.464 0.000 0.000 0.508
#> GSM149181 5 0.4015 0.4103 0.000 0.348 0.000 0.000 0.652
#> GSM149182 2 0.4206 0.3531 0.016 0.696 0.000 0.000 0.288
#> GSM149183 2 0.4015 0.2997 0.000 0.652 0.000 0.000 0.348
#> GSM149184 5 0.5137 0.2408 0.020 0.400 0.004 0.008 0.568
#> GSM149185 5 0.3885 0.5123 0.008 0.268 0.000 0.000 0.724
#> GSM149186 2 0.4287 -0.0276 0.000 0.540 0.000 0.000 0.460
#> GSM149187 2 0.3496 0.4734 0.012 0.788 0.000 0.000 0.200
#> GSM149188 2 0.4264 0.2081 0.004 0.620 0.000 0.000 0.376
#> GSM149189 3 0.5335 0.1997 0.004 0.044 0.536 0.000 0.416
#> GSM149190 2 0.4190 0.5162 0.172 0.768 0.000 0.000 0.060
#> GSM149191 5 0.6810 0.1317 0.080 0.368 0.064 0.000 0.488
#> GSM149192 2 0.4251 0.2610 0.004 0.624 0.000 0.000 0.372
#> GSM149193 2 0.4302 -0.1026 0.000 0.520 0.000 0.000 0.480
#> GSM149194 2 0.6158 0.3359 0.316 0.528 0.000 0.000 0.156
#> GSM149195 3 0.1732 0.8036 0.000 0.000 0.920 0.000 0.080
#> GSM149196 5 0.4211 0.3791 0.004 0.360 0.000 0.000 0.636
#> GSM149197 2 0.3134 0.5368 0.032 0.848 0.000 0.000 0.120
#> GSM149198 1 0.4961 0.7021 0.748 0.008 0.008 0.112 0.124
#> GSM149199 2 0.2782 0.5443 0.048 0.880 0.000 0.000 0.072
#> GSM149200 5 0.3293 0.5636 0.008 0.160 0.008 0.000 0.824
#> GSM149201 2 0.3636 0.3868 0.000 0.728 0.000 0.000 0.272
#> GSM149202 5 0.3462 0.5530 0.012 0.196 0.000 0.000 0.792
#> GSM149203 5 0.7844 0.4286 0.032 0.152 0.208 0.080 0.528
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0146 0.86982 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149100 3 0.0000 0.86993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0146 0.86999 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149102 3 0.0146 0.86978 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149103 3 0.1528 0.84389 0.000 0.000 0.936 0.000 0.016 0.048
#> GSM149104 3 0.0146 0.86984 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149105 3 0.0291 0.86951 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM149106 3 0.1826 0.83635 0.000 0.004 0.924 0.000 0.020 0.052
#> GSM149107 3 0.0405 0.86885 0.000 0.000 0.988 0.000 0.004 0.008
#> GSM149108 3 0.0405 0.86885 0.000 0.000 0.988 0.000 0.008 0.004
#> GSM149109 3 0.0000 0.86993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0146 0.86982 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149111 3 0.0146 0.86988 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149112 3 0.0291 0.86954 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM149113 3 0.0508 0.86837 0.000 0.000 0.984 0.000 0.004 0.012
#> GSM149114 3 0.0725 0.86606 0.000 0.000 0.976 0.000 0.012 0.012
#> GSM149115 4 0.4394 0.43681 0.364 0.000 0.000 0.608 0.008 0.020
#> GSM149116 4 0.0603 0.84376 0.000 0.000 0.000 0.980 0.004 0.016
#> GSM149117 4 0.8259 0.02987 0.292 0.172 0.004 0.352 0.068 0.112
#> GSM149118 4 0.0405 0.84534 0.004 0.000 0.000 0.988 0.000 0.008
#> GSM149119 4 0.0000 0.84643 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0520 0.84494 0.000 0.000 0.000 0.984 0.008 0.008
#> GSM149121 4 0.3976 0.64391 0.220 0.000 0.000 0.740 0.020 0.020
#> GSM149122 4 0.0146 0.84678 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149123 4 0.0291 0.84634 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM149124 4 0.0458 0.84451 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM149125 4 0.0291 0.84576 0.000 0.000 0.000 0.992 0.004 0.004
#> GSM149126 4 0.0146 0.84678 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149127 4 0.0146 0.84678 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149128 4 0.0405 0.84654 0.000 0.000 0.000 0.988 0.008 0.004
#> GSM149129 4 0.0146 0.84678 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149130 4 0.5658 0.32519 0.360 0.004 0.000 0.536 0.028 0.072
#> GSM149131 4 0.4379 0.35537 0.400 0.000 0.000 0.576 0.004 0.020
#> GSM149132 4 0.0146 0.84678 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149133 4 0.1148 0.83631 0.020 0.000 0.000 0.960 0.004 0.016
#> GSM149134 1 0.4393 0.69550 0.772 0.000 0.000 0.076 0.072 0.080
#> GSM149135 1 0.1245 0.78253 0.952 0.000 0.000 0.032 0.000 0.016
#> GSM149136 1 0.0976 0.78248 0.968 0.008 0.000 0.016 0.000 0.008
#> GSM149137 1 0.2792 0.76503 0.880 0.004 0.000 0.048 0.016 0.052
#> GSM149138 1 0.2775 0.75291 0.880 0.008 0.000 0.008 0.052 0.052
#> GSM149139 1 0.1773 0.78286 0.932 0.000 0.000 0.036 0.016 0.016
#> GSM149140 1 0.1232 0.78131 0.956 0.004 0.000 0.016 0.000 0.024
#> GSM149141 6 0.8849 -0.10522 0.180 0.036 0.228 0.036 0.256 0.264
#> GSM149142 1 0.6150 -0.05498 0.504 0.204 0.000 0.000 0.020 0.272
#> GSM149143 1 0.8341 -0.00158 0.356 0.032 0.072 0.096 0.104 0.340
#> GSM149144 2 0.5052 0.35078 0.136 0.692 0.000 0.000 0.028 0.144
#> GSM149145 3 0.8030 0.02762 0.092 0.032 0.380 0.016 0.192 0.288
#> GSM149146 2 0.4053 0.52512 0.004 0.764 0.000 0.000 0.128 0.104
#> GSM149147 1 0.1881 0.76988 0.924 0.004 0.000 0.016 0.004 0.052
#> GSM149148 1 0.1478 0.78287 0.944 0.000 0.000 0.020 0.004 0.032
#> GSM149149 1 0.1599 0.78390 0.940 0.000 0.000 0.028 0.008 0.024
#> GSM149150 2 0.7585 -0.06645 0.172 0.320 0.000 0.000 0.288 0.220
#> GSM149151 1 0.2220 0.77748 0.908 0.004 0.000 0.016 0.012 0.060
#> GSM149152 4 0.6419 0.07331 0.404 0.008 0.004 0.448 0.056 0.080
#> GSM149153 6 0.8391 -0.06732 0.196 0.040 0.276 0.004 0.196 0.288
#> GSM149154 1 0.8419 0.23393 0.388 0.008 0.152 0.236 0.084 0.132
#> GSM149155 2 0.1789 0.57354 0.000 0.924 0.000 0.000 0.032 0.044
#> GSM149156 2 0.5185 0.15522 0.008 0.568 0.000 0.000 0.080 0.344
#> GSM149157 6 0.6378 0.37921 0.072 0.324 0.000 0.000 0.108 0.496
#> GSM149158 6 0.5762 0.31482 0.148 0.424 0.000 0.000 0.004 0.424
#> GSM149159 5 0.6270 0.11407 0.008 0.276 0.000 0.000 0.404 0.312
#> GSM149160 6 0.6444 0.42385 0.112 0.304 0.000 0.000 0.080 0.504
#> GSM149161 2 0.5769 -0.24671 0.088 0.472 0.000 0.000 0.028 0.412
#> GSM149162 2 0.2800 0.54165 0.004 0.860 0.000 0.000 0.036 0.100
#> GSM149163 2 0.1900 0.54877 0.008 0.916 0.000 0.000 0.008 0.068
#> GSM149164 6 0.8006 0.29981 0.172 0.108 0.040 0.024 0.192 0.464
#> GSM149165 2 0.5491 0.11820 0.004 0.532 0.008 0.000 0.364 0.092
#> GSM149166 2 0.5590 0.40839 0.104 0.660 0.000 0.000 0.080 0.156
#> GSM149167 6 0.7042 0.37065 0.200 0.348 0.000 0.004 0.068 0.380
#> GSM149168 5 0.5675 0.43076 0.004 0.188 0.004 0.000 0.572 0.232
#> GSM149169 6 0.6468 0.44013 0.252 0.292 0.000 0.000 0.024 0.432
#> GSM149170 5 0.4818 0.52583 0.008 0.160 0.024 0.000 0.724 0.084
#> GSM149171 5 0.4928 0.53599 0.004 0.080 0.112 0.004 0.740 0.060
#> GSM149172 5 0.7809 0.27810 0.040 0.044 0.244 0.040 0.460 0.172
#> GSM149173 5 0.4982 0.51670 0.008 0.152 0.048 0.004 0.728 0.060
#> GSM149174 6 0.6172 0.36169 0.164 0.396 0.000 0.000 0.020 0.420
#> GSM149175 3 0.8736 -0.08700 0.120 0.000 0.284 0.244 0.156 0.196
#> GSM149176 2 0.6196 0.35190 0.064 0.576 0.000 0.000 0.168 0.192
#> GSM149177 3 0.8877 -0.09959 0.092 0.144 0.356 0.036 0.124 0.248
#> GSM149178 5 0.8093 0.25905 0.036 0.168 0.308 0.004 0.340 0.144
#> GSM149179 2 0.5103 0.38549 0.012 0.644 0.000 0.000 0.240 0.104
#> GSM149180 2 0.5569 0.16803 0.020 0.540 0.000 0.000 0.348 0.092
#> GSM149181 5 0.4827 0.26392 0.004 0.376 0.000 0.000 0.568 0.052
#> GSM149182 2 0.3718 0.50102 0.004 0.780 0.000 0.000 0.164 0.052
#> GSM149183 2 0.3992 0.50897 0.000 0.748 0.000 0.000 0.180 0.072
#> GSM149184 5 0.6772 0.16390 0.044 0.356 0.008 0.008 0.448 0.136
#> GSM149185 5 0.5147 0.46127 0.004 0.236 0.000 0.000 0.628 0.132
#> GSM149186 2 0.5233 0.25465 0.000 0.556 0.000 0.000 0.332 0.112
#> GSM149187 2 0.4742 0.47778 0.004 0.688 0.000 0.000 0.124 0.184
#> GSM149188 2 0.3738 0.49325 0.000 0.752 0.000 0.000 0.208 0.040
#> GSM149189 5 0.6689 0.20356 0.004 0.100 0.400 0.000 0.408 0.088
#> GSM149190 2 0.6227 -0.00162 0.140 0.528 0.000 0.000 0.048 0.284
#> GSM149191 6 0.6689 0.10515 0.028 0.124 0.036 0.000 0.336 0.476
#> GSM149192 2 0.5516 0.38461 0.004 0.572 0.000 0.000 0.260 0.164
#> GSM149193 2 0.4458 0.25471 0.000 0.608 0.000 0.000 0.352 0.040
#> GSM149194 6 0.6689 0.44780 0.156 0.228 0.000 0.000 0.100 0.516
#> GSM149195 3 0.4312 0.63489 0.012 0.004 0.744 0.000 0.180 0.060
#> GSM149196 5 0.5721 0.15034 0.012 0.408 0.000 0.000 0.464 0.116
#> GSM149197 2 0.4509 0.33417 0.020 0.684 0.000 0.000 0.036 0.260
#> GSM149198 1 0.6591 0.48268 0.564 0.004 0.008 0.068 0.176 0.180
#> GSM149199 2 0.4680 0.39125 0.044 0.712 0.000 0.000 0.044 0.200
#> GSM149200 5 0.4731 0.51869 0.008 0.184 0.020 0.000 0.720 0.068
#> GSM149201 2 0.2988 0.55319 0.000 0.828 0.000 0.000 0.144 0.028
#> GSM149202 5 0.4881 0.44798 0.004 0.268 0.000 0.000 0.640 0.088
#> GSM149203 5 0.8296 0.33871 0.020 0.108 0.176 0.072 0.440 0.184
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:skmeans 88 8.13e-12 2
#> CV:skmeans 103 1.00e-22 3
#> CV:skmeans 93 1.13e-27 4
#> CV:skmeans 61 1.57e-24 5
#> CV:skmeans 54 1.71e-23 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "pam"]
# you can also extract it by
# res = res_list["CV:pam"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.353 0.765 0.836 0.4359 0.529 0.529
#> 3 3 0.653 0.804 0.905 0.3655 0.850 0.718
#> 4 4 0.638 0.436 0.759 0.1957 0.791 0.546
#> 5 5 0.860 0.854 0.931 0.1114 0.809 0.477
#> 6 6 0.841 0.778 0.894 0.0241 0.978 0.897
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 2 0.8813 0.6653 0.300 0.700
#> GSM149100 2 0.7528 0.7247 0.216 0.784
#> GSM149101 2 0.7883 0.7197 0.236 0.764
#> GSM149102 2 0.7602 0.7232 0.220 0.780
#> GSM149103 2 0.6801 0.7485 0.180 0.820
#> GSM149104 2 0.7674 0.7213 0.224 0.776
#> GSM149105 2 0.8327 0.6970 0.264 0.736
#> GSM149106 1 0.8207 0.3278 0.744 0.256
#> GSM149107 2 0.7602 0.7244 0.220 0.780
#> GSM149108 2 0.8499 0.6879 0.276 0.724
#> GSM149109 2 0.8499 0.6881 0.276 0.724
#> GSM149110 2 0.7528 0.7247 0.216 0.784
#> GSM149111 2 0.7602 0.7232 0.220 0.780
#> GSM149112 2 0.8661 0.6880 0.288 0.712
#> GSM149113 2 0.9087 0.6493 0.324 0.676
#> GSM149114 2 0.8081 0.7161 0.248 0.752
#> GSM149115 1 0.7528 0.9040 0.784 0.216
#> GSM149116 1 0.8327 0.8681 0.736 0.264
#> GSM149117 2 0.9552 -0.0568 0.376 0.624
#> GSM149118 1 0.7528 0.9040 0.784 0.216
#> GSM149119 1 0.7528 0.8974 0.784 0.216
#> GSM149120 1 0.7139 0.8901 0.804 0.196
#> GSM149121 1 0.7528 0.9040 0.784 0.216
#> GSM149122 1 0.3584 0.7390 0.932 0.068
#> GSM149123 1 0.7528 0.9040 0.784 0.216
#> GSM149124 1 0.8144 0.8806 0.748 0.252
#> GSM149125 1 0.7528 0.9040 0.784 0.216
#> GSM149126 1 0.7453 0.9023 0.788 0.212
#> GSM149127 1 0.7528 0.9040 0.784 0.216
#> GSM149128 1 0.7453 0.9023 0.788 0.212
#> GSM149129 1 0.7376 0.8996 0.792 0.208
#> GSM149130 1 0.7528 0.9040 0.784 0.216
#> GSM149131 1 0.7528 0.9040 0.784 0.216
#> GSM149132 1 0.7453 0.9023 0.788 0.212
#> GSM149133 1 0.7453 0.9024 0.788 0.212
#> GSM149134 1 0.9044 0.8679 0.680 0.320
#> GSM149135 1 0.8661 0.8890 0.712 0.288
#> GSM149136 1 0.9000 0.8713 0.684 0.316
#> GSM149137 1 0.8909 0.8774 0.692 0.308
#> GSM149138 1 0.9815 0.7223 0.580 0.420
#> GSM149139 1 0.7528 0.9040 0.784 0.216
#> GSM149140 1 0.8713 0.8869 0.708 0.292
#> GSM149141 2 0.7376 0.5483 0.208 0.792
#> GSM149142 1 0.9044 0.8679 0.680 0.320
#> GSM149143 1 0.9044 0.8687 0.680 0.320
#> GSM149144 1 0.9866 0.6978 0.568 0.432
#> GSM149145 2 0.1843 0.8343 0.028 0.972
#> GSM149146 2 0.0000 0.8436 0.000 1.000
#> GSM149147 1 0.8555 0.8920 0.720 0.280
#> GSM149148 1 0.8144 0.9001 0.748 0.252
#> GSM149149 1 0.7602 0.9042 0.780 0.220
#> GSM149150 2 0.0000 0.8436 0.000 1.000
#> GSM149151 1 0.9044 0.8679 0.680 0.320
#> GSM149152 1 0.7602 0.9042 0.780 0.220
#> GSM149153 2 0.0000 0.8436 0.000 1.000
#> GSM149154 1 0.8861 0.8799 0.696 0.304
#> GSM149155 2 0.0000 0.8436 0.000 1.000
#> GSM149156 2 0.2603 0.8050 0.044 0.956
#> GSM149157 2 0.0000 0.8436 0.000 1.000
#> GSM149158 1 0.9087 0.8639 0.676 0.324
#> GSM149159 2 0.0000 0.8436 0.000 1.000
#> GSM149160 2 0.2603 0.8047 0.044 0.956
#> GSM149161 2 0.6438 0.6372 0.164 0.836
#> GSM149162 2 0.0000 0.8436 0.000 1.000
#> GSM149163 2 0.0938 0.8345 0.012 0.988
#> GSM149164 2 0.0000 0.8436 0.000 1.000
#> GSM149165 2 0.0000 0.8436 0.000 1.000
#> GSM149166 2 0.9491 -0.0141 0.368 0.632
#> GSM149167 2 0.9933 -0.3798 0.452 0.548
#> GSM149168 2 0.0000 0.8436 0.000 1.000
#> GSM149169 1 0.9833 0.7108 0.576 0.424
#> GSM149170 2 0.0000 0.8436 0.000 1.000
#> GSM149171 2 0.0000 0.8436 0.000 1.000
#> GSM149172 2 0.0376 0.8421 0.004 0.996
#> GSM149173 2 0.0000 0.8436 0.000 1.000
#> GSM149174 1 0.9044 0.8679 0.680 0.320
#> GSM149175 2 0.6712 0.6549 0.176 0.824
#> GSM149176 2 0.0000 0.8436 0.000 1.000
#> GSM149177 2 0.7883 0.4731 0.236 0.764
#> GSM149178 2 0.1184 0.8372 0.016 0.984
#> GSM149179 2 0.0000 0.8436 0.000 1.000
#> GSM149180 2 0.0000 0.8436 0.000 1.000
#> GSM149181 2 0.0000 0.8436 0.000 1.000
#> GSM149182 2 0.0000 0.8436 0.000 1.000
#> GSM149183 2 0.0376 0.8407 0.004 0.996
#> GSM149184 2 0.0000 0.8436 0.000 1.000
#> GSM149185 2 0.0000 0.8436 0.000 1.000
#> GSM149186 2 0.0000 0.8436 0.000 1.000
#> GSM149187 2 0.0000 0.8436 0.000 1.000
#> GSM149188 2 0.0000 0.8436 0.000 1.000
#> GSM149189 2 0.6712 0.7509 0.176 0.824
#> GSM149190 1 0.9608 0.7839 0.616 0.384
#> GSM149191 2 0.0000 0.8436 0.000 1.000
#> GSM149192 2 0.0000 0.8436 0.000 1.000
#> GSM149193 2 0.0000 0.8436 0.000 1.000
#> GSM149194 2 0.9044 0.2001 0.320 0.680
#> GSM149195 2 0.7528 0.7247 0.216 0.784
#> GSM149196 2 0.0000 0.8436 0.000 1.000
#> GSM149197 2 0.9000 0.2069 0.316 0.684
#> GSM149198 2 0.0376 0.8408 0.004 0.996
#> GSM149199 2 0.9754 -0.2135 0.408 0.592
#> GSM149200 2 0.0000 0.8436 0.000 1.000
#> GSM149201 2 0.0000 0.8436 0.000 1.000
#> GSM149202 2 0.0000 0.8436 0.000 1.000
#> GSM149203 2 0.0000 0.8436 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149103 3 0.1411 0.9499 0.000 0.036 0.964
#> GSM149104 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9968 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149116 1 0.3434 0.7492 0.904 0.064 0.032
#> GSM149117 2 0.6008 0.2612 0.372 0.628 0.000
#> GSM149118 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149119 1 0.0592 0.7904 0.988 0.012 0.000
#> GSM149120 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149121 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149122 1 0.1860 0.7560 0.948 0.000 0.052
#> GSM149123 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149124 1 0.1529 0.7853 0.960 0.040 0.000
#> GSM149125 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149126 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149127 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149128 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149130 1 0.4399 0.8028 0.812 0.188 0.000
#> GSM149131 1 0.2261 0.8101 0.932 0.068 0.000
#> GSM149132 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149133 1 0.0000 0.7908 1.000 0.000 0.000
#> GSM149134 1 0.5397 0.7543 0.720 0.280 0.000
#> GSM149135 1 0.4887 0.7905 0.772 0.228 0.000
#> GSM149136 1 0.5431 0.7505 0.716 0.284 0.000
#> GSM149137 1 0.5397 0.7543 0.720 0.280 0.000
#> GSM149138 1 0.6111 0.5679 0.604 0.396 0.000
#> GSM149139 1 0.2711 0.8132 0.912 0.088 0.000
#> GSM149140 1 0.4702 0.7972 0.788 0.212 0.000
#> GSM149141 2 0.4702 0.6552 0.212 0.788 0.000
#> GSM149142 1 0.5497 0.7424 0.708 0.292 0.000
#> GSM149143 1 0.5465 0.7471 0.712 0.288 0.000
#> GSM149144 1 0.6168 0.5329 0.588 0.412 0.000
#> GSM149145 2 0.2651 0.8509 0.012 0.928 0.060
#> GSM149146 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149147 1 0.4931 0.7893 0.768 0.232 0.000
#> GSM149148 1 0.5098 0.7790 0.752 0.248 0.000
#> GSM149149 1 0.4702 0.7968 0.788 0.212 0.000
#> GSM149150 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149151 1 0.5465 0.7462 0.712 0.288 0.000
#> GSM149152 1 0.4504 0.8023 0.804 0.196 0.000
#> GSM149153 2 0.0661 0.8937 0.004 0.988 0.008
#> GSM149154 1 0.5058 0.7796 0.756 0.244 0.000
#> GSM149155 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149156 2 0.1643 0.8677 0.044 0.956 0.000
#> GSM149157 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149158 1 0.5529 0.7375 0.704 0.296 0.000
#> GSM149159 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149160 2 0.1643 0.8677 0.044 0.956 0.000
#> GSM149161 2 0.4235 0.7125 0.176 0.824 0.000
#> GSM149162 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149163 2 0.0592 0.8927 0.012 0.988 0.000
#> GSM149164 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149165 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149166 2 0.6008 0.2498 0.372 0.628 0.000
#> GSM149167 2 0.6305 -0.2317 0.484 0.516 0.000
#> GSM149168 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149169 1 0.6140 0.5484 0.596 0.404 0.000
#> GSM149170 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149171 2 0.0424 0.8954 0.000 0.992 0.008
#> GSM149172 2 0.0747 0.8887 0.000 0.984 0.016
#> GSM149173 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149174 1 0.5497 0.7424 0.708 0.292 0.000
#> GSM149175 2 0.4808 0.7190 0.188 0.804 0.008
#> GSM149176 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149177 2 0.5058 0.5928 0.244 0.756 0.000
#> GSM149178 2 0.1753 0.8621 0.000 0.952 0.048
#> GSM149179 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149183 2 0.0237 0.8977 0.004 0.996 0.000
#> GSM149184 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149189 2 0.5497 0.5532 0.000 0.708 0.292
#> GSM149190 1 0.5926 0.6470 0.644 0.356 0.000
#> GSM149191 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149194 2 0.5785 0.3753 0.332 0.668 0.000
#> GSM149195 2 0.5254 0.5748 0.000 0.736 0.264
#> GSM149196 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149197 2 0.5785 0.3701 0.332 0.668 0.000
#> GSM149198 2 0.0424 0.8958 0.008 0.992 0.000
#> GSM149199 2 0.6244 -0.0512 0.440 0.560 0.000
#> GSM149200 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149201 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.8998 0.000 1.000 0.000
#> GSM149203 2 0.0000 0.8998 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149100 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149101 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149102 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149103 3 0.5404 0.7035 0.476 0.012 0.512 0.000
#> GSM149104 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149105 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149106 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149107 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149108 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149109 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149110 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149111 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149112 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149113 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149114 3 0.4994 0.7169 0.480 0.000 0.520 0.000
#> GSM149115 4 0.5000 0.1610 0.496 0.000 0.000 0.504
#> GSM149116 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149117 2 0.8675 0.0275 0.308 0.388 0.268 0.036
#> GSM149118 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149121 4 0.4331 0.5913 0.288 0.000 0.000 0.712
#> GSM149122 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149130 4 0.6417 0.5112 0.200 0.136 0.004 0.660
#> GSM149131 4 0.4387 0.6912 0.200 0.024 0.000 0.776
#> GSM149132 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0000 0.8808 0.000 0.000 0.000 1.000
#> GSM149134 1 0.7084 0.7084 0.520 0.340 0.140 0.000
#> GSM149135 1 0.4994 0.8301 0.520 0.480 0.000 0.000
#> GSM149136 1 0.4994 0.8301 0.520 0.480 0.000 0.000
#> GSM149137 1 0.5328 0.8321 0.520 0.472 0.004 0.004
#> GSM149138 1 0.6750 0.0564 0.472 0.092 0.436 0.000
#> GSM149139 1 0.5399 0.8310 0.520 0.468 0.000 0.012
#> GSM149140 1 0.4994 0.8301 0.520 0.480 0.000 0.000
#> GSM149141 3 0.7088 -0.5496 0.128 0.392 0.480 0.000
#> GSM149142 2 0.4961 -0.7502 0.448 0.552 0.000 0.000
#> GSM149143 1 0.6082 0.8222 0.520 0.444 0.024 0.012
#> GSM149144 2 0.5386 -0.5483 0.344 0.632 0.024 0.000
#> GSM149145 2 0.6271 0.5297 0.056 0.492 0.452 0.000
#> GSM149146 2 0.4948 0.5803 0.000 0.560 0.440 0.000
#> GSM149147 1 0.5161 0.8315 0.520 0.476 0.000 0.004
#> GSM149148 1 0.5161 0.8304 0.520 0.476 0.004 0.000
#> GSM149149 1 0.6620 0.7959 0.520 0.404 0.004 0.072
#> GSM149150 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149151 2 0.5155 -0.7805 0.468 0.528 0.004 0.000
#> GSM149152 1 0.6973 0.7696 0.516 0.376 0.004 0.104
#> GSM149153 2 0.5756 0.5822 0.032 0.568 0.400 0.000
#> GSM149154 1 0.7944 0.3177 0.520 0.028 0.276 0.176
#> GSM149155 2 0.0000 0.3516 0.000 1.000 0.000 0.000
#> GSM149156 2 0.3082 0.2651 0.084 0.884 0.032 0.000
#> GSM149157 2 0.0336 0.3427 0.008 0.992 0.000 0.000
#> GSM149158 2 0.4996 -0.8045 0.484 0.516 0.000 0.000
#> GSM149159 2 0.3688 0.5333 0.000 0.792 0.208 0.000
#> GSM149160 2 0.2654 0.1643 0.108 0.888 0.004 0.000
#> GSM149161 2 0.1118 0.2947 0.036 0.964 0.000 0.000
#> GSM149162 2 0.0000 0.3516 0.000 1.000 0.000 0.000
#> GSM149163 2 0.0469 0.3340 0.012 0.988 0.000 0.000
#> GSM149164 2 0.2737 0.4271 0.008 0.888 0.104 0.000
#> GSM149165 2 0.4992 0.5720 0.000 0.524 0.476 0.000
#> GSM149166 2 0.4220 -0.3123 0.248 0.748 0.004 0.000
#> GSM149167 2 0.4543 -0.4906 0.324 0.676 0.000 0.000
#> GSM149168 2 0.4730 0.5933 0.000 0.636 0.364 0.000
#> GSM149169 2 0.4898 -0.6931 0.416 0.584 0.000 0.000
#> GSM149170 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149171 2 0.4999 0.5604 0.000 0.508 0.492 0.000
#> GSM149172 2 0.4989 0.5736 0.000 0.528 0.472 0.000
#> GSM149173 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149174 2 0.4948 -0.7396 0.440 0.560 0.000 0.000
#> GSM149175 4 0.9319 -0.2185 0.084 0.272 0.316 0.328
#> GSM149176 2 0.3837 0.5289 0.000 0.776 0.224 0.000
#> GSM149177 2 0.7544 0.4346 0.196 0.452 0.352 0.000
#> GSM149178 3 0.5000 -0.5789 0.000 0.496 0.504 0.000
#> GSM149179 2 0.3400 0.5159 0.000 0.820 0.180 0.000
#> GSM149180 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149181 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149182 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149183 2 0.0188 0.3563 0.000 0.996 0.004 0.000
#> GSM149184 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149185 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149186 2 0.4961 0.5783 0.000 0.552 0.448 0.000
#> GSM149187 2 0.2469 0.4641 0.000 0.892 0.108 0.000
#> GSM149188 2 0.4730 0.5897 0.000 0.636 0.364 0.000
#> GSM149189 3 0.6091 -0.3661 0.060 0.344 0.596 0.000
#> GSM149190 2 0.4761 -0.6201 0.372 0.628 0.000 0.000
#> GSM149191 2 0.5155 0.5733 0.004 0.528 0.468 0.000
#> GSM149192 2 0.1867 0.4264 0.000 0.928 0.072 0.000
#> GSM149193 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149194 2 0.3123 0.0070 0.156 0.844 0.000 0.000
#> GSM149195 3 0.5387 -0.4701 0.016 0.400 0.584 0.000
#> GSM149196 2 0.4992 0.5725 0.000 0.524 0.476 0.000
#> GSM149197 2 0.3668 -0.1179 0.188 0.808 0.004 0.000
#> GSM149198 3 0.6214 -0.5787 0.052 0.472 0.476 0.000
#> GSM149199 2 0.3688 -0.1966 0.208 0.792 0.000 0.000
#> GSM149200 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149201 2 0.4992 0.5720 0.000 0.524 0.476 0.000
#> GSM149202 2 0.4994 0.5707 0.000 0.520 0.480 0.000
#> GSM149203 2 0.4830 0.5882 0.000 0.608 0.392 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149104 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149107 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.1121 0.922 0.956 0.000 0.000 0.044 0.000
#> GSM149116 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.4799 0.731 0.760 0.148 0.000 0.036 0.056
#> GSM149118 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.3684 0.627 0.280 0.000 0.000 0.720 0.000
#> GSM149122 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149130 4 0.4737 0.393 0.380 0.016 0.000 0.600 0.004
#> GSM149131 4 0.4084 0.535 0.328 0.000 0.000 0.668 0.004
#> GSM149132 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.3143 0.722 0.796 0.000 0.000 0.000 0.204
#> GSM149139 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149141 5 0.3480 0.631 0.248 0.000 0.000 0.000 0.752
#> GSM149142 2 0.3636 0.615 0.272 0.728 0.000 0.000 0.000
#> GSM149143 1 0.0404 0.952 0.988 0.012 0.000 0.000 0.000
#> GSM149144 2 0.0963 0.908 0.000 0.964 0.000 0.000 0.036
#> GSM149145 5 0.3870 0.798 0.060 0.020 0.092 0.000 0.828
#> GSM149146 5 0.2605 0.801 0.000 0.148 0.000 0.000 0.852
#> GSM149147 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149151 1 0.0162 0.958 0.996 0.000 0.000 0.000 0.004
#> GSM149152 1 0.0162 0.959 0.996 0.000 0.000 0.004 0.000
#> GSM149153 5 0.3409 0.797 0.052 0.112 0.000 0.000 0.836
#> GSM149154 1 0.0000 0.961 1.000 0.000 0.000 0.000 0.000
#> GSM149155 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149156 2 0.1544 0.879 0.000 0.932 0.000 0.000 0.068
#> GSM149157 2 0.0290 0.924 0.000 0.992 0.000 0.000 0.008
#> GSM149158 2 0.0290 0.923 0.008 0.992 0.000 0.000 0.000
#> GSM149159 5 0.4287 0.215 0.000 0.460 0.000 0.000 0.540
#> GSM149160 2 0.1469 0.902 0.016 0.948 0.000 0.000 0.036
#> GSM149161 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149162 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149163 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149164 2 0.4030 0.468 0.000 0.648 0.000 0.000 0.352
#> GSM149165 5 0.1544 0.846 0.000 0.068 0.000 0.000 0.932
#> GSM149166 2 0.0771 0.917 0.020 0.976 0.000 0.000 0.004
#> GSM149167 2 0.0404 0.922 0.012 0.988 0.000 0.000 0.000
#> GSM149168 5 0.3177 0.743 0.000 0.208 0.000 0.000 0.792
#> GSM149169 2 0.0290 0.923 0.008 0.992 0.000 0.000 0.000
#> GSM149170 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149171 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149172 5 0.0510 0.864 0.000 0.016 0.000 0.000 0.984
#> GSM149173 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149174 2 0.0162 0.924 0.004 0.996 0.000 0.000 0.000
#> GSM149175 5 0.5907 0.323 0.060 0.024 0.000 0.356 0.560
#> GSM149176 5 0.4201 0.350 0.000 0.408 0.000 0.000 0.592
#> GSM149177 5 0.6305 0.588 0.156 0.204 0.028 0.000 0.612
#> GSM149178 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149179 5 0.4304 0.163 0.000 0.484 0.000 0.000 0.516
#> GSM149180 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149181 5 0.0162 0.866 0.000 0.004 0.000 0.000 0.996
#> GSM149182 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149183 2 0.0510 0.920 0.000 0.984 0.000 0.000 0.016
#> GSM149184 5 0.0290 0.866 0.000 0.008 0.000 0.000 0.992
#> GSM149185 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149186 5 0.1965 0.834 0.000 0.096 0.000 0.000 0.904
#> GSM149187 2 0.3876 0.465 0.000 0.684 0.000 0.000 0.316
#> GSM149188 5 0.4161 0.460 0.000 0.392 0.000 0.000 0.608
#> GSM149189 5 0.3366 0.690 0.000 0.000 0.232 0.000 0.768
#> GSM149190 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149191 5 0.0794 0.860 0.000 0.028 0.000 0.000 0.972
#> GSM149192 2 0.3074 0.732 0.000 0.804 0.000 0.000 0.196
#> GSM149193 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149194 2 0.1597 0.893 0.048 0.940 0.000 0.000 0.012
#> GSM149195 5 0.0963 0.854 0.000 0.000 0.036 0.000 0.964
#> GSM149196 5 0.0162 0.866 0.000 0.004 0.000 0.000 0.996
#> GSM149197 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149198 5 0.0290 0.865 0.008 0.000 0.000 0.000 0.992
#> GSM149199 2 0.0000 0.924 0.000 1.000 0.000 0.000 0.000
#> GSM149200 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149201 5 0.1851 0.838 0.000 0.088 0.000 0.000 0.912
#> GSM149202 5 0.0000 0.866 0.000 0.000 0.000 0.000 1.000
#> GSM149203 5 0.3242 0.740 0.000 0.216 0.000 0.000 0.784
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.0146 0.9949 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149104 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0146 0.9952 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149107 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.9993 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.0713 0.9197 0.972 0.000 0.000 0.028 0.000 0.000
#> GSM149116 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.5510 0.3588 0.524 0.056 0.000 0.000 0.036 0.384
#> GSM149118 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.3758 0.5995 0.284 0.000 0.000 0.700 0.000 0.016
#> GSM149122 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.1863 0.8439 0.000 0.000 0.000 0.896 0.000 0.104
#> GSM149125 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 4 0.5153 0.3252 0.376 0.016 0.000 0.552 0.000 0.056
#> GSM149131 4 0.4181 0.5046 0.328 0.000 0.000 0.644 0.000 0.028
#> GSM149132 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0000 0.9138 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149134 1 0.0458 0.9331 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM149135 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.3168 0.6329 0.792 0.000 0.000 0.000 0.192 0.016
#> GSM149139 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 6 0.5558 0.6862 0.136 0.000 0.000 0.000 0.416 0.448
#> GSM149142 2 0.4142 0.5794 0.232 0.712 0.000 0.000 0.000 0.056
#> GSM149143 1 0.0777 0.9215 0.972 0.024 0.000 0.000 0.000 0.004
#> GSM149144 2 0.2968 0.8195 0.000 0.816 0.000 0.000 0.016 0.168
#> GSM149145 6 0.5753 0.7231 0.024 0.028 0.040 0.000 0.408 0.500
#> GSM149146 5 0.3612 0.6121 0.000 0.052 0.000 0.000 0.780 0.168
#> GSM149147 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.9402 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.1204 0.7218 0.000 0.000 0.000 0.000 0.944 0.056
#> GSM149151 1 0.1075 0.9013 0.952 0.000 0.000 0.000 0.000 0.048
#> GSM149152 1 0.0436 0.9360 0.988 0.004 0.000 0.004 0.000 0.004
#> GSM149153 6 0.5585 0.7033 0.012 0.100 0.000 0.000 0.404 0.484
#> GSM149154 1 0.0146 0.9389 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149155 2 0.2340 0.8301 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM149156 2 0.2088 0.8251 0.000 0.904 0.000 0.000 0.068 0.028
#> GSM149157 2 0.0291 0.8619 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM149158 2 0.0146 0.8612 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149159 5 0.4594 -0.0373 0.000 0.476 0.000 0.000 0.488 0.036
#> GSM149160 2 0.0837 0.8553 0.004 0.972 0.000 0.000 0.020 0.004
#> GSM149161 2 0.0713 0.8540 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM149162 2 0.2340 0.8296 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM149163 2 0.2491 0.8244 0.000 0.836 0.000 0.000 0.000 0.164
#> GSM149164 2 0.3620 0.4433 0.000 0.648 0.000 0.000 0.352 0.000
#> GSM149165 5 0.3381 0.6264 0.000 0.044 0.000 0.000 0.800 0.156
#> GSM149166 2 0.3253 0.8029 0.020 0.788 0.000 0.000 0.000 0.192
#> GSM149167 2 0.0260 0.8617 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149168 5 0.3978 0.5423 0.000 0.160 0.000 0.000 0.756 0.084
#> GSM149169 2 0.0291 0.8627 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM149170 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149171 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149172 5 0.1500 0.7369 0.000 0.012 0.000 0.000 0.936 0.052
#> GSM149173 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149174 2 0.0405 0.8624 0.004 0.988 0.000 0.000 0.000 0.008
#> GSM149175 6 0.6515 0.6674 0.036 0.008 0.000 0.168 0.296 0.492
#> GSM149176 5 0.5157 0.0591 0.000 0.360 0.000 0.000 0.544 0.096
#> GSM149177 5 0.6427 0.1463 0.144 0.116 0.012 0.000 0.600 0.128
#> GSM149178 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149179 5 0.5167 0.0110 0.000 0.412 0.000 0.000 0.500 0.088
#> GSM149180 5 0.0146 0.7452 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM149181 5 0.0790 0.7428 0.000 0.000 0.000 0.000 0.968 0.032
#> GSM149182 5 0.1501 0.7132 0.000 0.000 0.000 0.000 0.924 0.076
#> GSM149183 2 0.2848 0.8147 0.000 0.816 0.000 0.000 0.008 0.176
#> GSM149184 5 0.1398 0.7377 0.000 0.008 0.000 0.000 0.940 0.052
#> GSM149185 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149186 5 0.2263 0.7142 0.000 0.056 0.000 0.000 0.896 0.048
#> GSM149187 2 0.5463 0.2648 0.000 0.540 0.000 0.000 0.312 0.148
#> GSM149188 5 0.5296 0.2553 0.000 0.216 0.000 0.000 0.600 0.184
#> GSM149189 5 0.4680 0.2539 0.000 0.000 0.184 0.000 0.684 0.132
#> GSM149190 2 0.0547 0.8616 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM149191 5 0.1082 0.7324 0.000 0.040 0.000 0.000 0.956 0.004
#> GSM149192 2 0.3683 0.6515 0.000 0.768 0.000 0.000 0.184 0.048
#> GSM149193 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149194 2 0.1148 0.8514 0.016 0.960 0.000 0.000 0.004 0.020
#> GSM149195 5 0.0790 0.7224 0.000 0.000 0.032 0.000 0.968 0.000
#> GSM149196 5 0.1753 0.7142 0.000 0.004 0.000 0.000 0.912 0.084
#> GSM149197 2 0.0146 0.8612 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149198 5 0.0717 0.7349 0.008 0.000 0.000 0.000 0.976 0.016
#> GSM149199 2 0.1610 0.8528 0.000 0.916 0.000 0.000 0.000 0.084
#> GSM149200 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149201 5 0.3771 0.5651 0.000 0.056 0.000 0.000 0.764 0.180
#> GSM149202 5 0.0000 0.7459 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149203 5 0.3641 0.6096 0.000 0.140 0.000 0.000 0.788 0.072
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:pam 97 3.07e-11 2
#> CV:pam 99 7.59e-26 3
#> CV:pam 71 1.16e-26 4
#> CV:pam 97 1.14e-37 5
#> CV:pam 95 2.25e-37 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "mclust"]
# you can also extract it by
# res = res_list["CV:mclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.694 0.945 0.963 0.4397 0.572 0.572
#> 3 3 0.773 0.928 0.955 0.2990 0.832 0.712
#> 4 4 0.730 0.900 0.921 0.1249 0.929 0.836
#> 5 5 0.736 0.773 0.874 0.2068 0.821 0.532
#> 6 6 0.758 0.780 0.843 0.0593 0.930 0.692
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 2 0.6148 0.879 0.152 0.848
#> GSM149100 2 0.6148 0.879 0.152 0.848
#> GSM149101 2 0.6148 0.879 0.152 0.848
#> GSM149102 2 0.6148 0.879 0.152 0.848
#> GSM149103 2 0.5946 0.884 0.144 0.856
#> GSM149104 2 0.6148 0.879 0.152 0.848
#> GSM149105 2 0.6148 0.879 0.152 0.848
#> GSM149106 2 0.5842 0.887 0.140 0.860
#> GSM149107 2 0.6148 0.879 0.152 0.848
#> GSM149108 2 0.6148 0.879 0.152 0.848
#> GSM149109 2 0.6148 0.879 0.152 0.848
#> GSM149110 2 0.6148 0.879 0.152 0.848
#> GSM149111 2 0.6148 0.879 0.152 0.848
#> GSM149112 2 0.6148 0.879 0.152 0.848
#> GSM149113 2 0.6148 0.879 0.152 0.848
#> GSM149114 2 0.6148 0.879 0.152 0.848
#> GSM149115 1 0.0376 0.995 0.996 0.004
#> GSM149116 1 0.0000 0.995 1.000 0.000
#> GSM149117 1 0.1184 0.985 0.984 0.016
#> GSM149118 1 0.0000 0.995 1.000 0.000
#> GSM149119 1 0.0000 0.995 1.000 0.000
#> GSM149120 1 0.0000 0.995 1.000 0.000
#> GSM149121 1 0.0938 0.989 0.988 0.012
#> GSM149122 1 0.0000 0.995 1.000 0.000
#> GSM149123 1 0.0000 0.995 1.000 0.000
#> GSM149124 1 0.0000 0.995 1.000 0.000
#> GSM149125 1 0.0000 0.995 1.000 0.000
#> GSM149126 1 0.0000 0.995 1.000 0.000
#> GSM149127 1 0.0000 0.995 1.000 0.000
#> GSM149128 1 0.0000 0.995 1.000 0.000
#> GSM149129 1 0.0000 0.995 1.000 0.000
#> GSM149130 1 0.0376 0.995 0.996 0.004
#> GSM149131 1 0.0376 0.995 0.996 0.004
#> GSM149132 1 0.0000 0.995 1.000 0.000
#> GSM149133 1 0.0000 0.995 1.000 0.000
#> GSM149134 1 0.0938 0.989 0.988 0.012
#> GSM149135 1 0.0376 0.995 0.996 0.004
#> GSM149136 1 0.0376 0.995 0.996 0.004
#> GSM149137 1 0.0376 0.995 0.996 0.004
#> GSM149138 1 0.0938 0.989 0.988 0.012
#> GSM149139 1 0.0376 0.995 0.996 0.004
#> GSM149140 1 0.0376 0.995 0.996 0.004
#> GSM149141 2 0.5294 0.898 0.120 0.880
#> GSM149142 2 0.2603 0.934 0.044 0.956
#> GSM149143 2 0.6247 0.874 0.156 0.844
#> GSM149144 2 0.1184 0.947 0.016 0.984
#> GSM149145 2 0.5519 0.894 0.128 0.872
#> GSM149146 2 0.0000 0.947 0.000 1.000
#> GSM149147 1 0.0376 0.995 0.996 0.004
#> GSM149148 1 0.0376 0.995 0.996 0.004
#> GSM149149 1 0.0376 0.995 0.996 0.004
#> GSM149150 2 0.0000 0.947 0.000 1.000
#> GSM149151 1 0.0376 0.995 0.996 0.004
#> GSM149152 1 0.0672 0.992 0.992 0.008
#> GSM149153 2 0.1843 0.944 0.028 0.972
#> GSM149154 2 0.9087 0.628 0.324 0.676
#> GSM149155 2 0.0000 0.947 0.000 1.000
#> GSM149156 2 0.0000 0.947 0.000 1.000
#> GSM149157 2 0.0000 0.947 0.000 1.000
#> GSM149158 2 0.0000 0.947 0.000 1.000
#> GSM149159 2 0.0000 0.947 0.000 1.000
#> GSM149160 2 0.0000 0.947 0.000 1.000
#> GSM149161 2 0.0000 0.947 0.000 1.000
#> GSM149162 2 0.0000 0.947 0.000 1.000
#> GSM149163 2 0.0000 0.947 0.000 1.000
#> GSM149164 2 0.1184 0.947 0.016 0.984
#> GSM149165 2 0.0000 0.947 0.000 1.000
#> GSM149166 2 0.0000 0.947 0.000 1.000
#> GSM149167 2 0.0000 0.947 0.000 1.000
#> GSM149168 2 0.0000 0.947 0.000 1.000
#> GSM149169 2 0.0000 0.947 0.000 1.000
#> GSM149170 2 0.1184 0.947 0.016 0.984
#> GSM149171 2 0.1184 0.947 0.016 0.984
#> GSM149172 2 0.1184 0.947 0.016 0.984
#> GSM149173 2 0.1184 0.947 0.016 0.984
#> GSM149174 2 0.0000 0.947 0.000 1.000
#> GSM149175 2 0.6247 0.874 0.156 0.844
#> GSM149176 2 0.0000 0.947 0.000 1.000
#> GSM149177 2 0.1633 0.945 0.024 0.976
#> GSM149178 2 0.1184 0.947 0.016 0.984
#> GSM149179 2 0.0000 0.947 0.000 1.000
#> GSM149180 2 0.1184 0.947 0.016 0.984
#> GSM149181 2 0.0000 0.947 0.000 1.000
#> GSM149182 2 0.1184 0.947 0.016 0.984
#> GSM149183 2 0.0000 0.947 0.000 1.000
#> GSM149184 2 0.0000 0.947 0.000 1.000
#> GSM149185 2 0.1184 0.947 0.016 0.984
#> GSM149186 2 0.0000 0.947 0.000 1.000
#> GSM149187 2 0.0000 0.947 0.000 1.000
#> GSM149188 2 0.0000 0.947 0.000 1.000
#> GSM149189 2 0.1184 0.947 0.016 0.984
#> GSM149190 2 0.0000 0.947 0.000 1.000
#> GSM149191 2 0.0938 0.947 0.012 0.988
#> GSM149192 2 0.0000 0.947 0.000 1.000
#> GSM149193 2 0.1184 0.947 0.016 0.984
#> GSM149194 2 0.0000 0.947 0.000 1.000
#> GSM149195 2 0.5629 0.891 0.132 0.868
#> GSM149196 2 0.0000 0.947 0.000 1.000
#> GSM149197 2 0.0000 0.947 0.000 1.000
#> GSM149198 1 0.2948 0.948 0.948 0.052
#> GSM149199 2 0.0000 0.947 0.000 1.000
#> GSM149200 2 0.1184 0.947 0.016 0.984
#> GSM149201 2 0.0000 0.947 0.000 1.000
#> GSM149202 2 0.1184 0.947 0.016 0.984
#> GSM149203 2 0.1184 0.947 0.016 0.984
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149103 2 0.4452 0.817 0.000 0.808 0.192
#> GSM149104 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149106 2 0.4504 0.808 0.000 0.804 0.196
#> GSM149107 3 0.0237 0.994 0.000 0.004 0.996
#> GSM149108 3 0.0237 0.995 0.000 0.004 0.996
#> GSM149109 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149112 3 0.0237 0.995 0.000 0.004 0.996
#> GSM149113 3 0.0237 0.995 0.000 0.004 0.996
#> GSM149114 3 0.0000 0.998 0.000 0.000 1.000
#> GSM149115 1 0.3112 0.903 0.900 0.096 0.004
#> GSM149116 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149117 1 0.4349 0.879 0.852 0.128 0.020
#> GSM149118 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149119 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149120 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149121 1 0.3193 0.903 0.896 0.100 0.004
#> GSM149122 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149123 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149124 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149125 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149126 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149127 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149128 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149130 1 0.3539 0.902 0.888 0.100 0.012
#> GSM149131 1 0.3193 0.903 0.896 0.100 0.004
#> GSM149132 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149133 1 0.0000 0.892 1.000 0.000 0.000
#> GSM149134 1 0.3896 0.888 0.864 0.128 0.008
#> GSM149135 1 0.3695 0.900 0.880 0.108 0.012
#> GSM149136 1 0.3695 0.900 0.880 0.108 0.012
#> GSM149137 1 0.3695 0.900 0.880 0.108 0.012
#> GSM149138 1 0.5775 0.714 0.728 0.260 0.012
#> GSM149139 1 0.3695 0.900 0.880 0.108 0.012
#> GSM149140 1 0.3771 0.898 0.876 0.112 0.012
#> GSM149141 2 0.1643 0.951 0.000 0.956 0.044
#> GSM149142 2 0.0424 0.962 0.000 0.992 0.008
#> GSM149143 2 0.2680 0.923 0.008 0.924 0.068
#> GSM149144 2 0.0592 0.961 0.000 0.988 0.012
#> GSM149145 2 0.2537 0.930 0.000 0.920 0.080
#> GSM149146 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149147 1 0.6105 0.718 0.724 0.252 0.024
#> GSM149148 1 0.3918 0.892 0.868 0.120 0.012
#> GSM149149 1 0.3845 0.895 0.872 0.116 0.012
#> GSM149150 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149151 1 0.3918 0.893 0.868 0.120 0.012
#> GSM149152 1 0.4446 0.889 0.856 0.112 0.032
#> GSM149153 2 0.1529 0.954 0.000 0.960 0.040
#> GSM149154 2 0.4121 0.878 0.040 0.876 0.084
#> GSM149155 2 0.0424 0.961 0.000 0.992 0.008
#> GSM149156 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149157 2 0.1163 0.957 0.000 0.972 0.028
#> GSM149158 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149159 2 0.1289 0.955 0.000 0.968 0.032
#> GSM149160 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149161 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149162 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149164 2 0.0424 0.962 0.000 0.992 0.008
#> GSM149165 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149166 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149167 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149168 2 0.1964 0.943 0.000 0.944 0.056
#> GSM149169 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149170 2 0.2356 0.933 0.000 0.928 0.072
#> GSM149171 2 0.2356 0.933 0.000 0.928 0.072
#> GSM149172 2 0.1643 0.952 0.000 0.956 0.044
#> GSM149173 2 0.2066 0.941 0.000 0.940 0.060
#> GSM149174 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149175 2 0.2796 0.910 0.000 0.908 0.092
#> GSM149176 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149177 2 0.1411 0.955 0.000 0.964 0.036
#> GSM149178 2 0.1860 0.948 0.000 0.948 0.052
#> GSM149179 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149180 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149181 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149182 2 0.0424 0.962 0.000 0.992 0.008
#> GSM149183 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149184 2 0.0424 0.961 0.000 0.992 0.008
#> GSM149185 2 0.1529 0.952 0.000 0.960 0.040
#> GSM149186 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149187 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149189 2 0.2537 0.927 0.000 0.920 0.080
#> GSM149190 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149191 2 0.1529 0.953 0.000 0.960 0.040
#> GSM149192 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149193 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149194 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149195 2 0.5397 0.680 0.000 0.720 0.280
#> GSM149196 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149198 2 0.6794 0.414 0.324 0.648 0.028
#> GSM149199 2 0.0000 0.962 0.000 1.000 0.000
#> GSM149200 2 0.2356 0.933 0.000 0.928 0.072
#> GSM149201 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149202 2 0.1753 0.948 0.000 0.952 0.048
#> GSM149203 2 0.1643 0.951 0.000 0.956 0.044
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149103 2 0.4139 0.889 0.176 0.800 0.024 0.000
#> GSM149104 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149106 2 0.4035 0.891 0.176 0.804 0.020 0.000
#> GSM149107 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 0.957 0.000 0.000 1.000 0.000
#> GSM149115 1 0.3982 0.789 0.776 0.004 0.000 0.220
#> GSM149116 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149117 1 0.6049 0.645 0.680 0.200 0.000 0.120
#> GSM149118 4 0.1661 0.913 0.052 0.004 0.000 0.944
#> GSM149119 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149121 1 0.4018 0.785 0.772 0.004 0.000 0.224
#> GSM149122 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149130 1 0.2773 0.878 0.880 0.004 0.000 0.116
#> GSM149131 1 0.2714 0.881 0.884 0.004 0.000 0.112
#> GSM149132 4 0.0000 0.991 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0921 0.965 0.028 0.000 0.000 0.972
#> GSM149134 1 0.1489 0.908 0.952 0.004 0.000 0.044
#> GSM149135 1 0.1398 0.909 0.956 0.004 0.000 0.040
#> GSM149136 1 0.0657 0.915 0.984 0.004 0.000 0.012
#> GSM149137 1 0.1489 0.907 0.952 0.004 0.000 0.044
#> GSM149138 1 0.0376 0.911 0.992 0.004 0.000 0.004
#> GSM149139 1 0.1004 0.914 0.972 0.004 0.000 0.024
#> GSM149140 1 0.0657 0.915 0.984 0.004 0.000 0.012
#> GSM149141 2 0.3668 0.891 0.188 0.808 0.004 0.000
#> GSM149142 2 0.3539 0.896 0.176 0.820 0.004 0.000
#> GSM149143 2 0.4053 0.858 0.228 0.768 0.004 0.000
#> GSM149144 2 0.3539 0.896 0.176 0.820 0.004 0.000
#> GSM149145 2 0.3668 0.891 0.188 0.808 0.004 0.000
#> GSM149146 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149147 1 0.0376 0.911 0.992 0.004 0.000 0.004
#> GSM149148 1 0.0657 0.915 0.984 0.004 0.000 0.012
#> GSM149149 1 0.0657 0.915 0.984 0.004 0.000 0.012
#> GSM149150 2 0.3355 0.903 0.160 0.836 0.004 0.000
#> GSM149151 1 0.0657 0.915 0.984 0.004 0.000 0.012
#> GSM149152 1 0.4225 0.817 0.792 0.024 0.000 0.184
#> GSM149153 2 0.3668 0.891 0.188 0.808 0.004 0.000
#> GSM149154 2 0.4996 0.350 0.484 0.516 0.000 0.000
#> GSM149155 2 0.0336 0.893 0.008 0.992 0.000 0.000
#> GSM149156 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149157 2 0.2944 0.909 0.128 0.868 0.004 0.000
#> GSM149158 2 0.2654 0.908 0.108 0.888 0.004 0.000
#> GSM149159 2 0.2011 0.911 0.080 0.920 0.000 0.000
#> GSM149160 2 0.3494 0.899 0.172 0.824 0.004 0.000
#> GSM149161 2 0.2593 0.907 0.104 0.892 0.004 0.000
#> GSM149162 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149163 2 0.0336 0.893 0.008 0.992 0.000 0.000
#> GSM149164 2 0.3668 0.891 0.188 0.808 0.004 0.000
#> GSM149165 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149166 2 0.1474 0.901 0.052 0.948 0.000 0.000
#> GSM149167 2 0.2944 0.908 0.128 0.868 0.004 0.000
#> GSM149168 2 0.2281 0.911 0.096 0.904 0.000 0.000
#> GSM149169 2 0.3583 0.896 0.180 0.816 0.004 0.000
#> GSM149170 2 0.3074 0.905 0.152 0.848 0.000 0.000
#> GSM149171 2 0.2760 0.906 0.128 0.872 0.000 0.000
#> GSM149172 2 0.3583 0.895 0.180 0.816 0.004 0.000
#> GSM149173 2 0.2814 0.906 0.132 0.868 0.000 0.000
#> GSM149174 2 0.2773 0.908 0.116 0.880 0.004 0.000
#> GSM149175 2 0.4252 0.831 0.252 0.744 0.004 0.000
#> GSM149176 2 0.1474 0.902 0.052 0.948 0.000 0.000
#> GSM149177 2 0.3626 0.893 0.184 0.812 0.004 0.000
#> GSM149178 2 0.3583 0.895 0.180 0.816 0.004 0.000
#> GSM149179 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149180 2 0.2589 0.911 0.116 0.884 0.000 0.000
#> GSM149181 2 0.0000 0.890 0.000 1.000 0.000 0.000
#> GSM149182 2 0.1118 0.899 0.036 0.964 0.000 0.000
#> GSM149183 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149184 2 0.0469 0.896 0.012 0.988 0.000 0.000
#> GSM149185 2 0.2530 0.906 0.112 0.888 0.000 0.000
#> GSM149186 2 0.0000 0.890 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149188 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149189 2 0.3219 0.902 0.164 0.836 0.000 0.000
#> GSM149190 2 0.2654 0.908 0.108 0.888 0.004 0.000
#> GSM149191 2 0.3626 0.893 0.184 0.812 0.004 0.000
#> GSM149192 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149193 2 0.1118 0.901 0.036 0.964 0.000 0.000
#> GSM149194 2 0.3052 0.907 0.136 0.860 0.004 0.000
#> GSM149195 3 0.6943 0.271 0.160 0.264 0.576 0.000
#> GSM149196 2 0.0000 0.890 0.000 1.000 0.000 0.000
#> GSM149197 2 0.0336 0.891 0.008 0.992 0.000 0.000
#> GSM149198 1 0.2053 0.849 0.924 0.072 0.000 0.004
#> GSM149199 2 0.0817 0.894 0.024 0.976 0.000 0.000
#> GSM149200 2 0.3074 0.905 0.152 0.848 0.000 0.000
#> GSM149201 2 0.0188 0.888 0.004 0.996 0.000 0.000
#> GSM149202 2 0.3024 0.906 0.148 0.852 0.000 0.000
#> GSM149203 2 0.2944 0.911 0.128 0.868 0.004 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.5030 0.3788 0.000 0.352 0.604 0.000 0.044
#> GSM149104 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149106 2 0.6776 -0.0927 0.000 0.392 0.316 0.000 0.292
#> GSM149107 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 0.9445 0.000 0.000 1.000 0.000 0.000
#> GSM149115 4 0.4400 0.5737 0.308 0.020 0.000 0.672 0.000
#> GSM149116 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149117 4 0.5680 0.5426 0.264 0.092 0.000 0.632 0.012
#> GSM149118 4 0.0898 0.8658 0.020 0.008 0.000 0.972 0.000
#> GSM149119 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.5369 0.3605 0.388 0.060 0.000 0.552 0.000
#> GSM149122 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149130 4 0.4979 0.1555 0.480 0.028 0.000 0.492 0.000
#> GSM149131 1 0.3602 0.7094 0.796 0.024 0.000 0.180 0.000
#> GSM149132 4 0.0000 0.8797 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0510 0.8720 0.016 0.000 0.000 0.984 0.000
#> GSM149134 1 0.1270 0.9205 0.948 0.052 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.1270 0.9205 0.948 0.052 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149141 2 0.0898 0.8053 0.008 0.972 0.000 0.000 0.020
#> GSM149142 2 0.3307 0.8290 0.052 0.844 0.000 0.000 0.104
#> GSM149143 2 0.1364 0.8067 0.036 0.952 0.000 0.000 0.012
#> GSM149144 2 0.3164 0.8301 0.044 0.852 0.000 0.000 0.104
#> GSM149145 2 0.0771 0.8032 0.004 0.976 0.000 0.000 0.020
#> GSM149146 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149147 1 0.0162 0.9491 0.996 0.004 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.9504 1.000 0.000 0.000 0.000 0.000
#> GSM149150 2 0.3010 0.8198 0.004 0.824 0.000 0.000 0.172
#> GSM149151 1 0.0290 0.9476 0.992 0.008 0.000 0.000 0.000
#> GSM149152 4 0.5821 0.5118 0.276 0.108 0.000 0.608 0.008
#> GSM149153 2 0.0898 0.8053 0.008 0.972 0.000 0.000 0.020
#> GSM149154 2 0.3642 0.5780 0.232 0.760 0.000 0.000 0.008
#> GSM149155 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149156 5 0.0404 0.7984 0.000 0.012 0.000 0.000 0.988
#> GSM149157 2 0.2929 0.8278 0.008 0.840 0.000 0.000 0.152
#> GSM149158 2 0.3381 0.8151 0.016 0.808 0.000 0.000 0.176
#> GSM149159 5 0.3508 0.7311 0.000 0.252 0.000 0.000 0.748
#> GSM149160 2 0.2777 0.8359 0.016 0.864 0.000 0.000 0.120
#> GSM149161 2 0.3388 0.7942 0.008 0.792 0.000 0.000 0.200
#> GSM149162 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149163 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149164 2 0.1082 0.8072 0.028 0.964 0.000 0.000 0.008
#> GSM149165 5 0.0162 0.7969 0.000 0.004 0.000 0.000 0.996
#> GSM149166 5 0.4273 0.1464 0.000 0.448 0.000 0.000 0.552
#> GSM149167 2 0.3039 0.8299 0.012 0.836 0.000 0.000 0.152
#> GSM149168 5 0.3774 0.7092 0.000 0.296 0.000 0.000 0.704
#> GSM149169 2 0.3193 0.8353 0.028 0.840 0.000 0.000 0.132
#> GSM149170 5 0.3876 0.6939 0.000 0.316 0.000 0.000 0.684
#> GSM149171 5 0.3949 0.6797 0.000 0.332 0.000 0.000 0.668
#> GSM149172 5 0.4300 0.4407 0.000 0.476 0.000 0.000 0.524
#> GSM149173 5 0.3949 0.6820 0.000 0.332 0.000 0.000 0.668
#> GSM149174 2 0.3343 0.8182 0.016 0.812 0.000 0.000 0.172
#> GSM149175 2 0.1800 0.8007 0.048 0.932 0.000 0.000 0.020
#> GSM149176 5 0.4126 0.4087 0.000 0.380 0.000 0.000 0.620
#> GSM149177 2 0.3534 0.4605 0.000 0.744 0.000 0.000 0.256
#> GSM149178 5 0.4297 0.4715 0.000 0.472 0.000 0.000 0.528
#> GSM149179 5 0.0162 0.7967 0.000 0.004 0.000 0.000 0.996
#> GSM149180 5 0.3612 0.6967 0.000 0.268 0.000 0.000 0.732
#> GSM149181 5 0.1043 0.8016 0.000 0.040 0.000 0.000 0.960
#> GSM149182 5 0.1197 0.7987 0.000 0.048 0.000 0.000 0.952
#> GSM149183 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149184 5 0.2852 0.7583 0.000 0.172 0.000 0.000 0.828
#> GSM149185 5 0.3707 0.7182 0.000 0.284 0.000 0.000 0.716
#> GSM149186 5 0.0510 0.7994 0.000 0.016 0.000 0.000 0.984
#> GSM149187 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149188 5 0.0162 0.7969 0.000 0.004 0.000 0.000 0.996
#> GSM149189 5 0.5688 0.5830 0.000 0.328 0.100 0.000 0.572
#> GSM149190 2 0.3343 0.8182 0.016 0.812 0.000 0.000 0.172
#> GSM149191 2 0.3957 0.4271 0.008 0.712 0.000 0.000 0.280
#> GSM149192 5 0.1043 0.7997 0.000 0.040 0.000 0.000 0.960
#> GSM149193 5 0.1341 0.7987 0.000 0.056 0.000 0.000 0.944
#> GSM149194 2 0.3039 0.8302 0.012 0.836 0.000 0.000 0.152
#> GSM149195 3 0.3949 0.5632 0.000 0.300 0.696 0.000 0.004
#> GSM149196 5 0.1478 0.7952 0.000 0.064 0.000 0.000 0.936
#> GSM149197 5 0.1671 0.7690 0.000 0.076 0.000 0.000 0.924
#> GSM149198 1 0.3210 0.7544 0.788 0.212 0.000 0.000 0.000
#> GSM149199 5 0.3305 0.5588 0.000 0.224 0.000 0.000 0.776
#> GSM149200 5 0.3895 0.6928 0.000 0.320 0.000 0.000 0.680
#> GSM149201 5 0.0000 0.7952 0.000 0.000 0.000 0.000 1.000
#> GSM149202 5 0.3684 0.7194 0.000 0.280 0.000 0.000 0.720
#> GSM149203 5 0.4030 0.6578 0.000 0.352 0.000 0.000 0.648
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 5 0.3336 0.6446 0.000 0.000 0.056 0.000 0.812 0.132
#> GSM149104 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 5 0.3149 0.6505 0.000 0.000 0.044 0.000 0.824 0.132
#> GSM149107 3 0.0146 0.9736 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149108 3 0.0146 0.9736 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149109 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9745 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0146 0.9736 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149113 3 0.0146 0.9736 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149114 3 0.0146 0.9736 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149115 4 0.4428 0.6516 0.228 0.000 0.000 0.708 0.016 0.048
#> GSM149116 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 4 0.5221 0.6392 0.152 0.000 0.000 0.680 0.036 0.132
#> GSM149118 4 0.0622 0.8830 0.012 0.000 0.000 0.980 0.000 0.008
#> GSM149119 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.6007 0.4536 0.272 0.000 0.000 0.568 0.096 0.064
#> GSM149122 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 4 0.5290 0.0983 0.460 0.000 0.000 0.468 0.024 0.048
#> GSM149131 1 0.3882 0.7320 0.780 0.000 0.000 0.156 0.016 0.048
#> GSM149132 4 0.0000 0.8938 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0146 0.8920 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149134 1 0.2908 0.8773 0.848 0.000 0.000 0.000 0.104 0.048
#> GSM149135 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.2842 0.8787 0.852 0.000 0.000 0.000 0.104 0.044
#> GSM149139 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 6 0.3672 0.5772 0.000 0.000 0.000 0.000 0.368 0.632
#> GSM149142 6 0.0767 0.7811 0.004 0.012 0.000 0.000 0.008 0.976
#> GSM149143 6 0.4224 0.5922 0.028 0.000 0.000 0.000 0.340 0.632
#> GSM149144 6 0.0862 0.7816 0.004 0.016 0.000 0.000 0.008 0.972
#> GSM149145 6 0.3765 0.5209 0.000 0.000 0.000 0.000 0.404 0.596
#> GSM149146 2 0.1152 0.8282 0.000 0.952 0.000 0.000 0.004 0.044
#> GSM149147 1 0.0935 0.9215 0.964 0.000 0.000 0.000 0.004 0.032
#> GSM149148 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.9347 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149150 6 0.1151 0.7823 0.000 0.032 0.000 0.000 0.012 0.956
#> GSM149151 1 0.0692 0.9276 0.976 0.000 0.000 0.000 0.004 0.020
#> GSM149152 4 0.5349 0.6162 0.136 0.000 0.000 0.660 0.032 0.172
#> GSM149153 6 0.3706 0.5595 0.000 0.000 0.000 0.000 0.380 0.620
#> GSM149154 6 0.5011 0.5700 0.112 0.000 0.000 0.000 0.272 0.616
#> GSM149155 2 0.2006 0.8237 0.000 0.892 0.000 0.000 0.004 0.104
#> GSM149156 2 0.1471 0.8316 0.000 0.932 0.000 0.000 0.004 0.064
#> GSM149157 6 0.2801 0.7490 0.000 0.068 0.000 0.000 0.072 0.860
#> GSM149158 6 0.1858 0.7522 0.000 0.092 0.000 0.000 0.004 0.904
#> GSM149159 5 0.5035 0.7860 0.000 0.296 0.000 0.000 0.600 0.104
#> GSM149160 6 0.1138 0.7838 0.004 0.024 0.000 0.000 0.012 0.960
#> GSM149161 6 0.2219 0.7118 0.000 0.136 0.000 0.000 0.000 0.864
#> GSM149162 2 0.2070 0.8240 0.000 0.892 0.000 0.000 0.008 0.100
#> GSM149163 2 0.2118 0.8242 0.000 0.888 0.000 0.000 0.008 0.104
#> GSM149164 6 0.3714 0.5968 0.004 0.000 0.000 0.000 0.340 0.656
#> GSM149165 2 0.0260 0.8090 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149166 2 0.3961 0.3995 0.000 0.556 0.000 0.000 0.004 0.440
#> GSM149167 6 0.1219 0.7787 0.000 0.048 0.000 0.000 0.004 0.948
#> GSM149168 5 0.5063 0.8004 0.000 0.284 0.000 0.000 0.604 0.112
#> GSM149169 6 0.1116 0.7844 0.004 0.028 0.000 0.000 0.008 0.960
#> GSM149170 5 0.5029 0.8062 0.000 0.276 0.000 0.000 0.612 0.112
#> GSM149171 5 0.5011 0.8082 0.000 0.272 0.000 0.000 0.616 0.112
#> GSM149172 5 0.3874 0.6993 0.000 0.068 0.000 0.000 0.760 0.172
#> GSM149173 5 0.5138 0.8040 0.000 0.276 0.000 0.000 0.600 0.124
#> GSM149174 6 0.1663 0.7552 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM149175 6 0.3911 0.5821 0.008 0.000 0.000 0.000 0.368 0.624
#> GSM149176 2 0.4594 0.5830 0.000 0.608 0.000 0.000 0.052 0.340
#> GSM149177 5 0.3619 0.3433 0.000 0.004 0.000 0.000 0.680 0.316
#> GSM149178 5 0.3027 0.6826 0.000 0.028 0.000 0.000 0.824 0.148
#> GSM149179 2 0.1863 0.8247 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM149180 2 0.4141 0.5802 0.000 0.596 0.000 0.000 0.016 0.388
#> GSM149181 2 0.1168 0.7971 0.000 0.956 0.000 0.000 0.016 0.028
#> GSM149182 2 0.2882 0.7970 0.000 0.812 0.000 0.000 0.008 0.180
#> GSM149183 2 0.0603 0.8176 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM149184 2 0.3328 0.6325 0.000 0.816 0.000 0.000 0.064 0.120
#> GSM149185 2 0.5336 -0.2406 0.000 0.544 0.000 0.000 0.332 0.124
#> GSM149186 2 0.1225 0.8131 0.000 0.952 0.000 0.000 0.012 0.036
#> GSM149187 2 0.1204 0.8298 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM149188 2 0.0260 0.8090 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149189 5 0.5108 0.8098 0.000 0.264 0.004 0.000 0.620 0.112
#> GSM149190 6 0.1806 0.7556 0.000 0.088 0.000 0.000 0.004 0.908
#> GSM149191 5 0.5100 0.6373 0.000 0.128 0.000 0.000 0.612 0.260
#> GSM149192 2 0.0363 0.8078 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM149193 2 0.2301 0.7640 0.000 0.884 0.000 0.000 0.020 0.096
#> GSM149194 6 0.1010 0.7830 0.000 0.036 0.000 0.000 0.004 0.960
#> GSM149195 3 0.4535 0.5269 0.000 0.000 0.704 0.000 0.152 0.144
#> GSM149196 2 0.1719 0.7838 0.000 0.924 0.000 0.000 0.016 0.060
#> GSM149197 2 0.2933 0.7590 0.000 0.796 0.000 0.000 0.004 0.200
#> GSM149198 1 0.4599 0.6905 0.684 0.000 0.000 0.000 0.104 0.212
#> GSM149199 2 0.3489 0.6591 0.000 0.708 0.000 0.000 0.004 0.288
#> GSM149200 5 0.5029 0.8062 0.000 0.276 0.000 0.000 0.612 0.112
#> GSM149201 2 0.1663 0.8270 0.000 0.912 0.000 0.000 0.000 0.088
#> GSM149202 5 0.5431 0.7153 0.000 0.344 0.000 0.000 0.524 0.132
#> GSM149203 5 0.5036 0.8044 0.000 0.228 0.000 0.000 0.632 0.140
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:mclust 105 3.23e-14 2
#> CV:mclust 104 1.86e-27 3
#> CV:mclust 103 1.38e-30 4
#> CV:mclust 95 4.58e-35 5
#> CV:mclust 100 1.74e-33 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "NMF"]
# you can also extract it by
# res = res_list["CV:NMF"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.875 0.921 0.965 0.4875 0.508 0.508
#> 3 3 0.844 0.868 0.944 0.3519 0.706 0.485
#> 4 4 0.660 0.712 0.848 0.1286 0.805 0.505
#> 5 5 0.699 0.669 0.815 0.0745 0.855 0.510
#> 6 6 0.729 0.608 0.789 0.0409 0.915 0.619
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0672 0.9459 0.992 0.008
#> GSM149100 1 0.0672 0.9459 0.992 0.008
#> GSM149101 1 0.0672 0.9459 0.992 0.008
#> GSM149102 1 0.0672 0.9459 0.992 0.008
#> GSM149103 1 0.0672 0.9459 0.992 0.008
#> GSM149104 1 0.0672 0.9459 0.992 0.008
#> GSM149105 1 0.0672 0.9459 0.992 0.008
#> GSM149106 1 0.0672 0.9459 0.992 0.008
#> GSM149107 1 0.0672 0.9459 0.992 0.008
#> GSM149108 1 0.0672 0.9459 0.992 0.008
#> GSM149109 1 0.0672 0.9459 0.992 0.008
#> GSM149110 1 0.0672 0.9459 0.992 0.008
#> GSM149111 1 0.0672 0.9459 0.992 0.008
#> GSM149112 1 0.0672 0.9459 0.992 0.008
#> GSM149113 1 0.0672 0.9459 0.992 0.008
#> GSM149114 1 0.0672 0.9459 0.992 0.008
#> GSM149115 1 0.4431 0.8805 0.908 0.092
#> GSM149116 1 0.0000 0.9452 1.000 0.000
#> GSM149117 2 0.0672 0.9706 0.008 0.992
#> GSM149118 1 0.0000 0.9452 1.000 0.000
#> GSM149119 1 0.0000 0.9452 1.000 0.000
#> GSM149120 1 0.0000 0.9452 1.000 0.000
#> GSM149121 1 0.0938 0.9407 0.988 0.012
#> GSM149122 1 0.0000 0.9452 1.000 0.000
#> GSM149123 1 0.0000 0.9452 1.000 0.000
#> GSM149124 1 0.0000 0.9452 1.000 0.000
#> GSM149125 1 0.0000 0.9452 1.000 0.000
#> GSM149126 1 0.0000 0.9452 1.000 0.000
#> GSM149127 1 0.0000 0.9452 1.000 0.000
#> GSM149128 1 0.0000 0.9452 1.000 0.000
#> GSM149129 1 0.0000 0.9452 1.000 0.000
#> GSM149130 1 0.9710 0.3637 0.600 0.400
#> GSM149131 2 0.8207 0.6601 0.256 0.744
#> GSM149132 1 0.0000 0.9452 1.000 0.000
#> GSM149133 1 0.0000 0.9452 1.000 0.000
#> GSM149134 2 0.8608 0.5985 0.284 0.716
#> GSM149135 2 0.0672 0.9706 0.008 0.992
#> GSM149136 2 0.0672 0.9706 0.008 0.992
#> GSM149137 2 0.0672 0.9706 0.008 0.992
#> GSM149138 2 0.0672 0.9706 0.008 0.992
#> GSM149139 2 0.1414 0.9634 0.020 0.980
#> GSM149140 2 0.0672 0.9706 0.008 0.992
#> GSM149141 1 0.6343 0.8186 0.840 0.160
#> GSM149142 2 0.0000 0.9753 0.000 1.000
#> GSM149143 1 0.3114 0.9115 0.944 0.056
#> GSM149144 2 0.0000 0.9753 0.000 1.000
#> GSM149145 1 0.2423 0.9260 0.960 0.040
#> GSM149146 2 0.0000 0.9753 0.000 1.000
#> GSM149147 2 0.2603 0.9438 0.044 0.956
#> GSM149148 2 0.0672 0.9706 0.008 0.992
#> GSM149149 2 0.3274 0.9287 0.060 0.940
#> GSM149150 2 0.0000 0.9753 0.000 1.000
#> GSM149151 2 0.0672 0.9706 0.008 0.992
#> GSM149152 1 0.6048 0.8260 0.852 0.148
#> GSM149153 2 0.9427 0.4165 0.360 0.640
#> GSM149154 1 0.0000 0.9452 1.000 0.000
#> GSM149155 2 0.0000 0.9753 0.000 1.000
#> GSM149156 2 0.0000 0.9753 0.000 1.000
#> GSM149157 2 0.0000 0.9753 0.000 1.000
#> GSM149158 2 0.0000 0.9753 0.000 1.000
#> GSM149159 2 0.0000 0.9753 0.000 1.000
#> GSM149160 2 0.0000 0.9753 0.000 1.000
#> GSM149161 2 0.0000 0.9753 0.000 1.000
#> GSM149162 2 0.0000 0.9753 0.000 1.000
#> GSM149163 2 0.0000 0.9753 0.000 1.000
#> GSM149164 2 0.0000 0.9753 0.000 1.000
#> GSM149165 2 0.0000 0.9753 0.000 1.000
#> GSM149166 2 0.0000 0.9753 0.000 1.000
#> GSM149167 2 0.0000 0.9753 0.000 1.000
#> GSM149168 2 0.0000 0.9753 0.000 1.000
#> GSM149169 2 0.0000 0.9753 0.000 1.000
#> GSM149170 2 0.1184 0.9639 0.016 0.984
#> GSM149171 1 0.9522 0.4395 0.628 0.372
#> GSM149172 1 0.6801 0.7954 0.820 0.180
#> GSM149173 2 0.0000 0.9753 0.000 1.000
#> GSM149174 2 0.0000 0.9753 0.000 1.000
#> GSM149175 1 0.0000 0.9452 1.000 0.000
#> GSM149176 2 0.0000 0.9753 0.000 1.000
#> GSM149177 2 0.4939 0.8744 0.108 0.892
#> GSM149178 2 0.5408 0.8504 0.124 0.876
#> GSM149179 2 0.0000 0.9753 0.000 1.000
#> GSM149180 2 0.0000 0.9753 0.000 1.000
#> GSM149181 2 0.0000 0.9753 0.000 1.000
#> GSM149182 2 0.0000 0.9753 0.000 1.000
#> GSM149183 2 0.0000 0.9753 0.000 1.000
#> GSM149184 2 0.0000 0.9753 0.000 1.000
#> GSM149185 2 0.0000 0.9753 0.000 1.000
#> GSM149186 2 0.0000 0.9753 0.000 1.000
#> GSM149187 2 0.0000 0.9753 0.000 1.000
#> GSM149188 2 0.0000 0.9753 0.000 1.000
#> GSM149189 1 0.9998 0.0742 0.508 0.492
#> GSM149190 2 0.0000 0.9753 0.000 1.000
#> GSM149191 2 0.0000 0.9753 0.000 1.000
#> GSM149192 2 0.0000 0.9753 0.000 1.000
#> GSM149193 2 0.0000 0.9753 0.000 1.000
#> GSM149194 2 0.0000 0.9753 0.000 1.000
#> GSM149195 1 0.0672 0.9459 0.992 0.008
#> GSM149196 2 0.0000 0.9753 0.000 1.000
#> GSM149197 2 0.0000 0.9753 0.000 1.000
#> GSM149198 2 0.4022 0.9075 0.080 0.920
#> GSM149199 2 0.0000 0.9753 0.000 1.000
#> GSM149200 2 0.0000 0.9753 0.000 1.000
#> GSM149201 2 0.0000 0.9753 0.000 1.000
#> GSM149202 2 0.0000 0.9753 0.000 1.000
#> GSM149203 1 0.7453 0.7531 0.788 0.212
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.9471 1.000 0.000 0.000
#> GSM149116 1 0.0592 0.9457 0.988 0.000 0.012
#> GSM149117 1 0.5497 0.6242 0.708 0.292 0.000
#> GSM149118 1 0.0237 0.9475 0.996 0.000 0.004
#> GSM149119 1 0.0592 0.9457 0.988 0.000 0.012
#> GSM149120 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149121 1 0.0000 0.9471 1.000 0.000 0.000
#> GSM149122 1 0.0747 0.9434 0.984 0.000 0.016
#> GSM149123 1 0.0237 0.9475 0.996 0.000 0.004
#> GSM149124 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149125 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149126 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149127 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149128 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149129 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149130 1 0.0000 0.9471 1.000 0.000 0.000
#> GSM149131 1 0.0000 0.9471 1.000 0.000 0.000
#> GSM149132 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149133 1 0.0424 0.9474 0.992 0.000 0.008
#> GSM149134 1 0.0237 0.9467 0.996 0.004 0.000
#> GSM149135 1 0.0892 0.9388 0.980 0.020 0.000
#> GSM149136 1 0.3116 0.8704 0.892 0.108 0.000
#> GSM149137 1 0.0424 0.9454 0.992 0.008 0.000
#> GSM149138 1 0.5810 0.5502 0.664 0.336 0.000
#> GSM149139 1 0.0237 0.9465 0.996 0.004 0.000
#> GSM149140 1 0.2448 0.8983 0.924 0.076 0.000
#> GSM149141 3 0.2918 0.8820 0.032 0.044 0.924
#> GSM149142 2 0.0424 0.9363 0.008 0.992 0.000
#> GSM149143 3 0.7268 0.1362 0.448 0.028 0.524
#> GSM149144 2 0.0424 0.9363 0.008 0.992 0.000
#> GSM149145 3 0.0747 0.9130 0.000 0.016 0.984
#> GSM149146 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149147 1 0.0237 0.9465 0.996 0.004 0.000
#> GSM149148 1 0.1289 0.9312 0.968 0.032 0.000
#> GSM149149 1 0.0000 0.9471 1.000 0.000 0.000
#> GSM149150 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149151 1 0.3686 0.8392 0.860 0.140 0.000
#> GSM149152 1 0.0000 0.9471 1.000 0.000 0.000
#> GSM149153 3 0.6154 0.3026 0.000 0.408 0.592
#> GSM149154 1 0.4235 0.7710 0.824 0.000 0.176
#> GSM149155 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149158 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149159 2 0.3340 0.8406 0.000 0.880 0.120
#> GSM149160 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149161 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149162 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149164 2 0.0747 0.9336 0.000 0.984 0.016
#> GSM149165 2 0.2878 0.8663 0.000 0.904 0.096
#> GSM149166 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149167 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149168 2 0.5178 0.6568 0.000 0.744 0.256
#> GSM149169 2 0.0424 0.9363 0.008 0.992 0.000
#> GSM149170 3 0.4504 0.7235 0.000 0.196 0.804
#> GSM149171 3 0.1289 0.9045 0.000 0.032 0.968
#> GSM149172 3 0.1411 0.9019 0.000 0.036 0.964
#> GSM149173 2 0.6244 0.2306 0.000 0.560 0.440
#> GSM149174 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149175 3 0.4887 0.6673 0.228 0.000 0.772
#> GSM149176 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149177 2 0.6305 0.0819 0.000 0.516 0.484
#> GSM149178 3 0.6192 0.2414 0.000 0.420 0.580
#> GSM149179 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149181 2 0.2165 0.8964 0.000 0.936 0.064
#> GSM149182 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149184 2 0.0892 0.9308 0.000 0.980 0.020
#> GSM149185 2 0.1529 0.9164 0.000 0.960 0.040
#> GSM149186 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149188 2 0.1163 0.9254 0.000 0.972 0.028
#> GSM149189 3 0.1289 0.9045 0.000 0.032 0.968
#> GSM149190 2 0.0237 0.9388 0.004 0.996 0.000
#> GSM149191 2 0.5254 0.6439 0.000 0.736 0.264
#> GSM149192 2 0.0424 0.9374 0.000 0.992 0.008
#> GSM149193 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149194 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149195 3 0.0000 0.9194 0.000 0.000 1.000
#> GSM149196 2 0.0237 0.9394 0.000 0.996 0.004
#> GSM149197 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149198 1 0.4504 0.7640 0.804 0.196 0.000
#> GSM149199 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149200 2 0.6291 0.1345 0.000 0.532 0.468
#> GSM149201 2 0.0000 0.9410 0.000 1.000 0.000
#> GSM149202 2 0.1031 0.9280 0.000 0.976 0.024
#> GSM149203 3 0.3116 0.8369 0.000 0.108 0.892
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0188 0.8799 0.004 0.000 0.996 0.000
#> GSM149100 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149103 3 0.0188 0.8792 0.004 0.000 0.996 0.000
#> GSM149104 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0188 0.8799 0.004 0.000 0.996 0.000
#> GSM149106 3 0.0336 0.8794 0.008 0.000 0.992 0.000
#> GSM149107 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0895 0.8723 0.004 0.000 0.976 0.020
#> GSM149109 3 0.0188 0.8799 0.004 0.000 0.996 0.000
#> GSM149110 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0712 0.8768 0.004 0.004 0.984 0.008
#> GSM149113 3 0.0524 0.8775 0.004 0.000 0.988 0.008
#> GSM149114 3 0.0000 0.8804 0.000 0.000 1.000 0.000
#> GSM149115 4 0.1211 0.9269 0.040 0.000 0.000 0.960
#> GSM149116 4 0.0859 0.9397 0.008 0.008 0.004 0.980
#> GSM149117 4 0.4541 0.6829 0.060 0.144 0.000 0.796
#> GSM149118 4 0.0376 0.9471 0.004 0.000 0.004 0.992
#> GSM149119 4 0.0564 0.9450 0.004 0.004 0.004 0.988
#> GSM149120 4 0.0188 0.9486 0.000 0.000 0.004 0.996
#> GSM149121 4 0.3123 0.8050 0.156 0.000 0.000 0.844
#> GSM149122 4 0.0188 0.9486 0.000 0.000 0.004 0.996
#> GSM149123 4 0.0188 0.9489 0.004 0.000 0.000 0.996
#> GSM149124 4 0.0859 0.9397 0.008 0.008 0.004 0.980
#> GSM149125 4 0.0188 0.9486 0.000 0.000 0.004 0.996
#> GSM149126 4 0.0376 0.9490 0.004 0.000 0.004 0.992
#> GSM149127 4 0.0000 0.9489 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0188 0.9489 0.004 0.000 0.000 0.996
#> GSM149129 4 0.0188 0.9489 0.004 0.000 0.000 0.996
#> GSM149130 4 0.2081 0.8886 0.084 0.000 0.000 0.916
#> GSM149131 4 0.3688 0.7206 0.208 0.000 0.000 0.792
#> GSM149132 4 0.0336 0.9475 0.008 0.000 0.000 0.992
#> GSM149133 4 0.0188 0.9488 0.004 0.000 0.000 0.996
#> GSM149134 1 0.5730 0.3852 0.616 0.040 0.000 0.344
#> GSM149135 1 0.4477 0.5077 0.688 0.000 0.000 0.312
#> GSM149136 1 0.2973 0.6682 0.856 0.000 0.000 0.144
#> GSM149137 1 0.4697 0.4303 0.644 0.000 0.000 0.356
#> GSM149138 1 0.3117 0.6771 0.880 0.028 0.000 0.092
#> GSM149139 1 0.4776 0.3929 0.624 0.000 0.000 0.376
#> GSM149140 1 0.3356 0.6509 0.824 0.000 0.000 0.176
#> GSM149141 3 0.6217 0.5364 0.292 0.084 0.624 0.000
#> GSM149142 1 0.1792 0.6596 0.932 0.068 0.000 0.000
#> GSM149143 1 0.6847 0.2075 0.536 0.004 0.364 0.096
#> GSM149144 1 0.4431 0.4057 0.696 0.304 0.000 0.000
#> GSM149145 3 0.1867 0.8451 0.072 0.000 0.928 0.000
#> GSM149146 2 0.3726 0.7678 0.212 0.788 0.000 0.000
#> GSM149147 1 0.3356 0.6478 0.824 0.000 0.000 0.176
#> GSM149148 1 0.2973 0.6674 0.856 0.000 0.000 0.144
#> GSM149149 1 0.3907 0.5992 0.768 0.000 0.000 0.232
#> GSM149150 2 0.4697 0.5604 0.356 0.644 0.000 0.000
#> GSM149151 1 0.2799 0.6807 0.884 0.008 0.000 0.108
#> GSM149152 4 0.0707 0.9396 0.020 0.000 0.000 0.980
#> GSM149153 3 0.5203 0.3386 0.416 0.008 0.576 0.000
#> GSM149154 3 0.7706 0.0306 0.348 0.000 0.424 0.228
#> GSM149155 2 0.3649 0.7725 0.204 0.796 0.000 0.000
#> GSM149156 2 0.3266 0.7926 0.168 0.832 0.000 0.000
#> GSM149157 1 0.5085 0.1957 0.616 0.376 0.008 0.000
#> GSM149158 1 0.3942 0.5111 0.764 0.236 0.000 0.000
#> GSM149159 2 0.1151 0.7906 0.024 0.968 0.008 0.000
#> GSM149160 1 0.3105 0.6118 0.856 0.140 0.004 0.000
#> GSM149161 1 0.4972 -0.0888 0.544 0.456 0.000 0.000
#> GSM149162 2 0.3649 0.7722 0.204 0.796 0.000 0.000
#> GSM149163 2 0.3942 0.7472 0.236 0.764 0.000 0.000
#> GSM149164 1 0.5312 0.5430 0.712 0.236 0.052 0.000
#> GSM149165 2 0.2124 0.8098 0.068 0.924 0.000 0.008
#> GSM149166 2 0.4624 0.6101 0.340 0.660 0.000 0.000
#> GSM149167 1 0.4916 0.0787 0.576 0.424 0.000 0.000
#> GSM149168 2 0.1356 0.7866 0.032 0.960 0.008 0.000
#> GSM149169 1 0.1743 0.6641 0.940 0.056 0.004 0.000
#> GSM149170 2 0.3647 0.7063 0.040 0.852 0.108 0.000
#> GSM149171 2 0.5651 0.4002 0.036 0.652 0.308 0.004
#> GSM149172 3 0.6972 0.2199 0.052 0.432 0.488 0.028
#> GSM149173 2 0.4059 0.6862 0.040 0.832 0.124 0.004
#> GSM149174 1 0.4331 0.4323 0.712 0.288 0.000 0.000
#> GSM149175 3 0.6527 0.5474 0.052 0.032 0.640 0.276
#> GSM149176 2 0.4406 0.6734 0.300 0.700 0.000 0.000
#> GSM149177 3 0.2466 0.8386 0.056 0.028 0.916 0.000
#> GSM149178 3 0.4565 0.7585 0.064 0.140 0.796 0.000
#> GSM149179 2 0.3356 0.7888 0.176 0.824 0.000 0.000
#> GSM149180 2 0.2345 0.8033 0.100 0.900 0.000 0.000
#> GSM149181 2 0.0469 0.7974 0.012 0.988 0.000 0.000
#> GSM149182 2 0.2973 0.8022 0.144 0.856 0.000 0.000
#> GSM149183 2 0.1716 0.8119 0.064 0.936 0.000 0.000
#> GSM149184 2 0.0672 0.7996 0.008 0.984 0.000 0.008
#> GSM149185 2 0.0817 0.7914 0.024 0.976 0.000 0.000
#> GSM149186 2 0.2469 0.8114 0.108 0.892 0.000 0.000
#> GSM149187 2 0.2469 0.8083 0.108 0.892 0.000 0.000
#> GSM149188 2 0.1867 0.8108 0.072 0.928 0.000 0.000
#> GSM149189 3 0.3625 0.7573 0.012 0.160 0.828 0.000
#> GSM149190 2 0.4925 0.4097 0.428 0.572 0.000 0.000
#> GSM149191 2 0.7456 0.1936 0.200 0.492 0.308 0.000
#> GSM149192 2 0.1716 0.8125 0.064 0.936 0.000 0.000
#> GSM149193 2 0.1637 0.8011 0.060 0.940 0.000 0.000
#> GSM149194 1 0.4382 0.4130 0.704 0.296 0.000 0.000
#> GSM149195 3 0.2915 0.8224 0.028 0.080 0.892 0.000
#> GSM149196 2 0.0592 0.7953 0.016 0.984 0.000 0.000
#> GSM149197 2 0.4103 0.7259 0.256 0.744 0.000 0.000
#> GSM149198 1 0.6042 0.5264 0.684 0.080 0.008 0.228
#> GSM149199 2 0.3942 0.7459 0.236 0.764 0.000 0.000
#> GSM149200 2 0.3176 0.7385 0.036 0.880 0.084 0.000
#> GSM149201 2 0.2530 0.8101 0.112 0.888 0.000 0.000
#> GSM149202 2 0.2345 0.7889 0.100 0.900 0.000 0.000
#> GSM149203 2 0.5735 0.5677 0.008 0.724 0.180 0.088
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0162 0.9242 0.000 0.000 0.996 0.000 0.004
#> GSM149100 3 0.0162 0.9242 0.000 0.000 0.996 0.000 0.004
#> GSM149101 3 0.0162 0.9248 0.000 0.000 0.996 0.000 0.004
#> GSM149102 3 0.0000 0.9247 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.0162 0.9248 0.000 0.000 0.996 0.000 0.004
#> GSM149104 3 0.0290 0.9240 0.000 0.000 0.992 0.000 0.008
#> GSM149105 3 0.0000 0.9247 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.0566 0.9218 0.004 0.000 0.984 0.000 0.012
#> GSM149107 3 0.0703 0.9173 0.000 0.000 0.976 0.000 0.024
#> GSM149108 3 0.0404 0.9232 0.000 0.000 0.988 0.000 0.012
#> GSM149109 3 0.0000 0.9247 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0162 0.9242 0.000 0.000 0.996 0.000 0.004
#> GSM149111 3 0.0162 0.9242 0.000 0.000 0.996 0.000 0.004
#> GSM149112 3 0.0162 0.9248 0.000 0.000 0.996 0.000 0.004
#> GSM149113 3 0.0451 0.9232 0.000 0.000 0.988 0.004 0.008
#> GSM149114 3 0.0880 0.9119 0.000 0.000 0.968 0.000 0.032
#> GSM149115 4 0.1549 0.9152 0.040 0.000 0.000 0.944 0.016
#> GSM149116 4 0.1195 0.9147 0.012 0.000 0.000 0.960 0.028
#> GSM149117 4 0.6237 0.4023 0.016 0.332 0.000 0.544 0.108
#> GSM149118 4 0.0451 0.9240 0.004 0.000 0.000 0.988 0.008
#> GSM149119 4 0.0451 0.9252 0.008 0.000 0.000 0.988 0.004
#> GSM149120 4 0.0290 0.9252 0.000 0.000 0.000 0.992 0.008
#> GSM149121 4 0.3093 0.8021 0.168 0.000 0.000 0.824 0.008
#> GSM149122 4 0.0290 0.9267 0.008 0.000 0.000 0.992 0.000
#> GSM149123 4 0.0404 0.9268 0.012 0.000 0.000 0.988 0.000
#> GSM149124 4 0.0898 0.9180 0.008 0.000 0.000 0.972 0.020
#> GSM149125 4 0.0324 0.9262 0.004 0.000 0.000 0.992 0.004
#> GSM149126 4 0.0510 0.9264 0.016 0.000 0.000 0.984 0.000
#> GSM149127 4 0.0510 0.9264 0.016 0.000 0.000 0.984 0.000
#> GSM149128 4 0.0404 0.9268 0.012 0.000 0.000 0.988 0.000
#> GSM149129 4 0.0609 0.9253 0.020 0.000 0.000 0.980 0.000
#> GSM149130 4 0.3155 0.8515 0.120 0.008 0.000 0.852 0.020
#> GSM149131 4 0.3242 0.7493 0.216 0.000 0.000 0.784 0.000
#> GSM149132 4 0.0609 0.9253 0.020 0.000 0.000 0.980 0.000
#> GSM149133 4 0.1082 0.9200 0.008 0.000 0.000 0.964 0.028
#> GSM149134 1 0.4621 0.6964 0.744 0.004 0.000 0.076 0.176
#> GSM149135 1 0.2597 0.8093 0.884 0.024 0.000 0.092 0.000
#> GSM149136 1 0.1981 0.8194 0.920 0.064 0.000 0.016 0.000
#> GSM149137 1 0.3216 0.7944 0.852 0.020 0.000 0.116 0.012
#> GSM149138 1 0.2520 0.7921 0.888 0.004 0.000 0.012 0.096
#> GSM149139 1 0.2280 0.7971 0.880 0.000 0.000 0.120 0.000
#> GSM149140 1 0.1907 0.8237 0.928 0.044 0.000 0.028 0.000
#> GSM149141 5 0.6917 -0.0569 0.352 0.012 0.212 0.000 0.424
#> GSM149142 1 0.3242 0.6939 0.784 0.216 0.000 0.000 0.000
#> GSM149143 1 0.3513 0.7596 0.828 0.000 0.132 0.004 0.036
#> GSM149144 2 0.3906 0.5526 0.240 0.744 0.000 0.000 0.016
#> GSM149145 3 0.2540 0.8397 0.088 0.000 0.888 0.000 0.024
#> GSM149146 2 0.0992 0.6859 0.008 0.968 0.000 0.000 0.024
#> GSM149147 1 0.0807 0.8213 0.976 0.012 0.000 0.012 0.000
#> GSM149148 1 0.1741 0.8239 0.936 0.040 0.000 0.024 0.000
#> GSM149149 1 0.2036 0.8211 0.920 0.024 0.000 0.056 0.000
#> GSM149150 2 0.5915 0.2568 0.124 0.552 0.000 0.000 0.324
#> GSM149151 1 0.2248 0.8117 0.900 0.088 0.000 0.012 0.000
#> GSM149152 4 0.4643 0.7626 0.124 0.016 0.000 0.768 0.092
#> GSM149153 1 0.5078 0.3527 0.576 0.004 0.388 0.000 0.032
#> GSM149154 1 0.5055 0.6998 0.740 0.000 0.160 0.060 0.040
#> GSM149155 2 0.0693 0.6859 0.012 0.980 0.000 0.000 0.008
#> GSM149156 2 0.4167 0.5600 0.024 0.724 0.000 0.000 0.252
#> GSM149157 5 0.6817 -0.0118 0.344 0.308 0.000 0.000 0.348
#> GSM149158 2 0.4655 0.0700 0.476 0.512 0.000 0.000 0.012
#> GSM149159 5 0.3728 0.6081 0.008 0.244 0.000 0.000 0.748
#> GSM149160 1 0.4119 0.6941 0.780 0.152 0.000 0.000 0.068
#> GSM149161 2 0.3835 0.5649 0.244 0.744 0.000 0.000 0.012
#> GSM149162 2 0.3141 0.6463 0.016 0.832 0.000 0.000 0.152
#> GSM149163 2 0.0807 0.6863 0.012 0.976 0.000 0.000 0.012
#> GSM149164 5 0.4626 0.2143 0.364 0.020 0.000 0.000 0.616
#> GSM149165 5 0.5232 0.0324 0.008 0.472 0.000 0.028 0.492
#> GSM149166 2 0.2989 0.6457 0.072 0.868 0.000 0.000 0.060
#> GSM149167 2 0.5738 0.4648 0.264 0.604 0.000 0.000 0.132
#> GSM149168 5 0.2930 0.6622 0.004 0.164 0.000 0.000 0.832
#> GSM149169 1 0.2843 0.7625 0.848 0.144 0.000 0.000 0.008
#> GSM149170 5 0.3086 0.6564 0.000 0.180 0.004 0.000 0.816
#> GSM149171 5 0.2928 0.6683 0.004 0.092 0.032 0.000 0.872
#> GSM149172 5 0.2064 0.6351 0.016 0.020 0.028 0.004 0.932
#> GSM149173 5 0.2179 0.6633 0.008 0.072 0.008 0.000 0.912
#> GSM149174 2 0.4798 0.1759 0.440 0.540 0.000 0.000 0.020
#> GSM149175 3 0.8550 0.0025 0.220 0.004 0.316 0.164 0.296
#> GSM149176 2 0.2514 0.6789 0.060 0.896 0.000 0.000 0.044
#> GSM149177 3 0.2721 0.8433 0.028 0.068 0.892 0.000 0.012
#> GSM149178 5 0.5305 0.0267 0.028 0.012 0.436 0.000 0.524
#> GSM149179 2 0.2470 0.6628 0.012 0.884 0.000 0.000 0.104
#> GSM149180 5 0.3890 0.6081 0.012 0.252 0.000 0.000 0.736
#> GSM149181 5 0.4286 0.4873 0.004 0.340 0.000 0.004 0.652
#> GSM149182 2 0.2462 0.6567 0.008 0.880 0.000 0.000 0.112
#> GSM149183 2 0.4299 0.4095 0.008 0.672 0.000 0.004 0.316
#> GSM149184 5 0.5166 0.2977 0.012 0.368 0.000 0.028 0.592
#> GSM149185 5 0.2471 0.6689 0.000 0.136 0.000 0.000 0.864
#> GSM149186 2 0.4403 0.1218 0.004 0.560 0.000 0.000 0.436
#> GSM149187 2 0.3661 0.5221 0.000 0.724 0.000 0.000 0.276
#> GSM149188 2 0.4296 0.4609 0.008 0.692 0.000 0.008 0.292
#> GSM149189 5 0.5059 0.2878 0.000 0.036 0.416 0.000 0.548
#> GSM149190 2 0.2873 0.6648 0.120 0.860 0.000 0.000 0.020
#> GSM149191 5 0.4129 0.6537 0.060 0.112 0.020 0.000 0.808
#> GSM149192 2 0.4300 0.0221 0.000 0.524 0.000 0.000 0.476
#> GSM149193 5 0.3990 0.5550 0.004 0.308 0.000 0.000 0.688
#> GSM149194 1 0.5120 0.5707 0.696 0.164 0.000 0.000 0.140
#> GSM149195 3 0.4464 0.2672 0.008 0.000 0.584 0.000 0.408
#> GSM149196 5 0.4791 0.4198 0.008 0.360 0.000 0.016 0.616
#> GSM149197 2 0.2409 0.6864 0.032 0.900 0.000 0.000 0.068
#> GSM149198 1 0.4577 0.5822 0.676 0.004 0.000 0.024 0.296
#> GSM149199 2 0.2915 0.6720 0.024 0.860 0.000 0.000 0.116
#> GSM149200 5 0.3167 0.6669 0.008 0.148 0.008 0.000 0.836
#> GSM149201 2 0.3274 0.5720 0.000 0.780 0.000 0.000 0.220
#> GSM149202 5 0.3326 0.6617 0.024 0.152 0.000 0.000 0.824
#> GSM149203 5 0.4294 0.6109 0.004 0.152 0.016 0.040 0.788
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0508 0.92491 0.004 0.000 0.984 0.000 0.000 0.012
#> GSM149100 3 0.0146 0.92651 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM149101 3 0.0260 0.92573 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149102 3 0.0000 0.92658 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.0146 0.92630 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149104 3 0.0146 0.92654 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149105 3 0.0000 0.92658 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0260 0.92598 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149107 3 0.0937 0.91405 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM149108 3 0.0937 0.91443 0.000 0.000 0.960 0.000 0.000 0.040
#> GSM149109 3 0.0260 0.92625 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149110 3 0.0291 0.92599 0.004 0.000 0.992 0.000 0.000 0.004
#> GSM149111 3 0.0291 0.92584 0.004 0.000 0.992 0.000 0.000 0.004
#> GSM149112 3 0.0547 0.92330 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM149113 3 0.0547 0.92322 0.000 0.000 0.980 0.000 0.000 0.020
#> GSM149114 3 0.1398 0.90071 0.000 0.008 0.940 0.000 0.000 0.052
#> GSM149115 4 0.1408 0.92577 0.036 0.000 0.000 0.944 0.000 0.020
#> GSM149116 4 0.0547 0.93586 0.000 0.000 0.000 0.980 0.000 0.020
#> GSM149117 2 0.5788 0.33145 0.004 0.568 0.000 0.220 0.008 0.200
#> GSM149118 4 0.0260 0.93935 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM149119 4 0.0146 0.94201 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149120 4 0.0363 0.93895 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM149121 4 0.2860 0.84113 0.100 0.000 0.000 0.852 0.000 0.048
#> GSM149122 4 0.0260 0.94272 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149123 4 0.0260 0.94272 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149124 4 0.0458 0.93715 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM149125 4 0.0405 0.94265 0.008 0.000 0.000 0.988 0.000 0.004
#> GSM149126 4 0.0260 0.94272 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149127 4 0.0363 0.94183 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM149128 4 0.0260 0.94272 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149129 4 0.0260 0.94272 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149130 4 0.2313 0.87240 0.100 0.004 0.000 0.884 0.000 0.012
#> GSM149131 4 0.1910 0.87444 0.108 0.000 0.000 0.892 0.000 0.000
#> GSM149132 4 0.0458 0.94069 0.016 0.000 0.000 0.984 0.000 0.000
#> GSM149133 4 0.1296 0.91989 0.004 0.004 0.000 0.948 0.000 0.044
#> GSM149134 1 0.4987 -0.07468 0.480 0.000 0.000 0.036 0.016 0.468
#> GSM149135 1 0.1655 0.71516 0.932 0.008 0.000 0.052 0.000 0.008
#> GSM149136 1 0.1390 0.72608 0.948 0.032 0.000 0.016 0.000 0.004
#> GSM149137 1 0.2002 0.70699 0.916 0.008 0.000 0.056 0.000 0.020
#> GSM149138 1 0.3578 0.34211 0.660 0.000 0.000 0.000 0.000 0.340
#> GSM149139 1 0.1701 0.70265 0.920 0.000 0.000 0.072 0.000 0.008
#> GSM149140 1 0.1418 0.72864 0.944 0.032 0.000 0.024 0.000 0.000
#> GSM149141 6 0.6502 0.39736 0.304 0.012 0.028 0.000 0.168 0.488
#> GSM149142 1 0.2755 0.69554 0.856 0.120 0.000 0.000 0.012 0.012
#> GSM149143 1 0.3348 0.68779 0.836 0.000 0.016 0.008 0.112 0.028
#> GSM149144 2 0.2812 0.67818 0.096 0.856 0.000 0.000 0.000 0.048
#> GSM149145 3 0.4980 0.61567 0.116 0.000 0.712 0.000 0.044 0.128
#> GSM149146 2 0.1391 0.70664 0.016 0.944 0.000 0.000 0.040 0.000
#> GSM149147 1 0.0881 0.72552 0.972 0.012 0.000 0.008 0.000 0.008
#> GSM149148 1 0.1245 0.72846 0.952 0.032 0.000 0.016 0.000 0.000
#> GSM149149 1 0.1296 0.72414 0.952 0.012 0.000 0.032 0.000 0.004
#> GSM149150 2 0.6578 0.20293 0.064 0.504 0.000 0.000 0.184 0.248
#> GSM149151 1 0.1908 0.71975 0.924 0.044 0.000 0.012 0.000 0.020
#> GSM149152 4 0.6424 0.32712 0.160 0.020 0.000 0.512 0.020 0.288
#> GSM149153 1 0.6335 0.14719 0.500 0.000 0.316 0.000 0.056 0.128
#> GSM149154 1 0.3198 0.69115 0.868 0.000 0.032 0.036 0.032 0.032
#> GSM149155 2 0.0993 0.70517 0.012 0.964 0.000 0.000 0.024 0.000
#> GSM149156 5 0.5100 0.12289 0.036 0.332 0.000 0.000 0.596 0.036
#> GSM149157 5 0.4961 0.32333 0.236 0.056 0.000 0.000 0.672 0.036
#> GSM149158 1 0.5887 0.33573 0.540 0.300 0.000 0.000 0.136 0.024
#> GSM149159 5 0.0820 0.58643 0.000 0.016 0.000 0.000 0.972 0.012
#> GSM149160 1 0.4671 0.56971 0.692 0.052 0.000 0.000 0.232 0.024
#> GSM149161 2 0.5271 0.44149 0.264 0.620 0.000 0.000 0.100 0.016
#> GSM149162 2 0.4337 0.41682 0.016 0.604 0.000 0.000 0.372 0.008
#> GSM149163 2 0.1391 0.70601 0.016 0.944 0.000 0.000 0.040 0.000
#> GSM149164 6 0.5788 0.33051 0.276 0.000 0.000 0.000 0.224 0.500
#> GSM149165 5 0.5761 0.33269 0.000 0.168 0.000 0.004 0.504 0.324
#> GSM149166 2 0.1218 0.69338 0.012 0.956 0.000 0.004 0.000 0.028
#> GSM149167 1 0.7402 0.22909 0.404 0.172 0.000 0.000 0.220 0.204
#> GSM149168 5 0.1700 0.58194 0.000 0.004 0.000 0.000 0.916 0.080
#> GSM149169 1 0.3000 0.70087 0.864 0.048 0.000 0.000 0.064 0.024
#> GSM149170 5 0.2006 0.56723 0.000 0.004 0.000 0.000 0.892 0.104
#> GSM149171 5 0.4275 0.23611 0.000 0.016 0.004 0.000 0.592 0.388
#> GSM149172 6 0.3998 0.29700 0.008 0.004 0.000 0.004 0.316 0.668
#> GSM149173 6 0.4048 0.26136 0.000 0.012 0.000 0.004 0.340 0.644
#> GSM149174 1 0.6150 0.10456 0.452 0.380 0.000 0.000 0.140 0.028
#> GSM149175 6 0.7913 0.33237 0.140 0.004 0.176 0.044 0.192 0.444
#> GSM149176 2 0.4498 0.57757 0.048 0.736 0.000 0.000 0.176 0.040
#> GSM149177 3 0.4071 0.71059 0.024 0.152 0.772 0.000 0.000 0.052
#> GSM149178 6 0.5254 0.39289 0.008 0.016 0.224 0.000 0.096 0.656
#> GSM149179 2 0.3082 0.63340 0.008 0.828 0.000 0.000 0.144 0.020
#> GSM149180 6 0.5021 0.23362 0.004 0.080 0.000 0.000 0.324 0.592
#> GSM149181 5 0.3897 0.56306 0.000 0.084 0.000 0.004 0.776 0.136
#> GSM149182 2 0.2052 0.69039 0.004 0.912 0.000 0.000 0.056 0.028
#> GSM149183 5 0.4644 0.43301 0.000 0.268 0.000 0.004 0.660 0.068
#> GSM149184 6 0.5952 -0.19120 0.000 0.168 0.000 0.008 0.380 0.444
#> GSM149185 5 0.3652 0.39953 0.000 0.004 0.000 0.000 0.672 0.324
#> GSM149186 5 0.3835 0.56270 0.000 0.188 0.000 0.000 0.756 0.056
#> GSM149187 5 0.4700 0.19609 0.000 0.340 0.000 0.000 0.600 0.060
#> GSM149188 2 0.5210 0.18351 0.000 0.532 0.000 0.004 0.380 0.084
#> GSM149189 5 0.5182 0.30747 0.004 0.004 0.192 0.000 0.648 0.152
#> GSM149190 2 0.4737 0.61041 0.152 0.712 0.000 0.000 0.120 0.016
#> GSM149191 5 0.2456 0.54954 0.048 0.000 0.008 0.000 0.892 0.052
#> GSM149192 5 0.2624 0.58325 0.000 0.124 0.000 0.000 0.856 0.020
#> GSM149193 5 0.4887 0.38569 0.000 0.088 0.000 0.000 0.612 0.300
#> GSM149194 1 0.5135 0.41891 0.584 0.040 0.000 0.000 0.344 0.032
#> GSM149195 3 0.5423 -0.00872 0.000 0.000 0.488 0.000 0.120 0.392
#> GSM149196 5 0.5798 0.18681 0.000 0.144 0.000 0.008 0.476 0.372
#> GSM149197 2 0.4378 0.59087 0.044 0.700 0.000 0.000 0.244 0.012
#> GSM149198 6 0.4475 0.17471 0.412 0.000 0.000 0.000 0.032 0.556
#> GSM149199 2 0.4397 0.48923 0.020 0.632 0.000 0.000 0.336 0.012
#> GSM149200 5 0.3163 0.48970 0.004 0.004 0.000 0.000 0.780 0.212
#> GSM149201 2 0.3163 0.59662 0.004 0.764 0.000 0.000 0.232 0.000
#> GSM149202 5 0.4427 0.10113 0.004 0.020 0.000 0.000 0.548 0.428
#> GSM149203 5 0.3722 0.44092 0.004 0.004 0.000 0.008 0.724 0.260
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> CV:NMF 101 4.00e-11 2
#> CV:NMF 99 1.09e-22 3
#> CV:NMF 89 7.26e-25 4
#> CV:NMF 84 5.63e-28 5
#> CV:NMF 68 1.59e-20 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "hclust"]
# you can also extract it by
# res = res_list["MAD:hclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.418 0.734 0.864 0.4135 0.596 0.596
#> 3 3 0.378 0.679 0.785 0.3714 0.914 0.857
#> 4 4 0.476 0.611 0.751 0.2216 0.789 0.612
#> 5 5 0.558 0.683 0.782 0.0921 0.846 0.579
#> 6 6 0.653 0.672 0.787 0.0534 0.980 0.913
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.794 1.000 0.000
#> GSM149100 1 0.0000 0.794 1.000 0.000
#> GSM149101 1 0.0000 0.794 1.000 0.000
#> GSM149102 1 0.0000 0.794 1.000 0.000
#> GSM149103 2 0.9129 0.555 0.328 0.672
#> GSM149104 1 0.0000 0.794 1.000 0.000
#> GSM149105 1 0.0000 0.794 1.000 0.000
#> GSM149106 2 0.9909 0.204 0.444 0.556
#> GSM149107 1 0.0000 0.794 1.000 0.000
#> GSM149108 1 0.0000 0.794 1.000 0.000
#> GSM149109 1 0.0000 0.794 1.000 0.000
#> GSM149110 1 0.0000 0.794 1.000 0.000
#> GSM149111 1 0.0000 0.794 1.000 0.000
#> GSM149112 1 0.0000 0.794 1.000 0.000
#> GSM149113 1 0.0000 0.794 1.000 0.000
#> GSM149114 1 0.0000 0.794 1.000 0.000
#> GSM149115 2 0.7674 0.683 0.224 0.776
#> GSM149116 1 0.8608 0.730 0.716 0.284
#> GSM149117 2 0.0000 0.845 0.000 1.000
#> GSM149118 1 0.8608 0.730 0.716 0.284
#> GSM149119 1 0.8608 0.730 0.716 0.284
#> GSM149120 1 0.8661 0.724 0.712 0.288
#> GSM149121 2 0.9833 0.126 0.424 0.576
#> GSM149122 1 0.8608 0.730 0.716 0.284
#> GSM149123 1 0.8713 0.722 0.708 0.292
#> GSM149124 1 0.8608 0.730 0.716 0.284
#> GSM149125 1 0.8661 0.724 0.712 0.288
#> GSM149126 1 0.8713 0.722 0.708 0.292
#> GSM149127 1 0.8608 0.730 0.716 0.284
#> GSM149128 1 0.8608 0.730 0.716 0.284
#> GSM149129 1 0.8608 0.730 0.716 0.284
#> GSM149130 2 0.7376 0.705 0.208 0.792
#> GSM149131 2 0.8499 0.592 0.276 0.724
#> GSM149132 1 0.8608 0.730 0.716 0.284
#> GSM149133 1 0.9427 0.588 0.640 0.360
#> GSM149134 2 0.1414 0.846 0.020 0.980
#> GSM149135 2 0.0672 0.846 0.008 0.992
#> GSM149136 2 0.0672 0.846 0.008 0.992
#> GSM149137 2 0.0672 0.846 0.008 0.992
#> GSM149138 2 0.1184 0.846 0.016 0.984
#> GSM149139 2 0.0672 0.846 0.008 0.992
#> GSM149140 2 0.0672 0.846 0.008 0.992
#> GSM149141 2 0.9580 0.478 0.380 0.620
#> GSM149142 2 0.0000 0.845 0.000 1.000
#> GSM149143 2 0.9248 0.560 0.340 0.660
#> GSM149144 2 0.0000 0.845 0.000 1.000
#> GSM149145 2 0.9552 0.490 0.376 0.624
#> GSM149146 2 0.0376 0.846 0.004 0.996
#> GSM149147 2 0.0672 0.846 0.008 0.992
#> GSM149148 2 0.0672 0.846 0.008 0.992
#> GSM149149 2 0.0672 0.846 0.008 0.992
#> GSM149150 2 0.2043 0.845 0.032 0.968
#> GSM149151 2 0.0672 0.846 0.008 0.992
#> GSM149152 2 0.2948 0.834 0.052 0.948
#> GSM149153 2 0.9552 0.490 0.376 0.624
#> GSM149154 2 0.9323 0.548 0.348 0.652
#> GSM149155 2 0.0000 0.845 0.000 1.000
#> GSM149156 2 0.0376 0.846 0.004 0.996
#> GSM149157 2 0.2236 0.843 0.036 0.964
#> GSM149158 2 0.1843 0.845 0.028 0.972
#> GSM149159 2 0.8909 0.623 0.308 0.692
#> GSM149160 2 0.1843 0.845 0.028 0.972
#> GSM149161 2 0.0672 0.847 0.008 0.992
#> GSM149162 2 0.0000 0.845 0.000 1.000
#> GSM149163 2 0.0000 0.845 0.000 1.000
#> GSM149164 2 0.4939 0.807 0.108 0.892
#> GSM149165 2 0.1843 0.846 0.028 0.972
#> GSM149166 2 0.0000 0.845 0.000 1.000
#> GSM149167 2 0.0000 0.845 0.000 1.000
#> GSM149168 2 0.9427 0.538 0.360 0.640
#> GSM149169 2 0.1843 0.845 0.028 0.972
#> GSM149170 2 0.8955 0.616 0.312 0.688
#> GSM149171 2 0.8813 0.635 0.300 0.700
#> GSM149172 2 0.9795 0.415 0.416 0.584
#> GSM149173 2 0.9358 0.549 0.352 0.648
#> GSM149174 2 0.1843 0.845 0.028 0.972
#> GSM149175 2 0.9896 0.333 0.440 0.560
#> GSM149176 2 0.3431 0.829 0.064 0.936
#> GSM149177 2 0.9129 0.557 0.328 0.672
#> GSM149178 2 0.9248 0.545 0.340 0.660
#> GSM149179 2 0.0376 0.846 0.004 0.996
#> GSM149180 2 0.0376 0.846 0.004 0.996
#> GSM149181 2 0.7139 0.743 0.196 0.804
#> GSM149182 2 0.0000 0.845 0.000 1.000
#> GSM149183 2 0.1843 0.845 0.028 0.972
#> GSM149184 2 0.0000 0.845 0.000 1.000
#> GSM149185 2 0.8443 0.669 0.272 0.728
#> GSM149186 2 0.2603 0.840 0.044 0.956
#> GSM149187 2 0.0000 0.845 0.000 1.000
#> GSM149188 2 0.2043 0.844 0.032 0.968
#> GSM149189 2 0.9393 0.550 0.356 0.644
#> GSM149190 2 0.0000 0.845 0.000 1.000
#> GSM149191 2 0.9044 0.594 0.320 0.680
#> GSM149192 2 0.2603 0.841 0.044 0.956
#> GSM149193 2 0.2236 0.843 0.036 0.964
#> GSM149194 2 0.2236 0.843 0.036 0.964
#> GSM149195 1 0.9996 -0.143 0.512 0.488
#> GSM149196 2 0.0000 0.845 0.000 1.000
#> GSM149197 2 0.0000 0.845 0.000 1.000
#> GSM149198 2 0.1414 0.846 0.020 0.980
#> GSM149199 2 0.0000 0.845 0.000 1.000
#> GSM149200 2 0.8909 0.621 0.308 0.692
#> GSM149201 2 0.0000 0.845 0.000 1.000
#> GSM149202 2 0.7299 0.736 0.204 0.796
#> GSM149203 2 0.9522 0.515 0.372 0.628
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149100 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149101 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149102 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149103 2 0.7918 0.51218 0.076 0.596 0.328
#> GSM149104 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149105 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149106 2 0.7905 0.21514 0.056 0.500 0.444
#> GSM149107 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149108 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149109 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149110 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149111 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149112 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149113 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149114 3 0.0424 0.94213 0.008 0.000 0.992
#> GSM149115 1 0.7905 -0.13634 0.500 0.444 0.056
#> GSM149116 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149117 2 0.4291 0.68911 0.180 0.820 0.000
#> GSM149118 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149119 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149120 1 0.4110 0.86561 0.844 0.004 0.152
#> GSM149121 1 0.5956 0.57103 0.768 0.188 0.044
#> GSM149122 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149123 1 0.4291 0.86395 0.840 0.008 0.152
#> GSM149124 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149125 1 0.4110 0.86561 0.844 0.004 0.152
#> GSM149126 1 0.4291 0.86395 0.840 0.008 0.152
#> GSM149127 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149128 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149129 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149130 2 0.7920 0.19625 0.468 0.476 0.056
#> GSM149131 1 0.7931 0.00958 0.528 0.412 0.060
#> GSM149132 1 0.3879 0.86699 0.848 0.000 0.152
#> GSM149133 1 0.6062 0.79355 0.780 0.072 0.148
#> GSM149134 2 0.6724 0.52999 0.420 0.568 0.012
#> GSM149135 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149136 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149137 2 0.6095 0.53834 0.392 0.608 0.000
#> GSM149138 2 0.6565 0.53888 0.416 0.576 0.008
#> GSM149139 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149140 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149141 2 0.8655 0.46081 0.108 0.512 0.380
#> GSM149142 2 0.5621 0.62925 0.308 0.692 0.000
#> GSM149143 2 0.8452 0.53704 0.104 0.556 0.340
#> GSM149144 2 0.2448 0.74632 0.076 0.924 0.000
#> GSM149145 2 0.8643 0.47113 0.108 0.516 0.376
#> GSM149146 2 0.1267 0.74268 0.024 0.972 0.004
#> GSM149147 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149148 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149149 2 0.6026 0.56187 0.376 0.624 0.000
#> GSM149150 2 0.4874 0.72630 0.144 0.828 0.028
#> GSM149151 2 0.6008 0.56311 0.372 0.628 0.000
#> GSM149152 2 0.6421 0.51964 0.424 0.572 0.004
#> GSM149153 2 0.8643 0.47113 0.108 0.516 0.376
#> GSM149154 2 0.8769 0.51867 0.124 0.528 0.348
#> GSM149155 2 0.0424 0.74074 0.008 0.992 0.000
#> GSM149156 2 0.2200 0.74727 0.056 0.940 0.004
#> GSM149157 2 0.5355 0.73505 0.168 0.800 0.032
#> GSM149158 2 0.5178 0.73413 0.164 0.808 0.028
#> GSM149159 2 0.6935 0.59779 0.036 0.652 0.312
#> GSM149160 2 0.5178 0.73413 0.164 0.808 0.028
#> GSM149161 2 0.4291 0.73604 0.152 0.840 0.008
#> GSM149162 2 0.0747 0.74134 0.016 0.984 0.000
#> GSM149163 2 0.0424 0.74074 0.008 0.992 0.000
#> GSM149164 2 0.7457 0.70777 0.208 0.688 0.104
#> GSM149165 2 0.2031 0.74544 0.016 0.952 0.032
#> GSM149166 2 0.2537 0.72996 0.080 0.920 0.000
#> GSM149167 2 0.3941 0.73023 0.156 0.844 0.000
#> GSM149168 2 0.7517 0.52786 0.048 0.588 0.364
#> GSM149169 2 0.4937 0.73827 0.148 0.824 0.028
#> GSM149170 2 0.6651 0.59259 0.024 0.656 0.320
#> GSM149171 2 0.6445 0.59684 0.020 0.672 0.308
#> GSM149172 2 0.7517 0.44512 0.040 0.540 0.420
#> GSM149173 2 0.7209 0.52765 0.036 0.604 0.360
#> GSM149174 2 0.5292 0.73274 0.172 0.800 0.028
#> GSM149175 2 0.8203 0.36667 0.072 0.484 0.444
#> GSM149176 2 0.3045 0.74847 0.020 0.916 0.064
#> GSM149177 2 0.7683 0.51661 0.064 0.608 0.328
#> GSM149178 2 0.7685 0.50787 0.060 0.596 0.344
#> GSM149179 2 0.1129 0.74438 0.020 0.976 0.004
#> GSM149180 2 0.0983 0.74263 0.016 0.980 0.004
#> GSM149181 2 0.5455 0.67271 0.020 0.776 0.204
#> GSM149182 2 0.0747 0.74090 0.016 0.984 0.000
#> GSM149183 2 0.1751 0.74460 0.012 0.960 0.028
#> GSM149184 2 0.0747 0.74534 0.016 0.984 0.000
#> GSM149185 2 0.6355 0.63121 0.024 0.696 0.280
#> GSM149186 2 0.2636 0.74688 0.020 0.932 0.048
#> GSM149187 2 0.1860 0.74590 0.052 0.948 0.000
#> GSM149188 2 0.1877 0.74450 0.012 0.956 0.032
#> GSM149189 2 0.6490 0.55414 0.012 0.628 0.360
#> GSM149190 2 0.2878 0.74269 0.096 0.904 0.000
#> GSM149191 2 0.8354 0.56577 0.104 0.576 0.320
#> GSM149192 2 0.2229 0.74410 0.012 0.944 0.044
#> GSM149193 2 0.2414 0.74564 0.020 0.940 0.040
#> GSM149194 2 0.5355 0.73461 0.168 0.800 0.032
#> GSM149195 3 0.6941 -0.25390 0.016 0.464 0.520
#> GSM149196 2 0.0592 0.74463 0.012 0.988 0.000
#> GSM149197 2 0.0592 0.74154 0.012 0.988 0.000
#> GSM149198 2 0.6724 0.52999 0.420 0.568 0.012
#> GSM149199 2 0.2711 0.74390 0.088 0.912 0.000
#> GSM149200 2 0.6625 0.59613 0.024 0.660 0.316
#> GSM149201 2 0.0747 0.74090 0.016 0.984 0.000
#> GSM149202 2 0.5680 0.67097 0.024 0.764 0.212
#> GSM149203 2 0.7567 0.51367 0.048 0.576 0.376
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149100 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149101 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149102 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149103 2 0.8154 0.324 0.260 0.420 0.308 0.012
#> GSM149104 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149105 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149106 3 0.7875 -0.132 0.256 0.296 0.444 0.004
#> GSM149107 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149108 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149109 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149110 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149111 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149112 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149113 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149114 3 0.0336 0.955 0.000 0.000 0.992 0.008
#> GSM149115 1 0.6454 0.419 0.544 0.076 0.000 0.380
#> GSM149116 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149117 1 0.5691 0.205 0.564 0.408 0.000 0.028
#> GSM149118 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149119 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149120 4 0.0657 0.959 0.000 0.004 0.012 0.984
#> GSM149121 4 0.5446 0.389 0.340 0.020 0.004 0.636
#> GSM149122 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149123 4 0.0804 0.956 0.008 0.000 0.012 0.980
#> GSM149124 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149125 4 0.0657 0.959 0.000 0.004 0.012 0.984
#> GSM149126 4 0.0804 0.956 0.008 0.000 0.012 0.980
#> GSM149127 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149128 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149129 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149130 1 0.6714 0.485 0.540 0.100 0.000 0.360
#> GSM149131 1 0.6750 0.304 0.472 0.092 0.000 0.436
#> GSM149132 4 0.0469 0.961 0.000 0.000 0.012 0.988
#> GSM149133 4 0.2933 0.870 0.080 0.012 0.012 0.896
#> GSM149134 1 0.3496 0.719 0.872 0.072 0.004 0.052
#> GSM149135 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149136 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149137 1 0.3009 0.782 0.892 0.052 0.000 0.056
#> GSM149138 1 0.3648 0.737 0.864 0.076 0.004 0.056
#> GSM149139 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149140 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149141 2 0.7513 0.390 0.152 0.524 0.312 0.012
#> GSM149142 1 0.4485 0.639 0.772 0.200 0.000 0.028
#> GSM149143 2 0.7419 0.441 0.180 0.548 0.264 0.008
#> GSM149144 2 0.5125 0.420 0.376 0.616 0.004 0.004
#> GSM149145 2 0.7439 0.398 0.144 0.532 0.312 0.012
#> GSM149146 2 0.4252 0.527 0.252 0.744 0.000 0.004
#> GSM149147 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149148 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149149 1 0.3383 0.791 0.872 0.076 0.000 0.052
#> GSM149150 2 0.5819 0.393 0.368 0.600 0.016 0.016
#> GSM149151 1 0.3570 0.784 0.860 0.092 0.000 0.048
#> GSM149152 1 0.4168 0.734 0.828 0.092 0.000 0.080
#> GSM149153 2 0.7439 0.398 0.144 0.532 0.312 0.012
#> GSM149154 2 0.7541 0.421 0.188 0.528 0.276 0.008
#> GSM149155 2 0.4302 0.535 0.236 0.756 0.004 0.004
#> GSM149156 2 0.4632 0.500 0.308 0.688 0.004 0.000
#> GSM149157 2 0.5539 0.292 0.432 0.552 0.008 0.008
#> GSM149158 2 0.5427 0.269 0.444 0.544 0.004 0.008
#> GSM149159 2 0.5874 0.546 0.064 0.688 0.240 0.008
#> GSM149160 2 0.5427 0.269 0.444 0.544 0.004 0.008
#> GSM149161 2 0.5250 0.297 0.440 0.552 0.000 0.008
#> GSM149162 2 0.4431 0.527 0.252 0.740 0.004 0.004
#> GSM149163 2 0.4268 0.537 0.232 0.760 0.004 0.004
#> GSM149164 2 0.6546 0.264 0.404 0.536 0.040 0.020
#> GSM149165 2 0.3969 0.569 0.180 0.804 0.016 0.000
#> GSM149166 2 0.5095 0.370 0.368 0.624 0.004 0.004
#> GSM149167 1 0.5168 -0.190 0.504 0.492 0.004 0.000
#> GSM149168 2 0.6375 0.466 0.080 0.636 0.276 0.008
#> GSM149169 2 0.5433 0.267 0.448 0.540 0.008 0.004
#> GSM149170 2 0.5636 0.540 0.060 0.700 0.236 0.004
#> GSM149171 2 0.5539 0.542 0.060 0.712 0.224 0.004
#> GSM149172 2 0.6521 0.397 0.072 0.592 0.328 0.008
#> GSM149173 2 0.6002 0.470 0.068 0.660 0.268 0.004
#> GSM149174 2 0.5658 0.249 0.452 0.528 0.004 0.016
#> GSM149175 2 0.7129 0.335 0.100 0.528 0.360 0.012
#> GSM149176 2 0.5608 0.541 0.256 0.684 0.060 0.000
#> GSM149177 2 0.7820 0.306 0.276 0.412 0.312 0.000
#> GSM149178 2 0.7886 0.349 0.248 0.436 0.312 0.004
#> GSM149179 2 0.4400 0.537 0.248 0.744 0.004 0.004
#> GSM149180 2 0.4155 0.537 0.240 0.756 0.004 0.000
#> GSM149181 2 0.4333 0.567 0.056 0.820 0.120 0.004
#> GSM149182 2 0.4335 0.531 0.240 0.752 0.004 0.004
#> GSM149183 2 0.3895 0.567 0.184 0.804 0.012 0.000
#> GSM149184 2 0.4401 0.521 0.272 0.724 0.000 0.004
#> GSM149185 2 0.5701 0.557 0.080 0.712 0.204 0.004
#> GSM149186 2 0.3863 0.573 0.176 0.812 0.008 0.004
#> GSM149187 2 0.4535 0.509 0.292 0.704 0.004 0.000
#> GSM149188 2 0.3672 0.572 0.164 0.824 0.012 0.000
#> GSM149189 2 0.5697 0.517 0.052 0.656 0.292 0.000
#> GSM149190 2 0.4936 0.433 0.372 0.624 0.004 0.000
#> GSM149191 2 0.7422 0.457 0.180 0.564 0.244 0.012
#> GSM149192 2 0.4199 0.577 0.164 0.804 0.032 0.000
#> GSM149193 2 0.3819 0.572 0.172 0.816 0.008 0.004
#> GSM149194 2 0.5539 0.287 0.432 0.552 0.008 0.008
#> GSM149195 2 0.6298 0.199 0.048 0.508 0.440 0.004
#> GSM149196 2 0.4155 0.546 0.240 0.756 0.000 0.004
#> GSM149197 2 0.3837 0.550 0.224 0.776 0.000 0.000
#> GSM149198 1 0.3496 0.719 0.872 0.072 0.004 0.052
#> GSM149199 2 0.4936 0.444 0.372 0.624 0.004 0.000
#> GSM149200 2 0.5604 0.543 0.060 0.704 0.232 0.004
#> GSM149201 2 0.4302 0.535 0.236 0.756 0.004 0.004
#> GSM149202 2 0.4890 0.566 0.080 0.776 0.144 0.000
#> GSM149203 2 0.6445 0.452 0.080 0.624 0.288 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149103 2 0.8095 0.0478 0.112 0.428 0.248 0.004 0.208
#> GSM149104 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.7288 -0.0380 0.096 0.396 0.428 0.004 0.076
#> GSM149107 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 0.9540 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.6275 0.4045 0.552 0.076 0.000 0.336 0.036
#> GSM149116 4 0.0290 0.9584 0.000 0.000 0.008 0.992 0.000
#> GSM149117 2 0.5697 0.2794 0.312 0.604 0.000 0.016 0.068
#> GSM149118 4 0.0290 0.9584 0.000 0.000 0.008 0.992 0.000
#> GSM149119 4 0.0290 0.9584 0.000 0.000 0.008 0.992 0.000
#> GSM149120 4 0.0451 0.9579 0.004 0.000 0.008 0.988 0.000
#> GSM149121 4 0.5174 0.3741 0.340 0.000 0.000 0.604 0.056
#> GSM149122 4 0.0290 0.9584 0.000 0.000 0.008 0.992 0.000
#> GSM149123 4 0.0798 0.9531 0.016 0.000 0.008 0.976 0.000
#> GSM149124 4 0.0290 0.9584 0.000 0.000 0.008 0.992 0.000
#> GSM149125 4 0.0451 0.9579 0.004 0.000 0.008 0.988 0.000
#> GSM149126 4 0.0798 0.9531 0.016 0.000 0.008 0.976 0.000
#> GSM149127 4 0.0290 0.9584 0.000 0.000 0.008 0.992 0.000
#> GSM149128 4 0.0579 0.9576 0.008 0.000 0.008 0.984 0.000
#> GSM149129 4 0.0579 0.9576 0.008 0.000 0.008 0.984 0.000
#> GSM149130 1 0.6478 0.4700 0.540 0.112 0.000 0.320 0.028
#> GSM149131 1 0.6296 0.3152 0.488 0.100 0.000 0.396 0.016
#> GSM149132 4 0.0579 0.9576 0.008 0.000 0.008 0.984 0.000
#> GSM149133 4 0.2692 0.8680 0.092 0.000 0.008 0.884 0.016
#> GSM149134 1 0.3489 0.6816 0.784 0.004 0.000 0.004 0.208
#> GSM149135 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149136 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149137 1 0.2519 0.7969 0.884 0.100 0.000 0.000 0.016
#> GSM149138 1 0.3929 0.7215 0.788 0.036 0.000 0.004 0.172
#> GSM149139 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149140 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149141 5 0.7526 0.6819 0.112 0.200 0.172 0.000 0.516
#> GSM149142 1 0.4292 0.5732 0.704 0.272 0.000 0.000 0.024
#> GSM149143 5 0.6625 0.7033 0.112 0.164 0.100 0.000 0.624
#> GSM149144 2 0.3730 0.6514 0.152 0.808 0.000 0.004 0.036
#> GSM149145 5 0.7559 0.6837 0.116 0.204 0.168 0.000 0.512
#> GSM149146 2 0.1547 0.6740 0.016 0.948 0.000 0.004 0.032
#> GSM149147 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149148 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149149 1 0.2424 0.8055 0.868 0.132 0.000 0.000 0.000
#> GSM149150 2 0.5274 0.4949 0.192 0.676 0.000 0.000 0.132
#> GSM149151 1 0.2909 0.7960 0.848 0.140 0.000 0.000 0.012
#> GSM149152 1 0.4370 0.7237 0.784 0.032 0.000 0.036 0.148
#> GSM149153 5 0.7559 0.6837 0.116 0.204 0.168 0.000 0.512
#> GSM149154 5 0.7022 0.6992 0.124 0.172 0.120 0.000 0.584
#> GSM149155 2 0.0486 0.6704 0.004 0.988 0.000 0.004 0.004
#> GSM149156 2 0.3075 0.6722 0.092 0.860 0.000 0.000 0.048
#> GSM149157 2 0.6540 0.3487 0.288 0.476 0.000 0.000 0.236
#> GSM149158 2 0.6498 0.3661 0.292 0.484 0.000 0.000 0.224
#> GSM149159 5 0.5316 0.6761 0.000 0.348 0.064 0.000 0.588
#> GSM149160 2 0.6498 0.3661 0.292 0.484 0.000 0.000 0.224
#> GSM149161 2 0.6005 0.4715 0.276 0.568 0.000 0.000 0.156
#> GSM149162 2 0.2536 0.6782 0.052 0.900 0.000 0.004 0.044
#> GSM149163 2 0.1377 0.6761 0.020 0.956 0.000 0.004 0.020
#> GSM149164 5 0.6455 0.3061 0.320 0.200 0.000 0.000 0.480
#> GSM149165 2 0.2068 0.6397 0.004 0.904 0.000 0.000 0.092
#> GSM149166 2 0.3497 0.6208 0.112 0.836 0.000 0.004 0.048
#> GSM149167 2 0.6470 0.3624 0.348 0.460 0.000 0.000 0.192
#> GSM149168 5 0.4860 0.7343 0.004 0.228 0.064 0.000 0.704
#> GSM149169 2 0.6284 0.4160 0.288 0.524 0.000 0.000 0.188
#> GSM149170 5 0.5114 0.6748 0.000 0.340 0.052 0.000 0.608
#> GSM149171 5 0.4890 0.6825 0.000 0.332 0.040 0.000 0.628
#> GSM149172 5 0.5246 0.7303 0.004 0.180 0.124 0.000 0.692
#> GSM149173 5 0.4976 0.7347 0.004 0.228 0.072 0.000 0.696
#> GSM149174 2 0.6627 0.3762 0.300 0.480 0.000 0.004 0.216
#> GSM149175 5 0.6749 0.7038 0.044 0.188 0.192 0.000 0.576
#> GSM149176 2 0.3106 0.6530 0.020 0.872 0.028 0.000 0.080
#> GSM149177 2 0.7896 0.1122 0.108 0.440 0.252 0.000 0.200
#> GSM149178 2 0.8153 -0.0913 0.092 0.372 0.244 0.004 0.288
#> GSM149179 2 0.1484 0.6676 0.008 0.944 0.000 0.000 0.048
#> GSM149180 2 0.0963 0.6696 0.000 0.964 0.000 0.000 0.036
#> GSM149181 5 0.4448 0.4452 0.000 0.480 0.004 0.000 0.516
#> GSM149182 2 0.0566 0.6682 0.000 0.984 0.000 0.004 0.012
#> GSM149183 2 0.2179 0.6183 0.000 0.888 0.000 0.000 0.112
#> GSM149184 2 0.2388 0.6601 0.028 0.900 0.000 0.000 0.072
#> GSM149185 5 0.5118 0.5700 0.000 0.412 0.040 0.000 0.548
#> GSM149186 2 0.3053 0.5736 0.008 0.828 0.000 0.000 0.164
#> GSM149187 2 0.3255 0.6630 0.100 0.848 0.000 0.000 0.052
#> GSM149188 2 0.2605 0.5740 0.000 0.852 0.000 0.000 0.148
#> GSM149189 5 0.6080 0.6656 0.000 0.332 0.140 0.000 0.528
#> GSM149190 2 0.4049 0.6341 0.164 0.780 0.000 0.000 0.056
#> GSM149191 5 0.6443 0.7030 0.104 0.176 0.084 0.000 0.636
#> GSM149192 2 0.2813 0.5543 0.000 0.832 0.000 0.000 0.168
#> GSM149193 2 0.2848 0.5844 0.000 0.840 0.000 0.004 0.156
#> GSM149194 2 0.6540 0.3438 0.288 0.476 0.000 0.000 0.236
#> GSM149195 5 0.6407 0.6016 0.004 0.176 0.304 0.000 0.516
#> GSM149196 2 0.1830 0.6624 0.008 0.924 0.000 0.000 0.068
#> GSM149197 2 0.2144 0.6645 0.020 0.912 0.000 0.000 0.068
#> GSM149198 1 0.3489 0.6816 0.784 0.004 0.000 0.004 0.208
#> GSM149199 2 0.3667 0.6501 0.140 0.812 0.000 0.000 0.048
#> GSM149200 5 0.5128 0.6712 0.000 0.344 0.052 0.000 0.604
#> GSM149201 2 0.0671 0.6691 0.000 0.980 0.000 0.004 0.016
#> GSM149202 5 0.4653 0.4687 0.000 0.472 0.012 0.000 0.516
#> GSM149203 5 0.4732 0.7354 0.000 0.208 0.076 0.000 0.716
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149100 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149101 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149102 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149103 2 0.8861 -0.178 0.128 0.252 0.216 0.000 0.200 NA
#> GSM149104 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149105 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149106 3 0.7768 0.147 0.116 0.256 0.404 0.000 0.032 NA
#> GSM149107 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 NA
#> GSM149108 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149109 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149110 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149111 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149112 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149113 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 NA
#> GSM149114 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 NA
#> GSM149115 1 0.5342 0.371 0.576 0.016 0.000 0.324 0.000 NA
#> GSM149116 4 0.0146 0.956 0.000 0.000 0.000 0.996 0.000 NA
#> GSM149117 1 0.6210 0.112 0.384 0.328 0.000 0.004 0.000 NA
#> GSM149118 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149119 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149120 4 0.0146 0.957 0.000 0.000 0.000 0.996 0.000 NA
#> GSM149121 4 0.5251 0.381 0.288 0.000 0.000 0.592 0.004 NA
#> GSM149122 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149123 4 0.0458 0.952 0.016 0.000 0.000 0.984 0.000 NA
#> GSM149124 4 0.0260 0.955 0.000 0.000 0.000 0.992 0.000 NA
#> GSM149125 4 0.0146 0.957 0.000 0.000 0.000 0.996 0.000 NA
#> GSM149126 4 0.0458 0.952 0.016 0.000 0.000 0.984 0.000 NA
#> GSM149127 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 NA
#> GSM149128 4 0.0260 0.957 0.008 0.000 0.000 0.992 0.000 NA
#> GSM149129 4 0.0260 0.957 0.008 0.000 0.000 0.992 0.000 NA
#> GSM149130 1 0.5638 0.445 0.576 0.052 0.000 0.308 0.000 NA
#> GSM149131 1 0.5628 0.297 0.516 0.048 0.000 0.384 0.000 NA
#> GSM149132 4 0.0260 0.957 0.008 0.000 0.000 0.992 0.000 NA
#> GSM149133 4 0.2294 0.869 0.072 0.000 0.000 0.892 0.000 NA
#> GSM149134 1 0.4097 0.519 0.500 0.000 0.000 0.000 0.008 NA
#> GSM149135 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149136 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149137 1 0.1168 0.744 0.956 0.016 0.000 0.000 0.000 NA
#> GSM149138 1 0.4194 0.608 0.628 0.012 0.000 0.000 0.008 NA
#> GSM149139 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149140 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149141 5 0.6346 0.659 0.088 0.052 0.124 0.000 0.640 NA
#> GSM149142 1 0.3917 0.544 0.752 0.204 0.000 0.000 0.032 NA
#> GSM149143 5 0.5641 0.663 0.104 0.044 0.060 0.000 0.700 NA
#> GSM149144 2 0.3946 0.679 0.152 0.780 0.000 0.000 0.024 NA
#> GSM149145 5 0.6408 0.661 0.096 0.056 0.120 0.000 0.636 NA
#> GSM149146 2 0.2089 0.695 0.020 0.916 0.000 0.000 0.020 NA
#> GSM149147 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149148 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149149 1 0.1141 0.761 0.948 0.052 0.000 0.000 0.000 NA
#> GSM149150 2 0.5385 0.506 0.208 0.640 0.000 0.000 0.128 NA
#> GSM149151 1 0.1657 0.753 0.928 0.056 0.000 0.000 0.016 NA
#> GSM149152 1 0.4969 0.607 0.620 0.012 0.000 0.032 0.016 NA
#> GSM149153 5 0.6408 0.661 0.096 0.056 0.120 0.000 0.636 NA
#> GSM149154 5 0.5809 0.658 0.112 0.036 0.084 0.000 0.684 NA
#> GSM149155 2 0.0767 0.696 0.008 0.976 0.000 0.000 0.004 NA
#> GSM149156 2 0.3300 0.697 0.096 0.840 0.000 0.000 0.036 NA
#> GSM149157 2 0.7064 0.396 0.264 0.436 0.000 0.000 0.200 NA
#> GSM149158 2 0.7018 0.407 0.280 0.436 0.000 0.000 0.188 NA
#> GSM149159 5 0.4469 0.614 0.004 0.252 0.024 0.000 0.696 NA
#> GSM149160 2 0.7018 0.407 0.280 0.436 0.000 0.000 0.188 NA
#> GSM149161 2 0.6398 0.507 0.264 0.532 0.000 0.000 0.128 NA
#> GSM149162 2 0.2816 0.704 0.060 0.876 0.000 0.000 0.028 NA
#> GSM149163 2 0.1616 0.703 0.028 0.940 0.000 0.000 0.012 NA
#> GSM149164 5 0.6772 0.274 0.288 0.100 0.000 0.000 0.476 NA
#> GSM149165 2 0.2006 0.684 0.000 0.904 0.000 0.000 0.080 NA
#> GSM149166 2 0.4330 0.596 0.132 0.744 0.000 0.000 0.008 NA
#> GSM149167 2 0.7183 0.291 0.328 0.388 0.000 0.000 0.148 NA
#> GSM149168 5 0.3044 0.701 0.000 0.076 0.028 0.000 0.860 NA
#> GSM149169 2 0.6795 0.436 0.288 0.468 0.000 0.000 0.156 NA
#> GSM149170 5 0.3984 0.633 0.000 0.224 0.028 0.000 0.736 NA
#> GSM149171 5 0.3827 0.646 0.000 0.212 0.024 0.000 0.752 NA
#> GSM149172 5 0.2744 0.685 0.000 0.000 0.064 0.000 0.864 NA
#> GSM149173 5 0.3088 0.702 0.000 0.064 0.032 0.000 0.860 NA
#> GSM149174 2 0.6993 0.412 0.292 0.432 0.000 0.000 0.184 NA
#> GSM149175 5 0.5087 0.677 0.024 0.028 0.128 0.000 0.724 NA
#> GSM149176 2 0.4093 0.655 0.028 0.804 0.016 0.000 0.076 NA
#> GSM149177 2 0.8815 -0.118 0.124 0.272 0.220 0.000 0.184 NA
#> GSM149178 5 0.8779 0.207 0.108 0.220 0.192 0.000 0.264 NA
#> GSM149179 2 0.1657 0.695 0.012 0.936 0.000 0.000 0.040 NA
#> GSM149180 2 0.1232 0.696 0.004 0.956 0.000 0.000 0.024 NA
#> GSM149181 5 0.3992 0.459 0.000 0.364 0.000 0.000 0.624 NA
#> GSM149182 2 0.0777 0.694 0.004 0.972 0.000 0.000 0.000 NA
#> GSM149183 2 0.2261 0.662 0.004 0.884 0.000 0.000 0.104 NA
#> GSM149184 2 0.2484 0.685 0.024 0.896 0.000 0.000 0.036 NA
#> GSM149185 5 0.4574 0.515 0.004 0.324 0.020 0.000 0.636 NA
#> GSM149186 2 0.3321 0.604 0.008 0.796 0.000 0.000 0.180 NA
#> GSM149187 2 0.3576 0.688 0.120 0.816 0.000 0.000 0.032 NA
#> GSM149188 2 0.2734 0.625 0.004 0.840 0.000 0.000 0.148 NA
#> GSM149189 5 0.5352 0.626 0.000 0.224 0.088 0.000 0.648 NA
#> GSM149190 2 0.4332 0.658 0.180 0.744 0.000 0.000 0.044 NA
#> GSM149191 5 0.5514 0.664 0.092 0.056 0.048 0.000 0.712 NA
#> GSM149192 2 0.2738 0.598 0.000 0.820 0.000 0.000 0.176 NA
#> GSM149193 2 0.3104 0.602 0.000 0.800 0.000 0.000 0.184 NA
#> GSM149194 2 0.7107 0.390 0.268 0.428 0.000 0.000 0.200 NA
#> GSM149195 5 0.5697 0.576 0.000 0.040 0.228 0.000 0.612 NA
#> GSM149196 2 0.1788 0.691 0.004 0.928 0.000 0.000 0.040 NA
#> GSM149197 2 0.2326 0.697 0.028 0.900 0.000 0.000 0.060 NA
#> GSM149198 1 0.4097 0.519 0.500 0.000 0.000 0.000 0.008 NA
#> GSM149199 2 0.3855 0.678 0.148 0.788 0.000 0.000 0.032 NA
#> GSM149200 5 0.4011 0.630 0.000 0.228 0.028 0.000 0.732 NA
#> GSM149201 2 0.0951 0.695 0.004 0.968 0.000 0.000 0.008 NA
#> GSM149202 5 0.4255 0.424 0.000 0.380 0.004 0.000 0.600 NA
#> GSM149203 5 0.2614 0.700 0.000 0.024 0.036 0.000 0.888 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:hclust 97 5.54e-13 2
#> MAD:hclust 95 9.20e-28 3
#> MAD:hclust 69 4.32e-27 4
#> MAD:hclust 84 3.00e-32 5
#> MAD:hclust 86 7.79e-33 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "kmeans"]
# you can also extract it by
# res = res_list["MAD:kmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.375 0.871 0.908 0.4242 0.558 0.558
#> 3 3 0.601 0.781 0.876 0.4119 0.736 0.566
#> 4 4 0.620 0.727 0.818 0.1976 0.791 0.529
#> 5 5 0.742 0.759 0.843 0.0940 0.803 0.432
#> 6 6 0.756 0.776 0.834 0.0485 0.945 0.749
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.6887 0.863 0.816 0.184
#> GSM149100 1 0.6887 0.863 0.816 0.184
#> GSM149101 1 0.6887 0.863 0.816 0.184
#> GSM149102 1 0.6887 0.863 0.816 0.184
#> GSM149103 1 0.8661 0.743 0.712 0.288
#> GSM149104 1 0.6887 0.863 0.816 0.184
#> GSM149105 1 0.6887 0.863 0.816 0.184
#> GSM149106 1 0.6887 0.863 0.816 0.184
#> GSM149107 1 0.6887 0.863 0.816 0.184
#> GSM149108 1 0.6801 0.863 0.820 0.180
#> GSM149109 1 0.6887 0.863 0.816 0.184
#> GSM149110 1 0.6887 0.863 0.816 0.184
#> GSM149111 1 0.6887 0.863 0.816 0.184
#> GSM149112 1 0.6887 0.863 0.816 0.184
#> GSM149113 1 0.6887 0.863 0.816 0.184
#> GSM149114 1 0.6887 0.863 0.816 0.184
#> GSM149115 2 0.8207 0.727 0.256 0.744
#> GSM149116 1 0.4815 0.855 0.896 0.104
#> GSM149117 2 0.5629 0.829 0.132 0.868
#> GSM149118 1 0.4815 0.855 0.896 0.104
#> GSM149119 1 0.4815 0.855 0.896 0.104
#> GSM149120 1 0.4815 0.855 0.896 0.104
#> GSM149121 1 0.4815 0.855 0.896 0.104
#> GSM149122 1 0.4815 0.855 0.896 0.104
#> GSM149123 1 0.4815 0.855 0.896 0.104
#> GSM149124 1 0.4815 0.855 0.896 0.104
#> GSM149125 1 0.4815 0.855 0.896 0.104
#> GSM149126 1 0.4815 0.855 0.896 0.104
#> GSM149127 1 0.4815 0.855 0.896 0.104
#> GSM149128 1 0.4815 0.855 0.896 0.104
#> GSM149129 1 0.4815 0.855 0.896 0.104
#> GSM149130 2 0.7528 0.776 0.216 0.784
#> GSM149131 2 0.8207 0.727 0.256 0.744
#> GSM149132 1 0.4815 0.855 0.896 0.104
#> GSM149133 1 0.4815 0.855 0.896 0.104
#> GSM149134 2 0.7883 0.753 0.236 0.764
#> GSM149135 2 0.7528 0.776 0.216 0.784
#> GSM149136 2 0.7528 0.776 0.216 0.784
#> GSM149137 2 0.7528 0.776 0.216 0.784
#> GSM149138 2 0.7528 0.776 0.216 0.784
#> GSM149139 2 0.7528 0.776 0.216 0.784
#> GSM149140 2 0.7528 0.776 0.216 0.784
#> GSM149141 2 0.3879 0.877 0.076 0.924
#> GSM149142 2 0.0000 0.925 0.000 1.000
#> GSM149143 2 0.3733 0.877 0.072 0.928
#> GSM149144 2 0.0000 0.925 0.000 1.000
#> GSM149145 2 0.3879 0.877 0.076 0.924
#> GSM149146 2 0.0376 0.924 0.004 0.996
#> GSM149147 2 0.7528 0.776 0.216 0.784
#> GSM149148 2 0.7528 0.776 0.216 0.784
#> GSM149149 2 0.7528 0.776 0.216 0.784
#> GSM149150 2 0.0000 0.925 0.000 1.000
#> GSM149151 2 0.7376 0.783 0.208 0.792
#> GSM149152 2 0.7602 0.772 0.220 0.780
#> GSM149153 2 0.3879 0.877 0.076 0.924
#> GSM149154 1 0.6048 0.842 0.852 0.148
#> GSM149155 2 0.0000 0.925 0.000 1.000
#> GSM149156 2 0.0000 0.925 0.000 1.000
#> GSM149157 2 0.0000 0.925 0.000 1.000
#> GSM149158 2 0.0000 0.925 0.000 1.000
#> GSM149159 2 0.0376 0.924 0.004 0.996
#> GSM149160 2 0.0000 0.925 0.000 1.000
#> GSM149161 2 0.0000 0.925 0.000 1.000
#> GSM149162 2 0.0000 0.925 0.000 1.000
#> GSM149163 2 0.0000 0.925 0.000 1.000
#> GSM149164 2 0.0000 0.925 0.000 1.000
#> GSM149165 2 0.0376 0.924 0.004 0.996
#> GSM149166 2 0.0000 0.925 0.000 1.000
#> GSM149167 2 0.0000 0.925 0.000 1.000
#> GSM149168 2 0.0672 0.921 0.008 0.992
#> GSM149169 2 0.0000 0.925 0.000 1.000
#> GSM149170 2 0.0672 0.921 0.008 0.992
#> GSM149171 2 0.0672 0.921 0.008 0.992
#> GSM149172 2 0.7453 0.687 0.212 0.788
#> GSM149173 2 0.0672 0.921 0.008 0.992
#> GSM149174 2 0.0000 0.925 0.000 1.000
#> GSM149175 1 0.8443 0.803 0.728 0.272
#> GSM149176 2 0.0000 0.925 0.000 1.000
#> GSM149177 2 0.2948 0.893 0.052 0.948
#> GSM149178 2 0.1633 0.914 0.024 0.976
#> GSM149179 2 0.0000 0.925 0.000 1.000
#> GSM149180 2 0.0000 0.925 0.000 1.000
#> GSM149181 2 0.0376 0.924 0.004 0.996
#> GSM149182 2 0.0000 0.925 0.000 1.000
#> GSM149183 2 0.0376 0.924 0.004 0.996
#> GSM149184 2 0.0376 0.924 0.004 0.996
#> GSM149185 2 0.0376 0.924 0.004 0.996
#> GSM149186 2 0.0000 0.925 0.000 1.000
#> GSM149187 2 0.0000 0.925 0.000 1.000
#> GSM149188 2 0.0376 0.924 0.004 0.996
#> GSM149189 2 0.0672 0.921 0.008 0.992
#> GSM149190 2 0.0000 0.925 0.000 1.000
#> GSM149191 2 0.0376 0.924 0.004 0.996
#> GSM149192 2 0.0376 0.924 0.004 0.996
#> GSM149193 2 0.0376 0.924 0.004 0.996
#> GSM149194 2 0.0000 0.925 0.000 1.000
#> GSM149195 1 0.6887 0.863 0.816 0.184
#> GSM149196 2 0.0000 0.925 0.000 1.000
#> GSM149197 2 0.0000 0.925 0.000 1.000
#> GSM149198 2 0.8909 0.641 0.308 0.692
#> GSM149199 2 0.0000 0.925 0.000 1.000
#> GSM149200 2 0.0672 0.921 0.008 0.992
#> GSM149201 2 0.0000 0.925 0.000 1.000
#> GSM149202 2 0.0376 0.924 0.004 0.996
#> GSM149203 2 0.0672 0.921 0.008 0.992
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149103 3 0.1411 0.944 0.000 0.036 0.964
#> GSM149104 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.996 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.615 1.000 0.000 0.000
#> GSM149116 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149117 2 0.6309 0.147 0.496 0.504 0.000
#> GSM149118 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149119 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149120 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149121 1 0.0000 0.615 1.000 0.000 0.000
#> GSM149122 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149123 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149124 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149125 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149126 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149127 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149128 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149129 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149130 1 0.5623 0.542 0.716 0.280 0.004
#> GSM149131 1 0.0000 0.615 1.000 0.000 0.000
#> GSM149132 1 0.5722 0.542 0.704 0.004 0.292
#> GSM149133 1 0.5690 0.543 0.708 0.004 0.288
#> GSM149134 1 0.3851 0.638 0.860 0.136 0.004
#> GSM149135 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149136 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149137 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149138 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149139 1 0.5690 0.533 0.708 0.288 0.004
#> GSM149140 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149141 2 0.5831 0.678 0.284 0.708 0.008
#> GSM149142 2 0.5529 0.676 0.296 0.704 0.000
#> GSM149143 2 0.6318 0.549 0.356 0.636 0.008
#> GSM149144 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149145 2 0.5360 0.766 0.220 0.768 0.012
#> GSM149146 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149147 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149148 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149149 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149150 2 0.2066 0.890 0.060 0.940 0.000
#> GSM149151 1 0.5722 0.528 0.704 0.292 0.004
#> GSM149152 1 0.4293 0.637 0.832 0.164 0.004
#> GSM149153 2 0.5360 0.766 0.220 0.768 0.012
#> GSM149154 1 0.8292 0.561 0.612 0.124 0.264
#> GSM149155 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149156 2 0.0237 0.911 0.004 0.996 0.000
#> GSM149157 2 0.1643 0.897 0.044 0.956 0.000
#> GSM149158 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149159 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149160 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149161 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149162 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149163 2 0.0237 0.911 0.004 0.996 0.000
#> GSM149164 2 0.4605 0.792 0.204 0.796 0.000
#> GSM149165 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149166 2 0.1163 0.904 0.028 0.972 0.000
#> GSM149167 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149168 2 0.0424 0.908 0.000 0.992 0.008
#> GSM149169 2 0.4842 0.771 0.224 0.776 0.000
#> GSM149170 2 0.0424 0.908 0.000 0.992 0.008
#> GSM149171 2 0.0424 0.908 0.000 0.992 0.008
#> GSM149172 2 0.2537 0.854 0.000 0.920 0.080
#> GSM149173 2 0.0424 0.908 0.000 0.992 0.008
#> GSM149174 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149175 1 0.8731 0.490 0.528 0.120 0.352
#> GSM149176 2 0.1411 0.900 0.036 0.964 0.000
#> GSM149177 2 0.1989 0.894 0.048 0.948 0.004
#> GSM149178 2 0.1999 0.899 0.036 0.952 0.012
#> GSM149179 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149189 2 0.0424 0.908 0.000 0.992 0.008
#> GSM149190 2 0.3752 0.838 0.144 0.856 0.000
#> GSM149191 2 0.0237 0.910 0.000 0.996 0.004
#> GSM149192 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149194 2 0.4504 0.800 0.196 0.804 0.000
#> GSM149195 3 0.0237 0.991 0.000 0.004 0.996
#> GSM149196 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149197 2 0.0237 0.911 0.004 0.996 0.000
#> GSM149198 1 0.4047 0.639 0.848 0.148 0.004
#> GSM149199 2 0.0237 0.911 0.004 0.996 0.000
#> GSM149200 2 0.0424 0.908 0.000 0.992 0.008
#> GSM149201 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.911 0.000 1.000 0.000
#> GSM149203 2 0.0424 0.908 0.000 0.992 0.008
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149103 3 0.3760 0.7992 0.000 0.136 0.836 0.028
#> GSM149104 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0657 0.9544 0.000 0.004 0.984 0.012
#> GSM149107 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0188 0.9648 0.000 0.000 0.996 0.004
#> GSM149110 3 0.0188 0.9648 0.000 0.000 0.996 0.004
#> GSM149111 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0188 0.9648 0.000 0.000 0.996 0.004
#> GSM149113 3 0.0000 0.9659 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0188 0.9648 0.000 0.000 0.996 0.004
#> GSM149115 1 0.4477 -0.0661 0.688 0.000 0.000 0.312
#> GSM149116 4 0.6449 0.9696 0.204 0.000 0.152 0.644
#> GSM149117 1 0.3984 0.6436 0.828 0.040 0.000 0.132
#> GSM149118 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149119 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149120 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149121 4 0.4981 0.5948 0.464 0.000 0.000 0.536
#> GSM149122 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149123 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149124 4 0.6449 0.9696 0.204 0.000 0.152 0.644
#> GSM149125 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149126 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149127 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149128 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149129 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149130 1 0.0188 0.6443 0.996 0.004 0.000 0.000
#> GSM149131 1 0.1118 0.6044 0.964 0.000 0.000 0.036
#> GSM149132 4 0.6449 0.9743 0.204 0.000 0.152 0.644
#> GSM149133 4 0.6429 0.9657 0.212 0.000 0.144 0.644
#> GSM149134 1 0.0657 0.6316 0.984 0.004 0.000 0.012
#> GSM149135 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149136 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149137 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149138 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149139 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149140 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149141 1 0.5717 0.5556 0.632 0.324 0.000 0.044
#> GSM149142 1 0.4661 0.6224 0.728 0.016 0.000 0.256
#> GSM149143 1 0.6100 0.6047 0.680 0.216 0.004 0.100
#> GSM149144 1 0.7834 0.1262 0.408 0.284 0.000 0.308
#> GSM149145 1 0.6188 0.4577 0.548 0.396 0.000 0.056
#> GSM149146 2 0.4290 0.8265 0.016 0.772 0.000 0.212
#> GSM149147 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149148 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149149 1 0.0336 0.6488 0.992 0.008 0.000 0.000
#> GSM149150 2 0.6703 0.5250 0.232 0.612 0.000 0.156
#> GSM149151 1 0.1059 0.6514 0.972 0.012 0.000 0.016
#> GSM149152 1 0.0524 0.6363 0.988 0.004 0.000 0.008
#> GSM149153 1 0.6188 0.4577 0.548 0.396 0.000 0.056
#> GSM149154 1 0.5154 0.5623 0.776 0.140 0.072 0.012
#> GSM149155 2 0.4980 0.7863 0.016 0.680 0.000 0.304
#> GSM149156 2 0.5047 0.7799 0.016 0.668 0.000 0.316
#> GSM149157 2 0.7373 0.5023 0.192 0.508 0.000 0.300
#> GSM149158 1 0.7771 0.1991 0.424 0.256 0.000 0.320
#> GSM149159 2 0.0817 0.7698 0.000 0.976 0.000 0.024
#> GSM149160 1 0.7784 0.2221 0.428 0.280 0.000 0.292
#> GSM149161 1 0.7798 0.1765 0.416 0.264 0.000 0.320
#> GSM149162 2 0.5026 0.7821 0.016 0.672 0.000 0.312
#> GSM149163 2 0.4980 0.7863 0.016 0.680 0.000 0.304
#> GSM149164 1 0.7538 0.2816 0.428 0.384 0.000 0.188
#> GSM149165 2 0.3668 0.8303 0.004 0.808 0.000 0.188
#> GSM149166 2 0.6100 0.7561 0.084 0.644 0.000 0.272
#> GSM149167 1 0.7785 0.1889 0.420 0.260 0.000 0.320
#> GSM149168 2 0.0707 0.7686 0.000 0.980 0.000 0.020
#> GSM149169 1 0.7565 0.3088 0.472 0.216 0.000 0.312
#> GSM149170 2 0.0188 0.7725 0.000 0.996 0.000 0.004
#> GSM149171 2 0.0707 0.7652 0.000 0.980 0.000 0.020
#> GSM149172 2 0.1209 0.7580 0.000 0.964 0.004 0.032
#> GSM149173 2 0.0336 0.7714 0.000 0.992 0.000 0.008
#> GSM149174 1 0.7768 0.2112 0.428 0.260 0.000 0.312
#> GSM149175 1 0.7323 0.4909 0.588 0.268 0.116 0.028
#> GSM149176 2 0.5880 0.7734 0.088 0.680 0.000 0.232
#> GSM149177 2 0.5122 0.6112 0.164 0.756 0.000 0.080
#> GSM149178 2 0.2742 0.7027 0.076 0.900 0.000 0.024
#> GSM149179 2 0.4253 0.8261 0.016 0.776 0.000 0.208
#> GSM149180 2 0.4214 0.8271 0.016 0.780 0.000 0.204
#> GSM149181 2 0.2868 0.8208 0.000 0.864 0.000 0.136
#> GSM149182 2 0.4364 0.8226 0.016 0.764 0.000 0.220
#> GSM149183 2 0.4019 0.8292 0.012 0.792 0.000 0.196
#> GSM149184 2 0.3895 0.8300 0.012 0.804 0.000 0.184
#> GSM149185 2 0.0469 0.7799 0.000 0.988 0.000 0.012
#> GSM149186 2 0.4059 0.8287 0.012 0.788 0.000 0.200
#> GSM149187 2 0.4980 0.7863 0.016 0.680 0.000 0.304
#> GSM149188 2 0.3725 0.8296 0.008 0.812 0.000 0.180
#> GSM149189 2 0.0817 0.7632 0.000 0.976 0.000 0.024
#> GSM149190 2 0.7919 0.0857 0.336 0.348 0.000 0.316
#> GSM149191 2 0.3048 0.7374 0.016 0.876 0.000 0.108
#> GSM149192 2 0.3725 0.8296 0.008 0.812 0.000 0.180
#> GSM149193 2 0.3808 0.8291 0.012 0.812 0.000 0.176
#> GSM149194 1 0.7782 0.2199 0.428 0.276 0.000 0.296
#> GSM149195 3 0.4644 0.6956 0.000 0.228 0.748 0.024
#> GSM149196 2 0.4059 0.8287 0.012 0.788 0.000 0.200
#> GSM149197 2 0.4980 0.7863 0.016 0.680 0.000 0.304
#> GSM149198 1 0.0804 0.6361 0.980 0.012 0.000 0.008
#> GSM149199 2 0.5003 0.7839 0.016 0.676 0.000 0.308
#> GSM149200 2 0.0188 0.7725 0.000 0.996 0.000 0.004
#> GSM149201 2 0.4399 0.8213 0.016 0.760 0.000 0.224
#> GSM149202 2 0.0000 0.7744 0.000 1.000 0.000 0.000
#> GSM149203 2 0.0707 0.7686 0.000 0.980 0.000 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0290 0.962 0.000 0.000 0.992 0.000 0.008
#> GSM149100 3 0.0162 0.962 0.000 0.000 0.996 0.004 0.000
#> GSM149101 3 0.0162 0.962 0.000 0.000 0.996 0.004 0.000
#> GSM149102 3 0.0162 0.962 0.000 0.000 0.996 0.004 0.000
#> GSM149103 3 0.5281 0.277 0.012 0.004 0.576 0.024 0.384
#> GSM149104 3 0.0162 0.962 0.000 0.000 0.996 0.004 0.000
#> GSM149105 3 0.0162 0.962 0.000 0.000 0.996 0.000 0.004
#> GSM149106 3 0.1235 0.936 0.004 0.004 0.964 0.016 0.012
#> GSM149107 3 0.0162 0.962 0.000 0.000 0.996 0.004 0.000
#> GSM149108 3 0.0162 0.962 0.000 0.000 0.996 0.004 0.000
#> GSM149109 3 0.0290 0.962 0.000 0.000 0.992 0.000 0.008
#> GSM149110 3 0.0290 0.962 0.000 0.000 0.992 0.000 0.008
#> GSM149111 3 0.0162 0.962 0.000 0.000 0.996 0.000 0.004
#> GSM149112 3 0.0290 0.962 0.000 0.000 0.992 0.000 0.008
#> GSM149113 3 0.0162 0.962 0.000 0.000 0.996 0.000 0.004
#> GSM149114 3 0.0000 0.963 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.3565 0.806 0.816 0.000 0.000 0.144 0.040
#> GSM149116 4 0.2466 0.990 0.012 0.000 0.076 0.900 0.012
#> GSM149117 1 0.4530 0.736 0.780 0.136 0.000 0.032 0.052
#> GSM149118 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149119 4 0.2116 0.996 0.008 0.000 0.076 0.912 0.004
#> GSM149120 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149121 1 0.5161 0.201 0.516 0.000 0.000 0.444 0.040
#> GSM149122 4 0.2116 0.996 0.008 0.000 0.076 0.912 0.004
#> GSM149123 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149124 4 0.2466 0.990 0.012 0.000 0.076 0.900 0.012
#> GSM149125 4 0.2116 0.996 0.008 0.000 0.076 0.912 0.004
#> GSM149126 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149127 4 0.2116 0.996 0.008 0.000 0.076 0.912 0.004
#> GSM149128 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149129 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149130 1 0.1743 0.908 0.940 0.004 0.000 0.028 0.028
#> GSM149131 1 0.2300 0.887 0.904 0.000 0.000 0.072 0.024
#> GSM149132 4 0.1956 0.997 0.008 0.000 0.076 0.916 0.000
#> GSM149133 4 0.2241 0.994 0.008 0.000 0.076 0.908 0.008
#> GSM149134 1 0.2359 0.892 0.904 0.000 0.000 0.036 0.060
#> GSM149135 1 0.1116 0.911 0.964 0.004 0.000 0.028 0.004
#> GSM149136 1 0.0955 0.911 0.968 0.004 0.000 0.028 0.000
#> GSM149137 1 0.1116 0.911 0.964 0.004 0.000 0.028 0.004
#> GSM149138 1 0.2299 0.897 0.912 0.004 0.000 0.032 0.052
#> GSM149139 1 0.1116 0.911 0.964 0.004 0.000 0.028 0.004
#> GSM149140 1 0.0955 0.911 0.968 0.004 0.000 0.028 0.000
#> GSM149141 5 0.4546 0.590 0.284 0.008 0.000 0.020 0.688
#> GSM149142 1 0.4920 0.588 0.728 0.200 0.000 0.040 0.032
#> GSM149143 5 0.6017 0.354 0.388 0.052 0.000 0.032 0.528
#> GSM149144 2 0.3387 0.684 0.100 0.852 0.000 0.028 0.020
#> GSM149145 5 0.4651 0.602 0.284 0.012 0.000 0.020 0.684
#> GSM149146 2 0.3318 0.703 0.000 0.808 0.000 0.012 0.180
#> GSM149147 1 0.0955 0.911 0.968 0.004 0.000 0.028 0.000
#> GSM149148 1 0.0955 0.911 0.968 0.004 0.000 0.028 0.000
#> GSM149149 1 0.0955 0.911 0.968 0.004 0.000 0.028 0.000
#> GSM149150 5 0.6551 0.132 0.120 0.388 0.000 0.020 0.472
#> GSM149151 1 0.0833 0.906 0.976 0.004 0.000 0.016 0.004
#> GSM149152 1 0.1750 0.905 0.936 0.000 0.000 0.028 0.036
#> GSM149153 5 0.4651 0.602 0.284 0.012 0.000 0.020 0.684
#> GSM149154 5 0.5383 0.292 0.420 0.000 0.024 0.020 0.536
#> GSM149155 2 0.0162 0.733 0.000 0.996 0.000 0.000 0.004
#> GSM149156 2 0.1885 0.722 0.020 0.936 0.000 0.032 0.012
#> GSM149157 2 0.5926 0.548 0.196 0.664 0.000 0.044 0.096
#> GSM149158 2 0.5963 0.487 0.304 0.600 0.000 0.044 0.052
#> GSM149159 5 0.3039 0.734 0.000 0.152 0.000 0.012 0.836
#> GSM149160 2 0.6528 0.427 0.316 0.548 0.000 0.044 0.092
#> GSM149161 2 0.5465 0.577 0.216 0.688 0.000 0.044 0.052
#> GSM149162 2 0.1471 0.726 0.020 0.952 0.000 0.024 0.004
#> GSM149163 2 0.1074 0.731 0.016 0.968 0.000 0.012 0.004
#> GSM149164 5 0.7625 0.135 0.336 0.280 0.000 0.044 0.340
#> GSM149165 2 0.3266 0.688 0.000 0.796 0.000 0.004 0.200
#> GSM149166 2 0.3237 0.723 0.028 0.860 0.000 0.016 0.096
#> GSM149167 2 0.6005 0.488 0.300 0.600 0.000 0.044 0.056
#> GSM149168 5 0.2629 0.741 0.000 0.136 0.000 0.004 0.860
#> GSM149169 2 0.6082 0.432 0.336 0.568 0.000 0.044 0.052
#> GSM149170 5 0.2690 0.733 0.000 0.156 0.000 0.000 0.844
#> GSM149171 5 0.2424 0.740 0.000 0.132 0.000 0.000 0.868
#> GSM149172 5 0.2077 0.745 0.000 0.084 0.000 0.008 0.908
#> GSM149173 5 0.2690 0.732 0.000 0.156 0.000 0.000 0.844
#> GSM149174 2 0.6011 0.467 0.316 0.588 0.000 0.044 0.052
#> GSM149175 5 0.4270 0.639 0.204 0.004 0.016 0.016 0.760
#> GSM149176 2 0.4671 0.681 0.040 0.740 0.000 0.020 0.200
#> GSM149177 5 0.5639 0.618 0.108 0.200 0.000 0.020 0.672
#> GSM149178 5 0.3113 0.739 0.016 0.100 0.000 0.020 0.864
#> GSM149179 2 0.3048 0.707 0.000 0.820 0.000 0.004 0.176
#> GSM149180 2 0.3086 0.704 0.000 0.816 0.000 0.004 0.180
#> GSM149181 2 0.3774 0.561 0.000 0.704 0.000 0.000 0.296
#> GSM149182 2 0.2763 0.718 0.000 0.848 0.000 0.004 0.148
#> GSM149183 2 0.2813 0.713 0.000 0.832 0.000 0.000 0.168
#> GSM149184 2 0.3462 0.692 0.000 0.792 0.000 0.012 0.196
#> GSM149185 5 0.3305 0.664 0.000 0.224 0.000 0.000 0.776
#> GSM149186 2 0.3123 0.703 0.000 0.812 0.000 0.004 0.184
#> GSM149187 2 0.1087 0.731 0.016 0.968 0.000 0.008 0.008
#> GSM149188 2 0.3109 0.692 0.000 0.800 0.000 0.000 0.200
#> GSM149189 5 0.2833 0.744 0.004 0.120 0.000 0.012 0.864
#> GSM149190 2 0.3256 0.691 0.084 0.864 0.000 0.028 0.024
#> GSM149191 5 0.4547 0.630 0.012 0.252 0.000 0.024 0.712
#> GSM149192 2 0.3143 0.691 0.000 0.796 0.000 0.000 0.204
#> GSM149193 2 0.3242 0.675 0.000 0.784 0.000 0.000 0.216
#> GSM149194 2 0.6436 0.436 0.316 0.556 0.000 0.044 0.084
#> GSM149195 5 0.4464 0.445 0.008 0.000 0.304 0.012 0.676
#> GSM149196 2 0.3496 0.693 0.000 0.788 0.000 0.012 0.200
#> GSM149197 2 0.1200 0.731 0.016 0.964 0.000 0.012 0.008
#> GSM149198 1 0.2359 0.892 0.904 0.000 0.000 0.036 0.060
#> GSM149199 2 0.1893 0.722 0.024 0.936 0.000 0.028 0.012
#> GSM149200 5 0.2732 0.730 0.000 0.160 0.000 0.000 0.840
#> GSM149201 2 0.2561 0.720 0.000 0.856 0.000 0.000 0.144
#> GSM149202 5 0.2929 0.716 0.000 0.180 0.000 0.000 0.820
#> GSM149203 5 0.2629 0.741 0.000 0.136 0.000 0.004 0.860
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.1225 0.9348 0.000 0.000 0.952 0.012 0.000 0.036
#> GSM149100 3 0.0870 0.9398 0.000 0.000 0.972 0.012 0.004 0.012
#> GSM149101 3 0.0767 0.9397 0.000 0.000 0.976 0.012 0.004 0.008
#> GSM149102 3 0.0767 0.9397 0.000 0.000 0.976 0.012 0.004 0.008
#> GSM149103 3 0.6671 -0.0755 0.004 0.020 0.432 0.020 0.372 0.152
#> GSM149104 3 0.0767 0.9397 0.000 0.000 0.976 0.012 0.004 0.008
#> GSM149105 3 0.1059 0.9387 0.000 0.000 0.964 0.016 0.004 0.016
#> GSM149106 3 0.2865 0.8446 0.004 0.016 0.872 0.008 0.012 0.088
#> GSM149107 3 0.0767 0.9397 0.000 0.000 0.976 0.012 0.004 0.008
#> GSM149108 3 0.0767 0.9397 0.000 0.000 0.976 0.012 0.004 0.008
#> GSM149109 3 0.1225 0.9348 0.000 0.000 0.952 0.012 0.000 0.036
#> GSM149110 3 0.1464 0.9341 0.000 0.000 0.944 0.016 0.004 0.036
#> GSM149111 3 0.1059 0.9387 0.000 0.000 0.964 0.016 0.004 0.016
#> GSM149112 3 0.1464 0.9341 0.000 0.000 0.944 0.016 0.004 0.036
#> GSM149113 3 0.0748 0.9391 0.000 0.000 0.976 0.016 0.004 0.004
#> GSM149114 3 0.0551 0.9371 0.000 0.000 0.984 0.008 0.004 0.004
#> GSM149115 1 0.2963 0.8304 0.856 0.000 0.000 0.096 0.012 0.036
#> GSM149116 4 0.2302 0.9694 0.024 0.000 0.016 0.912 0.012 0.036
#> GSM149117 1 0.6177 0.4678 0.580 0.236 0.008 0.016 0.016 0.144
#> GSM149118 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149119 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149120 4 0.1490 0.9887 0.024 0.000 0.016 0.948 0.004 0.008
#> GSM149121 1 0.4398 0.6675 0.716 0.000 0.000 0.220 0.020 0.044
#> GSM149122 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149123 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149124 4 0.2441 0.9644 0.024 0.000 0.016 0.904 0.012 0.044
#> GSM149125 4 0.1232 0.9915 0.024 0.000 0.016 0.956 0.000 0.004
#> GSM149126 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149127 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149128 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149129 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149130 1 0.1829 0.8794 0.920 0.000 0.000 0.004 0.012 0.064
#> GSM149131 1 0.2186 0.8754 0.908 0.000 0.000 0.036 0.008 0.048
#> GSM149132 4 0.1088 0.9927 0.024 0.000 0.016 0.960 0.000 0.000
#> GSM149133 4 0.1592 0.9873 0.024 0.000 0.016 0.944 0.004 0.012
#> GSM149134 1 0.1832 0.8894 0.928 0.000 0.000 0.008 0.032 0.032
#> GSM149135 1 0.1049 0.9070 0.960 0.000 0.000 0.008 0.000 0.032
#> GSM149136 1 0.1049 0.9070 0.960 0.000 0.000 0.008 0.000 0.032
#> GSM149137 1 0.1010 0.9062 0.960 0.000 0.000 0.004 0.000 0.036
#> GSM149138 1 0.1675 0.8919 0.936 0.000 0.000 0.008 0.024 0.032
#> GSM149139 1 0.1124 0.9074 0.956 0.000 0.000 0.008 0.000 0.036
#> GSM149140 1 0.1124 0.9074 0.956 0.000 0.000 0.008 0.000 0.036
#> GSM149141 5 0.5820 0.6640 0.120 0.024 0.012 0.012 0.648 0.184
#> GSM149142 6 0.4544 0.6806 0.320 0.044 0.000 0.000 0.004 0.632
#> GSM149143 5 0.6163 0.2862 0.180 0.000 0.004 0.012 0.472 0.332
#> GSM149144 2 0.4379 0.2820 0.020 0.576 0.000 0.004 0.000 0.400
#> GSM149145 5 0.5781 0.6706 0.116 0.024 0.012 0.012 0.652 0.184
#> GSM149146 2 0.1820 0.7469 0.000 0.924 0.000 0.008 0.012 0.056
#> GSM149147 1 0.1124 0.9074 0.956 0.000 0.000 0.008 0.000 0.036
#> GSM149148 1 0.1124 0.9074 0.956 0.000 0.000 0.008 0.000 0.036
#> GSM149149 1 0.1124 0.9074 0.956 0.000 0.000 0.008 0.000 0.036
#> GSM149150 2 0.6503 0.0856 0.028 0.540 0.008 0.012 0.252 0.160
#> GSM149151 1 0.1049 0.9010 0.960 0.008 0.000 0.000 0.000 0.032
#> GSM149152 1 0.1887 0.8916 0.924 0.000 0.000 0.012 0.016 0.048
#> GSM149153 5 0.5781 0.6706 0.116 0.024 0.012 0.012 0.652 0.184
#> GSM149154 5 0.5464 0.6104 0.196 0.000 0.008 0.016 0.644 0.136
#> GSM149155 2 0.2668 0.6824 0.000 0.828 0.000 0.004 0.000 0.168
#> GSM149156 2 0.4098 0.1869 0.000 0.548 0.000 0.004 0.004 0.444
#> GSM149157 6 0.5575 0.8687 0.104 0.176 0.000 0.004 0.056 0.660
#> GSM149158 6 0.5043 0.8822 0.136 0.196 0.000 0.000 0.008 0.660
#> GSM149159 5 0.3236 0.7637 0.000 0.140 0.000 0.004 0.820 0.036
#> GSM149160 6 0.5604 0.8812 0.136 0.148 0.000 0.004 0.052 0.660
#> GSM149161 6 0.4917 0.8384 0.104 0.224 0.000 0.000 0.008 0.664
#> GSM149162 2 0.3986 0.3775 0.000 0.608 0.000 0.004 0.004 0.384
#> GSM149163 2 0.3314 0.5982 0.000 0.740 0.000 0.004 0.000 0.256
#> GSM149164 6 0.5562 0.7383 0.148 0.040 0.000 0.004 0.152 0.656
#> GSM149165 2 0.2350 0.7283 0.000 0.880 0.000 0.000 0.100 0.020
#> GSM149166 2 0.2921 0.7005 0.008 0.828 0.000 0.008 0.000 0.156
#> GSM149167 6 0.5100 0.8745 0.128 0.180 0.000 0.008 0.008 0.676
#> GSM149168 5 0.2809 0.7703 0.000 0.128 0.000 0.004 0.848 0.020
#> GSM149169 6 0.5057 0.8847 0.144 0.188 0.000 0.000 0.008 0.660
#> GSM149170 5 0.2809 0.7626 0.000 0.168 0.000 0.004 0.824 0.004
#> GSM149171 5 0.2442 0.7729 0.000 0.144 0.000 0.000 0.852 0.004
#> GSM149172 5 0.2068 0.7709 0.004 0.060 0.004 0.008 0.916 0.008
#> GSM149173 5 0.2845 0.7609 0.000 0.172 0.000 0.004 0.820 0.004
#> GSM149174 6 0.5043 0.8822 0.136 0.196 0.000 0.000 0.008 0.660
#> GSM149175 5 0.4496 0.7182 0.076 0.004 0.024 0.012 0.772 0.112
#> GSM149176 2 0.4145 0.6503 0.008 0.788 0.008 0.012 0.056 0.128
#> GSM149177 5 0.6848 0.5080 0.024 0.280 0.008 0.016 0.472 0.200
#> GSM149178 5 0.5491 0.6922 0.008 0.172 0.008 0.008 0.652 0.152
#> GSM149179 2 0.1442 0.7521 0.000 0.944 0.000 0.004 0.012 0.040
#> GSM149180 2 0.1074 0.7550 0.000 0.960 0.000 0.000 0.012 0.028
#> GSM149181 2 0.2442 0.6893 0.000 0.852 0.000 0.000 0.144 0.004
#> GSM149182 2 0.0858 0.7536 0.000 0.968 0.000 0.004 0.000 0.028
#> GSM149183 2 0.1738 0.7499 0.000 0.928 0.000 0.004 0.052 0.016
#> GSM149184 2 0.2503 0.7287 0.004 0.896 0.000 0.012 0.044 0.044
#> GSM149185 5 0.3489 0.6426 0.000 0.288 0.000 0.000 0.708 0.004
#> GSM149186 2 0.0935 0.7530 0.000 0.964 0.000 0.004 0.032 0.000
#> GSM149187 2 0.3265 0.6071 0.000 0.748 0.000 0.004 0.000 0.248
#> GSM149188 2 0.2039 0.7439 0.000 0.908 0.000 0.004 0.072 0.016
#> GSM149189 5 0.3307 0.7668 0.000 0.072 0.004 0.008 0.840 0.076
#> GSM149190 2 0.4370 0.1603 0.016 0.536 0.000 0.004 0.000 0.444
#> GSM149191 5 0.4653 0.5450 0.000 0.060 0.000 0.004 0.644 0.292
#> GSM149192 2 0.2126 0.7430 0.000 0.904 0.000 0.004 0.072 0.020
#> GSM149193 2 0.1674 0.7454 0.000 0.924 0.000 0.004 0.068 0.004
#> GSM149194 6 0.5569 0.8811 0.132 0.148 0.000 0.004 0.052 0.664
#> GSM149195 5 0.3743 0.7169 0.000 0.004 0.108 0.012 0.808 0.068
#> GSM149196 2 0.1624 0.7454 0.000 0.936 0.000 0.004 0.040 0.020
#> GSM149197 2 0.3547 0.5398 0.000 0.696 0.000 0.004 0.000 0.300
#> GSM149198 1 0.1832 0.8894 0.928 0.000 0.000 0.008 0.032 0.032
#> GSM149199 2 0.3890 0.3433 0.000 0.596 0.000 0.004 0.000 0.400
#> GSM149200 5 0.2845 0.7607 0.000 0.172 0.000 0.004 0.820 0.004
#> GSM149201 2 0.1226 0.7531 0.000 0.952 0.000 0.004 0.004 0.040
#> GSM149202 5 0.3595 0.6593 0.000 0.288 0.000 0.000 0.704 0.008
#> GSM149203 5 0.2633 0.7710 0.000 0.112 0.000 0.004 0.864 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:kmeans 105 3.75e-13 2
#> MAD:kmeans 103 1.13e-27 3
#> MAD:kmeans 91 1.94e-32 4
#> MAD:kmeans 92 7.29e-32 5
#> MAD:kmeans 96 1.17e-33 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "skmeans"]
# you can also extract it by
# res = res_list["MAD:skmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.761 0.897 0.952 0.4940 0.508 0.508
#> 3 3 0.920 0.883 0.945 0.3449 0.687 0.459
#> 4 4 0.686 0.730 0.865 0.1176 0.827 0.548
#> 5 5 0.666 0.546 0.730 0.0731 0.862 0.536
#> 6 6 0.706 0.634 0.772 0.0414 0.918 0.635
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.950 1.000 0.000
#> GSM149100 1 0.0000 0.950 1.000 0.000
#> GSM149101 1 0.0000 0.950 1.000 0.000
#> GSM149102 1 0.0000 0.950 1.000 0.000
#> GSM149103 1 0.0000 0.950 1.000 0.000
#> GSM149104 1 0.0000 0.950 1.000 0.000
#> GSM149105 1 0.0000 0.950 1.000 0.000
#> GSM149106 1 0.0000 0.950 1.000 0.000
#> GSM149107 1 0.0000 0.950 1.000 0.000
#> GSM149108 1 0.0000 0.950 1.000 0.000
#> GSM149109 1 0.0000 0.950 1.000 0.000
#> GSM149110 1 0.0000 0.950 1.000 0.000
#> GSM149111 1 0.0000 0.950 1.000 0.000
#> GSM149112 1 0.0000 0.950 1.000 0.000
#> GSM149113 1 0.0000 0.950 1.000 0.000
#> GSM149114 1 0.0000 0.950 1.000 0.000
#> GSM149115 1 0.6438 0.805 0.836 0.164
#> GSM149116 1 0.0000 0.950 1.000 0.000
#> GSM149117 2 0.0000 0.945 0.000 1.000
#> GSM149118 1 0.0000 0.950 1.000 0.000
#> GSM149119 1 0.0000 0.950 1.000 0.000
#> GSM149120 1 0.0000 0.950 1.000 0.000
#> GSM149121 1 0.0000 0.950 1.000 0.000
#> GSM149122 1 0.0000 0.950 1.000 0.000
#> GSM149123 1 0.0000 0.950 1.000 0.000
#> GSM149124 1 0.0000 0.950 1.000 0.000
#> GSM149125 1 0.0000 0.950 1.000 0.000
#> GSM149126 1 0.0000 0.950 1.000 0.000
#> GSM149127 1 0.0000 0.950 1.000 0.000
#> GSM149128 1 0.0000 0.950 1.000 0.000
#> GSM149129 1 0.0000 0.950 1.000 0.000
#> GSM149130 2 0.6247 0.818 0.156 0.844
#> GSM149131 1 0.6712 0.793 0.824 0.176
#> GSM149132 1 0.0000 0.950 1.000 0.000
#> GSM149133 1 0.0000 0.950 1.000 0.000
#> GSM149134 1 0.7528 0.738 0.784 0.216
#> GSM149135 2 0.3274 0.911 0.060 0.940
#> GSM149136 2 0.3114 0.914 0.056 0.944
#> GSM149137 2 0.3274 0.911 0.060 0.940
#> GSM149138 2 0.3431 0.908 0.064 0.936
#> GSM149139 2 0.3733 0.902 0.072 0.928
#> GSM149140 2 0.3274 0.911 0.060 0.940
#> GSM149141 1 0.8144 0.665 0.748 0.252
#> GSM149142 2 0.0000 0.945 0.000 1.000
#> GSM149143 1 0.7139 0.753 0.804 0.196
#> GSM149144 2 0.0000 0.945 0.000 1.000
#> GSM149145 1 0.8499 0.613 0.724 0.276
#> GSM149146 2 0.0000 0.945 0.000 1.000
#> GSM149147 2 0.6148 0.823 0.152 0.848
#> GSM149148 2 0.4022 0.896 0.080 0.920
#> GSM149149 2 0.4022 0.896 0.080 0.920
#> GSM149150 2 0.0000 0.945 0.000 1.000
#> GSM149151 2 0.1633 0.933 0.024 0.976
#> GSM149152 1 0.6148 0.821 0.848 0.152
#> GSM149153 2 0.9358 0.508 0.352 0.648
#> GSM149154 1 0.0000 0.950 1.000 0.000
#> GSM149155 2 0.0000 0.945 0.000 1.000
#> GSM149156 2 0.0000 0.945 0.000 1.000
#> GSM149157 2 0.0000 0.945 0.000 1.000
#> GSM149158 2 0.0000 0.945 0.000 1.000
#> GSM149159 2 0.0000 0.945 0.000 1.000
#> GSM149160 2 0.0000 0.945 0.000 1.000
#> GSM149161 2 0.0000 0.945 0.000 1.000
#> GSM149162 2 0.0000 0.945 0.000 1.000
#> GSM149163 2 0.0000 0.945 0.000 1.000
#> GSM149164 2 0.0000 0.945 0.000 1.000
#> GSM149165 2 0.0000 0.945 0.000 1.000
#> GSM149166 2 0.0000 0.945 0.000 1.000
#> GSM149167 2 0.0000 0.945 0.000 1.000
#> GSM149168 2 0.4431 0.879 0.092 0.908
#> GSM149169 2 0.0000 0.945 0.000 1.000
#> GSM149170 2 0.6438 0.801 0.164 0.836
#> GSM149171 2 0.7139 0.763 0.196 0.804
#> GSM149172 1 0.2948 0.909 0.948 0.052
#> GSM149173 2 0.4815 0.870 0.104 0.896
#> GSM149174 2 0.0000 0.945 0.000 1.000
#> GSM149175 1 0.0000 0.950 1.000 0.000
#> GSM149176 2 0.0000 0.945 0.000 1.000
#> GSM149177 2 0.9635 0.394 0.388 0.612
#> GSM149178 2 0.9954 0.162 0.460 0.540
#> GSM149179 2 0.0000 0.945 0.000 1.000
#> GSM149180 2 0.0000 0.945 0.000 1.000
#> GSM149181 2 0.0000 0.945 0.000 1.000
#> GSM149182 2 0.0000 0.945 0.000 1.000
#> GSM149183 2 0.0000 0.945 0.000 1.000
#> GSM149184 2 0.0000 0.945 0.000 1.000
#> GSM149185 2 0.0000 0.945 0.000 1.000
#> GSM149186 2 0.0000 0.945 0.000 1.000
#> GSM149187 2 0.0000 0.945 0.000 1.000
#> GSM149188 2 0.0000 0.945 0.000 1.000
#> GSM149189 2 0.8955 0.574 0.312 0.688
#> GSM149190 2 0.0000 0.945 0.000 1.000
#> GSM149191 2 0.0672 0.941 0.008 0.992
#> GSM149192 2 0.0000 0.945 0.000 1.000
#> GSM149193 2 0.0000 0.945 0.000 1.000
#> GSM149194 2 0.0000 0.945 0.000 1.000
#> GSM149195 1 0.0000 0.950 1.000 0.000
#> GSM149196 2 0.0000 0.945 0.000 1.000
#> GSM149197 2 0.0000 0.945 0.000 1.000
#> GSM149198 1 0.6973 0.778 0.812 0.188
#> GSM149199 2 0.0000 0.945 0.000 1.000
#> GSM149200 2 0.5946 0.825 0.144 0.856
#> GSM149201 2 0.0000 0.945 0.000 1.000
#> GSM149202 2 0.0000 0.945 0.000 1.000
#> GSM149203 1 0.8661 0.609 0.712 0.288
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149116 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149117 1 0.4605 0.71697 0.796 0.204 0.000
#> GSM149118 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149119 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149120 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149121 1 0.0592 0.95502 0.988 0.000 0.012
#> GSM149122 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149123 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149124 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149125 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149126 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149127 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149128 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149129 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149130 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149131 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149132 1 0.2356 0.94686 0.928 0.000 0.072
#> GSM149133 1 0.2261 0.94745 0.932 0.000 0.068
#> GSM149134 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149135 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149136 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149137 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149138 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149139 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149140 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149141 3 0.4733 0.76669 0.196 0.004 0.800
#> GSM149142 2 0.2356 0.91112 0.072 0.928 0.000
#> GSM149143 3 0.6490 0.47308 0.360 0.012 0.628
#> GSM149144 2 0.1643 0.93037 0.044 0.956 0.000
#> GSM149145 3 0.2301 0.87708 0.060 0.004 0.936
#> GSM149146 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149147 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149148 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149149 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149150 2 0.1163 0.93778 0.028 0.972 0.000
#> GSM149151 1 0.0000 0.95545 1.000 0.000 0.000
#> GSM149152 1 0.0237 0.95560 0.996 0.000 0.004
#> GSM149153 3 0.3091 0.86961 0.072 0.016 0.912
#> GSM149154 3 0.6305 0.00113 0.484 0.000 0.516
#> GSM149155 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149157 2 0.0892 0.94065 0.020 0.980 0.000
#> GSM149158 2 0.1860 0.92602 0.052 0.948 0.000
#> GSM149159 2 0.0424 0.94310 0.000 0.992 0.008
#> GSM149160 2 0.1964 0.92358 0.056 0.944 0.000
#> GSM149161 2 0.1753 0.92866 0.048 0.952 0.000
#> GSM149162 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149164 2 0.2939 0.90640 0.072 0.916 0.012
#> GSM149165 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149166 2 0.0237 0.94633 0.004 0.996 0.000
#> GSM149167 2 0.1860 0.92636 0.052 0.948 0.000
#> GSM149168 2 0.5905 0.42369 0.000 0.648 0.352
#> GSM149169 2 0.2066 0.92070 0.060 0.940 0.000
#> GSM149170 2 0.6286 0.08373 0.000 0.536 0.464
#> GSM149171 3 0.5098 0.67306 0.000 0.248 0.752
#> GSM149172 3 0.0237 0.90946 0.000 0.004 0.996
#> GSM149173 3 0.6286 0.14337 0.000 0.464 0.536
#> GSM149174 2 0.1964 0.92358 0.056 0.944 0.000
#> GSM149175 3 0.0237 0.90889 0.004 0.000 0.996
#> GSM149176 2 0.0237 0.94633 0.004 0.996 0.000
#> GSM149177 3 0.5558 0.78385 0.048 0.152 0.800
#> GSM149178 3 0.2492 0.88174 0.016 0.048 0.936
#> GSM149179 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149189 3 0.2878 0.85448 0.000 0.096 0.904
#> GSM149190 2 0.1643 0.93037 0.044 0.956 0.000
#> GSM149191 2 0.3192 0.84433 0.000 0.888 0.112
#> GSM149192 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149194 2 0.1964 0.92358 0.056 0.944 0.000
#> GSM149195 3 0.0000 0.91115 0.000 0.000 1.000
#> GSM149196 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149198 1 0.0237 0.95560 0.996 0.000 0.004
#> GSM149199 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149200 2 0.6260 0.14210 0.000 0.552 0.448
#> GSM149201 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.94738 0.000 1.000 0.000
#> GSM149203 3 0.4504 0.74768 0.000 0.196 0.804
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149100 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149101 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149102 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149103 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149104 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149105 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149106 3 0.0592 0.86913 0.000 0.000 0.984 0.016
#> GSM149107 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149108 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149109 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149110 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149111 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149112 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149113 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149114 3 0.0469 0.87133 0.000 0.000 0.988 0.012
#> GSM149115 4 0.2868 0.82033 0.136 0.000 0.000 0.864
#> GSM149116 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149117 1 0.7434 0.38919 0.512 0.232 0.000 0.256
#> GSM149118 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149119 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149120 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149121 4 0.1302 0.90898 0.044 0.000 0.000 0.956
#> GSM149122 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149123 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149124 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149125 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149126 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149127 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149128 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149129 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149130 1 0.4967 0.14569 0.548 0.000 0.000 0.452
#> GSM149131 4 0.4331 0.59172 0.288 0.000 0.000 0.712
#> GSM149132 4 0.0188 0.94232 0.000 0.000 0.004 0.996
#> GSM149133 4 0.0376 0.93898 0.004 0.000 0.004 0.992
#> GSM149134 1 0.4250 0.55374 0.724 0.000 0.000 0.276
#> GSM149135 1 0.2281 0.73465 0.904 0.000 0.000 0.096
#> GSM149136 1 0.2216 0.73555 0.908 0.000 0.000 0.092
#> GSM149137 1 0.2281 0.73465 0.904 0.000 0.000 0.096
#> GSM149138 1 0.2281 0.73465 0.904 0.000 0.000 0.096
#> GSM149139 1 0.2345 0.73196 0.900 0.000 0.000 0.100
#> GSM149140 1 0.2281 0.73465 0.904 0.000 0.000 0.096
#> GSM149141 1 0.6353 0.12985 0.552 0.016 0.396 0.036
#> GSM149142 1 0.1302 0.73180 0.956 0.044 0.000 0.000
#> GSM149143 1 0.5011 0.63155 0.764 0.000 0.160 0.076
#> GSM149144 1 0.5119 0.25304 0.556 0.440 0.000 0.004
#> GSM149145 3 0.5055 0.45491 0.368 0.008 0.624 0.000
#> GSM149146 2 0.0336 0.87020 0.008 0.992 0.000 0.000
#> GSM149147 1 0.2216 0.73501 0.908 0.000 0.000 0.092
#> GSM149148 1 0.2281 0.73465 0.904 0.000 0.000 0.096
#> GSM149149 1 0.2281 0.73465 0.904 0.000 0.000 0.096
#> GSM149150 2 0.4632 0.51636 0.308 0.688 0.004 0.000
#> GSM149151 1 0.2271 0.73674 0.916 0.008 0.000 0.076
#> GSM149152 4 0.4855 0.27715 0.400 0.000 0.000 0.600
#> GSM149153 3 0.5669 0.20748 0.464 0.016 0.516 0.004
#> GSM149154 3 0.7221 -0.01684 0.140 0.000 0.432 0.428
#> GSM149155 2 0.1398 0.86314 0.040 0.956 0.000 0.004
#> GSM149156 2 0.1978 0.85249 0.068 0.928 0.000 0.004
#> GSM149157 2 0.5161 0.04350 0.476 0.520 0.000 0.004
#> GSM149158 1 0.4401 0.59853 0.724 0.272 0.000 0.004
#> GSM149159 2 0.2335 0.85716 0.060 0.920 0.020 0.000
#> GSM149160 1 0.4522 0.59551 0.728 0.264 0.004 0.004
#> GSM149161 1 0.4964 0.40381 0.616 0.380 0.000 0.004
#> GSM149162 2 0.1978 0.85196 0.068 0.928 0.000 0.004
#> GSM149163 2 0.1743 0.85731 0.056 0.940 0.000 0.004
#> GSM149164 1 0.4132 0.67310 0.804 0.176 0.012 0.008
#> GSM149165 2 0.1042 0.86793 0.020 0.972 0.008 0.000
#> GSM149166 2 0.3266 0.76119 0.168 0.832 0.000 0.000
#> GSM149167 1 0.4584 0.56230 0.696 0.300 0.000 0.004
#> GSM149168 2 0.4532 0.74890 0.052 0.792 0.156 0.000
#> GSM149169 1 0.3105 0.70907 0.856 0.140 0.000 0.004
#> GSM149170 2 0.4671 0.67264 0.028 0.752 0.220 0.000
#> GSM149171 2 0.5495 0.41464 0.028 0.624 0.348 0.000
#> GSM149172 3 0.3806 0.79985 0.016 0.048 0.864 0.072
#> GSM149173 2 0.4524 0.68883 0.028 0.768 0.204 0.000
#> GSM149174 1 0.4372 0.60031 0.728 0.268 0.000 0.004
#> GSM149175 3 0.2647 0.79529 0.000 0.000 0.880 0.120
#> GSM149176 2 0.2760 0.79477 0.128 0.872 0.000 0.000
#> GSM149177 3 0.7857 0.44761 0.128 0.284 0.544 0.044
#> GSM149178 3 0.5187 0.64293 0.040 0.228 0.728 0.004
#> GSM149179 2 0.0336 0.87020 0.008 0.992 0.000 0.000
#> GSM149180 2 0.0592 0.87047 0.016 0.984 0.000 0.000
#> GSM149181 2 0.0779 0.86577 0.016 0.980 0.004 0.000
#> GSM149182 2 0.0469 0.87005 0.012 0.988 0.000 0.000
#> GSM149183 2 0.0844 0.87091 0.012 0.980 0.004 0.004
#> GSM149184 2 0.0707 0.87049 0.020 0.980 0.000 0.000
#> GSM149185 2 0.0927 0.86415 0.016 0.976 0.008 0.000
#> GSM149186 2 0.0336 0.87020 0.008 0.992 0.000 0.000
#> GSM149187 2 0.1398 0.86340 0.040 0.956 0.000 0.004
#> GSM149188 2 0.0524 0.86988 0.008 0.988 0.004 0.000
#> GSM149189 3 0.5271 0.48535 0.024 0.320 0.656 0.000
#> GSM149190 2 0.5161 0.00334 0.476 0.520 0.000 0.004
#> GSM149191 2 0.6801 0.43799 0.308 0.568 0.124 0.000
#> GSM149192 2 0.0657 0.87090 0.012 0.984 0.004 0.000
#> GSM149193 2 0.0188 0.86971 0.000 0.996 0.004 0.000
#> GSM149194 1 0.4401 0.58873 0.724 0.272 0.000 0.004
#> GSM149195 3 0.0376 0.86055 0.004 0.004 0.992 0.000
#> GSM149196 2 0.0000 0.86980 0.000 1.000 0.000 0.000
#> GSM149197 2 0.1978 0.85237 0.068 0.928 0.000 0.004
#> GSM149198 1 0.5329 0.25635 0.568 0.000 0.012 0.420
#> GSM149199 2 0.2530 0.82947 0.100 0.896 0.000 0.004
#> GSM149200 2 0.4104 0.74225 0.028 0.808 0.164 0.000
#> GSM149201 2 0.0657 0.87025 0.012 0.984 0.000 0.004
#> GSM149202 2 0.1388 0.85771 0.028 0.960 0.012 0.000
#> GSM149203 3 0.5769 0.52325 0.036 0.284 0.668 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149100 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149101 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149102 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149103 3 0.0510 0.8952 0.000 0.000 0.984 0.000 0.016
#> GSM149104 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149105 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149106 3 0.0613 0.8999 0.004 0.000 0.984 0.004 0.008
#> GSM149107 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149108 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149109 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149110 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149111 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149112 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149113 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149114 3 0.0290 0.9097 0.000 0.000 0.992 0.008 0.000
#> GSM149115 4 0.4414 0.2801 0.376 0.000 0.004 0.616 0.004
#> GSM149116 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.7058 0.3584 0.536 0.280 0.004 0.120 0.060
#> GSM149118 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.2439 0.7935 0.120 0.000 0.000 0.876 0.004
#> GSM149122 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.4244 0.5753 0.712 0.000 0.004 0.268 0.016
#> GSM149131 1 0.4572 0.1857 0.540 0.000 0.004 0.452 0.004
#> GSM149132 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 0.9245 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.2777 0.7172 0.864 0.000 0.000 0.120 0.016
#> GSM149135 1 0.0794 0.7576 0.972 0.000 0.000 0.028 0.000
#> GSM149136 1 0.0932 0.7558 0.972 0.000 0.004 0.020 0.004
#> GSM149137 1 0.0865 0.7573 0.972 0.000 0.000 0.024 0.004
#> GSM149138 1 0.0798 0.7535 0.976 0.000 0.000 0.016 0.008
#> GSM149139 1 0.0794 0.7576 0.972 0.000 0.000 0.028 0.000
#> GSM149140 1 0.0703 0.7574 0.976 0.000 0.000 0.024 0.000
#> GSM149141 1 0.8077 0.2296 0.468 0.040 0.172 0.056 0.264
#> GSM149142 1 0.4421 0.5044 0.748 0.068 0.000 0.000 0.184
#> GSM149143 1 0.7466 0.1655 0.456 0.024 0.108 0.048 0.364
#> GSM149144 2 0.6158 0.2884 0.156 0.528 0.000 0.000 0.316
#> GSM149145 5 0.7439 -0.0303 0.260 0.024 0.356 0.004 0.356
#> GSM149146 2 0.0955 0.6411 0.004 0.968 0.000 0.000 0.028
#> GSM149147 1 0.0771 0.7558 0.976 0.000 0.004 0.020 0.000
#> GSM149148 1 0.0865 0.7574 0.972 0.000 0.004 0.024 0.000
#> GSM149149 1 0.0865 0.7574 0.972 0.000 0.004 0.024 0.000
#> GSM149150 2 0.5654 0.3630 0.192 0.648 0.004 0.000 0.156
#> GSM149151 1 0.1153 0.7561 0.964 0.000 0.004 0.024 0.008
#> GSM149152 1 0.4747 0.4038 0.604 0.000 0.008 0.376 0.012
#> GSM149153 5 0.7888 0.0634 0.308 0.068 0.224 0.004 0.396
#> GSM149154 4 0.7610 0.1106 0.156 0.000 0.352 0.412 0.080
#> GSM149155 2 0.3039 0.5916 0.000 0.808 0.000 0.000 0.192
#> GSM149156 2 0.4457 0.4397 0.012 0.620 0.000 0.000 0.368
#> GSM149157 5 0.6589 0.0144 0.224 0.328 0.000 0.000 0.448
#> GSM149158 5 0.6791 0.0689 0.312 0.304 0.000 0.000 0.384
#> GSM149159 5 0.4438 0.0898 0.004 0.384 0.004 0.000 0.608
#> GSM149160 5 0.6586 0.1380 0.292 0.244 0.000 0.000 0.464
#> GSM149161 2 0.6571 0.0517 0.204 0.400 0.000 0.000 0.396
#> GSM149162 2 0.3913 0.5123 0.000 0.676 0.000 0.000 0.324
#> GSM149163 2 0.3534 0.5487 0.000 0.744 0.000 0.000 0.256
#> GSM149164 5 0.6351 0.2040 0.280 0.152 0.012 0.000 0.556
#> GSM149165 2 0.3398 0.5745 0.000 0.780 0.004 0.000 0.216
#> GSM149166 2 0.4901 0.5321 0.104 0.712 0.000 0.000 0.184
#> GSM149167 5 0.6884 0.0317 0.272 0.324 0.004 0.000 0.400
#> GSM149168 5 0.5088 0.1413 0.004 0.392 0.032 0.000 0.572
#> GSM149169 1 0.6598 -0.1480 0.412 0.212 0.000 0.000 0.376
#> GSM149170 5 0.5078 0.1289 0.004 0.424 0.028 0.000 0.544
#> GSM149171 5 0.5280 0.1587 0.008 0.396 0.036 0.000 0.560
#> GSM149172 5 0.6920 -0.1184 0.004 0.048 0.424 0.092 0.432
#> GSM149173 5 0.4886 0.1112 0.000 0.448 0.024 0.000 0.528
#> GSM149174 5 0.6785 0.0734 0.312 0.300 0.000 0.000 0.388
#> GSM149175 3 0.4891 0.6677 0.012 0.000 0.740 0.152 0.096
#> GSM149176 2 0.4104 0.5769 0.088 0.788 0.000 0.000 0.124
#> GSM149177 3 0.8837 -0.0632 0.156 0.256 0.380 0.032 0.176
#> GSM149178 3 0.7545 -0.1285 0.040 0.288 0.380 0.000 0.292
#> GSM149179 2 0.1894 0.6358 0.008 0.920 0.000 0.000 0.072
#> GSM149180 2 0.2488 0.6256 0.004 0.872 0.000 0.000 0.124
#> GSM149181 2 0.3424 0.4379 0.000 0.760 0.000 0.000 0.240
#> GSM149182 2 0.0963 0.6450 0.000 0.964 0.000 0.000 0.036
#> GSM149183 2 0.1965 0.6429 0.000 0.904 0.000 0.000 0.096
#> GSM149184 2 0.2068 0.6165 0.004 0.904 0.000 0.000 0.092
#> GSM149185 2 0.4278 0.0541 0.000 0.548 0.000 0.000 0.452
#> GSM149186 2 0.2304 0.6241 0.008 0.892 0.000 0.000 0.100
#> GSM149187 2 0.3550 0.5826 0.004 0.760 0.000 0.000 0.236
#> GSM149188 2 0.2516 0.5842 0.000 0.860 0.000 0.000 0.140
#> GSM149189 5 0.6679 0.2280 0.004 0.312 0.220 0.000 0.464
#> GSM149190 2 0.6262 0.2438 0.164 0.504 0.000 0.000 0.332
#> GSM149191 5 0.3319 0.2435 0.040 0.100 0.008 0.000 0.852
#> GSM149192 2 0.3398 0.5913 0.004 0.780 0.000 0.000 0.216
#> GSM149193 2 0.2127 0.5978 0.000 0.892 0.000 0.000 0.108
#> GSM149194 5 0.6728 0.1165 0.320 0.268 0.000 0.000 0.412
#> GSM149195 3 0.2074 0.8224 0.000 0.000 0.896 0.000 0.104
#> GSM149196 2 0.2488 0.5978 0.004 0.872 0.000 0.000 0.124
#> GSM149197 2 0.4127 0.4941 0.008 0.680 0.000 0.000 0.312
#> GSM149198 1 0.4749 0.5946 0.700 0.000 0.008 0.252 0.040
#> GSM149199 2 0.4731 0.4481 0.032 0.640 0.000 0.000 0.328
#> GSM149200 5 0.4882 0.1152 0.000 0.444 0.024 0.000 0.532
#> GSM149201 2 0.1121 0.6448 0.000 0.956 0.000 0.000 0.044
#> GSM149202 2 0.4430 0.0345 0.004 0.540 0.000 0.000 0.456
#> GSM149203 5 0.6556 0.2430 0.004 0.120 0.300 0.024 0.552
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9477 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9477 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9477 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9477 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.2030 0.8833 0.000 0.000 0.908 0.000 0.064 0.028
#> GSM149104 3 0.0000 0.9477 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0146 0.9471 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149106 3 0.1268 0.9183 0.000 0.004 0.952 0.000 0.036 0.008
#> GSM149107 3 0.0291 0.9455 0.000 0.000 0.992 0.000 0.004 0.004
#> GSM149108 3 0.0146 0.9465 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149109 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149110 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149111 3 0.0146 0.9471 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149112 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149113 3 0.0146 0.9471 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149114 3 0.0405 0.9437 0.000 0.000 0.988 0.000 0.008 0.004
#> GSM149115 1 0.4719 0.2346 0.516 0.000 0.000 0.448 0.020 0.016
#> GSM149116 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.7603 0.2956 0.456 0.272 0.000 0.108 0.076 0.088
#> GSM149118 4 0.0146 0.9345 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM149119 4 0.0146 0.9345 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM149120 4 0.0260 0.9324 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM149121 4 0.3546 0.6497 0.196 0.000 0.000 0.776 0.016 0.012
#> GSM149122 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0146 0.9345 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM149124 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0146 0.9345 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM149129 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.4852 0.6808 0.720 0.008 0.000 0.176 0.036 0.060
#> GSM149131 1 0.4979 0.4493 0.584 0.000 0.000 0.356 0.032 0.028
#> GSM149132 4 0.0000 0.9351 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0363 0.9302 0.000 0.000 0.000 0.988 0.000 0.012
#> GSM149134 1 0.2202 0.7778 0.908 0.000 0.000 0.052 0.012 0.028
#> GSM149135 1 0.0820 0.7945 0.972 0.000 0.000 0.000 0.016 0.012
#> GSM149136 1 0.0909 0.7948 0.968 0.000 0.000 0.000 0.020 0.012
#> GSM149137 1 0.0717 0.7949 0.976 0.000 0.000 0.000 0.008 0.016
#> GSM149138 1 0.1225 0.7903 0.952 0.000 0.000 0.000 0.012 0.036
#> GSM149139 1 0.0405 0.7962 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM149140 1 0.0458 0.7952 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM149141 5 0.8334 0.2193 0.248 0.052 0.120 0.016 0.388 0.176
#> GSM149142 1 0.5691 0.0125 0.500 0.060 0.000 0.000 0.044 0.396
#> GSM149143 6 0.7303 0.2418 0.232 0.008 0.068 0.052 0.120 0.520
#> GSM149144 2 0.5260 0.0618 0.076 0.516 0.000 0.000 0.008 0.400
#> GSM149145 5 0.7868 0.3359 0.172 0.036 0.160 0.004 0.444 0.184
#> GSM149146 2 0.1865 0.6728 0.000 0.920 0.000 0.000 0.040 0.040
#> GSM149147 1 0.0858 0.7941 0.968 0.000 0.000 0.000 0.004 0.028
#> GSM149148 1 0.0603 0.7944 0.980 0.000 0.000 0.000 0.004 0.016
#> GSM149149 1 0.0692 0.7938 0.976 0.000 0.000 0.000 0.004 0.020
#> GSM149150 2 0.6792 0.1092 0.124 0.492 0.000 0.000 0.260 0.124
#> GSM149151 1 0.1995 0.7771 0.912 0.000 0.000 0.000 0.036 0.052
#> GSM149152 1 0.5113 0.4851 0.592 0.000 0.000 0.332 0.020 0.056
#> GSM149153 5 0.7646 0.2941 0.224 0.052 0.084 0.000 0.452 0.188
#> GSM149154 4 0.8125 -0.0572 0.232 0.000 0.304 0.312 0.072 0.080
#> GSM149155 2 0.3271 0.5587 0.000 0.760 0.000 0.000 0.008 0.232
#> GSM149156 6 0.4493 -0.0374 0.008 0.484 0.000 0.000 0.016 0.492
#> GSM149157 6 0.4394 0.7012 0.056 0.124 0.000 0.000 0.056 0.764
#> GSM149158 6 0.4267 0.7054 0.116 0.152 0.000 0.000 0.000 0.732
#> GSM149159 5 0.5826 0.3447 0.000 0.236 0.000 0.000 0.492 0.272
#> GSM149160 6 0.4029 0.7167 0.096 0.080 0.000 0.000 0.032 0.792
#> GSM149161 6 0.4733 0.6380 0.072 0.224 0.000 0.000 0.016 0.688
#> GSM149162 2 0.4780 0.2458 0.000 0.552 0.000 0.000 0.056 0.392
#> GSM149163 2 0.3670 0.4966 0.000 0.704 0.000 0.000 0.012 0.284
#> GSM149164 6 0.3841 0.6778 0.088 0.024 0.008 0.004 0.056 0.820
#> GSM149165 2 0.4503 0.5172 0.000 0.684 0.000 0.000 0.232 0.084
#> GSM149166 2 0.5171 0.5462 0.056 0.692 0.000 0.000 0.088 0.164
#> GSM149167 6 0.5655 0.6499 0.156 0.192 0.000 0.000 0.032 0.620
#> GSM149168 5 0.5129 0.5299 0.000 0.216 0.016 0.000 0.656 0.112
#> GSM149169 6 0.4767 0.6905 0.200 0.088 0.000 0.000 0.016 0.696
#> GSM149170 5 0.4448 0.5226 0.000 0.268 0.012 0.000 0.680 0.040
#> GSM149171 5 0.4153 0.5552 0.000 0.212 0.028 0.000 0.736 0.024
#> GSM149172 5 0.6372 0.3906 0.000 0.064 0.320 0.048 0.532 0.036
#> GSM149173 5 0.4199 0.5330 0.000 0.256 0.020 0.000 0.704 0.020
#> GSM149174 6 0.4396 0.7173 0.116 0.120 0.000 0.000 0.016 0.748
#> GSM149175 3 0.7236 0.2746 0.032 0.000 0.512 0.152 0.200 0.104
#> GSM149176 2 0.5454 0.5089 0.056 0.668 0.000 0.000 0.144 0.132
#> GSM149177 5 0.9252 0.2522 0.092 0.240 0.212 0.044 0.272 0.140
#> GSM149178 5 0.7624 0.4241 0.032 0.204 0.216 0.004 0.452 0.092
#> GSM149179 2 0.1995 0.6655 0.000 0.912 0.000 0.000 0.052 0.036
#> GSM149180 2 0.2488 0.6655 0.000 0.880 0.000 0.000 0.076 0.044
#> GSM149181 2 0.4088 0.2045 0.000 0.616 0.000 0.000 0.368 0.016
#> GSM149182 2 0.1168 0.6779 0.000 0.956 0.000 0.000 0.016 0.028
#> GSM149183 2 0.3112 0.6650 0.000 0.836 0.000 0.000 0.096 0.068
#> GSM149184 2 0.3062 0.5949 0.000 0.816 0.000 0.000 0.160 0.024
#> GSM149185 5 0.4491 0.3569 0.000 0.388 0.000 0.000 0.576 0.036
#> GSM149186 2 0.3062 0.6592 0.000 0.836 0.000 0.000 0.112 0.052
#> GSM149187 2 0.4493 0.4533 0.000 0.636 0.000 0.000 0.052 0.312
#> GSM149188 2 0.2901 0.6343 0.000 0.840 0.000 0.000 0.128 0.032
#> GSM149189 5 0.5605 0.5436 0.000 0.180 0.144 0.000 0.636 0.040
#> GSM149190 6 0.5716 0.0968 0.088 0.436 0.000 0.000 0.024 0.452
#> GSM149191 6 0.4840 0.2479 0.012 0.032 0.004 0.000 0.368 0.584
#> GSM149192 2 0.4628 0.5567 0.000 0.684 0.000 0.000 0.204 0.112
#> GSM149193 2 0.2730 0.6101 0.000 0.836 0.000 0.000 0.152 0.012
#> GSM149194 6 0.4598 0.7138 0.092 0.136 0.000 0.000 0.032 0.740
#> GSM149195 3 0.3168 0.7482 0.000 0.000 0.804 0.000 0.172 0.024
#> GSM149196 2 0.3456 0.5915 0.000 0.788 0.000 0.000 0.172 0.040
#> GSM149197 2 0.4313 0.3028 0.004 0.604 0.000 0.000 0.020 0.372
#> GSM149198 1 0.5414 0.6609 0.696 0.000 0.016 0.152 0.064 0.072
#> GSM149199 2 0.4427 0.1955 0.012 0.568 0.000 0.000 0.012 0.408
#> GSM149200 5 0.4099 0.5164 0.000 0.272 0.008 0.000 0.696 0.024
#> GSM149201 2 0.2277 0.6855 0.000 0.892 0.000 0.000 0.032 0.076
#> GSM149202 5 0.4224 0.3215 0.000 0.432 0.000 0.000 0.552 0.016
#> GSM149203 5 0.6444 0.5134 0.000 0.088 0.208 0.012 0.580 0.112
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:skmeans 103 2.97e-10 2
#> MAD:skmeans 99 1.19e-21 3
#> MAD:skmeans 89 4.42e-28 4
#> MAD:skmeans 66 1.58e-22 5
#> MAD:skmeans 77 5.51e-30 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "pam"]
# you can also extract it by
# res = res_list["MAD:pam"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.436 0.799 0.832 0.4709 0.534 0.534
#> 3 3 0.826 0.862 0.938 0.3217 0.809 0.653
#> 4 4 0.882 0.892 0.956 0.1255 0.917 0.783
#> 5 5 0.865 0.883 0.943 0.1204 0.876 0.620
#> 6 6 0.867 0.747 0.877 0.0356 0.960 0.822
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 2 0.8713 0.6532 0.292 0.708
#> GSM149100 2 0.6438 0.7933 0.164 0.836
#> GSM149101 2 0.9209 0.6075 0.336 0.664
#> GSM149102 2 0.5842 0.8149 0.140 0.860
#> GSM149103 2 0.2423 0.8655 0.040 0.960
#> GSM149104 2 0.7602 0.7429 0.220 0.780
#> GSM149105 2 0.7528 0.7457 0.216 0.784
#> GSM149106 2 0.8016 0.7274 0.244 0.756
#> GSM149107 2 0.6438 0.7993 0.164 0.836
#> GSM149108 2 0.8081 0.7116 0.248 0.752
#> GSM149109 2 0.8661 0.6588 0.288 0.712
#> GSM149110 2 0.5946 0.8101 0.144 0.856
#> GSM149111 2 0.4022 0.8495 0.080 0.920
#> GSM149112 2 0.7883 0.7265 0.236 0.764
#> GSM149113 2 0.8016 0.7150 0.244 0.756
#> GSM149114 2 0.8016 0.6869 0.244 0.756
#> GSM149115 1 0.2423 0.8666 0.960 0.040
#> GSM149116 1 0.0000 0.8520 1.000 0.000
#> GSM149117 2 0.9710 0.1670 0.400 0.600
#> GSM149118 1 0.1633 0.8630 0.976 0.024
#> GSM149119 1 0.0376 0.8541 0.996 0.004
#> GSM149120 1 0.0000 0.8520 1.000 0.000
#> GSM149121 1 0.2423 0.8666 0.960 0.040
#> GSM149122 1 0.0000 0.8520 1.000 0.000
#> GSM149123 1 0.2423 0.8666 0.960 0.040
#> GSM149124 1 0.2423 0.8664 0.960 0.040
#> GSM149125 1 0.0000 0.8520 1.000 0.000
#> GSM149126 1 0.0000 0.8520 1.000 0.000
#> GSM149127 1 0.0000 0.8520 1.000 0.000
#> GSM149128 1 0.0000 0.8520 1.000 0.000
#> GSM149129 1 0.0000 0.8520 1.000 0.000
#> GSM149130 1 0.7815 0.7925 0.768 0.232
#> GSM149131 1 0.2778 0.8675 0.952 0.048
#> GSM149132 1 0.1414 0.8616 0.980 0.020
#> GSM149133 1 0.1633 0.8630 0.976 0.024
#> GSM149134 1 0.7376 0.8118 0.792 0.208
#> GSM149135 1 0.7056 0.8222 0.808 0.192
#> GSM149136 1 0.7376 0.8120 0.792 0.208
#> GSM149137 1 0.7056 0.8222 0.808 0.192
#> GSM149138 1 0.8909 0.7168 0.692 0.308
#> GSM149139 1 0.3114 0.8680 0.944 0.056
#> GSM149140 1 0.6531 0.8351 0.832 0.168
#> GSM149141 2 0.8267 0.5833 0.260 0.740
#> GSM149142 1 0.8909 0.7168 0.692 0.308
#> GSM149143 1 0.8763 0.7309 0.704 0.296
#> GSM149144 1 0.8909 0.7168 0.692 0.308
#> GSM149145 2 0.4815 0.8127 0.104 0.896
#> GSM149146 2 0.0000 0.8825 0.000 1.000
#> GSM149147 1 0.4939 0.8594 0.892 0.108
#> GSM149148 1 0.3274 0.8678 0.940 0.060
#> GSM149149 1 0.3733 0.8672 0.928 0.072
#> GSM149150 2 0.0000 0.8825 0.000 1.000
#> GSM149151 1 0.8713 0.7357 0.708 0.292
#> GSM149152 1 0.4022 0.8659 0.920 0.080
#> GSM149153 2 0.2948 0.8555 0.052 0.948
#> GSM149154 1 0.5408 0.8545 0.876 0.124
#> GSM149155 2 0.0000 0.8825 0.000 1.000
#> GSM149156 2 0.0000 0.8825 0.000 1.000
#> GSM149157 2 0.0000 0.8825 0.000 1.000
#> GSM149158 1 0.8955 0.7110 0.688 0.312
#> GSM149159 2 0.0000 0.8825 0.000 1.000
#> GSM149160 2 0.0938 0.8776 0.012 0.988
#> GSM149161 2 0.1843 0.8701 0.028 0.972
#> GSM149162 2 0.0000 0.8825 0.000 1.000
#> GSM149163 2 0.0672 0.8793 0.008 0.992
#> GSM149164 2 0.0000 0.8825 0.000 1.000
#> GSM149165 2 0.0000 0.8825 0.000 1.000
#> GSM149166 2 0.7528 0.6655 0.216 0.784
#> GSM149167 2 0.9393 0.3135 0.356 0.644
#> GSM149168 2 0.0000 0.8825 0.000 1.000
#> GSM149169 1 0.8909 0.7168 0.692 0.308
#> GSM149170 2 0.0000 0.8825 0.000 1.000
#> GSM149171 2 0.0000 0.8825 0.000 1.000
#> GSM149172 2 0.0672 0.8797 0.008 0.992
#> GSM149173 2 0.0000 0.8825 0.000 1.000
#> GSM149174 1 0.8909 0.7168 0.692 0.308
#> GSM149175 2 0.6148 0.8013 0.152 0.848
#> GSM149176 2 0.6247 0.7567 0.156 0.844
#> GSM149177 2 0.7674 0.6481 0.224 0.776
#> GSM149178 2 0.0000 0.8825 0.000 1.000
#> GSM149179 2 0.0000 0.8825 0.000 1.000
#> GSM149180 2 0.0000 0.8825 0.000 1.000
#> GSM149181 2 0.0000 0.8825 0.000 1.000
#> GSM149182 2 0.0000 0.8825 0.000 1.000
#> GSM149183 2 0.0000 0.8825 0.000 1.000
#> GSM149184 2 0.0000 0.8825 0.000 1.000
#> GSM149185 2 0.0000 0.8825 0.000 1.000
#> GSM149186 2 0.0000 0.8825 0.000 1.000
#> GSM149187 2 0.0000 0.8825 0.000 1.000
#> GSM149188 2 0.0000 0.8825 0.000 1.000
#> GSM149189 2 0.2423 0.8655 0.040 0.960
#> GSM149190 2 0.8555 0.5309 0.280 0.720
#> GSM149191 2 0.0000 0.8825 0.000 1.000
#> GSM149192 2 0.0000 0.8825 0.000 1.000
#> GSM149193 2 0.0000 0.8825 0.000 1.000
#> GSM149194 1 0.9286 0.6556 0.656 0.344
#> GSM149195 2 0.2423 0.8655 0.040 0.960
#> GSM149196 2 0.0000 0.8825 0.000 1.000
#> GSM149197 2 0.7674 0.6405 0.224 0.776
#> GSM149198 2 0.9954 -0.0881 0.460 0.540
#> GSM149199 2 0.6973 0.7019 0.188 0.812
#> GSM149200 2 0.0000 0.8825 0.000 1.000
#> GSM149201 2 0.0000 0.8825 0.000 1.000
#> GSM149202 2 0.0000 0.8825 0.000 1.000
#> GSM149203 2 0.2236 0.8675 0.036 0.964
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9700 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149116 1 0.5529 0.5207 0.704 0.000 0.296
#> GSM149117 1 0.6291 0.1484 0.532 0.468 0.000
#> GSM149118 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149119 1 0.0592 0.9094 0.988 0.000 0.012
#> GSM149120 1 0.1163 0.8991 0.972 0.000 0.028
#> GSM149121 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149122 3 0.6302 0.1140 0.480 0.000 0.520
#> GSM149123 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149124 1 0.0237 0.9151 0.996 0.004 0.000
#> GSM149125 1 0.0237 0.9133 0.996 0.000 0.004
#> GSM149126 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149127 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149128 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149130 1 0.2537 0.9089 0.920 0.080 0.000
#> GSM149131 1 0.1031 0.9219 0.976 0.024 0.000
#> GSM149132 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149133 1 0.0000 0.9148 1.000 0.000 0.000
#> GSM149134 1 0.1753 0.9234 0.952 0.048 0.000
#> GSM149135 1 0.1753 0.9234 0.952 0.048 0.000
#> GSM149136 1 0.1753 0.9234 0.952 0.048 0.000
#> GSM149137 1 0.1753 0.9234 0.952 0.048 0.000
#> GSM149138 1 0.2796 0.9020 0.908 0.092 0.000
#> GSM149139 1 0.1411 0.9239 0.964 0.036 0.000
#> GSM149140 1 0.1753 0.9234 0.952 0.048 0.000
#> GSM149141 2 0.5621 0.5522 0.308 0.692 0.000
#> GSM149142 1 0.2796 0.9020 0.908 0.092 0.000
#> GSM149143 1 0.2796 0.9020 0.908 0.092 0.000
#> GSM149144 1 0.2796 0.9020 0.908 0.092 0.000
#> GSM149145 2 0.4047 0.7977 0.148 0.848 0.004
#> GSM149146 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149147 1 0.1529 0.9240 0.960 0.040 0.000
#> GSM149148 1 0.1529 0.9240 0.960 0.040 0.000
#> GSM149149 1 0.1753 0.9234 0.952 0.048 0.000
#> GSM149150 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149151 1 0.2625 0.9070 0.916 0.084 0.000
#> GSM149152 1 0.1289 0.9234 0.968 0.032 0.000
#> GSM149153 2 0.2356 0.8714 0.072 0.928 0.000
#> GSM149154 1 0.1765 0.9238 0.956 0.040 0.004
#> GSM149155 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149158 1 0.2878 0.8988 0.904 0.096 0.000
#> GSM149159 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149160 2 0.0592 0.9134 0.012 0.988 0.000
#> GSM149161 2 0.1411 0.8988 0.036 0.964 0.000
#> GSM149162 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149163 2 0.0424 0.9157 0.008 0.992 0.000
#> GSM149164 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149165 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149166 2 0.5363 0.6072 0.276 0.724 0.000
#> GSM149167 2 0.6305 0.0168 0.484 0.516 0.000
#> GSM149168 2 0.0237 0.9173 0.000 0.996 0.004
#> GSM149169 1 0.2796 0.9020 0.908 0.092 0.000
#> GSM149170 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149171 2 0.0237 0.9173 0.000 0.996 0.004
#> GSM149172 2 0.0892 0.9052 0.000 0.980 0.020
#> GSM149173 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149174 1 0.2796 0.9020 0.908 0.092 0.000
#> GSM149175 2 0.4912 0.7350 0.008 0.796 0.196
#> GSM149176 2 0.4346 0.7552 0.184 0.816 0.000
#> GSM149177 2 0.5529 0.5767 0.296 0.704 0.000
#> GSM149178 2 0.0237 0.9173 0.000 0.996 0.004
#> GSM149179 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149189 2 0.1529 0.8876 0.000 0.960 0.040
#> GSM149190 2 0.6008 0.4010 0.372 0.628 0.000
#> GSM149191 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149194 1 0.3941 0.8363 0.844 0.156 0.000
#> GSM149195 2 0.5098 0.6639 0.000 0.752 0.248
#> GSM149196 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149197 2 0.5397 0.6019 0.280 0.720 0.000
#> GSM149198 1 0.6111 0.3373 0.604 0.396 0.000
#> GSM149199 2 0.5138 0.6525 0.252 0.748 0.000
#> GSM149200 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149201 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.9195 0.000 1.000 0.000
#> GSM149203 2 0.3551 0.8134 0.000 0.868 0.132
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149103 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149104 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149107 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 1.0000 0.000 0.000 1.000 0.000
#> GSM149115 1 0.0707 0.9089 0.980 0.000 0.000 0.020
#> GSM149116 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149117 1 0.4500 0.5176 0.684 0.316 0.000 0.000
#> GSM149118 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149121 4 0.2760 0.8497 0.128 0.000 0.000 0.872
#> GSM149122 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149130 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149131 1 0.2589 0.8122 0.884 0.000 0.000 0.116
#> GSM149132 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0000 0.9897 0.000 0.000 0.000 1.000
#> GSM149134 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149141 2 0.4382 0.5929 0.296 0.704 0.000 0.000
#> GSM149142 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149143 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149144 1 0.0592 0.9113 0.984 0.016 0.000 0.000
#> GSM149145 2 0.3219 0.7923 0.164 0.836 0.000 0.000
#> GSM149146 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149147 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149150 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149151 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149153 2 0.2081 0.8744 0.084 0.916 0.000 0.000
#> GSM149154 1 0.0188 0.9206 0.996 0.000 0.000 0.004
#> GSM149155 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149156 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149157 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149158 1 0.0336 0.9177 0.992 0.008 0.000 0.000
#> GSM149159 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149160 2 0.0707 0.9206 0.020 0.980 0.000 0.000
#> GSM149161 2 0.1792 0.8855 0.068 0.932 0.000 0.000
#> GSM149162 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149163 2 0.0336 0.9270 0.008 0.992 0.000 0.000
#> GSM149164 2 0.0336 0.9272 0.008 0.992 0.000 0.000
#> GSM149165 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149166 2 0.4406 0.5755 0.300 0.700 0.000 0.000
#> GSM149167 1 0.5000 -0.0328 0.504 0.496 0.000 0.000
#> GSM149168 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149169 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149170 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149171 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149172 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149173 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149174 1 0.0000 0.9231 1.000 0.000 0.000 0.000
#> GSM149175 2 0.6627 0.1757 0.004 0.516 0.072 0.408
#> GSM149176 2 0.3726 0.7287 0.212 0.788 0.000 0.000
#> GSM149177 2 0.4605 0.5018 0.336 0.664 0.000 0.000
#> GSM149178 2 0.0336 0.9270 0.000 0.992 0.008 0.000
#> GSM149179 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149180 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149181 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149182 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149183 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149184 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149185 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149186 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149188 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149189 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149190 2 0.4477 0.5612 0.312 0.688 0.000 0.000
#> GSM149191 2 0.0188 0.9292 0.004 0.996 0.000 0.000
#> GSM149192 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149193 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149194 1 0.1867 0.8563 0.928 0.072 0.000 0.000
#> GSM149195 2 0.3801 0.7190 0.000 0.780 0.220 0.000
#> GSM149196 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149197 2 0.3649 0.7382 0.204 0.796 0.000 0.000
#> GSM149198 1 0.4955 0.1612 0.556 0.444 0.000 0.000
#> GSM149199 2 0.3649 0.7374 0.204 0.796 0.000 0.000
#> GSM149200 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149201 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149202 2 0.0000 0.9311 0.000 1.000 0.000 0.000
#> GSM149203 2 0.2589 0.8429 0.000 0.884 0.116 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149104 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149107 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.0510 0.966 0.984 0.000 0.000 0.016 0.000
#> GSM149116 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.3209 0.747 0.812 0.008 0.000 0.000 0.180
#> GSM149118 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.2179 0.873 0.112 0.000 0.000 0.888 0.000
#> GSM149122 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0162 0.974 0.996 0.000 0.000 0.000 0.004
#> GSM149131 1 0.1121 0.943 0.956 0.000 0.000 0.044 0.000
#> GSM149132 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 0.991 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149141 5 0.3774 0.601 0.296 0.000 0.000 0.000 0.704
#> GSM149142 1 0.1341 0.929 0.944 0.056 0.000 0.000 0.000
#> GSM149143 1 0.1341 0.931 0.944 0.056 0.000 0.000 0.000
#> GSM149144 2 0.1544 0.875 0.068 0.932 0.000 0.000 0.000
#> GSM149145 5 0.2813 0.769 0.168 0.000 0.000 0.000 0.832
#> GSM149146 5 0.0880 0.871 0.000 0.032 0.000 0.000 0.968
#> GSM149147 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149151 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149153 5 0.1671 0.845 0.076 0.000 0.000 0.000 0.924
#> GSM149154 1 0.0000 0.977 1.000 0.000 0.000 0.000 0.000
#> GSM149155 2 0.2329 0.837 0.000 0.876 0.000 0.000 0.124
#> GSM149156 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> GSM149157 2 0.3707 0.653 0.000 0.716 0.000 0.000 0.284
#> GSM149158 2 0.1270 0.887 0.052 0.948 0.000 0.000 0.000
#> GSM149159 5 0.3774 0.545 0.000 0.296 0.000 0.000 0.704
#> GSM149160 2 0.2707 0.836 0.008 0.860 0.000 0.000 0.132
#> GSM149161 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> GSM149162 2 0.0162 0.894 0.000 0.996 0.000 0.000 0.004
#> GSM149163 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> GSM149164 2 0.4047 0.582 0.004 0.676 0.000 0.000 0.320
#> GSM149165 5 0.1197 0.863 0.000 0.048 0.000 0.000 0.952
#> GSM149166 2 0.1792 0.870 0.000 0.916 0.000 0.000 0.084
#> GSM149167 2 0.1197 0.890 0.048 0.952 0.000 0.000 0.000
#> GSM149168 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149169 2 0.2074 0.854 0.104 0.896 0.000 0.000 0.000
#> GSM149170 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149171 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149172 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149173 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149174 2 0.0703 0.894 0.024 0.976 0.000 0.000 0.000
#> GSM149175 5 0.5658 0.210 0.004 0.000 0.068 0.408 0.520
#> GSM149176 5 0.6036 0.308 0.144 0.308 0.000 0.000 0.548
#> GSM149177 5 0.3876 0.571 0.316 0.000 0.000 0.000 0.684
#> GSM149178 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149179 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149180 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149181 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149182 5 0.1121 0.866 0.000 0.044 0.000 0.000 0.956
#> GSM149183 5 0.3966 0.515 0.000 0.336 0.000 0.000 0.664
#> GSM149184 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149185 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149186 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149187 5 0.2471 0.804 0.000 0.136 0.000 0.000 0.864
#> GSM149188 5 0.2280 0.815 0.000 0.120 0.000 0.000 0.880
#> GSM149189 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149190 2 0.0992 0.896 0.024 0.968 0.000 0.000 0.008
#> GSM149191 5 0.1608 0.845 0.000 0.072 0.000 0.000 0.928
#> GSM149192 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149193 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149194 2 0.2629 0.823 0.136 0.860 0.000 0.000 0.004
#> GSM149195 5 0.3210 0.717 0.000 0.000 0.212 0.000 0.788
#> GSM149196 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149197 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> GSM149198 5 0.4440 0.186 0.468 0.004 0.000 0.000 0.528
#> GSM149199 2 0.3456 0.764 0.016 0.800 0.000 0.000 0.184
#> GSM149200 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149201 5 0.2690 0.786 0.000 0.156 0.000 0.000 0.844
#> GSM149202 5 0.0000 0.883 0.000 0.000 0.000 0.000 1.000
#> GSM149203 5 0.2723 0.802 0.000 0.012 0.124 0.000 0.864
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149104 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0146 0.99566 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM149107 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.99971 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.0260 0.94400 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM149116 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.3017 0.71540 0.816 0.020 0.000 0.000 0.164 0.000
#> GSM149118 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.1957 0.85678 0.112 0.000 0.000 0.888 0.000 0.000
#> GSM149122 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.0291 0.94447 0.992 0.000 0.000 0.000 0.004 0.004
#> GSM149131 1 0.0790 0.92318 0.968 0.000 0.000 0.032 0.000 0.000
#> GSM149132 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0000 0.99039 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149134 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 6 0.5190 0.43717 0.096 0.000 0.000 0.000 0.376 0.528
#> GSM149142 1 0.3063 0.81603 0.840 0.092 0.000 0.000 0.000 0.068
#> GSM149143 1 0.3833 0.35084 0.556 0.000 0.000 0.000 0.000 0.444
#> GSM149144 2 0.0291 0.63495 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM149145 6 0.4389 0.39987 0.024 0.000 0.000 0.000 0.448 0.528
#> GSM149146 5 0.0865 0.78190 0.000 0.036 0.000 0.000 0.964 0.000
#> GSM149147 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149151 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149153 6 0.3860 0.36206 0.000 0.000 0.000 0.000 0.472 0.528
#> GSM149154 1 0.0000 0.94953 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149155 2 0.1349 0.59577 0.000 0.940 0.000 0.000 0.056 0.004
#> GSM149156 2 0.2048 0.66120 0.000 0.880 0.000 0.000 0.000 0.120
#> GSM149157 6 0.5521 -0.48743 0.000 0.400 0.000 0.000 0.132 0.468
#> GSM149158 2 0.3857 0.58406 0.000 0.532 0.000 0.000 0.000 0.468
#> GSM149159 5 0.3213 0.56043 0.000 0.160 0.000 0.000 0.808 0.032
#> GSM149160 2 0.3989 0.58030 0.000 0.528 0.000 0.000 0.004 0.468
#> GSM149161 2 0.3857 0.58406 0.000 0.532 0.000 0.000 0.000 0.468
#> GSM149162 2 0.1285 0.64820 0.000 0.944 0.000 0.000 0.004 0.052
#> GSM149163 2 0.0146 0.63588 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149164 6 0.5521 -0.48856 0.000 0.400 0.000 0.000 0.132 0.468
#> GSM149165 5 0.1863 0.72444 0.000 0.104 0.000 0.000 0.896 0.000
#> GSM149166 2 0.1434 0.62300 0.000 0.940 0.000 0.000 0.048 0.012
#> GSM149167 2 0.4167 0.62236 0.024 0.632 0.000 0.000 0.000 0.344
#> GSM149168 5 0.0146 0.80447 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM149169 2 0.4228 0.60755 0.020 0.588 0.000 0.000 0.000 0.392
#> GSM149170 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149171 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149172 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149173 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149174 2 0.3817 0.59531 0.000 0.568 0.000 0.000 0.000 0.432
#> GSM149175 6 0.5804 0.44487 0.000 0.000 0.048 0.072 0.352 0.528
#> GSM149176 5 0.6688 -0.21064 0.112 0.312 0.000 0.000 0.472 0.104
#> GSM149177 5 0.3636 0.36819 0.320 0.000 0.000 0.000 0.676 0.004
#> GSM149178 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149179 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149180 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149181 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149182 5 0.2278 0.70048 0.000 0.128 0.000 0.000 0.868 0.004
#> GSM149183 2 0.3868 -0.25203 0.000 0.508 0.000 0.000 0.492 0.000
#> GSM149184 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149185 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149186 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149187 5 0.3647 0.39822 0.000 0.360 0.000 0.000 0.640 0.000
#> GSM149188 5 0.3747 0.34400 0.000 0.396 0.000 0.000 0.604 0.000
#> GSM149189 5 0.0146 0.80381 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM149190 2 0.3653 0.63143 0.000 0.692 0.000 0.000 0.008 0.300
#> GSM149191 5 0.3851 0.09754 0.000 0.000 0.000 0.000 0.540 0.460
#> GSM149192 5 0.0458 0.79684 0.000 0.000 0.000 0.000 0.984 0.016
#> GSM149193 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149194 2 0.3989 0.58136 0.004 0.528 0.000 0.000 0.000 0.468
#> GSM149195 5 0.2883 0.52708 0.000 0.000 0.212 0.000 0.788 0.000
#> GSM149196 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149197 2 0.1556 0.65495 0.000 0.920 0.000 0.000 0.000 0.080
#> GSM149198 5 0.5285 0.00677 0.420 0.000 0.000 0.000 0.480 0.100
#> GSM149199 2 0.2113 0.55020 0.004 0.896 0.000 0.000 0.092 0.008
#> GSM149200 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149201 5 0.3966 0.27115 0.000 0.444 0.000 0.000 0.552 0.004
#> GSM149202 5 0.0000 0.80650 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149203 5 0.2999 0.64809 0.000 0.000 0.124 0.000 0.836 0.040
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:pam 102 4.33e-12 2
#> MAD:pam 100 3.50e-26 3
#> MAD:pam 102 1.33e-33 4
#> MAD:pam 102 1.93e-39 5
#> MAD:pam 90 2.08e-33 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "mclust"]
# you can also extract it by
# res = res_list["MAD:mclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.992 0.996 0.4288 0.572 0.572
#> 3 3 0.631 0.793 0.881 0.2885 0.810 0.669
#> 4 4 0.686 0.845 0.914 0.2278 0.701 0.397
#> 5 5 0.785 0.454 0.716 0.1433 0.769 0.407
#> 6 6 0.813 0.792 0.885 0.0509 0.868 0.513
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 2 0.0376 0.994 0.004 0.996
#> GSM149100 2 0.0376 0.994 0.004 0.996
#> GSM149101 2 0.0376 0.994 0.004 0.996
#> GSM149102 2 0.0376 0.994 0.004 0.996
#> GSM149103 2 0.0000 0.997 0.000 1.000
#> GSM149104 2 0.0376 0.994 0.004 0.996
#> GSM149105 2 0.0376 0.994 0.004 0.996
#> GSM149106 2 0.0000 0.997 0.000 1.000
#> GSM149107 2 0.0376 0.994 0.004 0.996
#> GSM149108 2 0.0376 0.994 0.004 0.996
#> GSM149109 2 0.0376 0.994 0.004 0.996
#> GSM149110 2 0.0376 0.994 0.004 0.996
#> GSM149111 2 0.0376 0.994 0.004 0.996
#> GSM149112 2 0.0376 0.994 0.004 0.996
#> GSM149113 2 0.0376 0.994 0.004 0.996
#> GSM149114 2 0.0376 0.994 0.004 0.996
#> GSM149115 1 0.0000 0.994 1.000 0.000
#> GSM149116 1 0.0000 0.994 1.000 0.000
#> GSM149117 1 0.4690 0.892 0.900 0.100
#> GSM149118 1 0.0000 0.994 1.000 0.000
#> GSM149119 1 0.0000 0.994 1.000 0.000
#> GSM149120 1 0.0000 0.994 1.000 0.000
#> GSM149121 1 0.0000 0.994 1.000 0.000
#> GSM149122 1 0.0000 0.994 1.000 0.000
#> GSM149123 1 0.0000 0.994 1.000 0.000
#> GSM149124 1 0.0000 0.994 1.000 0.000
#> GSM149125 1 0.0000 0.994 1.000 0.000
#> GSM149126 1 0.0000 0.994 1.000 0.000
#> GSM149127 1 0.0000 0.994 1.000 0.000
#> GSM149128 1 0.0000 0.994 1.000 0.000
#> GSM149129 1 0.0000 0.994 1.000 0.000
#> GSM149130 1 0.0376 0.994 0.996 0.004
#> GSM149131 1 0.0000 0.994 1.000 0.000
#> GSM149132 1 0.0000 0.994 1.000 0.000
#> GSM149133 1 0.0000 0.994 1.000 0.000
#> GSM149134 1 0.0376 0.994 0.996 0.004
#> GSM149135 1 0.0376 0.994 0.996 0.004
#> GSM149136 1 0.0376 0.994 0.996 0.004
#> GSM149137 1 0.0376 0.994 0.996 0.004
#> GSM149138 1 0.0376 0.994 0.996 0.004
#> GSM149139 1 0.0376 0.994 0.996 0.004
#> GSM149140 1 0.0376 0.994 0.996 0.004
#> GSM149141 2 0.0000 0.997 0.000 1.000
#> GSM149142 2 0.1184 0.982 0.016 0.984
#> GSM149143 2 0.0000 0.997 0.000 1.000
#> GSM149144 2 0.0000 0.997 0.000 1.000
#> GSM149145 2 0.0000 0.997 0.000 1.000
#> GSM149146 2 0.0000 0.997 0.000 1.000
#> GSM149147 1 0.0376 0.994 0.996 0.004
#> GSM149148 1 0.0376 0.994 0.996 0.004
#> GSM149149 1 0.0376 0.994 0.996 0.004
#> GSM149150 2 0.0000 0.997 0.000 1.000
#> GSM149151 1 0.0376 0.994 0.996 0.004
#> GSM149152 1 0.0376 0.994 0.996 0.004
#> GSM149153 2 0.0000 0.997 0.000 1.000
#> GSM149154 2 0.6531 0.798 0.168 0.832
#> GSM149155 2 0.0000 0.997 0.000 1.000
#> GSM149156 2 0.0000 0.997 0.000 1.000
#> GSM149157 2 0.0000 0.997 0.000 1.000
#> GSM149158 2 0.0000 0.997 0.000 1.000
#> GSM149159 2 0.0000 0.997 0.000 1.000
#> GSM149160 2 0.0000 0.997 0.000 1.000
#> GSM149161 2 0.0000 0.997 0.000 1.000
#> GSM149162 2 0.0000 0.997 0.000 1.000
#> GSM149163 2 0.0000 0.997 0.000 1.000
#> GSM149164 2 0.0000 0.997 0.000 1.000
#> GSM149165 2 0.0000 0.997 0.000 1.000
#> GSM149166 2 0.0000 0.997 0.000 1.000
#> GSM149167 2 0.0000 0.997 0.000 1.000
#> GSM149168 2 0.0000 0.997 0.000 1.000
#> GSM149169 2 0.0000 0.997 0.000 1.000
#> GSM149170 2 0.0000 0.997 0.000 1.000
#> GSM149171 2 0.0000 0.997 0.000 1.000
#> GSM149172 2 0.0000 0.997 0.000 1.000
#> GSM149173 2 0.0000 0.997 0.000 1.000
#> GSM149174 2 0.0000 0.997 0.000 1.000
#> GSM149175 2 0.0000 0.997 0.000 1.000
#> GSM149176 2 0.0000 0.997 0.000 1.000
#> GSM149177 2 0.0000 0.997 0.000 1.000
#> GSM149178 2 0.0000 0.997 0.000 1.000
#> GSM149179 2 0.0000 0.997 0.000 1.000
#> GSM149180 2 0.0000 0.997 0.000 1.000
#> GSM149181 2 0.0000 0.997 0.000 1.000
#> GSM149182 2 0.0000 0.997 0.000 1.000
#> GSM149183 2 0.0000 0.997 0.000 1.000
#> GSM149184 2 0.0000 0.997 0.000 1.000
#> GSM149185 2 0.0000 0.997 0.000 1.000
#> GSM149186 2 0.0000 0.997 0.000 1.000
#> GSM149187 2 0.0000 0.997 0.000 1.000
#> GSM149188 2 0.0000 0.997 0.000 1.000
#> GSM149189 2 0.0000 0.997 0.000 1.000
#> GSM149190 2 0.0000 0.997 0.000 1.000
#> GSM149191 2 0.0000 0.997 0.000 1.000
#> GSM149192 2 0.0000 0.997 0.000 1.000
#> GSM149193 2 0.0000 0.997 0.000 1.000
#> GSM149194 2 0.0000 0.997 0.000 1.000
#> GSM149195 2 0.0000 0.997 0.000 1.000
#> GSM149196 2 0.0000 0.997 0.000 1.000
#> GSM149197 2 0.0000 0.997 0.000 1.000
#> GSM149198 1 0.1843 0.972 0.972 0.028
#> GSM149199 2 0.0000 0.997 0.000 1.000
#> GSM149200 2 0.0000 0.997 0.000 1.000
#> GSM149201 2 0.0000 0.997 0.000 1.000
#> GSM149202 2 0.0000 0.997 0.000 1.000
#> GSM149203 2 0.0000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149100 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149101 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149102 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149103 2 0.3482 0.856 0.000 0.872 0.128
#> GSM149104 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149105 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149106 3 0.5926 0.432 0.000 0.356 0.644
#> GSM149107 3 0.1289 0.805 0.000 0.032 0.968
#> GSM149108 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149109 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149110 3 0.0892 0.813 0.000 0.020 0.980
#> GSM149111 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149112 3 0.0892 0.813 0.000 0.020 0.980
#> GSM149113 3 0.0747 0.815 0.000 0.016 0.984
#> GSM149114 3 0.3752 0.700 0.000 0.144 0.856
#> GSM149115 1 0.7961 0.611 0.588 0.336 0.076
#> GSM149116 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149117 3 0.8494 0.301 0.108 0.336 0.556
#> GSM149118 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149119 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149120 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149121 1 0.7807 0.612 0.596 0.336 0.068
#> GSM149122 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149123 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149124 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149125 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149126 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149127 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149128 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149129 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149130 1 0.9596 0.497 0.452 0.336 0.212
#> GSM149131 1 0.7961 0.611 0.588 0.336 0.076
#> GSM149132 1 0.0000 0.613 1.000 0.000 0.000
#> GSM149133 1 0.0747 0.608 0.984 0.000 0.016
#> GSM149134 1 0.8494 0.608 0.556 0.336 0.108
#> GSM149135 1 0.8773 0.602 0.536 0.336 0.128
#> GSM149136 1 0.9017 0.593 0.516 0.336 0.148
#> GSM149137 1 0.9017 0.593 0.516 0.336 0.148
#> GSM149138 1 0.9306 0.571 0.488 0.336 0.176
#> GSM149139 1 0.8773 0.602 0.536 0.336 0.128
#> GSM149140 1 0.8924 0.597 0.524 0.336 0.140
#> GSM149141 2 0.3941 0.837 0.000 0.844 0.156
#> GSM149142 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149143 2 0.4002 0.831 0.000 0.840 0.160
#> GSM149144 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149145 2 0.3340 0.878 0.000 0.880 0.120
#> GSM149146 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149147 1 0.9306 0.571 0.488 0.336 0.176
#> GSM149148 1 0.9268 0.574 0.492 0.336 0.172
#> GSM149149 1 0.9148 0.585 0.504 0.336 0.160
#> GSM149150 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149151 1 0.9457 0.551 0.468 0.340 0.192
#> GSM149152 1 0.9840 0.445 0.408 0.336 0.256
#> GSM149153 2 0.3267 0.883 0.000 0.884 0.116
#> GSM149154 3 0.6205 0.422 0.008 0.336 0.656
#> GSM149155 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149157 2 0.1411 0.955 0.000 0.964 0.036
#> GSM149158 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149159 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149160 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149161 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149162 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149164 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149165 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149166 2 0.1163 0.956 0.000 0.972 0.028
#> GSM149167 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149168 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149169 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149170 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149171 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149172 3 0.6280 0.260 0.000 0.460 0.540
#> GSM149173 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149174 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149175 3 0.5810 0.431 0.000 0.336 0.664
#> GSM149176 2 0.1163 0.956 0.000 0.972 0.028
#> GSM149177 2 0.3816 0.845 0.000 0.852 0.148
#> GSM149178 2 0.1529 0.950 0.000 0.960 0.040
#> GSM149179 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149184 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149185 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149189 2 0.0592 0.961 0.000 0.988 0.012
#> GSM149190 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149191 2 0.1289 0.956 0.000 0.968 0.032
#> GSM149192 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149194 2 0.1643 0.953 0.000 0.956 0.044
#> GSM149195 2 0.4504 0.759 0.000 0.804 0.196
#> GSM149196 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149198 1 0.9978 0.384 0.360 0.336 0.304
#> GSM149199 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149200 2 0.0237 0.962 0.000 0.996 0.004
#> GSM149201 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.963 0.000 1.000 0.000
#> GSM149203 2 0.1643 0.938 0.000 0.956 0.044
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149103 1 0.5558 0.6346 0.640 0.324 0.036 0.000
#> GSM149104 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149106 1 0.5524 0.6722 0.676 0.276 0.048 0.000
#> GSM149107 3 0.2775 0.8531 0.020 0.084 0.896 0.000
#> GSM149108 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.9655 0.000 0.000 1.000 0.000
#> GSM149114 3 0.5228 0.6816 0.124 0.120 0.756 0.000
#> GSM149115 1 0.1211 0.8238 0.960 0.000 0.000 0.040
#> GSM149116 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149117 1 0.0188 0.8325 0.996 0.004 0.000 0.000
#> GSM149118 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149121 1 0.1211 0.8238 0.960 0.000 0.000 0.040
#> GSM149122 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149130 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149131 1 0.0188 0.8306 0.996 0.000 0.000 0.004
#> GSM149132 4 0.0000 0.9951 0.000 0.000 0.000 1.000
#> GSM149133 4 0.1474 0.9354 0.052 0.000 0.000 0.948
#> GSM149134 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149141 1 0.3881 0.8268 0.812 0.172 0.016 0.000
#> GSM149142 1 0.3610 0.8232 0.800 0.200 0.000 0.000
#> GSM149143 1 0.3105 0.8359 0.868 0.120 0.012 0.000
#> GSM149144 1 0.3801 0.8135 0.780 0.220 0.000 0.000
#> GSM149145 1 0.3831 0.8197 0.792 0.204 0.004 0.000
#> GSM149146 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149147 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149150 1 0.4040 0.7885 0.752 0.248 0.000 0.000
#> GSM149151 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.8310 1.000 0.000 0.000 0.000
#> GSM149153 1 0.3870 0.8178 0.788 0.208 0.004 0.000
#> GSM149154 1 0.1388 0.8307 0.960 0.012 0.028 0.000
#> GSM149155 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149156 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149157 1 0.3837 0.8111 0.776 0.224 0.000 0.000
#> GSM149158 1 0.3764 0.8160 0.784 0.216 0.000 0.000
#> GSM149159 2 0.2921 0.8095 0.140 0.860 0.000 0.000
#> GSM149160 1 0.3726 0.8182 0.788 0.212 0.000 0.000
#> GSM149161 1 0.3801 0.8135 0.780 0.220 0.000 0.000
#> GSM149162 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149163 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149164 1 0.3610 0.8232 0.800 0.200 0.000 0.000
#> GSM149165 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149166 2 0.4994 -0.2428 0.480 0.520 0.000 0.000
#> GSM149167 1 0.3764 0.8160 0.784 0.216 0.000 0.000
#> GSM149168 2 0.2921 0.8095 0.140 0.860 0.000 0.000
#> GSM149169 1 0.3688 0.8200 0.792 0.208 0.000 0.000
#> GSM149170 2 0.2921 0.8095 0.140 0.860 0.000 0.000
#> GSM149171 2 0.2921 0.8095 0.140 0.860 0.000 0.000
#> GSM149172 1 0.5453 0.6555 0.660 0.304 0.036 0.000
#> GSM149173 2 0.2921 0.8095 0.140 0.860 0.000 0.000
#> GSM149174 1 0.3764 0.8160 0.784 0.216 0.000 0.000
#> GSM149175 1 0.2871 0.8323 0.896 0.072 0.032 0.000
#> GSM149176 1 0.4992 0.3365 0.524 0.476 0.000 0.000
#> GSM149177 1 0.4158 0.7959 0.768 0.224 0.008 0.000
#> GSM149178 1 0.5050 0.5078 0.588 0.408 0.004 0.000
#> GSM149179 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149180 2 0.0376 0.9080 0.004 0.992 0.004 0.000
#> GSM149181 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149182 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149183 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149184 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149185 2 0.1389 0.8867 0.048 0.952 0.000 0.000
#> GSM149186 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149188 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149189 2 0.3942 0.6457 0.236 0.764 0.000 0.000
#> GSM149190 1 0.3907 0.8040 0.768 0.232 0.000 0.000
#> GSM149191 1 0.3873 0.8081 0.772 0.228 0.000 0.000
#> GSM149192 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149193 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149194 1 0.3764 0.8160 0.784 0.216 0.000 0.000
#> GSM149195 1 0.5936 0.6080 0.620 0.324 0.056 0.000
#> GSM149196 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149197 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149198 1 0.0188 0.8325 0.996 0.004 0.000 0.000
#> GSM149199 2 0.1118 0.8954 0.036 0.964 0.000 0.000
#> GSM149200 2 0.2921 0.8095 0.140 0.860 0.000 0.000
#> GSM149201 2 0.0000 0.9116 0.000 1.000 0.000 0.000
#> GSM149202 2 0.0817 0.9020 0.024 0.976 0.000 0.000
#> GSM149203 2 0.5080 0.0728 0.420 0.576 0.004 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149103 2 0.6121 -0.28254 0.060 0.456 0.028 0.000 0.456
#> GSM149104 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149106 5 0.7321 0.31059 0.056 0.316 0.164 0.000 0.464
#> GSM149107 3 0.0162 0.99307 0.000 0.004 0.996 0.000 0.000
#> GSM149108 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.99721 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0898 0.96839 0.000 0.008 0.972 0.000 0.020
#> GSM149115 1 0.4686 0.46016 0.588 0.004 0.000 0.396 0.012
#> GSM149116 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.0566 0.85544 0.984 0.004 0.000 0.000 0.012
#> GSM149118 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149121 1 0.4686 0.46016 0.588 0.004 0.000 0.396 0.012
#> GSM149122 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0566 0.85544 0.984 0.004 0.000 0.000 0.012
#> GSM149131 1 0.0968 0.85139 0.972 0.004 0.000 0.012 0.012
#> GSM149132 4 0.0000 0.99971 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0162 0.99623 0.000 0.000 0.000 0.996 0.004
#> GSM149134 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149141 2 0.5456 -0.28427 0.456 0.484 0.000 0.000 0.060
#> GSM149142 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149143 1 0.4907 0.25626 0.492 0.484 0.000 0.000 0.024
#> GSM149144 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149145 2 0.5948 -0.25649 0.408 0.484 0.000 0.000 0.108
#> GSM149146 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149147 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149150 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149151 1 0.0000 0.85955 1.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0566 0.85544 0.984 0.004 0.000 0.000 0.012
#> GSM149153 2 0.5644 -0.27461 0.440 0.484 0.000 0.000 0.076
#> GSM149154 1 0.4188 0.63699 0.744 0.228 0.008 0.000 0.020
#> GSM149155 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149156 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149157 1 0.6493 0.25481 0.492 0.248 0.000 0.000 0.260
#> GSM149158 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149159 5 0.1270 0.67295 0.000 0.052 0.000 0.000 0.948
#> GSM149160 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149161 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149162 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149163 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149164 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149165 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149166 2 0.2017 -0.00572 0.080 0.912 0.000 0.000 0.008
#> GSM149167 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149168 5 0.1043 0.68075 0.000 0.040 0.000 0.000 0.960
#> GSM149169 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149170 5 0.0963 0.68099 0.000 0.036 0.000 0.000 0.964
#> GSM149171 5 0.0963 0.68099 0.000 0.036 0.000 0.000 0.964
#> GSM149172 5 0.6940 0.31549 0.040 0.352 0.132 0.000 0.476
#> GSM149173 5 0.0963 0.68099 0.000 0.036 0.000 0.000 0.964
#> GSM149174 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149175 1 0.7276 0.43248 0.520 0.264 0.120 0.000 0.096
#> GSM149176 2 0.3304 0.05015 0.168 0.816 0.000 0.000 0.016
#> GSM149177 2 0.6541 -0.15661 0.256 0.480 0.000 0.000 0.264
#> GSM149178 2 0.5178 -0.28278 0.040 0.484 0.000 0.000 0.476
#> GSM149179 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149180 2 0.4294 0.08070 0.000 0.532 0.000 0.000 0.468
#> GSM149181 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149182 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149183 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149184 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149185 5 0.3109 0.41877 0.000 0.200 0.000 0.000 0.800
#> GSM149186 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149187 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149188 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149189 5 0.1043 0.68085 0.000 0.040 0.000 0.000 0.960
#> GSM149190 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149191 5 0.6376 0.22336 0.264 0.220 0.000 0.000 0.516
#> GSM149192 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149193 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149194 2 0.4659 -0.29758 0.492 0.496 0.000 0.000 0.012
#> GSM149195 5 0.6331 -0.06608 0.032 0.072 0.444 0.000 0.452
#> GSM149196 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149197 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149198 1 0.0566 0.85544 0.984 0.004 0.000 0.000 0.012
#> GSM149199 2 0.4304 0.07993 0.000 0.516 0.000 0.000 0.484
#> GSM149200 5 0.0963 0.68099 0.000 0.036 0.000 0.000 0.964
#> GSM149201 2 0.4302 0.09996 0.000 0.520 0.000 0.000 0.480
#> GSM149202 5 0.4305 -0.08496 0.000 0.488 0.000 0.000 0.512
#> GSM149203 5 0.2439 0.63108 0.000 0.120 0.004 0.000 0.876
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 5 0.4338 -0.1307 0.000 0.000 0.020 0.000 0.492 0.488
#> GSM149104 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 5 0.4062 0.0220 0.000 0.000 0.008 0.000 0.552 0.440
#> GSM149107 3 0.0260 0.9868 0.000 0.000 0.992 0.000 0.008 0.000
#> GSM149108 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.9943 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.1391 0.9327 0.000 0.000 0.944 0.000 0.040 0.016
#> GSM149115 1 0.5676 0.5989 0.568 0.000 0.000 0.200 0.008 0.224
#> GSM149116 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.4479 0.5454 0.608 0.004 0.000 0.000 0.032 0.356
#> GSM149118 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 1 0.5676 0.5989 0.568 0.000 0.000 0.200 0.008 0.224
#> GSM149122 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.3593 0.7430 0.748 0.000 0.000 0.000 0.024 0.228
#> GSM149131 1 0.3217 0.7492 0.768 0.000 0.000 0.000 0.008 0.224
#> GSM149132 4 0.0000 0.9980 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0632 0.9743 0.024 0.000 0.000 0.976 0.000 0.000
#> GSM149134 1 0.1918 0.8373 0.904 0.000 0.000 0.000 0.008 0.088
#> GSM149135 1 0.0717 0.8284 0.976 0.000 0.000 0.000 0.008 0.016
#> GSM149136 1 0.0717 0.8284 0.976 0.000 0.000 0.000 0.008 0.016
#> GSM149137 1 0.0717 0.8284 0.976 0.000 0.000 0.000 0.008 0.016
#> GSM149138 1 0.1444 0.8404 0.928 0.000 0.000 0.000 0.000 0.072
#> GSM149139 1 0.0806 0.8305 0.972 0.000 0.000 0.000 0.008 0.020
#> GSM149140 1 0.0717 0.8284 0.976 0.000 0.000 0.000 0.008 0.016
#> GSM149141 6 0.3758 0.5769 0.008 0.000 0.000 0.000 0.324 0.668
#> GSM149142 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149143 6 0.4592 0.6251 0.080 0.000 0.000 0.000 0.256 0.664
#> GSM149144 6 0.1010 0.7760 0.036 0.004 0.000 0.000 0.000 0.960
#> GSM149145 6 0.3601 0.5804 0.004 0.000 0.000 0.000 0.312 0.684
#> GSM149146 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149147 1 0.1814 0.8342 0.900 0.000 0.000 0.000 0.000 0.100
#> GSM149148 1 0.0858 0.8340 0.968 0.000 0.000 0.000 0.004 0.028
#> GSM149149 1 0.0777 0.8328 0.972 0.000 0.000 0.000 0.004 0.024
#> GSM149150 6 0.1053 0.7762 0.020 0.012 0.000 0.000 0.004 0.964
#> GSM149151 1 0.1501 0.8402 0.924 0.000 0.000 0.000 0.000 0.076
#> GSM149152 1 0.4079 0.6730 0.680 0.000 0.000 0.000 0.032 0.288
#> GSM149153 6 0.3615 0.6024 0.008 0.000 0.000 0.000 0.292 0.700
#> GSM149154 6 0.5648 0.3272 0.304 0.000 0.000 0.000 0.180 0.516
#> GSM149155 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149156 2 0.0508 0.9589 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149157 6 0.3359 0.6403 0.020 0.136 0.000 0.000 0.024 0.820
#> GSM149158 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149159 5 0.3253 0.6705 0.000 0.192 0.000 0.000 0.788 0.020
#> GSM149160 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149161 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149162 2 0.0508 0.9589 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149163 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149164 6 0.2942 0.7241 0.032 0.000 0.000 0.000 0.132 0.836
#> GSM149165 2 0.0000 0.9618 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149166 6 0.3528 0.4313 0.004 0.296 0.000 0.000 0.000 0.700
#> GSM149167 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149168 5 0.3078 0.6699 0.000 0.192 0.000 0.000 0.796 0.012
#> GSM149169 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149170 5 0.2871 0.6683 0.000 0.192 0.000 0.000 0.804 0.004
#> GSM149171 5 0.2730 0.6668 0.000 0.192 0.000 0.000 0.808 0.000
#> GSM149172 5 0.4195 0.0450 0.000 0.004 0.008 0.000 0.548 0.440
#> GSM149173 5 0.2871 0.6683 0.000 0.192 0.000 0.000 0.804 0.004
#> GSM149174 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149175 6 0.4929 0.5211 0.072 0.000 0.004 0.000 0.324 0.600
#> GSM149176 6 0.3301 0.5605 0.004 0.216 0.000 0.000 0.008 0.772
#> GSM149177 6 0.3601 0.5746 0.004 0.000 0.000 0.000 0.312 0.684
#> GSM149178 5 0.3868 -0.0202 0.000 0.000 0.000 0.000 0.508 0.492
#> GSM149179 2 0.0000 0.9618 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149180 2 0.0935 0.9382 0.004 0.964 0.000 0.000 0.000 0.032
#> GSM149181 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149182 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149183 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149184 2 0.0000 0.9618 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149185 2 0.3528 0.5004 0.000 0.700 0.000 0.000 0.296 0.004
#> GSM149186 2 0.0508 0.9589 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149187 2 0.0508 0.9589 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149188 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149189 5 0.2871 0.6690 0.000 0.192 0.000 0.000 0.804 0.004
#> GSM149190 6 0.0777 0.7794 0.024 0.004 0.000 0.000 0.000 0.972
#> GSM149191 6 0.5383 0.2825 0.004 0.156 0.000 0.000 0.244 0.596
#> GSM149192 2 0.0260 0.9607 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM149193 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149194 6 0.0547 0.7803 0.020 0.000 0.000 0.000 0.000 0.980
#> GSM149195 5 0.6063 0.2176 0.000 0.000 0.292 0.000 0.408 0.300
#> GSM149196 2 0.0508 0.9589 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149197 2 0.0508 0.9589 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149198 1 0.3888 0.6458 0.672 0.000 0.000 0.000 0.016 0.312
#> GSM149199 2 0.2146 0.8299 0.004 0.880 0.000 0.000 0.000 0.116
#> GSM149200 5 0.2730 0.6668 0.000 0.192 0.000 0.000 0.808 0.000
#> GSM149201 2 0.0260 0.9619 0.008 0.992 0.000 0.000 0.000 0.000
#> GSM149202 2 0.2003 0.8545 0.000 0.884 0.000 0.000 0.116 0.000
#> GSM149203 5 0.5561 0.4523 0.000 0.172 0.000 0.000 0.536 0.292
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:mclust 105 3.23e-14 2
#> MAD:mclust 97 9.91e-27 3
#> MAD:mclust 102 4.92e-28 4
#> MAD:mclust 53 1.39e-18 5
#> MAD:mclust 96 2.45e-33 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["MAD", "NMF"]
# you can also extract it by
# res = res_list["MAD:NMF"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.900 0.919 0.966 0.4829 0.512 0.512
#> 3 3 0.860 0.882 0.946 0.3577 0.697 0.475
#> 4 4 0.717 0.780 0.889 0.1320 0.759 0.423
#> 5 5 0.714 0.693 0.836 0.0764 0.895 0.622
#> 6 6 0.737 0.632 0.794 0.0407 0.916 0.621
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.9429 1.000 0.000
#> GSM149100 1 0.0000 0.9429 1.000 0.000
#> GSM149101 1 0.0000 0.9429 1.000 0.000
#> GSM149102 1 0.0000 0.9429 1.000 0.000
#> GSM149103 1 0.0000 0.9429 1.000 0.000
#> GSM149104 1 0.0000 0.9429 1.000 0.000
#> GSM149105 1 0.0000 0.9429 1.000 0.000
#> GSM149106 1 0.0000 0.9429 1.000 0.000
#> GSM149107 1 0.0000 0.9429 1.000 0.000
#> GSM149108 1 0.0000 0.9429 1.000 0.000
#> GSM149109 1 0.0000 0.9429 1.000 0.000
#> GSM149110 1 0.0000 0.9429 1.000 0.000
#> GSM149111 1 0.0000 0.9429 1.000 0.000
#> GSM149112 1 0.0000 0.9429 1.000 0.000
#> GSM149113 1 0.0000 0.9429 1.000 0.000
#> GSM149114 1 0.0000 0.9429 1.000 0.000
#> GSM149115 1 0.7299 0.7570 0.796 0.204
#> GSM149116 1 0.0000 0.9429 1.000 0.000
#> GSM149117 2 0.0000 0.9775 0.000 1.000
#> GSM149118 1 0.0000 0.9429 1.000 0.000
#> GSM149119 1 0.0000 0.9429 1.000 0.000
#> GSM149120 1 0.0000 0.9429 1.000 0.000
#> GSM149121 1 0.0000 0.9429 1.000 0.000
#> GSM149122 1 0.0000 0.9429 1.000 0.000
#> GSM149123 1 0.0000 0.9429 1.000 0.000
#> GSM149124 1 0.0000 0.9429 1.000 0.000
#> GSM149125 1 0.0000 0.9429 1.000 0.000
#> GSM149126 1 0.0000 0.9429 1.000 0.000
#> GSM149127 1 0.0000 0.9429 1.000 0.000
#> GSM149128 1 0.0000 0.9429 1.000 0.000
#> GSM149129 1 0.0000 0.9429 1.000 0.000
#> GSM149130 2 0.2603 0.9391 0.044 0.956
#> GSM149131 1 0.9896 0.2654 0.560 0.440
#> GSM149132 1 0.0000 0.9429 1.000 0.000
#> GSM149133 1 0.0000 0.9429 1.000 0.000
#> GSM149134 1 0.9635 0.4211 0.612 0.388
#> GSM149135 2 0.0000 0.9775 0.000 1.000
#> GSM149136 2 0.0000 0.9775 0.000 1.000
#> GSM149137 2 0.0000 0.9775 0.000 1.000
#> GSM149138 2 0.0000 0.9775 0.000 1.000
#> GSM149139 2 0.0000 0.9775 0.000 1.000
#> GSM149140 2 0.0000 0.9775 0.000 1.000
#> GSM149141 2 1.0000 -0.0787 0.496 0.504
#> GSM149142 2 0.0000 0.9775 0.000 1.000
#> GSM149143 1 0.6343 0.8081 0.840 0.160
#> GSM149144 2 0.0000 0.9775 0.000 1.000
#> GSM149145 1 0.7602 0.7357 0.780 0.220
#> GSM149146 2 0.0000 0.9775 0.000 1.000
#> GSM149147 2 0.2236 0.9467 0.036 0.964
#> GSM149148 2 0.0000 0.9775 0.000 1.000
#> GSM149149 2 0.0000 0.9775 0.000 1.000
#> GSM149150 2 0.0000 0.9775 0.000 1.000
#> GSM149151 2 0.0000 0.9775 0.000 1.000
#> GSM149152 1 0.7883 0.7140 0.764 0.236
#> GSM149153 2 0.2603 0.9389 0.044 0.956
#> GSM149154 1 0.0000 0.9429 1.000 0.000
#> GSM149155 2 0.0000 0.9775 0.000 1.000
#> GSM149156 2 0.0000 0.9775 0.000 1.000
#> GSM149157 2 0.0000 0.9775 0.000 1.000
#> GSM149158 2 0.0000 0.9775 0.000 1.000
#> GSM149159 2 0.0000 0.9775 0.000 1.000
#> GSM149160 2 0.0000 0.9775 0.000 1.000
#> GSM149161 2 0.0000 0.9775 0.000 1.000
#> GSM149162 2 0.0000 0.9775 0.000 1.000
#> GSM149163 2 0.0000 0.9775 0.000 1.000
#> GSM149164 2 0.0000 0.9775 0.000 1.000
#> GSM149165 2 0.0000 0.9775 0.000 1.000
#> GSM149166 2 0.0000 0.9775 0.000 1.000
#> GSM149167 2 0.0000 0.9775 0.000 1.000
#> GSM149168 2 0.0000 0.9775 0.000 1.000
#> GSM149169 2 0.0000 0.9775 0.000 1.000
#> GSM149170 2 0.0376 0.9742 0.004 0.996
#> GSM149171 2 0.2948 0.9301 0.052 0.948
#> GSM149172 1 0.3879 0.8868 0.924 0.076
#> GSM149173 2 0.0672 0.9711 0.008 0.992
#> GSM149174 2 0.0000 0.9775 0.000 1.000
#> GSM149175 1 0.0000 0.9429 1.000 0.000
#> GSM149176 2 0.0000 0.9775 0.000 1.000
#> GSM149177 2 0.4161 0.8941 0.084 0.916
#> GSM149178 2 0.8443 0.6022 0.272 0.728
#> GSM149179 2 0.0000 0.9775 0.000 1.000
#> GSM149180 2 0.0000 0.9775 0.000 1.000
#> GSM149181 2 0.0000 0.9775 0.000 1.000
#> GSM149182 2 0.0000 0.9775 0.000 1.000
#> GSM149183 2 0.0000 0.9775 0.000 1.000
#> GSM149184 2 0.0000 0.9775 0.000 1.000
#> GSM149185 2 0.0000 0.9775 0.000 1.000
#> GSM149186 2 0.0000 0.9775 0.000 1.000
#> GSM149187 2 0.0000 0.9775 0.000 1.000
#> GSM149188 2 0.0000 0.9775 0.000 1.000
#> GSM149189 2 0.7950 0.6714 0.240 0.760
#> GSM149190 2 0.0000 0.9775 0.000 1.000
#> GSM149191 2 0.0000 0.9775 0.000 1.000
#> GSM149192 2 0.0000 0.9775 0.000 1.000
#> GSM149193 2 0.0000 0.9775 0.000 1.000
#> GSM149194 2 0.0000 0.9775 0.000 1.000
#> GSM149195 1 0.0000 0.9429 1.000 0.000
#> GSM149196 2 0.0000 0.9775 0.000 1.000
#> GSM149197 2 0.0000 0.9775 0.000 1.000
#> GSM149198 1 0.8813 0.6112 0.700 0.300
#> GSM149199 2 0.0000 0.9775 0.000 1.000
#> GSM149200 2 0.0000 0.9775 0.000 1.000
#> GSM149201 2 0.0000 0.9775 0.000 1.000
#> GSM149202 2 0.0000 0.9775 0.000 1.000
#> GSM149203 1 0.8861 0.6031 0.696 0.304
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149100 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149101 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149102 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149103 3 0.0000 0.905 0.000 0.000 1.000
#> GSM149104 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149105 3 0.0000 0.905 0.000 0.000 1.000
#> GSM149106 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149107 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149108 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149109 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149110 3 0.0000 0.905 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.905 0.000 0.000 1.000
#> GSM149112 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149113 3 0.0000 0.905 0.000 0.000 1.000
#> GSM149114 3 0.0237 0.905 0.004 0.000 0.996
#> GSM149115 1 0.0000 0.959 1.000 0.000 0.000
#> GSM149116 1 0.2356 0.912 0.928 0.000 0.072
#> GSM149117 2 0.6308 -0.014 0.492 0.508 0.000
#> GSM149118 1 0.0237 0.959 0.996 0.000 0.004
#> GSM149119 1 0.1529 0.940 0.960 0.000 0.040
#> GSM149120 1 0.1031 0.951 0.976 0.000 0.024
#> GSM149121 1 0.0000 0.959 1.000 0.000 0.000
#> GSM149122 1 0.1529 0.940 0.960 0.000 0.040
#> GSM149123 1 0.0237 0.959 0.996 0.000 0.004
#> GSM149124 1 0.0892 0.953 0.980 0.000 0.020
#> GSM149125 1 0.0424 0.958 0.992 0.000 0.008
#> GSM149126 1 0.0424 0.958 0.992 0.000 0.008
#> GSM149127 1 0.0892 0.953 0.980 0.000 0.020
#> GSM149128 1 0.0237 0.959 0.996 0.000 0.004
#> GSM149129 1 0.0237 0.959 0.996 0.000 0.004
#> GSM149130 1 0.0424 0.957 0.992 0.008 0.000
#> GSM149131 1 0.0000 0.959 1.000 0.000 0.000
#> GSM149132 1 0.0424 0.958 0.992 0.000 0.008
#> GSM149133 1 0.0237 0.959 0.996 0.000 0.004
#> GSM149134 1 0.0000 0.959 1.000 0.000 0.000
#> GSM149135 1 0.1163 0.947 0.972 0.028 0.000
#> GSM149136 1 0.2356 0.908 0.928 0.072 0.000
#> GSM149137 1 0.1289 0.944 0.968 0.032 0.000
#> GSM149138 1 0.2261 0.912 0.932 0.068 0.000
#> GSM149139 1 0.0747 0.954 0.984 0.016 0.000
#> GSM149140 1 0.1289 0.944 0.968 0.032 0.000
#> GSM149141 2 0.7339 0.634 0.148 0.708 0.144
#> GSM149142 2 0.0237 0.945 0.004 0.996 0.000
#> GSM149143 3 0.8095 0.611 0.200 0.152 0.648
#> GSM149144 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149145 3 0.3816 0.815 0.000 0.148 0.852
#> GSM149146 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149147 1 0.0424 0.957 0.992 0.008 0.000
#> GSM149148 1 0.0592 0.955 0.988 0.012 0.000
#> GSM149149 1 0.0237 0.958 0.996 0.004 0.000
#> GSM149150 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149151 1 0.4931 0.709 0.768 0.232 0.000
#> GSM149152 1 0.0000 0.959 1.000 0.000 0.000
#> GSM149153 2 0.1643 0.922 0.000 0.956 0.044
#> GSM149154 1 0.6260 0.195 0.552 0.000 0.448
#> GSM149155 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149156 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149157 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149158 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149159 2 0.3752 0.824 0.000 0.856 0.144
#> GSM149160 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149161 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149162 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149163 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149164 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149165 2 0.2448 0.896 0.000 0.924 0.076
#> GSM149166 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149167 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149168 2 0.5706 0.518 0.000 0.680 0.320
#> GSM149169 2 0.0237 0.945 0.004 0.996 0.000
#> GSM149170 3 0.4796 0.730 0.000 0.220 0.780
#> GSM149171 3 0.4291 0.778 0.000 0.180 0.820
#> GSM149172 3 0.0424 0.903 0.000 0.008 0.992
#> GSM149173 3 0.6154 0.355 0.000 0.408 0.592
#> GSM149174 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149175 3 0.4121 0.740 0.168 0.000 0.832
#> GSM149176 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149177 2 0.4842 0.707 0.000 0.776 0.224
#> GSM149178 3 0.5497 0.619 0.000 0.292 0.708
#> GSM149179 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149180 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149181 2 0.2066 0.911 0.000 0.940 0.060
#> GSM149182 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149183 2 0.0424 0.945 0.000 0.992 0.008
#> GSM149184 2 0.0747 0.941 0.000 0.984 0.016
#> GSM149185 2 0.2878 0.877 0.000 0.904 0.096
#> GSM149186 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149187 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149188 2 0.2066 0.911 0.000 0.940 0.060
#> GSM149189 3 0.2711 0.861 0.000 0.088 0.912
#> GSM149190 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149191 2 0.4178 0.787 0.000 0.828 0.172
#> GSM149192 2 0.0592 0.943 0.000 0.988 0.012
#> GSM149193 2 0.0592 0.943 0.000 0.988 0.012
#> GSM149194 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149195 3 0.0000 0.905 0.000 0.000 1.000
#> GSM149196 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149197 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149198 1 0.0237 0.959 0.996 0.000 0.004
#> GSM149199 2 0.0000 0.947 0.000 1.000 0.000
#> GSM149200 3 0.6008 0.452 0.000 0.372 0.628
#> GSM149201 2 0.0237 0.947 0.000 0.996 0.004
#> GSM149202 2 0.1860 0.917 0.000 0.948 0.052
#> GSM149203 3 0.1964 0.881 0.000 0.056 0.944
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0188 0.90253 0.000 0.000 0.996 0.004
#> GSM149100 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149103 3 0.0817 0.89384 0.024 0.000 0.976 0.000
#> GSM149104 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0336 0.90140 0.000 0.000 0.992 0.008
#> GSM149107 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0336 0.90140 0.000 0.000 0.992 0.008
#> GSM149109 3 0.0336 0.90140 0.000 0.000 0.992 0.008
#> GSM149110 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.90312 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0469 0.89958 0.000 0.000 0.988 0.012
#> GSM149113 3 0.0188 0.90253 0.000 0.000 0.996 0.004
#> GSM149114 3 0.0336 0.90095 0.008 0.000 0.992 0.000
#> GSM149115 4 0.1389 0.90393 0.048 0.000 0.000 0.952
#> GSM149116 4 0.1042 0.91194 0.000 0.008 0.020 0.972
#> GSM149117 4 0.5596 0.44138 0.036 0.332 0.000 0.632
#> GSM149118 4 0.0000 0.92840 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0672 0.92165 0.000 0.008 0.008 0.984
#> GSM149120 4 0.0188 0.92783 0.000 0.000 0.004 0.996
#> GSM149121 4 0.2011 0.88195 0.080 0.000 0.000 0.920
#> GSM149122 4 0.0188 0.92783 0.000 0.000 0.004 0.996
#> GSM149123 4 0.0000 0.92840 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0524 0.92390 0.000 0.008 0.004 0.988
#> GSM149125 4 0.0188 0.92783 0.000 0.000 0.004 0.996
#> GSM149126 4 0.0000 0.92840 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0188 0.92783 0.000 0.000 0.004 0.996
#> GSM149128 4 0.0000 0.92840 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.92840 0.000 0.000 0.000 1.000
#> GSM149130 4 0.3764 0.73184 0.216 0.000 0.000 0.784
#> GSM149131 4 0.3356 0.78408 0.176 0.000 0.000 0.824
#> GSM149132 4 0.0000 0.92840 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0336 0.92549 0.008 0.000 0.000 0.992
#> GSM149134 1 0.3907 0.65614 0.768 0.000 0.000 0.232
#> GSM149135 1 0.3400 0.71949 0.820 0.000 0.000 0.180
#> GSM149136 1 0.2469 0.76434 0.892 0.000 0.000 0.108
#> GSM149137 1 0.3219 0.73314 0.836 0.000 0.000 0.164
#> GSM149138 1 0.1716 0.77179 0.936 0.000 0.000 0.064
#> GSM149139 1 0.3610 0.70036 0.800 0.000 0.000 0.200
#> GSM149140 1 0.2814 0.75647 0.868 0.000 0.000 0.132
#> GSM149141 1 0.4607 0.53480 0.716 0.004 0.276 0.004
#> GSM149142 1 0.0592 0.77481 0.984 0.016 0.000 0.000
#> GSM149143 1 0.4933 0.17187 0.568 0.000 0.432 0.000
#> GSM149144 1 0.4830 0.31579 0.608 0.392 0.000 0.000
#> GSM149145 3 0.4483 0.60028 0.284 0.004 0.712 0.000
#> GSM149146 2 0.1637 0.89343 0.060 0.940 0.000 0.000
#> GSM149147 1 0.2530 0.76137 0.888 0.000 0.000 0.112
#> GSM149148 1 0.2647 0.75947 0.880 0.000 0.000 0.120
#> GSM149149 1 0.2868 0.75148 0.864 0.000 0.000 0.136
#> GSM149150 2 0.4817 0.41356 0.388 0.612 0.000 0.000
#> GSM149151 1 0.1557 0.77427 0.944 0.000 0.000 0.056
#> GSM149152 4 0.3975 0.67011 0.240 0.000 0.000 0.760
#> GSM149153 1 0.4428 0.52676 0.720 0.004 0.276 0.000
#> GSM149154 3 0.4632 0.54718 0.308 0.000 0.688 0.004
#> GSM149155 2 0.1474 0.89499 0.052 0.948 0.000 0.000
#> GSM149156 2 0.1302 0.89654 0.044 0.956 0.000 0.000
#> GSM149157 1 0.4985 0.04296 0.532 0.468 0.000 0.000
#> GSM149158 1 0.2760 0.74369 0.872 0.128 0.000 0.000
#> GSM149159 2 0.1284 0.88777 0.024 0.964 0.012 0.000
#> GSM149160 1 0.2053 0.76860 0.924 0.072 0.004 0.000
#> GSM149161 1 0.4585 0.45220 0.668 0.332 0.000 0.000
#> GSM149162 2 0.1792 0.89043 0.068 0.932 0.000 0.000
#> GSM149163 2 0.1940 0.88684 0.076 0.924 0.000 0.000
#> GSM149164 1 0.1913 0.77357 0.940 0.040 0.020 0.000
#> GSM149165 2 0.0000 0.89042 0.000 1.000 0.000 0.000
#> GSM149166 2 0.3486 0.78345 0.188 0.812 0.000 0.000
#> GSM149167 1 0.4746 0.38310 0.632 0.368 0.000 0.000
#> GSM149168 2 0.3384 0.79945 0.024 0.860 0.116 0.000
#> GSM149169 1 0.1302 0.77473 0.956 0.044 0.000 0.000
#> GSM149170 2 0.2760 0.80011 0.000 0.872 0.128 0.000
#> GSM149171 2 0.4040 0.63942 0.000 0.752 0.248 0.000
#> GSM149172 3 0.4888 0.69221 0.000 0.224 0.740 0.036
#> GSM149173 2 0.2401 0.83245 0.004 0.904 0.092 0.000
#> GSM149174 1 0.2868 0.73868 0.864 0.136 0.000 0.000
#> GSM149175 3 0.1124 0.89405 0.012 0.004 0.972 0.012
#> GSM149176 2 0.4134 0.68289 0.260 0.740 0.000 0.000
#> GSM149177 3 0.5141 0.70820 0.084 0.160 0.756 0.000
#> GSM149178 3 0.3731 0.80322 0.036 0.120 0.844 0.000
#> GSM149179 2 0.2281 0.87438 0.096 0.904 0.000 0.000
#> GSM149180 2 0.1637 0.89341 0.060 0.940 0.000 0.000
#> GSM149181 2 0.0000 0.89042 0.000 1.000 0.000 0.000
#> GSM149182 2 0.1792 0.89069 0.068 0.932 0.000 0.000
#> GSM149183 2 0.0188 0.89139 0.004 0.996 0.000 0.000
#> GSM149184 2 0.0000 0.89042 0.000 1.000 0.000 0.000
#> GSM149185 2 0.0000 0.89042 0.000 1.000 0.000 0.000
#> GSM149186 2 0.1389 0.89572 0.048 0.952 0.000 0.000
#> GSM149187 2 0.1118 0.89684 0.036 0.964 0.000 0.000
#> GSM149188 2 0.0188 0.89139 0.004 0.996 0.000 0.000
#> GSM149189 3 0.3837 0.70482 0.000 0.224 0.776 0.000
#> GSM149190 2 0.4713 0.48067 0.360 0.640 0.000 0.000
#> GSM149191 3 0.7913 -0.01873 0.320 0.320 0.360 0.000
#> GSM149192 2 0.0469 0.89358 0.012 0.988 0.000 0.000
#> GSM149193 2 0.0921 0.89652 0.028 0.972 0.000 0.000
#> GSM149194 1 0.2647 0.74731 0.880 0.120 0.000 0.000
#> GSM149195 3 0.0188 0.90218 0.000 0.004 0.996 0.000
#> GSM149196 2 0.1211 0.89727 0.040 0.960 0.000 0.000
#> GSM149197 2 0.1940 0.88625 0.076 0.924 0.000 0.000
#> GSM149198 1 0.3764 0.67226 0.784 0.000 0.000 0.216
#> GSM149199 2 0.2530 0.86114 0.112 0.888 0.000 0.000
#> GSM149200 2 0.1557 0.86171 0.000 0.944 0.056 0.000
#> GSM149201 2 0.1022 0.89678 0.032 0.968 0.000 0.000
#> GSM149202 2 0.1118 0.89736 0.036 0.964 0.000 0.000
#> GSM149203 2 0.5290 0.00748 0.000 0.516 0.476 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149100 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149101 3 0.0162 0.9017 0.004 0.000 0.996 0.000 0.000
#> GSM149102 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149103 3 0.0566 0.8967 0.004 0.012 0.984 0.000 0.000
#> GSM149104 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149105 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149106 3 0.0290 0.8999 0.000 0.008 0.992 0.000 0.000
#> GSM149107 3 0.0000 0.9024 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149109 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149110 3 0.0290 0.9019 0.000 0.000 0.992 0.000 0.008
#> GSM149111 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149112 3 0.0693 0.8955 0.000 0.000 0.980 0.008 0.012
#> GSM149113 3 0.0162 0.9035 0.000 0.000 0.996 0.000 0.004
#> GSM149114 3 0.0162 0.9017 0.004 0.000 0.996 0.000 0.000
#> GSM149115 4 0.1243 0.9430 0.028 0.008 0.000 0.960 0.004
#> GSM149116 4 0.0451 0.9567 0.000 0.004 0.000 0.988 0.008
#> GSM149117 2 0.4796 0.3944 0.028 0.664 0.000 0.300 0.008
#> GSM149118 4 0.0324 0.9580 0.004 0.004 0.000 0.992 0.000
#> GSM149119 4 0.0566 0.9550 0.000 0.004 0.000 0.984 0.012
#> GSM149120 4 0.0162 0.9586 0.000 0.000 0.000 0.996 0.004
#> GSM149121 4 0.1591 0.9310 0.052 0.004 0.000 0.940 0.004
#> GSM149122 4 0.0613 0.9573 0.004 0.004 0.000 0.984 0.008
#> GSM149123 4 0.0162 0.9586 0.004 0.000 0.000 0.996 0.000
#> GSM149124 4 0.0290 0.9572 0.000 0.000 0.000 0.992 0.008
#> GSM149125 4 0.0000 0.9590 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0486 0.9593 0.004 0.004 0.000 0.988 0.004
#> GSM149127 4 0.0451 0.9569 0.000 0.004 0.000 0.988 0.008
#> GSM149128 4 0.0324 0.9588 0.004 0.004 0.000 0.992 0.000
#> GSM149129 4 0.0162 0.9592 0.000 0.004 0.000 0.996 0.000
#> GSM149130 4 0.3372 0.8499 0.120 0.036 0.000 0.840 0.004
#> GSM149131 4 0.3124 0.8472 0.136 0.016 0.000 0.844 0.004
#> GSM149132 4 0.0162 0.9592 0.000 0.004 0.000 0.996 0.000
#> GSM149133 4 0.0162 0.9586 0.004 0.000 0.000 0.996 0.000
#> GSM149134 1 0.2699 0.8136 0.880 0.012 0.000 0.100 0.008
#> GSM149135 1 0.3556 0.7807 0.828 0.032 0.000 0.132 0.008
#> GSM149136 1 0.2157 0.8293 0.920 0.036 0.000 0.040 0.004
#> GSM149137 1 0.2302 0.8219 0.904 0.008 0.000 0.080 0.008
#> GSM149138 1 0.0613 0.8317 0.984 0.004 0.000 0.004 0.008
#> GSM149139 1 0.2672 0.8015 0.872 0.004 0.000 0.116 0.008
#> GSM149140 1 0.2199 0.8277 0.916 0.016 0.000 0.060 0.008
#> GSM149141 1 0.7247 0.4524 0.548 0.096 0.200 0.000 0.156
#> GSM149142 1 0.1300 0.8292 0.956 0.028 0.000 0.000 0.016
#> GSM149143 1 0.3640 0.8045 0.840 0.016 0.052 0.000 0.092
#> GSM149144 2 0.3491 0.5435 0.228 0.768 0.000 0.000 0.004
#> GSM149145 3 0.7024 0.1326 0.372 0.048 0.456 0.000 0.124
#> GSM149146 2 0.2338 0.6645 0.004 0.884 0.000 0.000 0.112
#> GSM149147 1 0.0798 0.8332 0.976 0.008 0.000 0.016 0.000
#> GSM149148 1 0.1569 0.8306 0.944 0.008 0.000 0.044 0.004
#> GSM149149 1 0.1569 0.8306 0.944 0.008 0.000 0.044 0.004
#> GSM149150 2 0.5659 0.3320 0.116 0.604 0.000 0.000 0.280
#> GSM149151 1 0.1730 0.8274 0.940 0.044 0.004 0.008 0.004
#> GSM149152 4 0.3737 0.6959 0.224 0.004 0.000 0.764 0.008
#> GSM149153 1 0.6755 0.5214 0.596 0.068 0.192 0.000 0.144
#> GSM149154 1 0.4986 0.7504 0.768 0.020 0.128 0.024 0.060
#> GSM149155 2 0.2605 0.6551 0.000 0.852 0.000 0.000 0.148
#> GSM149156 5 0.4666 0.2103 0.016 0.412 0.000 0.000 0.572
#> GSM149157 5 0.5663 0.0585 0.412 0.080 0.000 0.000 0.508
#> GSM149158 1 0.4059 0.7336 0.776 0.172 0.000 0.000 0.052
#> GSM149159 5 0.1877 0.6496 0.012 0.064 0.000 0.000 0.924
#> GSM149160 1 0.3535 0.7735 0.808 0.028 0.000 0.000 0.164
#> GSM149161 1 0.5218 0.5144 0.624 0.308 0.000 0.000 0.068
#> GSM149162 2 0.4452 -0.1015 0.004 0.500 0.000 0.000 0.496
#> GSM149163 2 0.3081 0.6515 0.012 0.832 0.000 0.000 0.156
#> GSM149164 1 0.4558 0.5775 0.652 0.024 0.000 0.000 0.324
#> GSM149165 5 0.3636 0.5650 0.000 0.272 0.000 0.000 0.728
#> GSM149166 2 0.1845 0.6522 0.056 0.928 0.000 0.000 0.016
#> GSM149167 1 0.6201 0.4139 0.552 0.232 0.000 0.000 0.216
#> GSM149168 5 0.1216 0.6439 0.020 0.020 0.000 0.000 0.960
#> GSM149169 1 0.1981 0.8239 0.924 0.028 0.000 0.000 0.048
#> GSM149170 5 0.1329 0.6530 0.000 0.032 0.008 0.004 0.956
#> GSM149171 5 0.3825 0.5982 0.000 0.136 0.060 0.000 0.804
#> GSM149172 5 0.3528 0.5668 0.008 0.020 0.096 0.024 0.852
#> GSM149173 5 0.2249 0.6419 0.000 0.096 0.008 0.000 0.896
#> GSM149174 1 0.3593 0.7871 0.828 0.088 0.000 0.000 0.084
#> GSM149175 3 0.7460 0.4667 0.184 0.032 0.532 0.032 0.220
#> GSM149176 2 0.3523 0.6148 0.072 0.844 0.008 0.000 0.076
#> GSM149177 3 0.4630 0.6868 0.016 0.216 0.732 0.000 0.036
#> GSM149178 3 0.5301 0.6433 0.012 0.088 0.688 0.000 0.212
#> GSM149179 2 0.2179 0.6642 0.004 0.896 0.000 0.000 0.100
#> GSM149180 2 0.4126 0.2570 0.000 0.620 0.000 0.000 0.380
#> GSM149181 5 0.3561 0.5899 0.000 0.260 0.000 0.000 0.740
#> GSM149182 2 0.2732 0.6368 0.000 0.840 0.000 0.000 0.160
#> GSM149183 5 0.4182 0.3839 0.000 0.400 0.000 0.000 0.600
#> GSM149184 5 0.4307 0.0983 0.000 0.496 0.000 0.000 0.504
#> GSM149185 5 0.1732 0.6567 0.000 0.080 0.000 0.000 0.920
#> GSM149186 5 0.4182 0.4100 0.000 0.400 0.000 0.000 0.600
#> GSM149187 5 0.4171 0.3694 0.000 0.396 0.000 0.000 0.604
#> GSM149188 5 0.4138 0.4203 0.000 0.384 0.000 0.000 0.616
#> GSM149189 5 0.4920 0.2144 0.000 0.032 0.384 0.000 0.584
#> GSM149190 2 0.5233 0.5287 0.192 0.680 0.000 0.000 0.128
#> GSM149191 5 0.4082 0.5084 0.164 0.012 0.036 0.000 0.788
#> GSM149192 5 0.3636 0.5651 0.000 0.272 0.000 0.000 0.728
#> GSM149193 5 0.4030 0.4880 0.000 0.352 0.000 0.000 0.648
#> GSM149194 1 0.2761 0.8094 0.872 0.024 0.000 0.000 0.104
#> GSM149195 3 0.4524 0.5215 0.000 0.020 0.644 0.000 0.336
#> GSM149196 5 0.4249 0.2790 0.000 0.432 0.000 0.000 0.568
#> GSM149197 2 0.3916 0.5660 0.012 0.732 0.000 0.000 0.256
#> GSM149198 1 0.3052 0.8196 0.876 0.016 0.000 0.072 0.036
#> GSM149199 2 0.4339 0.4950 0.020 0.684 0.000 0.000 0.296
#> GSM149200 5 0.1740 0.6565 0.000 0.056 0.012 0.000 0.932
#> GSM149201 2 0.3752 0.4933 0.000 0.708 0.000 0.000 0.292
#> GSM149202 5 0.2773 0.6347 0.000 0.164 0.000 0.000 0.836
#> GSM149203 5 0.2538 0.6250 0.004 0.016 0.064 0.012 0.904
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0363 0.9581 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM149100 3 0.0000 0.9620 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0146 0.9619 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149102 3 0.0146 0.9619 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149103 3 0.0713 0.9488 0.000 0.000 0.972 0.000 0.000 0.028
#> GSM149104 3 0.0146 0.9619 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149105 3 0.0000 0.9620 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0603 0.9572 0.000 0.000 0.980 0.004 0.000 0.016
#> GSM149107 3 0.0458 0.9584 0.000 0.000 0.984 0.000 0.000 0.016
#> GSM149108 3 0.0405 0.9610 0.000 0.000 0.988 0.004 0.000 0.008
#> GSM149109 3 0.0665 0.9556 0.000 0.000 0.980 0.004 0.008 0.008
#> GSM149110 3 0.0622 0.9546 0.000 0.000 0.980 0.000 0.008 0.012
#> GSM149111 3 0.0000 0.9620 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0767 0.9523 0.000 0.000 0.976 0.008 0.004 0.012
#> GSM149113 3 0.0291 0.9615 0.000 0.000 0.992 0.004 0.000 0.004
#> GSM149114 3 0.0260 0.9610 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149115 4 0.1440 0.9220 0.044 0.004 0.000 0.944 0.004 0.004
#> GSM149116 4 0.0405 0.9384 0.000 0.000 0.000 0.988 0.008 0.004
#> GSM149117 2 0.6301 0.3851 0.048 0.556 0.000 0.168 0.004 0.224
#> GSM149118 4 0.0000 0.9405 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0458 0.9374 0.000 0.000 0.000 0.984 0.016 0.000
#> GSM149120 4 0.0146 0.9404 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM149121 4 0.1932 0.9010 0.076 0.004 0.000 0.912 0.004 0.004
#> GSM149122 4 0.0260 0.9400 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM149123 4 0.0603 0.9386 0.016 0.000 0.000 0.980 0.004 0.000
#> GSM149124 4 0.0260 0.9392 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM149125 4 0.0146 0.9411 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149126 4 0.0405 0.9412 0.008 0.000 0.000 0.988 0.000 0.004
#> GSM149127 4 0.0665 0.9411 0.008 0.000 0.000 0.980 0.008 0.004
#> GSM149128 4 0.0260 0.9409 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM149129 4 0.0665 0.9393 0.004 0.000 0.000 0.980 0.008 0.008
#> GSM149130 4 0.4651 0.7258 0.180 0.032 0.000 0.728 0.004 0.056
#> GSM149131 4 0.3178 0.8148 0.160 0.016 0.000 0.816 0.004 0.004
#> GSM149132 4 0.0870 0.9404 0.012 0.000 0.000 0.972 0.012 0.004
#> GSM149133 4 0.0912 0.9369 0.012 0.004 0.000 0.972 0.004 0.008
#> GSM149134 1 0.3275 0.7759 0.852 0.004 0.000 0.040 0.032 0.072
#> GSM149135 1 0.2585 0.7899 0.880 0.068 0.000 0.048 0.000 0.004
#> GSM149136 1 0.1577 0.8070 0.940 0.036 0.000 0.008 0.000 0.016
#> GSM149137 1 0.2037 0.8090 0.924 0.028 0.000 0.028 0.008 0.012
#> GSM149138 1 0.1346 0.8067 0.952 0.008 0.000 0.000 0.016 0.024
#> GSM149139 1 0.1912 0.7934 0.924 0.008 0.000 0.052 0.008 0.008
#> GSM149140 1 0.1478 0.8095 0.944 0.032 0.000 0.020 0.004 0.000
#> GSM149141 6 0.4691 0.4667 0.252 0.008 0.052 0.000 0.008 0.680
#> GSM149142 1 0.1518 0.8107 0.944 0.024 0.000 0.000 0.024 0.008
#> GSM149143 1 0.3897 0.6837 0.696 0.000 0.000 0.000 0.280 0.024
#> GSM149144 2 0.2587 0.6381 0.108 0.868 0.000 0.000 0.020 0.004
#> GSM149145 6 0.5771 0.3227 0.340 0.004 0.144 0.000 0.004 0.508
#> GSM149146 2 0.2653 0.6540 0.000 0.844 0.000 0.000 0.012 0.144
#> GSM149147 1 0.0508 0.8100 0.984 0.000 0.000 0.000 0.012 0.004
#> GSM149148 1 0.0893 0.8059 0.972 0.004 0.000 0.004 0.004 0.016
#> GSM149149 1 0.1167 0.8051 0.960 0.012 0.000 0.008 0.000 0.020
#> GSM149150 6 0.4798 0.4339 0.096 0.204 0.000 0.000 0.012 0.688
#> GSM149151 1 0.2154 0.7767 0.908 0.020 0.000 0.004 0.004 0.064
#> GSM149152 4 0.5044 0.5629 0.280 0.004 0.000 0.640 0.020 0.056
#> GSM149153 6 0.4945 0.3502 0.356 0.008 0.040 0.000 0.008 0.588
#> GSM149154 1 0.4493 0.7422 0.764 0.000 0.028 0.020 0.140 0.048
#> GSM149155 2 0.1610 0.6649 0.000 0.916 0.000 0.000 0.084 0.000
#> GSM149156 5 0.3720 0.3901 0.028 0.236 0.000 0.000 0.736 0.000
#> GSM149157 5 0.3853 0.3909 0.196 0.044 0.000 0.000 0.756 0.004
#> GSM149158 1 0.5183 0.6011 0.604 0.140 0.000 0.000 0.256 0.000
#> GSM149159 5 0.2450 0.5050 0.000 0.016 0.000 0.000 0.868 0.116
#> GSM149160 1 0.4395 0.5152 0.568 0.028 0.000 0.000 0.404 0.000
#> GSM149161 1 0.5807 0.4835 0.520 0.204 0.000 0.000 0.272 0.004
#> GSM149162 5 0.4084 0.1978 0.012 0.400 0.000 0.000 0.588 0.000
#> GSM149163 2 0.2146 0.6467 0.004 0.880 0.000 0.000 0.116 0.000
#> GSM149164 5 0.4371 -0.1539 0.396 0.000 0.004 0.000 0.580 0.020
#> GSM149165 5 0.5146 0.4326 0.000 0.148 0.000 0.000 0.616 0.236
#> GSM149166 2 0.1625 0.6833 0.012 0.928 0.000 0.000 0.000 0.060
#> GSM149167 5 0.6063 -0.2295 0.376 0.128 0.000 0.000 0.468 0.028
#> GSM149168 5 0.3244 0.3989 0.000 0.000 0.000 0.000 0.732 0.268
#> GSM149169 1 0.4385 0.6869 0.696 0.060 0.000 0.000 0.240 0.004
#> GSM149170 5 0.4123 0.1444 0.000 0.012 0.000 0.000 0.568 0.420
#> GSM149171 6 0.3431 0.4698 0.000 0.016 0.000 0.000 0.228 0.756
#> GSM149172 6 0.3905 0.2973 0.004 0.000 0.000 0.004 0.356 0.636
#> GSM149173 6 0.3672 0.3926 0.000 0.008 0.000 0.000 0.304 0.688
#> GSM149174 1 0.5036 0.5424 0.568 0.088 0.000 0.000 0.344 0.000
#> GSM149175 6 0.4721 0.5162 0.112 0.000 0.100 0.012 0.028 0.748
#> GSM149176 2 0.4058 0.4855 0.012 0.672 0.004 0.000 0.004 0.308
#> GSM149177 3 0.5587 0.3362 0.004 0.180 0.564 0.000 0.000 0.252
#> GSM149178 6 0.3742 0.5289 0.008 0.040 0.160 0.000 0.004 0.788
#> GSM149179 2 0.3081 0.6015 0.000 0.776 0.000 0.000 0.004 0.220
#> GSM149180 6 0.4948 0.2752 0.000 0.360 0.000 0.000 0.076 0.564
#> GSM149181 6 0.5451 0.1694 0.000 0.140 0.000 0.000 0.328 0.532
#> GSM149182 2 0.3586 0.5843 0.000 0.756 0.000 0.000 0.028 0.216
#> GSM149183 5 0.5159 0.2882 0.000 0.380 0.000 0.000 0.528 0.092
#> GSM149184 6 0.4865 0.4636 0.000 0.196 0.000 0.004 0.128 0.672
#> GSM149185 5 0.4105 0.2883 0.000 0.020 0.000 0.000 0.632 0.348
#> GSM149186 5 0.6049 0.1704 0.000 0.268 0.000 0.000 0.408 0.324
#> GSM149187 5 0.3738 0.3993 0.000 0.280 0.000 0.000 0.704 0.016
#> GSM149188 5 0.5341 0.3548 0.000 0.336 0.000 0.004 0.552 0.108
#> GSM149189 6 0.5726 0.3144 0.000 0.012 0.140 0.000 0.312 0.536
#> GSM149190 2 0.5040 0.4401 0.148 0.652 0.000 0.000 0.196 0.004
#> GSM149191 5 0.2568 0.4814 0.068 0.000 0.000 0.000 0.876 0.056
#> GSM149192 5 0.4369 0.5226 0.000 0.164 0.000 0.000 0.720 0.116
#> GSM149193 5 0.6082 0.0938 0.000 0.272 0.000 0.000 0.368 0.360
#> GSM149194 1 0.4214 0.6376 0.652 0.024 0.000 0.000 0.320 0.004
#> GSM149195 6 0.4996 0.2695 0.000 0.000 0.408 0.000 0.072 0.520
#> GSM149196 6 0.4921 0.4585 0.000 0.180 0.000 0.000 0.164 0.656
#> GSM149197 2 0.3619 0.4191 0.004 0.680 0.000 0.000 0.316 0.000
#> GSM149198 1 0.4002 0.7584 0.804 0.004 0.000 0.040 0.068 0.084
#> GSM149199 2 0.4292 0.2604 0.024 0.588 0.000 0.000 0.388 0.000
#> GSM149200 5 0.4256 0.0359 0.000 0.016 0.000 0.000 0.520 0.464
#> GSM149201 2 0.3978 0.5528 0.000 0.744 0.000 0.000 0.192 0.064
#> GSM149202 6 0.4233 0.4099 0.000 0.048 0.000 0.000 0.268 0.684
#> GSM149203 5 0.2389 0.4860 0.000 0.000 0.000 0.008 0.864 0.128
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> MAD:NMF 102 7.44e-11 2
#> MAD:NMF 101 2.98e-22 3
#> MAD:NMF 95 1.58e-27 4
#> MAD:NMF 85 1.71e-25 5
#> MAD:NMF 67 6.11e-23 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "hclust"]
# you can also extract it by
# res = res_list["ATC:hclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.666 0.877 0.934 0.4076 0.565 0.565
#> 3 3 0.692 0.833 0.903 0.2976 0.919 0.859
#> 4 4 0.539 0.461 0.753 0.2664 0.751 0.514
#> 5 5 0.647 0.697 0.813 0.0882 0.823 0.516
#> 6 6 0.663 0.653 0.798 0.0325 0.971 0.899
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.000 0.843 1.000 0.000
#> GSM149100 1 0.000 0.843 1.000 0.000
#> GSM149101 1 0.000 0.843 1.000 0.000
#> GSM149102 1 0.000 0.843 1.000 0.000
#> GSM149103 2 0.850 0.577 0.276 0.724
#> GSM149104 1 0.000 0.843 1.000 0.000
#> GSM149105 1 0.000 0.843 1.000 0.000
#> GSM149106 1 0.563 0.819 0.868 0.132
#> GSM149107 1 0.000 0.843 1.000 0.000
#> GSM149108 1 0.000 0.843 1.000 0.000
#> GSM149109 1 0.000 0.843 1.000 0.000
#> GSM149110 1 0.000 0.843 1.000 0.000
#> GSM149111 1 0.000 0.843 1.000 0.000
#> GSM149112 1 0.000 0.843 1.000 0.000
#> GSM149113 1 0.000 0.843 1.000 0.000
#> GSM149114 1 0.204 0.845 0.968 0.032
#> GSM149115 2 0.697 0.718 0.188 0.812
#> GSM149116 1 0.753 0.833 0.784 0.216
#> GSM149117 2 0.000 0.959 0.000 1.000
#> GSM149118 1 0.753 0.833 0.784 0.216
#> GSM149119 1 0.753 0.833 0.784 0.216
#> GSM149120 1 0.753 0.833 0.784 0.216
#> GSM149121 1 0.969 0.537 0.604 0.396
#> GSM149122 1 0.753 0.833 0.784 0.216
#> GSM149123 1 0.760 0.829 0.780 0.220
#> GSM149124 1 0.753 0.833 0.784 0.216
#> GSM149125 1 0.753 0.833 0.784 0.216
#> GSM149126 1 0.753 0.833 0.784 0.216
#> GSM149127 1 0.753 0.833 0.784 0.216
#> GSM149128 1 0.753 0.833 0.784 0.216
#> GSM149129 1 0.753 0.833 0.784 0.216
#> GSM149130 2 0.402 0.881 0.080 0.920
#> GSM149131 2 0.402 0.881 0.080 0.920
#> GSM149132 1 0.753 0.833 0.784 0.216
#> GSM149133 1 0.760 0.829 0.780 0.220
#> GSM149134 2 0.958 0.244 0.380 0.620
#> GSM149135 2 0.000 0.959 0.000 1.000
#> GSM149136 2 0.000 0.959 0.000 1.000
#> GSM149137 2 0.000 0.959 0.000 1.000
#> GSM149138 2 0.000 0.959 0.000 1.000
#> GSM149139 2 0.000 0.959 0.000 1.000
#> GSM149140 2 0.000 0.959 0.000 1.000
#> GSM149141 2 0.224 0.931 0.036 0.964
#> GSM149142 2 0.000 0.959 0.000 1.000
#> GSM149143 2 0.402 0.890 0.080 0.920
#> GSM149144 2 0.000 0.959 0.000 1.000
#> GSM149145 2 0.224 0.931 0.036 0.964
#> GSM149146 2 0.000 0.959 0.000 1.000
#> GSM149147 2 0.000 0.959 0.000 1.000
#> GSM149148 2 0.000 0.959 0.000 1.000
#> GSM149149 2 0.000 0.959 0.000 1.000
#> GSM149150 2 0.000 0.959 0.000 1.000
#> GSM149151 2 0.000 0.959 0.000 1.000
#> GSM149152 2 0.921 0.384 0.336 0.664
#> GSM149153 2 0.224 0.931 0.036 0.964
#> GSM149154 1 0.992 0.323 0.552 0.448
#> GSM149155 2 0.000 0.959 0.000 1.000
#> GSM149156 2 0.000 0.959 0.000 1.000
#> GSM149157 2 0.000 0.959 0.000 1.000
#> GSM149158 2 0.000 0.959 0.000 1.000
#> GSM149159 2 0.000 0.959 0.000 1.000
#> GSM149160 2 0.000 0.959 0.000 1.000
#> GSM149161 2 0.000 0.959 0.000 1.000
#> GSM149162 2 0.000 0.959 0.000 1.000
#> GSM149163 2 0.000 0.959 0.000 1.000
#> GSM149164 2 0.278 0.920 0.048 0.952
#> GSM149165 2 0.000 0.959 0.000 1.000
#> GSM149166 2 0.000 0.959 0.000 1.000
#> GSM149167 2 0.000 0.959 0.000 1.000
#> GSM149168 2 0.000 0.959 0.000 1.000
#> GSM149169 2 0.000 0.959 0.000 1.000
#> GSM149170 2 0.118 0.949 0.016 0.984
#> GSM149171 2 0.000 0.959 0.000 1.000
#> GSM149172 2 0.184 0.940 0.028 0.972
#> GSM149173 2 0.118 0.949 0.016 0.984
#> GSM149174 2 0.000 0.959 0.000 1.000
#> GSM149175 1 0.909 0.645 0.676 0.324
#> GSM149176 2 0.000 0.959 0.000 1.000
#> GSM149177 2 0.118 0.948 0.016 0.984
#> GSM149178 2 0.833 0.586 0.264 0.736
#> GSM149179 2 0.000 0.959 0.000 1.000
#> GSM149180 2 0.000 0.959 0.000 1.000
#> GSM149181 2 0.000 0.959 0.000 1.000
#> GSM149182 2 0.000 0.959 0.000 1.000
#> GSM149183 2 0.000 0.959 0.000 1.000
#> GSM149184 2 0.000 0.959 0.000 1.000
#> GSM149185 2 0.000 0.959 0.000 1.000
#> GSM149186 2 0.000 0.959 0.000 1.000
#> GSM149187 2 0.000 0.959 0.000 1.000
#> GSM149188 2 0.000 0.959 0.000 1.000
#> GSM149189 2 0.242 0.931 0.040 0.960
#> GSM149190 2 0.000 0.959 0.000 1.000
#> GSM149191 2 0.388 0.894 0.076 0.924
#> GSM149192 2 0.000 0.959 0.000 1.000
#> GSM149193 2 0.000 0.959 0.000 1.000
#> GSM149194 2 0.000 0.959 0.000 1.000
#> GSM149195 1 0.689 0.771 0.816 0.184
#> GSM149196 2 0.000 0.959 0.000 1.000
#> GSM149197 2 0.000 0.959 0.000 1.000
#> GSM149198 2 0.961 0.230 0.384 0.616
#> GSM149199 2 0.000 0.959 0.000 1.000
#> GSM149200 2 0.118 0.949 0.016 0.984
#> GSM149201 2 0.000 0.959 0.000 1.000
#> GSM149202 2 0.000 0.959 0.000 1.000
#> GSM149203 2 0.000 0.959 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149103 2 0.8512 0.5325 0.212 0.612 0.176
#> GSM149104 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149106 3 0.6254 0.6816 0.188 0.056 0.756
#> GSM149107 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.8799 0.000 0.000 1.000
#> GSM149114 3 0.1289 0.8506 0.000 0.032 0.968
#> GSM149115 2 0.6140 0.3288 0.404 0.596 0.000
#> GSM149116 1 0.3412 0.8542 0.876 0.000 0.124
#> GSM149117 2 0.2711 0.8843 0.088 0.912 0.000
#> GSM149118 1 0.3412 0.8542 0.876 0.000 0.124
#> GSM149119 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149120 1 0.3412 0.8542 0.876 0.000 0.124
#> GSM149121 1 0.4056 0.6616 0.876 0.092 0.032
#> GSM149122 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149123 1 0.3644 0.8526 0.872 0.004 0.124
#> GSM149124 1 0.3412 0.8542 0.876 0.000 0.124
#> GSM149125 1 0.3412 0.8542 0.876 0.000 0.124
#> GSM149126 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149127 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149128 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149129 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149130 2 0.4750 0.8119 0.216 0.784 0.000
#> GSM149131 2 0.4750 0.8119 0.216 0.784 0.000
#> GSM149132 1 0.3619 0.8535 0.864 0.000 0.136
#> GSM149133 1 0.3826 0.8490 0.868 0.008 0.124
#> GSM149134 1 0.6669 -0.0920 0.524 0.468 0.008
#> GSM149135 2 0.2066 0.9080 0.060 0.940 0.000
#> GSM149136 2 0.2066 0.9080 0.060 0.940 0.000
#> GSM149137 2 0.1964 0.9078 0.056 0.944 0.000
#> GSM149138 2 0.2165 0.9080 0.064 0.936 0.000
#> GSM149139 2 0.2066 0.9080 0.060 0.940 0.000
#> GSM149140 2 0.1964 0.9078 0.056 0.944 0.000
#> GSM149141 2 0.4235 0.8575 0.176 0.824 0.000
#> GSM149142 2 0.2066 0.9125 0.060 0.940 0.000
#> GSM149143 2 0.5053 0.8251 0.164 0.812 0.024
#> GSM149144 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149145 2 0.4235 0.8575 0.176 0.824 0.000
#> GSM149146 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149147 2 0.2261 0.9079 0.068 0.932 0.000
#> GSM149148 2 0.1964 0.9078 0.056 0.944 0.000
#> GSM149149 2 0.1964 0.9078 0.056 0.944 0.000
#> GSM149150 2 0.2066 0.9125 0.060 0.940 0.000
#> GSM149151 2 0.1964 0.9078 0.056 0.944 0.000
#> GSM149152 2 0.7487 0.1836 0.464 0.500 0.036
#> GSM149153 2 0.4235 0.8575 0.176 0.824 0.000
#> GSM149154 3 0.9873 0.1286 0.260 0.348 0.392
#> GSM149155 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149157 2 0.0237 0.9206 0.004 0.996 0.000
#> GSM149158 2 0.0592 0.9199 0.012 0.988 0.000
#> GSM149159 2 0.2066 0.9079 0.060 0.940 0.000
#> GSM149160 2 0.0892 0.9214 0.020 0.980 0.000
#> GSM149161 2 0.0747 0.9207 0.016 0.984 0.000
#> GSM149162 2 0.0892 0.9214 0.020 0.980 0.000
#> GSM149163 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149164 2 0.3816 0.8692 0.148 0.852 0.000
#> GSM149165 2 0.1964 0.9092 0.056 0.944 0.000
#> GSM149166 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149167 2 0.2711 0.8843 0.088 0.912 0.000
#> GSM149168 2 0.3412 0.8763 0.124 0.876 0.000
#> GSM149169 2 0.0892 0.9185 0.020 0.980 0.000
#> GSM149170 2 0.4139 0.8669 0.124 0.860 0.016
#> GSM149171 2 0.3412 0.8763 0.124 0.876 0.000
#> GSM149172 2 0.4291 0.8555 0.152 0.840 0.008
#> GSM149173 2 0.4139 0.8669 0.124 0.860 0.016
#> GSM149174 2 0.0892 0.9217 0.020 0.980 0.000
#> GSM149175 3 0.9405 0.3020 0.260 0.232 0.508
#> GSM149176 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149177 2 0.2301 0.9090 0.060 0.936 0.004
#> GSM149178 2 0.8223 0.5138 0.288 0.604 0.108
#> GSM149179 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149184 2 0.2711 0.8843 0.088 0.912 0.000
#> GSM149185 2 0.1964 0.9092 0.056 0.944 0.000
#> GSM149186 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149188 2 0.1529 0.9139 0.040 0.960 0.000
#> GSM149189 2 0.4821 0.8532 0.120 0.840 0.040
#> GSM149190 2 0.0747 0.9194 0.016 0.984 0.000
#> GSM149191 2 0.4994 0.8289 0.160 0.816 0.024
#> GSM149192 2 0.1860 0.9108 0.052 0.948 0.000
#> GSM149193 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149194 2 0.0237 0.9208 0.004 0.996 0.000
#> GSM149195 3 0.6922 0.6414 0.200 0.080 0.720
#> GSM149196 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149197 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149198 1 0.6664 -0.0773 0.528 0.464 0.008
#> GSM149199 2 0.0592 0.9199 0.012 0.988 0.000
#> GSM149200 2 0.4139 0.8669 0.124 0.860 0.016
#> GSM149201 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.9211 0.000 1.000 0.000
#> GSM149203 2 0.3412 0.8763 0.124 0.876 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149103 2 0.7769 0.1853 0.252 0.556 0.160 0.032
#> GSM149104 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149106 3 0.5185 0.7326 0.000 0.176 0.748 0.076
#> GSM149107 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.9325 0.000 0.000 1.000 0.000
#> GSM149114 3 0.1211 0.8991 0.000 0.040 0.960 0.000
#> GSM149115 1 0.6179 0.2134 0.552 0.056 0.000 0.392
#> GSM149116 4 0.0000 0.9774 0.000 0.000 0.000 1.000
#> GSM149117 1 0.2530 0.4777 0.888 0.112 0.000 0.000
#> GSM149118 4 0.0000 0.9774 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149120 4 0.0000 0.9774 0.000 0.000 0.000 1.000
#> GSM149121 4 0.4635 0.7733 0.080 0.124 0.000 0.796
#> GSM149122 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149123 4 0.0188 0.9757 0.004 0.000 0.000 0.996
#> GSM149124 4 0.0000 0.9774 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.9774 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149127 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149128 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149129 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149130 1 0.4401 0.3979 0.812 0.112 0.000 0.076
#> GSM149131 1 0.4401 0.3979 0.812 0.112 0.000 0.076
#> GSM149132 4 0.0469 0.9778 0.000 0.000 0.012 0.988
#> GSM149133 4 0.0336 0.9729 0.008 0.000 0.000 0.992
#> GSM149134 2 0.7674 0.0513 0.220 0.428 0.000 0.352
#> GSM149135 1 0.0336 0.5173 0.992 0.008 0.000 0.000
#> GSM149136 1 0.0336 0.5173 0.992 0.008 0.000 0.000
#> GSM149137 1 0.0188 0.5170 0.996 0.004 0.000 0.000
#> GSM149138 1 0.0469 0.5163 0.988 0.012 0.000 0.000
#> GSM149139 1 0.0336 0.5173 0.992 0.008 0.000 0.000
#> GSM149140 1 0.0188 0.5170 0.996 0.004 0.000 0.000
#> GSM149141 1 0.4741 0.2763 0.668 0.328 0.000 0.004
#> GSM149142 1 0.2081 0.4847 0.916 0.084 0.000 0.000
#> GSM149143 2 0.4533 0.4062 0.232 0.752 0.012 0.004
#> GSM149144 1 0.4998 -0.3669 0.512 0.488 0.000 0.000
#> GSM149145 1 0.4761 0.2722 0.664 0.332 0.000 0.004
#> GSM149146 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149147 1 0.0592 0.5148 0.984 0.016 0.000 0.000
#> GSM149148 1 0.0188 0.5170 0.996 0.004 0.000 0.000
#> GSM149149 1 0.0188 0.5170 0.996 0.004 0.000 0.000
#> GSM149150 1 0.2081 0.4847 0.916 0.084 0.000 0.000
#> GSM149151 1 0.0336 0.5168 0.992 0.008 0.000 0.000
#> GSM149152 1 0.6951 -0.0171 0.544 0.132 0.000 0.324
#> GSM149153 1 0.4761 0.2722 0.664 0.332 0.000 0.004
#> GSM149154 2 0.8660 -0.2361 0.120 0.420 0.372 0.088
#> GSM149155 1 0.5000 -0.3920 0.500 0.500 0.000 0.000
#> GSM149156 2 0.5000 0.3613 0.496 0.504 0.000 0.000
#> GSM149157 2 0.4999 0.3666 0.492 0.508 0.000 0.000
#> GSM149158 1 0.4804 -0.0477 0.616 0.384 0.000 0.000
#> GSM149159 2 0.4500 0.5032 0.316 0.684 0.000 0.000
#> GSM149160 1 0.4888 -0.0746 0.588 0.412 0.000 0.000
#> GSM149161 1 0.4877 -0.0659 0.592 0.408 0.000 0.000
#> GSM149162 1 0.4907 -0.0900 0.580 0.420 0.000 0.000
#> GSM149163 1 0.5000 -0.3920 0.500 0.500 0.000 0.000
#> GSM149164 2 0.4866 0.2111 0.404 0.596 0.000 0.000
#> GSM149165 2 0.4624 0.4973 0.340 0.660 0.000 0.000
#> GSM149166 1 0.5000 -0.3785 0.504 0.496 0.000 0.000
#> GSM149167 1 0.2589 0.4774 0.884 0.116 0.000 0.000
#> GSM149168 2 0.3356 0.5152 0.176 0.824 0.000 0.000
#> GSM149169 1 0.4522 0.1250 0.680 0.320 0.000 0.000
#> GSM149170 2 0.3123 0.5110 0.156 0.844 0.000 0.000
#> GSM149171 2 0.3311 0.5145 0.172 0.828 0.000 0.000
#> GSM149172 2 0.3926 0.4934 0.160 0.820 0.004 0.016
#> GSM149173 2 0.3123 0.5110 0.156 0.844 0.000 0.000
#> GSM149174 1 0.4830 -0.0593 0.608 0.392 0.000 0.000
#> GSM149175 3 0.7928 0.4161 0.048 0.360 0.488 0.104
#> GSM149176 2 0.5000 0.3521 0.500 0.500 0.000 0.000
#> GSM149177 2 0.5334 0.4272 0.400 0.588 0.004 0.008
#> GSM149178 2 0.6436 0.3337 0.092 0.724 0.088 0.096
#> GSM149179 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149180 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149181 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149182 1 0.5000 -0.3920 0.500 0.500 0.000 0.000
#> GSM149183 2 0.4998 0.3705 0.488 0.512 0.000 0.000
#> GSM149184 1 0.2589 0.4774 0.884 0.116 0.000 0.000
#> GSM149185 2 0.4605 0.4989 0.336 0.664 0.000 0.000
#> GSM149186 1 0.5000 -0.3920 0.500 0.500 0.000 0.000
#> GSM149187 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149188 2 0.4843 0.4583 0.396 0.604 0.000 0.000
#> GSM149189 2 0.4050 0.5023 0.168 0.808 0.024 0.000
#> GSM149190 1 0.4804 -0.0369 0.616 0.384 0.000 0.000
#> GSM149191 2 0.4353 0.4067 0.232 0.756 0.012 0.000
#> GSM149192 2 0.4624 0.4971 0.340 0.660 0.000 0.000
#> GSM149193 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149194 1 0.4996 -0.3434 0.516 0.484 0.000 0.000
#> GSM149195 3 0.5532 0.6919 0.000 0.228 0.704 0.068
#> GSM149196 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149197 2 0.5000 0.3572 0.500 0.500 0.000 0.000
#> GSM149198 2 0.7597 0.0666 0.204 0.440 0.000 0.356
#> GSM149199 1 0.4830 -0.0718 0.608 0.392 0.000 0.000
#> GSM149200 2 0.3123 0.5110 0.156 0.844 0.000 0.000
#> GSM149201 1 0.5000 -0.3920 0.500 0.500 0.000 0.000
#> GSM149202 2 0.5000 0.3606 0.496 0.504 0.000 0.000
#> GSM149203 2 0.3356 0.5152 0.176 0.824 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149103 5 0.8099 0.50551 0.228 0.192 0.152 0.000 0.428
#> GSM149104 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.3561 0.58639 0.000 0.000 0.740 0.000 0.260
#> GSM149107 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.94965 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0162 0.94672 0.000 0.000 0.996 0.000 0.004
#> GSM149114 3 0.1121 0.90725 0.000 0.000 0.956 0.000 0.044
#> GSM149115 1 0.6316 0.22371 0.484 0.012 0.000 0.392 0.112
#> GSM149116 4 0.0000 0.96665 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.3492 0.65990 0.796 0.016 0.000 0.000 0.188
#> GSM149118 4 0.0000 0.96665 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149120 4 0.0000 0.96665 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.4871 0.59446 0.084 0.000 0.000 0.704 0.212
#> GSM149122 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149123 4 0.0162 0.96469 0.004 0.000 0.000 0.996 0.000
#> GSM149124 4 0.0000 0.96665 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.96665 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149127 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149128 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149129 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149130 1 0.3689 0.58381 0.816 0.032 0.000 0.008 0.144
#> GSM149131 1 0.3689 0.58381 0.816 0.032 0.000 0.008 0.144
#> GSM149132 4 0.0404 0.96767 0.000 0.000 0.012 0.988 0.000
#> GSM149133 4 0.1168 0.93884 0.008 0.000 0.000 0.960 0.032
#> GSM149134 5 0.4943 0.55215 0.200 0.008 0.000 0.076 0.716
#> GSM149135 1 0.0162 0.76555 0.996 0.004 0.000 0.000 0.000
#> GSM149136 1 0.0162 0.76555 0.996 0.004 0.000 0.000 0.000
#> GSM149137 1 0.0290 0.76502 0.992 0.008 0.000 0.000 0.000
#> GSM149138 1 0.0324 0.76442 0.992 0.004 0.000 0.000 0.004
#> GSM149139 1 0.0162 0.76555 0.996 0.004 0.000 0.000 0.000
#> GSM149140 1 0.0290 0.76502 0.992 0.008 0.000 0.000 0.000
#> GSM149141 1 0.5611 0.35848 0.636 0.152 0.000 0.000 0.212
#> GSM149142 1 0.2519 0.72459 0.884 0.100 0.000 0.000 0.016
#> GSM149143 2 0.6344 -0.00969 0.140 0.576 0.012 0.004 0.268
#> GSM149144 2 0.3913 0.77001 0.324 0.676 0.000 0.000 0.000
#> GSM149145 1 0.5646 0.34858 0.632 0.156 0.000 0.000 0.212
#> GSM149146 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149147 1 0.0451 0.76277 0.988 0.004 0.000 0.000 0.008
#> GSM149148 1 0.0290 0.76502 0.992 0.008 0.000 0.000 0.000
#> GSM149149 1 0.0290 0.76502 0.992 0.008 0.000 0.000 0.000
#> GSM149150 1 0.2519 0.72459 0.884 0.100 0.000 0.000 0.016
#> GSM149151 1 0.0794 0.75690 0.972 0.028 0.000 0.000 0.000
#> GSM149152 1 0.6219 0.12334 0.548 0.000 0.000 0.240 0.212
#> GSM149153 1 0.5646 0.34858 0.632 0.156 0.000 0.000 0.212
#> GSM149154 5 0.6935 0.40357 0.112 0.040 0.364 0.004 0.480
#> GSM149155 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149156 2 0.3796 0.78013 0.300 0.700 0.000 0.000 0.000
#> GSM149157 2 0.3774 0.78000 0.296 0.704 0.000 0.000 0.000
#> GSM149158 2 0.4641 0.60542 0.456 0.532 0.000 0.000 0.012
#> GSM149159 2 0.3409 0.71240 0.144 0.824 0.000 0.000 0.032
#> GSM149160 2 0.4604 0.60886 0.428 0.560 0.000 0.000 0.012
#> GSM149161 2 0.4610 0.60646 0.432 0.556 0.000 0.000 0.012
#> GSM149162 2 0.4590 0.61072 0.420 0.568 0.000 0.000 0.012
#> GSM149163 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149164 2 0.6177 0.17322 0.304 0.532 0.000 0.000 0.164
#> GSM149165 2 0.3656 0.72450 0.168 0.800 0.000 0.000 0.032
#> GSM149166 2 0.3966 0.75937 0.336 0.664 0.000 0.000 0.000
#> GSM149167 1 0.3919 0.65249 0.776 0.036 0.000 0.000 0.188
#> GSM149168 2 0.0963 0.56486 0.000 0.964 0.000 0.000 0.036
#> GSM149169 1 0.4996 -0.37278 0.548 0.420 0.000 0.000 0.032
#> GSM149170 2 0.1544 0.53583 0.000 0.932 0.000 0.000 0.068
#> GSM149171 2 0.1205 0.55996 0.004 0.956 0.000 0.000 0.040
#> GSM149172 2 0.3958 0.30079 0.040 0.776 0.000 0.000 0.184
#> GSM149173 2 0.1544 0.53583 0.000 0.932 0.000 0.000 0.068
#> GSM149174 2 0.4650 0.57105 0.468 0.520 0.000 0.000 0.012
#> GSM149175 5 0.5549 0.08128 0.048 0.008 0.472 0.000 0.472
#> GSM149176 2 0.3913 0.76779 0.324 0.676 0.000 0.000 0.000
#> GSM149177 2 0.4782 0.73252 0.244 0.700 0.004 0.000 0.052
#> GSM149178 5 0.6692 0.39852 0.060 0.384 0.072 0.000 0.484
#> GSM149179 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149180 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149181 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149182 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149183 2 0.3752 0.77936 0.292 0.708 0.000 0.000 0.000
#> GSM149184 1 0.3919 0.65249 0.776 0.036 0.000 0.000 0.188
#> GSM149185 2 0.3616 0.72225 0.164 0.804 0.000 0.000 0.032
#> GSM149186 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149187 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149188 2 0.3789 0.74738 0.212 0.768 0.000 0.000 0.020
#> GSM149189 2 0.4370 0.32571 0.040 0.768 0.016 0.000 0.176
#> GSM149190 2 0.4552 0.58211 0.468 0.524 0.000 0.000 0.008
#> GSM149191 2 0.6196 -0.00605 0.140 0.580 0.012 0.000 0.268
#> GSM149192 2 0.3656 0.72463 0.168 0.800 0.000 0.000 0.032
#> GSM149193 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149194 2 0.4045 0.74135 0.356 0.644 0.000 0.000 0.000
#> GSM149195 3 0.4689 0.49286 0.000 0.048 0.688 0.000 0.264
#> GSM149196 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149197 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149198 5 0.4811 0.56276 0.184 0.008 0.000 0.076 0.732
#> GSM149199 2 0.4528 0.62947 0.444 0.548 0.000 0.000 0.008
#> GSM149200 2 0.1544 0.53583 0.000 0.932 0.000 0.000 0.068
#> GSM149201 2 0.3816 0.78047 0.304 0.696 0.000 0.000 0.000
#> GSM149202 2 0.3796 0.78038 0.300 0.700 0.000 0.000 0.000
#> GSM149203 2 0.0963 0.56486 0.000 0.964 0.000 0.000 0.036
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 6 0.8076 0.2533 0.292 0.100 0.120 0.000 0.104 0.384
#> GSM149104 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.3547 0.4945 0.004 0.000 0.696 0.000 0.000 0.300
#> GSM149107 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.9392 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0146 0.9361 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149114 3 0.1204 0.8819 0.000 0.000 0.944 0.000 0.000 0.056
#> GSM149115 4 0.7928 -0.0945 0.268 0.188 0.000 0.392 0.056 0.096
#> GSM149116 4 0.0000 0.9218 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.6716 0.5075 0.480 0.196 0.000 0.000 0.068 0.256
#> GSM149118 4 0.0000 0.9218 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149120 4 0.0000 0.9218 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.4657 0.5906 0.224 0.000 0.000 0.696 0.020 0.060
#> GSM149122 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149123 4 0.0146 0.9201 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM149124 4 0.0000 0.9218 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.9218 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149127 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149128 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149129 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149130 1 0.2679 0.6637 0.868 0.096 0.000 0.000 0.004 0.032
#> GSM149131 1 0.2679 0.6637 0.868 0.096 0.000 0.000 0.004 0.032
#> GSM149132 4 0.0363 0.9226 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM149133 4 0.1049 0.8973 0.032 0.000 0.000 0.960 0.000 0.008
#> GSM149134 5 0.6227 0.1705 0.248 0.000 0.000 0.024 0.504 0.224
#> GSM149135 1 0.3076 0.7900 0.760 0.240 0.000 0.000 0.000 0.000
#> GSM149136 1 0.3076 0.7900 0.760 0.240 0.000 0.000 0.000 0.000
#> GSM149137 1 0.3101 0.7890 0.756 0.244 0.000 0.000 0.000 0.000
#> GSM149138 1 0.3050 0.7893 0.764 0.236 0.000 0.000 0.000 0.000
#> GSM149139 1 0.3076 0.7900 0.760 0.240 0.000 0.000 0.000 0.000
#> GSM149140 1 0.3101 0.7890 0.756 0.244 0.000 0.000 0.000 0.000
#> GSM149141 1 0.5558 0.4584 0.664 0.072 0.000 0.000 0.132 0.132
#> GSM149142 1 0.4494 0.7430 0.708 0.220 0.000 0.000 0.056 0.016
#> GSM149143 2 0.7462 -0.0790 0.156 0.376 0.000 0.000 0.224 0.244
#> GSM149144 2 0.0713 0.7541 0.028 0.972 0.000 0.000 0.000 0.000
#> GSM149145 1 0.5544 0.4502 0.664 0.068 0.000 0.000 0.136 0.132
#> GSM149146 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149147 1 0.3189 0.7885 0.760 0.236 0.000 0.000 0.000 0.004
#> GSM149148 1 0.3101 0.7890 0.756 0.244 0.000 0.000 0.000 0.000
#> GSM149149 1 0.3101 0.7890 0.756 0.244 0.000 0.000 0.000 0.000
#> GSM149150 1 0.4494 0.7430 0.708 0.220 0.000 0.000 0.056 0.016
#> GSM149151 1 0.3198 0.7765 0.740 0.260 0.000 0.000 0.000 0.000
#> GSM149152 1 0.4950 0.2763 0.664 0.000 0.000 0.228 0.012 0.096
#> GSM149153 1 0.5544 0.4502 0.664 0.068 0.000 0.000 0.136 0.132
#> GSM149154 6 0.6350 0.4521 0.144 0.000 0.316 0.000 0.048 0.492
#> GSM149155 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149156 2 0.0260 0.7589 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149157 2 0.0363 0.7579 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM149158 2 0.3226 0.6131 0.168 0.808 0.000 0.000 0.012 0.012
#> GSM149159 2 0.3221 0.5909 0.000 0.736 0.000 0.000 0.264 0.000
#> GSM149160 2 0.3834 0.6004 0.184 0.768 0.000 0.000 0.036 0.012
#> GSM149161 2 0.3764 0.5984 0.184 0.772 0.000 0.000 0.032 0.012
#> GSM149162 2 0.3966 0.6018 0.184 0.760 0.000 0.000 0.044 0.012
#> GSM149163 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149164 2 0.7192 0.1236 0.276 0.420 0.000 0.000 0.176 0.128
#> GSM149165 2 0.3076 0.6137 0.000 0.760 0.000 0.000 0.240 0.000
#> GSM149166 2 0.1542 0.7423 0.052 0.936 0.000 0.000 0.008 0.004
#> GSM149167 1 0.6868 0.4898 0.444 0.228 0.000 0.000 0.068 0.260
#> GSM149168 2 0.4246 0.3756 0.020 0.580 0.000 0.000 0.400 0.000
#> GSM149169 2 0.4853 0.3548 0.272 0.656 0.000 0.000 0.032 0.040
#> GSM149170 2 0.4879 0.3307 0.020 0.548 0.000 0.000 0.404 0.028
#> GSM149171 2 0.4326 0.3673 0.024 0.572 0.000 0.000 0.404 0.000
#> GSM149172 5 0.6234 -0.2942 0.052 0.412 0.000 0.000 0.432 0.104
#> GSM149173 2 0.4879 0.3307 0.020 0.548 0.000 0.000 0.404 0.028
#> GSM149174 2 0.3799 0.5630 0.208 0.756 0.000 0.000 0.024 0.012
#> GSM149175 6 0.5569 0.2364 0.032 0.000 0.400 0.000 0.064 0.504
#> GSM149176 2 0.1268 0.7488 0.036 0.952 0.000 0.000 0.008 0.004
#> GSM149177 2 0.3276 0.7001 0.100 0.840 0.000 0.000 0.028 0.032
#> GSM149178 6 0.6696 0.0653 0.048 0.248 0.008 0.000 0.200 0.496
#> GSM149179 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149180 2 0.0291 0.7591 0.004 0.992 0.000 0.000 0.000 0.004
#> GSM149181 2 0.0405 0.7594 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM149182 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149183 2 0.1444 0.7327 0.000 0.928 0.000 0.000 0.072 0.000
#> GSM149184 1 0.6868 0.4898 0.444 0.228 0.000 0.000 0.068 0.260
#> GSM149185 2 0.3101 0.6095 0.000 0.756 0.000 0.000 0.244 0.000
#> GSM149186 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149187 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149188 2 0.2631 0.6614 0.000 0.820 0.000 0.000 0.180 0.000
#> GSM149189 2 0.6442 0.1081 0.044 0.460 0.000 0.000 0.336 0.160
#> GSM149190 2 0.3547 0.5713 0.208 0.768 0.000 0.000 0.012 0.012
#> GSM149191 2 0.7453 -0.0763 0.152 0.376 0.000 0.000 0.228 0.244
#> GSM149192 2 0.3076 0.6142 0.000 0.760 0.000 0.000 0.240 0.000
#> GSM149193 2 0.0405 0.7594 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM149194 2 0.2002 0.7300 0.076 0.908 0.000 0.000 0.012 0.004
#> GSM149195 3 0.4806 0.3057 0.004 0.000 0.624 0.000 0.068 0.304
#> GSM149196 2 0.0405 0.7594 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM149197 2 0.0146 0.7597 0.004 0.996 0.000 0.000 0.000 0.000
#> GSM149198 5 0.6133 0.1705 0.208 0.000 0.000 0.024 0.524 0.244
#> GSM149199 2 0.2773 0.6428 0.152 0.836 0.000 0.000 0.004 0.008
#> GSM149200 2 0.4879 0.3307 0.020 0.548 0.000 0.000 0.404 0.028
#> GSM149201 2 0.0405 0.7594 0.004 0.988 0.000 0.000 0.008 0.000
#> GSM149202 2 0.0508 0.7591 0.004 0.984 0.000 0.000 0.012 0.000
#> GSM149203 2 0.4246 0.3756 0.020 0.580 0.000 0.000 0.400 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:hclust 101 2.68e-12 2
#> ATC:hclust 99 1.77e-25 3
#> ATC:hclust 49 1.30e-19 4
#> ATC:hclust 90 5.45e-28 5
#> ATC:hclust 78 1.23e-27 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "kmeans"]
# you can also extract it by
# res = res_list["ATC:kmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.980 0.986 0.4408 0.558 0.558
#> 3 3 0.630 0.778 0.852 0.4007 0.773 0.603
#> 4 4 0.695 0.785 0.790 0.1665 0.906 0.748
#> 5 5 0.788 0.865 0.888 0.0929 0.890 0.640
#> 6 6 0.850 0.749 0.857 0.0434 0.967 0.844
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.204 0.976 0.968 0.032
#> GSM149100 1 0.204 0.976 0.968 0.032
#> GSM149101 1 0.204 0.976 0.968 0.032
#> GSM149102 1 0.204 0.976 0.968 0.032
#> GSM149103 2 0.000 0.992 0.000 1.000
#> GSM149104 1 0.204 0.976 0.968 0.032
#> GSM149105 1 0.204 0.976 0.968 0.032
#> GSM149106 1 0.204 0.976 0.968 0.032
#> GSM149107 1 0.184 0.976 0.972 0.028
#> GSM149108 1 0.184 0.976 0.972 0.028
#> GSM149109 1 0.204 0.976 0.968 0.032
#> GSM149110 1 0.204 0.976 0.968 0.032
#> GSM149111 1 0.204 0.976 0.968 0.032
#> GSM149112 1 0.204 0.976 0.968 0.032
#> GSM149113 1 0.204 0.976 0.968 0.032
#> GSM149114 1 0.204 0.976 0.968 0.032
#> GSM149115 2 0.204 0.975 0.032 0.968
#> GSM149116 1 0.000 0.974 1.000 0.000
#> GSM149117 2 0.204 0.975 0.032 0.968
#> GSM149118 1 0.000 0.974 1.000 0.000
#> GSM149119 1 0.000 0.974 1.000 0.000
#> GSM149120 1 0.000 0.974 1.000 0.000
#> GSM149121 1 0.000 0.974 1.000 0.000
#> GSM149122 1 0.000 0.974 1.000 0.000
#> GSM149123 1 0.000 0.974 1.000 0.000
#> GSM149124 1 0.000 0.974 1.000 0.000
#> GSM149125 1 0.000 0.974 1.000 0.000
#> GSM149126 1 0.000 0.974 1.000 0.000
#> GSM149127 1 0.000 0.974 1.000 0.000
#> GSM149128 1 0.000 0.974 1.000 0.000
#> GSM149129 1 0.000 0.974 1.000 0.000
#> GSM149130 2 0.204 0.975 0.032 0.968
#> GSM149131 2 0.204 0.975 0.032 0.968
#> GSM149132 1 0.000 0.974 1.000 0.000
#> GSM149133 1 0.000 0.974 1.000 0.000
#> GSM149134 2 0.204 0.975 0.032 0.968
#> GSM149135 2 0.204 0.975 0.032 0.968
#> GSM149136 2 0.204 0.975 0.032 0.968
#> GSM149137 2 0.204 0.975 0.032 0.968
#> GSM149138 2 0.204 0.975 0.032 0.968
#> GSM149139 2 0.204 0.975 0.032 0.968
#> GSM149140 2 0.204 0.975 0.032 0.968
#> GSM149141 2 0.141 0.981 0.020 0.980
#> GSM149142 2 0.000 0.992 0.000 1.000
#> GSM149143 2 0.000 0.992 0.000 1.000
#> GSM149144 2 0.000 0.992 0.000 1.000
#> GSM149145 2 0.000 0.992 0.000 1.000
#> GSM149146 2 0.000 0.992 0.000 1.000
#> GSM149147 2 0.204 0.975 0.032 0.968
#> GSM149148 2 0.204 0.975 0.032 0.968
#> GSM149149 2 0.204 0.975 0.032 0.968
#> GSM149150 2 0.000 0.992 0.000 1.000
#> GSM149151 2 0.204 0.975 0.032 0.968
#> GSM149152 2 0.278 0.964 0.048 0.952
#> GSM149153 2 0.000 0.992 0.000 1.000
#> GSM149154 1 0.204 0.976 0.968 0.032
#> GSM149155 2 0.000 0.992 0.000 1.000
#> GSM149156 2 0.000 0.992 0.000 1.000
#> GSM149157 2 0.000 0.992 0.000 1.000
#> GSM149158 2 0.000 0.992 0.000 1.000
#> GSM149159 2 0.000 0.992 0.000 1.000
#> GSM149160 2 0.000 0.992 0.000 1.000
#> GSM149161 2 0.000 0.992 0.000 1.000
#> GSM149162 2 0.000 0.992 0.000 1.000
#> GSM149163 2 0.000 0.992 0.000 1.000
#> GSM149164 2 0.000 0.992 0.000 1.000
#> GSM149165 2 0.000 0.992 0.000 1.000
#> GSM149166 2 0.000 0.992 0.000 1.000
#> GSM149167 2 0.141 0.981 0.020 0.980
#> GSM149168 2 0.000 0.992 0.000 1.000
#> GSM149169 2 0.141 0.981 0.020 0.980
#> GSM149170 2 0.000 0.992 0.000 1.000
#> GSM149171 2 0.000 0.992 0.000 1.000
#> GSM149172 2 0.000 0.992 0.000 1.000
#> GSM149173 2 0.000 0.992 0.000 1.000
#> GSM149174 2 0.000 0.992 0.000 1.000
#> GSM149175 1 0.204 0.976 0.968 0.032
#> GSM149176 2 0.000 0.992 0.000 1.000
#> GSM149177 2 0.000 0.992 0.000 1.000
#> GSM149178 2 0.000 0.992 0.000 1.000
#> GSM149179 2 0.000 0.992 0.000 1.000
#> GSM149180 2 0.000 0.992 0.000 1.000
#> GSM149181 2 0.000 0.992 0.000 1.000
#> GSM149182 2 0.000 0.992 0.000 1.000
#> GSM149183 2 0.000 0.992 0.000 1.000
#> GSM149184 2 0.000 0.992 0.000 1.000
#> GSM149185 2 0.000 0.992 0.000 1.000
#> GSM149186 2 0.000 0.992 0.000 1.000
#> GSM149187 2 0.000 0.992 0.000 1.000
#> GSM149188 2 0.000 0.992 0.000 1.000
#> GSM149189 2 0.000 0.992 0.000 1.000
#> GSM149190 2 0.000 0.992 0.000 1.000
#> GSM149191 2 0.000 0.992 0.000 1.000
#> GSM149192 2 0.000 0.992 0.000 1.000
#> GSM149193 2 0.000 0.992 0.000 1.000
#> GSM149194 2 0.000 0.992 0.000 1.000
#> GSM149195 1 0.204 0.976 0.968 0.032
#> GSM149196 2 0.000 0.992 0.000 1.000
#> GSM149197 2 0.000 0.992 0.000 1.000
#> GSM149198 1 0.861 0.596 0.716 0.284
#> GSM149199 2 0.000 0.992 0.000 1.000
#> GSM149200 2 0.000 0.992 0.000 1.000
#> GSM149201 2 0.000 0.992 0.000 1.000
#> GSM149202 2 0.000 0.992 0.000 1.000
#> GSM149203 2 0.000 0.992 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.000 0.852 0.000 0.000 1.000
#> GSM149100 3 0.000 0.852 0.000 0.000 1.000
#> GSM149101 3 0.000 0.852 0.000 0.000 1.000
#> GSM149102 3 0.000 0.852 0.000 0.000 1.000
#> GSM149103 1 0.767 0.696 0.652 0.260 0.088
#> GSM149104 3 0.000 0.852 0.000 0.000 1.000
#> GSM149105 3 0.000 0.852 0.000 0.000 1.000
#> GSM149106 3 0.116 0.848 0.028 0.000 0.972
#> GSM149107 3 0.000 0.852 0.000 0.000 1.000
#> GSM149108 3 0.000 0.852 0.000 0.000 1.000
#> GSM149109 3 0.000 0.852 0.000 0.000 1.000
#> GSM149110 3 0.000 0.852 0.000 0.000 1.000
#> GSM149111 3 0.000 0.852 0.000 0.000 1.000
#> GSM149112 3 0.000 0.852 0.000 0.000 1.000
#> GSM149113 3 0.000 0.852 0.000 0.000 1.000
#> GSM149114 3 0.000 0.852 0.000 0.000 1.000
#> GSM149115 1 0.362 0.644 0.864 0.136 0.000
#> GSM149116 3 0.588 0.780 0.348 0.000 0.652
#> GSM149117 1 0.604 0.757 0.620 0.380 0.000
#> GSM149118 3 0.595 0.772 0.360 0.000 0.640
#> GSM149119 3 0.588 0.780 0.348 0.000 0.652
#> GSM149120 3 0.595 0.772 0.360 0.000 0.640
#> GSM149121 1 0.288 0.427 0.904 0.000 0.096
#> GSM149122 3 0.588 0.780 0.348 0.000 0.652
#> GSM149123 3 0.597 0.768 0.364 0.000 0.636
#> GSM149124 3 0.597 0.768 0.364 0.000 0.636
#> GSM149125 3 0.595 0.772 0.360 0.000 0.640
#> GSM149126 3 0.588 0.780 0.348 0.000 0.652
#> GSM149127 3 0.588 0.780 0.348 0.000 0.652
#> GSM149128 3 0.588 0.780 0.348 0.000 0.652
#> GSM149129 3 0.588 0.780 0.348 0.000 0.652
#> GSM149130 1 0.597 0.769 0.636 0.364 0.000
#> GSM149131 1 0.103 0.570 0.976 0.024 0.000
#> GSM149132 3 0.588 0.780 0.348 0.000 0.652
#> GSM149133 1 0.510 0.070 0.752 0.000 0.248
#> GSM149134 1 0.312 0.676 0.892 0.108 0.000
#> GSM149135 1 0.601 0.765 0.628 0.372 0.000
#> GSM149136 1 0.601 0.765 0.628 0.372 0.000
#> GSM149137 1 0.601 0.765 0.628 0.372 0.000
#> GSM149138 1 0.593 0.768 0.644 0.356 0.000
#> GSM149139 1 0.597 0.769 0.636 0.364 0.000
#> GSM149140 1 0.603 0.761 0.624 0.376 0.000
#> GSM149141 1 0.540 0.737 0.720 0.280 0.000
#> GSM149142 1 0.631 0.547 0.508 0.492 0.000
#> GSM149143 2 0.480 0.717 0.220 0.780 0.000
#> GSM149144 2 0.216 0.847 0.064 0.936 0.000
#> GSM149145 1 0.593 0.644 0.644 0.356 0.000
#> GSM149146 2 0.000 0.897 0.000 1.000 0.000
#> GSM149147 1 0.556 0.749 0.700 0.300 0.000
#> GSM149148 1 0.597 0.769 0.636 0.364 0.000
#> GSM149149 1 0.597 0.769 0.636 0.364 0.000
#> GSM149150 2 0.628 -0.440 0.460 0.540 0.000
#> GSM149151 1 0.597 0.769 0.636 0.364 0.000
#> GSM149152 1 0.000 0.541 1.000 0.000 0.000
#> GSM149153 1 0.593 0.644 0.644 0.356 0.000
#> GSM149154 3 0.288 0.775 0.096 0.000 0.904
#> GSM149155 2 0.000 0.897 0.000 1.000 0.000
#> GSM149156 2 0.000 0.897 0.000 1.000 0.000
#> GSM149157 2 0.000 0.897 0.000 1.000 0.000
#> GSM149158 2 0.216 0.847 0.064 0.936 0.000
#> GSM149159 2 0.296 0.856 0.100 0.900 0.000
#> GSM149160 2 0.116 0.891 0.028 0.972 0.000
#> GSM149161 2 0.216 0.847 0.064 0.936 0.000
#> GSM149162 2 0.000 0.897 0.000 1.000 0.000
#> GSM149163 2 0.000 0.897 0.000 1.000 0.000
#> GSM149164 2 0.533 0.637 0.272 0.728 0.000
#> GSM149165 2 0.164 0.886 0.044 0.956 0.000
#> GSM149166 2 0.216 0.847 0.064 0.936 0.000
#> GSM149167 2 0.620 -0.331 0.424 0.576 0.000
#> GSM149168 2 0.304 0.854 0.104 0.896 0.000
#> GSM149169 1 0.631 0.553 0.508 0.492 0.000
#> GSM149170 2 0.304 0.854 0.104 0.896 0.000
#> GSM149171 2 0.312 0.852 0.108 0.892 0.000
#> GSM149172 2 0.435 0.773 0.184 0.816 0.000
#> GSM149173 2 0.312 0.852 0.108 0.892 0.000
#> GSM149174 2 0.216 0.847 0.064 0.936 0.000
#> GSM149175 3 0.000 0.852 0.000 0.000 1.000
#> GSM149176 2 0.103 0.882 0.024 0.976 0.000
#> GSM149177 2 0.319 0.850 0.112 0.888 0.000
#> GSM149178 2 0.450 0.760 0.196 0.804 0.000
#> GSM149179 2 0.000 0.897 0.000 1.000 0.000
#> GSM149180 2 0.000 0.897 0.000 1.000 0.000
#> GSM149181 2 0.000 0.897 0.000 1.000 0.000
#> GSM149182 2 0.000 0.897 0.000 1.000 0.000
#> GSM149183 2 0.000 0.897 0.000 1.000 0.000
#> GSM149184 2 0.000 0.897 0.000 1.000 0.000
#> GSM149185 2 0.288 0.857 0.096 0.904 0.000
#> GSM149186 2 0.000 0.897 0.000 1.000 0.000
#> GSM149187 2 0.000 0.897 0.000 1.000 0.000
#> GSM149188 2 0.153 0.887 0.040 0.960 0.000
#> GSM149189 2 0.312 0.852 0.108 0.892 0.000
#> GSM149190 2 0.216 0.847 0.064 0.936 0.000
#> GSM149191 2 0.312 0.852 0.108 0.892 0.000
#> GSM149192 2 0.141 0.889 0.036 0.964 0.000
#> GSM149193 2 0.000 0.897 0.000 1.000 0.000
#> GSM149194 2 0.000 0.897 0.000 1.000 0.000
#> GSM149195 3 0.000 0.852 0.000 0.000 1.000
#> GSM149196 2 0.000 0.897 0.000 1.000 0.000
#> GSM149197 2 0.000 0.897 0.000 1.000 0.000
#> GSM149198 1 0.000 0.541 1.000 0.000 0.000
#> GSM149199 2 0.000 0.897 0.000 1.000 0.000
#> GSM149200 2 0.312 0.852 0.108 0.892 0.000
#> GSM149201 2 0.000 0.897 0.000 1.000 0.000
#> GSM149202 2 0.153 0.887 0.040 0.960 0.000
#> GSM149203 2 0.312 0.852 0.108 0.892 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.5093 0.9670 0.012 0.000 0.640 0.348
#> GSM149100 3 0.4973 0.9670 0.008 0.000 0.644 0.348
#> GSM149101 3 0.4973 0.9670 0.008 0.000 0.644 0.348
#> GSM149102 3 0.4973 0.9670 0.008 0.000 0.644 0.348
#> GSM149103 1 0.3994 0.7840 0.828 0.028 0.140 0.004
#> GSM149104 3 0.4973 0.9670 0.008 0.000 0.644 0.348
#> GSM149105 3 0.4973 0.9669 0.008 0.000 0.644 0.348
#> GSM149106 3 0.4697 0.9618 0.000 0.000 0.644 0.356
#> GSM149107 3 0.4973 0.9670 0.008 0.000 0.644 0.348
#> GSM149108 3 0.4973 0.9670 0.008 0.000 0.644 0.348
#> GSM149109 3 0.5093 0.9670 0.012 0.000 0.640 0.348
#> GSM149110 3 0.4973 0.9669 0.008 0.000 0.644 0.348
#> GSM149111 3 0.4973 0.9669 0.008 0.000 0.644 0.348
#> GSM149112 3 0.4973 0.9669 0.008 0.000 0.644 0.348
#> GSM149113 3 0.4973 0.9669 0.008 0.000 0.644 0.348
#> GSM149114 3 0.4661 0.9667 0.000 0.000 0.652 0.348
#> GSM149115 1 0.2555 0.8658 0.920 0.040 0.008 0.032
#> GSM149116 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149117 1 0.2271 0.8737 0.916 0.076 0.008 0.000
#> GSM149118 4 0.0817 0.9036 0.024 0.000 0.000 0.976
#> GSM149119 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149120 4 0.0817 0.9036 0.024 0.000 0.000 0.976
#> GSM149121 4 0.5038 0.4466 0.336 0.000 0.012 0.652
#> GSM149122 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149123 4 0.1022 0.8971 0.032 0.000 0.000 0.968
#> GSM149124 4 0.1209 0.8943 0.032 0.000 0.004 0.964
#> GSM149125 4 0.0817 0.9036 0.024 0.000 0.000 0.976
#> GSM149126 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149127 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149128 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149129 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149130 1 0.1474 0.8823 0.948 0.052 0.000 0.000
#> GSM149131 1 0.1767 0.8358 0.944 0.000 0.012 0.044
#> GSM149132 4 0.0188 0.9062 0.004 0.000 0.000 0.996
#> GSM149133 4 0.4284 0.6447 0.224 0.000 0.012 0.764
#> GSM149134 1 0.1109 0.8514 0.968 0.000 0.004 0.028
#> GSM149135 1 0.1792 0.8796 0.932 0.068 0.000 0.000
#> GSM149136 1 0.1792 0.8796 0.932 0.068 0.000 0.000
#> GSM149137 1 0.1792 0.8796 0.932 0.068 0.000 0.000
#> GSM149138 1 0.1474 0.8823 0.948 0.052 0.000 0.000
#> GSM149139 1 0.1557 0.8827 0.944 0.056 0.000 0.000
#> GSM149140 1 0.1867 0.8775 0.928 0.072 0.000 0.000
#> GSM149141 1 0.1520 0.8646 0.956 0.020 0.024 0.000
#> GSM149142 1 0.3937 0.7873 0.800 0.188 0.012 0.000
#> GSM149143 2 0.6993 0.5977 0.132 0.532 0.336 0.000
#> GSM149144 2 0.4744 0.4647 0.284 0.704 0.012 0.000
#> GSM149145 1 0.3991 0.7955 0.832 0.048 0.120 0.000
#> GSM149146 2 0.1109 0.7751 0.028 0.968 0.004 0.000
#> GSM149147 1 0.0592 0.8682 0.984 0.016 0.000 0.000
#> GSM149148 1 0.1557 0.8827 0.944 0.056 0.000 0.000
#> GSM149149 1 0.1557 0.8827 0.944 0.056 0.000 0.000
#> GSM149150 1 0.3978 0.7831 0.796 0.192 0.012 0.000
#> GSM149151 1 0.1637 0.8820 0.940 0.060 0.000 0.000
#> GSM149152 1 0.1975 0.8325 0.936 0.000 0.016 0.048
#> GSM149153 1 0.3934 0.7985 0.836 0.048 0.116 0.000
#> GSM149154 3 0.6139 0.7484 0.056 0.016 0.664 0.264
#> GSM149155 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149156 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149157 2 0.0469 0.7767 0.012 0.988 0.000 0.000
#> GSM149158 2 0.4744 0.4647 0.284 0.704 0.012 0.000
#> GSM149159 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149160 2 0.3306 0.7572 0.004 0.840 0.156 0.000
#> GSM149161 2 0.4744 0.4647 0.284 0.704 0.012 0.000
#> GSM149162 2 0.1151 0.7762 0.008 0.968 0.024 0.000
#> GSM149163 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149164 1 0.7837 -0.0838 0.408 0.296 0.296 0.000
#> GSM149165 2 0.4343 0.7268 0.004 0.732 0.264 0.000
#> GSM149166 2 0.4770 0.4560 0.288 0.700 0.012 0.000
#> GSM149167 1 0.5558 0.3575 0.548 0.432 0.020 0.000
#> GSM149168 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149169 1 0.4361 0.7619 0.772 0.208 0.020 0.000
#> GSM149170 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149171 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149172 2 0.6809 0.6175 0.116 0.552 0.332 0.000
#> GSM149173 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149174 2 0.4744 0.4647 0.284 0.704 0.012 0.000
#> GSM149175 3 0.4605 0.9568 0.000 0.000 0.664 0.336
#> GSM149176 2 0.4284 0.5656 0.224 0.764 0.012 0.000
#> GSM149177 2 0.5499 0.7179 0.072 0.712 0.216 0.000
#> GSM149178 2 0.7084 0.5943 0.140 0.520 0.340 0.000
#> GSM149179 2 0.1356 0.7723 0.032 0.960 0.008 0.000
#> GSM149180 2 0.1109 0.7751 0.028 0.968 0.004 0.000
#> GSM149181 2 0.0672 0.7769 0.008 0.984 0.008 0.000
#> GSM149182 2 0.1356 0.7723 0.032 0.960 0.008 0.000
#> GSM149183 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149184 2 0.1724 0.7688 0.032 0.948 0.020 0.000
#> GSM149185 2 0.5827 0.6864 0.052 0.632 0.316 0.000
#> GSM149186 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149187 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149188 2 0.4252 0.7308 0.004 0.744 0.252 0.000
#> GSM149189 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149190 2 0.4744 0.4647 0.284 0.704 0.012 0.000
#> GSM149191 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149192 2 0.4220 0.7321 0.004 0.748 0.248 0.000
#> GSM149193 2 0.0672 0.7769 0.008 0.984 0.008 0.000
#> GSM149194 2 0.1256 0.7740 0.028 0.964 0.008 0.000
#> GSM149195 3 0.4391 0.8320 0.008 0.000 0.740 0.252
#> GSM149196 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149197 2 0.1356 0.7723 0.032 0.960 0.008 0.000
#> GSM149198 1 0.1975 0.8320 0.936 0.000 0.016 0.048
#> GSM149199 2 0.1488 0.7710 0.032 0.956 0.012 0.000
#> GSM149200 2 0.5966 0.6825 0.060 0.624 0.316 0.000
#> GSM149201 2 0.0921 0.7760 0.028 0.972 0.000 0.000
#> GSM149202 2 0.4220 0.7321 0.004 0.748 0.248 0.000
#> GSM149203 2 0.5966 0.6825 0.060 0.624 0.316 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0671 0.952 0.004 0.000 0.980 0.000 0.016
#> GSM149100 3 0.0566 0.952 0.004 0.000 0.984 0.000 0.012
#> GSM149101 3 0.0566 0.952 0.004 0.000 0.984 0.000 0.012
#> GSM149102 3 0.0566 0.952 0.004 0.000 0.984 0.000 0.012
#> GSM149103 1 0.6215 0.666 0.652 0.032 0.020 0.080 0.216
#> GSM149104 3 0.0566 0.952 0.004 0.000 0.984 0.000 0.012
#> GSM149105 3 0.0404 0.951 0.000 0.000 0.988 0.000 0.012
#> GSM149106 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000
#> GSM149107 3 0.0566 0.952 0.004 0.000 0.984 0.000 0.012
#> GSM149108 3 0.0566 0.952 0.004 0.000 0.984 0.000 0.012
#> GSM149109 3 0.0671 0.952 0.004 0.000 0.980 0.000 0.016
#> GSM149110 3 0.0404 0.951 0.000 0.000 0.988 0.000 0.012
#> GSM149111 3 0.0404 0.951 0.000 0.000 0.988 0.000 0.012
#> GSM149112 3 0.0404 0.951 0.000 0.000 0.988 0.000 0.012
#> GSM149113 3 0.0404 0.951 0.000 0.000 0.988 0.000 0.012
#> GSM149114 3 0.0290 0.952 0.000 0.000 0.992 0.000 0.008
#> GSM149115 1 0.1731 0.901 0.932 0.004 0.000 0.004 0.060
#> GSM149116 4 0.3123 0.963 0.000 0.000 0.160 0.828 0.012
#> GSM149117 1 0.2251 0.898 0.916 0.008 0.000 0.024 0.052
#> GSM149118 4 0.3224 0.963 0.000 0.000 0.160 0.824 0.016
#> GSM149119 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149120 4 0.3224 0.963 0.000 0.000 0.160 0.824 0.016
#> GSM149121 4 0.3236 0.772 0.152 0.000 0.000 0.828 0.020
#> GSM149122 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149123 4 0.3087 0.961 0.008 0.000 0.152 0.836 0.004
#> GSM149124 4 0.3379 0.957 0.008 0.000 0.148 0.828 0.016
#> GSM149125 4 0.3224 0.963 0.000 0.000 0.160 0.824 0.016
#> GSM149126 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149127 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149128 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149129 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149130 1 0.0162 0.922 0.996 0.004 0.000 0.000 0.000
#> GSM149131 1 0.0865 0.917 0.972 0.000 0.000 0.024 0.004
#> GSM149132 4 0.2732 0.965 0.000 0.000 0.160 0.840 0.000
#> GSM149133 4 0.3514 0.853 0.088 0.000 0.048 0.848 0.016
#> GSM149134 1 0.1251 0.910 0.956 0.000 0.000 0.008 0.036
#> GSM149135 1 0.0290 0.922 0.992 0.008 0.000 0.000 0.000
#> GSM149136 1 0.0290 0.922 0.992 0.008 0.000 0.000 0.000
#> GSM149137 1 0.0290 0.922 0.992 0.008 0.000 0.000 0.000
#> GSM149138 1 0.0162 0.922 0.996 0.004 0.000 0.000 0.000
#> GSM149139 1 0.0162 0.922 0.996 0.004 0.000 0.000 0.000
#> GSM149140 1 0.0290 0.922 0.992 0.008 0.000 0.000 0.000
#> GSM149141 1 0.2494 0.895 0.908 0.032 0.000 0.044 0.016
#> GSM149142 1 0.3750 0.842 0.824 0.088 0.000 0.084 0.004
#> GSM149143 5 0.4079 0.854 0.020 0.108 0.000 0.060 0.812
#> GSM149144 2 0.1956 0.844 0.076 0.916 0.000 0.008 0.000
#> GSM149145 1 0.5453 0.717 0.696 0.032 0.000 0.076 0.196
#> GSM149146 2 0.1124 0.888 0.000 0.960 0.000 0.004 0.036
#> GSM149147 1 0.0324 0.922 0.992 0.000 0.000 0.004 0.004
#> GSM149148 1 0.0324 0.923 0.992 0.004 0.000 0.004 0.000
#> GSM149149 1 0.0324 0.923 0.992 0.004 0.000 0.004 0.000
#> GSM149150 1 0.3928 0.837 0.816 0.092 0.000 0.084 0.008
#> GSM149151 1 0.0324 0.923 0.992 0.004 0.000 0.004 0.000
#> GSM149152 1 0.2278 0.895 0.908 0.000 0.000 0.032 0.060
#> GSM149153 1 0.4980 0.762 0.740 0.032 0.000 0.060 0.168
#> GSM149154 3 0.5422 0.363 0.004 0.000 0.568 0.056 0.372
#> GSM149155 2 0.0963 0.889 0.000 0.964 0.000 0.000 0.036
#> GSM149156 2 0.1251 0.888 0.000 0.956 0.000 0.008 0.036
#> GSM149157 2 0.2797 0.857 0.000 0.880 0.000 0.060 0.060
#> GSM149158 2 0.2983 0.828 0.076 0.868 0.000 0.056 0.000
#> GSM149159 5 0.2612 0.899 0.000 0.124 0.000 0.008 0.868
#> GSM149160 5 0.5604 0.308 0.000 0.456 0.000 0.072 0.472
#> GSM149161 2 0.3242 0.819 0.076 0.852 0.000 0.072 0.000
#> GSM149162 2 0.3688 0.781 0.000 0.816 0.000 0.060 0.124
#> GSM149163 2 0.0963 0.889 0.000 0.964 0.000 0.000 0.036
#> GSM149164 5 0.5937 0.701 0.108 0.096 0.000 0.104 0.692
#> GSM149165 5 0.3563 0.841 0.000 0.208 0.000 0.012 0.780
#> GSM149166 2 0.2616 0.836 0.076 0.888 0.000 0.036 0.000
#> GSM149167 2 0.6574 0.266 0.336 0.532 0.000 0.080 0.052
#> GSM149168 5 0.2329 0.901 0.000 0.124 0.000 0.000 0.876
#> GSM149169 1 0.4883 0.808 0.764 0.100 0.000 0.100 0.036
#> GSM149170 5 0.2329 0.901 0.000 0.124 0.000 0.000 0.876
#> GSM149171 5 0.2329 0.901 0.000 0.124 0.000 0.000 0.876
#> GSM149172 5 0.3154 0.871 0.008 0.088 0.000 0.040 0.864
#> GSM149173 5 0.2179 0.898 0.000 0.112 0.000 0.000 0.888
#> GSM149174 2 0.3239 0.819 0.080 0.852 0.000 0.068 0.000
#> GSM149175 3 0.1549 0.910 0.000 0.000 0.944 0.040 0.016
#> GSM149176 2 0.1671 0.846 0.076 0.924 0.000 0.000 0.000
#> GSM149177 2 0.5175 -0.257 0.000 0.496 0.000 0.040 0.464
#> GSM149178 5 0.3584 0.856 0.012 0.112 0.000 0.040 0.836
#> GSM149179 2 0.0290 0.888 0.000 0.992 0.000 0.000 0.008
#> GSM149180 2 0.0880 0.889 0.000 0.968 0.000 0.000 0.032
#> GSM149181 2 0.1357 0.881 0.000 0.948 0.000 0.004 0.048
#> GSM149182 2 0.0290 0.888 0.000 0.992 0.000 0.000 0.008
#> GSM149183 2 0.1124 0.888 0.000 0.960 0.000 0.004 0.036
#> GSM149184 2 0.2278 0.853 0.000 0.908 0.000 0.032 0.060
#> GSM149185 5 0.2723 0.898 0.000 0.124 0.000 0.012 0.864
#> GSM149186 2 0.0963 0.889 0.000 0.964 0.000 0.000 0.036
#> GSM149187 2 0.0963 0.889 0.000 0.964 0.000 0.000 0.036
#> GSM149188 5 0.3992 0.778 0.000 0.268 0.000 0.012 0.720
#> GSM149189 5 0.2462 0.896 0.000 0.112 0.000 0.008 0.880
#> GSM149190 2 0.2983 0.827 0.076 0.868 0.000 0.056 0.000
#> GSM149191 5 0.2179 0.898 0.000 0.112 0.000 0.000 0.888
#> GSM149192 5 0.4065 0.781 0.000 0.264 0.000 0.016 0.720
#> GSM149193 2 0.1282 0.884 0.000 0.952 0.000 0.004 0.044
#> GSM149194 2 0.1800 0.877 0.000 0.932 0.000 0.048 0.020
#> GSM149195 3 0.2104 0.888 0.000 0.000 0.916 0.024 0.060
#> GSM149196 2 0.1124 0.888 0.000 0.960 0.000 0.004 0.036
#> GSM149197 2 0.0609 0.889 0.000 0.980 0.000 0.000 0.020
#> GSM149198 1 0.2769 0.875 0.876 0.000 0.000 0.032 0.092
#> GSM149199 2 0.0609 0.883 0.000 0.980 0.000 0.020 0.000
#> GSM149200 5 0.2329 0.901 0.000 0.124 0.000 0.000 0.876
#> GSM149201 2 0.1124 0.888 0.000 0.960 0.000 0.004 0.036
#> GSM149202 5 0.4227 0.746 0.000 0.292 0.000 0.016 0.692
#> GSM149203 5 0.2329 0.901 0.000 0.124 0.000 0.000 0.876
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149100 3 0.1196 0.9450 0.000 0.000 0.952 0.000 0.008 0.040
#> GSM149101 3 0.1196 0.9450 0.000 0.000 0.952 0.000 0.008 0.040
#> GSM149102 3 0.1196 0.9450 0.000 0.000 0.952 0.000 0.008 0.040
#> GSM149103 6 0.5423 0.2118 0.352 0.008 0.004 0.000 0.088 0.548
#> GSM149104 3 0.1196 0.9450 0.000 0.000 0.952 0.000 0.008 0.040
#> GSM149105 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149106 3 0.1926 0.9034 0.000 0.000 0.912 0.020 0.000 0.068
#> GSM149107 3 0.1196 0.9450 0.000 0.000 0.952 0.000 0.008 0.040
#> GSM149108 3 0.1333 0.9423 0.000 0.000 0.944 0.000 0.008 0.048
#> GSM149109 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149110 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149111 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149112 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149113 3 0.0146 0.9467 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM149114 3 0.1082 0.9454 0.000 0.000 0.956 0.000 0.004 0.040
#> GSM149115 1 0.2697 0.6732 0.812 0.000 0.000 0.000 0.000 0.188
#> GSM149116 4 0.2380 0.9622 0.000 0.000 0.068 0.892 0.004 0.036
#> GSM149117 1 0.3660 0.6424 0.772 0.000 0.000 0.036 0.004 0.188
#> GSM149118 4 0.2152 0.9638 0.000 0.000 0.068 0.904 0.004 0.024
#> GSM149119 4 0.2069 0.9642 0.000 0.000 0.068 0.908 0.004 0.020
#> GSM149120 4 0.2152 0.9638 0.000 0.000 0.068 0.904 0.004 0.024
#> GSM149121 4 0.3411 0.8124 0.060 0.000 0.000 0.816 0.004 0.120
#> GSM149122 4 0.2069 0.9642 0.000 0.000 0.068 0.908 0.004 0.020
#> GSM149123 4 0.1471 0.9669 0.004 0.000 0.064 0.932 0.000 0.000
#> GSM149124 4 0.2781 0.9591 0.004 0.000 0.064 0.876 0.008 0.048
#> GSM149125 4 0.2152 0.9638 0.000 0.000 0.068 0.904 0.004 0.024
#> GSM149126 4 0.1387 0.9675 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM149127 4 0.2069 0.9642 0.000 0.000 0.068 0.908 0.004 0.020
#> GSM149128 4 0.1387 0.9675 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM149129 4 0.1387 0.9675 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM149130 1 0.0260 0.7834 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM149131 1 0.2178 0.7230 0.868 0.000 0.000 0.000 0.000 0.132
#> GSM149132 4 0.1387 0.9675 0.000 0.000 0.068 0.932 0.000 0.000
#> GSM149133 4 0.2426 0.9091 0.020 0.000 0.012 0.896 0.004 0.068
#> GSM149134 1 0.2048 0.7293 0.880 0.000 0.000 0.000 0.000 0.120
#> GSM149135 1 0.0146 0.7838 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149136 1 0.0146 0.7838 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149137 1 0.0146 0.7838 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149138 1 0.0000 0.7835 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0146 0.7827 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149140 1 0.0146 0.7838 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149141 1 0.3653 0.5122 0.692 0.008 0.000 0.000 0.000 0.300
#> GSM149142 1 0.5439 0.4084 0.612 0.056 0.000 0.028 0.012 0.292
#> GSM149143 6 0.4566 -0.0752 0.008 0.020 0.000 0.000 0.484 0.488
#> GSM149144 2 0.1675 0.8499 0.024 0.936 0.000 0.008 0.000 0.032
#> GSM149145 6 0.5371 0.1348 0.392 0.008 0.000 0.000 0.088 0.512
#> GSM149146 2 0.0508 0.8680 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM149147 1 0.0790 0.7780 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM149148 1 0.0547 0.7811 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM149149 1 0.0632 0.7798 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM149150 1 0.5516 0.3772 0.592 0.056 0.000 0.028 0.012 0.312
#> GSM149151 1 0.0713 0.7801 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM149152 1 0.3823 0.3699 0.564 0.000 0.000 0.000 0.000 0.436
#> GSM149153 1 0.5451 -0.1382 0.456 0.008 0.000 0.000 0.092 0.444
#> GSM149154 6 0.6379 0.3388 0.040 0.000 0.248 0.000 0.204 0.508
#> GSM149155 2 0.0363 0.8686 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM149156 2 0.1138 0.8667 0.000 0.960 0.000 0.004 0.012 0.024
#> GSM149157 2 0.3982 0.7881 0.000 0.792 0.000 0.032 0.060 0.116
#> GSM149158 2 0.3988 0.7666 0.024 0.772 0.000 0.040 0.000 0.164
#> GSM149159 5 0.1410 0.8605 0.000 0.044 0.000 0.004 0.944 0.008
#> GSM149160 2 0.6297 0.2965 0.000 0.476 0.000 0.032 0.324 0.168
#> GSM149161 2 0.4754 0.7312 0.028 0.724 0.000 0.044 0.016 0.188
#> GSM149162 2 0.5408 0.6292 0.000 0.652 0.000 0.032 0.180 0.136
#> GSM149163 2 0.0363 0.8686 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM149164 6 0.5442 0.0708 0.020 0.020 0.000 0.032 0.420 0.508
#> GSM149165 5 0.2443 0.8201 0.000 0.096 0.000 0.004 0.880 0.020
#> GSM149166 2 0.2487 0.8369 0.024 0.892 0.000 0.020 0.000 0.064
#> GSM149167 6 0.7271 -0.0691 0.308 0.296 0.000 0.064 0.008 0.324
#> GSM149168 5 0.1549 0.8649 0.000 0.044 0.000 0.000 0.936 0.020
#> GSM149169 1 0.5886 0.3466 0.548 0.056 0.000 0.064 0.004 0.328
#> GSM149170 5 0.1480 0.8648 0.000 0.040 0.000 0.000 0.940 0.020
#> GSM149171 5 0.0865 0.8637 0.000 0.036 0.000 0.000 0.964 0.000
#> GSM149172 5 0.3974 0.4445 0.000 0.024 0.000 0.000 0.680 0.296
#> GSM149173 5 0.1418 0.8578 0.000 0.032 0.000 0.000 0.944 0.024
#> GSM149174 2 0.4732 0.7400 0.032 0.732 0.000 0.044 0.016 0.176
#> GSM149175 3 0.4026 0.4694 0.000 0.000 0.636 0.000 0.016 0.348
#> GSM149176 2 0.1434 0.8523 0.024 0.948 0.000 0.008 0.000 0.020
#> GSM149177 2 0.6248 -0.1380 0.004 0.420 0.000 0.004 0.248 0.324
#> GSM149178 5 0.4353 0.1714 0.004 0.020 0.000 0.000 0.588 0.388
#> GSM149179 2 0.0520 0.8663 0.000 0.984 0.000 0.008 0.000 0.008
#> GSM149180 2 0.0146 0.8684 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM149181 2 0.1285 0.8464 0.000 0.944 0.000 0.000 0.052 0.004
#> GSM149182 2 0.0520 0.8663 0.000 0.984 0.000 0.008 0.000 0.008
#> GSM149183 2 0.0508 0.8680 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM149184 2 0.4077 0.7066 0.000 0.736 0.000 0.044 0.008 0.212
#> GSM149185 5 0.1442 0.8596 0.000 0.040 0.000 0.004 0.944 0.012
#> GSM149186 2 0.0508 0.8680 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM149187 2 0.0363 0.8686 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM149188 5 0.2673 0.7895 0.000 0.132 0.000 0.004 0.852 0.012
#> GSM149189 5 0.1313 0.8520 0.000 0.028 0.000 0.004 0.952 0.016
#> GSM149190 2 0.4121 0.7536 0.024 0.756 0.000 0.040 0.000 0.180
#> GSM149191 5 0.1418 0.8578 0.000 0.032 0.000 0.000 0.944 0.024
#> GSM149192 5 0.2932 0.7730 0.000 0.140 0.000 0.004 0.836 0.020
#> GSM149193 2 0.0692 0.8651 0.000 0.976 0.000 0.000 0.020 0.004
#> GSM149194 2 0.2519 0.8409 0.000 0.888 0.000 0.020 0.020 0.072
#> GSM149195 3 0.1745 0.8971 0.000 0.000 0.924 0.000 0.020 0.056
#> GSM149196 2 0.0508 0.8680 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM149197 2 0.0779 0.8674 0.000 0.976 0.000 0.008 0.008 0.008
#> GSM149198 1 0.4310 0.3070 0.580 0.000 0.000 0.000 0.024 0.396
#> GSM149199 2 0.2492 0.8334 0.004 0.876 0.000 0.020 0.000 0.100
#> GSM149200 5 0.1480 0.8648 0.000 0.040 0.000 0.000 0.940 0.020
#> GSM149201 2 0.0508 0.8680 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM149202 5 0.3516 0.6573 0.000 0.220 0.000 0.004 0.760 0.016
#> GSM149203 5 0.1408 0.8634 0.000 0.036 0.000 0.000 0.944 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:kmeans 105 1.55e-11 2
#> ATC:kmeans 101 8.08e-19 3
#> ATC:kmeans 96 1.11e-28 4
#> ATC:kmeans 101 3.73e-30 5
#> ATC:kmeans 88 6.55e-29 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "skmeans"]
# you can also extract it by
# res = res_list["ATC:skmeans"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.988 0.996 0.4828 0.519 0.519
#> 3 3 0.972 0.931 0.969 0.3534 0.788 0.606
#> 4 4 0.899 0.902 0.939 0.1118 0.914 0.758
#> 5 5 0.948 0.926 0.966 0.0895 0.896 0.645
#> 6 6 0.894 0.856 0.925 0.0311 0.962 0.827
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
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 1.000 1.000 0.000
#> GSM149100 1 0.0000 1.000 1.000 0.000
#> GSM149101 1 0.0000 1.000 1.000 0.000
#> GSM149102 1 0.0000 1.000 1.000 0.000
#> GSM149103 1 0.0000 1.000 1.000 0.000
#> GSM149104 1 0.0000 1.000 1.000 0.000
#> GSM149105 1 0.0000 1.000 1.000 0.000
#> GSM149106 1 0.0000 1.000 1.000 0.000
#> GSM149107 1 0.0000 1.000 1.000 0.000
#> GSM149108 1 0.0000 1.000 1.000 0.000
#> GSM149109 1 0.0000 1.000 1.000 0.000
#> GSM149110 1 0.0000 1.000 1.000 0.000
#> GSM149111 1 0.0000 1.000 1.000 0.000
#> GSM149112 1 0.0000 1.000 1.000 0.000
#> GSM149113 1 0.0000 1.000 1.000 0.000
#> GSM149114 1 0.0000 1.000 1.000 0.000
#> GSM149115 2 0.0672 0.985 0.008 0.992
#> GSM149116 1 0.0000 1.000 1.000 0.000
#> GSM149117 2 0.0000 0.993 0.000 1.000
#> GSM149118 1 0.0000 1.000 1.000 0.000
#> GSM149119 1 0.0000 1.000 1.000 0.000
#> GSM149120 1 0.0000 1.000 1.000 0.000
#> GSM149121 1 0.0000 1.000 1.000 0.000
#> GSM149122 1 0.0000 1.000 1.000 0.000
#> GSM149123 1 0.0000 1.000 1.000 0.000
#> GSM149124 1 0.0000 1.000 1.000 0.000
#> GSM149125 1 0.0000 1.000 1.000 0.000
#> GSM149126 1 0.0000 1.000 1.000 0.000
#> GSM149127 1 0.0000 1.000 1.000 0.000
#> GSM149128 1 0.0000 1.000 1.000 0.000
#> GSM149129 1 0.0000 1.000 1.000 0.000
#> GSM149130 2 0.0000 0.993 0.000 1.000
#> GSM149131 1 0.0000 1.000 1.000 0.000
#> GSM149132 1 0.0000 1.000 1.000 0.000
#> GSM149133 1 0.0000 1.000 1.000 0.000
#> GSM149134 2 0.9833 0.264 0.424 0.576
#> GSM149135 2 0.0000 0.993 0.000 1.000
#> GSM149136 2 0.0000 0.993 0.000 1.000
#> GSM149137 2 0.0000 0.993 0.000 1.000
#> GSM149138 2 0.0000 0.993 0.000 1.000
#> GSM149139 2 0.0000 0.993 0.000 1.000
#> GSM149140 2 0.0000 0.993 0.000 1.000
#> GSM149141 2 0.0000 0.993 0.000 1.000
#> GSM149142 2 0.0000 0.993 0.000 1.000
#> GSM149143 1 0.0000 1.000 1.000 0.000
#> GSM149144 2 0.0000 0.993 0.000 1.000
#> GSM149145 2 0.0000 0.993 0.000 1.000
#> GSM149146 2 0.0000 0.993 0.000 1.000
#> GSM149147 2 0.0000 0.993 0.000 1.000
#> GSM149148 2 0.0000 0.993 0.000 1.000
#> GSM149149 2 0.0000 0.993 0.000 1.000
#> GSM149150 2 0.0000 0.993 0.000 1.000
#> GSM149151 2 0.0000 0.993 0.000 1.000
#> GSM149152 1 0.0000 1.000 1.000 0.000
#> GSM149153 2 0.0000 0.993 0.000 1.000
#> GSM149154 1 0.0000 1.000 1.000 0.000
#> GSM149155 2 0.0000 0.993 0.000 1.000
#> GSM149156 2 0.0000 0.993 0.000 1.000
#> GSM149157 2 0.0000 0.993 0.000 1.000
#> GSM149158 2 0.0000 0.993 0.000 1.000
#> GSM149159 2 0.0000 0.993 0.000 1.000
#> GSM149160 2 0.0000 0.993 0.000 1.000
#> GSM149161 2 0.0000 0.993 0.000 1.000
#> GSM149162 2 0.0000 0.993 0.000 1.000
#> GSM149163 2 0.0000 0.993 0.000 1.000
#> GSM149164 2 0.0000 0.993 0.000 1.000
#> GSM149165 2 0.0000 0.993 0.000 1.000
#> GSM149166 2 0.0000 0.993 0.000 1.000
#> GSM149167 2 0.0000 0.993 0.000 1.000
#> GSM149168 2 0.0000 0.993 0.000 1.000
#> GSM149169 2 0.0000 0.993 0.000 1.000
#> GSM149170 2 0.0000 0.993 0.000 1.000
#> GSM149171 2 0.0000 0.993 0.000 1.000
#> GSM149172 1 0.0000 1.000 1.000 0.000
#> GSM149173 1 0.0672 0.992 0.992 0.008
#> GSM149174 2 0.0000 0.993 0.000 1.000
#> GSM149175 1 0.0000 1.000 1.000 0.000
#> GSM149176 2 0.0000 0.993 0.000 1.000
#> GSM149177 2 0.0000 0.993 0.000 1.000
#> GSM149178 1 0.0000 1.000 1.000 0.000
#> GSM149179 2 0.0000 0.993 0.000 1.000
#> GSM149180 2 0.0000 0.993 0.000 1.000
#> GSM149181 2 0.0000 0.993 0.000 1.000
#> GSM149182 2 0.0000 0.993 0.000 1.000
#> GSM149183 2 0.0000 0.993 0.000 1.000
#> GSM149184 2 0.0000 0.993 0.000 1.000
#> GSM149185 2 0.0000 0.993 0.000 1.000
#> GSM149186 2 0.0000 0.993 0.000 1.000
#> GSM149187 2 0.0000 0.993 0.000 1.000
#> GSM149188 2 0.0000 0.993 0.000 1.000
#> GSM149189 2 0.0000 0.993 0.000 1.000
#> GSM149190 2 0.0000 0.993 0.000 1.000
#> GSM149191 2 0.0000 0.993 0.000 1.000
#> GSM149192 2 0.0000 0.993 0.000 1.000
#> GSM149193 2 0.0000 0.993 0.000 1.000
#> GSM149194 2 0.0000 0.993 0.000 1.000
#> GSM149195 1 0.0000 1.000 1.000 0.000
#> GSM149196 2 0.0000 0.993 0.000 1.000
#> GSM149197 2 0.0000 0.993 0.000 1.000
#> GSM149198 1 0.0000 1.000 1.000 0.000
#> GSM149199 2 0.0000 0.993 0.000 1.000
#> GSM149200 2 0.0672 0.985 0.008 0.992
#> GSM149201 2 0.0000 0.993 0.000 1.000
#> GSM149202 2 0.0000 0.993 0.000 1.000
#> GSM149203 2 0.0000 0.993 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149103 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149106 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149107 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149115 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149116 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149117 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149118 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149119 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149120 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149121 1 0.6299 0.088 0.524 0.000 0.476
#> GSM149122 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149123 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149124 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149125 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149126 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149127 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149128 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149129 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149130 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149131 1 0.0592 0.940 0.988 0.000 0.012
#> GSM149132 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149133 3 0.5678 0.513 0.316 0.000 0.684
#> GSM149134 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149135 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149136 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149137 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149138 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149139 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149140 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149141 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149142 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149143 3 0.1411 0.930 0.000 0.036 0.964
#> GSM149144 2 0.2625 0.928 0.084 0.916 0.000
#> GSM149145 1 0.0592 0.942 0.988 0.012 0.000
#> GSM149146 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149147 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149148 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149149 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149150 1 0.2537 0.883 0.920 0.080 0.000
#> GSM149151 1 0.0000 0.950 1.000 0.000 0.000
#> GSM149152 1 0.5835 0.478 0.660 0.000 0.340
#> GSM149153 1 0.0424 0.945 0.992 0.008 0.000
#> GSM149154 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149155 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149156 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149157 2 0.0424 0.978 0.008 0.992 0.000
#> GSM149158 2 0.2711 0.925 0.088 0.912 0.000
#> GSM149159 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149160 2 0.0424 0.978 0.008 0.992 0.000
#> GSM149161 2 0.2711 0.925 0.088 0.912 0.000
#> GSM149162 2 0.0424 0.978 0.008 0.992 0.000
#> GSM149163 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149164 2 0.3038 0.907 0.104 0.896 0.000
#> GSM149165 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149166 2 0.2796 0.921 0.092 0.908 0.000
#> GSM149167 1 0.3619 0.819 0.864 0.136 0.000
#> GSM149168 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149169 1 0.0592 0.942 0.988 0.012 0.000
#> GSM149170 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149171 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149172 3 0.6280 0.178 0.000 0.460 0.540
#> GSM149173 2 0.3116 0.862 0.000 0.892 0.108
#> GSM149174 2 0.2625 0.928 0.084 0.916 0.000
#> GSM149175 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149176 2 0.2448 0.935 0.076 0.924 0.000
#> GSM149177 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149178 3 0.0237 0.962 0.000 0.004 0.996
#> GSM149179 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149180 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149181 2 0.0424 0.978 0.008 0.992 0.000
#> GSM149182 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149183 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149184 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149185 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149186 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149187 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149188 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149189 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149190 2 0.2625 0.928 0.084 0.916 0.000
#> GSM149191 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149193 2 0.0424 0.978 0.008 0.992 0.000
#> GSM149194 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149195 3 0.0000 0.965 0.000 0.000 1.000
#> GSM149196 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149197 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149198 3 0.5591 0.538 0.304 0.000 0.696
#> GSM149199 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149200 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149201 2 0.0592 0.978 0.012 0.988 0.000
#> GSM149202 2 0.0000 0.976 0.000 1.000 0.000
#> GSM149203 2 0.0000 0.976 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149103 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149104 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149106 3 0.0336 0.940 0.000 0.000 0.992 0.008
#> GSM149107 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149115 1 0.4008 0.646 0.756 0.000 0.000 0.244
#> GSM149116 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149117 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149118 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149119 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149120 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149121 4 0.2376 0.981 0.016 0.000 0.068 0.916
#> GSM149122 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149123 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149124 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149125 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149126 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149127 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149128 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149129 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149130 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149131 1 0.4406 0.583 0.700 0.000 0.000 0.300
#> GSM149132 4 0.2081 0.996 0.000 0.000 0.084 0.916
#> GSM149133 4 0.2197 0.993 0.004 0.000 0.080 0.916
#> GSM149134 1 0.0188 0.952 0.996 0.000 0.000 0.004
#> GSM149135 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149141 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149142 1 0.0817 0.938 0.976 0.024 0.000 0.000
#> GSM149143 3 0.2081 0.873 0.000 0.000 0.916 0.084
#> GSM149144 2 0.4134 0.682 0.260 0.740 0.000 0.000
#> GSM149145 1 0.0469 0.948 0.988 0.000 0.000 0.012
#> GSM149146 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149147 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149150 1 0.1792 0.901 0.932 0.068 0.000 0.000
#> GSM149151 1 0.0000 0.954 1.000 0.000 0.000 0.000
#> GSM149152 4 0.2413 0.976 0.020 0.000 0.064 0.916
#> GSM149153 1 0.0188 0.953 0.996 0.000 0.000 0.004
#> GSM149154 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149155 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149156 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149157 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149158 2 0.4193 0.671 0.268 0.732 0.000 0.000
#> GSM149159 2 0.2081 0.887 0.000 0.916 0.000 0.084
#> GSM149160 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149161 2 0.4250 0.659 0.276 0.724 0.000 0.000
#> GSM149162 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149163 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149164 2 0.4643 0.543 0.344 0.656 0.000 0.000
#> GSM149165 2 0.0817 0.914 0.000 0.976 0.000 0.024
#> GSM149166 2 0.4250 0.659 0.276 0.724 0.000 0.000
#> GSM149167 1 0.3024 0.812 0.852 0.148 0.000 0.000
#> GSM149168 2 0.2081 0.887 0.000 0.916 0.000 0.084
#> GSM149169 1 0.1716 0.905 0.936 0.064 0.000 0.000
#> GSM149170 2 0.2081 0.887 0.000 0.916 0.000 0.084
#> GSM149171 2 0.2081 0.887 0.000 0.916 0.000 0.084
#> GSM149172 3 0.6393 0.533 0.000 0.284 0.616 0.100
#> GSM149173 3 0.6074 0.575 0.000 0.268 0.648 0.084
#> GSM149174 2 0.4134 0.682 0.260 0.740 0.000 0.000
#> GSM149175 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149176 2 0.4008 0.702 0.244 0.756 0.000 0.000
#> GSM149177 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149178 3 0.3610 0.795 0.000 0.000 0.800 0.200
#> GSM149179 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149180 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149181 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149182 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149183 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149184 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149185 2 0.2081 0.887 0.000 0.916 0.000 0.084
#> GSM149186 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149188 2 0.0817 0.914 0.000 0.976 0.000 0.024
#> GSM149189 2 0.2081 0.887 0.000 0.916 0.000 0.084
#> GSM149190 2 0.4164 0.677 0.264 0.736 0.000 0.000
#> GSM149191 2 0.3439 0.850 0.000 0.868 0.048 0.084
#> GSM149192 2 0.0469 0.917 0.000 0.988 0.000 0.012
#> GSM149193 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149194 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149195 3 0.0000 0.948 0.000 0.000 1.000 0.000
#> GSM149196 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149197 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149198 4 0.2197 0.993 0.004 0.000 0.080 0.916
#> GSM149199 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149200 2 0.4805 0.753 0.000 0.784 0.132 0.084
#> GSM149201 2 0.0000 0.921 0.000 1.000 0.000 0.000
#> GSM149202 2 0.0469 0.917 0.000 0.988 0.000 0.012
#> GSM149203 2 0.2266 0.885 0.000 0.912 0.004 0.084
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.0290 0.992 0.000 0.000 0.992 0.000 0.008
#> GSM149104 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149107 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.0162 0.962 0.996 0.000 0.000 0.004 0.000
#> GSM149116 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.0162 0.962 0.996 0.004 0.000 0.000 0.000
#> GSM149118 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149122 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.3336 0.715 0.772 0.000 0.000 0.228 0.000
#> GSM149132 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149141 1 0.0510 0.958 0.984 0.000 0.000 0.000 0.016
#> GSM149142 1 0.1386 0.936 0.952 0.032 0.000 0.000 0.016
#> GSM149143 5 0.3966 0.472 0.000 0.000 0.336 0.000 0.664
#> GSM149144 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149145 1 0.0963 0.947 0.964 0.000 0.000 0.000 0.036
#> GSM149146 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149147 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149150 1 0.2966 0.823 0.848 0.136 0.000 0.000 0.016
#> GSM149151 1 0.0000 0.964 1.000 0.000 0.000 0.000 0.000
#> GSM149152 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149153 1 0.0703 0.955 0.976 0.000 0.000 0.000 0.024
#> GSM149154 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149155 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149156 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149157 2 0.0880 0.949 0.000 0.968 0.000 0.000 0.032
#> GSM149158 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149159 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
#> GSM149160 2 0.1121 0.938 0.000 0.956 0.000 0.000 0.044
#> GSM149161 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149162 2 0.0794 0.953 0.000 0.972 0.000 0.000 0.028
#> GSM149163 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149164 2 0.4421 0.686 0.068 0.748 0.000 0.000 0.184
#> GSM149165 5 0.2471 0.801 0.000 0.136 0.000 0.000 0.864
#> GSM149166 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149167 2 0.3366 0.685 0.232 0.768 0.000 0.000 0.000
#> GSM149168 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
#> GSM149169 1 0.2732 0.797 0.840 0.160 0.000 0.000 0.000
#> GSM149170 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
#> GSM149171 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
#> GSM149172 5 0.0566 0.858 0.000 0.000 0.012 0.004 0.984
#> GSM149173 5 0.0510 0.858 0.000 0.000 0.016 0.000 0.984
#> GSM149174 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149175 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149176 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149177 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149178 5 0.4090 0.598 0.000 0.000 0.268 0.016 0.716
#> GSM149179 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149180 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149181 2 0.2891 0.768 0.000 0.824 0.000 0.000 0.176
#> GSM149182 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149183 2 0.0404 0.964 0.000 0.988 0.000 0.000 0.012
#> GSM149184 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149185 5 0.0609 0.868 0.000 0.020 0.000 0.000 0.980
#> GSM149186 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149187 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149188 5 0.2732 0.779 0.000 0.160 0.000 0.000 0.840
#> GSM149189 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
#> GSM149190 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149191 5 0.0404 0.867 0.000 0.012 0.000 0.000 0.988
#> GSM149192 5 0.4287 0.214 0.000 0.460 0.000 0.000 0.540
#> GSM149193 2 0.1341 0.924 0.000 0.944 0.000 0.000 0.056
#> GSM149194 2 0.0162 0.968 0.000 0.996 0.000 0.000 0.004
#> GSM149195 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> GSM149196 2 0.0290 0.966 0.000 0.992 0.000 0.000 0.008
#> GSM149197 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149198 4 0.0000 1.000 0.000 0.000 0.000 1.000 0.000
#> GSM149199 2 0.0000 0.968 0.000 1.000 0.000 0.000 0.000
#> GSM149200 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
#> GSM149201 2 0.0290 0.966 0.000 0.992 0.000 0.000 0.008
#> GSM149202 5 0.4306 0.104 0.000 0.492 0.000 0.000 0.508
#> GSM149203 5 0.0510 0.869 0.000 0.016 0.000 0.000 0.984
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 3 0.2697 0.7785 0.000 0.000 0.812 0.000 0.000 0.188
#> GSM149104 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149107 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.1225 0.8625 0.952 0.000 0.000 0.012 0.000 0.036
#> GSM149116 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.1863 0.8121 0.896 0.000 0.000 0.000 0.000 0.104
#> GSM149118 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.0146 0.9862 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM149122 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.0260 0.8922 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM149131 1 0.3431 0.5325 0.756 0.000 0.000 0.228 0.000 0.016
#> GSM149132 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0000 0.9889 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149134 1 0.0547 0.8841 0.980 0.000 0.000 0.000 0.000 0.020
#> GSM149135 1 0.0000 0.8941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.8941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.8941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.8941 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0146 0.8929 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149140 1 0.0146 0.8936 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149141 6 0.3266 0.8161 0.272 0.000 0.000 0.000 0.000 0.728
#> GSM149142 6 0.3564 0.8158 0.264 0.012 0.000 0.000 0.000 0.724
#> GSM149143 5 0.5742 0.3177 0.000 0.000 0.268 0.000 0.512 0.220
#> GSM149144 2 0.0858 0.8820 0.000 0.968 0.000 0.000 0.004 0.028
#> GSM149145 6 0.3126 0.8306 0.248 0.000 0.000 0.000 0.000 0.752
#> GSM149146 2 0.0146 0.8855 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149147 1 0.1007 0.8737 0.956 0.000 0.000 0.000 0.000 0.044
#> GSM149148 1 0.0713 0.8845 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM149149 1 0.0865 0.8795 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM149150 6 0.3333 0.8086 0.192 0.024 0.000 0.000 0.000 0.784
#> GSM149151 1 0.0790 0.8828 0.968 0.000 0.000 0.000 0.000 0.032
#> GSM149152 4 0.1498 0.9372 0.032 0.000 0.000 0.940 0.000 0.028
#> GSM149153 6 0.3126 0.8306 0.248 0.000 0.000 0.000 0.000 0.752
#> GSM149154 3 0.0146 0.9862 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM149155 2 0.0146 0.8863 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149156 2 0.1082 0.8801 0.000 0.956 0.000 0.000 0.004 0.040
#> GSM149157 2 0.2909 0.8273 0.000 0.836 0.000 0.000 0.028 0.136
#> GSM149158 2 0.2964 0.7876 0.000 0.792 0.000 0.000 0.004 0.204
#> GSM149159 5 0.0146 0.8840 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM149160 2 0.3766 0.7562 0.000 0.748 0.000 0.000 0.040 0.212
#> GSM149161 2 0.3189 0.7550 0.000 0.760 0.000 0.000 0.004 0.236
#> GSM149162 2 0.2709 0.8346 0.000 0.848 0.000 0.000 0.020 0.132
#> GSM149163 2 0.0146 0.8863 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149164 6 0.3958 0.5532 0.016 0.172 0.000 0.000 0.044 0.768
#> GSM149165 5 0.3012 0.6762 0.000 0.196 0.000 0.000 0.796 0.008
#> GSM149166 2 0.0508 0.8844 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM149167 2 0.6184 -0.0176 0.264 0.388 0.000 0.000 0.004 0.344
#> GSM149168 5 0.0291 0.8837 0.000 0.004 0.000 0.000 0.992 0.004
#> GSM149169 1 0.5989 -0.1226 0.424 0.196 0.000 0.000 0.004 0.376
#> GSM149170 5 0.0146 0.8840 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM149171 5 0.0405 0.8834 0.000 0.004 0.000 0.000 0.988 0.008
#> GSM149172 5 0.0458 0.8761 0.000 0.000 0.000 0.000 0.984 0.016
#> GSM149173 5 0.0146 0.8840 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM149174 2 0.3052 0.7808 0.000 0.780 0.000 0.000 0.004 0.216
#> GSM149175 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149176 2 0.0146 0.8861 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149177 2 0.0777 0.8797 0.000 0.972 0.000 0.000 0.004 0.024
#> GSM149178 5 0.5383 0.4700 0.000 0.000 0.280 0.016 0.600 0.104
#> GSM149179 2 0.0146 0.8861 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149180 2 0.0000 0.8858 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149181 2 0.1958 0.8227 0.000 0.896 0.000 0.000 0.100 0.004
#> GSM149182 2 0.0146 0.8861 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149183 2 0.0622 0.8845 0.000 0.980 0.000 0.000 0.008 0.012
#> GSM149184 2 0.2100 0.8361 0.000 0.884 0.000 0.000 0.004 0.112
#> GSM149185 5 0.0405 0.8829 0.000 0.004 0.000 0.000 0.988 0.008
#> GSM149186 2 0.0260 0.8850 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149187 2 0.0146 0.8863 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149188 5 0.3073 0.6629 0.000 0.204 0.000 0.000 0.788 0.008
#> GSM149189 5 0.0717 0.8777 0.000 0.008 0.000 0.000 0.976 0.016
#> GSM149190 2 0.2871 0.7955 0.000 0.804 0.000 0.000 0.004 0.192
#> GSM149191 5 0.0405 0.8814 0.000 0.004 0.000 0.000 0.988 0.008
#> GSM149192 2 0.4175 0.1456 0.000 0.524 0.000 0.000 0.464 0.012
#> GSM149193 2 0.1010 0.8707 0.000 0.960 0.000 0.000 0.036 0.004
#> GSM149194 2 0.0632 0.8850 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM149195 3 0.0000 0.9895 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149196 2 0.0405 0.8839 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM149197 2 0.0146 0.8863 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149198 4 0.2230 0.8809 0.084 0.000 0.000 0.892 0.000 0.024
#> GSM149199 2 0.2146 0.8466 0.000 0.880 0.000 0.000 0.004 0.116
#> GSM149200 5 0.0146 0.8840 0.000 0.004 0.000 0.000 0.996 0.000
#> GSM149201 2 0.0146 0.8857 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM149202 2 0.3782 0.4286 0.000 0.636 0.000 0.000 0.360 0.004
#> GSM149203 5 0.0405 0.8834 0.000 0.004 0.000 0.000 0.988 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:skmeans 104 6.66e-11 2
#> ATC:skmeans 102 5.92e-19 3
#> ATC:skmeans 105 3.81e-29 4
#> ATC:skmeans 102 1.67e-30 5
#> ATC:skmeans 99 6.43e-30 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "pam"]
# you can also extract it by
# res = res_list["ATC:pam"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.978 0.960 0.983 0.4657 0.534 0.534
#> 3 3 0.623 0.751 0.866 0.3524 0.694 0.483
#> 4 4 0.957 0.905 0.952 0.1334 0.921 0.777
#> 5 5 0.933 0.888 0.956 0.1182 0.885 0.619
#> 6 6 0.951 0.901 0.962 0.0347 0.968 0.846
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 4 5
There is also optional best \(k\) = 2 4 5 that is worth to check.
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.973 1.000 0.000
#> GSM149100 1 0.0000 0.973 1.000 0.000
#> GSM149101 1 0.0000 0.973 1.000 0.000
#> GSM149102 1 0.2236 0.944 0.964 0.036
#> GSM149103 2 0.0376 0.983 0.004 0.996
#> GSM149104 1 0.0000 0.973 1.000 0.000
#> GSM149105 1 0.0000 0.973 1.000 0.000
#> GSM149106 1 0.0000 0.973 1.000 0.000
#> GSM149107 1 0.0000 0.973 1.000 0.000
#> GSM149108 1 0.0000 0.973 1.000 0.000
#> GSM149109 1 0.0000 0.973 1.000 0.000
#> GSM149110 1 0.0000 0.973 1.000 0.000
#> GSM149111 1 0.0000 0.973 1.000 0.000
#> GSM149112 1 0.0000 0.973 1.000 0.000
#> GSM149113 1 0.0000 0.973 1.000 0.000
#> GSM149114 1 0.0000 0.973 1.000 0.000
#> GSM149115 1 0.6531 0.802 0.832 0.168
#> GSM149116 1 0.0000 0.973 1.000 0.000
#> GSM149117 2 0.0000 0.987 0.000 1.000
#> GSM149118 1 0.0000 0.973 1.000 0.000
#> GSM149119 1 0.0000 0.973 1.000 0.000
#> GSM149120 1 0.0000 0.973 1.000 0.000
#> GSM149121 1 0.0000 0.973 1.000 0.000
#> GSM149122 1 0.0000 0.973 1.000 0.000
#> GSM149123 1 0.0000 0.973 1.000 0.000
#> GSM149124 1 0.0000 0.973 1.000 0.000
#> GSM149125 1 0.0000 0.973 1.000 0.000
#> GSM149126 1 0.0000 0.973 1.000 0.000
#> GSM149127 1 0.0000 0.973 1.000 0.000
#> GSM149128 1 0.0000 0.973 1.000 0.000
#> GSM149129 1 0.0000 0.973 1.000 0.000
#> GSM149130 2 0.3114 0.933 0.056 0.944
#> GSM149131 1 0.4161 0.899 0.916 0.084
#> GSM149132 1 0.0000 0.973 1.000 0.000
#> GSM149133 1 0.0000 0.973 1.000 0.000
#> GSM149134 1 0.7376 0.744 0.792 0.208
#> GSM149135 2 0.0000 0.987 0.000 1.000
#> GSM149136 2 0.0000 0.987 0.000 1.000
#> GSM149137 2 0.0000 0.987 0.000 1.000
#> GSM149138 2 0.0000 0.987 0.000 1.000
#> GSM149139 2 0.7528 0.720 0.216 0.784
#> GSM149140 2 0.0000 0.987 0.000 1.000
#> GSM149141 2 0.0000 0.987 0.000 1.000
#> GSM149142 2 0.0000 0.987 0.000 1.000
#> GSM149143 2 0.9209 0.476 0.336 0.664
#> GSM149144 2 0.0000 0.987 0.000 1.000
#> GSM149145 2 0.0000 0.987 0.000 1.000
#> GSM149146 2 0.0000 0.987 0.000 1.000
#> GSM149147 2 0.0672 0.980 0.008 0.992
#> GSM149148 2 0.0000 0.987 0.000 1.000
#> GSM149149 2 0.1843 0.961 0.028 0.972
#> GSM149150 2 0.0000 0.987 0.000 1.000
#> GSM149151 2 0.0000 0.987 0.000 1.000
#> GSM149152 1 0.0000 0.973 1.000 0.000
#> GSM149153 2 0.0000 0.987 0.000 1.000
#> GSM149154 1 0.5408 0.856 0.876 0.124
#> GSM149155 2 0.0000 0.987 0.000 1.000
#> GSM149156 2 0.0000 0.987 0.000 1.000
#> GSM149157 2 0.0000 0.987 0.000 1.000
#> GSM149158 2 0.0000 0.987 0.000 1.000
#> GSM149159 2 0.0000 0.987 0.000 1.000
#> GSM149160 2 0.0000 0.987 0.000 1.000
#> GSM149161 2 0.0000 0.987 0.000 1.000
#> GSM149162 2 0.0000 0.987 0.000 1.000
#> GSM149163 2 0.0000 0.987 0.000 1.000
#> GSM149164 2 0.0000 0.987 0.000 1.000
#> GSM149165 2 0.0000 0.987 0.000 1.000
#> GSM149166 2 0.0000 0.987 0.000 1.000
#> GSM149167 2 0.0000 0.987 0.000 1.000
#> GSM149168 2 0.0000 0.987 0.000 1.000
#> GSM149169 2 0.0000 0.987 0.000 1.000
#> GSM149170 2 0.0000 0.987 0.000 1.000
#> GSM149171 2 0.0000 0.987 0.000 1.000
#> GSM149172 2 0.5294 0.858 0.120 0.880
#> GSM149173 2 0.0000 0.987 0.000 1.000
#> GSM149174 2 0.0000 0.987 0.000 1.000
#> GSM149175 1 0.0000 0.973 1.000 0.000
#> GSM149176 2 0.0000 0.987 0.000 1.000
#> GSM149177 2 0.0000 0.987 0.000 1.000
#> GSM149178 2 0.4161 0.902 0.084 0.916
#> GSM149179 2 0.0000 0.987 0.000 1.000
#> GSM149180 2 0.0000 0.987 0.000 1.000
#> GSM149181 2 0.0000 0.987 0.000 1.000
#> GSM149182 2 0.0000 0.987 0.000 1.000
#> GSM149183 2 0.0000 0.987 0.000 1.000
#> GSM149184 2 0.0000 0.987 0.000 1.000
#> GSM149185 2 0.0000 0.987 0.000 1.000
#> GSM149186 2 0.0000 0.987 0.000 1.000
#> GSM149187 2 0.0000 0.987 0.000 1.000
#> GSM149188 2 0.0000 0.987 0.000 1.000
#> GSM149189 2 0.0000 0.987 0.000 1.000
#> GSM149190 2 0.0000 0.987 0.000 1.000
#> GSM149191 2 0.0000 0.987 0.000 1.000
#> GSM149192 2 0.0000 0.987 0.000 1.000
#> GSM149193 2 0.0000 0.987 0.000 1.000
#> GSM149194 2 0.0000 0.987 0.000 1.000
#> GSM149195 1 0.9427 0.449 0.640 0.360
#> GSM149196 2 0.0000 0.987 0.000 1.000
#> GSM149197 2 0.0000 0.987 0.000 1.000
#> GSM149198 1 0.0000 0.973 1.000 0.000
#> GSM149199 2 0.0000 0.987 0.000 1.000
#> GSM149200 2 0.0000 0.987 0.000 1.000
#> GSM149201 2 0.0000 0.987 0.000 1.000
#> GSM149202 2 0.0000 0.987 0.000 1.000
#> GSM149203 2 0.0000 0.987 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149102 3 0.0892 0.8671 0.000 0.020 0.980
#> GSM149103 2 0.4887 0.8232 0.096 0.844 0.060
#> GSM149104 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149106 3 0.3816 0.8405 0.148 0.000 0.852
#> GSM149107 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.8821 0.000 0.000 1.000
#> GSM149115 1 0.3551 0.7260 0.868 0.132 0.000
#> GSM149116 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149117 1 0.4974 0.7571 0.764 0.236 0.000
#> GSM149118 1 0.6308 -0.3002 0.508 0.000 0.492
#> GSM149119 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149120 1 0.6308 -0.3002 0.508 0.000 0.492
#> GSM149121 1 0.6286 -0.2426 0.536 0.000 0.464
#> GSM149122 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149123 1 0.6308 -0.3002 0.508 0.000 0.492
#> GSM149124 1 0.6308 -0.3002 0.508 0.000 0.492
#> GSM149125 1 0.6308 -0.3002 0.508 0.000 0.492
#> GSM149126 1 0.6309 -0.3215 0.500 0.000 0.500
#> GSM149127 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149128 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149129 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149130 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149131 1 0.2448 0.6769 0.924 0.076 0.000
#> GSM149132 3 0.4842 0.8092 0.224 0.000 0.776
#> GSM149133 1 0.6307 -0.2919 0.512 0.000 0.488
#> GSM149134 1 0.3879 0.7375 0.848 0.152 0.000
#> GSM149135 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149136 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149137 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149138 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149139 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149140 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149141 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149142 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149143 2 0.2537 0.8881 0.080 0.920 0.000
#> GSM149144 1 0.4974 0.7571 0.764 0.236 0.000
#> GSM149145 2 0.5497 0.4551 0.292 0.708 0.000
#> GSM149146 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149147 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149148 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149149 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149150 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149151 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149152 1 0.0000 0.5943 1.000 0.000 0.000
#> GSM149153 1 0.6302 0.3194 0.520 0.480 0.000
#> GSM149154 3 0.5992 0.5646 0.016 0.268 0.716
#> GSM149155 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149158 1 0.4974 0.7571 0.764 0.236 0.000
#> GSM149159 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149160 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149161 1 0.5138 0.7437 0.748 0.252 0.000
#> GSM149162 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149164 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149165 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149166 1 0.4974 0.7571 0.764 0.236 0.000
#> GSM149167 1 0.4974 0.7571 0.764 0.236 0.000
#> GSM149168 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149169 1 0.4887 0.7605 0.772 0.228 0.000
#> GSM149170 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149171 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149172 2 0.0892 0.9572 0.020 0.980 0.000
#> GSM149173 2 0.2939 0.8847 0.012 0.916 0.072
#> GSM149174 1 0.4842 0.7619 0.776 0.224 0.000
#> GSM149175 3 0.3412 0.8483 0.124 0.000 0.876
#> GSM149176 1 0.6305 0.3176 0.516 0.484 0.000
#> GSM149177 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149178 2 0.1529 0.9372 0.040 0.960 0.000
#> GSM149179 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149180 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149182 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149183 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149184 2 0.3816 0.7812 0.148 0.852 0.000
#> GSM149185 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149189 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149190 1 0.4974 0.7571 0.764 0.236 0.000
#> GSM149191 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149192 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149194 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149195 3 0.6280 0.0637 0.000 0.460 0.540
#> GSM149196 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149197 2 0.0424 0.9616 0.008 0.992 0.000
#> GSM149198 1 0.1289 0.5693 0.968 0.000 0.032
#> GSM149199 2 0.4504 0.6954 0.196 0.804 0.000
#> GSM149200 2 0.0592 0.9618 0.012 0.988 0.000
#> GSM149201 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.9670 0.000 1.000 0.000
#> GSM149203 2 0.0592 0.9618 0.012 0.988 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149103 2 0.3583 0.827 0.180 0.816 0.004 0.000
#> GSM149104 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149106 3 0.3569 0.743 0.000 0.000 0.804 0.196
#> GSM149107 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149115 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149116 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149117 1 0.2281 0.882 0.904 0.096 0.000 0.000
#> GSM149118 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149121 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149122 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149130 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149133 4 0.0000 0.989 0.000 0.000 0.000 1.000
#> GSM149134 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149135 1 0.0469 0.923 0.988 0.012 0.000 0.000
#> GSM149136 1 0.0592 0.921 0.984 0.016 0.000 0.000
#> GSM149137 1 0.0188 0.925 0.996 0.004 0.000 0.000
#> GSM149138 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149140 1 0.0188 0.925 0.996 0.004 0.000 0.000
#> GSM149141 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149142 1 0.0188 0.925 0.996 0.004 0.000 0.000
#> GSM149143 2 0.2281 0.910 0.096 0.904 0.000 0.000
#> GSM149144 1 0.2281 0.882 0.904 0.096 0.000 0.000
#> GSM149145 2 0.4790 0.469 0.380 0.620 0.000 0.000
#> GSM149146 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149147 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149150 2 0.0707 0.937 0.020 0.980 0.000 0.000
#> GSM149151 1 0.0000 0.925 1.000 0.000 0.000 0.000
#> GSM149152 1 0.0592 0.918 0.984 0.000 0.000 0.016
#> GSM149153 1 0.4817 0.298 0.612 0.388 0.000 0.000
#> GSM149154 3 0.8354 0.409 0.076 0.188 0.544 0.192
#> GSM149155 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149156 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149157 2 0.0336 0.938 0.008 0.992 0.000 0.000
#> GSM149158 1 0.2281 0.882 0.904 0.096 0.000 0.000
#> GSM149159 2 0.2149 0.914 0.088 0.912 0.000 0.000
#> GSM149160 2 0.2081 0.916 0.084 0.916 0.000 0.000
#> GSM149161 1 0.3074 0.834 0.848 0.152 0.000 0.000
#> GSM149162 2 0.0592 0.938 0.016 0.984 0.000 0.000
#> GSM149163 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149164 2 0.2281 0.910 0.096 0.904 0.000 0.000
#> GSM149165 2 0.0592 0.938 0.016 0.984 0.000 0.000
#> GSM149166 1 0.2281 0.882 0.904 0.096 0.000 0.000
#> GSM149167 1 0.2281 0.882 0.904 0.096 0.000 0.000
#> GSM149168 2 0.1716 0.925 0.064 0.936 0.000 0.000
#> GSM149169 1 0.1557 0.903 0.944 0.056 0.000 0.000
#> GSM149170 2 0.1022 0.935 0.032 0.968 0.000 0.000
#> GSM149171 2 0.0707 0.937 0.020 0.980 0.000 0.000
#> GSM149172 2 0.2281 0.910 0.096 0.904 0.000 0.000
#> GSM149173 2 0.2751 0.905 0.040 0.904 0.056 0.000
#> GSM149174 1 0.0188 0.925 0.996 0.004 0.000 0.000
#> GSM149175 4 0.3074 0.815 0.000 0.000 0.152 0.848
#> GSM149176 1 0.4925 0.361 0.572 0.428 0.000 0.000
#> GSM149177 2 0.2216 0.912 0.092 0.908 0.000 0.000
#> GSM149178 2 0.2281 0.910 0.096 0.904 0.000 0.000
#> GSM149179 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149180 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149181 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149182 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149183 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149184 2 0.4134 0.616 0.260 0.740 0.000 0.000
#> GSM149185 2 0.0707 0.937 0.020 0.980 0.000 0.000
#> GSM149186 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149188 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149189 2 0.2149 0.914 0.088 0.912 0.000 0.000
#> GSM149190 1 0.2281 0.882 0.904 0.096 0.000 0.000
#> GSM149191 2 0.2281 0.910 0.096 0.904 0.000 0.000
#> GSM149192 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149193 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149194 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149195 3 0.0000 0.960 0.000 0.000 1.000 0.000
#> GSM149196 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149197 2 0.0188 0.937 0.004 0.996 0.000 0.000
#> GSM149198 1 0.2530 0.840 0.888 0.000 0.000 0.112
#> GSM149199 2 0.4331 0.557 0.288 0.712 0.000 0.000
#> GSM149200 2 0.2281 0.910 0.096 0.904 0.000 0.000
#> GSM149201 2 0.0000 0.938 0.000 1.000 0.000 0.000
#> GSM149202 2 0.0592 0.938 0.016 0.984 0.000 0.000
#> GSM149203 2 0.2281 0.910 0.096 0.904 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149103 5 0.2112 0.8416 0.084 0.004 0.004 0.000 0.908
#> GSM149104 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.3074 0.7460 0.000 0.000 0.804 0.196 0.000
#> GSM149107 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149115 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149116 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149118 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149122 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.0000 0.9894 0.000 0.000 0.000 1.000 0.000
#> GSM149134 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149141 1 0.0162 0.9634 0.996 0.004 0.000 0.000 0.000
#> GSM149142 1 0.0162 0.9634 0.996 0.004 0.000 0.000 0.000
#> GSM149143 5 0.0162 0.9136 0.000 0.004 0.000 0.000 0.996
#> GSM149144 2 0.0162 0.9342 0.004 0.996 0.000 0.000 0.000
#> GSM149145 5 0.3838 0.5733 0.280 0.004 0.000 0.000 0.716
#> GSM149146 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149147 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149150 5 0.4307 0.0712 0.000 0.496 0.000 0.000 0.504
#> GSM149151 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149153 1 0.4449 0.0242 0.512 0.004 0.000 0.000 0.484
#> GSM149154 3 0.5883 0.5253 0.000 0.004 0.620 0.192 0.184
#> GSM149155 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149156 5 0.4283 0.1184 0.000 0.456 0.000 0.000 0.544
#> GSM149157 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149158 2 0.3143 0.7157 0.204 0.796 0.000 0.000 0.000
#> GSM149159 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149160 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149161 2 0.0898 0.9215 0.020 0.972 0.000 0.000 0.008
#> GSM149162 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149163 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149164 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149165 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149166 2 0.0794 0.9190 0.028 0.972 0.000 0.000 0.000
#> GSM149167 1 0.0290 0.9603 0.992 0.008 0.000 0.000 0.000
#> GSM149168 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149169 1 0.0000 0.9661 1.000 0.000 0.000 0.000 0.000
#> GSM149170 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149171 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149172 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149173 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149174 1 0.0290 0.9603 0.992 0.008 0.000 0.000 0.000
#> GSM149175 4 0.2648 0.8131 0.000 0.000 0.152 0.848 0.000
#> GSM149176 2 0.0162 0.9342 0.004 0.996 0.000 0.000 0.000
#> GSM149177 5 0.4015 0.4755 0.000 0.348 0.000 0.000 0.652
#> GSM149178 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149179 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149180 2 0.0404 0.9323 0.000 0.988 0.000 0.000 0.012
#> GSM149181 5 0.2929 0.7319 0.000 0.180 0.000 0.000 0.820
#> GSM149182 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149183 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149184 2 0.0290 0.9346 0.000 0.992 0.000 0.000 0.008
#> GSM149185 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149186 2 0.4268 0.1869 0.000 0.556 0.000 0.000 0.444
#> GSM149187 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149188 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149189 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149190 2 0.0162 0.9342 0.004 0.996 0.000 0.000 0.000
#> GSM149191 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149192 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149193 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149194 5 0.3684 0.6001 0.000 0.280 0.000 0.000 0.720
#> GSM149195 3 0.0000 0.9648 0.000 0.000 1.000 0.000 0.000
#> GSM149196 2 0.0404 0.9323 0.000 0.988 0.000 0.000 0.012
#> GSM149197 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149198 1 0.2773 0.7867 0.836 0.000 0.000 0.164 0.000
#> GSM149199 2 0.0162 0.9363 0.000 0.996 0.000 0.000 0.004
#> GSM149200 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149201 2 0.3983 0.4642 0.000 0.660 0.000 0.000 0.340
#> GSM149202 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
#> GSM149203 5 0.0000 0.9165 0.000 0.000 0.000 0.000 1.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 6 0.0000 0.950 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM149104 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.2762 0.737 0.000 0.000 0.804 0.196 0.000 0.000
#> GSM149107 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149116 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149118 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149122 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0000 0.989 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149134 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 6 0.0000 0.950 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM149142 1 0.3950 0.239 0.564 0.004 0.000 0.000 0.000 0.432
#> GSM149143 6 0.1910 0.872 0.000 0.000 0.000 0.000 0.108 0.892
#> GSM149144 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149145 6 0.0000 0.950 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM149146 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149147 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149150 6 0.1444 0.912 0.000 0.000 0.000 0.000 0.072 0.928
#> GSM149151 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0260 0.961 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM149153 6 0.0000 0.950 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM149154 6 0.1610 0.889 0.000 0.000 0.084 0.000 0.000 0.916
#> GSM149155 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149156 5 0.3847 0.138 0.000 0.456 0.000 0.000 0.544 0.000
#> GSM149157 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149158 2 0.2823 0.689 0.204 0.796 0.000 0.000 0.000 0.000
#> GSM149159 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149160 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149161 2 0.0717 0.913 0.016 0.976 0.000 0.000 0.008 0.000
#> GSM149162 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149164 5 0.0146 0.912 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM149165 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149166 2 0.0632 0.911 0.024 0.976 0.000 0.000 0.000 0.000
#> GSM149167 1 0.0260 0.960 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM149168 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149169 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149170 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149171 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149172 5 0.1556 0.853 0.000 0.000 0.000 0.000 0.920 0.080
#> GSM149173 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149174 1 0.0260 0.960 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM149175 4 0.2300 0.812 0.000 0.000 0.144 0.856 0.000 0.000
#> GSM149176 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149177 5 0.3620 0.455 0.000 0.352 0.000 0.000 0.648 0.000
#> GSM149178 5 0.3659 0.410 0.000 0.000 0.000 0.000 0.636 0.364
#> GSM149179 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149180 2 0.0260 0.924 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149181 5 0.2631 0.737 0.000 0.180 0.000 0.000 0.820 0.000
#> GSM149182 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149183 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149184 2 0.0146 0.927 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM149185 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149186 2 0.3833 0.167 0.000 0.556 0.000 0.000 0.444 0.000
#> GSM149187 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149188 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149189 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149190 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149191 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149192 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149193 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149194 5 0.3309 0.603 0.000 0.280 0.000 0.000 0.720 0.000
#> GSM149195 3 0.0000 0.984 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149196 2 0.0260 0.924 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149197 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149198 1 0.3027 0.772 0.824 0.000 0.000 0.148 0.000 0.028
#> GSM149199 2 0.0000 0.929 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149200 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149201 2 0.3578 0.455 0.000 0.660 0.000 0.000 0.340 0.000
#> GSM149202 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM149203 5 0.0000 0.915 0.000 0.000 0.000 0.000 1.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:pam 103 3.81e-12 2
#> ATC:pam 93 2.31e-14 3
#> ATC:pam 101 5.41e-28 4
#> ATC:pam 99 6.00e-25 5
#> ATC:pam 99 2.51e-29 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "mclust"]
# you can also extract it by
# res = res_list["ATC:mclust"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.970 0.977 0.4534 0.545 0.545
#> 3 3 0.499 0.597 0.791 0.3516 0.692 0.496
#> 4 4 0.765 0.908 0.946 0.1408 0.907 0.755
#> 5 5 0.889 0.921 0.938 0.1258 0.871 0.599
#> 6 6 0.806 0.746 0.864 0.0338 0.866 0.494
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.2423 0.972 0.960 0.040
#> GSM149100 1 0.2423 0.972 0.960 0.040
#> GSM149101 1 0.2423 0.972 0.960 0.040
#> GSM149102 1 0.2423 0.972 0.960 0.040
#> GSM149103 2 0.1843 0.970 0.028 0.972
#> GSM149104 1 0.2423 0.972 0.960 0.040
#> GSM149105 1 0.2423 0.972 0.960 0.040
#> GSM149106 1 0.2423 0.972 0.960 0.040
#> GSM149107 1 0.2423 0.972 0.960 0.040
#> GSM149108 1 0.2423 0.972 0.960 0.040
#> GSM149109 1 0.2423 0.972 0.960 0.040
#> GSM149110 1 0.2423 0.972 0.960 0.040
#> GSM149111 1 0.2423 0.972 0.960 0.040
#> GSM149112 1 0.2423 0.972 0.960 0.040
#> GSM149113 1 0.2423 0.972 0.960 0.040
#> GSM149114 1 0.2423 0.972 0.960 0.040
#> GSM149115 1 0.6973 0.772 0.812 0.188
#> GSM149116 1 0.0000 0.969 1.000 0.000
#> GSM149117 2 0.3431 0.956 0.064 0.936
#> GSM149118 1 0.0000 0.969 1.000 0.000
#> GSM149119 1 0.0000 0.969 1.000 0.000
#> GSM149120 1 0.0000 0.969 1.000 0.000
#> GSM149121 1 0.0376 0.969 0.996 0.004
#> GSM149122 1 0.0000 0.969 1.000 0.000
#> GSM149123 1 0.0000 0.969 1.000 0.000
#> GSM149124 1 0.0000 0.969 1.000 0.000
#> GSM149125 1 0.0000 0.969 1.000 0.000
#> GSM149126 1 0.0000 0.969 1.000 0.000
#> GSM149127 1 0.0000 0.969 1.000 0.000
#> GSM149128 1 0.0000 0.969 1.000 0.000
#> GSM149129 1 0.0000 0.969 1.000 0.000
#> GSM149130 2 0.3431 0.956 0.064 0.936
#> GSM149131 2 0.3431 0.956 0.064 0.936
#> GSM149132 1 0.0000 0.969 1.000 0.000
#> GSM149133 1 0.0376 0.969 0.996 0.004
#> GSM149134 2 0.3431 0.956 0.064 0.936
#> GSM149135 2 0.3431 0.956 0.064 0.936
#> GSM149136 2 0.3431 0.956 0.064 0.936
#> GSM149137 2 0.3431 0.956 0.064 0.936
#> GSM149138 2 0.3431 0.956 0.064 0.936
#> GSM149139 2 0.3431 0.956 0.064 0.936
#> GSM149140 2 0.3431 0.956 0.064 0.936
#> GSM149141 2 0.3431 0.956 0.064 0.936
#> GSM149142 2 0.3431 0.956 0.064 0.936
#> GSM149143 2 0.1843 0.970 0.028 0.972
#> GSM149144 2 0.0000 0.982 0.000 1.000
#> GSM149145 2 0.1843 0.970 0.028 0.972
#> GSM149146 2 0.0000 0.982 0.000 1.000
#> GSM149147 2 0.3431 0.956 0.064 0.936
#> GSM149148 2 0.3431 0.956 0.064 0.936
#> GSM149149 2 0.3431 0.956 0.064 0.936
#> GSM149150 2 0.0000 0.982 0.000 1.000
#> GSM149151 2 0.3431 0.956 0.064 0.936
#> GSM149152 1 0.1843 0.960 0.972 0.028
#> GSM149153 2 0.1843 0.970 0.028 0.972
#> GSM149154 1 0.5294 0.898 0.880 0.120
#> GSM149155 2 0.0000 0.982 0.000 1.000
#> GSM149156 2 0.0000 0.982 0.000 1.000
#> GSM149157 2 0.0000 0.982 0.000 1.000
#> GSM149158 2 0.0000 0.982 0.000 1.000
#> GSM149159 2 0.0000 0.982 0.000 1.000
#> GSM149160 2 0.0000 0.982 0.000 1.000
#> GSM149161 2 0.0000 0.982 0.000 1.000
#> GSM149162 2 0.0000 0.982 0.000 1.000
#> GSM149163 2 0.0000 0.982 0.000 1.000
#> GSM149164 2 0.0376 0.981 0.004 0.996
#> GSM149165 2 0.0000 0.982 0.000 1.000
#> GSM149166 2 0.0000 0.982 0.000 1.000
#> GSM149167 2 0.2778 0.964 0.048 0.952
#> GSM149168 2 0.0000 0.982 0.000 1.000
#> GSM149169 2 0.3274 0.957 0.060 0.940
#> GSM149170 2 0.0000 0.982 0.000 1.000
#> GSM149171 2 0.0000 0.982 0.000 1.000
#> GSM149172 2 0.1633 0.972 0.024 0.976
#> GSM149173 2 0.0000 0.982 0.000 1.000
#> GSM149174 2 0.0000 0.982 0.000 1.000
#> GSM149175 1 0.2423 0.972 0.960 0.040
#> GSM149176 2 0.0000 0.982 0.000 1.000
#> GSM149177 2 0.0000 0.982 0.000 1.000
#> GSM149178 2 0.1633 0.972 0.024 0.976
#> GSM149179 2 0.0000 0.982 0.000 1.000
#> GSM149180 2 0.0000 0.982 0.000 1.000
#> GSM149181 2 0.0000 0.982 0.000 1.000
#> GSM149182 2 0.0000 0.982 0.000 1.000
#> GSM149183 2 0.0000 0.982 0.000 1.000
#> GSM149184 2 0.0000 0.982 0.000 1.000
#> GSM149185 2 0.0000 0.982 0.000 1.000
#> GSM149186 2 0.0000 0.982 0.000 1.000
#> GSM149187 2 0.0000 0.982 0.000 1.000
#> GSM149188 2 0.0000 0.982 0.000 1.000
#> GSM149189 2 0.0000 0.982 0.000 1.000
#> GSM149190 2 0.0000 0.982 0.000 1.000
#> GSM149191 2 0.0000 0.982 0.000 1.000
#> GSM149192 2 0.0000 0.982 0.000 1.000
#> GSM149193 2 0.0000 0.982 0.000 1.000
#> GSM149194 2 0.0000 0.982 0.000 1.000
#> GSM149195 1 0.2423 0.972 0.960 0.040
#> GSM149196 2 0.0000 0.982 0.000 1.000
#> GSM149197 2 0.0000 0.982 0.000 1.000
#> GSM149198 1 0.3114 0.939 0.944 0.056
#> GSM149199 2 0.0000 0.982 0.000 1.000
#> GSM149200 2 0.0000 0.982 0.000 1.000
#> GSM149201 2 0.0000 0.982 0.000 1.000
#> GSM149202 2 0.0000 0.982 0.000 1.000
#> GSM149203 2 0.0000 0.982 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149100 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149103 3 0.7298 0.4314 0.220 0.088 0.692
#> GSM149104 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149105 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149106 3 0.1878 0.8598 0.044 0.004 0.952
#> GSM149107 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149108 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149109 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149110 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149112 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149113 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9210 0.000 0.000 1.000
#> GSM149115 1 0.6490 0.1921 0.628 0.012 0.360
#> GSM149116 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149117 1 0.6195 0.2931 0.704 0.020 0.276
#> GSM149118 1 0.6260 0.0363 0.552 0.000 0.448
#> GSM149119 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149120 1 0.6260 0.0363 0.552 0.000 0.448
#> GSM149121 1 0.6676 0.0225 0.516 0.008 0.476
#> GSM149122 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149123 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149124 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149125 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149126 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149127 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149128 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149129 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149130 1 0.9072 0.4275 0.548 0.260 0.192
#> GSM149131 1 0.9081 0.4259 0.552 0.236 0.212
#> GSM149132 1 0.6267 0.0336 0.548 0.000 0.452
#> GSM149133 1 0.6676 0.0225 0.516 0.008 0.476
#> GSM149134 1 0.6490 0.3152 0.708 0.036 0.256
#> GSM149135 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149136 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149137 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149138 1 0.9150 0.4096 0.536 0.272 0.192
#> GSM149139 1 0.6794 0.3676 0.728 0.076 0.196
#> GSM149140 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149141 1 0.9125 0.4168 0.540 0.268 0.192
#> GSM149142 2 0.9395 -0.0741 0.396 0.432 0.172
#> GSM149143 2 0.6917 0.3167 0.024 0.608 0.368
#> GSM149144 2 0.4452 0.7709 0.192 0.808 0.000
#> GSM149145 1 0.9792 0.2127 0.392 0.372 0.236
#> GSM149146 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149147 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149148 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149149 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149150 2 0.8920 0.2626 0.324 0.532 0.144
#> GSM149151 1 0.9099 0.4236 0.544 0.264 0.192
#> GSM149152 1 0.6786 0.0712 0.540 0.012 0.448
#> GSM149153 1 0.9672 0.1797 0.404 0.384 0.212
#> GSM149154 3 0.5467 0.6791 0.112 0.072 0.816
#> GSM149155 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149158 2 0.4235 0.7860 0.176 0.824 0.000
#> GSM149159 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149160 2 0.2165 0.8604 0.064 0.936 0.000
#> GSM149161 2 0.4399 0.7748 0.188 0.812 0.000
#> GSM149162 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149164 2 0.7382 0.5885 0.116 0.700 0.184
#> GSM149165 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149166 2 0.3941 0.8026 0.156 0.844 0.000
#> GSM149167 1 0.7948 0.3043 0.632 0.100 0.268
#> GSM149168 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149169 1 0.9461 0.3806 0.492 0.292 0.216
#> GSM149170 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149171 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149172 2 0.6297 0.3890 0.008 0.640 0.352
#> GSM149173 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149174 2 0.3879 0.8057 0.152 0.848 0.000
#> GSM149175 3 0.1643 0.8642 0.044 0.000 0.956
#> GSM149176 2 0.4002 0.7995 0.160 0.840 0.000
#> GSM149177 2 0.4915 0.7077 0.012 0.804 0.184
#> GSM149178 2 0.6917 0.3159 0.024 0.608 0.368
#> GSM149179 2 0.2625 0.8499 0.084 0.916 0.000
#> GSM149180 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149182 2 0.0747 0.8814 0.016 0.984 0.000
#> GSM149183 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149184 2 0.7639 0.5514 0.256 0.656 0.088
#> GSM149185 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149186 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149188 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149189 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149190 2 0.4452 0.7709 0.192 0.808 0.000
#> GSM149191 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149192 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149193 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149194 2 0.3038 0.8384 0.104 0.896 0.000
#> GSM149195 3 0.5016 0.4742 0.000 0.240 0.760
#> GSM149196 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149197 2 0.0424 0.8844 0.008 0.992 0.000
#> GSM149198 1 0.6786 0.0712 0.540 0.012 0.448
#> GSM149199 2 0.3340 0.8284 0.120 0.880 0.000
#> GSM149200 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149201 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149202 2 0.0000 0.8872 0.000 1.000 0.000
#> GSM149203 2 0.0000 0.8872 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149100 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149101 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149102 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149103 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149104 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149105 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149106 3 0.2868 0.804 0.136 0.000 0.864 0.000
#> GSM149107 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149108 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149109 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149110 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149111 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149112 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149113 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149114 3 0.0000 0.971 0.000 0.000 1.000 0.000
#> GSM149115 1 0.3688 0.730 0.792 0.000 0.000 0.208
#> GSM149116 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149117 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149118 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149119 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149120 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149121 4 0.3172 0.780 0.160 0.000 0.000 0.840
#> GSM149122 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149123 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149124 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149125 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149126 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149127 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149128 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149129 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149130 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 0.969 0.000 0.000 0.000 1.000
#> GSM149133 4 0.3172 0.780 0.160 0.000 0.000 0.840
#> GSM149134 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149141 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149142 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149143 2 0.4866 0.497 0.404 0.596 0.000 0.000
#> GSM149144 2 0.2011 0.861 0.080 0.920 0.000 0.000
#> GSM149145 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149146 2 0.0469 0.898 0.012 0.988 0.000 0.000
#> GSM149147 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149150 1 0.1792 0.895 0.932 0.068 0.000 0.000
#> GSM149151 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149152 1 0.0707 0.956 0.980 0.000 0.000 0.020
#> GSM149153 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149154 3 0.3486 0.746 0.188 0.000 0.812 0.000
#> GSM149155 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149156 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149157 2 0.0592 0.899 0.016 0.984 0.000 0.000
#> GSM149158 2 0.1474 0.879 0.052 0.948 0.000 0.000
#> GSM149159 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149160 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149161 2 0.4843 0.491 0.396 0.604 0.000 0.000
#> GSM149162 2 0.2345 0.899 0.100 0.900 0.000 0.000
#> GSM149163 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149164 2 0.4477 0.681 0.312 0.688 0.000 0.000
#> GSM149165 2 0.2589 0.897 0.116 0.884 0.000 0.000
#> GSM149166 2 0.4679 0.570 0.352 0.648 0.000 0.000
#> GSM149167 1 0.3764 0.674 0.784 0.216 0.000 0.000
#> GSM149168 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149169 1 0.0000 0.971 1.000 0.000 0.000 0.000
#> GSM149170 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149171 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149172 2 0.3266 0.864 0.168 0.832 0.000 0.000
#> GSM149173 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149174 2 0.3400 0.856 0.180 0.820 0.000 0.000
#> GSM149175 3 0.0817 0.948 0.024 0.000 0.976 0.000
#> GSM149176 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149177 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149178 2 0.3569 0.837 0.196 0.804 0.000 0.000
#> GSM149179 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149180 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149181 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149182 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149183 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149184 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149185 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149186 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149187 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149188 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149189 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149190 2 0.1022 0.888 0.032 0.968 0.000 0.000
#> GSM149191 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149192 2 0.2647 0.896 0.120 0.880 0.000 0.000
#> GSM149193 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149194 2 0.2149 0.900 0.088 0.912 0.000 0.000
#> GSM149195 3 0.0336 0.964 0.008 0.000 0.992 0.000
#> GSM149196 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149197 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149198 1 0.1792 0.911 0.932 0.000 0.000 0.068
#> GSM149199 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149200 2 0.2760 0.894 0.128 0.872 0.000 0.000
#> GSM149201 2 0.0000 0.896 0.000 1.000 0.000 0.000
#> GSM149202 2 0.2647 0.896 0.120 0.880 0.000 0.000
#> GSM149203 2 0.2760 0.894 0.128 0.872 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149100 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149101 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149102 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149103 3 0.5636 0.257 0.084 0.372 0.544 0.000 0.000
#> GSM149104 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149105 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149106 3 0.2519 0.886 0.036 0.004 0.900 0.060 0.000
#> GSM149107 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149108 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149109 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149110 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149111 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149112 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149113 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149114 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149115 4 0.2890 0.812 0.160 0.004 0.000 0.836 0.000
#> GSM149116 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149117 1 0.0162 0.995 0.996 0.004 0.000 0.000 0.000
#> GSM149118 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149119 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149120 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149121 4 0.1341 0.931 0.056 0.000 0.000 0.944 0.000
#> GSM149122 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149123 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149124 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149125 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149126 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149127 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149128 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149129 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149130 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149132 4 0.0000 0.979 0.000 0.000 0.000 1.000 0.000
#> GSM149133 4 0.1341 0.931 0.056 0.000 0.000 0.944 0.000
#> GSM149134 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149135 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149139 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149141 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149142 2 0.2719 0.830 0.144 0.852 0.000 0.000 0.004
#> GSM149143 2 0.1430 0.858 0.052 0.944 0.000 0.000 0.004
#> GSM149144 2 0.2605 0.865 0.000 0.852 0.000 0.000 0.148
#> GSM149145 2 0.1792 0.854 0.084 0.916 0.000 0.000 0.000
#> GSM149146 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149147 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149149 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149150 2 0.3112 0.860 0.100 0.856 0.000 0.000 0.044
#> GSM149151 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000
#> GSM149153 2 0.2329 0.841 0.124 0.876 0.000 0.000 0.000
#> GSM149154 3 0.1872 0.902 0.052 0.020 0.928 0.000 0.000
#> GSM149155 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149156 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149157 5 0.0162 0.946 0.000 0.004 0.000 0.000 0.996
#> GSM149158 2 0.2605 0.865 0.000 0.852 0.000 0.000 0.148
#> GSM149159 5 0.2471 0.899 0.000 0.136 0.000 0.000 0.864
#> GSM149160 5 0.2127 0.846 0.000 0.108 0.000 0.000 0.892
#> GSM149161 2 0.2798 0.868 0.008 0.852 0.000 0.000 0.140
#> GSM149162 5 0.0162 0.946 0.000 0.004 0.000 0.000 0.996
#> GSM149163 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149164 2 0.1956 0.859 0.076 0.916 0.000 0.000 0.008
#> GSM149165 5 0.0703 0.943 0.000 0.024 0.000 0.000 0.976
#> GSM149166 2 0.2969 0.870 0.020 0.852 0.000 0.000 0.128
#> GSM149167 2 0.5757 0.361 0.416 0.496 0.000 0.000 0.088
#> GSM149168 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149169 2 0.4430 0.319 0.456 0.540 0.000 0.000 0.004
#> GSM149170 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149171 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149172 2 0.1041 0.852 0.032 0.964 0.000 0.000 0.004
#> GSM149173 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149174 2 0.2818 0.870 0.012 0.856 0.000 0.000 0.132
#> GSM149175 3 0.0000 0.965 0.000 0.000 1.000 0.000 0.000
#> GSM149176 2 0.2605 0.865 0.000 0.852 0.000 0.000 0.148
#> GSM149177 2 0.1408 0.859 0.044 0.948 0.000 0.000 0.008
#> GSM149178 2 0.1357 0.858 0.048 0.948 0.000 0.000 0.004
#> GSM149179 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149180 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149181 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149182 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149183 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149184 2 0.2605 0.865 0.000 0.852 0.000 0.000 0.148
#> GSM149185 5 0.2179 0.910 0.000 0.112 0.000 0.000 0.888
#> GSM149186 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149187 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149188 5 0.1410 0.933 0.000 0.060 0.000 0.000 0.940
#> GSM149189 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149190 2 0.2605 0.865 0.000 0.852 0.000 0.000 0.148
#> GSM149191 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149192 5 0.1410 0.933 0.000 0.060 0.000 0.000 0.940
#> GSM149193 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149194 5 0.0162 0.946 0.000 0.004 0.000 0.000 0.996
#> GSM149195 3 0.0510 0.950 0.000 0.000 0.984 0.000 0.016
#> GSM149196 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149197 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149198 1 0.0579 0.984 0.984 0.008 0.000 0.008 0.000
#> GSM149199 5 0.0880 0.925 0.000 0.032 0.000 0.000 0.968
#> GSM149200 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
#> GSM149201 5 0.0000 0.947 0.000 0.000 0.000 0.000 1.000
#> GSM149202 5 0.0880 0.941 0.000 0.032 0.000 0.000 0.968
#> GSM149203 5 0.2561 0.896 0.000 0.144 0.000 0.000 0.856
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149100 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149101 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149102 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149103 6 0.4030 0.6058 0.140 0.000 0.104 0.000 0.000 0.756
#> GSM149104 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149105 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149106 3 0.4933 0.4394 0.004 0.000 0.616 0.080 0.000 0.300
#> GSM149107 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149108 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149109 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149110 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149111 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149112 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149113 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149114 3 0.0000 0.9449 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM149115 1 0.5104 0.4921 0.628 0.000 0.000 0.248 0.004 0.120
#> GSM149116 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149117 1 0.2744 0.7656 0.840 0.000 0.000 0.000 0.016 0.144
#> GSM149118 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149119 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149120 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149121 4 0.0547 0.9726 0.020 0.000 0.000 0.980 0.000 0.000
#> GSM149122 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149123 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149124 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149125 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149126 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149127 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149128 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149129 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149130 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149131 1 0.1714 0.8098 0.908 0.000 0.000 0.000 0.000 0.092
#> GSM149132 4 0.0000 0.9959 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM149133 4 0.0547 0.9726 0.020 0.000 0.000 0.980 0.000 0.000
#> GSM149134 1 0.0632 0.8545 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM149135 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149136 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149137 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149138 1 0.0260 0.8625 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM149139 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149140 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149141 1 0.2340 0.7696 0.852 0.000 0.000 0.000 0.000 0.148
#> GSM149142 1 0.5878 0.1423 0.548 0.180 0.000 0.000 0.016 0.256
#> GSM149143 6 0.2790 0.6180 0.020 0.000 0.000 0.000 0.140 0.840
#> GSM149144 2 0.4278 0.6314 0.000 0.712 0.000 0.000 0.076 0.212
#> GSM149145 6 0.2260 0.6282 0.140 0.000 0.000 0.000 0.000 0.860
#> GSM149146 2 0.0790 0.7812 0.000 0.968 0.000 0.000 0.032 0.000
#> GSM149147 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149148 1 0.0146 0.8640 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM149149 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149150 2 0.6649 0.1509 0.240 0.472 0.000 0.000 0.052 0.236
#> GSM149151 1 0.0000 0.8653 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM149152 1 0.3316 0.7419 0.804 0.000 0.000 0.028 0.004 0.164
#> GSM149153 6 0.3126 0.5221 0.248 0.000 0.000 0.000 0.000 0.752
#> GSM149154 6 0.4064 0.2559 0.020 0.000 0.336 0.000 0.000 0.644
#> GSM149155 2 0.0632 0.7854 0.000 0.976 0.000 0.000 0.024 0.000
#> GSM149156 2 0.2178 0.6922 0.000 0.868 0.000 0.000 0.132 0.000
#> GSM149157 2 0.2006 0.7249 0.000 0.892 0.000 0.000 0.104 0.004
#> GSM149158 2 0.4278 0.6314 0.000 0.712 0.000 0.000 0.076 0.212
#> GSM149159 5 0.2823 0.8359 0.000 0.204 0.000 0.000 0.796 0.000
#> GSM149160 2 0.1807 0.7716 0.000 0.920 0.000 0.000 0.020 0.060
#> GSM149161 2 0.4416 0.6276 0.004 0.708 0.000 0.000 0.076 0.212
#> GSM149162 2 0.0508 0.7886 0.000 0.984 0.000 0.000 0.012 0.004
#> GSM149163 2 0.0713 0.7838 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM149164 6 0.6054 -0.0467 0.088 0.424 0.000 0.000 0.048 0.440
#> GSM149165 5 0.3756 0.6313 0.000 0.400 0.000 0.000 0.600 0.000
#> GSM149166 2 0.4254 0.6302 0.000 0.712 0.000 0.000 0.072 0.216
#> GSM149167 2 0.7300 0.0474 0.244 0.396 0.000 0.000 0.120 0.240
#> GSM149168 5 0.2697 0.8366 0.000 0.188 0.000 0.000 0.812 0.000
#> GSM149169 1 0.3409 0.6282 0.780 0.000 0.000 0.000 0.028 0.192
#> GSM149170 5 0.2664 0.8352 0.000 0.184 0.000 0.000 0.816 0.000
#> GSM149171 5 0.2762 0.8377 0.000 0.196 0.000 0.000 0.804 0.000
#> GSM149172 5 0.3828 -0.0295 0.000 0.000 0.000 0.000 0.560 0.440
#> GSM149173 5 0.2664 0.8352 0.000 0.184 0.000 0.000 0.816 0.000
#> GSM149174 2 0.4392 0.6263 0.004 0.708 0.000 0.000 0.072 0.216
#> GSM149175 3 0.3620 0.4749 0.000 0.000 0.648 0.000 0.000 0.352
#> GSM149176 2 0.4223 0.6385 0.000 0.720 0.000 0.000 0.076 0.204
#> GSM149177 5 0.5271 -0.2387 0.020 0.052 0.000 0.000 0.472 0.456
#> GSM149178 6 0.4254 0.2973 0.020 0.000 0.000 0.000 0.404 0.576
#> GSM149179 2 0.0000 0.7899 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149180 2 0.0146 0.7898 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM149181 2 0.2597 0.6275 0.000 0.824 0.000 0.000 0.176 0.000
#> GSM149182 2 0.0000 0.7899 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149183 2 0.2730 0.6042 0.000 0.808 0.000 0.000 0.192 0.000
#> GSM149184 2 0.4621 0.6332 0.016 0.724 0.000 0.000 0.112 0.148
#> GSM149185 5 0.3101 0.8184 0.000 0.244 0.000 0.000 0.756 0.000
#> GSM149186 2 0.1327 0.7618 0.000 0.936 0.000 0.000 0.064 0.000
#> GSM149187 2 0.0260 0.7893 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM149188 5 0.3428 0.7804 0.000 0.304 0.000 0.000 0.696 0.000
#> GSM149189 5 0.2730 0.8375 0.000 0.192 0.000 0.000 0.808 0.000
#> GSM149190 2 0.4278 0.6314 0.000 0.712 0.000 0.000 0.076 0.212
#> GSM149191 5 0.2664 0.8352 0.000 0.184 0.000 0.000 0.816 0.000
#> GSM149192 5 0.3390 0.7868 0.000 0.296 0.000 0.000 0.704 0.000
#> GSM149193 2 0.3198 0.4493 0.000 0.740 0.000 0.000 0.260 0.000
#> GSM149194 2 0.0146 0.7896 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM149195 3 0.2074 0.8664 0.000 0.004 0.912 0.000 0.048 0.036
#> GSM149196 2 0.1007 0.7754 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM149197 2 0.0000 0.7899 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM149198 1 0.5879 0.1081 0.468 0.000 0.000 0.180 0.004 0.348
#> GSM149199 2 0.0547 0.7875 0.000 0.980 0.000 0.000 0.020 0.000
#> GSM149200 5 0.2664 0.8352 0.000 0.184 0.000 0.000 0.816 0.000
#> GSM149201 2 0.1765 0.7340 0.000 0.904 0.000 0.000 0.096 0.000
#> GSM149202 5 0.3868 0.4003 0.000 0.492 0.000 0.000 0.508 0.000
#> GSM149203 5 0.2762 0.8377 0.000 0.196 0.000 0.000 0.804 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:mclust 105 1.39e-11 2
#> ATC:mclust 61 8.46e-10 3
#> ATC:mclust 103 3.43e-31 4
#> ATC:mclust 102 5.23e-34 5
#> ATC:mclust 91 4.00e-28 6
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.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "NMF"]
# you can also extract it by
# res = res_list["ATC:NMF"]
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.
#> On a matrix with 21168 rows and 105 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 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_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.964 0.985 0.4687 0.534 0.534
#> 3 3 0.782 0.874 0.940 0.3625 0.714 0.515
#> 4 4 0.692 0.786 0.871 0.1302 0.786 0.494
#> 5 5 0.657 0.698 0.820 0.0934 0.853 0.519
#> 6 6 0.706 0.632 0.789 0.0398 0.952 0.775
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows 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 class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM149099 1 0.0000 0.9855 1.000 0.000
#> GSM149100 1 0.0000 0.9855 1.000 0.000
#> GSM149101 1 0.0000 0.9855 1.000 0.000
#> GSM149102 1 0.0000 0.9855 1.000 0.000
#> GSM149103 1 0.4022 0.9112 0.920 0.080
#> GSM149104 1 0.0000 0.9855 1.000 0.000
#> GSM149105 1 0.0000 0.9855 1.000 0.000
#> GSM149106 1 0.0000 0.9855 1.000 0.000
#> GSM149107 1 0.0000 0.9855 1.000 0.000
#> GSM149108 1 0.0000 0.9855 1.000 0.000
#> GSM149109 1 0.0000 0.9855 1.000 0.000
#> GSM149110 1 0.0000 0.9855 1.000 0.000
#> GSM149111 1 0.0000 0.9855 1.000 0.000
#> GSM149112 1 0.0000 0.9855 1.000 0.000
#> GSM149113 1 0.0000 0.9855 1.000 0.000
#> GSM149114 1 0.0000 0.9855 1.000 0.000
#> GSM149115 2 0.0000 0.9844 0.000 1.000
#> GSM149116 1 0.0000 0.9855 1.000 0.000
#> GSM149117 2 0.0000 0.9844 0.000 1.000
#> GSM149118 1 0.0000 0.9855 1.000 0.000
#> GSM149119 1 0.0000 0.9855 1.000 0.000
#> GSM149120 1 0.0000 0.9855 1.000 0.000
#> GSM149121 1 0.0000 0.9855 1.000 0.000
#> GSM149122 1 0.0000 0.9855 1.000 0.000
#> GSM149123 1 0.0000 0.9855 1.000 0.000
#> GSM149124 1 0.0000 0.9855 1.000 0.000
#> GSM149125 1 0.0000 0.9855 1.000 0.000
#> GSM149126 1 0.0000 0.9855 1.000 0.000
#> GSM149127 1 0.0000 0.9855 1.000 0.000
#> GSM149128 1 0.0000 0.9855 1.000 0.000
#> GSM149129 1 0.0000 0.9855 1.000 0.000
#> GSM149130 2 0.0000 0.9844 0.000 1.000
#> GSM149131 1 0.5408 0.8599 0.876 0.124
#> GSM149132 1 0.0000 0.9855 1.000 0.000
#> GSM149133 1 0.0000 0.9855 1.000 0.000
#> GSM149134 2 0.0672 0.9771 0.008 0.992
#> GSM149135 2 0.0000 0.9844 0.000 1.000
#> GSM149136 2 0.0000 0.9844 0.000 1.000
#> GSM149137 2 0.0000 0.9844 0.000 1.000
#> GSM149138 2 0.0000 0.9844 0.000 1.000
#> GSM149139 2 0.0000 0.9844 0.000 1.000
#> GSM149140 2 0.0000 0.9844 0.000 1.000
#> GSM149141 2 0.0000 0.9844 0.000 1.000
#> GSM149142 2 0.0000 0.9844 0.000 1.000
#> GSM149143 2 0.9998 0.0172 0.492 0.508
#> GSM149144 2 0.0000 0.9844 0.000 1.000
#> GSM149145 2 0.0376 0.9808 0.004 0.996
#> GSM149146 2 0.0000 0.9844 0.000 1.000
#> GSM149147 2 0.0000 0.9844 0.000 1.000
#> GSM149148 2 0.0000 0.9844 0.000 1.000
#> GSM149149 2 0.0000 0.9844 0.000 1.000
#> GSM149150 2 0.0000 0.9844 0.000 1.000
#> GSM149151 2 0.0000 0.9844 0.000 1.000
#> GSM149152 1 0.3733 0.9196 0.928 0.072
#> GSM149153 2 0.0000 0.9844 0.000 1.000
#> GSM149154 1 0.0000 0.9855 1.000 0.000
#> GSM149155 2 0.0000 0.9844 0.000 1.000
#> GSM149156 2 0.0000 0.9844 0.000 1.000
#> GSM149157 2 0.0000 0.9844 0.000 1.000
#> GSM149158 2 0.0000 0.9844 0.000 1.000
#> GSM149159 2 0.0000 0.9844 0.000 1.000
#> GSM149160 2 0.0000 0.9844 0.000 1.000
#> GSM149161 2 0.0000 0.9844 0.000 1.000
#> GSM149162 2 0.0000 0.9844 0.000 1.000
#> GSM149163 2 0.0000 0.9844 0.000 1.000
#> GSM149164 2 0.0000 0.9844 0.000 1.000
#> GSM149165 2 0.0000 0.9844 0.000 1.000
#> GSM149166 2 0.0000 0.9844 0.000 1.000
#> GSM149167 2 0.0000 0.9844 0.000 1.000
#> GSM149168 2 0.0000 0.9844 0.000 1.000
#> GSM149169 2 0.0000 0.9844 0.000 1.000
#> GSM149170 2 0.0000 0.9844 0.000 1.000
#> GSM149171 2 0.0000 0.9844 0.000 1.000
#> GSM149172 2 0.7299 0.7366 0.204 0.796
#> GSM149173 2 0.8713 0.5823 0.292 0.708
#> GSM149174 2 0.0000 0.9844 0.000 1.000
#> GSM149175 1 0.0000 0.9855 1.000 0.000
#> GSM149176 2 0.0000 0.9844 0.000 1.000
#> GSM149177 2 0.0000 0.9844 0.000 1.000
#> GSM149178 1 0.8081 0.6734 0.752 0.248
#> GSM149179 2 0.0000 0.9844 0.000 1.000
#> GSM149180 2 0.0000 0.9844 0.000 1.000
#> GSM149181 2 0.0000 0.9844 0.000 1.000
#> GSM149182 2 0.0000 0.9844 0.000 1.000
#> GSM149183 2 0.0000 0.9844 0.000 1.000
#> GSM149184 2 0.0000 0.9844 0.000 1.000
#> GSM149185 2 0.0000 0.9844 0.000 1.000
#> GSM149186 2 0.0000 0.9844 0.000 1.000
#> GSM149187 2 0.0000 0.9844 0.000 1.000
#> GSM149188 2 0.0000 0.9844 0.000 1.000
#> GSM149189 2 0.0000 0.9844 0.000 1.000
#> GSM149190 2 0.0000 0.9844 0.000 1.000
#> GSM149191 2 0.0000 0.9844 0.000 1.000
#> GSM149192 2 0.0000 0.9844 0.000 1.000
#> GSM149193 2 0.0000 0.9844 0.000 1.000
#> GSM149194 2 0.0000 0.9844 0.000 1.000
#> GSM149195 1 0.0000 0.9855 1.000 0.000
#> GSM149196 2 0.0000 0.9844 0.000 1.000
#> GSM149197 2 0.0000 0.9844 0.000 1.000
#> GSM149198 1 0.0000 0.9855 1.000 0.000
#> GSM149199 2 0.0000 0.9844 0.000 1.000
#> GSM149200 2 0.0376 0.9808 0.004 0.996
#> GSM149201 2 0.0000 0.9844 0.000 1.000
#> GSM149202 2 0.0000 0.9844 0.000 1.000
#> GSM149203 2 0.0000 0.9844 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM149099 3 0.0237 0.9438 0.004 0.000 0.996
#> GSM149100 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149101 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149102 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149103 3 0.1031 0.9300 0.000 0.024 0.976
#> GSM149104 3 0.0237 0.9438 0.004 0.000 0.996
#> GSM149105 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149106 3 0.1411 0.9217 0.036 0.000 0.964
#> GSM149107 3 0.0424 0.9423 0.008 0.000 0.992
#> GSM149108 3 0.0592 0.9401 0.012 0.000 0.988
#> GSM149109 3 0.0424 0.9423 0.008 0.000 0.992
#> GSM149110 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149111 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149112 3 0.0237 0.9438 0.004 0.000 0.996
#> GSM149113 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149114 3 0.0000 0.9443 0.000 0.000 1.000
#> GSM149115 1 0.1031 0.9120 0.976 0.024 0.000
#> GSM149116 1 0.1860 0.8989 0.948 0.000 0.052
#> GSM149117 1 0.3482 0.8622 0.872 0.128 0.000
#> GSM149118 1 0.0592 0.9123 0.988 0.000 0.012
#> GSM149119 1 0.3941 0.8052 0.844 0.000 0.156
#> GSM149120 1 0.1031 0.9093 0.976 0.000 0.024
#> GSM149121 1 0.0237 0.9129 0.996 0.000 0.004
#> GSM149122 1 0.3116 0.8573 0.892 0.000 0.108
#> GSM149123 1 0.0424 0.9127 0.992 0.000 0.008
#> GSM149124 1 0.0237 0.9129 0.996 0.000 0.004
#> GSM149125 1 0.0592 0.9123 0.988 0.000 0.012
#> GSM149126 1 0.1529 0.9038 0.960 0.000 0.040
#> GSM149127 1 0.2448 0.8829 0.924 0.000 0.076
#> GSM149128 1 0.1643 0.9021 0.956 0.000 0.044
#> GSM149129 1 0.1964 0.8962 0.944 0.000 0.056
#> GSM149130 1 0.1529 0.9086 0.960 0.040 0.000
#> GSM149131 1 0.0000 0.9128 1.000 0.000 0.000
#> GSM149132 1 0.2261 0.8886 0.932 0.000 0.068
#> GSM149133 1 0.0237 0.9129 0.996 0.000 0.004
#> GSM149134 1 0.0892 0.9125 0.980 0.020 0.000
#> GSM149135 1 0.3482 0.8622 0.872 0.128 0.000
#> GSM149136 1 0.3551 0.8590 0.868 0.132 0.000
#> GSM149137 1 0.3340 0.8676 0.880 0.120 0.000
#> GSM149138 1 0.5591 0.6345 0.696 0.304 0.000
#> GSM149139 1 0.1860 0.9049 0.948 0.052 0.000
#> GSM149140 1 0.5178 0.7192 0.744 0.256 0.000
#> GSM149141 1 0.5098 0.7289 0.752 0.248 0.000
#> GSM149142 2 0.1163 0.9195 0.028 0.972 0.000
#> GSM149143 3 0.5591 0.5657 0.000 0.304 0.696
#> GSM149144 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149145 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149146 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149147 1 0.2066 0.9019 0.940 0.060 0.000
#> GSM149148 2 0.6299 -0.0298 0.476 0.524 0.000
#> GSM149149 1 0.2066 0.9018 0.940 0.060 0.000
#> GSM149150 2 0.0592 0.9309 0.012 0.988 0.000
#> GSM149151 1 0.3879 0.8410 0.848 0.152 0.000
#> GSM149152 1 0.0000 0.9128 1.000 0.000 0.000
#> GSM149153 2 0.0424 0.9332 0.008 0.992 0.000
#> GSM149154 3 0.0424 0.9423 0.008 0.000 0.992
#> GSM149155 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149156 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149157 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149158 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149159 2 0.3192 0.8529 0.000 0.888 0.112
#> GSM149160 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149161 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149162 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149163 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149164 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149165 2 0.0747 0.9283 0.000 0.984 0.016
#> GSM149166 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149167 2 0.3816 0.7947 0.148 0.852 0.000
#> GSM149168 2 0.2711 0.8760 0.000 0.912 0.088
#> GSM149169 2 0.3340 0.8301 0.120 0.880 0.000
#> GSM149170 2 0.4178 0.7866 0.000 0.828 0.172
#> GSM149171 2 0.1643 0.9112 0.000 0.956 0.044
#> GSM149172 2 0.6286 0.1436 0.000 0.536 0.464
#> GSM149173 3 0.3267 0.8487 0.000 0.116 0.884
#> GSM149174 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149175 3 0.0592 0.9398 0.012 0.000 0.988
#> GSM149176 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149177 2 0.1031 0.9238 0.000 0.976 0.024
#> GSM149178 3 0.3879 0.8122 0.000 0.152 0.848
#> GSM149179 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149180 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149181 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149182 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149183 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149184 2 0.0424 0.9332 0.008 0.992 0.000
#> GSM149185 2 0.2878 0.8692 0.000 0.904 0.096
#> GSM149186 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149187 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149188 2 0.2878 0.8693 0.000 0.904 0.096
#> GSM149189 2 0.5988 0.4353 0.000 0.632 0.368
#> GSM149190 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149191 2 0.5560 0.5843 0.000 0.700 0.300
#> GSM149192 2 0.2066 0.8988 0.000 0.940 0.060
#> GSM149193 2 0.0424 0.9323 0.000 0.992 0.008
#> GSM149194 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149195 3 0.0237 0.9422 0.000 0.004 0.996
#> GSM149196 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149197 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149198 1 0.0237 0.9129 0.996 0.000 0.004
#> GSM149199 2 0.0237 0.9351 0.004 0.996 0.000
#> GSM149200 3 0.5785 0.4993 0.000 0.332 0.668
#> GSM149201 2 0.0000 0.9353 0.000 1.000 0.000
#> GSM149202 2 0.1643 0.9108 0.000 0.956 0.044
#> GSM149203 2 0.3816 0.8152 0.000 0.852 0.148
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM149099 3 0.1867 0.902 0.000 0.000 0.928 0.072
#> GSM149100 3 0.1109 0.898 0.028 0.000 0.968 0.004
#> GSM149101 3 0.2011 0.878 0.080 0.000 0.920 0.000
#> GSM149102 3 0.1867 0.882 0.072 0.000 0.928 0.000
#> GSM149103 1 0.5168 -0.113 0.504 0.000 0.492 0.004
#> GSM149104 3 0.1174 0.902 0.020 0.000 0.968 0.012
#> GSM149105 3 0.3594 0.889 0.024 0.008 0.860 0.108
#> GSM149106 3 0.3123 0.869 0.000 0.000 0.844 0.156
#> GSM149107 3 0.1807 0.893 0.052 0.000 0.940 0.008
#> GSM149108 3 0.2589 0.892 0.000 0.000 0.884 0.116
#> GSM149109 3 0.3711 0.885 0.024 0.008 0.852 0.116
#> GSM149110 3 0.3940 0.882 0.028 0.012 0.844 0.116
#> GSM149111 3 0.1022 0.903 0.000 0.000 0.968 0.032
#> GSM149112 3 0.4413 0.857 0.028 0.012 0.808 0.152
#> GSM149113 3 0.3606 0.887 0.020 0.008 0.856 0.116
#> GSM149114 3 0.1792 0.884 0.068 0.000 0.932 0.000
#> GSM149115 4 0.4382 0.653 0.296 0.000 0.000 0.704
#> GSM149116 4 0.1118 0.881 0.000 0.000 0.036 0.964
#> GSM149117 1 0.5386 0.347 0.612 0.020 0.000 0.368
#> GSM149118 4 0.1716 0.912 0.064 0.000 0.000 0.936
#> GSM149119 4 0.2124 0.840 0.008 0.000 0.068 0.924
#> GSM149120 4 0.1389 0.916 0.048 0.000 0.000 0.952
#> GSM149121 4 0.3311 0.839 0.172 0.000 0.000 0.828
#> GSM149122 4 0.1637 0.857 0.000 0.000 0.060 0.940
#> GSM149123 4 0.1557 0.915 0.056 0.000 0.000 0.944
#> GSM149124 4 0.1557 0.915 0.056 0.000 0.000 0.944
#> GSM149125 4 0.1389 0.916 0.048 0.000 0.000 0.952
#> GSM149126 4 0.1302 0.916 0.044 0.000 0.000 0.956
#> GSM149127 4 0.1305 0.883 0.004 0.000 0.036 0.960
#> GSM149128 4 0.1174 0.907 0.020 0.000 0.012 0.968
#> GSM149129 4 0.1388 0.894 0.012 0.000 0.028 0.960
#> GSM149130 1 0.2760 0.721 0.872 0.000 0.000 0.128
#> GSM149131 1 0.3249 0.702 0.852 0.000 0.008 0.140
#> GSM149132 4 0.1284 0.908 0.024 0.000 0.012 0.964
#> GSM149133 4 0.3444 0.828 0.184 0.000 0.000 0.816
#> GSM149134 1 0.3873 0.601 0.772 0.000 0.000 0.228
#> GSM149135 1 0.3105 0.732 0.868 0.012 0.000 0.120
#> GSM149136 1 0.3108 0.737 0.872 0.016 0.000 0.112
#> GSM149137 1 0.2859 0.734 0.880 0.008 0.000 0.112
#> GSM149138 1 0.2773 0.751 0.900 0.028 0.000 0.072
#> GSM149139 1 0.3539 0.680 0.820 0.004 0.000 0.176
#> GSM149140 1 0.3279 0.746 0.872 0.032 0.000 0.096
#> GSM149141 1 0.2010 0.719 0.932 0.004 0.060 0.004
#> GSM149142 1 0.2976 0.747 0.872 0.120 0.008 0.000
#> GSM149143 3 0.4482 0.798 0.092 0.088 0.816 0.004
#> GSM149144 1 0.4817 0.486 0.612 0.388 0.000 0.000
#> GSM149145 1 0.4122 0.565 0.760 0.000 0.236 0.004
#> GSM149146 2 0.0592 0.897 0.016 0.984 0.000 0.000
#> GSM149147 1 0.2402 0.745 0.912 0.012 0.000 0.076
#> GSM149148 1 0.2670 0.753 0.908 0.040 0.000 0.052
#> GSM149149 1 0.2522 0.747 0.908 0.016 0.000 0.076
#> GSM149150 1 0.3528 0.726 0.808 0.192 0.000 0.000
#> GSM149151 1 0.2845 0.750 0.896 0.028 0.000 0.076
#> GSM149152 4 0.2814 0.871 0.132 0.000 0.000 0.868
#> GSM149153 1 0.3534 0.671 0.840 0.008 0.148 0.004
#> GSM149154 3 0.3448 0.812 0.168 0.000 0.828 0.004
#> GSM149155 2 0.1474 0.889 0.052 0.948 0.000 0.000
#> GSM149156 2 0.0469 0.897 0.012 0.988 0.000 0.000
#> GSM149157 2 0.1716 0.883 0.064 0.936 0.000 0.000
#> GSM149158 1 0.4804 0.495 0.616 0.384 0.000 0.000
#> GSM149159 2 0.0927 0.887 0.016 0.976 0.008 0.000
#> GSM149160 2 0.2216 0.863 0.092 0.908 0.000 0.000
#> GSM149161 1 0.4543 0.589 0.676 0.324 0.000 0.000
#> GSM149162 2 0.1389 0.891 0.048 0.952 0.000 0.000
#> GSM149163 2 0.1389 0.891 0.048 0.952 0.000 0.000
#> GSM149164 1 0.4601 0.656 0.732 0.256 0.008 0.004
#> GSM149165 2 0.0188 0.896 0.004 0.996 0.000 0.000
#> GSM149166 1 0.4804 0.491 0.616 0.384 0.000 0.000
#> GSM149167 2 0.5252 0.427 0.336 0.644 0.000 0.020
#> GSM149168 2 0.0376 0.893 0.004 0.992 0.004 0.000
#> GSM149169 1 0.4418 0.733 0.784 0.184 0.000 0.032
#> GSM149170 2 0.1593 0.880 0.016 0.956 0.024 0.004
#> GSM149171 2 0.0188 0.896 0.004 0.996 0.000 0.000
#> GSM149172 2 0.3116 0.840 0.032 0.900 0.044 0.024
#> GSM149173 2 0.4181 0.765 0.032 0.824 0.136 0.008
#> GSM149174 1 0.4713 0.537 0.640 0.360 0.000 0.000
#> GSM149175 3 0.1520 0.902 0.024 0.000 0.956 0.020
#> GSM149176 1 0.4941 0.364 0.564 0.436 0.000 0.000
#> GSM149177 2 0.6506 0.484 0.240 0.628 0.132 0.000
#> GSM149178 2 0.5018 0.743 0.032 0.804 0.080 0.084
#> GSM149179 2 0.3266 0.775 0.168 0.832 0.000 0.000
#> GSM149180 2 0.2345 0.855 0.100 0.900 0.000 0.000
#> GSM149181 2 0.0336 0.897 0.008 0.992 0.000 0.000
#> GSM149182 2 0.2589 0.839 0.116 0.884 0.000 0.000
#> GSM149183 2 0.0336 0.897 0.008 0.992 0.000 0.000
#> GSM149184 2 0.1637 0.885 0.060 0.940 0.000 0.000
#> GSM149185 2 0.1543 0.878 0.032 0.956 0.008 0.004
#> GSM149186 2 0.1389 0.891 0.048 0.952 0.000 0.000
#> GSM149187 2 0.1389 0.891 0.048 0.952 0.000 0.000
#> GSM149188 2 0.1674 0.876 0.032 0.952 0.012 0.004
#> GSM149189 2 0.2469 0.833 0.000 0.892 0.108 0.000
#> GSM149190 1 0.4843 0.471 0.604 0.396 0.000 0.000
#> GSM149191 2 0.2007 0.872 0.020 0.940 0.036 0.004
#> GSM149192 2 0.0376 0.895 0.004 0.992 0.004 0.000
#> GSM149193 2 0.0336 0.897 0.008 0.992 0.000 0.000
#> GSM149194 2 0.4790 0.310 0.380 0.620 0.000 0.000
#> GSM149195 3 0.4598 0.869 0.032 0.044 0.824 0.100
#> GSM149196 2 0.1211 0.893 0.040 0.960 0.000 0.000
#> GSM149197 2 0.2081 0.869 0.084 0.916 0.000 0.000
#> GSM149198 4 0.2921 0.866 0.140 0.000 0.000 0.860
#> GSM149199 2 0.4277 0.579 0.280 0.720 0.000 0.000
#> GSM149200 2 0.2982 0.839 0.032 0.896 0.068 0.004
#> GSM149201 2 0.0469 0.897 0.012 0.988 0.000 0.000
#> GSM149202 2 0.0592 0.897 0.016 0.984 0.000 0.000
#> GSM149203 2 0.2165 0.867 0.032 0.936 0.024 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM149099 3 0.1106 0.919 0.000 0.000 0.964 0.024 0.012
#> GSM149100 3 0.1153 0.910 0.024 0.008 0.964 0.000 0.004
#> GSM149101 3 0.2116 0.877 0.076 0.008 0.912 0.000 0.004
#> GSM149102 3 0.1788 0.890 0.056 0.008 0.932 0.000 0.004
#> GSM149103 3 0.4039 0.635 0.268 0.008 0.720 0.000 0.004
#> GSM149104 3 0.0613 0.915 0.008 0.004 0.984 0.004 0.000
#> GSM149105 3 0.2576 0.909 0.000 0.008 0.900 0.056 0.036
#> GSM149106 3 0.2464 0.899 0.000 0.012 0.892 0.092 0.004
#> GSM149107 3 0.0833 0.911 0.016 0.004 0.976 0.000 0.004
#> GSM149108 3 0.1591 0.917 0.000 0.004 0.940 0.052 0.004
#> GSM149109 3 0.3002 0.900 0.000 0.008 0.876 0.068 0.048
#> GSM149110 3 0.3012 0.900 0.000 0.008 0.876 0.060 0.056
#> GSM149111 3 0.0807 0.919 0.000 0.000 0.976 0.012 0.012
#> GSM149112 3 0.3582 0.880 0.000 0.008 0.840 0.080 0.072
#> GSM149113 3 0.2629 0.907 0.000 0.008 0.896 0.064 0.032
#> GSM149114 3 0.1026 0.908 0.024 0.004 0.968 0.000 0.004
#> GSM149115 4 0.3449 0.808 0.164 0.024 0.000 0.812 0.000
#> GSM149116 4 0.0912 0.898 0.016 0.000 0.012 0.972 0.000
#> GSM149117 2 0.5054 0.488 0.104 0.708 0.000 0.184 0.004
#> GSM149118 4 0.0963 0.906 0.036 0.000 0.000 0.964 0.000
#> GSM149119 4 0.1364 0.889 0.012 0.000 0.036 0.952 0.000
#> GSM149120 4 0.1544 0.894 0.068 0.000 0.000 0.932 0.000
#> GSM149121 4 0.3530 0.773 0.204 0.012 0.000 0.784 0.000
#> GSM149122 4 0.0955 0.895 0.004 0.000 0.028 0.968 0.000
#> GSM149123 4 0.0404 0.905 0.012 0.000 0.000 0.988 0.000
#> GSM149124 4 0.0880 0.905 0.032 0.000 0.000 0.968 0.000
#> GSM149125 4 0.1121 0.905 0.044 0.000 0.000 0.956 0.000
#> GSM149126 4 0.1270 0.902 0.052 0.000 0.000 0.948 0.000
#> GSM149127 4 0.1124 0.892 0.004 0.000 0.036 0.960 0.000
#> GSM149128 4 0.0703 0.899 0.000 0.000 0.024 0.976 0.000
#> GSM149129 4 0.1357 0.886 0.004 0.000 0.048 0.948 0.000
#> GSM149130 1 0.5039 0.664 0.700 0.116 0.000 0.184 0.000
#> GSM149131 1 0.3318 0.656 0.808 0.012 0.000 0.180 0.000
#> GSM149132 4 0.2300 0.890 0.040 0.000 0.052 0.908 0.000
#> GSM149133 4 0.3424 0.738 0.240 0.000 0.000 0.760 0.000
#> GSM149134 1 0.4806 0.568 0.688 0.060 0.000 0.252 0.000
#> GSM149135 1 0.5048 0.466 0.580 0.380 0.000 0.040 0.000
#> GSM149136 1 0.4898 0.475 0.592 0.376 0.000 0.032 0.000
#> GSM149137 1 0.4777 0.633 0.680 0.268 0.000 0.052 0.000
#> GSM149138 1 0.3812 0.696 0.772 0.204 0.000 0.024 0.000
#> GSM149139 1 0.6155 0.538 0.548 0.276 0.000 0.176 0.000
#> GSM149140 1 0.4677 0.598 0.664 0.300 0.000 0.036 0.000
#> GSM149141 1 0.3947 0.656 0.812 0.036 0.136 0.012 0.004
#> GSM149142 1 0.3123 0.670 0.812 0.184 0.004 0.000 0.000
#> GSM149143 5 0.5821 0.335 0.308 0.020 0.072 0.000 0.600
#> GSM149144 2 0.2068 0.689 0.092 0.904 0.000 0.000 0.004
#> GSM149145 1 0.4133 0.558 0.744 0.012 0.232 0.000 0.012
#> GSM149146 2 0.1544 0.747 0.000 0.932 0.000 0.000 0.068
#> GSM149147 1 0.1522 0.717 0.944 0.012 0.000 0.044 0.000
#> GSM149148 1 0.2416 0.722 0.888 0.100 0.000 0.012 0.000
#> GSM149149 1 0.1992 0.722 0.924 0.032 0.000 0.044 0.000
#> GSM149150 1 0.4655 0.401 0.644 0.328 0.000 0.000 0.028
#> GSM149151 1 0.3495 0.711 0.812 0.160 0.000 0.028 0.000
#> GSM149152 4 0.1792 0.887 0.084 0.000 0.000 0.916 0.000
#> GSM149153 1 0.4220 0.628 0.768 0.048 0.180 0.000 0.004
#> GSM149154 1 0.4869 0.477 0.688 0.008 0.260 0.000 0.044
#> GSM149155 2 0.2329 0.721 0.000 0.876 0.000 0.000 0.124
#> GSM149156 5 0.4305 0.109 0.000 0.488 0.000 0.000 0.512
#> GSM149157 5 0.3264 0.778 0.016 0.164 0.000 0.000 0.820
#> GSM149158 2 0.4382 0.444 0.288 0.688 0.000 0.000 0.024
#> GSM149159 5 0.1270 0.799 0.000 0.052 0.000 0.000 0.948
#> GSM149160 5 0.2983 0.792 0.040 0.096 0.000 0.000 0.864
#> GSM149161 2 0.4718 0.336 0.344 0.628 0.000 0.000 0.028
#> GSM149162 5 0.2806 0.789 0.004 0.152 0.000 0.000 0.844
#> GSM149163 2 0.2230 0.728 0.000 0.884 0.000 0.000 0.116
#> GSM149164 1 0.5076 0.485 0.676 0.068 0.004 0.000 0.252
#> GSM149165 5 0.2930 0.784 0.004 0.164 0.000 0.000 0.832
#> GSM149166 2 0.2522 0.675 0.108 0.880 0.000 0.000 0.012
#> GSM149167 2 0.4394 0.697 0.052 0.804 0.000 0.064 0.080
#> GSM149168 5 0.1704 0.802 0.004 0.068 0.000 0.000 0.928
#> GSM149169 2 0.5129 0.351 0.328 0.628 0.000 0.020 0.024
#> GSM149170 5 0.1544 0.802 0.000 0.068 0.000 0.000 0.932
#> GSM149171 5 0.2536 0.795 0.004 0.128 0.000 0.000 0.868
#> GSM149172 5 0.1604 0.795 0.004 0.044 0.004 0.004 0.944
#> GSM149173 5 0.0162 0.773 0.000 0.000 0.004 0.000 0.996
#> GSM149174 2 0.5541 0.216 0.372 0.552 0.000 0.000 0.076
#> GSM149175 3 0.1278 0.919 0.016 0.000 0.960 0.020 0.004
#> GSM149176 2 0.1485 0.737 0.032 0.948 0.000 0.000 0.020
#> GSM149177 2 0.3664 0.693 0.024 0.836 0.108 0.000 0.032
#> GSM149178 5 0.7777 0.485 0.020 0.164 0.084 0.212 0.520
#> GSM149179 2 0.1341 0.750 0.000 0.944 0.000 0.000 0.056
#> GSM149180 2 0.1478 0.750 0.000 0.936 0.000 0.000 0.064
#> GSM149181 5 0.3913 0.609 0.000 0.324 0.000 0.000 0.676
#> GSM149182 2 0.1410 0.750 0.000 0.940 0.000 0.000 0.060
#> GSM149183 5 0.4451 0.160 0.000 0.492 0.000 0.004 0.504
#> GSM149184 2 0.2930 0.687 0.004 0.832 0.000 0.000 0.164
#> GSM149185 5 0.2411 0.802 0.008 0.108 0.000 0.000 0.884
#> GSM149186 2 0.4192 0.165 0.000 0.596 0.000 0.000 0.404
#> GSM149187 2 0.4210 0.165 0.000 0.588 0.000 0.000 0.412
#> GSM149188 5 0.2674 0.792 0.012 0.120 0.000 0.000 0.868
#> GSM149189 5 0.5087 0.667 0.000 0.148 0.152 0.000 0.700
#> GSM149190 2 0.3489 0.669 0.144 0.820 0.000 0.000 0.036
#> GSM149191 5 0.1299 0.772 0.008 0.020 0.012 0.000 0.960
#> GSM149192 5 0.3305 0.732 0.000 0.224 0.000 0.000 0.776
#> GSM149193 5 0.4300 0.241 0.000 0.476 0.000 0.000 0.524
#> GSM149194 2 0.6717 0.207 0.256 0.408 0.000 0.000 0.336
#> GSM149195 3 0.4166 0.828 0.004 0.008 0.788 0.040 0.160
#> GSM149196 2 0.3274 0.615 0.000 0.780 0.000 0.000 0.220
#> GSM149197 2 0.1410 0.750 0.000 0.940 0.000 0.000 0.060
#> GSM149198 4 0.4730 0.628 0.260 0.052 0.000 0.688 0.000
#> GSM149199 2 0.3551 0.723 0.044 0.820 0.000 0.000 0.136
#> GSM149200 5 0.0771 0.781 0.000 0.020 0.004 0.000 0.976
#> GSM149201 2 0.4235 0.102 0.000 0.576 0.000 0.000 0.424
#> GSM149202 5 0.3143 0.755 0.000 0.204 0.000 0.000 0.796
#> GSM149203 5 0.1205 0.793 0.004 0.040 0.000 0.000 0.956
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM149099 3 0.0291 0.9202 0.000 0.000 0.992 0.004 0.000 0.004
#> GSM149100 3 0.1387 0.9085 0.000 0.000 0.932 0.000 0.000 0.068
#> GSM149101 3 0.2389 0.8672 0.008 0.000 0.864 0.000 0.000 0.128
#> GSM149102 3 0.2003 0.8826 0.000 0.000 0.884 0.000 0.000 0.116
#> GSM149103 3 0.4407 0.6157 0.076 0.000 0.692 0.000 0.000 0.232
#> GSM149104 3 0.1267 0.9105 0.000 0.000 0.940 0.000 0.000 0.060
#> GSM149105 3 0.1257 0.9150 0.000 0.000 0.952 0.028 0.000 0.020
#> GSM149106 3 0.1408 0.9138 0.000 0.000 0.944 0.036 0.000 0.020
#> GSM149107 3 0.1610 0.9060 0.000 0.000 0.916 0.000 0.000 0.084
#> GSM149108 3 0.1864 0.9186 0.000 0.004 0.924 0.032 0.000 0.040
#> GSM149109 3 0.1492 0.9104 0.000 0.000 0.940 0.036 0.000 0.024
#> GSM149110 3 0.1168 0.9155 0.000 0.000 0.956 0.028 0.000 0.016
#> GSM149111 3 0.0260 0.9198 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM149112 3 0.2333 0.8887 0.000 0.000 0.896 0.040 0.004 0.060
#> GSM149113 3 0.1341 0.9143 0.000 0.000 0.948 0.028 0.000 0.024
#> GSM149114 3 0.1501 0.9061 0.000 0.000 0.924 0.000 0.000 0.076
#> GSM149115 4 0.3900 0.7858 0.128 0.024 0.000 0.792 0.000 0.056
#> GSM149116 4 0.2053 0.8401 0.004 0.004 0.024 0.916 0.000 0.052
#> GSM149117 2 0.4217 0.6482 0.056 0.784 0.000 0.088 0.000 0.072
#> GSM149118 4 0.1124 0.8639 0.008 0.000 0.000 0.956 0.000 0.036
#> GSM149119 4 0.1565 0.8526 0.004 0.000 0.028 0.940 0.000 0.028
#> GSM149120 4 0.1789 0.8587 0.044 0.000 0.000 0.924 0.000 0.032
#> GSM149121 4 0.4219 0.5690 0.304 0.000 0.000 0.660 0.000 0.036
#> GSM149122 4 0.1321 0.8550 0.004 0.000 0.024 0.952 0.000 0.020
#> GSM149123 4 0.1268 0.8645 0.036 0.004 0.000 0.952 0.000 0.008
#> GSM149124 4 0.1699 0.8507 0.004 0.004 0.000 0.928 0.004 0.060
#> GSM149125 4 0.0806 0.8644 0.008 0.000 0.000 0.972 0.000 0.020
#> GSM149126 4 0.2547 0.8445 0.080 0.000 0.004 0.880 0.000 0.036
#> GSM149127 4 0.1794 0.8624 0.024 0.000 0.028 0.932 0.000 0.016
#> GSM149128 4 0.2095 0.8638 0.040 0.000 0.028 0.916 0.000 0.016
#> GSM149129 4 0.2403 0.8591 0.040 0.000 0.040 0.900 0.000 0.020
#> GSM149130 1 0.6687 0.2858 0.536 0.136 0.000 0.172 0.000 0.156
#> GSM149131 1 0.5488 0.2513 0.568 0.000 0.000 0.212 0.000 0.220
#> GSM149132 4 0.3672 0.8149 0.116 0.000 0.032 0.812 0.000 0.040
#> GSM149133 4 0.3832 0.7484 0.120 0.000 0.000 0.776 0.000 0.104
#> GSM149134 1 0.3204 0.4700 0.832 0.004 0.000 0.112 0.000 0.052
#> GSM149135 1 0.3800 0.4864 0.776 0.168 0.000 0.048 0.000 0.008
#> GSM149136 1 0.3521 0.4929 0.796 0.156 0.000 0.044 0.000 0.004
#> GSM149137 1 0.3371 0.5010 0.832 0.104 0.000 0.044 0.000 0.020
#> GSM149138 1 0.2415 0.4848 0.900 0.040 0.000 0.024 0.000 0.036
#> GSM149139 1 0.4664 0.4624 0.724 0.080 0.000 0.168 0.000 0.028
#> GSM149140 1 0.3622 0.5082 0.820 0.088 0.000 0.068 0.000 0.024
#> GSM149141 6 0.5833 0.6962 0.348 0.016 0.064 0.012 0.012 0.548
#> GSM149142 1 0.5448 -0.1697 0.564 0.104 0.000 0.000 0.012 0.320
#> GSM149143 5 0.5716 0.3192 0.284 0.004 0.016 0.000 0.572 0.124
#> GSM149144 2 0.1327 0.7338 0.064 0.936 0.000 0.000 0.000 0.000
#> GSM149145 6 0.5618 0.6762 0.320 0.000 0.148 0.000 0.004 0.528
#> GSM149146 2 0.0891 0.7496 0.000 0.968 0.000 0.000 0.024 0.008
#> GSM149147 1 0.3735 0.1878 0.744 0.004 0.004 0.016 0.000 0.232
#> GSM149148 1 0.2594 0.4486 0.888 0.036 0.000 0.020 0.000 0.056
#> GSM149149 1 0.4921 0.0699 0.648 0.020 0.004 0.036 0.004 0.288
#> GSM149150 6 0.6561 0.3860 0.264 0.232 0.000 0.000 0.040 0.464
#> GSM149151 1 0.5510 0.1009 0.600 0.132 0.000 0.016 0.000 0.252
#> GSM149152 4 0.2854 0.8409 0.052 0.008 0.008 0.880 0.004 0.048
#> GSM149153 6 0.5684 0.7260 0.332 0.016 0.092 0.000 0.008 0.552
#> GSM149154 1 0.6235 -0.5670 0.424 0.000 0.152 0.000 0.028 0.396
#> GSM149155 2 0.2102 0.7458 0.012 0.908 0.000 0.000 0.068 0.012
#> GSM149156 5 0.5695 0.1209 0.016 0.400 0.000 0.000 0.480 0.104
#> GSM149157 5 0.2546 0.8263 0.012 0.060 0.000 0.000 0.888 0.040
#> GSM149158 2 0.4092 0.3610 0.344 0.636 0.000 0.000 0.000 0.020
#> GSM149159 5 0.0837 0.8360 0.004 0.004 0.000 0.000 0.972 0.020
#> GSM149160 5 0.2817 0.8019 0.052 0.008 0.000 0.000 0.868 0.072
#> GSM149161 2 0.5421 0.2545 0.312 0.572 0.000 0.000 0.012 0.104
#> GSM149162 5 0.2144 0.8359 0.004 0.040 0.000 0.000 0.908 0.048
#> GSM149163 2 0.2686 0.7385 0.012 0.876 0.000 0.000 0.080 0.032
#> GSM149164 1 0.6345 -0.2755 0.376 0.004 0.004 0.000 0.296 0.320
#> GSM149165 5 0.2511 0.8298 0.000 0.064 0.000 0.000 0.880 0.056
#> GSM149166 2 0.2373 0.7256 0.084 0.888 0.000 0.000 0.004 0.024
#> GSM149167 2 0.5742 0.5944 0.040 0.672 0.000 0.044 0.076 0.168
#> GSM149168 5 0.0862 0.8350 0.004 0.008 0.000 0.000 0.972 0.016
#> GSM149169 2 0.6836 0.3275 0.172 0.532 0.000 0.016 0.076 0.204
#> GSM149170 5 0.1511 0.8358 0.000 0.012 0.004 0.000 0.940 0.044
#> GSM149171 5 0.2896 0.7847 0.000 0.016 0.000 0.000 0.824 0.160
#> GSM149172 5 0.1444 0.8281 0.000 0.000 0.000 0.000 0.928 0.072
#> GSM149173 5 0.1296 0.8337 0.000 0.012 0.004 0.000 0.952 0.032
#> GSM149174 1 0.5083 0.2340 0.564 0.368 0.000 0.000 0.016 0.052
#> GSM149175 3 0.1728 0.9142 0.008 0.000 0.924 0.004 0.000 0.064
#> GSM149176 2 0.1434 0.7431 0.024 0.948 0.000 0.000 0.008 0.020
#> GSM149177 2 0.4160 0.5888 0.012 0.748 0.200 0.000 0.012 0.028
#> GSM149178 4 0.8829 -0.0372 0.024 0.092 0.096 0.292 0.276 0.220
#> GSM149179 2 0.0976 0.7492 0.008 0.968 0.000 0.000 0.016 0.008
#> GSM149180 2 0.1957 0.7477 0.008 0.920 0.000 0.000 0.048 0.024
#> GSM149181 5 0.3695 0.6165 0.000 0.272 0.000 0.000 0.712 0.016
#> GSM149182 2 0.1078 0.7488 0.008 0.964 0.000 0.000 0.016 0.012
#> GSM149183 2 0.4212 0.1956 0.000 0.560 0.000 0.000 0.424 0.016
#> GSM149184 2 0.4123 0.6852 0.020 0.776 0.000 0.000 0.088 0.116
#> GSM149185 5 0.1682 0.8352 0.000 0.020 0.000 0.000 0.928 0.052
#> GSM149186 2 0.4481 0.1948 0.004 0.556 0.000 0.000 0.416 0.024
#> GSM149187 2 0.3930 0.3650 0.004 0.628 0.000 0.000 0.364 0.004
#> GSM149188 5 0.3502 0.7918 0.000 0.076 0.004 0.000 0.812 0.108
#> GSM149189 5 0.5446 0.6687 0.000 0.120 0.132 0.000 0.676 0.072
#> GSM149190 2 0.3486 0.6505 0.128 0.812 0.000 0.000 0.008 0.052
#> GSM149191 5 0.1901 0.8212 0.008 0.000 0.004 0.000 0.912 0.076
#> GSM149192 5 0.3344 0.7600 0.000 0.152 0.000 0.000 0.804 0.044
#> GSM149193 5 0.5379 0.1114 0.004 0.420 0.000 0.000 0.480 0.096
#> GSM149194 1 0.6864 0.0512 0.388 0.208 0.000 0.000 0.344 0.060
#> GSM149195 3 0.2791 0.8523 0.000 0.004 0.872 0.004 0.068 0.052
#> GSM149196 2 0.3018 0.6797 0.004 0.816 0.000 0.000 0.168 0.012
#> GSM149197 2 0.1237 0.7497 0.020 0.956 0.000 0.000 0.020 0.004
#> GSM149198 1 0.5041 0.3404 0.644 0.004 0.004 0.264 0.004 0.080
#> GSM149199 2 0.2825 0.7391 0.040 0.876 0.000 0.000 0.056 0.028
#> GSM149200 5 0.1982 0.8272 0.000 0.016 0.004 0.000 0.912 0.068
#> GSM149201 2 0.5191 0.0599 0.004 0.492 0.000 0.000 0.428 0.076
#> GSM149202 5 0.3066 0.7855 0.000 0.124 0.000 0.000 0.832 0.044
#> GSM149203 5 0.1908 0.8149 0.004 0.000 0.000 0.000 0.900 0.096
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n disease.state(p) k
#> ATC:NMF 104 7.94e-12 2
#> ATC:NMF 101 2.81e-23 3
#> ATC:NMF 95 5.26e-28 4
#> ATC:NMF 86 1.14e-27 5
#> ATC:NMF 76 9.82e-27 6
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
sessionInfo()
#> R version 3.6.0 (2019-04-26)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: CentOS Linux 7 (Core)
#>
#> Matrix products: default
#> BLAS: /usr/lib64/libblas.so.3.4.2
#> LAPACK: /usr/lib64/liblapack.so.3.4.2
#>
#> locale:
#> [1] LC_CTYPE=en_GB.UTF-8 LC_NUMERIC=C LC_TIME=en_GB.UTF-8
#> [4] LC_COLLATE=en_GB.UTF-8 LC_MONETARY=en_GB.UTF-8 LC_MESSAGES=en_GB.UTF-8
#> [7] LC_PAPER=en_GB.UTF-8 LC_NAME=C LC_ADDRESS=C
#> [10] LC_TELEPHONE=C LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C
#>
#> attached base packages:
#> [1] grid stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] genefilter_1.66.0 ComplexHeatmap_2.3.1 markdown_1.1 knitr_1.26
#> [5] GetoptLong_0.1.7 cola_1.3.2
#>
#> loaded via a namespace (and not attached):
#> [1] circlize_0.4.8 shape_1.4.4 xfun_0.11 slam_0.1-46
#> [5] lattice_0.20-38 splines_3.6.0 colorspace_1.4-1 vctrs_0.2.0
#> [9] stats4_3.6.0 blob_1.2.0 XML_3.98-1.20 survival_2.44-1.1
#> [13] rlang_0.4.2 pillar_1.4.2 DBI_1.0.0 BiocGenerics_0.30.0
#> [17] bit64_0.9-7 RColorBrewer_1.1-2 matrixStats_0.55.0 stringr_1.4.0
#> [21] GlobalOptions_0.1.1 evaluate_0.14 memoise_1.1.0 Biobase_2.44.0
#> [25] IRanges_2.18.3 parallel_3.6.0 AnnotationDbi_1.46.1 highr_0.8
#> [29] Rcpp_1.0.3 xtable_1.8-4 backports_1.1.5 S4Vectors_0.22.1
#> [33] annotate_1.62.0 skmeans_0.2-11 bit_1.1-14 microbenchmark_1.4-7
#> [37] brew_1.0-6 impute_1.58.0 rjson_0.2.20 png_0.1-7
#> [41] digest_0.6.23 stringi_1.4.3 polyclip_1.10-0 clue_0.3-57
#> [45] tools_3.6.0 bitops_1.0-6 magrittr_1.5 eulerr_6.0.0
#> [49] RCurl_1.95-4.12 RSQLite_2.1.4 tibble_2.1.3 cluster_2.1.0
#> [53] crayon_1.3.4 pkgconfig_2.0.3 zeallot_0.1.0 Matrix_1.2-17
#> [57] xml2_1.2.2 httr_1.4.1 R6_2.4.1 mclust_5.4.5
#> [61] compiler_3.6.0