Date: 2019-12-25 21:36:58 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 54547 rows and 93 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] 54547 93
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 | ||
---|---|---|---|---|---|---|
CV:skmeans | 2 | 1.000 | 0.972 | 0.989 | ** | |
ATC:kmeans | 2 | 1.000 | 0.970 | 0.988 | ** | |
ATC:skmeans | 2 | 1.000 | 0.960 | 0.984 | ** | |
SD:kmeans | 2 | 0.997 | 0.956 | 0.981 | ** | |
CV:kmeans | 2 | 0.997 | 0.962 | 0.983 | ** | |
CV:NMF | 2 | 0.978 | 0.956 | 0.982 | ** | |
SD:NMF | 2 | 0.977 | 0.956 | 0.982 | ** | |
MAD:pam | 2 | 0.955 | 0.931 | 0.972 | ** | |
MAD:skmeans | 3 | 0.950 | 0.923 | 0.969 | ** | 2 |
SD:skmeans | 3 | 0.942 | 0.953 | 0.977 | * | 2 |
ATC:NMF | 2 | 0.933 | 0.952 | 0.979 | * | |
MAD:NMF | 2 | 0.869 | 0.917 | 0.965 | ||
SD:pam | 2 | 0.848 | 0.909 | 0.961 | ||
CV:pam | 2 | 0.809 | 0.912 | 0.961 | ||
MAD:kmeans | 2 | 0.789 | 0.910 | 0.962 | ||
ATC:pam | 2 | 0.753 | 0.874 | 0.944 | ||
SD:mclust | 4 | 0.746 | 0.834 | 0.926 | ||
MAD:mclust | 3 | 0.687 | 0.832 | 0.922 | ||
ATC:mclust | 3 | 0.664 | 0.867 | 0.897 | ||
ATC:hclust | 2 | 0.552 | 0.918 | 0.925 | ||
SD:hclust | 2 | 0.522 | 0.823 | 0.911 | ||
MAD:hclust | 2 | 0.417 | 0.709 | 0.865 | ||
CV:hclust | 2 | 0.319 | 0.777 | 0.860 | ||
CV:mclust | 2 | 0.275 | 0.767 | 0.845 |
**: 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.977 0.956 0.982 0.504 0.495 0.495
#> CV:NMF 2 0.978 0.956 0.982 0.505 0.495 0.495
#> MAD:NMF 2 0.869 0.917 0.965 0.502 0.496 0.496
#> ATC:NMF 2 0.933 0.952 0.979 0.504 0.495 0.495
#> SD:skmeans 2 1.000 0.978 0.991 0.506 0.495 0.495
#> CV:skmeans 2 1.000 0.972 0.989 0.506 0.495 0.495
#> MAD:skmeans 2 1.000 0.960 0.983 0.506 0.495 0.495
#> ATC:skmeans 2 1.000 0.960 0.984 0.506 0.495 0.495
#> SD:mclust 2 0.503 0.804 0.836 0.334 0.566 0.566
#> CV:mclust 2 0.275 0.767 0.845 0.426 0.544 0.544
#> MAD:mclust 2 0.534 0.755 0.863 0.448 0.531 0.531
#> ATC:mclust 2 0.433 0.842 0.853 0.408 0.583 0.583
#> SD:kmeans 2 0.997 0.956 0.981 0.505 0.495 0.495
#> CV:kmeans 2 0.997 0.962 0.983 0.505 0.495 0.495
#> MAD:kmeans 2 0.789 0.910 0.962 0.504 0.495 0.495
#> ATC:kmeans 2 1.000 0.970 0.988 0.506 0.495 0.495
#> SD:pam 2 0.848 0.909 0.961 0.501 0.497 0.497
#> CV:pam 2 0.809 0.912 0.961 0.500 0.499 0.499
#> MAD:pam 2 0.955 0.931 0.972 0.505 0.495 0.495
#> ATC:pam 2 0.753 0.874 0.944 0.501 0.495 0.495
#> SD:hclust 2 0.522 0.823 0.911 0.471 0.516 0.516
#> CV:hclust 2 0.319 0.777 0.860 0.463 0.520 0.520
#> MAD:hclust 2 0.417 0.709 0.865 0.467 0.531 0.531
#> ATC:hclust 2 0.552 0.918 0.925 0.465 0.496 0.496
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.592 0.700 0.859 0.309 0.798 0.612
#> CV:NMF 3 0.635 0.638 0.850 0.304 0.815 0.639
#> MAD:NMF 3 0.623 0.707 0.873 0.320 0.773 0.575
#> ATC:NMF 3 0.770 0.846 0.929 0.301 0.763 0.557
#> SD:skmeans 3 0.942 0.953 0.977 0.284 0.798 0.614
#> CV:skmeans 3 0.789 0.890 0.941 0.285 0.816 0.642
#> MAD:skmeans 3 0.950 0.923 0.969 0.296 0.798 0.614
#> ATC:skmeans 3 0.834 0.770 0.887 0.259 0.870 0.743
#> SD:mclust 3 0.569 0.797 0.856 0.806 0.710 0.538
#> CV:mclust 3 0.395 0.617 0.781 0.398 0.808 0.661
#> MAD:mclust 3 0.687 0.832 0.922 0.428 0.710 0.508
#> ATC:mclust 3 0.664 0.867 0.897 0.486 0.803 0.666
#> SD:kmeans 3 0.613 0.781 0.866 0.282 0.815 0.641
#> CV:kmeans 3 0.594 0.634 0.793 0.265 0.869 0.740
#> MAD:kmeans 3 0.722 0.814 0.769 0.298 0.798 0.615
#> ATC:kmeans 3 0.654 0.741 0.864 0.284 0.736 0.523
#> SD:pam 3 0.817 0.851 0.939 0.339 0.742 0.524
#> CV:pam 3 0.804 0.858 0.925 0.340 0.744 0.528
#> MAD:pam 3 0.711 0.712 0.884 0.314 0.765 0.557
#> ATC:pam 3 0.765 0.855 0.942 0.194 0.888 0.778
#> SD:hclust 3 0.370 0.601 0.780 0.271 0.840 0.690
#> CV:hclust 3 0.308 0.708 0.815 0.227 0.899 0.806
#> MAD:hclust 3 0.388 0.569 0.718 0.334 0.769 0.577
#> ATC:hclust 3 0.715 0.889 0.943 0.276 0.896 0.795
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.665 0.743 0.851 0.1076 0.870 0.648
#> CV:NMF 4 0.746 0.763 0.864 0.1095 0.830 0.564
#> MAD:NMF 4 0.588 0.615 0.815 0.1009 0.835 0.575
#> ATC:NMF 4 0.588 0.638 0.802 0.1223 0.839 0.579
#> SD:skmeans 4 0.758 0.651 0.843 0.1295 0.910 0.746
#> CV:skmeans 4 0.830 0.851 0.919 0.1328 0.908 0.742
#> MAD:skmeans 4 0.693 0.645 0.847 0.1239 0.875 0.660
#> ATC:skmeans 4 0.724 0.803 0.882 0.1619 0.753 0.439
#> SD:mclust 4 0.746 0.834 0.926 0.1201 0.876 0.710
#> CV:mclust 4 0.595 0.698 0.824 0.2019 0.795 0.532
#> MAD:mclust 4 0.886 0.825 0.940 0.0560 0.953 0.871
#> ATC:mclust 4 0.597 0.695 0.820 0.1605 0.905 0.764
#> SD:kmeans 4 0.676 0.631 0.795 0.1157 0.927 0.801
#> CV:kmeans 4 0.661 0.798 0.849 0.1314 0.835 0.595
#> MAD:kmeans 4 0.630 0.654 0.793 0.1139 0.910 0.749
#> ATC:kmeans 4 0.655 0.711 0.837 0.1352 0.798 0.503
#> SD:pam 4 0.667 0.672 0.822 0.0880 0.899 0.712
#> CV:pam 4 0.624 0.617 0.784 0.0992 0.914 0.751
#> MAD:pam 4 0.717 0.769 0.868 0.1203 0.853 0.597
#> ATC:pam 4 0.793 0.820 0.915 0.1605 0.869 0.689
#> SD:hclust 4 0.464 0.717 0.839 0.1041 0.903 0.752
#> CV:hclust 4 0.425 0.690 0.832 0.1335 0.918 0.807
#> MAD:hclust 4 0.476 0.592 0.734 0.0963 0.910 0.752
#> ATC:hclust 4 0.685 0.713 0.801 0.1696 0.919 0.802
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.740 0.722 0.848 0.0606 0.930 0.751
#> CV:NMF 5 0.746 0.721 0.861 0.0622 0.938 0.777
#> MAD:NMF 5 0.674 0.656 0.809 0.0670 0.870 0.581
#> ATC:NMF 5 0.558 0.449 0.689 0.0732 0.867 0.555
#> SD:skmeans 5 0.718 0.691 0.823 0.0599 0.925 0.740
#> CV:skmeans 5 0.704 0.651 0.809 0.0672 0.973 0.900
#> MAD:skmeans 5 0.660 0.512 0.674 0.0600 0.842 0.490
#> ATC:skmeans 5 0.713 0.710 0.843 0.0573 0.922 0.709
#> SD:mclust 5 0.662 0.666 0.826 0.1063 0.921 0.764
#> CV:mclust 5 0.631 0.634 0.798 0.0518 0.912 0.716
#> MAD:mclust 5 0.692 0.629 0.745 0.1057 0.897 0.703
#> ATC:mclust 5 0.692 0.760 0.801 0.1088 0.803 0.447
#> SD:kmeans 5 0.673 0.730 0.805 0.0730 0.914 0.726
#> CV:kmeans 5 0.729 0.735 0.825 0.0731 0.964 0.872
#> MAD:kmeans 5 0.638 0.591 0.705 0.0642 0.909 0.702
#> ATC:kmeans 5 0.800 0.783 0.861 0.0661 0.930 0.744
#> SD:pam 5 0.698 0.591 0.765 0.0712 0.925 0.723
#> CV:pam 5 0.706 0.686 0.798 0.0605 0.926 0.745
#> MAD:pam 5 0.682 0.715 0.831 0.0391 0.968 0.875
#> ATC:pam 5 0.754 0.804 0.876 0.1133 0.888 0.659
#> SD:hclust 5 0.563 0.618 0.796 0.1237 0.911 0.735
#> CV:hclust 5 0.592 0.684 0.834 0.1393 0.884 0.675
#> MAD:hclust 5 0.601 0.633 0.796 0.0938 0.930 0.780
#> ATC:hclust 5 0.655 0.743 0.831 0.1178 0.859 0.590
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.765 0.639 0.828 0.0518 0.914 0.653
#> CV:NMF 6 0.803 0.713 0.867 0.0530 0.907 0.635
#> MAD:NMF 6 0.693 0.613 0.774 0.0443 0.913 0.654
#> ATC:NMF 6 0.599 0.433 0.669 0.0385 0.783 0.292
#> SD:skmeans 6 0.716 0.565 0.757 0.0453 0.920 0.676
#> CV:skmeans 6 0.695 0.568 0.745 0.0430 0.913 0.668
#> MAD:skmeans 6 0.700 0.658 0.783 0.0405 0.893 0.572
#> ATC:skmeans 6 0.777 0.703 0.834 0.0355 0.921 0.665
#> SD:mclust 6 0.653 0.577 0.733 0.0659 0.939 0.784
#> CV:mclust 6 0.641 0.539 0.748 0.0510 0.935 0.764
#> MAD:mclust 6 0.710 0.671 0.761 0.0630 0.896 0.631
#> ATC:mclust 6 0.833 0.776 0.882 0.0511 0.924 0.676
#> SD:kmeans 6 0.722 0.632 0.758 0.0505 0.930 0.712
#> CV:kmeans 6 0.711 0.583 0.764 0.0486 0.950 0.801
#> MAD:kmeans 6 0.670 0.552 0.720 0.0449 0.920 0.687
#> ATC:kmeans 6 0.762 0.735 0.822 0.0485 0.913 0.638
#> SD:pam 6 0.682 0.451 0.671 0.0346 0.843 0.449
#> CV:pam 6 0.747 0.651 0.831 0.0356 0.944 0.765
#> MAD:pam 6 0.700 0.545 0.770 0.0478 0.930 0.717
#> ATC:pam 6 0.886 0.830 0.934 0.0624 0.928 0.702
#> SD:hclust 6 0.615 0.485 0.687 0.0511 0.946 0.797
#> CV:hclust 6 0.660 0.627 0.791 0.0576 0.960 0.848
#> MAD:hclust 6 0.617 0.573 0.730 0.0560 0.927 0.723
#> ATC:hclust 6 0.746 0.738 0.832 0.0552 0.962 0.825
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 specimen(p) disease.state(p) k
#> SD:NMF 91 0.020140 1.000 2
#> CV:NMF 91 0.024116 0.901 2
#> MAD:NMF 90 0.015363 0.742 2
#> ATC:NMF 93 0.170014 1.000 2
#> SD:skmeans 93 0.024310 0.930 2
#> CV:skmeans 92 0.025928 1.000 2
#> MAD:skmeans 92 0.024825 1.000 2
#> ATC:skmeans 91 0.181714 1.000 2
#> SD:mclust 81 0.000322 0.451 2
#> CV:mclust 84 0.000427 0.516 2
#> MAD:mclust 90 0.063492 1.000 2
#> ATC:mclust 89 0.958289 1.000 2
#> SD:kmeans 92 0.024825 1.000 2
#> CV:kmeans 92 0.025928 1.000 2
#> MAD:kmeans 90 0.022261 0.801 2
#> ATC:kmeans 91 0.236578 0.957 2
#> SD:pam 89 0.065651 0.889 2
#> CV:pam 90 0.046297 0.935 2
#> MAD:pam 88 0.028787 0.666 2
#> ATC:pam 87 0.084703 0.930 2
#> SD:hclust 89 0.000841 0.374 2
#> CV:hclust 88 0.001940 0.328 2
#> MAD:hclust 79 0.005628 0.252 2
#> ATC:hclust 92 0.081466 0.912 2
test_to_known_factors(res_list, k = 3)
#> n specimen(p) disease.state(p) k
#> SD:NMF 80 0.006173 0.264 3
#> CV:NMF 68 0.018174 0.542 3
#> MAD:NMF 75 0.018171 0.575 3
#> ATC:NMF 87 0.073878 0.751 3
#> SD:skmeans 92 0.004308 0.257 3
#> CV:skmeans 92 0.007441 0.385 3
#> MAD:skmeans 88 0.006328 0.287 3
#> ATC:skmeans 88 0.165250 0.882 3
#> SD:mclust 87 0.004499 0.846 3
#> CV:mclust 68 0.000546 0.694 3
#> MAD:mclust 86 0.005374 0.315 3
#> ATC:mclust 90 0.143193 0.821 3
#> SD:kmeans 85 0.003299 0.276 3
#> CV:kmeans 72 0.039266 0.748 3
#> MAD:kmeans 88 0.002326 0.163 3
#> ATC:kmeans 80 0.179240 0.410 3
#> SD:pam 85 0.008953 0.114 3
#> CV:pam 89 0.001612 0.159 3
#> MAD:pam 75 0.003976 0.246 3
#> ATC:pam 87 0.170277 0.266 3
#> SD:hclust 75 0.028210 0.395 3
#> CV:hclust 81 0.051049 0.702 3
#> MAD:hclust 58 0.020875 0.634 3
#> ATC:hclust 91 0.098667 0.320 3
test_to_known_factors(res_list, k = 4)
#> n specimen(p) disease.state(p) k
#> SD:NMF 78 0.00797 0.365 4
#> CV:NMF 80 0.00467 0.373 4
#> MAD:NMF 68 0.08781 0.162 4
#> ATC:NMF 71 0.24176 0.826 4
#> SD:skmeans 70 0.06879 0.769 4
#> CV:skmeans 88 0.00359 0.594 4
#> MAD:skmeans 71 0.01924 0.491 4
#> ATC:skmeans 88 0.08068 0.807 4
#> SD:mclust 91 0.07517 0.534 4
#> CV:mclust 78 0.04261 0.553 4
#> MAD:mclust 84 0.06274 0.425 4
#> ATC:mclust 82 0.35136 0.808 4
#> SD:kmeans 69 0.01415 0.252 4
#> CV:kmeans 85 0.01471 0.203 4
#> MAD:kmeans 74 0.02249 0.155 4
#> ATC:kmeans 79 0.20102 0.802 4
#> SD:pam 74 0.00083 0.157 4
#> CV:pam 77 0.02139 0.136 4
#> MAD:pam 89 0.06546 0.941 4
#> ATC:pam 88 0.26118 0.191 4
#> SD:hclust 86 0.01609 0.693 4
#> CV:hclust 84 0.06125 0.794 4
#> MAD:hclust 61 0.13311 0.389 4
#> ATC:hclust 82 0.06601 0.125 4
test_to_known_factors(res_list, k = 5)
#> n specimen(p) disease.state(p) k
#> SD:NMF 80 0.047532 0.549 5
#> CV:NMF 78 0.105687 0.467 5
#> MAD:NMF 74 0.038807 0.434 5
#> ATC:NMF 50 0.642346 0.797 5
#> SD:skmeans 79 0.060232 0.587 5
#> CV:skmeans 74 0.005489 0.638 5
#> MAD:skmeans 54 0.416812 0.847 5
#> ATC:skmeans 78 0.467767 0.753 5
#> SD:mclust 73 0.042269 0.659 5
#> CV:mclust 72 0.045444 0.432 5
#> MAD:mclust 79 0.180065 0.274 5
#> ATC:mclust 85 0.164276 0.889 5
#> SD:kmeans 85 0.025831 0.458 5
#> CV:kmeans 83 0.062960 0.526 5
#> MAD:kmeans 74 0.057165 0.369 5
#> ATC:kmeans 86 0.426317 0.920 5
#> SD:pam 71 0.000666 0.178 5
#> CV:pam 83 0.010443 0.129 5
#> MAD:pam 86 0.083803 0.890 5
#> ATC:pam 88 0.006316 0.112 5
#> SD:hclust 74 0.037414 0.331 5
#> CV:hclust 79 0.078068 0.912 5
#> MAD:hclust 75 0.347926 0.595 5
#> ATC:hclust 85 0.058065 0.465 5
test_to_known_factors(res_list, k = 6)
#> n specimen(p) disease.state(p) k
#> SD:NMF 66 1.51e-01 0.608 6
#> CV:NMF 77 4.88e-01 0.846 6
#> MAD:NMF 65 1.47e-01 0.585 6
#> ATC:NMF 37 1.02e-01 0.694 6
#> SD:skmeans 55 1.31e-01 0.922 6
#> CV:skmeans 56 4.23e-01 0.775 6
#> MAD:skmeans 78 2.21e-01 0.849 6
#> ATC:skmeans 76 4.45e-01 0.670 6
#> SD:mclust 76 2.95e-01 0.879 6
#> CV:mclust 67 2.82e-02 0.379 6
#> MAD:mclust 81 6.13e-02 0.784 6
#> ATC:mclust 83 1.04e-01 0.647 6
#> SD:kmeans 74 9.92e-03 0.608 6
#> CV:kmeans 66 4.75e-01 0.834 6
#> MAD:kmeans 64 2.61e-01 0.773 6
#> ATC:kmeans 82 1.52e-01 0.607 6
#> SD:pam 47 7.35e-01 0.765 6
#> CV:pam 78 1.42e-05 0.136 6
#> MAD:pam 72 2.23e-02 0.544 6
#> ATC:pam 83 4.28e-02 0.336 6
#> SD:hclust 54 3.85e-02 0.531 6
#> CV:hclust 75 9.10e-02 0.753 6
#> MAD:hclust 68 3.70e-01 0.677 6
#> ATC:hclust 84 2.64e-01 0.396 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 54547 rows and 93 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 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.522 0.823 0.911 0.4709 0.516 0.516
#> 3 3 0.370 0.601 0.780 0.2715 0.840 0.690
#> 4 4 0.464 0.717 0.839 0.1041 0.903 0.752
#> 5 5 0.563 0.618 0.796 0.1237 0.911 0.735
#> 6 6 0.615 0.485 0.687 0.0511 0.946 0.797
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
#> GSM786527 2 0.0000 0.874 0.000 1.000
#> GSM786539 2 0.7950 0.716 0.240 0.760
#> GSM786541 2 0.0000 0.874 0.000 1.000
#> GSM786556 2 0.0000 0.874 0.000 1.000
#> GSM786523 1 0.6438 0.812 0.836 0.164
#> GSM786497 1 0.0000 0.913 1.000 0.000
#> GSM786501 2 0.8267 0.693 0.260 0.740
#> GSM786517 2 0.0000 0.874 0.000 1.000
#> GSM786534 2 0.0376 0.873 0.004 0.996
#> GSM786555 2 0.0000 0.874 0.000 1.000
#> GSM786558 2 0.0000 0.874 0.000 1.000
#> GSM786559 2 0.0938 0.872 0.012 0.988
#> GSM786565 2 0.0000 0.874 0.000 1.000
#> GSM786572 2 0.0376 0.874 0.004 0.996
#> GSM786579 2 0.0938 0.872 0.012 0.988
#> GSM786491 1 0.2043 0.912 0.968 0.032
#> GSM786509 1 0.0000 0.913 1.000 0.000
#> GSM786538 1 0.0672 0.914 0.992 0.008
#> GSM786548 2 0.0672 0.873 0.008 0.992
#> GSM786562 1 0.2236 0.911 0.964 0.036
#> GSM786566 1 0.2236 0.911 0.964 0.036
#> GSM786573 2 0.9795 0.269 0.416 0.584
#> GSM786574 2 0.0000 0.874 0.000 1.000
#> GSM786580 1 0.3584 0.898 0.932 0.068
#> GSM786581 2 0.6148 0.793 0.152 0.848
#> GSM786583 1 0.6623 0.804 0.828 0.172
#> GSM786492 1 0.0000 0.913 1.000 0.000
#> GSM786493 2 0.5059 0.825 0.112 0.888
#> GSM786499 2 0.8267 0.693 0.260 0.740
#> GSM786502 1 0.5842 0.822 0.860 0.140
#> GSM786537 1 0.0000 0.913 1.000 0.000
#> GSM786567 2 0.0000 0.874 0.000 1.000
#> GSM786498 1 0.3733 0.890 0.928 0.072
#> GSM786500 1 0.0000 0.913 1.000 0.000
#> GSM786503 1 0.2043 0.912 0.968 0.032
#> GSM786507 2 0.8327 0.688 0.264 0.736
#> GSM786515 2 0.5059 0.825 0.112 0.888
#> GSM786522 1 0.0672 0.914 0.992 0.008
#> GSM786526 1 0.2423 0.910 0.960 0.040
#> GSM786528 1 0.2423 0.910 0.960 0.040
#> GSM786531 1 0.7056 0.783 0.808 0.192
#> GSM786535 2 0.7883 0.688 0.236 0.764
#> GSM786543 1 0.0000 0.913 1.000 0.000
#> GSM786545 1 0.6531 0.808 0.832 0.168
#> GSM786551 1 0.1414 0.914 0.980 0.020
#> GSM786552 2 0.9286 0.482 0.344 0.656
#> GSM786554 2 0.0000 0.874 0.000 1.000
#> GSM786557 1 0.0376 0.914 0.996 0.004
#> GSM786560 1 0.0000 0.913 1.000 0.000
#> GSM786564 2 0.0000 0.874 0.000 1.000
#> GSM786568 1 0.9248 0.532 0.660 0.340
#> GSM786569 1 0.0000 0.913 1.000 0.000
#> GSM786571 1 0.9170 0.545 0.668 0.332
#> GSM786496 2 0.0000 0.874 0.000 1.000
#> GSM786506 1 0.1843 0.913 0.972 0.028
#> GSM786508 1 0.6343 0.802 0.840 0.160
#> GSM786512 1 0.6343 0.802 0.840 0.160
#> GSM786518 1 0.0000 0.913 1.000 0.000
#> GSM786519 1 0.0000 0.913 1.000 0.000
#> GSM786524 1 0.0000 0.913 1.000 0.000
#> GSM786529 1 0.9044 0.567 0.680 0.320
#> GSM786530 1 0.0938 0.913 0.988 0.012
#> GSM786532 1 0.0672 0.914 0.992 0.008
#> GSM786533 1 0.9977 0.136 0.528 0.472
#> GSM786544 1 0.6887 0.794 0.816 0.184
#> GSM786547 1 0.9248 0.530 0.660 0.340
#> GSM786549 1 0.6438 0.812 0.836 0.164
#> GSM786550 1 0.3584 0.898 0.932 0.068
#> GSM786563 2 0.0672 0.873 0.008 0.992
#> GSM786570 2 0.0000 0.874 0.000 1.000
#> GSM786576 2 0.0000 0.874 0.000 1.000
#> GSM786577 1 0.0000 0.913 1.000 0.000
#> GSM786578 2 0.1633 0.868 0.024 0.976
#> GSM786582 1 0.0376 0.914 0.996 0.004
#> GSM786495 2 0.8267 0.693 0.260 0.740
#> GSM786505 1 0.0376 0.914 0.996 0.004
#> GSM786511 1 0.0000 0.913 1.000 0.000
#> GSM786513 1 0.1184 0.914 0.984 0.016
#> GSM786525 2 0.9866 0.303 0.432 0.568
#> GSM786540 2 0.1184 0.871 0.016 0.984
#> GSM786553 1 0.1414 0.915 0.980 0.020
#> GSM786561 1 0.0000 0.913 1.000 0.000
#> GSM786575 1 0.2043 0.912 0.968 0.032
#> GSM786494 1 0.2043 0.912 0.968 0.032
#> GSM786504 1 0.1184 0.914 0.984 0.016
#> GSM786510 2 0.8386 0.682 0.268 0.732
#> GSM786514 1 0.1184 0.914 0.984 0.016
#> GSM786516 1 0.6438 0.812 0.836 0.164
#> GSM786520 1 0.0000 0.913 1.000 0.000
#> GSM786521 1 0.3584 0.898 0.932 0.068
#> GSM786536 1 0.3733 0.895 0.928 0.072
#> GSM786542 2 0.8909 0.562 0.308 0.692
#> GSM786546 2 0.7883 0.688 0.236 0.764
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786539 2 0.6625 0.690 0.068 0.736 0.196
#> GSM786541 2 0.0747 0.857 0.000 0.984 0.016
#> GSM786556 2 0.0747 0.857 0.000 0.984 0.016
#> GSM786523 3 0.8625 0.574 0.316 0.124 0.560
#> GSM786497 1 0.0592 0.708 0.988 0.000 0.012
#> GSM786501 2 0.6906 0.672 0.084 0.724 0.192
#> GSM786517 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786534 2 0.1031 0.856 0.000 0.976 0.024
#> GSM786555 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786558 2 0.0237 0.859 0.000 0.996 0.004
#> GSM786559 2 0.0592 0.859 0.000 0.988 0.012
#> GSM786565 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786572 2 0.0424 0.859 0.000 0.992 0.008
#> GSM786579 2 0.0592 0.859 0.000 0.988 0.012
#> GSM786491 3 0.4750 0.521 0.216 0.000 0.784
#> GSM786509 1 0.6274 -0.299 0.544 0.000 0.456
#> GSM786538 3 0.6140 0.558 0.404 0.000 0.596
#> GSM786548 2 0.0747 0.859 0.000 0.984 0.016
#> GSM786562 3 0.6307 0.630 0.328 0.012 0.660
#> GSM786566 3 0.6307 0.630 0.328 0.012 0.660
#> GSM786573 2 0.8516 0.145 0.112 0.560 0.328
#> GSM786574 2 0.0237 0.859 0.000 0.996 0.004
#> GSM786580 3 0.1781 0.432 0.020 0.020 0.960
#> GSM786581 2 0.4589 0.760 0.008 0.820 0.172
#> GSM786583 3 0.8546 0.592 0.284 0.132 0.584
#> GSM786492 1 0.1289 0.685 0.968 0.000 0.032
#> GSM786493 2 0.3784 0.801 0.004 0.864 0.132
#> GSM786499 2 0.6906 0.672 0.084 0.724 0.192
#> GSM786502 3 0.8534 0.549 0.320 0.116 0.564
#> GSM786537 1 0.1529 0.689 0.960 0.000 0.040
#> GSM786567 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786498 3 0.7379 0.603 0.336 0.048 0.616
#> GSM786500 1 0.0000 0.710 1.000 0.000 0.000
#> GSM786503 3 0.6008 0.628 0.332 0.004 0.664
#> GSM786507 2 0.7047 0.660 0.084 0.712 0.204
#> GSM786515 2 0.3784 0.801 0.004 0.864 0.132
#> GSM786522 3 0.6168 0.545 0.412 0.000 0.588
#> GSM786526 3 0.6297 0.619 0.352 0.008 0.640
#> GSM786528 3 0.6297 0.619 0.352 0.008 0.640
#> GSM786531 3 0.8666 0.588 0.264 0.152 0.584
#> GSM786535 2 0.6066 0.625 0.024 0.728 0.248
#> GSM786543 1 0.2165 0.699 0.936 0.000 0.064
#> GSM786545 3 0.8700 0.561 0.320 0.128 0.552
#> GSM786551 1 0.6944 -0.302 0.516 0.016 0.468
#> GSM786552 2 0.6648 0.387 0.016 0.620 0.364
#> GSM786554 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786557 3 0.6260 0.498 0.448 0.000 0.552
#> GSM786560 1 0.6274 -0.299 0.544 0.000 0.456
#> GSM786564 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786568 3 0.9322 0.471 0.192 0.304 0.504
#> GSM786569 1 0.0747 0.710 0.984 0.000 0.016
#> GSM786571 3 0.9299 0.474 0.196 0.292 0.512
#> GSM786496 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786506 3 0.6033 0.625 0.336 0.004 0.660
#> GSM786508 3 0.8489 0.573 0.268 0.136 0.596
#> GSM786512 3 0.8489 0.573 0.268 0.136 0.596
#> GSM786518 1 0.0000 0.710 1.000 0.000 0.000
#> GSM786519 1 0.4399 0.535 0.812 0.000 0.188
#> GSM786524 1 0.3482 0.654 0.872 0.000 0.128
#> GSM786529 3 0.9337 0.482 0.208 0.280 0.512
#> GSM786530 1 0.5072 0.571 0.792 0.012 0.196
#> GSM786532 3 0.6168 0.550 0.412 0.000 0.588
#> GSM786533 3 0.8574 0.238 0.096 0.432 0.472
#> GSM786544 3 0.8752 0.581 0.292 0.144 0.564
#> GSM786547 3 0.9268 0.471 0.188 0.300 0.512
#> GSM786549 3 0.8462 0.594 0.288 0.124 0.588
#> GSM786550 3 0.1781 0.432 0.020 0.020 0.960
#> GSM786563 2 0.0747 0.859 0.000 0.984 0.016
#> GSM786570 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.859 0.000 1.000 0.000
#> GSM786577 1 0.1964 0.700 0.944 0.000 0.056
#> GSM786578 2 0.1182 0.854 0.012 0.976 0.012
#> GSM786582 1 0.6260 -0.199 0.552 0.000 0.448
#> GSM786495 2 0.6906 0.672 0.084 0.724 0.192
#> GSM786505 3 0.6204 0.532 0.424 0.000 0.576
#> GSM786511 1 0.0000 0.710 1.000 0.000 0.000
#> GSM786513 3 0.6140 0.573 0.404 0.000 0.596
#> GSM786525 2 0.8180 0.220 0.076 0.532 0.392
#> GSM786540 2 0.0747 0.857 0.000 0.984 0.016
#> GSM786553 3 0.5982 0.629 0.328 0.004 0.668
#> GSM786561 1 0.0892 0.708 0.980 0.000 0.020
#> GSM786575 3 0.4750 0.521 0.216 0.000 0.784
#> GSM786494 3 0.4750 0.521 0.216 0.000 0.784
#> GSM786504 3 0.6140 0.573 0.404 0.000 0.596
#> GSM786510 2 0.7092 0.655 0.084 0.708 0.208
#> GSM786514 3 0.6062 0.593 0.384 0.000 0.616
#> GSM786516 3 0.8604 0.578 0.312 0.124 0.564
#> GSM786520 1 0.6280 -0.312 0.540 0.000 0.460
#> GSM786521 3 0.1781 0.432 0.020 0.020 0.960
#> GSM786536 3 0.7037 0.627 0.328 0.036 0.636
#> GSM786542 2 0.6473 0.475 0.016 0.652 0.332
#> GSM786546 2 0.6066 0.625 0.024 0.728 0.248
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786539 2 0.4601 0.687 0.256 0.732 0.004 0.008
#> GSM786541 2 0.0779 0.842 0.000 0.980 0.016 0.004
#> GSM786556 2 0.0779 0.842 0.000 0.980 0.016 0.004
#> GSM786523 1 0.6332 0.709 0.712 0.120 0.032 0.136
#> GSM786497 4 0.1302 0.849 0.044 0.000 0.000 0.956
#> GSM786501 2 0.4690 0.666 0.268 0.720 0.004 0.008
#> GSM786517 2 0.0376 0.845 0.004 0.992 0.004 0.000
#> GSM786534 2 0.1114 0.841 0.008 0.972 0.016 0.004
#> GSM786555 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786558 2 0.0336 0.845 0.000 0.992 0.008 0.000
#> GSM786559 2 0.0657 0.845 0.012 0.984 0.004 0.000
#> GSM786565 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786572 2 0.0524 0.844 0.000 0.988 0.008 0.004
#> GSM786579 2 0.0657 0.845 0.012 0.984 0.004 0.000
#> GSM786491 3 0.6023 0.665 0.344 0.000 0.600 0.056
#> GSM786509 1 0.4456 0.605 0.716 0.000 0.004 0.280
#> GSM786538 1 0.2401 0.746 0.904 0.000 0.004 0.092
#> GSM786548 2 0.0657 0.844 0.004 0.984 0.012 0.000
#> GSM786562 1 0.0992 0.746 0.976 0.008 0.004 0.012
#> GSM786566 1 0.0992 0.746 0.976 0.008 0.004 0.012
#> GSM786573 2 0.6198 0.122 0.400 0.556 0.016 0.028
#> GSM786574 2 0.0336 0.845 0.000 0.992 0.008 0.000
#> GSM786580 3 0.0779 0.696 0.004 0.016 0.980 0.000
#> GSM786581 2 0.3681 0.756 0.176 0.816 0.008 0.000
#> GSM786583 1 0.6018 0.717 0.736 0.128 0.032 0.104
#> GSM786492 4 0.1629 0.822 0.024 0.000 0.024 0.952
#> GSM786493 2 0.3052 0.791 0.136 0.860 0.004 0.000
#> GSM786499 2 0.4690 0.666 0.268 0.720 0.004 0.008
#> GSM786502 1 0.4398 0.657 0.820 0.104 0.004 0.072
#> GSM786537 4 0.1833 0.828 0.032 0.000 0.024 0.944
#> GSM786567 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786498 1 0.3292 0.714 0.880 0.036 0.004 0.080
#> GSM786500 4 0.1302 0.850 0.044 0.000 0.000 0.956
#> GSM786503 1 0.0592 0.747 0.984 0.000 0.000 0.016
#> GSM786507 2 0.4773 0.658 0.280 0.708 0.004 0.008
#> GSM786515 2 0.3052 0.791 0.136 0.860 0.004 0.000
#> GSM786522 1 0.2530 0.743 0.896 0.000 0.004 0.100
#> GSM786526 1 0.2380 0.758 0.920 0.008 0.008 0.064
#> GSM786528 1 0.2380 0.758 0.920 0.008 0.008 0.064
#> GSM786531 1 0.6155 0.709 0.724 0.144 0.032 0.100
#> GSM786535 2 0.5282 0.618 0.240 0.720 0.028 0.012
#> GSM786543 4 0.2530 0.844 0.100 0.000 0.004 0.896
#> GSM786545 1 0.6651 0.689 0.684 0.124 0.032 0.160
#> GSM786551 1 0.5343 0.515 0.640 0.016 0.004 0.340
#> GSM786552 2 0.5847 0.380 0.352 0.612 0.024 0.012
#> GSM786554 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786557 1 0.3105 0.733 0.856 0.000 0.004 0.140
#> GSM786560 1 0.4584 0.574 0.696 0.000 0.004 0.300
#> GSM786564 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786568 1 0.6646 0.571 0.620 0.292 0.024 0.064
#> GSM786569 4 0.2944 0.837 0.128 0.000 0.004 0.868
#> GSM786571 1 0.6758 0.580 0.620 0.284 0.028 0.068
#> GSM786496 2 0.0376 0.845 0.004 0.992 0.004 0.000
#> GSM786506 1 0.0779 0.746 0.980 0.000 0.004 0.016
#> GSM786508 1 0.4309 0.664 0.820 0.124 0.004 0.052
#> GSM786512 1 0.4309 0.664 0.820 0.124 0.004 0.052
#> GSM786518 4 0.2334 0.845 0.088 0.000 0.004 0.908
#> GSM786519 4 0.4837 0.499 0.348 0.000 0.004 0.648
#> GSM786524 4 0.3751 0.761 0.196 0.000 0.004 0.800
#> GSM786529 1 0.6646 0.599 0.632 0.276 0.028 0.064
#> GSM786530 4 0.4869 0.641 0.276 0.012 0.004 0.708
#> GSM786532 1 0.2530 0.745 0.896 0.000 0.004 0.100
#> GSM786533 1 0.6151 0.240 0.540 0.420 0.024 0.016
#> GSM786544 1 0.6383 0.712 0.708 0.136 0.032 0.124
#> GSM786547 1 0.6671 0.570 0.620 0.292 0.028 0.060
#> GSM786549 1 0.5915 0.720 0.744 0.120 0.032 0.104
#> GSM786550 3 0.0779 0.696 0.004 0.016 0.980 0.000
#> GSM786563 2 0.0657 0.844 0.004 0.984 0.012 0.000
#> GSM786570 2 0.0188 0.844 0.000 0.996 0.004 0.000
#> GSM786576 2 0.0376 0.845 0.004 0.992 0.004 0.000
#> GSM786577 4 0.2401 0.844 0.092 0.000 0.004 0.904
#> GSM786578 2 0.1339 0.839 0.024 0.964 0.004 0.008
#> GSM786582 1 0.4936 0.448 0.624 0.000 0.004 0.372
#> GSM786495 2 0.4690 0.666 0.268 0.720 0.004 0.008
#> GSM786505 1 0.2654 0.741 0.888 0.000 0.004 0.108
#> GSM786511 4 0.1302 0.850 0.044 0.000 0.000 0.956
#> GSM786513 1 0.2773 0.749 0.880 0.000 0.004 0.116
#> GSM786525 2 0.5392 0.233 0.460 0.528 0.012 0.000
#> GSM786540 2 0.0779 0.844 0.016 0.980 0.004 0.000
#> GSM786553 1 0.0779 0.751 0.980 0.000 0.004 0.016
#> GSM786561 4 0.2831 0.842 0.120 0.000 0.004 0.876
#> GSM786575 3 0.6023 0.665 0.344 0.000 0.600 0.056
#> GSM786494 3 0.6023 0.665 0.344 0.000 0.600 0.056
#> GSM786504 1 0.2773 0.749 0.880 0.000 0.004 0.116
#> GSM786510 2 0.4799 0.654 0.284 0.704 0.004 0.008
#> GSM786514 1 0.2125 0.754 0.920 0.000 0.004 0.076
#> GSM786516 1 0.6132 0.717 0.728 0.120 0.032 0.120
#> GSM786520 1 0.4428 0.611 0.720 0.000 0.004 0.276
#> GSM786521 3 0.0779 0.696 0.004 0.016 0.980 0.000
#> GSM786536 1 0.3424 0.760 0.880 0.036 0.012 0.072
#> GSM786542 2 0.5775 0.467 0.316 0.644 0.028 0.012
#> GSM786546 2 0.5282 0.618 0.240 0.720 0.028 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000
#> GSM786539 2 0.4528 0.6808 0.212 0.728 0.060 0.000 0.000
#> GSM786541 2 0.2230 0.7912 0.000 0.884 0.116 0.000 0.000
#> GSM786556 2 0.2230 0.7912 0.000 0.884 0.116 0.000 0.000
#> GSM786523 3 0.2846 0.6222 0.052 0.012 0.888 0.048 0.000
#> GSM786497 4 0.0693 0.8251 0.008 0.000 0.012 0.980 0.000
#> GSM786501 2 0.4548 0.6660 0.232 0.716 0.052 0.000 0.000
#> GSM786517 2 0.0162 0.8382 0.004 0.996 0.000 0.000 0.000
#> GSM786534 2 0.2488 0.7857 0.004 0.872 0.124 0.000 0.000
#> GSM786555 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000
#> GSM786558 2 0.0162 0.8382 0.000 0.996 0.004 0.000 0.000
#> GSM786559 2 0.0510 0.8367 0.000 0.984 0.016 0.000 0.000
#> GSM786565 2 0.0162 0.8371 0.000 0.996 0.004 0.000 0.000
#> GSM786572 2 0.1205 0.8317 0.004 0.956 0.040 0.000 0.000
#> GSM786579 2 0.0510 0.8367 0.000 0.984 0.016 0.000 0.000
#> GSM786491 5 0.5783 0.5996 0.324 0.000 0.036 0.044 0.596
#> GSM786509 1 0.4708 0.5357 0.712 0.000 0.068 0.220 0.000
#> GSM786538 1 0.4031 0.6203 0.788 0.000 0.160 0.048 0.004
#> GSM786548 2 0.1638 0.8234 0.004 0.932 0.064 0.000 0.000
#> GSM786562 1 0.2930 0.5884 0.832 0.004 0.164 0.000 0.000
#> GSM786566 1 0.3048 0.5835 0.820 0.004 0.176 0.000 0.000
#> GSM786573 3 0.5892 0.1494 0.060 0.452 0.472 0.016 0.000
#> GSM786574 2 0.0162 0.8382 0.000 0.996 0.004 0.000 0.000
#> GSM786580 5 0.0000 0.7044 0.000 0.000 0.000 0.000 1.000
#> GSM786581 2 0.3723 0.7465 0.152 0.804 0.044 0.000 0.000
#> GSM786583 3 0.2087 0.6514 0.032 0.020 0.928 0.020 0.000
#> GSM786492 4 0.0960 0.8026 0.008 0.000 0.004 0.972 0.016
#> GSM786493 2 0.3269 0.7817 0.096 0.848 0.056 0.000 0.000
#> GSM786499 2 0.4548 0.6660 0.232 0.716 0.052 0.000 0.000
#> GSM786502 1 0.6459 0.2924 0.544 0.088 0.328 0.040 0.000
#> GSM786537 4 0.1588 0.8091 0.008 0.000 0.028 0.948 0.016
#> GSM786567 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000
#> GSM786498 1 0.5575 0.3439 0.584 0.020 0.352 0.044 0.000
#> GSM786500 4 0.0451 0.8249 0.004 0.000 0.008 0.988 0.000
#> GSM786503 1 0.1270 0.6028 0.948 0.000 0.052 0.000 0.000
#> GSM786507 2 0.4701 0.6562 0.236 0.704 0.060 0.000 0.000
#> GSM786515 2 0.3269 0.7817 0.096 0.848 0.056 0.000 0.000
#> GSM786522 1 0.4166 0.6195 0.780 0.000 0.160 0.056 0.004
#> GSM786526 3 0.5403 -0.2318 0.476 0.004 0.480 0.036 0.004
#> GSM786528 1 0.5402 0.1628 0.484 0.004 0.472 0.036 0.004
#> GSM786531 3 0.1216 0.6484 0.020 0.020 0.960 0.000 0.000
#> GSM786535 2 0.4371 0.4611 0.012 0.644 0.344 0.000 0.000
#> GSM786543 4 0.3577 0.7950 0.032 0.000 0.160 0.808 0.000
#> GSM786545 3 0.2824 0.6336 0.028 0.016 0.888 0.068 0.000
#> GSM786551 3 0.6552 0.0187 0.276 0.000 0.476 0.248 0.000
#> GSM786552 2 0.4735 0.1287 0.016 0.524 0.460 0.000 0.000
#> GSM786554 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000
#> GSM786557 1 0.3346 0.6089 0.844 0.000 0.064 0.092 0.000
#> GSM786560 1 0.4847 0.5179 0.692 0.000 0.068 0.240 0.000
#> GSM786564 2 0.0324 0.8372 0.004 0.992 0.004 0.000 0.000
#> GSM786568 3 0.3419 0.6280 0.016 0.180 0.804 0.000 0.000
#> GSM786569 4 0.3427 0.7983 0.108 0.000 0.056 0.836 0.000
#> GSM786571 3 0.4025 0.6278 0.024 0.184 0.780 0.012 0.000
#> GSM786496 2 0.0162 0.8382 0.004 0.996 0.000 0.000 0.000
#> GSM786506 1 0.1197 0.6005 0.952 0.000 0.048 0.000 0.000
#> GSM786508 1 0.6401 0.1748 0.492 0.104 0.384 0.020 0.000
#> GSM786512 1 0.6401 0.1748 0.492 0.104 0.384 0.020 0.000
#> GSM786518 4 0.2172 0.8054 0.076 0.000 0.016 0.908 0.000
#> GSM786519 4 0.5687 0.5519 0.208 0.000 0.164 0.628 0.000
#> GSM786524 4 0.4674 0.7167 0.060 0.000 0.232 0.708 0.000
#> GSM786529 3 0.4419 0.6307 0.032 0.188 0.760 0.020 0.000
#> GSM786530 4 0.4747 0.5803 0.028 0.000 0.352 0.620 0.000
#> GSM786532 1 0.4359 0.6184 0.756 0.000 0.188 0.052 0.004
#> GSM786533 3 0.6021 0.3961 0.144 0.304 0.552 0.000 0.000
#> GSM786544 3 0.2026 0.6395 0.044 0.012 0.928 0.016 0.000
#> GSM786547 3 0.3586 0.6252 0.020 0.188 0.792 0.000 0.000
#> GSM786549 3 0.1967 0.6471 0.036 0.012 0.932 0.020 0.000
#> GSM786550 5 0.0000 0.7044 0.000 0.000 0.000 0.000 1.000
#> GSM786563 2 0.1638 0.8234 0.004 0.932 0.064 0.000 0.000
#> GSM786570 2 0.0324 0.8372 0.004 0.992 0.004 0.000 0.000
#> GSM786576 2 0.0162 0.8382 0.004 0.996 0.000 0.000 0.000
#> GSM786577 4 0.3359 0.7945 0.020 0.000 0.164 0.816 0.000
#> GSM786578 2 0.1121 0.8299 0.000 0.956 0.044 0.000 0.000
#> GSM786582 1 0.6144 0.3144 0.548 0.000 0.172 0.280 0.000
#> GSM786495 2 0.4548 0.6660 0.232 0.716 0.052 0.000 0.000
#> GSM786505 1 0.2795 0.6155 0.880 0.000 0.064 0.056 0.000
#> GSM786511 4 0.0451 0.8249 0.004 0.000 0.008 0.988 0.000
#> GSM786513 1 0.5657 0.4384 0.544 0.000 0.380 0.072 0.004
#> GSM786525 2 0.6046 0.2468 0.376 0.512 0.108 0.000 0.004
#> GSM786540 2 0.0609 0.8356 0.000 0.980 0.020 0.000 0.000
#> GSM786553 1 0.2930 0.6218 0.832 0.000 0.164 0.000 0.004
#> GSM786561 4 0.3454 0.8045 0.100 0.000 0.064 0.836 0.000
#> GSM786575 5 0.5783 0.5996 0.324 0.000 0.036 0.044 0.596
#> GSM786494 5 0.5783 0.5996 0.324 0.000 0.036 0.044 0.596
#> GSM786504 1 0.5657 0.4384 0.544 0.000 0.380 0.072 0.004
#> GSM786510 2 0.4728 0.6518 0.240 0.700 0.060 0.000 0.000
#> GSM786514 1 0.5313 0.2818 0.504 0.000 0.452 0.040 0.004
#> GSM786516 3 0.3352 0.5919 0.100 0.012 0.852 0.036 0.000
#> GSM786520 1 0.4679 0.5388 0.716 0.000 0.068 0.216 0.000
#> GSM786521 5 0.0000 0.7044 0.000 0.000 0.000 0.000 1.000
#> GSM786536 3 0.5564 -0.0454 0.416 0.012 0.532 0.036 0.004
#> GSM786542 2 0.4689 0.2475 0.016 0.560 0.424 0.000 0.000
#> GSM786546 2 0.4371 0.4611 0.012 0.644 0.344 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.0405 0.7913 0.004 0.988 0.000 0.000 0.000 0.008
#> GSM786539 2 0.4482 0.6480 0.188 0.712 0.004 0.000 0.000 0.096
#> GSM786541 2 0.3298 0.6431 0.008 0.756 0.000 0.000 0.000 0.236
#> GSM786556 2 0.3298 0.6431 0.008 0.756 0.000 0.000 0.000 0.236
#> GSM786523 3 0.4209 -0.2238 0.000 0.004 0.588 0.012 0.000 0.396
#> GSM786497 4 0.0777 0.8238 0.004 0.000 0.024 0.972 0.000 0.000
#> GSM786501 2 0.4518 0.6361 0.200 0.696 0.000 0.000 0.000 0.104
#> GSM786517 2 0.0622 0.7920 0.008 0.980 0.000 0.000 0.000 0.012
#> GSM786534 2 0.3608 0.6300 0.012 0.736 0.004 0.000 0.000 0.248
#> GSM786555 2 0.0146 0.7909 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM786558 2 0.0260 0.7913 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM786559 2 0.0767 0.7907 0.004 0.976 0.008 0.000 0.000 0.012
#> GSM786565 2 0.0508 0.7911 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM786572 2 0.2152 0.7704 0.024 0.904 0.004 0.000 0.000 0.068
#> GSM786579 2 0.0767 0.7907 0.004 0.976 0.008 0.000 0.000 0.012
#> GSM786491 5 0.5753 0.6329 0.104 0.000 0.268 0.032 0.592 0.004
#> GSM786509 1 0.5481 0.4388 0.560 0.000 0.264 0.176 0.000 0.000
#> GSM786538 3 0.4260 -0.3385 0.472 0.000 0.512 0.016 0.000 0.000
#> GSM786548 2 0.2405 0.7575 0.016 0.880 0.004 0.000 0.000 0.100
#> GSM786562 1 0.5167 0.4435 0.612 0.000 0.240 0.000 0.000 0.148
#> GSM786566 1 0.5298 0.4379 0.592 0.000 0.248 0.000 0.000 0.160
#> GSM786573 6 0.6778 0.4259 0.048 0.324 0.228 0.000 0.000 0.400
#> GSM786574 2 0.0260 0.7913 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM786580 5 0.0000 0.7158 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786581 2 0.4372 0.6825 0.116 0.764 0.036 0.000 0.000 0.084
#> GSM786583 3 0.4227 -0.3598 0.000 0.004 0.500 0.008 0.000 0.488
#> GSM786492 4 0.0458 0.8033 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM786493 2 0.3368 0.7321 0.088 0.824 0.004 0.000 0.000 0.084
#> GSM786499 2 0.4518 0.6361 0.200 0.696 0.000 0.000 0.000 0.104
#> GSM786502 1 0.5064 0.1417 0.536 0.040 0.000 0.020 0.000 0.404
#> GSM786537 4 0.1010 0.8074 0.000 0.000 0.004 0.960 0.000 0.036
#> GSM786567 2 0.0146 0.7909 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM786498 1 0.4755 0.1711 0.560 0.004 0.008 0.028 0.000 0.400
#> GSM786500 4 0.0713 0.8248 0.000 0.000 0.028 0.972 0.000 0.000
#> GSM786503 1 0.4181 0.4582 0.644 0.000 0.328 0.000 0.000 0.028
#> GSM786507 2 0.4667 0.6276 0.208 0.688 0.004 0.000 0.000 0.100
#> GSM786515 2 0.3368 0.7321 0.088 0.824 0.004 0.000 0.000 0.084
#> GSM786522 3 0.4403 -0.3411 0.468 0.000 0.508 0.024 0.000 0.000
#> GSM786526 3 0.2170 0.3547 0.100 0.000 0.888 0.000 0.000 0.012
#> GSM786528 3 0.2312 0.3467 0.112 0.000 0.876 0.000 0.000 0.012
#> GSM786531 6 0.4117 0.2895 0.000 0.004 0.464 0.004 0.000 0.528
#> GSM786535 2 0.5517 0.1732 0.016 0.564 0.104 0.000 0.000 0.316
#> GSM786543 4 0.3958 0.7942 0.012 0.000 0.168 0.768 0.000 0.052
#> GSM786545 3 0.4816 -0.2820 0.000 0.004 0.516 0.044 0.000 0.436
#> GSM786551 3 0.6990 0.1991 0.132 0.000 0.480 0.220 0.000 0.168
#> GSM786552 2 0.5686 -0.2223 0.000 0.472 0.164 0.000 0.000 0.364
#> GSM786554 2 0.0000 0.7910 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786557 1 0.4594 0.4498 0.608 0.000 0.340 0.052 0.000 0.000
#> GSM786560 1 0.5610 0.4287 0.536 0.000 0.272 0.192 0.000 0.000
#> GSM786564 2 0.1341 0.7854 0.024 0.948 0.000 0.000 0.000 0.028
#> GSM786568 6 0.5631 0.6877 0.000 0.156 0.360 0.000 0.000 0.484
#> GSM786569 4 0.3735 0.7928 0.092 0.000 0.124 0.784 0.000 0.000
#> GSM786571 6 0.5986 0.6908 0.000 0.164 0.356 0.012 0.000 0.468
#> GSM786496 2 0.0508 0.7922 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM786506 1 0.4150 0.4633 0.652 0.000 0.320 0.000 0.000 0.028
#> GSM786508 1 0.7015 0.0321 0.420 0.096 0.144 0.004 0.000 0.336
#> GSM786512 1 0.7015 0.0321 0.420 0.096 0.144 0.004 0.000 0.336
#> GSM786518 4 0.2499 0.8040 0.072 0.000 0.048 0.880 0.000 0.000
#> GSM786519 4 0.6270 0.6074 0.168 0.000 0.168 0.580 0.000 0.084
#> GSM786524 4 0.4821 0.7054 0.024 0.000 0.248 0.672 0.000 0.056
#> GSM786529 6 0.5941 0.6658 0.000 0.164 0.396 0.008 0.000 0.432
#> GSM786530 4 0.5288 0.5624 0.004 0.000 0.264 0.600 0.000 0.132
#> GSM786532 3 0.4234 -0.2967 0.440 0.000 0.544 0.016 0.000 0.000
#> GSM786533 6 0.6905 0.4697 0.100 0.272 0.164 0.000 0.000 0.464
#> GSM786544 3 0.4114 -0.3166 0.000 0.004 0.532 0.004 0.000 0.460
#> GSM786547 6 0.5808 0.6928 0.000 0.164 0.360 0.004 0.000 0.472
#> GSM786549 3 0.4217 -0.3275 0.000 0.004 0.524 0.008 0.000 0.464
#> GSM786550 5 0.0000 0.7158 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786563 2 0.2405 0.7575 0.016 0.880 0.004 0.000 0.000 0.100
#> GSM786570 2 0.1261 0.7861 0.024 0.952 0.000 0.000 0.000 0.024
#> GSM786576 2 0.0508 0.7922 0.004 0.984 0.000 0.000 0.000 0.012
#> GSM786577 4 0.3752 0.7940 0.004 0.000 0.168 0.776 0.000 0.052
#> GSM786578 2 0.1779 0.7730 0.016 0.920 0.000 0.000 0.000 0.064
#> GSM786582 1 0.6761 0.2448 0.404 0.000 0.304 0.248 0.000 0.044
#> GSM786495 2 0.4490 0.6379 0.196 0.700 0.000 0.000 0.000 0.104
#> GSM786505 1 0.4252 0.4328 0.604 0.000 0.372 0.024 0.000 0.000
#> GSM786511 4 0.0713 0.8248 0.000 0.000 0.028 0.972 0.000 0.000
#> GSM786513 3 0.4517 0.1564 0.224 0.000 0.708 0.032 0.000 0.036
#> GSM786525 2 0.6798 0.2029 0.180 0.472 0.268 0.000 0.000 0.080
#> GSM786540 2 0.0870 0.7899 0.004 0.972 0.012 0.000 0.000 0.012
#> GSM786553 1 0.4406 0.3113 0.500 0.000 0.476 0.000 0.000 0.024
#> GSM786561 4 0.3718 0.7970 0.084 0.000 0.132 0.784 0.000 0.000
#> GSM786575 5 0.5753 0.6329 0.104 0.000 0.268 0.032 0.592 0.004
#> GSM786494 5 0.5753 0.6329 0.104 0.000 0.268 0.032 0.592 0.004
#> GSM786504 3 0.4517 0.1564 0.224 0.000 0.708 0.032 0.000 0.036
#> GSM786510 2 0.4736 0.6205 0.212 0.680 0.004 0.000 0.000 0.104
#> GSM786514 3 0.2146 0.3050 0.116 0.000 0.880 0.004 0.000 0.000
#> GSM786516 3 0.3918 -0.1628 0.004 0.004 0.632 0.000 0.000 0.360
#> GSM786520 1 0.5471 0.4395 0.560 0.000 0.268 0.172 0.000 0.000
#> GSM786521 5 0.0000 0.7158 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786536 3 0.3105 0.3441 0.080 0.008 0.848 0.000 0.000 0.064
#> GSM786542 2 0.5565 -0.0891 0.000 0.508 0.152 0.000 0.000 0.340
#> GSM786546 2 0.5517 0.1732 0.016 0.564 0.104 0.000 0.000 0.316
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 specimen(p) disease.state(p) k
#> SD:hclust 89 0.000841 0.374 2
#> SD:hclust 75 0.028210 0.395 3
#> SD:hclust 86 0.016091 0.693 4
#> SD:hclust 74 0.037414 0.331 5
#> SD:hclust 54 0.038523 0.531 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 54547 rows and 93 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.997 0.956 0.981 0.5048 0.495 0.495
#> 3 3 0.613 0.781 0.866 0.2815 0.815 0.641
#> 4 4 0.676 0.631 0.795 0.1157 0.927 0.801
#> 5 5 0.673 0.730 0.805 0.0730 0.914 0.726
#> 6 6 0.722 0.632 0.758 0.0505 0.930 0.712
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
#> GSM786527 2 0.0000 0.976 0.000 1.000
#> GSM786539 2 0.0000 0.976 0.000 1.000
#> GSM786541 2 0.0000 0.976 0.000 1.000
#> GSM786556 2 0.0000 0.976 0.000 1.000
#> GSM786523 1 0.0938 0.975 0.988 0.012
#> GSM786497 1 0.0000 0.983 1.000 0.000
#> GSM786501 2 0.0000 0.976 0.000 1.000
#> GSM786517 2 0.0000 0.976 0.000 1.000
#> GSM786534 2 0.0000 0.976 0.000 1.000
#> GSM786555 2 0.0000 0.976 0.000 1.000
#> GSM786558 2 0.0000 0.976 0.000 1.000
#> GSM786559 2 0.0000 0.976 0.000 1.000
#> GSM786565 2 0.0000 0.976 0.000 1.000
#> GSM786572 2 0.0000 0.976 0.000 1.000
#> GSM786579 2 0.0000 0.976 0.000 1.000
#> GSM786491 1 0.0000 0.983 1.000 0.000
#> GSM786509 1 0.0000 0.983 1.000 0.000
#> GSM786538 1 0.0000 0.983 1.000 0.000
#> GSM786548 2 0.0000 0.976 0.000 1.000
#> GSM786562 1 0.0000 0.983 1.000 0.000
#> GSM786566 1 0.0000 0.983 1.000 0.000
#> GSM786573 2 0.3733 0.919 0.072 0.928
#> GSM786574 2 0.0000 0.976 0.000 1.000
#> GSM786580 1 0.9933 0.128 0.548 0.452
#> GSM786581 2 0.0000 0.976 0.000 1.000
#> GSM786583 1 0.0938 0.975 0.988 0.012
#> GSM786492 1 0.0000 0.983 1.000 0.000
#> GSM786493 2 0.0000 0.976 0.000 1.000
#> GSM786499 2 0.0000 0.976 0.000 1.000
#> GSM786502 2 0.4161 0.906 0.084 0.916
#> GSM786537 1 0.0000 0.983 1.000 0.000
#> GSM786567 2 0.0000 0.976 0.000 1.000
#> GSM786498 1 0.0000 0.983 1.000 0.000
#> GSM786500 1 0.0000 0.983 1.000 0.000
#> GSM786503 1 0.0000 0.983 1.000 0.000
#> GSM786507 2 0.0000 0.976 0.000 1.000
#> GSM786515 2 0.0000 0.976 0.000 1.000
#> GSM786522 1 0.0000 0.983 1.000 0.000
#> GSM786526 1 0.0000 0.983 1.000 0.000
#> GSM786528 1 0.0000 0.983 1.000 0.000
#> GSM786531 2 0.8909 0.573 0.308 0.692
#> GSM786535 2 0.0000 0.976 0.000 1.000
#> GSM786543 1 0.0000 0.983 1.000 0.000
#> GSM786545 1 0.0938 0.975 0.988 0.012
#> GSM786551 1 0.0000 0.983 1.000 0.000
#> GSM786552 2 0.0000 0.976 0.000 1.000
#> GSM786554 2 0.0000 0.976 0.000 1.000
#> GSM786557 1 0.0000 0.983 1.000 0.000
#> GSM786560 1 0.0000 0.983 1.000 0.000
#> GSM786564 2 0.0000 0.976 0.000 1.000
#> GSM786568 2 0.4298 0.904 0.088 0.912
#> GSM786569 1 0.0000 0.983 1.000 0.000
#> GSM786571 1 0.7299 0.735 0.796 0.204
#> GSM786496 2 0.0000 0.976 0.000 1.000
#> GSM786506 1 0.0000 0.983 1.000 0.000
#> GSM786508 2 0.4022 0.910 0.080 0.920
#> GSM786512 2 0.0000 0.976 0.000 1.000
#> GSM786518 1 0.0000 0.983 1.000 0.000
#> GSM786519 1 0.0000 0.983 1.000 0.000
#> GSM786524 1 0.0000 0.983 1.000 0.000
#> GSM786529 2 0.6048 0.836 0.148 0.852
#> GSM786530 1 0.0000 0.983 1.000 0.000
#> GSM786532 1 0.0000 0.983 1.000 0.000
#> GSM786533 2 0.0000 0.976 0.000 1.000
#> GSM786544 1 0.0938 0.975 0.988 0.012
#> GSM786547 2 0.3879 0.916 0.076 0.924
#> GSM786549 1 0.0938 0.975 0.988 0.012
#> GSM786550 2 0.6712 0.798 0.176 0.824
#> GSM786563 2 0.0000 0.976 0.000 1.000
#> GSM786570 2 0.0000 0.976 0.000 1.000
#> GSM786576 2 0.0000 0.976 0.000 1.000
#> GSM786577 1 0.0000 0.983 1.000 0.000
#> GSM786578 2 0.0000 0.976 0.000 1.000
#> GSM786582 1 0.0000 0.983 1.000 0.000
#> GSM786495 2 0.0000 0.976 0.000 1.000
#> GSM786505 1 0.0000 0.983 1.000 0.000
#> GSM786511 1 0.0000 0.983 1.000 0.000
#> GSM786513 1 0.0000 0.983 1.000 0.000
#> GSM786525 2 0.0000 0.976 0.000 1.000
#> GSM786540 2 0.0000 0.976 0.000 1.000
#> GSM786553 1 0.0000 0.983 1.000 0.000
#> GSM786561 1 0.0000 0.983 1.000 0.000
#> GSM786575 1 0.0000 0.983 1.000 0.000
#> GSM786494 1 0.0000 0.983 1.000 0.000
#> GSM786504 1 0.0000 0.983 1.000 0.000
#> GSM786510 2 0.0000 0.976 0.000 1.000
#> GSM786514 1 0.0000 0.983 1.000 0.000
#> GSM786516 1 0.0000 0.983 1.000 0.000
#> GSM786520 1 0.0000 0.983 1.000 0.000
#> GSM786521 1 0.0376 0.981 0.996 0.004
#> GSM786536 1 0.0938 0.975 0.988 0.012
#> GSM786542 2 0.0000 0.976 0.000 1.000
#> GSM786546 2 0.0672 0.971 0.008 0.992
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786539 2 0.1289 0.9190 0.000 0.968 0.032
#> GSM786541 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786556 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786523 3 0.4399 0.6919 0.188 0.000 0.812
#> GSM786497 1 0.4235 0.8140 0.824 0.000 0.176
#> GSM786501 2 0.1289 0.9190 0.000 0.968 0.032
#> GSM786517 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786534 2 0.2356 0.8713 0.000 0.928 0.072
#> GSM786555 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786491 1 0.4702 0.7660 0.788 0.000 0.212
#> GSM786509 1 0.1289 0.8463 0.968 0.000 0.032
#> GSM786538 1 0.1643 0.8432 0.956 0.000 0.044
#> GSM786548 2 0.2537 0.8629 0.000 0.920 0.080
#> GSM786562 1 0.2356 0.8352 0.928 0.000 0.072
#> GSM786566 1 0.1643 0.8357 0.956 0.000 0.044
#> GSM786573 3 0.5687 0.7086 0.020 0.224 0.756
#> GSM786574 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786580 1 0.6683 0.2975 0.500 0.008 0.492
#> GSM786581 2 0.0237 0.9341 0.000 0.996 0.004
#> GSM786583 3 0.4062 0.7089 0.164 0.000 0.836
#> GSM786492 1 0.4452 0.8101 0.808 0.000 0.192
#> GSM786493 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786499 2 0.1289 0.9190 0.000 0.968 0.032
#> GSM786502 2 0.5069 0.7560 0.128 0.828 0.044
#> GSM786537 1 0.5058 0.7885 0.756 0.000 0.244
#> GSM786567 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786498 1 0.3116 0.8305 0.892 0.000 0.108
#> GSM786500 1 0.3619 0.8339 0.864 0.000 0.136
#> GSM786503 1 0.2261 0.8394 0.932 0.000 0.068
#> GSM786507 2 0.1289 0.9190 0.000 0.968 0.032
#> GSM786515 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786522 1 0.3879 0.8093 0.848 0.000 0.152
#> GSM786526 1 0.4452 0.7947 0.808 0.000 0.192
#> GSM786528 1 0.4452 0.7596 0.808 0.000 0.192
#> GSM786531 3 0.5500 0.7505 0.084 0.100 0.816
#> GSM786535 3 0.5882 0.5279 0.000 0.348 0.652
#> GSM786543 1 0.3267 0.8256 0.884 0.000 0.116
#> GSM786545 3 0.4062 0.7089 0.164 0.000 0.836
#> GSM786551 1 0.4931 0.7720 0.768 0.000 0.232
#> GSM786552 3 0.6244 0.3123 0.000 0.440 0.560
#> GSM786554 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786557 1 0.0592 0.8443 0.988 0.000 0.012
#> GSM786560 1 0.2165 0.8430 0.936 0.000 0.064
#> GSM786564 2 0.0747 0.9283 0.000 0.984 0.016
#> GSM786568 3 0.5235 0.7524 0.036 0.152 0.812
#> GSM786569 1 0.3116 0.8384 0.892 0.000 0.108
#> GSM786571 3 0.4930 0.7344 0.120 0.044 0.836
#> GSM786496 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786506 1 0.1753 0.8362 0.952 0.000 0.048
#> GSM786508 2 0.8731 0.1324 0.120 0.528 0.352
#> GSM786512 2 0.6026 0.3397 0.000 0.624 0.376
#> GSM786518 1 0.4178 0.8145 0.828 0.000 0.172
#> GSM786519 1 0.4235 0.7997 0.824 0.000 0.176
#> GSM786524 1 0.5058 0.7580 0.756 0.000 0.244
#> GSM786529 3 0.5111 0.7491 0.024 0.168 0.808
#> GSM786530 3 0.5291 0.5936 0.268 0.000 0.732
#> GSM786532 1 0.3752 0.8019 0.856 0.000 0.144
#> GSM786533 2 0.6260 0.0282 0.000 0.552 0.448
#> GSM786544 3 0.4178 0.7074 0.172 0.000 0.828
#> GSM786547 3 0.5331 0.7454 0.024 0.184 0.792
#> GSM786549 3 0.4178 0.7074 0.172 0.000 0.828
#> GSM786550 3 0.5237 0.6394 0.120 0.056 0.824
#> GSM786563 2 0.2537 0.8629 0.000 0.920 0.080
#> GSM786570 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786576 2 0.0424 0.9324 0.000 0.992 0.008
#> GSM786577 1 0.5058 0.7580 0.756 0.000 0.244
#> GSM786578 2 0.0237 0.9333 0.000 0.996 0.004
#> GSM786582 1 0.1163 0.8467 0.972 0.000 0.028
#> GSM786495 2 0.1289 0.9190 0.000 0.968 0.032
#> GSM786505 1 0.0592 0.8443 0.988 0.000 0.012
#> GSM786511 1 0.4235 0.8140 0.824 0.000 0.176
#> GSM786513 1 0.4235 0.8005 0.824 0.000 0.176
#> GSM786525 2 0.0424 0.9328 0.000 0.992 0.008
#> GSM786540 2 0.0000 0.9354 0.000 1.000 0.000
#> GSM786553 1 0.3816 0.8011 0.852 0.000 0.148
#> GSM786561 1 0.3340 0.8243 0.880 0.000 0.120
#> GSM786575 1 0.4931 0.7485 0.768 0.000 0.232
#> GSM786494 1 0.3879 0.7946 0.848 0.000 0.152
#> GSM786504 1 0.4235 0.8005 0.824 0.000 0.176
#> GSM786510 2 0.1289 0.9190 0.000 0.968 0.032
#> GSM786514 1 0.3340 0.8451 0.880 0.000 0.120
#> GSM786516 3 0.5926 0.4076 0.356 0.000 0.644
#> GSM786520 1 0.0747 0.8449 0.984 0.000 0.016
#> GSM786521 1 0.6309 0.3096 0.504 0.000 0.496
#> GSM786536 3 0.5397 0.5881 0.280 0.000 0.720
#> GSM786542 3 0.6267 0.2761 0.000 0.452 0.548
#> GSM786546 3 0.5678 0.5845 0.000 0.316 0.684
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0469 0.9431 0.000 0.988 0.000 0.012
#> GSM786539 2 0.2796 0.9021 0.000 0.892 0.016 0.092
#> GSM786541 2 0.0921 0.9389 0.000 0.972 0.000 0.028
#> GSM786556 2 0.1256 0.9361 0.000 0.964 0.008 0.028
#> GSM786523 3 0.1545 0.7719 0.040 0.000 0.952 0.008
#> GSM786497 1 0.6392 0.2338 0.484 0.000 0.064 0.452
#> GSM786501 2 0.2796 0.9021 0.000 0.892 0.016 0.092
#> GSM786517 2 0.0592 0.9424 0.000 0.984 0.000 0.016
#> GSM786534 2 0.2546 0.8995 0.000 0.912 0.060 0.028
#> GSM786555 2 0.0817 0.9400 0.000 0.976 0.000 0.024
#> GSM786558 2 0.0817 0.9400 0.000 0.976 0.000 0.024
#> GSM786559 2 0.0376 0.9435 0.000 0.992 0.004 0.004
#> GSM786565 2 0.0817 0.9400 0.000 0.976 0.000 0.024
#> GSM786572 2 0.2376 0.9168 0.000 0.916 0.016 0.068
#> GSM786579 2 0.1388 0.9352 0.000 0.960 0.012 0.028
#> GSM786491 1 0.5257 -0.0974 0.548 0.000 0.008 0.444
#> GSM786509 1 0.4761 0.4185 0.664 0.000 0.004 0.332
#> GSM786538 1 0.0817 0.5803 0.976 0.000 0.024 0.000
#> GSM786548 2 0.3764 0.8600 0.000 0.852 0.076 0.072
#> GSM786562 1 0.3279 0.5302 0.872 0.000 0.032 0.096
#> GSM786566 1 0.3108 0.5259 0.872 0.000 0.016 0.112
#> GSM786573 3 0.2383 0.7787 0.004 0.048 0.924 0.024
#> GSM786574 2 0.0336 0.9431 0.000 0.992 0.000 0.008
#> GSM786580 4 0.7042 0.3360 0.320 0.020 0.088 0.572
#> GSM786581 2 0.1356 0.9381 0.000 0.960 0.008 0.032
#> GSM786583 3 0.1109 0.7785 0.028 0.000 0.968 0.004
#> GSM786492 4 0.5923 -0.1291 0.376 0.000 0.044 0.580
#> GSM786493 2 0.1004 0.9405 0.000 0.972 0.004 0.024
#> GSM786499 2 0.2796 0.9021 0.000 0.892 0.016 0.092
#> GSM786502 2 0.6071 0.7220 0.068 0.712 0.028 0.192
#> GSM786537 4 0.6055 -0.1169 0.372 0.000 0.052 0.576
#> GSM786567 2 0.0336 0.9432 0.000 0.992 0.000 0.008
#> GSM786498 1 0.4957 0.4411 0.748 0.000 0.048 0.204
#> GSM786500 1 0.6204 0.2517 0.500 0.000 0.052 0.448
#> GSM786503 1 0.3308 0.5325 0.872 0.000 0.036 0.092
#> GSM786507 2 0.2796 0.9021 0.000 0.892 0.016 0.092
#> GSM786515 2 0.1004 0.9405 0.000 0.972 0.004 0.024
#> GSM786522 1 0.3205 0.5615 0.872 0.000 0.104 0.024
#> GSM786526 1 0.3249 0.5328 0.852 0.000 0.140 0.008
#> GSM786528 1 0.3401 0.5134 0.840 0.000 0.152 0.008
#> GSM786531 3 0.0927 0.7860 0.008 0.016 0.976 0.000
#> GSM786535 3 0.3962 0.7233 0.000 0.124 0.832 0.044
#> GSM786543 1 0.5673 0.3590 0.596 0.000 0.032 0.372
#> GSM786545 3 0.2214 0.7571 0.028 0.000 0.928 0.044
#> GSM786551 1 0.4711 0.5015 0.784 0.000 0.152 0.064
#> GSM786552 3 0.3658 0.7170 0.000 0.144 0.836 0.020
#> GSM786554 2 0.0336 0.9432 0.000 0.992 0.000 0.008
#> GSM786557 1 0.0817 0.5769 0.976 0.000 0.000 0.024
#> GSM786560 1 0.4655 0.4318 0.684 0.000 0.004 0.312
#> GSM786564 2 0.2048 0.9270 0.000 0.928 0.008 0.064
#> GSM786568 3 0.0817 0.7874 0.000 0.024 0.976 0.000
#> GSM786569 1 0.5756 0.3384 0.568 0.000 0.032 0.400
#> GSM786571 3 0.0895 0.7825 0.020 0.004 0.976 0.000
#> GSM786496 2 0.0817 0.9400 0.000 0.976 0.000 0.024
#> GSM786506 1 0.3205 0.5297 0.872 0.000 0.024 0.104
#> GSM786508 3 0.8263 0.2337 0.060 0.372 0.452 0.116
#> GSM786512 3 0.6666 0.2431 0.000 0.404 0.508 0.088
#> GSM786518 1 0.6310 0.2778 0.512 0.000 0.060 0.428
#> GSM786519 1 0.7103 0.1997 0.468 0.000 0.128 0.404
#> GSM786524 1 0.6875 0.3052 0.520 0.000 0.112 0.368
#> GSM786529 3 0.1022 0.7874 0.000 0.032 0.968 0.000
#> GSM786530 3 0.5990 0.3003 0.056 0.000 0.608 0.336
#> GSM786532 1 0.2408 0.5569 0.896 0.000 0.104 0.000
#> GSM786533 3 0.5085 0.5343 0.000 0.304 0.676 0.020
#> GSM786544 3 0.1356 0.7757 0.032 0.000 0.960 0.008
#> GSM786547 3 0.1022 0.7874 0.000 0.032 0.968 0.000
#> GSM786549 3 0.1356 0.7757 0.032 0.000 0.960 0.008
#> GSM786550 4 0.6775 -0.0823 0.080 0.004 0.448 0.468
#> GSM786563 2 0.3833 0.8559 0.000 0.848 0.080 0.072
#> GSM786570 2 0.0376 0.9435 0.000 0.992 0.004 0.004
#> GSM786576 2 0.0707 0.9422 0.000 0.980 0.000 0.020
#> GSM786577 1 0.6757 0.3041 0.524 0.000 0.100 0.376
#> GSM786578 2 0.2670 0.9101 0.000 0.904 0.024 0.072
#> GSM786582 1 0.0921 0.5816 0.972 0.000 0.000 0.028
#> GSM786495 2 0.2376 0.9166 0.000 0.916 0.016 0.068
#> GSM786505 1 0.0817 0.5769 0.976 0.000 0.000 0.024
#> GSM786511 1 0.6319 0.2447 0.504 0.000 0.060 0.436
#> GSM786513 1 0.2714 0.5542 0.884 0.000 0.112 0.004
#> GSM786525 2 0.1356 0.9381 0.000 0.960 0.008 0.032
#> GSM786540 2 0.1406 0.9355 0.000 0.960 0.016 0.024
#> GSM786553 1 0.3160 0.5454 0.872 0.000 0.108 0.020
#> GSM786561 1 0.6270 0.3072 0.536 0.000 0.060 0.404
#> GSM786575 1 0.5500 -0.1508 0.520 0.000 0.016 0.464
#> GSM786494 1 0.4720 0.1951 0.672 0.000 0.004 0.324
#> GSM786504 1 0.2714 0.5542 0.884 0.000 0.112 0.004
#> GSM786510 2 0.2796 0.9021 0.000 0.892 0.016 0.092
#> GSM786514 1 0.2089 0.5839 0.932 0.000 0.048 0.020
#> GSM786516 3 0.4175 0.5694 0.212 0.000 0.776 0.012
#> GSM786520 1 0.1474 0.5765 0.948 0.000 0.000 0.052
#> GSM786521 4 0.7042 0.3360 0.320 0.020 0.088 0.572
#> GSM786536 3 0.3636 0.6396 0.172 0.000 0.820 0.008
#> GSM786542 3 0.3708 0.7129 0.000 0.148 0.832 0.020
#> GSM786546 3 0.2412 0.7644 0.000 0.084 0.908 0.008
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.1648 0.8322 0.000 0.940 0.000 0.040 0.020
#> GSM786539 2 0.4874 0.7384 0.056 0.756 0.000 0.040 0.148
#> GSM786541 2 0.3478 0.8099 0.000 0.848 0.024 0.028 0.100
#> GSM786556 2 0.3664 0.8025 0.000 0.840 0.040 0.024 0.096
#> GSM786523 3 0.2409 0.8038 0.056 0.000 0.908 0.028 0.008
#> GSM786497 4 0.3031 0.8610 0.128 0.000 0.016 0.852 0.004
#> GSM786501 2 0.4469 0.7535 0.044 0.784 0.000 0.036 0.136
#> GSM786517 2 0.0566 0.8314 0.000 0.984 0.000 0.004 0.012
#> GSM786534 2 0.4449 0.7808 0.000 0.792 0.076 0.028 0.104
#> GSM786555 2 0.2586 0.8216 0.000 0.892 0.012 0.012 0.084
#> GSM786558 2 0.3246 0.8169 0.000 0.860 0.020 0.024 0.096
#> GSM786559 2 0.3011 0.8174 0.000 0.876 0.012 0.076 0.036
#> GSM786565 2 0.2403 0.8237 0.000 0.904 0.012 0.012 0.072
#> GSM786572 2 0.5931 0.7256 0.000 0.680 0.060 0.100 0.160
#> GSM786579 2 0.5295 0.7638 0.000 0.740 0.060 0.100 0.100
#> GSM786491 5 0.5263 0.6408 0.368 0.000 0.000 0.056 0.576
#> GSM786509 1 0.4307 -0.0264 0.504 0.000 0.000 0.496 0.000
#> GSM786538 1 0.2074 0.7772 0.920 0.000 0.016 0.060 0.004
#> GSM786548 2 0.6603 0.6689 0.000 0.624 0.104 0.100 0.172
#> GSM786562 1 0.2104 0.7205 0.916 0.000 0.000 0.060 0.024
#> GSM786566 1 0.4063 0.6233 0.800 0.000 0.004 0.084 0.112
#> GSM786573 3 0.2889 0.7746 0.000 0.016 0.880 0.020 0.084
#> GSM786574 2 0.0992 0.8331 0.000 0.968 0.000 0.008 0.024
#> GSM786580 5 0.4604 0.7622 0.192 0.000 0.020 0.040 0.748
#> GSM786581 2 0.3284 0.8123 0.028 0.864 0.000 0.028 0.080
#> GSM786583 3 0.1372 0.8230 0.024 0.000 0.956 0.016 0.004
#> GSM786492 4 0.3636 0.8054 0.080 0.000 0.004 0.832 0.084
#> GSM786493 2 0.2260 0.8190 0.000 0.908 0.000 0.028 0.064
#> GSM786499 2 0.4469 0.7535 0.044 0.784 0.000 0.036 0.136
#> GSM786502 2 0.7442 0.5830 0.076 0.540 0.012 0.144 0.228
#> GSM786537 4 0.4195 0.8064 0.104 0.000 0.008 0.796 0.092
#> GSM786567 2 0.0566 0.8314 0.000 0.984 0.000 0.004 0.012
#> GSM786498 1 0.6123 0.3092 0.588 0.000 0.012 0.268 0.132
#> GSM786500 4 0.2877 0.8609 0.144 0.000 0.004 0.848 0.004
#> GSM786503 1 0.1285 0.7353 0.956 0.000 0.004 0.036 0.004
#> GSM786507 2 0.4629 0.7488 0.044 0.772 0.000 0.040 0.144
#> GSM786515 2 0.2344 0.8179 0.000 0.904 0.000 0.032 0.064
#> GSM786522 1 0.3120 0.7716 0.872 0.000 0.052 0.064 0.012
#> GSM786526 1 0.3237 0.7430 0.864 0.000 0.076 0.048 0.012
#> GSM786528 1 0.2864 0.7080 0.872 0.000 0.104 0.012 0.012
#> GSM786531 3 0.0566 0.8264 0.012 0.000 0.984 0.004 0.000
#> GSM786535 3 0.4489 0.7002 0.000 0.032 0.792 0.092 0.084
#> GSM786543 4 0.4568 0.6592 0.304 0.000 0.012 0.672 0.012
#> GSM786545 3 0.2157 0.8109 0.040 0.000 0.920 0.036 0.004
#> GSM786551 1 0.4777 0.6491 0.736 0.000 0.064 0.188 0.012
#> GSM786552 3 0.2737 0.7772 0.000 0.032 0.896 0.020 0.052
#> GSM786554 2 0.0693 0.8314 0.000 0.980 0.000 0.008 0.012
#> GSM786557 1 0.2886 0.7493 0.844 0.000 0.000 0.148 0.008
#> GSM786560 1 0.4440 0.1275 0.528 0.000 0.000 0.468 0.004
#> GSM786564 2 0.4258 0.7755 0.000 0.788 0.008 0.076 0.128
#> GSM786568 3 0.0898 0.8264 0.020 0.000 0.972 0.008 0.000
#> GSM786569 4 0.3003 0.8337 0.188 0.000 0.000 0.812 0.000
#> GSM786571 3 0.0968 0.8260 0.012 0.000 0.972 0.012 0.004
#> GSM786496 2 0.2466 0.8228 0.000 0.900 0.012 0.012 0.076
#> GSM786506 1 0.2362 0.7140 0.900 0.000 0.000 0.076 0.024
#> GSM786508 3 0.8428 0.2748 0.068 0.268 0.452 0.068 0.144
#> GSM786512 3 0.7955 0.3229 0.064 0.272 0.488 0.040 0.136
#> GSM786518 4 0.3044 0.8615 0.148 0.000 0.008 0.840 0.004
#> GSM786519 4 0.3635 0.8368 0.112 0.000 0.056 0.828 0.004
#> GSM786524 4 0.4215 0.8070 0.220 0.000 0.024 0.748 0.008
#> GSM786529 3 0.0613 0.8251 0.008 0.000 0.984 0.004 0.004
#> GSM786530 4 0.5733 0.3449 0.068 0.000 0.348 0.572 0.012
#> GSM786532 1 0.2390 0.7758 0.908 0.000 0.024 0.060 0.008
#> GSM786533 3 0.4629 0.6732 0.004 0.140 0.776 0.024 0.056
#> GSM786544 3 0.1756 0.8189 0.036 0.000 0.940 0.016 0.008
#> GSM786547 3 0.0613 0.8251 0.008 0.000 0.984 0.004 0.004
#> GSM786549 3 0.2011 0.8133 0.044 0.000 0.928 0.020 0.008
#> GSM786550 5 0.4521 0.4983 0.024 0.000 0.248 0.012 0.716
#> GSM786563 2 0.6647 0.6642 0.000 0.620 0.108 0.100 0.172
#> GSM786570 2 0.2694 0.8203 0.000 0.888 0.004 0.076 0.032
#> GSM786576 2 0.0566 0.8314 0.000 0.984 0.000 0.004 0.012
#> GSM786577 4 0.3967 0.8279 0.200 0.000 0.020 0.772 0.008
#> GSM786578 2 0.6185 0.7076 0.000 0.656 0.068 0.100 0.176
#> GSM786582 1 0.2929 0.7573 0.840 0.000 0.000 0.152 0.008
#> GSM786495 2 0.4321 0.7592 0.036 0.792 0.000 0.036 0.136
#> GSM786505 1 0.2886 0.7493 0.844 0.000 0.000 0.148 0.008
#> GSM786511 4 0.3373 0.8576 0.168 0.000 0.008 0.816 0.008
#> GSM786513 1 0.3205 0.7671 0.864 0.000 0.056 0.072 0.008
#> GSM786525 2 0.3566 0.8037 0.056 0.852 0.000 0.028 0.064
#> GSM786540 2 0.5295 0.7638 0.000 0.740 0.060 0.100 0.100
#> GSM786553 1 0.1564 0.7659 0.948 0.000 0.024 0.024 0.004
#> GSM786561 4 0.3129 0.8575 0.156 0.000 0.008 0.832 0.004
#> GSM786575 5 0.5247 0.7360 0.272 0.000 0.004 0.072 0.652
#> GSM786494 5 0.6499 0.4265 0.368 0.000 0.000 0.192 0.440
#> GSM786504 1 0.3197 0.7686 0.864 0.000 0.052 0.076 0.008
#> GSM786510 2 0.4808 0.7417 0.052 0.760 0.000 0.040 0.148
#> GSM786514 1 0.3027 0.7760 0.876 0.000 0.040 0.072 0.012
#> GSM786516 3 0.4494 0.5842 0.244 0.000 0.720 0.024 0.012
#> GSM786520 1 0.3508 0.6854 0.748 0.000 0.000 0.252 0.000
#> GSM786521 5 0.4604 0.7622 0.192 0.000 0.020 0.040 0.748
#> GSM786536 3 0.3774 0.6605 0.200 0.000 0.780 0.012 0.008
#> GSM786542 3 0.3716 0.7444 0.000 0.032 0.844 0.060 0.064
#> GSM786546 3 0.1538 0.8247 0.036 0.008 0.948 0.008 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.3975 0.433 0.000 0.600 0.000 0.000 0.008 0.392
#> GSM786539 6 0.3154 0.605 0.000 0.184 0.000 0.012 0.004 0.800
#> GSM786541 2 0.4152 0.545 0.000 0.696 0.000 0.028 0.008 0.268
#> GSM786556 2 0.3941 0.559 0.000 0.732 0.000 0.028 0.008 0.232
#> GSM786523 3 0.2034 0.819 0.032 0.000 0.924 0.012 0.008 0.024
#> GSM786497 4 0.1586 0.883 0.040 0.000 0.004 0.940 0.012 0.004
#> GSM786501 6 0.2883 0.594 0.000 0.212 0.000 0.000 0.000 0.788
#> GSM786517 2 0.4537 0.345 0.000 0.492 0.000 0.024 0.004 0.480
#> GSM786534 2 0.4140 0.537 0.000 0.732 0.008 0.036 0.004 0.220
#> GSM786555 2 0.4421 0.538 0.000 0.636 0.000 0.028 0.008 0.328
#> GSM786558 2 0.4444 0.534 0.000 0.644 0.000 0.032 0.008 0.316
#> GSM786559 2 0.3512 0.453 0.000 0.720 0.000 0.000 0.008 0.272
#> GSM786565 2 0.4302 0.542 0.000 0.644 0.000 0.028 0.004 0.324
#> GSM786572 2 0.1714 0.523 0.000 0.936 0.024 0.000 0.016 0.024
#> GSM786579 2 0.1350 0.537 0.000 0.952 0.020 0.000 0.008 0.020
#> GSM786491 5 0.3938 0.584 0.312 0.000 0.000 0.012 0.672 0.004
#> GSM786509 1 0.4981 0.157 0.516 0.000 0.000 0.432 0.020 0.032
#> GSM786538 1 0.1605 0.761 0.940 0.000 0.016 0.012 0.032 0.000
#> GSM786548 2 0.1636 0.502 0.000 0.936 0.036 0.004 0.024 0.000
#> GSM786562 1 0.3634 0.716 0.808 0.000 0.000 0.012 0.064 0.116
#> GSM786566 1 0.5212 0.537 0.616 0.000 0.000 0.028 0.064 0.292
#> GSM786573 3 0.3925 0.760 0.000 0.196 0.760 0.012 0.004 0.028
#> GSM786574 2 0.4452 0.477 0.000 0.572 0.000 0.024 0.004 0.400
#> GSM786580 5 0.2006 0.825 0.060 0.004 0.016 0.000 0.916 0.004
#> GSM786581 6 0.4379 0.338 0.008 0.336 0.000 0.012 0.008 0.636
#> GSM786583 3 0.0363 0.851 0.000 0.012 0.988 0.000 0.000 0.000
#> GSM786492 4 0.1737 0.863 0.020 0.000 0.000 0.932 0.040 0.008
#> GSM786493 6 0.4012 0.304 0.000 0.344 0.000 0.016 0.000 0.640
#> GSM786499 6 0.2883 0.594 0.000 0.212 0.000 0.000 0.000 0.788
#> GSM786502 6 0.5354 0.299 0.036 0.352 0.000 0.004 0.040 0.568
#> GSM786537 4 0.2450 0.860 0.040 0.000 0.000 0.896 0.048 0.016
#> GSM786567 2 0.4535 0.360 0.000 0.500 0.000 0.024 0.004 0.472
#> GSM786498 1 0.7897 0.224 0.400 0.116 0.000 0.104 0.080 0.300
#> GSM786500 4 0.1511 0.883 0.044 0.000 0.000 0.940 0.012 0.004
#> GSM786503 1 0.3080 0.733 0.848 0.000 0.000 0.012 0.040 0.100
#> GSM786507 6 0.2871 0.603 0.000 0.192 0.000 0.004 0.000 0.804
#> GSM786515 6 0.4012 0.304 0.000 0.344 0.000 0.016 0.000 0.640
#> GSM786522 1 0.2357 0.761 0.908 0.000 0.032 0.016 0.036 0.008
#> GSM786526 1 0.3304 0.733 0.852 0.000 0.064 0.004 0.040 0.040
#> GSM786528 1 0.3160 0.735 0.856 0.000 0.064 0.000 0.036 0.044
#> GSM786531 3 0.0865 0.853 0.000 0.036 0.964 0.000 0.000 0.000
#> GSM786535 3 0.4150 0.588 0.000 0.372 0.612 0.004 0.012 0.000
#> GSM786543 4 0.4164 0.719 0.204 0.000 0.008 0.744 0.012 0.032
#> GSM786545 3 0.1059 0.838 0.016 0.000 0.964 0.016 0.004 0.000
#> GSM786551 1 0.4513 0.640 0.744 0.000 0.036 0.176 0.032 0.012
#> GSM786552 3 0.2946 0.780 0.000 0.184 0.808 0.004 0.004 0.000
#> GSM786554 2 0.4536 0.359 0.000 0.496 0.000 0.024 0.004 0.476
#> GSM786557 1 0.3247 0.739 0.852 0.000 0.000 0.048 0.048 0.052
#> GSM786560 1 0.5228 0.221 0.524 0.000 0.000 0.404 0.020 0.052
#> GSM786564 2 0.3817 0.442 0.000 0.720 0.000 0.000 0.028 0.252
#> GSM786568 3 0.0865 0.853 0.000 0.036 0.964 0.000 0.000 0.000
#> GSM786569 4 0.3089 0.837 0.104 0.000 0.000 0.848 0.020 0.028
#> GSM786571 3 0.0865 0.853 0.000 0.036 0.964 0.000 0.000 0.000
#> GSM786496 2 0.4302 0.542 0.000 0.644 0.000 0.028 0.004 0.324
#> GSM786506 1 0.3945 0.710 0.792 0.000 0.000 0.024 0.068 0.116
#> GSM786508 6 0.5761 0.211 0.036 0.028 0.324 0.012 0.020 0.580
#> GSM786512 6 0.5125 0.169 0.004 0.040 0.368 0.000 0.020 0.568
#> GSM786518 4 0.1364 0.883 0.048 0.000 0.000 0.944 0.004 0.004
#> GSM786519 4 0.4964 0.755 0.072 0.000 0.108 0.744 0.020 0.056
#> GSM786524 4 0.2717 0.875 0.080 0.000 0.012 0.880 0.012 0.016
#> GSM786529 3 0.0937 0.853 0.000 0.040 0.960 0.000 0.000 0.000
#> GSM786530 4 0.4540 0.568 0.036 0.000 0.252 0.692 0.008 0.012
#> GSM786532 1 0.2138 0.759 0.920 0.000 0.028 0.012 0.028 0.012
#> GSM786533 3 0.5035 0.669 0.000 0.200 0.676 0.004 0.012 0.108
#> GSM786544 3 0.0653 0.842 0.012 0.000 0.980 0.004 0.004 0.000
#> GSM786547 3 0.1219 0.850 0.000 0.048 0.948 0.000 0.004 0.000
#> GSM786549 3 0.1490 0.829 0.024 0.000 0.948 0.004 0.008 0.016
#> GSM786550 5 0.2443 0.753 0.004 0.020 0.096 0.000 0.880 0.000
#> GSM786563 2 0.1636 0.502 0.000 0.936 0.036 0.004 0.024 0.000
#> GSM786570 2 0.3452 0.465 0.000 0.736 0.000 0.004 0.004 0.256
#> GSM786576 2 0.4537 0.345 0.000 0.492 0.000 0.024 0.004 0.480
#> GSM786577 4 0.2507 0.880 0.072 0.000 0.008 0.892 0.012 0.016
#> GSM786578 2 0.2109 0.512 0.000 0.920 0.028 0.004 0.024 0.024
#> GSM786582 1 0.3149 0.747 0.852 0.000 0.000 0.084 0.028 0.036
#> GSM786495 6 0.2912 0.590 0.000 0.216 0.000 0.000 0.000 0.784
#> GSM786505 1 0.3247 0.739 0.852 0.000 0.000 0.048 0.048 0.052
#> GSM786511 4 0.2123 0.880 0.064 0.000 0.000 0.908 0.020 0.008
#> GSM786513 1 0.2862 0.752 0.884 0.000 0.044 0.016 0.028 0.028
#> GSM786525 6 0.6125 0.316 0.180 0.208 0.000 0.016 0.020 0.576
#> GSM786540 2 0.1973 0.530 0.000 0.924 0.028 0.004 0.008 0.036
#> GSM786553 1 0.2419 0.751 0.896 0.000 0.016 0.000 0.028 0.060
#> GSM786561 4 0.2786 0.863 0.076 0.000 0.008 0.876 0.008 0.032
#> GSM786575 5 0.2070 0.817 0.092 0.000 0.000 0.012 0.896 0.000
#> GSM786494 5 0.5777 0.530 0.224 0.000 0.000 0.176 0.580 0.020
#> GSM786504 1 0.2862 0.752 0.884 0.000 0.044 0.016 0.028 0.028
#> GSM786510 6 0.3154 0.605 0.000 0.184 0.000 0.012 0.004 0.800
#> GSM786514 1 0.3269 0.748 0.860 0.000 0.044 0.012 0.036 0.048
#> GSM786516 3 0.4707 0.573 0.228 0.000 0.700 0.016 0.012 0.044
#> GSM786520 1 0.4308 0.622 0.724 0.000 0.000 0.216 0.020 0.040
#> GSM786521 5 0.2006 0.825 0.060 0.004 0.016 0.000 0.916 0.004
#> GSM786536 3 0.4126 0.662 0.168 0.000 0.764 0.004 0.016 0.048
#> GSM786542 3 0.3650 0.707 0.000 0.272 0.716 0.004 0.008 0.000
#> GSM786546 3 0.1697 0.849 0.020 0.036 0.936 0.004 0.004 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 specimen(p) disease.state(p) k
#> SD:kmeans 92 0.02482 1.000 2
#> SD:kmeans 85 0.00330 0.276 3
#> SD:kmeans 69 0.01415 0.252 4
#> SD:kmeans 85 0.02583 0.458 5
#> SD:kmeans 74 0.00992 0.608 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 54547 rows and 93 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 1.000 0.978 0.991 0.5058 0.495 0.495
#> 3 3 0.942 0.953 0.977 0.2841 0.798 0.614
#> 4 4 0.758 0.651 0.843 0.1295 0.910 0.746
#> 5 5 0.718 0.691 0.823 0.0599 0.925 0.740
#> 6 6 0.716 0.565 0.757 0.0453 0.920 0.676
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following 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
#> GSM786527 2 0.000 0.985 0.000 1.000
#> GSM786539 2 0.000 0.985 0.000 1.000
#> GSM786541 2 0.000 0.985 0.000 1.000
#> GSM786556 2 0.000 0.985 0.000 1.000
#> GSM786523 1 0.000 0.995 1.000 0.000
#> GSM786497 1 0.000 0.995 1.000 0.000
#> GSM786501 2 0.000 0.985 0.000 1.000
#> GSM786517 2 0.000 0.985 0.000 1.000
#> GSM786534 2 0.000 0.985 0.000 1.000
#> GSM786555 2 0.000 0.985 0.000 1.000
#> GSM786558 2 0.000 0.985 0.000 1.000
#> GSM786559 2 0.000 0.985 0.000 1.000
#> GSM786565 2 0.000 0.985 0.000 1.000
#> GSM786572 2 0.000 0.985 0.000 1.000
#> GSM786579 2 0.000 0.985 0.000 1.000
#> GSM786491 1 0.000 0.995 1.000 0.000
#> GSM786509 1 0.000 0.995 1.000 0.000
#> GSM786538 1 0.000 0.995 1.000 0.000
#> GSM786548 2 0.000 0.985 0.000 1.000
#> GSM786562 1 0.000 0.995 1.000 0.000
#> GSM786566 1 0.000 0.995 1.000 0.000
#> GSM786573 2 0.000 0.985 0.000 1.000
#> GSM786574 2 0.000 0.985 0.000 1.000
#> GSM786580 2 0.909 0.527 0.324 0.676
#> GSM786581 2 0.000 0.985 0.000 1.000
#> GSM786583 1 0.000 0.995 1.000 0.000
#> GSM786492 1 0.000 0.995 1.000 0.000
#> GSM786493 2 0.000 0.985 0.000 1.000
#> GSM786499 2 0.000 0.985 0.000 1.000
#> GSM786502 2 0.000 0.985 0.000 1.000
#> GSM786537 1 0.000 0.995 1.000 0.000
#> GSM786567 2 0.000 0.985 0.000 1.000
#> GSM786498 1 0.000 0.995 1.000 0.000
#> GSM786500 1 0.000 0.995 1.000 0.000
#> GSM786503 1 0.000 0.995 1.000 0.000
#> GSM786507 2 0.000 0.985 0.000 1.000
#> GSM786515 2 0.000 0.985 0.000 1.000
#> GSM786522 1 0.000 0.995 1.000 0.000
#> GSM786526 1 0.000 0.995 1.000 0.000
#> GSM786528 1 0.000 0.995 1.000 0.000
#> GSM786531 2 0.871 0.590 0.292 0.708
#> GSM786535 2 0.000 0.985 0.000 1.000
#> GSM786543 1 0.000 0.995 1.000 0.000
#> GSM786545 1 0.000 0.995 1.000 0.000
#> GSM786551 1 0.000 0.995 1.000 0.000
#> GSM786552 2 0.000 0.985 0.000 1.000
#> GSM786554 2 0.000 0.985 0.000 1.000
#> GSM786557 1 0.000 0.995 1.000 0.000
#> GSM786560 1 0.000 0.995 1.000 0.000
#> GSM786564 2 0.000 0.985 0.000 1.000
#> GSM786568 2 0.000 0.985 0.000 1.000
#> GSM786569 1 0.000 0.995 1.000 0.000
#> GSM786571 1 0.722 0.743 0.800 0.200
#> GSM786496 2 0.000 0.985 0.000 1.000
#> GSM786506 1 0.000 0.995 1.000 0.000
#> GSM786508 2 0.000 0.985 0.000 1.000
#> GSM786512 2 0.000 0.985 0.000 1.000
#> GSM786518 1 0.000 0.995 1.000 0.000
#> GSM786519 1 0.000 0.995 1.000 0.000
#> GSM786524 1 0.000 0.995 1.000 0.000
#> GSM786529 2 0.000 0.985 0.000 1.000
#> GSM786530 1 0.000 0.995 1.000 0.000
#> GSM786532 1 0.000 0.995 1.000 0.000
#> GSM786533 2 0.000 0.985 0.000 1.000
#> GSM786544 1 0.000 0.995 1.000 0.000
#> GSM786547 2 0.000 0.985 0.000 1.000
#> GSM786549 1 0.000 0.995 1.000 0.000
#> GSM786550 2 0.295 0.935 0.052 0.948
#> GSM786563 2 0.000 0.985 0.000 1.000
#> GSM786570 2 0.000 0.985 0.000 1.000
#> GSM786576 2 0.000 0.985 0.000 1.000
#> GSM786577 1 0.000 0.995 1.000 0.000
#> GSM786578 2 0.000 0.985 0.000 1.000
#> GSM786582 1 0.000 0.995 1.000 0.000
#> GSM786495 2 0.000 0.985 0.000 1.000
#> GSM786505 1 0.000 0.995 1.000 0.000
#> GSM786511 1 0.000 0.995 1.000 0.000
#> GSM786513 1 0.000 0.995 1.000 0.000
#> GSM786525 2 0.000 0.985 0.000 1.000
#> GSM786540 2 0.000 0.985 0.000 1.000
#> GSM786553 1 0.000 0.995 1.000 0.000
#> GSM786561 1 0.000 0.995 1.000 0.000
#> GSM786575 1 0.000 0.995 1.000 0.000
#> GSM786494 1 0.000 0.995 1.000 0.000
#> GSM786504 1 0.000 0.995 1.000 0.000
#> GSM786510 2 0.000 0.985 0.000 1.000
#> GSM786514 1 0.000 0.995 1.000 0.000
#> GSM786516 1 0.000 0.995 1.000 0.000
#> GSM786520 1 0.000 0.995 1.000 0.000
#> GSM786521 1 0.000 0.995 1.000 0.000
#> GSM786536 1 0.000 0.995 1.000 0.000
#> GSM786542 2 0.000 0.985 0.000 1.000
#> GSM786546 2 0.000 0.985 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786539 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786541 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786556 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786523 3 0.0747 0.948 0.016 0.000 0.984
#> GSM786497 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786501 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786534 2 0.0747 0.964 0.000 0.984 0.016
#> GSM786555 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786491 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786548 2 0.0747 0.964 0.000 0.984 0.016
#> GSM786562 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786566 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786573 3 0.3879 0.820 0.000 0.152 0.848
#> GSM786574 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786580 1 0.5360 0.689 0.768 0.220 0.012
#> GSM786581 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786583 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786492 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786493 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786502 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786537 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786567 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786498 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786500 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786503 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786507 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786515 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786522 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786526 1 0.0424 0.981 0.992 0.000 0.008
#> GSM786528 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786531 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786535 3 0.1753 0.927 0.000 0.048 0.952
#> GSM786543 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786545 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786551 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786552 3 0.0747 0.948 0.000 0.016 0.984
#> GSM786554 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786560 1 0.0424 0.981 0.992 0.000 0.008
#> GSM786564 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786568 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786569 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786571 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786496 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786506 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786508 2 0.4178 0.796 0.000 0.828 0.172
#> GSM786512 2 0.4654 0.748 0.000 0.792 0.208
#> GSM786518 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786519 1 0.3619 0.844 0.864 0.000 0.136
#> GSM786524 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786529 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786530 3 0.3619 0.854 0.136 0.000 0.864
#> GSM786532 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786533 2 0.5968 0.456 0.000 0.636 0.364
#> GSM786544 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786547 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786549 3 0.0000 0.955 0.000 0.000 1.000
#> GSM786550 3 0.4749 0.858 0.116 0.040 0.844
#> GSM786563 2 0.0892 0.961 0.000 0.980 0.020
#> GSM786570 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786577 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786578 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786582 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786511 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786513 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786525 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786540 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786553 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786561 1 0.0747 0.979 0.984 0.000 0.016
#> GSM786575 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786494 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786504 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786510 2 0.0000 0.977 0.000 1.000 0.000
#> GSM786514 1 0.0424 0.981 0.992 0.000 0.008
#> GSM786516 3 0.4002 0.825 0.160 0.000 0.840
#> GSM786520 1 0.0000 0.983 1.000 0.000 0.000
#> GSM786521 1 0.0747 0.972 0.984 0.000 0.016
#> GSM786536 3 0.2625 0.904 0.084 0.000 0.916
#> GSM786542 3 0.0747 0.948 0.000 0.016 0.984
#> GSM786546 3 0.0747 0.948 0.000 0.016 0.984
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786539 2 0.1792 0.90372 0.000 0.932 0.000 0.068
#> GSM786541 2 0.0188 0.93094 0.000 0.996 0.004 0.000
#> GSM786556 2 0.0336 0.93006 0.000 0.992 0.008 0.000
#> GSM786523 3 0.2816 0.82511 0.064 0.000 0.900 0.036
#> GSM786497 4 0.2999 0.57229 0.132 0.000 0.004 0.864
#> GSM786501 2 0.1792 0.90372 0.000 0.932 0.000 0.068
#> GSM786517 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786534 2 0.1716 0.89555 0.000 0.936 0.064 0.000
#> GSM786555 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0188 0.93094 0.000 0.996 0.004 0.000
#> GSM786559 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0779 0.92625 0.000 0.980 0.004 0.016
#> GSM786579 2 0.0336 0.93006 0.000 0.992 0.008 0.000
#> GSM786491 1 0.4967 0.05265 0.548 0.000 0.000 0.452
#> GSM786509 1 0.4999 -0.16265 0.508 0.000 0.000 0.492
#> GSM786538 1 0.0336 0.67004 0.992 0.000 0.000 0.008
#> GSM786548 2 0.2522 0.87704 0.000 0.908 0.076 0.016
#> GSM786562 1 0.3649 0.56263 0.796 0.000 0.000 0.204
#> GSM786566 4 0.4996 0.08750 0.484 0.000 0.000 0.516
#> GSM786573 3 0.3962 0.72301 0.000 0.152 0.820 0.028
#> GSM786574 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786580 4 0.4933 0.02194 0.432 0.000 0.000 0.568
#> GSM786581 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786583 3 0.0188 0.88683 0.004 0.000 0.996 0.000
#> GSM786492 4 0.2281 0.56196 0.096 0.000 0.000 0.904
#> GSM786493 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786499 2 0.1792 0.90372 0.000 0.932 0.000 0.068
#> GSM786502 2 0.5564 0.34647 0.020 0.544 0.000 0.436
#> GSM786537 4 0.3172 0.55115 0.160 0.000 0.000 0.840
#> GSM786567 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786498 4 0.2704 0.47480 0.124 0.000 0.000 0.876
#> GSM786500 4 0.2760 0.57162 0.128 0.000 0.000 0.872
#> GSM786503 1 0.2469 0.63749 0.892 0.000 0.000 0.108
#> GSM786507 2 0.1792 0.90372 0.000 0.932 0.000 0.068
#> GSM786515 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786522 1 0.2011 0.64509 0.920 0.000 0.000 0.080
#> GSM786526 1 0.2011 0.64149 0.920 0.000 0.000 0.080
#> GSM786528 1 0.0336 0.66929 0.992 0.000 0.000 0.008
#> GSM786531 3 0.0000 0.88707 0.000 0.000 1.000 0.000
#> GSM786535 3 0.0927 0.87970 0.000 0.008 0.976 0.016
#> GSM786543 1 0.4972 -0.16781 0.544 0.000 0.000 0.456
#> GSM786545 3 0.1209 0.87098 0.004 0.000 0.964 0.032
#> GSM786551 1 0.4898 0.08534 0.584 0.000 0.000 0.416
#> GSM786552 3 0.0188 0.88592 0.000 0.004 0.996 0.000
#> GSM786554 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786557 1 0.2081 0.64787 0.916 0.000 0.000 0.084
#> GSM786560 1 0.4989 -0.11635 0.528 0.000 0.000 0.472
#> GSM786564 2 0.0707 0.92705 0.000 0.980 0.000 0.020
#> GSM786568 3 0.0188 0.88683 0.004 0.000 0.996 0.000
#> GSM786569 4 0.4964 0.34688 0.380 0.000 0.004 0.616
#> GSM786571 3 0.0000 0.88707 0.000 0.000 1.000 0.000
#> GSM786496 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786506 1 0.3074 0.59887 0.848 0.000 0.000 0.152
#> GSM786508 2 0.7537 0.46971 0.016 0.560 0.184 0.240
#> GSM786512 2 0.5851 0.58119 0.000 0.660 0.272 0.068
#> GSM786518 4 0.3626 0.55752 0.184 0.000 0.004 0.812
#> GSM786519 4 0.5444 0.26007 0.424 0.000 0.016 0.560
#> GSM786524 4 0.5165 0.23230 0.484 0.000 0.004 0.512
#> GSM786529 3 0.0000 0.88707 0.000 0.000 1.000 0.000
#> GSM786530 4 0.5783 0.46715 0.120 0.000 0.172 0.708
#> GSM786532 1 0.0817 0.66910 0.976 0.000 0.000 0.024
#> GSM786533 2 0.5295 0.11116 0.000 0.504 0.488 0.008
#> GSM786544 3 0.0188 0.88683 0.004 0.000 0.996 0.000
#> GSM786547 3 0.0000 0.88707 0.000 0.000 1.000 0.000
#> GSM786549 3 0.0336 0.88540 0.008 0.000 0.992 0.000
#> GSM786550 3 0.6878 0.31154 0.096 0.004 0.524 0.376
#> GSM786563 2 0.2593 0.87339 0.000 0.904 0.080 0.016
#> GSM786570 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0000 0.93165 0.000 1.000 0.000 0.000
#> GSM786577 4 0.5158 0.25874 0.472 0.000 0.004 0.524
#> GSM786578 2 0.0927 0.92486 0.000 0.976 0.008 0.016
#> GSM786582 1 0.2868 0.62685 0.864 0.000 0.000 0.136
#> GSM786495 2 0.1792 0.90372 0.000 0.932 0.000 0.068
#> GSM786505 1 0.2081 0.64787 0.916 0.000 0.000 0.084
#> GSM786511 4 0.3831 0.55301 0.204 0.000 0.004 0.792
#> GSM786513 1 0.2216 0.64922 0.908 0.000 0.000 0.092
#> GSM786525 2 0.0707 0.92325 0.020 0.980 0.000 0.000
#> GSM786540 2 0.0336 0.93006 0.000 0.992 0.008 0.000
#> GSM786553 1 0.0188 0.66934 0.996 0.000 0.000 0.004
#> GSM786561 4 0.5137 0.22652 0.452 0.000 0.004 0.544
#> GSM786575 1 0.4994 -0.00987 0.520 0.000 0.000 0.480
#> GSM786494 4 0.4916 0.11860 0.424 0.000 0.000 0.576
#> GSM786504 1 0.2281 0.64618 0.904 0.000 0.000 0.096
#> GSM786510 2 0.1792 0.90372 0.000 0.932 0.000 0.068
#> GSM786514 1 0.3219 0.54196 0.836 0.000 0.000 0.164
#> GSM786516 3 0.6998 0.08315 0.416 0.000 0.468 0.116
#> GSM786520 1 0.3726 0.52884 0.788 0.000 0.000 0.212
#> GSM786521 4 0.4941 0.01912 0.436 0.000 0.000 0.564
#> GSM786536 3 0.5691 0.49403 0.304 0.000 0.648 0.048
#> GSM786542 3 0.1182 0.87473 0.000 0.016 0.968 0.016
#> GSM786546 3 0.0779 0.88126 0.000 0.004 0.980 0.016
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0880 0.8421 0.000 0.968 0.000 0.000 0.032
#> GSM786539 2 0.3774 0.6737 0.000 0.704 0.000 0.000 0.296
#> GSM786541 2 0.1830 0.8260 0.000 0.924 0.008 0.000 0.068
#> GSM786556 2 0.2233 0.8191 0.000 0.904 0.016 0.000 0.080
#> GSM786523 3 0.4165 0.6531 0.032 0.000 0.756 0.208 0.004
#> GSM786497 4 0.0865 0.8454 0.024 0.000 0.000 0.972 0.004
#> GSM786501 2 0.3774 0.6725 0.000 0.704 0.000 0.000 0.296
#> GSM786517 2 0.1121 0.8363 0.000 0.956 0.000 0.000 0.044
#> GSM786534 2 0.2511 0.8140 0.000 0.892 0.028 0.000 0.080
#> GSM786555 2 0.0510 0.8408 0.000 0.984 0.000 0.000 0.016
#> GSM786558 2 0.1124 0.8376 0.000 0.960 0.004 0.000 0.036
#> GSM786559 2 0.1478 0.8416 0.000 0.936 0.000 0.000 0.064
#> GSM786565 2 0.0880 0.8396 0.000 0.968 0.000 0.000 0.032
#> GSM786572 2 0.3419 0.7604 0.000 0.804 0.016 0.000 0.180
#> GSM786579 2 0.2505 0.8134 0.000 0.888 0.020 0.000 0.092
#> GSM786491 5 0.5703 0.4672 0.408 0.000 0.000 0.084 0.508
#> GSM786509 4 0.4101 0.3799 0.372 0.000 0.000 0.628 0.000
#> GSM786538 1 0.0579 0.8085 0.984 0.000 0.000 0.008 0.008
#> GSM786548 2 0.3958 0.7381 0.000 0.776 0.040 0.000 0.184
#> GSM786562 1 0.2989 0.7777 0.868 0.000 0.000 0.060 0.072
#> GSM786566 1 0.6653 0.1001 0.436 0.000 0.000 0.320 0.244
#> GSM786573 3 0.6214 0.5827 0.000 0.172 0.656 0.096 0.076
#> GSM786574 2 0.0404 0.8410 0.000 0.988 0.000 0.000 0.012
#> GSM786580 5 0.5218 0.5618 0.308 0.000 0.000 0.068 0.624
#> GSM786581 2 0.0609 0.8428 0.000 0.980 0.000 0.000 0.020
#> GSM786583 3 0.0451 0.8000 0.004 0.000 0.988 0.008 0.000
#> GSM786492 4 0.1043 0.8074 0.000 0.000 0.000 0.960 0.040
#> GSM786493 2 0.0609 0.8413 0.000 0.980 0.000 0.000 0.020
#> GSM786499 2 0.3774 0.6725 0.000 0.704 0.000 0.000 0.296
#> GSM786502 5 0.6287 -0.4022 0.004 0.436 0.004 0.112 0.444
#> GSM786537 4 0.1626 0.8013 0.016 0.000 0.000 0.940 0.044
#> GSM786567 2 0.1043 0.8371 0.000 0.960 0.000 0.000 0.040
#> GSM786498 4 0.5080 0.3978 0.048 0.000 0.000 0.604 0.348
#> GSM786500 4 0.1106 0.8427 0.024 0.000 0.000 0.964 0.012
#> GSM786503 1 0.1741 0.8087 0.936 0.000 0.000 0.040 0.024
#> GSM786507 2 0.3752 0.6763 0.000 0.708 0.000 0.000 0.292
#> GSM786515 2 0.0963 0.8398 0.000 0.964 0.000 0.000 0.036
#> GSM786522 1 0.1732 0.8032 0.920 0.000 0.000 0.080 0.000
#> GSM786526 1 0.1082 0.8105 0.964 0.000 0.000 0.028 0.008
#> GSM786528 1 0.0693 0.8074 0.980 0.000 0.000 0.012 0.008
#> GSM786531 3 0.0451 0.8009 0.000 0.000 0.988 0.008 0.004
#> GSM786535 3 0.3612 0.7139 0.000 0.028 0.800 0.000 0.172
#> GSM786543 4 0.3231 0.7088 0.196 0.000 0.004 0.800 0.000
#> GSM786545 3 0.3487 0.6649 0.008 0.000 0.780 0.212 0.000
#> GSM786551 1 0.5930 0.0740 0.516 0.000 0.000 0.372 0.112
#> GSM786552 3 0.2628 0.7570 0.000 0.028 0.884 0.000 0.088
#> GSM786554 2 0.1043 0.8371 0.000 0.960 0.000 0.000 0.040
#> GSM786557 1 0.2595 0.7958 0.888 0.000 0.000 0.080 0.032
#> GSM786560 4 0.4307 -0.0781 0.500 0.000 0.000 0.500 0.000
#> GSM786564 2 0.2848 0.7945 0.000 0.840 0.004 0.000 0.156
#> GSM786568 3 0.0290 0.8008 0.000 0.000 0.992 0.008 0.000
#> GSM786569 4 0.1341 0.8457 0.056 0.000 0.000 0.944 0.000
#> GSM786571 3 0.0290 0.8008 0.000 0.000 0.992 0.008 0.000
#> GSM786496 2 0.0703 0.8401 0.000 0.976 0.000 0.000 0.024
#> GSM786506 1 0.2659 0.7829 0.888 0.000 0.000 0.052 0.060
#> GSM786508 2 0.7169 0.2921 0.004 0.440 0.208 0.020 0.328
#> GSM786512 2 0.6815 0.2824 0.004 0.432 0.260 0.000 0.304
#> GSM786518 4 0.0880 0.8484 0.032 0.000 0.000 0.968 0.000
#> GSM786519 4 0.1522 0.8468 0.044 0.000 0.012 0.944 0.000
#> GSM786524 4 0.1894 0.8402 0.072 0.000 0.008 0.920 0.000
#> GSM786529 3 0.0162 0.7998 0.000 0.000 0.996 0.000 0.004
#> GSM786530 4 0.2300 0.8013 0.024 0.000 0.072 0.904 0.000
#> GSM786532 1 0.1012 0.8078 0.968 0.000 0.000 0.020 0.012
#> GSM786533 3 0.6439 -0.0711 0.000 0.404 0.420 0.000 0.176
#> GSM786544 3 0.0451 0.8000 0.004 0.000 0.988 0.008 0.000
#> GSM786547 3 0.0290 0.7989 0.000 0.000 0.992 0.000 0.008
#> GSM786549 3 0.1267 0.7917 0.012 0.000 0.960 0.024 0.004
#> GSM786550 5 0.5820 0.0941 0.020 0.008 0.328 0.048 0.596
#> GSM786563 2 0.4031 0.7342 0.000 0.772 0.044 0.000 0.184
#> GSM786570 2 0.1732 0.8349 0.000 0.920 0.000 0.000 0.080
#> GSM786576 2 0.1197 0.8353 0.000 0.952 0.000 0.000 0.048
#> GSM786577 4 0.1830 0.8421 0.068 0.000 0.008 0.924 0.000
#> GSM786578 2 0.3690 0.7421 0.000 0.780 0.020 0.000 0.200
#> GSM786582 1 0.3419 0.7377 0.804 0.000 0.000 0.180 0.016
#> GSM786495 2 0.3752 0.6763 0.000 0.708 0.000 0.000 0.292
#> GSM786505 1 0.2535 0.7955 0.892 0.000 0.000 0.076 0.032
#> GSM786511 4 0.0963 0.8461 0.036 0.000 0.000 0.964 0.000
#> GSM786513 1 0.2079 0.8004 0.916 0.000 0.000 0.064 0.020
#> GSM786525 2 0.2927 0.7914 0.092 0.868 0.000 0.000 0.040
#> GSM786540 2 0.2505 0.8134 0.000 0.888 0.020 0.000 0.092
#> GSM786553 1 0.0693 0.8103 0.980 0.000 0.000 0.012 0.008
#> GSM786561 4 0.1502 0.8451 0.056 0.000 0.004 0.940 0.000
#> GSM786575 5 0.5779 0.4765 0.400 0.000 0.000 0.092 0.508
#> GSM786494 5 0.6454 0.4453 0.304 0.000 0.000 0.208 0.488
#> GSM786504 1 0.2012 0.7983 0.920 0.000 0.000 0.060 0.020
#> GSM786510 2 0.3796 0.6693 0.000 0.700 0.000 0.000 0.300
#> GSM786514 1 0.2439 0.7797 0.876 0.000 0.000 0.120 0.004
#> GSM786516 3 0.5687 0.4029 0.324 0.000 0.584 0.088 0.004
#> GSM786520 1 0.4026 0.6453 0.736 0.000 0.000 0.244 0.020
#> GSM786521 5 0.5272 0.5624 0.308 0.000 0.000 0.072 0.620
#> GSM786536 3 0.4797 0.5254 0.280 0.000 0.676 0.040 0.004
#> GSM786542 3 0.4309 0.6778 0.000 0.084 0.768 0.000 0.148
#> GSM786546 3 0.2699 0.7653 0.008 0.012 0.880 0.000 0.100
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.3907 0.1467 0.000 0.408 0.000 0.000 0.004 0.588
#> GSM786539 6 0.0551 0.4494 0.000 0.008 0.000 0.004 0.004 0.984
#> GSM786541 2 0.3989 0.2368 0.000 0.528 0.000 0.000 0.004 0.468
#> GSM786556 2 0.3966 0.3365 0.000 0.552 0.000 0.000 0.004 0.444
#> GSM786523 3 0.4919 0.6342 0.024 0.080 0.724 0.156 0.016 0.000
#> GSM786497 4 0.0964 0.8773 0.004 0.016 0.000 0.968 0.012 0.000
#> GSM786501 6 0.0767 0.4508 0.000 0.012 0.000 0.004 0.008 0.976
#> GSM786517 6 0.3446 0.3912 0.000 0.308 0.000 0.000 0.000 0.692
#> GSM786534 2 0.4070 0.3741 0.000 0.568 0.004 0.000 0.004 0.424
#> GSM786555 6 0.3747 0.2476 0.000 0.396 0.000 0.000 0.000 0.604
#> GSM786558 6 0.3843 0.0345 0.000 0.452 0.000 0.000 0.000 0.548
#> GSM786559 6 0.3868 -0.2156 0.000 0.496 0.000 0.000 0.000 0.504
#> GSM786565 6 0.3797 0.1766 0.000 0.420 0.000 0.000 0.000 0.580
#> GSM786572 2 0.3518 0.6248 0.000 0.732 0.000 0.000 0.012 0.256
#> GSM786579 2 0.3584 0.5942 0.000 0.688 0.000 0.000 0.004 0.308
#> GSM786491 5 0.2473 0.8242 0.136 0.000 0.000 0.008 0.856 0.000
#> GSM786509 4 0.4183 0.2771 0.380 0.008 0.000 0.604 0.008 0.000
#> GSM786538 1 0.0891 0.7839 0.968 0.000 0.000 0.008 0.024 0.000
#> GSM786548 2 0.4054 0.6215 0.000 0.736 0.020 0.000 0.024 0.220
#> GSM786562 1 0.4122 0.7141 0.792 0.092 0.000 0.032 0.080 0.004
#> GSM786566 1 0.7962 0.1890 0.400 0.104 0.000 0.284 0.076 0.136
#> GSM786573 3 0.6936 0.3181 0.000 0.324 0.452 0.100 0.008 0.116
#> GSM786574 6 0.3717 0.2778 0.000 0.384 0.000 0.000 0.000 0.616
#> GSM786580 5 0.1542 0.8797 0.016 0.024 0.000 0.016 0.944 0.000
#> GSM786581 6 0.3717 0.2678 0.000 0.384 0.000 0.000 0.000 0.616
#> GSM786583 3 0.0000 0.7690 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786492 4 0.1285 0.8584 0.000 0.004 0.000 0.944 0.052 0.000
#> GSM786493 6 0.3482 0.3797 0.000 0.316 0.000 0.000 0.000 0.684
#> GSM786499 6 0.0964 0.4470 0.000 0.016 0.000 0.004 0.012 0.968
#> GSM786502 6 0.6240 0.0638 0.012 0.272 0.000 0.036 0.128 0.552
#> GSM786537 4 0.1471 0.8498 0.000 0.004 0.000 0.932 0.064 0.000
#> GSM786567 6 0.3464 0.3841 0.000 0.312 0.000 0.000 0.000 0.688
#> GSM786498 4 0.7095 0.3695 0.044 0.108 0.000 0.552 0.152 0.144
#> GSM786500 4 0.0653 0.8789 0.004 0.004 0.000 0.980 0.012 0.000
#> GSM786503 1 0.2371 0.7718 0.900 0.052 0.000 0.016 0.032 0.000
#> GSM786507 6 0.0653 0.4535 0.000 0.012 0.000 0.004 0.004 0.980
#> GSM786515 6 0.3309 0.4112 0.000 0.280 0.000 0.000 0.000 0.720
#> GSM786522 1 0.1718 0.7863 0.932 0.008 0.000 0.044 0.016 0.000
#> GSM786526 1 0.3266 0.7599 0.844 0.096 0.004 0.016 0.040 0.000
#> GSM786528 1 0.3207 0.7595 0.848 0.088 0.004 0.012 0.048 0.000
#> GSM786531 3 0.0146 0.7694 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM786535 3 0.4348 0.5039 0.000 0.416 0.560 0.000 0.024 0.000
#> GSM786543 4 0.3066 0.7581 0.124 0.044 0.000 0.832 0.000 0.000
#> GSM786545 3 0.3295 0.6627 0.004 0.012 0.796 0.184 0.004 0.000
#> GSM786551 1 0.6060 0.2224 0.476 0.012 0.000 0.324 0.188 0.000
#> GSM786552 3 0.3394 0.6485 0.000 0.236 0.752 0.000 0.012 0.000
#> GSM786554 6 0.3351 0.4055 0.000 0.288 0.000 0.000 0.000 0.712
#> GSM786557 1 0.2704 0.7723 0.884 0.032 0.000 0.036 0.048 0.000
#> GSM786560 1 0.4922 0.2156 0.504 0.044 0.000 0.444 0.008 0.000
#> GSM786564 2 0.5228 0.3474 0.000 0.524 0.000 0.000 0.100 0.376
#> GSM786568 3 0.0146 0.7687 0.000 0.000 0.996 0.000 0.004 0.000
#> GSM786569 4 0.1269 0.8779 0.020 0.012 0.000 0.956 0.012 0.000
#> GSM786571 3 0.0260 0.7693 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786496 6 0.3789 0.1923 0.000 0.416 0.000 0.000 0.000 0.584
#> GSM786506 1 0.3287 0.7535 0.852 0.056 0.000 0.028 0.060 0.004
#> GSM786508 6 0.4911 0.2350 0.008 0.044 0.188 0.012 0.028 0.720
#> GSM786512 6 0.4484 0.2131 0.008 0.024 0.240 0.004 0.016 0.708
#> GSM786518 4 0.0405 0.8805 0.004 0.000 0.000 0.988 0.008 0.000
#> GSM786519 4 0.2201 0.8631 0.024 0.048 0.004 0.912 0.012 0.000
#> GSM786524 4 0.1245 0.8759 0.032 0.016 0.000 0.952 0.000 0.000
#> GSM786529 3 0.0260 0.7693 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786530 4 0.1649 0.8578 0.008 0.016 0.040 0.936 0.000 0.000
#> GSM786532 1 0.1442 0.7808 0.944 0.004 0.000 0.012 0.040 0.000
#> GSM786533 2 0.6211 0.0872 0.000 0.468 0.324 0.000 0.020 0.188
#> GSM786544 3 0.0436 0.7672 0.000 0.004 0.988 0.004 0.004 0.000
#> GSM786547 3 0.0692 0.7665 0.000 0.020 0.976 0.000 0.004 0.000
#> GSM786549 3 0.2379 0.7410 0.008 0.064 0.900 0.020 0.008 0.000
#> GSM786550 5 0.2527 0.8162 0.000 0.048 0.064 0.004 0.884 0.000
#> GSM786563 2 0.4027 0.6203 0.000 0.740 0.020 0.000 0.024 0.216
#> GSM786570 2 0.3993 0.1850 0.000 0.520 0.000 0.000 0.004 0.476
#> GSM786576 6 0.3409 0.3978 0.000 0.300 0.000 0.000 0.000 0.700
#> GSM786577 4 0.1245 0.8759 0.032 0.016 0.000 0.952 0.000 0.000
#> GSM786578 2 0.4011 0.6103 0.000 0.732 0.000 0.000 0.056 0.212
#> GSM786582 1 0.3442 0.7257 0.796 0.016 0.000 0.172 0.016 0.000
#> GSM786495 6 0.0748 0.4532 0.000 0.016 0.000 0.004 0.004 0.976
#> GSM786505 1 0.2629 0.7736 0.888 0.028 0.000 0.036 0.048 0.000
#> GSM786511 4 0.0551 0.8799 0.008 0.004 0.000 0.984 0.004 0.000
#> GSM786513 1 0.3784 0.7552 0.820 0.080 0.004 0.044 0.052 0.000
#> GSM786525 6 0.5853 0.1252 0.120 0.332 0.000 0.000 0.024 0.524
#> GSM786540 2 0.3448 0.6173 0.000 0.716 0.000 0.000 0.004 0.280
#> GSM786553 1 0.1401 0.7810 0.948 0.028 0.000 0.004 0.020 0.000
#> GSM786561 4 0.1693 0.8668 0.020 0.044 0.000 0.932 0.004 0.000
#> GSM786575 5 0.2301 0.8613 0.096 0.000 0.000 0.020 0.884 0.000
#> GSM786494 5 0.4166 0.7125 0.076 0.000 0.000 0.196 0.728 0.000
#> GSM786504 1 0.3722 0.7573 0.824 0.080 0.004 0.044 0.048 0.000
#> GSM786510 6 0.0964 0.4423 0.000 0.016 0.000 0.004 0.012 0.968
#> GSM786514 1 0.3356 0.7628 0.836 0.092 0.000 0.052 0.020 0.000
#> GSM786516 3 0.6227 0.4658 0.236 0.096 0.592 0.056 0.020 0.000
#> GSM786520 1 0.4156 0.6624 0.728 0.028 0.000 0.224 0.020 0.000
#> GSM786521 5 0.1542 0.8797 0.016 0.024 0.000 0.016 0.944 0.000
#> GSM786536 3 0.5734 0.5300 0.216 0.100 0.636 0.028 0.020 0.000
#> GSM786542 3 0.4325 0.3874 0.000 0.456 0.524 0.000 0.020 0.000
#> GSM786546 3 0.4006 0.6774 0.004 0.200 0.744 0.000 0.052 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 specimen(p) disease.state(p) k
#> SD:skmeans 93 0.02431 0.930 2
#> SD:skmeans 92 0.00431 0.257 3
#> SD:skmeans 70 0.06879 0.769 4
#> SD:skmeans 79 0.06023 0.587 5
#> SD:skmeans 55 0.13122 0.922 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 54547 rows and 93 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 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.848 0.909 0.961 0.5008 0.497 0.497
#> 3 3 0.817 0.851 0.939 0.3386 0.742 0.524
#> 4 4 0.667 0.672 0.822 0.0880 0.899 0.712
#> 5 5 0.698 0.591 0.765 0.0712 0.925 0.723
#> 6 6 0.682 0.451 0.671 0.0346 0.843 0.449
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
#> GSM786527 2 0.0000 0.957 0.000 1.000
#> GSM786539 2 0.0000 0.957 0.000 1.000
#> GSM786541 2 0.0000 0.957 0.000 1.000
#> GSM786556 2 0.0000 0.957 0.000 1.000
#> GSM786523 1 0.4298 0.874 0.912 0.088
#> GSM786497 1 0.0000 0.959 1.000 0.000
#> GSM786501 2 0.0000 0.957 0.000 1.000
#> GSM786517 2 0.0000 0.957 0.000 1.000
#> GSM786534 2 0.0000 0.957 0.000 1.000
#> GSM786555 2 0.0000 0.957 0.000 1.000
#> GSM786558 2 0.0000 0.957 0.000 1.000
#> GSM786559 2 0.0000 0.957 0.000 1.000
#> GSM786565 2 0.0000 0.957 0.000 1.000
#> GSM786572 2 0.0000 0.957 0.000 1.000
#> GSM786579 2 0.0000 0.957 0.000 1.000
#> GSM786491 1 0.0000 0.959 1.000 0.000
#> GSM786509 1 0.0000 0.959 1.000 0.000
#> GSM786538 1 0.0000 0.959 1.000 0.000
#> GSM786548 2 0.0000 0.957 0.000 1.000
#> GSM786562 1 0.2236 0.929 0.964 0.036
#> GSM786566 1 0.2778 0.918 0.952 0.048
#> GSM786573 2 0.1184 0.947 0.016 0.984
#> GSM786574 2 0.0000 0.957 0.000 1.000
#> GSM786580 2 0.3431 0.912 0.064 0.936
#> GSM786581 2 0.0000 0.957 0.000 1.000
#> GSM786583 2 0.8661 0.627 0.288 0.712
#> GSM786492 1 0.0000 0.959 1.000 0.000
#> GSM786493 2 0.0000 0.957 0.000 1.000
#> GSM786499 2 0.0000 0.957 0.000 1.000
#> GSM786502 2 0.0000 0.957 0.000 1.000
#> GSM786537 1 0.0000 0.959 1.000 0.000
#> GSM786567 2 0.0000 0.957 0.000 1.000
#> GSM786498 1 0.7950 0.672 0.760 0.240
#> GSM786500 1 0.0000 0.959 1.000 0.000
#> GSM786503 1 0.0000 0.959 1.000 0.000
#> GSM786507 2 0.0000 0.957 0.000 1.000
#> GSM786515 2 0.0000 0.957 0.000 1.000
#> GSM786522 1 0.0000 0.959 1.000 0.000
#> GSM786526 1 0.0000 0.959 1.000 0.000
#> GSM786528 1 0.0376 0.956 0.996 0.004
#> GSM786531 2 0.6887 0.788 0.184 0.816
#> GSM786535 2 0.2236 0.933 0.036 0.964
#> GSM786543 1 0.0000 0.959 1.000 0.000
#> GSM786545 2 0.9896 0.256 0.440 0.560
#> GSM786551 1 0.0000 0.959 1.000 0.000
#> GSM786552 2 0.0000 0.957 0.000 1.000
#> GSM786554 2 0.0000 0.957 0.000 1.000
#> GSM786557 1 0.0000 0.959 1.000 0.000
#> GSM786560 1 0.0000 0.959 1.000 0.000
#> GSM786564 2 0.0000 0.957 0.000 1.000
#> GSM786568 2 0.0938 0.950 0.012 0.988
#> GSM786569 1 0.0000 0.959 1.000 0.000
#> GSM786571 2 0.8608 0.635 0.284 0.716
#> GSM786496 2 0.0000 0.957 0.000 1.000
#> GSM786506 1 0.0000 0.959 1.000 0.000
#> GSM786508 1 0.9732 0.348 0.596 0.404
#> GSM786512 2 0.0000 0.957 0.000 1.000
#> GSM786518 1 0.0000 0.959 1.000 0.000
#> GSM786519 1 0.0000 0.959 1.000 0.000
#> GSM786524 1 0.0000 0.959 1.000 0.000
#> GSM786529 2 0.5737 0.844 0.136 0.864
#> GSM786530 1 0.0000 0.959 1.000 0.000
#> GSM786532 1 0.0000 0.959 1.000 0.000
#> GSM786533 2 0.0000 0.957 0.000 1.000
#> GSM786544 1 0.9635 0.325 0.612 0.388
#> GSM786547 2 0.4161 0.895 0.084 0.916
#> GSM786549 1 0.0000 0.959 1.000 0.000
#> GSM786550 2 0.6148 0.828 0.152 0.848
#> GSM786563 2 0.0000 0.957 0.000 1.000
#> GSM786570 2 0.0000 0.957 0.000 1.000
#> GSM786576 2 0.0000 0.957 0.000 1.000
#> GSM786577 1 0.0000 0.959 1.000 0.000
#> GSM786578 2 0.0000 0.957 0.000 1.000
#> GSM786582 1 0.0000 0.959 1.000 0.000
#> GSM786495 2 0.0000 0.957 0.000 1.000
#> GSM786505 1 0.0000 0.959 1.000 0.000
#> GSM786511 1 0.0000 0.959 1.000 0.000
#> GSM786513 1 0.0000 0.959 1.000 0.000
#> GSM786525 2 0.0000 0.957 0.000 1.000
#> GSM786540 2 0.0000 0.957 0.000 1.000
#> GSM786553 1 0.0000 0.959 1.000 0.000
#> GSM786561 1 0.0000 0.959 1.000 0.000
#> GSM786575 1 0.0000 0.959 1.000 0.000
#> GSM786494 1 0.0000 0.959 1.000 0.000
#> GSM786504 1 0.0000 0.959 1.000 0.000
#> GSM786510 2 0.0000 0.957 0.000 1.000
#> GSM786514 1 0.0000 0.959 1.000 0.000
#> GSM786516 1 0.0000 0.959 1.000 0.000
#> GSM786520 1 0.0000 0.959 1.000 0.000
#> GSM786521 2 0.6148 0.828 0.152 0.848
#> GSM786536 1 0.9754 0.269 0.592 0.408
#> GSM786542 2 0.0000 0.957 0.000 1.000
#> GSM786546 2 0.6148 0.828 0.152 0.848
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786539 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786541 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786556 2 0.3941 0.7583 0.000 0.844 0.156
#> GSM786523 3 0.4555 0.7424 0.200 0.000 0.800
#> GSM786497 1 0.4504 0.7401 0.804 0.000 0.196
#> GSM786501 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786534 2 0.6308 -0.0596 0.000 0.508 0.492
#> GSM786555 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786558 2 0.1031 0.8880 0.000 0.976 0.024
#> GSM786559 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786572 2 0.6126 0.2906 0.000 0.600 0.400
#> GSM786579 3 0.4654 0.7278 0.000 0.208 0.792
#> GSM786491 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786548 3 0.0747 0.9250 0.000 0.016 0.984
#> GSM786562 1 0.6282 0.4796 0.664 0.324 0.012
#> GSM786566 2 0.9224 0.2263 0.360 0.480 0.160
#> GSM786573 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786574 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786580 3 0.3918 0.8328 0.012 0.120 0.868
#> GSM786581 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786583 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786492 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786493 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786502 2 0.4931 0.6926 0.000 0.768 0.232
#> GSM786537 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786567 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786498 2 0.8526 0.4321 0.120 0.572 0.308
#> GSM786500 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786503 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786507 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786515 2 0.0237 0.9020 0.000 0.996 0.004
#> GSM786522 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786526 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786528 1 0.6225 0.1997 0.568 0.000 0.432
#> GSM786531 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786535 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786543 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786545 3 0.0237 0.9317 0.004 0.000 0.996
#> GSM786551 1 0.6274 0.1198 0.544 0.000 0.456
#> GSM786552 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786554 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786564 2 0.3619 0.7906 0.000 0.864 0.136
#> GSM786568 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786569 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786571 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786496 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786506 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786508 2 0.5397 0.6142 0.000 0.720 0.280
#> GSM786512 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786518 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786519 1 0.0592 0.9446 0.988 0.000 0.012
#> GSM786524 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786529 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786530 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786532 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786533 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786544 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786547 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786549 3 0.0424 0.9299 0.008 0.000 0.992
#> GSM786550 3 0.0424 0.9299 0.008 0.000 0.992
#> GSM786563 3 0.1643 0.9050 0.000 0.044 0.956
#> GSM786570 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786577 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786578 3 0.5785 0.5128 0.000 0.332 0.668
#> GSM786582 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786511 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786513 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786525 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786540 3 0.6045 0.3998 0.000 0.380 0.620
#> GSM786553 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786561 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786575 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786494 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786504 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786510 2 0.0000 0.9044 0.000 1.000 0.000
#> GSM786514 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786516 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786520 1 0.0000 0.9550 1.000 0.000 0.000
#> GSM786521 3 0.1015 0.9258 0.012 0.008 0.980
#> GSM786536 3 0.4346 0.7612 0.184 0.000 0.816
#> GSM786542 3 0.0000 0.9331 0.000 0.000 1.000
#> GSM786546 3 0.0592 0.9275 0.012 0.000 0.988
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.4072 0.37737 0.000 0.748 0.000 0.252
#> GSM786539 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786541 2 0.0000 0.67351 0.000 1.000 0.000 0.000
#> GSM786556 2 0.0707 0.66890 0.000 0.980 0.020 0.000
#> GSM786523 3 0.3852 0.73001 0.192 0.000 0.800 0.008
#> GSM786497 1 0.3160 0.81376 0.872 0.000 0.108 0.020
#> GSM786501 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786517 2 0.4543 -0.00590 0.000 0.676 0.000 0.324
#> GSM786534 2 0.0707 0.66890 0.000 0.980 0.020 0.000
#> GSM786555 2 0.0000 0.67351 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0188 0.67340 0.000 0.996 0.004 0.000
#> GSM786559 2 0.5062 0.52078 0.000 0.752 0.184 0.064
#> GSM786565 2 0.0000 0.67351 0.000 1.000 0.000 0.000
#> GSM786572 2 0.4428 0.49191 0.000 0.720 0.276 0.004
#> GSM786579 2 0.4977 0.05740 0.000 0.540 0.460 0.000
#> GSM786491 1 0.4877 0.65519 0.592 0.000 0.000 0.408
#> GSM786509 1 0.0188 0.88801 0.996 0.000 0.000 0.004
#> GSM786538 1 0.2589 0.87842 0.884 0.000 0.000 0.116
#> GSM786548 3 0.4522 0.53210 0.000 0.320 0.680 0.000
#> GSM786562 1 0.5736 0.62699 0.640 0.020 0.016 0.324
#> GSM786566 4 0.6829 0.38350 0.216 0.036 0.092 0.656
#> GSM786573 3 0.4697 0.46393 0.000 0.356 0.644 0.000
#> GSM786574 2 0.0188 0.67148 0.000 0.996 0.000 0.004
#> GSM786580 4 0.1398 0.38101 0.004 0.000 0.040 0.956
#> GSM786581 2 0.4072 0.37737 0.000 0.748 0.000 0.252
#> GSM786583 3 0.0000 0.86688 0.000 0.000 1.000 0.000
#> GSM786492 1 0.2408 0.85221 0.896 0.000 0.000 0.104
#> GSM786493 4 0.4994 0.52368 0.000 0.480 0.000 0.520
#> GSM786499 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786502 4 0.6916 0.55390 0.000 0.280 0.148 0.572
#> GSM786537 1 0.2868 0.83558 0.864 0.000 0.000 0.136
#> GSM786567 2 0.0000 0.67351 0.000 1.000 0.000 0.000
#> GSM786498 4 0.5993 0.47104 0.004 0.088 0.224 0.684
#> GSM786500 1 0.0707 0.88470 0.980 0.000 0.000 0.020
#> GSM786503 1 0.3149 0.87933 0.880 0.000 0.032 0.088
#> GSM786507 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786515 2 0.5155 -0.44306 0.000 0.528 0.004 0.468
#> GSM786522 1 0.2589 0.87842 0.884 0.000 0.000 0.116
#> GSM786526 1 0.1724 0.88026 0.948 0.000 0.032 0.020
#> GSM786528 1 0.6985 0.22745 0.480 0.000 0.404 0.116
#> GSM786531 3 0.0000 0.86688 0.000 0.000 1.000 0.000
#> GSM786535 3 0.1022 0.86359 0.000 0.032 0.968 0.000
#> GSM786543 1 0.0188 0.88801 0.996 0.000 0.000 0.004
#> GSM786545 3 0.0000 0.86688 0.000 0.000 1.000 0.000
#> GSM786551 1 0.7154 0.12835 0.440 0.000 0.428 0.132
#> GSM786552 3 0.1022 0.86359 0.000 0.032 0.968 0.000
#> GSM786554 2 0.4522 0.00693 0.000 0.680 0.000 0.320
#> GSM786557 1 0.2149 0.88394 0.912 0.000 0.000 0.088
#> GSM786560 1 0.0000 0.88838 1.000 0.000 0.000 0.000
#> GSM786564 4 0.5220 0.61186 0.000 0.424 0.008 0.568
#> GSM786568 3 0.0000 0.86688 0.000 0.000 1.000 0.000
#> GSM786569 1 0.0000 0.88838 1.000 0.000 0.000 0.000
#> GSM786571 3 0.0921 0.86453 0.000 0.028 0.972 0.000
#> GSM786496 2 0.0000 0.67351 0.000 1.000 0.000 0.000
#> GSM786506 1 0.2149 0.88394 0.912 0.000 0.000 0.088
#> GSM786508 4 0.6832 0.46164 0.000 0.132 0.296 0.572
#> GSM786512 4 0.4992 0.14746 0.000 0.000 0.476 0.524
#> GSM786518 1 0.0707 0.88470 0.980 0.000 0.000 0.020
#> GSM786519 1 0.0188 0.88801 0.996 0.000 0.000 0.004
#> GSM786524 1 0.0592 0.88611 0.984 0.000 0.000 0.016
#> GSM786529 3 0.0000 0.86688 0.000 0.000 1.000 0.000
#> GSM786530 3 0.2843 0.81241 0.088 0.000 0.892 0.020
#> GSM786532 1 0.3384 0.87242 0.860 0.000 0.024 0.116
#> GSM786533 3 0.1022 0.86359 0.000 0.032 0.968 0.000
#> GSM786544 3 0.0000 0.86688 0.000 0.000 1.000 0.000
#> GSM786547 3 0.1022 0.86359 0.000 0.032 0.968 0.000
#> GSM786549 3 0.1022 0.85721 0.032 0.000 0.968 0.000
#> GSM786550 3 0.4897 0.63569 0.004 0.004 0.668 0.324
#> GSM786563 3 0.4713 0.45551 0.000 0.360 0.640 0.000
#> GSM786570 2 0.4431 0.07901 0.000 0.696 0.000 0.304
#> GSM786576 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786577 1 0.0188 0.88801 0.996 0.000 0.000 0.004
#> GSM786578 2 0.4661 0.42595 0.000 0.652 0.348 0.000
#> GSM786582 1 0.2149 0.88394 0.912 0.000 0.000 0.088
#> GSM786495 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786505 1 0.2149 0.88394 0.912 0.000 0.000 0.088
#> GSM786511 1 0.0707 0.88470 0.980 0.000 0.000 0.020
#> GSM786513 1 0.2589 0.87842 0.884 0.000 0.000 0.116
#> GSM786525 2 0.2644 0.61471 0.000 0.908 0.032 0.060
#> GSM786540 2 0.4406 0.47365 0.000 0.700 0.300 0.000
#> GSM786553 1 0.3581 0.86915 0.852 0.000 0.032 0.116
#> GSM786561 1 0.0188 0.88801 0.996 0.000 0.000 0.004
#> GSM786575 1 0.4790 0.67084 0.620 0.000 0.000 0.380
#> GSM786494 1 0.3569 0.83747 0.804 0.000 0.000 0.196
#> GSM786504 1 0.2589 0.87842 0.884 0.000 0.000 0.116
#> GSM786510 4 0.4925 0.62038 0.000 0.428 0.000 0.572
#> GSM786514 1 0.0000 0.88838 1.000 0.000 0.000 0.000
#> GSM786516 1 0.1022 0.88164 0.968 0.000 0.032 0.000
#> GSM786520 1 0.2149 0.88394 0.912 0.000 0.000 0.088
#> GSM786521 3 0.5119 0.52231 0.004 0.000 0.556 0.440
#> GSM786536 3 0.3569 0.73157 0.196 0.000 0.804 0.000
#> GSM786542 3 0.1022 0.86359 0.000 0.032 0.968 0.000
#> GSM786546 3 0.0188 0.86597 0.004 0.000 0.996 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.3508 0.3913 0.000 0.748 0.000 0.000 0.252
#> GSM786539 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786541 2 0.0000 0.6563 0.000 1.000 0.000 0.000 0.000
#> GSM786556 2 0.0000 0.6563 0.000 1.000 0.000 0.000 0.000
#> GSM786523 3 0.5104 0.6713 0.056 0.000 0.752 0.116 0.076
#> GSM786497 4 0.4873 0.5731 0.044 0.000 0.000 0.644 0.312
#> GSM786501 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786517 2 0.4074 -0.1510 0.000 0.636 0.000 0.000 0.364
#> GSM786534 2 0.0000 0.6563 0.000 1.000 0.000 0.000 0.000
#> GSM786555 2 0.0162 0.6555 0.000 0.996 0.000 0.000 0.004
#> GSM786558 2 0.0000 0.6563 0.000 1.000 0.000 0.000 0.000
#> GSM786559 2 0.4360 0.5289 0.000 0.752 0.184 0.000 0.064
#> GSM786565 2 0.0404 0.6506 0.000 0.988 0.000 0.000 0.012
#> GSM786572 2 0.3635 0.5192 0.000 0.748 0.248 0.000 0.004
#> GSM786579 2 0.4235 0.1185 0.000 0.576 0.424 0.000 0.000
#> GSM786491 1 0.1877 0.5982 0.924 0.000 0.000 0.064 0.012
#> GSM786509 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786538 1 0.4192 0.6961 0.596 0.000 0.000 0.404 0.000
#> GSM786548 3 0.4060 0.4860 0.000 0.360 0.640 0.000 0.000
#> GSM786562 1 0.5136 0.7004 0.596 0.008 0.004 0.368 0.024
#> GSM786566 5 0.6811 0.3339 0.080 0.012 0.088 0.208 0.612
#> GSM786573 3 0.4192 0.4167 0.000 0.404 0.596 0.000 0.000
#> GSM786574 2 0.0000 0.6563 0.000 1.000 0.000 0.000 0.000
#> GSM786580 1 0.2732 0.5132 0.840 0.000 0.000 0.000 0.160
#> GSM786581 2 0.3728 0.4035 0.000 0.748 0.008 0.000 0.244
#> GSM786583 3 0.0000 0.8393 0.000 0.000 1.000 0.000 0.000
#> GSM786492 4 0.4891 0.5712 0.044 0.000 0.000 0.640 0.316
#> GSM786493 5 0.4262 0.6035 0.000 0.440 0.000 0.000 0.560
#> GSM786499 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786502 5 0.5711 0.5931 0.000 0.252 0.136 0.000 0.612
#> GSM786537 4 0.5527 0.4947 0.072 0.000 0.000 0.540 0.388
#> GSM786567 2 0.0290 0.6534 0.000 0.992 0.000 0.000 0.008
#> GSM786498 5 0.3479 0.4327 0.076 0.016 0.056 0.000 0.852
#> GSM786500 4 0.4873 0.5731 0.044 0.000 0.000 0.644 0.312
#> GSM786503 4 0.3513 0.5293 0.180 0.000 0.020 0.800 0.000
#> GSM786507 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786515 2 0.4307 -0.5123 0.000 0.500 0.000 0.000 0.500
#> GSM786522 1 0.4227 0.6751 0.580 0.000 0.000 0.420 0.000
#> GSM786526 4 0.3970 0.2889 0.236 0.000 0.020 0.744 0.000
#> GSM786528 1 0.4824 0.7014 0.596 0.000 0.028 0.376 0.000
#> GSM786531 3 0.0000 0.8393 0.000 0.000 1.000 0.000 0.000
#> GSM786535 3 0.1792 0.8169 0.000 0.084 0.916 0.000 0.000
#> GSM786543 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786545 3 0.0000 0.8393 0.000 0.000 1.000 0.000 0.000
#> GSM786551 1 0.5253 0.4784 0.640 0.000 0.020 0.036 0.304
#> GSM786552 3 0.1732 0.8188 0.000 0.080 0.920 0.000 0.000
#> GSM786554 2 0.4060 -0.1401 0.000 0.640 0.000 0.000 0.360
#> GSM786557 4 0.1792 0.7053 0.084 0.000 0.000 0.916 0.000
#> GSM786560 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786564 5 0.4182 0.6728 0.000 0.400 0.000 0.000 0.600
#> GSM786568 3 0.0000 0.8393 0.000 0.000 1.000 0.000 0.000
#> GSM786569 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786571 3 0.0510 0.8379 0.000 0.016 0.984 0.000 0.000
#> GSM786496 2 0.0162 0.6555 0.000 0.996 0.000 0.000 0.004
#> GSM786506 4 0.1792 0.7053 0.084 0.000 0.000 0.916 0.000
#> GSM786508 5 0.5498 0.4606 0.000 0.096 0.292 0.000 0.612
#> GSM786512 5 0.4262 0.1992 0.000 0.000 0.440 0.000 0.560
#> GSM786518 4 0.4873 0.5731 0.044 0.000 0.000 0.644 0.312
#> GSM786519 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786524 4 0.4871 0.6063 0.084 0.000 0.000 0.704 0.212
#> GSM786529 3 0.0000 0.8393 0.000 0.000 1.000 0.000 0.000
#> GSM786530 3 0.6422 0.4470 0.044 0.000 0.560 0.084 0.312
#> GSM786532 1 0.4686 0.7021 0.596 0.000 0.020 0.384 0.000
#> GSM786533 3 0.1792 0.8169 0.000 0.084 0.916 0.000 0.000
#> GSM786544 3 0.0000 0.8393 0.000 0.000 1.000 0.000 0.000
#> GSM786547 3 0.0609 0.8370 0.000 0.020 0.980 0.000 0.000
#> GSM786549 3 0.0703 0.8323 0.000 0.000 0.976 0.024 0.000
#> GSM786550 3 0.5509 0.4579 0.360 0.000 0.564 0.000 0.076
#> GSM786563 3 0.4182 0.4035 0.000 0.400 0.600 0.000 0.000
#> GSM786570 2 0.3983 -0.0626 0.000 0.660 0.000 0.000 0.340
#> GSM786576 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786577 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786578 2 0.3876 0.4558 0.000 0.684 0.316 0.000 0.000
#> GSM786582 4 0.1792 0.7053 0.084 0.000 0.000 0.916 0.000
#> GSM786495 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786505 4 0.1671 0.7121 0.076 0.000 0.000 0.924 0.000
#> GSM786511 4 0.4873 0.5731 0.044 0.000 0.000 0.644 0.312
#> GSM786513 1 0.4192 0.6961 0.596 0.000 0.000 0.404 0.000
#> GSM786525 2 0.5497 0.1288 0.464 0.488 0.020 0.000 0.028
#> GSM786540 2 0.3586 0.5092 0.000 0.736 0.264 0.000 0.000
#> GSM786553 1 0.4686 0.7021 0.596 0.000 0.020 0.384 0.000
#> GSM786561 4 0.0000 0.7546 0.000 0.000 0.000 1.000 0.000
#> GSM786575 1 0.5308 0.2573 0.620 0.000 0.000 0.304 0.076
#> GSM786494 4 0.3975 0.6201 0.144 0.000 0.000 0.792 0.064
#> GSM786504 1 0.4192 0.6961 0.596 0.000 0.000 0.404 0.000
#> GSM786510 5 0.4150 0.6891 0.000 0.388 0.000 0.000 0.612
#> GSM786514 4 0.0162 0.7529 0.004 0.000 0.000 0.996 0.000
#> GSM786516 4 0.1792 0.6917 0.000 0.000 0.084 0.916 0.000
#> GSM786520 4 0.1671 0.7121 0.076 0.000 0.000 0.924 0.000
#> GSM786521 1 0.2770 0.5433 0.880 0.000 0.044 0.000 0.076
#> GSM786536 3 0.3143 0.6705 0.000 0.000 0.796 0.204 0.000
#> GSM786542 3 0.1792 0.8169 0.000 0.084 0.916 0.000 0.000
#> GSM786546 3 0.1851 0.8000 0.088 0.000 0.912 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.3838 0.17700 0.000 0.448 0.000 0.000 0.000 0.552
#> GSM786539 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786541 2 0.6922 -0.02088 0.000 0.424 0.020 0.064 0.120 0.372
#> GSM786556 2 0.6896 0.00848 0.000 0.448 0.020 0.064 0.120 0.348
#> GSM786523 4 0.6071 -0.19206 0.040 0.320 0.120 0.520 0.000 0.000
#> GSM786497 4 0.6881 0.57924 0.348 0.000 0.152 0.412 0.088 0.000
#> GSM786501 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786517 6 0.3852 0.64083 0.000 0.000 0.020 0.064 0.120 0.796
#> GSM786534 2 0.6896 0.00848 0.000 0.448 0.020 0.064 0.120 0.348
#> GSM786555 2 0.6931 -0.05074 0.000 0.404 0.020 0.064 0.120 0.392
#> GSM786558 2 0.6896 0.00848 0.000 0.448 0.020 0.064 0.120 0.348
#> GSM786559 2 0.3881 0.09445 0.000 0.600 0.000 0.000 0.004 0.396
#> GSM786565 6 0.6931 -0.00629 0.000 0.392 0.020 0.064 0.120 0.404
#> GSM786572 2 0.3620 0.17283 0.000 0.648 0.000 0.000 0.000 0.352
#> GSM786579 2 0.3213 0.32005 0.000 0.784 0.008 0.000 0.004 0.204
#> GSM786491 3 0.3899 0.12756 0.008 0.000 0.628 0.000 0.364 0.000
#> GSM786509 1 0.0000 0.80345 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786538 3 0.3737 0.64506 0.392 0.000 0.608 0.000 0.000 0.000
#> GSM786548 2 0.0363 0.39825 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM786562 3 0.3222 0.62587 0.152 0.012 0.820 0.012 0.000 0.004
#> GSM786566 6 0.6529 0.22559 0.052 0.000 0.268 0.084 0.040 0.556
#> GSM786573 2 0.1679 0.38413 0.000 0.936 0.008 0.028 0.028 0.000
#> GSM786574 2 0.6896 0.00848 0.000 0.448 0.020 0.064 0.120 0.348
#> GSM786580 5 0.3110 0.78358 0.000 0.000 0.196 0.000 0.792 0.012
#> GSM786581 6 0.3810 0.19909 0.000 0.428 0.000 0.000 0.000 0.572
#> GSM786583 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786492 4 0.6911 0.57859 0.344 0.000 0.152 0.412 0.092 0.000
#> GSM786493 6 0.1346 0.72811 0.000 0.000 0.016 0.024 0.008 0.952
#> GSM786499 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786502 6 0.2092 0.64728 0.000 0.124 0.000 0.000 0.000 0.876
#> GSM786537 4 0.7268 0.54049 0.272 0.000 0.152 0.412 0.164 0.000
#> GSM786567 2 0.6931 -0.05097 0.000 0.404 0.020 0.064 0.120 0.392
#> GSM786498 6 0.6105 0.26599 0.000 0.020 0.276 0.088 0.040 0.576
#> GSM786500 4 0.6881 0.57924 0.348 0.000 0.152 0.412 0.088 0.000
#> GSM786503 1 0.4881 0.38769 0.588 0.000 0.336 0.076 0.000 0.000
#> GSM786507 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786515 6 0.2088 0.70706 0.000 0.000 0.000 0.028 0.068 0.904
#> GSM786522 3 0.3620 0.70395 0.352 0.000 0.648 0.000 0.000 0.000
#> GSM786526 1 0.3050 0.44169 0.764 0.000 0.236 0.000 0.000 0.000
#> GSM786528 3 0.4165 0.71343 0.308 0.004 0.664 0.024 0.000 0.000
#> GSM786531 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786535 2 0.3151 0.39575 0.000 0.748 0.000 0.252 0.000 0.000
#> GSM786543 1 0.0000 0.80345 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786545 2 0.4800 0.28022 0.000 0.500 0.052 0.448 0.000 0.000
#> GSM786551 3 0.2912 0.36037 0.012 0.000 0.816 0.172 0.000 0.000
#> GSM786552 2 0.3198 0.39287 0.000 0.740 0.000 0.260 0.000 0.000
#> GSM786554 6 0.3852 0.64083 0.000 0.000 0.020 0.064 0.120 0.796
#> GSM786557 1 0.1757 0.77178 0.916 0.000 0.008 0.076 0.000 0.000
#> GSM786560 1 0.0000 0.80345 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786564 6 0.1204 0.71572 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM786568 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786569 1 0.1501 0.76309 0.924 0.000 0.076 0.000 0.000 0.000
#> GSM786571 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786496 2 0.6927 -0.03187 0.000 0.416 0.020 0.064 0.120 0.380
#> GSM786506 1 0.4606 0.51970 0.656 0.000 0.268 0.076 0.000 0.000
#> GSM786508 6 0.3490 0.45131 0.000 0.268 0.000 0.008 0.000 0.724
#> GSM786512 6 0.5098 0.19341 0.000 0.352 0.000 0.092 0.000 0.556
#> GSM786518 4 0.6881 0.57924 0.348 0.000 0.152 0.412 0.088 0.000
#> GSM786519 1 0.0146 0.80306 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM786524 1 0.6803 -0.33297 0.404 0.000 0.248 0.300 0.048 0.000
#> GSM786529 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786530 4 0.6501 0.36025 0.076 0.060 0.156 0.620 0.088 0.000
#> GSM786532 3 0.3563 0.71700 0.336 0.000 0.664 0.000 0.000 0.000
#> GSM786533 2 0.3151 0.39575 0.000 0.748 0.000 0.252 0.000 0.000
#> GSM786544 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786547 2 0.3838 0.31221 0.000 0.552 0.000 0.448 0.000 0.000
#> GSM786549 2 0.5065 0.27167 0.012 0.492 0.048 0.448 0.000 0.000
#> GSM786550 5 0.3644 0.64772 0.000 0.120 0.000 0.088 0.792 0.000
#> GSM786563 2 0.0937 0.40244 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM786570 6 0.4424 0.61613 0.000 0.044 0.004 0.064 0.120 0.768
#> GSM786576 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786577 1 0.0937 0.78503 0.960 0.000 0.000 0.040 0.000 0.000
#> GSM786578 2 0.3446 0.22604 0.000 0.692 0.000 0.000 0.000 0.308
#> GSM786582 1 0.1663 0.75538 0.912 0.000 0.088 0.000 0.000 0.000
#> GSM786495 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786505 1 0.3912 0.63907 0.760 0.000 0.164 0.076 0.000 0.000
#> GSM786511 4 0.6881 0.57924 0.348 0.000 0.152 0.412 0.088 0.000
#> GSM786513 3 0.3563 0.71700 0.336 0.000 0.664 0.000 0.000 0.000
#> GSM786525 3 0.6179 0.15817 0.000 0.088 0.604 0.072 0.016 0.220
#> GSM786540 2 0.3592 0.18358 0.000 0.656 0.000 0.000 0.000 0.344
#> GSM786553 3 0.4012 0.58488 0.176 0.000 0.748 0.076 0.000 0.000
#> GSM786561 1 0.0146 0.80306 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM786575 5 0.3657 0.73909 0.108 0.000 0.100 0.000 0.792 0.000
#> GSM786494 1 0.3544 0.69608 0.800 0.000 0.080 0.000 0.120 0.000
#> GSM786504 3 0.3563 0.71700 0.336 0.000 0.664 0.000 0.000 0.000
#> GSM786510 6 0.0000 0.73900 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786514 1 0.0260 0.80290 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM786516 1 0.2762 0.57648 0.804 0.000 0.000 0.196 0.000 0.000
#> GSM786520 1 0.0405 0.80280 0.988 0.000 0.004 0.008 0.000 0.000
#> GSM786521 5 0.2854 0.77721 0.000 0.000 0.208 0.000 0.792 0.000
#> GSM786536 4 0.5978 -0.18821 0.200 0.348 0.004 0.448 0.000 0.000
#> GSM786542 2 0.3151 0.39575 0.000 0.748 0.000 0.252 0.000 0.000
#> GSM786546 2 0.5950 0.17573 0.000 0.456 0.280 0.264 0.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 specimen(p) disease.state(p) k
#> SD:pam 89 0.065651 0.889 2
#> SD:pam 85 0.008953 0.114 3
#> SD:pam 74 0.000830 0.157 4
#> SD:pam 71 0.000666 0.178 5
#> SD:pam 47 0.735324 0.765 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 54547 rows and 93 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 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.503 0.804 0.836 0.3339 0.566 0.566
#> 3 3 0.569 0.797 0.856 0.8064 0.710 0.538
#> 4 4 0.746 0.834 0.926 0.1201 0.876 0.710
#> 5 5 0.662 0.666 0.826 0.1063 0.921 0.764
#> 6 6 0.653 0.577 0.733 0.0659 0.939 0.784
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
#> GSM786527 2 0.9686 0.954 0.396 0.604
#> GSM786539 1 0.9881 -0.541 0.564 0.436
#> GSM786541 2 0.9686 0.954 0.396 0.604
#> GSM786556 2 0.9686 0.954 0.396 0.604
#> GSM786523 1 0.0376 0.884 0.996 0.004
#> GSM786497 1 0.0376 0.883 0.996 0.004
#> GSM786501 2 0.9686 0.954 0.396 0.604
#> GSM786517 2 0.9686 0.954 0.396 0.604
#> GSM786534 2 0.9686 0.954 0.396 0.604
#> GSM786555 2 0.9686 0.954 0.396 0.604
#> GSM786558 2 0.9686 0.954 0.396 0.604
#> GSM786559 2 0.9686 0.954 0.396 0.604
#> GSM786565 2 0.9686 0.954 0.396 0.604
#> GSM786572 2 0.9686 0.954 0.396 0.604
#> GSM786579 2 0.9686 0.954 0.396 0.604
#> GSM786491 1 0.9686 0.396 0.604 0.396
#> GSM786509 1 0.0376 0.883 0.996 0.004
#> GSM786538 1 0.0376 0.883 0.996 0.004
#> GSM786548 2 0.9686 0.954 0.396 0.604
#> GSM786562 1 0.0376 0.884 0.996 0.004
#> GSM786566 1 0.0376 0.884 0.996 0.004
#> GSM786573 1 0.0376 0.884 0.996 0.004
#> GSM786574 2 0.9686 0.954 0.396 0.604
#> GSM786580 1 0.9686 0.396 0.604 0.396
#> GSM786581 1 0.9815 -0.484 0.580 0.420
#> GSM786583 1 0.0376 0.884 0.996 0.004
#> GSM786492 1 0.0376 0.883 0.996 0.004
#> GSM786493 2 0.9686 0.954 0.396 0.604
#> GSM786499 2 0.9686 0.954 0.396 0.604
#> GSM786502 1 0.0376 0.884 0.996 0.004
#> GSM786537 1 0.2236 0.847 0.964 0.036
#> GSM786567 2 0.9686 0.954 0.396 0.604
#> GSM786498 1 0.0000 0.884 1.000 0.000
#> GSM786500 1 0.0376 0.883 0.996 0.004
#> GSM786503 1 0.0376 0.884 0.996 0.004
#> GSM786507 2 0.9686 0.954 0.396 0.604
#> GSM786515 2 0.9686 0.954 0.396 0.604
#> GSM786522 1 0.0376 0.884 0.996 0.004
#> GSM786526 1 0.0376 0.884 0.996 0.004
#> GSM786528 1 0.0376 0.884 0.996 0.004
#> GSM786531 1 0.0376 0.884 0.996 0.004
#> GSM786535 1 0.7056 0.515 0.808 0.192
#> GSM786543 1 0.0376 0.883 0.996 0.004
#> GSM786545 1 0.0376 0.884 0.996 0.004
#> GSM786551 1 0.0376 0.883 0.996 0.004
#> GSM786552 1 0.7883 0.372 0.764 0.236
#> GSM786554 2 0.9686 0.954 0.396 0.604
#> GSM786557 1 0.0376 0.883 0.996 0.004
#> GSM786560 1 0.0376 0.883 0.996 0.004
#> GSM786564 2 0.0672 0.482 0.008 0.992
#> GSM786568 1 0.0376 0.884 0.996 0.004
#> GSM786569 1 0.0376 0.883 0.996 0.004
#> GSM786571 1 0.0376 0.884 0.996 0.004
#> GSM786496 2 0.9686 0.954 0.396 0.604
#> GSM786506 1 0.0000 0.884 1.000 0.000
#> GSM786508 1 0.0376 0.884 0.996 0.004
#> GSM786512 1 0.0376 0.884 0.996 0.004
#> GSM786518 1 0.0376 0.883 0.996 0.004
#> GSM786519 1 0.0000 0.884 1.000 0.000
#> GSM786524 1 0.0000 0.884 1.000 0.000
#> GSM786529 1 0.0376 0.884 0.996 0.004
#> GSM786530 1 0.0376 0.884 0.996 0.004
#> GSM786532 1 0.0376 0.883 0.996 0.004
#> GSM786533 1 0.7528 0.441 0.784 0.216
#> GSM786544 1 0.0376 0.884 0.996 0.004
#> GSM786547 1 0.0376 0.884 0.996 0.004
#> GSM786549 1 0.0376 0.884 0.996 0.004
#> GSM786550 1 0.9686 0.396 0.604 0.396
#> GSM786563 2 0.9686 0.954 0.396 0.604
#> GSM786570 2 0.9686 0.954 0.396 0.604
#> GSM786576 2 0.9686 0.954 0.396 0.604
#> GSM786577 1 0.0000 0.884 1.000 0.000
#> GSM786578 2 0.4298 0.536 0.088 0.912
#> GSM786582 1 0.0376 0.883 0.996 0.004
#> GSM786495 2 0.9686 0.954 0.396 0.604
#> GSM786505 1 0.0376 0.883 0.996 0.004
#> GSM786511 1 0.0376 0.883 0.996 0.004
#> GSM786513 1 0.0376 0.884 0.996 0.004
#> GSM786525 1 0.9635 -0.361 0.612 0.388
#> GSM786540 2 0.9686 0.954 0.396 0.604
#> GSM786553 1 0.0376 0.884 0.996 0.004
#> GSM786561 1 0.0376 0.883 0.996 0.004
#> GSM786575 1 0.9686 0.396 0.604 0.396
#> GSM786494 1 0.2778 0.832 0.952 0.048
#> GSM786504 1 0.0376 0.883 0.996 0.004
#> GSM786510 2 0.9686 0.954 0.396 0.604
#> GSM786514 1 0.0376 0.884 0.996 0.004
#> GSM786516 1 0.0376 0.884 0.996 0.004
#> GSM786520 1 0.0376 0.883 0.996 0.004
#> GSM786521 1 0.9686 0.396 0.604 0.396
#> GSM786536 1 0.0376 0.884 0.996 0.004
#> GSM786542 1 0.8499 0.207 0.724 0.276
#> GSM786546 1 0.0376 0.884 0.996 0.004
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786539 2 0.4370 0.8215 0.076 0.868 0.056
#> GSM786541 2 0.0424 0.9028 0.000 0.992 0.008
#> GSM786556 2 0.0424 0.9028 0.000 0.992 0.008
#> GSM786523 3 0.6956 0.8838 0.300 0.040 0.660
#> GSM786497 1 0.2903 0.8328 0.924 0.028 0.048
#> GSM786501 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786534 2 0.0424 0.9028 0.000 0.992 0.008
#> GSM786555 2 0.0424 0.9028 0.000 0.992 0.008
#> GSM786558 2 0.0424 0.9028 0.000 0.992 0.008
#> GSM786559 2 0.1031 0.8999 0.000 0.976 0.024
#> GSM786565 2 0.0892 0.9014 0.000 0.980 0.020
#> GSM786572 2 0.1878 0.8943 0.004 0.952 0.044
#> GSM786579 2 0.1031 0.8999 0.000 0.976 0.024
#> GSM786491 1 0.5016 0.7506 0.760 0.000 0.240
#> GSM786509 1 0.1964 0.8190 0.944 0.000 0.056
#> GSM786538 1 0.1643 0.8258 0.956 0.000 0.044
#> GSM786548 2 0.2400 0.8789 0.004 0.932 0.064
#> GSM786562 1 0.5811 0.7331 0.800 0.108 0.092
#> GSM786566 1 0.5722 0.7320 0.804 0.112 0.084
#> GSM786573 3 0.6304 0.8794 0.192 0.056 0.752
#> GSM786574 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786580 1 0.5098 0.7437 0.752 0.000 0.248
#> GSM786581 2 0.4075 0.8289 0.072 0.880 0.048
#> GSM786583 3 0.6956 0.8838 0.300 0.040 0.660
#> GSM786492 1 0.2625 0.8367 0.916 0.000 0.084
#> GSM786493 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786502 1 0.9006 0.3193 0.556 0.256 0.188
#> GSM786537 1 0.3686 0.8196 0.860 0.000 0.140
#> GSM786567 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786498 1 0.6644 0.6862 0.752 0.140 0.108
#> GSM786500 1 0.1860 0.8405 0.948 0.000 0.052
#> GSM786503 1 0.3765 0.8138 0.888 0.028 0.084
#> GSM786507 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786515 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786522 1 0.1529 0.8299 0.960 0.000 0.040
#> GSM786526 1 0.2066 0.8312 0.940 0.000 0.060
#> GSM786528 1 0.2711 0.8255 0.912 0.000 0.088
#> GSM786531 3 0.5850 0.8837 0.188 0.040 0.772
#> GSM786535 2 0.8573 0.3957 0.136 0.584 0.280
#> GSM786543 1 0.1643 0.8407 0.956 0.000 0.044
#> GSM786545 3 0.6956 0.8838 0.300 0.040 0.660
#> GSM786551 1 0.3340 0.8291 0.880 0.000 0.120
#> GSM786552 2 0.7188 0.5893 0.056 0.664 0.280
#> GSM786554 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786557 1 0.2066 0.8160 0.940 0.000 0.060
#> GSM786560 1 0.1643 0.8266 0.956 0.000 0.044
#> GSM786564 2 0.2590 0.8793 0.004 0.924 0.072
#> GSM786568 3 0.6001 0.8802 0.176 0.052 0.772
#> GSM786569 1 0.1860 0.8405 0.948 0.000 0.052
#> GSM786571 3 0.6897 0.8887 0.292 0.040 0.668
#> GSM786496 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786506 1 0.5722 0.7320 0.804 0.112 0.084
#> GSM786508 1 0.9178 0.2950 0.540 0.240 0.220
#> GSM786512 2 0.7781 0.5722 0.116 0.664 0.220
#> GSM786518 1 0.1860 0.8405 0.948 0.000 0.052
#> GSM786519 1 0.3134 0.8216 0.916 0.032 0.052
#> GSM786524 1 0.1529 0.8400 0.960 0.000 0.040
#> GSM786529 3 0.6044 0.8770 0.172 0.056 0.772
#> GSM786530 1 0.7116 0.2922 0.636 0.040 0.324
#> GSM786532 1 0.1753 0.8381 0.952 0.000 0.048
#> GSM786533 2 0.6295 0.6892 0.036 0.728 0.236
#> GSM786544 3 0.6803 0.8923 0.280 0.040 0.680
#> GSM786547 3 0.6044 0.8770 0.172 0.056 0.772
#> GSM786549 3 0.6956 0.8838 0.300 0.040 0.660
#> GSM786550 1 0.5216 0.7331 0.740 0.000 0.260
#> GSM786563 2 0.2400 0.8789 0.004 0.932 0.064
#> GSM786570 2 0.1163 0.9000 0.000 0.972 0.028
#> GSM786576 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786577 1 0.2796 0.8390 0.908 0.000 0.092
#> GSM786578 2 0.2939 0.8734 0.012 0.916 0.072
#> GSM786582 1 0.1031 0.8380 0.976 0.000 0.024
#> GSM786495 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786505 1 0.2066 0.8160 0.940 0.000 0.060
#> GSM786511 1 0.1529 0.8426 0.960 0.000 0.040
#> GSM786513 1 0.2448 0.8286 0.924 0.000 0.076
#> GSM786525 2 0.6000 0.6775 0.200 0.760 0.040
#> GSM786540 2 0.0424 0.9048 0.000 0.992 0.008
#> GSM786553 1 0.2878 0.8240 0.904 0.000 0.096
#> GSM786561 1 0.1753 0.8408 0.952 0.000 0.048
#> GSM786575 1 0.5016 0.7506 0.760 0.000 0.240
#> GSM786494 1 0.2959 0.8322 0.900 0.000 0.100
#> GSM786504 1 0.2261 0.8421 0.932 0.000 0.068
#> GSM786510 2 0.0000 0.9058 0.000 1.000 0.000
#> GSM786514 1 0.1753 0.8336 0.952 0.000 0.048
#> GSM786516 1 0.3129 0.8163 0.904 0.008 0.088
#> GSM786520 1 0.2066 0.8160 0.940 0.000 0.060
#> GSM786521 1 0.5098 0.7437 0.752 0.000 0.248
#> GSM786536 1 0.6924 -0.0377 0.580 0.020 0.400
#> GSM786542 2 0.6798 0.6440 0.048 0.696 0.256
#> GSM786546 2 0.9731 -0.1731 0.308 0.444 0.248
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786539 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786541 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786556 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786523 3 0.1022 0.870 0.032 0.000 0.968 0.000
#> GSM786497 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786501 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786517 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786534 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786555 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786558 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786559 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786579 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786491 4 0.4720 0.513 0.324 0.000 0.004 0.672
#> GSM786509 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786538 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786548 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786562 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786566 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786573 3 0.3157 0.698 0.004 0.144 0.852 0.000
#> GSM786574 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786580 4 0.0000 0.800 0.000 0.000 0.000 1.000
#> GSM786581 2 0.0188 0.943 0.000 0.996 0.004 0.000
#> GSM786583 3 0.0921 0.873 0.028 0.000 0.972 0.000
#> GSM786492 1 0.3448 0.776 0.828 0.000 0.004 0.168
#> GSM786493 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786499 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786502 2 0.3694 0.788 0.124 0.844 0.032 0.000
#> GSM786537 1 0.3448 0.776 0.828 0.000 0.004 0.168
#> GSM786567 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786498 1 0.4037 0.762 0.832 0.112 0.056 0.000
#> GSM786500 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786503 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786507 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786515 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786522 1 0.0469 0.868 0.988 0.000 0.012 0.000
#> GSM786526 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786528 1 0.4830 0.252 0.608 0.000 0.392 0.000
#> GSM786531 3 0.0188 0.870 0.004 0.000 0.996 0.000
#> GSM786535 2 0.4585 0.526 0.000 0.668 0.332 0.000
#> GSM786543 1 0.0469 0.873 0.988 0.000 0.012 0.000
#> GSM786545 3 0.0921 0.873 0.028 0.000 0.972 0.000
#> GSM786551 1 0.5700 0.184 0.560 0.000 0.412 0.028
#> GSM786552 2 0.4643 0.512 0.000 0.656 0.344 0.000
#> GSM786554 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786557 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786560 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786564 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786568 3 0.0188 0.870 0.004 0.000 0.996 0.000
#> GSM786569 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786571 3 0.0592 0.874 0.016 0.000 0.984 0.000
#> GSM786496 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786506 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786508 2 0.4964 0.589 0.244 0.724 0.032 0.000
#> GSM786512 2 0.1940 0.889 0.000 0.924 0.076 0.000
#> GSM786518 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786519 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786524 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786529 3 0.0188 0.870 0.004 0.000 0.996 0.000
#> GSM786530 3 0.1022 0.870 0.032 0.000 0.968 0.000
#> GSM786532 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786533 2 0.4250 0.645 0.000 0.724 0.276 0.000
#> GSM786544 3 0.0336 0.872 0.008 0.000 0.992 0.000
#> GSM786547 3 0.0376 0.868 0.004 0.004 0.992 0.000
#> GSM786549 3 0.0921 0.873 0.028 0.000 0.972 0.000
#> GSM786550 4 0.0000 0.800 0.000 0.000 0.000 1.000
#> GSM786563 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786570 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786577 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786578 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786582 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786495 2 0.0188 0.945 0.000 0.996 0.004 0.000
#> GSM786505 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786511 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786513 1 0.0592 0.872 0.984 0.000 0.016 0.000
#> GSM786525 2 0.3751 0.721 0.196 0.800 0.004 0.000
#> GSM786540 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786553 1 0.3311 0.704 0.828 0.000 0.172 0.000
#> GSM786561 1 0.3266 0.812 0.832 0.000 0.168 0.000
#> GSM786575 4 0.3831 0.708 0.204 0.000 0.004 0.792
#> GSM786494 1 0.3448 0.776 0.828 0.000 0.004 0.168
#> GSM786504 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786510 2 0.0000 0.946 0.000 1.000 0.000 0.000
#> GSM786514 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786516 3 0.4500 0.507 0.316 0.000 0.684 0.000
#> GSM786520 1 0.0000 0.873 1.000 0.000 0.000 0.000
#> GSM786521 4 0.0000 0.800 0.000 0.000 0.000 1.000
#> GSM786536 3 0.4356 0.568 0.292 0.000 0.708 0.000
#> GSM786542 2 0.2814 0.836 0.000 0.868 0.132 0.000
#> GSM786546 3 0.4511 0.523 0.008 0.268 0.724 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0290 0.8099 0.008 0.992 0.000 0.000 0.000
#> GSM786539 1 0.4283 0.2147 0.544 0.456 0.000 0.000 0.000
#> GSM786541 2 0.2966 0.7543 0.184 0.816 0.000 0.000 0.000
#> GSM786556 2 0.1478 0.8062 0.064 0.936 0.000 0.000 0.000
#> GSM786523 3 0.2020 0.8206 0.100 0.000 0.900 0.000 0.000
#> GSM786497 4 0.3196 0.7752 0.192 0.000 0.004 0.804 0.000
#> GSM786501 2 0.4305 0.1571 0.488 0.512 0.000 0.000 0.000
#> GSM786517 2 0.3039 0.7529 0.192 0.808 0.000 0.000 0.000
#> GSM786534 2 0.0703 0.8050 0.024 0.976 0.000 0.000 0.000
#> GSM786555 2 0.2891 0.7548 0.176 0.824 0.000 0.000 0.000
#> GSM786558 2 0.0290 0.8096 0.008 0.992 0.000 0.000 0.000
#> GSM786559 2 0.0510 0.8091 0.016 0.984 0.000 0.000 0.000
#> GSM786565 2 0.2179 0.7826 0.112 0.888 0.000 0.000 0.000
#> GSM786572 2 0.0404 0.8091 0.012 0.988 0.000 0.000 0.000
#> GSM786579 2 0.0404 0.8090 0.012 0.988 0.000 0.000 0.000
#> GSM786491 5 0.3210 0.6900 0.000 0.000 0.000 0.212 0.788
#> GSM786509 4 0.0000 0.8013 0.000 0.000 0.000 1.000 0.000
#> GSM786538 4 0.0162 0.8002 0.004 0.000 0.000 0.996 0.000
#> GSM786548 2 0.0880 0.8016 0.032 0.968 0.000 0.000 0.000
#> GSM786562 1 0.4249 0.4062 0.568 0.000 0.000 0.432 0.000
#> GSM786566 1 0.4227 0.4195 0.580 0.000 0.000 0.420 0.000
#> GSM786573 3 0.2970 0.6771 0.004 0.168 0.828 0.000 0.000
#> GSM786574 2 0.3003 0.7540 0.188 0.812 0.000 0.000 0.000
#> GSM786580 5 0.0000 0.8388 0.000 0.000 0.000 0.000 1.000
#> GSM786581 2 0.0510 0.8091 0.016 0.984 0.000 0.000 0.000
#> GSM786583 3 0.2074 0.8188 0.104 0.000 0.896 0.000 0.000
#> GSM786492 4 0.3880 0.7336 0.044 0.000 0.004 0.800 0.152
#> GSM786493 2 0.0510 0.8112 0.016 0.984 0.000 0.000 0.000
#> GSM786499 1 0.4305 -0.2015 0.512 0.488 0.000 0.000 0.000
#> GSM786502 1 0.6014 0.4474 0.576 0.252 0.172 0.000 0.000
#> GSM786537 4 0.4305 0.7336 0.044 0.000 0.020 0.784 0.152
#> GSM786567 2 0.3039 0.7529 0.192 0.808 0.000 0.000 0.000
#> GSM786498 1 0.6098 0.3955 0.568 0.000 0.196 0.236 0.000
#> GSM786500 4 0.3196 0.7752 0.192 0.000 0.004 0.804 0.000
#> GSM786503 1 0.4287 0.3473 0.540 0.000 0.000 0.460 0.000
#> GSM786507 2 0.4182 0.2149 0.400 0.600 0.000 0.000 0.000
#> GSM786515 2 0.0510 0.8117 0.016 0.984 0.000 0.000 0.000
#> GSM786522 4 0.2516 0.7262 0.000 0.000 0.140 0.860 0.000
#> GSM786526 4 0.1484 0.7891 0.008 0.000 0.048 0.944 0.000
#> GSM786528 4 0.4738 0.0261 0.016 0.000 0.464 0.520 0.000
#> GSM786531 3 0.0000 0.8389 0.000 0.000 1.000 0.000 0.000
#> GSM786535 2 0.5111 0.0424 0.036 0.500 0.464 0.000 0.000
#> GSM786543 4 0.1282 0.8060 0.044 0.000 0.004 0.952 0.000
#> GSM786545 3 0.2074 0.8188 0.104 0.000 0.896 0.000 0.000
#> GSM786551 4 0.5479 0.0783 0.032 0.000 0.452 0.500 0.016
#> GSM786552 2 0.5010 0.2654 0.036 0.572 0.392 0.000 0.000
#> GSM786554 2 0.3039 0.7529 0.192 0.808 0.000 0.000 0.000
#> GSM786557 4 0.0609 0.7948 0.020 0.000 0.000 0.980 0.000
#> GSM786560 4 0.0162 0.8022 0.000 0.000 0.004 0.996 0.000
#> GSM786564 2 0.0510 0.8091 0.016 0.984 0.000 0.000 0.000
#> GSM786568 3 0.0162 0.8380 0.004 0.000 0.996 0.000 0.000
#> GSM786569 4 0.3196 0.7752 0.192 0.000 0.004 0.804 0.000
#> GSM786571 3 0.0000 0.8389 0.000 0.000 1.000 0.000 0.000
#> GSM786496 2 0.2891 0.7548 0.176 0.824 0.000 0.000 0.000
#> GSM786506 1 0.4249 0.4062 0.568 0.000 0.000 0.432 0.000
#> GSM786508 1 0.6026 0.4377 0.580 0.228 0.192 0.000 0.000
#> GSM786512 1 0.6572 0.3103 0.428 0.364 0.208 0.000 0.000
#> GSM786518 4 0.3196 0.7752 0.192 0.000 0.004 0.804 0.000
#> GSM786519 4 0.3916 0.7516 0.104 0.000 0.092 0.804 0.000
#> GSM786524 4 0.4238 0.7654 0.192 0.000 0.052 0.756 0.000
#> GSM786529 3 0.0000 0.8389 0.000 0.000 1.000 0.000 0.000
#> GSM786530 3 0.2361 0.8183 0.096 0.000 0.892 0.012 0.000
#> GSM786532 4 0.1792 0.7732 0.000 0.000 0.084 0.916 0.000
#> GSM786533 2 0.4119 0.5693 0.036 0.752 0.212 0.000 0.000
#> GSM786544 3 0.0000 0.8389 0.000 0.000 1.000 0.000 0.000
#> GSM786547 3 0.0162 0.8380 0.004 0.000 0.996 0.000 0.000
#> GSM786549 3 0.2074 0.8188 0.104 0.000 0.896 0.000 0.000
#> GSM786550 5 0.0000 0.8388 0.000 0.000 0.000 0.000 1.000
#> GSM786563 2 0.0880 0.8016 0.032 0.968 0.000 0.000 0.000
#> GSM786570 2 0.0703 0.8110 0.024 0.976 0.000 0.000 0.000
#> GSM786576 2 0.3039 0.7529 0.192 0.808 0.000 0.000 0.000
#> GSM786577 4 0.3710 0.7724 0.192 0.000 0.024 0.784 0.000
#> GSM786578 2 0.0404 0.8091 0.012 0.988 0.000 0.000 0.000
#> GSM786582 4 0.0000 0.8013 0.000 0.000 0.000 1.000 0.000
#> GSM786495 2 0.4030 0.5709 0.352 0.648 0.000 0.000 0.000
#> GSM786505 4 0.0609 0.7948 0.020 0.000 0.000 0.980 0.000
#> GSM786511 4 0.3196 0.7752 0.192 0.000 0.004 0.804 0.000
#> GSM786513 4 0.2424 0.7388 0.000 0.000 0.132 0.868 0.000
#> GSM786525 2 0.0290 0.8099 0.008 0.992 0.000 0.000 0.000
#> GSM786540 2 0.0290 0.8096 0.008 0.992 0.000 0.000 0.000
#> GSM786553 4 0.6127 0.2635 0.172 0.000 0.276 0.552 0.000
#> GSM786561 4 0.3160 0.7770 0.188 0.000 0.004 0.808 0.000
#> GSM786575 5 0.2852 0.7429 0.000 0.000 0.000 0.172 0.828
#> GSM786494 4 0.3231 0.7145 0.000 0.000 0.004 0.800 0.196
#> GSM786504 4 0.2068 0.7728 0.004 0.000 0.092 0.904 0.000
#> GSM786510 2 0.4294 0.1241 0.468 0.532 0.000 0.000 0.000
#> GSM786514 4 0.0000 0.8013 0.000 0.000 0.000 1.000 0.000
#> GSM786516 3 0.4686 0.3497 0.020 0.000 0.596 0.384 0.000
#> GSM786520 4 0.0000 0.8013 0.000 0.000 0.000 1.000 0.000
#> GSM786521 5 0.0000 0.8388 0.000 0.000 0.000 0.000 1.000
#> GSM786536 3 0.3999 0.4637 0.000 0.000 0.656 0.344 0.000
#> GSM786542 2 0.4269 0.5322 0.036 0.732 0.232 0.000 0.000
#> GSM786546 3 0.3476 0.6530 0.020 0.176 0.804 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.1196 0.6606 0.000 0.952 0.000 0.040 0.000 0.008
#> GSM786539 2 0.4781 0.2974 0.024 0.612 0.000 0.028 0.000 0.336
#> GSM786541 2 0.4066 0.2768 0.000 0.596 0.000 0.392 0.000 0.012
#> GSM786556 2 0.3997 -0.0827 0.000 0.508 0.000 0.488 0.000 0.004
#> GSM786523 3 0.0000 0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786497 1 0.5898 0.6302 0.596 0.000 0.172 0.192 0.000 0.040
#> GSM786501 2 0.3318 0.5558 0.000 0.796 0.000 0.032 0.000 0.172
#> GSM786517 2 0.2070 0.6596 0.000 0.892 0.000 0.100 0.000 0.008
#> GSM786534 2 0.4192 -0.1555 0.000 0.572 0.000 0.412 0.000 0.016
#> GSM786555 2 0.2312 0.6583 0.000 0.876 0.000 0.112 0.000 0.012
#> GSM786558 2 0.4121 -0.0318 0.000 0.604 0.000 0.380 0.000 0.016
#> GSM786559 2 0.1657 0.6462 0.000 0.928 0.000 0.056 0.000 0.016
#> GSM786565 2 0.1333 0.6580 0.000 0.944 0.000 0.048 0.000 0.008
#> GSM786572 2 0.4118 0.1005 0.000 0.628 0.000 0.352 0.000 0.020
#> GSM786579 2 0.4192 -0.1555 0.000 0.572 0.000 0.412 0.000 0.016
#> GSM786491 5 0.0881 0.9761 0.012 0.000 0.000 0.008 0.972 0.008
#> GSM786509 1 0.3136 0.6574 0.796 0.000 0.000 0.188 0.000 0.016
#> GSM786538 1 0.3698 0.6344 0.788 0.000 0.000 0.116 0.000 0.096
#> GSM786548 4 0.4282 0.5255 0.000 0.420 0.000 0.560 0.000 0.020
#> GSM786562 6 0.3023 0.7060 0.232 0.000 0.000 0.000 0.000 0.768
#> GSM786566 6 0.2912 0.7135 0.216 0.000 0.000 0.000 0.000 0.784
#> GSM786573 3 0.4556 0.6208 0.000 0.088 0.708 0.196 0.000 0.008
#> GSM786574 2 0.2118 0.6619 0.000 0.888 0.000 0.104 0.000 0.008
#> GSM786580 5 0.0000 0.9842 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786581 2 0.0777 0.6666 0.024 0.972 0.000 0.004 0.000 0.000
#> GSM786583 3 0.0000 0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786492 1 0.6961 0.5970 0.540 0.000 0.024 0.196 0.140 0.100
#> GSM786493 2 0.0458 0.6662 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM786499 2 0.3385 0.5493 0.000 0.788 0.000 0.032 0.000 0.180
#> GSM786502 6 0.5546 0.4915 0.004 0.204 0.004 0.192 0.000 0.596
#> GSM786537 1 0.5565 0.5871 0.680 0.000 0.112 0.012 0.140 0.056
#> GSM786567 2 0.2170 0.6577 0.000 0.888 0.000 0.100 0.000 0.012
#> GSM786498 6 0.4664 0.6631 0.056 0.028 0.060 0.064 0.008 0.784
#> GSM786500 1 0.6268 0.6293 0.552 0.000 0.052 0.196 0.000 0.200
#> GSM786503 6 0.2912 0.7135 0.216 0.000 0.000 0.000 0.000 0.784
#> GSM786507 2 0.3279 0.5542 0.000 0.796 0.000 0.028 0.000 0.176
#> GSM786515 2 0.0458 0.6662 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM786522 1 0.2092 0.6164 0.876 0.000 0.124 0.000 0.000 0.000
#> GSM786526 1 0.3900 0.5547 0.784 0.000 0.116 0.008 0.000 0.092
#> GSM786528 1 0.5629 0.2086 0.524 0.000 0.324 0.004 0.000 0.148
#> GSM786531 3 0.0622 0.8830 0.000 0.000 0.980 0.012 0.000 0.008
#> GSM786535 4 0.5002 0.5947 0.000 0.136 0.228 0.636 0.000 0.000
#> GSM786543 1 0.3836 0.6730 0.764 0.000 0.040 0.188 0.000 0.008
#> GSM786545 3 0.0000 0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786551 1 0.4973 0.3372 0.576 0.000 0.360 0.004 0.004 0.056
#> GSM786552 4 0.5702 0.6665 0.000 0.208 0.204 0.576 0.000 0.012
#> GSM786554 2 0.2170 0.6577 0.000 0.888 0.000 0.100 0.000 0.012
#> GSM786557 1 0.5095 0.5418 0.632 0.000 0.000 0.188 0.000 0.180
#> GSM786560 1 0.3121 0.6615 0.796 0.000 0.004 0.192 0.000 0.008
#> GSM786564 2 0.1802 0.6429 0.000 0.916 0.000 0.072 0.000 0.012
#> GSM786568 3 0.1584 0.8644 0.000 0.000 0.928 0.064 0.000 0.008
#> GSM786569 1 0.6009 0.6371 0.592 0.000 0.052 0.196 0.000 0.160
#> GSM786571 3 0.0146 0.8873 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM786496 2 0.2312 0.6583 0.000 0.876 0.000 0.112 0.000 0.012
#> GSM786506 6 0.2969 0.7116 0.224 0.000 0.000 0.000 0.000 0.776
#> GSM786508 6 0.5853 0.5108 0.004 0.188 0.032 0.168 0.000 0.608
#> GSM786512 6 0.6731 0.3791 0.004 0.232 0.052 0.232 0.000 0.480
#> GSM786518 1 0.5980 0.6380 0.596 0.000 0.052 0.196 0.000 0.156
#> GSM786519 1 0.5531 0.6239 0.604 0.000 0.200 0.184 0.000 0.012
#> GSM786524 1 0.4874 0.6152 0.692 0.000 0.148 0.012 0.000 0.148
#> GSM786529 3 0.2070 0.8363 0.000 0.000 0.892 0.100 0.000 0.008
#> GSM786530 3 0.0935 0.8640 0.032 0.000 0.964 0.004 0.000 0.000
#> GSM786532 1 0.3088 0.6101 0.832 0.000 0.120 0.000 0.000 0.048
#> GSM786533 2 0.5214 -0.4350 0.000 0.480 0.068 0.444 0.000 0.008
#> GSM786544 3 0.0260 0.8867 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM786547 3 0.2631 0.7956 0.000 0.000 0.840 0.152 0.000 0.008
#> GSM786549 3 0.0000 0.8870 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786550 5 0.0000 0.9842 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786563 4 0.4116 0.5479 0.000 0.416 0.000 0.572 0.000 0.012
#> GSM786570 2 0.1333 0.6588 0.000 0.944 0.000 0.048 0.000 0.008
#> GSM786576 2 0.2312 0.6546 0.000 0.876 0.000 0.112 0.000 0.012
#> GSM786577 1 0.4840 0.6172 0.696 0.000 0.144 0.012 0.000 0.148
#> GSM786578 2 0.4037 -0.0129 0.000 0.608 0.000 0.380 0.000 0.012
#> GSM786582 1 0.1934 0.6592 0.916 0.000 0.000 0.040 0.000 0.044
#> GSM786495 2 0.3873 0.5966 0.000 0.772 0.000 0.124 0.000 0.104
#> GSM786505 1 0.5123 0.5370 0.628 0.000 0.000 0.188 0.000 0.184
#> GSM786511 1 0.3756 0.6436 0.784 0.000 0.052 0.008 0.000 0.156
#> GSM786513 1 0.2734 0.6153 0.840 0.000 0.148 0.004 0.000 0.008
#> GSM786525 2 0.1453 0.6636 0.040 0.944 0.000 0.008 0.000 0.008
#> GSM786540 2 0.4176 -0.1265 0.000 0.580 0.000 0.404 0.000 0.016
#> GSM786553 1 0.5884 -0.1586 0.416 0.000 0.200 0.000 0.000 0.384
#> GSM786561 1 0.5088 0.6628 0.676 0.000 0.096 0.200 0.000 0.028
#> GSM786575 5 0.0881 0.9761 0.012 0.000 0.000 0.008 0.972 0.008
#> GSM786494 1 0.6876 0.5740 0.532 0.000 0.024 0.196 0.184 0.064
#> GSM786504 1 0.2653 0.6237 0.844 0.000 0.144 0.000 0.000 0.012
#> GSM786510 2 0.3279 0.5516 0.000 0.796 0.000 0.028 0.000 0.176
#> GSM786514 1 0.0436 0.6559 0.988 0.000 0.004 0.004 0.000 0.004
#> GSM786516 1 0.4226 0.0144 0.504 0.000 0.484 0.008 0.000 0.004
#> GSM786520 1 0.3715 0.6451 0.764 0.000 0.000 0.188 0.000 0.048
#> GSM786521 5 0.0000 0.9842 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786536 3 0.3011 0.6748 0.192 0.000 0.800 0.004 0.000 0.004
#> GSM786542 4 0.5020 0.6835 0.000 0.296 0.080 0.616 0.000 0.008
#> GSM786546 3 0.5066 0.3833 0.000 0.104 0.592 0.304 0.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 specimen(p) disease.state(p) k
#> SD:mclust 81 0.000322 0.451 2
#> SD:mclust 87 0.004499 0.846 3
#> SD:mclust 91 0.075170 0.534 4
#> SD:mclust 73 0.042269 0.659 5
#> SD:mclust 76 0.294581 0.879 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 54547 rows and 93 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.977 0.956 0.982 0.5043 0.495 0.495
#> 3 3 0.592 0.700 0.859 0.3087 0.798 0.612
#> 4 4 0.665 0.743 0.851 0.1076 0.870 0.648
#> 5 5 0.740 0.722 0.848 0.0606 0.930 0.751
#> 6 6 0.765 0.639 0.828 0.0518 0.914 0.653
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
#> GSM786527 2 0.0000 0.974 0.000 1.000
#> GSM786539 2 0.0000 0.974 0.000 1.000
#> GSM786541 2 0.0000 0.974 0.000 1.000
#> GSM786556 2 0.0000 0.974 0.000 1.000
#> GSM786523 1 0.0000 0.988 1.000 0.000
#> GSM786497 1 0.0000 0.988 1.000 0.000
#> GSM786501 2 0.0000 0.974 0.000 1.000
#> GSM786517 2 0.0000 0.974 0.000 1.000
#> GSM786534 2 0.0000 0.974 0.000 1.000
#> GSM786555 2 0.0000 0.974 0.000 1.000
#> GSM786558 2 0.0000 0.974 0.000 1.000
#> GSM786559 2 0.0000 0.974 0.000 1.000
#> GSM786565 2 0.0000 0.974 0.000 1.000
#> GSM786572 2 0.0000 0.974 0.000 1.000
#> GSM786579 2 0.0000 0.974 0.000 1.000
#> GSM786491 1 0.0000 0.988 1.000 0.000
#> GSM786509 1 0.0000 0.988 1.000 0.000
#> GSM786538 1 0.0000 0.988 1.000 0.000
#> GSM786548 2 0.0000 0.974 0.000 1.000
#> GSM786562 1 0.0000 0.988 1.000 0.000
#> GSM786566 1 0.0000 0.988 1.000 0.000
#> GSM786573 2 0.4562 0.889 0.096 0.904
#> GSM786574 2 0.0000 0.974 0.000 1.000
#> GSM786580 1 0.0000 0.988 1.000 0.000
#> GSM786581 2 0.0000 0.974 0.000 1.000
#> GSM786583 1 0.0376 0.985 0.996 0.004
#> GSM786492 1 0.0000 0.988 1.000 0.000
#> GSM786493 2 0.0000 0.974 0.000 1.000
#> GSM786499 2 0.0000 0.974 0.000 1.000
#> GSM786502 2 0.0000 0.974 0.000 1.000
#> GSM786537 1 0.0000 0.988 1.000 0.000
#> GSM786567 2 0.0000 0.974 0.000 1.000
#> GSM786498 1 0.0000 0.988 1.000 0.000
#> GSM786500 1 0.0000 0.988 1.000 0.000
#> GSM786503 1 0.0000 0.988 1.000 0.000
#> GSM786507 2 0.0000 0.974 0.000 1.000
#> GSM786515 2 0.0000 0.974 0.000 1.000
#> GSM786522 1 0.0000 0.988 1.000 0.000
#> GSM786526 1 0.0000 0.988 1.000 0.000
#> GSM786528 1 0.0000 0.988 1.000 0.000
#> GSM786531 2 0.9963 0.142 0.464 0.536
#> GSM786535 2 0.0000 0.974 0.000 1.000
#> GSM786543 1 0.0000 0.988 1.000 0.000
#> GSM786545 1 0.0000 0.988 1.000 0.000
#> GSM786551 1 0.0000 0.988 1.000 0.000
#> GSM786552 2 0.0000 0.974 0.000 1.000
#> GSM786554 2 0.0000 0.974 0.000 1.000
#> GSM786557 1 0.0000 0.988 1.000 0.000
#> GSM786560 1 0.0000 0.988 1.000 0.000
#> GSM786564 2 0.0000 0.974 0.000 1.000
#> GSM786568 2 0.3584 0.917 0.068 0.932
#> GSM786569 1 0.0000 0.988 1.000 0.000
#> GSM786571 1 0.6048 0.816 0.852 0.148
#> GSM786496 2 0.0000 0.974 0.000 1.000
#> GSM786506 1 0.0000 0.988 1.000 0.000
#> GSM786508 2 0.8267 0.650 0.260 0.740
#> GSM786512 2 0.0000 0.974 0.000 1.000
#> GSM786518 1 0.0000 0.988 1.000 0.000
#> GSM786519 1 0.0000 0.988 1.000 0.000
#> GSM786524 1 0.0000 0.988 1.000 0.000
#> GSM786529 2 0.5059 0.871 0.112 0.888
#> GSM786530 1 0.0000 0.988 1.000 0.000
#> GSM786532 1 0.0000 0.988 1.000 0.000
#> GSM786533 2 0.0000 0.974 0.000 1.000
#> GSM786544 1 0.0376 0.985 0.996 0.004
#> GSM786547 2 0.1184 0.961 0.016 0.984
#> GSM786549 1 0.0000 0.988 1.000 0.000
#> GSM786550 1 0.9580 0.364 0.620 0.380
#> GSM786563 2 0.0000 0.974 0.000 1.000
#> GSM786570 2 0.0000 0.974 0.000 1.000
#> GSM786576 2 0.0000 0.974 0.000 1.000
#> GSM786577 1 0.0000 0.988 1.000 0.000
#> GSM786578 2 0.0000 0.974 0.000 1.000
#> GSM786582 1 0.0000 0.988 1.000 0.000
#> GSM786495 2 0.0000 0.974 0.000 1.000
#> GSM786505 1 0.0000 0.988 1.000 0.000
#> GSM786511 1 0.0000 0.988 1.000 0.000
#> GSM786513 1 0.0000 0.988 1.000 0.000
#> GSM786525 2 0.0000 0.974 0.000 1.000
#> GSM786540 2 0.0000 0.974 0.000 1.000
#> GSM786553 1 0.0000 0.988 1.000 0.000
#> GSM786561 1 0.0000 0.988 1.000 0.000
#> GSM786575 1 0.0000 0.988 1.000 0.000
#> GSM786494 1 0.0000 0.988 1.000 0.000
#> GSM786504 1 0.0000 0.988 1.000 0.000
#> GSM786510 2 0.0000 0.974 0.000 1.000
#> GSM786514 1 0.0000 0.988 1.000 0.000
#> GSM786516 1 0.0000 0.988 1.000 0.000
#> GSM786520 1 0.0000 0.988 1.000 0.000
#> GSM786521 1 0.0000 0.988 1.000 0.000
#> GSM786536 1 0.0376 0.985 0.996 0.004
#> GSM786542 2 0.0000 0.974 0.000 1.000
#> GSM786546 2 0.4939 0.876 0.108 0.892
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786539 2 0.3412 0.7804 0.124 0.876 0.000
#> GSM786541 2 0.3619 0.8125 0.000 0.864 0.136
#> GSM786556 2 0.4605 0.7433 0.000 0.796 0.204
#> GSM786523 3 0.0424 0.7342 0.008 0.000 0.992
#> GSM786497 1 0.5650 0.6873 0.688 0.000 0.312
#> GSM786501 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786534 2 0.4887 0.7130 0.000 0.772 0.228
#> GSM786555 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786558 2 0.2959 0.8395 0.000 0.900 0.100
#> GSM786559 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786565 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786572 2 0.3116 0.8348 0.000 0.892 0.108
#> GSM786579 2 0.3267 0.8284 0.000 0.884 0.116
#> GSM786491 1 0.0592 0.7989 0.988 0.000 0.012
#> GSM786509 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786548 2 0.5621 0.5874 0.000 0.692 0.308
#> GSM786562 1 0.0237 0.7979 0.996 0.004 0.000
#> GSM786566 1 0.3267 0.6978 0.884 0.116 0.000
#> GSM786573 3 0.6095 0.2697 0.000 0.392 0.608
#> GSM786574 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786580 3 0.5158 0.4255 0.232 0.004 0.764
#> GSM786581 2 0.4978 0.6667 0.216 0.780 0.004
#> GSM786583 3 0.0237 0.7368 0.004 0.000 0.996
#> GSM786492 1 0.5706 0.6807 0.680 0.000 0.320
#> GSM786493 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786499 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786502 2 0.2796 0.8098 0.092 0.908 0.000
#> GSM786537 3 0.6286 -0.3410 0.464 0.000 0.536
#> GSM786567 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786498 1 0.7677 0.6532 0.676 0.120 0.204
#> GSM786500 1 0.5560 0.6946 0.700 0.000 0.300
#> GSM786503 1 0.0237 0.7979 0.996 0.004 0.000
#> GSM786507 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786515 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786522 1 0.1289 0.7906 0.968 0.000 0.032
#> GSM786526 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786528 1 0.1643 0.7848 0.956 0.000 0.044
#> GSM786531 3 0.0000 0.7378 0.000 0.000 1.000
#> GSM786535 3 0.5835 0.3788 0.000 0.340 0.660
#> GSM786543 1 0.0892 0.7989 0.980 0.000 0.020
#> GSM786545 3 0.0237 0.7368 0.004 0.000 0.996
#> GSM786551 3 0.4931 0.4597 0.232 0.000 0.768
#> GSM786552 3 0.6260 0.0766 0.000 0.448 0.552
#> GSM786554 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786557 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786564 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786568 3 0.3038 0.7128 0.000 0.104 0.896
#> GSM786569 1 0.5529 0.6968 0.704 0.000 0.296
#> GSM786571 3 0.0000 0.7378 0.000 0.000 1.000
#> GSM786496 2 0.0592 0.8822 0.000 0.988 0.012
#> GSM786506 1 0.0237 0.7979 0.996 0.004 0.000
#> GSM786508 2 0.5926 0.3937 0.356 0.644 0.000
#> GSM786512 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786518 1 0.5678 0.6840 0.684 0.000 0.316
#> GSM786519 1 0.5754 0.6962 0.700 0.004 0.296
#> GSM786524 1 0.5988 0.6334 0.632 0.000 0.368
#> GSM786529 3 0.0237 0.7377 0.000 0.004 0.996
#> GSM786530 1 0.6192 0.5582 0.580 0.000 0.420
#> GSM786532 1 0.1289 0.7904 0.968 0.000 0.032
#> GSM786533 2 0.2796 0.8444 0.000 0.908 0.092
#> GSM786544 3 0.0237 0.7368 0.004 0.000 0.996
#> GSM786547 3 0.3551 0.6931 0.000 0.132 0.868
#> GSM786549 3 0.0237 0.7368 0.004 0.000 0.996
#> GSM786550 3 0.0000 0.7378 0.000 0.000 1.000
#> GSM786563 2 0.6235 0.2768 0.000 0.564 0.436
#> GSM786570 2 0.0237 0.8845 0.000 0.996 0.004
#> GSM786576 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786577 1 0.6062 0.6126 0.616 0.000 0.384
#> GSM786578 2 0.5650 0.5815 0.000 0.688 0.312
#> GSM786582 1 0.0237 0.7991 0.996 0.000 0.004
#> GSM786495 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786511 1 0.5859 0.6568 0.656 0.000 0.344
#> GSM786513 1 0.5327 0.6341 0.728 0.000 0.272
#> GSM786525 2 0.8445 0.4671 0.304 0.580 0.116
#> GSM786540 2 0.3551 0.8158 0.000 0.868 0.132
#> GSM786553 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786561 1 0.5529 0.6968 0.704 0.000 0.296
#> GSM786575 1 0.6299 0.4355 0.524 0.000 0.476
#> GSM786494 1 0.5560 0.6946 0.700 0.000 0.300
#> GSM786504 1 0.6126 0.4017 0.600 0.000 0.400
#> GSM786510 2 0.0000 0.8843 0.000 1.000 0.000
#> GSM786514 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786516 1 0.5706 0.5906 0.680 0.000 0.320
#> GSM786520 1 0.0000 0.7994 1.000 0.000 0.000
#> GSM786521 3 0.4291 0.5150 0.180 0.000 0.820
#> GSM786536 3 0.6308 0.0570 0.492 0.000 0.508
#> GSM786542 3 0.6111 0.2424 0.000 0.396 0.604
#> GSM786546 3 0.5178 0.5359 0.000 0.256 0.744
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0188 0.90687 0.000 0.996 0.000 0.004
#> GSM786539 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786541 2 0.2530 0.83397 0.000 0.888 0.112 0.000
#> GSM786556 2 0.3486 0.74743 0.000 0.812 0.188 0.000
#> GSM786523 3 0.5125 0.38377 0.008 0.000 0.604 0.388
#> GSM786497 4 0.2530 0.89663 0.112 0.000 0.000 0.888
#> GSM786501 2 0.0188 0.90687 0.000 0.996 0.000 0.004
#> GSM786517 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786534 2 0.3942 0.67756 0.000 0.764 0.236 0.000
#> GSM786555 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0707 0.90000 0.000 0.980 0.020 0.000
#> GSM786559 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786572 2 0.2124 0.87412 0.000 0.924 0.068 0.008
#> GSM786579 2 0.1211 0.89216 0.000 0.960 0.040 0.000
#> GSM786491 1 0.4285 0.76389 0.820 0.000 0.076 0.104
#> GSM786509 1 0.3649 0.66288 0.796 0.000 0.000 0.204
#> GSM786538 1 0.0188 0.87877 0.996 0.000 0.000 0.004
#> GSM786548 2 0.5080 0.28067 0.000 0.576 0.420 0.004
#> GSM786562 1 0.0921 0.86653 0.972 0.000 0.000 0.028
#> GSM786566 1 0.1637 0.84300 0.940 0.060 0.000 0.000
#> GSM786573 2 0.6549 -0.00953 0.000 0.488 0.436 0.076
#> GSM786574 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786580 3 0.6883 0.35547 0.260 0.000 0.584 0.156
#> GSM786581 2 0.4713 0.41202 0.360 0.640 0.000 0.000
#> GSM786583 3 0.2408 0.68541 0.000 0.000 0.896 0.104
#> GSM786492 4 0.2530 0.89663 0.112 0.000 0.000 0.888
#> GSM786493 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786499 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786502 2 0.2215 0.87910 0.016 0.936 0.024 0.024
#> GSM786537 4 0.2401 0.88428 0.092 0.000 0.004 0.904
#> GSM786567 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786498 4 0.8331 0.13244 0.396 0.072 0.104 0.428
#> GSM786500 4 0.2589 0.89506 0.116 0.000 0.000 0.884
#> GSM786503 1 0.0336 0.88171 0.992 0.000 0.000 0.008
#> GSM786507 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786515 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786522 1 0.2032 0.85642 0.936 0.000 0.036 0.028
#> GSM786526 1 0.0469 0.88122 0.988 0.000 0.000 0.012
#> GSM786528 1 0.0524 0.88147 0.988 0.000 0.004 0.008
#> GSM786531 3 0.2814 0.67383 0.000 0.000 0.868 0.132
#> GSM786535 3 0.2149 0.70049 0.000 0.088 0.912 0.000
#> GSM786543 4 0.3907 0.79487 0.232 0.000 0.000 0.768
#> GSM786545 3 0.5000 0.15896 0.000 0.000 0.504 0.496
#> GSM786551 3 0.5446 0.55114 0.044 0.000 0.680 0.276
#> GSM786552 3 0.3764 0.63914 0.000 0.216 0.784 0.000
#> GSM786554 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786557 1 0.0336 0.88171 0.992 0.000 0.000 0.008
#> GSM786560 1 0.3837 0.62618 0.776 0.000 0.000 0.224
#> GSM786564 2 0.5487 0.69468 0.008 0.752 0.132 0.108
#> GSM786568 3 0.7806 0.29948 0.000 0.356 0.392 0.252
#> GSM786569 4 0.3694 0.89005 0.124 0.000 0.032 0.844
#> GSM786571 3 0.2408 0.68612 0.000 0.000 0.896 0.104
#> GSM786496 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786506 1 0.0376 0.88099 0.992 0.004 0.000 0.004
#> GSM786508 2 0.3742 0.79422 0.064 0.868 0.016 0.052
#> GSM786512 2 0.1022 0.88875 0.000 0.968 0.032 0.000
#> GSM786518 4 0.2530 0.89663 0.112 0.000 0.000 0.888
#> GSM786519 4 0.3581 0.89229 0.116 0.000 0.032 0.852
#> GSM786524 4 0.3557 0.88842 0.108 0.000 0.036 0.856
#> GSM786529 3 0.2530 0.68746 0.000 0.004 0.896 0.100
#> GSM786530 4 0.2909 0.88390 0.092 0.000 0.020 0.888
#> GSM786532 1 0.0336 0.87971 0.992 0.000 0.008 0.000
#> GSM786533 2 0.1474 0.88671 0.000 0.948 0.052 0.000
#> GSM786544 3 0.4661 0.46706 0.000 0.000 0.652 0.348
#> GSM786547 3 0.2611 0.69990 0.000 0.096 0.896 0.008
#> GSM786549 3 0.4164 0.57909 0.000 0.000 0.736 0.264
#> GSM786550 3 0.3196 0.63352 0.008 0.000 0.856 0.136
#> GSM786563 3 0.4855 0.28377 0.000 0.400 0.600 0.000
#> GSM786570 2 0.1004 0.89667 0.000 0.972 0.024 0.004
#> GSM786576 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786577 4 0.3427 0.89326 0.112 0.000 0.028 0.860
#> GSM786578 3 0.6550 0.52426 0.004 0.272 0.620 0.104
#> GSM786582 1 0.0592 0.87965 0.984 0.000 0.000 0.016
#> GSM786495 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786505 1 0.0336 0.88171 0.992 0.000 0.000 0.008
#> GSM786511 4 0.2530 0.89663 0.112 0.000 0.000 0.888
#> GSM786513 1 0.4655 0.73387 0.796 0.000 0.116 0.088
#> GSM786525 1 0.3245 0.77405 0.872 0.100 0.028 0.000
#> GSM786540 2 0.2973 0.81019 0.000 0.856 0.144 0.000
#> GSM786553 1 0.0336 0.88171 0.992 0.000 0.000 0.008
#> GSM786561 4 0.3581 0.89229 0.116 0.000 0.032 0.852
#> GSM786575 1 0.6972 0.29932 0.520 0.000 0.356 0.124
#> GSM786494 1 0.6504 0.46480 0.636 0.000 0.148 0.216
#> GSM786504 1 0.4673 0.73152 0.792 0.000 0.132 0.076
#> GSM786510 2 0.0000 0.90803 0.000 1.000 0.000 0.000
#> GSM786514 1 0.0469 0.88122 0.988 0.000 0.000 0.012
#> GSM786516 4 0.7082 0.49246 0.308 0.000 0.152 0.540
#> GSM786520 1 0.0469 0.88122 0.988 0.000 0.000 0.012
#> GSM786521 3 0.6595 0.44284 0.212 0.000 0.628 0.160
#> GSM786536 3 0.5586 0.13699 0.452 0.000 0.528 0.020
#> GSM786542 3 0.3610 0.65593 0.000 0.200 0.800 0.000
#> GSM786546 3 0.2197 0.70120 0.000 0.080 0.916 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.1310 0.8541 0.000 0.956 0.024 0.000 0.020
#> GSM786539 2 0.0000 0.8636 0.000 1.000 0.000 0.000 0.000
#> GSM786541 2 0.3910 0.6186 0.000 0.740 0.248 0.004 0.008
#> GSM786556 2 0.5095 0.3029 0.000 0.592 0.368 0.004 0.036
#> GSM786523 3 0.4252 0.6018 0.004 0.000 0.780 0.072 0.144
#> GSM786497 4 0.0162 0.8501 0.004 0.000 0.000 0.996 0.000
#> GSM786501 2 0.0510 0.8608 0.000 0.984 0.000 0.000 0.016
#> GSM786517 2 0.0162 0.8637 0.000 0.996 0.004 0.000 0.000
#> GSM786534 2 0.5199 0.1635 0.000 0.548 0.412 0.004 0.036
#> GSM786555 2 0.0486 0.8628 0.000 0.988 0.004 0.004 0.004
#> GSM786558 2 0.1704 0.8287 0.000 0.928 0.068 0.004 0.000
#> GSM786559 2 0.3061 0.7857 0.000 0.844 0.136 0.000 0.020
#> GSM786565 2 0.0740 0.8618 0.000 0.980 0.008 0.004 0.008
#> GSM786572 2 0.4649 0.6762 0.000 0.716 0.220 0.000 0.064
#> GSM786579 2 0.3890 0.6927 0.000 0.736 0.252 0.000 0.012
#> GSM786491 1 0.2377 0.8224 0.872 0.000 0.000 0.000 0.128
#> GSM786509 1 0.1197 0.9121 0.952 0.000 0.000 0.048 0.000
#> GSM786538 1 0.0162 0.9432 0.996 0.000 0.000 0.000 0.004
#> GSM786548 3 0.5754 0.3506 0.000 0.292 0.588 0.000 0.120
#> GSM786562 1 0.0162 0.9432 0.996 0.000 0.000 0.000 0.004
#> GSM786566 1 0.0510 0.9361 0.984 0.016 0.000 0.000 0.000
#> GSM786573 3 0.6078 0.2678 0.000 0.400 0.512 0.028 0.060
#> GSM786574 2 0.0324 0.8634 0.000 0.992 0.004 0.004 0.000
#> GSM786580 5 0.3100 0.7966 0.068 0.000 0.028 0.028 0.876
#> GSM786581 2 0.3790 0.6021 0.248 0.744 0.004 0.004 0.000
#> GSM786583 3 0.2864 0.6396 0.000 0.000 0.864 0.024 0.112
#> GSM786492 4 0.0324 0.8489 0.004 0.000 0.000 0.992 0.004
#> GSM786493 2 0.0162 0.8633 0.000 0.996 0.000 0.004 0.000
#> GSM786499 2 0.0510 0.8608 0.000 0.984 0.000 0.000 0.016
#> GSM786502 2 0.5524 0.6768 0.000 0.716 0.144 0.060 0.080
#> GSM786537 4 0.0865 0.8395 0.004 0.000 0.000 0.972 0.024
#> GSM786567 2 0.0000 0.8636 0.000 1.000 0.000 0.000 0.000
#> GSM786498 4 0.8129 0.2127 0.040 0.212 0.104 0.508 0.136
#> GSM786500 4 0.0324 0.8489 0.004 0.000 0.000 0.992 0.004
#> GSM786503 1 0.0000 0.9433 1.000 0.000 0.000 0.000 0.000
#> GSM786507 2 0.0000 0.8636 0.000 1.000 0.000 0.000 0.000
#> GSM786515 2 0.0162 0.8633 0.000 0.996 0.000 0.004 0.000
#> GSM786522 1 0.0771 0.9362 0.976 0.000 0.004 0.000 0.020
#> GSM786526 1 0.1830 0.9032 0.932 0.000 0.028 0.000 0.040
#> GSM786528 1 0.0671 0.9387 0.980 0.000 0.004 0.000 0.016
#> GSM786531 3 0.2179 0.6438 0.000 0.000 0.888 0.000 0.112
#> GSM786535 3 0.1965 0.6291 0.000 0.000 0.904 0.000 0.096
#> GSM786543 4 0.3438 0.6820 0.172 0.000 0.020 0.808 0.000
#> GSM786545 3 0.3319 0.6084 0.000 0.000 0.820 0.160 0.020
#> GSM786551 3 0.5302 0.1481 0.008 0.000 0.480 0.480 0.032
#> GSM786552 3 0.4334 0.5945 0.000 0.140 0.768 0.000 0.092
#> GSM786554 2 0.0162 0.8633 0.000 0.996 0.000 0.004 0.000
#> GSM786557 1 0.0162 0.9432 0.996 0.000 0.000 0.000 0.004
#> GSM786560 1 0.1483 0.9207 0.952 0.000 0.012 0.008 0.028
#> GSM786564 5 0.4226 0.6177 0.000 0.084 0.140 0.000 0.776
#> GSM786568 4 0.8270 -0.1498 0.000 0.192 0.320 0.340 0.148
#> GSM786569 4 0.2920 0.7249 0.132 0.000 0.016 0.852 0.000
#> GSM786571 3 0.2513 0.6437 0.000 0.000 0.876 0.008 0.116
#> GSM786496 2 0.0740 0.8618 0.000 0.980 0.008 0.004 0.008
#> GSM786506 1 0.0162 0.9432 0.996 0.000 0.000 0.000 0.004
#> GSM786508 2 0.2332 0.8136 0.000 0.904 0.076 0.004 0.016
#> GSM786512 2 0.1908 0.8047 0.000 0.908 0.092 0.000 0.000
#> GSM786518 4 0.0162 0.8501 0.004 0.000 0.000 0.996 0.000
#> GSM786519 4 0.2172 0.8218 0.004 0.000 0.060 0.916 0.020
#> GSM786524 4 0.1430 0.8356 0.004 0.000 0.052 0.944 0.000
#> GSM786529 3 0.1544 0.6415 0.000 0.000 0.932 0.000 0.068
#> GSM786530 4 0.0162 0.8501 0.004 0.000 0.000 0.996 0.000
#> GSM786532 1 0.0324 0.9432 0.992 0.000 0.004 0.000 0.004
#> GSM786533 2 0.3409 0.7635 0.000 0.816 0.160 0.000 0.024
#> GSM786544 3 0.5855 0.4458 0.004 0.000 0.616 0.232 0.148
#> GSM786547 3 0.1410 0.6454 0.000 0.000 0.940 0.000 0.060
#> GSM786549 3 0.5083 0.5516 0.004 0.000 0.712 0.136 0.148
#> GSM786550 5 0.1608 0.7200 0.000 0.000 0.072 0.000 0.928
#> GSM786563 3 0.4724 0.5439 0.000 0.164 0.732 0.000 0.104
#> GSM786570 2 0.3970 0.7400 0.000 0.788 0.156 0.000 0.056
#> GSM786576 2 0.0000 0.8636 0.000 1.000 0.000 0.000 0.000
#> GSM786577 4 0.1202 0.8428 0.004 0.000 0.032 0.960 0.004
#> GSM786578 3 0.6442 0.2612 0.000 0.196 0.480 0.000 0.324
#> GSM786582 1 0.0290 0.9417 0.992 0.000 0.000 0.008 0.000
#> GSM786495 2 0.0000 0.8636 0.000 1.000 0.000 0.000 0.000
#> GSM786505 1 0.0162 0.9432 0.996 0.000 0.000 0.000 0.004
#> GSM786511 4 0.0162 0.8501 0.004 0.000 0.000 0.996 0.000
#> GSM786513 1 0.4453 0.6250 0.724 0.000 0.228 0.000 0.048
#> GSM786525 1 0.1412 0.9101 0.952 0.036 0.008 0.004 0.000
#> GSM786540 2 0.4953 0.3027 0.000 0.532 0.440 0.000 0.028
#> GSM786553 1 0.0162 0.9432 0.996 0.000 0.000 0.000 0.004
#> GSM786561 4 0.2295 0.8082 0.004 0.000 0.088 0.900 0.008
#> GSM786575 5 0.3342 0.7674 0.136 0.000 0.020 0.008 0.836
#> GSM786494 5 0.6113 0.4757 0.332 0.000 0.000 0.144 0.524
#> GSM786504 1 0.3772 0.7171 0.792 0.000 0.172 0.000 0.036
#> GSM786510 2 0.0000 0.8636 0.000 1.000 0.000 0.000 0.000
#> GSM786514 1 0.0566 0.9398 0.984 0.000 0.004 0.000 0.012
#> GSM786516 3 0.7216 -0.0037 0.052 0.000 0.404 0.404 0.140
#> GSM786520 1 0.0000 0.9433 1.000 0.000 0.000 0.000 0.000
#> GSM786521 5 0.2824 0.7956 0.068 0.000 0.016 0.028 0.888
#> GSM786536 3 0.6744 0.3690 0.280 0.080 0.572 0.008 0.060
#> GSM786542 3 0.4117 0.5849 0.000 0.116 0.788 0.000 0.096
#> GSM786546 3 0.2561 0.6388 0.000 0.000 0.856 0.000 0.144
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.2994 0.6826 0.000 0.208 0.000 0.000 0.004 0.788
#> GSM786539 6 0.0458 0.7982 0.000 0.016 0.000 0.000 0.000 0.984
#> GSM786541 6 0.4200 0.1972 0.000 0.392 0.012 0.000 0.004 0.592
#> GSM786556 2 0.4279 0.1829 0.000 0.548 0.012 0.000 0.004 0.436
#> GSM786523 3 0.0363 0.6632 0.000 0.000 0.988 0.012 0.000 0.000
#> GSM786497 4 0.0000 0.8209 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786501 6 0.2300 0.7433 0.000 0.144 0.000 0.000 0.000 0.856
#> GSM786517 6 0.1267 0.7931 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM786534 2 0.4631 0.1958 0.000 0.536 0.032 0.000 0.004 0.428
#> GSM786555 6 0.2001 0.7613 0.000 0.092 0.004 0.000 0.004 0.900
#> GSM786558 6 0.2243 0.7420 0.000 0.112 0.004 0.000 0.004 0.880
#> GSM786559 6 0.3997 0.1128 0.000 0.488 0.000 0.000 0.004 0.508
#> GSM786565 6 0.2100 0.7694 0.000 0.112 0.000 0.000 0.004 0.884
#> GSM786572 2 0.3141 0.4353 0.000 0.788 0.000 0.000 0.012 0.200
#> GSM786579 2 0.3714 0.2534 0.000 0.656 0.000 0.000 0.004 0.340
#> GSM786491 1 0.2562 0.7790 0.828 0.000 0.000 0.000 0.172 0.000
#> GSM786509 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786538 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786548 2 0.3310 0.4342 0.000 0.816 0.148 0.000 0.020 0.016
#> GSM786562 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786566 1 0.0146 0.9425 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM786573 2 0.5543 0.2365 0.000 0.520 0.052 0.032 0.004 0.392
#> GSM786574 6 0.1141 0.7889 0.000 0.052 0.000 0.000 0.000 0.948
#> GSM786580 5 0.0291 0.8468 0.004 0.004 0.000 0.000 0.992 0.000
#> GSM786581 6 0.4898 0.4199 0.272 0.076 0.004 0.000 0.004 0.644
#> GSM786583 3 0.3608 0.5126 0.000 0.272 0.716 0.000 0.012 0.000
#> GSM786492 4 0.0000 0.8209 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786493 6 0.1477 0.7816 0.000 0.048 0.008 0.000 0.004 0.940
#> GSM786499 6 0.2340 0.7404 0.000 0.148 0.000 0.000 0.000 0.852
#> GSM786502 6 0.5020 0.1704 0.000 0.428 0.000 0.040 0.016 0.516
#> GSM786537 4 0.1141 0.7962 0.000 0.000 0.000 0.948 0.052 0.000
#> GSM786567 6 0.0363 0.7986 0.000 0.012 0.000 0.000 0.000 0.988
#> GSM786498 4 0.5612 0.3487 0.008 0.352 0.000 0.544 0.016 0.080
#> GSM786500 4 0.0000 0.8209 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786503 1 0.0146 0.9425 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM786507 6 0.1267 0.7900 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM786515 6 0.1226 0.7865 0.000 0.040 0.004 0.000 0.004 0.952
#> GSM786522 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786526 1 0.1477 0.9058 0.940 0.008 0.048 0.000 0.000 0.004
#> GSM786528 1 0.1036 0.9239 0.964 0.008 0.024 0.000 0.000 0.004
#> GSM786531 3 0.3668 0.4568 0.000 0.328 0.668 0.000 0.004 0.000
#> GSM786535 2 0.3457 0.3732 0.000 0.752 0.232 0.000 0.016 0.000
#> GSM786543 4 0.3101 0.6001 0.244 0.000 0.000 0.756 0.000 0.000
#> GSM786545 3 0.4634 0.1775 0.000 0.472 0.496 0.024 0.008 0.000
#> GSM786551 4 0.4238 0.6643 0.016 0.040 0.152 0.772 0.020 0.000
#> GSM786552 2 0.3534 0.3152 0.000 0.716 0.276 0.000 0.008 0.000
#> GSM786554 6 0.0935 0.7911 0.000 0.032 0.000 0.000 0.004 0.964
#> GSM786557 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786560 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786564 5 0.3482 0.5031 0.000 0.316 0.000 0.000 0.684 0.000
#> GSM786568 3 0.4105 0.5870 0.000 0.132 0.780 0.068 0.012 0.008
#> GSM786569 4 0.3023 0.6289 0.212 0.000 0.004 0.784 0.000 0.000
#> GSM786571 3 0.1387 0.6564 0.000 0.068 0.932 0.000 0.000 0.000
#> GSM786496 6 0.1958 0.7656 0.000 0.100 0.000 0.000 0.004 0.896
#> GSM786506 1 0.0146 0.9425 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM786508 6 0.4181 0.6888 0.000 0.140 0.080 0.016 0.000 0.764
#> GSM786512 6 0.4967 0.5063 0.000 0.132 0.228 0.000 0.000 0.640
#> GSM786518 4 0.0000 0.8209 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786519 4 0.3975 0.3956 0.000 0.000 0.392 0.600 0.000 0.008
#> GSM786524 4 0.0363 0.8189 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM786529 2 0.3819 0.2370 0.000 0.672 0.316 0.000 0.012 0.000
#> GSM786530 4 0.0000 0.8209 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786532 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786533 2 0.4482 0.0576 0.000 0.552 0.032 0.000 0.000 0.416
#> GSM786544 3 0.0748 0.6631 0.000 0.004 0.976 0.016 0.004 0.000
#> GSM786547 3 0.3923 0.2862 0.000 0.416 0.580 0.000 0.004 0.000
#> GSM786549 3 0.0436 0.6634 0.000 0.004 0.988 0.004 0.004 0.000
#> GSM786550 5 0.0260 0.8437 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM786563 2 0.3401 0.4017 0.000 0.776 0.204 0.000 0.016 0.004
#> GSM786570 2 0.4184 -0.1545 0.000 0.504 0.000 0.000 0.012 0.484
#> GSM786576 6 0.0790 0.7980 0.000 0.032 0.000 0.000 0.000 0.968
#> GSM786577 4 0.1141 0.8030 0.000 0.000 0.052 0.948 0.000 0.000
#> GSM786578 2 0.4589 0.3580 0.000 0.708 0.096 0.000 0.188 0.008
#> GSM786582 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786495 6 0.1663 0.7784 0.000 0.088 0.000 0.000 0.000 0.912
#> GSM786505 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786511 4 0.0000 0.8209 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 1 0.3175 0.6717 0.744 0.000 0.256 0.000 0.000 0.000
#> GSM786525 1 0.4057 0.6766 0.772 0.048 0.016 0.000 0.004 0.160
#> GSM786540 2 0.2733 0.4566 0.000 0.864 0.080 0.000 0.000 0.056
#> GSM786553 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786561 4 0.3862 0.2439 0.000 0.000 0.476 0.524 0.000 0.000
#> GSM786575 5 0.0865 0.8344 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM786494 5 0.3298 0.6383 0.236 0.000 0.000 0.008 0.756 0.000
#> GSM786504 1 0.2793 0.7456 0.800 0.000 0.200 0.000 0.000 0.000
#> GSM786510 6 0.0858 0.7978 0.000 0.028 0.004 0.000 0.000 0.968
#> GSM786514 1 0.0405 0.9384 0.988 0.008 0.004 0.000 0.000 0.000
#> GSM786516 3 0.2302 0.5845 0.000 0.008 0.872 0.120 0.000 0.000
#> GSM786520 1 0.0000 0.9438 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786521 5 0.0291 0.8468 0.004 0.004 0.000 0.000 0.992 0.000
#> GSM786536 3 0.4831 0.1984 0.020 0.028 0.572 0.000 0.000 0.380
#> GSM786542 2 0.3320 0.3954 0.000 0.772 0.212 0.000 0.016 0.000
#> GSM786546 3 0.4083 0.2141 0.000 0.460 0.532 0.000 0.008 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 specimen(p) disease.state(p) k
#> SD:NMF 91 0.02014 1.000 2
#> SD:NMF 80 0.00617 0.264 3
#> SD:NMF 78 0.00797 0.365 4
#> SD:NMF 80 0.04753 0.549 5
#> SD:NMF 66 0.15099 0.608 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 54547 rows and 93 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 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.319 0.777 0.860 0.4628 0.520 0.520
#> 3 3 0.308 0.708 0.815 0.2271 0.899 0.806
#> 4 4 0.425 0.690 0.832 0.1335 0.918 0.807
#> 5 5 0.592 0.684 0.834 0.1393 0.884 0.675
#> 6 6 0.660 0.627 0.791 0.0576 0.960 0.848
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
#> GSM786527 2 0.0000 0.908 0.000 1.000
#> GSM786539 2 0.4022 0.880 0.080 0.920
#> GSM786541 2 0.0000 0.908 0.000 1.000
#> GSM786556 2 0.0000 0.908 0.000 1.000
#> GSM786523 1 0.8909 0.712 0.692 0.308
#> GSM786497 1 0.0000 0.795 1.000 0.000
#> GSM786501 2 0.6438 0.808 0.164 0.836
#> GSM786517 2 0.0000 0.908 0.000 1.000
#> GSM786534 2 0.0000 0.908 0.000 1.000
#> GSM786555 2 0.0000 0.908 0.000 1.000
#> GSM786558 2 0.0000 0.908 0.000 1.000
#> GSM786559 2 0.1184 0.906 0.016 0.984
#> GSM786565 2 0.0000 0.908 0.000 1.000
#> GSM786572 2 0.0000 0.908 0.000 1.000
#> GSM786579 2 0.0938 0.907 0.012 0.988
#> GSM786491 1 0.8608 0.684 0.716 0.284
#> GSM786509 1 0.2778 0.816 0.952 0.048
#> GSM786538 1 0.3274 0.819 0.940 0.060
#> GSM786548 2 0.0938 0.908 0.012 0.988
#> GSM786562 1 0.5059 0.822 0.888 0.112
#> GSM786566 1 0.5519 0.817 0.872 0.128
#> GSM786573 1 0.9087 0.694 0.676 0.324
#> GSM786574 2 0.0000 0.908 0.000 1.000
#> GSM786580 1 0.9661 0.521 0.608 0.392
#> GSM786581 2 0.7299 0.737 0.204 0.796
#> GSM786583 1 0.9552 0.622 0.624 0.376
#> GSM786492 1 0.0000 0.795 1.000 0.000
#> GSM786493 2 0.4562 0.869 0.096 0.904
#> GSM786499 2 0.6531 0.803 0.168 0.832
#> GSM786502 1 0.8443 0.723 0.728 0.272
#> GSM786537 1 0.0000 0.795 1.000 0.000
#> GSM786567 2 0.2423 0.898 0.040 0.960
#> GSM786498 1 0.6343 0.806 0.840 0.160
#> GSM786500 1 0.0000 0.795 1.000 0.000
#> GSM786503 1 0.3879 0.821 0.924 0.076
#> GSM786507 2 0.6623 0.801 0.172 0.828
#> GSM786515 2 0.4562 0.869 0.096 0.904
#> GSM786522 1 0.3274 0.820 0.940 0.060
#> GSM786526 1 0.5629 0.818 0.868 0.132
#> GSM786528 1 0.5629 0.818 0.868 0.132
#> GSM786531 1 0.9977 0.429 0.528 0.472
#> GSM786535 2 0.4562 0.858 0.096 0.904
#> GSM786543 1 0.0000 0.795 1.000 0.000
#> GSM786545 1 0.8813 0.719 0.700 0.300
#> GSM786551 1 0.8499 0.737 0.724 0.276
#> GSM786552 2 0.6531 0.761 0.168 0.832
#> GSM786554 2 0.6712 0.794 0.176 0.824
#> GSM786557 1 0.3114 0.818 0.944 0.056
#> GSM786560 1 0.2043 0.811 0.968 0.032
#> GSM786564 2 0.0376 0.908 0.004 0.996
#> GSM786568 1 0.9661 0.600 0.608 0.392
#> GSM786569 1 0.0938 0.802 0.988 0.012
#> GSM786571 1 0.9983 0.400 0.524 0.476
#> GSM786496 2 0.0000 0.908 0.000 1.000
#> GSM786506 1 0.3274 0.819 0.940 0.060
#> GSM786508 1 0.9427 0.608 0.640 0.360
#> GSM786512 1 0.9710 0.526 0.600 0.400
#> GSM786518 1 0.0000 0.795 1.000 0.000
#> GSM786519 1 0.2043 0.809 0.968 0.032
#> GSM786524 1 0.6343 0.793 0.840 0.160
#> GSM786529 1 0.9522 0.628 0.628 0.372
#> GSM786530 1 0.7453 0.766 0.788 0.212
#> GSM786532 1 0.5294 0.821 0.880 0.120
#> GSM786533 2 0.9393 0.324 0.356 0.644
#> GSM786544 1 0.8861 0.716 0.696 0.304
#> GSM786547 1 0.9977 0.429 0.528 0.472
#> GSM786549 1 0.8909 0.712 0.692 0.308
#> GSM786550 1 0.9661 0.521 0.608 0.392
#> GSM786563 2 0.0938 0.908 0.012 0.988
#> GSM786570 2 0.0000 0.908 0.000 1.000
#> GSM786576 2 0.0000 0.908 0.000 1.000
#> GSM786577 1 0.0000 0.795 1.000 0.000
#> GSM786578 2 0.0938 0.906 0.012 0.988
#> GSM786582 1 0.2948 0.817 0.948 0.052
#> GSM786495 2 0.6531 0.803 0.168 0.832
#> GSM786505 1 0.3274 0.819 0.940 0.060
#> GSM786511 1 0.0000 0.795 1.000 0.000
#> GSM786513 1 0.5408 0.821 0.876 0.124
#> GSM786525 1 0.9881 0.423 0.564 0.436
#> GSM786540 2 0.0672 0.908 0.008 0.992
#> GSM786553 1 0.4431 0.822 0.908 0.092
#> GSM786561 1 0.0000 0.795 1.000 0.000
#> GSM786575 1 0.8555 0.685 0.720 0.280
#> GSM786494 1 0.8608 0.684 0.716 0.284
#> GSM786504 1 0.5408 0.821 0.876 0.124
#> GSM786510 2 0.6973 0.777 0.188 0.812
#> GSM786514 1 0.5059 0.822 0.888 0.112
#> GSM786516 1 0.8861 0.716 0.696 0.304
#> GSM786520 1 0.2603 0.815 0.956 0.044
#> GSM786521 1 0.9661 0.521 0.608 0.392
#> GSM786536 1 0.5842 0.817 0.860 0.140
#> GSM786542 2 0.6148 0.784 0.152 0.848
#> GSM786546 2 0.4562 0.858 0.096 0.904
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786539 2 0.3038 0.852 0.104 0.896 0.000
#> GSM786541 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786556 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786523 1 0.7076 0.672 0.684 0.256 0.060
#> GSM786497 3 0.5098 0.978 0.248 0.000 0.752
#> GSM786501 2 0.4452 0.772 0.192 0.808 0.000
#> GSM786517 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786534 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786555 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786559 2 0.0747 0.889 0.016 0.984 0.000
#> GSM786565 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786579 2 0.0592 0.889 0.012 0.988 0.000
#> GSM786491 1 0.5843 0.626 0.732 0.252 0.016
#> GSM786509 1 0.2878 0.585 0.904 0.000 0.096
#> GSM786538 1 0.0829 0.645 0.984 0.004 0.012
#> GSM786548 2 0.1031 0.887 0.024 0.976 0.000
#> GSM786562 1 0.2384 0.685 0.936 0.056 0.008
#> GSM786566 1 0.2955 0.690 0.912 0.080 0.008
#> GSM786573 1 0.8142 0.635 0.620 0.268 0.112
#> GSM786574 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786580 1 0.9532 0.435 0.488 0.268 0.244
#> GSM786581 2 0.4974 0.699 0.236 0.764 0.000
#> GSM786583 1 0.7491 0.612 0.620 0.324 0.056
#> GSM786492 3 0.5058 0.981 0.244 0.000 0.756
#> GSM786493 2 0.3340 0.840 0.120 0.880 0.000
#> GSM786499 2 0.4504 0.768 0.196 0.804 0.000
#> GSM786502 1 0.4974 0.661 0.764 0.236 0.000
#> GSM786537 3 0.5058 0.981 0.244 0.000 0.756
#> GSM786567 2 0.2066 0.873 0.060 0.940 0.000
#> GSM786498 1 0.3695 0.690 0.880 0.108 0.012
#> GSM786500 3 0.5058 0.981 0.244 0.000 0.756
#> GSM786503 1 0.0592 0.658 0.988 0.012 0.000
#> GSM786507 2 0.4555 0.765 0.200 0.800 0.000
#> GSM786515 2 0.3340 0.840 0.120 0.880 0.000
#> GSM786522 1 0.3377 0.603 0.896 0.012 0.092
#> GSM786526 1 0.2845 0.689 0.920 0.068 0.012
#> GSM786528 1 0.2845 0.689 0.920 0.068 0.012
#> GSM786531 1 0.6888 0.448 0.552 0.432 0.016
#> GSM786535 2 0.3482 0.822 0.128 0.872 0.000
#> GSM786543 3 0.5591 0.909 0.304 0.000 0.696
#> GSM786545 1 0.7849 0.656 0.648 0.248 0.104
#> GSM786551 1 0.7021 0.668 0.708 0.216 0.076
#> GSM786552 2 0.4504 0.721 0.196 0.804 0.000
#> GSM786554 2 0.4605 0.758 0.204 0.796 0.000
#> GSM786557 1 0.0829 0.644 0.984 0.004 0.012
#> GSM786560 1 0.3879 0.562 0.848 0.000 0.152
#> GSM786564 2 0.0237 0.891 0.004 0.996 0.000
#> GSM786568 1 0.7348 0.593 0.608 0.348 0.044
#> GSM786569 1 0.6307 -0.410 0.512 0.000 0.488
#> GSM786571 1 0.7722 0.409 0.520 0.432 0.048
#> GSM786496 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786506 1 0.0661 0.647 0.988 0.004 0.008
#> GSM786508 1 0.6769 0.596 0.652 0.320 0.028
#> GSM786512 1 0.6379 0.519 0.624 0.368 0.008
#> GSM786518 3 0.5058 0.981 0.244 0.000 0.756
#> GSM786519 1 0.6819 0.203 0.644 0.028 0.328
#> GSM786524 1 0.8869 0.206 0.496 0.124 0.380
#> GSM786529 1 0.7467 0.618 0.624 0.320 0.056
#> GSM786530 1 0.9254 0.366 0.496 0.172 0.332
#> GSM786532 1 0.3649 0.686 0.896 0.068 0.036
#> GSM786533 2 0.6298 0.253 0.388 0.608 0.004
#> GSM786544 1 0.7040 0.673 0.688 0.252 0.060
#> GSM786547 1 0.6888 0.448 0.552 0.432 0.016
#> GSM786549 1 0.7076 0.672 0.684 0.256 0.060
#> GSM786550 1 0.9532 0.435 0.488 0.268 0.244
#> GSM786563 2 0.1031 0.887 0.024 0.976 0.000
#> GSM786570 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.891 0.000 1.000 0.000
#> GSM786577 3 0.5058 0.981 0.244 0.000 0.756
#> GSM786578 2 0.0592 0.889 0.012 0.988 0.000
#> GSM786582 1 0.2945 0.600 0.908 0.004 0.088
#> GSM786495 2 0.4504 0.768 0.196 0.804 0.000
#> GSM786505 1 0.0661 0.647 0.988 0.004 0.008
#> GSM786511 3 0.5058 0.981 0.244 0.000 0.756
#> GSM786513 1 0.3623 0.688 0.896 0.072 0.032
#> GSM786525 1 0.6095 0.431 0.608 0.392 0.000
#> GSM786540 2 0.0424 0.890 0.008 0.992 0.000
#> GSM786553 1 0.1163 0.670 0.972 0.028 0.000
#> GSM786561 3 0.5397 0.948 0.280 0.000 0.720
#> GSM786575 1 0.5803 0.624 0.736 0.248 0.016
#> GSM786494 1 0.5843 0.626 0.732 0.252 0.016
#> GSM786504 1 0.3623 0.688 0.896 0.072 0.032
#> GSM786510 2 0.4750 0.741 0.216 0.784 0.000
#> GSM786514 1 0.2743 0.683 0.928 0.052 0.020
#> GSM786516 1 0.7040 0.673 0.688 0.252 0.060
#> GSM786520 1 0.1411 0.630 0.964 0.000 0.036
#> GSM786521 1 0.9532 0.435 0.488 0.268 0.244
#> GSM786536 1 0.3183 0.693 0.908 0.076 0.016
#> GSM786542 2 0.4291 0.745 0.180 0.820 0.000
#> GSM786546 2 0.3482 0.822 0.128 0.872 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786539 2 0.2530 0.8501 0.112 0.888 0.000 0.000
#> GSM786541 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786556 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786523 1 0.7740 0.6264 0.620 0.164 0.100 0.116
#> GSM786497 4 0.0188 0.8287 0.004 0.000 0.000 0.996
#> GSM786501 2 0.3610 0.7823 0.200 0.800 0.000 0.000
#> GSM786517 2 0.0188 0.8837 0.004 0.996 0.000 0.000
#> GSM786534 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786555 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786559 2 0.0937 0.8803 0.012 0.976 0.012 0.000
#> GSM786565 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786579 2 0.0804 0.8804 0.008 0.980 0.012 0.000
#> GSM786491 3 0.5236 0.5289 0.432 0.000 0.560 0.008
#> GSM786509 1 0.3498 0.6071 0.832 0.000 0.008 0.160
#> GSM786538 1 0.0804 0.6474 0.980 0.000 0.008 0.012
#> GSM786548 2 0.1022 0.8813 0.032 0.968 0.000 0.000
#> GSM786562 1 0.1962 0.6745 0.944 0.024 0.024 0.008
#> GSM786566 1 0.2587 0.6742 0.916 0.056 0.020 0.008
#> GSM786573 1 0.8033 0.5838 0.548 0.224 0.044 0.184
#> GSM786574 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786580 3 0.0000 0.6192 0.000 0.000 1.000 0.000
#> GSM786581 2 0.4295 0.7045 0.240 0.752 0.008 0.000
#> GSM786583 1 0.8182 0.5847 0.560 0.232 0.100 0.108
#> GSM786492 4 0.0000 0.8303 0.000 0.000 0.000 1.000
#> GSM786493 2 0.2760 0.8396 0.128 0.872 0.000 0.000
#> GSM786499 2 0.3649 0.7784 0.204 0.796 0.000 0.000
#> GSM786502 1 0.4303 0.5650 0.768 0.220 0.004 0.008
#> GSM786537 4 0.0000 0.8303 0.000 0.000 0.000 1.000
#> GSM786567 2 0.1792 0.8696 0.068 0.932 0.000 0.000
#> GSM786498 1 0.3398 0.6650 0.880 0.080 0.020 0.020
#> GSM786500 4 0.0000 0.8303 0.000 0.000 0.000 1.000
#> GSM786503 1 0.0804 0.6588 0.980 0.008 0.012 0.000
#> GSM786507 2 0.3688 0.7759 0.208 0.792 0.000 0.000
#> GSM786515 2 0.2760 0.8396 0.128 0.872 0.000 0.000
#> GSM786522 1 0.3360 0.6296 0.860 0.008 0.008 0.124
#> GSM786526 1 0.2750 0.6928 0.908 0.056 0.004 0.032
#> GSM786528 1 0.2750 0.6928 0.908 0.056 0.004 0.032
#> GSM786531 1 0.8020 0.4979 0.496 0.348 0.088 0.068
#> GSM786535 2 0.3552 0.8058 0.128 0.848 0.024 0.000
#> GSM786543 4 0.2760 0.7272 0.128 0.000 0.000 0.872
#> GSM786545 1 0.8034 0.6101 0.580 0.180 0.072 0.168
#> GSM786551 1 0.7121 0.6334 0.640 0.180 0.032 0.148
#> GSM786552 2 0.5371 0.6388 0.188 0.732 0.080 0.000
#> GSM786554 2 0.3726 0.7701 0.212 0.788 0.000 0.000
#> GSM786557 1 0.1042 0.6475 0.972 0.000 0.008 0.020
#> GSM786560 1 0.3893 0.5920 0.796 0.000 0.008 0.196
#> GSM786564 2 0.0188 0.8832 0.004 0.996 0.000 0.000
#> GSM786568 1 0.8227 0.5715 0.544 0.256 0.100 0.100
#> GSM786569 4 0.4730 0.3692 0.364 0.000 0.000 0.636
#> GSM786571 1 0.8288 0.4866 0.484 0.336 0.104 0.076
#> GSM786496 2 0.0188 0.8837 0.004 0.996 0.000 0.000
#> GSM786506 1 0.0672 0.6483 0.984 0.000 0.008 0.008
#> GSM786508 1 0.6859 0.5544 0.644 0.228 0.100 0.028
#> GSM786512 1 0.6538 0.5051 0.620 0.284 0.088 0.008
#> GSM786518 4 0.0000 0.8303 0.000 0.000 0.000 1.000
#> GSM786519 1 0.5937 0.0573 0.492 0.000 0.036 0.472
#> GSM786524 4 0.6960 -0.2145 0.420 0.112 0.000 0.468
#> GSM786529 1 0.8203 0.5852 0.560 0.228 0.100 0.112
#> GSM786530 1 0.7367 0.3136 0.436 0.160 0.000 0.404
#> GSM786532 1 0.3218 0.6808 0.896 0.028 0.032 0.044
#> GSM786533 2 0.6916 0.1129 0.380 0.524 0.088 0.008
#> GSM786544 1 0.7701 0.6279 0.624 0.160 0.100 0.116
#> GSM786547 1 0.8020 0.4979 0.496 0.348 0.088 0.068
#> GSM786549 1 0.7740 0.6266 0.620 0.164 0.100 0.116
#> GSM786550 3 0.0000 0.6192 0.000 0.000 1.000 0.000
#> GSM786563 2 0.1022 0.8813 0.032 0.968 0.000 0.000
#> GSM786570 2 0.0000 0.8831 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0188 0.8837 0.004 0.996 0.000 0.000
#> GSM786577 4 0.0188 0.8284 0.004 0.000 0.000 0.996
#> GSM786578 2 0.1284 0.8756 0.012 0.964 0.024 0.000
#> GSM786582 1 0.3196 0.6192 0.856 0.000 0.008 0.136
#> GSM786495 2 0.3649 0.7784 0.204 0.796 0.000 0.000
#> GSM786505 1 0.0672 0.6483 0.984 0.000 0.008 0.008
#> GSM786511 4 0.0000 0.8303 0.000 0.000 0.000 1.000
#> GSM786513 1 0.3228 0.6820 0.896 0.032 0.032 0.040
#> GSM786525 1 0.4964 0.3942 0.616 0.380 0.004 0.000
#> GSM786540 2 0.0657 0.8810 0.004 0.984 0.012 0.000
#> GSM786553 1 0.1284 0.6708 0.964 0.024 0.012 0.000
#> GSM786561 4 0.1637 0.7936 0.060 0.000 0.000 0.940
#> GSM786575 3 0.5229 0.5366 0.428 0.000 0.564 0.008
#> GSM786494 3 0.5444 0.5339 0.424 0.000 0.560 0.016
#> GSM786504 1 0.3228 0.6820 0.896 0.032 0.032 0.040
#> GSM786510 2 0.3837 0.7553 0.224 0.776 0.000 0.000
#> GSM786514 1 0.2364 0.6879 0.928 0.036 0.008 0.028
#> GSM786516 1 0.7701 0.6279 0.624 0.160 0.100 0.116
#> GSM786520 1 0.2342 0.6418 0.912 0.000 0.008 0.080
#> GSM786521 3 0.0000 0.6192 0.000 0.000 1.000 0.000
#> GSM786536 1 0.3240 0.6928 0.892 0.056 0.016 0.036
#> GSM786542 2 0.4864 0.6960 0.172 0.768 0.060 0.000
#> GSM786546 2 0.3552 0.8058 0.128 0.848 0.024 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0000 0.87358 0.000 1.000 0.000 0.000 0.000
#> GSM786539 2 0.2677 0.83521 0.016 0.872 0.112 0.000 0.000
#> GSM786541 2 0.0162 0.87331 0.000 0.996 0.004 0.000 0.000
#> GSM786556 2 0.0162 0.87331 0.000 0.996 0.004 0.000 0.000
#> GSM786523 3 0.2060 0.73277 0.052 0.016 0.924 0.008 0.000
#> GSM786497 4 0.0451 0.85016 0.000 0.000 0.008 0.988 0.004
#> GSM786501 2 0.4262 0.76494 0.100 0.776 0.124 0.000 0.000
#> GSM786517 2 0.0162 0.87459 0.000 0.996 0.004 0.000 0.000
#> GSM786534 2 0.0162 0.87331 0.000 0.996 0.004 0.000 0.000
#> GSM786555 2 0.0162 0.87331 0.000 0.996 0.004 0.000 0.000
#> GSM786558 2 0.0162 0.87331 0.000 0.996 0.004 0.000 0.000
#> GSM786559 2 0.0703 0.87002 0.000 0.976 0.024 0.000 0.000
#> GSM786565 2 0.0162 0.87331 0.000 0.996 0.004 0.000 0.000
#> GSM786572 2 0.0000 0.87358 0.000 1.000 0.000 0.000 0.000
#> GSM786579 2 0.0609 0.87052 0.000 0.980 0.020 0.000 0.000
#> GSM786491 5 0.4420 0.51818 0.448 0.000 0.004 0.000 0.548
#> GSM786509 1 0.3578 0.61523 0.820 0.000 0.048 0.132 0.000
#> GSM786538 1 0.0162 0.66499 0.996 0.000 0.000 0.004 0.000
#> GSM786548 2 0.1671 0.85168 0.000 0.924 0.076 0.000 0.000
#> GSM786562 1 0.3905 0.64477 0.752 0.012 0.232 0.004 0.000
#> GSM786566 1 0.4518 0.63246 0.732 0.048 0.216 0.004 0.000
#> GSM786573 3 0.3791 0.72397 0.028 0.060 0.844 0.064 0.004
#> GSM786574 2 0.0404 0.87472 0.000 0.988 0.012 0.000 0.000
#> GSM786580 5 0.0162 0.65620 0.000 0.000 0.004 0.000 0.996
#> GSM786581 2 0.4712 0.70744 0.100 0.732 0.168 0.000 0.000
#> GSM786583 3 0.2050 0.74848 0.008 0.064 0.920 0.008 0.000
#> GSM786492 4 0.0000 0.85442 0.000 0.000 0.000 1.000 0.000
#> GSM786493 2 0.3051 0.82289 0.028 0.852 0.120 0.000 0.000
#> GSM786499 2 0.4312 0.76135 0.104 0.772 0.124 0.000 0.000
#> GSM786502 1 0.6658 0.28019 0.496 0.208 0.288 0.008 0.000
#> GSM786537 4 0.0000 0.85442 0.000 0.000 0.000 1.000 0.000
#> GSM786567 2 0.1851 0.85369 0.000 0.912 0.088 0.000 0.000
#> GSM786498 1 0.5829 0.47454 0.584 0.068 0.332 0.012 0.004
#> GSM786500 4 0.0000 0.85442 0.000 0.000 0.000 1.000 0.000
#> GSM786503 1 0.2068 0.68969 0.904 0.004 0.092 0.000 0.000
#> GSM786507 2 0.4351 0.75983 0.100 0.768 0.132 0.000 0.000
#> GSM786515 2 0.3051 0.82289 0.028 0.852 0.120 0.000 0.000
#> GSM786522 1 0.3269 0.64578 0.848 0.000 0.056 0.096 0.000
#> GSM786526 1 0.4397 0.40395 0.564 0.004 0.432 0.000 0.000
#> GSM786528 1 0.4397 0.40395 0.564 0.004 0.432 0.000 0.000
#> GSM786531 3 0.3209 0.70239 0.008 0.180 0.812 0.000 0.000
#> GSM786535 2 0.3715 0.67047 0.000 0.736 0.260 0.000 0.004
#> GSM786543 4 0.3073 0.75478 0.116 0.000 0.024 0.856 0.004
#> GSM786545 3 0.2966 0.72776 0.032 0.020 0.888 0.056 0.004
#> GSM786551 3 0.4292 0.63024 0.144 0.020 0.788 0.048 0.000
#> GSM786552 2 0.4138 0.40994 0.000 0.616 0.384 0.000 0.000
#> GSM786554 2 0.4401 0.75379 0.104 0.764 0.132 0.000 0.000
#> GSM786557 1 0.0404 0.66520 0.988 0.000 0.000 0.012 0.000
#> GSM786560 1 0.3160 0.55207 0.808 0.000 0.004 0.188 0.000
#> GSM786564 2 0.0162 0.87355 0.000 0.996 0.004 0.000 0.000
#> GSM786568 3 0.2464 0.74571 0.016 0.096 0.888 0.000 0.000
#> GSM786569 4 0.4444 0.40105 0.364 0.000 0.012 0.624 0.000
#> GSM786571 3 0.3450 0.69883 0.000 0.176 0.808 0.008 0.008
#> GSM786496 2 0.0162 0.87459 0.000 0.996 0.004 0.000 0.000
#> GSM786506 1 0.0404 0.66749 0.988 0.000 0.012 0.000 0.000
#> GSM786508 3 0.6268 0.30880 0.260 0.204 0.536 0.000 0.000
#> GSM786512 3 0.6541 0.27401 0.260 0.260 0.480 0.000 0.000
#> GSM786518 4 0.0000 0.85442 0.000 0.000 0.000 1.000 0.000
#> GSM786519 4 0.6787 0.16925 0.240 0.000 0.324 0.432 0.004
#> GSM786524 3 0.6566 0.00673 0.204 0.000 0.416 0.380 0.000
#> GSM786529 3 0.1983 0.74781 0.008 0.060 0.924 0.008 0.000
#> GSM786530 3 0.4886 0.47788 0.028 0.008 0.672 0.288 0.004
#> GSM786532 1 0.3427 0.68984 0.836 0.000 0.128 0.028 0.008
#> GSM786533 3 0.5631 0.13495 0.076 0.424 0.500 0.000 0.000
#> GSM786544 3 0.2131 0.73083 0.056 0.016 0.920 0.008 0.000
#> GSM786547 3 0.3209 0.70239 0.008 0.180 0.812 0.000 0.000
#> GSM786549 3 0.2060 0.73329 0.052 0.016 0.924 0.008 0.000
#> GSM786550 5 0.0162 0.65620 0.000 0.000 0.004 0.000 0.996
#> GSM786563 2 0.1671 0.85168 0.000 0.924 0.076 0.000 0.000
#> GSM786570 2 0.0000 0.87358 0.000 1.000 0.000 0.000 0.000
#> GSM786576 2 0.0162 0.87459 0.000 0.996 0.004 0.000 0.000
#> GSM786577 4 0.0510 0.84670 0.000 0.000 0.016 0.984 0.000
#> GSM786578 2 0.1557 0.85751 0.000 0.940 0.052 0.000 0.008
#> GSM786582 1 0.3359 0.63593 0.840 0.000 0.052 0.108 0.000
#> GSM786495 2 0.4312 0.76135 0.104 0.772 0.124 0.000 0.000
#> GSM786505 1 0.0162 0.66631 0.996 0.000 0.004 0.000 0.000
#> GSM786511 4 0.0000 0.85442 0.000 0.000 0.000 1.000 0.000
#> GSM786513 1 0.3477 0.68730 0.828 0.000 0.140 0.024 0.008
#> GSM786525 1 0.6637 0.10354 0.424 0.348 0.228 0.000 0.000
#> GSM786540 2 0.0609 0.87165 0.000 0.980 0.020 0.000 0.000
#> GSM786553 1 0.2233 0.69386 0.892 0.004 0.104 0.000 0.000
#> GSM786561 4 0.1885 0.82305 0.044 0.000 0.020 0.932 0.004
#> GSM786575 5 0.4415 0.52525 0.444 0.000 0.004 0.000 0.552
#> GSM786494 5 0.4670 0.52450 0.440 0.000 0.004 0.008 0.548
#> GSM786504 1 0.3477 0.68730 0.828 0.000 0.140 0.024 0.008
#> GSM786510 2 0.4535 0.74020 0.108 0.752 0.140 0.000 0.000
#> GSM786514 1 0.3968 0.63312 0.716 0.000 0.276 0.004 0.004
#> GSM786516 3 0.2131 0.73083 0.056 0.016 0.920 0.008 0.000
#> GSM786520 1 0.1768 0.64362 0.924 0.000 0.004 0.072 0.000
#> GSM786521 5 0.0162 0.65620 0.000 0.000 0.004 0.000 0.996
#> GSM786536 1 0.4572 0.36076 0.540 0.004 0.452 0.000 0.004
#> GSM786542 2 0.3999 0.50355 0.000 0.656 0.344 0.000 0.000
#> GSM786546 2 0.3715 0.67047 0.000 0.736 0.260 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.0260 0.8196 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM786539 2 0.2890 0.7769 0.004 0.844 0.024 0.000 0.000 0.128
#> GSM786541 2 0.1584 0.8063 0.000 0.928 0.008 0.000 0.000 0.064
#> GSM786556 2 0.1524 0.8058 0.000 0.932 0.008 0.000 0.000 0.060
#> GSM786523 3 0.1633 0.7374 0.024 0.000 0.932 0.000 0.000 0.044
#> GSM786497 4 0.0508 0.8614 0.000 0.000 0.004 0.984 0.000 0.012
#> GSM786501 2 0.3539 0.7033 0.000 0.756 0.024 0.000 0.000 0.220
#> GSM786517 2 0.0405 0.8211 0.000 0.988 0.004 0.000 0.000 0.008
#> GSM786534 2 0.1584 0.8063 0.000 0.928 0.008 0.000 0.000 0.064
#> GSM786555 2 0.1524 0.8058 0.000 0.932 0.008 0.000 0.000 0.060
#> GSM786558 2 0.1462 0.8074 0.000 0.936 0.008 0.000 0.000 0.056
#> GSM786559 2 0.1003 0.8204 0.000 0.964 0.020 0.000 0.000 0.016
#> GSM786565 2 0.0547 0.8172 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM786572 2 0.0260 0.8203 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM786579 2 0.0909 0.8205 0.000 0.968 0.020 0.000 0.000 0.012
#> GSM786491 5 0.4366 0.5310 0.428 0.000 0.000 0.000 0.548 0.024
#> GSM786509 1 0.3751 0.5945 0.792 0.000 0.004 0.108 0.000 0.096
#> GSM786538 1 0.0858 0.6453 0.968 0.000 0.004 0.000 0.000 0.028
#> GSM786548 2 0.2527 0.7838 0.000 0.876 0.084 0.000 0.000 0.040
#> GSM786562 6 0.4925 0.0389 0.440 0.004 0.052 0.000 0.000 0.504
#> GSM786566 6 0.5372 0.1910 0.400 0.032 0.048 0.000 0.000 0.520
#> GSM786573 3 0.4192 0.6930 0.012 0.032 0.788 0.048 0.000 0.120
#> GSM786574 2 0.0632 0.8207 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM786580 5 0.0000 0.6571 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786581 2 0.4448 0.6277 0.016 0.692 0.040 0.000 0.000 0.252
#> GSM786583 3 0.1092 0.7422 0.000 0.020 0.960 0.000 0.000 0.020
#> GSM786492 4 0.0000 0.8662 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786493 2 0.3091 0.7640 0.004 0.824 0.024 0.000 0.000 0.148
#> GSM786499 2 0.3566 0.7000 0.000 0.752 0.024 0.000 0.000 0.224
#> GSM786502 6 0.5951 0.5052 0.144 0.196 0.040 0.008 0.000 0.612
#> GSM786537 4 0.0000 0.8662 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786567 2 0.2170 0.7961 0.000 0.888 0.012 0.000 0.000 0.100
#> GSM786498 6 0.5074 0.4711 0.196 0.044 0.056 0.008 0.000 0.696
#> GSM786500 4 0.0000 0.8662 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786503 1 0.4245 0.3954 0.644 0.004 0.024 0.000 0.000 0.328
#> GSM786507 2 0.3619 0.6979 0.000 0.744 0.024 0.000 0.000 0.232
#> GSM786515 2 0.3091 0.7640 0.004 0.824 0.024 0.000 0.000 0.148
#> GSM786522 1 0.3469 0.6219 0.824 0.000 0.012 0.072 0.000 0.092
#> GSM786526 1 0.6054 0.1787 0.392 0.000 0.348 0.000 0.000 0.260
#> GSM786528 1 0.6054 0.1787 0.392 0.000 0.348 0.000 0.000 0.260
#> GSM786531 3 0.2901 0.6587 0.000 0.128 0.840 0.000 0.000 0.032
#> GSM786535 2 0.4351 0.5667 0.000 0.676 0.276 0.000 0.004 0.044
#> GSM786543 4 0.3019 0.7806 0.092 0.000 0.020 0.856 0.000 0.032
#> GSM786545 3 0.2452 0.7286 0.008 0.000 0.892 0.044 0.000 0.056
#> GSM786551 3 0.4819 0.6176 0.100 0.008 0.736 0.032 0.000 0.124
#> GSM786552 2 0.4531 0.3209 0.000 0.556 0.408 0.000 0.000 0.036
#> GSM786554 2 0.3668 0.6928 0.000 0.744 0.028 0.000 0.000 0.228
#> GSM786557 1 0.1225 0.6428 0.952 0.000 0.000 0.012 0.000 0.036
#> GSM786560 1 0.3488 0.5559 0.780 0.000 0.000 0.184 0.000 0.036
#> GSM786564 2 0.0632 0.8199 0.000 0.976 0.000 0.000 0.000 0.024
#> GSM786568 3 0.1972 0.7334 0.004 0.056 0.916 0.000 0.000 0.024
#> GSM786569 4 0.4601 0.3954 0.336 0.000 0.004 0.616 0.000 0.044
#> GSM786571 3 0.3183 0.6379 0.000 0.128 0.828 0.000 0.004 0.040
#> GSM786496 2 0.0405 0.8211 0.000 0.988 0.004 0.000 0.000 0.008
#> GSM786506 1 0.2416 0.6145 0.844 0.000 0.000 0.000 0.000 0.156
#> GSM786508 6 0.6652 0.3125 0.048 0.184 0.372 0.000 0.000 0.396
#> GSM786512 6 0.6798 0.3416 0.048 0.236 0.320 0.000 0.000 0.396
#> GSM786518 4 0.0000 0.8662 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786519 4 0.7159 0.1631 0.116 0.000 0.260 0.428 0.000 0.196
#> GSM786524 3 0.7109 0.0166 0.172 0.000 0.368 0.356 0.000 0.104
#> GSM786529 3 0.1003 0.7423 0.000 0.020 0.964 0.000 0.000 0.016
#> GSM786530 3 0.5052 0.4999 0.012 0.000 0.632 0.272 0.000 0.084
#> GSM786532 1 0.4095 0.6212 0.780 0.000 0.112 0.012 0.004 0.092
#> GSM786533 3 0.5860 0.0438 0.012 0.356 0.488 0.000 0.000 0.144
#> GSM786544 3 0.1633 0.7362 0.024 0.000 0.932 0.000 0.000 0.044
#> GSM786547 3 0.2901 0.6587 0.000 0.128 0.840 0.000 0.000 0.032
#> GSM786549 3 0.1480 0.7386 0.020 0.000 0.940 0.000 0.000 0.040
#> GSM786550 5 0.0000 0.6571 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786563 2 0.2527 0.7838 0.000 0.876 0.084 0.000 0.000 0.040
#> GSM786570 2 0.0146 0.8194 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM786576 2 0.0405 0.8211 0.000 0.988 0.004 0.000 0.000 0.008
#> GSM786577 4 0.0858 0.8506 0.004 0.000 0.000 0.968 0.000 0.028
#> GSM786578 2 0.1867 0.8071 0.000 0.924 0.036 0.000 0.004 0.036
#> GSM786582 1 0.3685 0.5960 0.796 0.000 0.004 0.080 0.000 0.120
#> GSM786495 2 0.3566 0.7000 0.000 0.752 0.024 0.000 0.000 0.224
#> GSM786505 1 0.1556 0.6297 0.920 0.000 0.000 0.000 0.000 0.080
#> GSM786511 4 0.0000 0.8662 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 1 0.3985 0.6199 0.784 0.000 0.120 0.008 0.004 0.084
#> GSM786525 2 0.7267 -0.4012 0.272 0.328 0.092 0.000 0.000 0.308
#> GSM786540 2 0.0909 0.8214 0.000 0.968 0.020 0.000 0.000 0.012
#> GSM786553 1 0.4198 0.5347 0.716 0.004 0.052 0.000 0.000 0.228
#> GSM786561 4 0.1767 0.8393 0.036 0.000 0.012 0.932 0.000 0.020
#> GSM786575 5 0.4361 0.5376 0.424 0.000 0.000 0.000 0.552 0.024
#> GSM786494 5 0.4588 0.5354 0.420 0.000 0.000 0.008 0.548 0.024
#> GSM786504 1 0.3985 0.6199 0.784 0.000 0.120 0.008 0.004 0.084
#> GSM786510 2 0.3930 0.6779 0.004 0.728 0.032 0.000 0.000 0.236
#> GSM786514 1 0.5260 0.4583 0.604 0.000 0.224 0.000 0.000 0.172
#> GSM786516 3 0.1633 0.7362 0.024 0.000 0.932 0.000 0.000 0.044
#> GSM786520 1 0.2009 0.6310 0.908 0.000 0.000 0.068 0.000 0.024
#> GSM786521 5 0.0000 0.6571 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786536 1 0.6075 0.1495 0.372 0.000 0.360 0.000 0.000 0.268
#> GSM786542 2 0.4443 0.4151 0.000 0.596 0.368 0.000 0.000 0.036
#> GSM786546 2 0.4351 0.5667 0.000 0.676 0.276 0.000 0.004 0.044
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 specimen(p) disease.state(p) k
#> CV:hclust 88 0.00194 0.328 2
#> CV:hclust 81 0.05105 0.702 3
#> CV:hclust 84 0.06125 0.794 4
#> CV:hclust 79 0.07807 0.912 5
#> CV:hclust 75 0.09097 0.753 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 54547 rows and 93 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 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.997 0.962 0.983 0.5052 0.495 0.495
#> 3 3 0.594 0.634 0.793 0.2646 0.869 0.740
#> 4 4 0.661 0.798 0.849 0.1314 0.835 0.595
#> 5 5 0.729 0.735 0.825 0.0731 0.964 0.872
#> 6 6 0.711 0.583 0.764 0.0486 0.950 0.801
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
#> GSM786527 2 0.000 0.983 0.000 1.000
#> GSM786539 2 0.000 0.983 0.000 1.000
#> GSM786541 2 0.000 0.983 0.000 1.000
#> GSM786556 2 0.000 0.983 0.000 1.000
#> GSM786523 1 0.311 0.939 0.944 0.056
#> GSM786497 1 0.000 0.981 1.000 0.000
#> GSM786501 2 0.000 0.983 0.000 1.000
#> GSM786517 2 0.000 0.983 0.000 1.000
#> GSM786534 2 0.000 0.983 0.000 1.000
#> GSM786555 2 0.000 0.983 0.000 1.000
#> GSM786558 2 0.000 0.983 0.000 1.000
#> GSM786559 2 0.000 0.983 0.000 1.000
#> GSM786565 2 0.000 0.983 0.000 1.000
#> GSM786572 2 0.000 0.983 0.000 1.000
#> GSM786579 2 0.000 0.983 0.000 1.000
#> GSM786491 1 0.000 0.981 1.000 0.000
#> GSM786509 1 0.000 0.981 1.000 0.000
#> GSM786538 1 0.000 0.981 1.000 0.000
#> GSM786548 2 0.000 0.983 0.000 1.000
#> GSM786562 1 0.000 0.981 1.000 0.000
#> GSM786566 1 0.000 0.981 1.000 0.000
#> GSM786573 2 0.278 0.941 0.048 0.952
#> GSM786574 2 0.000 0.983 0.000 1.000
#> GSM786580 1 0.886 0.565 0.696 0.304
#> GSM786581 2 0.000 0.983 0.000 1.000
#> GSM786583 1 0.343 0.931 0.936 0.064
#> GSM786492 1 0.000 0.981 1.000 0.000
#> GSM786493 2 0.000 0.983 0.000 1.000
#> GSM786499 2 0.000 0.983 0.000 1.000
#> GSM786502 2 0.311 0.933 0.056 0.944
#> GSM786537 1 0.000 0.981 1.000 0.000
#> GSM786567 2 0.000 0.983 0.000 1.000
#> GSM786498 1 0.000 0.981 1.000 0.000
#> GSM786500 1 0.000 0.981 1.000 0.000
#> GSM786503 1 0.000 0.981 1.000 0.000
#> GSM786507 2 0.000 0.983 0.000 1.000
#> GSM786515 2 0.000 0.983 0.000 1.000
#> GSM786522 1 0.000 0.981 1.000 0.000
#> GSM786526 1 0.000 0.981 1.000 0.000
#> GSM786528 1 0.000 0.981 1.000 0.000
#> GSM786531 2 0.260 0.945 0.044 0.956
#> GSM786535 2 0.000 0.983 0.000 1.000
#> GSM786543 1 0.000 0.981 1.000 0.000
#> GSM786545 1 0.327 0.935 0.940 0.060
#> GSM786551 1 0.000 0.981 1.000 0.000
#> GSM786552 2 0.000 0.983 0.000 1.000
#> GSM786554 2 0.000 0.983 0.000 1.000
#> GSM786557 1 0.000 0.981 1.000 0.000
#> GSM786560 1 0.000 0.981 1.000 0.000
#> GSM786564 2 0.000 0.983 0.000 1.000
#> GSM786568 2 0.000 0.983 0.000 1.000
#> GSM786569 1 0.000 0.981 1.000 0.000
#> GSM786571 2 0.980 0.282 0.416 0.584
#> GSM786496 2 0.000 0.983 0.000 1.000
#> GSM786506 1 0.000 0.981 1.000 0.000
#> GSM786508 2 0.118 0.970 0.016 0.984
#> GSM786512 2 0.000 0.983 0.000 1.000
#> GSM786518 1 0.000 0.981 1.000 0.000
#> GSM786519 1 0.000 0.981 1.000 0.000
#> GSM786524 1 0.000 0.981 1.000 0.000
#> GSM786529 2 0.000 0.983 0.000 1.000
#> GSM786530 1 0.000 0.981 1.000 0.000
#> GSM786532 1 0.000 0.981 1.000 0.000
#> GSM786533 2 0.000 0.983 0.000 1.000
#> GSM786544 1 0.327 0.935 0.940 0.060
#> GSM786547 2 0.000 0.983 0.000 1.000
#> GSM786549 1 0.311 0.939 0.944 0.056
#> GSM786550 2 0.634 0.803 0.160 0.840
#> GSM786563 2 0.000 0.983 0.000 1.000
#> GSM786570 2 0.000 0.983 0.000 1.000
#> GSM786576 2 0.000 0.983 0.000 1.000
#> GSM786577 1 0.000 0.981 1.000 0.000
#> GSM786578 2 0.000 0.983 0.000 1.000
#> GSM786582 1 0.000 0.981 1.000 0.000
#> GSM786495 2 0.000 0.983 0.000 1.000
#> GSM786505 1 0.000 0.981 1.000 0.000
#> GSM786511 1 0.000 0.981 1.000 0.000
#> GSM786513 1 0.000 0.981 1.000 0.000
#> GSM786525 2 0.000 0.983 0.000 1.000
#> GSM786540 2 0.000 0.983 0.000 1.000
#> GSM786553 1 0.000 0.981 1.000 0.000
#> GSM786561 1 0.000 0.981 1.000 0.000
#> GSM786575 1 0.000 0.981 1.000 0.000
#> GSM786494 1 0.000 0.981 1.000 0.000
#> GSM786504 1 0.000 0.981 1.000 0.000
#> GSM786510 2 0.000 0.983 0.000 1.000
#> GSM786514 1 0.000 0.981 1.000 0.000
#> GSM786516 1 0.000 0.981 1.000 0.000
#> GSM786520 1 0.000 0.981 1.000 0.000
#> GSM786521 1 0.634 0.810 0.840 0.160
#> GSM786536 1 0.327 0.935 0.940 0.060
#> GSM786542 2 0.000 0.983 0.000 1.000
#> GSM786546 2 0.000 0.983 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786539 2 0.0592 0.8817 0.000 0.988 0.012
#> GSM786541 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786556 2 0.1031 0.8764 0.000 0.976 0.024
#> GSM786523 3 0.6357 0.4622 0.336 0.012 0.652
#> GSM786497 1 0.6244 0.5949 0.560 0.000 0.440
#> GSM786501 2 0.0592 0.8817 0.000 0.988 0.012
#> GSM786517 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786534 2 0.1031 0.8764 0.000 0.976 0.024
#> GSM786555 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786491 1 0.2356 0.6911 0.928 0.000 0.072
#> GSM786509 1 0.5529 0.6523 0.704 0.000 0.296
#> GSM786538 1 0.0237 0.7066 0.996 0.000 0.004
#> GSM786548 2 0.3340 0.7989 0.000 0.880 0.120
#> GSM786562 1 0.1031 0.7026 0.976 0.000 0.024
#> GSM786566 1 0.1031 0.7051 0.976 0.000 0.024
#> GSM786573 3 0.7278 0.2205 0.028 0.456 0.516
#> GSM786574 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786580 1 0.7363 0.1513 0.588 0.040 0.372
#> GSM786581 2 0.1337 0.8734 0.012 0.972 0.016
#> GSM786583 3 0.6341 0.4867 0.312 0.016 0.672
#> GSM786492 1 0.6280 0.5858 0.540 0.000 0.460
#> GSM786493 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786499 2 0.0592 0.8817 0.000 0.988 0.012
#> GSM786502 2 0.3888 0.8076 0.064 0.888 0.048
#> GSM786537 1 0.6280 0.5858 0.540 0.000 0.460
#> GSM786567 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786498 1 0.3528 0.6879 0.892 0.016 0.092
#> GSM786500 1 0.6235 0.5996 0.564 0.000 0.436
#> GSM786503 1 0.1031 0.7026 0.976 0.000 0.024
#> GSM786507 2 0.0592 0.8817 0.000 0.988 0.012
#> GSM786515 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786522 1 0.3116 0.6888 0.892 0.000 0.108
#> GSM786526 1 0.2959 0.6529 0.900 0.000 0.100
#> GSM786528 1 0.3619 0.6041 0.864 0.000 0.136
#> GSM786531 3 0.8425 0.4883 0.100 0.348 0.552
#> GSM786535 2 0.6793 0.0130 0.012 0.536 0.452
#> GSM786543 1 0.6154 0.6033 0.592 0.000 0.408
#> GSM786545 3 0.6019 0.4467 0.288 0.012 0.700
#> GSM786551 1 0.4235 0.6642 0.824 0.000 0.176
#> GSM786552 2 0.6779 0.0465 0.012 0.544 0.444
#> GSM786554 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786557 1 0.1031 0.7114 0.976 0.000 0.024
#> GSM786560 1 0.5397 0.6593 0.720 0.000 0.280
#> GSM786564 2 0.1289 0.8713 0.000 0.968 0.032
#> GSM786568 3 0.8144 0.4335 0.076 0.380 0.544
#> GSM786569 1 0.5988 0.6274 0.632 0.000 0.368
#> GSM786571 3 0.8862 0.6009 0.232 0.192 0.576
#> GSM786496 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786506 1 0.0892 0.7039 0.980 0.000 0.020
#> GSM786508 2 0.6405 0.6466 0.072 0.756 0.172
#> GSM786512 2 0.4897 0.7186 0.016 0.812 0.172
#> GSM786518 1 0.6244 0.5949 0.560 0.000 0.440
#> GSM786519 1 0.6204 0.5962 0.576 0.000 0.424
#> GSM786524 1 0.6267 0.5798 0.548 0.000 0.452
#> GSM786529 3 0.8009 0.3618 0.064 0.412 0.524
#> GSM786530 3 0.5948 -0.3422 0.360 0.000 0.640
#> GSM786532 1 0.2261 0.6767 0.932 0.000 0.068
#> GSM786533 2 0.5988 0.4903 0.008 0.688 0.304
#> GSM786544 3 0.6527 0.4892 0.320 0.020 0.660
#> GSM786547 2 0.7995 -0.2258 0.060 0.480 0.460
#> GSM786549 3 0.6307 0.4768 0.328 0.012 0.660
#> GSM786550 3 0.8362 0.4911 0.300 0.112 0.588
#> GSM786563 2 0.3482 0.7901 0.000 0.872 0.128
#> GSM786570 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.8866 0.000 1.000 0.000
#> GSM786577 1 0.6225 0.5974 0.568 0.000 0.432
#> GSM786578 2 0.4099 0.7704 0.008 0.852 0.140
#> GSM786582 1 0.4842 0.6754 0.776 0.000 0.224
#> GSM786495 2 0.0592 0.8817 0.000 0.988 0.012
#> GSM786505 1 0.1031 0.7114 0.976 0.000 0.024
#> GSM786511 1 0.6244 0.5949 0.560 0.000 0.440
#> GSM786513 1 0.2356 0.6770 0.928 0.000 0.072
#> GSM786525 2 0.3826 0.7471 0.124 0.868 0.008
#> GSM786540 2 0.1031 0.8764 0.000 0.976 0.024
#> GSM786553 1 0.2448 0.6709 0.924 0.000 0.076
#> GSM786561 1 0.6204 0.5984 0.576 0.000 0.424
#> GSM786575 1 0.3551 0.6507 0.868 0.000 0.132
#> GSM786494 1 0.2356 0.7011 0.928 0.000 0.072
#> GSM786504 1 0.2356 0.6770 0.928 0.000 0.072
#> GSM786510 2 0.0592 0.8817 0.000 0.988 0.012
#> GSM786514 1 0.0424 0.7074 0.992 0.000 0.008
#> GSM786516 1 0.6302 0.0942 0.520 0.000 0.480
#> GSM786520 1 0.1643 0.7118 0.956 0.000 0.044
#> GSM786521 1 0.7192 0.1603 0.588 0.032 0.380
#> GSM786536 1 0.6825 -0.2474 0.500 0.012 0.488
#> GSM786542 2 0.6786 0.0301 0.012 0.540 0.448
#> GSM786546 3 0.8742 0.2964 0.108 0.436 0.456
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0657 0.902 0.000 0.984 0.004 0.012
#> GSM786539 2 0.2911 0.874 0.072 0.900 0.012 0.016
#> GSM786541 2 0.1356 0.899 0.000 0.960 0.008 0.032
#> GSM786556 2 0.1610 0.897 0.000 0.952 0.016 0.032
#> GSM786523 3 0.3725 0.831 0.060 0.004 0.860 0.076
#> GSM786497 4 0.3528 0.902 0.192 0.000 0.000 0.808
#> GSM786501 2 0.2911 0.874 0.072 0.900 0.012 0.016
#> GSM786517 2 0.0000 0.903 0.000 1.000 0.000 0.000
#> GSM786534 2 0.1610 0.897 0.000 0.952 0.016 0.032
#> GSM786555 2 0.1209 0.900 0.000 0.964 0.004 0.032
#> GSM786558 2 0.1209 0.900 0.000 0.964 0.004 0.032
#> GSM786559 2 0.0188 0.903 0.000 0.996 0.000 0.004
#> GSM786565 2 0.1209 0.900 0.000 0.964 0.004 0.032
#> GSM786572 2 0.2179 0.890 0.000 0.924 0.012 0.064
#> GSM786579 2 0.1452 0.899 0.000 0.956 0.008 0.036
#> GSM786491 1 0.4171 0.796 0.824 0.000 0.060 0.116
#> GSM786509 4 0.4981 0.459 0.464 0.000 0.000 0.536
#> GSM786538 1 0.2053 0.818 0.924 0.000 0.004 0.072
#> GSM786548 2 0.4083 0.824 0.000 0.832 0.100 0.068
#> GSM786562 1 0.1362 0.812 0.964 0.004 0.020 0.012
#> GSM786566 1 0.1042 0.810 0.972 0.000 0.008 0.020
#> GSM786573 3 0.3884 0.851 0.008 0.108 0.848 0.036
#> GSM786574 2 0.0921 0.902 0.000 0.972 0.000 0.028
#> GSM786580 1 0.7699 0.356 0.492 0.012 0.328 0.168
#> GSM786581 2 0.3491 0.871 0.044 0.884 0.044 0.028
#> GSM786583 3 0.3721 0.835 0.056 0.008 0.864 0.072
#> GSM786492 4 0.3528 0.902 0.192 0.000 0.000 0.808
#> GSM786493 2 0.1114 0.900 0.008 0.972 0.004 0.016
#> GSM786499 2 0.2911 0.874 0.072 0.900 0.012 0.016
#> GSM786502 2 0.5844 0.782 0.120 0.756 0.068 0.056
#> GSM786537 4 0.3668 0.900 0.188 0.000 0.004 0.808
#> GSM786567 2 0.0188 0.903 0.000 0.996 0.000 0.004
#> GSM786498 1 0.4415 0.677 0.804 0.000 0.140 0.056
#> GSM786500 4 0.3569 0.900 0.196 0.000 0.000 0.804
#> GSM786503 1 0.0188 0.818 0.996 0.000 0.004 0.000
#> GSM786507 2 0.2911 0.874 0.072 0.900 0.012 0.016
#> GSM786515 2 0.1114 0.900 0.008 0.972 0.004 0.016
#> GSM786522 1 0.3323 0.822 0.876 0.000 0.060 0.064
#> GSM786526 1 0.3464 0.818 0.868 0.000 0.076 0.056
#> GSM786528 1 0.3390 0.775 0.852 0.000 0.132 0.016
#> GSM786531 3 0.3863 0.857 0.028 0.072 0.864 0.036
#> GSM786535 3 0.4337 0.822 0.000 0.140 0.808 0.052
#> GSM786543 4 0.3569 0.900 0.196 0.000 0.000 0.804
#> GSM786545 3 0.3993 0.820 0.060 0.004 0.844 0.092
#> GSM786551 1 0.4337 0.768 0.808 0.000 0.140 0.052
#> GSM786552 3 0.3708 0.826 0.000 0.148 0.832 0.020
#> GSM786554 2 0.0000 0.903 0.000 1.000 0.000 0.000
#> GSM786557 1 0.2149 0.810 0.912 0.000 0.000 0.088
#> GSM786560 4 0.4998 0.387 0.488 0.000 0.000 0.512
#> GSM786564 2 0.3883 0.860 0.024 0.864 0.060 0.052
#> GSM786568 3 0.3607 0.857 0.012 0.088 0.868 0.032
#> GSM786569 4 0.4164 0.829 0.264 0.000 0.000 0.736
#> GSM786571 3 0.3686 0.852 0.040 0.044 0.876 0.040
#> GSM786496 2 0.1209 0.900 0.000 0.964 0.004 0.032
#> GSM786506 1 0.0804 0.814 0.980 0.000 0.008 0.012
#> GSM786508 2 0.7381 0.239 0.112 0.508 0.364 0.016
#> GSM786512 2 0.6875 0.322 0.072 0.548 0.364 0.016
#> GSM786518 4 0.3528 0.902 0.192 0.000 0.000 0.808
#> GSM786519 4 0.4152 0.871 0.160 0.000 0.032 0.808
#> GSM786524 4 0.4059 0.884 0.200 0.000 0.012 0.788
#> GSM786529 3 0.3328 0.856 0.004 0.100 0.872 0.024
#> GSM786530 4 0.4957 0.630 0.048 0.000 0.204 0.748
#> GSM786532 1 0.3081 0.825 0.888 0.000 0.048 0.064
#> GSM786533 3 0.5161 0.104 0.000 0.476 0.520 0.004
#> GSM786544 3 0.3725 0.831 0.060 0.004 0.860 0.076
#> GSM786547 3 0.2888 0.849 0.004 0.124 0.872 0.000
#> GSM786549 3 0.3725 0.831 0.060 0.004 0.860 0.076
#> GSM786550 3 0.4088 0.711 0.024 0.008 0.824 0.144
#> GSM786563 2 0.4203 0.816 0.000 0.824 0.108 0.068
#> GSM786570 2 0.0707 0.904 0.000 0.980 0.000 0.020
#> GSM786576 2 0.0524 0.902 0.004 0.988 0.008 0.000
#> GSM786577 4 0.3710 0.899 0.192 0.000 0.004 0.804
#> GSM786578 2 0.4534 0.790 0.000 0.800 0.132 0.068
#> GSM786582 1 0.4431 0.410 0.696 0.000 0.000 0.304
#> GSM786495 2 0.2761 0.878 0.064 0.908 0.012 0.016
#> GSM786505 1 0.2149 0.810 0.912 0.000 0.000 0.088
#> GSM786511 4 0.3528 0.902 0.192 0.000 0.000 0.808
#> GSM786513 1 0.3547 0.823 0.864 0.000 0.072 0.064
#> GSM786525 2 0.4854 0.687 0.240 0.736 0.008 0.016
#> GSM786540 2 0.1820 0.895 0.000 0.944 0.020 0.036
#> GSM786553 1 0.1975 0.821 0.936 0.000 0.048 0.016
#> GSM786561 4 0.3528 0.902 0.192 0.000 0.000 0.808
#> GSM786575 1 0.5902 0.693 0.696 0.000 0.120 0.184
#> GSM786494 1 0.4094 0.793 0.828 0.000 0.056 0.116
#> GSM786504 1 0.3547 0.823 0.864 0.000 0.072 0.064
#> GSM786510 2 0.2911 0.874 0.072 0.900 0.012 0.016
#> GSM786514 1 0.2053 0.818 0.924 0.000 0.004 0.072
#> GSM786516 3 0.5564 0.658 0.216 0.000 0.708 0.076
#> GSM786520 1 0.2149 0.810 0.912 0.000 0.000 0.088
#> GSM786521 1 0.7598 0.356 0.492 0.008 0.332 0.168
#> GSM786536 3 0.5398 0.674 0.216 0.004 0.724 0.056
#> GSM786542 3 0.4387 0.818 0.000 0.144 0.804 0.052
#> GSM786546 3 0.3958 0.849 0.016 0.116 0.844 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.1243 0.804 0.004 0.960 0.000 0.008 0.028
#> GSM786539 2 0.3803 0.756 0.044 0.824 0.004 0.008 0.120
#> GSM786541 2 0.3631 0.780 0.000 0.820 0.012 0.024 0.144
#> GSM786556 2 0.3784 0.776 0.000 0.816 0.020 0.024 0.140
#> GSM786523 3 0.1885 0.853 0.020 0.000 0.932 0.004 0.044
#> GSM786497 4 0.1197 0.962 0.048 0.000 0.000 0.952 0.000
#> GSM786501 2 0.3755 0.757 0.044 0.828 0.004 0.008 0.116
#> GSM786517 2 0.0324 0.805 0.004 0.992 0.000 0.004 0.000
#> GSM786534 2 0.3827 0.777 0.000 0.812 0.020 0.024 0.144
#> GSM786555 2 0.3218 0.786 0.000 0.844 0.004 0.024 0.128
#> GSM786558 2 0.3264 0.787 0.000 0.840 0.004 0.024 0.132
#> GSM786559 2 0.1870 0.805 0.004 0.936 0.004 0.016 0.040
#> GSM786565 2 0.3122 0.788 0.000 0.852 0.004 0.024 0.120
#> GSM786572 2 0.4625 0.747 0.000 0.748 0.028 0.032 0.192
#> GSM786579 2 0.4156 0.768 0.000 0.784 0.020 0.028 0.168
#> GSM786491 1 0.4442 0.428 0.688 0.000 0.000 0.028 0.284
#> GSM786509 1 0.4735 0.131 0.524 0.000 0.000 0.460 0.016
#> GSM786538 1 0.1967 0.780 0.932 0.000 0.012 0.036 0.020
#> GSM786548 2 0.6004 0.648 0.000 0.620 0.092 0.028 0.260
#> GSM786562 1 0.1408 0.759 0.948 0.000 0.000 0.008 0.044
#> GSM786566 1 0.3456 0.646 0.824 0.004 0.004 0.016 0.152
#> GSM786573 3 0.2520 0.814 0.000 0.004 0.888 0.012 0.096
#> GSM786574 2 0.2429 0.799 0.000 0.900 0.004 0.020 0.076
#> GSM786580 5 0.5520 0.681 0.248 0.004 0.092 0.004 0.652
#> GSM786581 2 0.4021 0.763 0.016 0.804 0.016 0.012 0.152
#> GSM786583 3 0.0613 0.872 0.008 0.000 0.984 0.004 0.004
#> GSM786492 4 0.1197 0.962 0.048 0.000 0.000 0.952 0.000
#> GSM786493 2 0.1990 0.792 0.004 0.920 0.000 0.008 0.068
#> GSM786499 2 0.3755 0.757 0.044 0.828 0.004 0.008 0.116
#> GSM786502 2 0.6675 0.584 0.068 0.592 0.044 0.024 0.272
#> GSM786537 4 0.1270 0.961 0.052 0.000 0.000 0.948 0.000
#> GSM786567 2 0.1444 0.804 0.000 0.948 0.000 0.012 0.040
#> GSM786498 1 0.5554 0.249 0.636 0.000 0.044 0.032 0.288
#> GSM786500 4 0.1197 0.962 0.048 0.000 0.000 0.952 0.000
#> GSM786503 1 0.1408 0.762 0.948 0.000 0.000 0.008 0.044
#> GSM786507 2 0.3803 0.756 0.044 0.824 0.004 0.008 0.120
#> GSM786515 2 0.1990 0.792 0.004 0.920 0.000 0.008 0.068
#> GSM786522 1 0.2338 0.776 0.916 0.000 0.036 0.032 0.016
#> GSM786526 1 0.3828 0.720 0.832 0.000 0.068 0.020 0.080
#> GSM786528 1 0.3644 0.682 0.824 0.000 0.096 0.000 0.080
#> GSM786531 3 0.0451 0.873 0.008 0.000 0.988 0.004 0.000
#> GSM786535 3 0.3506 0.767 0.000 0.016 0.836 0.024 0.124
#> GSM786543 4 0.1670 0.960 0.052 0.000 0.000 0.936 0.012
#> GSM786545 3 0.1209 0.868 0.012 0.000 0.964 0.012 0.012
#> GSM786551 1 0.4015 0.724 0.828 0.000 0.068 0.048 0.056
#> GSM786552 3 0.2537 0.822 0.000 0.016 0.904 0.024 0.056
#> GSM786554 2 0.0932 0.803 0.004 0.972 0.000 0.004 0.020
#> GSM786557 1 0.2012 0.771 0.920 0.000 0.000 0.060 0.020
#> GSM786560 1 0.4735 0.131 0.524 0.000 0.000 0.460 0.016
#> GSM786564 2 0.5016 0.678 0.004 0.708 0.044 0.016 0.228
#> GSM786568 3 0.0727 0.873 0.004 0.000 0.980 0.004 0.012
#> GSM786569 4 0.3527 0.773 0.192 0.000 0.000 0.792 0.016
#> GSM786571 3 0.0613 0.872 0.004 0.000 0.984 0.004 0.008
#> GSM786496 2 0.3122 0.788 0.000 0.852 0.004 0.024 0.120
#> GSM786506 1 0.1774 0.759 0.932 0.000 0.000 0.016 0.052
#> GSM786508 2 0.7593 0.120 0.068 0.408 0.384 0.008 0.132
#> GSM786512 2 0.7233 0.176 0.044 0.436 0.388 0.008 0.124
#> GSM786518 4 0.1197 0.962 0.048 0.000 0.000 0.952 0.000
#> GSM786519 4 0.2363 0.937 0.052 0.000 0.012 0.912 0.024
#> GSM786524 4 0.1809 0.956 0.060 0.000 0.000 0.928 0.012
#> GSM786529 3 0.0486 0.872 0.004 0.004 0.988 0.000 0.004
#> GSM786530 4 0.2540 0.844 0.024 0.000 0.088 0.888 0.000
#> GSM786532 1 0.2082 0.777 0.928 0.000 0.016 0.032 0.024
#> GSM786533 3 0.5935 0.358 0.004 0.296 0.604 0.016 0.080
#> GSM786544 3 0.1605 0.860 0.012 0.000 0.944 0.004 0.040
#> GSM786547 3 0.0613 0.871 0.004 0.004 0.984 0.000 0.008
#> GSM786549 3 0.1787 0.856 0.016 0.000 0.936 0.004 0.044
#> GSM786550 5 0.4171 0.218 0.000 0.000 0.396 0.000 0.604
#> GSM786563 2 0.5982 0.651 0.000 0.624 0.092 0.028 0.256
#> GSM786570 2 0.2700 0.801 0.000 0.884 0.004 0.024 0.088
#> GSM786576 2 0.0932 0.803 0.004 0.972 0.000 0.004 0.020
#> GSM786577 4 0.1628 0.960 0.056 0.000 0.000 0.936 0.008
#> GSM786578 2 0.6244 0.620 0.000 0.612 0.132 0.028 0.228
#> GSM786582 1 0.3602 0.675 0.796 0.000 0.000 0.180 0.024
#> GSM786495 2 0.3524 0.764 0.032 0.840 0.004 0.008 0.116
#> GSM786505 1 0.2193 0.773 0.912 0.000 0.000 0.060 0.028
#> GSM786511 4 0.1270 0.961 0.052 0.000 0.000 0.948 0.000
#> GSM786513 1 0.3165 0.762 0.876 0.000 0.048 0.032 0.044
#> GSM786525 2 0.5238 0.604 0.192 0.696 0.000 0.008 0.104
#> GSM786540 2 0.4074 0.778 0.000 0.808 0.032 0.032 0.128
#> GSM786553 1 0.1974 0.775 0.932 0.000 0.016 0.016 0.036
#> GSM786561 4 0.1597 0.959 0.048 0.000 0.000 0.940 0.012
#> GSM786575 5 0.4881 0.217 0.460 0.000 0.004 0.016 0.520
#> GSM786494 1 0.4922 0.454 0.684 0.000 0.004 0.056 0.256
#> GSM786504 1 0.3165 0.762 0.876 0.000 0.048 0.032 0.044
#> GSM786510 2 0.3803 0.756 0.044 0.824 0.004 0.008 0.120
#> GSM786514 1 0.3033 0.768 0.876 0.000 0.016 0.032 0.076
#> GSM786516 3 0.4339 0.674 0.136 0.000 0.776 0.004 0.084
#> GSM786520 1 0.2278 0.773 0.908 0.000 0.000 0.060 0.032
#> GSM786521 5 0.5520 0.681 0.248 0.004 0.092 0.004 0.652
#> GSM786536 3 0.4181 0.687 0.132 0.000 0.788 0.004 0.076
#> GSM786542 3 0.3506 0.767 0.000 0.016 0.836 0.024 0.124
#> GSM786546 3 0.2116 0.857 0.012 0.004 0.924 0.008 0.052
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.3126 0.36976 0.000 0.248 0.000 0.000 0.000 0.752
#> GSM786539 6 0.0551 0.51051 0.000 0.004 0.000 0.004 0.008 0.984
#> GSM786541 6 0.5111 -0.00133 0.004 0.452 0.000 0.016 0.036 0.492
#> GSM786556 6 0.5222 -0.04592 0.004 0.468 0.008 0.016 0.028 0.476
#> GSM786523 3 0.1886 0.78358 0.024 0.024 0.928 0.000 0.024 0.000
#> GSM786497 4 0.0777 0.91844 0.024 0.004 0.000 0.972 0.000 0.000
#> GSM786501 6 0.0717 0.51268 0.000 0.016 0.000 0.000 0.008 0.976
#> GSM786517 6 0.3459 0.41807 0.000 0.212 0.000 0.016 0.004 0.768
#> GSM786534 6 0.5342 -0.05775 0.004 0.460 0.008 0.016 0.036 0.476
#> GSM786555 6 0.4953 0.13366 0.004 0.416 0.000 0.016 0.028 0.536
#> GSM786558 6 0.4964 0.09187 0.004 0.424 0.000 0.016 0.028 0.528
#> GSM786559 6 0.3944 -0.19470 0.000 0.428 0.000 0.004 0.000 0.568
#> GSM786565 6 0.4770 0.12598 0.000 0.428 0.000 0.016 0.024 0.532
#> GSM786572 2 0.4087 0.73652 0.000 0.692 0.004 0.000 0.028 0.276
#> GSM786579 2 0.3895 0.66594 0.000 0.700 0.008 0.012 0.000 0.280
#> GSM786491 1 0.4806 0.40711 0.604 0.040 0.008 0.004 0.344 0.000
#> GSM786509 1 0.6097 0.19127 0.496 0.084 0.000 0.360 0.060 0.000
#> GSM786538 1 0.1485 0.74858 0.944 0.028 0.000 0.004 0.024 0.000
#> GSM786548 2 0.4584 0.73933 0.000 0.720 0.048 0.000 0.036 0.196
#> GSM786562 1 0.3952 0.72089 0.780 0.108 0.000 0.000 0.104 0.008
#> GSM786566 1 0.5407 0.62564 0.684 0.116 0.000 0.000 0.088 0.112
#> GSM786573 3 0.3719 0.72243 0.004 0.152 0.796 0.000 0.032 0.016
#> GSM786574 6 0.4638 0.16971 0.000 0.392 0.000 0.016 0.020 0.572
#> GSM786580 5 0.3999 0.86197 0.096 0.044 0.040 0.000 0.808 0.012
#> GSM786581 6 0.3648 0.34602 0.000 0.240 0.000 0.004 0.016 0.740
#> GSM786583 3 0.0000 0.81164 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786492 4 0.0547 0.91777 0.020 0.000 0.000 0.980 0.000 0.000
#> GSM786493 6 0.1812 0.50881 0.000 0.080 0.000 0.000 0.008 0.912
#> GSM786499 6 0.0717 0.51268 0.000 0.016 0.000 0.000 0.008 0.976
#> GSM786502 6 0.4939 0.01434 0.016 0.336 0.000 0.000 0.048 0.600
#> GSM786537 4 0.0692 0.91699 0.020 0.004 0.000 0.976 0.000 0.000
#> GSM786567 6 0.4303 0.31125 0.000 0.292 0.000 0.016 0.020 0.672
#> GSM786498 1 0.6828 0.36460 0.504 0.252 0.000 0.004 0.116 0.124
#> GSM786500 4 0.0632 0.91906 0.024 0.000 0.000 0.976 0.000 0.000
#> GSM786503 1 0.2900 0.73175 0.860 0.088 0.000 0.000 0.044 0.008
#> GSM786507 6 0.0405 0.51226 0.000 0.000 0.000 0.004 0.008 0.988
#> GSM786515 6 0.1812 0.50881 0.000 0.080 0.000 0.000 0.008 0.912
#> GSM786522 1 0.3608 0.72089 0.832 0.036 0.060 0.004 0.068 0.000
#> GSM786526 1 0.4393 0.69050 0.772 0.076 0.072 0.000 0.080 0.000
#> GSM786528 1 0.4233 0.69695 0.784 0.076 0.076 0.000 0.064 0.000
#> GSM786531 3 0.0458 0.81360 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM786535 3 0.4332 0.55550 0.000 0.352 0.616 0.000 0.032 0.000
#> GSM786543 4 0.2954 0.89451 0.028 0.060 0.000 0.868 0.044 0.000
#> GSM786545 3 0.0291 0.81135 0.000 0.004 0.992 0.000 0.004 0.000
#> GSM786551 1 0.4568 0.70290 0.780 0.036 0.076 0.036 0.072 0.000
#> GSM786552 3 0.3394 0.69262 0.000 0.236 0.752 0.000 0.012 0.000
#> GSM786554 6 0.2886 0.47845 0.000 0.144 0.000 0.016 0.004 0.836
#> GSM786557 1 0.2401 0.73801 0.892 0.044 0.000 0.004 0.060 0.000
#> GSM786560 1 0.6121 0.21130 0.500 0.088 0.000 0.352 0.060 0.000
#> GSM786564 2 0.4985 0.26377 0.000 0.472 0.004 0.000 0.056 0.468
#> GSM786568 3 0.0260 0.81247 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786569 4 0.5481 0.56432 0.236 0.088 0.000 0.632 0.044 0.000
#> GSM786571 3 0.0914 0.81200 0.000 0.016 0.968 0.000 0.016 0.000
#> GSM786496 6 0.4845 0.12322 0.000 0.428 0.000 0.020 0.024 0.528
#> GSM786506 1 0.3520 0.72319 0.816 0.100 0.000 0.000 0.076 0.008
#> GSM786508 6 0.5438 0.15516 0.016 0.064 0.324 0.000 0.012 0.584
#> GSM786512 6 0.4555 0.17868 0.000 0.036 0.328 0.000 0.008 0.628
#> GSM786518 4 0.0632 0.91906 0.024 0.000 0.000 0.976 0.000 0.000
#> GSM786519 4 0.3626 0.87056 0.024 0.092 0.008 0.828 0.048 0.000
#> GSM786524 4 0.2906 0.90203 0.028 0.052 0.004 0.876 0.040 0.000
#> GSM786529 3 0.1196 0.80803 0.000 0.040 0.952 0.000 0.008 0.000
#> GSM786530 4 0.2179 0.85490 0.008 0.004 0.064 0.908 0.016 0.000
#> GSM786532 1 0.2308 0.73806 0.904 0.028 0.008 0.004 0.056 0.000
#> GSM786533 3 0.6223 0.24467 0.000 0.280 0.456 0.000 0.012 0.252
#> GSM786544 3 0.0862 0.80463 0.004 0.016 0.972 0.000 0.008 0.000
#> GSM786547 3 0.1594 0.80332 0.000 0.052 0.932 0.000 0.016 0.000
#> GSM786549 3 0.1262 0.79838 0.008 0.020 0.956 0.000 0.016 0.000
#> GSM786550 5 0.3835 0.70090 0.000 0.056 0.188 0.000 0.756 0.000
#> GSM786563 2 0.4633 0.73749 0.000 0.716 0.056 0.000 0.032 0.196
#> GSM786570 2 0.3854 0.37804 0.000 0.536 0.000 0.000 0.000 0.464
#> GSM786576 6 0.2833 0.47907 0.000 0.148 0.000 0.012 0.004 0.836
#> GSM786577 4 0.1851 0.91473 0.024 0.036 0.000 0.928 0.012 0.000
#> GSM786578 2 0.4757 0.72830 0.000 0.708 0.060 0.000 0.036 0.196
#> GSM786582 1 0.4828 0.65393 0.728 0.064 0.000 0.140 0.068 0.000
#> GSM786495 6 0.0622 0.51298 0.000 0.012 0.000 0.000 0.008 0.980
#> GSM786505 1 0.2146 0.74121 0.908 0.044 0.000 0.004 0.044 0.000
#> GSM786511 4 0.0777 0.91844 0.024 0.004 0.000 0.972 0.000 0.000
#> GSM786513 1 0.3775 0.71170 0.816 0.048 0.076 0.000 0.060 0.000
#> GSM786525 6 0.5925 0.25371 0.200 0.136 0.000 0.004 0.048 0.612
#> GSM786540 2 0.4197 0.71388 0.000 0.680 0.020 0.000 0.012 0.288
#> GSM786553 1 0.2457 0.73735 0.896 0.056 0.004 0.000 0.036 0.008
#> GSM786561 4 0.2954 0.89451 0.028 0.060 0.000 0.868 0.044 0.000
#> GSM786575 5 0.3261 0.73669 0.192 0.004 0.008 0.004 0.792 0.000
#> GSM786494 1 0.5296 0.40101 0.580 0.056 0.008 0.016 0.340 0.000
#> GSM786504 1 0.3807 0.71623 0.820 0.048 0.068 0.004 0.060 0.000
#> GSM786510 6 0.0603 0.50909 0.000 0.004 0.000 0.000 0.016 0.980
#> GSM786514 1 0.3403 0.72781 0.836 0.068 0.012 0.004 0.080 0.000
#> GSM786516 3 0.4931 0.59833 0.124 0.084 0.724 0.000 0.068 0.000
#> GSM786520 1 0.3300 0.72637 0.840 0.076 0.000 0.016 0.068 0.000
#> GSM786521 5 0.3999 0.86197 0.096 0.044 0.040 0.000 0.808 0.012
#> GSM786536 3 0.4948 0.57365 0.148 0.076 0.716 0.000 0.060 0.000
#> GSM786542 3 0.4344 0.55146 0.000 0.356 0.612 0.000 0.032 0.000
#> GSM786546 3 0.2474 0.78583 0.004 0.080 0.884 0.000 0.032 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 specimen(p) disease.state(p) k
#> CV:kmeans 92 0.0259 1.000 2
#> CV:kmeans 72 0.0393 0.748 3
#> CV:kmeans 85 0.0147 0.203 4
#> CV:kmeans 83 0.0630 0.526 5
#> CV:kmeans 66 0.4750 0.834 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 54547 rows and 93 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 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.972 0.989 0.5058 0.495 0.495
#> 3 3 0.789 0.890 0.941 0.2845 0.816 0.642
#> 4 4 0.830 0.851 0.919 0.1328 0.908 0.742
#> 5 5 0.704 0.651 0.809 0.0672 0.973 0.900
#> 6 6 0.695 0.568 0.745 0.0430 0.913 0.668
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
#> GSM786527 2 0.000 0.986 0.000 1.000
#> GSM786539 2 0.000 0.986 0.000 1.000
#> GSM786541 2 0.000 0.986 0.000 1.000
#> GSM786556 2 0.000 0.986 0.000 1.000
#> GSM786523 1 0.000 0.991 1.000 0.000
#> GSM786497 1 0.000 0.991 1.000 0.000
#> GSM786501 2 0.000 0.986 0.000 1.000
#> GSM786517 2 0.000 0.986 0.000 1.000
#> GSM786534 2 0.000 0.986 0.000 1.000
#> GSM786555 2 0.000 0.986 0.000 1.000
#> GSM786558 2 0.000 0.986 0.000 1.000
#> GSM786559 2 0.000 0.986 0.000 1.000
#> GSM786565 2 0.000 0.986 0.000 1.000
#> GSM786572 2 0.000 0.986 0.000 1.000
#> GSM786579 2 0.000 0.986 0.000 1.000
#> GSM786491 1 0.000 0.991 1.000 0.000
#> GSM786509 1 0.000 0.991 1.000 0.000
#> GSM786538 1 0.000 0.991 1.000 0.000
#> GSM786548 2 0.000 0.986 0.000 1.000
#> GSM786562 1 0.000 0.991 1.000 0.000
#> GSM786566 1 0.000 0.991 1.000 0.000
#> GSM786573 2 0.204 0.957 0.032 0.968
#> GSM786574 2 0.000 0.986 0.000 1.000
#> GSM786580 1 0.913 0.509 0.672 0.328
#> GSM786581 2 0.000 0.986 0.000 1.000
#> GSM786583 1 0.000 0.991 1.000 0.000
#> GSM786492 1 0.000 0.991 1.000 0.000
#> GSM786493 2 0.000 0.986 0.000 1.000
#> GSM786499 2 0.000 0.986 0.000 1.000
#> GSM786502 2 0.000 0.986 0.000 1.000
#> GSM786537 1 0.000 0.991 1.000 0.000
#> GSM786567 2 0.000 0.986 0.000 1.000
#> GSM786498 1 0.000 0.991 1.000 0.000
#> GSM786500 1 0.000 0.991 1.000 0.000
#> GSM786503 1 0.000 0.991 1.000 0.000
#> GSM786507 2 0.000 0.986 0.000 1.000
#> GSM786515 2 0.000 0.986 0.000 1.000
#> GSM786522 1 0.000 0.991 1.000 0.000
#> GSM786526 1 0.000 0.991 1.000 0.000
#> GSM786528 1 0.000 0.991 1.000 0.000
#> GSM786531 2 0.224 0.953 0.036 0.964
#> GSM786535 2 0.000 0.986 0.000 1.000
#> GSM786543 1 0.000 0.991 1.000 0.000
#> GSM786545 1 0.000 0.991 1.000 0.000
#> GSM786551 1 0.000 0.991 1.000 0.000
#> GSM786552 2 0.000 0.986 0.000 1.000
#> GSM786554 2 0.000 0.986 0.000 1.000
#> GSM786557 1 0.000 0.991 1.000 0.000
#> GSM786560 1 0.000 0.991 1.000 0.000
#> GSM786564 2 0.000 0.986 0.000 1.000
#> GSM786568 2 0.000 0.986 0.000 1.000
#> GSM786569 1 0.000 0.991 1.000 0.000
#> GSM786571 2 0.978 0.309 0.412 0.588
#> GSM786496 2 0.000 0.986 0.000 1.000
#> GSM786506 1 0.000 0.991 1.000 0.000
#> GSM786508 2 0.000 0.986 0.000 1.000
#> GSM786512 2 0.000 0.986 0.000 1.000
#> GSM786518 1 0.000 0.991 1.000 0.000
#> GSM786519 1 0.000 0.991 1.000 0.000
#> GSM786524 1 0.000 0.991 1.000 0.000
#> GSM786529 2 0.000 0.986 0.000 1.000
#> GSM786530 1 0.000 0.991 1.000 0.000
#> GSM786532 1 0.000 0.991 1.000 0.000
#> GSM786533 2 0.000 0.986 0.000 1.000
#> GSM786544 1 0.000 0.991 1.000 0.000
#> GSM786547 2 0.000 0.986 0.000 1.000
#> GSM786549 1 0.000 0.991 1.000 0.000
#> GSM786550 2 0.671 0.783 0.176 0.824
#> GSM786563 2 0.000 0.986 0.000 1.000
#> GSM786570 2 0.000 0.986 0.000 1.000
#> GSM786576 2 0.000 0.986 0.000 1.000
#> GSM786577 1 0.000 0.991 1.000 0.000
#> GSM786578 2 0.000 0.986 0.000 1.000
#> GSM786582 1 0.000 0.991 1.000 0.000
#> GSM786495 2 0.000 0.986 0.000 1.000
#> GSM786505 1 0.000 0.991 1.000 0.000
#> GSM786511 1 0.000 0.991 1.000 0.000
#> GSM786513 1 0.000 0.991 1.000 0.000
#> GSM786525 2 0.000 0.986 0.000 1.000
#> GSM786540 2 0.000 0.986 0.000 1.000
#> GSM786553 1 0.000 0.991 1.000 0.000
#> GSM786561 1 0.000 0.991 1.000 0.000
#> GSM786575 1 0.000 0.991 1.000 0.000
#> GSM786494 1 0.000 0.991 1.000 0.000
#> GSM786504 1 0.000 0.991 1.000 0.000
#> GSM786510 2 0.000 0.986 0.000 1.000
#> GSM786514 1 0.000 0.991 1.000 0.000
#> GSM786516 1 0.000 0.991 1.000 0.000
#> GSM786520 1 0.000 0.991 1.000 0.000
#> GSM786521 1 0.416 0.902 0.916 0.084
#> GSM786536 1 0.000 0.991 1.000 0.000
#> GSM786542 2 0.000 0.986 0.000 1.000
#> GSM786546 2 0.000 0.986 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786539 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786541 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786556 2 0.0424 0.986 0.000 0.992 0.008
#> GSM786523 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786497 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786501 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786534 2 0.0592 0.983 0.000 0.988 0.012
#> GSM786555 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786491 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786548 2 0.1031 0.972 0.000 0.976 0.024
#> GSM786562 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786566 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786573 3 0.3752 0.794 0.000 0.144 0.856
#> GSM786574 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786580 1 0.4121 0.805 0.868 0.024 0.108
#> GSM786581 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786583 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786492 1 0.5058 0.776 0.756 0.000 0.244
#> GSM786493 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786502 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786537 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786567 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786498 1 0.0892 0.898 0.980 0.000 0.020
#> GSM786500 1 0.5058 0.776 0.756 0.000 0.244
#> GSM786503 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786507 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786515 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786522 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786526 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786528 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786531 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786535 3 0.5138 0.689 0.000 0.252 0.748
#> GSM786543 1 0.5058 0.775 0.756 0.000 0.244
#> GSM786545 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786551 1 0.1163 0.895 0.972 0.000 0.028
#> GSM786552 3 0.5098 0.693 0.000 0.248 0.752
#> GSM786554 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786564 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786568 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786569 1 0.4235 0.820 0.824 0.000 0.176
#> GSM786571 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786496 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786506 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786508 2 0.0424 0.985 0.000 0.992 0.008
#> GSM786512 2 0.0592 0.982 0.000 0.988 0.012
#> GSM786518 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786519 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786524 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786529 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786530 3 0.5621 0.420 0.308 0.000 0.692
#> GSM786532 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786533 2 0.1753 0.946 0.000 0.952 0.048
#> GSM786544 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786547 3 0.3482 0.811 0.000 0.128 0.872
#> GSM786549 3 0.0000 0.859 0.000 0.000 1.000
#> GSM786550 3 0.4842 0.680 0.224 0.000 0.776
#> GSM786563 2 0.1031 0.972 0.000 0.976 0.024
#> GSM786570 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786577 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786578 2 0.0424 0.986 0.000 0.992 0.008
#> GSM786582 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786511 1 0.5098 0.773 0.752 0.000 0.248
#> GSM786513 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786525 2 0.3551 0.824 0.132 0.868 0.000
#> GSM786540 2 0.0237 0.988 0.000 0.996 0.004
#> GSM786553 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786561 1 0.5058 0.776 0.756 0.000 0.244
#> GSM786575 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786494 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786504 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786510 2 0.0000 0.991 0.000 1.000 0.000
#> GSM786514 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786516 3 0.3551 0.760 0.132 0.000 0.868
#> GSM786520 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786521 1 0.3340 0.819 0.880 0.000 0.120
#> GSM786536 3 0.3267 0.786 0.116 0.000 0.884
#> GSM786542 3 0.5216 0.678 0.000 0.260 0.740
#> GSM786546 3 0.5138 0.689 0.000 0.252 0.748
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0188 0.943 0.000 0.996 0.000 0.004
#> GSM786539 2 0.1624 0.931 0.020 0.952 0.000 0.028
#> GSM786541 2 0.0188 0.943 0.000 0.996 0.004 0.000
#> GSM786556 2 0.0707 0.938 0.000 0.980 0.020 0.000
#> GSM786523 3 0.2714 0.839 0.004 0.000 0.884 0.112
#> GSM786497 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786501 2 0.1624 0.931 0.020 0.952 0.000 0.028
#> GSM786517 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786534 2 0.1302 0.924 0.000 0.956 0.044 0.000
#> GSM786555 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786559 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0921 0.935 0.000 0.972 0.028 0.000
#> GSM786579 2 0.0188 0.943 0.000 0.996 0.004 0.000
#> GSM786491 1 0.0921 0.919 0.972 0.000 0.000 0.028
#> GSM786509 4 0.3907 0.697 0.232 0.000 0.000 0.768
#> GSM786538 1 0.0921 0.920 0.972 0.000 0.000 0.028
#> GSM786548 2 0.2921 0.847 0.000 0.860 0.140 0.000
#> GSM786562 1 0.0188 0.908 0.996 0.000 0.000 0.004
#> GSM786566 1 0.4250 0.561 0.724 0.000 0.000 0.276
#> GSM786573 3 0.6007 0.498 0.000 0.056 0.604 0.340
#> GSM786574 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786580 1 0.5041 0.650 0.728 0.000 0.232 0.040
#> GSM786581 2 0.0188 0.943 0.000 0.996 0.000 0.004
#> GSM786583 3 0.0779 0.899 0.004 0.000 0.980 0.016
#> GSM786492 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786493 2 0.0336 0.942 0.000 0.992 0.000 0.008
#> GSM786499 2 0.1624 0.931 0.020 0.952 0.000 0.028
#> GSM786502 2 0.5384 0.773 0.056 0.764 0.024 0.156
#> GSM786537 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786567 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786498 4 0.5099 0.378 0.380 0.000 0.008 0.612
#> GSM786500 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786503 1 0.0469 0.913 0.988 0.000 0.000 0.012
#> GSM786507 2 0.1624 0.931 0.020 0.952 0.000 0.028
#> GSM786515 2 0.0336 0.942 0.000 0.992 0.000 0.008
#> GSM786522 1 0.4661 0.387 0.652 0.000 0.000 0.348
#> GSM786526 1 0.1022 0.918 0.968 0.000 0.000 0.032
#> GSM786528 1 0.0817 0.919 0.976 0.000 0.000 0.024
#> GSM786531 3 0.0657 0.900 0.004 0.000 0.984 0.012
#> GSM786535 3 0.0336 0.898 0.000 0.008 0.992 0.000
#> GSM786543 4 0.1022 0.888 0.032 0.000 0.000 0.968
#> GSM786545 3 0.4283 0.683 0.004 0.000 0.740 0.256
#> GSM786551 4 0.4277 0.619 0.280 0.000 0.000 0.720
#> GSM786552 3 0.0188 0.900 0.000 0.004 0.996 0.000
#> GSM786554 2 0.0188 0.943 0.000 0.996 0.000 0.004
#> GSM786557 1 0.0921 0.920 0.972 0.000 0.000 0.028
#> GSM786560 4 0.4382 0.600 0.296 0.000 0.000 0.704
#> GSM786564 2 0.1004 0.936 0.000 0.972 0.024 0.004
#> GSM786568 3 0.0376 0.901 0.004 0.000 0.992 0.004
#> GSM786569 4 0.1389 0.880 0.048 0.000 0.000 0.952
#> GSM786571 3 0.0000 0.900 0.000 0.000 1.000 0.000
#> GSM786496 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786506 1 0.0336 0.910 0.992 0.000 0.000 0.008
#> GSM786508 2 0.5726 0.757 0.024 0.748 0.144 0.084
#> GSM786512 2 0.5302 0.720 0.020 0.736 0.216 0.028
#> GSM786518 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786519 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786524 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786529 3 0.0000 0.900 0.000 0.000 1.000 0.000
#> GSM786530 4 0.1452 0.849 0.008 0.000 0.036 0.956
#> GSM786532 1 0.0921 0.920 0.972 0.000 0.000 0.028
#> GSM786533 2 0.4567 0.663 0.000 0.716 0.276 0.008
#> GSM786544 3 0.0895 0.898 0.004 0.000 0.976 0.020
#> GSM786547 3 0.0000 0.900 0.000 0.000 1.000 0.000
#> GSM786549 3 0.1004 0.896 0.004 0.000 0.972 0.024
#> GSM786550 3 0.1109 0.889 0.028 0.000 0.968 0.004
#> GSM786563 2 0.3024 0.838 0.000 0.852 0.148 0.000
#> GSM786570 2 0.0000 0.943 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0188 0.943 0.000 0.996 0.000 0.004
#> GSM786577 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786578 2 0.2345 0.887 0.000 0.900 0.100 0.000
#> GSM786582 4 0.4981 0.204 0.464 0.000 0.000 0.536
#> GSM786495 2 0.1624 0.931 0.020 0.952 0.000 0.028
#> GSM786505 1 0.0921 0.920 0.972 0.000 0.000 0.028
#> GSM786511 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786513 1 0.1118 0.917 0.964 0.000 0.000 0.036
#> GSM786525 2 0.3972 0.741 0.204 0.788 0.000 0.008
#> GSM786540 2 0.0469 0.941 0.000 0.988 0.012 0.000
#> GSM786553 1 0.0921 0.920 0.972 0.000 0.000 0.028
#> GSM786561 4 0.0921 0.890 0.028 0.000 0.000 0.972
#> GSM786575 1 0.0921 0.919 0.972 0.000 0.000 0.028
#> GSM786494 1 0.1389 0.910 0.952 0.000 0.000 0.048
#> GSM786504 1 0.1118 0.917 0.964 0.000 0.000 0.036
#> GSM786510 2 0.1624 0.931 0.020 0.952 0.000 0.028
#> GSM786514 1 0.1557 0.904 0.944 0.000 0.000 0.056
#> GSM786516 3 0.7007 0.484 0.212 0.000 0.580 0.208
#> GSM786520 1 0.1211 0.917 0.960 0.000 0.000 0.040
#> GSM786521 1 0.5123 0.653 0.724 0.000 0.232 0.044
#> GSM786536 3 0.4988 0.659 0.236 0.000 0.728 0.036
#> GSM786542 3 0.1792 0.849 0.000 0.068 0.932 0.000
#> GSM786546 3 0.0188 0.901 0.004 0.000 0.996 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0794 0.75099 0.000 0.972 0.000 0.000 0.028
#> GSM786539 2 0.3508 0.62613 0.000 0.748 0.000 0.000 0.252
#> GSM786541 2 0.3093 0.73129 0.000 0.824 0.008 0.000 0.168
#> GSM786556 2 0.3612 0.72045 0.000 0.800 0.028 0.000 0.172
#> GSM786523 3 0.3155 0.71485 0.020 0.000 0.864 0.096 0.020
#> GSM786497 4 0.0162 0.90511 0.000 0.000 0.000 0.996 0.004
#> GSM786501 2 0.3508 0.62613 0.000 0.748 0.000 0.000 0.252
#> GSM786517 2 0.0794 0.74766 0.000 0.972 0.000 0.000 0.028
#> GSM786534 2 0.3687 0.71709 0.000 0.792 0.028 0.000 0.180
#> GSM786555 2 0.2127 0.75186 0.000 0.892 0.000 0.000 0.108
#> GSM786558 2 0.2471 0.74779 0.000 0.864 0.000 0.000 0.136
#> GSM786559 2 0.1732 0.75680 0.000 0.920 0.000 0.000 0.080
#> GSM786565 2 0.2280 0.74960 0.000 0.880 0.000 0.000 0.120
#> GSM786572 2 0.4445 0.63710 0.000 0.676 0.024 0.000 0.300
#> GSM786579 2 0.3710 0.71377 0.000 0.784 0.024 0.000 0.192
#> GSM786491 1 0.4718 0.38357 0.628 0.000 0.000 0.028 0.344
#> GSM786509 4 0.3048 0.74263 0.176 0.000 0.000 0.820 0.004
#> GSM786538 1 0.0324 0.81606 0.992 0.000 0.000 0.004 0.004
#> GSM786548 2 0.5045 0.59942 0.000 0.636 0.056 0.000 0.308
#> GSM786562 1 0.2966 0.75800 0.848 0.000 0.000 0.016 0.136
#> GSM786566 1 0.5367 0.47372 0.668 0.000 0.000 0.148 0.184
#> GSM786573 3 0.8316 0.19232 0.000 0.172 0.344 0.308 0.176
#> GSM786574 2 0.1608 0.75607 0.000 0.928 0.000 0.000 0.072
#> GSM786580 5 0.4953 0.00603 0.440 0.000 0.000 0.028 0.532
#> GSM786581 2 0.2719 0.73122 0.004 0.852 0.000 0.000 0.144
#> GSM786583 3 0.0162 0.77077 0.004 0.000 0.996 0.000 0.000
#> GSM786492 4 0.0162 0.90511 0.000 0.000 0.000 0.996 0.004
#> GSM786493 2 0.1341 0.74182 0.000 0.944 0.000 0.000 0.056
#> GSM786499 2 0.3508 0.62613 0.000 0.748 0.000 0.000 0.252
#> GSM786502 5 0.4807 -0.36532 0.008 0.464 0.000 0.008 0.520
#> GSM786537 4 0.0162 0.90511 0.000 0.000 0.000 0.996 0.004
#> GSM786567 2 0.0609 0.74933 0.000 0.980 0.000 0.000 0.020
#> GSM786498 5 0.6194 0.16365 0.156 0.000 0.000 0.328 0.516
#> GSM786500 4 0.0162 0.90511 0.000 0.000 0.000 0.996 0.004
#> GSM786503 1 0.1168 0.81401 0.960 0.000 0.000 0.008 0.032
#> GSM786507 2 0.3508 0.62613 0.000 0.748 0.000 0.000 0.252
#> GSM786515 2 0.1608 0.73608 0.000 0.928 0.000 0.000 0.072
#> GSM786522 1 0.3809 0.51047 0.736 0.000 0.000 0.256 0.008
#> GSM786526 1 0.1299 0.80524 0.960 0.000 0.012 0.008 0.020
#> GSM786528 1 0.0898 0.80731 0.972 0.000 0.008 0.000 0.020
#> GSM786531 3 0.0290 0.77190 0.000 0.000 0.992 0.000 0.008
#> GSM786535 3 0.4927 0.54525 0.000 0.052 0.652 0.000 0.296
#> GSM786543 4 0.0000 0.90477 0.000 0.000 0.000 1.000 0.000
#> GSM786545 3 0.3783 0.61154 0.004 0.000 0.768 0.216 0.012
#> GSM786551 4 0.5412 0.49315 0.264 0.000 0.004 0.644 0.088
#> GSM786552 3 0.3724 0.66070 0.000 0.028 0.788 0.000 0.184
#> GSM786554 2 0.1478 0.73894 0.000 0.936 0.000 0.000 0.064
#> GSM786557 1 0.1582 0.81148 0.944 0.000 0.000 0.028 0.028
#> GSM786560 4 0.3766 0.61672 0.268 0.000 0.000 0.728 0.004
#> GSM786564 2 0.4166 0.49895 0.000 0.648 0.004 0.000 0.348
#> GSM786568 3 0.0162 0.77080 0.000 0.000 0.996 0.000 0.004
#> GSM786569 4 0.0671 0.89539 0.016 0.000 0.000 0.980 0.004
#> GSM786571 3 0.0290 0.77190 0.000 0.000 0.992 0.000 0.008
#> GSM786496 2 0.2127 0.75206 0.000 0.892 0.000 0.000 0.108
#> GSM786506 1 0.1386 0.81288 0.952 0.000 0.000 0.016 0.032
#> GSM786508 2 0.6396 0.31987 0.000 0.508 0.212 0.000 0.280
#> GSM786512 2 0.6362 0.34366 0.000 0.520 0.224 0.000 0.256
#> GSM786518 4 0.0162 0.90511 0.000 0.000 0.000 0.996 0.004
#> GSM786519 4 0.0162 0.90355 0.000 0.000 0.000 0.996 0.004
#> GSM786524 4 0.0290 0.90066 0.008 0.000 0.000 0.992 0.000
#> GSM786529 3 0.0404 0.77153 0.000 0.000 0.988 0.000 0.012
#> GSM786530 4 0.1153 0.87956 0.008 0.000 0.024 0.964 0.004
#> GSM786532 1 0.1043 0.81019 0.960 0.000 0.000 0.000 0.040
#> GSM786533 2 0.6767 0.22940 0.000 0.392 0.328 0.000 0.280
#> GSM786544 3 0.0854 0.76525 0.004 0.000 0.976 0.008 0.012
#> GSM786547 3 0.0794 0.76795 0.000 0.000 0.972 0.000 0.028
#> GSM786549 3 0.1314 0.75875 0.016 0.000 0.960 0.012 0.012
#> GSM786550 5 0.4538 -0.26308 0.008 0.000 0.452 0.000 0.540
#> GSM786563 2 0.5104 0.59517 0.000 0.632 0.060 0.000 0.308
#> GSM786570 2 0.2377 0.74469 0.000 0.872 0.000 0.000 0.128
#> GSM786576 2 0.1410 0.73959 0.000 0.940 0.000 0.000 0.060
#> GSM786577 4 0.0000 0.90477 0.000 0.000 0.000 1.000 0.000
#> GSM786578 2 0.5228 0.54711 0.000 0.588 0.056 0.000 0.356
#> GSM786582 4 0.4657 0.53689 0.296 0.000 0.000 0.668 0.036
#> GSM786495 2 0.3508 0.62613 0.000 0.748 0.000 0.000 0.252
#> GSM786505 1 0.1582 0.81148 0.944 0.000 0.000 0.028 0.028
#> GSM786511 4 0.0162 0.90511 0.000 0.000 0.000 0.996 0.004
#> GSM786513 1 0.2521 0.78977 0.900 0.000 0.008 0.024 0.068
#> GSM786525 2 0.5623 0.37352 0.300 0.596 0.000 0.000 0.104
#> GSM786540 2 0.4087 0.69810 0.000 0.756 0.036 0.000 0.208
#> GSM786553 1 0.0290 0.81495 0.992 0.000 0.000 0.000 0.008
#> GSM786561 4 0.0000 0.90477 0.000 0.000 0.000 1.000 0.000
#> GSM786575 1 0.4812 0.32659 0.600 0.000 0.000 0.028 0.372
#> GSM786494 1 0.5511 0.31851 0.576 0.000 0.000 0.080 0.344
#> GSM786504 1 0.2585 0.78775 0.896 0.000 0.008 0.024 0.072
#> GSM786510 2 0.3508 0.62613 0.000 0.748 0.000 0.000 0.252
#> GSM786514 1 0.1503 0.80585 0.952 0.000 0.008 0.020 0.020
#> GSM786516 3 0.5933 0.49267 0.200 0.000 0.644 0.136 0.020
#> GSM786520 1 0.2300 0.78813 0.904 0.000 0.000 0.072 0.024
#> GSM786521 5 0.4953 0.00603 0.440 0.000 0.000 0.028 0.532
#> GSM786536 3 0.4790 0.47107 0.292 0.000 0.672 0.016 0.020
#> GSM786542 3 0.5921 0.42755 0.000 0.136 0.568 0.000 0.296
#> GSM786546 3 0.3855 0.65934 0.008 0.004 0.748 0.000 0.240
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.3309 0.31716 0.000 0.720 0.000 0.000 0.000 0.280
#> GSM786539 6 0.3747 0.73581 0.000 0.396 0.000 0.000 0.000 0.604
#> GSM786541 2 0.0972 0.48593 0.000 0.964 0.000 0.000 0.008 0.028
#> GSM786556 2 0.0405 0.49251 0.000 0.988 0.000 0.000 0.008 0.004
#> GSM786523 3 0.3563 0.70787 0.012 0.000 0.836 0.056 0.020 0.076
#> GSM786497 4 0.0000 0.87717 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786501 6 0.3756 0.73816 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM786517 2 0.3351 0.19596 0.000 0.712 0.000 0.000 0.000 0.288
#> GSM786534 2 0.0622 0.49377 0.000 0.980 0.000 0.000 0.008 0.012
#> GSM786555 2 0.2340 0.42397 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM786558 2 0.2234 0.44335 0.000 0.872 0.000 0.000 0.004 0.124
#> GSM786559 2 0.4092 0.39317 0.000 0.636 0.000 0.000 0.020 0.344
#> GSM786565 2 0.2178 0.44528 0.000 0.868 0.000 0.000 0.000 0.132
#> GSM786572 2 0.4568 0.44827 0.000 0.688 0.004 0.000 0.080 0.228
#> GSM786579 2 0.2651 0.49370 0.000 0.860 0.000 0.000 0.028 0.112
#> GSM786491 5 0.3409 0.58275 0.300 0.000 0.000 0.000 0.700 0.000
#> GSM786509 4 0.3712 0.65678 0.232 0.000 0.000 0.744 0.012 0.012
#> GSM786538 1 0.0951 0.82923 0.968 0.000 0.004 0.000 0.020 0.008
#> GSM786548 2 0.5177 0.42816 0.000 0.656 0.028 0.000 0.088 0.228
#> GSM786562 1 0.3562 0.69522 0.756 0.000 0.000 0.008 0.224 0.012
#> GSM786566 1 0.6006 0.52281 0.616 0.000 0.000 0.116 0.096 0.172
#> GSM786573 2 0.6549 0.00521 0.000 0.476 0.228 0.264 0.012 0.020
#> GSM786574 2 0.2664 0.38097 0.000 0.816 0.000 0.000 0.000 0.184
#> GSM786580 5 0.2066 0.74061 0.072 0.000 0.000 0.000 0.904 0.024
#> GSM786581 2 0.4956 0.14828 0.004 0.592 0.000 0.000 0.072 0.332
#> GSM786583 3 0.0291 0.76870 0.000 0.004 0.992 0.000 0.000 0.004
#> GSM786492 4 0.0000 0.87717 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786493 2 0.3684 -0.11664 0.000 0.628 0.000 0.000 0.000 0.372
#> GSM786499 6 0.3747 0.74230 0.000 0.396 0.000 0.000 0.000 0.604
#> GSM786502 6 0.5378 0.23525 0.004 0.116 0.004 0.012 0.220 0.644
#> GSM786537 4 0.0146 0.87541 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM786567 2 0.3266 0.23729 0.000 0.728 0.000 0.000 0.000 0.272
#> GSM786498 5 0.6885 0.38411 0.088 0.000 0.000 0.296 0.448 0.168
#> GSM786500 4 0.0000 0.87717 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786503 1 0.2258 0.81860 0.896 0.000 0.000 0.000 0.044 0.060
#> GSM786507 6 0.3756 0.74011 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM786515 2 0.3756 -0.21118 0.000 0.600 0.000 0.000 0.000 0.400
#> GSM786522 1 0.3398 0.69357 0.812 0.000 0.004 0.152 0.020 0.012
#> GSM786526 1 0.2834 0.78916 0.852 0.000 0.008 0.000 0.020 0.120
#> GSM786528 1 0.3120 0.78914 0.840 0.000 0.008 0.000 0.040 0.112
#> GSM786531 3 0.0146 0.76876 0.000 0.004 0.996 0.000 0.000 0.000
#> GSM786535 3 0.7262 0.14372 0.000 0.324 0.352 0.000 0.104 0.220
#> GSM786543 4 0.0692 0.87181 0.004 0.000 0.000 0.976 0.000 0.020
#> GSM786545 3 0.3221 0.60420 0.000 0.000 0.772 0.220 0.004 0.004
#> GSM786551 4 0.6028 0.23278 0.272 0.000 0.008 0.528 0.184 0.008
#> GSM786552 3 0.5956 0.40110 0.000 0.304 0.544 0.000 0.040 0.112
#> GSM786554 2 0.3774 -0.21365 0.000 0.592 0.000 0.000 0.000 0.408
#> GSM786557 1 0.1901 0.81398 0.912 0.000 0.000 0.008 0.076 0.004
#> GSM786560 4 0.4368 0.51188 0.328 0.000 0.000 0.640 0.012 0.020
#> GSM786564 2 0.6198 0.27021 0.000 0.396 0.004 0.000 0.284 0.316
#> GSM786568 3 0.0405 0.76803 0.000 0.004 0.988 0.000 0.000 0.008
#> GSM786569 4 0.1692 0.84628 0.048 0.000 0.000 0.932 0.008 0.012
#> GSM786571 3 0.0964 0.76629 0.000 0.004 0.968 0.000 0.016 0.012
#> GSM786496 2 0.2260 0.43877 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM786506 1 0.2575 0.81400 0.880 0.000 0.000 0.004 0.072 0.044
#> GSM786508 6 0.5255 0.57246 0.000 0.176 0.196 0.000 0.004 0.624
#> GSM786512 6 0.5299 0.54269 0.000 0.156 0.228 0.000 0.004 0.612
#> GSM786518 4 0.0000 0.87717 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786519 4 0.1049 0.86514 0.008 0.000 0.000 0.960 0.000 0.032
#> GSM786524 4 0.0146 0.87689 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM786529 3 0.0653 0.76750 0.000 0.012 0.980 0.000 0.004 0.004
#> GSM786530 4 0.0146 0.87576 0.000 0.000 0.004 0.996 0.000 0.000
#> GSM786532 1 0.2113 0.79791 0.896 0.000 0.004 0.000 0.092 0.008
#> GSM786533 2 0.6476 0.19242 0.000 0.440 0.228 0.000 0.028 0.304
#> GSM786544 3 0.0964 0.76209 0.004 0.000 0.968 0.000 0.012 0.016
#> GSM786547 3 0.2195 0.74053 0.000 0.028 0.912 0.000 0.024 0.036
#> GSM786549 3 0.1442 0.75626 0.004 0.000 0.944 0.000 0.012 0.040
#> GSM786550 5 0.2973 0.60551 0.000 0.004 0.136 0.000 0.836 0.024
#> GSM786563 2 0.5104 0.43206 0.000 0.668 0.028 0.000 0.088 0.216
#> GSM786570 2 0.4396 0.43675 0.000 0.612 0.000 0.000 0.036 0.352
#> GSM786576 2 0.3684 -0.08586 0.000 0.628 0.000 0.000 0.000 0.372
#> GSM786577 4 0.0260 0.87620 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM786578 2 0.5607 0.39858 0.000 0.600 0.020 0.000 0.144 0.236
#> GSM786582 4 0.4943 0.37242 0.360 0.000 0.000 0.576 0.056 0.008
#> GSM786495 6 0.3756 0.74011 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM786505 1 0.1643 0.81673 0.924 0.000 0.000 0.008 0.068 0.000
#> GSM786511 4 0.0000 0.87717 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 1 0.4032 0.73001 0.780 0.000 0.008 0.016 0.152 0.044
#> GSM786525 2 0.6283 0.03286 0.264 0.476 0.000 0.000 0.020 0.240
#> GSM786540 2 0.3459 0.47838 0.000 0.792 0.004 0.000 0.032 0.172
#> GSM786553 1 0.1480 0.82489 0.940 0.000 0.000 0.000 0.020 0.040
#> GSM786561 4 0.0692 0.87181 0.004 0.000 0.000 0.976 0.000 0.020
#> GSM786575 5 0.2762 0.69983 0.196 0.000 0.000 0.000 0.804 0.000
#> GSM786494 5 0.4814 0.59227 0.256 0.000 0.000 0.100 0.644 0.000
#> GSM786504 1 0.4003 0.72436 0.780 0.000 0.008 0.016 0.156 0.040
#> GSM786510 6 0.3747 0.73806 0.000 0.396 0.000 0.000 0.000 0.604
#> GSM786514 1 0.2652 0.80010 0.868 0.000 0.008 0.000 0.020 0.104
#> GSM786516 3 0.5584 0.57808 0.140 0.000 0.688 0.064 0.020 0.088
#> GSM786520 1 0.2451 0.79811 0.884 0.000 0.000 0.060 0.056 0.000
#> GSM786521 5 0.2066 0.74061 0.072 0.000 0.000 0.000 0.904 0.024
#> GSM786536 3 0.5347 0.49462 0.220 0.000 0.636 0.000 0.020 0.124
#> GSM786542 2 0.7098 -0.04788 0.000 0.400 0.296 0.000 0.088 0.216
#> GSM786546 3 0.6781 0.45282 0.012 0.208 0.544 0.000 0.112 0.124
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 specimen(p) disease.state(p) k
#> CV:skmeans 92 0.02593 1.000 2
#> CV:skmeans 92 0.00744 0.385 3
#> CV:skmeans 88 0.00359 0.594 4
#> CV:skmeans 74 0.00549 0.638 5
#> CV:skmeans 56 0.42273 0.775 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 54547 rows and 93 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 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.809 0.912 0.961 0.4995 0.499 0.499
#> 3 3 0.804 0.858 0.925 0.3400 0.744 0.528
#> 4 4 0.624 0.617 0.784 0.0992 0.914 0.751
#> 5 5 0.706 0.686 0.798 0.0605 0.926 0.745
#> 6 6 0.747 0.651 0.831 0.0356 0.944 0.765
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
#> GSM786527 2 0.0000 0.9587 0.000 1.000
#> GSM786539 2 0.0000 0.9587 0.000 1.000
#> GSM786541 2 0.0000 0.9587 0.000 1.000
#> GSM786556 2 0.0000 0.9587 0.000 1.000
#> GSM786523 1 0.6712 0.7963 0.824 0.176
#> GSM786497 1 0.0000 0.9565 1.000 0.000
#> GSM786501 2 0.0000 0.9587 0.000 1.000
#> GSM786517 2 0.0000 0.9587 0.000 1.000
#> GSM786534 2 0.0000 0.9587 0.000 1.000
#> GSM786555 2 0.0000 0.9587 0.000 1.000
#> GSM786558 2 0.0000 0.9587 0.000 1.000
#> GSM786559 2 0.0000 0.9587 0.000 1.000
#> GSM786565 2 0.0000 0.9587 0.000 1.000
#> GSM786572 2 0.0000 0.9587 0.000 1.000
#> GSM786579 2 0.0000 0.9587 0.000 1.000
#> GSM786491 1 0.0000 0.9565 1.000 0.000
#> GSM786509 1 0.0000 0.9565 1.000 0.000
#> GSM786538 1 0.0000 0.9565 1.000 0.000
#> GSM786548 2 0.0000 0.9587 0.000 1.000
#> GSM786562 2 1.0000 0.0426 0.500 0.500
#> GSM786566 2 0.6247 0.8063 0.156 0.844
#> GSM786573 2 0.0376 0.9561 0.004 0.996
#> GSM786574 2 0.0000 0.9587 0.000 1.000
#> GSM786580 2 0.3114 0.9159 0.056 0.944
#> GSM786581 2 0.0000 0.9587 0.000 1.000
#> GSM786583 1 0.6531 0.8043 0.832 0.168
#> GSM786492 1 0.0000 0.9565 1.000 0.000
#> GSM786493 2 0.0000 0.9587 0.000 1.000
#> GSM786499 2 0.0000 0.9587 0.000 1.000
#> GSM786502 2 0.0000 0.9587 0.000 1.000
#> GSM786537 1 0.0000 0.9565 1.000 0.000
#> GSM786567 2 0.0000 0.9587 0.000 1.000
#> GSM786498 2 0.9248 0.4942 0.340 0.660
#> GSM786500 1 0.0000 0.9565 1.000 0.000
#> GSM786503 1 0.0938 0.9510 0.988 0.012
#> GSM786507 2 0.0000 0.9587 0.000 1.000
#> GSM786515 2 0.0000 0.9587 0.000 1.000
#> GSM786522 1 0.0000 0.9565 1.000 0.000
#> GSM786526 1 0.0938 0.9510 0.988 0.012
#> GSM786528 1 0.7745 0.6998 0.772 0.228
#> GSM786531 2 0.5946 0.8254 0.144 0.856
#> GSM786535 2 0.0000 0.9587 0.000 1.000
#> GSM786543 1 0.0000 0.9565 1.000 0.000
#> GSM786545 1 0.7883 0.7107 0.764 0.236
#> GSM786551 1 0.2043 0.9381 0.968 0.032
#> GSM786552 2 0.0000 0.9587 0.000 1.000
#> GSM786554 2 0.0000 0.9587 0.000 1.000
#> GSM786557 1 0.0000 0.9565 1.000 0.000
#> GSM786560 1 0.0000 0.9565 1.000 0.000
#> GSM786564 2 0.0000 0.9587 0.000 1.000
#> GSM786568 2 0.0376 0.9560 0.004 0.996
#> GSM786569 1 0.0000 0.9565 1.000 0.000
#> GSM786571 1 0.8267 0.6731 0.740 0.260
#> GSM786496 2 0.0000 0.9587 0.000 1.000
#> GSM786506 1 0.0376 0.9545 0.996 0.004
#> GSM786508 2 0.6048 0.8156 0.148 0.852
#> GSM786512 2 0.0000 0.9587 0.000 1.000
#> GSM786518 1 0.0000 0.9565 1.000 0.000
#> GSM786519 1 0.1184 0.9490 0.984 0.016
#> GSM786524 1 0.0000 0.9565 1.000 0.000
#> GSM786529 2 0.1633 0.9422 0.024 0.976
#> GSM786530 1 0.3114 0.9210 0.944 0.056
#> GSM786532 1 0.0000 0.9565 1.000 0.000
#> GSM786533 2 0.0000 0.9587 0.000 1.000
#> GSM786544 1 0.4298 0.8899 0.912 0.088
#> GSM786547 2 0.2948 0.9191 0.052 0.948
#> GSM786549 1 0.0938 0.9510 0.988 0.012
#> GSM786550 2 0.6623 0.7902 0.172 0.828
#> GSM786563 2 0.0000 0.9587 0.000 1.000
#> GSM786570 2 0.0000 0.9587 0.000 1.000
#> GSM786576 2 0.0000 0.9587 0.000 1.000
#> GSM786577 1 0.0000 0.9565 1.000 0.000
#> GSM786578 2 0.0000 0.9587 0.000 1.000
#> GSM786582 1 0.0000 0.9565 1.000 0.000
#> GSM786495 2 0.0000 0.9587 0.000 1.000
#> GSM786505 1 0.0000 0.9565 1.000 0.000
#> GSM786511 1 0.0000 0.9565 1.000 0.000
#> GSM786513 1 0.0000 0.9565 1.000 0.000
#> GSM786525 2 0.0000 0.9587 0.000 1.000
#> GSM786540 2 0.0000 0.9587 0.000 1.000
#> GSM786553 1 0.0938 0.9510 0.988 0.012
#> GSM786561 1 0.0000 0.9565 1.000 0.000
#> GSM786575 1 0.0000 0.9565 1.000 0.000
#> GSM786494 1 0.0000 0.9565 1.000 0.000
#> GSM786504 1 0.0000 0.9565 1.000 0.000
#> GSM786510 2 0.0000 0.9587 0.000 1.000
#> GSM786514 1 0.0000 0.9565 1.000 0.000
#> GSM786516 1 0.0000 0.9565 1.000 0.000
#> GSM786520 1 0.0000 0.9565 1.000 0.000
#> GSM786521 2 0.6531 0.7954 0.168 0.832
#> GSM786536 1 0.9580 0.4187 0.620 0.380
#> GSM786542 2 0.0000 0.9587 0.000 1.000
#> GSM786546 2 0.6623 0.7902 0.172 0.828
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786539 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786541 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786556 2 0.3816 0.7613 0.000 0.852 0.148
#> GSM786523 3 0.0424 0.8829 0.008 0.000 0.992
#> GSM786497 1 0.1964 0.9326 0.944 0.000 0.056
#> GSM786501 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786517 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786534 2 0.6307 -0.1378 0.000 0.512 0.488
#> GSM786555 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786572 2 0.4235 0.7245 0.000 0.824 0.176
#> GSM786579 2 0.6286 -0.0404 0.000 0.536 0.464
#> GSM786491 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786509 1 0.0424 0.9736 0.992 0.000 0.008
#> GSM786538 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786548 3 0.3686 0.8373 0.000 0.140 0.860
#> GSM786562 2 0.4196 0.8561 0.024 0.864 0.112
#> GSM786566 2 0.3038 0.8781 0.000 0.896 0.104
#> GSM786573 3 0.4931 0.7523 0.000 0.232 0.768
#> GSM786574 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786580 3 0.4002 0.7640 0.000 0.160 0.840
#> GSM786581 2 0.1529 0.8955 0.000 0.960 0.040
#> GSM786583 3 0.1964 0.8735 0.000 0.056 0.944
#> GSM786492 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786493 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786499 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786502 2 0.2625 0.8908 0.000 0.916 0.084
#> GSM786537 1 0.0237 0.9701 0.996 0.000 0.004
#> GSM786567 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786498 2 0.4349 0.8483 0.020 0.852 0.128
#> GSM786500 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786503 1 0.3619 0.8731 0.864 0.000 0.136
#> GSM786507 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786515 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786522 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786526 1 0.3267 0.8931 0.884 0.000 0.116
#> GSM786528 3 0.5244 0.6507 0.240 0.004 0.756
#> GSM786531 3 0.1643 0.8798 0.000 0.044 0.956
#> GSM786535 3 0.2959 0.8577 0.000 0.100 0.900
#> GSM786543 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786545 3 0.0475 0.8851 0.004 0.004 0.992
#> GSM786551 3 0.6095 0.3460 0.392 0.000 0.608
#> GSM786552 3 0.2959 0.8577 0.000 0.100 0.900
#> GSM786554 2 0.1643 0.8952 0.000 0.956 0.044
#> GSM786557 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786560 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786564 3 0.3619 0.8400 0.000 0.136 0.864
#> GSM786568 3 0.0892 0.8818 0.000 0.020 0.980
#> GSM786569 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786571 3 0.0000 0.8844 0.000 0.000 1.000
#> GSM786496 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786506 1 0.1129 0.9745 0.976 0.004 0.020
#> GSM786508 2 0.3340 0.8656 0.000 0.880 0.120
#> GSM786512 3 0.6302 -0.0881 0.000 0.480 0.520
#> GSM786518 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786519 1 0.3752 0.8457 0.856 0.000 0.144
#> GSM786524 1 0.0237 0.9725 0.996 0.000 0.004
#> GSM786529 3 0.1411 0.8833 0.000 0.036 0.964
#> GSM786530 3 0.1031 0.8805 0.024 0.000 0.976
#> GSM786532 1 0.1031 0.9743 0.976 0.000 0.024
#> GSM786533 3 0.1031 0.8810 0.000 0.024 0.976
#> GSM786544 3 0.0000 0.8844 0.000 0.000 1.000
#> GSM786547 3 0.0592 0.8840 0.000 0.012 0.988
#> GSM786549 3 0.0000 0.8844 0.000 0.000 1.000
#> GSM786550 3 0.0000 0.8844 0.000 0.000 1.000
#> GSM786563 3 0.5497 0.6678 0.000 0.292 0.708
#> GSM786570 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.8921 0.000 1.000 0.000
#> GSM786577 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786578 3 0.4842 0.7645 0.000 0.224 0.776
#> GSM786582 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786495 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786505 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786511 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786513 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786525 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786540 2 0.5098 0.6029 0.000 0.752 0.248
#> GSM786553 1 0.2959 0.9094 0.900 0.000 0.100
#> GSM786561 1 0.0000 0.9711 1.000 0.000 0.000
#> GSM786575 1 0.1529 0.9646 0.960 0.000 0.040
#> GSM786494 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786504 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786510 2 0.2537 0.8920 0.000 0.920 0.080
#> GSM786514 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786516 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786520 1 0.0892 0.9760 0.980 0.000 0.020
#> GSM786521 3 0.0237 0.8840 0.004 0.000 0.996
#> GSM786536 3 0.0237 0.8842 0.004 0.000 0.996
#> GSM786542 3 0.3038 0.8569 0.000 0.104 0.896
#> GSM786546 3 0.0475 0.8845 0.004 0.004 0.992
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.4661 0.8001 0.000 0.652 0.000 0.348
#> GSM786539 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786541 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786556 2 0.0469 0.7107 0.000 0.988 0.012 0.000
#> GSM786523 3 0.4343 0.5345 0.264 0.000 0.732 0.004
#> GSM786497 4 0.4830 0.7107 0.392 0.000 0.000 0.608
#> GSM786501 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786517 2 0.4624 0.7998 0.000 0.660 0.000 0.340
#> GSM786534 2 0.3726 0.4018 0.000 0.788 0.212 0.000
#> GSM786555 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786559 2 0.3790 0.7656 0.000 0.820 0.016 0.164
#> GSM786565 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786572 2 0.3528 0.6015 0.000 0.808 0.192 0.000
#> GSM786579 2 0.3486 0.4791 0.000 0.812 0.188 0.000
#> GSM786491 1 0.0817 0.6984 0.976 0.000 0.000 0.024
#> GSM786509 1 0.2760 0.6139 0.872 0.000 0.000 0.128
#> GSM786538 1 0.0817 0.6984 0.976 0.000 0.000 0.024
#> GSM786548 3 0.4008 0.7058 0.000 0.244 0.756 0.000
#> GSM786562 1 0.7648 -0.0643 0.440 0.160 0.008 0.392
#> GSM786566 2 0.7157 0.7250 0.092 0.524 0.016 0.368
#> GSM786573 3 0.4855 0.4894 0.000 0.400 0.600 0.000
#> GSM786574 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786580 4 0.8487 -0.1418 0.372 0.036 0.200 0.392
#> GSM786581 2 0.3725 0.7722 0.000 0.812 0.008 0.180
#> GSM786583 3 0.0000 0.7743 0.000 0.000 1.000 0.000
#> GSM786492 4 0.4830 0.7107 0.392 0.000 0.000 0.608
#> GSM786493 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786499 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786502 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786537 4 0.5217 0.7021 0.380 0.000 0.012 0.608
#> GSM786567 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786498 2 0.8254 0.6320 0.152 0.440 0.040 0.368
#> GSM786500 4 0.4830 0.7107 0.392 0.000 0.000 0.608
#> GSM786503 1 0.3080 0.6540 0.880 0.000 0.096 0.024
#> GSM786507 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786515 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786522 1 0.3143 0.6516 0.876 0.000 0.100 0.024
#> GSM786526 1 0.5705 0.5362 0.704 0.000 0.204 0.092
#> GSM786528 3 0.5685 0.0883 0.460 0.000 0.516 0.024
#> GSM786531 3 0.0000 0.7743 0.000 0.000 1.000 0.000
#> GSM786535 3 0.3024 0.7580 0.000 0.148 0.852 0.000
#> GSM786543 1 0.4948 -0.3576 0.560 0.000 0.000 0.440
#> GSM786545 3 0.2319 0.7469 0.040 0.000 0.924 0.036
#> GSM786551 1 0.7475 0.1057 0.448 0.000 0.372 0.180
#> GSM786552 3 0.3024 0.7580 0.000 0.148 0.852 0.000
#> GSM786554 2 0.4920 0.7987 0.000 0.628 0.004 0.368
#> GSM786557 1 0.1389 0.6950 0.952 0.000 0.000 0.048
#> GSM786560 1 0.2408 0.6470 0.896 0.000 0.000 0.104
#> GSM786564 3 0.6083 0.4008 0.000 0.056 0.584 0.360
#> GSM786568 3 0.0000 0.7743 0.000 0.000 1.000 0.000
#> GSM786569 1 0.3356 0.5357 0.824 0.000 0.000 0.176
#> GSM786571 3 0.2149 0.7712 0.000 0.088 0.912 0.000
#> GSM786496 2 0.0000 0.7205 0.000 1.000 0.000 0.000
#> GSM786506 1 0.0188 0.7021 0.996 0.000 0.000 0.004
#> GSM786508 2 0.6240 0.7619 0.000 0.568 0.064 0.368
#> GSM786512 3 0.7545 -0.0512 0.000 0.192 0.440 0.368
#> GSM786518 4 0.4830 0.7107 0.392 0.000 0.000 0.608
#> GSM786519 1 0.7168 -0.1245 0.552 0.000 0.192 0.256
#> GSM786524 4 0.5329 0.6531 0.420 0.000 0.012 0.568
#> GSM786529 3 0.0592 0.7763 0.000 0.016 0.984 0.000
#> GSM786530 4 0.4955 0.0185 0.000 0.000 0.444 0.556
#> GSM786532 1 0.3266 0.6445 0.868 0.000 0.108 0.024
#> GSM786533 3 0.2921 0.7607 0.000 0.140 0.860 0.000
#> GSM786544 3 0.0000 0.7743 0.000 0.000 1.000 0.000
#> GSM786547 3 0.2408 0.7692 0.000 0.104 0.896 0.000
#> GSM786549 3 0.0000 0.7743 0.000 0.000 1.000 0.000
#> GSM786550 3 0.1211 0.7626 0.040 0.000 0.960 0.000
#> GSM786563 3 0.4877 0.4794 0.000 0.408 0.592 0.000
#> GSM786570 2 0.2868 0.7635 0.000 0.864 0.000 0.136
#> GSM786576 2 0.4746 0.7987 0.000 0.632 0.000 0.368
#> GSM786577 4 0.5387 0.6806 0.400 0.000 0.016 0.584
#> GSM786578 3 0.4564 0.6143 0.000 0.328 0.672 0.000
#> GSM786582 1 0.1389 0.6950 0.952 0.000 0.000 0.048
#> GSM786495 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786505 1 0.1389 0.6950 0.952 0.000 0.000 0.048
#> GSM786511 4 0.4830 0.7107 0.392 0.000 0.000 0.608
#> GSM786513 1 0.1833 0.6925 0.944 0.000 0.032 0.024
#> GSM786525 2 0.6317 0.7675 0.000 0.624 0.096 0.280
#> GSM786540 2 0.3528 0.6015 0.000 0.808 0.192 0.000
#> GSM786553 1 0.3143 0.6501 0.876 0.000 0.100 0.024
#> GSM786561 1 0.4948 -0.3576 0.560 0.000 0.000 0.440
#> GSM786575 1 0.0000 0.7021 1.000 0.000 0.000 0.000
#> GSM786494 1 0.1389 0.6950 0.952 0.000 0.000 0.048
#> GSM786504 1 0.1406 0.6968 0.960 0.000 0.016 0.024
#> GSM786510 2 0.5055 0.7984 0.000 0.624 0.008 0.368
#> GSM786514 1 0.1940 0.6760 0.924 0.000 0.000 0.076
#> GSM786516 1 0.6273 0.4171 0.636 0.000 0.264 0.100
#> GSM786520 1 0.1716 0.6853 0.936 0.000 0.000 0.064
#> GSM786521 3 0.7476 0.1460 0.412 0.000 0.412 0.176
#> GSM786536 3 0.0188 0.7732 0.000 0.000 0.996 0.004
#> GSM786542 3 0.3024 0.7580 0.000 0.148 0.852 0.000
#> GSM786546 3 0.1474 0.7527 0.052 0.000 0.948 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0290 0.7923 0.000 0.992 0.000 0.008 0.000
#> GSM786539 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786541 2 0.4675 0.6995 0.000 0.600 0.020 0.380 0.000
#> GSM786556 2 0.4675 0.6995 0.000 0.600 0.020 0.380 0.000
#> GSM786523 3 0.6586 0.3037 0.304 0.000 0.460 0.000 0.236
#> GSM786497 4 0.4138 0.8522 0.000 0.000 0.000 0.616 0.384
#> GSM786501 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786517 2 0.0703 0.7923 0.000 0.976 0.000 0.024 0.000
#> GSM786534 2 0.6584 0.4377 0.000 0.412 0.208 0.380 0.000
#> GSM786555 2 0.4675 0.6995 0.000 0.600 0.020 0.380 0.000
#> GSM786558 2 0.4675 0.6995 0.000 0.600 0.020 0.380 0.000
#> GSM786559 2 0.3289 0.7660 0.000 0.844 0.048 0.108 0.000
#> GSM786565 2 0.4675 0.6995 0.000 0.600 0.020 0.380 0.000
#> GSM786572 2 0.5575 0.5473 0.000 0.612 0.280 0.108 0.000
#> GSM786579 2 0.6519 0.4934 0.000 0.456 0.204 0.340 0.000
#> GSM786491 1 0.0703 0.8554 0.976 0.000 0.000 0.000 0.024
#> GSM786509 5 0.4572 0.6216 0.280 0.000 0.000 0.036 0.684
#> GSM786538 1 0.1544 0.8419 0.932 0.000 0.000 0.000 0.068
#> GSM786548 3 0.2932 0.7805 0.000 0.032 0.864 0.104 0.000
#> GSM786562 1 0.0955 0.8508 0.968 0.028 0.004 0.000 0.000
#> GSM786566 2 0.3321 0.6918 0.092 0.856 0.012 0.000 0.040
#> GSM786573 3 0.6657 0.3512 0.016 0.156 0.492 0.336 0.000
#> GSM786574 2 0.4639 0.7050 0.000 0.612 0.020 0.368 0.000
#> GSM786580 1 0.3143 0.7878 0.876 0.072 0.020 0.004 0.028
#> GSM786581 2 0.2519 0.7776 0.000 0.884 0.016 0.100 0.000
#> GSM786583 3 0.0671 0.8236 0.016 0.000 0.980 0.000 0.004
#> GSM786492 4 0.4138 0.8522 0.000 0.000 0.000 0.616 0.384
#> GSM786493 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786499 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786502 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786537 4 0.4138 0.8522 0.000 0.000 0.000 0.616 0.384
#> GSM786567 2 0.4639 0.7050 0.000 0.612 0.020 0.368 0.000
#> GSM786498 2 0.3556 0.6250 0.168 0.808 0.020 0.000 0.004
#> GSM786500 4 0.4138 0.8522 0.000 0.000 0.000 0.616 0.384
#> GSM786503 1 0.1282 0.8487 0.952 0.000 0.004 0.000 0.044
#> GSM786507 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786515 2 0.0162 0.7923 0.000 0.996 0.000 0.004 0.000
#> GSM786522 1 0.0510 0.8578 0.984 0.000 0.000 0.000 0.016
#> GSM786526 5 0.5178 -0.0843 0.480 0.000 0.040 0.000 0.480
#> GSM786528 1 0.2248 0.7770 0.900 0.000 0.012 0.000 0.088
#> GSM786531 3 0.0510 0.8247 0.016 0.000 0.984 0.000 0.000
#> GSM786535 3 0.1270 0.8238 0.000 0.000 0.948 0.052 0.000
#> GSM786543 5 0.1942 0.5139 0.012 0.000 0.000 0.068 0.920
#> GSM786545 3 0.2591 0.8069 0.044 0.000 0.904 0.020 0.032
#> GSM786551 1 0.0693 0.8550 0.980 0.000 0.000 0.008 0.012
#> GSM786552 3 0.1270 0.8238 0.000 0.000 0.948 0.052 0.000
#> GSM786554 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786557 5 0.3999 0.5856 0.344 0.000 0.000 0.000 0.656
#> GSM786560 5 0.1792 0.5947 0.084 0.000 0.000 0.000 0.916
#> GSM786564 3 0.4748 0.4168 0.004 0.384 0.596 0.000 0.016
#> GSM786568 3 0.0671 0.8236 0.016 0.000 0.980 0.000 0.004
#> GSM786569 5 0.4355 0.6150 0.224 0.000 0.000 0.044 0.732
#> GSM786571 3 0.0324 0.8262 0.004 0.000 0.992 0.000 0.004
#> GSM786496 2 0.4639 0.7050 0.000 0.612 0.020 0.368 0.000
#> GSM786506 1 0.4287 -0.1858 0.540 0.000 0.000 0.000 0.460
#> GSM786508 2 0.0963 0.7725 0.000 0.964 0.036 0.000 0.000
#> GSM786512 2 0.4249 0.0639 0.000 0.568 0.432 0.000 0.000
#> GSM786518 4 0.4138 0.8522 0.000 0.000 0.000 0.616 0.384
#> GSM786519 5 0.2316 0.5234 0.012 0.000 0.036 0.036 0.916
#> GSM786524 4 0.4738 0.7173 0.016 0.000 0.000 0.520 0.464
#> GSM786529 3 0.0404 0.8257 0.012 0.000 0.988 0.000 0.000
#> GSM786530 4 0.5647 0.2745 0.056 0.000 0.320 0.604 0.020
#> GSM786532 1 0.0162 0.8575 0.996 0.000 0.000 0.000 0.004
#> GSM786533 3 0.1270 0.8238 0.000 0.000 0.948 0.052 0.000
#> GSM786544 3 0.3878 0.6952 0.016 0.000 0.748 0.000 0.236
#> GSM786547 3 0.0703 0.8273 0.000 0.000 0.976 0.024 0.000
#> GSM786549 3 0.3456 0.7351 0.016 0.000 0.800 0.000 0.184
#> GSM786550 3 0.1653 0.8183 0.024 0.000 0.944 0.004 0.028
#> GSM786563 3 0.5195 0.5502 0.000 0.216 0.676 0.108 0.000
#> GSM786570 2 0.4003 0.7348 0.000 0.704 0.008 0.288 0.000
#> GSM786576 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786577 4 0.4302 0.7260 0.000 0.000 0.000 0.520 0.480
#> GSM786578 3 0.4493 0.6819 0.000 0.136 0.756 0.108 0.000
#> GSM786582 5 0.3913 0.6318 0.324 0.000 0.000 0.000 0.676
#> GSM786495 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786505 5 0.3837 0.6157 0.308 0.000 0.000 0.000 0.692
#> GSM786511 4 0.4138 0.8522 0.000 0.000 0.000 0.616 0.384
#> GSM786513 1 0.0510 0.8588 0.984 0.000 0.000 0.000 0.016
#> GSM786525 2 0.3305 0.6851 0.224 0.776 0.000 0.000 0.000
#> GSM786540 2 0.5594 0.5406 0.000 0.608 0.284 0.108 0.000
#> GSM786553 1 0.1197 0.8489 0.952 0.000 0.000 0.000 0.048
#> GSM786561 5 0.1942 0.5139 0.012 0.000 0.000 0.068 0.920
#> GSM786575 1 0.4375 -0.0744 0.576 0.000 0.000 0.004 0.420
#> GSM786494 5 0.4171 0.5793 0.396 0.000 0.000 0.000 0.604
#> GSM786504 1 0.0510 0.8588 0.984 0.000 0.000 0.000 0.016
#> GSM786510 2 0.0000 0.7920 0.000 1.000 0.000 0.000 0.000
#> GSM786514 5 0.1851 0.5974 0.088 0.000 0.000 0.000 0.912
#> GSM786516 5 0.3297 0.5047 0.068 0.000 0.084 0.000 0.848
#> GSM786520 5 0.3684 0.6268 0.280 0.000 0.000 0.000 0.720
#> GSM786521 1 0.2590 0.8185 0.908 0.020 0.040 0.004 0.028
#> GSM786536 3 0.4141 0.6882 0.028 0.000 0.736 0.000 0.236
#> GSM786542 3 0.1270 0.8238 0.000 0.000 0.948 0.052 0.000
#> GSM786546 3 0.2471 0.7832 0.136 0.000 0.864 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.0363 0.7159 0.000 0.012 0.000 0.000 0.000 0.988
#> GSM786539 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786541 2 0.3765 0.8579 0.000 0.596 0.000 0.000 0.000 0.404
#> GSM786556 2 0.3765 0.8579 0.000 0.596 0.000 0.000 0.000 0.404
#> GSM786523 3 0.5987 0.2610 0.260 0.000 0.440 0.000 0.300 0.000
#> GSM786497 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786501 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786517 6 0.0865 0.6954 0.000 0.036 0.000 0.000 0.000 0.964
#> GSM786534 2 0.3890 0.8548 0.000 0.596 0.004 0.000 0.000 0.400
#> GSM786555 2 0.3765 0.8579 0.000 0.596 0.000 0.000 0.000 0.404
#> GSM786558 2 0.3765 0.8579 0.000 0.596 0.000 0.000 0.000 0.404
#> GSM786559 6 0.2706 0.5617 0.000 0.104 0.036 0.000 0.000 0.860
#> GSM786565 2 0.3810 0.8198 0.000 0.572 0.000 0.000 0.000 0.428
#> GSM786572 6 0.4986 0.0421 0.000 0.104 0.284 0.000 0.000 0.612
#> GSM786579 2 0.5447 0.6848 0.000 0.460 0.120 0.000 0.000 0.420
#> GSM786491 5 0.0146 0.8415 0.004 0.000 0.000 0.000 0.996 0.000
#> GSM786509 1 0.4239 0.6916 0.696 0.000 0.000 0.056 0.248 0.000
#> GSM786538 5 0.1594 0.8154 0.052 0.016 0.000 0.000 0.932 0.000
#> GSM786548 3 0.1958 0.7990 0.000 0.100 0.896 0.000 0.000 0.004
#> GSM786562 5 0.0000 0.8432 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786566 6 0.3157 0.5537 0.048 0.016 0.000 0.000 0.088 0.848
#> GSM786573 2 0.5762 0.4741 0.000 0.524 0.284 0.000 0.004 0.188
#> GSM786574 6 0.3868 -0.6727 0.000 0.496 0.000 0.000 0.000 0.504
#> GSM786580 5 0.4455 0.5231 0.000 0.388 0.008 0.000 0.584 0.020
#> GSM786581 6 0.1765 0.6169 0.000 0.096 0.000 0.000 0.000 0.904
#> GSM786583 3 0.0000 0.8369 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786492 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786493 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786499 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786502 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786537 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786567 6 0.3868 -0.6629 0.000 0.492 0.000 0.000 0.000 0.508
#> GSM786498 6 0.3128 0.5024 0.000 0.012 0.008 0.000 0.168 0.812
#> GSM786500 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786503 5 0.1528 0.8171 0.048 0.016 0.000 0.000 0.936 0.000
#> GSM786507 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786515 6 0.0146 0.7222 0.000 0.004 0.000 0.000 0.000 0.996
#> GSM786522 5 0.0260 0.8391 0.008 0.000 0.000 0.000 0.992 0.000
#> GSM786526 1 0.4336 -0.0514 0.504 0.000 0.020 0.000 0.476 0.000
#> GSM786528 5 0.2003 0.7373 0.116 0.000 0.000 0.000 0.884 0.000
#> GSM786531 3 0.0000 0.8369 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786535 3 0.1141 0.8303 0.000 0.052 0.948 0.000 0.000 0.000
#> GSM786543 1 0.1075 0.7222 0.952 0.000 0.000 0.048 0.000 0.000
#> GSM786545 3 0.1856 0.8167 0.032 0.000 0.920 0.000 0.048 0.000
#> GSM786551 5 0.0000 0.8432 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786552 3 0.1141 0.8303 0.000 0.052 0.948 0.000 0.000 0.000
#> GSM786554 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786557 1 0.3853 0.6238 0.680 0.016 0.000 0.000 0.304 0.000
#> GSM786560 1 0.1075 0.7248 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM786564 3 0.3984 0.4795 0.000 0.016 0.648 0.000 0.000 0.336
#> GSM786568 3 0.0000 0.8369 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786569 1 0.3713 0.7140 0.744 0.000 0.000 0.032 0.224 0.000
#> GSM786571 3 0.0000 0.8369 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786496 6 0.3727 -0.3211 0.000 0.388 0.000 0.000 0.000 0.612
#> GSM786506 5 0.4262 -0.2510 0.476 0.016 0.000 0.000 0.508 0.000
#> GSM786508 6 0.0146 0.7215 0.000 0.000 0.004 0.000 0.000 0.996
#> GSM786512 6 0.3817 0.1068 0.000 0.000 0.432 0.000 0.000 0.568
#> GSM786518 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786519 1 0.1075 0.7222 0.952 0.000 0.000 0.048 0.000 0.000
#> GSM786524 4 0.2302 0.8579 0.120 0.000 0.000 0.872 0.008 0.000
#> GSM786529 3 0.0000 0.8369 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786530 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786532 5 0.0000 0.8432 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786533 3 0.1141 0.8303 0.000 0.052 0.948 0.000 0.000 0.000
#> GSM786544 3 0.3198 0.6845 0.260 0.000 0.740 0.000 0.000 0.000
#> GSM786547 3 0.0632 0.8360 0.000 0.024 0.976 0.000 0.000 0.000
#> GSM786549 3 0.2854 0.7285 0.208 0.000 0.792 0.000 0.000 0.000
#> GSM786550 3 0.3727 0.5810 0.000 0.388 0.612 0.000 0.000 0.000
#> GSM786563 3 0.4625 0.4737 0.000 0.104 0.680 0.000 0.000 0.216
#> GSM786570 6 0.3409 0.0490 0.000 0.300 0.000 0.000 0.000 0.700
#> GSM786576 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786577 4 0.1765 0.8948 0.096 0.000 0.000 0.904 0.000 0.000
#> GSM786578 3 0.3914 0.6525 0.000 0.104 0.768 0.000 0.000 0.128
#> GSM786582 1 0.3446 0.6792 0.692 0.000 0.000 0.000 0.308 0.000
#> GSM786495 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786505 1 0.3674 0.6629 0.716 0.016 0.000 0.000 0.268 0.000
#> GSM786511 4 0.0000 0.9702 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 5 0.0000 0.8432 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786525 6 0.2912 0.4505 0.000 0.000 0.000 0.000 0.216 0.784
#> GSM786540 6 0.5003 0.0337 0.000 0.104 0.288 0.000 0.000 0.608
#> GSM786553 5 0.1528 0.8171 0.048 0.016 0.000 0.000 0.936 0.000
#> GSM786561 1 0.1075 0.7222 0.952 0.000 0.000 0.048 0.000 0.000
#> GSM786575 1 0.6063 0.2579 0.400 0.328 0.000 0.000 0.272 0.000
#> GSM786494 1 0.3819 0.6131 0.624 0.004 0.000 0.000 0.372 0.000
#> GSM786504 5 0.0000 0.8432 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786510 6 0.0000 0.7243 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786514 1 0.1075 0.7248 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM786516 1 0.2201 0.6998 0.900 0.000 0.052 0.000 0.048 0.000
#> GSM786520 1 0.3534 0.6802 0.740 0.016 0.000 0.000 0.244 0.000
#> GSM786521 5 0.4057 0.5337 0.000 0.388 0.012 0.000 0.600 0.000
#> GSM786536 3 0.3445 0.6793 0.260 0.000 0.732 0.000 0.008 0.000
#> GSM786542 3 0.1141 0.8303 0.000 0.052 0.948 0.000 0.000 0.000
#> GSM786546 3 0.2178 0.7874 0.000 0.000 0.868 0.000 0.132 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 specimen(p) disease.state(p) k
#> CV:pam 90 4.63e-02 0.935 2
#> CV:pam 89 1.61e-03 0.159 3
#> CV:pam 77 2.14e-02 0.136 4
#> CV:pam 83 1.04e-02 0.129 5
#> CV:pam 78 1.42e-05 0.136 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 54547 rows and 93 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.275 0.767 0.845 0.4258 0.544 0.544
#> 3 3 0.395 0.617 0.781 0.3981 0.808 0.661
#> 4 4 0.595 0.698 0.824 0.2019 0.795 0.532
#> 5 5 0.631 0.634 0.798 0.0518 0.912 0.716
#> 6 6 0.641 0.539 0.748 0.0510 0.935 0.764
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
#> GSM786527 2 0.4690 0.9201 0.100 0.900
#> GSM786539 2 0.8909 0.6720 0.308 0.692
#> GSM786541 2 0.4690 0.9201 0.100 0.900
#> GSM786556 2 0.4690 0.9201 0.100 0.900
#> GSM786523 1 0.6247 0.7884 0.844 0.156
#> GSM786497 1 0.0000 0.8435 1.000 0.000
#> GSM786501 2 0.4690 0.9201 0.100 0.900
#> GSM786517 2 0.4690 0.9201 0.100 0.900
#> GSM786534 2 0.4690 0.9201 0.100 0.900
#> GSM786555 2 0.4690 0.9201 0.100 0.900
#> GSM786558 2 0.4690 0.9201 0.100 0.900
#> GSM786559 2 0.4690 0.9201 0.100 0.900
#> GSM786565 2 0.4690 0.9201 0.100 0.900
#> GSM786572 2 0.7815 0.7909 0.232 0.768
#> GSM786579 2 0.4690 0.9201 0.100 0.900
#> GSM786491 1 0.4690 0.7598 0.900 0.100
#> GSM786509 1 0.0000 0.8435 1.000 0.000
#> GSM786538 1 0.0000 0.8435 1.000 0.000
#> GSM786548 2 0.8555 0.7228 0.280 0.720
#> GSM786562 1 0.7139 0.7288 0.804 0.196
#> GSM786566 1 0.9881 0.2234 0.564 0.436
#> GSM786573 1 0.6247 0.7884 0.844 0.156
#> GSM786574 2 0.4690 0.9201 0.100 0.900
#> GSM786580 1 0.6887 0.7331 0.816 0.184
#> GSM786581 2 0.9815 0.3606 0.420 0.580
#> GSM786583 1 0.6247 0.7884 0.844 0.156
#> GSM786492 1 0.0000 0.8435 1.000 0.000
#> GSM786493 2 0.4690 0.9201 0.100 0.900
#> GSM786499 2 0.4690 0.9201 0.100 0.900
#> GSM786502 1 0.9881 0.2234 0.564 0.436
#> GSM786537 1 0.0000 0.8435 1.000 0.000
#> GSM786567 2 0.4690 0.9201 0.100 0.900
#> GSM786498 1 0.9427 0.3769 0.640 0.360
#> GSM786500 1 0.0000 0.8435 1.000 0.000
#> GSM786503 1 0.7139 0.7418 0.804 0.196
#> GSM786507 2 0.4690 0.9201 0.100 0.900
#> GSM786515 2 0.4690 0.9201 0.100 0.900
#> GSM786522 1 0.0000 0.8435 1.000 0.000
#> GSM786526 1 0.4022 0.8265 0.920 0.080
#> GSM786528 1 0.4161 0.8250 0.916 0.084
#> GSM786531 1 0.6247 0.7884 0.844 0.156
#> GSM786535 1 0.9988 0.0293 0.520 0.480
#> GSM786543 1 0.0000 0.8435 1.000 0.000
#> GSM786545 1 0.6247 0.7884 0.844 0.156
#> GSM786551 1 0.0672 0.8422 0.992 0.008
#> GSM786552 1 0.9983 0.0758 0.524 0.476
#> GSM786554 2 0.4690 0.9201 0.100 0.900
#> GSM786557 1 0.0000 0.8435 1.000 0.000
#> GSM786560 1 0.0000 0.8435 1.000 0.000
#> GSM786564 2 0.8016 0.6138 0.244 0.756
#> GSM786568 1 0.6623 0.7738 0.828 0.172
#> GSM786569 1 0.0000 0.8435 1.000 0.000
#> GSM786571 1 0.6247 0.7884 0.844 0.156
#> GSM786496 2 0.4690 0.9201 0.100 0.900
#> GSM786506 1 0.3733 0.8202 0.928 0.072
#> GSM786508 1 0.9922 0.1834 0.552 0.448
#> GSM786512 1 0.9944 0.1511 0.544 0.456
#> GSM786518 1 0.0000 0.8435 1.000 0.000
#> GSM786519 1 0.0000 0.8435 1.000 0.000
#> GSM786524 1 0.0000 0.8435 1.000 0.000
#> GSM786529 1 0.6247 0.7884 0.844 0.156
#> GSM786530 1 0.4298 0.8237 0.912 0.088
#> GSM786532 1 0.0000 0.8435 1.000 0.000
#> GSM786533 1 0.9993 0.0226 0.516 0.484
#> GSM786544 1 0.6247 0.7884 0.844 0.156
#> GSM786547 1 0.6973 0.7571 0.812 0.188
#> GSM786549 1 0.6247 0.7884 0.844 0.156
#> GSM786550 1 0.4939 0.7625 0.892 0.108
#> GSM786563 2 0.8443 0.7355 0.272 0.728
#> GSM786570 2 0.6247 0.8736 0.156 0.844
#> GSM786576 2 0.4690 0.9201 0.100 0.900
#> GSM786577 1 0.0000 0.8435 1.000 0.000
#> GSM786578 2 0.8909 0.6740 0.308 0.692
#> GSM786582 1 0.0000 0.8435 1.000 0.000
#> GSM786495 2 0.4690 0.9201 0.100 0.900
#> GSM786505 1 0.0000 0.8435 1.000 0.000
#> GSM786511 1 0.0000 0.8435 1.000 0.000
#> GSM786513 1 0.0000 0.8435 1.000 0.000
#> GSM786525 1 0.8499 0.6291 0.724 0.276
#> GSM786540 2 0.4690 0.9201 0.100 0.900
#> GSM786553 1 0.4298 0.8245 0.912 0.088
#> GSM786561 1 0.0000 0.8435 1.000 0.000
#> GSM786575 1 0.4690 0.7598 0.900 0.100
#> GSM786494 1 0.0000 0.8435 1.000 0.000
#> GSM786504 1 0.0000 0.8435 1.000 0.000
#> GSM786510 2 0.4690 0.9201 0.100 0.900
#> GSM786514 1 0.0000 0.8435 1.000 0.000
#> GSM786516 1 0.3584 0.8305 0.932 0.068
#> GSM786520 1 0.0000 0.8435 1.000 0.000
#> GSM786521 1 0.5629 0.7592 0.868 0.132
#> GSM786536 1 0.6247 0.7884 0.844 0.156
#> GSM786542 2 0.9129 0.6285 0.328 0.672
#> GSM786546 1 0.8016 0.6833 0.756 0.244
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0661 0.8364 0.008 0.988 0.004
#> GSM786539 2 0.4555 0.6576 0.200 0.800 0.000
#> GSM786541 2 0.0237 0.8384 0.000 0.996 0.004
#> GSM786556 2 0.1411 0.8205 0.000 0.964 0.036
#> GSM786523 3 0.6758 0.8296 0.360 0.020 0.620
#> GSM786497 1 0.5254 0.5843 0.736 0.000 0.264
#> GSM786501 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786534 2 0.1860 0.8102 0.000 0.948 0.052
#> GSM786555 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786559 2 0.0424 0.8372 0.008 0.992 0.000
#> GSM786565 2 0.0424 0.8371 0.008 0.992 0.000
#> GSM786572 2 0.5200 0.6668 0.184 0.796 0.020
#> GSM786579 2 0.0424 0.8360 0.000 0.992 0.008
#> GSM786491 1 0.2448 0.6787 0.924 0.000 0.076
#> GSM786509 1 0.2261 0.6872 0.932 0.000 0.068
#> GSM786538 1 0.2625 0.6717 0.916 0.000 0.084
#> GSM786548 2 0.7983 0.4662 0.228 0.648 0.124
#> GSM786562 1 0.6025 0.4616 0.740 0.232 0.028
#> GSM786566 1 0.7030 0.2116 0.580 0.396 0.024
#> GSM786573 3 0.7798 0.8473 0.296 0.080 0.624
#> GSM786574 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786580 1 0.4335 0.6551 0.864 0.036 0.100
#> GSM786581 2 0.6422 0.4423 0.324 0.660 0.016
#> GSM786583 3 0.6952 0.8181 0.376 0.024 0.600
#> GSM786492 1 0.4654 0.6159 0.792 0.000 0.208
#> GSM786493 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786502 1 0.7248 0.1594 0.536 0.436 0.028
#> GSM786537 1 0.5621 0.5532 0.692 0.000 0.308
#> GSM786567 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786498 1 0.8064 0.2954 0.588 0.328 0.084
#> GSM786500 1 0.4654 0.6159 0.792 0.000 0.208
#> GSM786503 1 0.7568 0.4746 0.680 0.212 0.108
#> GSM786507 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786515 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786522 1 0.2356 0.6749 0.928 0.000 0.072
#> GSM786526 1 0.2448 0.6698 0.924 0.000 0.076
#> GSM786528 1 0.3618 0.6467 0.884 0.012 0.104
#> GSM786531 3 0.7698 0.8495 0.304 0.072 0.624
#> GSM786535 2 0.9745 -0.2207 0.232 0.420 0.348
#> GSM786543 1 0.2796 0.6786 0.908 0.000 0.092
#> GSM786545 3 0.7152 0.6943 0.444 0.024 0.532
#> GSM786551 1 0.2550 0.6674 0.932 0.012 0.056
#> GSM786552 3 0.9750 0.3172 0.228 0.368 0.404
#> GSM786554 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786557 1 0.2537 0.6724 0.920 0.000 0.080
#> GSM786560 1 0.0892 0.6900 0.980 0.000 0.020
#> GSM786564 2 0.7569 0.4932 0.240 0.668 0.092
#> GSM786568 3 0.7798 0.8473 0.296 0.080 0.624
#> GSM786569 1 0.4291 0.6342 0.820 0.000 0.180
#> GSM786571 3 0.7107 0.8419 0.340 0.036 0.624
#> GSM786496 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786506 1 0.7391 0.4989 0.696 0.196 0.108
#> GSM786508 1 0.8405 0.0131 0.460 0.456 0.084
#> GSM786512 2 0.8493 0.3677 0.248 0.604 0.148
#> GSM786518 1 0.4654 0.6159 0.792 0.000 0.208
#> GSM786519 1 0.4399 0.6229 0.812 0.000 0.188
#> GSM786524 1 0.5948 0.4850 0.640 0.000 0.360
#> GSM786529 3 0.7798 0.8473 0.296 0.080 0.624
#> GSM786530 1 0.5465 0.4737 0.712 0.000 0.288
#> GSM786532 1 0.1289 0.6903 0.968 0.000 0.032
#> GSM786533 2 0.9488 -0.0201 0.208 0.480 0.312
#> GSM786544 3 0.6777 0.8277 0.364 0.020 0.616
#> GSM786547 3 0.8337 0.8151 0.296 0.112 0.592
#> GSM786549 3 0.6905 0.7062 0.440 0.016 0.544
#> GSM786550 1 0.5551 0.4859 0.760 0.016 0.224
#> GSM786563 2 0.8138 0.4431 0.232 0.636 0.132
#> GSM786570 2 0.3695 0.7561 0.108 0.880 0.012
#> GSM786576 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786577 1 0.5988 0.4748 0.632 0.000 0.368
#> GSM786578 2 0.7844 0.4753 0.240 0.652 0.108
#> GSM786582 1 0.0747 0.6912 0.984 0.000 0.016
#> GSM786495 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786505 1 0.2537 0.6724 0.920 0.000 0.080
#> GSM786511 1 0.5178 0.5939 0.744 0.000 0.256
#> GSM786513 1 0.1163 0.6837 0.972 0.000 0.028
#> GSM786525 1 0.7607 0.2901 0.644 0.280 0.076
#> GSM786540 2 0.1529 0.8201 0.000 0.960 0.040
#> GSM786553 1 0.5944 0.6103 0.784 0.064 0.152
#> GSM786561 1 0.3412 0.6710 0.876 0.000 0.124
#> GSM786575 1 0.2959 0.6653 0.900 0.000 0.100
#> GSM786494 1 0.0000 0.6892 1.000 0.000 0.000
#> GSM786504 1 0.0237 0.6880 0.996 0.000 0.004
#> GSM786510 2 0.0000 0.8393 0.000 1.000 0.000
#> GSM786514 1 0.1753 0.6853 0.952 0.000 0.048
#> GSM786516 1 0.5953 0.2907 0.708 0.012 0.280
#> GSM786520 1 0.2165 0.6814 0.936 0.000 0.064
#> GSM786521 1 0.3539 0.6637 0.888 0.012 0.100
#> GSM786536 1 0.6984 -0.3567 0.560 0.020 0.420
#> GSM786542 2 0.9328 0.1577 0.232 0.520 0.248
#> GSM786546 1 0.9882 -0.3929 0.408 0.312 0.280
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0469 0.8587 0.000 0.988 0.012 0.000
#> GSM786539 2 0.4332 0.7715 0.016 0.800 0.172 0.012
#> GSM786541 2 0.1118 0.8463 0.000 0.964 0.036 0.000
#> GSM786556 2 0.1211 0.8442 0.000 0.960 0.040 0.000
#> GSM786523 3 0.2342 0.7575 0.008 0.000 0.912 0.080
#> GSM786497 4 0.0937 0.8379 0.012 0.000 0.012 0.976
#> GSM786501 2 0.0804 0.8554 0.000 0.980 0.008 0.012
#> GSM786517 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786534 2 0.1716 0.8330 0.000 0.936 0.064 0.000
#> GSM786555 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0469 0.8588 0.000 0.988 0.012 0.000
#> GSM786559 2 0.0592 0.8583 0.000 0.984 0.016 0.000
#> GSM786565 2 0.0469 0.8587 0.000 0.988 0.012 0.000
#> GSM786572 2 0.3610 0.7666 0.000 0.800 0.200 0.000
#> GSM786579 2 0.0469 0.8588 0.000 0.988 0.012 0.000
#> GSM786491 1 0.5066 0.6308 0.764 0.000 0.088 0.148
#> GSM786509 4 0.5263 -0.0746 0.448 0.000 0.008 0.544
#> GSM786538 1 0.3539 0.7790 0.820 0.000 0.004 0.176
#> GSM786548 2 0.4277 0.7081 0.000 0.720 0.280 0.000
#> GSM786562 1 0.5382 0.7542 0.744 0.000 0.124 0.132
#> GSM786566 1 0.6345 0.7351 0.724 0.060 0.088 0.128
#> GSM786573 3 0.1229 0.7699 0.004 0.008 0.968 0.020
#> GSM786574 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786580 1 0.7029 0.4065 0.640 0.024 0.172 0.164
#> GSM786581 2 0.5530 0.6914 0.076 0.712 0.212 0.000
#> GSM786583 3 0.3300 0.7231 0.008 0.000 0.848 0.144
#> GSM786492 4 0.0937 0.8379 0.012 0.000 0.012 0.976
#> GSM786493 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786499 2 0.0657 0.8547 0.000 0.984 0.004 0.012
#> GSM786502 2 0.8726 0.3736 0.104 0.508 0.228 0.160
#> GSM786537 4 0.1174 0.8382 0.020 0.000 0.012 0.968
#> GSM786567 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786498 1 0.8764 0.4232 0.436 0.056 0.220 0.288
#> GSM786500 4 0.1059 0.8386 0.016 0.000 0.012 0.972
#> GSM786503 1 0.4153 0.7820 0.820 0.000 0.048 0.132
#> GSM786507 2 0.0804 0.8554 0.000 0.980 0.008 0.012
#> GSM786515 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786522 1 0.4755 0.7606 0.760 0.000 0.040 0.200
#> GSM786526 1 0.4312 0.7846 0.812 0.000 0.056 0.132
#> GSM786528 1 0.3991 0.7121 0.808 0.000 0.172 0.020
#> GSM786531 3 0.1356 0.7705 0.008 0.000 0.960 0.032
#> GSM786535 3 0.4500 0.3887 0.000 0.316 0.684 0.000
#> GSM786543 4 0.1970 0.8102 0.060 0.000 0.008 0.932
#> GSM786545 3 0.4053 0.6237 0.004 0.000 0.768 0.228
#> GSM786551 3 0.7640 0.0310 0.316 0.000 0.456 0.228
#> GSM786552 3 0.4551 0.4830 0.004 0.268 0.724 0.004
#> GSM786554 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786557 1 0.3400 0.7778 0.820 0.000 0.000 0.180
#> GSM786560 4 0.5288 -0.1719 0.472 0.000 0.008 0.520
#> GSM786564 2 0.4319 0.7413 0.012 0.760 0.228 0.000
#> GSM786568 3 0.1191 0.7705 0.004 0.004 0.968 0.024
#> GSM786569 4 0.4098 0.6107 0.204 0.000 0.012 0.784
#> GSM786571 3 0.1256 0.7710 0.008 0.000 0.964 0.028
#> GSM786496 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786506 1 0.4153 0.7820 0.820 0.000 0.048 0.132
#> GSM786508 2 0.7490 0.4739 0.052 0.568 0.300 0.080
#> GSM786512 2 0.5402 0.6067 0.016 0.652 0.324 0.008
#> GSM786518 4 0.0937 0.8379 0.012 0.000 0.012 0.976
#> GSM786519 4 0.3732 0.7561 0.092 0.000 0.056 0.852
#> GSM786524 4 0.1284 0.8384 0.024 0.000 0.012 0.964
#> GSM786529 3 0.1339 0.7705 0.004 0.008 0.964 0.024
#> GSM786530 4 0.5596 0.3252 0.036 0.000 0.332 0.632
#> GSM786532 1 0.4301 0.7771 0.816 0.000 0.064 0.120
#> GSM786533 2 0.4876 0.6267 0.004 0.672 0.320 0.004
#> GSM786544 3 0.2976 0.7402 0.008 0.000 0.872 0.120
#> GSM786547 3 0.1985 0.7588 0.004 0.040 0.940 0.016
#> GSM786549 3 0.3681 0.6914 0.008 0.000 0.816 0.176
#> GSM786550 3 0.7155 0.4178 0.300 0.000 0.536 0.164
#> GSM786563 2 0.4304 0.7039 0.000 0.716 0.284 0.000
#> GSM786570 2 0.3400 0.7777 0.000 0.820 0.180 0.000
#> GSM786576 2 0.0000 0.8586 0.000 1.000 0.000 0.000
#> GSM786577 4 0.1284 0.8384 0.024 0.000 0.012 0.964
#> GSM786578 2 0.4910 0.6972 0.020 0.704 0.276 0.000
#> GSM786582 1 0.5263 0.3742 0.544 0.000 0.008 0.448
#> GSM786495 2 0.0657 0.8547 0.000 0.984 0.004 0.012
#> GSM786505 1 0.3400 0.7778 0.820 0.000 0.000 0.180
#> GSM786511 4 0.0937 0.8379 0.012 0.000 0.012 0.976
#> GSM786513 1 0.4152 0.7851 0.808 0.000 0.032 0.160
#> GSM786525 2 0.7090 0.3135 0.372 0.496 0.132 0.000
#> GSM786540 2 0.1940 0.8294 0.000 0.924 0.076 0.000
#> GSM786553 1 0.4245 0.7559 0.820 0.000 0.116 0.064
#> GSM786561 4 0.1151 0.8366 0.024 0.000 0.008 0.968
#> GSM786575 1 0.5272 0.5490 0.752 0.000 0.136 0.112
#> GSM786494 1 0.6637 0.5795 0.572 0.000 0.104 0.324
#> GSM786504 1 0.4149 0.7855 0.812 0.000 0.036 0.152
#> GSM786510 2 0.0657 0.8547 0.000 0.984 0.004 0.012
#> GSM786514 1 0.3978 0.7736 0.796 0.000 0.012 0.192
#> GSM786516 3 0.7172 0.1937 0.140 0.000 0.484 0.376
#> GSM786520 1 0.3801 0.7521 0.780 0.000 0.000 0.220
#> GSM786521 1 0.6284 0.4361 0.664 0.000 0.172 0.164
#> GSM786536 3 0.4916 0.6378 0.184 0.000 0.760 0.056
#> GSM786542 2 0.4624 0.6324 0.000 0.660 0.340 0.000
#> GSM786546 3 0.4317 0.6235 0.016 0.196 0.784 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.1117 0.7834 0.000 0.964 0.016 0.000 0.020
#> GSM786539 5 0.7375 0.2522 0.060 0.256 0.144 0.012 0.528
#> GSM786541 2 0.0451 0.7816 0.000 0.988 0.004 0.000 0.008
#> GSM786556 2 0.0290 0.7819 0.000 0.992 0.000 0.000 0.008
#> GSM786523 3 0.2439 0.7811 0.004 0.000 0.876 0.120 0.000
#> GSM786497 4 0.1644 0.8642 0.048 0.000 0.004 0.940 0.008
#> GSM786501 2 0.4555 0.2343 0.000 0.520 0.008 0.000 0.472
#> GSM786517 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786534 2 0.0693 0.7795 0.000 0.980 0.012 0.000 0.008
#> GSM786555 2 0.0000 0.7826 0.000 1.000 0.000 0.000 0.000
#> GSM786558 2 0.0451 0.7826 0.000 0.988 0.004 0.000 0.008
#> GSM786559 2 0.1485 0.7806 0.000 0.948 0.032 0.000 0.020
#> GSM786565 2 0.0609 0.7833 0.000 0.980 0.020 0.000 0.000
#> GSM786572 2 0.3536 0.7097 0.000 0.812 0.156 0.000 0.032
#> GSM786579 2 0.0451 0.7836 0.000 0.988 0.008 0.000 0.004
#> GSM786491 1 0.4280 0.6188 0.788 0.000 0.024 0.040 0.148
#> GSM786509 1 0.4692 0.1549 0.528 0.000 0.004 0.460 0.008
#> GSM786538 1 0.2077 0.7679 0.908 0.000 0.000 0.084 0.008
#> GSM786548 2 0.3691 0.7076 0.000 0.804 0.156 0.000 0.040
#> GSM786562 1 0.4230 0.6332 0.780 0.008 0.024 0.012 0.176
#> GSM786566 1 0.5390 0.2519 0.604 0.012 0.024 0.012 0.348
#> GSM786573 3 0.1200 0.7687 0.008 0.000 0.964 0.012 0.016
#> GSM786574 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786580 5 0.6414 0.1963 0.444 0.012 0.028 0.056 0.460
#> GSM786581 2 0.5106 0.6737 0.032 0.752 0.148 0.012 0.056
#> GSM786583 3 0.2536 0.7774 0.004 0.000 0.868 0.128 0.000
#> GSM786492 4 0.1644 0.8642 0.048 0.000 0.004 0.940 0.008
#> GSM786493 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786499 2 0.4287 0.2653 0.000 0.540 0.000 0.000 0.460
#> GSM786502 5 0.6971 0.5485 0.244 0.028 0.164 0.012 0.552
#> GSM786537 4 0.2621 0.8585 0.112 0.000 0.004 0.876 0.008
#> GSM786567 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786498 5 0.6755 0.4811 0.288 0.000 0.148 0.032 0.532
#> GSM786500 4 0.2302 0.8729 0.080 0.000 0.008 0.904 0.008
#> GSM786503 1 0.2127 0.7171 0.892 0.000 0.000 0.000 0.108
#> GSM786507 2 0.4287 0.2653 0.000 0.540 0.000 0.000 0.460
#> GSM786515 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786522 1 0.2654 0.7615 0.888 0.000 0.064 0.048 0.000
#> GSM786526 1 0.2448 0.7715 0.892 0.000 0.020 0.088 0.000
#> GSM786528 1 0.2361 0.7316 0.892 0.000 0.096 0.012 0.000
#> GSM786531 3 0.0794 0.7865 0.000 0.000 0.972 0.028 0.000
#> GSM786535 2 0.5365 0.3334 0.000 0.528 0.416 0.000 0.056
#> GSM786543 4 0.2856 0.8513 0.104 0.000 0.016 0.872 0.008
#> GSM786545 3 0.2930 0.7378 0.004 0.000 0.832 0.164 0.000
#> GSM786551 1 0.6784 0.1561 0.516 0.000 0.336 0.084 0.064
#> GSM786552 2 0.5564 0.3510 0.000 0.548 0.392 0.012 0.048
#> GSM786554 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786557 1 0.2077 0.7679 0.908 0.000 0.000 0.084 0.008
#> GSM786560 1 0.4564 0.3723 0.600 0.000 0.004 0.388 0.008
#> GSM786564 2 0.4086 0.7069 0.004 0.788 0.152 0.000 0.056
#> GSM786568 3 0.0510 0.7804 0.000 0.000 0.984 0.016 0.000
#> GSM786569 4 0.3989 0.6699 0.260 0.000 0.008 0.728 0.004
#> GSM786571 3 0.0955 0.7857 0.000 0.000 0.968 0.028 0.004
#> GSM786496 2 0.0000 0.7826 0.000 1.000 0.000 0.000 0.000
#> GSM786506 1 0.2127 0.7171 0.892 0.000 0.000 0.000 0.108
#> GSM786508 5 0.8598 0.5156 0.224 0.184 0.192 0.012 0.388
#> GSM786512 2 0.8623 -0.1982 0.196 0.384 0.192 0.012 0.216
#> GSM786518 4 0.1644 0.8642 0.048 0.000 0.004 0.940 0.008
#> GSM786519 4 0.5375 0.6814 0.136 0.000 0.200 0.664 0.000
#> GSM786524 4 0.2570 0.8646 0.108 0.000 0.008 0.880 0.004
#> GSM786529 3 0.0510 0.7804 0.000 0.000 0.984 0.016 0.000
#> GSM786530 4 0.6452 0.3247 0.152 0.000 0.340 0.500 0.008
#> GSM786532 1 0.2538 0.7678 0.900 0.000 0.048 0.048 0.004
#> GSM786533 2 0.4749 0.6611 0.000 0.736 0.192 0.012 0.060
#> GSM786544 3 0.2439 0.7810 0.004 0.000 0.876 0.120 0.000
#> GSM786547 3 0.1701 0.7479 0.000 0.028 0.944 0.012 0.016
#> GSM786549 3 0.2536 0.7774 0.004 0.000 0.868 0.128 0.000
#> GSM786550 5 0.7772 0.2409 0.300 0.000 0.300 0.056 0.344
#> GSM786563 2 0.3695 0.7044 0.000 0.800 0.164 0.000 0.036
#> GSM786570 2 0.3764 0.7105 0.000 0.800 0.156 0.000 0.044
#> GSM786576 2 0.0609 0.7824 0.000 0.980 0.000 0.000 0.020
#> GSM786577 4 0.2517 0.8666 0.104 0.000 0.008 0.884 0.004
#> GSM786578 2 0.4004 0.6991 0.004 0.796 0.156 0.004 0.040
#> GSM786582 1 0.3328 0.7153 0.812 0.000 0.004 0.176 0.008
#> GSM786495 2 0.4150 0.3891 0.000 0.612 0.000 0.000 0.388
#> GSM786505 1 0.2077 0.7679 0.908 0.000 0.000 0.084 0.008
#> GSM786511 4 0.1924 0.8710 0.064 0.000 0.004 0.924 0.008
#> GSM786513 1 0.2580 0.7698 0.892 0.000 0.044 0.064 0.000
#> GSM786525 2 0.5718 0.3518 0.312 0.616 0.028 0.008 0.036
#> GSM786540 2 0.0579 0.7818 0.000 0.984 0.008 0.000 0.008
#> GSM786553 1 0.2548 0.7411 0.896 0.000 0.072 0.004 0.028
#> GSM786561 4 0.2395 0.8665 0.072 0.000 0.016 0.904 0.008
#> GSM786575 1 0.4206 0.5378 0.784 0.000 0.024 0.028 0.164
#> GSM786494 1 0.4838 0.6945 0.760 0.000 0.024 0.104 0.112
#> GSM786504 1 0.2504 0.7708 0.896 0.000 0.040 0.064 0.000
#> GSM786510 2 0.4227 0.3366 0.000 0.580 0.000 0.000 0.420
#> GSM786514 1 0.2179 0.7675 0.896 0.000 0.004 0.100 0.000
#> GSM786516 3 0.6058 0.2126 0.348 0.000 0.532 0.116 0.004
#> GSM786520 1 0.2074 0.7661 0.896 0.000 0.000 0.104 0.000
#> GSM786521 1 0.6308 -0.2637 0.484 0.008 0.028 0.056 0.424
#> GSM786536 3 0.3650 0.6355 0.176 0.000 0.796 0.028 0.000
#> GSM786542 2 0.4719 0.6053 0.000 0.696 0.248 0.000 0.056
#> GSM786546 3 0.6452 0.0269 0.048 0.352 0.540 0.008 0.052
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.1155 0.6380 0.000 0.956 0.004 0.000 0.004 0.036
#> GSM786539 6 0.6519 0.4381 0.096 0.364 0.076 0.004 0.000 0.460
#> GSM786541 2 0.3189 0.6049 0.000 0.760 0.000 0.000 0.236 0.004
#> GSM786556 2 0.3189 0.6049 0.000 0.760 0.000 0.000 0.236 0.004
#> GSM786523 3 0.1320 0.7711 0.016 0.000 0.948 0.036 0.000 0.000
#> GSM786497 4 0.0363 0.7624 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM786501 2 0.3737 0.1484 0.000 0.608 0.000 0.000 0.000 0.392
#> GSM786517 2 0.0937 0.6285 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM786534 2 0.3175 0.5938 0.000 0.744 0.000 0.000 0.256 0.000
#> GSM786555 2 0.1367 0.6441 0.000 0.944 0.000 0.000 0.044 0.012
#> GSM786558 2 0.3136 0.6081 0.000 0.768 0.004 0.000 0.228 0.000
#> GSM786559 2 0.1625 0.6222 0.000 0.928 0.012 0.000 0.000 0.060
#> GSM786565 2 0.2069 0.6447 0.000 0.908 0.004 0.000 0.068 0.020
#> GSM786572 2 0.4615 0.5456 0.000 0.748 0.056 0.000 0.072 0.124
#> GSM786579 2 0.3221 0.6112 0.000 0.772 0.004 0.000 0.220 0.004
#> GSM786491 1 0.3873 0.6108 0.780 0.000 0.028 0.004 0.168 0.020
#> GSM786509 4 0.6495 0.2979 0.368 0.000 0.016 0.472 0.056 0.088
#> GSM786538 1 0.1528 0.7082 0.944 0.000 0.000 0.016 0.012 0.028
#> GSM786548 2 0.6271 0.4144 0.000 0.516 0.056 0.000 0.304 0.124
#> GSM786562 1 0.3362 0.6626 0.840 0.000 0.028 0.000 0.052 0.080
#> GSM786566 1 0.5044 0.0923 0.520 0.000 0.028 0.004 0.020 0.428
#> GSM786573 3 0.1610 0.7516 0.000 0.000 0.916 0.000 0.000 0.084
#> GSM786574 2 0.0713 0.6330 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786580 5 0.5519 0.7749 0.212 0.000 0.008 0.008 0.620 0.152
#> GSM786581 2 0.6750 0.2409 0.140 0.604 0.080 0.000 0.084 0.092
#> GSM786583 3 0.1444 0.7616 0.000 0.000 0.928 0.072 0.000 0.000
#> GSM786492 4 0.0725 0.7624 0.012 0.000 0.012 0.976 0.000 0.000
#> GSM786493 2 0.0790 0.6327 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM786499 2 0.3737 0.1499 0.000 0.608 0.000 0.000 0.000 0.392
#> GSM786502 6 0.7133 0.0591 0.144 0.028 0.084 0.008 0.196 0.540
#> GSM786537 4 0.2613 0.6759 0.140 0.000 0.012 0.848 0.000 0.000
#> GSM786567 2 0.1267 0.6149 0.000 0.940 0.000 0.000 0.000 0.060
#> GSM786498 1 0.7428 -0.3469 0.400 0.000 0.108 0.008 0.260 0.224
#> GSM786500 4 0.1563 0.7454 0.056 0.000 0.012 0.932 0.000 0.000
#> GSM786503 1 0.1555 0.6974 0.932 0.000 0.000 0.004 0.004 0.060
#> GSM786507 2 0.3747 0.1436 0.000 0.604 0.000 0.000 0.000 0.396
#> GSM786515 2 0.0458 0.6374 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM786522 1 0.3879 0.6675 0.804 0.000 0.116 0.032 0.004 0.044
#> GSM786526 1 0.2662 0.7154 0.884 0.000 0.072 0.020 0.004 0.020
#> GSM786528 1 0.2587 0.6859 0.864 0.000 0.120 0.004 0.008 0.004
#> GSM786531 3 0.1124 0.7764 0.000 0.000 0.956 0.008 0.000 0.036
#> GSM786535 2 0.7487 0.1090 0.000 0.336 0.148 0.000 0.300 0.216
#> GSM786543 4 0.5963 0.6707 0.124 0.000 0.064 0.668 0.040 0.104
#> GSM786545 3 0.1714 0.7472 0.000 0.000 0.908 0.092 0.000 0.000
#> GSM786551 1 0.6354 0.0862 0.472 0.000 0.360 0.028 0.128 0.012
#> GSM786552 2 0.7490 0.0635 0.000 0.340 0.204 0.000 0.300 0.156
#> GSM786554 2 0.0937 0.6285 0.000 0.960 0.000 0.000 0.000 0.040
#> GSM786557 1 0.1693 0.7050 0.936 0.000 0.000 0.012 0.020 0.032
#> GSM786560 4 0.6758 0.2033 0.392 0.000 0.020 0.424 0.056 0.108
#> GSM786564 2 0.5680 0.4684 0.044 0.692 0.060 0.000 0.072 0.132
#> GSM786568 3 0.1196 0.7755 0.000 0.000 0.952 0.008 0.000 0.040
#> GSM786569 4 0.5553 0.6781 0.148 0.000 0.028 0.692 0.056 0.076
#> GSM786571 3 0.1124 0.7764 0.000 0.000 0.956 0.008 0.000 0.036
#> GSM786496 2 0.1074 0.6419 0.000 0.960 0.000 0.000 0.028 0.012
#> GSM786506 1 0.1707 0.6974 0.928 0.000 0.000 0.004 0.012 0.056
#> GSM786508 6 0.6450 0.4891 0.144 0.124 0.164 0.000 0.000 0.568
#> GSM786512 6 0.7188 0.6078 0.124 0.324 0.164 0.000 0.000 0.388
#> GSM786518 4 0.0363 0.7624 0.000 0.000 0.012 0.988 0.000 0.000
#> GSM786519 4 0.5385 0.6330 0.052 0.000 0.232 0.660 0.036 0.020
#> GSM786524 4 0.3713 0.7604 0.008 0.000 0.048 0.828 0.040 0.076
#> GSM786529 3 0.1082 0.7729 0.000 0.000 0.956 0.004 0.000 0.040
#> GSM786530 3 0.5555 0.1301 0.092 0.000 0.492 0.404 0.008 0.004
#> GSM786532 1 0.1723 0.7195 0.932 0.000 0.048 0.004 0.012 0.004
#> GSM786533 6 0.7828 0.5195 0.076 0.340 0.184 0.000 0.056 0.344
#> GSM786544 3 0.1152 0.7729 0.004 0.000 0.952 0.044 0.000 0.000
#> GSM786547 3 0.2068 0.7408 0.000 0.008 0.904 0.000 0.008 0.080
#> GSM786549 3 0.1411 0.7667 0.004 0.000 0.936 0.060 0.000 0.000
#> GSM786550 5 0.6208 0.6015 0.144 0.004 0.188 0.008 0.604 0.052
#> GSM786563 2 0.6351 0.4049 0.000 0.508 0.060 0.000 0.304 0.128
#> GSM786570 2 0.3645 0.5418 0.000 0.804 0.056 0.000 0.012 0.128
#> GSM786576 2 0.1007 0.6265 0.000 0.956 0.000 0.000 0.000 0.044
#> GSM786577 4 0.3239 0.7633 0.008 0.000 0.048 0.860 0.040 0.044
#> GSM786578 2 0.6958 0.3799 0.060 0.552 0.060 0.000 0.208 0.120
#> GSM786582 1 0.4751 0.6331 0.764 0.000 0.024 0.092 0.068 0.052
#> GSM786495 2 0.3620 0.2359 0.000 0.648 0.000 0.000 0.000 0.352
#> GSM786505 1 0.1693 0.7050 0.936 0.000 0.000 0.012 0.020 0.032
#> GSM786511 4 0.0508 0.7634 0.004 0.000 0.012 0.984 0.000 0.000
#> GSM786513 1 0.2678 0.7146 0.884 0.000 0.064 0.004 0.012 0.036
#> GSM786525 1 0.6580 -0.2090 0.428 0.416 0.028 0.000 0.072 0.056
#> GSM786540 2 0.3690 0.5695 0.000 0.700 0.000 0.000 0.288 0.012
#> GSM786553 1 0.2352 0.7035 0.900 0.000 0.040 0.004 0.004 0.052
#> GSM786561 4 0.4738 0.7430 0.028 0.000 0.072 0.764 0.040 0.096
#> GSM786575 1 0.4934 0.2144 0.580 0.000 0.028 0.000 0.364 0.028
#> GSM786494 1 0.4235 0.6039 0.760 0.000 0.028 0.016 0.176 0.020
#> GSM786504 1 0.2808 0.7141 0.880 0.000 0.056 0.008 0.012 0.044
#> GSM786510 2 0.3727 0.1625 0.000 0.612 0.000 0.000 0.000 0.388
#> GSM786514 1 0.2808 0.7051 0.876 0.000 0.024 0.060 0.000 0.040
#> GSM786516 3 0.5368 0.2325 0.344 0.000 0.568 0.036 0.000 0.052
#> GSM786520 1 0.3753 0.6353 0.800 0.000 0.008 0.144 0.016 0.032
#> GSM786521 5 0.5354 0.7599 0.252 0.000 0.008 0.008 0.624 0.108
#> GSM786536 3 0.3454 0.5486 0.224 0.000 0.760 0.012 0.000 0.004
#> GSM786542 2 0.7115 0.2182 0.000 0.396 0.092 0.000 0.304 0.208
#> GSM786546 3 0.8154 -0.1603 0.116 0.188 0.424 0.000 0.100 0.172
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 specimen(p) disease.state(p) k
#> CV:mclust 84 0.000427 0.516 2
#> CV:mclust 68 0.000546 0.694 3
#> CV:mclust 78 0.042614 0.553 4
#> CV:mclust 72 0.045444 0.432 5
#> CV:mclust 67 0.028225 0.379 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 54547 rows and 93 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.978 0.956 0.982 0.5051 0.495 0.495
#> 3 3 0.635 0.638 0.850 0.3040 0.815 0.639
#> 4 4 0.746 0.763 0.864 0.1095 0.830 0.564
#> 5 5 0.746 0.721 0.861 0.0622 0.938 0.777
#> 6 6 0.803 0.713 0.867 0.0530 0.907 0.635
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
#> GSM786527 2 0.0000 0.985 0.000 1.000
#> GSM786539 2 0.0000 0.985 0.000 1.000
#> GSM786541 2 0.0000 0.985 0.000 1.000
#> GSM786556 2 0.0000 0.985 0.000 1.000
#> GSM786523 1 0.0000 0.979 1.000 0.000
#> GSM786497 1 0.0000 0.979 1.000 0.000
#> GSM786501 2 0.0000 0.985 0.000 1.000
#> GSM786517 2 0.0000 0.985 0.000 1.000
#> GSM786534 2 0.0000 0.985 0.000 1.000
#> GSM786555 2 0.0000 0.985 0.000 1.000
#> GSM786558 2 0.0000 0.985 0.000 1.000
#> GSM786559 2 0.0000 0.985 0.000 1.000
#> GSM786565 2 0.0000 0.985 0.000 1.000
#> GSM786572 2 0.0000 0.985 0.000 1.000
#> GSM786579 2 0.0000 0.985 0.000 1.000
#> GSM786491 1 0.0000 0.979 1.000 0.000
#> GSM786509 1 0.0000 0.979 1.000 0.000
#> GSM786538 1 0.0000 0.979 1.000 0.000
#> GSM786548 2 0.0000 0.985 0.000 1.000
#> GSM786562 1 0.0000 0.979 1.000 0.000
#> GSM786566 1 0.0000 0.979 1.000 0.000
#> GSM786573 2 0.6887 0.774 0.184 0.816
#> GSM786574 2 0.0000 0.985 0.000 1.000
#> GSM786580 1 0.0000 0.979 1.000 0.000
#> GSM786581 2 0.0000 0.985 0.000 1.000
#> GSM786583 1 0.4939 0.865 0.892 0.108
#> GSM786492 1 0.0000 0.979 1.000 0.000
#> GSM786493 2 0.0000 0.985 0.000 1.000
#> GSM786499 2 0.0000 0.985 0.000 1.000
#> GSM786502 2 0.0000 0.985 0.000 1.000
#> GSM786537 1 0.0000 0.979 1.000 0.000
#> GSM786567 2 0.0000 0.985 0.000 1.000
#> GSM786498 1 0.0000 0.979 1.000 0.000
#> GSM786500 1 0.0000 0.979 1.000 0.000
#> GSM786503 1 0.0000 0.979 1.000 0.000
#> GSM786507 2 0.0000 0.985 0.000 1.000
#> GSM786515 2 0.0000 0.985 0.000 1.000
#> GSM786522 1 0.0000 0.979 1.000 0.000
#> GSM786526 1 0.0000 0.979 1.000 0.000
#> GSM786528 1 0.0000 0.979 1.000 0.000
#> GSM786531 2 0.7602 0.718 0.220 0.780
#> GSM786535 2 0.0000 0.985 0.000 1.000
#> GSM786543 1 0.0000 0.979 1.000 0.000
#> GSM786545 1 0.0000 0.979 1.000 0.000
#> GSM786551 1 0.0000 0.979 1.000 0.000
#> GSM786552 2 0.0000 0.985 0.000 1.000
#> GSM786554 2 0.0000 0.985 0.000 1.000
#> GSM786557 1 0.0000 0.979 1.000 0.000
#> GSM786560 1 0.0000 0.979 1.000 0.000
#> GSM786564 2 0.0000 0.985 0.000 1.000
#> GSM786568 2 0.0376 0.981 0.004 0.996
#> GSM786569 1 0.0000 0.979 1.000 0.000
#> GSM786571 1 0.9977 0.103 0.528 0.472
#> GSM786496 2 0.0000 0.985 0.000 1.000
#> GSM786506 1 0.0000 0.979 1.000 0.000
#> GSM786508 2 0.7299 0.742 0.204 0.796
#> GSM786512 2 0.0000 0.985 0.000 1.000
#> GSM786518 1 0.0000 0.979 1.000 0.000
#> GSM786519 1 0.0000 0.979 1.000 0.000
#> GSM786524 1 0.0000 0.979 1.000 0.000
#> GSM786529 2 0.0000 0.985 0.000 1.000
#> GSM786530 1 0.0000 0.979 1.000 0.000
#> GSM786532 1 0.0000 0.979 1.000 0.000
#> GSM786533 2 0.0000 0.985 0.000 1.000
#> GSM786544 1 0.0000 0.979 1.000 0.000
#> GSM786547 2 0.0000 0.985 0.000 1.000
#> GSM786549 1 0.0000 0.979 1.000 0.000
#> GSM786550 1 0.9635 0.365 0.612 0.388
#> GSM786563 2 0.0000 0.985 0.000 1.000
#> GSM786570 2 0.0000 0.985 0.000 1.000
#> GSM786576 2 0.0000 0.985 0.000 1.000
#> GSM786577 1 0.0000 0.979 1.000 0.000
#> GSM786578 2 0.0000 0.985 0.000 1.000
#> GSM786582 1 0.0000 0.979 1.000 0.000
#> GSM786495 2 0.0000 0.985 0.000 1.000
#> GSM786505 1 0.0000 0.979 1.000 0.000
#> GSM786511 1 0.0000 0.979 1.000 0.000
#> GSM786513 1 0.0000 0.979 1.000 0.000
#> GSM786525 2 0.1414 0.967 0.020 0.980
#> GSM786540 2 0.0000 0.985 0.000 1.000
#> GSM786553 1 0.0000 0.979 1.000 0.000
#> GSM786561 1 0.0000 0.979 1.000 0.000
#> GSM786575 1 0.0000 0.979 1.000 0.000
#> GSM786494 1 0.0000 0.979 1.000 0.000
#> GSM786504 1 0.0000 0.979 1.000 0.000
#> GSM786510 2 0.0000 0.985 0.000 1.000
#> GSM786514 1 0.0000 0.979 1.000 0.000
#> GSM786516 1 0.0000 0.979 1.000 0.000
#> GSM786520 1 0.0000 0.979 1.000 0.000
#> GSM786521 1 0.0000 0.979 1.000 0.000
#> GSM786536 1 0.0938 0.968 0.988 0.012
#> GSM786542 2 0.0000 0.985 0.000 1.000
#> GSM786546 2 0.1184 0.971 0.016 0.984
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786539 2 0.3030 0.8089 0.092 0.904 0.004
#> GSM786541 2 0.1163 0.8700 0.000 0.972 0.028
#> GSM786556 2 0.2066 0.8536 0.000 0.940 0.060
#> GSM786523 3 0.0747 0.6517 0.016 0.000 0.984
#> GSM786497 3 0.6267 0.2207 0.452 0.000 0.548
#> GSM786501 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786517 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786534 2 0.2261 0.8489 0.000 0.932 0.068
#> GSM786555 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786558 2 0.0747 0.8744 0.000 0.984 0.016
#> GSM786559 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786572 2 0.0592 0.8756 0.000 0.988 0.012
#> GSM786579 2 0.1031 0.8716 0.000 0.976 0.024
#> GSM786491 1 0.0237 0.8080 0.996 0.000 0.004
#> GSM786509 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786548 2 0.5098 0.6922 0.000 0.752 0.248
#> GSM786562 1 0.0237 0.8082 0.996 0.000 0.004
#> GSM786566 1 0.1129 0.7941 0.976 0.020 0.004
#> GSM786573 3 0.6375 0.4640 0.036 0.244 0.720
#> GSM786574 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786580 1 0.5497 0.5208 0.708 0.000 0.292
#> GSM786581 2 0.6129 0.4922 0.324 0.668 0.008
#> GSM786583 3 0.0475 0.6511 0.004 0.004 0.992
#> GSM786492 3 0.6286 0.1928 0.464 0.000 0.536
#> GSM786493 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786499 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786502 2 0.3644 0.7785 0.124 0.872 0.004
#> GSM786537 3 0.6154 0.2885 0.408 0.000 0.592
#> GSM786567 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786498 1 0.4063 0.7301 0.868 0.020 0.112
#> GSM786500 1 0.6244 0.0321 0.560 0.000 0.440
#> GSM786503 1 0.0237 0.8082 0.996 0.000 0.004
#> GSM786507 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786515 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786522 1 0.3941 0.6873 0.844 0.000 0.156
#> GSM786526 1 0.0237 0.8085 0.996 0.000 0.004
#> GSM786528 1 0.3752 0.6869 0.856 0.000 0.144
#> GSM786531 3 0.0661 0.6512 0.004 0.008 0.988
#> GSM786535 2 0.6180 0.4640 0.000 0.584 0.416
#> GSM786543 1 0.6309 -0.1537 0.500 0.000 0.500
#> GSM786545 3 0.0592 0.6521 0.012 0.000 0.988
#> GSM786551 3 0.2711 0.6314 0.088 0.000 0.912
#> GSM786552 2 0.6095 0.5035 0.000 0.608 0.392
#> GSM786554 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786564 2 0.1031 0.8721 0.000 0.976 0.024
#> GSM786568 3 0.5431 0.3350 0.000 0.284 0.716
#> GSM786569 1 0.5678 0.3792 0.684 0.000 0.316
#> GSM786571 3 0.0237 0.6496 0.000 0.004 0.996
#> GSM786496 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786506 1 0.0237 0.8082 0.996 0.000 0.004
#> GSM786508 2 0.5815 0.5413 0.304 0.692 0.004
#> GSM786512 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786518 3 0.6274 0.2126 0.456 0.000 0.544
#> GSM786519 1 0.6295 -0.0682 0.528 0.000 0.472
#> GSM786524 3 0.6235 0.2527 0.436 0.000 0.564
#> GSM786529 3 0.6140 -0.0262 0.000 0.404 0.596
#> GSM786530 3 0.5882 0.3941 0.348 0.000 0.652
#> GSM786532 1 0.1163 0.7987 0.972 0.000 0.028
#> GSM786533 2 0.0592 0.8756 0.000 0.988 0.012
#> GSM786544 3 0.0424 0.6518 0.008 0.000 0.992
#> GSM786547 2 0.6260 0.4040 0.000 0.552 0.448
#> GSM786549 3 0.0424 0.6518 0.008 0.000 0.992
#> GSM786550 3 0.2599 0.6252 0.052 0.016 0.932
#> GSM786563 2 0.5650 0.6144 0.000 0.688 0.312
#> GSM786570 2 0.0000 0.8779 0.000 1.000 0.000
#> GSM786576 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786577 3 0.6252 0.2378 0.444 0.000 0.556
#> GSM786578 2 0.4351 0.7747 0.004 0.828 0.168
#> GSM786582 1 0.2537 0.7601 0.920 0.000 0.080
#> GSM786495 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786505 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786511 3 0.6260 0.2301 0.448 0.000 0.552
#> GSM786513 1 0.5760 0.4310 0.672 0.000 0.328
#> GSM786525 2 0.6793 0.1837 0.452 0.536 0.012
#> GSM786540 2 0.1031 0.8716 0.000 0.976 0.024
#> GSM786553 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786561 1 0.6307 -0.1134 0.512 0.000 0.488
#> GSM786575 1 0.2625 0.7541 0.916 0.000 0.084
#> GSM786494 1 0.2165 0.7816 0.936 0.000 0.064
#> GSM786504 1 0.5397 0.5150 0.720 0.000 0.280
#> GSM786510 2 0.0237 0.8773 0.000 0.996 0.004
#> GSM786514 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786516 3 0.3686 0.6040 0.140 0.000 0.860
#> GSM786520 1 0.0000 0.8095 1.000 0.000 0.000
#> GSM786521 3 0.6280 0.0543 0.460 0.000 0.540
#> GSM786536 3 0.6081 0.3266 0.344 0.004 0.652
#> GSM786542 2 0.6126 0.4931 0.000 0.600 0.400
#> GSM786546 2 0.6244 0.4209 0.000 0.560 0.440
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786539 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786541 2 0.2760 0.8088 0.000 0.872 0.128 0.000
#> GSM786556 2 0.3942 0.6460 0.000 0.764 0.236 0.000
#> GSM786523 3 0.4605 0.5228 0.000 0.000 0.664 0.336
#> GSM786497 4 0.1637 0.9588 0.060 0.000 0.000 0.940
#> GSM786501 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786517 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786534 2 0.4304 0.5502 0.000 0.716 0.284 0.000
#> GSM786555 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0469 0.9217 0.000 0.988 0.012 0.000
#> GSM786559 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0817 0.9143 0.000 0.976 0.024 0.000
#> GSM786579 2 0.0592 0.9192 0.000 0.984 0.016 0.000
#> GSM786491 1 0.2739 0.8459 0.904 0.000 0.036 0.060
#> GSM786509 1 0.4941 0.1828 0.564 0.000 0.000 0.436
#> GSM786538 1 0.0188 0.8970 0.996 0.000 0.000 0.004
#> GSM786548 2 0.4996 -0.0837 0.000 0.516 0.484 0.000
#> GSM786562 1 0.1209 0.8811 0.964 0.004 0.000 0.032
#> GSM786566 1 0.1576 0.8716 0.948 0.048 0.000 0.004
#> GSM786573 3 0.6384 0.4351 0.000 0.068 0.532 0.400
#> GSM786574 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786580 3 0.6595 -0.2177 0.428 0.000 0.492 0.080
#> GSM786581 2 0.4152 0.7320 0.032 0.808 0.160 0.000
#> GSM786583 3 0.4008 0.5998 0.000 0.000 0.756 0.244
#> GSM786492 4 0.1637 0.9588 0.060 0.000 0.000 0.940
#> GSM786493 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786499 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786502 2 0.0779 0.9162 0.004 0.980 0.016 0.000
#> GSM786537 4 0.1474 0.9530 0.052 0.000 0.000 0.948
#> GSM786567 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786498 1 0.7443 0.4760 0.564 0.012 0.232 0.192
#> GSM786500 4 0.1637 0.9588 0.060 0.000 0.000 0.940
#> GSM786503 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786507 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786515 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786522 1 0.1174 0.8910 0.968 0.000 0.020 0.012
#> GSM786526 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786528 1 0.0804 0.8962 0.980 0.000 0.012 0.008
#> GSM786531 3 0.4164 0.5886 0.000 0.000 0.736 0.264
#> GSM786535 3 0.3942 0.6475 0.000 0.236 0.764 0.000
#> GSM786543 4 0.1792 0.9542 0.068 0.000 0.000 0.932
#> GSM786545 3 0.4804 0.4722 0.000 0.000 0.616 0.384
#> GSM786551 3 0.5203 0.4192 0.008 0.000 0.576 0.416
#> GSM786552 3 0.4164 0.6196 0.000 0.264 0.736 0.000
#> GSM786554 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786557 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786560 1 0.4008 0.6334 0.756 0.000 0.000 0.244
#> GSM786564 2 0.6172 0.4936 0.008 0.636 0.296 0.060
#> GSM786568 3 0.7171 0.5236 0.000 0.212 0.556 0.232
#> GSM786569 4 0.2401 0.9243 0.092 0.000 0.004 0.904
#> GSM786571 3 0.3074 0.6247 0.000 0.000 0.848 0.152
#> GSM786496 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786506 1 0.0188 0.8993 0.996 0.000 0.000 0.004
#> GSM786508 2 0.1151 0.9035 0.024 0.968 0.008 0.000
#> GSM786512 2 0.0336 0.9232 0.000 0.992 0.008 0.000
#> GSM786518 4 0.1637 0.9588 0.060 0.000 0.000 0.940
#> GSM786519 4 0.1824 0.9584 0.060 0.000 0.004 0.936
#> GSM786524 4 0.2101 0.9534 0.060 0.000 0.012 0.928
#> GSM786529 3 0.5209 0.6630 0.000 0.140 0.756 0.104
#> GSM786530 4 0.1854 0.9481 0.048 0.000 0.012 0.940
#> GSM786532 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786533 2 0.0188 0.9261 0.000 0.996 0.004 0.000
#> GSM786544 3 0.4855 0.4127 0.000 0.000 0.600 0.400
#> GSM786547 3 0.3942 0.6475 0.000 0.236 0.764 0.000
#> GSM786549 3 0.4454 0.5520 0.000 0.000 0.692 0.308
#> GSM786550 3 0.2271 0.5735 0.008 0.000 0.916 0.076
#> GSM786563 3 0.4916 0.3254 0.000 0.424 0.576 0.000
#> GSM786570 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786577 4 0.1824 0.9584 0.060 0.000 0.004 0.936
#> GSM786578 3 0.4818 0.6158 0.000 0.216 0.748 0.036
#> GSM786582 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786495 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786505 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786511 4 0.1637 0.9588 0.060 0.000 0.000 0.940
#> GSM786513 1 0.2174 0.8677 0.928 0.000 0.052 0.020
#> GSM786525 1 0.2413 0.8401 0.916 0.064 0.020 0.000
#> GSM786540 2 0.2868 0.7986 0.000 0.864 0.136 0.000
#> GSM786553 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786561 4 0.1970 0.9563 0.060 0.000 0.008 0.932
#> GSM786575 1 0.6091 0.5171 0.596 0.000 0.344 0.060
#> GSM786494 1 0.4576 0.7084 0.748 0.000 0.232 0.020
#> GSM786504 1 0.1356 0.8873 0.960 0.000 0.032 0.008
#> GSM786510 2 0.0000 0.9281 0.000 1.000 0.000 0.000
#> GSM786514 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786516 4 0.6058 0.4019 0.072 0.000 0.296 0.632
#> GSM786520 1 0.0336 0.9001 0.992 0.000 0.000 0.008
#> GSM786521 3 0.6351 0.0709 0.332 0.000 0.588 0.080
#> GSM786536 3 0.5558 0.3811 0.364 0.000 0.608 0.028
#> GSM786542 3 0.4304 0.5902 0.000 0.284 0.716 0.000
#> GSM786546 3 0.3907 0.6503 0.000 0.232 0.768 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0451 0.8588 0.000 0.988 0.008 0.000 0.004
#> GSM786539 2 0.0290 0.8591 0.000 0.992 0.008 0.000 0.000
#> GSM786541 2 0.5181 0.4915 0.000 0.652 0.268 0.000 0.080
#> GSM786556 2 0.6011 0.1960 0.000 0.528 0.344 0.000 0.128
#> GSM786523 3 0.3323 0.6427 0.000 0.000 0.844 0.100 0.056
#> GSM786497 4 0.0162 0.8535 0.000 0.000 0.000 0.996 0.004
#> GSM786501 2 0.0162 0.8599 0.000 0.996 0.000 0.000 0.004
#> GSM786517 2 0.0162 0.8599 0.000 0.996 0.000 0.000 0.004
#> GSM786534 2 0.6090 0.1613 0.000 0.516 0.348 0.000 0.136
#> GSM786555 2 0.0794 0.8593 0.000 0.972 0.000 0.000 0.028
#> GSM786558 2 0.1981 0.8391 0.000 0.924 0.048 0.000 0.028
#> GSM786559 2 0.1704 0.8340 0.000 0.928 0.068 0.000 0.004
#> GSM786565 2 0.0880 0.8593 0.000 0.968 0.000 0.000 0.032
#> GSM786572 2 0.5120 0.5989 0.000 0.684 0.212 0.000 0.104
#> GSM786579 2 0.3535 0.7607 0.000 0.808 0.164 0.000 0.028
#> GSM786491 1 0.0609 0.9058 0.980 0.000 0.000 0.000 0.020
#> GSM786509 1 0.2648 0.7808 0.848 0.000 0.000 0.152 0.000
#> GSM786538 1 0.0290 0.9129 0.992 0.000 0.008 0.000 0.000
#> GSM786548 3 0.6146 0.1885 0.000 0.376 0.488 0.000 0.136
#> GSM786562 1 0.0000 0.9131 1.000 0.000 0.000 0.000 0.000
#> GSM786566 1 0.1329 0.8946 0.956 0.032 0.008 0.004 0.000
#> GSM786573 3 0.7120 0.3064 0.000 0.052 0.460 0.356 0.132
#> GSM786574 2 0.0703 0.8596 0.000 0.976 0.000 0.000 0.024
#> GSM786580 5 0.3770 0.8633 0.124 0.000 0.032 0.020 0.824
#> GSM786581 2 0.4496 0.6842 0.072 0.764 0.008 0.000 0.156
#> GSM786583 3 0.1597 0.6834 0.000 0.000 0.940 0.012 0.048
#> GSM786492 4 0.0162 0.8535 0.000 0.000 0.000 0.996 0.004
#> GSM786493 2 0.0794 0.8593 0.000 0.972 0.000 0.000 0.028
#> GSM786499 2 0.0162 0.8599 0.000 0.996 0.000 0.000 0.004
#> GSM786502 2 0.4013 0.7476 0.000 0.804 0.084 0.004 0.108
#> GSM786537 4 0.0404 0.8502 0.000 0.000 0.000 0.988 0.012
#> GSM786567 2 0.0162 0.8607 0.000 0.996 0.000 0.000 0.004
#> GSM786498 4 0.8358 -0.1576 0.064 0.192 0.036 0.384 0.324
#> GSM786500 4 0.0162 0.8535 0.000 0.000 0.000 0.996 0.004
#> GSM786503 1 0.0290 0.9129 0.992 0.000 0.008 0.000 0.000
#> GSM786507 2 0.0162 0.8599 0.000 0.996 0.000 0.000 0.004
#> GSM786515 2 0.0794 0.8593 0.000 0.972 0.000 0.000 0.028
#> GSM786522 1 0.1300 0.8999 0.956 0.000 0.028 0.000 0.016
#> GSM786526 1 0.3365 0.7978 0.836 0.000 0.120 0.000 0.044
#> GSM786528 1 0.1648 0.8941 0.940 0.000 0.040 0.000 0.020
#> GSM786531 3 0.1597 0.6720 0.000 0.000 0.940 0.012 0.048
#> GSM786535 3 0.2660 0.6607 0.000 0.008 0.864 0.000 0.128
#> GSM786543 4 0.1018 0.8446 0.016 0.000 0.016 0.968 0.000
#> GSM786545 3 0.1892 0.6719 0.000 0.000 0.916 0.080 0.004
#> GSM786551 4 0.4865 0.0482 0.008 0.000 0.428 0.552 0.012
#> GSM786552 3 0.5136 0.5676 0.000 0.180 0.692 0.000 0.128
#> GSM786554 2 0.0703 0.8596 0.000 0.976 0.000 0.000 0.024
#> GSM786557 1 0.0000 0.9131 1.000 0.000 0.000 0.000 0.000
#> GSM786560 1 0.1564 0.8958 0.948 0.000 0.024 0.004 0.024
#> GSM786564 5 0.2946 0.7678 0.000 0.088 0.044 0.000 0.868
#> GSM786568 3 0.5580 0.3638 0.000 0.020 0.620 0.304 0.056
#> GSM786569 4 0.3949 0.4223 0.332 0.000 0.000 0.668 0.000
#> GSM786571 3 0.1956 0.6744 0.000 0.000 0.916 0.008 0.076
#> GSM786496 2 0.0955 0.8590 0.000 0.968 0.004 0.000 0.028
#> GSM786506 1 0.0290 0.9129 0.992 0.000 0.008 0.000 0.000
#> GSM786508 2 0.3010 0.7095 0.000 0.824 0.172 0.000 0.004
#> GSM786512 2 0.3715 0.5799 0.000 0.736 0.260 0.000 0.004
#> GSM786518 4 0.0162 0.8535 0.000 0.000 0.000 0.996 0.004
#> GSM786519 4 0.2426 0.7933 0.000 0.000 0.064 0.900 0.036
#> GSM786524 4 0.1043 0.8402 0.000 0.000 0.040 0.960 0.000
#> GSM786529 3 0.2513 0.6677 0.000 0.000 0.876 0.008 0.116
#> GSM786530 4 0.0000 0.8532 0.000 0.000 0.000 1.000 0.000
#> GSM786532 1 0.0000 0.9131 1.000 0.000 0.000 0.000 0.000
#> GSM786533 2 0.2249 0.8187 0.000 0.896 0.096 0.000 0.008
#> GSM786544 3 0.4548 0.5207 0.000 0.000 0.716 0.232 0.052
#> GSM786547 3 0.2358 0.6705 0.000 0.008 0.888 0.000 0.104
#> GSM786549 3 0.3692 0.6168 0.000 0.000 0.812 0.136 0.052
#> GSM786550 5 0.1732 0.7658 0.000 0.000 0.080 0.000 0.920
#> GSM786563 3 0.5778 0.4635 0.000 0.272 0.596 0.000 0.132
#> GSM786570 2 0.2654 0.8106 0.000 0.884 0.084 0.000 0.032
#> GSM786576 2 0.0000 0.8604 0.000 1.000 0.000 0.000 0.000
#> GSM786577 4 0.0510 0.8490 0.000 0.000 0.016 0.984 0.000
#> GSM786578 3 0.6216 0.4292 0.000 0.208 0.548 0.000 0.244
#> GSM786582 1 0.0880 0.9013 0.968 0.000 0.000 0.032 0.000
#> GSM786495 2 0.0162 0.8599 0.000 0.996 0.000 0.000 0.004
#> GSM786505 1 0.0000 0.9131 1.000 0.000 0.000 0.000 0.000
#> GSM786511 4 0.0162 0.8535 0.000 0.000 0.000 0.996 0.004
#> GSM786513 1 0.5043 0.4384 0.600 0.000 0.356 0.000 0.044
#> GSM786525 1 0.1243 0.8961 0.960 0.004 0.008 0.000 0.028
#> GSM786540 2 0.4969 0.3659 0.000 0.588 0.376 0.000 0.036
#> GSM786553 1 0.0290 0.9129 0.992 0.000 0.008 0.000 0.000
#> GSM786561 4 0.1892 0.8064 0.000 0.000 0.080 0.916 0.004
#> GSM786575 5 0.3300 0.7939 0.204 0.000 0.000 0.004 0.792
#> GSM786494 1 0.4418 0.3958 0.652 0.000 0.000 0.016 0.332
#> GSM786504 1 0.2516 0.7980 0.860 0.000 0.140 0.000 0.000
#> GSM786510 2 0.0798 0.8590 0.000 0.976 0.008 0.000 0.016
#> GSM786514 1 0.0566 0.9128 0.984 0.000 0.012 0.000 0.004
#> GSM786516 3 0.5473 0.1861 0.008 0.000 0.548 0.396 0.048
#> GSM786520 1 0.0000 0.9131 1.000 0.000 0.000 0.000 0.000
#> GSM786521 5 0.3722 0.8641 0.120 0.000 0.032 0.020 0.828
#> GSM786536 3 0.5518 0.5339 0.152 0.052 0.720 0.004 0.072
#> GSM786542 3 0.5258 0.5615 0.000 0.180 0.680 0.000 0.140
#> GSM786546 3 0.1365 0.6819 0.004 0.004 0.952 0.000 0.040
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.2257 0.7737 0.000 0.116 0.000 0.000 0.008 0.876
#> GSM786539 6 0.0146 0.8315 0.000 0.004 0.000 0.000 0.000 0.996
#> GSM786541 2 0.4128 0.0206 0.000 0.504 0.004 0.000 0.004 0.488
#> GSM786556 2 0.4041 0.2500 0.000 0.584 0.004 0.000 0.004 0.408
#> GSM786523 3 0.0000 0.8479 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786497 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786501 6 0.1462 0.8171 0.000 0.056 0.000 0.000 0.008 0.936
#> GSM786517 6 0.0717 0.8304 0.000 0.016 0.000 0.000 0.008 0.976
#> GSM786534 2 0.3954 0.3295 0.000 0.620 0.004 0.000 0.004 0.372
#> GSM786555 6 0.2260 0.7684 0.000 0.140 0.000 0.000 0.000 0.860
#> GSM786558 6 0.3050 0.6498 0.000 0.236 0.000 0.000 0.000 0.764
#> GSM786559 6 0.4093 0.1494 0.000 0.476 0.000 0.000 0.008 0.516
#> GSM786565 6 0.2527 0.7443 0.000 0.168 0.000 0.000 0.000 0.832
#> GSM786572 2 0.2264 0.6388 0.000 0.888 0.004 0.000 0.012 0.096
#> GSM786579 2 0.2070 0.6331 0.000 0.892 0.000 0.000 0.008 0.100
#> GSM786491 1 0.0458 0.9351 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM786509 1 0.1556 0.8707 0.920 0.000 0.000 0.080 0.000 0.000
#> GSM786538 1 0.0363 0.9420 0.988 0.012 0.000 0.000 0.000 0.000
#> GSM786548 2 0.2114 0.6840 0.000 0.904 0.076 0.000 0.008 0.012
#> GSM786562 1 0.0000 0.9425 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786566 1 0.0862 0.9342 0.972 0.016 0.000 0.004 0.000 0.008
#> GSM786573 2 0.6530 0.3281 0.000 0.508 0.040 0.268 0.008 0.176
#> GSM786574 6 0.1501 0.8095 0.000 0.076 0.000 0.000 0.000 0.924
#> GSM786580 5 0.0520 0.8187 0.008 0.008 0.000 0.000 0.984 0.000
#> GSM786581 6 0.4298 0.7235 0.024 0.116 0.000 0.000 0.096 0.764
#> GSM786583 3 0.2442 0.7031 0.000 0.144 0.852 0.000 0.004 0.000
#> GSM786492 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786493 6 0.1387 0.8122 0.000 0.068 0.000 0.000 0.000 0.932
#> GSM786499 6 0.1333 0.8202 0.000 0.048 0.000 0.000 0.008 0.944
#> GSM786502 6 0.4639 0.1690 0.000 0.448 0.000 0.000 0.040 0.512
#> GSM786537 4 0.0865 0.8587 0.000 0.000 0.000 0.964 0.036 0.000
#> GSM786567 6 0.0363 0.8300 0.000 0.012 0.000 0.000 0.000 0.988
#> GSM786498 4 0.5610 0.5056 0.004 0.136 0.000 0.644 0.036 0.180
#> GSM786500 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786503 1 0.0363 0.9420 0.988 0.012 0.000 0.000 0.000 0.000
#> GSM786507 6 0.0806 0.8295 0.000 0.020 0.000 0.000 0.008 0.972
#> GSM786515 6 0.1204 0.8172 0.000 0.056 0.000 0.000 0.000 0.944
#> GSM786522 1 0.0000 0.9425 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786526 3 0.4123 0.1860 0.420 0.012 0.568 0.000 0.000 0.000
#> GSM786528 1 0.1074 0.9257 0.960 0.012 0.028 0.000 0.000 0.000
#> GSM786531 3 0.1501 0.8034 0.000 0.076 0.924 0.000 0.000 0.000
#> GSM786535 2 0.2909 0.6665 0.000 0.828 0.156 0.000 0.012 0.004
#> GSM786543 4 0.0363 0.8702 0.012 0.000 0.000 0.988 0.000 0.000
#> GSM786545 2 0.4165 0.2913 0.000 0.536 0.452 0.012 0.000 0.000
#> GSM786551 4 0.2365 0.8099 0.008 0.012 0.084 0.892 0.004 0.000
#> GSM786552 2 0.2773 0.6637 0.000 0.828 0.164 0.000 0.004 0.004
#> GSM786554 6 0.0458 0.8292 0.000 0.016 0.000 0.000 0.000 0.984
#> GSM786557 1 0.0000 0.9425 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786560 1 0.0000 0.9425 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786564 5 0.2823 0.6335 0.000 0.204 0.000 0.000 0.796 0.000
#> GSM786568 3 0.1003 0.8433 0.000 0.020 0.964 0.016 0.000 0.000
#> GSM786569 4 0.3578 0.4541 0.340 0.000 0.000 0.660 0.000 0.000
#> GSM786571 3 0.1082 0.8357 0.000 0.040 0.956 0.000 0.004 0.000
#> GSM786496 6 0.2491 0.7484 0.000 0.164 0.000 0.000 0.000 0.836
#> GSM786506 1 0.0363 0.9420 0.988 0.012 0.000 0.000 0.000 0.000
#> GSM786508 6 0.2058 0.8104 0.000 0.056 0.016 0.004 0.008 0.916
#> GSM786512 6 0.3858 0.6277 0.000 0.044 0.216 0.000 0.000 0.740
#> GSM786518 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786519 4 0.3717 0.4070 0.000 0.000 0.384 0.616 0.000 0.000
#> GSM786524 4 0.0458 0.8702 0.000 0.000 0.016 0.984 0.000 0.000
#> GSM786529 2 0.3161 0.6248 0.000 0.776 0.216 0.000 0.008 0.000
#> GSM786530 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786532 1 0.0000 0.9425 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786533 2 0.4556 -0.0864 0.000 0.516 0.020 0.000 0.008 0.456
#> GSM786544 3 0.0146 0.8475 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM786547 2 0.3874 0.4256 0.000 0.636 0.356 0.000 0.008 0.000
#> GSM786549 3 0.0000 0.8479 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786550 5 0.0260 0.8158 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM786563 2 0.2326 0.6832 0.000 0.888 0.092 0.000 0.008 0.012
#> GSM786570 6 0.4175 0.1559 0.000 0.464 0.000 0.000 0.012 0.524
#> GSM786576 6 0.0405 0.8314 0.000 0.008 0.000 0.000 0.004 0.988
#> GSM786577 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786578 2 0.2787 0.6738 0.000 0.872 0.072 0.000 0.044 0.012
#> GSM786582 1 0.0260 0.9396 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM786495 6 0.1049 0.8262 0.000 0.032 0.000 0.000 0.008 0.960
#> GSM786505 1 0.0260 0.9425 0.992 0.008 0.000 0.000 0.000 0.000
#> GSM786511 4 0.0000 0.8759 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 1 0.3706 0.3668 0.620 0.000 0.380 0.000 0.000 0.000
#> GSM786525 1 0.3820 0.6731 0.780 0.072 0.004 0.000 0.000 0.144
#> GSM786540 2 0.2314 0.6781 0.000 0.900 0.056 0.000 0.008 0.036
#> GSM786553 1 0.0363 0.9420 0.988 0.012 0.000 0.000 0.000 0.000
#> GSM786561 4 0.2996 0.6830 0.000 0.000 0.228 0.772 0.000 0.000
#> GSM786575 5 0.0713 0.8110 0.028 0.000 0.000 0.000 0.972 0.000
#> GSM786494 5 0.3851 0.1114 0.460 0.000 0.000 0.000 0.540 0.000
#> GSM786504 1 0.1444 0.8821 0.928 0.000 0.072 0.000 0.000 0.000
#> GSM786510 6 0.0146 0.8314 0.000 0.004 0.000 0.000 0.000 0.996
#> GSM786514 1 0.0363 0.9420 0.988 0.012 0.000 0.000 0.000 0.000
#> GSM786516 3 0.0937 0.8261 0.000 0.000 0.960 0.040 0.000 0.000
#> GSM786520 1 0.0000 0.9425 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786521 5 0.0405 0.8181 0.004 0.008 0.000 0.000 0.988 0.000
#> GSM786536 3 0.3692 0.6204 0.012 0.028 0.776 0.000 0.000 0.184
#> GSM786542 2 0.2504 0.6724 0.000 0.856 0.136 0.000 0.004 0.004
#> GSM786546 2 0.3860 0.2560 0.000 0.528 0.472 0.000 0.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 specimen(p) disease.state(p) k
#> CV:NMF 91 0.02412 0.901 2
#> CV:NMF 68 0.01817 0.542 3
#> CV:NMF 80 0.00467 0.373 4
#> CV:NMF 78 0.10569 0.467 5
#> CV:NMF 77 0.48827 0.846 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 54547 rows and 93 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.417 0.709 0.865 0.4673 0.531 0.531
#> 3 3 0.388 0.569 0.718 0.3345 0.769 0.577
#> 4 4 0.476 0.592 0.734 0.0963 0.910 0.752
#> 5 5 0.601 0.633 0.796 0.0938 0.930 0.780
#> 6 6 0.617 0.573 0.730 0.0560 0.927 0.723
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
#> GSM786527 2 0.0000 0.881 0.000 1.000
#> GSM786539 1 0.9998 0.249 0.508 0.492
#> GSM786541 2 0.0000 0.881 0.000 1.000
#> GSM786556 2 0.0000 0.881 0.000 1.000
#> GSM786523 1 0.8713 0.616 0.708 0.292
#> GSM786497 1 0.0000 0.808 1.000 0.000
#> GSM786501 2 1.0000 -0.248 0.496 0.504
#> GSM786517 2 0.0000 0.881 0.000 1.000
#> GSM786534 2 0.0000 0.881 0.000 1.000
#> GSM786555 2 0.0000 0.881 0.000 1.000
#> GSM786558 2 0.0000 0.881 0.000 1.000
#> GSM786559 2 0.0000 0.881 0.000 1.000
#> GSM786565 2 0.0000 0.881 0.000 1.000
#> GSM786572 2 0.0376 0.881 0.004 0.996
#> GSM786579 2 0.1843 0.872 0.028 0.972
#> GSM786491 1 0.1184 0.809 0.984 0.016
#> GSM786509 1 0.0000 0.808 1.000 0.000
#> GSM786538 1 0.1843 0.810 0.972 0.028
#> GSM786548 2 0.0672 0.880 0.008 0.992
#> GSM786562 1 0.6801 0.744 0.820 0.180
#> GSM786566 1 0.6887 0.742 0.816 0.184
#> GSM786573 2 0.7376 0.690 0.208 0.792
#> GSM786574 2 0.0000 0.881 0.000 1.000
#> GSM786580 1 0.9044 0.621 0.680 0.320
#> GSM786581 2 0.5519 0.788 0.128 0.872
#> GSM786583 1 0.9686 0.469 0.604 0.396
#> GSM786492 1 0.0000 0.808 1.000 0.000
#> GSM786493 2 0.1414 0.875 0.020 0.980
#> GSM786499 1 0.9977 0.307 0.528 0.472
#> GSM786502 1 0.7815 0.710 0.768 0.232
#> GSM786537 1 0.0000 0.808 1.000 0.000
#> GSM786567 2 0.0000 0.881 0.000 1.000
#> GSM786498 1 0.7815 0.710 0.768 0.232
#> GSM786500 1 0.0000 0.808 1.000 0.000
#> GSM786503 1 0.7056 0.737 0.808 0.192
#> GSM786507 2 1.0000 -0.260 0.500 0.500
#> GSM786515 2 0.2603 0.861 0.044 0.956
#> GSM786522 1 0.1843 0.810 0.972 0.028
#> GSM786526 1 0.2043 0.810 0.968 0.032
#> GSM786528 1 0.2043 0.810 0.968 0.032
#> GSM786531 1 0.9754 0.449 0.592 0.408
#> GSM786535 2 0.6973 0.719 0.188 0.812
#> GSM786543 1 0.0000 0.808 1.000 0.000
#> GSM786545 1 0.9044 0.576 0.680 0.320
#> GSM786551 1 0.3733 0.802 0.928 0.072
#> GSM786552 2 0.8144 0.608 0.252 0.748
#> GSM786554 2 0.0000 0.881 0.000 1.000
#> GSM786557 1 0.0000 0.808 1.000 0.000
#> GSM786560 1 0.0000 0.808 1.000 0.000
#> GSM786564 2 0.0000 0.881 0.000 1.000
#> GSM786568 1 0.9963 0.297 0.536 0.464
#> GSM786569 1 0.0000 0.808 1.000 0.000
#> GSM786571 1 0.9881 0.373 0.564 0.436
#> GSM786496 2 0.0000 0.881 0.000 1.000
#> GSM786506 1 0.6973 0.739 0.812 0.188
#> GSM786508 1 0.8661 0.656 0.712 0.288
#> GSM786512 1 0.8661 0.656 0.712 0.288
#> GSM786518 1 0.0000 0.808 1.000 0.000
#> GSM786519 1 0.0000 0.808 1.000 0.000
#> GSM786524 1 0.0000 0.808 1.000 0.000
#> GSM786529 1 0.9970 0.288 0.532 0.468
#> GSM786530 1 0.3733 0.797 0.928 0.072
#> GSM786532 1 0.1843 0.810 0.972 0.028
#> GSM786533 2 0.9795 0.106 0.416 0.584
#> GSM786544 1 0.9608 0.499 0.616 0.384
#> GSM786547 1 0.9970 0.288 0.532 0.468
#> GSM786549 1 0.9552 0.509 0.624 0.376
#> GSM786550 1 0.9044 0.621 0.680 0.320
#> GSM786563 2 0.0672 0.880 0.008 0.992
#> GSM786570 2 0.0000 0.881 0.000 1.000
#> GSM786576 2 0.0000 0.881 0.000 1.000
#> GSM786577 1 0.0000 0.808 1.000 0.000
#> GSM786578 2 0.2423 0.865 0.040 0.960
#> GSM786582 1 0.0000 0.808 1.000 0.000
#> GSM786495 1 0.9988 0.285 0.520 0.480
#> GSM786505 1 0.0000 0.808 1.000 0.000
#> GSM786511 1 0.0000 0.808 1.000 0.000
#> GSM786513 1 0.1843 0.810 0.972 0.028
#> GSM786525 2 0.7815 0.658 0.232 0.768
#> GSM786540 2 0.2423 0.866 0.040 0.960
#> GSM786553 1 0.4022 0.799 0.920 0.080
#> GSM786561 1 0.0000 0.808 1.000 0.000
#> GSM786575 1 0.1184 0.809 0.984 0.016
#> GSM786494 1 0.1184 0.809 0.984 0.016
#> GSM786504 1 0.1843 0.810 0.972 0.028
#> GSM786510 1 0.9881 0.397 0.564 0.436
#> GSM786514 1 0.2043 0.810 0.968 0.032
#> GSM786516 1 0.8661 0.620 0.712 0.288
#> GSM786520 1 0.0000 0.808 1.000 0.000
#> GSM786521 1 0.9044 0.621 0.680 0.320
#> GSM786536 1 0.5519 0.774 0.872 0.128
#> GSM786542 2 0.7219 0.702 0.200 0.800
#> GSM786546 2 0.6973 0.719 0.188 0.812
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0592 0.8783 0.000 0.988 0.012
#> GSM786539 3 0.9537 0.4322 0.224 0.296 0.480
#> GSM786541 2 0.1964 0.8611 0.000 0.944 0.056
#> GSM786556 2 0.1964 0.8611 0.000 0.944 0.056
#> GSM786523 1 0.9364 -0.2112 0.456 0.172 0.372
#> GSM786497 1 0.4452 0.6198 0.808 0.000 0.192
#> GSM786501 3 0.9674 0.4218 0.224 0.336 0.440
#> GSM786517 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786534 2 0.2261 0.8614 0.000 0.932 0.068
#> GSM786555 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786558 2 0.0592 0.8779 0.000 0.988 0.012
#> GSM786559 2 0.0747 0.8780 0.000 0.984 0.016
#> GSM786565 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786572 2 0.0237 0.8776 0.000 0.996 0.004
#> GSM786579 2 0.1753 0.8729 0.000 0.952 0.048
#> GSM786491 1 0.6095 0.4679 0.608 0.000 0.392
#> GSM786509 1 0.3941 0.6356 0.844 0.000 0.156
#> GSM786538 1 0.4531 0.6144 0.824 0.008 0.168
#> GSM786548 2 0.2448 0.8631 0.000 0.924 0.076
#> GSM786562 3 0.7121 0.1137 0.428 0.024 0.548
#> GSM786566 3 0.7112 0.1276 0.424 0.024 0.552
#> GSM786573 2 0.7458 0.5784 0.084 0.672 0.244
#> GSM786574 2 0.0747 0.8779 0.000 0.984 0.016
#> GSM786580 3 0.7059 0.4186 0.164 0.112 0.724
#> GSM786581 2 0.5016 0.6919 0.000 0.760 0.240
#> GSM786583 3 0.9408 0.4225 0.316 0.196 0.488
#> GSM786492 1 0.3816 0.6343 0.852 0.000 0.148
#> GSM786493 2 0.3267 0.8195 0.000 0.884 0.116
#> GSM786499 3 0.9717 0.4007 0.248 0.304 0.448
#> GSM786502 3 0.7001 0.2860 0.340 0.032 0.628
#> GSM786537 1 0.0747 0.6507 0.984 0.000 0.016
#> GSM786567 2 0.0892 0.8769 0.000 0.980 0.020
#> GSM786498 3 0.7001 0.2860 0.340 0.032 0.628
#> GSM786500 1 0.3879 0.6363 0.848 0.000 0.152
#> GSM786503 3 0.7203 0.1490 0.416 0.028 0.556
#> GSM786507 3 0.9601 0.4310 0.224 0.312 0.464
#> GSM786515 2 0.3686 0.7998 0.000 0.860 0.140
#> GSM786522 1 0.4531 0.6144 0.824 0.008 0.168
#> GSM786526 1 0.4963 0.5857 0.792 0.008 0.200
#> GSM786528 1 0.4912 0.5899 0.796 0.008 0.196
#> GSM786531 3 0.9338 0.4346 0.300 0.196 0.504
#> GSM786535 2 0.6341 0.5830 0.016 0.672 0.312
#> GSM786543 1 0.1289 0.6584 0.968 0.000 0.032
#> GSM786545 1 0.9518 -0.2833 0.420 0.188 0.392
#> GSM786551 1 0.5541 0.5186 0.740 0.008 0.252
#> GSM786552 2 0.7937 0.3837 0.068 0.568 0.364
#> GSM786554 2 0.1031 0.8761 0.000 0.976 0.024
#> GSM786557 1 0.5254 0.6040 0.736 0.000 0.264
#> GSM786560 1 0.3941 0.6356 0.844 0.000 0.156
#> GSM786564 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786568 3 0.9646 0.4483 0.272 0.260 0.468
#> GSM786569 1 0.3941 0.6356 0.844 0.000 0.156
#> GSM786571 3 0.9588 0.4427 0.284 0.240 0.476
#> GSM786496 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786506 3 0.7091 0.1475 0.416 0.024 0.560
#> GSM786508 3 0.7576 0.3848 0.276 0.076 0.648
#> GSM786512 3 0.7576 0.3848 0.276 0.076 0.648
#> GSM786518 1 0.3816 0.6343 0.852 0.000 0.148
#> GSM786519 1 0.4062 0.6356 0.836 0.000 0.164
#> GSM786524 1 0.1753 0.6437 0.952 0.000 0.048
#> GSM786529 3 0.9626 0.4507 0.268 0.260 0.472
#> GSM786530 1 0.4563 0.5572 0.852 0.036 0.112
#> GSM786532 1 0.4531 0.6144 0.824 0.008 0.168
#> GSM786533 3 0.9322 0.2640 0.164 0.392 0.444
#> GSM786544 3 0.9299 0.4144 0.324 0.180 0.496
#> GSM786547 3 0.9626 0.4507 0.268 0.260 0.472
#> GSM786549 3 0.9390 0.3984 0.340 0.184 0.476
#> GSM786550 3 0.7059 0.4186 0.164 0.112 0.724
#> GSM786563 2 0.2448 0.8631 0.000 0.924 0.076
#> GSM786570 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.8772 0.000 1.000 0.000
#> GSM786577 1 0.1163 0.6464 0.972 0.000 0.028
#> GSM786578 2 0.1964 0.8627 0.000 0.944 0.056
#> GSM786582 1 0.1163 0.6525 0.972 0.000 0.028
#> GSM786495 3 0.9825 0.3628 0.244 0.368 0.388
#> GSM786505 1 0.5254 0.6040 0.736 0.000 0.264
#> GSM786511 1 0.0747 0.6507 0.984 0.000 0.016
#> GSM786513 1 0.4861 0.5965 0.800 0.008 0.192
#> GSM786525 2 0.7433 0.5235 0.072 0.660 0.268
#> GSM786540 2 0.2066 0.8680 0.000 0.940 0.060
#> GSM786553 1 0.6497 0.3396 0.648 0.016 0.336
#> GSM786561 1 0.4062 0.6356 0.836 0.000 0.164
#> GSM786575 1 0.6095 0.4679 0.608 0.000 0.392
#> GSM786494 1 0.6079 0.4734 0.612 0.000 0.388
#> GSM786504 1 0.4861 0.5965 0.800 0.008 0.192
#> GSM786510 3 0.9463 0.4180 0.244 0.256 0.500
#> GSM786514 1 0.4912 0.5899 0.796 0.008 0.196
#> GSM786516 1 0.9189 -0.0866 0.512 0.172 0.316
#> GSM786520 1 0.3941 0.6356 0.844 0.000 0.156
#> GSM786521 3 0.7059 0.4186 0.164 0.112 0.724
#> GSM786536 1 0.7248 0.3904 0.676 0.068 0.256
#> GSM786542 2 0.6677 0.5492 0.024 0.652 0.324
#> GSM786546 2 0.6341 0.5830 0.016 0.672 0.312
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0524 0.876 0.000 0.988 0.008 0.004
#> GSM786539 3 0.8532 0.366 0.140 0.272 0.504 0.084
#> GSM786541 2 0.1820 0.861 0.000 0.944 0.036 0.020
#> GSM786556 2 0.1820 0.861 0.000 0.944 0.036 0.020
#> GSM786523 3 0.7061 0.332 0.212 0.164 0.612 0.012
#> GSM786497 1 0.2737 0.631 0.888 0.000 0.104 0.008
#> GSM786501 3 0.8491 0.356 0.140 0.320 0.472 0.068
#> GSM786517 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786534 2 0.2089 0.859 0.000 0.932 0.048 0.020
#> GSM786555 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0524 0.876 0.000 0.988 0.008 0.004
#> GSM786559 2 0.0657 0.876 0.000 0.984 0.012 0.004
#> GSM786565 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0188 0.876 0.000 0.996 0.004 0.000
#> GSM786579 2 0.1389 0.871 0.000 0.952 0.048 0.000
#> GSM786491 1 0.5938 0.543 0.696 0.000 0.136 0.168
#> GSM786509 1 0.0469 0.694 0.988 0.000 0.012 0.000
#> GSM786538 1 0.5735 0.553 0.576 0.000 0.392 0.032
#> GSM786548 2 0.2222 0.861 0.000 0.924 0.060 0.016
#> GSM786562 3 0.6135 0.347 0.324 0.000 0.608 0.068
#> GSM786566 3 0.6116 0.354 0.320 0.000 0.612 0.068
#> GSM786573 2 0.5966 0.590 0.040 0.672 0.268 0.020
#> GSM786574 2 0.0672 0.876 0.000 0.984 0.008 0.008
#> GSM786580 4 0.1798 1.000 0.000 0.040 0.016 0.944
#> GSM786581 2 0.4957 0.689 0.000 0.748 0.204 0.048
#> GSM786583 3 0.5535 0.489 0.068 0.180 0.740 0.012
#> GSM786492 1 0.0524 0.687 0.988 0.000 0.004 0.008
#> GSM786493 2 0.3308 0.812 0.000 0.872 0.092 0.036
#> GSM786499 3 0.8453 0.355 0.148 0.288 0.496 0.068
#> GSM786502 3 0.6147 0.445 0.212 0.008 0.684 0.096
#> GSM786537 1 0.3808 0.669 0.812 0.000 0.176 0.012
#> GSM786567 2 0.0804 0.875 0.000 0.980 0.012 0.008
#> GSM786498 3 0.6147 0.445 0.212 0.008 0.684 0.096
#> GSM786500 1 0.2048 0.654 0.928 0.000 0.064 0.008
#> GSM786503 3 0.6338 0.358 0.316 0.000 0.600 0.084
#> GSM786507 3 0.8562 0.367 0.140 0.292 0.488 0.080
#> GSM786515 2 0.3778 0.794 0.000 0.848 0.100 0.052
#> GSM786522 1 0.5746 0.550 0.572 0.000 0.396 0.032
#> GSM786526 1 0.5808 0.510 0.544 0.000 0.424 0.032
#> GSM786528 1 0.5800 0.516 0.548 0.000 0.420 0.032
#> GSM786531 3 0.5244 0.496 0.052 0.180 0.756 0.012
#> GSM786535 2 0.4761 0.574 0.000 0.664 0.332 0.004
#> GSM786543 1 0.3494 0.679 0.824 0.000 0.172 0.004
#> GSM786545 3 0.6870 0.386 0.172 0.180 0.636 0.012
#> GSM786551 3 0.5937 -0.415 0.472 0.000 0.492 0.036
#> GSM786552 2 0.5516 0.364 0.004 0.556 0.428 0.012
#> GSM786554 2 0.0927 0.874 0.000 0.976 0.016 0.008
#> GSM786557 1 0.5038 0.396 0.652 0.000 0.336 0.012
#> GSM786560 1 0.0469 0.694 0.988 0.000 0.012 0.000
#> GSM786564 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786568 3 0.5690 0.466 0.052 0.244 0.696 0.008
#> GSM786569 1 0.0469 0.694 0.988 0.000 0.012 0.000
#> GSM786571 3 0.5800 0.495 0.060 0.224 0.704 0.012
#> GSM786496 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786506 3 0.6338 0.357 0.316 0.000 0.600 0.084
#> GSM786508 3 0.6796 0.435 0.160 0.052 0.684 0.104
#> GSM786512 3 0.6796 0.435 0.160 0.052 0.684 0.104
#> GSM786518 1 0.0524 0.687 0.988 0.000 0.004 0.008
#> GSM786519 1 0.0707 0.694 0.980 0.000 0.020 0.000
#> GSM786524 1 0.4018 0.648 0.772 0.000 0.224 0.004
#> GSM786529 3 0.5614 0.463 0.048 0.244 0.700 0.008
#> GSM786530 1 0.5765 0.522 0.652 0.036 0.304 0.008
#> GSM786532 1 0.5746 0.550 0.572 0.000 0.396 0.032
#> GSM786533 3 0.6812 0.229 0.036 0.372 0.552 0.040
#> GSM786544 3 0.5501 0.484 0.076 0.164 0.748 0.012
#> GSM786547 3 0.5614 0.463 0.048 0.244 0.700 0.008
#> GSM786549 3 0.5795 0.475 0.092 0.168 0.728 0.012
#> GSM786550 4 0.1798 1.000 0.000 0.040 0.016 0.944
#> GSM786563 2 0.2222 0.861 0.000 0.924 0.060 0.016
#> GSM786570 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0000 0.876 0.000 1.000 0.000 0.000
#> GSM786577 1 0.3751 0.660 0.800 0.000 0.196 0.004
#> GSM786578 2 0.1661 0.862 0.000 0.944 0.052 0.004
#> GSM786582 1 0.3751 0.670 0.800 0.000 0.196 0.004
#> GSM786495 3 0.8520 0.296 0.148 0.356 0.436 0.060
#> GSM786505 1 0.5038 0.396 0.652 0.000 0.336 0.012
#> GSM786511 1 0.3764 0.671 0.816 0.000 0.172 0.012
#> GSM786513 1 0.5784 0.529 0.556 0.000 0.412 0.032
#> GSM786525 2 0.6089 0.525 0.000 0.640 0.280 0.080
#> GSM786540 2 0.1637 0.867 0.000 0.940 0.060 0.000
#> GSM786553 3 0.6435 -0.278 0.396 0.000 0.532 0.072
#> GSM786561 1 0.0707 0.694 0.980 0.000 0.020 0.000
#> GSM786575 1 0.5938 0.543 0.696 0.000 0.136 0.168
#> GSM786494 1 0.5897 0.546 0.700 0.000 0.136 0.164
#> GSM786504 1 0.5784 0.529 0.556 0.000 0.412 0.032
#> GSM786510 3 0.8599 0.370 0.148 0.232 0.520 0.100
#> GSM786514 1 0.5800 0.516 0.548 0.000 0.420 0.032
#> GSM786516 3 0.7421 0.234 0.268 0.164 0.556 0.012
#> GSM786520 1 0.0469 0.694 0.988 0.000 0.012 0.000
#> GSM786521 4 0.1798 1.000 0.000 0.040 0.016 0.944
#> GSM786536 3 0.7131 -0.216 0.396 0.060 0.512 0.032
#> GSM786542 2 0.4855 0.540 0.004 0.644 0.352 0.000
#> GSM786546 2 0.4761 0.574 0.000 0.664 0.332 0.004
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0510 0.8379 0.016 0.984 0.000 0.000 0.000
#> GSM786539 1 0.3741 0.6808 0.732 0.264 0.004 0.000 0.000
#> GSM786541 2 0.3659 0.7256 0.012 0.768 0.220 0.000 0.000
#> GSM786556 2 0.3659 0.7256 0.012 0.768 0.220 0.000 0.000
#> GSM786523 3 0.2848 0.6095 0.000 0.000 0.840 0.156 0.004
#> GSM786497 4 0.3867 0.6133 0.144 0.000 0.048 0.804 0.004
#> GSM786501 1 0.3857 0.6527 0.688 0.312 0.000 0.000 0.000
#> GSM786517 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786534 2 0.3779 0.7116 0.012 0.752 0.236 0.000 0.000
#> GSM786555 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786558 2 0.0404 0.8377 0.012 0.988 0.000 0.000 0.000
#> GSM786559 2 0.0671 0.8385 0.016 0.980 0.004 0.000 0.000
#> GSM786565 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786572 2 0.0671 0.8376 0.004 0.980 0.016 0.000 0.000
#> GSM786579 2 0.2208 0.8251 0.020 0.908 0.072 0.000 0.000
#> GSM786491 4 0.5712 0.5324 0.180 0.000 0.008 0.652 0.160
#> GSM786509 4 0.1579 0.6793 0.024 0.000 0.032 0.944 0.000
#> GSM786538 4 0.6299 0.4998 0.088 0.000 0.344 0.540 0.028
#> GSM786548 2 0.3779 0.7472 0.024 0.776 0.200 0.000 0.000
#> GSM786562 1 0.4007 0.6114 0.756 0.000 0.020 0.220 0.004
#> GSM786566 1 0.3976 0.6153 0.760 0.000 0.020 0.216 0.004
#> GSM786573 2 0.5543 0.2870 0.056 0.492 0.448 0.004 0.000
#> GSM786574 2 0.0510 0.8369 0.016 0.984 0.000 0.000 0.000
#> GSM786580 5 0.0290 1.0000 0.008 0.000 0.000 0.000 0.992
#> GSM786581 2 0.4333 0.6697 0.212 0.740 0.048 0.000 0.000
#> GSM786583 3 0.0404 0.7232 0.000 0.000 0.988 0.012 0.000
#> GSM786492 4 0.1285 0.6633 0.036 0.000 0.004 0.956 0.004
#> GSM786493 2 0.2583 0.7639 0.132 0.864 0.004 0.000 0.000
#> GSM786499 1 0.3684 0.6747 0.720 0.280 0.000 0.000 0.000
#> GSM786502 1 0.1267 0.6801 0.960 0.000 0.012 0.024 0.004
#> GSM786537 4 0.3538 0.6455 0.016 0.000 0.176 0.804 0.004
#> GSM786567 2 0.0609 0.8359 0.020 0.980 0.000 0.000 0.000
#> GSM786498 1 0.1267 0.6801 0.960 0.000 0.012 0.024 0.004
#> GSM786500 4 0.2548 0.6329 0.116 0.000 0.004 0.876 0.004
#> GSM786503 1 0.3845 0.6138 0.768 0.000 0.024 0.208 0.000
#> GSM786507 1 0.3861 0.6713 0.712 0.284 0.004 0.000 0.000
#> GSM786515 2 0.2848 0.7463 0.156 0.840 0.004 0.000 0.000
#> GSM786522 4 0.6344 0.4982 0.092 0.000 0.344 0.536 0.028
#> GSM786526 4 0.6388 0.4437 0.088 0.000 0.384 0.500 0.028
#> GSM786528 4 0.6344 0.4479 0.084 0.000 0.384 0.504 0.028
#> GSM786531 3 0.0290 0.7194 0.008 0.000 0.992 0.000 0.000
#> GSM786535 2 0.5174 0.5201 0.056 0.604 0.340 0.000 0.000
#> GSM786543 4 0.3353 0.6505 0.008 0.000 0.196 0.796 0.000
#> GSM786545 3 0.2338 0.6594 0.000 0.000 0.884 0.112 0.004
#> GSM786551 3 0.6169 -0.3190 0.064 0.000 0.464 0.444 0.028
#> GSM786552 3 0.5221 -0.0634 0.048 0.400 0.552 0.000 0.000
#> GSM786554 2 0.0703 0.8350 0.024 0.976 0.000 0.000 0.000
#> GSM786557 4 0.5174 0.2204 0.444 0.000 0.032 0.520 0.004
#> GSM786560 4 0.1579 0.6793 0.024 0.000 0.032 0.944 0.000
#> GSM786564 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786568 3 0.1764 0.7034 0.008 0.064 0.928 0.000 0.000
#> GSM786569 4 0.1579 0.6793 0.024 0.000 0.032 0.944 0.000
#> GSM786571 3 0.1569 0.7151 0.008 0.044 0.944 0.004 0.000
#> GSM786496 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786506 1 0.3596 0.6173 0.776 0.000 0.012 0.212 0.000
#> GSM786508 1 0.2580 0.6883 0.892 0.044 0.064 0.000 0.000
#> GSM786512 1 0.2580 0.6883 0.892 0.044 0.064 0.000 0.000
#> GSM786518 4 0.1202 0.6649 0.032 0.000 0.004 0.960 0.004
#> GSM786519 4 0.1818 0.6781 0.024 0.000 0.044 0.932 0.000
#> GSM786524 4 0.3817 0.6093 0.004 0.000 0.252 0.740 0.004
#> GSM786529 3 0.1877 0.7016 0.012 0.064 0.924 0.000 0.000
#> GSM786530 4 0.5254 0.4323 0.040 0.000 0.360 0.592 0.008
#> GSM786532 4 0.6344 0.4982 0.092 0.000 0.344 0.536 0.028
#> GSM786533 3 0.6303 0.2859 0.268 0.204 0.528 0.000 0.000
#> GSM786544 3 0.1082 0.7245 0.008 0.000 0.964 0.028 0.000
#> GSM786547 3 0.1877 0.7016 0.012 0.064 0.924 0.000 0.000
#> GSM786549 3 0.0963 0.7227 0.000 0.000 0.964 0.036 0.000
#> GSM786550 5 0.0290 1.0000 0.008 0.000 0.000 0.000 0.992
#> GSM786563 2 0.3779 0.7472 0.024 0.776 0.200 0.000 0.000
#> GSM786570 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786576 2 0.0000 0.8378 0.000 1.000 0.000 0.000 0.000
#> GSM786577 4 0.3461 0.6275 0.000 0.000 0.224 0.772 0.004
#> GSM786578 2 0.2067 0.8255 0.032 0.920 0.048 0.000 0.000
#> GSM786582 4 0.3786 0.6445 0.016 0.000 0.204 0.776 0.004
#> GSM786495 1 0.4015 0.6081 0.652 0.348 0.000 0.000 0.000
#> GSM786505 4 0.5174 0.2204 0.444 0.000 0.032 0.520 0.004
#> GSM786511 4 0.3399 0.6485 0.012 0.000 0.172 0.812 0.004
#> GSM786513 4 0.6358 0.4683 0.088 0.000 0.368 0.516 0.028
#> GSM786525 2 0.5854 0.5351 0.256 0.632 0.088 0.000 0.024
#> GSM786540 2 0.2390 0.8209 0.020 0.896 0.084 0.000 0.000
#> GSM786553 4 0.7360 0.3024 0.260 0.000 0.336 0.376 0.028
#> GSM786561 4 0.1818 0.6781 0.024 0.000 0.044 0.932 0.000
#> GSM786575 4 0.5712 0.5324 0.180 0.000 0.008 0.652 0.160
#> GSM786494 4 0.5781 0.5368 0.180 0.000 0.012 0.652 0.156
#> GSM786504 4 0.6358 0.4683 0.088 0.000 0.368 0.516 0.028
#> GSM786510 1 0.3430 0.6936 0.776 0.220 0.004 0.000 0.000
#> GSM786514 4 0.6344 0.4479 0.084 0.000 0.384 0.504 0.028
#> GSM786516 3 0.3554 0.5103 0.004 0.000 0.776 0.216 0.004
#> GSM786520 4 0.1579 0.6793 0.024 0.000 0.032 0.944 0.000
#> GSM786521 5 0.0290 1.0000 0.008 0.000 0.000 0.000 0.992
#> GSM786536 3 0.6217 -0.0424 0.084 0.000 0.556 0.332 0.028
#> GSM786542 2 0.5175 0.4098 0.044 0.548 0.408 0.000 0.000
#> GSM786546 2 0.5174 0.5201 0.056 0.604 0.340 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.0458 0.8191 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM786539 6 0.3314 0.6510 0.004 0.256 0.000 0.000 0.000 0.740
#> GSM786541 2 0.5503 0.5245 0.160 0.604 0.224 0.000 0.000 0.012
#> GSM786556 2 0.5503 0.5245 0.160 0.604 0.224 0.000 0.000 0.012
#> GSM786523 3 0.3481 0.5380 0.160 0.000 0.792 0.048 0.000 0.000
#> GSM786497 4 0.3458 0.5767 0.028 0.000 0.032 0.824 0.000 0.116
#> GSM786501 6 0.3428 0.6256 0.000 0.304 0.000 0.000 0.000 0.696
#> GSM786517 2 0.0000 0.8194 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786534 2 0.5547 0.5081 0.152 0.592 0.244 0.000 0.000 0.012
#> GSM786555 2 0.0000 0.8194 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786558 2 0.0458 0.8177 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM786559 2 0.0692 0.8187 0.000 0.976 0.004 0.000 0.000 0.020
#> GSM786565 2 0.0000 0.8194 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786572 2 0.0777 0.8167 0.004 0.972 0.024 0.000 0.000 0.000
#> GSM786579 2 0.2288 0.7999 0.016 0.900 0.068 0.000 0.000 0.016
#> GSM786491 1 0.6068 0.0570 0.436 0.000 0.004 0.408 0.136 0.016
#> GSM786509 4 0.2913 0.6528 0.180 0.000 0.004 0.812 0.000 0.004
#> GSM786538 1 0.4527 0.6007 0.660 0.000 0.272 0.068 0.000 0.000
#> GSM786548 2 0.4496 0.6535 0.076 0.708 0.208 0.000 0.000 0.008
#> GSM786562 6 0.5231 0.4957 0.252 0.000 0.004 0.132 0.000 0.612
#> GSM786566 6 0.5211 0.4990 0.248 0.000 0.004 0.132 0.000 0.616
#> GSM786573 3 0.6596 0.0610 0.192 0.328 0.436 0.000 0.000 0.044
#> GSM786574 2 0.0547 0.8168 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM786580 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786581 2 0.4601 0.6296 0.032 0.712 0.048 0.000 0.000 0.208
#> GSM786583 3 0.1074 0.6956 0.028 0.000 0.960 0.012 0.000 0.000
#> GSM786492 4 0.0508 0.6054 0.012 0.000 0.000 0.984 0.000 0.004
#> GSM786493 2 0.2714 0.7343 0.012 0.848 0.004 0.000 0.000 0.136
#> GSM786499 6 0.3266 0.6446 0.000 0.272 0.000 0.000 0.000 0.728
#> GSM786502 6 0.1624 0.6258 0.020 0.000 0.004 0.040 0.000 0.936
#> GSM786537 4 0.4919 0.4356 0.204 0.000 0.128 0.664 0.000 0.004
#> GSM786567 2 0.0713 0.8152 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786498 6 0.1624 0.6258 0.020 0.000 0.004 0.040 0.000 0.936
#> GSM786500 4 0.1806 0.5815 0.004 0.000 0.000 0.908 0.000 0.088
#> GSM786503 6 0.5264 0.4955 0.252 0.000 0.008 0.124 0.000 0.616
#> GSM786507 6 0.3288 0.6432 0.000 0.276 0.000 0.000 0.000 0.724
#> GSM786515 2 0.3000 0.7163 0.016 0.824 0.004 0.000 0.000 0.156
#> GSM786522 1 0.4423 0.6025 0.668 0.000 0.272 0.060 0.000 0.000
#> GSM786526 1 0.4683 0.5849 0.628 0.000 0.312 0.056 0.000 0.004
#> GSM786528 1 0.4548 0.5878 0.632 0.000 0.312 0.056 0.000 0.000
#> GSM786531 3 0.0777 0.6979 0.024 0.000 0.972 0.004 0.000 0.000
#> GSM786535 2 0.4790 0.4431 0.016 0.584 0.368 0.000 0.000 0.032
#> GSM786543 4 0.5508 0.3779 0.348 0.000 0.124 0.524 0.000 0.004
#> GSM786545 3 0.2912 0.6067 0.116 0.000 0.844 0.040 0.000 0.000
#> GSM786551 1 0.5497 0.3892 0.504 0.000 0.392 0.092 0.000 0.012
#> GSM786552 3 0.5169 0.1025 0.048 0.364 0.564 0.000 0.000 0.024
#> GSM786554 2 0.0713 0.8144 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786557 1 0.5766 0.1424 0.520 0.000 0.004 0.184 0.000 0.292
#> GSM786560 4 0.2913 0.6528 0.180 0.000 0.004 0.812 0.000 0.004
#> GSM786564 2 0.0000 0.8194 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786568 3 0.1296 0.7011 0.004 0.044 0.948 0.004 0.000 0.000
#> GSM786569 4 0.2845 0.6558 0.172 0.000 0.004 0.820 0.000 0.004
#> GSM786571 3 0.1294 0.7043 0.008 0.024 0.956 0.004 0.000 0.008
#> GSM786496 2 0.0146 0.8190 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM786506 6 0.4984 0.5021 0.244 0.000 0.000 0.124 0.000 0.632
#> GSM786508 6 0.2910 0.6387 0.020 0.036 0.060 0.008 0.000 0.876
#> GSM786512 6 0.2910 0.6387 0.020 0.036 0.060 0.008 0.000 0.876
#> GSM786518 4 0.0146 0.6118 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM786519 4 0.3073 0.6562 0.164 0.000 0.016 0.816 0.000 0.004
#> GSM786524 4 0.5779 0.2191 0.392 0.000 0.176 0.432 0.000 0.000
#> GSM786529 3 0.1007 0.7006 0.000 0.044 0.956 0.000 0.000 0.000
#> GSM786530 4 0.6592 0.1653 0.276 0.000 0.292 0.404 0.000 0.028
#> GSM786532 1 0.4423 0.6025 0.668 0.000 0.272 0.060 0.000 0.000
#> GSM786533 3 0.5992 0.3345 0.024 0.180 0.548 0.000 0.000 0.248
#> GSM786544 3 0.1471 0.6835 0.064 0.000 0.932 0.004 0.000 0.000
#> GSM786547 3 0.1007 0.7006 0.000 0.044 0.956 0.000 0.000 0.000
#> GSM786549 3 0.1625 0.6807 0.060 0.000 0.928 0.012 0.000 0.000
#> GSM786550 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786563 2 0.4496 0.6535 0.076 0.708 0.208 0.000 0.000 0.008
#> GSM786570 2 0.0000 0.8194 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786576 2 0.0146 0.8190 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM786577 4 0.5649 0.2461 0.396 0.000 0.152 0.452 0.000 0.000
#> GSM786578 2 0.2231 0.7976 0.004 0.900 0.068 0.000 0.000 0.028
#> GSM786582 1 0.5542 -0.0410 0.528 0.000 0.132 0.336 0.000 0.004
#> GSM786495 6 0.3578 0.5708 0.000 0.340 0.000 0.000 0.000 0.660
#> GSM786505 1 0.5766 0.1424 0.520 0.000 0.004 0.184 0.000 0.292
#> GSM786511 4 0.4745 0.4408 0.204 0.000 0.124 0.672 0.000 0.000
#> GSM786513 1 0.4498 0.6010 0.644 0.000 0.300 0.056 0.000 0.000
#> GSM786525 2 0.5984 0.5009 0.096 0.604 0.088 0.000 0.000 0.212
#> GSM786540 2 0.2415 0.7940 0.016 0.888 0.084 0.000 0.000 0.012
#> GSM786553 1 0.5721 0.4627 0.548 0.000 0.272 0.008 0.000 0.172
#> GSM786561 4 0.3073 0.6562 0.164 0.000 0.016 0.816 0.000 0.004
#> GSM786575 1 0.6068 0.0570 0.436 0.000 0.004 0.408 0.136 0.016
#> GSM786494 1 0.6042 0.0572 0.440 0.000 0.004 0.408 0.132 0.016
#> GSM786504 1 0.4498 0.6010 0.644 0.000 0.300 0.056 0.000 0.000
#> GSM786510 6 0.3133 0.6602 0.008 0.212 0.000 0.000 0.000 0.780
#> GSM786514 1 0.4601 0.5862 0.628 0.000 0.312 0.060 0.000 0.000
#> GSM786516 3 0.4198 0.3913 0.228 0.000 0.716 0.052 0.000 0.004
#> GSM786520 4 0.2913 0.6528 0.180 0.000 0.004 0.812 0.000 0.004
#> GSM786521 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786536 3 0.4935 -0.3015 0.460 0.000 0.484 0.052 0.000 0.004
#> GSM786542 2 0.4974 0.3226 0.028 0.528 0.420 0.000 0.000 0.024
#> GSM786546 2 0.4790 0.4431 0.016 0.584 0.368 0.000 0.000 0.032
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 specimen(p) disease.state(p) k
#> MAD:hclust 79 0.00563 0.252 2
#> MAD:hclust 58 0.02088 0.634 3
#> MAD:hclust 61 0.13311 0.389 4
#> MAD:hclust 75 0.34793 0.595 5
#> MAD:hclust 68 0.37041 0.677 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 54547 rows and 93 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.789 0.910 0.962 0.5044 0.495 0.495
#> 3 3 0.722 0.814 0.769 0.2982 0.798 0.615
#> 4 4 0.630 0.654 0.793 0.1139 0.910 0.749
#> 5 5 0.638 0.591 0.705 0.0642 0.909 0.702
#> 6 6 0.670 0.552 0.720 0.0449 0.920 0.687
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
#> GSM786527 2 0.0000 0.95639 0.000 1.000
#> GSM786539 2 0.0000 0.95639 0.000 1.000
#> GSM786541 2 0.0376 0.95548 0.004 0.996
#> GSM786556 2 0.0376 0.95548 0.004 0.996
#> GSM786523 1 0.4939 0.87280 0.892 0.108
#> GSM786497 1 0.0376 0.96135 0.996 0.004
#> GSM786501 2 0.0000 0.95639 0.000 1.000
#> GSM786517 2 0.0000 0.95639 0.000 1.000
#> GSM786534 2 0.0376 0.95548 0.004 0.996
#> GSM786555 2 0.0000 0.95639 0.000 1.000
#> GSM786558 2 0.0376 0.95548 0.004 0.996
#> GSM786559 2 0.0000 0.95639 0.000 1.000
#> GSM786565 2 0.0000 0.95639 0.000 1.000
#> GSM786572 2 0.0000 0.95639 0.000 1.000
#> GSM786579 2 0.0376 0.95548 0.004 0.996
#> GSM786491 1 0.0376 0.96135 0.996 0.004
#> GSM786509 1 0.0376 0.96135 0.996 0.004
#> GSM786538 1 0.0000 0.96121 1.000 0.000
#> GSM786548 2 0.0376 0.95548 0.004 0.996
#> GSM786562 1 0.0376 0.96135 0.996 0.004
#> GSM786566 1 0.0376 0.96135 0.996 0.004
#> GSM786573 2 0.2236 0.93136 0.036 0.964
#> GSM786574 2 0.0000 0.95639 0.000 1.000
#> GSM786580 1 0.9998 -0.00707 0.508 0.492
#> GSM786581 2 0.0000 0.95639 0.000 1.000
#> GSM786583 1 0.5408 0.85609 0.876 0.124
#> GSM786492 1 0.0376 0.96135 0.996 0.004
#> GSM786493 2 0.0000 0.95639 0.000 1.000
#> GSM786499 2 0.0000 0.95639 0.000 1.000
#> GSM786502 2 0.9881 0.22431 0.436 0.564
#> GSM786537 1 0.0000 0.96121 1.000 0.000
#> GSM786567 2 0.0000 0.95639 0.000 1.000
#> GSM786498 1 0.0376 0.96135 0.996 0.004
#> GSM786500 1 0.0376 0.96135 0.996 0.004
#> GSM786503 1 0.0376 0.96135 0.996 0.004
#> GSM786507 2 0.0000 0.95639 0.000 1.000
#> GSM786515 2 0.0000 0.95639 0.000 1.000
#> GSM786522 1 0.0000 0.96121 1.000 0.000
#> GSM786526 1 0.0000 0.96121 1.000 0.000
#> GSM786528 1 0.0000 0.96121 1.000 0.000
#> GSM786531 2 0.8955 0.54768 0.312 0.688
#> GSM786535 2 0.0376 0.95548 0.004 0.996
#> GSM786543 1 0.0000 0.96121 1.000 0.000
#> GSM786545 1 0.5178 0.86492 0.884 0.116
#> GSM786551 1 0.0000 0.96121 1.000 0.000
#> GSM786552 2 0.0376 0.95548 0.004 0.996
#> GSM786554 2 0.0000 0.95639 0.000 1.000
#> GSM786557 1 0.0376 0.96135 0.996 0.004
#> GSM786560 1 0.0376 0.96135 0.996 0.004
#> GSM786564 2 0.0000 0.95639 0.000 1.000
#> GSM786568 2 0.6801 0.77322 0.180 0.820
#> GSM786569 1 0.0376 0.96135 0.996 0.004
#> GSM786571 1 0.8016 0.68023 0.756 0.244
#> GSM786496 2 0.0000 0.95639 0.000 1.000
#> GSM786506 1 0.0376 0.96135 0.996 0.004
#> GSM786508 2 0.9996 0.03983 0.488 0.512
#> GSM786512 2 0.0000 0.95639 0.000 1.000
#> GSM786518 1 0.0376 0.96135 0.996 0.004
#> GSM786519 1 0.0376 0.96135 0.996 0.004
#> GSM786524 1 0.0000 0.96121 1.000 0.000
#> GSM786529 2 0.6623 0.78397 0.172 0.828
#> GSM786530 1 0.0000 0.96121 1.000 0.000
#> GSM786532 1 0.0000 0.96121 1.000 0.000
#> GSM786533 2 0.0000 0.95639 0.000 1.000
#> GSM786544 1 0.5408 0.85609 0.876 0.124
#> GSM786547 2 0.5946 0.81926 0.144 0.856
#> GSM786549 1 0.5178 0.86492 0.884 0.116
#> GSM786550 2 0.1414 0.94503 0.020 0.980
#> GSM786563 2 0.0376 0.95548 0.004 0.996
#> GSM786570 2 0.0000 0.95639 0.000 1.000
#> GSM786576 2 0.0000 0.95639 0.000 1.000
#> GSM786577 1 0.0000 0.96121 1.000 0.000
#> GSM786578 2 0.0376 0.95548 0.004 0.996
#> GSM786582 1 0.0000 0.96121 1.000 0.000
#> GSM786495 2 0.0000 0.95639 0.000 1.000
#> GSM786505 1 0.0376 0.96135 0.996 0.004
#> GSM786511 1 0.0000 0.96121 1.000 0.000
#> GSM786513 1 0.0000 0.96121 1.000 0.000
#> GSM786525 2 0.0376 0.95548 0.004 0.996
#> GSM786540 2 0.0376 0.95548 0.004 0.996
#> GSM786553 1 0.0000 0.96121 1.000 0.000
#> GSM786561 1 0.0376 0.96135 0.996 0.004
#> GSM786575 1 0.0376 0.96135 0.996 0.004
#> GSM786494 1 0.0376 0.96135 0.996 0.004
#> GSM786504 1 0.0000 0.96121 1.000 0.000
#> GSM786510 2 0.0000 0.95639 0.000 1.000
#> GSM786514 1 0.0000 0.96121 1.000 0.000
#> GSM786516 1 0.0000 0.96121 1.000 0.000
#> GSM786520 1 0.0376 0.96135 0.996 0.004
#> GSM786521 1 0.5629 0.83796 0.868 0.132
#> GSM786536 1 0.5178 0.86492 0.884 0.116
#> GSM786542 2 0.0376 0.95548 0.004 0.996
#> GSM786546 2 0.1414 0.94503 0.020 0.980
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786539 2 0.1529 0.9065 0.000 0.960 0.040
#> GSM786541 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786556 2 0.2796 0.8477 0.000 0.908 0.092
#> GSM786523 3 0.3038 0.8764 0.104 0.000 0.896
#> GSM786497 1 0.1529 0.8546 0.960 0.000 0.040
#> GSM786501 2 0.1529 0.9065 0.000 0.960 0.040
#> GSM786517 2 0.0424 0.9219 0.000 0.992 0.008
#> GSM786534 2 0.4555 0.7183 0.000 0.800 0.200
#> GSM786555 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786491 1 0.2066 0.8348 0.940 0.000 0.060
#> GSM786509 1 0.0592 0.8588 0.988 0.000 0.012
#> GSM786538 1 0.0237 0.8584 0.996 0.000 0.004
#> GSM786548 2 0.4555 0.7183 0.000 0.800 0.200
#> GSM786562 1 0.1643 0.8423 0.956 0.000 0.044
#> GSM786566 1 0.1643 0.8423 0.956 0.000 0.044
#> GSM786573 3 0.3607 0.8862 0.008 0.112 0.880
#> GSM786574 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786580 1 0.7097 0.6309 0.724 0.148 0.128
#> GSM786581 2 0.0237 0.9233 0.000 0.996 0.004
#> GSM786583 3 0.3377 0.8902 0.092 0.012 0.896
#> GSM786492 1 0.0237 0.8571 0.996 0.000 0.004
#> GSM786493 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786499 2 0.1529 0.9065 0.000 0.960 0.040
#> GSM786502 2 0.7505 0.3272 0.384 0.572 0.044
#> GSM786537 1 0.4062 0.7934 0.836 0.000 0.164
#> GSM786567 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786498 1 0.1643 0.8423 0.956 0.000 0.044
#> GSM786500 1 0.0000 0.8580 1.000 0.000 0.000
#> GSM786503 1 0.0592 0.8578 0.988 0.000 0.012
#> GSM786507 2 0.1529 0.9065 0.000 0.960 0.040
#> GSM786515 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786522 1 0.5431 0.6629 0.716 0.000 0.284
#> GSM786526 1 0.5560 0.6546 0.700 0.000 0.300
#> GSM786528 1 0.5363 0.6666 0.724 0.000 0.276
#> GSM786531 3 0.3550 0.9005 0.024 0.080 0.896
#> GSM786535 3 0.4002 0.8433 0.000 0.160 0.840
#> GSM786543 1 0.1753 0.8534 0.952 0.000 0.048
#> GSM786545 3 0.3377 0.8902 0.092 0.012 0.896
#> GSM786551 1 0.6079 0.4575 0.612 0.000 0.388
#> GSM786552 3 0.5138 0.7144 0.000 0.252 0.748
#> GSM786554 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.8580 1.000 0.000 0.000
#> GSM786560 1 0.1031 0.8580 0.976 0.000 0.024
#> GSM786564 2 0.0892 0.9168 0.000 0.980 0.020
#> GSM786568 3 0.3445 0.8997 0.016 0.088 0.896
#> GSM786569 1 0.0592 0.8588 0.988 0.000 0.012
#> GSM786571 3 0.3649 0.8971 0.068 0.036 0.896
#> GSM786496 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786506 1 0.1643 0.8423 0.956 0.000 0.044
#> GSM786508 1 0.9947 -0.0785 0.384 0.300 0.316
#> GSM786512 2 0.5968 0.4380 0.000 0.636 0.364
#> GSM786518 1 0.1753 0.8534 0.952 0.000 0.048
#> GSM786519 1 0.1753 0.8534 0.952 0.000 0.048
#> GSM786524 1 0.5678 0.6350 0.684 0.000 0.316
#> GSM786529 3 0.3445 0.8997 0.016 0.088 0.896
#> GSM786530 3 0.3038 0.8764 0.104 0.000 0.896
#> GSM786532 1 0.5254 0.6789 0.736 0.000 0.264
#> GSM786533 2 0.6309 -0.0679 0.000 0.504 0.496
#> GSM786544 3 0.3377 0.8902 0.092 0.012 0.896
#> GSM786547 3 0.3445 0.8997 0.016 0.088 0.896
#> GSM786549 3 0.3377 0.8902 0.092 0.012 0.896
#> GSM786550 3 0.3370 0.8664 0.024 0.072 0.904
#> GSM786563 2 0.4654 0.7063 0.000 0.792 0.208
#> GSM786570 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786576 2 0.0747 0.9187 0.000 0.984 0.016
#> GSM786577 1 0.5678 0.6350 0.684 0.000 0.316
#> GSM786578 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786582 1 0.0237 0.8584 0.996 0.000 0.004
#> GSM786495 2 0.1529 0.9065 0.000 0.960 0.040
#> GSM786505 1 0.0000 0.8580 1.000 0.000 0.000
#> GSM786511 1 0.1753 0.8534 0.952 0.000 0.048
#> GSM786513 1 0.5363 0.6733 0.724 0.000 0.276
#> GSM786525 2 0.0237 0.9233 0.000 0.996 0.004
#> GSM786540 2 0.0000 0.9243 0.000 1.000 0.000
#> GSM786553 1 0.5254 0.6789 0.736 0.000 0.264
#> GSM786561 1 0.1753 0.8534 0.952 0.000 0.048
#> GSM786575 1 0.2165 0.8327 0.936 0.000 0.064
#> GSM786494 1 0.0237 0.8571 0.996 0.000 0.004
#> GSM786504 1 0.5363 0.6733 0.724 0.000 0.276
#> GSM786510 2 0.1529 0.9065 0.000 0.960 0.040
#> GSM786514 1 0.2165 0.8492 0.936 0.000 0.064
#> GSM786516 3 0.3551 0.8455 0.132 0.000 0.868
#> GSM786520 1 0.0592 0.8588 0.988 0.000 0.012
#> GSM786521 1 0.3551 0.7920 0.868 0.000 0.132
#> GSM786536 3 0.3377 0.8902 0.092 0.012 0.896
#> GSM786542 3 0.5216 0.6998 0.000 0.260 0.740
#> GSM786546 3 0.3816 0.8560 0.000 0.148 0.852
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0707 0.8707 0.000 0.980 0.000 0.020
#> GSM786539 2 0.3219 0.7966 0.000 0.836 0.000 0.164
#> GSM786541 2 0.2739 0.8511 0.000 0.904 0.036 0.060
#> GSM786556 2 0.4491 0.7833 0.000 0.800 0.140 0.060
#> GSM786523 3 0.3052 0.8169 0.136 0.000 0.860 0.004
#> GSM786497 1 0.4576 0.5304 0.728 0.000 0.012 0.260
#> GSM786501 2 0.3219 0.7966 0.000 0.836 0.000 0.164
#> GSM786517 2 0.0707 0.8695 0.000 0.980 0.000 0.020
#> GSM786534 2 0.5257 0.7005 0.000 0.728 0.212 0.060
#> GSM786555 2 0.1474 0.8647 0.000 0.948 0.000 0.052
#> GSM786558 2 0.1970 0.8604 0.000 0.932 0.008 0.060
#> GSM786559 2 0.0707 0.8707 0.000 0.980 0.000 0.020
#> GSM786565 2 0.1474 0.8647 0.000 0.948 0.000 0.052
#> GSM786572 2 0.3611 0.8361 0.000 0.860 0.060 0.080
#> GSM786579 2 0.3617 0.8320 0.000 0.860 0.076 0.064
#> GSM786491 4 0.5571 0.2775 0.396 0.000 0.024 0.580
#> GSM786509 1 0.3764 0.5687 0.784 0.000 0.000 0.216
#> GSM786538 1 0.3219 0.5431 0.836 0.000 0.000 0.164
#> GSM786548 2 0.6178 0.6360 0.000 0.660 0.228 0.112
#> GSM786562 4 0.4977 0.2910 0.460 0.000 0.000 0.540
#> GSM786566 4 0.4730 0.3399 0.364 0.000 0.000 0.636
#> GSM786573 3 0.2670 0.8328 0.000 0.040 0.908 0.052
#> GSM786574 2 0.0592 0.8709 0.000 0.984 0.000 0.016
#> GSM786580 4 0.4979 0.4517 0.108 0.048 0.040 0.804
#> GSM786581 2 0.2081 0.8531 0.000 0.916 0.000 0.084
#> GSM786583 3 0.1389 0.8561 0.048 0.000 0.952 0.000
#> GSM786492 1 0.4250 0.5136 0.724 0.000 0.000 0.276
#> GSM786493 2 0.0592 0.8716 0.000 0.984 0.000 0.016
#> GSM786499 2 0.3219 0.7966 0.000 0.836 0.000 0.164
#> GSM786502 4 0.6562 0.0677 0.080 0.404 0.000 0.516
#> GSM786537 1 0.3810 0.5666 0.848 0.000 0.092 0.060
#> GSM786567 2 0.0707 0.8695 0.000 0.980 0.000 0.020
#> GSM786498 4 0.4679 0.3497 0.352 0.000 0.000 0.648
#> GSM786500 1 0.4164 0.5274 0.736 0.000 0.000 0.264
#> GSM786503 4 0.4996 -0.0405 0.484 0.000 0.000 0.516
#> GSM786507 2 0.3219 0.7966 0.000 0.836 0.000 0.164
#> GSM786515 2 0.0592 0.8716 0.000 0.984 0.000 0.016
#> GSM786522 1 0.4015 0.5698 0.832 0.000 0.116 0.052
#> GSM786526 1 0.4898 0.5477 0.780 0.000 0.116 0.104
#> GSM786528 1 0.6086 0.4347 0.680 0.000 0.132 0.188
#> GSM786531 3 0.0895 0.8611 0.004 0.020 0.976 0.000
#> GSM786535 3 0.3471 0.8110 0.000 0.060 0.868 0.072
#> GSM786543 1 0.2988 0.6009 0.876 0.000 0.012 0.112
#> GSM786545 3 0.2589 0.8311 0.116 0.000 0.884 0.000
#> GSM786551 1 0.6457 0.4040 0.644 0.000 0.200 0.156
#> GSM786552 3 0.3505 0.7956 0.000 0.088 0.864 0.048
#> GSM786554 2 0.0469 0.8708 0.000 0.988 0.000 0.012
#> GSM786557 1 0.4730 0.4376 0.636 0.000 0.000 0.364
#> GSM786560 1 0.3688 0.5736 0.792 0.000 0.000 0.208
#> GSM786564 2 0.2530 0.8478 0.000 0.888 0.000 0.112
#> GSM786568 3 0.1484 0.8622 0.016 0.020 0.960 0.004
#> GSM786569 1 0.3837 0.5629 0.776 0.000 0.000 0.224
#> GSM786571 3 0.1151 0.8607 0.024 0.008 0.968 0.000
#> GSM786496 2 0.1474 0.8647 0.000 0.948 0.000 0.052
#> GSM786506 4 0.4843 0.2884 0.396 0.000 0.000 0.604
#> GSM786508 4 0.9012 0.1687 0.084 0.188 0.308 0.420
#> GSM786512 2 0.7510 0.1190 0.000 0.436 0.380 0.184
#> GSM786518 1 0.4284 0.5637 0.764 0.000 0.012 0.224
#> GSM786519 1 0.4319 0.5599 0.760 0.000 0.012 0.228
#> GSM786524 1 0.2647 0.5718 0.880 0.000 0.120 0.000
#> GSM786529 3 0.0817 0.8602 0.000 0.024 0.976 0.000
#> GSM786530 3 0.3626 0.7810 0.184 0.000 0.812 0.004
#> GSM786532 1 0.5266 0.5302 0.752 0.000 0.108 0.140
#> GSM786533 3 0.5168 0.5934 0.000 0.248 0.712 0.040
#> GSM786544 3 0.2197 0.8463 0.080 0.000 0.916 0.004
#> GSM786547 3 0.1256 0.8569 0.000 0.028 0.964 0.008
#> GSM786549 3 0.2773 0.8299 0.116 0.000 0.880 0.004
#> GSM786550 3 0.5750 0.3754 0.000 0.028 0.532 0.440
#> GSM786563 2 0.6267 0.6160 0.000 0.648 0.240 0.112
#> GSM786570 2 0.0592 0.8700 0.000 0.984 0.000 0.016
#> GSM786576 2 0.0817 0.8684 0.000 0.976 0.000 0.024
#> GSM786577 1 0.2530 0.5764 0.888 0.000 0.112 0.000
#> GSM786578 2 0.4359 0.8099 0.000 0.816 0.084 0.100
#> GSM786582 1 0.2647 0.5825 0.880 0.000 0.000 0.120
#> GSM786495 2 0.2921 0.8126 0.000 0.860 0.000 0.140
#> GSM786505 1 0.4730 0.4376 0.636 0.000 0.000 0.364
#> GSM786511 1 0.1854 0.6009 0.940 0.000 0.012 0.048
#> GSM786513 1 0.5226 0.5324 0.756 0.000 0.116 0.128
#> GSM786525 2 0.2589 0.8352 0.000 0.884 0.000 0.116
#> GSM786540 2 0.3754 0.8286 0.000 0.852 0.084 0.064
#> GSM786553 1 0.5894 0.4471 0.692 0.000 0.108 0.200
#> GSM786561 1 0.4212 0.5680 0.772 0.000 0.012 0.216
#> GSM786575 4 0.5386 0.3328 0.344 0.000 0.024 0.632
#> GSM786494 1 0.4624 0.4664 0.660 0.000 0.000 0.340
#> GSM786504 1 0.5174 0.5351 0.760 0.000 0.116 0.124
#> GSM786510 2 0.3219 0.7966 0.000 0.836 0.000 0.164
#> GSM786514 1 0.3312 0.5956 0.876 0.000 0.052 0.072
#> GSM786516 3 0.4283 0.6867 0.256 0.000 0.740 0.004
#> GSM786520 1 0.3801 0.5650 0.780 0.000 0.000 0.220
#> GSM786521 4 0.4954 0.4522 0.112 0.044 0.040 0.804
#> GSM786536 3 0.3052 0.8169 0.136 0.000 0.860 0.004
#> GSM786542 3 0.3505 0.7956 0.000 0.088 0.864 0.048
#> GSM786546 3 0.2074 0.8608 0.016 0.032 0.940 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0798 0.7508 0.008 0.976 0.000 0.000 0.016
#> GSM786539 2 0.5263 0.5978 0.176 0.680 0.000 0.000 0.144
#> GSM786541 2 0.4989 0.6922 0.064 0.752 0.044 0.000 0.140
#> GSM786556 2 0.5849 0.6520 0.064 0.692 0.104 0.000 0.140
#> GSM786523 3 0.2338 0.8172 0.112 0.000 0.884 0.004 0.000
#> GSM786497 4 0.1012 0.6491 0.012 0.000 0.000 0.968 0.020
#> GSM786501 2 0.4971 0.6229 0.144 0.712 0.000 0.000 0.144
#> GSM786517 2 0.0912 0.7481 0.012 0.972 0.000 0.000 0.016
#> GSM786534 2 0.6632 0.5884 0.072 0.616 0.160 0.000 0.152
#> GSM786555 2 0.3481 0.7270 0.056 0.840 0.004 0.000 0.100
#> GSM786558 2 0.4077 0.7142 0.060 0.804 0.012 0.000 0.124
#> GSM786559 2 0.1661 0.7492 0.024 0.940 0.000 0.000 0.036
#> GSM786565 2 0.3248 0.7294 0.052 0.856 0.004 0.000 0.088
#> GSM786572 2 0.5407 0.6790 0.076 0.728 0.064 0.000 0.132
#> GSM786579 2 0.5624 0.6722 0.080 0.708 0.064 0.000 0.148
#> GSM786491 5 0.6275 0.4329 0.364 0.000 0.000 0.156 0.480
#> GSM786509 4 0.2233 0.6434 0.104 0.000 0.000 0.892 0.004
#> GSM786538 1 0.4663 0.5123 0.604 0.000 0.000 0.376 0.020
#> GSM786548 2 0.7329 0.4901 0.080 0.524 0.176 0.000 0.220
#> GSM786562 1 0.6008 0.1774 0.560 0.000 0.000 0.292 0.148
#> GSM786566 1 0.6349 -0.0286 0.424 0.000 0.000 0.416 0.160
#> GSM786573 3 0.3339 0.7642 0.040 0.000 0.836 0.000 0.124
#> GSM786574 2 0.0162 0.7496 0.004 0.996 0.000 0.000 0.000
#> GSM786580 5 0.5154 0.7346 0.204 0.020 0.012 0.044 0.720
#> GSM786581 2 0.3861 0.7284 0.092 0.816 0.004 0.000 0.088
#> GSM786583 3 0.1357 0.8517 0.048 0.000 0.948 0.004 0.000
#> GSM786492 4 0.1106 0.6464 0.012 0.000 0.000 0.964 0.024
#> GSM786493 2 0.2664 0.7451 0.040 0.892 0.004 0.000 0.064
#> GSM786499 2 0.5010 0.6221 0.148 0.708 0.000 0.000 0.144
#> GSM786502 2 0.8529 -0.0411 0.260 0.292 0.000 0.184 0.264
#> GSM786537 4 0.5268 0.2404 0.256 0.000 0.052 0.672 0.020
#> GSM786567 2 0.0798 0.7479 0.008 0.976 0.000 0.000 0.016
#> GSM786498 4 0.6495 -0.0684 0.388 0.000 0.000 0.424 0.188
#> GSM786500 4 0.1117 0.6505 0.016 0.000 0.000 0.964 0.020
#> GSM786503 1 0.5668 0.0929 0.504 0.000 0.000 0.416 0.080
#> GSM786507 2 0.5010 0.6221 0.148 0.708 0.000 0.000 0.144
#> GSM786515 2 0.2792 0.7450 0.040 0.884 0.004 0.000 0.072
#> GSM786522 1 0.5338 0.5947 0.604 0.000 0.072 0.324 0.000
#> GSM786526 1 0.5532 0.6230 0.628 0.000 0.080 0.284 0.008
#> GSM786528 1 0.5433 0.6216 0.652 0.000 0.084 0.256 0.008
#> GSM786531 3 0.0404 0.8526 0.012 0.000 0.988 0.000 0.000
#> GSM786535 3 0.4474 0.7025 0.056 0.024 0.780 0.000 0.140
#> GSM786543 4 0.3048 0.5477 0.176 0.000 0.004 0.820 0.000
#> GSM786545 3 0.1704 0.8453 0.068 0.000 0.928 0.004 0.000
#> GSM786551 1 0.5948 0.5789 0.592 0.000 0.092 0.300 0.016
#> GSM786552 3 0.3858 0.7462 0.040 0.036 0.832 0.000 0.092
#> GSM786554 2 0.0912 0.7495 0.012 0.972 0.000 0.000 0.016
#> GSM786557 4 0.4854 0.2100 0.308 0.000 0.000 0.648 0.044
#> GSM786560 4 0.2286 0.6427 0.108 0.000 0.000 0.888 0.004
#> GSM786564 2 0.3229 0.7234 0.032 0.840 0.000 0.000 0.128
#> GSM786568 3 0.0963 0.8535 0.036 0.000 0.964 0.000 0.000
#> GSM786569 4 0.1502 0.6666 0.056 0.000 0.000 0.940 0.004
#> GSM786571 3 0.0566 0.8518 0.012 0.000 0.984 0.000 0.004
#> GSM786496 2 0.3359 0.7278 0.052 0.848 0.004 0.000 0.096
#> GSM786506 1 0.6042 0.0478 0.484 0.000 0.000 0.396 0.120
#> GSM786508 2 0.9967 -0.1415 0.208 0.228 0.208 0.168 0.188
#> GSM786512 2 0.8535 0.1139 0.188 0.348 0.296 0.008 0.160
#> GSM786518 4 0.0000 0.6606 0.000 0.000 0.000 1.000 0.000
#> GSM786519 4 0.1928 0.6608 0.072 0.000 0.004 0.920 0.004
#> GSM786524 4 0.5559 -0.0147 0.344 0.000 0.084 0.572 0.000
#> GSM786529 3 0.0162 0.8480 0.000 0.000 0.996 0.000 0.004
#> GSM786530 3 0.5059 0.6260 0.176 0.000 0.700 0.124 0.000
#> GSM786532 1 0.5625 0.6272 0.628 0.000 0.072 0.284 0.016
#> GSM786533 3 0.5235 0.6406 0.048 0.120 0.740 0.000 0.092
#> GSM786544 3 0.1638 0.8477 0.064 0.000 0.932 0.004 0.000
#> GSM786547 3 0.0324 0.8463 0.000 0.004 0.992 0.000 0.004
#> GSM786549 3 0.1831 0.8416 0.076 0.000 0.920 0.004 0.000
#> GSM786550 5 0.4897 0.4420 0.056 0.004 0.252 0.000 0.688
#> GSM786563 2 0.7329 0.4901 0.080 0.524 0.176 0.000 0.220
#> GSM786570 2 0.1403 0.7491 0.024 0.952 0.000 0.000 0.024
#> GSM786576 2 0.1310 0.7463 0.024 0.956 0.000 0.000 0.020
#> GSM786577 4 0.5353 0.0543 0.328 0.000 0.072 0.600 0.000
#> GSM786578 2 0.6067 0.6301 0.076 0.660 0.072 0.000 0.192
#> GSM786582 1 0.4510 0.4218 0.560 0.000 0.000 0.432 0.008
#> GSM786495 2 0.4723 0.6396 0.128 0.736 0.000 0.000 0.136
#> GSM786505 4 0.4854 0.2100 0.308 0.000 0.000 0.648 0.044
#> GSM786511 4 0.3789 0.3916 0.224 0.000 0.000 0.760 0.016
#> GSM786513 1 0.5519 0.6236 0.624 0.000 0.076 0.292 0.008
#> GSM786525 2 0.4254 0.7061 0.156 0.776 0.004 0.000 0.064
#> GSM786540 2 0.5490 0.6784 0.076 0.720 0.064 0.000 0.140
#> GSM786553 1 0.4938 0.5895 0.716 0.000 0.064 0.208 0.012
#> GSM786561 4 0.1357 0.6653 0.048 0.000 0.004 0.948 0.000
#> GSM786575 5 0.5795 0.6436 0.268 0.000 0.000 0.136 0.596
#> GSM786494 4 0.3237 0.6236 0.104 0.000 0.000 0.848 0.048
#> GSM786504 1 0.5519 0.6236 0.624 0.000 0.076 0.292 0.008
#> GSM786510 2 0.5120 0.6136 0.164 0.696 0.000 0.000 0.140
#> GSM786514 1 0.4862 0.5519 0.604 0.000 0.032 0.364 0.000
#> GSM786516 3 0.4793 0.5653 0.260 0.000 0.684 0.056 0.000
#> GSM786520 4 0.2674 0.6065 0.140 0.000 0.000 0.856 0.004
#> GSM786521 5 0.5154 0.7346 0.204 0.020 0.012 0.044 0.720
#> GSM786536 3 0.2338 0.8172 0.112 0.000 0.884 0.004 0.000
#> GSM786542 3 0.4142 0.7283 0.044 0.036 0.812 0.000 0.108
#> GSM786546 3 0.1872 0.8512 0.052 0.000 0.928 0.000 0.020
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.3565 0.49464 0.000 0.304 0.000 0.004 0.000 0.692
#> GSM786539 6 0.1332 0.52281 0.000 0.008 0.000 0.028 0.012 0.952
#> GSM786541 2 0.5176 0.57900 0.000 0.596 0.000 0.028 0.052 0.324
#> GSM786556 2 0.5548 0.63480 0.000 0.608 0.020 0.028 0.052 0.292
#> GSM786523 3 0.2099 0.77057 0.080 0.008 0.904 0.004 0.004 0.000
#> GSM786497 4 0.2894 0.71976 0.108 0.036 0.000 0.852 0.004 0.000
#> GSM786501 6 0.0665 0.53324 0.000 0.004 0.000 0.008 0.008 0.980
#> GSM786517 6 0.3799 0.50270 0.000 0.276 0.000 0.020 0.000 0.704
#> GSM786534 2 0.5793 0.71528 0.000 0.632 0.084 0.012 0.052 0.220
#> GSM786555 6 0.5192 -0.04253 0.000 0.460 0.000 0.028 0.036 0.476
#> GSM786558 2 0.5158 0.47647 0.000 0.576 0.000 0.032 0.040 0.352
#> GSM786559 6 0.3807 0.42393 0.000 0.368 0.000 0.004 0.000 0.628
#> GSM786565 6 0.5068 0.00637 0.000 0.452 0.000 0.028 0.028 0.492
#> GSM786572 2 0.4396 0.75395 0.000 0.716 0.036 0.008 0.012 0.228
#> GSM786579 2 0.3956 0.77731 0.000 0.748 0.040 0.000 0.008 0.204
#> GSM786491 5 0.4312 0.21716 0.476 0.004 0.000 0.012 0.508 0.000
#> GSM786509 4 0.4222 0.65547 0.292 0.016 0.000 0.676 0.016 0.000
#> GSM786538 1 0.1230 0.66994 0.956 0.000 0.008 0.028 0.008 0.000
#> GSM786548 2 0.4898 0.73282 0.000 0.724 0.088 0.004 0.040 0.144
#> GSM786562 1 0.6963 0.33676 0.556 0.128 0.000 0.140 0.148 0.028
#> GSM786566 1 0.8557 0.09018 0.296 0.132 0.000 0.296 0.152 0.124
#> GSM786573 3 0.4614 0.61681 0.000 0.284 0.660 0.016 0.040 0.000
#> GSM786574 6 0.4359 0.45698 0.000 0.312 0.000 0.028 0.008 0.652
#> GSM786580 5 0.2814 0.80627 0.088 0.016 0.000 0.016 0.872 0.008
#> GSM786581 6 0.4195 0.42746 0.008 0.328 0.000 0.016 0.000 0.648
#> GSM786583 3 0.0363 0.80828 0.012 0.000 0.988 0.000 0.000 0.000
#> GSM786492 4 0.3080 0.71429 0.100 0.040 0.000 0.848 0.012 0.000
#> GSM786493 6 0.4002 0.47004 0.000 0.284 0.000 0.016 0.008 0.692
#> GSM786499 6 0.0964 0.53101 0.000 0.004 0.000 0.016 0.012 0.968
#> GSM786502 6 0.6788 0.13162 0.024 0.192 0.000 0.136 0.088 0.560
#> GSM786537 4 0.5550 0.49425 0.288 0.036 0.044 0.612 0.020 0.000
#> GSM786567 6 0.4160 0.48909 0.000 0.284 0.000 0.024 0.008 0.684
#> GSM786498 4 0.8659 -0.17894 0.280 0.144 0.000 0.284 0.168 0.124
#> GSM786500 4 0.2894 0.71924 0.108 0.036 0.000 0.852 0.004 0.000
#> GSM786503 1 0.6698 0.37195 0.556 0.112 0.000 0.232 0.072 0.028
#> GSM786507 6 0.0951 0.53196 0.000 0.004 0.000 0.020 0.008 0.968
#> GSM786515 6 0.4002 0.47241 0.000 0.284 0.000 0.016 0.008 0.692
#> GSM786522 1 0.2329 0.66613 0.904 0.004 0.048 0.036 0.008 0.000
#> GSM786526 1 0.2165 0.66844 0.912 0.008 0.052 0.024 0.004 0.000
#> GSM786528 1 0.2138 0.66176 0.912 0.008 0.060 0.008 0.012 0.000
#> GSM786531 3 0.0632 0.81079 0.000 0.024 0.976 0.000 0.000 0.000
#> GSM786535 3 0.4529 0.52889 0.000 0.388 0.580 0.008 0.024 0.000
#> GSM786543 4 0.3571 0.69513 0.240 0.008 0.000 0.744 0.008 0.000
#> GSM786545 3 0.1155 0.79946 0.036 0.000 0.956 0.004 0.004 0.000
#> GSM786551 1 0.3251 0.64407 0.856 0.012 0.056 0.060 0.016 0.000
#> GSM786552 3 0.4044 0.63103 0.000 0.312 0.668 0.008 0.012 0.000
#> GSM786554 6 0.4290 0.47594 0.000 0.296 0.000 0.028 0.008 0.668
#> GSM786557 1 0.5876 0.24393 0.564 0.056 0.000 0.296 0.084 0.000
#> GSM786560 4 0.4383 0.66415 0.276 0.024 0.000 0.680 0.020 0.000
#> GSM786564 6 0.4558 0.41072 0.000 0.360 0.000 0.016 0.020 0.604
#> GSM786568 3 0.0603 0.81170 0.000 0.016 0.980 0.004 0.000 0.000
#> GSM786569 4 0.3829 0.71117 0.200 0.024 0.000 0.760 0.016 0.000
#> GSM786571 3 0.0935 0.81030 0.000 0.032 0.964 0.004 0.000 0.000
#> GSM786496 6 0.5134 -0.06147 0.000 0.464 0.000 0.028 0.032 0.476
#> GSM786506 1 0.7930 0.19608 0.388 0.116 0.000 0.292 0.148 0.056
#> GSM786508 6 0.7258 0.09604 0.020 0.084 0.180 0.132 0.032 0.552
#> GSM786512 6 0.6351 0.20950 0.016 0.088 0.224 0.032 0.032 0.608
#> GSM786518 4 0.2913 0.72229 0.116 0.032 0.000 0.848 0.004 0.000
#> GSM786519 4 0.3753 0.71577 0.156 0.040 0.000 0.788 0.016 0.000
#> GSM786524 1 0.5549 -0.18032 0.496 0.012 0.072 0.412 0.008 0.000
#> GSM786529 3 0.1196 0.80797 0.000 0.040 0.952 0.008 0.000 0.000
#> GSM786530 3 0.4932 0.58145 0.092 0.020 0.708 0.172 0.008 0.000
#> GSM786532 1 0.1862 0.67836 0.932 0.012 0.032 0.016 0.008 0.000
#> GSM786533 3 0.5509 0.53309 0.000 0.304 0.588 0.008 0.016 0.084
#> GSM786544 3 0.0790 0.80316 0.032 0.000 0.968 0.000 0.000 0.000
#> GSM786547 3 0.1606 0.80321 0.000 0.056 0.932 0.008 0.004 0.000
#> GSM786549 3 0.1007 0.79922 0.044 0.000 0.956 0.000 0.000 0.000
#> GSM786550 5 0.3927 0.67418 0.012 0.088 0.092 0.008 0.800 0.000
#> GSM786563 2 0.4898 0.73282 0.000 0.724 0.088 0.004 0.040 0.144
#> GSM786570 6 0.4411 0.43122 0.000 0.356 0.000 0.028 0.004 0.612
#> GSM786576 6 0.3711 0.51196 0.000 0.260 0.000 0.020 0.000 0.720
#> GSM786577 4 0.5517 0.35856 0.388 0.012 0.072 0.520 0.008 0.000
#> GSM786578 2 0.4353 0.76478 0.000 0.740 0.040 0.004 0.024 0.192
#> GSM786582 1 0.2252 0.63715 0.900 0.016 0.000 0.072 0.012 0.000
#> GSM786495 6 0.0862 0.53604 0.000 0.016 0.000 0.004 0.008 0.972
#> GSM786505 1 0.5876 0.24393 0.564 0.056 0.000 0.296 0.084 0.000
#> GSM786511 4 0.4870 0.53677 0.300 0.036 0.012 0.640 0.012 0.000
#> GSM786513 1 0.1713 0.67453 0.928 0.000 0.044 0.028 0.000 0.000
#> GSM786525 6 0.5598 0.32015 0.120 0.284 0.000 0.012 0.004 0.580
#> GSM786540 2 0.3985 0.77348 0.000 0.744 0.040 0.000 0.008 0.208
#> GSM786553 1 0.2224 0.64165 0.916 0.036 0.016 0.016 0.016 0.000
#> GSM786561 4 0.3023 0.72577 0.180 0.008 0.000 0.808 0.004 0.000
#> GSM786575 5 0.2636 0.78677 0.120 0.004 0.000 0.016 0.860 0.000
#> GSM786494 4 0.4980 0.59610 0.284 0.020 0.000 0.636 0.060 0.000
#> GSM786504 1 0.1713 0.67453 0.928 0.000 0.044 0.028 0.000 0.000
#> GSM786510 6 0.1218 0.52534 0.000 0.004 0.000 0.028 0.012 0.956
#> GSM786514 1 0.2034 0.66617 0.920 0.008 0.024 0.044 0.004 0.000
#> GSM786516 3 0.3746 0.62536 0.204 0.012 0.764 0.016 0.004 0.000
#> GSM786520 4 0.4482 0.60008 0.316 0.024 0.000 0.644 0.016 0.000
#> GSM786521 5 0.2814 0.80627 0.088 0.016 0.000 0.016 0.872 0.008
#> GSM786536 3 0.2145 0.77268 0.076 0.012 0.904 0.004 0.004 0.000
#> GSM786542 3 0.4194 0.58783 0.000 0.352 0.628 0.008 0.012 0.000
#> GSM786546 3 0.2929 0.79084 0.040 0.076 0.868 0.008 0.008 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 specimen(p) disease.state(p) k
#> MAD:kmeans 90 0.02226 0.801 2
#> MAD:kmeans 88 0.00233 0.163 3
#> MAD:kmeans 74 0.02249 0.155 4
#> MAD:kmeans 74 0.05717 0.369 5
#> MAD:kmeans 64 0.26137 0.773 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 54547 rows and 93 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 1.000 0.960 0.983 0.5057 0.495 0.495
#> 3 3 0.950 0.923 0.969 0.2964 0.798 0.614
#> 4 4 0.693 0.645 0.847 0.1239 0.875 0.660
#> 5 5 0.660 0.512 0.674 0.0600 0.842 0.490
#> 6 6 0.700 0.658 0.783 0.0405 0.893 0.572
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 3
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following 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
#> GSM786527 2 0.000 0.972 0.000 1.000
#> GSM786539 2 0.000 0.972 0.000 1.000
#> GSM786541 2 0.000 0.972 0.000 1.000
#> GSM786556 2 0.000 0.972 0.000 1.000
#> GSM786523 1 0.000 0.992 1.000 0.000
#> GSM786497 1 0.000 0.992 1.000 0.000
#> GSM786501 2 0.000 0.972 0.000 1.000
#> GSM786517 2 0.000 0.972 0.000 1.000
#> GSM786534 2 0.000 0.972 0.000 1.000
#> GSM786555 2 0.000 0.972 0.000 1.000
#> GSM786558 2 0.000 0.972 0.000 1.000
#> GSM786559 2 0.000 0.972 0.000 1.000
#> GSM786565 2 0.000 0.972 0.000 1.000
#> GSM786572 2 0.000 0.972 0.000 1.000
#> GSM786579 2 0.000 0.972 0.000 1.000
#> GSM786491 1 0.000 0.992 1.000 0.000
#> GSM786509 1 0.000 0.992 1.000 0.000
#> GSM786538 1 0.000 0.992 1.000 0.000
#> GSM786548 2 0.000 0.972 0.000 1.000
#> GSM786562 1 0.000 0.992 1.000 0.000
#> GSM786566 1 0.000 0.992 1.000 0.000
#> GSM786573 2 0.000 0.972 0.000 1.000
#> GSM786574 2 0.000 0.972 0.000 1.000
#> GSM786580 2 0.955 0.421 0.376 0.624
#> GSM786581 2 0.000 0.972 0.000 1.000
#> GSM786583 1 0.000 0.992 1.000 0.000
#> GSM786492 1 0.000 0.992 1.000 0.000
#> GSM786493 2 0.000 0.972 0.000 1.000
#> GSM786499 2 0.000 0.972 0.000 1.000
#> GSM786502 2 0.781 0.704 0.232 0.768
#> GSM786537 1 0.000 0.992 1.000 0.000
#> GSM786567 2 0.000 0.972 0.000 1.000
#> GSM786498 1 0.000 0.992 1.000 0.000
#> GSM786500 1 0.000 0.992 1.000 0.000
#> GSM786503 1 0.000 0.992 1.000 0.000
#> GSM786507 2 0.000 0.972 0.000 1.000
#> GSM786515 2 0.000 0.972 0.000 1.000
#> GSM786522 1 0.000 0.992 1.000 0.000
#> GSM786526 1 0.000 0.992 1.000 0.000
#> GSM786528 1 0.000 0.992 1.000 0.000
#> GSM786531 2 0.855 0.618 0.280 0.720
#> GSM786535 2 0.000 0.972 0.000 1.000
#> GSM786543 1 0.000 0.992 1.000 0.000
#> GSM786545 1 0.000 0.992 1.000 0.000
#> GSM786551 1 0.000 0.992 1.000 0.000
#> GSM786552 2 0.000 0.972 0.000 1.000
#> GSM786554 2 0.000 0.972 0.000 1.000
#> GSM786557 1 0.000 0.992 1.000 0.000
#> GSM786560 1 0.000 0.992 1.000 0.000
#> GSM786564 2 0.000 0.972 0.000 1.000
#> GSM786568 2 0.224 0.942 0.036 0.964
#> GSM786569 1 0.000 0.992 1.000 0.000
#> GSM786571 1 0.850 0.604 0.724 0.276
#> GSM786496 2 0.000 0.972 0.000 1.000
#> GSM786506 1 0.000 0.992 1.000 0.000
#> GSM786508 2 0.855 0.625 0.280 0.720
#> GSM786512 2 0.000 0.972 0.000 1.000
#> GSM786518 1 0.000 0.992 1.000 0.000
#> GSM786519 1 0.000 0.992 1.000 0.000
#> GSM786524 1 0.000 0.992 1.000 0.000
#> GSM786529 2 0.224 0.942 0.036 0.964
#> GSM786530 1 0.000 0.992 1.000 0.000
#> GSM786532 1 0.000 0.992 1.000 0.000
#> GSM786533 2 0.000 0.972 0.000 1.000
#> GSM786544 1 0.000 0.992 1.000 0.000
#> GSM786547 2 0.000 0.972 0.000 1.000
#> GSM786549 1 0.000 0.992 1.000 0.000
#> GSM786550 2 0.000 0.972 0.000 1.000
#> GSM786563 2 0.000 0.972 0.000 1.000
#> GSM786570 2 0.000 0.972 0.000 1.000
#> GSM786576 2 0.000 0.972 0.000 1.000
#> GSM786577 1 0.000 0.992 1.000 0.000
#> GSM786578 2 0.000 0.972 0.000 1.000
#> GSM786582 1 0.000 0.992 1.000 0.000
#> GSM786495 2 0.000 0.972 0.000 1.000
#> GSM786505 1 0.000 0.992 1.000 0.000
#> GSM786511 1 0.000 0.992 1.000 0.000
#> GSM786513 1 0.000 0.992 1.000 0.000
#> GSM786525 2 0.000 0.972 0.000 1.000
#> GSM786540 2 0.000 0.972 0.000 1.000
#> GSM786553 1 0.000 0.992 1.000 0.000
#> GSM786561 1 0.000 0.992 1.000 0.000
#> GSM786575 1 0.000 0.992 1.000 0.000
#> GSM786494 1 0.000 0.992 1.000 0.000
#> GSM786504 1 0.000 0.992 1.000 0.000
#> GSM786510 2 0.000 0.972 0.000 1.000
#> GSM786514 1 0.000 0.992 1.000 0.000
#> GSM786516 1 0.000 0.992 1.000 0.000
#> GSM786520 1 0.000 0.992 1.000 0.000
#> GSM786521 1 0.295 0.938 0.948 0.052
#> GSM786536 1 0.000 0.992 1.000 0.000
#> GSM786542 2 0.000 0.972 0.000 1.000
#> GSM786546 2 0.000 0.972 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786539 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786541 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786556 2 0.4555 0.737 0.000 0.800 0.200
#> GSM786523 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786497 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786501 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786534 2 0.6095 0.401 0.000 0.608 0.392
#> GSM786555 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786491 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786548 2 0.6095 0.401 0.000 0.608 0.392
#> GSM786562 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786566 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786573 3 0.0237 0.982 0.000 0.004 0.996
#> GSM786574 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786580 1 0.6079 0.346 0.612 0.388 0.000
#> GSM786581 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786583 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786492 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786493 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786502 2 0.0237 0.929 0.004 0.996 0.000
#> GSM786537 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786567 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786498 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786500 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786503 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786507 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786515 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786522 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786526 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786528 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786531 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786535 3 0.0237 0.982 0.000 0.004 0.996
#> GSM786543 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786545 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786551 1 0.2356 0.910 0.928 0.000 0.072
#> GSM786552 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786554 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786564 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786568 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786569 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786571 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786496 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786506 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786508 2 0.4293 0.775 0.004 0.832 0.164
#> GSM786512 2 0.4555 0.733 0.000 0.800 0.200
#> GSM786518 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786519 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786524 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786529 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786530 3 0.0237 0.982 0.004 0.000 0.996
#> GSM786532 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786533 2 0.6307 0.116 0.000 0.512 0.488
#> GSM786544 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786547 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786549 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786550 3 0.4555 0.720 0.000 0.200 0.800
#> GSM786563 2 0.6095 0.401 0.000 0.608 0.392
#> GSM786570 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786577 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786578 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786582 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786511 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786513 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786525 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786540 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786553 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786561 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786575 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786494 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786504 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786510 2 0.0000 0.933 0.000 1.000 0.000
#> GSM786514 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786516 3 0.0892 0.966 0.020 0.000 0.980
#> GSM786520 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786521 1 0.0000 0.986 1.000 0.000 0.000
#> GSM786536 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786542 3 0.0000 0.985 0.000 0.000 1.000
#> GSM786546 3 0.0000 0.985 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786539 2 0.2973 0.834 0.000 0.856 0.000 0.144
#> GSM786541 2 0.1042 0.903 0.000 0.972 0.020 0.008
#> GSM786556 2 0.3681 0.772 0.000 0.816 0.176 0.008
#> GSM786523 3 0.3764 0.734 0.216 0.000 0.784 0.000
#> GSM786497 4 0.4746 0.432 0.368 0.000 0.000 0.632
#> GSM786501 2 0.2973 0.834 0.000 0.856 0.000 0.144
#> GSM786517 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786534 2 0.4722 0.595 0.000 0.692 0.300 0.008
#> GSM786555 2 0.0188 0.910 0.000 0.996 0.000 0.004
#> GSM786558 2 0.0672 0.907 0.000 0.984 0.008 0.008
#> GSM786559 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0188 0.910 0.000 0.996 0.000 0.004
#> GSM786572 2 0.1510 0.898 0.000 0.956 0.028 0.016
#> GSM786579 2 0.1545 0.894 0.000 0.952 0.040 0.008
#> GSM786491 4 0.4679 0.443 0.352 0.000 0.000 0.648
#> GSM786509 1 0.4989 -0.106 0.528 0.000 0.000 0.472
#> GSM786538 1 0.1389 0.672 0.952 0.000 0.000 0.048
#> GSM786548 2 0.5130 0.560 0.000 0.668 0.312 0.020
#> GSM786562 4 0.2704 0.607 0.124 0.000 0.000 0.876
#> GSM786566 4 0.1637 0.599 0.060 0.000 0.000 0.940
#> GSM786573 3 0.1732 0.861 0.004 0.040 0.948 0.008
#> GSM786574 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786580 4 0.4035 0.505 0.176 0.020 0.000 0.804
#> GSM786581 2 0.0188 0.910 0.000 0.996 0.000 0.004
#> GSM786583 3 0.0707 0.884 0.020 0.000 0.980 0.000
#> GSM786492 4 0.4522 0.494 0.320 0.000 0.000 0.680
#> GSM786493 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786499 2 0.2973 0.834 0.000 0.856 0.000 0.144
#> GSM786502 4 0.3873 0.463 0.000 0.228 0.000 0.772
#> GSM786537 1 0.2973 0.566 0.856 0.000 0.000 0.144
#> GSM786567 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786498 4 0.1389 0.597 0.048 0.000 0.000 0.952
#> GSM786500 4 0.4643 0.465 0.344 0.000 0.000 0.656
#> GSM786503 4 0.4985 0.191 0.468 0.000 0.000 0.532
#> GSM786507 2 0.2973 0.834 0.000 0.856 0.000 0.144
#> GSM786515 2 0.0188 0.909 0.000 0.996 0.000 0.004
#> GSM786522 1 0.0188 0.677 0.996 0.000 0.000 0.004
#> GSM786526 1 0.0000 0.676 1.000 0.000 0.000 0.000
#> GSM786528 1 0.1118 0.671 0.964 0.000 0.000 0.036
#> GSM786531 3 0.0000 0.887 0.000 0.000 1.000 0.000
#> GSM786535 3 0.1004 0.881 0.000 0.004 0.972 0.024
#> GSM786543 1 0.3444 0.521 0.816 0.000 0.000 0.184
#> GSM786545 3 0.1389 0.874 0.048 0.000 0.952 0.000
#> GSM786551 1 0.3024 0.575 0.852 0.000 0.000 0.148
#> GSM786552 3 0.0336 0.885 0.000 0.000 0.992 0.008
#> GSM786554 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786557 4 0.4996 0.157 0.484 0.000 0.000 0.516
#> GSM786560 1 0.4989 -0.106 0.528 0.000 0.000 0.472
#> GSM786564 2 0.0592 0.907 0.000 0.984 0.000 0.016
#> GSM786568 3 0.0000 0.887 0.000 0.000 1.000 0.000
#> GSM786569 1 0.4989 -0.106 0.528 0.000 0.000 0.472
#> GSM786571 3 0.0000 0.887 0.000 0.000 1.000 0.000
#> GSM786496 2 0.0188 0.910 0.000 0.996 0.000 0.004
#> GSM786506 4 0.3074 0.587 0.152 0.000 0.000 0.848
#> GSM786508 4 0.6680 0.382 0.000 0.260 0.136 0.604
#> GSM786512 2 0.7505 0.273 0.000 0.476 0.200 0.324
#> GSM786518 1 0.5000 -0.164 0.504 0.000 0.000 0.496
#> GSM786519 1 0.4998 -0.142 0.512 0.000 0.000 0.488
#> GSM786524 1 0.0469 0.673 0.988 0.000 0.000 0.012
#> GSM786529 3 0.0000 0.887 0.000 0.000 1.000 0.000
#> GSM786530 3 0.5685 0.252 0.460 0.000 0.516 0.024
#> GSM786532 1 0.1474 0.663 0.948 0.000 0.000 0.052
#> GSM786533 3 0.5323 0.358 0.000 0.352 0.628 0.020
#> GSM786544 3 0.0817 0.883 0.024 0.000 0.976 0.000
#> GSM786547 3 0.0000 0.887 0.000 0.000 1.000 0.000
#> GSM786549 3 0.1389 0.872 0.048 0.000 0.952 0.000
#> GSM786550 3 0.5360 0.601 0.004 0.024 0.668 0.304
#> GSM786563 2 0.5130 0.560 0.000 0.668 0.312 0.020
#> GSM786570 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0000 0.910 0.000 1.000 0.000 0.000
#> GSM786577 1 0.0469 0.673 0.988 0.000 0.000 0.012
#> GSM786578 2 0.2111 0.886 0.000 0.932 0.044 0.024
#> GSM786582 1 0.1557 0.668 0.944 0.000 0.000 0.056
#> GSM786495 2 0.2921 0.836 0.000 0.860 0.000 0.140
#> GSM786505 4 0.4996 0.157 0.484 0.000 0.000 0.516
#> GSM786511 1 0.1940 0.648 0.924 0.000 0.000 0.076
#> GSM786513 1 0.0817 0.676 0.976 0.000 0.000 0.024
#> GSM786525 2 0.0188 0.910 0.000 0.996 0.000 0.004
#> GSM786540 2 0.1722 0.890 0.000 0.944 0.048 0.008
#> GSM786553 1 0.1716 0.660 0.936 0.000 0.000 0.064
#> GSM786561 1 0.4989 -0.106 0.528 0.000 0.000 0.472
#> GSM786575 4 0.4661 0.449 0.348 0.000 0.000 0.652
#> GSM786494 4 0.4477 0.499 0.312 0.000 0.000 0.688
#> GSM786504 1 0.0817 0.676 0.976 0.000 0.000 0.024
#> GSM786510 2 0.2973 0.834 0.000 0.856 0.000 0.144
#> GSM786514 1 0.0336 0.676 0.992 0.000 0.000 0.008
#> GSM786516 1 0.4746 0.190 0.632 0.000 0.368 0.000
#> GSM786520 1 0.4992 -0.112 0.524 0.000 0.000 0.476
#> GSM786521 4 0.3810 0.506 0.188 0.008 0.000 0.804
#> GSM786536 3 0.3907 0.715 0.232 0.000 0.768 0.000
#> GSM786542 3 0.0779 0.883 0.000 0.004 0.980 0.016
#> GSM786546 3 0.1284 0.883 0.012 0.000 0.964 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.3966 0.57330 0.000 0.664 0.000 0.000 0.336
#> GSM786539 2 0.0000 0.48208 0.000 1.000 0.000 0.000 0.000
#> GSM786541 5 0.4171 0.19283 0.000 0.396 0.000 0.000 0.604
#> GSM786556 5 0.4392 0.23912 0.000 0.380 0.008 0.000 0.612
#> GSM786523 3 0.2782 0.79519 0.048 0.000 0.880 0.072 0.000
#> GSM786497 4 0.2798 0.66281 0.140 0.000 0.000 0.852 0.008
#> GSM786501 2 0.0000 0.48208 0.000 1.000 0.000 0.000 0.000
#> GSM786517 2 0.3837 0.58540 0.000 0.692 0.000 0.000 0.308
#> GSM786534 5 0.4639 0.25554 0.000 0.368 0.020 0.000 0.612
#> GSM786555 2 0.4201 0.48525 0.000 0.592 0.000 0.000 0.408
#> GSM786558 2 0.4305 0.25176 0.000 0.512 0.000 0.000 0.488
#> GSM786559 2 0.3913 0.57802 0.000 0.676 0.000 0.000 0.324
#> GSM786565 2 0.4201 0.48525 0.000 0.592 0.000 0.000 0.408
#> GSM786572 5 0.4088 0.24396 0.000 0.368 0.000 0.000 0.632
#> GSM786579 5 0.4150 0.22045 0.000 0.388 0.000 0.000 0.612
#> GSM786491 1 0.6793 0.03862 0.376 0.000 0.000 0.292 0.332
#> GSM786509 4 0.3949 0.64539 0.332 0.000 0.000 0.668 0.000
#> GSM786538 1 0.0404 0.74055 0.988 0.000 0.000 0.012 0.000
#> GSM786548 5 0.4522 0.30224 0.000 0.316 0.024 0.000 0.660
#> GSM786562 4 0.5409 0.48579 0.308 0.020 0.000 0.628 0.044
#> GSM786566 4 0.5264 0.57141 0.108 0.124 0.000 0.732 0.036
#> GSM786573 3 0.4821 0.63672 0.000 0.044 0.680 0.004 0.272
#> GSM786574 2 0.3983 0.57015 0.000 0.660 0.000 0.000 0.340
#> GSM786580 5 0.7761 -0.33449 0.272 0.060 0.000 0.288 0.380
#> GSM786581 2 0.4182 0.49421 0.000 0.600 0.000 0.000 0.400
#> GSM786583 3 0.0000 0.84686 0.000 0.000 1.000 0.000 0.000
#> GSM786492 4 0.3192 0.65679 0.112 0.000 0.000 0.848 0.040
#> GSM786493 2 0.4138 0.51384 0.000 0.616 0.000 0.000 0.384
#> GSM786499 2 0.0000 0.48208 0.000 1.000 0.000 0.000 0.000
#> GSM786502 2 0.4894 0.02175 0.000 0.612 0.000 0.352 0.036
#> GSM786537 1 0.6146 0.32657 0.496 0.000 0.028 0.412 0.064
#> GSM786567 2 0.3816 0.58531 0.000 0.696 0.000 0.000 0.304
#> GSM786498 4 0.4758 0.55753 0.048 0.124 0.000 0.772 0.056
#> GSM786500 4 0.3106 0.66516 0.132 0.000 0.000 0.844 0.024
#> GSM786503 4 0.4930 0.49857 0.424 0.028 0.000 0.548 0.000
#> GSM786507 2 0.0000 0.48208 0.000 1.000 0.000 0.000 0.000
#> GSM786515 2 0.4101 0.52758 0.000 0.628 0.000 0.000 0.372
#> GSM786522 1 0.1124 0.74753 0.960 0.000 0.004 0.036 0.000
#> GSM786526 1 0.1430 0.74351 0.944 0.000 0.004 0.052 0.000
#> GSM786528 1 0.0451 0.74696 0.988 0.000 0.004 0.008 0.000
#> GSM786531 3 0.0404 0.84748 0.000 0.000 0.988 0.000 0.012
#> GSM786535 3 0.3816 0.66859 0.000 0.000 0.696 0.000 0.304
#> GSM786543 4 0.4126 0.41641 0.380 0.000 0.000 0.620 0.000
#> GSM786545 3 0.1956 0.81793 0.008 0.000 0.916 0.076 0.000
#> GSM786551 1 0.3106 0.66431 0.844 0.000 0.000 0.132 0.024
#> GSM786552 3 0.3661 0.68774 0.000 0.000 0.724 0.000 0.276
#> GSM786554 2 0.3876 0.58395 0.000 0.684 0.000 0.000 0.316
#> GSM786557 4 0.4294 0.51007 0.468 0.000 0.000 0.532 0.000
#> GSM786560 4 0.3949 0.64191 0.332 0.000 0.000 0.668 0.000
#> GSM786564 2 0.3949 0.55370 0.000 0.668 0.000 0.000 0.332
#> GSM786568 3 0.0290 0.84755 0.000 0.000 0.992 0.000 0.008
#> GSM786569 4 0.3336 0.66704 0.228 0.000 0.000 0.772 0.000
#> GSM786571 3 0.0290 0.84769 0.000 0.000 0.992 0.000 0.008
#> GSM786496 2 0.4210 0.47738 0.000 0.588 0.000 0.000 0.412
#> GSM786506 4 0.5419 0.52318 0.332 0.044 0.000 0.608 0.016
#> GSM786508 2 0.6030 0.02132 0.000 0.584 0.148 0.264 0.004
#> GSM786512 2 0.5244 0.15550 0.000 0.688 0.196 0.112 0.004
#> GSM786518 4 0.3039 0.66533 0.192 0.000 0.000 0.808 0.000
#> GSM786519 4 0.3177 0.66882 0.208 0.000 0.000 0.792 0.000
#> GSM786524 1 0.4786 0.48192 0.652 0.000 0.040 0.308 0.000
#> GSM786529 3 0.0703 0.84560 0.000 0.000 0.976 0.000 0.024
#> GSM786530 3 0.6120 0.39031 0.152 0.000 0.568 0.276 0.004
#> GSM786532 1 0.0404 0.73796 0.988 0.000 0.000 0.012 0.000
#> GSM786533 5 0.6742 0.00331 0.000 0.260 0.352 0.000 0.388
#> GSM786544 3 0.0000 0.84686 0.000 0.000 1.000 0.000 0.000
#> GSM786547 3 0.0963 0.84274 0.000 0.000 0.964 0.000 0.036
#> GSM786549 3 0.0693 0.84418 0.008 0.000 0.980 0.012 0.000
#> GSM786550 5 0.5928 -0.25238 0.028 0.000 0.264 0.084 0.624
#> GSM786563 5 0.4503 0.30274 0.000 0.312 0.024 0.000 0.664
#> GSM786570 2 0.3895 0.58239 0.000 0.680 0.000 0.000 0.320
#> GSM786576 2 0.3774 0.58582 0.000 0.704 0.000 0.000 0.296
#> GSM786577 1 0.5087 0.48216 0.644 0.000 0.064 0.292 0.000
#> GSM786578 5 0.3913 0.29093 0.000 0.324 0.000 0.000 0.676
#> GSM786582 1 0.1544 0.72695 0.932 0.000 0.000 0.068 0.000
#> GSM786495 2 0.0162 0.48348 0.000 0.996 0.000 0.000 0.004
#> GSM786505 4 0.4294 0.51007 0.468 0.000 0.000 0.532 0.000
#> GSM786511 1 0.4876 0.31177 0.544 0.000 0.012 0.436 0.008
#> GSM786513 1 0.0794 0.74921 0.972 0.000 0.000 0.028 0.000
#> GSM786525 2 0.4974 0.41408 0.032 0.560 0.000 0.000 0.408
#> GSM786540 5 0.4138 0.23113 0.000 0.384 0.000 0.000 0.616
#> GSM786553 1 0.1341 0.70427 0.944 0.000 0.000 0.056 0.000
#> GSM786561 4 0.3305 0.66178 0.224 0.000 0.000 0.776 0.000
#> GSM786575 4 0.6822 -0.01895 0.320 0.000 0.000 0.348 0.332
#> GSM786494 4 0.4724 0.65159 0.164 0.000 0.000 0.732 0.104
#> GSM786504 1 0.0609 0.74960 0.980 0.000 0.000 0.020 0.000
#> GSM786510 2 0.0000 0.48208 0.000 1.000 0.000 0.000 0.000
#> GSM786514 1 0.2848 0.65931 0.840 0.000 0.004 0.156 0.000
#> GSM786516 3 0.5029 0.45504 0.292 0.000 0.648 0.060 0.000
#> GSM786520 4 0.3983 0.64272 0.340 0.000 0.000 0.660 0.000
#> GSM786521 5 0.7593 -0.35206 0.288 0.044 0.000 0.288 0.380
#> GSM786536 3 0.2597 0.80980 0.060 0.000 0.896 0.040 0.004
#> GSM786542 3 0.3895 0.63436 0.000 0.000 0.680 0.000 0.320
#> GSM786546 3 0.2733 0.81182 0.012 0.000 0.872 0.004 0.112
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.1387 0.7257 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM786539 6 0.3747 0.7190 0.000 0.396 0.000 0.000 0.000 0.604
#> GSM786541 2 0.3190 0.6984 0.000 0.772 0.000 0.000 0.008 0.220
#> GSM786556 2 0.3368 0.6919 0.000 0.756 0.000 0.000 0.012 0.232
#> GSM786523 3 0.2696 0.7491 0.076 0.000 0.872 0.048 0.000 0.004
#> GSM786497 4 0.1296 0.6752 0.044 0.000 0.000 0.948 0.004 0.004
#> GSM786501 6 0.3782 0.7107 0.000 0.412 0.000 0.000 0.000 0.588
#> GSM786517 2 0.1714 0.6981 0.000 0.908 0.000 0.000 0.000 0.092
#> GSM786534 2 0.3974 0.6692 0.000 0.720 0.012 0.004 0.012 0.252
#> GSM786555 2 0.0260 0.7524 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM786558 2 0.2092 0.7368 0.000 0.876 0.000 0.000 0.000 0.124
#> GSM786559 2 0.2048 0.7320 0.000 0.880 0.000 0.000 0.000 0.120
#> GSM786565 2 0.0260 0.7536 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM786572 2 0.3743 0.6764 0.000 0.724 0.000 0.000 0.024 0.252
#> GSM786579 2 0.3445 0.6785 0.000 0.732 0.000 0.000 0.008 0.260
#> GSM786491 5 0.3422 0.8072 0.168 0.000 0.000 0.040 0.792 0.000
#> GSM786509 4 0.3827 0.6568 0.212 0.000 0.000 0.752 0.024 0.012
#> GSM786538 1 0.1332 0.8269 0.952 0.000 0.000 0.028 0.012 0.008
#> GSM786548 2 0.4987 0.6148 0.000 0.652 0.020 0.004 0.056 0.268
#> GSM786562 4 0.7080 0.3823 0.244 0.000 0.000 0.448 0.196 0.112
#> GSM786566 4 0.6528 0.4607 0.104 0.000 0.000 0.548 0.148 0.200
#> GSM786573 3 0.6174 0.5628 0.004 0.096 0.600 0.048 0.016 0.236
#> GSM786574 2 0.1141 0.7309 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM786580 5 0.1887 0.8881 0.048 0.000 0.000 0.016 0.924 0.012
#> GSM786581 2 0.1888 0.7413 0.004 0.916 0.000 0.000 0.012 0.068
#> GSM786583 3 0.0146 0.7956 0.004 0.000 0.996 0.000 0.000 0.000
#> GSM786492 4 0.1578 0.6744 0.048 0.000 0.000 0.936 0.012 0.004
#> GSM786493 2 0.1765 0.6960 0.000 0.904 0.000 0.000 0.000 0.096
#> GSM786499 6 0.3765 0.7187 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM786502 6 0.5813 0.4596 0.000 0.120 0.000 0.192 0.064 0.624
#> GSM786537 4 0.5785 0.1002 0.272 0.000 0.012 0.548 0.168 0.000
#> GSM786567 2 0.1863 0.6856 0.000 0.896 0.000 0.000 0.000 0.104
#> GSM786498 4 0.5547 0.4582 0.024 0.000 0.000 0.624 0.160 0.192
#> GSM786500 4 0.1844 0.6781 0.048 0.000 0.000 0.924 0.024 0.004
#> GSM786503 4 0.6211 0.4235 0.360 0.000 0.000 0.484 0.096 0.060
#> GSM786507 6 0.3765 0.7187 0.000 0.404 0.000 0.000 0.000 0.596
#> GSM786515 2 0.2135 0.6556 0.000 0.872 0.000 0.000 0.000 0.128
#> GSM786522 1 0.1542 0.8317 0.936 0.000 0.000 0.052 0.004 0.008
#> GSM786526 1 0.1375 0.8309 0.952 0.000 0.008 0.028 0.008 0.004
#> GSM786528 1 0.1148 0.8295 0.960 0.000 0.004 0.016 0.020 0.000
#> GSM786531 3 0.0363 0.7966 0.000 0.000 0.988 0.000 0.000 0.012
#> GSM786535 3 0.5795 0.5414 0.004 0.052 0.588 0.004 0.060 0.292
#> GSM786543 4 0.2848 0.6425 0.176 0.000 0.000 0.816 0.008 0.000
#> GSM786545 3 0.1857 0.7762 0.028 0.000 0.924 0.044 0.000 0.004
#> GSM786551 1 0.3017 0.7651 0.840 0.000 0.000 0.108 0.052 0.000
#> GSM786552 3 0.5304 0.5787 0.004 0.064 0.636 0.004 0.024 0.268
#> GSM786554 2 0.1501 0.7192 0.000 0.924 0.000 0.000 0.000 0.076
#> GSM786557 4 0.5782 0.4494 0.388 0.000 0.000 0.492 0.092 0.028
#> GSM786560 4 0.3622 0.6473 0.236 0.000 0.000 0.744 0.016 0.004
#> GSM786564 2 0.3150 0.6872 0.000 0.832 0.000 0.000 0.064 0.104
#> GSM786568 3 0.0260 0.7959 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM786569 4 0.2913 0.6862 0.116 0.000 0.000 0.848 0.032 0.004
#> GSM786571 3 0.0405 0.7962 0.000 0.000 0.988 0.000 0.008 0.004
#> GSM786496 2 0.0458 0.7546 0.000 0.984 0.000 0.000 0.000 0.016
#> GSM786506 4 0.6736 0.4582 0.276 0.000 0.000 0.488 0.136 0.100
#> GSM786508 6 0.6093 0.5221 0.000 0.112 0.092 0.140 0.016 0.640
#> GSM786512 6 0.6123 0.5806 0.004 0.168 0.136 0.048 0.016 0.628
#> GSM786518 4 0.1411 0.6752 0.060 0.000 0.000 0.936 0.004 0.000
#> GSM786519 4 0.2264 0.6851 0.096 0.000 0.000 0.888 0.012 0.004
#> GSM786524 1 0.4279 0.2869 0.548 0.000 0.012 0.436 0.004 0.000
#> GSM786529 3 0.0993 0.7932 0.000 0.000 0.964 0.000 0.012 0.024
#> GSM786530 3 0.5415 0.3087 0.080 0.000 0.520 0.388 0.004 0.008
#> GSM786532 1 0.1542 0.8205 0.944 0.000 0.000 0.016 0.016 0.024
#> GSM786533 6 0.6876 -0.0654 0.004 0.264 0.276 0.008 0.028 0.420
#> GSM786544 3 0.0363 0.7944 0.012 0.000 0.988 0.000 0.000 0.000
#> GSM786547 3 0.1672 0.7847 0.004 0.000 0.932 0.000 0.016 0.048
#> GSM786549 3 0.0858 0.7911 0.028 0.000 0.968 0.000 0.000 0.004
#> GSM786550 5 0.3501 0.7589 0.012 0.028 0.084 0.000 0.840 0.036
#> GSM786563 2 0.5006 0.6102 0.000 0.648 0.020 0.004 0.056 0.272
#> GSM786570 2 0.1501 0.7393 0.000 0.924 0.000 0.000 0.000 0.076
#> GSM786576 2 0.2219 0.6430 0.000 0.864 0.000 0.000 0.000 0.136
#> GSM786577 1 0.4450 0.2569 0.528 0.000 0.020 0.448 0.004 0.000
#> GSM786578 2 0.4834 0.6101 0.000 0.640 0.000 0.000 0.100 0.260
#> GSM786582 1 0.2715 0.7830 0.860 0.000 0.000 0.112 0.004 0.024
#> GSM786495 6 0.3782 0.7095 0.000 0.412 0.000 0.000 0.000 0.588
#> GSM786505 4 0.5776 0.4495 0.384 0.000 0.000 0.496 0.092 0.028
#> GSM786511 4 0.3940 0.1972 0.336 0.000 0.004 0.652 0.008 0.000
#> GSM786513 1 0.1245 0.8357 0.952 0.000 0.000 0.032 0.016 0.000
#> GSM786525 2 0.3951 0.6301 0.088 0.800 0.000 0.000 0.036 0.076
#> GSM786540 2 0.3586 0.6708 0.000 0.720 0.000 0.000 0.012 0.268
#> GSM786553 1 0.2556 0.7572 0.892 0.000 0.000 0.048 0.028 0.032
#> GSM786561 4 0.2100 0.6746 0.112 0.000 0.000 0.884 0.004 0.000
#> GSM786575 5 0.2888 0.8600 0.092 0.000 0.000 0.056 0.852 0.000
#> GSM786494 4 0.4357 0.6647 0.108 0.000 0.000 0.732 0.156 0.004
#> GSM786504 1 0.1245 0.8357 0.952 0.000 0.000 0.032 0.016 0.000
#> GSM786510 6 0.3737 0.7186 0.000 0.392 0.000 0.000 0.000 0.608
#> GSM786514 1 0.2340 0.7529 0.852 0.000 0.000 0.148 0.000 0.000
#> GSM786516 3 0.4452 0.5762 0.220 0.000 0.708 0.064 0.004 0.004
#> GSM786520 4 0.4405 0.6257 0.260 0.000 0.000 0.688 0.040 0.012
#> GSM786521 5 0.1887 0.8881 0.048 0.000 0.000 0.016 0.924 0.012
#> GSM786536 3 0.2618 0.7508 0.092 0.000 0.876 0.024 0.004 0.004
#> GSM786542 3 0.6120 0.4902 0.004 0.112 0.552 0.004 0.036 0.292
#> GSM786546 3 0.4370 0.7231 0.048 0.004 0.784 0.004 0.068 0.092
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 specimen(p) disease.state(p) k
#> MAD:skmeans 92 0.02482 1.000 2
#> MAD:skmeans 88 0.00633 0.287 3
#> MAD:skmeans 71 0.01924 0.491 4
#> MAD:skmeans 54 0.41681 0.847 5
#> MAD:skmeans 78 0.22095 0.849 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 54547 rows and 93 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 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.955 0.931 0.972 0.5052 0.495 0.495
#> 3 3 0.711 0.712 0.884 0.3140 0.765 0.557
#> 4 4 0.717 0.769 0.868 0.1203 0.853 0.597
#> 5 5 0.682 0.715 0.831 0.0391 0.968 0.875
#> 6 6 0.700 0.545 0.770 0.0478 0.930 0.717
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
#> GSM786527 2 0.000 0.959 0.000 1.000
#> GSM786539 2 0.000 0.959 0.000 1.000
#> GSM786541 2 0.000 0.959 0.000 1.000
#> GSM786556 2 0.000 0.959 0.000 1.000
#> GSM786523 1 0.000 0.982 1.000 0.000
#> GSM786497 1 0.000 0.982 1.000 0.000
#> GSM786501 2 0.000 0.959 0.000 1.000
#> GSM786517 2 0.000 0.959 0.000 1.000
#> GSM786534 2 0.000 0.959 0.000 1.000
#> GSM786555 2 0.000 0.959 0.000 1.000
#> GSM786558 2 0.000 0.959 0.000 1.000
#> GSM786559 2 0.000 0.959 0.000 1.000
#> GSM786565 2 0.000 0.959 0.000 1.000
#> GSM786572 2 0.000 0.959 0.000 1.000
#> GSM786579 2 0.000 0.959 0.000 1.000
#> GSM786491 1 0.000 0.982 1.000 0.000
#> GSM786509 1 0.000 0.982 1.000 0.000
#> GSM786538 1 0.000 0.982 1.000 0.000
#> GSM786548 2 0.000 0.959 0.000 1.000
#> GSM786562 1 0.430 0.895 0.912 0.088
#> GSM786566 1 0.224 0.950 0.964 0.036
#> GSM786573 2 0.000 0.959 0.000 1.000
#> GSM786574 2 0.000 0.959 0.000 1.000
#> GSM786580 2 0.973 0.329 0.404 0.596
#> GSM786581 2 0.000 0.959 0.000 1.000
#> GSM786583 2 0.949 0.437 0.368 0.632
#> GSM786492 1 0.000 0.982 1.000 0.000
#> GSM786493 2 0.000 0.959 0.000 1.000
#> GSM786499 2 0.000 0.959 0.000 1.000
#> GSM786502 2 0.971 0.339 0.400 0.600
#> GSM786537 1 0.000 0.982 1.000 0.000
#> GSM786567 2 0.000 0.959 0.000 1.000
#> GSM786498 1 0.358 0.917 0.932 0.068
#> GSM786500 1 0.000 0.982 1.000 0.000
#> GSM786503 1 0.000 0.982 1.000 0.000
#> GSM786507 2 0.000 0.959 0.000 1.000
#> GSM786515 2 0.000 0.959 0.000 1.000
#> GSM786522 1 0.000 0.982 1.000 0.000
#> GSM786526 1 0.000 0.982 1.000 0.000
#> GSM786528 1 0.000 0.982 1.000 0.000
#> GSM786531 2 0.141 0.942 0.020 0.980
#> GSM786535 2 0.000 0.959 0.000 1.000
#> GSM786543 1 0.000 0.982 1.000 0.000
#> GSM786545 1 0.000 0.982 1.000 0.000
#> GSM786551 1 0.000 0.982 1.000 0.000
#> GSM786552 2 0.000 0.959 0.000 1.000
#> GSM786554 2 0.000 0.959 0.000 1.000
#> GSM786557 1 0.000 0.982 1.000 0.000
#> GSM786560 1 0.000 0.982 1.000 0.000
#> GSM786564 2 0.000 0.959 0.000 1.000
#> GSM786568 2 0.978 0.307 0.412 0.588
#> GSM786569 1 0.000 0.982 1.000 0.000
#> GSM786571 2 0.775 0.699 0.228 0.772
#> GSM786496 2 0.000 0.959 0.000 1.000
#> GSM786506 1 0.000 0.982 1.000 0.000
#> GSM786508 1 0.745 0.724 0.788 0.212
#> GSM786512 2 0.000 0.959 0.000 1.000
#> GSM786518 1 0.000 0.982 1.000 0.000
#> GSM786519 1 0.000 0.982 1.000 0.000
#> GSM786524 1 0.000 0.982 1.000 0.000
#> GSM786529 2 0.000 0.959 0.000 1.000
#> GSM786530 1 0.000 0.982 1.000 0.000
#> GSM786532 1 0.000 0.982 1.000 0.000
#> GSM786533 2 0.000 0.959 0.000 1.000
#> GSM786544 1 0.000 0.982 1.000 0.000
#> GSM786547 2 0.000 0.959 0.000 1.000
#> GSM786549 1 0.000 0.982 1.000 0.000
#> GSM786550 2 0.000 0.959 0.000 1.000
#> GSM786563 2 0.000 0.959 0.000 1.000
#> GSM786570 2 0.000 0.959 0.000 1.000
#> GSM786576 2 0.000 0.959 0.000 1.000
#> GSM786577 1 0.000 0.982 1.000 0.000
#> GSM786578 2 0.000 0.959 0.000 1.000
#> GSM786582 1 0.000 0.982 1.000 0.000
#> GSM786495 2 0.000 0.959 0.000 1.000
#> GSM786505 1 0.000 0.982 1.000 0.000
#> GSM786511 1 0.000 0.982 1.000 0.000
#> GSM786513 1 0.000 0.982 1.000 0.000
#> GSM786525 2 0.000 0.959 0.000 1.000
#> GSM786540 2 0.000 0.959 0.000 1.000
#> GSM786553 1 0.000 0.982 1.000 0.000
#> GSM786561 1 0.000 0.982 1.000 0.000
#> GSM786575 1 0.000 0.982 1.000 0.000
#> GSM786494 1 0.000 0.982 1.000 0.000
#> GSM786504 1 0.000 0.982 1.000 0.000
#> GSM786510 2 0.000 0.959 0.000 1.000
#> GSM786514 1 0.000 0.982 1.000 0.000
#> GSM786516 1 0.000 0.982 1.000 0.000
#> GSM786520 1 0.000 0.982 1.000 0.000
#> GSM786521 1 0.932 0.453 0.652 0.348
#> GSM786536 1 0.000 0.982 1.000 0.000
#> GSM786542 2 0.000 0.959 0.000 1.000
#> GSM786546 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
#> GSM786527 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786539 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786541 2 0.3752 0.7423 0.000 0.856 0.144
#> GSM786556 2 0.3482 0.7653 0.000 0.872 0.128
#> GSM786523 3 0.1031 0.7260 0.024 0.000 0.976
#> GSM786497 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786501 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786534 2 0.4887 0.6810 0.000 0.772 0.228
#> GSM786555 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786558 2 0.1163 0.8288 0.000 0.972 0.028
#> GSM786559 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786565 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786572 2 0.3816 0.7603 0.000 0.852 0.148
#> GSM786579 2 0.5650 0.5680 0.000 0.688 0.312
#> GSM786491 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786548 2 0.6280 0.2860 0.000 0.540 0.460
#> GSM786562 1 0.2860 0.8693 0.912 0.084 0.004
#> GSM786566 1 0.1643 0.9160 0.956 0.044 0.000
#> GSM786573 3 0.1289 0.7093 0.000 0.032 0.968
#> GSM786574 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786580 2 0.6180 0.3467 0.000 0.584 0.416
#> GSM786581 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786583 3 0.0000 0.7223 0.000 0.000 1.000
#> GSM786492 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786493 2 0.4399 0.7022 0.000 0.812 0.188
#> GSM786499 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786502 2 0.6297 0.6108 0.184 0.756 0.060
#> GSM786537 1 0.0747 0.9458 0.984 0.000 0.016
#> GSM786567 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786498 1 0.2066 0.9017 0.940 0.060 0.000
#> GSM786500 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786503 1 0.0592 0.9494 0.988 0.000 0.012
#> GSM786507 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786515 2 0.5363 0.5574 0.000 0.724 0.276
#> GSM786522 1 0.1860 0.9100 0.948 0.000 0.052
#> GSM786526 3 0.6305 0.0732 0.484 0.000 0.516
#> GSM786528 3 0.6235 0.2127 0.436 0.000 0.564
#> GSM786531 3 0.0000 0.7223 0.000 0.000 1.000
#> GSM786535 3 0.6008 0.1590 0.000 0.372 0.628
#> GSM786543 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786545 3 0.0747 0.7269 0.016 0.000 0.984
#> GSM786551 3 0.6180 0.2597 0.416 0.000 0.584
#> GSM786552 3 0.6008 0.1590 0.000 0.372 0.628
#> GSM786554 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786564 2 0.1643 0.8175 0.000 0.956 0.044
#> GSM786568 3 0.0747 0.7269 0.016 0.000 0.984
#> GSM786569 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786571 3 0.1411 0.7027 0.000 0.036 0.964
#> GSM786496 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786506 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786508 1 0.7824 0.2315 0.580 0.064 0.356
#> GSM786512 2 0.6291 0.2324 0.000 0.532 0.468
#> GSM786518 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786519 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786524 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786529 3 0.0000 0.7223 0.000 0.000 1.000
#> GSM786530 3 0.1031 0.7260 0.024 0.000 0.976
#> GSM786532 1 0.6154 0.2200 0.592 0.000 0.408
#> GSM786533 2 0.6305 0.2301 0.000 0.516 0.484
#> GSM786544 3 0.0747 0.7269 0.016 0.000 0.984
#> GSM786547 3 0.4235 0.5516 0.000 0.176 0.824
#> GSM786549 3 0.0747 0.7269 0.016 0.000 0.984
#> GSM786550 3 0.5968 0.1801 0.000 0.364 0.636
#> GSM786563 2 0.6302 0.2403 0.000 0.520 0.480
#> GSM786570 2 0.0747 0.8313 0.000 0.984 0.016
#> GSM786576 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786577 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786578 2 0.2878 0.7978 0.000 0.904 0.096
#> GSM786582 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.8291 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786511 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786513 1 0.1411 0.9277 0.964 0.000 0.036
#> GSM786525 3 0.6291 0.0168 0.000 0.468 0.532
#> GSM786540 2 0.5948 0.4886 0.000 0.640 0.360
#> GSM786553 3 0.6305 0.0732 0.484 0.000 0.516
#> GSM786561 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786575 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786494 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786504 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786510 2 0.3816 0.7070 0.000 0.852 0.148
#> GSM786514 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786516 3 0.6305 0.0732 0.484 0.000 0.516
#> GSM786520 1 0.0000 0.9579 1.000 0.000 0.000
#> GSM786521 3 0.4291 0.5715 0.000 0.180 0.820
#> GSM786536 3 0.1031 0.7260 0.024 0.000 0.976
#> GSM786542 3 0.6008 0.1590 0.000 0.372 0.628
#> GSM786546 3 0.0000 0.7223 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.1022 0.824 0.000 0.968 0.000 0.032
#> GSM786539 4 0.3801 0.837 0.000 0.220 0.000 0.780
#> GSM786541 2 0.0000 0.831 0.000 1.000 0.000 0.000
#> GSM786556 2 0.0000 0.831 0.000 1.000 0.000 0.000
#> GSM786523 3 0.0188 0.815 0.004 0.000 0.996 0.000
#> GSM786497 1 0.3311 0.836 0.828 0.000 0.000 0.172
#> GSM786501 4 0.3873 0.837 0.000 0.228 0.000 0.772
#> GSM786517 4 0.4040 0.829 0.000 0.248 0.000 0.752
#> GSM786534 2 0.0336 0.830 0.000 0.992 0.000 0.008
#> GSM786555 2 0.0188 0.830 0.000 0.996 0.000 0.004
#> GSM786558 2 0.0000 0.831 0.000 1.000 0.000 0.000
#> GSM786559 2 0.0707 0.827 0.000 0.980 0.000 0.020
#> GSM786565 2 0.0336 0.829 0.000 0.992 0.000 0.008
#> GSM786572 2 0.0707 0.831 0.000 0.980 0.020 0.000
#> GSM786579 2 0.2011 0.813 0.000 0.920 0.080 0.000
#> GSM786491 1 0.3024 0.865 0.852 0.000 0.000 0.148
#> GSM786509 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786538 1 0.0469 0.919 0.988 0.000 0.000 0.012
#> GSM786548 2 0.3837 0.717 0.000 0.776 0.224 0.000
#> GSM786562 1 0.4434 0.804 0.772 0.016 0.004 0.208
#> GSM786566 4 0.6175 -0.062 0.400 0.012 0.032 0.556
#> GSM786573 3 0.3088 0.729 0.000 0.128 0.864 0.008
#> GSM786574 2 0.0592 0.829 0.000 0.984 0.000 0.016
#> GSM786580 4 0.1118 0.735 0.000 0.000 0.036 0.964
#> GSM786581 2 0.1022 0.826 0.000 0.968 0.000 0.032
#> GSM786583 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786492 1 0.3311 0.836 0.828 0.000 0.000 0.172
#> GSM786493 2 0.5369 0.605 0.000 0.740 0.096 0.164
#> GSM786499 4 0.3873 0.837 0.000 0.228 0.000 0.772
#> GSM786502 4 0.2589 0.799 0.000 0.116 0.000 0.884
#> GSM786537 1 0.3991 0.825 0.808 0.000 0.020 0.172
#> GSM786567 2 0.0707 0.824 0.000 0.980 0.000 0.020
#> GSM786498 4 0.0937 0.736 0.012 0.012 0.000 0.976
#> GSM786500 1 0.3356 0.835 0.824 0.000 0.000 0.176
#> GSM786503 1 0.1706 0.900 0.948 0.000 0.036 0.016
#> GSM786507 4 0.3801 0.837 0.000 0.220 0.000 0.780
#> GSM786515 4 0.4018 0.836 0.000 0.224 0.004 0.772
#> GSM786522 1 0.2060 0.885 0.932 0.000 0.052 0.016
#> GSM786526 3 0.4746 0.508 0.368 0.000 0.632 0.000
#> GSM786528 3 0.5306 0.513 0.348 0.000 0.632 0.020
#> GSM786531 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786535 2 0.4746 0.585 0.000 0.632 0.368 0.000
#> GSM786543 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786545 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786551 3 0.6583 0.576 0.176 0.000 0.632 0.192
#> GSM786552 2 0.4746 0.585 0.000 0.632 0.368 0.000
#> GSM786554 4 0.4040 0.829 0.000 0.248 0.000 0.752
#> GSM786557 1 0.0469 0.919 0.988 0.000 0.000 0.012
#> GSM786560 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786564 4 0.3975 0.831 0.000 0.240 0.000 0.760
#> GSM786568 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786569 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786571 3 0.2149 0.739 0.000 0.088 0.912 0.000
#> GSM786496 2 0.0000 0.831 0.000 1.000 0.000 0.000
#> GSM786506 1 0.0817 0.916 0.976 0.000 0.000 0.024
#> GSM786508 4 0.4018 0.660 0.000 0.004 0.224 0.772
#> GSM786512 4 0.4697 0.476 0.000 0.000 0.356 0.644
#> GSM786518 1 0.3123 0.846 0.844 0.000 0.000 0.156
#> GSM786519 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786524 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786529 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786530 3 0.2805 0.766 0.012 0.000 0.888 0.100
#> GSM786532 1 0.5602 -0.137 0.508 0.000 0.472 0.020
#> GSM786533 2 0.4746 0.585 0.000 0.632 0.368 0.000
#> GSM786544 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786547 3 0.3907 0.502 0.000 0.232 0.768 0.000
#> GSM786549 3 0.0000 0.816 0.000 0.000 1.000 0.000
#> GSM786550 2 0.5510 0.547 0.000 0.600 0.376 0.024
#> GSM786563 2 0.3975 0.702 0.000 0.760 0.240 0.000
#> GSM786570 2 0.3873 0.562 0.000 0.772 0.000 0.228
#> GSM786576 4 0.3873 0.837 0.000 0.228 0.000 0.772
#> GSM786577 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786578 2 0.0779 0.832 0.000 0.980 0.016 0.004
#> GSM786582 1 0.0707 0.917 0.980 0.000 0.000 0.020
#> GSM786495 4 0.3873 0.837 0.000 0.228 0.000 0.772
#> GSM786505 1 0.0592 0.918 0.984 0.000 0.000 0.016
#> GSM786511 1 0.3311 0.836 0.828 0.000 0.000 0.172
#> GSM786513 1 0.1820 0.898 0.944 0.000 0.036 0.020
#> GSM786525 3 0.5658 0.453 0.000 0.328 0.632 0.040
#> GSM786540 2 0.3052 0.786 0.000 0.860 0.136 0.004
#> GSM786553 3 0.5386 0.516 0.344 0.000 0.632 0.024
#> GSM786561 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786575 1 0.1389 0.908 0.952 0.000 0.000 0.048
#> GSM786494 1 0.0336 0.919 0.992 0.000 0.000 0.008
#> GSM786504 1 0.0707 0.917 0.980 0.000 0.000 0.020
#> GSM786510 4 0.3801 0.837 0.000 0.220 0.000 0.780
#> GSM786514 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786516 3 0.4746 0.508 0.368 0.000 0.632 0.000
#> GSM786520 1 0.0000 0.920 1.000 0.000 0.000 0.000
#> GSM786521 4 0.3400 0.609 0.000 0.000 0.180 0.820
#> GSM786536 3 0.0469 0.813 0.012 0.000 0.988 0.000
#> GSM786542 2 0.4746 0.585 0.000 0.632 0.368 0.000
#> GSM786546 3 0.0000 0.816 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.2929 0.6829 0.180 0.820 0.000 0.000 0.000
#> GSM786539 1 0.2732 0.8026 0.840 0.160 0.000 0.000 0.000
#> GSM786541 2 0.3692 0.7531 0.052 0.812 0.000 0.000 0.136
#> GSM786556 2 0.3152 0.7605 0.024 0.840 0.000 0.000 0.136
#> GSM786523 3 0.1628 0.7062 0.000 0.000 0.936 0.008 0.056
#> GSM786497 4 0.3327 0.8106 0.144 0.000 0.000 0.828 0.028
#> GSM786501 1 0.2852 0.8028 0.828 0.172 0.000 0.000 0.000
#> GSM786517 1 0.4918 0.7316 0.708 0.192 0.000 0.000 0.100
#> GSM786534 2 0.3152 0.7584 0.024 0.840 0.000 0.000 0.136
#> GSM786555 2 0.3692 0.7531 0.052 0.812 0.000 0.000 0.136
#> GSM786558 2 0.2864 0.7607 0.012 0.852 0.000 0.000 0.136
#> GSM786559 2 0.0880 0.7586 0.032 0.968 0.000 0.000 0.000
#> GSM786565 2 0.3692 0.7531 0.052 0.812 0.000 0.000 0.136
#> GSM786572 2 0.0771 0.7603 0.004 0.976 0.020 0.000 0.000
#> GSM786579 2 0.1430 0.7492 0.004 0.944 0.052 0.000 0.000
#> GSM786491 4 0.3906 0.6814 0.004 0.000 0.000 0.704 0.292
#> GSM786509 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786538 4 0.1965 0.8614 0.000 0.000 0.000 0.904 0.096
#> GSM786548 2 0.2930 0.6676 0.004 0.832 0.164 0.000 0.000
#> GSM786562 4 0.5579 0.7126 0.152 0.024 0.000 0.692 0.132
#> GSM786566 1 0.7273 -0.0809 0.480 0.028 0.108 0.352 0.032
#> GSM786573 3 0.3241 0.6449 0.024 0.144 0.832 0.000 0.000
#> GSM786574 2 0.3692 0.7570 0.052 0.812 0.000 0.000 0.136
#> GSM786580 5 0.3612 0.5705 0.228 0.008 0.000 0.000 0.764
#> GSM786581 2 0.1270 0.7553 0.052 0.948 0.000 0.000 0.000
#> GSM786583 3 0.2471 0.6635 0.000 0.136 0.864 0.000 0.000
#> GSM786492 4 0.3327 0.8106 0.144 0.000 0.000 0.828 0.028
#> GSM786493 2 0.6729 0.4956 0.224 0.592 0.104 0.000 0.080
#> GSM786499 1 0.2929 0.8031 0.820 0.180 0.000 0.000 0.000
#> GSM786502 1 0.1671 0.6923 0.924 0.076 0.000 0.000 0.000
#> GSM786537 4 0.4845 0.7746 0.144 0.000 0.020 0.752 0.084
#> GSM786567 2 0.3759 0.7508 0.056 0.808 0.000 0.000 0.136
#> GSM786498 1 0.1780 0.6370 0.940 0.024 0.000 0.008 0.028
#> GSM786500 4 0.3327 0.8106 0.144 0.000 0.000 0.828 0.028
#> GSM786503 4 0.1864 0.8544 0.004 0.000 0.068 0.924 0.004
#> GSM786507 1 0.2732 0.8026 0.840 0.160 0.000 0.000 0.000
#> GSM786515 1 0.5043 0.7266 0.704 0.160 0.000 0.000 0.136
#> GSM786522 4 0.2592 0.8498 0.000 0.000 0.052 0.892 0.056
#> GSM786526 3 0.5192 0.5266 0.000 0.000 0.664 0.244 0.092
#> GSM786528 3 0.5258 0.5289 0.000 0.000 0.664 0.232 0.104
#> GSM786531 3 0.2020 0.6859 0.000 0.100 0.900 0.000 0.000
#> GSM786535 2 0.3796 0.5646 0.000 0.700 0.300 0.000 0.000
#> GSM786543 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786545 3 0.0000 0.7177 0.000 0.000 1.000 0.000 0.000
#> GSM786551 3 0.6224 0.5272 0.120 0.000 0.664 0.084 0.132
#> GSM786552 2 0.3932 0.5273 0.000 0.672 0.328 0.000 0.000
#> GSM786554 1 0.5314 0.6973 0.672 0.192 0.000 0.000 0.136
#> GSM786557 4 0.0162 0.9051 0.000 0.000 0.000 0.996 0.004
#> GSM786560 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786564 1 0.3210 0.7853 0.788 0.212 0.000 0.000 0.000
#> GSM786568 3 0.2471 0.6635 0.000 0.136 0.864 0.000 0.000
#> GSM786569 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786571 3 0.3039 0.6093 0.000 0.192 0.808 0.000 0.000
#> GSM786496 2 0.3692 0.7531 0.052 0.812 0.000 0.000 0.136
#> GSM786506 4 0.0324 0.9044 0.004 0.000 0.000 0.992 0.004
#> GSM786508 1 0.3519 0.5807 0.776 0.008 0.216 0.000 0.000
#> GSM786512 1 0.3752 0.4730 0.708 0.000 0.292 0.000 0.000
#> GSM786518 4 0.3002 0.8327 0.116 0.000 0.000 0.856 0.028
#> GSM786519 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786524 4 0.2136 0.8660 0.008 0.000 0.000 0.904 0.088
#> GSM786529 3 0.2471 0.6635 0.000 0.136 0.864 0.000 0.000
#> GSM786530 3 0.2833 0.6569 0.120 0.000 0.864 0.004 0.012
#> GSM786532 3 0.5929 0.1950 0.000 0.000 0.464 0.432 0.104
#> GSM786533 2 0.3796 0.5646 0.000 0.700 0.300 0.000 0.000
#> GSM786544 3 0.0000 0.7177 0.000 0.000 1.000 0.000 0.000
#> GSM786547 3 0.3913 0.4246 0.000 0.324 0.676 0.000 0.000
#> GSM786549 3 0.0000 0.7177 0.000 0.000 1.000 0.000 0.000
#> GSM786550 5 0.4766 0.6482 0.000 0.136 0.132 0.000 0.732
#> GSM786563 2 0.3109 0.6458 0.000 0.800 0.200 0.000 0.000
#> GSM786570 2 0.5775 0.4179 0.264 0.600 0.000 0.000 0.136
#> GSM786576 1 0.2852 0.8028 0.828 0.172 0.000 0.000 0.000
#> GSM786577 4 0.0290 0.9034 0.008 0.000 0.000 0.992 0.000
#> GSM786578 2 0.0771 0.7603 0.004 0.976 0.020 0.000 0.000
#> GSM786582 4 0.0162 0.9051 0.000 0.000 0.000 0.996 0.004
#> GSM786495 1 0.2852 0.8028 0.828 0.172 0.000 0.000 0.000
#> GSM786505 4 0.0324 0.9044 0.004 0.000 0.000 0.992 0.004
#> GSM786511 4 0.3327 0.8106 0.144 0.000 0.000 0.828 0.028
#> GSM786513 4 0.3012 0.8285 0.000 0.000 0.036 0.860 0.104
#> GSM786525 3 0.5304 0.4470 0.076 0.252 0.664 0.000 0.008
#> GSM786540 2 0.2416 0.7196 0.012 0.888 0.100 0.000 0.000
#> GSM786553 3 0.5384 0.5297 0.004 0.000 0.664 0.228 0.104
#> GSM786561 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786575 5 0.3274 0.5965 0.000 0.000 0.000 0.220 0.780
#> GSM786494 4 0.0162 0.9051 0.000 0.000 0.000 0.996 0.004
#> GSM786504 4 0.2074 0.8561 0.000 0.000 0.000 0.896 0.104
#> GSM786510 1 0.2732 0.8026 0.840 0.160 0.000 0.000 0.000
#> GSM786514 4 0.0000 0.9054 0.000 0.000 0.000 1.000 0.000
#> GSM786516 3 0.3796 0.5274 0.000 0.000 0.700 0.300 0.000
#> GSM786520 4 0.0162 0.9051 0.000 0.000 0.000 0.996 0.004
#> GSM786521 5 0.2741 0.7254 0.004 0.132 0.004 0.000 0.860
#> GSM786536 3 0.0162 0.7175 0.000 0.000 0.996 0.004 0.000
#> GSM786542 2 0.3774 0.5688 0.000 0.704 0.296 0.000 0.000
#> GSM786546 3 0.1918 0.7127 0.000 0.036 0.928 0.000 0.036
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.2300 0.6335 0.000 0.856 0.000 0.000 0.000 0.144
#> GSM786539 6 0.1075 0.7570 0.000 0.048 0.000 0.000 0.000 0.952
#> GSM786541 2 0.5509 0.5404 0.000 0.540 0.000 0.000 0.300 0.160
#> GSM786556 2 0.4498 0.6011 0.000 0.644 0.000 0.000 0.300 0.056
#> GSM786523 3 0.2346 0.6401 0.008 0.000 0.868 0.124 0.000 0.000
#> GSM786497 1 0.4516 0.5560 0.724 0.000 0.000 0.196 0.048 0.032
#> GSM786501 6 0.1267 0.7592 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM786517 6 0.4402 0.6212 0.000 0.084 0.000 0.000 0.216 0.700
#> GSM786534 2 0.2384 0.6678 0.000 0.884 0.000 0.000 0.084 0.032
#> GSM786555 2 0.5509 0.5404 0.000 0.540 0.000 0.000 0.300 0.160
#> GSM786558 2 0.4498 0.6011 0.000 0.644 0.000 0.000 0.300 0.056
#> GSM786559 2 0.0790 0.6735 0.000 0.968 0.000 0.000 0.000 0.032
#> GSM786565 2 0.5509 0.5404 0.000 0.540 0.000 0.000 0.300 0.160
#> GSM786572 2 0.0777 0.6773 0.000 0.972 0.024 0.000 0.000 0.004
#> GSM786579 2 0.1219 0.6686 0.000 0.948 0.048 0.000 0.000 0.004
#> GSM786491 4 0.5715 0.5027 0.284 0.004 0.000 0.532 0.180 0.000
#> GSM786509 1 0.0000 0.7759 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786538 1 0.3851 -0.3935 0.540 0.000 0.000 0.460 0.000 0.000
#> GSM786548 2 0.1267 0.6614 0.000 0.940 0.060 0.000 0.000 0.000
#> GSM786562 4 0.3733 0.5354 0.288 0.008 0.000 0.700 0.000 0.004
#> GSM786566 1 0.7139 -0.0348 0.372 0.020 0.000 0.196 0.048 0.364
#> GSM786573 3 0.5126 0.1000 0.000 0.444 0.496 0.032 0.000 0.028
#> GSM786574 2 0.5199 0.5811 0.000 0.580 0.000 0.000 0.300 0.120
#> GSM786580 5 0.4680 0.7811 0.000 0.000 0.000 0.264 0.652 0.084
#> GSM786581 2 0.1285 0.6642 0.000 0.944 0.000 0.004 0.000 0.052
#> GSM786583 3 0.1610 0.6792 0.000 0.084 0.916 0.000 0.000 0.000
#> GSM786492 1 0.4516 0.5560 0.724 0.000 0.000 0.196 0.048 0.032
#> GSM786493 2 0.6383 0.3517 0.000 0.488 0.080 0.000 0.096 0.336
#> GSM786499 6 0.1501 0.7597 0.000 0.076 0.000 0.000 0.000 0.924
#> GSM786502 6 0.2357 0.6739 0.000 0.116 0.000 0.012 0.000 0.872
#> GSM786537 4 0.5770 0.1792 0.400 0.000 0.016 0.504 0.048 0.032
#> GSM786567 2 0.5536 0.5357 0.000 0.536 0.000 0.000 0.300 0.164
#> GSM786498 6 0.4285 0.5354 0.020 0.008 0.000 0.164 0.048 0.760
#> GSM786500 1 0.4516 0.5560 0.724 0.000 0.000 0.196 0.048 0.032
#> GSM786503 1 0.1138 0.7546 0.960 0.004 0.012 0.024 0.000 0.000
#> GSM786507 6 0.1075 0.7570 0.000 0.048 0.000 0.000 0.000 0.952
#> GSM786515 6 0.4313 0.5934 0.000 0.048 0.000 0.000 0.284 0.668
#> GSM786522 1 0.4639 -0.4516 0.512 0.000 0.040 0.448 0.000 0.000
#> GSM786526 3 0.5998 -0.1934 0.300 0.000 0.436 0.264 0.000 0.000
#> GSM786528 3 0.5856 -0.2052 0.196 0.000 0.436 0.368 0.000 0.000
#> GSM786531 3 0.1327 0.6833 0.000 0.064 0.936 0.000 0.000 0.000
#> GSM786535 2 0.3756 0.2379 0.000 0.600 0.400 0.000 0.000 0.000
#> GSM786543 1 0.0000 0.7759 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786545 3 0.0713 0.6864 0.000 0.000 0.972 0.028 0.000 0.000
#> GSM786551 4 0.3323 0.3419 0.008 0.000 0.240 0.752 0.000 0.000
#> GSM786552 3 0.3857 0.0693 0.000 0.468 0.532 0.000 0.000 0.000
#> GSM786554 6 0.4843 0.5359 0.000 0.084 0.000 0.000 0.300 0.616
#> GSM786557 1 0.0260 0.7733 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM786560 1 0.0000 0.7759 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786564 6 0.2823 0.6676 0.000 0.204 0.000 0.000 0.000 0.796
#> GSM786568 3 0.1610 0.6792 0.000 0.084 0.916 0.000 0.000 0.000
#> GSM786569 1 0.0000 0.7759 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786571 3 0.2260 0.6431 0.000 0.140 0.860 0.000 0.000 0.000
#> GSM786496 2 0.5496 0.5432 0.000 0.544 0.000 0.000 0.296 0.160
#> GSM786506 1 0.0777 0.7657 0.972 0.004 0.000 0.024 0.000 0.000
#> GSM786508 6 0.3052 0.5720 0.000 0.004 0.216 0.000 0.000 0.780
#> GSM786512 6 0.3727 0.3333 0.000 0.000 0.388 0.000 0.000 0.612
#> GSM786518 1 0.3773 0.5943 0.768 0.000 0.000 0.192 0.020 0.020
#> GSM786519 1 0.0000 0.7759 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786524 1 0.3309 0.3085 0.720 0.000 0.000 0.280 0.000 0.000
#> GSM786529 3 0.1610 0.6792 0.000 0.084 0.916 0.000 0.000 0.000
#> GSM786530 3 0.4217 0.5615 0.008 0.000 0.780 0.132 0.048 0.032
#> GSM786532 4 0.5649 0.5317 0.232 0.000 0.232 0.536 0.000 0.000
#> GSM786533 2 0.3756 0.2379 0.000 0.600 0.400 0.000 0.000 0.000
#> GSM786544 3 0.0632 0.6870 0.000 0.000 0.976 0.024 0.000 0.000
#> GSM786547 3 0.2854 0.5851 0.000 0.208 0.792 0.000 0.000 0.000
#> GSM786549 3 0.0632 0.6870 0.000 0.000 0.976 0.024 0.000 0.000
#> GSM786550 5 0.5379 0.7509 0.000 0.084 0.048 0.216 0.652 0.000
#> GSM786563 2 0.1765 0.6403 0.000 0.904 0.096 0.000 0.000 0.000
#> GSM786570 6 0.6106 -0.1120 0.000 0.324 0.000 0.000 0.300 0.376
#> GSM786576 6 0.1267 0.7592 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM786577 1 0.0632 0.7634 0.976 0.000 0.000 0.024 0.000 0.000
#> GSM786578 2 0.0777 0.6773 0.000 0.972 0.024 0.000 0.000 0.004
#> GSM786582 1 0.0458 0.7704 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM786495 6 0.1267 0.7592 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM786505 1 0.0508 0.7715 0.984 0.004 0.000 0.012 0.000 0.000
#> GSM786511 1 0.4516 0.5560 0.724 0.000 0.000 0.196 0.048 0.032
#> GSM786513 4 0.4250 0.4890 0.456 0.000 0.016 0.528 0.000 0.000
#> GSM786525 3 0.6665 0.0934 0.000 0.352 0.436 0.072 0.000 0.140
#> GSM786540 2 0.1500 0.6639 0.000 0.936 0.052 0.000 0.000 0.012
#> GSM786553 4 0.5606 0.4865 0.192 0.004 0.240 0.564 0.000 0.000
#> GSM786561 1 0.0146 0.7746 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM786575 5 0.5471 0.5439 0.140 0.000 0.000 0.336 0.524 0.000
#> GSM786494 1 0.0260 0.7733 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM786504 4 0.3857 0.4633 0.468 0.000 0.000 0.532 0.000 0.000
#> GSM786510 6 0.1075 0.7570 0.000 0.048 0.000 0.000 0.000 0.952
#> GSM786514 1 0.0000 0.7759 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786516 3 0.4322 0.1746 0.372 0.000 0.600 0.028 0.000 0.000
#> GSM786520 1 0.0260 0.7733 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM786521 5 0.3728 0.7889 0.000 0.000 0.000 0.344 0.652 0.004
#> GSM786536 3 0.0972 0.6851 0.008 0.000 0.964 0.028 0.000 0.000
#> GSM786542 2 0.3747 0.2452 0.000 0.604 0.396 0.000 0.000 0.000
#> GSM786546 3 0.3003 0.5915 0.000 0.016 0.812 0.172 0.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 specimen(p) disease.state(p) k
#> MAD:pam 88 0.02879 0.666 2
#> MAD:pam 75 0.00398 0.246 3
#> MAD:pam 89 0.06546 0.941 4
#> MAD:pam 86 0.08380 0.890 5
#> MAD:pam 72 0.02229 0.544 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 54547 rows and 93 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 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.534 0.755 0.863 0.448 0.531 0.531
#> 3 3 0.687 0.832 0.922 0.428 0.710 0.508
#> 4 4 0.886 0.825 0.940 0.056 0.953 0.871
#> 5 5 0.692 0.629 0.745 0.106 0.897 0.703
#> 6 6 0.710 0.671 0.761 0.063 0.896 0.631
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
#> GSM786527 2 0.9393 0.781 0.356 0.644
#> GSM786539 2 0.9393 0.781 0.356 0.644
#> GSM786541 2 0.9393 0.781 0.356 0.644
#> GSM786556 2 0.9393 0.781 0.356 0.644
#> GSM786523 2 0.0938 0.584 0.012 0.988
#> GSM786497 1 0.9933 0.949 0.548 0.452
#> GSM786501 2 0.9393 0.781 0.356 0.644
#> GSM786517 2 0.9393 0.781 0.356 0.644
#> GSM786534 2 0.9393 0.781 0.356 0.644
#> GSM786555 2 0.9393 0.781 0.356 0.644
#> GSM786558 2 0.9393 0.781 0.356 0.644
#> GSM786559 2 0.9393 0.781 0.356 0.644
#> GSM786565 2 0.9393 0.781 0.356 0.644
#> GSM786572 2 0.9393 0.781 0.356 0.644
#> GSM786579 2 0.9393 0.781 0.356 0.644
#> GSM786491 1 0.9393 0.900 0.644 0.356
#> GSM786509 1 0.9866 0.964 0.568 0.432
#> GSM786538 1 0.9850 0.963 0.572 0.428
#> GSM786548 2 0.9393 0.781 0.356 0.644
#> GSM786562 1 0.9977 0.927 0.528 0.472
#> GSM786566 2 0.0938 0.584 0.012 0.988
#> GSM786573 2 0.0000 0.599 0.000 1.000
#> GSM786574 2 0.9393 0.781 0.356 0.644
#> GSM786580 1 0.9393 0.900 0.644 0.356
#> GSM786581 2 0.9393 0.781 0.356 0.644
#> GSM786583 2 0.0938 0.584 0.012 0.988
#> GSM786492 1 0.9866 0.964 0.568 0.432
#> GSM786493 2 0.9393 0.781 0.356 0.644
#> GSM786499 2 0.9393 0.781 0.356 0.644
#> GSM786502 2 0.0672 0.590 0.008 0.992
#> GSM786537 1 0.9815 0.958 0.580 0.420
#> GSM786567 2 0.9393 0.781 0.356 0.644
#> GSM786498 1 0.9983 0.924 0.524 0.476
#> GSM786500 1 0.9850 0.963 0.572 0.428
#> GSM786503 2 0.0938 0.584 0.012 0.988
#> GSM786507 2 0.9393 0.781 0.356 0.644
#> GSM786515 2 0.9393 0.781 0.356 0.644
#> GSM786522 1 0.9866 0.964 0.568 0.432
#> GSM786526 2 0.8207 -0.250 0.256 0.744
#> GSM786528 2 0.8955 -0.447 0.312 0.688
#> GSM786531 2 0.0000 0.599 0.000 1.000
#> GSM786535 2 0.0938 0.609 0.012 0.988
#> GSM786543 1 0.9866 0.964 0.568 0.432
#> GSM786545 2 0.0938 0.584 0.012 0.988
#> GSM786551 1 0.9460 0.908 0.636 0.364
#> GSM786552 2 0.5408 0.685 0.124 0.876
#> GSM786554 2 0.9393 0.781 0.356 0.644
#> GSM786557 1 0.9866 0.964 0.568 0.432
#> GSM786560 1 0.9866 0.964 0.568 0.432
#> GSM786564 2 0.9866 0.719 0.432 0.568
#> GSM786568 2 0.0000 0.599 0.000 1.000
#> GSM786569 1 0.9866 0.964 0.568 0.432
#> GSM786571 2 0.0672 0.590 0.008 0.992
#> GSM786496 2 0.9393 0.781 0.356 0.644
#> GSM786506 1 0.9983 0.924 0.524 0.476
#> GSM786508 2 0.0938 0.584 0.012 0.988
#> GSM786512 2 0.0000 0.599 0.000 1.000
#> GSM786518 1 0.9866 0.964 0.568 0.432
#> GSM786519 1 0.9993 0.910 0.516 0.484
#> GSM786524 1 0.9922 0.952 0.552 0.448
#> GSM786529 2 0.0000 0.599 0.000 1.000
#> GSM786530 2 0.0938 0.584 0.012 0.988
#> GSM786532 1 0.9815 0.958 0.580 0.420
#> GSM786533 2 0.6247 0.703 0.156 0.844
#> GSM786544 2 0.0938 0.584 0.012 0.988
#> GSM786547 2 0.0000 0.599 0.000 1.000
#> GSM786549 2 0.0938 0.584 0.012 0.988
#> GSM786550 1 0.9491 0.896 0.632 0.368
#> GSM786563 2 0.9393 0.781 0.356 0.644
#> GSM786570 2 0.9393 0.781 0.356 0.644
#> GSM786576 2 0.9393 0.781 0.356 0.644
#> GSM786577 1 0.9983 0.924 0.524 0.476
#> GSM786578 2 0.9866 0.719 0.432 0.568
#> GSM786582 1 0.9850 0.963 0.572 0.428
#> GSM786495 2 0.9393 0.781 0.356 0.644
#> GSM786505 1 0.9866 0.964 0.568 0.432
#> GSM786511 1 0.9866 0.964 0.568 0.432
#> GSM786513 1 0.9866 0.964 0.568 0.432
#> GSM786525 2 0.9393 0.781 0.356 0.644
#> GSM786540 2 0.9393 0.781 0.356 0.644
#> GSM786553 2 0.9248 -0.532 0.340 0.660
#> GSM786561 1 0.9850 0.963 0.572 0.428
#> GSM786575 1 0.9393 0.900 0.644 0.356
#> GSM786494 1 0.9850 0.963 0.572 0.428
#> GSM786504 1 0.9850 0.963 0.572 0.428
#> GSM786510 2 0.9393 0.781 0.356 0.644
#> GSM786514 1 0.9983 0.924 0.524 0.476
#> GSM786516 2 0.0938 0.584 0.012 0.988
#> GSM786520 1 0.9866 0.964 0.568 0.432
#> GSM786521 1 0.9393 0.900 0.644 0.356
#> GSM786536 2 0.0938 0.584 0.012 0.988
#> GSM786542 2 0.6247 0.703 0.156 0.844
#> GSM786546 2 0.0000 0.599 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786539 2 0.3551 0.8150 0.000 0.868 0.132
#> GSM786541 2 0.0237 0.9175 0.000 0.996 0.004
#> GSM786556 2 0.4002 0.7814 0.000 0.840 0.160
#> GSM786523 3 0.0892 0.8570 0.020 0.000 0.980
#> GSM786497 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786501 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786534 2 0.4178 0.7668 0.000 0.828 0.172
#> GSM786555 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786558 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786565 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786572 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786491 1 0.3686 0.8527 0.860 0.000 0.140
#> GSM786509 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786548 2 0.5216 0.6662 0.000 0.740 0.260
#> GSM786562 1 0.3551 0.8542 0.868 0.000 0.132
#> GSM786566 1 0.3784 0.8535 0.864 0.004 0.132
#> GSM786573 3 0.0475 0.8589 0.004 0.004 0.992
#> GSM786574 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786580 1 0.5473 0.8051 0.808 0.052 0.140
#> GSM786581 2 0.3412 0.8239 0.000 0.876 0.124
#> GSM786583 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786492 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786493 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786499 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786502 1 0.7381 0.6520 0.704 0.164 0.132
#> GSM786537 1 0.0747 0.9148 0.984 0.000 0.016
#> GSM786567 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786498 1 0.3784 0.8535 0.864 0.004 0.132
#> GSM786500 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786503 1 0.3551 0.8542 0.868 0.000 0.132
#> GSM786507 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786515 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786522 1 0.2711 0.8607 0.912 0.000 0.088
#> GSM786526 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786528 1 0.4235 0.8187 0.824 0.000 0.176
#> GSM786531 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786535 3 0.6126 0.3966 0.004 0.352 0.644
#> GSM786543 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786545 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786551 1 0.6045 0.3527 0.620 0.000 0.380
#> GSM786552 3 0.6008 0.3387 0.000 0.372 0.628
#> GSM786554 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786564 2 0.0237 0.9175 0.000 0.996 0.004
#> GSM786568 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786569 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786571 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786496 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786506 1 0.3784 0.8535 0.864 0.004 0.132
#> GSM786508 1 0.6286 0.7551 0.772 0.092 0.136
#> GSM786512 2 0.8568 0.4180 0.192 0.608 0.200
#> GSM786518 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786519 1 0.0592 0.9160 0.988 0.000 0.012
#> GSM786524 1 0.1289 0.9033 0.968 0.000 0.032
#> GSM786529 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786530 3 0.4121 0.7236 0.168 0.000 0.832
#> GSM786532 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786533 2 0.4555 0.7483 0.000 0.800 0.200
#> GSM786544 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786547 3 0.0475 0.8589 0.004 0.004 0.992
#> GSM786549 3 0.0424 0.8616 0.008 0.000 0.992
#> GSM786550 3 0.8097 0.2515 0.388 0.072 0.540
#> GSM786563 2 0.5560 0.5978 0.000 0.700 0.300
#> GSM786570 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786577 1 0.1964 0.8874 0.944 0.000 0.056
#> GSM786578 2 0.3412 0.8239 0.000 0.876 0.124
#> GSM786582 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786511 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786513 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786525 2 0.2625 0.8605 0.000 0.916 0.084
#> GSM786540 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786553 1 0.3619 0.8523 0.864 0.000 0.136
#> GSM786561 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786575 1 0.3686 0.8527 0.860 0.000 0.140
#> GSM786494 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786504 1 0.0237 0.9174 0.996 0.000 0.004
#> GSM786510 2 0.0000 0.9196 0.000 1.000 0.000
#> GSM786514 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786516 3 0.6286 0.0542 0.464 0.000 0.536
#> GSM786520 1 0.0000 0.9188 1.000 0.000 0.000
#> GSM786521 1 0.4261 0.8438 0.848 0.012 0.140
#> GSM786536 3 0.1753 0.8415 0.048 0.000 0.952
#> GSM786542 2 0.6079 0.4196 0.000 0.612 0.388
#> GSM786546 3 0.4968 0.6871 0.012 0.188 0.800
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.0188 0.94716 0.000 0.996 0.004 0.000
#> GSM786539 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786541 2 0.0188 0.94702 0.000 0.996 0.004 0.000
#> GSM786556 2 0.0921 0.92901 0.000 0.972 0.028 0.000
#> GSM786523 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786497 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786501 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786517 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786534 2 0.1867 0.88563 0.000 0.928 0.072 0.000
#> GSM786555 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786558 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786559 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786565 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786572 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786579 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786491 4 0.4998 -0.00389 0.488 0.000 0.000 0.512
#> GSM786509 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786538 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786548 2 0.0921 0.93004 0.000 0.972 0.028 0.000
#> GSM786562 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786566 1 0.0188 0.91722 0.996 0.000 0.004 0.000
#> GSM786573 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786574 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786580 4 0.0000 0.70453 0.000 0.000 0.000 1.000
#> GSM786581 2 0.0188 0.94716 0.000 0.996 0.004 0.000
#> GSM786583 3 0.0188 0.86995 0.004 0.000 0.996 0.000
#> GSM786492 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786493 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786499 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786502 2 0.5097 0.17108 0.428 0.568 0.004 0.000
#> GSM786537 1 0.1118 0.89769 0.964 0.000 0.036 0.000
#> GSM786567 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786498 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786500 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786503 1 0.0188 0.91722 0.996 0.000 0.004 0.000
#> GSM786507 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786515 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786522 1 0.2281 0.83781 0.904 0.000 0.096 0.000
#> GSM786526 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786528 1 0.4356 0.53870 0.708 0.000 0.292 0.000
#> GSM786531 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786535 3 0.4907 0.25779 0.000 0.420 0.580 0.000
#> GSM786543 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786545 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786551 1 0.6871 0.04088 0.480 0.000 0.416 0.104
#> GSM786552 3 0.4981 0.11345 0.000 0.464 0.536 0.000
#> GSM786554 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786557 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786560 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786564 2 0.0188 0.94716 0.000 0.996 0.004 0.000
#> GSM786568 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786569 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786571 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786496 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786506 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786508 1 0.6764 0.23005 0.596 0.260 0.144 0.000
#> GSM786512 2 0.3688 0.71212 0.000 0.792 0.208 0.000
#> GSM786518 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786519 1 0.0188 0.91722 0.996 0.000 0.004 0.000
#> GSM786524 1 0.1716 0.87258 0.936 0.000 0.064 0.000
#> GSM786529 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786530 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786532 1 0.1118 0.89741 0.964 0.000 0.036 0.000
#> GSM786533 2 0.3610 0.72341 0.000 0.800 0.200 0.000
#> GSM786544 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786547 3 0.0336 0.86765 0.000 0.008 0.992 0.000
#> GSM786549 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786550 4 0.4469 0.58535 0.000 0.080 0.112 0.808
#> GSM786563 2 0.1211 0.91941 0.000 0.960 0.040 0.000
#> GSM786570 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786576 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786577 1 0.1940 0.86034 0.924 0.000 0.076 0.000
#> GSM786578 2 0.0188 0.94716 0.000 0.996 0.004 0.000
#> GSM786582 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786495 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786505 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786511 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786513 1 0.1118 0.89741 0.964 0.000 0.036 0.000
#> GSM786525 2 0.0336 0.94517 0.000 0.992 0.008 0.000
#> GSM786540 2 0.0336 0.94517 0.000 0.992 0.008 0.000
#> GSM786553 1 0.2530 0.82076 0.888 0.000 0.112 0.000
#> GSM786561 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786575 1 0.4989 -0.12171 0.528 0.000 0.000 0.472
#> GSM786494 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786504 1 0.1118 0.89741 0.964 0.000 0.036 0.000
#> GSM786510 2 0.0000 0.94875 0.000 1.000 0.000 0.000
#> GSM786514 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786516 3 0.3907 0.48731 0.232 0.000 0.768 0.000
#> GSM786520 1 0.0000 0.91953 1.000 0.000 0.000 0.000
#> GSM786521 4 0.0000 0.70453 0.000 0.000 0.000 1.000
#> GSM786536 3 0.0000 0.87464 0.000 0.000 1.000 0.000
#> GSM786542 2 0.4933 0.20595 0.000 0.568 0.432 0.000
#> GSM786546 3 0.2011 0.78298 0.000 0.080 0.920 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0290 0.830 0.008 0.992 0.000 0.000 0.000
#> GSM786539 2 0.5010 0.590 0.144 0.708 0.000 0.148 0.000
#> GSM786541 2 0.3999 0.636 0.344 0.656 0.000 0.000 0.000
#> GSM786556 2 0.3999 0.636 0.344 0.656 0.000 0.000 0.000
#> GSM786523 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786497 4 0.3913 0.719 0.324 0.000 0.000 0.676 0.000
#> GSM786501 2 0.2605 0.751 0.148 0.852 0.000 0.000 0.000
#> GSM786517 2 0.0404 0.830 0.012 0.988 0.000 0.000 0.000
#> GSM786534 2 0.4135 0.633 0.340 0.656 0.000 0.000 0.004
#> GSM786555 2 0.0404 0.830 0.012 0.988 0.000 0.000 0.000
#> GSM786558 2 0.4118 0.635 0.336 0.660 0.000 0.000 0.004
#> GSM786559 2 0.0000 0.830 0.000 1.000 0.000 0.000 0.000
#> GSM786565 2 0.0609 0.829 0.020 0.980 0.000 0.000 0.000
#> GSM786572 2 0.1043 0.823 0.040 0.960 0.000 0.000 0.000
#> GSM786579 2 0.4135 0.633 0.340 0.656 0.000 0.000 0.004
#> GSM786491 5 0.6008 0.214 0.148 0.000 0.000 0.292 0.560
#> GSM786509 4 0.3913 0.719 0.324 0.000 0.000 0.676 0.000
#> GSM786538 4 0.4219 0.630 0.416 0.000 0.000 0.584 0.000
#> GSM786548 2 0.4211 0.614 0.360 0.636 0.000 0.000 0.004
#> GSM786562 4 0.0609 0.563 0.020 0.000 0.000 0.980 0.000
#> GSM786566 4 0.0609 0.553 0.020 0.000 0.000 0.980 0.000
#> GSM786573 3 0.4142 0.466 0.308 0.004 0.684 0.000 0.004
#> GSM786574 2 0.0162 0.829 0.004 0.996 0.000 0.000 0.000
#> GSM786580 5 0.0162 0.742 0.000 0.000 0.000 0.004 0.996
#> GSM786581 2 0.0566 0.827 0.012 0.984 0.000 0.004 0.000
#> GSM786583 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786492 4 0.3612 0.718 0.268 0.000 0.000 0.732 0.000
#> GSM786493 2 0.0000 0.830 0.000 1.000 0.000 0.000 0.000
#> GSM786499 2 0.2605 0.751 0.148 0.852 0.000 0.000 0.000
#> GSM786502 4 0.6190 -0.190 0.136 0.420 0.000 0.444 0.000
#> GSM786537 1 0.6105 0.922 0.480 0.000 0.392 0.128 0.000
#> GSM786567 2 0.0404 0.830 0.012 0.988 0.000 0.000 0.000
#> GSM786498 4 0.0404 0.561 0.012 0.000 0.000 0.988 0.000
#> GSM786500 4 0.3661 0.719 0.276 0.000 0.000 0.724 0.000
#> GSM786503 4 0.0162 0.576 0.004 0.000 0.000 0.996 0.000
#> GSM786507 2 0.2561 0.752 0.144 0.856 0.000 0.000 0.000
#> GSM786515 2 0.0162 0.830 0.004 0.996 0.000 0.000 0.000
#> GSM786522 1 0.5876 0.922 0.488 0.000 0.412 0.100 0.000
#> GSM786526 1 0.6698 0.673 0.424 0.000 0.316 0.260 0.000
#> GSM786528 3 0.5968 -0.890 0.444 0.000 0.448 0.108 0.000
#> GSM786531 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786535 3 0.6746 0.194 0.348 0.220 0.428 0.000 0.004
#> GSM786543 4 0.4101 0.674 0.372 0.000 0.000 0.628 0.000
#> GSM786545 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786551 1 0.6191 0.867 0.436 0.000 0.428 0.136 0.000
#> GSM786552 3 0.6589 0.210 0.328 0.224 0.448 0.000 0.000
#> GSM786554 2 0.0162 0.829 0.004 0.996 0.000 0.000 0.000
#> GSM786557 4 0.3586 0.717 0.264 0.000 0.000 0.736 0.000
#> GSM786560 4 0.3966 0.711 0.336 0.000 0.000 0.664 0.000
#> GSM786564 2 0.0290 0.830 0.008 0.992 0.000 0.000 0.000
#> GSM786568 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786569 4 0.3913 0.719 0.324 0.000 0.000 0.676 0.000
#> GSM786571 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786496 2 0.0609 0.829 0.020 0.980 0.000 0.000 0.000
#> GSM786506 4 0.0162 0.570 0.004 0.000 0.000 0.996 0.000
#> GSM786508 4 0.6218 0.159 0.140 0.076 0.108 0.672 0.004
#> GSM786512 2 0.7755 0.278 0.140 0.508 0.192 0.156 0.004
#> GSM786518 4 0.3949 0.714 0.332 0.000 0.000 0.668 0.000
#> GSM786519 4 0.3913 0.719 0.324 0.000 0.000 0.676 0.000
#> GSM786524 1 0.6059 0.922 0.468 0.000 0.412 0.120 0.000
#> GSM786529 3 0.2852 0.604 0.172 0.000 0.828 0.000 0.000
#> GSM786530 3 0.0162 0.664 0.004 0.000 0.996 0.000 0.000
#> GSM786532 1 0.6344 0.893 0.440 0.000 0.400 0.160 0.000
#> GSM786533 2 0.4178 0.613 0.028 0.748 0.220 0.000 0.004
#> GSM786544 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786547 3 0.3366 0.555 0.232 0.000 0.768 0.000 0.000
#> GSM786549 3 0.0000 0.668 0.000 0.000 1.000 0.000 0.000
#> GSM786550 5 0.4712 0.604 0.180 0.080 0.004 0.000 0.736
#> GSM786563 2 0.4225 0.610 0.364 0.632 0.000 0.000 0.004
#> GSM786570 2 0.0404 0.830 0.012 0.988 0.000 0.000 0.000
#> GSM786576 2 0.0703 0.823 0.024 0.976 0.000 0.000 0.000
#> GSM786577 1 0.6092 0.921 0.464 0.000 0.412 0.124 0.000
#> GSM786578 2 0.3452 0.709 0.244 0.756 0.000 0.000 0.000
#> GSM786582 4 0.4403 0.514 0.436 0.000 0.004 0.560 0.000
#> GSM786495 2 0.2605 0.751 0.148 0.852 0.000 0.000 0.000
#> GSM786505 4 0.3586 0.717 0.264 0.000 0.000 0.736 0.000
#> GSM786511 4 0.4743 0.476 0.472 0.000 0.016 0.512 0.000
#> GSM786513 1 0.5944 0.929 0.488 0.000 0.404 0.108 0.000
#> GSM786525 2 0.0693 0.829 0.012 0.980 0.000 0.008 0.000
#> GSM786540 2 0.4135 0.633 0.340 0.656 0.000 0.000 0.004
#> GSM786553 3 0.6722 -0.729 0.316 0.000 0.416 0.268 0.000
#> GSM786561 4 0.3913 0.719 0.324 0.000 0.000 0.676 0.000
#> GSM786575 4 0.6107 0.196 0.132 0.000 0.000 0.496 0.372
#> GSM786494 4 0.3612 0.716 0.268 0.000 0.000 0.732 0.000
#> GSM786504 1 0.5944 0.929 0.488 0.000 0.404 0.108 0.000
#> GSM786510 2 0.2561 0.752 0.144 0.856 0.000 0.000 0.000
#> GSM786514 4 0.5153 0.483 0.436 0.000 0.040 0.524 0.000
#> GSM786516 3 0.3602 0.202 0.180 0.000 0.796 0.024 0.000
#> GSM786520 4 0.3913 0.719 0.324 0.000 0.000 0.676 0.000
#> GSM786521 5 0.0162 0.742 0.000 0.000 0.000 0.004 0.996
#> GSM786536 3 0.0162 0.664 0.000 0.000 0.996 0.004 0.000
#> GSM786542 3 0.6903 0.135 0.344 0.272 0.380 0.000 0.004
#> GSM786546 3 0.2054 0.616 0.008 0.072 0.916 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.0713 0.776 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786539 6 0.3351 0.651 0.000 0.288 0.000 0.000 0.000 0.712
#> GSM786541 2 0.3543 0.705 0.000 0.812 0.124 0.052 0.000 0.012
#> GSM786556 2 0.3850 0.694 0.000 0.792 0.128 0.064 0.000 0.016
#> GSM786523 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786497 1 0.1327 0.673 0.936 0.000 0.000 0.064 0.000 0.000
#> GSM786501 6 0.3864 0.587 0.000 0.480 0.000 0.000 0.000 0.520
#> GSM786517 2 0.1141 0.765 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM786534 2 0.4548 0.668 0.000 0.752 0.128 0.064 0.000 0.056
#> GSM786555 2 0.0363 0.780 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM786558 2 0.4548 0.668 0.000 0.752 0.128 0.064 0.000 0.056
#> GSM786559 2 0.1204 0.767 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM786565 2 0.0363 0.780 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM786572 2 0.0458 0.780 0.000 0.984 0.000 0.016 0.000 0.000
#> GSM786579 2 0.4383 0.681 0.000 0.768 0.112 0.064 0.000 0.056
#> GSM786491 5 0.5351 0.632 0.144 0.000 0.000 0.288 0.568 0.000
#> GSM786509 1 0.2030 0.664 0.908 0.000 0.000 0.064 0.000 0.028
#> GSM786538 1 0.3797 -0.375 0.580 0.000 0.000 0.420 0.000 0.000
#> GSM786548 2 0.4813 0.650 0.000 0.732 0.128 0.080 0.000 0.060
#> GSM786562 1 0.4690 0.418 0.552 0.000 0.000 0.048 0.000 0.400
#> GSM786566 1 0.4685 0.372 0.520 0.000 0.000 0.044 0.000 0.436
#> GSM786573 3 0.1152 0.769 0.000 0.000 0.952 0.004 0.000 0.044
#> GSM786574 2 0.1204 0.763 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM786580 5 0.0000 0.747 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786581 2 0.1814 0.716 0.000 0.900 0.000 0.000 0.000 0.100
#> GSM786583 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786492 1 0.2793 0.647 0.800 0.000 0.000 0.200 0.000 0.000
#> GSM786493 2 0.0713 0.776 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786499 6 0.3857 0.599 0.000 0.468 0.000 0.000 0.000 0.532
#> GSM786502 6 0.2815 0.488 0.032 0.120 0.000 0.000 0.000 0.848
#> GSM786537 4 0.2491 0.786 0.164 0.000 0.000 0.836 0.000 0.000
#> GSM786567 2 0.1204 0.763 0.000 0.944 0.000 0.000 0.000 0.056
#> GSM786498 1 0.4697 0.414 0.548 0.000 0.000 0.048 0.000 0.404
#> GSM786500 1 0.2823 0.651 0.796 0.000 0.000 0.204 0.000 0.000
#> GSM786503 1 0.4655 0.549 0.632 0.000 0.000 0.068 0.000 0.300
#> GSM786507 6 0.3862 0.593 0.000 0.476 0.000 0.000 0.000 0.524
#> GSM786515 2 0.0547 0.780 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM786522 4 0.3464 0.849 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM786526 4 0.3464 0.849 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM786528 4 0.3874 0.847 0.276 0.000 0.012 0.704 0.000 0.008
#> GSM786531 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786535 3 0.4564 0.554 0.000 0.104 0.756 0.080 0.000 0.060
#> GSM786543 1 0.2135 0.589 0.872 0.000 0.000 0.128 0.000 0.000
#> GSM786545 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786551 4 0.2092 0.760 0.124 0.000 0.000 0.876 0.000 0.000
#> GSM786552 3 0.3602 0.611 0.000 0.108 0.812 0.068 0.000 0.012
#> GSM786554 2 0.1141 0.765 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM786557 1 0.2146 0.678 0.880 0.000 0.000 0.116 0.000 0.004
#> GSM786560 1 0.2106 0.663 0.904 0.000 0.000 0.064 0.000 0.032
#> GSM786564 2 0.1141 0.765 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM786568 3 0.2581 0.868 0.000 0.016 0.856 0.128 0.000 0.000
#> GSM786569 1 0.1444 0.673 0.928 0.000 0.000 0.072 0.000 0.000
#> GSM786571 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786496 2 0.0363 0.780 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM786506 1 0.4675 0.426 0.560 0.000 0.000 0.048 0.000 0.392
#> GSM786508 6 0.3039 0.330 0.068 0.020 0.052 0.000 0.000 0.860
#> GSM786512 6 0.3840 0.415 0.000 0.068 0.152 0.004 0.000 0.776
#> GSM786518 1 0.2106 0.663 0.904 0.000 0.000 0.064 0.000 0.032
#> GSM786519 1 0.1327 0.673 0.936 0.000 0.000 0.064 0.000 0.000
#> GSM786524 4 0.3482 0.848 0.316 0.000 0.000 0.684 0.000 0.000
#> GSM786529 3 0.0260 0.804 0.000 0.000 0.992 0.008 0.000 0.000
#> GSM786530 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786532 4 0.2378 0.768 0.152 0.000 0.000 0.848 0.000 0.000
#> GSM786533 2 0.5886 0.411 0.000 0.604 0.228 0.068 0.000 0.100
#> GSM786544 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786547 3 0.0291 0.799 0.000 0.004 0.992 0.004 0.000 0.000
#> GSM786549 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786550 5 0.3044 0.653 0.000 0.048 0.116 0.000 0.836 0.000
#> GSM786563 2 0.4813 0.650 0.000 0.732 0.128 0.080 0.000 0.060
#> GSM786570 2 0.1075 0.768 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM786576 2 0.1556 0.739 0.000 0.920 0.000 0.000 0.000 0.080
#> GSM786577 4 0.3482 0.848 0.316 0.000 0.000 0.684 0.000 0.000
#> GSM786578 2 0.1802 0.758 0.000 0.916 0.012 0.072 0.000 0.000
#> GSM786582 4 0.3464 0.603 0.312 0.000 0.000 0.688 0.000 0.000
#> GSM786495 2 0.3866 -0.572 0.000 0.516 0.000 0.000 0.000 0.484
#> GSM786505 1 0.2482 0.671 0.848 0.000 0.000 0.148 0.000 0.004
#> GSM786511 4 0.3843 0.678 0.452 0.000 0.000 0.548 0.000 0.000
#> GSM786513 4 0.3371 0.852 0.292 0.000 0.000 0.708 0.000 0.000
#> GSM786525 2 0.0777 0.779 0.000 0.972 0.004 0.000 0.000 0.024
#> GSM786540 2 0.4437 0.678 0.000 0.764 0.112 0.068 0.000 0.056
#> GSM786553 4 0.4390 0.720 0.132 0.000 0.000 0.720 0.000 0.148
#> GSM786561 1 0.2106 0.663 0.904 0.000 0.000 0.064 0.000 0.032
#> GSM786575 5 0.5550 0.573 0.228 0.000 0.000 0.216 0.556 0.000
#> GSM786494 1 0.2883 0.639 0.788 0.000 0.000 0.212 0.000 0.000
#> GSM786504 4 0.3351 0.852 0.288 0.000 0.000 0.712 0.000 0.000
#> GSM786510 6 0.3864 0.587 0.000 0.480 0.000 0.000 0.000 0.520
#> GSM786514 4 0.3810 0.724 0.428 0.000 0.000 0.572 0.000 0.000
#> GSM786516 3 0.5572 0.351 0.188 0.000 0.544 0.268 0.000 0.000
#> GSM786520 1 0.1387 0.673 0.932 0.000 0.000 0.068 0.000 0.000
#> GSM786521 5 0.0000 0.747 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786536 3 0.2135 0.877 0.000 0.000 0.872 0.128 0.000 0.000
#> GSM786542 2 0.6005 0.267 0.000 0.484 0.384 0.076 0.000 0.056
#> GSM786546 3 0.3781 0.831 0.000 0.032 0.804 0.120 0.000 0.044
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 specimen(p) disease.state(p) k
#> MAD:mclust 90 0.06349 1.000 2
#> MAD:mclust 86 0.00537 0.315 3
#> MAD:mclust 84 0.06274 0.425 4
#> MAD:mclust 79 0.18006 0.274 5
#> MAD:mclust 81 0.06127 0.784 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 54547 rows and 93 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.869 0.917 0.965 0.5015 0.496 0.496
#> 3 3 0.623 0.707 0.873 0.3198 0.773 0.575
#> 4 4 0.588 0.615 0.815 0.1009 0.835 0.575
#> 5 5 0.674 0.656 0.809 0.0670 0.870 0.581
#> 6 6 0.693 0.613 0.774 0.0443 0.913 0.654
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
#> GSM786527 2 0.000 0.946 0.000 1.000
#> GSM786539 2 0.000 0.946 0.000 1.000
#> GSM786541 2 0.000 0.946 0.000 1.000
#> GSM786556 2 0.000 0.946 0.000 1.000
#> GSM786523 1 0.000 0.975 1.000 0.000
#> GSM786497 1 0.000 0.975 1.000 0.000
#> GSM786501 2 0.000 0.946 0.000 1.000
#> GSM786517 2 0.000 0.946 0.000 1.000
#> GSM786534 2 0.000 0.946 0.000 1.000
#> GSM786555 2 0.000 0.946 0.000 1.000
#> GSM786558 2 0.000 0.946 0.000 1.000
#> GSM786559 2 0.000 0.946 0.000 1.000
#> GSM786565 2 0.000 0.946 0.000 1.000
#> GSM786572 2 0.000 0.946 0.000 1.000
#> GSM786579 2 0.000 0.946 0.000 1.000
#> GSM786491 1 0.000 0.975 1.000 0.000
#> GSM786509 1 0.000 0.975 1.000 0.000
#> GSM786538 1 0.000 0.975 1.000 0.000
#> GSM786548 2 0.000 0.946 0.000 1.000
#> GSM786562 1 0.000 0.975 1.000 0.000
#> GSM786566 1 0.000 0.975 1.000 0.000
#> GSM786573 2 0.358 0.891 0.068 0.932
#> GSM786574 2 0.000 0.946 0.000 1.000
#> GSM786580 1 0.000 0.975 1.000 0.000
#> GSM786581 2 0.000 0.946 0.000 1.000
#> GSM786583 1 0.482 0.870 0.896 0.104
#> GSM786492 1 0.000 0.975 1.000 0.000
#> GSM786493 2 0.000 0.946 0.000 1.000
#> GSM786499 2 0.000 0.946 0.000 1.000
#> GSM786502 1 0.992 0.164 0.552 0.448
#> GSM786537 1 0.000 0.975 1.000 0.000
#> GSM786567 2 0.000 0.946 0.000 1.000
#> GSM786498 1 0.000 0.975 1.000 0.000
#> GSM786500 1 0.000 0.975 1.000 0.000
#> GSM786503 1 0.000 0.975 1.000 0.000
#> GSM786507 2 0.000 0.946 0.000 1.000
#> GSM786515 2 0.000 0.946 0.000 1.000
#> GSM786522 1 0.000 0.975 1.000 0.000
#> GSM786526 1 0.000 0.975 1.000 0.000
#> GSM786528 1 0.000 0.975 1.000 0.000
#> GSM786531 2 0.969 0.397 0.396 0.604
#> GSM786535 2 0.000 0.946 0.000 1.000
#> GSM786543 1 0.000 0.975 1.000 0.000
#> GSM786545 1 0.224 0.944 0.964 0.036
#> GSM786551 1 0.000 0.975 1.000 0.000
#> GSM786552 2 0.000 0.946 0.000 1.000
#> GSM786554 2 0.000 0.946 0.000 1.000
#> GSM786557 1 0.000 0.975 1.000 0.000
#> GSM786560 1 0.000 0.975 1.000 0.000
#> GSM786564 2 0.000 0.946 0.000 1.000
#> GSM786568 2 0.925 0.526 0.340 0.660
#> GSM786569 1 0.000 0.975 1.000 0.000
#> GSM786571 1 0.722 0.734 0.800 0.200
#> GSM786496 2 0.000 0.946 0.000 1.000
#> GSM786506 1 0.000 0.975 1.000 0.000
#> GSM786508 1 0.753 0.711 0.784 0.216
#> GSM786512 2 0.909 0.525 0.324 0.676
#> GSM786518 1 0.000 0.975 1.000 0.000
#> GSM786519 1 0.000 0.975 1.000 0.000
#> GSM786524 1 0.000 0.975 1.000 0.000
#> GSM786529 2 0.814 0.680 0.252 0.748
#> GSM786530 1 0.000 0.975 1.000 0.000
#> GSM786532 1 0.000 0.975 1.000 0.000
#> GSM786533 2 0.000 0.946 0.000 1.000
#> GSM786544 1 0.242 0.940 0.960 0.040
#> GSM786547 2 0.644 0.794 0.164 0.836
#> GSM786549 1 0.000 0.975 1.000 0.000
#> GSM786550 2 0.952 0.455 0.372 0.628
#> GSM786563 2 0.000 0.946 0.000 1.000
#> GSM786570 2 0.000 0.946 0.000 1.000
#> GSM786576 2 0.000 0.946 0.000 1.000
#> GSM786577 1 0.000 0.975 1.000 0.000
#> GSM786578 2 0.000 0.946 0.000 1.000
#> GSM786582 1 0.000 0.975 1.000 0.000
#> GSM786495 2 0.000 0.946 0.000 1.000
#> GSM786505 1 0.000 0.975 1.000 0.000
#> GSM786511 1 0.000 0.975 1.000 0.000
#> GSM786513 1 0.000 0.975 1.000 0.000
#> GSM786525 2 0.000 0.946 0.000 1.000
#> GSM786540 2 0.000 0.946 0.000 1.000
#> GSM786553 1 0.000 0.975 1.000 0.000
#> GSM786561 1 0.000 0.975 1.000 0.000
#> GSM786575 1 0.000 0.975 1.000 0.000
#> GSM786494 1 0.000 0.975 1.000 0.000
#> GSM786504 1 0.000 0.975 1.000 0.000
#> GSM786510 2 0.000 0.946 0.000 1.000
#> GSM786514 1 0.000 0.975 1.000 0.000
#> GSM786516 1 0.000 0.975 1.000 0.000
#> GSM786520 1 0.000 0.975 1.000 0.000
#> GSM786521 1 0.000 0.975 1.000 0.000
#> GSM786536 1 0.278 0.932 0.952 0.048
#> GSM786542 2 0.000 0.946 0.000 1.000
#> GSM786546 2 0.855 0.636 0.280 0.720
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.1163 0.7933 0.000 0.972 0.028
#> GSM786539 2 0.0592 0.7940 0.012 0.988 0.000
#> GSM786541 2 0.6299 0.1419 0.000 0.524 0.476
#> GSM786556 3 0.6299 -0.0340 0.000 0.476 0.524
#> GSM786523 3 0.3686 0.7016 0.140 0.000 0.860
#> GSM786497 1 0.0424 0.8834 0.992 0.000 0.008
#> GSM786501 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786517 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786534 3 0.6168 0.2061 0.000 0.412 0.588
#> GSM786555 2 0.2356 0.7706 0.000 0.928 0.072
#> GSM786558 2 0.6252 0.2394 0.000 0.556 0.444
#> GSM786559 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786565 2 0.4291 0.6853 0.000 0.820 0.180
#> GSM786572 2 0.6244 0.2515 0.000 0.560 0.440
#> GSM786579 2 0.6286 0.1822 0.000 0.536 0.464
#> GSM786491 1 0.0424 0.8834 0.992 0.000 0.008
#> GSM786509 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786548 3 0.5529 0.4987 0.000 0.296 0.704
#> GSM786562 1 0.3340 0.8053 0.880 0.120 0.000
#> GSM786566 1 0.6252 0.2719 0.556 0.444 0.000
#> GSM786573 3 0.3192 0.7687 0.000 0.112 0.888
#> GSM786574 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786580 1 0.8835 0.5290 0.568 0.164 0.268
#> GSM786581 2 0.1647 0.7905 0.004 0.960 0.036
#> GSM786583 3 0.0000 0.8297 0.000 0.000 1.000
#> GSM786492 1 0.0424 0.8834 0.992 0.000 0.008
#> GSM786493 2 0.1860 0.7823 0.000 0.948 0.052
#> GSM786499 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786502 2 0.5397 0.4999 0.280 0.720 0.000
#> GSM786537 1 0.4842 0.7599 0.776 0.000 0.224
#> GSM786567 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786498 1 0.6252 0.2721 0.556 0.444 0.000
#> GSM786500 1 0.0237 0.8834 0.996 0.000 0.004
#> GSM786503 1 0.0747 0.8772 0.984 0.016 0.000
#> GSM786507 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786515 2 0.4291 0.6841 0.000 0.820 0.180
#> GSM786522 1 0.2959 0.8461 0.900 0.000 0.100
#> GSM786526 1 0.0237 0.8834 0.996 0.000 0.004
#> GSM786528 1 0.2066 0.8680 0.940 0.000 0.060
#> GSM786531 3 0.0000 0.8297 0.000 0.000 1.000
#> GSM786535 3 0.1163 0.8194 0.000 0.028 0.972
#> GSM786543 1 0.0237 0.8834 0.996 0.000 0.004
#> GSM786545 3 0.0237 0.8285 0.004 0.000 0.996
#> GSM786551 1 0.6062 0.4848 0.616 0.000 0.384
#> GSM786552 3 0.3267 0.7626 0.000 0.116 0.884
#> GSM786554 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786564 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786568 3 0.0592 0.8249 0.012 0.000 0.988
#> GSM786569 1 0.0424 0.8834 0.992 0.000 0.008
#> GSM786571 3 0.0000 0.8297 0.000 0.000 1.000
#> GSM786496 2 0.5291 0.5754 0.000 0.732 0.268
#> GSM786506 1 0.4931 0.6811 0.768 0.232 0.000
#> GSM786508 2 0.5497 0.4557 0.292 0.708 0.000
#> GSM786512 2 0.1753 0.7647 0.048 0.952 0.000
#> GSM786518 1 0.0892 0.8816 0.980 0.000 0.020
#> GSM786519 1 0.1170 0.8796 0.976 0.016 0.008
#> GSM786524 1 0.4555 0.7824 0.800 0.000 0.200
#> GSM786529 3 0.0000 0.8297 0.000 0.000 1.000
#> GSM786530 1 0.5363 0.7022 0.724 0.000 0.276
#> GSM786532 1 0.1860 0.8690 0.948 0.000 0.052
#> GSM786533 2 0.6307 0.1143 0.000 0.512 0.488
#> GSM786544 3 0.0592 0.8247 0.012 0.000 0.988
#> GSM786547 3 0.0000 0.8297 0.000 0.000 1.000
#> GSM786549 3 0.1529 0.8030 0.040 0.000 0.960
#> GSM786550 3 0.0000 0.8297 0.000 0.000 1.000
#> GSM786563 3 0.4235 0.6939 0.000 0.176 0.824
#> GSM786570 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786576 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786577 1 0.4452 0.7895 0.808 0.000 0.192
#> GSM786578 3 0.6168 0.2038 0.000 0.412 0.588
#> GSM786582 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786505 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786511 1 0.2878 0.8497 0.904 0.000 0.096
#> GSM786513 1 0.4002 0.8124 0.840 0.000 0.160
#> GSM786525 2 0.6460 0.2439 0.004 0.556 0.440
#> GSM786540 2 0.6309 0.0731 0.000 0.504 0.496
#> GSM786553 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786561 1 0.0424 0.8834 0.992 0.000 0.008
#> GSM786575 1 0.1411 0.8769 0.964 0.000 0.036
#> GSM786494 1 0.0424 0.8834 0.992 0.000 0.008
#> GSM786504 1 0.4654 0.7752 0.792 0.000 0.208
#> GSM786510 2 0.0000 0.8008 0.000 1.000 0.000
#> GSM786514 1 0.0237 0.8834 0.996 0.000 0.004
#> GSM786516 1 0.5465 0.6856 0.712 0.000 0.288
#> GSM786520 1 0.0000 0.8828 1.000 0.000 0.000
#> GSM786521 1 0.6204 0.4320 0.576 0.000 0.424
#> GSM786536 3 0.5529 0.4131 0.296 0.000 0.704
#> GSM786542 3 0.3038 0.7733 0.000 0.104 0.896
#> GSM786546 3 0.0000 0.8297 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.1824 0.8650 0.000 0.936 0.060 0.004
#> GSM786539 2 0.0469 0.8749 0.000 0.988 0.000 0.012
#> GSM786541 2 0.3539 0.7664 0.000 0.820 0.176 0.004
#> GSM786556 2 0.4761 0.4261 0.000 0.628 0.372 0.000
#> GSM786523 1 0.4718 0.5338 0.708 0.000 0.280 0.012
#> GSM786497 1 0.0188 0.7111 0.996 0.000 0.000 0.004
#> GSM786501 2 0.0188 0.8788 0.000 0.996 0.000 0.004
#> GSM786517 2 0.0376 0.8792 0.000 0.992 0.004 0.004
#> GSM786534 3 0.4996 -0.0321 0.000 0.484 0.516 0.000
#> GSM786555 2 0.1022 0.8758 0.000 0.968 0.032 0.000
#> GSM786558 2 0.2760 0.8151 0.000 0.872 0.128 0.000
#> GSM786559 2 0.0524 0.8796 0.000 0.988 0.008 0.004
#> GSM786565 2 0.1389 0.8703 0.000 0.952 0.048 0.000
#> GSM786572 2 0.3668 0.7622 0.000 0.808 0.188 0.004
#> GSM786579 2 0.3355 0.7871 0.000 0.836 0.160 0.004
#> GSM786491 4 0.1576 0.6595 0.048 0.000 0.004 0.948
#> GSM786509 1 0.3074 0.6348 0.848 0.000 0.000 0.152
#> GSM786538 4 0.4008 0.6053 0.244 0.000 0.000 0.756
#> GSM786548 3 0.3266 0.6832 0.000 0.168 0.832 0.000
#> GSM786562 4 0.2480 0.6697 0.088 0.008 0.000 0.904
#> GSM786566 4 0.7190 0.5009 0.260 0.192 0.000 0.548
#> GSM786573 3 0.4893 0.6843 0.052 0.172 0.772 0.004
#> GSM786574 2 0.0000 0.8794 0.000 1.000 0.000 0.000
#> GSM786580 4 0.4898 0.3941 0.024 0.000 0.260 0.716
#> GSM786581 2 0.3443 0.7649 0.000 0.848 0.016 0.136
#> GSM786583 3 0.2714 0.6994 0.112 0.000 0.884 0.004
#> GSM786492 1 0.0336 0.7102 0.992 0.000 0.000 0.008
#> GSM786493 2 0.0592 0.8789 0.000 0.984 0.016 0.000
#> GSM786499 2 0.0188 0.8788 0.000 0.996 0.000 0.004
#> GSM786502 2 0.5582 0.4266 0.032 0.620 0.000 0.348
#> GSM786537 1 0.1520 0.6966 0.956 0.000 0.024 0.020
#> GSM786567 2 0.0000 0.8794 0.000 1.000 0.000 0.000
#> GSM786498 4 0.6327 0.5573 0.216 0.132 0.000 0.652
#> GSM786500 1 0.2216 0.6590 0.908 0.000 0.000 0.092
#> GSM786503 1 0.5378 0.1263 0.540 0.012 0.000 0.448
#> GSM786507 2 0.0000 0.8794 0.000 1.000 0.000 0.000
#> GSM786515 2 0.1302 0.8711 0.000 0.956 0.044 0.000
#> GSM786522 1 0.5649 0.4869 0.664 0.000 0.052 0.284
#> GSM786526 1 0.4776 0.3668 0.624 0.000 0.000 0.376
#> GSM786528 4 0.6928 0.0576 0.436 0.000 0.108 0.456
#> GSM786531 3 0.3448 0.6675 0.168 0.000 0.828 0.004
#> GSM786535 3 0.0000 0.7183 0.000 0.000 1.000 0.000
#> GSM786543 1 0.0188 0.7115 0.996 0.000 0.000 0.004
#> GSM786545 3 0.5126 0.1618 0.444 0.000 0.552 0.004
#> GSM786551 3 0.6074 0.4716 0.228 0.000 0.668 0.104
#> GSM786552 3 0.3668 0.6748 0.000 0.188 0.808 0.004
#> GSM786554 2 0.0336 0.8799 0.000 0.992 0.008 0.000
#> GSM786557 4 0.4040 0.6092 0.248 0.000 0.000 0.752
#> GSM786560 1 0.3528 0.6147 0.808 0.000 0.000 0.192
#> GSM786564 2 0.5764 0.3484 0.000 0.520 0.028 0.452
#> GSM786568 1 0.7732 -0.0251 0.468 0.216 0.312 0.004
#> GSM786569 1 0.1022 0.7012 0.968 0.000 0.000 0.032
#> GSM786571 3 0.4781 0.3992 0.336 0.000 0.660 0.004
#> GSM786496 2 0.2149 0.8468 0.000 0.912 0.088 0.000
#> GSM786506 4 0.4106 0.6603 0.084 0.084 0.000 0.832
#> GSM786508 2 0.4323 0.6583 0.184 0.788 0.000 0.028
#> GSM786512 2 0.0672 0.8768 0.008 0.984 0.000 0.008
#> GSM786518 1 0.0188 0.7111 0.996 0.000 0.000 0.004
#> GSM786519 1 0.0188 0.7113 0.996 0.004 0.000 0.000
#> GSM786524 1 0.0188 0.7111 0.996 0.000 0.004 0.000
#> GSM786529 3 0.1118 0.7226 0.036 0.000 0.964 0.000
#> GSM786530 1 0.0524 0.7093 0.988 0.000 0.008 0.004
#> GSM786532 4 0.6763 0.3756 0.320 0.000 0.116 0.564
#> GSM786533 2 0.3224 0.8193 0.016 0.864 0.120 0.000
#> GSM786544 1 0.5290 0.3041 0.584 0.000 0.404 0.012
#> GSM786547 3 0.1847 0.7215 0.052 0.004 0.940 0.004
#> GSM786549 1 0.5388 0.1740 0.532 0.000 0.456 0.012
#> GSM786550 3 0.3074 0.6289 0.000 0.000 0.848 0.152
#> GSM786563 3 0.1940 0.7207 0.000 0.076 0.924 0.000
#> GSM786570 2 0.0895 0.8783 0.000 0.976 0.020 0.004
#> GSM786576 2 0.0000 0.8794 0.000 1.000 0.000 0.000
#> GSM786577 1 0.0000 0.7116 1.000 0.000 0.000 0.000
#> GSM786578 3 0.5151 0.6423 0.000 0.100 0.760 0.140
#> GSM786582 1 0.4817 0.2856 0.612 0.000 0.000 0.388
#> GSM786495 2 0.0000 0.8794 0.000 1.000 0.000 0.000
#> GSM786505 4 0.3942 0.6218 0.236 0.000 0.000 0.764
#> GSM786511 1 0.0188 0.7111 0.996 0.000 0.000 0.004
#> GSM786513 1 0.6181 0.5306 0.668 0.000 0.128 0.204
#> GSM786525 3 0.6834 0.1525 0.000 0.100 0.476 0.424
#> GSM786540 2 0.4866 0.3462 0.000 0.596 0.404 0.000
#> GSM786553 4 0.5559 0.3020 0.400 0.004 0.016 0.580
#> GSM786561 1 0.0000 0.7116 1.000 0.000 0.000 0.000
#> GSM786575 4 0.1610 0.6486 0.016 0.000 0.032 0.952
#> GSM786494 1 0.4624 0.2107 0.660 0.000 0.000 0.340
#> GSM786504 1 0.7463 0.2704 0.504 0.000 0.224 0.272
#> GSM786510 2 0.0000 0.8794 0.000 1.000 0.000 0.000
#> GSM786514 1 0.4543 0.4610 0.676 0.000 0.000 0.324
#> GSM786516 1 0.3850 0.6563 0.840 0.000 0.116 0.044
#> GSM786520 1 0.4697 0.3780 0.644 0.000 0.000 0.356
#> GSM786521 4 0.5577 0.2641 0.036 0.000 0.328 0.636
#> GSM786536 1 0.5019 0.5612 0.728 0.004 0.240 0.028
#> GSM786542 3 0.3907 0.6221 0.000 0.232 0.768 0.000
#> GSM786546 3 0.0657 0.7170 0.004 0.000 0.984 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.0898 0.8849 0.000 0.972 0.008 0.000 0.020
#> GSM786539 2 0.1251 0.8759 0.036 0.956 0.000 0.000 0.008
#> GSM786541 2 0.5078 0.4945 0.012 0.672 0.276 0.004 0.036
#> GSM786556 2 0.5804 -0.1287 0.016 0.476 0.464 0.008 0.036
#> GSM786523 4 0.4896 0.6097 0.024 0.000 0.264 0.688 0.024
#> GSM786497 4 0.2358 0.6729 0.008 0.000 0.000 0.888 0.104
#> GSM786501 2 0.0912 0.8833 0.012 0.972 0.000 0.000 0.016
#> GSM786517 2 0.0671 0.8862 0.000 0.980 0.004 0.000 0.016
#> GSM786534 3 0.5676 0.2489 0.012 0.416 0.528 0.008 0.036
#> GSM786555 2 0.1616 0.8786 0.008 0.948 0.008 0.004 0.032
#> GSM786558 2 0.2744 0.8375 0.008 0.892 0.072 0.004 0.024
#> GSM786559 2 0.1082 0.8815 0.000 0.964 0.008 0.000 0.028
#> GSM786565 2 0.1074 0.8871 0.000 0.968 0.012 0.004 0.016
#> GSM786572 2 0.3688 0.7633 0.000 0.816 0.124 0.000 0.060
#> GSM786579 2 0.3326 0.7609 0.000 0.824 0.152 0.000 0.024
#> GSM786491 1 0.3001 0.8032 0.844 0.000 0.008 0.004 0.144
#> GSM786509 1 0.3826 0.7369 0.752 0.000 0.004 0.236 0.008
#> GSM786538 1 0.1153 0.8623 0.964 0.000 0.004 0.008 0.024
#> GSM786548 3 0.4083 0.5721 0.000 0.080 0.788 0.000 0.132
#> GSM786562 1 0.2625 0.8257 0.876 0.000 0.000 0.016 0.108
#> GSM786566 1 0.4740 0.7234 0.780 0.052 0.000 0.092 0.076
#> GSM786573 3 0.5785 0.5531 0.016 0.168 0.704 0.040 0.072
#> GSM786574 2 0.1121 0.8863 0.008 0.968 0.004 0.004 0.016
#> GSM786580 5 0.2878 0.5525 0.048 0.000 0.068 0.004 0.880
#> GSM786581 2 0.6269 0.1346 0.408 0.500 0.048 0.004 0.040
#> GSM786583 3 0.4688 0.2403 0.008 0.000 0.660 0.312 0.020
#> GSM786492 4 0.2674 0.6586 0.012 0.000 0.000 0.868 0.120
#> GSM786493 2 0.1362 0.8848 0.012 0.960 0.008 0.004 0.016
#> GSM786499 2 0.1012 0.8819 0.012 0.968 0.000 0.000 0.020
#> GSM786502 5 0.6502 0.2317 0.012 0.416 0.000 0.132 0.440
#> GSM786537 4 0.4853 0.4392 0.008 0.000 0.028 0.652 0.312
#> GSM786567 2 0.0324 0.8875 0.004 0.992 0.000 0.000 0.004
#> GSM786498 5 0.7598 0.2493 0.320 0.056 0.000 0.216 0.408
#> GSM786500 4 0.3639 0.6208 0.044 0.000 0.000 0.812 0.144
#> GSM786503 1 0.1314 0.8632 0.960 0.012 0.000 0.016 0.012
#> GSM786507 2 0.0771 0.8850 0.020 0.976 0.000 0.000 0.004
#> GSM786515 2 0.1209 0.8875 0.012 0.964 0.012 0.000 0.012
#> GSM786522 1 0.4158 0.8031 0.792 0.000 0.084 0.120 0.004
#> GSM786526 1 0.2351 0.8641 0.916 0.000 0.028 0.036 0.020
#> GSM786528 1 0.2424 0.8535 0.908 0.000 0.052 0.008 0.032
#> GSM786531 3 0.4384 0.4329 0.012 0.004 0.752 0.208 0.024
#> GSM786535 3 0.2389 0.5720 0.000 0.004 0.880 0.000 0.116
#> GSM786543 4 0.1485 0.7156 0.032 0.000 0.020 0.948 0.000
#> GSM786545 4 0.4684 0.3505 0.004 0.000 0.452 0.536 0.008
#> GSM786551 3 0.7391 0.2145 0.160 0.000 0.528 0.212 0.100
#> GSM786552 3 0.4158 0.5510 0.008 0.244 0.736 0.004 0.008
#> GSM786554 2 0.0451 0.8874 0.004 0.988 0.000 0.000 0.008
#> GSM786557 1 0.0992 0.8602 0.968 0.000 0.000 0.008 0.024
#> GSM786560 1 0.3895 0.6996 0.728 0.000 0.004 0.264 0.004
#> GSM786564 5 0.4215 0.4397 0.000 0.168 0.064 0.000 0.768
#> GSM786568 4 0.6349 0.5094 0.008 0.124 0.204 0.632 0.032
#> GSM786569 4 0.5685 0.0243 0.396 0.000 0.000 0.520 0.084
#> GSM786571 4 0.5406 0.5215 0.008 0.008 0.328 0.616 0.040
#> GSM786496 2 0.1779 0.8753 0.008 0.940 0.040 0.004 0.008
#> GSM786506 1 0.1124 0.8551 0.960 0.000 0.000 0.004 0.036
#> GSM786508 2 0.3619 0.7868 0.028 0.860 0.048 0.052 0.012
#> GSM786512 2 0.2045 0.8596 0.012 0.932 0.020 0.032 0.004
#> GSM786518 4 0.2077 0.6835 0.008 0.000 0.000 0.908 0.084
#> GSM786519 4 0.2197 0.7161 0.012 0.004 0.064 0.916 0.004
#> GSM786524 4 0.2198 0.7201 0.020 0.000 0.048 0.920 0.012
#> GSM786529 3 0.3633 0.5755 0.000 0.012 0.832 0.116 0.040
#> GSM786530 4 0.1591 0.6986 0.004 0.000 0.004 0.940 0.052
#> GSM786532 1 0.1960 0.8630 0.928 0.000 0.048 0.004 0.020
#> GSM786533 2 0.2654 0.8436 0.000 0.900 0.044 0.040 0.016
#> GSM786544 4 0.4896 0.5810 0.016 0.000 0.296 0.664 0.024
#> GSM786547 3 0.5689 0.4032 0.004 0.044 0.668 0.236 0.048
#> GSM786549 4 0.4877 0.5686 0.012 0.000 0.312 0.652 0.024
#> GSM786550 3 0.4562 0.0828 0.008 0.000 0.496 0.000 0.496
#> GSM786563 3 0.3714 0.5782 0.000 0.056 0.812 0.000 0.132
#> GSM786570 2 0.1549 0.8735 0.000 0.944 0.016 0.000 0.040
#> GSM786576 2 0.0451 0.8877 0.008 0.988 0.000 0.000 0.004
#> GSM786577 4 0.1695 0.7201 0.008 0.000 0.044 0.940 0.008
#> GSM786578 3 0.4803 0.2077 0.000 0.020 0.536 0.000 0.444
#> GSM786582 1 0.2568 0.8566 0.888 0.000 0.004 0.092 0.016
#> GSM786495 2 0.0162 0.8866 0.004 0.996 0.000 0.000 0.000
#> GSM786505 1 0.1106 0.8610 0.964 0.000 0.000 0.012 0.024
#> GSM786511 4 0.2304 0.6748 0.008 0.000 0.000 0.892 0.100
#> GSM786513 1 0.4326 0.7784 0.776 0.000 0.140 0.080 0.004
#> GSM786525 1 0.4110 0.7225 0.804 0.008 0.136 0.008 0.044
#> GSM786540 3 0.5402 0.2620 0.008 0.420 0.536 0.004 0.032
#> GSM786553 1 0.1731 0.8562 0.940 0.000 0.012 0.008 0.040
#> GSM786561 4 0.1644 0.7191 0.008 0.000 0.048 0.940 0.004
#> GSM786575 5 0.3715 0.5082 0.260 0.000 0.000 0.004 0.736
#> GSM786494 4 0.5787 0.3561 0.240 0.000 0.000 0.608 0.152
#> GSM786504 1 0.4110 0.7917 0.792 0.000 0.152 0.044 0.012
#> GSM786510 2 0.0798 0.8847 0.016 0.976 0.000 0.000 0.008
#> GSM786514 1 0.2349 0.8584 0.900 0.000 0.012 0.084 0.004
#> GSM786516 4 0.4658 0.6545 0.040 0.000 0.188 0.748 0.024
#> GSM786520 1 0.2358 0.8528 0.888 0.000 0.000 0.104 0.008
#> GSM786521 5 0.2908 0.5513 0.032 0.000 0.068 0.016 0.884
#> GSM786536 4 0.6340 0.2719 0.040 0.008 0.428 0.480 0.044
#> GSM786542 3 0.4430 0.5492 0.000 0.244 0.720 0.004 0.032
#> GSM786546 3 0.1710 0.5798 0.020 0.000 0.944 0.012 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 6 0.3148 0.7113 0.000 0.116 0.020 0.000 0.024 0.840
#> GSM786539 6 0.1599 0.7401 0.024 0.028 0.000 0.000 0.008 0.940
#> GSM786541 2 0.3907 0.1413 0.000 0.588 0.000 0.000 0.004 0.408
#> GSM786556 2 0.3535 0.4882 0.000 0.760 0.012 0.000 0.008 0.220
#> GSM786523 3 0.3881 0.5650 0.024 0.004 0.720 0.252 0.000 0.000
#> GSM786497 4 0.0260 0.7251 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM786501 6 0.2213 0.7265 0.000 0.100 0.008 0.000 0.004 0.888
#> GSM786517 6 0.2536 0.7369 0.000 0.116 0.020 0.000 0.000 0.864
#> GSM786534 2 0.4245 0.4838 0.000 0.696 0.044 0.000 0.004 0.256
#> GSM786555 6 0.2738 0.7005 0.000 0.176 0.000 0.000 0.004 0.820
#> GSM786558 6 0.2668 0.6916 0.000 0.168 0.000 0.000 0.004 0.828
#> GSM786559 6 0.4793 0.5236 0.000 0.288 0.084 0.000 0.000 0.628
#> GSM786565 6 0.3564 0.7009 0.000 0.204 0.024 0.000 0.004 0.768
#> GSM786572 6 0.6514 0.1778 0.000 0.348 0.152 0.000 0.052 0.448
#> GSM786579 6 0.5755 0.3187 0.000 0.304 0.176 0.000 0.004 0.516
#> GSM786491 1 0.1812 0.8890 0.912 0.000 0.000 0.008 0.080 0.000
#> GSM786509 1 0.2100 0.8689 0.884 0.000 0.004 0.112 0.000 0.000
#> GSM786538 1 0.0458 0.9106 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM786548 2 0.5093 0.4614 0.000 0.612 0.292 0.000 0.088 0.008
#> GSM786562 1 0.1562 0.9028 0.940 0.004 0.000 0.024 0.032 0.000
#> GSM786566 1 0.2517 0.8744 0.888 0.008 0.000 0.080 0.016 0.008
#> GSM786573 2 0.4411 0.4728 0.000 0.744 0.064 0.012 0.008 0.172
#> GSM786574 6 0.2520 0.7179 0.000 0.152 0.000 0.000 0.004 0.844
#> GSM786580 5 0.1232 0.8127 0.024 0.004 0.000 0.016 0.956 0.000
#> GSM786581 6 0.6084 0.1615 0.348 0.176 0.004 0.000 0.008 0.464
#> GSM786583 3 0.3861 0.5830 0.000 0.084 0.808 0.068 0.040 0.000
#> GSM786492 4 0.0291 0.7249 0.004 0.000 0.004 0.992 0.000 0.000
#> GSM786493 6 0.2462 0.7111 0.004 0.132 0.000 0.000 0.004 0.860
#> GSM786499 6 0.2100 0.7232 0.000 0.112 0.004 0.000 0.000 0.884
#> GSM786502 6 0.7020 0.3906 0.004 0.224 0.048 0.036 0.164 0.524
#> GSM786537 4 0.3076 0.5244 0.000 0.000 0.000 0.760 0.240 0.000
#> GSM786567 6 0.1788 0.7413 0.000 0.076 0.004 0.000 0.004 0.916
#> GSM786498 4 0.8126 0.1312 0.236 0.108 0.012 0.428 0.156 0.060
#> GSM786500 4 0.1442 0.7129 0.040 0.000 0.004 0.944 0.012 0.000
#> GSM786503 1 0.0665 0.9090 0.980 0.004 0.000 0.000 0.008 0.008
#> GSM786507 6 0.0692 0.7469 0.000 0.020 0.000 0.000 0.004 0.976
#> GSM786515 6 0.2146 0.7176 0.000 0.116 0.000 0.000 0.004 0.880
#> GSM786522 1 0.2647 0.8793 0.876 0.020 0.088 0.016 0.000 0.000
#> GSM786526 1 0.2919 0.8521 0.856 0.012 0.112 0.008 0.012 0.000
#> GSM786528 1 0.2628 0.8837 0.888 0.040 0.056 0.004 0.012 0.000
#> GSM786531 3 0.2282 0.5864 0.000 0.088 0.888 0.024 0.000 0.000
#> GSM786535 2 0.4970 0.4060 0.000 0.580 0.336 0.000 0.084 0.000
#> GSM786543 4 0.1616 0.7117 0.020 0.000 0.048 0.932 0.000 0.000
#> GSM786545 3 0.5683 0.3766 0.000 0.240 0.564 0.188 0.008 0.000
#> GSM786551 4 0.7238 0.0917 0.076 0.320 0.192 0.400 0.012 0.000
#> GSM786552 3 0.5566 -0.0746 0.000 0.332 0.548 0.000 0.016 0.104
#> GSM786554 6 0.2006 0.7246 0.000 0.104 0.000 0.000 0.004 0.892
#> GSM786557 1 0.0603 0.9103 0.980 0.000 0.000 0.004 0.016 0.000
#> GSM786560 1 0.2647 0.8664 0.868 0.000 0.044 0.088 0.000 0.000
#> GSM786564 5 0.4758 0.6122 0.000 0.180 0.040 0.000 0.716 0.064
#> GSM786568 3 0.4692 0.5159 0.000 0.004 0.648 0.300 0.016 0.032
#> GSM786569 4 0.4203 0.2203 0.424 0.004 0.004 0.564 0.004 0.000
#> GSM786571 3 0.3599 0.5965 0.000 0.072 0.824 0.076 0.028 0.000
#> GSM786496 6 0.2980 0.7010 0.000 0.180 0.012 0.000 0.000 0.808
#> GSM786506 1 0.0405 0.9113 0.988 0.000 0.000 0.004 0.008 0.000
#> GSM786508 6 0.3992 0.6432 0.008 0.072 0.136 0.004 0.000 0.780
#> GSM786512 6 0.3276 0.6714 0.000 0.052 0.132 0.000 0.000 0.816
#> GSM786518 4 0.0508 0.7242 0.004 0.000 0.012 0.984 0.000 0.000
#> GSM786519 4 0.4719 -0.1048 0.020 0.000 0.448 0.516 0.000 0.016
#> GSM786524 4 0.2121 0.6879 0.012 0.000 0.096 0.892 0.000 0.000
#> GSM786529 3 0.4917 0.2545 0.000 0.308 0.624 0.020 0.048 0.000
#> GSM786530 4 0.0547 0.7219 0.000 0.000 0.020 0.980 0.000 0.000
#> GSM786532 1 0.1007 0.9123 0.968 0.008 0.004 0.004 0.016 0.000
#> GSM786533 6 0.5719 0.3760 0.000 0.272 0.188 0.000 0.004 0.536
#> GSM786544 3 0.3240 0.5857 0.000 0.000 0.752 0.244 0.004 0.000
#> GSM786547 3 0.3296 0.4978 0.000 0.132 0.824 0.004 0.036 0.004
#> GSM786549 3 0.3050 0.5907 0.000 0.000 0.764 0.236 0.000 0.000
#> GSM786550 5 0.3270 0.6946 0.000 0.060 0.120 0.000 0.820 0.000
#> GSM786563 2 0.5005 0.4571 0.000 0.612 0.296 0.000 0.088 0.004
#> GSM786570 6 0.5355 0.5057 0.000 0.292 0.060 0.000 0.040 0.608
#> GSM786576 6 0.2006 0.7466 0.000 0.104 0.004 0.000 0.000 0.892
#> GSM786577 4 0.1327 0.6978 0.000 0.000 0.064 0.936 0.000 0.000
#> GSM786578 2 0.6253 0.2568 0.000 0.416 0.284 0.000 0.292 0.008
#> GSM786582 1 0.1556 0.8920 0.920 0.000 0.000 0.080 0.000 0.000
#> GSM786495 6 0.0935 0.7440 0.000 0.032 0.004 0.000 0.000 0.964
#> GSM786505 1 0.0777 0.9088 0.972 0.000 0.000 0.004 0.024 0.000
#> GSM786511 4 0.0146 0.7249 0.004 0.000 0.000 0.996 0.000 0.000
#> GSM786513 1 0.2810 0.8272 0.832 0.008 0.156 0.004 0.000 0.000
#> GSM786525 1 0.5819 0.5098 0.624 0.208 0.040 0.000 0.008 0.120
#> GSM786540 2 0.6250 0.3983 0.000 0.468 0.272 0.000 0.016 0.244
#> GSM786553 1 0.0520 0.9117 0.984 0.008 0.000 0.000 0.008 0.000
#> GSM786561 4 0.3405 0.4059 0.004 0.000 0.272 0.724 0.000 0.000
#> GSM786575 5 0.3056 0.7192 0.160 0.000 0.008 0.012 0.820 0.000
#> GSM786494 4 0.5317 0.4010 0.308 0.000 0.008 0.580 0.104 0.000
#> GSM786504 1 0.2715 0.8682 0.868 0.012 0.104 0.004 0.012 0.000
#> GSM786510 6 0.0508 0.7464 0.000 0.012 0.000 0.000 0.004 0.984
#> GSM786514 1 0.1129 0.9113 0.964 0.008 0.012 0.012 0.004 0.000
#> GSM786516 3 0.4062 0.4630 0.024 0.000 0.660 0.316 0.000 0.000
#> GSM786520 1 0.0725 0.9124 0.976 0.000 0.012 0.012 0.000 0.000
#> GSM786521 5 0.1173 0.8113 0.016 0.000 0.008 0.016 0.960 0.000
#> GSM786536 3 0.6547 0.4231 0.020 0.216 0.584 0.092 0.004 0.084
#> GSM786542 2 0.5713 0.4240 0.000 0.540 0.340 0.000 0.032 0.088
#> GSM786546 3 0.4960 0.1618 0.020 0.336 0.600 0.000 0.044 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 specimen(p) disease.state(p) k
#> MAD:NMF 90 0.0154 0.742 2
#> MAD:NMF 75 0.0182 0.575 3
#> MAD:NMF 68 0.0878 0.162 4
#> MAD:NMF 74 0.0388 0.434 5
#> MAD:NMF 65 0.1467 0.585 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 54547 rows and 93 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.552 0.918 0.925 0.4653 0.496 0.496
#> 3 3 0.715 0.889 0.943 0.2757 0.896 0.795
#> 4 4 0.685 0.713 0.801 0.1696 0.919 0.802
#> 5 5 0.655 0.743 0.831 0.1178 0.859 0.590
#> 6 6 0.746 0.738 0.832 0.0552 0.962 0.825
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
#> GSM786527 2 0.7219 0.8947 0.200 0.800
#> GSM786539 1 0.0000 0.9719 1.000 0.000
#> GSM786541 2 0.0000 0.8690 0.000 1.000
#> GSM786556 2 0.0000 0.8690 0.000 1.000
#> GSM786523 2 0.3584 0.9110 0.068 0.932
#> GSM786497 1 0.0000 0.9719 1.000 0.000
#> GSM786501 1 0.0000 0.9719 1.000 0.000
#> GSM786517 2 0.6343 0.9257 0.160 0.840
#> GSM786534 2 0.0000 0.8690 0.000 1.000
#> GSM786555 2 0.5294 0.9293 0.120 0.880
#> GSM786558 2 0.5294 0.9293 0.120 0.880
#> GSM786559 2 0.6343 0.9257 0.160 0.840
#> GSM786565 2 0.5737 0.9324 0.136 0.864
#> GSM786572 2 0.5842 0.9325 0.140 0.860
#> GSM786579 2 0.5737 0.9324 0.136 0.864
#> GSM786491 1 0.0000 0.9719 1.000 0.000
#> GSM786509 1 0.0000 0.9719 1.000 0.000
#> GSM786538 1 0.0000 0.9719 1.000 0.000
#> GSM786548 2 0.0000 0.8690 0.000 1.000
#> GSM786562 1 0.0000 0.9719 1.000 0.000
#> GSM786566 1 0.0000 0.9719 1.000 0.000
#> GSM786573 2 0.0000 0.8690 0.000 1.000
#> GSM786574 2 0.6438 0.9233 0.164 0.836
#> GSM786580 1 0.0938 0.9617 0.988 0.012
#> GSM786581 2 0.5842 0.9325 0.140 0.860
#> GSM786583 2 0.3431 0.9091 0.064 0.936
#> GSM786492 1 0.0000 0.9719 1.000 0.000
#> GSM786493 2 0.5946 0.9318 0.144 0.856
#> GSM786499 1 0.0000 0.9719 1.000 0.000
#> GSM786502 1 0.0000 0.9719 1.000 0.000
#> GSM786537 2 0.8386 0.8100 0.268 0.732
#> GSM786567 2 0.5946 0.9322 0.144 0.856
#> GSM786498 1 0.0000 0.9719 1.000 0.000
#> GSM786500 1 0.0000 0.9719 1.000 0.000
#> GSM786503 1 0.0000 0.9719 1.000 0.000
#> GSM786507 1 0.0000 0.9719 1.000 0.000
#> GSM786515 2 0.5946 0.9318 0.144 0.856
#> GSM786522 2 0.7745 0.8616 0.228 0.772
#> GSM786526 1 0.3879 0.8913 0.924 0.076
#> GSM786528 1 0.5519 0.8242 0.872 0.128
#> GSM786531 2 0.0000 0.8690 0.000 1.000
#> GSM786535 2 0.0000 0.8690 0.000 1.000
#> GSM786543 1 0.0000 0.9719 1.000 0.000
#> GSM786545 2 0.3114 0.9046 0.056 0.944
#> GSM786551 2 0.7056 0.9010 0.192 0.808
#> GSM786552 2 0.3431 0.9091 0.064 0.936
#> GSM786554 2 0.5946 0.9318 0.144 0.856
#> GSM786557 1 0.0000 0.9719 1.000 0.000
#> GSM786560 1 0.0000 0.9719 1.000 0.000
#> GSM786564 2 0.6973 0.9059 0.188 0.812
#> GSM786568 2 0.6247 0.9273 0.156 0.844
#> GSM786569 1 0.0000 0.9719 1.000 0.000
#> GSM786571 2 0.4161 0.9174 0.084 0.916
#> GSM786496 2 0.5737 0.9324 0.136 0.864
#> GSM786506 1 0.0000 0.9719 1.000 0.000
#> GSM786508 1 0.0000 0.9719 1.000 0.000
#> GSM786512 1 0.0000 0.9719 1.000 0.000
#> GSM786518 1 0.0000 0.9719 1.000 0.000
#> GSM786519 1 0.0000 0.9719 1.000 0.000
#> GSM786524 1 0.9933 -0.0941 0.548 0.452
#> GSM786529 2 0.3431 0.9091 0.064 0.936
#> GSM786530 2 0.8327 0.8160 0.264 0.736
#> GSM786532 1 0.5842 0.8066 0.860 0.140
#> GSM786533 2 0.5842 0.9325 0.140 0.860
#> GSM786544 2 0.5842 0.9325 0.140 0.860
#> GSM786547 2 0.5946 0.9318 0.144 0.856
#> GSM786549 2 0.3584 0.9110 0.068 0.932
#> GSM786550 2 0.0000 0.8690 0.000 1.000
#> GSM786563 2 0.0000 0.8690 0.000 1.000
#> GSM786570 2 0.5842 0.9325 0.140 0.860
#> GSM786576 1 0.0000 0.9719 1.000 0.000
#> GSM786577 2 0.8386 0.8100 0.268 0.732
#> GSM786578 2 0.5946 0.9318 0.144 0.856
#> GSM786582 1 0.0376 0.9687 0.996 0.004
#> GSM786495 1 0.0000 0.9719 1.000 0.000
#> GSM786505 1 0.0000 0.9719 1.000 0.000
#> GSM786511 1 0.0000 0.9719 1.000 0.000
#> GSM786513 1 0.0000 0.9719 1.000 0.000
#> GSM786525 2 0.7056 0.9027 0.192 0.808
#> GSM786540 2 0.6623 0.9174 0.172 0.828
#> GSM786553 1 0.6973 0.7293 0.812 0.188
#> GSM786561 1 0.0000 0.9719 1.000 0.000
#> GSM786575 1 0.0000 0.9719 1.000 0.000
#> GSM786494 1 0.0000 0.9719 1.000 0.000
#> GSM786504 1 0.0376 0.9687 0.996 0.004
#> GSM786510 1 0.0000 0.9719 1.000 0.000
#> GSM786514 1 0.0000 0.9719 1.000 0.000
#> GSM786516 2 0.6247 0.9273 0.156 0.844
#> GSM786520 1 0.0000 0.9719 1.000 0.000
#> GSM786521 1 0.0938 0.9617 0.988 0.012
#> GSM786536 2 0.6247 0.9273 0.156 0.844
#> GSM786542 2 0.5842 0.9325 0.140 0.860
#> GSM786546 2 0.7056 0.9027 0.192 0.808
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.1964 0.895 0.056 0.944 0.000
#> GSM786539 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786541 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786556 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786523 2 0.4291 0.793 0.000 0.820 0.180
#> GSM786497 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786501 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786517 2 0.0747 0.916 0.016 0.984 0.000
#> GSM786534 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786555 2 0.2165 0.895 0.000 0.936 0.064
#> GSM786558 2 0.2165 0.895 0.000 0.936 0.064
#> GSM786559 2 0.0747 0.916 0.016 0.984 0.000
#> GSM786565 2 0.1031 0.914 0.000 0.976 0.024
#> GSM786572 2 0.0237 0.916 0.000 0.996 0.004
#> GSM786579 2 0.1031 0.914 0.000 0.976 0.024
#> GSM786491 1 0.1163 0.922 0.972 0.028 0.000
#> GSM786509 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786538 1 0.3412 0.868 0.876 0.124 0.000
#> GSM786548 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786562 1 0.1031 0.924 0.976 0.024 0.000
#> GSM786566 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786573 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786574 2 0.0892 0.915 0.020 0.980 0.000
#> GSM786580 1 0.3816 0.848 0.852 0.148 0.000
#> GSM786581 2 0.0237 0.916 0.000 0.996 0.004
#> GSM786583 2 0.4346 0.795 0.000 0.816 0.184
#> GSM786492 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786493 2 0.0000 0.916 0.000 1.000 0.000
#> GSM786499 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786502 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786537 2 0.3412 0.828 0.124 0.876 0.000
#> GSM786567 2 0.0475 0.918 0.004 0.992 0.004
#> GSM786498 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786500 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786503 1 0.0747 0.927 0.984 0.016 0.000
#> GSM786507 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786515 2 0.0000 0.916 0.000 1.000 0.000
#> GSM786522 2 0.2945 0.865 0.088 0.908 0.004
#> GSM786526 1 0.4702 0.775 0.788 0.212 0.000
#> GSM786528 1 0.5254 0.705 0.736 0.264 0.000
#> GSM786531 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786535 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786543 1 0.3412 0.868 0.876 0.124 0.000
#> GSM786545 2 0.6154 0.403 0.000 0.592 0.408
#> GSM786551 2 0.2096 0.898 0.052 0.944 0.004
#> GSM786552 2 0.4235 0.803 0.000 0.824 0.176
#> GSM786554 2 0.0000 0.916 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786564 2 0.1643 0.904 0.044 0.956 0.000
#> GSM786568 2 0.0592 0.917 0.012 0.988 0.000
#> GSM786569 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786571 2 0.3752 0.834 0.000 0.856 0.144
#> GSM786496 2 0.1031 0.914 0.000 0.976 0.024
#> GSM786506 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786508 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786512 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786518 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786519 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786524 2 0.6154 0.273 0.408 0.592 0.000
#> GSM786529 2 0.4346 0.795 0.000 0.816 0.184
#> GSM786530 2 0.3340 0.834 0.120 0.880 0.000
#> GSM786532 1 0.5363 0.684 0.724 0.276 0.000
#> GSM786533 2 0.0237 0.916 0.000 0.996 0.004
#> GSM786544 2 0.0592 0.916 0.000 0.988 0.012
#> GSM786547 2 0.0000 0.916 0.000 1.000 0.000
#> GSM786549 2 0.4291 0.793 0.000 0.820 0.180
#> GSM786550 3 0.0000 0.996 0.000 0.000 1.000
#> GSM786563 3 0.1289 0.963 0.000 0.032 0.968
#> GSM786570 2 0.0237 0.916 0.000 0.996 0.004
#> GSM786576 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786577 2 0.3412 0.828 0.124 0.876 0.000
#> GSM786578 2 0.0000 0.916 0.000 1.000 0.000
#> GSM786582 1 0.3482 0.865 0.872 0.128 0.000
#> GSM786495 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786505 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786511 1 0.3412 0.868 0.876 0.124 0.000
#> GSM786513 1 0.3412 0.868 0.876 0.124 0.000
#> GSM786525 2 0.1753 0.901 0.048 0.952 0.000
#> GSM786540 2 0.1163 0.910 0.028 0.972 0.000
#> GSM786553 1 0.5760 0.589 0.672 0.328 0.000
#> GSM786561 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786575 1 0.1031 0.924 0.976 0.024 0.000
#> GSM786494 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786504 1 0.3482 0.865 0.872 0.128 0.000
#> GSM786510 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786514 1 0.3412 0.868 0.876 0.124 0.000
#> GSM786516 2 0.0592 0.917 0.012 0.988 0.000
#> GSM786520 1 0.0000 0.932 1.000 0.000 0.000
#> GSM786521 1 0.3816 0.848 0.852 0.148 0.000
#> GSM786536 2 0.0592 0.917 0.012 0.988 0.000
#> GSM786542 2 0.0592 0.916 0.000 0.988 0.012
#> GSM786546 2 0.1753 0.901 0.048 0.952 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.2888 0.709 0.004 0.872 0.124 0.000
#> GSM786539 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786541 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786556 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786523 3 0.7237 0.516 0.000 0.296 0.528 0.176
#> GSM786497 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786501 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786517 2 0.1302 0.766 0.000 0.956 0.044 0.000
#> GSM786534 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786555 2 0.5288 0.555 0.000 0.720 0.224 0.056
#> GSM786558 2 0.5288 0.555 0.000 0.720 0.224 0.056
#> GSM786559 2 0.1302 0.766 0.000 0.956 0.044 0.000
#> GSM786565 2 0.2987 0.728 0.000 0.880 0.104 0.016
#> GSM786572 2 0.2760 0.740 0.000 0.872 0.128 0.000
#> GSM786579 2 0.2987 0.728 0.000 0.880 0.104 0.016
#> GSM786491 1 0.2973 0.825 0.856 0.000 0.144 0.000
#> GSM786509 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786538 1 0.4500 0.728 0.684 0.000 0.316 0.000
#> GSM786548 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786562 1 0.2921 0.827 0.860 0.000 0.140 0.000
#> GSM786566 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786573 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786574 2 0.2053 0.753 0.004 0.924 0.072 0.000
#> GSM786580 1 0.4697 0.694 0.644 0.000 0.356 0.000
#> GSM786581 2 0.1302 0.767 0.000 0.956 0.044 0.000
#> GSM786583 3 0.7469 0.343 0.000 0.392 0.432 0.176
#> GSM786492 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786493 2 0.0336 0.774 0.000 0.992 0.008 0.000
#> GSM786499 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786502 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786537 3 0.3528 0.562 0.000 0.192 0.808 0.000
#> GSM786567 2 0.1398 0.773 0.004 0.956 0.040 0.000
#> GSM786498 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786500 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786503 1 0.1576 0.861 0.948 0.004 0.048 0.000
#> GSM786507 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786515 2 0.0336 0.774 0.000 0.992 0.008 0.000
#> GSM786522 3 0.4331 0.532 0.000 0.288 0.712 0.000
#> GSM786526 1 0.5793 0.609 0.580 0.036 0.384 0.000
#> GSM786528 1 0.6324 0.535 0.536 0.064 0.400 0.000
#> GSM786531 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786535 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786543 1 0.4500 0.728 0.684 0.000 0.316 0.000
#> GSM786545 3 0.7179 0.296 0.000 0.136 0.456 0.408
#> GSM786551 3 0.4661 0.475 0.000 0.348 0.652 0.000
#> GSM786552 3 0.7421 0.327 0.000 0.400 0.432 0.168
#> GSM786554 2 0.0336 0.774 0.000 0.992 0.008 0.000
#> GSM786557 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786560 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786564 2 0.2676 0.736 0.012 0.896 0.092 0.000
#> GSM786568 2 0.3907 0.590 0.000 0.768 0.232 0.000
#> GSM786569 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786571 2 0.7187 -0.311 0.000 0.440 0.424 0.136
#> GSM786496 2 0.2987 0.728 0.000 0.880 0.104 0.016
#> GSM786506 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786508 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786512 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786518 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786519 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786524 3 0.5558 0.327 0.208 0.080 0.712 0.000
#> GSM786529 3 0.7469 0.343 0.000 0.392 0.432 0.176
#> GSM786530 3 0.3801 0.553 0.000 0.220 0.780 0.000
#> GSM786532 1 0.6347 0.514 0.524 0.064 0.412 0.000
#> GSM786533 2 0.2345 0.757 0.000 0.900 0.100 0.000
#> GSM786544 2 0.5281 -0.106 0.000 0.528 0.464 0.008
#> GSM786547 2 0.3528 0.617 0.000 0.808 0.192 0.000
#> GSM786549 3 0.7254 0.515 0.000 0.300 0.524 0.176
#> GSM786550 4 0.0000 0.994 0.000 0.000 0.000 1.000
#> GSM786563 4 0.1109 0.953 0.000 0.028 0.004 0.968
#> GSM786570 2 0.1211 0.773 0.000 0.960 0.040 0.000
#> GSM786576 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786577 3 0.3528 0.562 0.000 0.192 0.808 0.000
#> GSM786578 2 0.0817 0.773 0.000 0.976 0.024 0.000
#> GSM786582 1 0.4522 0.725 0.680 0.000 0.320 0.000
#> GSM786495 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786505 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786511 1 0.4500 0.728 0.684 0.000 0.316 0.000
#> GSM786513 1 0.4500 0.728 0.684 0.000 0.316 0.000
#> GSM786525 2 0.3219 0.697 0.000 0.836 0.164 0.000
#> GSM786540 2 0.2011 0.761 0.000 0.920 0.080 0.000
#> GSM786553 1 0.7158 0.443 0.512 0.148 0.340 0.000
#> GSM786561 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786575 1 0.2921 0.827 0.860 0.000 0.140 0.000
#> GSM786494 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786504 1 0.4522 0.725 0.680 0.000 0.320 0.000
#> GSM786510 1 0.0336 0.874 0.992 0.000 0.008 0.000
#> GSM786514 1 0.4500 0.728 0.684 0.000 0.316 0.000
#> GSM786516 2 0.4994 -0.109 0.000 0.520 0.480 0.000
#> GSM786520 1 0.0188 0.874 0.996 0.000 0.004 0.000
#> GSM786521 1 0.4697 0.694 0.644 0.000 0.356 0.000
#> GSM786536 2 0.4994 -0.109 0.000 0.520 0.480 0.000
#> GSM786542 2 0.2859 0.742 0.000 0.880 0.112 0.008
#> GSM786546 2 0.3311 0.688 0.000 0.828 0.172 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.2388 0.7632 0.072 0.900 0.028 0.000 0.000
#> GSM786539 4 0.3165 0.7784 0.116 0.000 0.036 0.848 0.000
#> GSM786541 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786556 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786523 3 0.3752 0.6293 0.004 0.044 0.812 0.000 0.140
#> GSM786497 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786501 4 0.3734 0.7445 0.168 0.000 0.036 0.796 0.000
#> GSM786517 2 0.0510 0.8030 0.016 0.984 0.000 0.000 0.000
#> GSM786534 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786555 2 0.5302 0.4630 0.016 0.572 0.384 0.000 0.028
#> GSM786558 2 0.5302 0.4630 0.016 0.572 0.384 0.000 0.028
#> GSM786559 2 0.0510 0.8030 0.016 0.984 0.000 0.000 0.000
#> GSM786565 2 0.3789 0.7193 0.016 0.760 0.224 0.000 0.000
#> GSM786572 2 0.3521 0.7345 0.004 0.764 0.232 0.000 0.000
#> GSM786579 2 0.3789 0.7193 0.016 0.760 0.224 0.000 0.000
#> GSM786491 1 0.3612 0.5793 0.732 0.000 0.000 0.268 0.000
#> GSM786509 4 0.1485 0.8187 0.032 0.000 0.020 0.948 0.000
#> GSM786538 1 0.1410 0.8451 0.940 0.000 0.000 0.060 0.000
#> GSM786548 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786562 1 0.3876 0.5075 0.684 0.000 0.000 0.316 0.000
#> GSM786566 4 0.1485 0.8187 0.032 0.000 0.020 0.948 0.000
#> GSM786573 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786574 2 0.1579 0.7915 0.032 0.944 0.024 0.000 0.000
#> GSM786580 1 0.1442 0.8309 0.952 0.004 0.012 0.032 0.000
#> GSM786581 2 0.2179 0.7945 0.000 0.888 0.112 0.000 0.000
#> GSM786583 3 0.4940 0.6184 0.020 0.112 0.748 0.000 0.120
#> GSM786492 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786493 2 0.0609 0.8096 0.000 0.980 0.020 0.000 0.000
#> GSM786499 4 0.3734 0.7445 0.168 0.000 0.036 0.796 0.000
#> GSM786502 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786537 3 0.6100 0.5316 0.252 0.184 0.564 0.000 0.000
#> GSM786567 2 0.1106 0.8079 0.012 0.964 0.024 0.000 0.000
#> GSM786498 4 0.2471 0.8454 0.136 0.000 0.000 0.864 0.000
#> GSM786500 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786503 4 0.4228 0.6973 0.216 0.004 0.032 0.748 0.000
#> GSM786507 4 0.3734 0.7445 0.168 0.000 0.036 0.796 0.000
#> GSM786515 2 0.0609 0.8096 0.000 0.980 0.020 0.000 0.000
#> GSM786522 3 0.5824 0.5986 0.168 0.224 0.608 0.000 0.000
#> GSM786526 1 0.3388 0.7929 0.864 0.040 0.056 0.040 0.000
#> GSM786528 1 0.4148 0.7446 0.816 0.080 0.072 0.032 0.000
#> GSM786531 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786535 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786543 1 0.1410 0.8451 0.940 0.000 0.000 0.060 0.000
#> GSM786545 3 0.4251 0.3192 0.004 0.000 0.624 0.000 0.372
#> GSM786551 3 0.5223 0.6230 0.108 0.220 0.672 0.000 0.000
#> GSM786552 3 0.4940 0.6143 0.020 0.120 0.748 0.000 0.112
#> GSM786554 2 0.0609 0.8096 0.000 0.980 0.020 0.000 0.000
#> GSM786557 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786560 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786564 2 0.1943 0.7780 0.056 0.924 0.020 0.000 0.000
#> GSM786568 2 0.4456 0.3383 0.020 0.660 0.320 0.000 0.000
#> GSM786569 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786571 3 0.4796 0.5876 0.008 0.164 0.740 0.000 0.088
#> GSM786496 2 0.3789 0.7193 0.016 0.760 0.224 0.000 0.000
#> GSM786506 4 0.2471 0.8454 0.136 0.000 0.000 0.864 0.000
#> GSM786508 4 0.0703 0.8086 0.000 0.000 0.024 0.976 0.000
#> GSM786512 4 0.3695 0.7453 0.164 0.000 0.036 0.800 0.000
#> GSM786518 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786519 4 0.1012 0.8154 0.012 0.000 0.020 0.968 0.000
#> GSM786524 1 0.6286 0.0435 0.500 0.092 0.388 0.020 0.000
#> GSM786529 3 0.4940 0.6184 0.020 0.112 0.748 0.000 0.120
#> GSM786530 3 0.6222 0.5456 0.236 0.216 0.548 0.000 0.000
#> GSM786532 1 0.4322 0.7309 0.804 0.080 0.084 0.032 0.000
#> GSM786533 2 0.2648 0.7721 0.000 0.848 0.152 0.000 0.000
#> GSM786544 3 0.4213 0.5454 0.012 0.308 0.680 0.000 0.000
#> GSM786547 2 0.4029 0.3838 0.004 0.680 0.316 0.000 0.000
#> GSM786549 3 0.3752 0.6304 0.004 0.044 0.812 0.000 0.140
#> GSM786550 5 0.0000 0.9928 0.000 0.000 0.000 0.000 1.000
#> GSM786563 5 0.1721 0.9400 0.020 0.016 0.020 0.000 0.944
#> GSM786570 2 0.0992 0.8077 0.008 0.968 0.024 0.000 0.000
#> GSM786576 4 0.3734 0.7445 0.168 0.000 0.036 0.796 0.000
#> GSM786577 3 0.6100 0.5316 0.252 0.184 0.564 0.000 0.000
#> GSM786578 2 0.1544 0.8066 0.000 0.932 0.068 0.000 0.000
#> GSM786582 1 0.1341 0.8444 0.944 0.000 0.000 0.056 0.000
#> GSM786495 4 0.3734 0.7445 0.168 0.000 0.036 0.796 0.000
#> GSM786505 4 0.2471 0.8454 0.136 0.000 0.000 0.864 0.000
#> GSM786511 1 0.1410 0.8451 0.940 0.000 0.000 0.060 0.000
#> GSM786513 1 0.1410 0.8451 0.940 0.000 0.000 0.060 0.000
#> GSM786525 2 0.3169 0.7271 0.060 0.856 0.084 0.000 0.000
#> GSM786540 2 0.1582 0.8022 0.028 0.944 0.028 0.000 0.000
#> GSM786553 1 0.4821 0.6631 0.748 0.172 0.048 0.032 0.000
#> GSM786561 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786575 1 0.3876 0.5075 0.684 0.000 0.000 0.316 0.000
#> GSM786494 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786504 1 0.1341 0.8444 0.944 0.000 0.000 0.056 0.000
#> GSM786510 4 0.3695 0.7453 0.164 0.000 0.036 0.800 0.000
#> GSM786514 1 0.1410 0.8451 0.940 0.000 0.000 0.060 0.000
#> GSM786516 3 0.4835 0.4947 0.028 0.380 0.592 0.000 0.000
#> GSM786520 4 0.2471 0.8461 0.136 0.000 0.000 0.864 0.000
#> GSM786521 1 0.1442 0.8309 0.952 0.004 0.012 0.032 0.000
#> GSM786536 3 0.4835 0.4947 0.028 0.380 0.592 0.000 0.000
#> GSM786542 2 0.3424 0.7299 0.000 0.760 0.240 0.000 0.000
#> GSM786546 2 0.3281 0.7185 0.060 0.848 0.092 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.2322 0.7466 0.064 0.896 0.004 0.000 0.000 0.036
#> GSM786539 6 0.4423 0.7706 0.060 0.000 0.000 0.272 0.000 0.668
#> GSM786541 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786556 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786523 3 0.3238 0.6605 0.000 0.024 0.848 0.000 0.072 0.056
#> GSM786497 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786501 6 0.3313 0.9591 0.060 0.000 0.000 0.124 0.000 0.816
#> GSM786517 2 0.0458 0.7822 0.016 0.984 0.000 0.000 0.000 0.000
#> GSM786534 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786555 2 0.4695 0.3941 0.000 0.504 0.460 0.000 0.008 0.028
#> GSM786558 2 0.4695 0.3941 0.000 0.504 0.460 0.000 0.008 0.028
#> GSM786559 2 0.0458 0.7822 0.016 0.984 0.000 0.000 0.000 0.000
#> GSM786565 2 0.4131 0.6674 0.000 0.688 0.272 0.000 0.000 0.040
#> GSM786572 2 0.3819 0.6842 0.000 0.700 0.280 0.000 0.000 0.020
#> GSM786579 2 0.4131 0.6674 0.000 0.688 0.272 0.000 0.000 0.040
#> GSM786491 1 0.4234 0.5908 0.676 0.000 0.000 0.280 0.000 0.044
#> GSM786509 4 0.3833 0.4007 0.008 0.000 0.000 0.648 0.000 0.344
#> GSM786538 1 0.1151 0.8326 0.956 0.000 0.000 0.032 0.000 0.012
#> GSM786548 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786562 1 0.4438 0.5195 0.628 0.000 0.000 0.328 0.000 0.044
#> GSM786566 4 0.3833 0.4007 0.008 0.000 0.000 0.648 0.000 0.344
#> GSM786573 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786574 2 0.1518 0.7725 0.024 0.944 0.008 0.000 0.000 0.024
#> GSM786580 1 0.0405 0.8206 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM786581 2 0.2473 0.7665 0.000 0.856 0.136 0.000 0.000 0.008
#> GSM786583 3 0.2776 0.6309 0.004 0.028 0.884 0.000 0.040 0.044
#> GSM786492 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786493 2 0.0632 0.7883 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM786499 6 0.3313 0.9591 0.060 0.000 0.000 0.124 0.000 0.816
#> GSM786502 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786537 3 0.7085 0.5122 0.240 0.176 0.456 0.000 0.000 0.128
#> GSM786567 2 0.1092 0.7844 0.000 0.960 0.020 0.000 0.000 0.020
#> GSM786498 4 0.0632 0.8735 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM786500 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786503 6 0.4399 0.8970 0.112 0.004 0.000 0.156 0.000 0.728
#> GSM786507 6 0.3313 0.9591 0.060 0.000 0.000 0.124 0.000 0.816
#> GSM786515 2 0.0632 0.7883 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM786522 3 0.6726 0.5949 0.152 0.212 0.520 0.000 0.000 0.116
#> GSM786526 1 0.2763 0.7841 0.884 0.040 0.048 0.004 0.000 0.024
#> GSM786528 1 0.3434 0.7382 0.840 0.076 0.056 0.004 0.000 0.024
#> GSM786531 5 0.0146 0.9849 0.000 0.000 0.004 0.000 0.996 0.000
#> GSM786535 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786543 1 0.1151 0.8326 0.956 0.000 0.000 0.032 0.000 0.012
#> GSM786545 3 0.4515 0.4032 0.000 0.000 0.640 0.000 0.304 0.056
#> GSM786551 3 0.6196 0.6206 0.092 0.208 0.584 0.000 0.000 0.116
#> GSM786552 3 0.2781 0.6276 0.004 0.036 0.884 0.000 0.032 0.044
#> GSM786554 2 0.0632 0.7883 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM786557 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786560 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786564 2 0.1844 0.7623 0.048 0.924 0.004 0.000 0.000 0.024
#> GSM786568 2 0.4679 0.2699 0.016 0.604 0.352 0.000 0.000 0.028
#> GSM786569 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786571 3 0.2729 0.6063 0.004 0.080 0.876 0.000 0.008 0.032
#> GSM786496 2 0.4131 0.6674 0.000 0.688 0.272 0.000 0.000 0.040
#> GSM786506 4 0.0632 0.8735 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM786508 4 0.3828 0.0929 0.000 0.000 0.000 0.560 0.000 0.440
#> GSM786512 6 0.3435 0.9539 0.060 0.000 0.000 0.136 0.000 0.804
#> GSM786518 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786519 4 0.3409 0.5018 0.000 0.000 0.000 0.700 0.000 0.300
#> GSM786524 1 0.6367 0.0855 0.508 0.088 0.312 0.000 0.000 0.092
#> GSM786529 3 0.2776 0.6309 0.004 0.028 0.884 0.000 0.040 0.044
#> GSM786530 3 0.7138 0.5206 0.224 0.212 0.444 0.000 0.000 0.120
#> GSM786532 1 0.3608 0.7288 0.828 0.076 0.068 0.004 0.000 0.024
#> GSM786533 2 0.3200 0.7328 0.000 0.788 0.196 0.000 0.000 0.016
#> GSM786544 3 0.4237 0.5763 0.004 0.244 0.704 0.000 0.000 0.048
#> GSM786547 2 0.4064 0.3263 0.000 0.624 0.360 0.000 0.000 0.016
#> GSM786549 3 0.3238 0.6614 0.000 0.024 0.848 0.000 0.072 0.056
#> GSM786550 5 0.0000 0.9876 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786563 5 0.2340 0.8986 0.004 0.000 0.056 0.000 0.896 0.044
#> GSM786570 2 0.1003 0.7848 0.000 0.964 0.020 0.000 0.000 0.016
#> GSM786576 6 0.3313 0.9591 0.060 0.000 0.000 0.124 0.000 0.816
#> GSM786577 3 0.7085 0.5122 0.240 0.176 0.456 0.000 0.000 0.128
#> GSM786578 2 0.1531 0.7846 0.000 0.928 0.068 0.000 0.000 0.004
#> GSM786582 1 0.1049 0.8323 0.960 0.000 0.000 0.032 0.000 0.008
#> GSM786495 6 0.3313 0.9591 0.060 0.000 0.000 0.124 0.000 0.816
#> GSM786505 4 0.0632 0.8735 0.000 0.000 0.000 0.976 0.000 0.024
#> GSM786511 1 0.1151 0.8326 0.956 0.000 0.000 0.032 0.000 0.012
#> GSM786513 1 0.1151 0.8326 0.956 0.000 0.000 0.032 0.000 0.012
#> GSM786525 2 0.3309 0.7039 0.052 0.844 0.076 0.000 0.000 0.028
#> GSM786540 2 0.1485 0.7805 0.028 0.944 0.024 0.000 0.000 0.004
#> GSM786553 1 0.4015 0.6566 0.772 0.168 0.036 0.004 0.000 0.020
#> GSM786561 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786575 1 0.4438 0.5195 0.628 0.000 0.000 0.328 0.000 0.044
#> GSM786494 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786504 1 0.1049 0.8323 0.960 0.000 0.000 0.032 0.000 0.008
#> GSM786510 6 0.3435 0.9539 0.060 0.000 0.000 0.136 0.000 0.804
#> GSM786514 1 0.1151 0.8326 0.956 0.000 0.000 0.032 0.000 0.012
#> GSM786516 3 0.5138 0.5249 0.020 0.324 0.596 0.000 0.000 0.060
#> GSM786520 4 0.0000 0.8874 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786521 1 0.0405 0.8206 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM786536 3 0.5138 0.5249 0.020 0.324 0.596 0.000 0.000 0.060
#> GSM786542 2 0.3564 0.7015 0.000 0.724 0.264 0.000 0.000 0.012
#> GSM786546 2 0.3436 0.6955 0.052 0.836 0.080 0.000 0.000 0.032
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 specimen(p) disease.state(p) k
#> ATC:hclust 92 0.0815 0.912 2
#> ATC:hclust 91 0.0987 0.320 3
#> ATC:hclust 82 0.0660 0.125 4
#> ATC:hclust 85 0.0581 0.465 5
#> ATC:hclust 84 0.2636 0.396 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 54547 rows and 93 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.970 0.988 0.5055 0.495 0.495
#> 3 3 0.654 0.741 0.864 0.2838 0.736 0.523
#> 4 4 0.655 0.711 0.837 0.1352 0.798 0.503
#> 5 5 0.800 0.783 0.861 0.0661 0.930 0.744
#> 6 6 0.762 0.735 0.822 0.0485 0.913 0.638
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
#> GSM786527 2 0.000 0.992 0.000 1.000
#> GSM786539 1 0.000 0.984 1.000 0.000
#> GSM786541 2 0.000 0.992 0.000 1.000
#> GSM786556 2 0.000 0.992 0.000 1.000
#> GSM786523 2 0.000 0.992 0.000 1.000
#> GSM786497 1 0.000 0.984 1.000 0.000
#> GSM786501 1 0.000 0.984 1.000 0.000
#> GSM786517 1 0.402 0.906 0.920 0.080
#> GSM786534 2 0.000 0.992 0.000 1.000
#> GSM786555 2 0.000 0.992 0.000 1.000
#> GSM786558 2 0.000 0.992 0.000 1.000
#> GSM786559 1 0.997 0.126 0.532 0.468
#> GSM786565 2 0.000 0.992 0.000 1.000
#> GSM786572 2 0.000 0.992 0.000 1.000
#> GSM786579 2 0.000 0.992 0.000 1.000
#> GSM786491 1 0.000 0.984 1.000 0.000
#> GSM786509 1 0.000 0.984 1.000 0.000
#> GSM786538 1 0.000 0.984 1.000 0.000
#> GSM786548 2 0.000 0.992 0.000 1.000
#> GSM786562 1 0.000 0.984 1.000 0.000
#> GSM786566 1 0.000 0.984 1.000 0.000
#> GSM786573 2 0.000 0.992 0.000 1.000
#> GSM786574 2 0.000 0.992 0.000 1.000
#> GSM786580 1 0.000 0.984 1.000 0.000
#> GSM786581 2 0.000 0.992 0.000 1.000
#> GSM786583 2 0.000 0.992 0.000 1.000
#> GSM786492 1 0.000 0.984 1.000 0.000
#> GSM786493 2 0.000 0.992 0.000 1.000
#> GSM786499 1 0.000 0.984 1.000 0.000
#> GSM786502 1 0.000 0.984 1.000 0.000
#> GSM786537 2 0.925 0.474 0.340 0.660
#> GSM786567 2 0.000 0.992 0.000 1.000
#> GSM786498 1 0.000 0.984 1.000 0.000
#> GSM786500 1 0.000 0.984 1.000 0.000
#> GSM786503 1 0.000 0.984 1.000 0.000
#> GSM786507 1 0.000 0.984 1.000 0.000
#> GSM786515 2 0.000 0.992 0.000 1.000
#> GSM786522 2 0.000 0.992 0.000 1.000
#> GSM786526 1 0.000 0.984 1.000 0.000
#> GSM786528 1 0.000 0.984 1.000 0.000
#> GSM786531 2 0.000 0.992 0.000 1.000
#> GSM786535 2 0.000 0.992 0.000 1.000
#> GSM786543 1 0.000 0.984 1.000 0.000
#> GSM786545 2 0.000 0.992 0.000 1.000
#> GSM786551 2 0.000 0.992 0.000 1.000
#> GSM786552 2 0.000 0.992 0.000 1.000
#> GSM786554 2 0.000 0.992 0.000 1.000
#> GSM786557 1 0.000 0.984 1.000 0.000
#> GSM786560 1 0.000 0.984 1.000 0.000
#> GSM786564 1 0.482 0.880 0.896 0.104
#> GSM786568 2 0.000 0.992 0.000 1.000
#> GSM786569 1 0.000 0.984 1.000 0.000
#> GSM786571 2 0.000 0.992 0.000 1.000
#> GSM786496 2 0.000 0.992 0.000 1.000
#> GSM786506 1 0.000 0.984 1.000 0.000
#> GSM786508 1 0.000 0.984 1.000 0.000
#> GSM786512 1 0.000 0.984 1.000 0.000
#> GSM786518 1 0.000 0.984 1.000 0.000
#> GSM786519 1 0.000 0.984 1.000 0.000
#> GSM786524 1 0.000 0.984 1.000 0.000
#> GSM786529 2 0.000 0.992 0.000 1.000
#> GSM786530 2 0.000 0.992 0.000 1.000
#> GSM786532 1 0.000 0.984 1.000 0.000
#> GSM786533 2 0.000 0.992 0.000 1.000
#> GSM786544 2 0.000 0.992 0.000 1.000
#> GSM786547 2 0.000 0.992 0.000 1.000
#> GSM786549 2 0.000 0.992 0.000 1.000
#> GSM786550 2 0.000 0.992 0.000 1.000
#> GSM786563 2 0.000 0.992 0.000 1.000
#> GSM786570 2 0.000 0.992 0.000 1.000
#> GSM786576 1 0.000 0.984 1.000 0.000
#> GSM786577 1 0.469 0.883 0.900 0.100
#> GSM786578 2 0.000 0.992 0.000 1.000
#> GSM786582 1 0.000 0.984 1.000 0.000
#> GSM786495 1 0.000 0.984 1.000 0.000
#> GSM786505 1 0.000 0.984 1.000 0.000
#> GSM786511 1 0.000 0.984 1.000 0.000
#> GSM786513 1 0.000 0.984 1.000 0.000
#> GSM786525 2 0.000 0.992 0.000 1.000
#> GSM786540 2 0.000 0.992 0.000 1.000
#> GSM786553 1 0.000 0.984 1.000 0.000
#> GSM786561 1 0.000 0.984 1.000 0.000
#> GSM786575 1 0.000 0.984 1.000 0.000
#> GSM786494 1 0.000 0.984 1.000 0.000
#> GSM786504 1 0.000 0.984 1.000 0.000
#> GSM786510 1 0.000 0.984 1.000 0.000
#> GSM786514 1 0.000 0.984 1.000 0.000
#> GSM786516 2 0.000 0.992 0.000 1.000
#> GSM786520 1 0.000 0.984 1.000 0.000
#> GSM786521 1 0.000 0.984 1.000 0.000
#> GSM786536 2 0.000 0.992 0.000 1.000
#> GSM786542 2 0.000 0.992 0.000 1.000
#> GSM786546 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
#> GSM786527 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786539 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786541 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786556 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786523 3 0.5327 0.6323 0.000 0.272 0.728
#> GSM786497 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786501 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786517 2 0.0592 0.8240 0.012 0.988 0.000
#> GSM786534 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786555 3 0.4399 0.7617 0.000 0.188 0.812
#> GSM786558 3 0.4291 0.7656 0.000 0.180 0.820
#> GSM786559 2 0.0592 0.8240 0.012 0.988 0.000
#> GSM786565 3 0.4931 0.7061 0.000 0.232 0.768
#> GSM786572 2 0.4605 0.6909 0.000 0.796 0.204
#> GSM786579 2 0.6274 0.0878 0.000 0.544 0.456
#> GSM786491 1 0.3116 0.8074 0.892 0.108 0.000
#> GSM786509 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786538 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786548 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786562 1 0.0000 0.8695 1.000 0.000 0.000
#> GSM786566 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786573 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786574 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786580 1 0.6291 0.2624 0.532 0.468 0.000
#> GSM786581 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786583 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786492 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786493 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786499 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786502 1 0.0892 0.8656 0.980 0.020 0.000
#> GSM786537 2 0.3941 0.7315 0.156 0.844 0.000
#> GSM786567 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786498 1 0.0000 0.8695 1.000 0.000 0.000
#> GSM786500 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786503 1 0.2356 0.8473 0.928 0.072 0.000
#> GSM786507 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786515 2 0.2625 0.8223 0.000 0.916 0.084
#> GSM786522 2 0.1529 0.8415 0.000 0.960 0.040
#> GSM786526 1 0.6286 0.2740 0.536 0.464 0.000
#> GSM786528 2 0.4235 0.7063 0.176 0.824 0.000
#> GSM786531 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786535 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786543 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786545 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786551 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786552 3 0.0424 0.8976 0.000 0.008 0.992
#> GSM786554 2 0.2625 0.8223 0.000 0.916 0.084
#> GSM786557 1 0.0237 0.8694 0.996 0.004 0.000
#> GSM786560 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786564 2 0.0592 0.8240 0.012 0.988 0.000
#> GSM786568 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786569 1 0.0000 0.8695 1.000 0.000 0.000
#> GSM786571 3 0.5529 0.5926 0.000 0.296 0.704
#> GSM786496 2 0.6307 -0.0352 0.000 0.512 0.488
#> GSM786506 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786508 1 0.1411 0.8608 0.964 0.036 0.000
#> GSM786512 1 0.6204 0.3980 0.576 0.424 0.000
#> GSM786518 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786519 1 0.0892 0.8656 0.980 0.020 0.000
#> GSM786524 2 0.4178 0.7119 0.172 0.828 0.000
#> GSM786529 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786530 2 0.1411 0.8404 0.000 0.964 0.036
#> GSM786532 2 0.4178 0.7119 0.172 0.828 0.000
#> GSM786533 2 0.4842 0.6611 0.000 0.776 0.224
#> GSM786544 3 0.6180 0.2838 0.000 0.416 0.584
#> GSM786547 2 0.2625 0.8223 0.000 0.916 0.084
#> GSM786549 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786550 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786563 3 0.0000 0.9017 0.000 0.000 1.000
#> GSM786570 2 0.6095 0.2964 0.000 0.608 0.392
#> GSM786576 2 0.5591 0.3681 0.304 0.696 0.000
#> GSM786577 2 0.3941 0.7315 0.156 0.844 0.000
#> GSM786578 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786582 1 0.5760 0.5618 0.672 0.328 0.000
#> GSM786495 1 0.6079 0.4324 0.612 0.388 0.000
#> GSM786505 1 0.0000 0.8695 1.000 0.000 0.000
#> GSM786511 1 0.5760 0.5618 0.672 0.328 0.000
#> GSM786513 1 0.5650 0.5858 0.688 0.312 0.000
#> GSM786525 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786540 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786553 2 0.1643 0.8179 0.044 0.956 0.000
#> GSM786561 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786575 1 0.0592 0.8689 0.988 0.012 0.000
#> GSM786494 1 0.0000 0.8695 1.000 0.000 0.000
#> GSM786504 2 0.6274 -0.0332 0.456 0.544 0.000
#> GSM786510 1 0.6045 0.4483 0.620 0.380 0.000
#> GSM786514 1 0.5760 0.5618 0.672 0.328 0.000
#> GSM786516 2 0.1411 0.8404 0.000 0.964 0.036
#> GSM786520 1 0.0000 0.8695 1.000 0.000 0.000
#> GSM786521 1 0.6291 0.2624 0.532 0.468 0.000
#> GSM786536 2 0.1753 0.8432 0.000 0.952 0.048
#> GSM786542 2 0.6305 -0.0196 0.000 0.516 0.484
#> GSM786546 2 0.1753 0.8432 0.000 0.952 0.048
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.2342 0.7765 0.080 0.912 0.000 0.008
#> GSM786539 4 0.3934 0.7452 0.116 0.048 0.000 0.836
#> GSM786541 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786556 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786523 2 0.6080 0.1802 0.044 0.488 0.468 0.000
#> GSM786497 4 0.2704 0.8089 0.124 0.000 0.000 0.876
#> GSM786501 4 0.3716 0.7401 0.096 0.052 0.000 0.852
#> GSM786517 2 0.3333 0.7255 0.088 0.872 0.000 0.040
#> GSM786534 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786555 2 0.4877 0.5551 0.008 0.664 0.328 0.000
#> GSM786558 2 0.5472 0.3150 0.016 0.544 0.440 0.000
#> GSM786559 2 0.1890 0.7743 0.056 0.936 0.000 0.008
#> GSM786565 2 0.4422 0.6529 0.008 0.736 0.256 0.000
#> GSM786572 2 0.2124 0.8036 0.008 0.924 0.068 0.000
#> GSM786579 2 0.2675 0.7927 0.008 0.892 0.100 0.000
#> GSM786491 1 0.3591 0.7124 0.824 0.008 0.000 0.168
#> GSM786509 4 0.3219 0.7862 0.164 0.000 0.000 0.836
#> GSM786538 1 0.3444 0.7009 0.816 0.000 0.000 0.184
#> GSM786548 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786562 4 0.4679 0.5462 0.352 0.000 0.000 0.648
#> GSM786566 4 0.4149 0.7279 0.152 0.036 0.000 0.812
#> GSM786573 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786574 2 0.1302 0.7982 0.044 0.956 0.000 0.000
#> GSM786580 1 0.3474 0.8078 0.868 0.064 0.000 0.068
#> GSM786581 2 0.0188 0.8007 0.004 0.996 0.000 0.000
#> GSM786583 3 0.1211 0.9342 0.040 0.000 0.960 0.000
#> GSM786492 4 0.2704 0.8089 0.124 0.000 0.000 0.876
#> GSM786493 2 0.0188 0.8007 0.004 0.996 0.000 0.000
#> GSM786499 4 0.3716 0.7401 0.096 0.052 0.000 0.852
#> GSM786502 4 0.1118 0.8035 0.036 0.000 0.000 0.964
#> GSM786537 1 0.3074 0.7742 0.848 0.152 0.000 0.000
#> GSM786567 2 0.1302 0.7982 0.044 0.956 0.000 0.000
#> GSM786498 4 0.2530 0.8131 0.112 0.000 0.000 0.888
#> GSM786500 4 0.2704 0.8089 0.124 0.000 0.000 0.876
#> GSM786503 4 0.4624 0.7079 0.164 0.052 0.000 0.784
#> GSM786507 4 0.3652 0.7423 0.092 0.052 0.000 0.856
#> GSM786515 2 0.0188 0.8007 0.004 0.996 0.000 0.000
#> GSM786522 1 0.4994 0.1236 0.520 0.480 0.000 0.000
#> GSM786526 1 0.3320 0.8068 0.876 0.056 0.000 0.068
#> GSM786528 1 0.3948 0.8013 0.828 0.136 0.000 0.036
#> GSM786531 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786535 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786543 1 0.3400 0.7060 0.820 0.000 0.000 0.180
#> GSM786545 3 0.1118 0.9361 0.036 0.000 0.964 0.000
#> GSM786551 2 0.4898 0.1933 0.416 0.584 0.000 0.000
#> GSM786552 3 0.5613 0.1543 0.028 0.380 0.592 0.000
#> GSM786554 2 0.0336 0.7998 0.008 0.992 0.000 0.000
#> GSM786557 4 0.2589 0.8120 0.116 0.000 0.000 0.884
#> GSM786560 4 0.2589 0.8120 0.116 0.000 0.000 0.884
#> GSM786564 2 0.3545 0.6820 0.164 0.828 0.000 0.008
#> GSM786568 2 0.1557 0.7971 0.056 0.944 0.000 0.000
#> GSM786569 4 0.2530 0.8131 0.112 0.000 0.000 0.888
#> GSM786571 2 0.5883 0.4013 0.040 0.572 0.388 0.000
#> GSM786496 2 0.2654 0.7885 0.004 0.888 0.108 0.000
#> GSM786506 4 0.1118 0.8033 0.036 0.000 0.000 0.964
#> GSM786508 4 0.2563 0.7629 0.072 0.020 0.000 0.908
#> GSM786512 4 0.7833 0.1715 0.260 0.364 0.000 0.376
#> GSM786518 4 0.2704 0.8089 0.124 0.000 0.000 0.876
#> GSM786519 4 0.1302 0.8046 0.044 0.000 0.000 0.956
#> GSM786524 1 0.2704 0.7924 0.876 0.124 0.000 0.000
#> GSM786529 3 0.1305 0.9334 0.036 0.004 0.960 0.000
#> GSM786530 1 0.5000 0.0405 0.500 0.500 0.000 0.000
#> GSM786532 1 0.2814 0.7928 0.868 0.132 0.000 0.000
#> GSM786533 2 0.2198 0.8034 0.008 0.920 0.072 0.000
#> GSM786544 2 0.5897 0.4336 0.044 0.588 0.368 0.000
#> GSM786547 2 0.1798 0.8062 0.016 0.944 0.040 0.000
#> GSM786549 3 0.1302 0.9319 0.044 0.000 0.956 0.000
#> GSM786550 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786563 3 0.0000 0.9502 0.000 0.000 1.000 0.000
#> GSM786570 2 0.2675 0.7936 0.008 0.892 0.100 0.000
#> GSM786576 2 0.7748 -0.0100 0.260 0.436 0.000 0.304
#> GSM786577 1 0.3024 0.7776 0.852 0.148 0.000 0.000
#> GSM786578 2 0.1118 0.8001 0.036 0.964 0.000 0.000
#> GSM786582 1 0.3404 0.7924 0.864 0.032 0.000 0.104
#> GSM786495 4 0.7397 0.1763 0.164 0.408 0.000 0.428
#> GSM786505 4 0.2530 0.8131 0.112 0.000 0.000 0.888
#> GSM786511 1 0.3404 0.7924 0.864 0.032 0.000 0.104
#> GSM786513 1 0.3015 0.7913 0.884 0.024 0.000 0.092
#> GSM786525 2 0.1211 0.7993 0.040 0.960 0.000 0.000
#> GSM786540 2 0.1211 0.7993 0.040 0.960 0.000 0.000
#> GSM786553 1 0.4054 0.7581 0.796 0.188 0.000 0.016
#> GSM786561 4 0.2704 0.8089 0.124 0.000 0.000 0.876
#> GSM786575 4 0.4679 0.5388 0.352 0.000 0.000 0.648
#> GSM786494 4 0.2530 0.8131 0.112 0.000 0.000 0.888
#> GSM786504 1 0.3312 0.8113 0.876 0.072 0.000 0.052
#> GSM786510 4 0.7397 0.1763 0.164 0.408 0.000 0.428
#> GSM786514 1 0.3404 0.7924 0.864 0.032 0.000 0.104
#> GSM786516 1 0.4981 0.1665 0.536 0.464 0.000 0.000
#> GSM786520 4 0.2530 0.8131 0.112 0.000 0.000 0.888
#> GSM786521 1 0.3474 0.8078 0.868 0.064 0.000 0.068
#> GSM786536 2 0.4605 0.4171 0.336 0.664 0.000 0.000
#> GSM786542 2 0.3862 0.7534 0.024 0.824 0.152 0.000
#> GSM786546 2 0.2216 0.7850 0.092 0.908 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.2574 0.824 0.012 0.876 0.000 0.000 0.112
#> GSM786539 5 0.4572 0.724 0.036 0.000 0.000 0.280 0.684
#> GSM786541 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786556 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786523 2 0.6985 0.474 0.048 0.544 0.220 0.000 0.188
#> GSM786497 4 0.0000 0.908 0.000 0.000 0.000 1.000 0.000
#> GSM786501 5 0.4108 0.711 0.008 0.000 0.000 0.308 0.684
#> GSM786517 5 0.4622 0.167 0.012 0.440 0.000 0.000 0.548
#> GSM786534 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786555 2 0.3535 0.789 0.000 0.832 0.088 0.000 0.080
#> GSM786558 2 0.3575 0.791 0.000 0.824 0.056 0.000 0.120
#> GSM786559 2 0.3163 0.771 0.012 0.824 0.000 0.000 0.164
#> GSM786565 2 0.3180 0.802 0.000 0.856 0.068 0.000 0.076
#> GSM786572 2 0.1205 0.834 0.000 0.956 0.004 0.000 0.040
#> GSM786579 2 0.1831 0.827 0.000 0.920 0.004 0.000 0.076
#> GSM786491 1 0.2193 0.843 0.912 0.000 0.000 0.060 0.028
#> GSM786509 4 0.1469 0.858 0.036 0.000 0.000 0.948 0.016
#> GSM786538 1 0.2193 0.843 0.912 0.000 0.000 0.060 0.028
#> GSM786548 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786562 4 0.4948 0.216 0.436 0.000 0.000 0.536 0.028
#> GSM786566 5 0.4572 0.722 0.036 0.000 0.000 0.280 0.684
#> GSM786573 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786574 2 0.2470 0.828 0.012 0.884 0.000 0.000 0.104
#> GSM786580 1 0.2227 0.851 0.916 0.004 0.000 0.048 0.032
#> GSM786581 2 0.1892 0.832 0.004 0.916 0.000 0.000 0.080
#> GSM786583 3 0.4479 0.803 0.016 0.080 0.780 0.000 0.124
#> GSM786492 4 0.0000 0.908 0.000 0.000 0.000 1.000 0.000
#> GSM786493 2 0.1892 0.832 0.004 0.916 0.000 0.000 0.080
#> GSM786499 5 0.4108 0.711 0.008 0.000 0.000 0.308 0.684
#> GSM786502 4 0.0609 0.894 0.000 0.000 0.000 0.980 0.020
#> GSM786537 1 0.2448 0.810 0.892 0.020 0.000 0.000 0.088
#> GSM786567 2 0.2470 0.828 0.012 0.884 0.000 0.000 0.104
#> GSM786498 4 0.0324 0.908 0.004 0.000 0.000 0.992 0.004
#> GSM786500 4 0.0000 0.908 0.000 0.000 0.000 1.000 0.000
#> GSM786503 5 0.4527 0.728 0.036 0.000 0.000 0.272 0.692
#> GSM786507 5 0.4108 0.711 0.008 0.000 0.000 0.308 0.684
#> GSM786515 2 0.1671 0.833 0.000 0.924 0.000 0.000 0.076
#> GSM786522 1 0.6154 0.231 0.508 0.348 0.000 0.000 0.144
#> GSM786526 1 0.0932 0.856 0.972 0.004 0.000 0.020 0.004
#> GSM786528 1 0.1299 0.853 0.960 0.008 0.000 0.012 0.020
#> GSM786531 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786535 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786543 1 0.1697 0.853 0.932 0.000 0.000 0.060 0.008
#> GSM786545 3 0.2005 0.896 0.016 0.004 0.924 0.000 0.056
#> GSM786551 2 0.6009 0.515 0.240 0.580 0.000 0.000 0.180
#> GSM786552 2 0.5365 0.599 0.000 0.656 0.228 0.000 0.116
#> GSM786554 2 0.1732 0.832 0.000 0.920 0.000 0.000 0.080
#> GSM786557 4 0.0324 0.908 0.004 0.000 0.000 0.992 0.004
#> GSM786560 4 0.0000 0.908 0.000 0.000 0.000 1.000 0.000
#> GSM786564 2 0.3390 0.795 0.060 0.840 0.000 0.000 0.100
#> GSM786568 2 0.2304 0.837 0.008 0.892 0.000 0.000 0.100
#> GSM786569 4 0.0324 0.908 0.004 0.000 0.000 0.992 0.004
#> GSM786571 2 0.4610 0.749 0.012 0.752 0.060 0.000 0.176
#> GSM786496 2 0.1831 0.836 0.000 0.920 0.004 0.000 0.076
#> GSM786506 4 0.0898 0.890 0.008 0.000 0.000 0.972 0.020
#> GSM786508 5 0.4375 0.534 0.004 0.000 0.000 0.420 0.576
#> GSM786512 5 0.4642 0.715 0.036 0.176 0.000 0.032 0.756
#> GSM786518 4 0.0000 0.908 0.000 0.000 0.000 1.000 0.000
#> GSM786519 4 0.0703 0.890 0.000 0.000 0.000 0.976 0.024
#> GSM786524 1 0.2017 0.821 0.912 0.008 0.000 0.000 0.080
#> GSM786529 3 0.4497 0.797 0.012 0.092 0.776 0.000 0.120
#> GSM786530 1 0.6122 0.228 0.512 0.348 0.000 0.000 0.140
#> GSM786532 1 0.1483 0.849 0.952 0.008 0.000 0.012 0.028
#> GSM786533 2 0.1124 0.841 0.000 0.960 0.004 0.000 0.036
#> GSM786544 2 0.5341 0.722 0.044 0.712 0.060 0.000 0.184
#> GSM786547 2 0.0794 0.842 0.000 0.972 0.000 0.000 0.028
#> GSM786549 3 0.5021 0.761 0.016 0.084 0.728 0.000 0.172
#> GSM786550 3 0.0162 0.931 0.000 0.000 0.996 0.000 0.004
#> GSM786563 3 0.0000 0.933 0.000 0.000 1.000 0.000 0.000
#> GSM786570 2 0.2077 0.824 0.000 0.908 0.008 0.000 0.084
#> GSM786576 5 0.4325 0.684 0.048 0.192 0.000 0.004 0.756
#> GSM786577 1 0.2448 0.810 0.892 0.020 0.000 0.000 0.088
#> GSM786578 2 0.1892 0.832 0.004 0.916 0.000 0.000 0.080
#> GSM786582 1 0.1662 0.856 0.936 0.004 0.000 0.056 0.004
#> GSM786495 5 0.4605 0.715 0.036 0.172 0.000 0.032 0.760
#> GSM786505 4 0.0324 0.908 0.004 0.000 0.000 0.992 0.004
#> GSM786511 1 0.1662 0.856 0.936 0.004 0.000 0.056 0.004
#> GSM786513 1 0.1788 0.855 0.932 0.004 0.000 0.056 0.008
#> GSM786525 2 0.2411 0.827 0.008 0.884 0.000 0.000 0.108
#> GSM786540 2 0.1892 0.832 0.004 0.916 0.000 0.000 0.080
#> GSM786553 1 0.1612 0.850 0.948 0.016 0.000 0.012 0.024
#> GSM786561 4 0.0000 0.908 0.000 0.000 0.000 1.000 0.000
#> GSM786575 4 0.4974 0.129 0.464 0.000 0.000 0.508 0.028
#> GSM786494 4 0.0324 0.908 0.004 0.000 0.000 0.992 0.004
#> GSM786504 1 0.0932 0.856 0.972 0.004 0.000 0.020 0.004
#> GSM786510 5 0.4682 0.718 0.036 0.172 0.000 0.036 0.756
#> GSM786514 1 0.1662 0.856 0.936 0.004 0.000 0.056 0.004
#> GSM786516 1 0.6091 0.264 0.524 0.336 0.000 0.000 0.140
#> GSM786520 4 0.0162 0.908 0.000 0.000 0.000 0.996 0.004
#> GSM786521 1 0.2227 0.851 0.916 0.004 0.000 0.048 0.032
#> GSM786536 2 0.4808 0.721 0.108 0.724 0.000 0.000 0.168
#> GSM786542 2 0.2707 0.808 0.000 0.860 0.008 0.000 0.132
#> GSM786546 2 0.4162 0.766 0.056 0.768 0.000 0.000 0.176
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.3486 0.63060 0.000 0.788 0.180 0.008 0.000 0.024
#> GSM786539 6 0.3172 0.87876 0.152 0.000 0.016 0.012 0.000 0.820
#> GSM786541 5 0.0000 0.95318 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786556 5 0.0000 0.95318 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786523 3 0.4536 0.60271 0.000 0.152 0.752 0.036 0.052 0.008
#> GSM786497 1 0.1398 0.96500 0.940 0.000 0.052 0.008 0.000 0.000
#> GSM786501 6 0.3073 0.88014 0.164 0.000 0.016 0.004 0.000 0.816
#> GSM786517 2 0.4172 0.56971 0.000 0.736 0.056 0.008 0.000 0.200
#> GSM786534 5 0.0000 0.95318 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786555 2 0.5046 0.58581 0.000 0.676 0.216 0.004 0.020 0.084
#> GSM786558 2 0.4949 0.56986 0.000 0.668 0.228 0.004 0.008 0.092
#> GSM786559 2 0.3051 0.68414 0.000 0.844 0.036 0.008 0.000 0.112
#> GSM786565 2 0.4600 0.63887 0.000 0.728 0.172 0.004 0.016 0.080
#> GSM786572 2 0.3726 0.68099 0.000 0.792 0.124 0.004 0.000 0.080
#> GSM786579 2 0.4102 0.65365 0.000 0.752 0.164 0.004 0.000 0.080
#> GSM786491 4 0.2984 0.79855 0.064 0.000 0.064 0.860 0.000 0.012
#> GSM786509 1 0.2507 0.92937 0.892 0.000 0.056 0.036 0.000 0.016
#> GSM786538 4 0.2925 0.80010 0.060 0.000 0.064 0.864 0.000 0.012
#> GSM786548 5 0.0146 0.95260 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM786562 4 0.5013 0.51526 0.320 0.000 0.064 0.604 0.000 0.012
#> GSM786566 6 0.3081 0.87988 0.152 0.000 0.012 0.012 0.000 0.824
#> GSM786573 5 0.0000 0.95318 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786574 2 0.2791 0.68741 0.000 0.852 0.124 0.008 0.000 0.016
#> GSM786580 4 0.3521 0.77884 0.024 0.000 0.116 0.820 0.000 0.040
#> GSM786581 2 0.0713 0.74281 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786583 3 0.4761 0.00984 0.000 0.008 0.492 0.000 0.468 0.032
#> GSM786492 1 0.1265 0.96797 0.948 0.000 0.044 0.008 0.000 0.000
#> GSM786493 2 0.0713 0.74281 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786499 6 0.3073 0.88014 0.164 0.000 0.016 0.004 0.000 0.816
#> GSM786502 1 0.1124 0.96838 0.956 0.000 0.036 0.000 0.000 0.008
#> GSM786537 4 0.4138 0.42518 0.000 0.012 0.368 0.616 0.000 0.004
#> GSM786567 2 0.2876 0.68524 0.000 0.844 0.132 0.008 0.000 0.016
#> GSM786498 1 0.0000 0.97146 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786500 1 0.0937 0.97007 0.960 0.000 0.040 0.000 0.000 0.000
#> GSM786503 6 0.3101 0.87892 0.104 0.036 0.004 0.008 0.000 0.848
#> GSM786507 6 0.3073 0.88014 0.164 0.000 0.016 0.004 0.000 0.816
#> GSM786515 2 0.1059 0.74280 0.000 0.964 0.016 0.004 0.000 0.016
#> GSM786522 3 0.5093 0.58150 0.000 0.176 0.632 0.192 0.000 0.000
#> GSM786526 4 0.0622 0.82527 0.008 0.000 0.012 0.980 0.000 0.000
#> GSM786528 4 0.1845 0.79959 0.000 0.008 0.072 0.916 0.000 0.004
#> GSM786531 5 0.0146 0.95260 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM786535 5 0.0146 0.95260 0.000 0.000 0.000 0.000 0.996 0.004
#> GSM786543 4 0.1334 0.82701 0.032 0.000 0.020 0.948 0.000 0.000
#> GSM786545 5 0.3871 0.43960 0.000 0.000 0.308 0.000 0.676 0.016
#> GSM786551 3 0.4570 0.61257 0.000 0.228 0.680 0.092 0.000 0.000
#> GSM786552 2 0.6686 -0.00652 0.000 0.424 0.384 0.004 0.096 0.092
#> GSM786554 2 0.0713 0.74281 0.000 0.972 0.000 0.000 0.000 0.028
#> GSM786557 1 0.0000 0.97146 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786560 1 0.0520 0.97109 0.984 0.000 0.008 0.008 0.000 0.000
#> GSM786564 2 0.3373 0.66842 0.000 0.816 0.140 0.012 0.000 0.032
#> GSM786568 2 0.2101 0.70145 0.000 0.892 0.100 0.004 0.000 0.004
#> GSM786569 1 0.0000 0.97146 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786571 3 0.5690 0.13916 0.000 0.380 0.508 0.004 0.016 0.092
#> GSM786496 2 0.4047 0.66183 0.000 0.760 0.152 0.004 0.000 0.084
#> GSM786506 1 0.0260 0.96765 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM786508 6 0.3448 0.74268 0.280 0.000 0.004 0.000 0.000 0.716
#> GSM786512 6 0.2600 0.83383 0.008 0.124 0.000 0.008 0.000 0.860
#> GSM786518 1 0.1265 0.96797 0.948 0.000 0.044 0.008 0.000 0.000
#> GSM786519 1 0.1850 0.95628 0.924 0.000 0.052 0.008 0.000 0.016
#> GSM786524 4 0.3383 0.60963 0.000 0.004 0.268 0.728 0.000 0.000
#> GSM786529 3 0.6135 0.18100 0.000 0.056 0.480 0.004 0.384 0.076
#> GSM786530 3 0.5416 0.53861 0.000 0.196 0.580 0.224 0.000 0.000
#> GSM786532 4 0.1908 0.78909 0.000 0.004 0.096 0.900 0.000 0.000
#> GSM786533 2 0.2364 0.72458 0.000 0.892 0.032 0.004 0.000 0.072
#> GSM786544 3 0.4753 0.45282 0.000 0.276 0.664 0.008 0.016 0.036
#> GSM786547 2 0.2750 0.71535 0.000 0.868 0.048 0.004 0.000 0.080
#> GSM786549 3 0.4705 0.31104 0.000 0.016 0.616 0.004 0.340 0.024
#> GSM786550 5 0.0767 0.94085 0.000 0.000 0.008 0.004 0.976 0.012
#> GSM786563 5 0.0000 0.95318 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786570 2 0.4777 0.59810 0.000 0.660 0.248 0.004 0.000 0.088
#> GSM786576 6 0.2876 0.82235 0.000 0.132 0.016 0.008 0.000 0.844
#> GSM786577 4 0.4004 0.42903 0.000 0.012 0.368 0.620 0.000 0.000
#> GSM786578 2 0.1262 0.73925 0.000 0.956 0.016 0.008 0.000 0.020
#> GSM786582 4 0.0713 0.83053 0.028 0.000 0.000 0.972 0.000 0.000
#> GSM786495 6 0.2952 0.83209 0.008 0.124 0.012 0.008 0.000 0.848
#> GSM786505 1 0.0000 0.97146 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786511 4 0.0713 0.83053 0.028 0.000 0.000 0.972 0.000 0.000
#> GSM786513 4 0.1074 0.83028 0.028 0.000 0.012 0.960 0.000 0.000
#> GSM786525 2 0.2921 0.65278 0.000 0.828 0.156 0.008 0.000 0.008
#> GSM786540 2 0.1230 0.73728 0.000 0.956 0.028 0.008 0.000 0.008
#> GSM786553 4 0.2579 0.77230 0.000 0.032 0.088 0.876 0.000 0.004
#> GSM786561 1 0.1265 0.96797 0.948 0.000 0.044 0.008 0.000 0.000
#> GSM786575 4 0.4998 0.52317 0.316 0.000 0.064 0.608 0.000 0.012
#> GSM786494 1 0.0000 0.97146 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786504 4 0.0725 0.82665 0.012 0.000 0.012 0.976 0.000 0.000
#> GSM786510 6 0.2600 0.83383 0.008 0.124 0.000 0.008 0.000 0.860
#> GSM786514 4 0.0713 0.83053 0.028 0.000 0.000 0.972 0.000 0.000
#> GSM786516 3 0.5473 0.52012 0.000 0.192 0.568 0.240 0.000 0.000
#> GSM786520 1 0.0000 0.97146 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786521 4 0.3521 0.77884 0.024 0.000 0.116 0.820 0.000 0.040
#> GSM786536 3 0.4606 0.58571 0.000 0.268 0.656 0.076 0.000 0.000
#> GSM786542 2 0.5123 0.17716 0.000 0.508 0.408 0.000 0.000 0.084
#> GSM786546 3 0.3998 0.49918 0.000 0.340 0.644 0.016 0.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 specimen(p) disease.state(p) k
#> ATC:kmeans 91 0.237 0.957 2
#> ATC:kmeans 80 0.179 0.410 3
#> ATC:kmeans 79 0.201 0.802 4
#> ATC:kmeans 86 0.426 0.920 5
#> ATC:kmeans 82 0.152 0.607 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 54547 rows and 93 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 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.960 0.984 0.5058 0.495 0.495
#> 3 3 0.834 0.770 0.887 0.2589 0.870 0.743
#> 4 4 0.724 0.803 0.882 0.1619 0.753 0.439
#> 5 5 0.713 0.710 0.843 0.0573 0.922 0.709
#> 6 6 0.777 0.703 0.834 0.0355 0.921 0.665
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
#> GSM786527 2 0.000 0.985 0.000 1.000
#> GSM786539 1 0.000 0.981 1.000 0.000
#> GSM786541 2 0.000 0.985 0.000 1.000
#> GSM786556 2 0.000 0.985 0.000 1.000
#> GSM786523 2 0.000 0.985 0.000 1.000
#> GSM786497 1 0.000 0.981 1.000 0.000
#> GSM786501 1 0.000 0.981 1.000 0.000
#> GSM786517 1 0.881 0.571 0.700 0.300
#> GSM786534 2 0.000 0.985 0.000 1.000
#> GSM786555 2 0.000 0.985 0.000 1.000
#> GSM786558 2 0.000 0.985 0.000 1.000
#> GSM786559 2 0.871 0.577 0.292 0.708
#> GSM786565 2 0.000 0.985 0.000 1.000
#> GSM786572 2 0.000 0.985 0.000 1.000
#> GSM786579 2 0.000 0.985 0.000 1.000
#> GSM786491 1 0.000 0.981 1.000 0.000
#> GSM786509 1 0.000 0.981 1.000 0.000
#> GSM786538 1 0.000 0.981 1.000 0.000
#> GSM786548 2 0.000 0.985 0.000 1.000
#> GSM786562 1 0.000 0.981 1.000 0.000
#> GSM786566 1 0.000 0.981 1.000 0.000
#> GSM786573 2 0.000 0.985 0.000 1.000
#> GSM786574 2 0.000 0.985 0.000 1.000
#> GSM786580 1 0.000 0.981 1.000 0.000
#> GSM786581 2 0.000 0.985 0.000 1.000
#> GSM786583 2 0.000 0.985 0.000 1.000
#> GSM786492 1 0.000 0.981 1.000 0.000
#> GSM786493 2 0.000 0.985 0.000 1.000
#> GSM786499 1 0.000 0.981 1.000 0.000
#> GSM786502 1 0.000 0.981 1.000 0.000
#> GSM786537 2 0.936 0.446 0.352 0.648
#> GSM786567 2 0.000 0.985 0.000 1.000
#> GSM786498 1 0.000 0.981 1.000 0.000
#> GSM786500 1 0.000 0.981 1.000 0.000
#> GSM786503 1 0.000 0.981 1.000 0.000
#> GSM786507 1 0.000 0.981 1.000 0.000
#> GSM786515 2 0.000 0.985 0.000 1.000
#> GSM786522 2 0.000 0.985 0.000 1.000
#> GSM786526 1 0.000 0.981 1.000 0.000
#> GSM786528 1 0.000 0.981 1.000 0.000
#> GSM786531 2 0.000 0.985 0.000 1.000
#> GSM786535 2 0.000 0.985 0.000 1.000
#> GSM786543 1 0.000 0.981 1.000 0.000
#> GSM786545 2 0.000 0.985 0.000 1.000
#> GSM786551 2 0.000 0.985 0.000 1.000
#> GSM786552 2 0.000 0.985 0.000 1.000
#> GSM786554 2 0.000 0.985 0.000 1.000
#> GSM786557 1 0.000 0.981 1.000 0.000
#> GSM786560 1 0.000 0.981 1.000 0.000
#> GSM786564 1 0.925 0.488 0.660 0.340
#> GSM786568 2 0.000 0.985 0.000 1.000
#> GSM786569 1 0.000 0.981 1.000 0.000
#> GSM786571 2 0.000 0.985 0.000 1.000
#> GSM786496 2 0.000 0.985 0.000 1.000
#> GSM786506 1 0.000 0.981 1.000 0.000
#> GSM786508 1 0.000 0.981 1.000 0.000
#> GSM786512 1 0.000 0.981 1.000 0.000
#> GSM786518 1 0.000 0.981 1.000 0.000
#> GSM786519 1 0.000 0.981 1.000 0.000
#> GSM786524 1 0.000 0.981 1.000 0.000
#> GSM786529 2 0.000 0.985 0.000 1.000
#> GSM786530 2 0.000 0.985 0.000 1.000
#> GSM786532 1 0.000 0.981 1.000 0.000
#> GSM786533 2 0.000 0.985 0.000 1.000
#> GSM786544 2 0.000 0.985 0.000 1.000
#> GSM786547 2 0.000 0.985 0.000 1.000
#> GSM786549 2 0.000 0.985 0.000 1.000
#> GSM786550 2 0.000 0.985 0.000 1.000
#> GSM786563 2 0.000 0.985 0.000 1.000
#> GSM786570 2 0.000 0.985 0.000 1.000
#> GSM786576 1 0.000 0.981 1.000 0.000
#> GSM786577 1 0.753 0.719 0.784 0.216
#> GSM786578 2 0.000 0.985 0.000 1.000
#> GSM786582 1 0.000 0.981 1.000 0.000
#> GSM786495 1 0.000 0.981 1.000 0.000
#> GSM786505 1 0.000 0.981 1.000 0.000
#> GSM786511 1 0.000 0.981 1.000 0.000
#> GSM786513 1 0.000 0.981 1.000 0.000
#> GSM786525 2 0.000 0.985 0.000 1.000
#> GSM786540 2 0.000 0.985 0.000 1.000
#> GSM786553 1 0.000 0.981 1.000 0.000
#> GSM786561 1 0.000 0.981 1.000 0.000
#> GSM786575 1 0.000 0.981 1.000 0.000
#> GSM786494 1 0.000 0.981 1.000 0.000
#> GSM786504 1 0.000 0.981 1.000 0.000
#> GSM786510 1 0.000 0.981 1.000 0.000
#> GSM786514 1 0.000 0.981 1.000 0.000
#> GSM786516 2 0.000 0.985 0.000 1.000
#> GSM786520 1 0.000 0.981 1.000 0.000
#> GSM786521 1 0.000 0.981 1.000 0.000
#> GSM786536 2 0.000 0.985 0.000 1.000
#> GSM786542 2 0.000 0.985 0.000 1.000
#> GSM786546 2 0.000 0.985 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 3 0.5591 0.643 0.000 0.304 0.696
#> GSM786539 2 0.6225 0.914 0.432 0.568 0.000
#> GSM786541 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786556 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786523 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786497 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786501 2 0.6168 0.932 0.412 0.588 0.000
#> GSM786517 2 0.6095 0.928 0.392 0.608 0.000
#> GSM786534 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786555 3 0.0892 0.966 0.000 0.020 0.980
#> GSM786558 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786559 2 0.6095 0.928 0.392 0.608 0.000
#> GSM786565 3 0.0892 0.966 0.000 0.020 0.980
#> GSM786572 3 0.0892 0.966 0.000 0.020 0.980
#> GSM786579 3 0.0892 0.966 0.000 0.020 0.980
#> GSM786491 1 0.6008 0.705 0.628 0.372 0.000
#> GSM786509 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786538 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786548 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786562 1 0.5810 0.697 0.664 0.336 0.000
#> GSM786566 2 0.6244 0.903 0.440 0.560 0.000
#> GSM786573 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786574 3 0.2448 0.932 0.000 0.076 0.924
#> GSM786580 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786581 3 0.1964 0.947 0.000 0.056 0.944
#> GSM786583 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786492 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786493 3 0.3340 0.892 0.000 0.120 0.880
#> GSM786499 2 0.6168 0.932 0.412 0.588 0.000
#> GSM786502 1 0.6252 -0.696 0.556 0.444 0.000
#> GSM786537 1 0.6896 0.693 0.588 0.392 0.020
#> GSM786567 3 0.4842 0.769 0.000 0.224 0.776
#> GSM786498 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786500 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786503 1 0.6244 -0.687 0.560 0.440 0.000
#> GSM786507 2 0.6168 0.932 0.412 0.588 0.000
#> GSM786515 3 0.1529 0.957 0.000 0.040 0.960
#> GSM786522 3 0.0892 0.960 0.000 0.020 0.980
#> GSM786526 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786528 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786531 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786535 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786543 1 0.4555 0.654 0.800 0.200 0.000
#> GSM786545 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786551 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786552 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786554 3 0.3816 0.863 0.000 0.148 0.852
#> GSM786557 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786564 2 0.1964 0.398 0.056 0.944 0.000
#> GSM786568 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786569 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786571 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786496 3 0.1411 0.959 0.000 0.036 0.964
#> GSM786506 1 0.6235 -0.679 0.564 0.436 0.000
#> GSM786508 2 0.6225 0.914 0.432 0.568 0.000
#> GSM786512 2 0.6168 0.932 0.412 0.588 0.000
#> GSM786518 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786519 1 0.5650 -0.361 0.688 0.312 0.000
#> GSM786524 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786529 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786530 3 0.1643 0.942 0.000 0.044 0.956
#> GSM786532 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786533 3 0.0747 0.968 0.000 0.016 0.984
#> GSM786544 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786547 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786549 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786550 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786563 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786570 3 0.0892 0.966 0.000 0.020 0.980
#> GSM786576 2 0.6095 0.928 0.392 0.608 0.000
#> GSM786577 1 0.6896 0.693 0.588 0.392 0.020
#> GSM786578 3 0.1643 0.955 0.000 0.044 0.956
#> GSM786582 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786495 2 0.6095 0.928 0.392 0.608 0.000
#> GSM786505 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786511 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786513 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786525 3 0.1289 0.961 0.000 0.032 0.968
#> GSM786540 3 0.1289 0.961 0.000 0.032 0.968
#> GSM786553 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786561 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786575 1 0.5926 0.702 0.644 0.356 0.000
#> GSM786494 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786504 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786510 2 0.6095 0.928 0.392 0.608 0.000
#> GSM786514 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786516 3 0.1643 0.942 0.000 0.044 0.956
#> GSM786520 1 0.0000 0.567 1.000 0.000 0.000
#> GSM786521 1 0.6095 0.708 0.608 0.392 0.000
#> GSM786536 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786542 3 0.0000 0.971 0.000 0.000 1.000
#> GSM786546 3 0.0000 0.971 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 2 0.2489 0.8098 0.000 0.912 0.020 0.068
#> GSM786539 4 0.0188 0.7687 0.004 0.000 0.000 0.996
#> GSM786541 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786556 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786523 3 0.0000 0.9165 0.000 0.000 1.000 0.000
#> GSM786497 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786501 4 0.1022 0.7568 0.000 0.032 0.000 0.968
#> GSM786517 2 0.2469 0.7672 0.000 0.892 0.000 0.108
#> GSM786534 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786555 2 0.4967 0.2601 0.000 0.548 0.452 0.000
#> GSM786558 2 0.5000 0.0976 0.000 0.500 0.500 0.000
#> GSM786559 2 0.2469 0.7672 0.000 0.892 0.000 0.108
#> GSM786565 2 0.2469 0.8237 0.000 0.892 0.108 0.000
#> GSM786572 2 0.1637 0.8452 0.000 0.940 0.060 0.000
#> GSM786579 2 0.1867 0.8421 0.000 0.928 0.072 0.000
#> GSM786491 1 0.2081 0.8547 0.916 0.000 0.000 0.084
#> GSM786509 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786538 1 0.0817 0.9005 0.976 0.000 0.000 0.024
#> GSM786548 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786562 1 0.4730 0.2009 0.636 0.000 0.000 0.364
#> GSM786566 4 0.0000 0.7674 0.000 0.000 0.000 1.000
#> GSM786573 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786574 2 0.1118 0.8474 0.000 0.964 0.036 0.000
#> GSM786580 1 0.1118 0.8956 0.964 0.000 0.000 0.036
#> GSM786581 2 0.1118 0.8475 0.000 0.964 0.036 0.000
#> GSM786583 3 0.0707 0.9236 0.000 0.020 0.980 0.000
#> GSM786492 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786493 2 0.0707 0.8424 0.000 0.980 0.020 0.000
#> GSM786499 4 0.1022 0.7568 0.000 0.032 0.000 0.968
#> GSM786502 4 0.2281 0.7803 0.096 0.000 0.000 0.904
#> GSM786537 1 0.2530 0.8210 0.888 0.000 0.112 0.000
#> GSM786567 2 0.3545 0.7695 0.000 0.828 0.164 0.008
#> GSM786498 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786500 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786503 4 0.1557 0.7777 0.056 0.000 0.000 0.944
#> GSM786507 4 0.0921 0.7585 0.000 0.028 0.000 0.972
#> GSM786515 2 0.1302 0.8477 0.000 0.956 0.044 0.000
#> GSM786522 3 0.1022 0.8921 0.032 0.000 0.968 0.000
#> GSM786526 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786528 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786531 3 0.1716 0.9310 0.000 0.064 0.936 0.000
#> GSM786535 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786543 1 0.3873 0.6062 0.772 0.000 0.000 0.228
#> GSM786545 3 0.0000 0.9165 0.000 0.000 1.000 0.000
#> GSM786551 3 0.0000 0.9165 0.000 0.000 1.000 0.000
#> GSM786552 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786554 2 0.0921 0.8456 0.000 0.972 0.028 0.000
#> GSM786557 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786560 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786564 2 0.2408 0.7692 0.000 0.896 0.000 0.104
#> GSM786568 2 0.3024 0.7961 0.000 0.852 0.148 0.000
#> GSM786569 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786571 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786496 2 0.1389 0.8475 0.000 0.952 0.048 0.000
#> GSM786506 4 0.2345 0.7802 0.100 0.000 0.000 0.900
#> GSM786508 4 0.0000 0.7674 0.000 0.000 0.000 1.000
#> GSM786512 4 0.1022 0.7568 0.000 0.032 0.000 0.968
#> GSM786518 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786519 4 0.2408 0.7799 0.104 0.000 0.000 0.896
#> GSM786524 1 0.2345 0.8334 0.900 0.000 0.100 0.000
#> GSM786529 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786530 3 0.1557 0.8733 0.056 0.000 0.944 0.000
#> GSM786532 1 0.1022 0.8886 0.968 0.000 0.032 0.000
#> GSM786533 3 0.2408 0.9295 0.000 0.104 0.896 0.000
#> GSM786544 3 0.0707 0.9236 0.000 0.020 0.980 0.000
#> GSM786547 2 0.2647 0.8147 0.000 0.880 0.120 0.000
#> GSM786549 3 0.0000 0.9165 0.000 0.000 1.000 0.000
#> GSM786550 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786563 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786570 2 0.4972 0.2477 0.000 0.544 0.456 0.000
#> GSM786576 4 0.2704 0.6821 0.000 0.124 0.000 0.876
#> GSM786577 1 0.2345 0.8334 0.900 0.000 0.100 0.000
#> GSM786578 2 0.1118 0.8470 0.000 0.964 0.036 0.000
#> GSM786582 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786495 4 0.1474 0.7443 0.000 0.052 0.000 0.948
#> GSM786505 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786511 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786513 1 0.1389 0.8876 0.952 0.000 0.000 0.048
#> GSM786525 2 0.4977 0.2052 0.000 0.540 0.460 0.000
#> GSM786540 2 0.1389 0.8478 0.000 0.952 0.048 0.000
#> GSM786553 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786561 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786575 1 0.2408 0.8333 0.896 0.000 0.000 0.104
#> GSM786494 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786504 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786510 4 0.1389 0.7470 0.000 0.048 0.000 0.952
#> GSM786514 1 0.0000 0.9070 1.000 0.000 0.000 0.000
#> GSM786516 3 0.1716 0.8647 0.064 0.000 0.936 0.000
#> GSM786520 4 0.4522 0.7404 0.320 0.000 0.000 0.680
#> GSM786521 1 0.1118 0.8956 0.964 0.000 0.000 0.036
#> GSM786536 3 0.0000 0.9165 0.000 0.000 1.000 0.000
#> GSM786542 3 0.2345 0.9333 0.000 0.100 0.900 0.000
#> GSM786546 3 0.0000 0.9165 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.4590 0.518 0.016 0.696 0.016 0.000 0.272
#> GSM786539 4 0.3336 0.569 0.000 0.000 0.000 0.772 0.228
#> GSM786541 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786556 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786523 3 0.1836 0.812 0.036 0.000 0.932 0.000 0.032
#> GSM786497 4 0.0162 0.829 0.004 0.000 0.000 0.996 0.000
#> GSM786501 5 0.3395 0.836 0.000 0.000 0.000 0.236 0.764
#> GSM786517 5 0.3949 0.403 0.000 0.332 0.000 0.000 0.668
#> GSM786534 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786555 2 0.3966 0.545 0.000 0.664 0.336 0.000 0.000
#> GSM786558 2 0.4161 0.436 0.000 0.608 0.392 0.000 0.000
#> GSM786559 5 0.3913 0.449 0.000 0.324 0.000 0.000 0.676
#> GSM786565 2 0.1851 0.812 0.000 0.912 0.088 0.000 0.000
#> GSM786572 2 0.1270 0.818 0.000 0.948 0.052 0.000 0.000
#> GSM786579 2 0.1341 0.818 0.000 0.944 0.056 0.000 0.000
#> GSM786491 4 0.4307 -0.245 0.496 0.000 0.000 0.504 0.000
#> GSM786509 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786538 1 0.3999 0.575 0.656 0.000 0.000 0.344 0.000
#> GSM786548 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786562 4 0.3837 0.374 0.308 0.000 0.000 0.692 0.000
#> GSM786566 4 0.4126 0.197 0.000 0.000 0.000 0.620 0.380
#> GSM786573 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786574 2 0.1571 0.787 0.000 0.936 0.004 0.000 0.060
#> GSM786580 1 0.4009 0.619 0.684 0.004 0.000 0.312 0.000
#> GSM786581 2 0.0794 0.815 0.000 0.972 0.028 0.000 0.000
#> GSM786583 3 0.1757 0.858 0.012 0.048 0.936 0.000 0.004
#> GSM786492 4 0.0162 0.829 0.004 0.000 0.000 0.996 0.000
#> GSM786493 2 0.1117 0.804 0.000 0.964 0.020 0.000 0.016
#> GSM786499 5 0.3395 0.836 0.000 0.000 0.000 0.236 0.764
#> GSM786502 4 0.1608 0.776 0.000 0.000 0.000 0.928 0.072
#> GSM786537 1 0.4657 0.626 0.740 0.000 0.108 0.000 0.152
#> GSM786567 2 0.3912 0.756 0.000 0.804 0.108 0.000 0.088
#> GSM786498 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786500 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786503 4 0.3999 0.309 0.000 0.000 0.000 0.656 0.344
#> GSM786507 5 0.3424 0.831 0.000 0.000 0.000 0.240 0.760
#> GSM786515 2 0.0880 0.816 0.000 0.968 0.032 0.000 0.000
#> GSM786522 3 0.4025 0.697 0.132 0.000 0.792 0.000 0.076
#> GSM786526 1 0.1478 0.802 0.936 0.000 0.000 0.064 0.000
#> GSM786528 1 0.1341 0.800 0.944 0.000 0.000 0.056 0.000
#> GSM786531 3 0.1544 0.865 0.000 0.068 0.932 0.000 0.000
#> GSM786535 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786543 4 0.2248 0.759 0.088 0.000 0.000 0.900 0.012
#> GSM786545 3 0.0981 0.844 0.012 0.008 0.972 0.000 0.008
#> GSM786551 3 0.1913 0.826 0.044 0.008 0.932 0.000 0.016
#> GSM786552 3 0.2179 0.866 0.000 0.112 0.888 0.000 0.000
#> GSM786554 2 0.1082 0.813 0.000 0.964 0.028 0.000 0.008
#> GSM786557 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786560 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786564 2 0.4767 0.194 0.020 0.560 0.000 0.000 0.420
#> GSM786568 2 0.2674 0.783 0.004 0.856 0.140 0.000 0.000
#> GSM786569 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786571 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786496 2 0.1043 0.818 0.000 0.960 0.040 0.000 0.000
#> GSM786506 4 0.1544 0.780 0.000 0.000 0.000 0.932 0.068
#> GSM786508 4 0.4305 -0.216 0.000 0.000 0.000 0.512 0.488
#> GSM786512 5 0.3395 0.836 0.000 0.000 0.000 0.236 0.764
#> GSM786518 4 0.0162 0.829 0.004 0.000 0.000 0.996 0.000
#> GSM786519 4 0.1410 0.787 0.000 0.000 0.000 0.940 0.060
#> GSM786524 1 0.4559 0.632 0.748 0.000 0.100 0.000 0.152
#> GSM786529 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786530 3 0.6186 0.244 0.336 0.000 0.512 0.000 0.152
#> GSM786532 1 0.0798 0.774 0.976 0.000 0.000 0.016 0.008
#> GSM786533 3 0.2179 0.866 0.000 0.112 0.888 0.000 0.000
#> GSM786544 3 0.1200 0.847 0.012 0.016 0.964 0.000 0.008
#> GSM786547 2 0.2471 0.786 0.000 0.864 0.136 0.000 0.000
#> GSM786549 3 0.0981 0.844 0.012 0.008 0.972 0.000 0.008
#> GSM786550 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786563 3 0.2127 0.869 0.000 0.108 0.892 0.000 0.000
#> GSM786570 2 0.4227 0.339 0.000 0.580 0.420 0.000 0.000
#> GSM786576 5 0.3835 0.800 0.000 0.048 0.000 0.156 0.796
#> GSM786577 1 0.4657 0.626 0.740 0.000 0.108 0.000 0.152
#> GSM786578 2 0.0579 0.806 0.000 0.984 0.008 0.000 0.008
#> GSM786582 1 0.2513 0.805 0.876 0.000 0.000 0.116 0.008
#> GSM786495 5 0.3491 0.837 0.000 0.004 0.000 0.228 0.768
#> GSM786505 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786511 1 0.2522 0.806 0.880 0.000 0.000 0.108 0.012
#> GSM786513 1 0.4278 0.326 0.548 0.000 0.000 0.452 0.000
#> GSM786525 2 0.4045 0.462 0.000 0.644 0.356 0.000 0.000
#> GSM786540 2 0.1399 0.813 0.000 0.952 0.028 0.000 0.020
#> GSM786553 1 0.2017 0.805 0.912 0.000 0.000 0.080 0.008
#> GSM786561 4 0.0162 0.829 0.004 0.000 0.000 0.996 0.000
#> GSM786575 4 0.3876 0.353 0.316 0.000 0.000 0.684 0.000
#> GSM786494 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786504 1 0.1851 0.806 0.912 0.000 0.000 0.088 0.000
#> GSM786510 5 0.3521 0.837 0.000 0.004 0.000 0.232 0.764
#> GSM786514 1 0.2624 0.805 0.872 0.000 0.000 0.116 0.012
#> GSM786516 3 0.6206 0.222 0.344 0.000 0.504 0.000 0.152
#> GSM786520 4 0.0000 0.830 0.000 0.000 0.000 1.000 0.000
#> GSM786521 1 0.4009 0.619 0.684 0.004 0.000 0.312 0.000
#> GSM786536 3 0.2450 0.791 0.052 0.000 0.900 0.000 0.048
#> GSM786542 3 0.2280 0.859 0.000 0.120 0.880 0.000 0.000
#> GSM786546 3 0.1413 0.841 0.020 0.012 0.956 0.000 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 4 0.7195 -0.0104 0.000 0.308 0.004 0.376 0.076 0.236
#> GSM786539 1 0.2597 0.7440 0.824 0.000 0.000 0.000 0.000 0.176
#> GSM786541 3 0.0458 0.8652 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM786556 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786523 3 0.2631 0.7661 0.000 0.000 0.820 0.180 0.000 0.000
#> GSM786497 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786501 6 0.1556 0.8633 0.080 0.000 0.000 0.000 0.000 0.920
#> GSM786517 6 0.5024 0.4659 0.000 0.164 0.000 0.140 0.016 0.680
#> GSM786534 3 0.0458 0.8652 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM786555 2 0.4051 0.4177 0.000 0.560 0.432 0.008 0.000 0.000
#> GSM786558 2 0.4089 0.3297 0.000 0.524 0.468 0.008 0.000 0.000
#> GSM786559 6 0.3861 0.6031 0.000 0.220 0.000 0.028 0.008 0.744
#> GSM786565 2 0.2378 0.8027 0.000 0.848 0.152 0.000 0.000 0.000
#> GSM786572 2 0.1957 0.8111 0.000 0.888 0.112 0.000 0.000 0.000
#> GSM786579 2 0.2340 0.8050 0.000 0.852 0.148 0.000 0.000 0.000
#> GSM786491 5 0.3765 0.5565 0.404 0.000 0.000 0.000 0.596 0.000
#> GSM786509 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786538 5 0.3266 0.6643 0.272 0.000 0.000 0.000 0.728 0.000
#> GSM786548 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786562 5 0.3860 0.4214 0.472 0.000 0.000 0.000 0.528 0.000
#> GSM786566 1 0.3833 0.1329 0.556 0.000 0.000 0.000 0.000 0.444
#> GSM786573 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786574 2 0.4681 0.5405 0.000 0.708 0.008 0.208 0.012 0.064
#> GSM786580 5 0.3847 0.6455 0.080 0.004 0.000 0.136 0.780 0.000
#> GSM786581 2 0.1765 0.8110 0.000 0.904 0.096 0.000 0.000 0.000
#> GSM786583 3 0.1075 0.8508 0.000 0.000 0.952 0.048 0.000 0.000
#> GSM786492 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786493 2 0.1493 0.7901 0.000 0.936 0.056 0.000 0.004 0.004
#> GSM786499 6 0.1556 0.8633 0.080 0.000 0.000 0.000 0.000 0.920
#> GSM786502 1 0.0865 0.9002 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM786537 4 0.3881 0.4686 0.000 0.000 0.004 0.600 0.396 0.000
#> GSM786567 2 0.6153 0.3833 0.000 0.556 0.064 0.292 0.008 0.080
#> GSM786498 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786500 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786503 1 0.3797 0.2078 0.580 0.000 0.000 0.000 0.000 0.420
#> GSM786507 6 0.1556 0.8633 0.080 0.000 0.000 0.000 0.000 0.920
#> GSM786515 2 0.1814 0.8114 0.000 0.900 0.100 0.000 0.000 0.000
#> GSM786522 3 0.4675 0.4024 0.000 0.000 0.580 0.368 0.052 0.000
#> GSM786526 5 0.1049 0.6833 0.032 0.000 0.000 0.008 0.960 0.000
#> GSM786528 5 0.1167 0.6690 0.020 0.000 0.000 0.012 0.960 0.008
#> GSM786531 3 0.0547 0.8607 0.000 0.000 0.980 0.020 0.000 0.000
#> GSM786535 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786543 1 0.1723 0.8566 0.928 0.000 0.000 0.036 0.036 0.000
#> GSM786545 3 0.1957 0.8150 0.000 0.000 0.888 0.112 0.000 0.000
#> GSM786551 3 0.2340 0.7941 0.000 0.000 0.852 0.148 0.000 0.000
#> GSM786552 3 0.0458 0.8652 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM786554 2 0.1753 0.8071 0.000 0.912 0.084 0.000 0.000 0.004
#> GSM786557 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786560 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786564 4 0.7117 0.0159 0.000 0.300 0.000 0.344 0.072 0.284
#> GSM786568 2 0.3566 0.7672 0.000 0.788 0.156 0.056 0.000 0.000
#> GSM786569 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786571 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786496 2 0.1863 0.8117 0.000 0.896 0.104 0.000 0.000 0.000
#> GSM786506 1 0.0865 0.9000 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM786508 6 0.3607 0.4739 0.348 0.000 0.000 0.000 0.000 0.652
#> GSM786512 6 0.1556 0.8633 0.080 0.000 0.000 0.000 0.000 0.920
#> GSM786518 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786519 1 0.0458 0.9132 0.984 0.000 0.000 0.000 0.000 0.016
#> GSM786524 4 0.3810 0.4285 0.000 0.000 0.000 0.572 0.428 0.000
#> GSM786529 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786530 4 0.5203 0.5108 0.000 0.000 0.180 0.632 0.184 0.004
#> GSM786532 5 0.1116 0.6469 0.004 0.000 0.000 0.028 0.960 0.008
#> GSM786533 3 0.1327 0.8319 0.000 0.064 0.936 0.000 0.000 0.000
#> GSM786544 3 0.1765 0.8270 0.000 0.000 0.904 0.096 0.000 0.000
#> GSM786547 2 0.2300 0.7990 0.000 0.856 0.144 0.000 0.000 0.000
#> GSM786549 3 0.1910 0.8180 0.000 0.000 0.892 0.108 0.000 0.000
#> GSM786550 3 0.0260 0.8675 0.000 0.008 0.992 0.000 0.000 0.000
#> GSM786563 3 0.0458 0.8652 0.000 0.016 0.984 0.000 0.000 0.000
#> GSM786570 3 0.5414 -0.1846 0.000 0.420 0.476 0.100 0.004 0.000
#> GSM786576 6 0.1851 0.8336 0.056 0.004 0.000 0.004 0.012 0.924
#> GSM786577 4 0.3881 0.4686 0.000 0.000 0.004 0.600 0.396 0.000
#> GSM786578 2 0.2462 0.7313 0.000 0.892 0.032 0.064 0.012 0.000
#> GSM786582 5 0.2897 0.6823 0.088 0.000 0.000 0.060 0.852 0.000
#> GSM786495 6 0.1556 0.8633 0.080 0.000 0.000 0.000 0.000 0.920
#> GSM786505 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786511 5 0.3612 0.6328 0.100 0.000 0.000 0.104 0.796 0.000
#> GSM786513 5 0.3647 0.6127 0.360 0.000 0.000 0.000 0.640 0.000
#> GSM786525 3 0.6274 -0.1724 0.000 0.412 0.440 0.100 0.040 0.008
#> GSM786540 2 0.4801 0.6802 0.000 0.744 0.092 0.120 0.016 0.028
#> GSM786553 5 0.1901 0.6856 0.040 0.000 0.000 0.028 0.924 0.008
#> GSM786561 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786575 5 0.3868 0.3733 0.492 0.000 0.000 0.000 0.508 0.000
#> GSM786494 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786504 5 0.1549 0.6866 0.044 0.000 0.000 0.020 0.936 0.000
#> GSM786510 6 0.1556 0.8633 0.080 0.000 0.000 0.000 0.000 0.920
#> GSM786514 5 0.2985 0.6889 0.100 0.000 0.000 0.056 0.844 0.000
#> GSM786516 4 0.5120 0.5034 0.000 0.000 0.196 0.628 0.176 0.000
#> GSM786520 1 0.0000 0.9228 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786521 5 0.3847 0.6455 0.080 0.004 0.000 0.136 0.780 0.000
#> GSM786536 3 0.3468 0.6416 0.000 0.000 0.712 0.284 0.004 0.000
#> GSM786542 3 0.0692 0.8615 0.000 0.020 0.976 0.004 0.000 0.000
#> GSM786546 3 0.2692 0.7913 0.000 0.000 0.840 0.148 0.012 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 specimen(p) disease.state(p) k
#> ATC:skmeans 91 0.1817 1.000 2
#> ATC:skmeans 88 0.1652 0.882 3
#> ATC:skmeans 88 0.0807 0.807 4
#> ATC:skmeans 78 0.4678 0.753 5
#> ATC:skmeans 76 0.4451 0.670 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 54547 rows and 93 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 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.753 0.874 0.944 0.5007 0.495 0.495
#> 3 3 0.765 0.855 0.942 0.1935 0.888 0.778
#> 4 4 0.793 0.820 0.915 0.1605 0.869 0.689
#> 5 5 0.754 0.804 0.876 0.1133 0.888 0.659
#> 6 6 0.886 0.830 0.934 0.0624 0.928 0.702
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
#> GSM786527 2 0.000 0.969 0.000 1.000
#> GSM786539 1 0.000 0.907 1.000 0.000
#> GSM786541 2 0.000 0.969 0.000 1.000
#> GSM786556 2 0.000 0.969 0.000 1.000
#> GSM786523 2 0.000 0.969 0.000 1.000
#> GSM786497 1 0.000 0.907 1.000 0.000
#> GSM786501 1 0.000 0.907 1.000 0.000
#> GSM786517 2 0.163 0.946 0.024 0.976
#> GSM786534 2 0.000 0.969 0.000 1.000
#> GSM786555 2 0.000 0.969 0.000 1.000
#> GSM786558 2 0.000 0.969 0.000 1.000
#> GSM786559 2 0.163 0.946 0.024 0.976
#> GSM786565 2 0.000 0.969 0.000 1.000
#> GSM786572 2 0.000 0.969 0.000 1.000
#> GSM786579 2 0.000 0.969 0.000 1.000
#> GSM786491 1 0.000 0.907 1.000 0.000
#> GSM786509 1 0.000 0.907 1.000 0.000
#> GSM786538 1 0.000 0.907 1.000 0.000
#> GSM786548 2 0.000 0.969 0.000 1.000
#> GSM786562 1 0.000 0.907 1.000 0.000
#> GSM786566 1 0.000 0.907 1.000 0.000
#> GSM786573 2 0.000 0.969 0.000 1.000
#> GSM786574 2 0.000 0.969 0.000 1.000
#> GSM786580 1 0.680 0.790 0.820 0.180
#> GSM786581 2 0.000 0.969 0.000 1.000
#> GSM786583 2 0.000 0.969 0.000 1.000
#> GSM786492 1 0.000 0.907 1.000 0.000
#> GSM786493 2 0.000 0.969 0.000 1.000
#> GSM786499 1 0.000 0.907 1.000 0.000
#> GSM786502 1 0.000 0.907 1.000 0.000
#> GSM786537 1 0.952 0.506 0.628 0.372
#> GSM786567 2 0.000 0.969 0.000 1.000
#> GSM786498 1 0.000 0.907 1.000 0.000
#> GSM786500 1 0.000 0.907 1.000 0.000
#> GSM786503 1 0.000 0.907 1.000 0.000
#> GSM786507 1 0.000 0.907 1.000 0.000
#> GSM786515 2 0.000 0.969 0.000 1.000
#> GSM786522 1 1.000 0.175 0.500 0.500
#> GSM786526 1 0.680 0.790 0.820 0.180
#> GSM786528 1 0.689 0.786 0.816 0.184
#> GSM786531 2 0.000 0.969 0.000 1.000
#> GSM786535 2 0.000 0.969 0.000 1.000
#> GSM786543 1 0.000 0.907 1.000 0.000
#> GSM786545 2 0.000 0.969 0.000 1.000
#> GSM786551 2 0.000 0.969 0.000 1.000
#> GSM786552 2 0.000 0.969 0.000 1.000
#> GSM786554 2 0.000 0.969 0.000 1.000
#> GSM786557 1 0.000 0.907 1.000 0.000
#> GSM786560 1 0.000 0.907 1.000 0.000
#> GSM786564 2 0.163 0.946 0.024 0.976
#> GSM786568 2 0.000 0.969 0.000 1.000
#> GSM786569 1 0.000 0.907 1.000 0.000
#> GSM786571 2 0.000 0.969 0.000 1.000
#> GSM786496 2 0.000 0.969 0.000 1.000
#> GSM786506 1 0.000 0.907 1.000 0.000
#> GSM786508 1 0.000 0.907 1.000 0.000
#> GSM786512 1 0.904 0.504 0.680 0.320
#> GSM786518 1 0.000 0.907 1.000 0.000
#> GSM786519 1 0.000 0.907 1.000 0.000
#> GSM786524 1 0.753 0.750 0.784 0.216
#> GSM786529 2 0.000 0.969 0.000 1.000
#> GSM786530 1 0.975 0.432 0.592 0.408
#> GSM786532 1 0.936 0.544 0.648 0.352
#> GSM786533 2 0.000 0.969 0.000 1.000
#> GSM786544 2 0.000 0.969 0.000 1.000
#> GSM786547 2 0.000 0.969 0.000 1.000
#> GSM786549 2 0.000 0.969 0.000 1.000
#> GSM786550 2 0.000 0.969 0.000 1.000
#> GSM786563 2 0.000 0.969 0.000 1.000
#> GSM786570 2 0.000 0.969 0.000 1.000
#> GSM786576 2 0.969 0.344 0.396 0.604
#> GSM786577 1 0.680 0.790 0.820 0.180
#> GSM786578 2 0.000 0.969 0.000 1.000
#> GSM786582 1 0.000 0.907 1.000 0.000
#> GSM786495 2 0.973 0.323 0.404 0.596
#> GSM786505 1 0.000 0.907 1.000 0.000
#> GSM786511 1 0.000 0.907 1.000 0.000
#> GSM786513 1 0.000 0.907 1.000 0.000
#> GSM786525 2 0.000 0.969 0.000 1.000
#> GSM786540 2 0.000 0.969 0.000 1.000
#> GSM786553 1 0.689 0.786 0.816 0.184
#> GSM786561 1 0.000 0.907 1.000 0.000
#> GSM786575 1 0.000 0.907 1.000 0.000
#> GSM786494 1 0.000 0.907 1.000 0.000
#> GSM786504 1 0.680 0.790 0.820 0.180
#> GSM786510 2 0.971 0.334 0.400 0.600
#> GSM786514 1 0.000 0.907 1.000 0.000
#> GSM786516 1 0.997 0.277 0.532 0.468
#> GSM786520 1 0.000 0.907 1.000 0.000
#> GSM786521 1 0.680 0.790 0.820 0.180
#> GSM786536 2 0.000 0.969 0.000 1.000
#> GSM786542 2 0.000 0.969 0.000 1.000
#> GSM786546 2 0.000 0.969 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786539 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786541 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786556 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786523 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786497 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786501 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786517 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786534 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786555 2 0.0237 0.947 0.000 0.996 0.004
#> GSM786558 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786559 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786565 3 0.6291 0.127 0.000 0.468 0.532
#> GSM786572 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786579 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786491 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786538 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786548 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786562 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786566 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786573 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786574 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786580 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786581 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786583 2 0.5760 0.428 0.000 0.672 0.328
#> GSM786492 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786493 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786499 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786502 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786537 1 0.4555 0.774 0.800 0.200 0.000
#> GSM786567 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786498 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786500 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786503 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786507 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786515 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786522 2 0.6309 -0.182 0.496 0.504 0.000
#> GSM786526 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786528 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786531 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786535 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786543 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786545 3 0.3879 0.790 0.000 0.152 0.848
#> GSM786551 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786552 2 0.2165 0.883 0.000 0.936 0.064
#> GSM786554 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786557 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786560 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786564 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786568 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786569 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786571 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786496 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786506 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786508 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786512 1 0.6309 0.112 0.504 0.496 0.000
#> GSM786518 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786519 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786524 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786529 2 0.0237 0.947 0.000 0.996 0.004
#> GSM786530 1 0.6204 0.389 0.576 0.424 0.000
#> GSM786532 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786533 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786544 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786547 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786549 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786550 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786563 3 0.0000 0.935 0.000 0.000 1.000
#> GSM786570 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786576 2 0.1163 0.922 0.028 0.972 0.000
#> GSM786577 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786578 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786582 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786495 2 0.5363 0.573 0.276 0.724 0.000
#> GSM786505 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786511 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786513 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786525 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786540 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786553 1 0.5882 0.558 0.652 0.348 0.000
#> GSM786561 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786575 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786494 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786504 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786510 2 0.3879 0.766 0.152 0.848 0.000
#> GSM786514 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786516 1 0.6295 0.251 0.528 0.472 0.000
#> GSM786520 1 0.0000 0.905 1.000 0.000 0.000
#> GSM786521 1 0.4399 0.786 0.812 0.188 0.000
#> GSM786536 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786542 2 0.0000 0.951 0.000 1.000 0.000
#> GSM786546 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
#> GSM786527 2 0.0657 0.918 0.012 0.984 0.000 0.004
#> GSM786539 1 0.0188 0.862 0.996 0.000 0.000 0.004
#> GSM786541 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786556 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786523 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786497 1 0.0469 0.861 0.988 0.000 0.000 0.012
#> GSM786501 4 0.0000 0.807 0.000 0.000 0.000 1.000
#> GSM786517 2 0.4477 0.523 0.000 0.688 0.000 0.312
#> GSM786534 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786555 2 0.1211 0.898 0.000 0.960 0.040 0.000
#> GSM786558 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786559 2 0.1389 0.893 0.000 0.952 0.000 0.048
#> GSM786565 3 0.4877 0.304 0.000 0.408 0.592 0.000
#> GSM786572 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786579 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786491 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786509 1 0.0188 0.862 0.996 0.000 0.000 0.004
#> GSM786538 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786548 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786562 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786566 4 0.4331 0.720 0.288 0.000 0.000 0.712
#> GSM786573 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786574 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786580 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786581 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786583 2 0.4454 0.470 0.000 0.692 0.308 0.000
#> GSM786492 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786493 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786499 4 0.0000 0.807 0.000 0.000 0.000 1.000
#> GSM786502 4 0.0188 0.808 0.004 0.000 0.000 0.996
#> GSM786537 1 0.3444 0.721 0.816 0.184 0.000 0.000
#> GSM786567 2 0.0524 0.921 0.008 0.988 0.000 0.004
#> GSM786498 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786500 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786503 1 0.0188 0.862 0.996 0.000 0.000 0.004
#> GSM786507 4 0.1792 0.809 0.068 0.000 0.000 0.932
#> GSM786515 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786522 2 0.4679 0.415 0.352 0.648 0.000 0.000
#> GSM786526 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786528 1 0.3172 0.692 0.840 0.160 0.000 0.000
#> GSM786531 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786535 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786543 1 0.0188 0.862 0.996 0.000 0.000 0.004
#> GSM786545 3 0.4250 0.576 0.000 0.276 0.724 0.000
#> GSM786551 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786552 2 0.1557 0.878 0.000 0.944 0.056 0.000
#> GSM786554 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786557 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786560 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786564 2 0.1211 0.900 0.000 0.960 0.000 0.040
#> GSM786568 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786569 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786571 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786496 2 0.1576 0.889 0.000 0.948 0.048 0.004
#> GSM786506 4 0.0188 0.808 0.004 0.000 0.000 0.996
#> GSM786508 4 0.0188 0.808 0.004 0.000 0.000 0.996
#> GSM786512 4 0.4188 0.748 0.244 0.004 0.000 0.752
#> GSM786518 1 0.3610 0.800 0.800 0.000 0.000 0.200
#> GSM786519 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786524 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786529 2 0.0188 0.923 0.000 0.996 0.004 0.000
#> GSM786530 2 0.4925 0.182 0.428 0.572 0.000 0.000
#> GSM786532 1 0.3266 0.686 0.832 0.168 0.000 0.000
#> GSM786533 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786544 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786547 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786549 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786550 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786563 3 0.0000 0.897 0.000 0.000 1.000 0.000
#> GSM786570 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786576 4 0.4919 0.623 0.048 0.200 0.000 0.752
#> GSM786577 1 0.0817 0.853 0.976 0.024 0.000 0.000
#> GSM786578 2 0.0188 0.925 0.000 0.996 0.000 0.004
#> GSM786582 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786495 4 0.4040 0.746 0.248 0.000 0.000 0.752
#> GSM786505 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786511 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786513 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786525 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786540 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786553 1 0.4382 0.562 0.704 0.296 0.000 0.000
#> GSM786561 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786575 1 0.0188 0.862 0.996 0.000 0.000 0.004
#> GSM786494 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786504 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786510 4 0.4574 0.754 0.220 0.024 0.000 0.756
#> GSM786514 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786516 2 0.4761 0.356 0.372 0.628 0.000 0.000
#> GSM786520 1 0.4040 0.779 0.752 0.000 0.000 0.248
#> GSM786521 1 0.0000 0.862 1.000 0.000 0.000 0.000
#> GSM786536 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786542 2 0.0000 0.925 0.000 1.000 0.000 0.000
#> GSM786546 2 0.0000 0.925 0.000 1.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 3 0.2798 0.850 0.000 0.140 0.852 0.008 0.000
#> GSM786539 4 0.0162 0.822 0.004 0.000 0.000 0.996 0.000
#> GSM786541 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786556 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786523 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786497 4 0.0324 0.822 0.004 0.000 0.004 0.992 0.000
#> GSM786501 1 0.0880 0.801 0.968 0.032 0.000 0.000 0.000
#> GSM786517 2 0.3109 0.720 0.200 0.800 0.000 0.000 0.000
#> GSM786534 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786555 2 0.1341 0.903 0.000 0.944 0.056 0.000 0.000
#> GSM786558 2 0.0880 0.921 0.000 0.968 0.032 0.000 0.000
#> GSM786559 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786565 2 0.3895 0.527 0.000 0.680 0.000 0.000 0.320
#> GSM786572 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786579 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786491 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786509 4 0.0162 0.822 0.004 0.000 0.000 0.996 0.000
#> GSM786538 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786548 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786562 4 0.1168 0.812 0.032 0.000 0.008 0.960 0.000
#> GSM786566 1 0.3752 0.726 0.708 0.000 0.000 0.292 0.000
#> GSM786573 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786574 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786580 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786581 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786583 3 0.6552 0.349 0.000 0.248 0.476 0.000 0.276
#> GSM786492 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786493 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786499 1 0.0880 0.801 0.968 0.032 0.000 0.000 0.000
#> GSM786502 1 0.2230 0.733 0.884 0.000 0.116 0.000 0.000
#> GSM786537 4 0.4446 0.117 0.000 0.004 0.476 0.520 0.000
#> GSM786567 3 0.2605 0.848 0.000 0.148 0.852 0.000 0.000
#> GSM786498 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786500 4 0.5122 0.721 0.200 0.000 0.112 0.688 0.000
#> GSM786503 4 0.0290 0.822 0.008 0.000 0.000 0.992 0.000
#> GSM786507 1 0.1544 0.816 0.932 0.000 0.000 0.068 0.000
#> GSM786515 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786522 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786526 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786528 3 0.4201 0.361 0.000 0.000 0.592 0.408 0.000
#> GSM786531 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786535 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786543 4 0.0162 0.822 0.004 0.000 0.000 0.996 0.000
#> GSM786545 3 0.3636 0.563 0.000 0.000 0.728 0.000 0.272
#> GSM786551 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786552 2 0.0880 0.921 0.000 0.968 0.032 0.000 0.000
#> GSM786554 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786557 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786560 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786564 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786568 2 0.1341 0.904 0.000 0.944 0.056 0.000 0.000
#> GSM786569 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786571 2 0.0880 0.921 0.000 0.968 0.032 0.000 0.000
#> GSM786496 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786506 1 0.2230 0.733 0.884 0.000 0.116 0.000 0.000
#> GSM786508 1 0.0000 0.794 1.000 0.000 0.000 0.000 0.000
#> GSM786512 1 0.3910 0.798 0.772 0.032 0.000 0.196 0.000
#> GSM786518 4 0.3231 0.763 0.196 0.000 0.004 0.800 0.000
#> GSM786519 4 0.4998 0.726 0.196 0.000 0.104 0.700 0.000
#> GSM786524 4 0.1121 0.803 0.000 0.000 0.044 0.956 0.000
#> GSM786529 2 0.3508 0.594 0.000 0.748 0.252 0.000 0.000
#> GSM786530 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786532 3 0.2852 0.695 0.000 0.000 0.828 0.172 0.000
#> GSM786533 2 0.0162 0.937 0.000 0.996 0.004 0.000 0.000
#> GSM786544 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786547 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786549 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786550 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786563 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> GSM786570 3 0.4287 0.325 0.000 0.460 0.540 0.000 0.000
#> GSM786576 1 0.3910 0.798 0.772 0.032 0.000 0.196 0.000
#> GSM786577 4 0.2890 0.736 0.000 0.004 0.160 0.836 0.000
#> GSM786578 2 0.0000 0.939 0.000 1.000 0.000 0.000 0.000
#> GSM786582 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786495 1 0.3910 0.798 0.772 0.032 0.000 0.196 0.000
#> GSM786505 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786511 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786513 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786525 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786540 3 0.4302 0.249 0.000 0.480 0.520 0.000 0.000
#> GSM786553 4 0.4022 0.689 0.000 0.104 0.100 0.796 0.000
#> GSM786561 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786575 4 0.0162 0.822 0.004 0.000 0.000 0.996 0.000
#> GSM786494 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786504 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786510 1 0.3876 0.799 0.776 0.032 0.000 0.192 0.000
#> GSM786514 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786516 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786520 4 0.5365 0.707 0.228 0.000 0.116 0.656 0.000
#> GSM786521 4 0.0000 0.822 0.000 0.000 0.000 1.000 0.000
#> GSM786536 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
#> GSM786542 3 0.2561 0.852 0.000 0.144 0.856 0.000 0.000
#> GSM786546 3 0.2230 0.869 0.000 0.116 0.884 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 3 0.0146 0.8635 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM786539 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786541 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786556 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786523 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786497 4 0.0260 0.9050 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM786501 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786517 2 0.2793 0.7392 0.000 0.800 0.000 0.000 0.000 0.200
#> GSM786534 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786555 2 0.0632 0.9398 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM786558 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786559 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786565 2 0.2793 0.7436 0.000 0.800 0.000 0.000 0.200 0.000
#> GSM786572 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786579 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786491 4 0.0260 0.9045 0.008 0.000 0.000 0.992 0.000 0.000
#> GSM786509 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786538 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786548 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786562 1 0.3765 0.2870 0.596 0.000 0.000 0.404 0.000 0.000
#> GSM786566 6 0.3198 0.6622 0.000 0.000 0.000 0.260 0.000 0.740
#> GSM786573 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786574 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786580 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786581 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786583 3 0.5362 0.4828 0.000 0.228 0.588 0.000 0.184 0.000
#> GSM786492 1 0.3810 0.2116 0.572 0.000 0.000 0.428 0.000 0.000
#> GSM786493 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786499 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786502 1 0.0260 0.8490 0.992 0.000 0.000 0.000 0.000 0.008
#> GSM786537 3 0.3774 0.2479 0.000 0.000 0.592 0.408 0.000 0.000
#> GSM786567 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786498 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786500 4 0.3862 0.0355 0.476 0.000 0.000 0.524 0.000 0.000
#> GSM786503 4 0.0260 0.9051 0.000 0.000 0.000 0.992 0.000 0.008
#> GSM786507 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786515 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786522 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786526 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786528 3 0.3756 0.3555 0.000 0.000 0.600 0.400 0.000 0.000
#> GSM786531 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786535 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786543 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786545 3 0.2416 0.7335 0.000 0.000 0.844 0.000 0.156 0.000
#> GSM786551 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786552 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786554 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786557 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786560 1 0.0260 0.8499 0.992 0.000 0.000 0.008 0.000 0.000
#> GSM786564 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786568 2 0.0632 0.9401 0.000 0.976 0.024 0.000 0.000 0.000
#> GSM786569 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786571 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786496 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786506 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786508 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786512 6 0.1204 0.9040 0.000 0.000 0.000 0.056 0.000 0.944
#> GSM786518 4 0.2793 0.6996 0.200 0.000 0.000 0.800 0.000 0.000
#> GSM786519 4 0.3747 0.2901 0.396 0.000 0.000 0.604 0.000 0.000
#> GSM786524 4 0.1327 0.8622 0.000 0.000 0.064 0.936 0.000 0.000
#> GSM786529 2 0.3288 0.5892 0.000 0.724 0.276 0.000 0.000 0.000
#> GSM786530 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786532 3 0.1501 0.8117 0.000 0.000 0.924 0.076 0.000 0.000
#> GSM786533 2 0.0146 0.9552 0.000 0.996 0.004 0.000 0.000 0.000
#> GSM786544 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786547 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786549 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786550 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786563 5 0.0000 1.0000 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786570 3 0.3592 0.4730 0.000 0.344 0.656 0.000 0.000 0.000
#> GSM786576 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786577 4 0.2491 0.7558 0.000 0.000 0.164 0.836 0.000 0.000
#> GSM786578 2 0.0000 0.9579 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM786582 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786495 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786505 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786511 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786525 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786540 3 0.3864 0.0661 0.000 0.480 0.520 0.000 0.000 0.000
#> GSM786553 4 0.1814 0.8282 0.000 0.000 0.100 0.900 0.000 0.000
#> GSM786561 1 0.3634 0.4041 0.644 0.000 0.000 0.356 0.000 0.000
#> GSM786575 4 0.2340 0.7538 0.148 0.000 0.000 0.852 0.000 0.000
#> GSM786494 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786504 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786510 6 0.0000 0.9504 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786514 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786516 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786520 1 0.0000 0.8542 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786521 4 0.0000 0.9089 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786536 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM786542 3 0.0790 0.8468 0.000 0.032 0.968 0.000 0.000 0.000
#> GSM786546 3 0.0000 0.8655 0.000 0.000 1.000 0.000 0.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 specimen(p) disease.state(p) k
#> ATC:pam 87 0.08470 0.930 2
#> ATC:pam 87 0.17028 0.266 3
#> ATC:pam 88 0.26118 0.191 4
#> ATC:pam 88 0.00632 0.112 5
#> ATC:pam 83 0.04278 0.336 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 54547 rows and 93 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 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.433 0.842 0.853 0.4083 0.583 0.583
#> 3 3 0.664 0.867 0.897 0.4856 0.803 0.666
#> 4 4 0.597 0.695 0.820 0.1605 0.905 0.764
#> 5 5 0.692 0.760 0.801 0.1088 0.803 0.447
#> 6 6 0.833 0.776 0.882 0.0511 0.924 0.676
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
#> GSM786527 2 0.0000 0.869 0.000 1.000
#> GSM786539 1 0.7883 0.956 0.764 0.236
#> GSM786541 2 0.6973 0.769 0.188 0.812
#> GSM786556 2 0.6973 0.769 0.188 0.812
#> GSM786523 2 0.2948 0.871 0.052 0.948
#> GSM786497 1 0.6887 0.970 0.816 0.184
#> GSM786501 1 0.7883 0.956 0.764 0.236
#> GSM786517 2 0.5408 0.764 0.124 0.876
#> GSM786534 2 0.6973 0.769 0.188 0.812
#> GSM786555 2 0.0672 0.868 0.008 0.992
#> GSM786558 2 0.0938 0.868 0.012 0.988
#> GSM786559 2 0.9393 0.234 0.356 0.644
#> GSM786565 2 0.0672 0.868 0.008 0.992
#> GSM786572 2 0.6531 0.712 0.168 0.832
#> GSM786579 2 0.0672 0.868 0.008 0.992
#> GSM786491 2 0.3274 0.867 0.060 0.940
#> GSM786509 1 0.6887 0.970 0.816 0.184
#> GSM786538 2 0.3274 0.867 0.060 0.940
#> GSM786548 2 0.6973 0.769 0.188 0.812
#> GSM786562 2 0.3274 0.867 0.060 0.940
#> GSM786566 1 0.7883 0.956 0.764 0.236
#> GSM786573 2 0.6973 0.769 0.188 0.812
#> GSM786574 2 0.0000 0.869 0.000 1.000
#> GSM786580 2 0.3274 0.867 0.060 0.940
#> GSM786581 2 0.8608 0.468 0.284 0.716
#> GSM786583 2 0.7745 0.768 0.228 0.772
#> GSM786492 1 0.6887 0.970 0.816 0.184
#> GSM786493 2 0.6438 0.717 0.164 0.836
#> GSM786499 1 0.7883 0.956 0.764 0.236
#> GSM786502 1 0.7056 0.971 0.808 0.192
#> GSM786537 2 0.2948 0.871 0.052 0.948
#> GSM786567 2 0.0000 0.869 0.000 1.000
#> GSM786498 1 0.6973 0.971 0.812 0.188
#> GSM786500 1 0.6973 0.971 0.812 0.188
#> GSM786503 1 0.7883 0.956 0.764 0.236
#> GSM786507 2 0.9922 -0.182 0.448 0.552
#> GSM786515 2 0.6343 0.723 0.160 0.840
#> GSM786522 2 0.2948 0.871 0.052 0.948
#> GSM786526 2 0.3274 0.867 0.060 0.940
#> GSM786528 2 0.3114 0.869 0.056 0.944
#> GSM786531 2 0.6973 0.769 0.188 0.812
#> GSM786535 2 0.6973 0.769 0.188 0.812
#> GSM786543 1 0.7139 0.966 0.804 0.196
#> GSM786545 2 0.7815 0.767 0.232 0.768
#> GSM786551 2 0.2778 0.871 0.048 0.952
#> GSM786552 2 0.6973 0.769 0.188 0.812
#> GSM786554 2 0.9044 0.362 0.320 0.680
#> GSM786557 1 0.6973 0.971 0.812 0.188
#> GSM786560 1 0.6887 0.970 0.816 0.184
#> GSM786564 2 0.0672 0.869 0.008 0.992
#> GSM786568 2 0.0672 0.868 0.008 0.992
#> GSM786569 1 0.6973 0.971 0.812 0.188
#> GSM786571 2 0.2236 0.856 0.036 0.964
#> GSM786496 2 0.7299 0.649 0.204 0.796
#> GSM786506 1 0.7139 0.970 0.804 0.196
#> GSM786508 1 0.7883 0.956 0.764 0.236
#> GSM786512 1 0.7883 0.956 0.764 0.236
#> GSM786518 1 0.6887 0.970 0.816 0.184
#> GSM786519 1 0.7056 0.971 0.808 0.192
#> GSM786524 2 0.2948 0.871 0.052 0.948
#> GSM786529 2 0.6887 0.772 0.184 0.816
#> GSM786530 2 0.2948 0.871 0.052 0.948
#> GSM786532 2 0.3274 0.867 0.060 0.940
#> GSM786533 1 0.8016 0.948 0.756 0.244
#> GSM786544 2 0.2948 0.871 0.052 0.948
#> GSM786547 2 0.5629 0.761 0.132 0.868
#> GSM786549 2 0.7815 0.767 0.232 0.768
#> GSM786550 2 0.6973 0.769 0.188 0.812
#> GSM786563 2 0.6973 0.769 0.188 0.812
#> GSM786570 2 0.0376 0.868 0.004 0.996
#> GSM786576 2 0.6712 0.705 0.176 0.824
#> GSM786577 2 0.2948 0.871 0.052 0.948
#> GSM786578 2 0.0000 0.869 0.000 1.000
#> GSM786582 2 0.3431 0.868 0.064 0.936
#> GSM786495 1 0.7883 0.956 0.764 0.236
#> GSM786505 1 0.6973 0.971 0.812 0.188
#> GSM786511 2 0.3431 0.868 0.064 0.936
#> GSM786513 2 0.3274 0.867 0.060 0.940
#> GSM786525 2 0.0000 0.869 0.000 1.000
#> GSM786540 2 0.0376 0.868 0.004 0.996
#> GSM786553 2 0.2778 0.870 0.048 0.952
#> GSM786561 1 0.6887 0.970 0.816 0.184
#> GSM786575 2 0.3274 0.867 0.060 0.940
#> GSM786494 1 0.6973 0.971 0.812 0.188
#> GSM786504 2 0.3274 0.867 0.060 0.940
#> GSM786510 1 0.7883 0.956 0.764 0.236
#> GSM786514 2 0.3431 0.868 0.064 0.936
#> GSM786516 2 0.2948 0.871 0.052 0.948
#> GSM786520 1 0.6887 0.970 0.816 0.184
#> GSM786521 2 0.3274 0.867 0.060 0.940
#> GSM786536 2 0.2948 0.871 0.052 0.948
#> GSM786542 2 0.0672 0.868 0.008 0.992
#> GSM786546 2 0.0938 0.870 0.012 0.988
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM786527 2 0.0592 0.8906 0.000 0.988 0.012
#> GSM786539 1 0.3009 0.9021 0.920 0.052 0.028
#> GSM786541 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786556 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786523 3 0.4047 0.8900 0.004 0.148 0.848
#> GSM786497 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786501 1 0.4324 0.8775 0.860 0.112 0.028
#> GSM786517 2 0.3293 0.8446 0.012 0.900 0.088
#> GSM786534 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786555 2 0.2711 0.8799 0.000 0.912 0.088
#> GSM786558 2 0.6168 0.3368 0.000 0.588 0.412
#> GSM786559 2 0.4453 0.8471 0.012 0.836 0.152
#> GSM786565 2 0.3619 0.8639 0.000 0.864 0.136
#> GSM786572 2 0.4164 0.8550 0.008 0.848 0.144
#> GSM786579 2 0.3192 0.8793 0.000 0.888 0.112
#> GSM786491 2 0.3091 0.8739 0.072 0.912 0.016
#> GSM786509 1 0.0000 0.9202 1.000 0.000 0.000
#> GSM786538 2 0.3183 0.8716 0.076 0.908 0.016
#> GSM786548 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786562 2 0.3183 0.8716 0.076 0.908 0.016
#> GSM786566 1 0.2599 0.9067 0.932 0.052 0.016
#> GSM786573 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786574 2 0.0592 0.8906 0.000 0.988 0.012
#> GSM786580 2 0.2682 0.8700 0.076 0.920 0.004
#> GSM786581 2 0.4453 0.8471 0.012 0.836 0.152
#> GSM786583 3 0.2945 0.9546 0.004 0.088 0.908
#> GSM786492 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786493 2 0.4453 0.8471 0.012 0.836 0.152
#> GSM786499 1 0.3009 0.9021 0.920 0.052 0.028
#> GSM786502 1 0.0424 0.9201 0.992 0.008 0.000
#> GSM786537 2 0.3349 0.8762 0.004 0.888 0.108
#> GSM786567 2 0.0592 0.8906 0.000 0.988 0.012
#> GSM786498 1 0.2096 0.8993 0.944 0.052 0.004
#> GSM786500 1 0.0747 0.9187 0.984 0.016 0.000
#> GSM786503 1 0.2096 0.9101 0.944 0.052 0.004
#> GSM786507 1 0.7256 0.2886 0.532 0.440 0.028
#> GSM786515 2 0.4453 0.8471 0.012 0.836 0.152
#> GSM786522 2 0.3851 0.8637 0.004 0.860 0.136
#> GSM786526 2 0.2492 0.8830 0.048 0.936 0.016
#> GSM786528 2 0.2903 0.8852 0.048 0.924 0.028
#> GSM786531 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786535 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786543 1 0.4654 0.6948 0.792 0.208 0.000
#> GSM786545 3 0.2945 0.9546 0.004 0.088 0.908
#> GSM786551 2 0.2448 0.8823 0.000 0.924 0.076
#> GSM786552 3 0.6295 0.0789 0.000 0.472 0.528
#> GSM786554 2 0.4453 0.8471 0.012 0.836 0.152
#> GSM786557 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786560 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786564 2 0.0747 0.8902 0.000 0.984 0.016
#> GSM786568 2 0.3551 0.8659 0.000 0.868 0.132
#> GSM786569 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786571 2 0.4178 0.8673 0.000 0.828 0.172
#> GSM786496 2 0.4453 0.8471 0.012 0.836 0.152
#> GSM786506 1 0.1878 0.9128 0.952 0.044 0.004
#> GSM786508 1 0.2879 0.9038 0.924 0.052 0.024
#> GSM786512 1 0.4821 0.8588 0.848 0.064 0.088
#> GSM786518 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786519 1 0.0000 0.9202 1.000 0.000 0.000
#> GSM786524 2 0.3784 0.8659 0.004 0.864 0.132
#> GSM786529 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786530 2 0.3851 0.8637 0.004 0.860 0.136
#> GSM786532 2 0.2492 0.8830 0.048 0.936 0.016
#> GSM786533 1 0.5449 0.8313 0.816 0.068 0.116
#> GSM786544 2 0.5982 0.5702 0.004 0.668 0.328
#> GSM786547 2 0.4002 0.8675 0.000 0.840 0.160
#> GSM786549 3 0.2945 0.9546 0.004 0.088 0.908
#> GSM786550 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786563 3 0.2796 0.9576 0.000 0.092 0.908
#> GSM786570 2 0.1860 0.8908 0.000 0.948 0.052
#> GSM786576 2 0.3293 0.8446 0.012 0.900 0.088
#> GSM786577 2 0.3784 0.8659 0.004 0.864 0.132
#> GSM786578 2 0.2356 0.8707 0.000 0.928 0.072
#> GSM786582 2 0.2550 0.8823 0.056 0.932 0.012
#> GSM786495 1 0.3310 0.8977 0.908 0.064 0.028
#> GSM786505 1 0.2590 0.8850 0.924 0.072 0.004
#> GSM786511 2 0.2446 0.8833 0.052 0.936 0.012
#> GSM786513 2 0.2998 0.8759 0.068 0.916 0.016
#> GSM786525 2 0.1031 0.8909 0.000 0.976 0.024
#> GSM786540 2 0.2356 0.8707 0.000 0.928 0.072
#> GSM786553 2 0.2590 0.8832 0.004 0.924 0.072
#> GSM786561 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786575 2 0.3183 0.8716 0.076 0.908 0.016
#> GSM786494 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786504 2 0.2998 0.8761 0.068 0.916 0.016
#> GSM786510 1 0.3310 0.8977 0.908 0.064 0.028
#> GSM786514 2 0.2446 0.8833 0.052 0.936 0.012
#> GSM786516 2 0.3851 0.8637 0.004 0.860 0.136
#> GSM786520 1 0.0592 0.9198 0.988 0.012 0.000
#> GSM786521 2 0.2682 0.8700 0.076 0.920 0.004
#> GSM786536 2 0.3851 0.8637 0.004 0.860 0.136
#> GSM786542 2 0.3619 0.8635 0.000 0.864 0.136
#> GSM786546 2 0.2356 0.8828 0.000 0.928 0.072
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 1 0.6229 0.6032 0.664 0.132 0.204 0.000
#> GSM786539 4 0.2647 0.8388 0.000 0.120 0.000 0.880
#> GSM786541 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786556 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786523 3 0.6206 0.4528 0.280 0.088 0.632 0.000
#> GSM786497 4 0.1867 0.8350 0.000 0.072 0.000 0.928
#> GSM786501 4 0.5003 0.6729 0.016 0.308 0.000 0.676
#> GSM786517 2 0.6785 0.3174 0.432 0.492 0.064 0.012
#> GSM786534 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786555 1 0.7084 0.5447 0.552 0.164 0.284 0.000
#> GSM786558 1 0.6334 0.4142 0.484 0.060 0.456 0.000
#> GSM786559 2 0.4067 0.7871 0.140 0.828 0.016 0.016
#> GSM786565 1 0.7058 0.5481 0.560 0.168 0.272 0.000
#> GSM786572 2 0.5325 0.7671 0.160 0.744 0.096 0.000
#> GSM786579 1 0.7044 0.5503 0.560 0.164 0.276 0.000
#> GSM786491 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786509 4 0.1867 0.8417 0.000 0.072 0.000 0.928
#> GSM786538 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786548 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786562 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786566 4 0.2281 0.8454 0.000 0.096 0.000 0.904
#> GSM786573 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786574 1 0.6275 0.6055 0.660 0.136 0.204 0.000
#> GSM786580 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786581 2 0.4057 0.7953 0.152 0.816 0.032 0.000
#> GSM786583 3 0.1970 0.8507 0.060 0.008 0.932 0.000
#> GSM786492 4 0.2149 0.8275 0.000 0.088 0.000 0.912
#> GSM786493 2 0.4782 0.7923 0.152 0.780 0.068 0.000
#> GSM786499 4 0.4500 0.6815 0.000 0.316 0.000 0.684
#> GSM786502 4 0.2011 0.8504 0.000 0.080 0.000 0.920
#> GSM786537 1 0.3820 0.6811 0.848 0.088 0.064 0.000
#> GSM786567 1 0.6788 0.5748 0.608 0.188 0.204 0.000
#> GSM786498 4 0.1798 0.8519 0.016 0.040 0.000 0.944
#> GSM786500 4 0.0779 0.8520 0.016 0.004 0.000 0.980
#> GSM786503 4 0.2081 0.8473 0.000 0.084 0.000 0.916
#> GSM786507 2 0.5510 -0.1201 0.024 0.600 0.000 0.376
#> GSM786515 2 0.4985 0.7864 0.152 0.768 0.080 0.000
#> GSM786522 1 0.3966 0.6802 0.840 0.088 0.072 0.000
#> GSM786526 1 0.0188 0.7083 0.996 0.000 0.000 0.004
#> GSM786528 1 0.0188 0.7091 0.996 0.000 0.004 0.000
#> GSM786531 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786535 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786543 4 0.6785 0.3118 0.184 0.208 0.000 0.608
#> GSM786545 3 0.1824 0.8509 0.060 0.004 0.936 0.000
#> GSM786551 1 0.5272 0.6711 0.744 0.084 0.172 0.000
#> GSM786552 3 0.6058 0.0387 0.336 0.060 0.604 0.000
#> GSM786554 2 0.4360 0.7938 0.140 0.816 0.032 0.012
#> GSM786557 4 0.0188 0.8541 0.000 0.004 0.000 0.996
#> GSM786560 4 0.1716 0.8383 0.000 0.064 0.000 0.936
#> GSM786564 1 0.6084 0.6017 0.676 0.120 0.204 0.000
#> GSM786568 1 0.6788 0.5860 0.592 0.144 0.264 0.000
#> GSM786569 4 0.0000 0.8540 0.000 0.000 0.000 1.000
#> GSM786571 1 0.7381 0.5125 0.492 0.180 0.328 0.000
#> GSM786496 2 0.6752 0.6259 0.140 0.644 0.204 0.012
#> GSM786506 4 0.2469 0.8424 0.000 0.108 0.000 0.892
#> GSM786508 4 0.2760 0.8352 0.000 0.128 0.000 0.872
#> GSM786512 4 0.4998 0.3996 0.000 0.488 0.000 0.512
#> GSM786518 4 0.2149 0.8275 0.000 0.088 0.000 0.912
#> GSM786519 4 0.1118 0.8551 0.000 0.036 0.000 0.964
#> GSM786524 1 0.3427 0.6934 0.872 0.088 0.036 0.004
#> GSM786529 3 0.0336 0.8933 0.000 0.008 0.992 0.000
#> GSM786530 1 0.3399 0.6953 0.868 0.092 0.040 0.000
#> GSM786532 1 0.0188 0.7083 0.996 0.000 0.000 0.004
#> GSM786533 4 0.4898 0.4972 0.000 0.416 0.000 0.584
#> GSM786544 1 0.6554 0.4960 0.540 0.084 0.376 0.000
#> GSM786547 1 0.6949 0.1906 0.480 0.408 0.112 0.000
#> GSM786549 3 0.1970 0.8507 0.060 0.008 0.932 0.000
#> GSM786550 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786563 3 0.0000 0.8993 0.000 0.000 1.000 0.000
#> GSM786570 1 0.7054 0.5482 0.572 0.196 0.232 0.000
#> GSM786576 2 0.5664 0.6974 0.264 0.688 0.032 0.016
#> GSM786577 1 0.3966 0.6783 0.840 0.088 0.072 0.000
#> GSM786578 1 0.6879 0.5449 0.596 0.216 0.188 0.000
#> GSM786582 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786495 4 0.4500 0.6815 0.000 0.316 0.000 0.684
#> GSM786505 4 0.0927 0.8536 0.016 0.008 0.000 0.976
#> GSM786511 1 0.1191 0.6998 0.968 0.024 0.004 0.004
#> GSM786513 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786525 1 0.6754 0.5816 0.612 0.184 0.204 0.000
#> GSM786540 1 0.6517 0.4747 0.604 0.288 0.108 0.000
#> GSM786553 1 0.0657 0.7105 0.984 0.012 0.004 0.000
#> GSM786561 4 0.2149 0.8275 0.000 0.088 0.000 0.912
#> GSM786575 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786494 4 0.0000 0.8540 0.000 0.000 0.000 1.000
#> GSM786504 1 0.0188 0.7083 0.996 0.000 0.000 0.004
#> GSM786510 4 0.4500 0.6815 0.000 0.316 0.000 0.684
#> GSM786514 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786516 1 0.3652 0.6910 0.856 0.092 0.052 0.000
#> GSM786520 4 0.0000 0.8540 0.000 0.000 0.000 1.000
#> GSM786521 1 0.0336 0.7081 0.992 0.000 0.000 0.008
#> GSM786536 1 0.6074 0.6406 0.668 0.104 0.228 0.000
#> GSM786542 1 0.7102 0.5465 0.548 0.164 0.288 0.000
#> GSM786546 1 0.6317 0.6226 0.644 0.116 0.240 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 2 0.2020 0.7681 0.100 0.900 0.000 0.000 0.000
#> GSM786539 5 0.3766 0.8047 0.000 0.004 0.000 0.268 0.728
#> GSM786541 3 0.1341 0.8391 0.000 0.056 0.944 0.000 0.000
#> GSM786556 3 0.1341 0.8391 0.000 0.056 0.944 0.000 0.000
#> GSM786523 1 0.7300 -0.0574 0.388 0.184 0.388 0.000 0.040
#> GSM786497 4 0.0404 0.8886 0.000 0.000 0.000 0.988 0.012
#> GSM786501 5 0.2763 0.8841 0.000 0.004 0.000 0.148 0.848
#> GSM786517 2 0.4468 0.7104 0.044 0.716 0.000 0.000 0.240
#> GSM786534 3 0.1341 0.8391 0.000 0.056 0.944 0.000 0.000
#> GSM786555 2 0.3368 0.7395 0.024 0.820 0.156 0.000 0.000
#> GSM786558 2 0.4798 0.2789 0.024 0.580 0.396 0.000 0.000
#> GSM786559 2 0.3684 0.7046 0.000 0.720 0.000 0.000 0.280
#> GSM786565 2 0.3644 0.7527 0.024 0.824 0.136 0.000 0.016
#> GSM786572 2 0.4624 0.7533 0.000 0.744 0.112 0.000 0.144
#> GSM786579 2 0.3368 0.7395 0.024 0.820 0.156 0.000 0.000
#> GSM786491 1 0.1267 0.8869 0.960 0.024 0.000 0.012 0.004
#> GSM786509 4 0.0000 0.8863 0.000 0.000 0.000 1.000 0.000
#> GSM786538 1 0.0992 0.8892 0.968 0.024 0.000 0.008 0.000
#> GSM786548 3 0.1341 0.8391 0.000 0.056 0.944 0.000 0.000
#> GSM786562 1 0.1978 0.8710 0.928 0.024 0.000 0.044 0.004
#> GSM786566 5 0.3790 0.8011 0.000 0.004 0.000 0.272 0.724
#> GSM786573 3 0.1341 0.8391 0.000 0.056 0.944 0.000 0.000
#> GSM786574 2 0.1965 0.7675 0.096 0.904 0.000 0.000 0.000
#> GSM786580 1 0.0955 0.8891 0.968 0.028 0.004 0.000 0.000
#> GSM786581 2 0.3661 0.7085 0.000 0.724 0.000 0.000 0.276
#> GSM786583 3 0.3937 0.7780 0.132 0.060 0.804 0.000 0.004
#> GSM786492 4 0.0162 0.8855 0.000 0.000 0.000 0.996 0.004
#> GSM786493 2 0.4197 0.7199 0.000 0.728 0.028 0.000 0.244
#> GSM786499 5 0.2536 0.8839 0.000 0.004 0.000 0.128 0.868
#> GSM786502 4 0.2929 0.7058 0.000 0.000 0.000 0.820 0.180
#> GSM786537 1 0.2149 0.8570 0.916 0.036 0.000 0.000 0.048
#> GSM786567 2 0.1792 0.7714 0.084 0.916 0.000 0.000 0.000
#> GSM786498 4 0.1405 0.8799 0.020 0.008 0.000 0.956 0.016
#> GSM786500 4 0.1211 0.8807 0.024 0.000 0.000 0.960 0.016
#> GSM786503 5 0.3398 0.8546 0.000 0.004 0.000 0.216 0.780
#> GSM786507 5 0.4455 0.7679 0.012 0.136 0.000 0.076 0.776
#> GSM786515 2 0.4384 0.7321 0.000 0.728 0.044 0.000 0.228
#> GSM786522 1 0.4184 0.7552 0.772 0.176 0.004 0.000 0.048
#> GSM786526 1 0.0703 0.8900 0.976 0.024 0.000 0.000 0.000
#> GSM786528 1 0.0794 0.8903 0.972 0.028 0.000 0.000 0.000
#> GSM786531 3 0.0880 0.8279 0.000 0.032 0.968 0.000 0.000
#> GSM786535 3 0.1124 0.8268 0.000 0.036 0.960 0.000 0.004
#> GSM786543 4 0.5289 0.2340 0.424 0.028 0.000 0.536 0.012
#> GSM786545 3 0.4000 0.7766 0.132 0.064 0.800 0.000 0.004
#> GSM786551 1 0.4677 0.6357 0.664 0.300 0.000 0.000 0.036
#> GSM786552 3 0.4768 0.3581 0.024 0.384 0.592 0.000 0.000
#> GSM786554 2 0.3684 0.7046 0.000 0.720 0.000 0.000 0.280
#> GSM786557 4 0.1018 0.8848 0.016 0.000 0.000 0.968 0.016
#> GSM786560 4 0.0404 0.8886 0.000 0.000 0.000 0.988 0.012
#> GSM786564 2 0.2561 0.7473 0.144 0.856 0.000 0.000 0.000
#> GSM786568 2 0.3530 0.6782 0.204 0.784 0.012 0.000 0.000
#> GSM786569 4 0.0510 0.8880 0.000 0.000 0.000 0.984 0.016
#> GSM786571 3 0.6018 -0.0179 0.048 0.432 0.488 0.000 0.032
#> GSM786496 2 0.4413 0.7194 0.000 0.724 0.044 0.000 0.232
#> GSM786506 4 0.4060 0.3213 0.000 0.000 0.000 0.640 0.360
#> GSM786508 5 0.3123 0.8639 0.000 0.004 0.000 0.184 0.812
#> GSM786512 5 0.2879 0.8552 0.000 0.032 0.000 0.100 0.868
#> GSM786518 4 0.0000 0.8863 0.000 0.000 0.000 1.000 0.000
#> GSM786519 4 0.2891 0.7282 0.000 0.000 0.000 0.824 0.176
#> GSM786524 1 0.2067 0.8583 0.920 0.032 0.000 0.000 0.048
#> GSM786529 3 0.3274 0.8179 0.064 0.076 0.856 0.000 0.004
#> GSM786530 1 0.4706 0.7577 0.764 0.152 0.036 0.000 0.048
#> GSM786532 1 0.0703 0.8900 0.976 0.024 0.000 0.000 0.000
#> GSM786533 5 0.4436 0.6817 0.000 0.156 0.008 0.068 0.768
#> GSM786544 3 0.7134 0.4354 0.204 0.272 0.488 0.000 0.036
#> GSM786547 2 0.3875 0.7572 0.008 0.808 0.140 0.000 0.044
#> GSM786549 3 0.4000 0.7766 0.132 0.064 0.800 0.000 0.004
#> GSM786550 3 0.1750 0.8288 0.028 0.036 0.936 0.000 0.000
#> GSM786563 3 0.1341 0.8391 0.000 0.056 0.944 0.000 0.000
#> GSM786570 2 0.2685 0.7569 0.028 0.880 0.092 0.000 0.000
#> GSM786576 2 0.5441 0.5640 0.044 0.620 0.008 0.008 0.320
#> GSM786577 1 0.2067 0.8583 0.920 0.032 0.000 0.000 0.048
#> GSM786578 2 0.2300 0.7792 0.072 0.904 0.000 0.000 0.024
#> GSM786582 1 0.0510 0.8893 0.984 0.016 0.000 0.000 0.000
#> GSM786495 5 0.2629 0.8850 0.000 0.004 0.000 0.136 0.860
#> GSM786505 4 0.1405 0.8799 0.020 0.008 0.000 0.956 0.016
#> GSM786511 1 0.0798 0.8883 0.976 0.016 0.000 0.000 0.008
#> GSM786513 1 0.0865 0.8894 0.972 0.024 0.000 0.000 0.004
#> GSM786525 2 0.1197 0.7738 0.048 0.952 0.000 0.000 0.000
#> GSM786540 2 0.2446 0.7797 0.056 0.900 0.000 0.000 0.044
#> GSM786553 1 0.1732 0.8655 0.920 0.080 0.000 0.000 0.000
#> GSM786561 4 0.0000 0.8863 0.000 0.000 0.000 1.000 0.000
#> GSM786575 1 0.2125 0.8665 0.920 0.024 0.000 0.052 0.004
#> GSM786494 4 0.0510 0.8880 0.000 0.000 0.000 0.984 0.016
#> GSM786504 1 0.0703 0.8900 0.976 0.024 0.000 0.000 0.000
#> GSM786510 5 0.2536 0.8839 0.000 0.004 0.000 0.128 0.868
#> GSM786514 1 0.0609 0.8899 0.980 0.020 0.000 0.000 0.000
#> GSM786516 1 0.4423 0.7752 0.784 0.140 0.028 0.000 0.048
#> GSM786520 4 0.1043 0.8800 0.000 0.000 0.000 0.960 0.040
#> GSM786521 1 0.0955 0.8891 0.968 0.028 0.004 0.000 0.000
#> GSM786536 1 0.4864 0.6321 0.672 0.284 0.008 0.000 0.036
#> GSM786542 2 0.3454 0.7389 0.028 0.816 0.156 0.000 0.000
#> GSM786546 2 0.4830 0.1277 0.420 0.560 0.016 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 2 0.3126 0.77406 0.000 0.752 0.248 0.000 0.000 0.000
#> GSM786539 6 0.3050 0.72435 0.236 0.000 0.000 0.000 0.000 0.764
#> GSM786541 5 0.0000 0.88654 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786556 5 0.0000 0.88654 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786523 3 0.2110 0.70110 0.000 0.004 0.900 0.012 0.084 0.000
#> GSM786497 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786501 6 0.0000 0.92988 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786517 2 0.1075 0.78028 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM786534 5 0.0000 0.88654 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786555 2 0.4343 0.77033 0.000 0.724 0.120 0.000 0.156 0.000
#> GSM786558 2 0.4167 0.77519 0.000 0.708 0.236 0.000 0.056 0.000
#> GSM786559 2 0.1075 0.78028 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM786565 2 0.4045 0.78482 0.000 0.756 0.120 0.000 0.124 0.000
#> GSM786572 2 0.1075 0.78173 0.000 0.952 0.000 0.000 0.048 0.000
#> GSM786579 2 0.3832 0.79091 0.000 0.776 0.120 0.000 0.104 0.000
#> GSM786491 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786509 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786538 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786548 5 0.0000 0.88654 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786562 4 0.0790 0.89108 0.032 0.000 0.000 0.968 0.000 0.000
#> GSM786566 6 0.1387 0.90622 0.068 0.000 0.000 0.000 0.000 0.932
#> GSM786573 5 0.0000 0.88654 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786574 2 0.3126 0.77406 0.000 0.752 0.248 0.000 0.000 0.000
#> GSM786580 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786581 2 0.1075 0.78028 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM786583 3 0.2631 0.66668 0.000 0.008 0.840 0.000 0.152 0.000
#> GSM786492 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786493 2 0.1075 0.78028 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM786499 6 0.0000 0.92988 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786502 1 0.1204 0.93124 0.944 0.000 0.000 0.000 0.000 0.056
#> GSM786537 4 0.2378 0.78388 0.000 0.000 0.152 0.848 0.000 0.000
#> GSM786567 2 0.3421 0.77223 0.000 0.736 0.256 0.000 0.000 0.008
#> GSM786498 1 0.0547 0.96530 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM786500 1 0.0547 0.96530 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM786503 6 0.1501 0.90115 0.076 0.000 0.000 0.000 0.000 0.924
#> GSM786507 6 0.2003 0.87105 0.000 0.116 0.000 0.000 0.000 0.884
#> GSM786515 2 0.1152 0.78107 0.000 0.952 0.000 0.000 0.004 0.044
#> GSM786522 3 0.3996 -0.00722 0.000 0.004 0.512 0.484 0.000 0.000
#> GSM786526 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786528 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786531 5 0.4032 0.30876 0.000 0.008 0.420 0.000 0.572 0.000
#> GSM786535 5 0.0260 0.87952 0.000 0.008 0.000 0.000 0.992 0.000
#> GSM786543 4 0.3706 0.38575 0.380 0.000 0.000 0.620 0.000 0.000
#> GSM786545 3 0.2553 0.67373 0.000 0.008 0.848 0.000 0.144 0.000
#> GSM786551 3 0.2006 0.68615 0.000 0.004 0.892 0.104 0.000 0.000
#> GSM786552 2 0.5888 0.46610 0.000 0.476 0.268 0.000 0.256 0.000
#> GSM786554 2 0.1075 0.78028 0.000 0.952 0.000 0.000 0.000 0.048
#> GSM786557 1 0.0458 0.96742 0.984 0.000 0.000 0.016 0.000 0.000
#> GSM786560 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786564 2 0.3126 0.77406 0.000 0.752 0.248 0.000 0.000 0.000
#> GSM786568 2 0.3508 0.75497 0.000 0.704 0.292 0.004 0.000 0.000
#> GSM786569 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786571 3 0.2826 0.60329 0.000 0.092 0.856 0.000 0.052 0.000
#> GSM786496 2 0.1219 0.77980 0.000 0.948 0.004 0.000 0.000 0.048
#> GSM786506 1 0.2597 0.80068 0.824 0.000 0.000 0.000 0.000 0.176
#> GSM786508 6 0.0146 0.92927 0.004 0.000 0.000 0.000 0.000 0.996
#> GSM786512 6 0.1501 0.89929 0.000 0.076 0.000 0.000 0.000 0.924
#> GSM786518 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786519 1 0.1141 0.93452 0.948 0.000 0.000 0.000 0.000 0.052
#> GSM786524 4 0.1444 0.86484 0.000 0.000 0.072 0.928 0.000 0.000
#> GSM786529 3 0.2669 0.66247 0.000 0.008 0.836 0.000 0.156 0.000
#> GSM786530 3 0.3996 -0.00894 0.000 0.004 0.512 0.484 0.000 0.000
#> GSM786532 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786533 2 0.3868 -0.09589 0.000 0.504 0.000 0.000 0.000 0.496
#> GSM786544 3 0.0547 0.69071 0.000 0.000 0.980 0.000 0.020 0.000
#> GSM786547 2 0.2384 0.79705 0.000 0.888 0.064 0.000 0.048 0.000
#> GSM786549 3 0.2431 0.68066 0.000 0.008 0.860 0.000 0.132 0.000
#> GSM786550 5 0.3847 0.46042 0.000 0.008 0.348 0.000 0.644 0.000
#> GSM786563 5 0.0000 0.88654 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM786570 2 0.4386 0.72716 0.000 0.652 0.300 0.000 0.048 0.000
#> GSM786576 2 0.3672 0.26891 0.000 0.632 0.000 0.000 0.000 0.368
#> GSM786577 4 0.2300 0.79304 0.000 0.000 0.144 0.856 0.000 0.000
#> GSM786578 2 0.2597 0.79767 0.000 0.824 0.176 0.000 0.000 0.000
#> GSM786582 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786495 6 0.0000 0.92988 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786505 1 0.0547 0.96530 0.980 0.000 0.000 0.020 0.000 0.000
#> GSM786511 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786513 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786525 2 0.3076 0.77720 0.000 0.760 0.240 0.000 0.000 0.000
#> GSM786540 2 0.3076 0.77720 0.000 0.760 0.240 0.000 0.000 0.000
#> GSM786553 4 0.1663 0.82829 0.000 0.000 0.088 0.912 0.000 0.000
#> GSM786561 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786575 4 0.0547 0.90021 0.020 0.000 0.000 0.980 0.000 0.000
#> GSM786494 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786504 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786510 6 0.0000 0.92988 0.000 0.000 0.000 0.000 0.000 1.000
#> GSM786514 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786516 4 0.3999 -0.06592 0.000 0.004 0.496 0.500 0.000 0.000
#> GSM786520 1 0.0000 0.97367 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM786521 4 0.0000 0.91212 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM786536 3 0.1411 0.70185 0.000 0.004 0.936 0.060 0.000 0.000
#> GSM786542 2 0.3821 0.79548 0.000 0.772 0.148 0.000 0.080 0.000
#> GSM786546 3 0.3684 0.07110 0.000 0.332 0.664 0.000 0.004 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 specimen(p) disease.state(p) k
#> ATC:mclust 89 0.958 1.000 2
#> ATC:mclust 90 0.143 0.821 3
#> ATC:mclust 82 0.351 0.808 4
#> ATC:mclust 85 0.164 0.889 5
#> ATC:mclust 83 0.104 0.647 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 54547 rows and 93 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 0.933 0.952 0.979 0.5041 0.495 0.495
#> 3 3 0.770 0.846 0.929 0.3008 0.763 0.557
#> 4 4 0.588 0.638 0.802 0.1223 0.839 0.579
#> 5 5 0.558 0.449 0.689 0.0732 0.867 0.555
#> 6 6 0.599 0.433 0.669 0.0385 0.783 0.292
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
#> GSM786527 2 0.2948 0.934 0.052 0.948
#> GSM786539 1 0.0000 0.974 1.000 0.000
#> GSM786541 2 0.0000 0.982 0.000 1.000
#> GSM786556 2 0.0000 0.982 0.000 1.000
#> GSM786523 2 0.0000 0.982 0.000 1.000
#> GSM786497 1 0.0000 0.974 1.000 0.000
#> GSM786501 1 0.0000 0.974 1.000 0.000
#> GSM786517 1 0.8763 0.594 0.704 0.296
#> GSM786534 2 0.0000 0.982 0.000 1.000
#> GSM786555 2 0.0000 0.982 0.000 1.000
#> GSM786558 2 0.0000 0.982 0.000 1.000
#> GSM786559 2 0.8267 0.649 0.260 0.740
#> GSM786565 2 0.0000 0.982 0.000 1.000
#> GSM786572 2 0.0000 0.982 0.000 1.000
#> GSM786579 2 0.0000 0.982 0.000 1.000
#> GSM786491 1 0.0000 0.974 1.000 0.000
#> GSM786509 1 0.0000 0.974 1.000 0.000
#> GSM786538 1 0.0000 0.974 1.000 0.000
#> GSM786548 2 0.0000 0.982 0.000 1.000
#> GSM786562 1 0.0000 0.974 1.000 0.000
#> GSM786566 1 0.0000 0.974 1.000 0.000
#> GSM786573 2 0.0000 0.982 0.000 1.000
#> GSM786574 2 0.0000 0.982 0.000 1.000
#> GSM786580 1 0.0000 0.974 1.000 0.000
#> GSM786581 2 0.0000 0.982 0.000 1.000
#> GSM786583 2 0.0000 0.982 0.000 1.000
#> GSM786492 1 0.0000 0.974 1.000 0.000
#> GSM786493 2 0.0000 0.982 0.000 1.000
#> GSM786499 1 0.0000 0.974 1.000 0.000
#> GSM786502 1 0.0000 0.974 1.000 0.000
#> GSM786537 1 0.9209 0.510 0.664 0.336
#> GSM786567 2 0.0376 0.979 0.004 0.996
#> GSM786498 1 0.0000 0.974 1.000 0.000
#> GSM786500 1 0.0000 0.974 1.000 0.000
#> GSM786503 1 0.0000 0.974 1.000 0.000
#> GSM786507 1 0.0000 0.974 1.000 0.000
#> GSM786515 2 0.0000 0.982 0.000 1.000
#> GSM786522 2 0.1184 0.968 0.016 0.984
#> GSM786526 1 0.0000 0.974 1.000 0.000
#> GSM786528 1 0.0000 0.974 1.000 0.000
#> GSM786531 2 0.0000 0.982 0.000 1.000
#> GSM786535 2 0.0000 0.982 0.000 1.000
#> GSM786543 1 0.0000 0.974 1.000 0.000
#> GSM786545 2 0.0000 0.982 0.000 1.000
#> GSM786551 2 0.0000 0.982 0.000 1.000
#> GSM786552 2 0.0000 0.982 0.000 1.000
#> GSM786554 2 0.0000 0.982 0.000 1.000
#> GSM786557 1 0.0000 0.974 1.000 0.000
#> GSM786560 1 0.0000 0.974 1.000 0.000
#> GSM786564 1 0.8081 0.680 0.752 0.248
#> GSM786568 2 0.0000 0.982 0.000 1.000
#> GSM786569 1 0.0000 0.974 1.000 0.000
#> GSM786571 2 0.0000 0.982 0.000 1.000
#> GSM786496 2 0.0000 0.982 0.000 1.000
#> GSM786506 1 0.0000 0.974 1.000 0.000
#> GSM786508 1 0.0000 0.974 1.000 0.000
#> GSM786512 1 0.0000 0.974 1.000 0.000
#> GSM786518 1 0.0000 0.974 1.000 0.000
#> GSM786519 1 0.0000 0.974 1.000 0.000
#> GSM786524 1 0.0672 0.967 0.992 0.008
#> GSM786529 2 0.0000 0.982 0.000 1.000
#> GSM786530 2 0.6712 0.784 0.176 0.824
#> GSM786532 1 0.0672 0.967 0.992 0.008
#> GSM786533 2 0.0000 0.982 0.000 1.000
#> GSM786544 2 0.0000 0.982 0.000 1.000
#> GSM786547 2 0.0000 0.982 0.000 1.000
#> GSM786549 2 0.0000 0.982 0.000 1.000
#> GSM786550 2 0.0000 0.982 0.000 1.000
#> GSM786563 2 0.0000 0.982 0.000 1.000
#> GSM786570 2 0.0000 0.982 0.000 1.000
#> GSM786576 1 0.0000 0.974 1.000 0.000
#> GSM786577 1 0.6973 0.770 0.812 0.188
#> GSM786578 2 0.0000 0.982 0.000 1.000
#> GSM786582 1 0.0000 0.974 1.000 0.000
#> GSM786495 1 0.0000 0.974 1.000 0.000
#> GSM786505 1 0.0000 0.974 1.000 0.000
#> GSM786511 1 0.0000 0.974 1.000 0.000
#> GSM786513 1 0.0000 0.974 1.000 0.000
#> GSM786525 2 0.0000 0.982 0.000 1.000
#> GSM786540 2 0.0000 0.982 0.000 1.000
#> GSM786553 1 0.4939 0.869 0.892 0.108
#> GSM786561 1 0.0000 0.974 1.000 0.000
#> GSM786575 1 0.0000 0.974 1.000 0.000
#> GSM786494 1 0.0000 0.974 1.000 0.000
#> GSM786504 1 0.0000 0.974 1.000 0.000
#> GSM786510 1 0.0000 0.974 1.000 0.000
#> GSM786514 1 0.0000 0.974 1.000 0.000
#> GSM786516 2 0.8016 0.678 0.244 0.756
#> GSM786520 1 0.0000 0.974 1.000 0.000
#> GSM786521 1 0.0000 0.974 1.000 0.000
#> GSM786536 2 0.0000 0.982 0.000 1.000
#> GSM786542 2 0.0000 0.982 0.000 1.000
#> GSM786546 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
#> GSM786527 2 0.5968 0.4708 0.000 0.636 0.364
#> GSM786539 2 0.1643 0.8434 0.044 0.956 0.000
#> GSM786541 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786556 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786523 3 0.0592 0.9523 0.012 0.000 0.988
#> GSM786497 1 0.1964 0.8891 0.944 0.056 0.000
#> GSM786501 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786517 2 0.1163 0.8579 0.000 0.972 0.028
#> GSM786534 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786555 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786558 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786559 2 0.2165 0.8397 0.000 0.936 0.064
#> GSM786565 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786572 3 0.0237 0.9593 0.000 0.004 0.996
#> GSM786579 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786491 1 0.1163 0.8953 0.972 0.028 0.000
#> GSM786509 1 0.0592 0.8991 0.988 0.012 0.000
#> GSM786538 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786548 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786562 1 0.5497 0.6139 0.708 0.292 0.000
#> GSM786566 2 0.0237 0.8666 0.004 0.996 0.000
#> GSM786573 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786574 3 0.5760 0.4602 0.000 0.328 0.672
#> GSM786580 1 0.5098 0.6714 0.752 0.248 0.000
#> GSM786581 3 0.5810 0.4725 0.000 0.336 0.664
#> GSM786583 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786492 1 0.2711 0.8757 0.912 0.088 0.000
#> GSM786493 2 0.5810 0.5009 0.000 0.664 0.336
#> GSM786499 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786502 2 0.0237 0.8667 0.004 0.996 0.000
#> GSM786537 1 0.0237 0.8973 0.996 0.000 0.004
#> GSM786567 2 0.5706 0.5592 0.000 0.680 0.320
#> GSM786498 2 0.6280 -0.0229 0.460 0.540 0.000
#> GSM786500 1 0.0747 0.8983 0.984 0.016 0.000
#> GSM786503 2 0.0424 0.8648 0.008 0.992 0.000
#> GSM786507 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786515 3 0.5810 0.4741 0.000 0.336 0.664
#> GSM786522 1 0.5178 0.6342 0.744 0.000 0.256
#> GSM786526 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786528 1 0.1399 0.8976 0.968 0.028 0.004
#> GSM786531 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786535 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786543 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786545 3 0.0424 0.9557 0.008 0.000 0.992
#> GSM786551 3 0.1289 0.9323 0.032 0.000 0.968
#> GSM786552 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786554 2 0.5254 0.6323 0.000 0.736 0.264
#> GSM786557 1 0.3267 0.8611 0.884 0.116 0.000
#> GSM786560 1 0.2448 0.8817 0.924 0.076 0.000
#> GSM786564 2 0.4002 0.7741 0.000 0.840 0.160
#> GSM786568 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786569 1 0.4235 0.8143 0.824 0.176 0.000
#> GSM786571 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786496 3 0.0424 0.9564 0.000 0.008 0.992
#> GSM786506 2 0.1529 0.8463 0.040 0.960 0.000
#> GSM786508 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786512 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786518 1 0.1411 0.8941 0.964 0.036 0.000
#> GSM786519 2 0.5254 0.5544 0.264 0.736 0.000
#> GSM786524 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786529 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786530 1 0.5882 0.4894 0.652 0.000 0.348
#> GSM786532 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786533 3 0.0237 0.9593 0.000 0.004 0.996
#> GSM786544 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786547 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786549 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786550 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786563 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786570 3 0.0892 0.9461 0.000 0.020 0.980
#> GSM786576 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786577 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786578 3 0.3752 0.8083 0.000 0.144 0.856
#> GSM786582 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786495 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786505 1 0.3619 0.8484 0.864 0.136 0.000
#> GSM786511 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786513 1 0.0424 0.8991 0.992 0.008 0.000
#> GSM786525 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786540 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786553 1 0.5069 0.7928 0.828 0.044 0.128
#> GSM786561 1 0.2448 0.8816 0.924 0.076 0.000
#> GSM786575 1 0.0592 0.8985 0.988 0.012 0.000
#> GSM786494 1 0.3551 0.8510 0.868 0.132 0.000
#> GSM786504 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786510 2 0.0000 0.8677 0.000 1.000 0.000
#> GSM786514 1 0.0000 0.8985 1.000 0.000 0.000
#> GSM786516 1 0.5291 0.6200 0.732 0.000 0.268
#> GSM786520 1 0.4555 0.7910 0.800 0.200 0.000
#> GSM786521 1 0.4887 0.7025 0.772 0.228 0.000
#> GSM786536 3 0.0237 0.9588 0.004 0.000 0.996
#> GSM786542 3 0.0000 0.9618 0.000 0.000 1.000
#> GSM786546 3 0.0000 0.9618 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM786527 4 0.6275 0.4548 0.000 0.328 0.076 0.596
#> GSM786539 2 0.3312 0.7175 0.052 0.876 0.000 0.072
#> GSM786541 3 0.0592 0.8566 0.000 0.000 0.984 0.016
#> GSM786556 3 0.0469 0.8563 0.000 0.000 0.988 0.012
#> GSM786523 3 0.2081 0.8379 0.000 0.000 0.916 0.084
#> GSM786497 1 0.0469 0.7559 0.988 0.012 0.000 0.000
#> GSM786501 2 0.1452 0.7508 0.008 0.956 0.000 0.036
#> GSM786517 2 0.2593 0.7246 0.000 0.892 0.004 0.104
#> GSM786534 3 0.0817 0.8572 0.000 0.000 0.976 0.024
#> GSM786555 3 0.1743 0.8519 0.000 0.004 0.940 0.056
#> GSM786558 3 0.1902 0.8517 0.000 0.004 0.932 0.064
#> GSM786559 2 0.2489 0.7209 0.000 0.912 0.068 0.020
#> GSM786565 3 0.1824 0.8510 0.000 0.004 0.936 0.060
#> GSM786572 3 0.3439 0.8244 0.000 0.048 0.868 0.084
#> GSM786579 3 0.2048 0.8498 0.000 0.008 0.928 0.064
#> GSM786491 4 0.5594 0.1983 0.460 0.020 0.000 0.520
#> GSM786509 1 0.1388 0.7465 0.960 0.012 0.000 0.028
#> GSM786538 4 0.4464 0.6673 0.208 0.024 0.000 0.768
#> GSM786548 3 0.0336 0.8563 0.000 0.000 0.992 0.008
#> GSM786562 4 0.6316 0.6165 0.156 0.184 0.000 0.660
#> GSM786566 2 0.4517 0.6459 0.168 0.792 0.004 0.036
#> GSM786573 3 0.0469 0.8563 0.000 0.000 0.988 0.012
#> GSM786574 4 0.6327 0.4526 0.000 0.124 0.228 0.648
#> GSM786580 4 0.4462 0.6868 0.164 0.044 0.000 0.792
#> GSM786581 2 0.6889 0.1823 0.000 0.496 0.396 0.108
#> GSM786583 3 0.1118 0.8563 0.000 0.000 0.964 0.036
#> GSM786492 1 0.0672 0.7575 0.984 0.008 0.000 0.008
#> GSM786493 2 0.5947 0.4449 0.000 0.628 0.312 0.060
#> GSM786499 2 0.0672 0.7550 0.008 0.984 0.000 0.008
#> GSM786502 2 0.4989 0.6047 0.164 0.764 0.000 0.072
#> GSM786537 1 0.5004 0.1418 0.604 0.000 0.004 0.392
#> GSM786567 4 0.7798 0.1489 0.000 0.320 0.264 0.416
#> GSM786498 1 0.7775 0.0273 0.380 0.380 0.000 0.240
#> GSM786500 1 0.3479 0.6732 0.840 0.012 0.000 0.148
#> GSM786503 2 0.1284 0.7554 0.024 0.964 0.000 0.012
#> GSM786507 2 0.4072 0.4894 0.000 0.748 0.000 0.252
#> GSM786515 2 0.6366 0.1526 0.000 0.512 0.424 0.064
#> GSM786522 3 0.7113 0.3333 0.276 0.000 0.552 0.172
#> GSM786526 4 0.4011 0.6623 0.208 0.008 0.000 0.784
#> GSM786528 4 0.2957 0.6713 0.068 0.016 0.016 0.900
#> GSM786531 3 0.1389 0.8507 0.000 0.000 0.952 0.048
#> GSM786535 3 0.1022 0.8547 0.000 0.000 0.968 0.032
#> GSM786543 1 0.0707 0.7551 0.980 0.000 0.000 0.020
#> GSM786545 3 0.2081 0.8369 0.000 0.000 0.916 0.084
#> GSM786551 3 0.4697 0.5448 0.000 0.000 0.644 0.356
#> GSM786552 3 0.1474 0.8542 0.000 0.000 0.948 0.052
#> GSM786554 2 0.5453 0.4563 0.000 0.648 0.320 0.032
#> GSM786557 1 0.4761 0.6148 0.768 0.048 0.000 0.184
#> GSM786560 1 0.0672 0.7581 0.984 0.008 0.000 0.008
#> GSM786564 4 0.5284 0.3548 0.000 0.368 0.016 0.616
#> GSM786568 3 0.4348 0.7743 0.000 0.024 0.780 0.196
#> GSM786569 1 0.4401 0.6783 0.812 0.076 0.000 0.112
#> GSM786571 3 0.1792 0.8552 0.000 0.000 0.932 0.068
#> GSM786496 3 0.5619 0.5268 0.000 0.268 0.676 0.056
#> GSM786506 2 0.7153 0.2564 0.248 0.556 0.000 0.196
#> GSM786508 2 0.1356 0.7538 0.032 0.960 0.000 0.008
#> GSM786512 2 0.1004 0.7561 0.024 0.972 0.000 0.004
#> GSM786518 1 0.0000 0.7559 1.000 0.000 0.000 0.000
#> GSM786519 1 0.5310 0.2624 0.576 0.412 0.000 0.012
#> GSM786524 1 0.1389 0.7470 0.952 0.000 0.000 0.048
#> GSM786529 3 0.1022 0.8557 0.000 0.000 0.968 0.032
#> GSM786530 1 0.5599 0.3807 0.664 0.000 0.288 0.048
#> GSM786532 4 0.4472 0.6529 0.220 0.000 0.020 0.760
#> GSM786533 3 0.5312 0.5577 0.000 0.236 0.712 0.052
#> GSM786544 3 0.2216 0.8501 0.000 0.000 0.908 0.092
#> GSM786547 3 0.2797 0.8395 0.000 0.032 0.900 0.068
#> GSM786549 3 0.1716 0.8447 0.000 0.000 0.936 0.064
#> GSM786550 3 0.2760 0.7975 0.000 0.000 0.872 0.128
#> GSM786563 3 0.0707 0.8561 0.000 0.000 0.980 0.020
#> GSM786570 3 0.4040 0.6756 0.000 0.000 0.752 0.248
#> GSM786576 2 0.1867 0.7406 0.000 0.928 0.000 0.072
#> GSM786577 1 0.1978 0.7264 0.928 0.000 0.004 0.068
#> GSM786578 3 0.7892 0.0272 0.000 0.292 0.368 0.340
#> GSM786582 1 0.1118 0.7542 0.964 0.000 0.000 0.036
#> GSM786495 2 0.0672 0.7549 0.008 0.984 0.000 0.008
#> GSM786505 1 0.6950 0.3346 0.584 0.180 0.000 0.236
#> GSM786511 1 0.1637 0.7419 0.940 0.000 0.000 0.060
#> GSM786513 4 0.5143 0.3647 0.360 0.012 0.000 0.628
#> GSM786525 4 0.5546 0.3577 0.000 0.044 0.292 0.664
#> GSM786540 3 0.6875 0.3675 0.000 0.108 0.504 0.388
#> GSM786553 4 0.4830 0.6777 0.184 0.008 0.036 0.772
#> GSM786561 1 0.0469 0.7576 0.988 0.000 0.000 0.012
#> GSM786575 4 0.6217 0.5604 0.292 0.084 0.000 0.624
#> GSM786494 1 0.5031 0.6305 0.768 0.092 0.000 0.140
#> GSM786504 4 0.3982 0.6373 0.220 0.000 0.004 0.776
#> GSM786510 2 0.0927 0.7530 0.008 0.976 0.000 0.016
#> GSM786514 1 0.4804 0.2756 0.616 0.000 0.000 0.384
#> GSM786516 1 0.5234 0.5466 0.752 0.000 0.152 0.096
#> GSM786520 1 0.3697 0.7078 0.852 0.100 0.000 0.048
#> GSM786521 4 0.3984 0.6908 0.132 0.040 0.000 0.828
#> GSM786536 3 0.3208 0.7976 0.004 0.000 0.848 0.148
#> GSM786542 3 0.0921 0.8570 0.000 0.000 0.972 0.028
#> GSM786546 3 0.4543 0.5660 0.000 0.000 0.676 0.324
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM786527 1 0.6220 0.4677 0.560 0.264 0.172 0.000 0.004
#> GSM786539 2 0.7674 0.3495 0.256 0.372 0.000 0.052 0.320
#> GSM786541 3 0.3876 0.4984 0.000 0.000 0.684 0.000 0.316
#> GSM786556 3 0.3661 0.5279 0.000 0.000 0.724 0.000 0.276
#> GSM786523 3 0.3694 0.5848 0.052 0.004 0.848 0.024 0.072
#> GSM786497 4 0.1386 0.7248 0.016 0.032 0.000 0.952 0.000
#> GSM786501 2 0.1942 0.6234 0.012 0.920 0.000 0.000 0.068
#> GSM786517 5 0.6333 0.0691 0.196 0.288 0.000 0.000 0.516
#> GSM786534 3 0.4060 0.4526 0.000 0.000 0.640 0.000 0.360
#> GSM786555 5 0.4437 -0.0407 0.004 0.000 0.464 0.000 0.532
#> GSM786558 5 0.5306 0.0802 0.044 0.004 0.400 0.000 0.552
#> GSM786559 2 0.4562 0.0686 0.000 0.496 0.008 0.000 0.496
#> GSM786565 3 0.4596 0.0912 0.004 0.004 0.500 0.000 0.492
#> GSM786572 5 0.3978 0.5470 0.004 0.052 0.148 0.000 0.796
#> GSM786579 5 0.4596 -0.2101 0.004 0.004 0.496 0.000 0.496
#> GSM786491 2 0.8776 -0.0539 0.284 0.376 0.180 0.124 0.036
#> GSM786509 4 0.4876 0.6097 0.000 0.200 0.012 0.724 0.064
#> GSM786538 1 0.2152 0.6443 0.924 0.032 0.012 0.032 0.000
#> GSM786548 3 0.2953 0.6085 0.012 0.000 0.844 0.000 0.144
#> GSM786562 1 0.4086 0.4686 0.736 0.240 0.000 0.024 0.000
#> GSM786566 2 0.4971 0.5501 0.020 0.784 0.048 0.072 0.076
#> GSM786573 3 0.3730 0.5179 0.000 0.000 0.712 0.000 0.288
#> GSM786574 1 0.5624 0.2365 0.608 0.008 0.080 0.000 0.304
#> GSM786580 1 0.1405 0.6453 0.956 0.016 0.008 0.020 0.000
#> GSM786581 5 0.4177 0.5074 0.004 0.200 0.036 0.000 0.760
#> GSM786583 3 0.4435 0.5521 0.016 0.000 0.648 0.000 0.336
#> GSM786492 4 0.1310 0.7260 0.020 0.024 0.000 0.956 0.000
#> GSM786493 5 0.4108 0.3413 0.000 0.308 0.008 0.000 0.684
#> GSM786499 2 0.2513 0.6130 0.008 0.876 0.000 0.000 0.116
#> GSM786502 2 0.4085 0.5430 0.084 0.804 0.000 0.104 0.008
#> GSM786537 4 0.5938 0.0194 0.440 0.000 0.016 0.480 0.064
#> GSM786567 1 0.6165 0.2728 0.608 0.040 0.084 0.000 0.268
#> GSM786498 2 0.6307 0.2991 0.284 0.540 0.000 0.172 0.004
#> GSM786500 4 0.6234 0.4002 0.176 0.296 0.000 0.528 0.000
#> GSM786503 2 0.2865 0.6026 0.008 0.856 0.000 0.004 0.132
#> GSM786507 2 0.4668 0.4531 0.272 0.684 0.000 0.000 0.044
#> GSM786515 5 0.4308 0.5500 0.004 0.168 0.060 0.000 0.768
#> GSM786522 3 0.4973 0.5294 0.072 0.004 0.768 0.048 0.108
#> GSM786526 1 0.6041 0.6027 0.684 0.040 0.184 0.024 0.068
#> GSM786528 1 0.7771 0.4794 0.492 0.172 0.236 0.008 0.092
#> GSM786531 3 0.1285 0.6108 0.004 0.004 0.956 0.000 0.036
#> GSM786535 3 0.2124 0.6155 0.000 0.004 0.900 0.000 0.096
#> GSM786543 4 0.0404 0.7234 0.012 0.000 0.000 0.988 0.000
#> GSM786545 3 0.3484 0.5989 0.056 0.004 0.852 0.008 0.080
#> GSM786551 3 0.5269 0.5164 0.140 0.000 0.708 0.012 0.140
#> GSM786552 3 0.4341 0.3880 0.004 0.000 0.592 0.000 0.404
#> GSM786554 5 0.5500 0.2104 0.000 0.376 0.072 0.000 0.552
#> GSM786557 4 0.6303 0.4443 0.228 0.212 0.000 0.556 0.004
#> GSM786560 4 0.1471 0.7263 0.020 0.024 0.000 0.952 0.004
#> GSM786564 1 0.4058 0.5853 0.820 0.096 0.036 0.000 0.048
#> GSM786568 5 0.6054 0.2937 0.304 0.016 0.100 0.000 0.580
#> GSM786569 4 0.6080 0.4298 0.132 0.308 0.000 0.556 0.004
#> GSM786571 3 0.4397 0.3930 0.004 0.000 0.564 0.000 0.432
#> GSM786496 5 0.5838 0.3297 0.000 0.112 0.336 0.000 0.552
#> GSM786506 2 0.4612 0.5026 0.116 0.756 0.000 0.124 0.004
#> GSM786508 2 0.3523 0.6123 0.004 0.824 0.000 0.032 0.140
#> GSM786512 2 0.3607 0.5125 0.004 0.752 0.000 0.000 0.244
#> GSM786518 4 0.1018 0.7252 0.016 0.016 0.000 0.968 0.000
#> GSM786519 2 0.4436 0.1864 0.000 0.596 0.000 0.396 0.008
#> GSM786524 4 0.6138 0.3805 0.060 0.000 0.244 0.628 0.068
#> GSM786529 3 0.4211 0.4382 0.004 0.000 0.636 0.000 0.360
#> GSM786530 4 0.5145 0.5642 0.032 0.000 0.116 0.740 0.112
#> GSM786532 1 0.7139 0.5461 0.580 0.076 0.244 0.032 0.068
#> GSM786533 3 0.5416 0.3263 0.004 0.248 0.652 0.000 0.096
#> GSM786544 3 0.5092 0.3926 0.012 0.000 0.508 0.016 0.464
#> GSM786547 5 0.4258 0.5334 0.000 0.072 0.160 0.000 0.768
#> GSM786549 3 0.3009 0.6181 0.052 0.000 0.876 0.008 0.064
#> GSM786550 3 0.2708 0.6238 0.044 0.000 0.884 0.000 0.072
#> GSM786563 3 0.3730 0.5179 0.000 0.000 0.712 0.000 0.288
#> GSM786570 1 0.6532 -0.2099 0.420 0.000 0.196 0.000 0.384
#> GSM786576 2 0.5773 0.2716 0.092 0.512 0.000 0.000 0.396
#> GSM786577 4 0.2278 0.6898 0.032 0.000 0.000 0.908 0.060
#> GSM786578 5 0.7115 0.0460 0.412 0.076 0.092 0.000 0.420
#> GSM786582 4 0.1988 0.7157 0.048 0.000 0.016 0.928 0.008
#> GSM786495 2 0.2462 0.6137 0.008 0.880 0.000 0.000 0.112
#> GSM786505 2 0.6708 0.1448 0.280 0.468 0.000 0.248 0.004
#> GSM786511 4 0.3051 0.6743 0.120 0.000 0.000 0.852 0.028
#> GSM786513 1 0.8741 0.4529 0.472 0.124 0.188 0.120 0.096
#> GSM786525 3 0.5920 0.0581 0.384 0.024 0.536 0.000 0.056
#> GSM786540 3 0.6564 0.3750 0.240 0.052 0.592 0.000 0.116
#> GSM786553 1 0.3573 0.6428 0.864 0.052 0.028 0.040 0.016
#> GSM786561 4 0.1471 0.7262 0.024 0.020 0.000 0.952 0.004
#> GSM786575 1 0.3731 0.5653 0.816 0.112 0.000 0.072 0.000
#> GSM786494 4 0.6432 0.2757 0.156 0.372 0.000 0.468 0.004
#> GSM786504 1 0.5452 0.6090 0.720 0.000 0.128 0.044 0.108
#> GSM786510 2 0.4108 0.4406 0.000 0.684 0.008 0.000 0.308
#> GSM786514 1 0.5268 0.3042 0.612 0.000 0.000 0.320 0.068
#> GSM786516 4 0.4118 0.6354 0.028 0.000 0.068 0.816 0.088
#> GSM786520 4 0.5438 0.4549 0.064 0.340 0.000 0.592 0.004
#> GSM786521 1 0.1518 0.6469 0.952 0.020 0.012 0.016 0.000
#> GSM786536 3 0.4732 0.5718 0.092 0.000 0.760 0.016 0.132
#> GSM786542 3 0.2052 0.6189 0.004 0.004 0.912 0.000 0.080
#> GSM786546 3 0.4846 0.5176 0.184 0.004 0.732 0.004 0.076
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM786527 3 0.7564 0.29932 0.172 0.032 0.508 0.152 0.124 0.012
#> GSM786539 6 0.7221 -0.08774 0.344 0.000 0.016 0.084 0.152 0.404
#> GSM786541 2 0.0806 0.75156 0.000 0.972 0.020 0.000 0.008 0.000
#> GSM786556 2 0.0777 0.75061 0.000 0.972 0.024 0.000 0.004 0.000
#> GSM786523 3 0.5529 0.51837 0.000 0.276 0.604 0.040 0.080 0.000
#> GSM786497 4 0.3684 0.66794 0.332 0.000 0.000 0.664 0.000 0.004
#> GSM786501 6 0.5969 0.14010 0.188 0.000 0.008 0.012 0.232 0.560
#> GSM786517 6 0.5539 0.42181 0.020 0.016 0.040 0.148 0.072 0.704
#> GSM786534 2 0.0976 0.75413 0.000 0.968 0.016 0.000 0.008 0.008
#> GSM786555 2 0.2451 0.74544 0.000 0.884 0.000 0.000 0.056 0.060
#> GSM786558 2 0.3718 0.70640 0.000 0.808 0.004 0.012 0.060 0.116
#> GSM786559 6 0.1977 0.50192 0.008 0.040 0.000 0.000 0.032 0.920
#> GSM786565 2 0.2149 0.74644 0.000 0.900 0.004 0.000 0.016 0.080
#> GSM786572 6 0.5592 0.02505 0.000 0.404 0.004 0.008 0.096 0.488
#> GSM786579 2 0.4359 0.66308 0.000 0.752 0.036 0.000 0.052 0.160
#> GSM786491 1 0.5604 0.16055 0.652 0.000 0.160 0.060 0.128 0.000
#> GSM786509 4 0.6485 0.37664 0.336 0.000 0.028 0.420 0.216 0.000
#> GSM786538 1 0.5880 0.41263 0.604 0.000 0.176 0.176 0.044 0.000
#> GSM786548 2 0.1657 0.74257 0.000 0.928 0.056 0.000 0.016 0.000
#> GSM786562 1 0.5679 0.41522 0.620 0.000 0.100 0.228 0.052 0.000
#> GSM786566 5 0.5724 0.00000 0.312 0.000 0.008 0.000 0.528 0.152
#> GSM786573 2 0.0622 0.75192 0.000 0.980 0.012 0.000 0.008 0.000
#> GSM786574 4 0.9329 -0.23746 0.028 0.172 0.168 0.252 0.232 0.148
#> GSM786580 1 0.7557 0.29262 0.352 0.000 0.192 0.260 0.196 0.000
#> GSM786581 6 0.4666 0.42785 0.000 0.184 0.008 0.008 0.084 0.716
#> GSM786583 2 0.3738 0.44070 0.000 0.680 0.312 0.000 0.004 0.004
#> GSM786492 4 0.3634 0.65764 0.356 0.000 0.000 0.644 0.000 0.000
#> GSM786493 6 0.2270 0.50333 0.000 0.020 0.004 0.004 0.072 0.900
#> GSM786499 6 0.4954 0.26867 0.128 0.000 0.000 0.000 0.232 0.640
#> GSM786502 1 0.3664 0.21267 0.804 0.000 0.000 0.008 0.080 0.108
#> GSM786537 3 0.5828 0.33924 0.012 0.000 0.504 0.340 0.144 0.000
#> GSM786567 2 0.9211 0.00242 0.088 0.280 0.108 0.252 0.216 0.056
#> GSM786498 1 0.0436 0.45935 0.988 0.000 0.000 0.004 0.004 0.004
#> GSM786500 1 0.2378 0.41924 0.848 0.000 0.000 0.152 0.000 0.000
#> GSM786503 6 0.4690 0.37911 0.112 0.000 0.016 0.000 0.156 0.716
#> GSM786507 6 0.6185 0.19291 0.240 0.000 0.036 0.044 0.080 0.600
#> GSM786515 6 0.3362 0.49846 0.000 0.096 0.000 0.004 0.076 0.824
#> GSM786522 3 0.5793 0.52392 0.000 0.136 0.588 0.032 0.244 0.000
#> GSM786526 3 0.3307 0.60597 0.116 0.000 0.832 0.028 0.024 0.000
#> GSM786528 3 0.3387 0.61592 0.104 0.004 0.836 0.032 0.024 0.000
#> GSM786531 2 0.4032 0.62772 0.000 0.764 0.140 0.000 0.092 0.004
#> GSM786535 2 0.2452 0.72771 0.000 0.892 0.056 0.000 0.044 0.008
#> GSM786543 4 0.3575 0.66579 0.284 0.000 0.008 0.708 0.000 0.000
#> GSM786545 3 0.5270 0.26954 0.000 0.408 0.508 0.008 0.076 0.000
#> GSM786551 3 0.3301 0.65434 0.000 0.124 0.828 0.032 0.016 0.000
#> GSM786552 2 0.2860 0.74102 0.000 0.872 0.032 0.000 0.028 0.068
#> GSM786554 6 0.3784 0.46186 0.000 0.144 0.000 0.000 0.080 0.776
#> GSM786557 1 0.2902 0.35218 0.800 0.000 0.000 0.196 0.004 0.000
#> GSM786560 4 0.3872 0.62401 0.392 0.000 0.000 0.604 0.004 0.000
#> GSM786564 1 0.7850 0.31538 0.412 0.016 0.116 0.260 0.180 0.016
#> GSM786568 6 0.8115 0.22126 0.000 0.100 0.200 0.076 0.232 0.392
#> GSM786569 1 0.2454 0.40449 0.840 0.000 0.000 0.160 0.000 0.000
#> GSM786571 2 0.3234 0.73645 0.000 0.856 0.024 0.008 0.040 0.072
#> GSM786496 2 0.4549 0.36986 0.000 0.596 0.008 0.000 0.028 0.368
#> GSM786506 1 0.2442 0.33775 0.884 0.000 0.000 0.000 0.048 0.068
#> GSM786508 6 0.5220 0.06907 0.264 0.000 0.000 0.000 0.140 0.596
#> GSM786512 6 0.4014 0.38511 0.096 0.000 0.000 0.000 0.148 0.756
#> GSM786518 4 0.3515 0.66933 0.324 0.000 0.000 0.676 0.000 0.000
#> GSM786519 1 0.6543 -0.34198 0.440 0.000 0.000 0.364 0.064 0.132
#> GSM786524 3 0.5194 0.48788 0.044 0.000 0.620 0.292 0.044 0.000
#> GSM786529 2 0.1334 0.75464 0.000 0.948 0.000 0.000 0.032 0.020
#> GSM786530 3 0.5764 0.47920 0.000 0.108 0.536 0.336 0.012 0.008
#> GSM786532 3 0.2902 0.64450 0.056 0.024 0.880 0.020 0.020 0.000
#> GSM786533 2 0.5611 0.21519 0.000 0.508 0.012 0.000 0.372 0.108
#> GSM786544 2 0.6767 0.10165 0.000 0.472 0.356 0.048 0.060 0.064
#> GSM786547 6 0.4919 0.41763 0.000 0.216 0.016 0.000 0.092 0.676
#> GSM786549 3 0.4800 0.15320 0.000 0.468 0.492 0.016 0.024 0.000
#> GSM786550 2 0.3487 0.70670 0.000 0.824 0.060 0.016 0.100 0.000
#> GSM786563 2 0.0891 0.74997 0.000 0.968 0.008 0.000 0.024 0.000
#> GSM786570 2 0.7366 0.32806 0.004 0.484 0.088 0.188 0.212 0.024
#> GSM786576 6 0.3917 0.48824 0.052 0.000 0.028 0.036 0.060 0.824
#> GSM786577 4 0.4099 0.36237 0.048 0.000 0.244 0.708 0.000 0.000
#> GSM786578 6 0.9110 0.10216 0.016 0.208 0.212 0.140 0.144 0.280
#> GSM786582 4 0.5336 0.62843 0.288 0.000 0.096 0.600 0.016 0.000
#> GSM786495 6 0.5557 0.09889 0.148 0.000 0.000 0.004 0.300 0.548
#> GSM786505 1 0.0603 0.46371 0.980 0.000 0.000 0.016 0.004 0.000
#> GSM786511 4 0.5043 0.63729 0.260 0.000 0.048 0.652 0.040 0.000
#> GSM786513 3 0.4456 0.57668 0.140 0.000 0.756 0.072 0.028 0.004
#> GSM786525 3 0.6149 0.53634 0.028 0.064 0.676 0.080 0.124 0.028
#> GSM786540 3 0.7353 0.46662 0.012 0.128 0.568 0.092 0.100 0.100
#> GSM786553 1 0.6315 0.40030 0.552 0.000 0.176 0.212 0.060 0.000
#> GSM786561 4 0.3695 0.64485 0.376 0.000 0.000 0.624 0.000 0.000
#> GSM786575 1 0.5889 0.44400 0.620 0.000 0.068 0.180 0.132 0.000
#> GSM786494 1 0.2320 0.43315 0.864 0.000 0.000 0.132 0.004 0.000
#> GSM786504 3 0.3734 0.60929 0.040 0.000 0.824 0.064 0.068 0.004
#> GSM786510 6 0.3453 0.41504 0.044 0.000 0.000 0.000 0.164 0.792
#> GSM786514 4 0.7719 0.14017 0.208 0.000 0.252 0.360 0.172 0.008
#> GSM786516 3 0.5320 0.20790 0.040 0.012 0.472 0.464 0.008 0.004
#> GSM786520 1 0.2879 0.36726 0.816 0.000 0.000 0.176 0.004 0.004
#> GSM786521 1 0.7539 0.29943 0.360 0.000 0.204 0.252 0.184 0.000
#> GSM786536 3 0.3865 0.64768 0.000 0.156 0.788 0.032 0.016 0.008
#> GSM786542 2 0.5957 0.23068 0.000 0.508 0.264 0.000 0.220 0.008
#> GSM786546 3 0.3948 0.64544 0.004 0.132 0.780 0.000 0.080 0.004
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 specimen(p) disease.state(p) k
#> ATC:NMF 93 0.1700 1.000 2
#> ATC:NMF 87 0.0739 0.751 3
#> ATC:NMF 71 0.2418 0.826 4
#> ATC:NMF 50 0.6423 0.797 5
#> ATC:NMF 37 0.1019 0.694 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