Date: 2019-12-25 21:03:48 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 17698 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] 17698 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 | ||
---|---|---|---|---|---|---|
SD:kmeans | 2 | 1.000 | 0.946 | 0.965 | ** | |
SD:skmeans | 2 | 1.000 | 0.963 | 0.985 | ** | |
CV:skmeans | 2 | 1.000 | 0.962 | 0.984 | ** | |
MAD:kmeans | 2 | 1.000 | 0.972 | 0.985 | ** | |
MAD:skmeans | 2 | 1.000 | 0.966 | 0.987 | ** | |
MAD:NMF | 2 | 0.975 | 0.939 | 0.974 | ** | |
CV:kmeans | 2 | 0.929 | 0.940 | 0.958 | * | |
ATC:skmeans | 3 | 0.927 | 0.938 | 0.971 | * | 2 |
ATC:kmeans | 3 | 0.920 | 0.906 | 0.956 | * | |
ATC:NMF | 2 | 0.913 | 0.939 | 0.974 | * | |
ATC:pam | 5 | 0.909 | 0.897 | 0.956 | * | |
SD:NMF | 2 | 0.889 | 0.918 | 0.967 | ||
ATC:mclust | 2 | 0.888 | 0.910 | 0.958 | ||
CV:pam | 2 | 0.849 | 0.928 | 0.964 | ||
MAD:pam | 2 | 0.834 | 0.938 | 0.971 | ||
CV:NMF | 2 | 0.827 | 0.915 | 0.963 | ||
SD:pam | 2 | 0.802 | 0.936 | 0.971 | ||
SD:mclust | 6 | 0.643 | 0.662 | 0.790 | ||
MAD:mclust | 6 | 0.639 | 0.568 | 0.784 | ||
CV:mclust | 6 | 0.629 | 0.628 | 0.772 | ||
ATC:hclust | 3 | 0.541 | 0.782 | 0.847 | ||
SD:hclust | 4 | 0.427 | 0.661 | 0.803 | ||
MAD:hclust | 2 | 0.299 | 0.734 | 0.849 | ||
CV:hclust | 2 | 0.258 | 0.737 | 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.889 0.918 0.967 0.494 0.504 0.504
#> CV:NMF 2 0.827 0.915 0.963 0.494 0.508 0.508
#> MAD:NMF 2 0.975 0.939 0.974 0.495 0.502 0.502
#> ATC:NMF 2 0.913 0.939 0.974 0.481 0.520 0.520
#> SD:skmeans 2 1.000 0.963 0.985 0.500 0.499 0.499
#> CV:skmeans 2 1.000 0.962 0.984 0.500 0.499 0.499
#> MAD:skmeans 2 1.000 0.966 0.987 0.500 0.499 0.499
#> ATC:skmeans 2 1.000 0.990 0.995 0.497 0.504 0.504
#> SD:mclust 2 0.249 0.611 0.745 0.417 0.502 0.502
#> CV:mclust 2 0.189 0.571 0.773 0.406 0.497 0.497
#> MAD:mclust 2 0.219 0.650 0.779 0.439 0.525 0.525
#> ATC:mclust 2 0.888 0.910 0.958 0.488 0.511 0.511
#> SD:kmeans 2 1.000 0.946 0.965 0.494 0.508 0.508
#> CV:kmeans 2 0.929 0.940 0.958 0.492 0.508 0.508
#> MAD:kmeans 2 1.000 0.972 0.985 0.495 0.508 0.508
#> ATC:kmeans 2 0.894 0.908 0.961 0.476 0.531 0.531
#> SD:pam 2 0.802 0.936 0.971 0.440 0.566 0.566
#> CV:pam 2 0.849 0.928 0.964 0.439 0.575 0.575
#> MAD:pam 2 0.834 0.938 0.971 0.441 0.566 0.566
#> ATC:pam 2 0.892 0.940 0.973 0.443 0.551 0.551
#> SD:hclust 2 0.224 0.715 0.778 0.431 0.525 0.525
#> CV:hclust 2 0.258 0.737 0.845 0.439 0.537 0.537
#> MAD:hclust 2 0.299 0.734 0.849 0.449 0.520 0.520
#> ATC:hclust 2 0.297 0.630 0.790 0.353 0.647 0.647
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.630 0.835 0.910 0.342 0.698 0.469
#> CV:NMF 3 0.638 0.825 0.906 0.344 0.705 0.480
#> MAD:NMF 3 0.719 0.835 0.921 0.347 0.704 0.475
#> ATC:NMF 3 0.875 0.892 0.950 0.381 0.689 0.465
#> SD:skmeans 3 0.682 0.794 0.895 0.340 0.711 0.481
#> CV:skmeans 3 0.670 0.807 0.885 0.341 0.699 0.466
#> MAD:skmeans 3 0.750 0.801 0.903 0.341 0.711 0.481
#> ATC:skmeans 3 0.927 0.938 0.971 0.352 0.701 0.471
#> SD:mclust 3 0.175 0.622 0.749 0.260 0.737 0.594
#> CV:mclust 3 0.223 0.683 0.770 0.223 0.716 0.562
#> MAD:mclust 3 0.295 0.586 0.708 0.273 0.673 0.450
#> ATC:mclust 3 0.645 0.826 0.880 0.211 0.713 0.516
#> SD:kmeans 3 0.475 0.691 0.814 0.314 0.716 0.499
#> CV:kmeans 3 0.505 0.740 0.837 0.319 0.694 0.469
#> MAD:kmeans 3 0.529 0.720 0.849 0.316 0.721 0.507
#> ATC:kmeans 3 0.920 0.906 0.956 0.372 0.717 0.513
#> SD:pam 3 0.726 0.844 0.926 0.373 0.776 0.626
#> CV:pam 3 0.679 0.804 0.898 0.389 0.780 0.633
#> MAD:pam 3 0.589 0.818 0.899 0.380 0.776 0.626
#> ATC:pam 3 0.865 0.878 0.951 0.406 0.788 0.629
#> SD:hclust 3 0.343 0.663 0.802 0.413 0.782 0.624
#> CV:hclust 3 0.358 0.663 0.804 0.376 0.786 0.632
#> MAD:hclust 3 0.411 0.692 0.828 0.369 0.819 0.672
#> ATC:hclust 3 0.541 0.782 0.847 0.650 0.747 0.626
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.540 0.646 0.814 0.1146 0.866 0.631
#> CV:NMF 4 0.547 0.655 0.805 0.1150 0.866 0.631
#> MAD:NMF 4 0.536 0.632 0.800 0.1101 0.889 0.684
#> ATC:NMF 4 0.705 0.752 0.873 0.1018 0.916 0.756
#> SD:skmeans 4 0.652 0.640 0.809 0.1080 0.883 0.669
#> CV:skmeans 4 0.608 0.600 0.780 0.1092 0.888 0.681
#> MAD:skmeans 4 0.654 0.607 0.806 0.1054 0.818 0.525
#> ATC:skmeans 4 0.857 0.862 0.934 0.0950 0.902 0.716
#> SD:mclust 4 0.364 0.609 0.750 0.2022 0.806 0.648
#> CV:mclust 4 0.328 0.574 0.714 0.2663 0.826 0.676
#> MAD:mclust 4 0.367 0.589 0.744 0.1664 0.790 0.529
#> ATC:mclust 4 0.705 0.689 0.836 0.1649 0.818 0.575
#> SD:kmeans 4 0.522 0.588 0.760 0.1088 0.920 0.777
#> CV:kmeans 4 0.506 0.514 0.719 0.1153 0.869 0.648
#> MAD:kmeans 4 0.562 0.586 0.773 0.1094 0.898 0.720
#> ATC:kmeans 4 0.660 0.666 0.811 0.1049 0.890 0.706
#> SD:pam 4 0.586 0.635 0.820 0.1704 0.885 0.722
#> CV:pam 4 0.603 0.786 0.846 0.1894 0.842 0.618
#> MAD:pam 4 0.544 0.641 0.808 0.1729 0.865 0.673
#> ATC:pam 4 0.743 0.765 0.869 0.0989 0.907 0.769
#> SD:hclust 4 0.427 0.661 0.803 0.0928 0.956 0.894
#> CV:hclust 4 0.408 0.643 0.790 0.0966 0.943 0.866
#> MAD:hclust 4 0.438 0.654 0.801 0.0970 0.904 0.780
#> ATC:hclust 4 0.645 0.799 0.858 0.0805 0.964 0.921
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.525 0.474 0.675 0.0671 0.906 0.675
#> CV:NMF 5 0.531 0.471 0.687 0.0665 0.907 0.676
#> MAD:NMF 5 0.529 0.445 0.649 0.0613 0.893 0.639
#> ATC:NMF 5 0.647 0.619 0.801 0.0554 0.895 0.665
#> SD:skmeans 5 0.677 0.691 0.814 0.0678 0.921 0.716
#> CV:skmeans 5 0.673 0.696 0.813 0.0665 0.927 0.731
#> MAD:skmeans 5 0.704 0.728 0.834 0.0672 0.919 0.706
#> ATC:skmeans 5 0.801 0.767 0.876 0.0757 0.880 0.593
#> SD:mclust 5 0.616 0.663 0.825 0.0883 0.860 0.656
#> CV:mclust 5 0.587 0.610 0.803 0.1099 0.811 0.565
#> MAD:mclust 5 0.581 0.645 0.802 0.0841 0.863 0.641
#> ATC:mclust 5 0.718 0.483 0.772 0.1221 0.821 0.509
#> SD:kmeans 5 0.616 0.617 0.772 0.0812 0.812 0.462
#> CV:kmeans 5 0.586 0.588 0.722 0.0752 0.849 0.527
#> MAD:kmeans 5 0.628 0.615 0.764 0.0771 0.812 0.452
#> ATC:kmeans 5 0.677 0.665 0.826 0.0775 0.849 0.546
#> SD:pam 5 0.713 0.762 0.855 0.0857 0.846 0.555
#> CV:pam 5 0.614 0.642 0.779 0.0696 0.822 0.478
#> MAD:pam 5 0.664 0.712 0.837 0.0757 0.818 0.476
#> ATC:pam 5 0.909 0.897 0.956 0.0979 0.865 0.626
#> SD:hclust 5 0.423 0.588 0.767 0.0479 0.997 0.993
#> CV:hclust 5 0.432 0.578 0.755 0.0374 0.997 0.993
#> MAD:hclust 5 0.467 0.583 0.765 0.0479 0.981 0.950
#> ATC:hclust 5 0.615 0.737 0.837 0.1894 0.817 0.561
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.615 0.535 0.725 0.0419 0.886 0.555
#> CV:NMF 6 0.607 0.519 0.715 0.0415 0.908 0.621
#> MAD:NMF 6 0.611 0.532 0.721 0.0427 0.881 0.544
#> ATC:NMF 6 0.606 0.442 0.701 0.0473 0.939 0.778
#> SD:skmeans 6 0.693 0.564 0.759 0.0415 0.960 0.828
#> CV:skmeans 6 0.681 0.546 0.748 0.0431 0.964 0.842
#> MAD:skmeans 6 0.707 0.607 0.759 0.0430 0.965 0.842
#> ATC:skmeans 6 0.779 0.672 0.813 0.0353 0.968 0.851
#> SD:mclust 6 0.643 0.662 0.790 0.1284 0.878 0.625
#> CV:mclust 6 0.629 0.628 0.772 0.1170 0.865 0.598
#> MAD:mclust 6 0.639 0.568 0.784 0.0980 0.873 0.600
#> ATC:mclust 6 0.853 0.769 0.860 0.0186 0.836 0.489
#> SD:kmeans 6 0.622 0.586 0.723 0.0467 0.941 0.739
#> CV:kmeans 6 0.625 0.576 0.722 0.0482 0.917 0.654
#> MAD:kmeans 6 0.639 0.564 0.711 0.0492 0.942 0.743
#> ATC:kmeans 6 0.691 0.548 0.747 0.0479 0.933 0.730
#> SD:pam 6 0.700 0.634 0.766 0.0404 0.960 0.837
#> CV:pam 6 0.646 0.589 0.740 0.0482 0.942 0.759
#> MAD:pam 6 0.656 0.634 0.785 0.0391 0.981 0.919
#> ATC:pam 6 0.852 0.804 0.892 0.0425 0.993 0.974
#> SD:hclust 6 0.455 0.597 0.745 0.0252 0.982 0.951
#> CV:hclust 6 0.463 0.558 0.732 0.0343 0.996 0.989
#> MAD:hclust 6 0.473 0.531 0.742 0.0374 0.955 0.878
#> ATC:hclust 6 0.660 0.712 0.823 0.0382 0.979 0.912
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 individual(p) k
#> SD:NMF 89 0.657 2
#> CV:NMF 89 0.657 2
#> MAD:NMF 89 0.657 2
#> ATC:NMF 90 0.682 2
#> SD:skmeans 91 0.564 2
#> CV:skmeans 91 0.564 2
#> MAD:skmeans 91 0.564 2
#> ATC:skmeans 93 0.499 2
#> SD:mclust 86 0.768 2
#> CV:mclust 81 0.872 2
#> MAD:mclust 89 0.886 2
#> ATC:mclust 89 0.500 2
#> SD:kmeans 92 0.366 2
#> CV:kmeans 93 0.296 2
#> MAD:kmeans 93 0.296 2
#> ATC:kmeans 85 0.466 2
#> SD:pam 92 0.191 2
#> CV:pam 92 0.191 2
#> MAD:pam 92 0.191 2
#> ATC:pam 91 0.152 2
#> SD:hclust 87 0.109 2
#> CV:hclust 86 0.171 2
#> MAD:hclust 85 0.138 2
#> ATC:hclust 71 0.443 2
test_to_known_factors(res_list, k = 3)
#> n individual(p) k
#> SD:NMF 89 0.275 3
#> CV:NMF 89 0.240 3
#> MAD:NMF 87 0.328 3
#> ATC:NMF 90 0.560 3
#> SD:skmeans 88 0.619 3
#> CV:skmeans 88 0.501 3
#> MAD:skmeans 86 0.784 3
#> ATC:skmeans 92 0.595 3
#> SD:mclust 77 0.624 3
#> CV:mclust 81 0.739 3
#> MAD:mclust 73 0.741 3
#> ATC:mclust 88 0.674 3
#> SD:kmeans 81 0.356 3
#> CV:kmeans 86 0.184 3
#> MAD:kmeans 82 0.282 3
#> ATC:kmeans 90 0.596 3
#> SD:pam 87 0.176 3
#> CV:pam 86 0.176 3
#> MAD:pam 86 0.148 3
#> ATC:pam 86 0.340 3
#> SD:hclust 75 0.179 3
#> CV:hclust 73 0.246 3
#> MAD:hclust 79 0.159 3
#> ATC:hclust 92 0.241 3
test_to_known_factors(res_list, k = 4)
#> n individual(p) k
#> SD:NMF 79 0.471 4
#> CV:NMF 78 0.437 4
#> MAD:NMF 74 0.472 4
#> ATC:NMF 85 0.558 4
#> SD:skmeans 72 0.964 4
#> CV:skmeans 67 0.982 4
#> MAD:skmeans 67 0.860 4
#> ATC:skmeans 86 0.914 4
#> SD:mclust 70 0.607 4
#> CV:mclust 69 0.674 4
#> MAD:mclust 70 0.846 4
#> ATC:mclust 71 0.771 4
#> SD:kmeans 71 0.610 4
#> CV:kmeans 60 0.323 4
#> MAD:kmeans 71 0.560 4
#> ATC:kmeans 82 0.496 4
#> SD:pam 74 0.140 4
#> CV:pam 88 0.465 4
#> MAD:pam 76 0.355 4
#> ATC:pam 84 0.181 4
#> SD:hclust 78 0.250 4
#> CV:hclust 72 0.459 4
#> MAD:hclust 74 0.427 4
#> ATC:hclust 92 0.411 4
test_to_known_factors(res_list, k = 5)
#> n individual(p) k
#> SD:NMF 54 0.0393 5
#> CV:NMF 52 0.0573 5
#> MAD:NMF 43 0.0427 5
#> ATC:NMF 68 0.2030 5
#> SD:skmeans 80 0.9053 5
#> CV:skmeans 79 0.8769 5
#> MAD:skmeans 79 0.9182 5
#> ATC:skmeans 83 0.7839 5
#> SD:mclust 79 0.8994 5
#> CV:mclust 66 0.9657 5
#> MAD:mclust 73 0.9687 5
#> ATC:mclust 46 0.8375 5
#> SD:kmeans 71 0.6910 5
#> CV:kmeans 72 0.5734 5
#> MAD:kmeans 70 0.6899 5
#> ATC:kmeans 76 0.7304 5
#> SD:pam 84 0.7070 5
#> CV:pam 76 0.7182 5
#> MAD:pam 83 0.5890 5
#> ATC:pam 88 0.6563 5
#> SD:hclust 63 0.2205 5
#> CV:hclust 62 0.3466 5
#> MAD:hclust 68 0.3767 5
#> ATC:hclust 83 0.5643 5
test_to_known_factors(res_list, k = 6)
#> n individual(p) k
#> SD:NMF 56 0.0620 6
#> CV:NMF 57 0.0364 6
#> MAD:NMF 58 0.1360 6
#> ATC:NMF 53 0.3456 6
#> SD:skmeans 68 0.8159 6
#> CV:skmeans 67 0.7556 6
#> MAD:skmeans 70 0.8224 6
#> ATC:skmeans 75 0.9462 6
#> SD:mclust 84 0.6367 6
#> CV:mclust 72 0.7053 6
#> MAD:mclust 66 0.7380 6
#> ATC:mclust 81 0.6127 6
#> SD:kmeans 69 0.9109 6
#> CV:kmeans 67 0.7545 6
#> MAD:kmeans 65 0.9370 6
#> ATC:kmeans 64 0.4696 6
#> SD:pam 76 0.9112 6
#> CV:pam 77 0.8497 6
#> MAD:pam 76 0.8014 6
#> ATC:pam 88 0.6514 6
#> SD:hclust 73 0.4650 6
#> CV:hclust 65 0.5524 6
#> MAD:hclust 58 0.5999 6
#> ATC:hclust 83 0.6937 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 17698 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 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.224 0.715 0.778 0.4312 0.525 0.525
#> 3 3 0.343 0.663 0.802 0.4129 0.782 0.624
#> 4 4 0.427 0.661 0.803 0.0928 0.956 0.894
#> 5 5 0.423 0.588 0.767 0.0479 0.997 0.993
#> 6 6 0.455 0.597 0.745 0.0252 0.982 0.951
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
#> GSM634643 1 0.7883 0.7901 0.764 0.236
#> GSM634648 1 0.8813 0.6870 0.700 0.300
#> GSM634649 1 0.6712 0.7966 0.824 0.176
#> GSM634650 2 0.9754 -0.0199 0.408 0.592
#> GSM634653 1 0.6247 0.7622 0.844 0.156
#> GSM634659 1 0.9922 0.5418 0.552 0.448
#> GSM634666 1 0.7815 0.6814 0.768 0.232
#> GSM634667 2 0.0000 0.8432 0.000 1.000
#> GSM634669 1 0.9044 0.7387 0.680 0.320
#> GSM634670 1 0.0000 0.7302 1.000 0.000
#> GSM634679 1 0.0938 0.7321 0.988 0.012
#> GSM634680 1 0.0000 0.7302 1.000 0.000
#> GSM634681 1 0.4939 0.7877 0.892 0.108
#> GSM634688 2 0.5519 0.7865 0.128 0.872
#> GSM634690 2 0.0000 0.8432 0.000 1.000
#> GSM634694 1 0.8763 0.7596 0.704 0.296
#> GSM634698 1 0.8386 0.7798 0.732 0.268
#> GSM634704 2 0.4939 0.8013 0.108 0.892
#> GSM634705 1 0.3431 0.7715 0.936 0.064
#> GSM634706 1 0.9732 0.6052 0.596 0.404
#> GSM634707 1 0.8763 0.7602 0.704 0.296
#> GSM634711 1 0.8327 0.7793 0.736 0.264
#> GSM634715 1 0.9909 0.5506 0.556 0.444
#> GSM634633 1 0.7453 0.7619 0.788 0.212
#> GSM634634 2 0.7602 0.6639 0.220 0.780
#> GSM634635 1 0.6712 0.7963 0.824 0.176
#> GSM634636 1 0.7815 0.7909 0.768 0.232
#> GSM634637 1 0.8327 0.7793 0.736 0.264
#> GSM634638 2 0.0000 0.8432 0.000 1.000
#> GSM634639 1 0.6531 0.7987 0.832 0.168
#> GSM634640 2 0.0000 0.8432 0.000 1.000
#> GSM634641 1 0.8661 0.7650 0.712 0.288
#> GSM634642 2 0.3584 0.8293 0.068 0.932
#> GSM634644 2 0.3274 0.8323 0.060 0.940
#> GSM634645 1 0.3431 0.7715 0.936 0.064
#> GSM634646 1 0.2423 0.7583 0.960 0.040
#> GSM634647 1 0.0000 0.7302 1.000 0.000
#> GSM634651 2 0.0000 0.8432 0.000 1.000
#> GSM634652 2 0.0000 0.8432 0.000 1.000
#> GSM634654 1 0.3584 0.7693 0.932 0.068
#> GSM634655 1 0.9000 0.7363 0.684 0.316
#> GSM634656 1 0.0000 0.7302 1.000 0.000
#> GSM634657 2 0.9635 0.0806 0.388 0.612
#> GSM634658 1 0.8861 0.7568 0.696 0.304
#> GSM634660 1 0.8763 0.7602 0.704 0.296
#> GSM634661 2 0.0000 0.8432 0.000 1.000
#> GSM634662 2 0.4939 0.7949 0.108 0.892
#> GSM634663 2 0.8144 0.5292 0.252 0.748
#> GSM634664 2 0.5294 0.7913 0.120 0.880
#> GSM634665 1 0.3733 0.7741 0.928 0.072
#> GSM634668 1 0.9954 0.5110 0.540 0.460
#> GSM634671 1 0.5842 0.7911 0.860 0.140
#> GSM634672 1 0.0000 0.7302 1.000 0.000
#> GSM634673 1 0.1633 0.7479 0.976 0.024
#> GSM634674 1 0.9977 0.4822 0.528 0.472
#> GSM634675 2 0.1843 0.8403 0.028 0.972
#> GSM634676 1 0.9881 0.5614 0.564 0.436
#> GSM634677 2 0.0000 0.8432 0.000 1.000
#> GSM634678 2 0.6048 0.7647 0.148 0.852
#> GSM634682 2 0.0000 0.8432 0.000 1.000
#> GSM634683 2 0.0000 0.8432 0.000 1.000
#> GSM634684 1 0.9170 0.7288 0.668 0.332
#> GSM634685 2 0.7528 0.6765 0.216 0.784
#> GSM634686 1 0.8763 0.7596 0.704 0.296
#> GSM634687 2 0.0000 0.8432 0.000 1.000
#> GSM634689 2 0.3584 0.8293 0.068 0.932
#> GSM634691 2 0.0000 0.8432 0.000 1.000
#> GSM634692 1 0.8386 0.7808 0.732 0.268
#> GSM634693 1 0.4431 0.7836 0.908 0.092
#> GSM634695 2 0.0672 0.8431 0.008 0.992
#> GSM634696 1 0.9608 0.6341 0.616 0.384
#> GSM634697 1 0.0000 0.7302 1.000 0.000
#> GSM634699 2 0.4815 0.8049 0.104 0.896
#> GSM634700 2 0.1633 0.8404 0.024 0.976
#> GSM634701 1 0.8144 0.7860 0.748 0.252
#> GSM634702 1 0.9922 0.5418 0.552 0.448
#> GSM634703 2 0.9087 0.3127 0.324 0.676
#> GSM634708 2 0.0000 0.8432 0.000 1.000
#> GSM634709 1 0.7883 0.7901 0.764 0.236
#> GSM634710 1 0.7815 0.6814 0.768 0.232
#> GSM634712 1 0.0938 0.7321 0.988 0.012
#> GSM634713 2 0.0000 0.8432 0.000 1.000
#> GSM634714 1 0.4298 0.7825 0.912 0.088
#> GSM634716 1 0.8386 0.7778 0.732 0.268
#> GSM634717 1 0.7883 0.7901 0.764 0.236
#> GSM634718 2 0.9850 -0.1133 0.428 0.572
#> GSM634719 1 0.8861 0.7568 0.696 0.304
#> GSM634720 1 0.4939 0.7863 0.892 0.108
#> GSM634721 1 0.8608 0.7112 0.716 0.284
#> GSM634722 2 0.4431 0.8118 0.092 0.908
#> GSM634723 2 0.9983 -0.3074 0.476 0.524
#> GSM634724 1 0.4939 0.7842 0.892 0.108
#> GSM634725 1 0.9552 0.6708 0.624 0.376
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.2945 0.71242 0.908 0.004 0.088
#> GSM634648 1 0.8300 0.49192 0.620 0.136 0.244
#> GSM634649 1 0.4121 0.65552 0.832 0.000 0.168
#> GSM634650 1 0.8137 0.42589 0.592 0.316 0.092
#> GSM634653 1 0.7874 0.35126 0.568 0.064 0.368
#> GSM634659 1 0.4514 0.66712 0.832 0.156 0.012
#> GSM634666 3 0.8291 0.55064 0.280 0.116 0.604
#> GSM634667 2 0.0237 0.87110 0.004 0.996 0.000
#> GSM634669 1 0.2443 0.72419 0.940 0.028 0.032
#> GSM634670 3 0.4399 0.82343 0.188 0.000 0.812
#> GSM634679 3 0.4605 0.82359 0.204 0.000 0.796
#> GSM634680 3 0.4178 0.82373 0.172 0.000 0.828
#> GSM634681 1 0.5480 0.54267 0.732 0.004 0.264
#> GSM634688 2 0.7495 0.76077 0.120 0.692 0.188
#> GSM634690 2 0.0424 0.87209 0.008 0.992 0.000
#> GSM634694 1 0.1585 0.72409 0.964 0.008 0.028
#> GSM634698 1 0.1289 0.72401 0.968 0.000 0.032
#> GSM634704 2 0.5486 0.76142 0.196 0.780 0.024
#> GSM634705 1 0.5733 0.44826 0.676 0.000 0.324
#> GSM634706 1 0.4411 0.67314 0.844 0.140 0.016
#> GSM634707 1 0.1905 0.72300 0.956 0.016 0.028
#> GSM634711 1 0.1643 0.71775 0.956 0.000 0.044
#> GSM634715 1 0.4953 0.64464 0.808 0.176 0.016
#> GSM634633 1 0.8222 0.28165 0.576 0.092 0.332
#> GSM634634 2 0.7898 0.64807 0.084 0.616 0.300
#> GSM634635 1 0.4121 0.65666 0.832 0.000 0.168
#> GSM634636 1 0.3030 0.71160 0.904 0.004 0.092
#> GSM634637 1 0.1643 0.71775 0.956 0.000 0.044
#> GSM634638 2 0.0475 0.87169 0.004 0.992 0.004
#> GSM634639 1 0.4346 0.64174 0.816 0.000 0.184
#> GSM634640 2 0.0237 0.87110 0.004 0.996 0.000
#> GSM634641 1 0.0983 0.72255 0.980 0.004 0.016
#> GSM634642 2 0.6234 0.81786 0.128 0.776 0.096
#> GSM634644 2 0.4295 0.84548 0.104 0.864 0.032
#> GSM634645 1 0.5733 0.44826 0.676 0.000 0.324
#> GSM634646 1 0.5905 0.38413 0.648 0.000 0.352
#> GSM634647 3 0.3482 0.80054 0.128 0.000 0.872
#> GSM634651 2 0.1711 0.87321 0.032 0.960 0.008
#> GSM634652 2 0.3983 0.84625 0.048 0.884 0.068
#> GSM634654 1 0.6314 0.32432 0.604 0.004 0.392
#> GSM634655 1 0.6037 0.66709 0.788 0.100 0.112
#> GSM634656 3 0.3482 0.80054 0.128 0.000 0.872
#> GSM634657 1 0.7084 0.44284 0.628 0.336 0.036
#> GSM634658 1 0.2982 0.72429 0.920 0.024 0.056
#> GSM634660 1 0.1774 0.72341 0.960 0.016 0.024
#> GSM634661 2 0.1711 0.87321 0.032 0.960 0.008
#> GSM634662 2 0.5020 0.76401 0.192 0.796 0.012
#> GSM634663 2 0.6701 0.23131 0.412 0.576 0.012
#> GSM634664 2 0.6865 0.77910 0.104 0.736 0.160
#> GSM634665 1 0.6126 0.30976 0.600 0.000 0.400
#> GSM634668 1 0.4692 0.65818 0.820 0.168 0.012
#> GSM634671 1 0.6247 0.42206 0.620 0.004 0.376
#> GSM634672 3 0.5138 0.78452 0.252 0.000 0.748
#> GSM634673 3 0.5497 0.72627 0.292 0.000 0.708
#> GSM634674 1 0.5020 0.64791 0.796 0.192 0.012
#> GSM634675 2 0.2998 0.86699 0.068 0.916 0.016
#> GSM634676 1 0.4418 0.67719 0.848 0.132 0.020
#> GSM634677 2 0.1711 0.87321 0.032 0.960 0.008
#> GSM634678 2 0.6337 0.72243 0.220 0.736 0.044
#> GSM634682 2 0.0475 0.87169 0.004 0.992 0.004
#> GSM634683 2 0.1636 0.87320 0.016 0.964 0.020
#> GSM634684 1 0.3481 0.71879 0.904 0.044 0.052
#> GSM634685 2 0.7972 0.67645 0.116 0.644 0.240
#> GSM634686 1 0.1585 0.72409 0.964 0.008 0.028
#> GSM634687 2 0.0237 0.87110 0.004 0.996 0.000
#> GSM634689 2 0.6234 0.81786 0.128 0.776 0.096
#> GSM634691 2 0.1711 0.87321 0.032 0.960 0.008
#> GSM634692 1 0.3573 0.71464 0.876 0.004 0.120
#> GSM634693 1 0.6180 0.27536 0.584 0.000 0.416
#> GSM634695 2 0.1170 0.87403 0.016 0.976 0.008
#> GSM634696 1 0.7444 0.58390 0.684 0.096 0.220
#> GSM634697 3 0.4178 0.82373 0.172 0.000 0.828
#> GSM634699 2 0.7160 0.78126 0.132 0.720 0.148
#> GSM634700 2 0.2584 0.86638 0.064 0.928 0.008
#> GSM634701 1 0.2200 0.72043 0.940 0.004 0.056
#> GSM634702 1 0.4514 0.66712 0.832 0.156 0.012
#> GSM634703 1 0.6565 0.30714 0.576 0.416 0.008
#> GSM634708 2 0.0424 0.87209 0.008 0.992 0.000
#> GSM634709 1 0.2945 0.71242 0.908 0.004 0.088
#> GSM634710 3 0.8291 0.55064 0.280 0.116 0.604
#> GSM634712 3 0.4605 0.82359 0.204 0.000 0.796
#> GSM634713 2 0.1129 0.87048 0.004 0.976 0.020
#> GSM634714 3 0.6307 0.07484 0.488 0.000 0.512
#> GSM634716 1 0.1529 0.71919 0.960 0.000 0.040
#> GSM634717 1 0.2945 0.71242 0.908 0.004 0.088
#> GSM634718 1 0.6416 0.54053 0.708 0.260 0.032
#> GSM634719 1 0.2982 0.72429 0.920 0.024 0.056
#> GSM634720 1 0.6763 0.06193 0.552 0.012 0.436
#> GSM634721 1 0.8373 0.20865 0.524 0.088 0.388
#> GSM634722 2 0.5835 0.80499 0.052 0.784 0.164
#> GSM634723 1 0.5987 0.58999 0.756 0.208 0.036
#> GSM634724 1 0.6168 -0.00903 0.588 0.000 0.412
#> GSM634725 1 0.3499 0.70988 0.900 0.072 0.028
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.2412 0.7354 0.908 0.000 0.084 0.008
#> GSM634648 1 0.7588 0.5333 0.608 0.108 0.220 0.064
#> GSM634649 1 0.3219 0.6900 0.836 0.000 0.164 0.000
#> GSM634650 1 0.7854 0.3702 0.512 0.216 0.016 0.256
#> GSM634653 1 0.7123 0.4134 0.544 0.036 0.360 0.060
#> GSM634659 1 0.3805 0.6918 0.832 0.148 0.008 0.012
#> GSM634666 3 0.8106 0.5052 0.192 0.068 0.568 0.172
#> GSM634667 2 0.0000 0.8551 0.000 1.000 0.000 0.000
#> GSM634669 1 0.2319 0.7409 0.932 0.016 0.024 0.028
#> GSM634670 3 0.2401 0.7959 0.092 0.000 0.904 0.004
#> GSM634679 3 0.3659 0.8007 0.136 0.000 0.840 0.024
#> GSM634680 3 0.2799 0.7975 0.108 0.000 0.884 0.008
#> GSM634681 1 0.4313 0.5986 0.736 0.004 0.260 0.000
#> GSM634688 4 0.3319 0.7971 0.036 0.060 0.016 0.888
#> GSM634690 2 0.0188 0.8569 0.004 0.996 0.000 0.000
#> GSM634694 1 0.1284 0.7410 0.964 0.000 0.024 0.012
#> GSM634698 1 0.0921 0.7423 0.972 0.000 0.028 0.000
#> GSM634704 2 0.5467 0.6394 0.176 0.748 0.016 0.060
#> GSM634705 1 0.4564 0.5149 0.672 0.000 0.328 0.000
#> GSM634706 1 0.3377 0.6978 0.848 0.140 0.012 0.000
#> GSM634707 1 0.1706 0.7400 0.948 0.016 0.036 0.000
#> GSM634711 1 0.1474 0.7379 0.948 0.000 0.052 0.000
#> GSM634715 1 0.4569 0.6775 0.800 0.144 0.004 0.052
#> GSM634633 1 0.6928 0.3307 0.556 0.088 0.344 0.012
#> GSM634634 4 0.2799 0.7001 0.000 0.008 0.108 0.884
#> GSM634635 1 0.3219 0.6914 0.836 0.000 0.164 0.000
#> GSM634636 1 0.2480 0.7349 0.904 0.000 0.088 0.008
#> GSM634637 1 0.1474 0.7379 0.948 0.000 0.052 0.000
#> GSM634638 2 0.0336 0.8550 0.000 0.992 0.000 0.008
#> GSM634639 1 0.3444 0.6784 0.816 0.000 0.184 0.000
#> GSM634640 2 0.0188 0.8551 0.000 0.996 0.000 0.004
#> GSM634641 1 0.0779 0.7402 0.980 0.000 0.016 0.004
#> GSM634642 4 0.5603 0.7840 0.072 0.180 0.012 0.736
#> GSM634644 2 0.4675 0.7436 0.080 0.816 0.016 0.088
#> GSM634645 1 0.4564 0.5149 0.672 0.000 0.328 0.000
#> GSM634646 1 0.4697 0.4634 0.644 0.000 0.356 0.000
#> GSM634647 3 0.1624 0.7274 0.020 0.000 0.952 0.028
#> GSM634651 2 0.1443 0.8572 0.028 0.960 0.004 0.008
#> GSM634652 4 0.4356 0.7327 0.000 0.292 0.000 0.708
#> GSM634654 1 0.5256 0.4108 0.596 0.000 0.392 0.012
#> GSM634655 1 0.5381 0.6833 0.768 0.088 0.128 0.016
#> GSM634656 3 0.1624 0.7274 0.020 0.000 0.952 0.028
#> GSM634657 1 0.6722 0.4644 0.604 0.296 0.012 0.088
#> GSM634658 1 0.2956 0.7402 0.904 0.012 0.048 0.036
#> GSM634660 1 0.1610 0.7404 0.952 0.016 0.032 0.000
#> GSM634661 2 0.1443 0.8572 0.028 0.960 0.004 0.008
#> GSM634662 2 0.4505 0.6751 0.184 0.784 0.004 0.028
#> GSM634663 2 0.5482 0.2225 0.412 0.572 0.004 0.012
#> GSM634664 4 0.4181 0.8158 0.024 0.124 0.020 0.832
#> GSM634665 1 0.5279 0.3942 0.588 0.000 0.400 0.012
#> GSM634668 1 0.3950 0.6843 0.820 0.160 0.008 0.012
#> GSM634671 1 0.6603 0.4602 0.572 0.000 0.328 0.100
#> GSM634672 3 0.3486 0.7776 0.188 0.000 0.812 0.000
#> GSM634673 3 0.4155 0.7071 0.240 0.000 0.756 0.004
#> GSM634674 1 0.4505 0.6757 0.788 0.180 0.008 0.024
#> GSM634675 2 0.3000 0.8262 0.052 0.900 0.008 0.040
#> GSM634676 1 0.4617 0.6983 0.820 0.100 0.020 0.060
#> GSM634677 2 0.1443 0.8572 0.028 0.960 0.004 0.008
#> GSM634678 2 0.5953 0.5888 0.208 0.708 0.020 0.064
#> GSM634682 2 0.0336 0.8550 0.000 0.992 0.000 0.008
#> GSM634683 2 0.2271 0.8205 0.008 0.916 0.000 0.076
#> GSM634684 1 0.3617 0.7315 0.876 0.020 0.048 0.056
#> GSM634685 4 0.6365 0.7129 0.032 0.180 0.088 0.700
#> GSM634686 1 0.1284 0.7410 0.964 0.000 0.024 0.012
#> GSM634687 2 0.0188 0.8551 0.000 0.996 0.000 0.004
#> GSM634689 4 0.5603 0.7840 0.072 0.180 0.012 0.736
#> GSM634691 2 0.1443 0.8572 0.028 0.960 0.004 0.008
#> GSM634692 1 0.3894 0.7290 0.844 0.000 0.088 0.068
#> GSM634693 1 0.5744 0.3188 0.536 0.000 0.436 0.028
#> GSM634695 2 0.1822 0.8361 0.008 0.944 0.004 0.044
#> GSM634696 1 0.7190 0.5516 0.612 0.032 0.108 0.248
#> GSM634697 3 0.2593 0.7974 0.104 0.000 0.892 0.004
#> GSM634699 4 0.4462 0.8053 0.052 0.100 0.020 0.828
#> GSM634700 2 0.2287 0.8386 0.060 0.924 0.004 0.012
#> GSM634701 1 0.2048 0.7408 0.928 0.000 0.064 0.008
#> GSM634702 1 0.3805 0.6918 0.832 0.148 0.008 0.012
#> GSM634703 1 0.5473 0.3154 0.576 0.408 0.004 0.012
#> GSM634708 2 0.0188 0.8569 0.004 0.996 0.000 0.000
#> GSM634709 1 0.2412 0.7354 0.908 0.000 0.084 0.008
#> GSM634710 3 0.8106 0.5052 0.192 0.068 0.568 0.172
#> GSM634712 3 0.3659 0.8007 0.136 0.000 0.840 0.024
#> GSM634713 2 0.2999 0.7408 0.000 0.864 0.004 0.132
#> GSM634714 3 0.5611 0.1220 0.412 0.000 0.564 0.024
#> GSM634716 1 0.1389 0.7387 0.952 0.000 0.048 0.000
#> GSM634717 1 0.2412 0.7354 0.908 0.000 0.084 0.008
#> GSM634718 1 0.6002 0.5768 0.688 0.232 0.012 0.068
#> GSM634719 1 0.2956 0.7402 0.904 0.012 0.048 0.036
#> GSM634720 1 0.5573 0.0605 0.508 0.004 0.476 0.012
#> GSM634721 1 0.8495 0.1689 0.444 0.036 0.288 0.232
#> GSM634722 4 0.5349 0.5600 0.000 0.336 0.024 0.640
#> GSM634723 1 0.5873 0.6227 0.728 0.172 0.020 0.080
#> GSM634724 1 0.4981 -0.0263 0.536 0.000 0.464 0.000
#> GSM634725 1 0.3532 0.7285 0.880 0.056 0.020 0.044
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.2295 0.7165 0.900 0.000 0.088 0.008 0.004
#> GSM634648 1 0.7047 0.4998 0.580 0.068 0.228 0.112 0.012
#> GSM634649 1 0.3365 0.6730 0.808 0.000 0.180 0.004 0.008
#> GSM634650 1 0.8057 0.3373 0.472 0.152 0.008 0.152 0.216
#> GSM634653 1 0.7005 0.3619 0.496 0.012 0.352 0.100 0.040
#> GSM634659 1 0.4214 0.6702 0.804 0.136 0.012 0.020 0.028
#> GSM634666 3 0.7607 0.2673 0.144 0.032 0.552 0.204 0.068
#> GSM634667 2 0.0566 0.8279 0.000 0.984 0.000 0.004 0.012
#> GSM634669 1 0.3007 0.7227 0.892 0.012 0.028 0.040 0.028
#> GSM634670 3 0.1626 0.4467 0.044 0.000 0.940 0.000 0.016
#> GSM634679 3 0.3364 0.4884 0.112 0.000 0.848 0.020 0.020
#> GSM634680 5 0.5670 0.0000 0.084 0.000 0.388 0.000 0.528
#> GSM634681 1 0.4194 0.5798 0.708 0.000 0.276 0.004 0.012
#> GSM634688 4 0.2491 0.7121 0.004 0.024 0.004 0.904 0.064
#> GSM634690 2 0.0290 0.8297 0.000 0.992 0.000 0.000 0.008
#> GSM634694 1 0.2082 0.7236 0.928 0.000 0.032 0.024 0.016
#> GSM634698 1 0.1668 0.7251 0.940 0.000 0.032 0.000 0.028
#> GSM634704 2 0.5913 0.6085 0.128 0.684 0.000 0.132 0.056
#> GSM634705 1 0.4402 0.4897 0.636 0.000 0.352 0.000 0.012
#> GSM634706 1 0.3801 0.6808 0.820 0.136 0.016 0.004 0.024
#> GSM634707 1 0.2409 0.7171 0.912 0.016 0.044 0.000 0.028
#> GSM634711 1 0.2104 0.7186 0.916 0.000 0.060 0.000 0.024
#> GSM634715 1 0.5079 0.6520 0.760 0.128 0.008 0.048 0.056
#> GSM634633 1 0.7189 0.3209 0.528 0.072 0.308 0.020 0.072
#> GSM634634 4 0.5100 0.6008 0.000 0.004 0.068 0.672 0.256
#> GSM634635 1 0.3209 0.6745 0.812 0.000 0.180 0.000 0.008
#> GSM634636 1 0.2193 0.7166 0.900 0.000 0.092 0.008 0.000
#> GSM634637 1 0.2124 0.7182 0.916 0.000 0.056 0.000 0.028
#> GSM634638 2 0.2012 0.8138 0.000 0.920 0.000 0.020 0.060
#> GSM634639 1 0.3983 0.6653 0.784 0.000 0.164 0.000 0.052
#> GSM634640 2 0.1597 0.8197 0.000 0.940 0.000 0.012 0.048
#> GSM634641 1 0.1646 0.7239 0.944 0.004 0.032 0.000 0.020
#> GSM634642 4 0.4103 0.7049 0.060 0.112 0.008 0.812 0.008
#> GSM634644 2 0.4823 0.6968 0.036 0.752 0.000 0.164 0.048
#> GSM634645 1 0.4402 0.4897 0.636 0.000 0.352 0.000 0.012
#> GSM634646 1 0.4392 0.4412 0.612 0.000 0.380 0.000 0.008
#> GSM634647 3 0.2130 0.3265 0.000 0.000 0.908 0.012 0.080
#> GSM634651 2 0.1597 0.8286 0.020 0.948 0.000 0.024 0.008
#> GSM634652 4 0.3916 0.6604 0.000 0.256 0.000 0.732 0.012
#> GSM634654 1 0.5262 0.3862 0.552 0.000 0.408 0.012 0.028
#> GSM634655 1 0.5760 0.6627 0.728 0.088 0.088 0.016 0.080
#> GSM634656 3 0.2130 0.3265 0.000 0.000 0.908 0.012 0.080
#> GSM634657 1 0.7345 0.4376 0.540 0.204 0.000 0.140 0.116
#> GSM634658 1 0.3436 0.7193 0.864 0.004 0.052 0.056 0.024
#> GSM634660 1 0.2333 0.7173 0.916 0.016 0.040 0.000 0.028
#> GSM634661 2 0.1710 0.8296 0.020 0.944 0.000 0.024 0.012
#> GSM634662 2 0.4928 0.6655 0.152 0.748 0.000 0.072 0.028
#> GSM634663 2 0.5161 0.2140 0.396 0.568 0.000 0.024 0.012
#> GSM634664 4 0.2478 0.7303 0.000 0.060 0.008 0.904 0.028
#> GSM634665 1 0.5336 0.3434 0.528 0.000 0.428 0.008 0.036
#> GSM634668 1 0.4342 0.6624 0.792 0.148 0.012 0.020 0.028
#> GSM634671 1 0.6791 0.4191 0.528 0.000 0.316 0.100 0.056
#> GSM634672 3 0.3183 0.4434 0.156 0.000 0.828 0.000 0.016
#> GSM634673 3 0.4701 0.3109 0.204 0.000 0.720 0.000 0.076
#> GSM634674 1 0.4754 0.6555 0.756 0.168 0.004 0.020 0.052
#> GSM634675 2 0.3163 0.7926 0.032 0.864 0.000 0.092 0.012
#> GSM634676 1 0.4999 0.6787 0.768 0.064 0.008 0.116 0.044
#> GSM634677 2 0.1686 0.8280 0.020 0.944 0.000 0.028 0.008
#> GSM634678 2 0.5908 0.5718 0.192 0.668 0.016 0.112 0.012
#> GSM634682 2 0.2012 0.8138 0.000 0.920 0.000 0.020 0.060
#> GSM634683 2 0.2589 0.8055 0.008 0.888 0.000 0.012 0.092
#> GSM634684 1 0.4072 0.7097 0.828 0.004 0.036 0.076 0.056
#> GSM634685 4 0.6915 0.5632 0.004 0.112 0.048 0.528 0.308
#> GSM634686 1 0.2082 0.7236 0.928 0.000 0.032 0.024 0.016
#> GSM634687 2 0.1597 0.8197 0.000 0.940 0.000 0.012 0.048
#> GSM634689 4 0.4103 0.7049 0.060 0.112 0.008 0.812 0.008
#> GSM634691 2 0.1686 0.8280 0.020 0.944 0.000 0.028 0.008
#> GSM634692 1 0.3810 0.7134 0.828 0.000 0.084 0.076 0.012
#> GSM634693 1 0.5931 0.2871 0.488 0.000 0.424 0.008 0.080
#> GSM634695 2 0.2782 0.7903 0.000 0.880 0.000 0.048 0.072
#> GSM634696 1 0.7448 0.4945 0.544 0.012 0.100 0.232 0.112
#> GSM634697 3 0.3176 0.4228 0.080 0.000 0.856 0.000 0.064
#> GSM634699 4 0.2388 0.7020 0.012 0.028 0.004 0.916 0.040
#> GSM634700 2 0.2546 0.8116 0.048 0.904 0.000 0.036 0.012
#> GSM634701 1 0.1983 0.7234 0.924 0.000 0.060 0.008 0.008
#> GSM634702 1 0.4214 0.6702 0.804 0.136 0.012 0.020 0.028
#> GSM634703 1 0.5455 0.3329 0.560 0.388 0.000 0.036 0.016
#> GSM634708 2 0.0290 0.8297 0.000 0.992 0.000 0.000 0.008
#> GSM634709 1 0.2295 0.7165 0.900 0.000 0.088 0.008 0.004
#> GSM634710 3 0.7607 0.2673 0.144 0.032 0.552 0.204 0.068
#> GSM634712 3 0.3364 0.4884 0.112 0.000 0.848 0.020 0.020
#> GSM634713 2 0.4114 0.6867 0.000 0.776 0.000 0.164 0.060
#> GSM634714 3 0.6561 -0.0210 0.368 0.000 0.464 0.008 0.160
#> GSM634716 1 0.2124 0.7184 0.916 0.000 0.056 0.000 0.028
#> GSM634717 1 0.2136 0.7170 0.904 0.000 0.088 0.008 0.000
#> GSM634718 1 0.6321 0.5461 0.632 0.188 0.000 0.132 0.048
#> GSM634719 1 0.3436 0.7193 0.864 0.004 0.052 0.056 0.024
#> GSM634720 1 0.6486 0.1421 0.480 0.004 0.380 0.008 0.128
#> GSM634721 1 0.8227 0.0792 0.384 0.012 0.272 0.252 0.080
#> GSM634722 4 0.6692 0.5227 0.000 0.280 0.004 0.472 0.244
#> GSM634723 1 0.6089 0.5884 0.668 0.124 0.000 0.148 0.060
#> GSM634724 1 0.4744 -0.0159 0.508 0.000 0.476 0.000 0.016
#> GSM634725 1 0.3985 0.7034 0.840 0.048 0.016 0.028 0.068
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1699 0.7189 0.928 0.000 0.060 0.004 0.004 0.004
#> GSM634648 1 0.6989 0.5219 0.548 0.100 0.224 0.096 0.016 0.016
#> GSM634649 1 0.2837 0.6831 0.840 0.000 0.144 0.004 0.004 0.008
#> GSM634650 1 0.6734 0.3376 0.460 0.120 0.000 0.072 0.008 0.340
#> GSM634653 1 0.6475 0.4022 0.500 0.000 0.320 0.128 0.036 0.016
#> GSM634659 1 0.4375 0.6655 0.752 0.180 0.028 0.004 0.008 0.028
#> GSM634666 3 0.7154 0.4516 0.128 0.048 0.568 0.148 0.008 0.100
#> GSM634667 2 0.2362 0.7738 0.000 0.892 0.000 0.016 0.080 0.012
#> GSM634669 1 0.2471 0.7210 0.904 0.008 0.012 0.052 0.012 0.012
#> GSM634670 3 0.1930 0.6353 0.048 0.000 0.916 0.000 0.036 0.000
#> GSM634679 3 0.2919 0.6625 0.104 0.000 0.860 0.008 0.012 0.016
#> GSM634680 5 0.4252 0.0000 0.088 0.000 0.188 0.000 0.724 0.000
#> GSM634681 1 0.3698 0.5991 0.740 0.000 0.240 0.004 0.004 0.012
#> GSM634688 4 0.2809 0.6705 0.000 0.020 0.000 0.848 0.004 0.128
#> GSM634690 2 0.2058 0.7770 0.000 0.908 0.000 0.012 0.072 0.008
#> GSM634694 1 0.1476 0.7235 0.948 0.000 0.008 0.028 0.004 0.012
#> GSM634698 1 0.2065 0.7260 0.924 0.012 0.032 0.004 0.004 0.024
#> GSM634704 2 0.6115 0.5534 0.124 0.620 0.000 0.168 0.008 0.080
#> GSM634705 1 0.3988 0.5146 0.660 0.000 0.324 0.000 0.004 0.012
#> GSM634706 1 0.3561 0.6803 0.808 0.148 0.016 0.008 0.000 0.020
#> GSM634707 1 0.3080 0.7142 0.872 0.028 0.056 0.004 0.008 0.032
#> GSM634711 1 0.2493 0.7185 0.896 0.004 0.064 0.004 0.008 0.024
#> GSM634715 1 0.5371 0.6499 0.712 0.112 0.020 0.012 0.024 0.120
#> GSM634633 1 0.7357 0.3792 0.512 0.064 0.256 0.028 0.108 0.032
#> GSM634634 6 0.4657 0.4907 0.000 0.000 0.040 0.248 0.028 0.684
#> GSM634635 1 0.2695 0.6845 0.844 0.000 0.144 0.000 0.004 0.008
#> GSM634636 1 0.1615 0.7194 0.928 0.000 0.064 0.004 0.004 0.000
#> GSM634637 1 0.2451 0.7184 0.900 0.004 0.056 0.004 0.008 0.028
#> GSM634638 2 0.4466 0.7130 0.000 0.748 0.004 0.016 0.092 0.140
#> GSM634639 1 0.4045 0.6771 0.784 0.004 0.140 0.004 0.056 0.012
#> GSM634640 2 0.3515 0.7516 0.000 0.824 0.000 0.016 0.080 0.080
#> GSM634641 1 0.2313 0.7241 0.912 0.016 0.044 0.004 0.008 0.016
#> GSM634642 4 0.3861 0.7200 0.040 0.140 0.012 0.796 0.000 0.012
#> GSM634644 2 0.5284 0.6357 0.032 0.676 0.000 0.196 0.008 0.088
#> GSM634645 1 0.3988 0.5146 0.660 0.000 0.324 0.000 0.004 0.012
#> GSM634646 1 0.3996 0.4702 0.636 0.000 0.352 0.000 0.004 0.008
#> GSM634647 3 0.3293 0.5191 0.000 0.000 0.812 0.000 0.140 0.048
#> GSM634651 2 0.0405 0.7778 0.000 0.988 0.000 0.008 0.004 0.000
#> GSM634652 4 0.4141 0.5594 0.000 0.156 0.000 0.756 0.080 0.008
#> GSM634654 1 0.5203 0.4180 0.556 0.000 0.380 0.024 0.032 0.008
#> GSM634655 1 0.5883 0.6621 0.696 0.064 0.088 0.012 0.100 0.040
#> GSM634656 3 0.3293 0.5191 0.000 0.000 0.812 0.000 0.140 0.048
#> GSM634657 1 0.6848 0.4397 0.524 0.192 0.000 0.128 0.004 0.152
#> GSM634658 1 0.2729 0.7193 0.876 0.000 0.032 0.080 0.008 0.004
#> GSM634660 1 0.3018 0.7147 0.876 0.028 0.052 0.004 0.008 0.032
#> GSM634661 2 0.0665 0.7786 0.000 0.980 0.000 0.008 0.008 0.004
#> GSM634662 2 0.3922 0.6345 0.140 0.784 0.000 0.064 0.004 0.008
#> GSM634663 2 0.4723 0.1882 0.364 0.596 0.000 0.012 0.008 0.020
#> GSM634664 4 0.3191 0.7046 0.000 0.020 0.008 0.856 0.036 0.080
#> GSM634665 1 0.5477 0.3852 0.532 0.000 0.392 0.020 0.028 0.028
#> GSM634668 1 0.4468 0.6574 0.740 0.192 0.028 0.004 0.008 0.028
#> GSM634671 1 0.6981 0.4532 0.532 0.000 0.252 0.068 0.068 0.080
#> GSM634672 3 0.2907 0.6089 0.152 0.000 0.828 0.000 0.020 0.000
#> GSM634673 3 0.4908 0.4131 0.208 0.000 0.664 0.000 0.124 0.004
#> GSM634674 1 0.5249 0.6527 0.716 0.160 0.020 0.008 0.044 0.052
#> GSM634675 2 0.2604 0.7513 0.028 0.872 0.000 0.096 0.004 0.000
#> GSM634676 1 0.4715 0.6805 0.756 0.072 0.008 0.120 0.004 0.040
#> GSM634677 2 0.0622 0.7768 0.000 0.980 0.000 0.012 0.008 0.000
#> GSM634678 2 0.5117 0.5517 0.168 0.700 0.024 0.096 0.000 0.012
#> GSM634682 2 0.4466 0.7130 0.000 0.748 0.004 0.016 0.092 0.140
#> GSM634683 2 0.2147 0.7559 0.000 0.896 0.000 0.000 0.020 0.084
#> GSM634684 1 0.3587 0.7091 0.828 0.000 0.020 0.104 0.012 0.036
#> GSM634685 6 0.2686 0.5956 0.004 0.004 0.024 0.064 0.016 0.888
#> GSM634686 1 0.1476 0.7235 0.948 0.000 0.008 0.028 0.004 0.012
#> GSM634687 2 0.3515 0.7516 0.000 0.824 0.000 0.016 0.080 0.080
#> GSM634689 4 0.3861 0.7200 0.040 0.140 0.012 0.796 0.000 0.012
#> GSM634691 2 0.0508 0.7770 0.000 0.984 0.000 0.012 0.004 0.000
#> GSM634692 1 0.3774 0.7139 0.832 0.000 0.052 0.052 0.020 0.044
#> GSM634693 1 0.6276 0.3542 0.504 0.000 0.308 0.000 0.144 0.044
#> GSM634695 2 0.4994 0.6599 0.000 0.684 0.004 0.016 0.096 0.200
#> GSM634696 1 0.7175 0.5162 0.536 0.016 0.088 0.164 0.016 0.180
#> GSM634697 3 0.3324 0.6174 0.084 0.000 0.832 0.000 0.076 0.008
#> GSM634699 4 0.0779 0.6909 0.008 0.000 0.000 0.976 0.008 0.008
#> GSM634700 2 0.1401 0.7632 0.028 0.948 0.000 0.020 0.000 0.004
#> GSM634701 1 0.2345 0.7252 0.900 0.012 0.072 0.004 0.004 0.008
#> GSM634702 1 0.4375 0.6655 0.752 0.180 0.028 0.004 0.008 0.028
#> GSM634703 1 0.4703 0.3494 0.532 0.432 0.000 0.020 0.000 0.016
#> GSM634708 2 0.2058 0.7770 0.000 0.908 0.000 0.012 0.072 0.008
#> GSM634709 1 0.1699 0.7189 0.928 0.000 0.060 0.004 0.004 0.004
#> GSM634710 3 0.7154 0.4516 0.128 0.048 0.568 0.148 0.008 0.100
#> GSM634712 3 0.2919 0.6625 0.104 0.000 0.860 0.008 0.012 0.016
#> GSM634713 2 0.6080 0.5881 0.000 0.620 0.004 0.156 0.088 0.132
#> GSM634714 1 0.6504 -0.0316 0.376 0.000 0.268 0.000 0.336 0.020
#> GSM634716 1 0.2684 0.7182 0.888 0.008 0.064 0.004 0.008 0.028
#> GSM634717 1 0.1555 0.7194 0.932 0.000 0.060 0.004 0.004 0.000
#> GSM634718 1 0.5677 0.5418 0.620 0.196 0.000 0.156 0.004 0.024
#> GSM634719 1 0.2729 0.7193 0.876 0.000 0.032 0.080 0.008 0.004
#> GSM634720 1 0.6319 0.2699 0.476 0.000 0.284 0.004 0.220 0.016
#> GSM634721 1 0.7801 0.1118 0.376 0.012 0.264 0.192 0.004 0.152
#> GSM634722 6 0.4780 0.5412 0.000 0.180 0.000 0.076 0.032 0.712
#> GSM634723 1 0.5643 0.5823 0.652 0.112 0.000 0.188 0.012 0.036
#> GSM634724 1 0.4671 0.0277 0.496 0.004 0.476 0.004 0.012 0.008
#> GSM634725 1 0.4546 0.6985 0.784 0.076 0.036 0.012 0.012 0.080
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 individual(p) k
#> SD:hclust 87 0.109 2
#> SD:hclust 75 0.179 3
#> SD:hclust 78 0.250 4
#> SD:hclust 63 0.221 5
#> SD:hclust 73 0.465 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 17698 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 1.000 0.946 0.965 0.4945 0.508 0.508
#> 3 3 0.475 0.691 0.814 0.3140 0.716 0.499
#> 4 4 0.522 0.588 0.760 0.1088 0.920 0.777
#> 5 5 0.616 0.617 0.772 0.0812 0.812 0.462
#> 6 6 0.622 0.586 0.723 0.0467 0.941 0.739
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
#> GSM634643 1 0.2948 0.952 0.948 0.052
#> GSM634648 1 0.0672 0.950 0.992 0.008
#> GSM634649 1 0.2948 0.952 0.948 0.052
#> GSM634650 2 0.0000 0.983 0.000 1.000
#> GSM634653 1 0.0000 0.949 1.000 0.000
#> GSM634659 1 0.9635 0.470 0.612 0.388
#> GSM634666 1 0.7528 0.723 0.784 0.216
#> GSM634667 2 0.0000 0.983 0.000 1.000
#> GSM634669 1 0.2948 0.952 0.948 0.052
#> GSM634670 1 0.0000 0.949 1.000 0.000
#> GSM634679 1 0.0000 0.949 1.000 0.000
#> GSM634680 1 0.0000 0.949 1.000 0.000
#> GSM634681 1 0.1184 0.951 0.984 0.016
#> GSM634688 2 0.2948 0.956 0.052 0.948
#> GSM634690 2 0.0000 0.983 0.000 1.000
#> GSM634694 1 0.3114 0.950 0.944 0.056
#> GSM634698 1 0.2948 0.952 0.948 0.052
#> GSM634704 2 0.0938 0.975 0.012 0.988
#> GSM634705 1 0.0672 0.950 0.992 0.008
#> GSM634706 2 0.1633 0.966 0.024 0.976
#> GSM634707 1 0.2948 0.952 0.948 0.052
#> GSM634711 1 0.2948 0.952 0.948 0.052
#> GSM634715 2 0.0000 0.983 0.000 1.000
#> GSM634633 1 0.2948 0.952 0.948 0.052
#> GSM634634 2 0.3114 0.954 0.056 0.944
#> GSM634635 1 0.2948 0.952 0.948 0.052
#> GSM634636 1 0.2948 0.952 0.948 0.052
#> GSM634637 1 0.2948 0.952 0.948 0.052
#> GSM634638 2 0.0000 0.983 0.000 1.000
#> GSM634639 1 0.2948 0.952 0.948 0.052
#> GSM634640 2 0.0000 0.983 0.000 1.000
#> GSM634641 1 0.2948 0.952 0.948 0.052
#> GSM634642 2 0.2948 0.956 0.052 0.948
#> GSM634644 2 0.0000 0.983 0.000 1.000
#> GSM634645 1 0.1184 0.951 0.984 0.016
#> GSM634646 1 0.0000 0.949 1.000 0.000
#> GSM634647 1 0.0000 0.949 1.000 0.000
#> GSM634651 2 0.0000 0.983 0.000 1.000
#> GSM634652 2 0.2948 0.956 0.052 0.948
#> GSM634654 1 0.0000 0.949 1.000 0.000
#> GSM634655 1 0.2948 0.952 0.948 0.052
#> GSM634656 1 0.0000 0.949 1.000 0.000
#> GSM634657 2 0.0000 0.983 0.000 1.000
#> GSM634658 1 0.2948 0.952 0.948 0.052
#> GSM634660 1 0.2948 0.952 0.948 0.052
#> GSM634661 2 0.0000 0.983 0.000 1.000
#> GSM634662 2 0.0000 0.983 0.000 1.000
#> GSM634663 2 0.0000 0.983 0.000 1.000
#> GSM634664 2 0.3114 0.954 0.056 0.944
#> GSM634665 1 0.0000 0.949 1.000 0.000
#> GSM634668 2 0.0672 0.978 0.008 0.992
#> GSM634671 1 0.0000 0.949 1.000 0.000
#> GSM634672 1 0.0000 0.949 1.000 0.000
#> GSM634673 1 0.0000 0.949 1.000 0.000
#> GSM634674 2 0.0000 0.983 0.000 1.000
#> GSM634675 2 0.0000 0.983 0.000 1.000
#> GSM634676 1 0.7139 0.811 0.804 0.196
#> GSM634677 2 0.0000 0.983 0.000 1.000
#> GSM634678 2 0.2043 0.958 0.032 0.968
#> GSM634682 2 0.0000 0.983 0.000 1.000
#> GSM634683 2 0.0000 0.983 0.000 1.000
#> GSM634684 1 0.2948 0.952 0.948 0.052
#> GSM634685 2 0.3274 0.953 0.060 0.940
#> GSM634686 1 0.2948 0.952 0.948 0.052
#> GSM634687 2 0.0000 0.983 0.000 1.000
#> GSM634689 2 0.3431 0.951 0.064 0.936
#> GSM634691 2 0.0000 0.983 0.000 1.000
#> GSM634692 1 0.2948 0.952 0.948 0.052
#> GSM634693 1 0.0000 0.949 1.000 0.000
#> GSM634695 2 0.0000 0.983 0.000 1.000
#> GSM634696 1 0.6247 0.808 0.844 0.156
#> GSM634697 1 0.0000 0.949 1.000 0.000
#> GSM634699 2 0.3114 0.954 0.056 0.944
#> GSM634700 2 0.0000 0.983 0.000 1.000
#> GSM634701 1 0.2948 0.952 0.948 0.052
#> GSM634702 1 0.9393 0.543 0.644 0.356
#> GSM634703 2 0.0000 0.983 0.000 1.000
#> GSM634708 2 0.0000 0.983 0.000 1.000
#> GSM634709 1 0.2948 0.952 0.948 0.052
#> GSM634710 1 0.0000 0.949 1.000 0.000
#> GSM634712 1 0.0000 0.949 1.000 0.000
#> GSM634713 2 0.2948 0.956 0.052 0.948
#> GSM634714 1 0.0000 0.949 1.000 0.000
#> GSM634716 1 0.2948 0.952 0.948 0.052
#> GSM634717 1 0.2948 0.952 0.948 0.052
#> GSM634718 2 0.0000 0.983 0.000 1.000
#> GSM634719 1 0.2948 0.952 0.948 0.052
#> GSM634720 1 0.0000 0.949 1.000 0.000
#> GSM634721 1 0.0000 0.949 1.000 0.000
#> GSM634722 2 0.2948 0.956 0.052 0.948
#> GSM634723 2 0.0000 0.983 0.000 1.000
#> GSM634724 1 0.0000 0.949 1.000 0.000
#> GSM634725 1 0.3274 0.948 0.940 0.060
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0592 0.8069 0.988 0.000 0.012
#> GSM634648 1 0.1753 0.8096 0.952 0.000 0.048
#> GSM634649 1 0.0747 0.8051 0.984 0.000 0.016
#> GSM634650 2 0.8701 0.1548 0.400 0.492 0.108
#> GSM634653 3 0.6026 0.6699 0.376 0.000 0.624
#> GSM634659 1 0.7382 0.6459 0.700 0.184 0.116
#> GSM634666 3 0.3983 0.7036 0.068 0.048 0.884
#> GSM634667 2 0.1964 0.8403 0.000 0.944 0.056
#> GSM634669 1 0.4165 0.7774 0.876 0.048 0.076
#> GSM634670 3 0.5591 0.7276 0.304 0.000 0.696
#> GSM634679 3 0.4178 0.7628 0.172 0.000 0.828
#> GSM634680 3 0.5327 0.7470 0.272 0.000 0.728
#> GSM634681 1 0.0424 0.8083 0.992 0.000 0.008
#> GSM634688 3 0.5443 0.3933 0.004 0.260 0.736
#> GSM634690 2 0.1860 0.8410 0.000 0.948 0.052
#> GSM634694 1 0.3896 0.7850 0.888 0.052 0.060
#> GSM634698 1 0.0424 0.8083 0.992 0.000 0.008
#> GSM634704 2 0.5060 0.7832 0.100 0.836 0.064
#> GSM634705 1 0.0424 0.8083 0.992 0.000 0.008
#> GSM634706 1 0.8196 0.3043 0.560 0.356 0.084
#> GSM634707 1 0.4845 0.7777 0.844 0.052 0.104
#> GSM634711 1 0.2796 0.7789 0.908 0.000 0.092
#> GSM634715 2 0.7338 0.5130 0.288 0.652 0.060
#> GSM634633 1 0.2448 0.7870 0.924 0.000 0.076
#> GSM634634 3 0.2711 0.6772 0.000 0.088 0.912
#> GSM634635 1 0.0424 0.8083 0.992 0.000 0.008
#> GSM634636 1 0.0424 0.8098 0.992 0.000 0.008
#> GSM634637 1 0.3038 0.7816 0.896 0.000 0.104
#> GSM634638 2 0.2066 0.8398 0.000 0.940 0.060
#> GSM634639 1 0.1031 0.8006 0.976 0.000 0.024
#> GSM634640 2 0.1964 0.8403 0.000 0.944 0.056
#> GSM634641 1 0.2384 0.8085 0.936 0.008 0.056
#> GSM634642 2 0.6326 0.6512 0.020 0.688 0.292
#> GSM634644 2 0.1964 0.8403 0.000 0.944 0.056
#> GSM634645 1 0.1031 0.8006 0.976 0.000 0.024
#> GSM634646 3 0.6308 0.4818 0.492 0.000 0.508
#> GSM634647 3 0.4062 0.7642 0.164 0.000 0.836
#> GSM634651 2 0.1411 0.8406 0.000 0.964 0.036
#> GSM634652 2 0.4235 0.7629 0.000 0.824 0.176
#> GSM634654 3 0.5905 0.7046 0.352 0.000 0.648
#> GSM634655 1 0.5529 0.5132 0.704 0.000 0.296
#> GSM634656 3 0.4291 0.7656 0.180 0.000 0.820
#> GSM634657 2 0.5554 0.7617 0.112 0.812 0.076
#> GSM634658 1 0.3805 0.7899 0.884 0.024 0.092
#> GSM634660 1 0.5067 0.7760 0.832 0.052 0.116
#> GSM634661 2 0.0424 0.8429 0.000 0.992 0.008
#> GSM634662 2 0.8013 0.4622 0.296 0.612 0.092
#> GSM634663 2 0.1525 0.8415 0.004 0.964 0.032
#> GSM634664 3 0.4589 0.5520 0.008 0.172 0.820
#> GSM634665 1 0.6252 -0.2766 0.556 0.000 0.444
#> GSM634668 2 0.8774 0.0954 0.412 0.476 0.112
#> GSM634671 1 0.4399 0.6352 0.812 0.000 0.188
#> GSM634672 3 0.5706 0.7217 0.320 0.000 0.680
#> GSM634673 3 0.5678 0.7224 0.316 0.000 0.684
#> GSM634674 2 0.2280 0.8373 0.008 0.940 0.052
#> GSM634675 2 0.3888 0.8160 0.048 0.888 0.064
#> GSM634676 1 0.5117 0.7527 0.832 0.060 0.108
#> GSM634677 2 0.2527 0.8338 0.020 0.936 0.044
#> GSM634678 2 0.6176 0.7460 0.120 0.780 0.100
#> GSM634682 2 0.2066 0.8398 0.000 0.940 0.060
#> GSM634683 2 0.1031 0.8429 0.000 0.976 0.024
#> GSM634684 1 0.2066 0.8074 0.940 0.000 0.060
#> GSM634685 3 0.2625 0.6767 0.000 0.084 0.916
#> GSM634686 1 0.1015 0.8115 0.980 0.012 0.008
#> GSM634687 2 0.2066 0.8398 0.000 0.940 0.060
#> GSM634689 3 0.6124 0.4994 0.036 0.220 0.744
#> GSM634691 2 0.2527 0.8338 0.020 0.936 0.044
#> GSM634692 1 0.1860 0.8006 0.948 0.000 0.052
#> GSM634693 3 0.6305 0.3982 0.484 0.000 0.516
#> GSM634695 2 0.2066 0.8398 0.000 0.940 0.060
#> GSM634696 1 0.7353 0.2061 0.532 0.032 0.436
#> GSM634697 3 0.4750 0.7634 0.216 0.000 0.784
#> GSM634699 3 0.5377 0.6264 0.068 0.112 0.820
#> GSM634700 2 0.2879 0.8301 0.024 0.924 0.052
#> GSM634701 1 0.2063 0.8109 0.948 0.008 0.044
#> GSM634702 1 0.7382 0.6459 0.700 0.184 0.116
#> GSM634703 1 0.8131 0.2968 0.548 0.376 0.076
#> GSM634708 2 0.1031 0.8429 0.000 0.976 0.024
#> GSM634709 1 0.0424 0.8083 0.992 0.000 0.008
#> GSM634710 3 0.4346 0.7570 0.184 0.000 0.816
#> GSM634712 3 0.4291 0.7638 0.180 0.000 0.820
#> GSM634713 2 0.4062 0.7742 0.000 0.836 0.164
#> GSM634714 3 0.6235 0.5435 0.436 0.000 0.564
#> GSM634716 1 0.2878 0.7759 0.904 0.000 0.096
#> GSM634717 1 0.2486 0.8025 0.932 0.008 0.060
#> GSM634718 1 0.7187 0.5920 0.692 0.232 0.076
#> GSM634719 1 0.0892 0.8066 0.980 0.000 0.020
#> GSM634720 3 0.5706 0.7217 0.320 0.000 0.680
#> GSM634721 3 0.5291 0.6804 0.268 0.000 0.732
#> GSM634722 2 0.4654 0.7354 0.000 0.792 0.208
#> GSM634723 1 0.7699 0.5808 0.672 0.212 0.116
#> GSM634724 1 0.6309 -0.3444 0.504 0.000 0.496
#> GSM634725 1 0.4618 0.7749 0.840 0.024 0.136
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0336 0.77986 0.992 0.000 0.008 0.000
#> GSM634648 1 0.1733 0.77666 0.948 0.000 0.028 0.024
#> GSM634649 1 0.0817 0.77535 0.976 0.000 0.024 0.000
#> GSM634650 4 0.8482 -0.12477 0.336 0.240 0.028 0.396
#> GSM634653 3 0.5220 0.55512 0.352 0.000 0.632 0.016
#> GSM634659 1 0.7174 0.38730 0.480 0.060 0.032 0.428
#> GSM634666 4 0.6233 0.43320 0.044 0.012 0.344 0.600
#> GSM634667 2 0.1109 0.69617 0.000 0.968 0.004 0.028
#> GSM634669 1 0.2530 0.76313 0.888 0.000 0.000 0.112
#> GSM634670 3 0.2480 0.77681 0.088 0.000 0.904 0.008
#> GSM634679 3 0.3474 0.74351 0.064 0.000 0.868 0.068
#> GSM634680 3 0.2401 0.77809 0.092 0.000 0.904 0.004
#> GSM634681 1 0.0921 0.77427 0.972 0.000 0.028 0.000
#> GSM634688 4 0.6396 0.55896 0.004 0.104 0.248 0.644
#> GSM634690 2 0.1109 0.70240 0.000 0.968 0.004 0.028
#> GSM634694 1 0.2944 0.74948 0.868 0.000 0.004 0.128
#> GSM634698 1 0.0817 0.77535 0.976 0.000 0.024 0.000
#> GSM634704 2 0.6455 0.56979 0.156 0.660 0.004 0.180
#> GSM634705 1 0.1118 0.76997 0.964 0.000 0.036 0.000
#> GSM634706 1 0.7023 0.40826 0.544 0.144 0.000 0.312
#> GSM634707 1 0.5498 0.65500 0.680 0.000 0.048 0.272
#> GSM634711 1 0.5042 0.70253 0.768 0.000 0.096 0.136
#> GSM634715 2 0.8187 0.00987 0.316 0.356 0.008 0.320
#> GSM634633 1 0.4804 0.72798 0.780 0.000 0.072 0.148
#> GSM634634 4 0.5378 0.31925 0.000 0.012 0.448 0.540
#> GSM634635 1 0.0817 0.77535 0.976 0.000 0.024 0.000
#> GSM634636 1 0.0895 0.78189 0.976 0.000 0.004 0.020
#> GSM634637 1 0.5229 0.69818 0.748 0.000 0.084 0.168
#> GSM634638 2 0.2706 0.67681 0.000 0.900 0.020 0.080
#> GSM634639 1 0.1305 0.77463 0.960 0.000 0.036 0.004
#> GSM634640 2 0.1022 0.69568 0.000 0.968 0.000 0.032
#> GSM634641 1 0.4290 0.73224 0.800 0.000 0.036 0.164
#> GSM634642 4 0.6381 0.46141 0.000 0.196 0.152 0.652
#> GSM634644 2 0.1807 0.69026 0.000 0.940 0.008 0.052
#> GSM634645 1 0.1489 0.76929 0.952 0.000 0.044 0.004
#> GSM634646 3 0.4955 0.49049 0.444 0.000 0.556 0.000
#> GSM634647 3 0.2255 0.68752 0.012 0.000 0.920 0.068
#> GSM634651 2 0.3074 0.69654 0.000 0.848 0.000 0.152
#> GSM634652 2 0.5288 -0.09641 0.000 0.520 0.008 0.472
#> GSM634654 3 0.4155 0.69378 0.240 0.000 0.756 0.004
#> GSM634655 1 0.7516 0.26184 0.472 0.000 0.328 0.200
#> GSM634656 3 0.2586 0.73923 0.048 0.000 0.912 0.040
#> GSM634657 2 0.5859 0.54453 0.032 0.588 0.004 0.376
#> GSM634658 1 0.2882 0.76115 0.892 0.000 0.024 0.084
#> GSM634660 1 0.5787 0.65926 0.680 0.000 0.076 0.244
#> GSM634661 2 0.2216 0.70819 0.000 0.908 0.000 0.092
#> GSM634662 2 0.6157 0.45227 0.040 0.516 0.004 0.440
#> GSM634663 2 0.4456 0.64037 0.000 0.716 0.004 0.280
#> GSM634664 4 0.6227 0.54185 0.004 0.076 0.284 0.636
#> GSM634665 1 0.5150 0.10438 0.596 0.000 0.396 0.008
#> GSM634668 4 0.8143 -0.22725 0.364 0.168 0.028 0.440
#> GSM634671 1 0.3523 0.73418 0.856 0.000 0.112 0.032
#> GSM634672 3 0.2988 0.77935 0.112 0.000 0.876 0.012
#> GSM634673 3 0.2867 0.77975 0.104 0.000 0.884 0.012
#> GSM634674 2 0.5550 0.54756 0.012 0.592 0.008 0.388
#> GSM634675 2 0.5672 0.60900 0.056 0.668 0.000 0.276
#> GSM634676 1 0.4568 0.71202 0.772 0.004 0.024 0.200
#> GSM634677 2 0.3610 0.68461 0.000 0.800 0.000 0.200
#> GSM634678 2 0.6762 0.44845 0.072 0.508 0.008 0.412
#> GSM634682 2 0.2706 0.67681 0.000 0.900 0.020 0.080
#> GSM634683 2 0.1545 0.70904 0.000 0.952 0.008 0.040
#> GSM634684 1 0.1284 0.77412 0.964 0.000 0.024 0.012
#> GSM634685 3 0.5928 0.01283 0.004 0.036 0.588 0.372
#> GSM634686 1 0.0376 0.78007 0.992 0.000 0.004 0.004
#> GSM634687 2 0.1474 0.69164 0.000 0.948 0.000 0.052
#> GSM634689 4 0.5565 0.52575 0.008 0.044 0.248 0.700
#> GSM634691 2 0.3610 0.68461 0.000 0.800 0.000 0.200
#> GSM634692 1 0.1452 0.77357 0.956 0.000 0.036 0.008
#> GSM634693 3 0.5182 0.62235 0.288 0.000 0.684 0.028
#> GSM634695 2 0.2706 0.67681 0.000 0.900 0.020 0.080
#> GSM634696 1 0.7484 0.33708 0.536 0.012 0.156 0.296
#> GSM634697 3 0.2813 0.76936 0.080 0.000 0.896 0.024
#> GSM634699 4 0.7770 0.42717 0.120 0.040 0.300 0.540
#> GSM634700 2 0.4040 0.65928 0.000 0.752 0.000 0.248
#> GSM634701 1 0.1940 0.77597 0.924 0.000 0.000 0.076
#> GSM634702 1 0.7174 0.38730 0.480 0.060 0.032 0.428
#> GSM634703 1 0.7448 0.22858 0.428 0.172 0.000 0.400
#> GSM634708 2 0.0779 0.70679 0.000 0.980 0.004 0.016
#> GSM634709 1 0.0336 0.77986 0.992 0.000 0.008 0.000
#> GSM634710 3 0.5160 0.61624 0.072 0.000 0.748 0.180
#> GSM634712 3 0.3474 0.74351 0.064 0.000 0.868 0.068
#> GSM634713 2 0.5602 -0.05195 0.000 0.508 0.020 0.472
#> GSM634714 3 0.4372 0.66284 0.268 0.000 0.728 0.004
#> GSM634716 1 0.5332 0.68940 0.748 0.000 0.124 0.128
#> GSM634717 1 0.0817 0.77970 0.976 0.000 0.000 0.024
#> GSM634718 1 0.5533 0.61884 0.708 0.072 0.000 0.220
#> GSM634719 1 0.0376 0.78007 0.992 0.000 0.004 0.004
#> GSM634720 3 0.2805 0.77974 0.100 0.000 0.888 0.012
#> GSM634721 1 0.7661 0.00261 0.412 0.000 0.376 0.212
#> GSM634722 4 0.5917 0.08893 0.000 0.444 0.036 0.520
#> GSM634723 1 0.5151 0.68892 0.780 0.044 0.028 0.148
#> GSM634724 3 0.5910 0.64277 0.208 0.000 0.688 0.104
#> GSM634725 1 0.5839 0.57816 0.604 0.000 0.044 0.352
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1012 0.78699 0.968 0.000 0.020 0.000 0.012
#> GSM634648 1 0.1978 0.78316 0.932 0.000 0.032 0.024 0.012
#> GSM634649 1 0.1043 0.78729 0.960 0.000 0.040 0.000 0.000
#> GSM634650 5 0.5049 0.55376 0.068 0.044 0.000 0.140 0.748
#> GSM634653 1 0.5854 0.34143 0.604 0.000 0.308 0.044 0.044
#> GSM634659 5 0.3879 0.64021 0.132 0.016 0.024 0.008 0.820
#> GSM634666 4 0.3113 0.72635 0.004 0.004 0.064 0.872 0.056
#> GSM634667 2 0.0566 0.74419 0.000 0.984 0.000 0.012 0.004
#> GSM634669 1 0.3333 0.58685 0.788 0.000 0.000 0.004 0.208
#> GSM634670 3 0.1547 0.85263 0.032 0.000 0.948 0.016 0.004
#> GSM634679 3 0.2359 0.82893 0.008 0.000 0.912 0.044 0.036
#> GSM634680 3 0.2283 0.84543 0.040 0.000 0.916 0.008 0.036
#> GSM634681 1 0.1197 0.78586 0.952 0.000 0.048 0.000 0.000
#> GSM634688 4 0.2734 0.73610 0.000 0.008 0.028 0.888 0.076
#> GSM634690 2 0.1522 0.75640 0.000 0.944 0.000 0.012 0.044
#> GSM634694 1 0.3242 0.64284 0.816 0.000 0.000 0.012 0.172
#> GSM634698 1 0.0880 0.78846 0.968 0.000 0.032 0.000 0.000
#> GSM634704 2 0.6929 0.51432 0.136 0.524 0.000 0.048 0.292
#> GSM634705 1 0.1270 0.78454 0.948 0.000 0.052 0.000 0.000
#> GSM634706 5 0.5747 0.44839 0.320 0.028 0.000 0.052 0.600
#> GSM634707 5 0.6271 0.48518 0.332 0.000 0.132 0.008 0.528
#> GSM634711 5 0.6722 0.36842 0.388 0.000 0.184 0.008 0.420
#> GSM634715 5 0.4916 0.50683 0.060 0.192 0.008 0.008 0.732
#> GSM634633 5 0.6878 0.29196 0.388 0.000 0.180 0.016 0.416
#> GSM634634 4 0.2635 0.69339 0.000 0.008 0.088 0.888 0.016
#> GSM634635 1 0.0963 0.78804 0.964 0.000 0.036 0.000 0.000
#> GSM634636 1 0.1399 0.78502 0.952 0.000 0.028 0.000 0.020
#> GSM634637 5 0.6673 0.38917 0.380 0.000 0.176 0.008 0.436
#> GSM634638 2 0.1997 0.72164 0.000 0.924 0.000 0.036 0.040
#> GSM634639 1 0.2332 0.76495 0.904 0.000 0.076 0.004 0.016
#> GSM634640 2 0.0566 0.74419 0.000 0.984 0.000 0.012 0.004
#> GSM634641 1 0.5875 0.01033 0.556 0.000 0.100 0.004 0.340
#> GSM634642 4 0.4582 0.68135 0.000 0.048 0.024 0.764 0.164
#> GSM634644 2 0.1582 0.73155 0.000 0.944 0.000 0.028 0.028
#> GSM634645 1 0.1544 0.78006 0.932 0.000 0.068 0.000 0.000
#> GSM634646 1 0.4440 -0.00551 0.528 0.000 0.468 0.000 0.004
#> GSM634647 3 0.3668 0.73804 0.004 0.004 0.796 0.184 0.012
#> GSM634651 2 0.3877 0.71783 0.000 0.764 0.000 0.024 0.212
#> GSM634652 4 0.3861 0.59744 0.000 0.284 0.000 0.712 0.004
#> GSM634654 3 0.4276 0.64441 0.256 0.000 0.716 0.000 0.028
#> GSM634655 5 0.6633 0.30633 0.120 0.004 0.352 0.020 0.504
#> GSM634656 3 0.3265 0.79322 0.016 0.000 0.844 0.128 0.012
#> GSM634657 5 0.4847 0.35530 0.028 0.184 0.000 0.048 0.740
#> GSM634658 1 0.2813 0.73841 0.876 0.000 0.000 0.040 0.084
#> GSM634660 5 0.6314 0.48904 0.324 0.000 0.140 0.008 0.528
#> GSM634661 2 0.3183 0.74014 0.000 0.828 0.000 0.016 0.156
#> GSM634662 5 0.2747 0.51959 0.012 0.088 0.000 0.016 0.884
#> GSM634663 2 0.5046 0.47717 0.000 0.500 0.000 0.032 0.468
#> GSM634664 4 0.2710 0.73538 0.000 0.008 0.036 0.892 0.064
#> GSM634665 1 0.3863 0.68257 0.804 0.000 0.156 0.020 0.020
#> GSM634668 5 0.3553 0.60712 0.072 0.032 0.024 0.012 0.860
#> GSM634671 1 0.4206 0.67803 0.784 0.000 0.028 0.164 0.024
#> GSM634672 3 0.1757 0.85244 0.048 0.000 0.936 0.012 0.004
#> GSM634673 3 0.1997 0.84878 0.040 0.000 0.924 0.000 0.036
#> GSM634674 5 0.3491 0.49602 0.000 0.124 0.028 0.012 0.836
#> GSM634675 2 0.6055 0.51205 0.032 0.504 0.000 0.052 0.412
#> GSM634676 1 0.5192 0.32487 0.644 0.000 0.000 0.076 0.280
#> GSM634677 2 0.5459 0.61081 0.012 0.588 0.000 0.048 0.352
#> GSM634678 5 0.4502 0.49424 0.048 0.108 0.000 0.052 0.792
#> GSM634682 2 0.1997 0.72164 0.000 0.924 0.000 0.036 0.040
#> GSM634683 2 0.2293 0.75671 0.000 0.900 0.000 0.016 0.084
#> GSM634684 1 0.1907 0.76966 0.928 0.000 0.000 0.044 0.028
#> GSM634685 4 0.6866 0.10983 0.000 0.060 0.356 0.492 0.092
#> GSM634686 1 0.0671 0.78503 0.980 0.000 0.004 0.000 0.016
#> GSM634687 2 0.0898 0.74246 0.000 0.972 0.000 0.020 0.008
#> GSM634689 4 0.4546 0.68242 0.000 0.012 0.056 0.756 0.176
#> GSM634691 2 0.5396 0.61398 0.012 0.592 0.000 0.044 0.352
#> GSM634692 1 0.1168 0.78352 0.960 0.000 0.000 0.032 0.008
#> GSM634693 1 0.6504 0.24236 0.532 0.000 0.328 0.112 0.028
#> GSM634695 2 0.2221 0.71527 0.000 0.912 0.000 0.036 0.052
#> GSM634696 4 0.6637 0.17202 0.356 0.004 0.012 0.488 0.140
#> GSM634697 3 0.2499 0.84743 0.036 0.000 0.908 0.040 0.016
#> GSM634699 4 0.3018 0.70734 0.068 0.000 0.056 0.872 0.004
#> GSM634700 2 0.5003 0.55174 0.000 0.544 0.000 0.032 0.424
#> GSM634701 1 0.4114 0.56510 0.772 0.000 0.040 0.004 0.184
#> GSM634702 5 0.3965 0.64028 0.132 0.016 0.028 0.008 0.816
#> GSM634703 5 0.4349 0.57984 0.108 0.056 0.000 0.036 0.800
#> GSM634708 2 0.1522 0.75640 0.000 0.944 0.000 0.012 0.044
#> GSM634709 1 0.0798 0.78787 0.976 0.000 0.016 0.000 0.008
#> GSM634710 3 0.4837 0.67376 0.020 0.000 0.740 0.180 0.060
#> GSM634712 3 0.2201 0.83337 0.008 0.000 0.920 0.040 0.032
#> GSM634713 4 0.4811 0.29279 0.000 0.452 0.000 0.528 0.020
#> GSM634714 3 0.5614 0.60894 0.260 0.000 0.652 0.048 0.040
#> GSM634716 5 0.6811 0.39025 0.356 0.000 0.208 0.008 0.428
#> GSM634717 1 0.1082 0.77785 0.964 0.000 0.000 0.008 0.028
#> GSM634718 5 0.5423 0.22099 0.452 0.008 0.000 0.040 0.500
#> GSM634719 1 0.1153 0.78545 0.964 0.000 0.008 0.004 0.024
#> GSM634720 3 0.2513 0.84456 0.048 0.000 0.904 0.008 0.040
#> GSM634721 1 0.7620 0.14176 0.444 0.000 0.208 0.280 0.068
#> GSM634722 4 0.3916 0.62375 0.000 0.256 0.000 0.732 0.012
#> GSM634723 1 0.4083 0.64800 0.788 0.000 0.000 0.080 0.132
#> GSM634724 3 0.2518 0.79802 0.016 0.000 0.896 0.008 0.080
#> GSM634725 5 0.4974 0.54237 0.316 0.000 0.040 0.004 0.640
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1321 0.7917 0.952 0.000 0.000 0.004 0.020 0.024
#> GSM634648 1 0.2007 0.7881 0.924 0.000 0.016 0.012 0.008 0.040
#> GSM634649 1 0.0881 0.7934 0.972 0.000 0.012 0.000 0.008 0.008
#> GSM634650 5 0.6620 0.2608 0.012 0.044 0.000 0.148 0.488 0.308
#> GSM634653 1 0.5120 0.6191 0.720 0.000 0.140 0.016 0.044 0.080
#> GSM634659 5 0.3857 0.6721 0.064 0.000 0.000 0.004 0.772 0.160
#> GSM634666 4 0.2748 0.7611 0.004 0.004 0.012 0.884 0.032 0.064
#> GSM634667 2 0.2196 0.7088 0.000 0.884 0.004 0.004 0.000 0.108
#> GSM634669 1 0.4762 0.5993 0.676 0.000 0.000 0.004 0.216 0.104
#> GSM634670 3 0.1262 0.7817 0.020 0.000 0.956 0.000 0.008 0.016
#> GSM634679 3 0.3492 0.7419 0.004 0.000 0.828 0.040 0.108 0.020
#> GSM634680 3 0.3317 0.7602 0.036 0.000 0.852 0.008 0.032 0.072
#> GSM634681 1 0.1168 0.7882 0.956 0.000 0.028 0.000 0.000 0.016
#> GSM634688 4 0.1913 0.7638 0.000 0.016 0.000 0.924 0.016 0.044
#> GSM634690 2 0.3314 0.5874 0.000 0.740 0.004 0.000 0.000 0.256
#> GSM634694 1 0.4437 0.6619 0.716 0.000 0.000 0.004 0.092 0.188
#> GSM634698 1 0.0909 0.7919 0.968 0.000 0.020 0.000 0.000 0.012
#> GSM634704 6 0.6645 0.2988 0.096 0.392 0.000 0.012 0.068 0.432
#> GSM634705 1 0.0692 0.7911 0.976 0.000 0.020 0.000 0.000 0.004
#> GSM634706 6 0.4841 0.3896 0.160 0.004 0.000 0.000 0.156 0.680
#> GSM634707 5 0.3463 0.7084 0.104 0.000 0.040 0.000 0.828 0.028
#> GSM634711 5 0.4645 0.6754 0.188 0.000 0.072 0.000 0.716 0.024
#> GSM634715 5 0.5273 0.5270 0.020 0.168 0.004 0.000 0.668 0.140
#> GSM634633 5 0.6212 0.5395 0.208 0.004 0.112 0.008 0.604 0.064
#> GSM634634 4 0.3043 0.7222 0.000 0.000 0.056 0.864 0.040 0.040
#> GSM634635 1 0.0870 0.7933 0.972 0.000 0.012 0.000 0.004 0.012
#> GSM634636 1 0.1636 0.7910 0.936 0.000 0.000 0.004 0.036 0.024
#> GSM634637 5 0.4392 0.6956 0.176 0.000 0.060 0.000 0.740 0.024
#> GSM634638 2 0.1307 0.6919 0.000 0.952 0.008 0.008 0.032 0.000
#> GSM634639 1 0.3739 0.7227 0.812 0.000 0.036 0.000 0.104 0.048
#> GSM634640 2 0.2149 0.7109 0.000 0.888 0.000 0.004 0.004 0.104
#> GSM634641 5 0.5087 0.5131 0.332 0.000 0.016 0.000 0.592 0.060
#> GSM634642 4 0.3568 0.6895 0.000 0.012 0.000 0.780 0.020 0.188
#> GSM634644 2 0.1332 0.7056 0.000 0.952 0.000 0.008 0.012 0.028
#> GSM634645 1 0.1477 0.7846 0.940 0.000 0.048 0.000 0.004 0.008
#> GSM634646 1 0.3432 0.6232 0.764 0.000 0.216 0.000 0.000 0.020
#> GSM634647 3 0.3818 0.7110 0.000 0.004 0.812 0.104 0.040 0.040
#> GSM634651 6 0.4184 -0.0400 0.000 0.484 0.000 0.000 0.012 0.504
#> GSM634652 4 0.3839 0.6299 0.000 0.212 0.004 0.748 0.000 0.036
#> GSM634654 3 0.6006 0.4002 0.344 0.000 0.520 0.008 0.028 0.100
#> GSM634655 5 0.4793 0.6081 0.044 0.012 0.140 0.004 0.748 0.052
#> GSM634656 3 0.3386 0.7350 0.004 0.000 0.844 0.080 0.036 0.036
#> GSM634657 6 0.6659 0.2067 0.012 0.168 0.000 0.032 0.356 0.432
#> GSM634658 1 0.5046 0.7085 0.716 0.000 0.004 0.052 0.140 0.088
#> GSM634660 5 0.3127 0.7074 0.104 0.000 0.040 0.000 0.844 0.012
#> GSM634661 2 0.3860 0.0606 0.000 0.528 0.000 0.000 0.000 0.472
#> GSM634662 5 0.4892 0.0418 0.008 0.032 0.000 0.004 0.484 0.472
#> GSM634663 6 0.4754 0.5027 0.000 0.252 0.000 0.004 0.084 0.660
#> GSM634664 4 0.1964 0.7644 0.004 0.008 0.000 0.920 0.012 0.056
#> GSM634665 1 0.4169 0.7018 0.792 0.000 0.100 0.012 0.024 0.072
#> GSM634668 5 0.4197 0.5441 0.032 0.000 0.000 0.004 0.680 0.284
#> GSM634671 1 0.5056 0.6824 0.728 0.000 0.024 0.144 0.044 0.060
#> GSM634672 3 0.1442 0.7835 0.040 0.000 0.944 0.000 0.012 0.004
#> GSM634673 3 0.2811 0.7721 0.028 0.000 0.884 0.008 0.032 0.048
#> GSM634674 5 0.4892 0.4179 0.000 0.084 0.004 0.000 0.632 0.280
#> GSM634675 6 0.4152 0.4976 0.028 0.268 0.000 0.008 0.000 0.696
#> GSM634676 1 0.6660 0.2068 0.448 0.000 0.000 0.060 0.324 0.168
#> GSM634677 6 0.3894 0.4257 0.008 0.324 0.004 0.000 0.000 0.664
#> GSM634678 6 0.5180 0.3647 0.036 0.032 0.000 0.012 0.284 0.636
#> GSM634682 2 0.1307 0.6919 0.000 0.952 0.008 0.008 0.032 0.000
#> GSM634683 2 0.3918 0.4079 0.000 0.632 0.004 0.004 0.000 0.360
#> GSM634684 1 0.4577 0.7375 0.760 0.000 0.004 0.056 0.112 0.068
#> GSM634685 4 0.8558 0.2617 0.000 0.216 0.140 0.352 0.164 0.128
#> GSM634686 1 0.2594 0.7807 0.880 0.000 0.000 0.004 0.056 0.060
#> GSM634687 2 0.1949 0.7134 0.000 0.904 0.000 0.004 0.004 0.088
#> GSM634689 4 0.3962 0.6914 0.000 0.000 0.000 0.764 0.116 0.120
#> GSM634691 6 0.3728 0.3950 0.000 0.344 0.000 0.000 0.004 0.652
#> GSM634692 1 0.3059 0.7857 0.860 0.000 0.004 0.012 0.052 0.072
#> GSM634693 1 0.6607 0.3939 0.568 0.000 0.244 0.060 0.052 0.076
#> GSM634695 2 0.2257 0.6595 0.000 0.904 0.008 0.008 0.068 0.012
#> GSM634696 4 0.6918 0.3087 0.280 0.004 0.008 0.492 0.136 0.080
#> GSM634697 3 0.2316 0.7777 0.024 0.000 0.912 0.032 0.012 0.020
#> GSM634699 4 0.2465 0.7557 0.024 0.004 0.000 0.892 0.008 0.072
#> GSM634700 6 0.4235 0.4719 0.000 0.292 0.000 0.004 0.032 0.672
#> GSM634701 1 0.4172 0.5320 0.680 0.000 0.000 0.000 0.280 0.040
#> GSM634702 5 0.3785 0.6768 0.064 0.000 0.000 0.004 0.780 0.152
#> GSM634703 6 0.5044 0.2395 0.052 0.016 0.000 0.004 0.312 0.616
#> GSM634708 2 0.3601 0.5071 0.000 0.684 0.004 0.000 0.000 0.312
#> GSM634709 1 0.1321 0.7917 0.952 0.000 0.000 0.004 0.020 0.024
#> GSM634710 3 0.5671 0.5649 0.008 0.000 0.636 0.188 0.140 0.028
#> GSM634712 3 0.3407 0.7433 0.004 0.000 0.832 0.040 0.108 0.016
#> GSM634713 2 0.4857 -0.0836 0.000 0.556 0.008 0.400 0.028 0.008
#> GSM634714 3 0.6450 0.2929 0.356 0.000 0.488 0.016 0.064 0.076
#> GSM634716 5 0.4766 0.6708 0.164 0.000 0.108 0.004 0.712 0.012
#> GSM634717 1 0.2128 0.7865 0.908 0.000 0.000 0.004 0.032 0.056
#> GSM634718 6 0.5550 0.2389 0.268 0.000 0.000 0.004 0.164 0.564
#> GSM634719 1 0.3465 0.7681 0.828 0.000 0.004 0.008 0.084 0.076
#> GSM634720 3 0.4485 0.7259 0.076 0.000 0.776 0.008 0.068 0.072
#> GSM634721 1 0.7957 0.1007 0.396 0.000 0.168 0.276 0.084 0.076
#> GSM634722 4 0.4823 0.5521 0.000 0.296 0.000 0.640 0.024 0.040
#> GSM634723 1 0.6477 0.5018 0.536 0.008 0.000 0.060 0.132 0.264
#> GSM634724 3 0.3807 0.6892 0.032 0.000 0.772 0.004 0.184 0.008
#> GSM634725 5 0.4234 0.6984 0.108 0.000 0.012 0.004 0.768 0.108
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 individual(p) k
#> SD:kmeans 92 0.366 2
#> SD:kmeans 81 0.356 3
#> SD:kmeans 71 0.610 4
#> SD:kmeans 71 0.691 5
#> SD:kmeans 69 0.911 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 17698 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 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.963 0.985 0.5001 0.499 0.499
#> 3 3 0.682 0.794 0.895 0.3404 0.711 0.481
#> 4 4 0.652 0.640 0.809 0.1080 0.883 0.669
#> 5 5 0.677 0.691 0.814 0.0678 0.921 0.716
#> 6 6 0.693 0.564 0.759 0.0415 0.960 0.828
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
#> GSM634643 1 0.0000 0.987 1.000 0.000
#> GSM634648 1 0.0000 0.987 1.000 0.000
#> GSM634649 1 0.0000 0.987 1.000 0.000
#> GSM634650 2 0.0000 0.980 0.000 1.000
#> GSM634653 1 0.0000 0.987 1.000 0.000
#> GSM634659 2 0.9608 0.371 0.384 0.616
#> GSM634666 2 0.0376 0.977 0.004 0.996
#> GSM634667 2 0.0000 0.980 0.000 1.000
#> GSM634669 1 0.0000 0.987 1.000 0.000
#> GSM634670 1 0.0000 0.987 1.000 0.000
#> GSM634679 1 0.0000 0.987 1.000 0.000
#> GSM634680 1 0.0000 0.987 1.000 0.000
#> GSM634681 1 0.0000 0.987 1.000 0.000
#> GSM634688 2 0.0000 0.980 0.000 1.000
#> GSM634690 2 0.0000 0.980 0.000 1.000
#> GSM634694 1 0.0000 0.987 1.000 0.000
#> GSM634698 1 0.0000 0.987 1.000 0.000
#> GSM634704 2 0.0376 0.977 0.004 0.996
#> GSM634705 1 0.0000 0.987 1.000 0.000
#> GSM634706 2 0.0000 0.980 0.000 1.000
#> GSM634707 1 0.0000 0.987 1.000 0.000
#> GSM634711 1 0.0000 0.987 1.000 0.000
#> GSM634715 2 0.0000 0.980 0.000 1.000
#> GSM634633 1 0.0000 0.987 1.000 0.000
#> GSM634634 2 0.0000 0.980 0.000 1.000
#> GSM634635 1 0.0000 0.987 1.000 0.000
#> GSM634636 1 0.0000 0.987 1.000 0.000
#> GSM634637 1 0.0000 0.987 1.000 0.000
#> GSM634638 2 0.0000 0.980 0.000 1.000
#> GSM634639 1 0.0000 0.987 1.000 0.000
#> GSM634640 2 0.0000 0.980 0.000 1.000
#> GSM634641 1 0.0000 0.987 1.000 0.000
#> GSM634642 2 0.0000 0.980 0.000 1.000
#> GSM634644 2 0.0000 0.980 0.000 1.000
#> GSM634645 1 0.0000 0.987 1.000 0.000
#> GSM634646 1 0.0000 0.987 1.000 0.000
#> GSM634647 1 0.0000 0.987 1.000 0.000
#> GSM634651 2 0.0000 0.980 0.000 1.000
#> GSM634652 2 0.0000 0.980 0.000 1.000
#> GSM634654 1 0.0000 0.987 1.000 0.000
#> GSM634655 1 0.0000 0.987 1.000 0.000
#> GSM634656 1 0.0000 0.987 1.000 0.000
#> GSM634657 2 0.0000 0.980 0.000 1.000
#> GSM634658 1 0.0000 0.987 1.000 0.000
#> GSM634660 1 0.0000 0.987 1.000 0.000
#> GSM634661 2 0.0000 0.980 0.000 1.000
#> GSM634662 2 0.0000 0.980 0.000 1.000
#> GSM634663 2 0.0000 0.980 0.000 1.000
#> GSM634664 2 0.0000 0.980 0.000 1.000
#> GSM634665 1 0.0000 0.987 1.000 0.000
#> GSM634668 2 0.0000 0.980 0.000 1.000
#> GSM634671 1 0.0000 0.987 1.000 0.000
#> GSM634672 1 0.0000 0.987 1.000 0.000
#> GSM634673 1 0.0000 0.987 1.000 0.000
#> GSM634674 2 0.0000 0.980 0.000 1.000
#> GSM634675 2 0.0000 0.980 0.000 1.000
#> GSM634676 1 0.8144 0.664 0.748 0.252
#> GSM634677 2 0.0000 0.980 0.000 1.000
#> GSM634678 2 0.0000 0.980 0.000 1.000
#> GSM634682 2 0.0000 0.980 0.000 1.000
#> GSM634683 2 0.0000 0.980 0.000 1.000
#> GSM634684 1 0.0000 0.987 1.000 0.000
#> GSM634685 2 0.0000 0.980 0.000 1.000
#> GSM634686 1 0.0000 0.987 1.000 0.000
#> GSM634687 2 0.0000 0.980 0.000 1.000
#> GSM634689 2 0.0000 0.980 0.000 1.000
#> GSM634691 2 0.0000 0.980 0.000 1.000
#> GSM634692 1 0.0000 0.987 1.000 0.000
#> GSM634693 1 0.0000 0.987 1.000 0.000
#> GSM634695 2 0.0000 0.980 0.000 1.000
#> GSM634696 1 0.7219 0.750 0.800 0.200
#> GSM634697 1 0.0000 0.987 1.000 0.000
#> GSM634699 2 0.0000 0.980 0.000 1.000
#> GSM634700 2 0.0000 0.980 0.000 1.000
#> GSM634701 1 0.0000 0.987 1.000 0.000
#> GSM634702 2 0.9608 0.371 0.384 0.616
#> GSM634703 2 0.0000 0.980 0.000 1.000
#> GSM634708 2 0.0000 0.980 0.000 1.000
#> GSM634709 1 0.0000 0.987 1.000 0.000
#> GSM634710 1 0.0000 0.987 1.000 0.000
#> GSM634712 1 0.0000 0.987 1.000 0.000
#> GSM634713 2 0.0000 0.980 0.000 1.000
#> GSM634714 1 0.0000 0.987 1.000 0.000
#> GSM634716 1 0.0000 0.987 1.000 0.000
#> GSM634717 1 0.0000 0.987 1.000 0.000
#> GSM634718 2 0.0000 0.980 0.000 1.000
#> GSM634719 1 0.0000 0.987 1.000 0.000
#> GSM634720 1 0.0000 0.987 1.000 0.000
#> GSM634721 1 0.0000 0.987 1.000 0.000
#> GSM634722 2 0.0000 0.980 0.000 1.000
#> GSM634723 2 0.0000 0.980 0.000 1.000
#> GSM634724 1 0.0000 0.987 1.000 0.000
#> GSM634725 1 0.6801 0.779 0.820 0.180
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634648 3 0.5529 0.6891 0.296 0.000 0.704
#> GSM634649 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634650 2 0.0592 0.9386 0.000 0.988 0.012
#> GSM634653 3 0.5058 0.7203 0.244 0.000 0.756
#> GSM634659 1 0.7660 0.3154 0.548 0.404 0.048
#> GSM634666 3 0.4346 0.7348 0.000 0.184 0.816
#> GSM634667 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634670 3 0.1289 0.8293 0.032 0.000 0.968
#> GSM634679 3 0.0747 0.8230 0.016 0.000 0.984
#> GSM634680 3 0.1411 0.8288 0.036 0.000 0.964
#> GSM634681 1 0.2448 0.8014 0.924 0.000 0.076
#> GSM634688 2 0.6309 -0.0823 0.000 0.504 0.496
#> GSM634690 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634694 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634698 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634704 2 0.3941 0.7788 0.156 0.844 0.000
#> GSM634705 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634706 2 0.4291 0.7814 0.152 0.840 0.008
#> GSM634707 1 0.4974 0.7051 0.764 0.000 0.236
#> GSM634711 1 0.5058 0.6970 0.756 0.000 0.244
#> GSM634715 2 0.0237 0.9443 0.000 0.996 0.004
#> GSM634633 3 0.5621 0.5310 0.308 0.000 0.692
#> GSM634634 3 0.1031 0.8225 0.000 0.024 0.976
#> GSM634635 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634636 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634637 1 0.5058 0.6970 0.756 0.000 0.244
#> GSM634638 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634639 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634640 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634641 1 0.4291 0.7531 0.820 0.000 0.180
#> GSM634642 2 0.2537 0.8759 0.000 0.920 0.080
#> GSM634644 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634645 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634646 3 0.5882 0.6357 0.348 0.000 0.652
#> GSM634647 3 0.0892 0.8282 0.020 0.000 0.980
#> GSM634651 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634652 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634654 3 0.5138 0.7184 0.252 0.000 0.748
#> GSM634655 3 0.4842 0.6504 0.224 0.000 0.776
#> GSM634656 3 0.0892 0.8282 0.020 0.000 0.980
#> GSM634657 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634658 1 0.0747 0.8537 0.984 0.000 0.016
#> GSM634660 1 0.5016 0.7012 0.760 0.000 0.240
#> GSM634661 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634662 2 0.0892 0.9346 0.000 0.980 0.020
#> GSM634663 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634664 3 0.5178 0.6468 0.000 0.256 0.744
#> GSM634665 3 0.5926 0.6044 0.356 0.000 0.644
#> GSM634668 2 0.1031 0.9316 0.000 0.976 0.024
#> GSM634671 1 0.4702 0.6329 0.788 0.000 0.212
#> GSM634672 3 0.1643 0.8273 0.044 0.000 0.956
#> GSM634673 3 0.1289 0.8293 0.032 0.000 0.968
#> GSM634674 2 0.0892 0.9346 0.000 0.980 0.020
#> GSM634675 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634676 1 0.1774 0.8431 0.960 0.024 0.016
#> GSM634677 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634678 2 0.0747 0.9370 0.000 0.984 0.016
#> GSM634682 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634684 1 0.0747 0.8537 0.984 0.000 0.016
#> GSM634685 3 0.1529 0.8192 0.000 0.040 0.960
#> GSM634686 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634689 3 0.6095 0.3649 0.000 0.392 0.608
#> GSM634691 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634692 1 0.0592 0.8554 0.988 0.000 0.012
#> GSM634693 3 0.5560 0.6729 0.300 0.000 0.700
#> GSM634695 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634696 3 0.6151 0.7315 0.056 0.180 0.764
#> GSM634697 3 0.1289 0.8293 0.032 0.000 0.968
#> GSM634699 3 0.6518 0.7368 0.168 0.080 0.752
#> GSM634700 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634701 1 0.0747 0.8557 0.984 0.000 0.016
#> GSM634702 1 0.8827 0.3038 0.496 0.384 0.120
#> GSM634703 2 0.6079 0.2697 0.388 0.612 0.000
#> GSM634708 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634709 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634710 3 0.0424 0.8231 0.008 0.000 0.992
#> GSM634712 3 0.0747 0.8230 0.016 0.000 0.984
#> GSM634713 2 0.0000 0.9463 0.000 1.000 0.000
#> GSM634714 3 0.3752 0.7820 0.144 0.000 0.856
#> GSM634716 1 0.5178 0.6844 0.744 0.000 0.256
#> GSM634717 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634718 1 0.5254 0.6215 0.736 0.264 0.000
#> GSM634719 1 0.0000 0.8609 1.000 0.000 0.000
#> GSM634720 3 0.1411 0.8288 0.036 0.000 0.964
#> GSM634721 3 0.3941 0.7832 0.156 0.000 0.844
#> GSM634722 2 0.2537 0.8795 0.000 0.920 0.080
#> GSM634723 1 0.5737 0.6246 0.732 0.256 0.012
#> GSM634724 3 0.4974 0.6344 0.236 0.000 0.764
#> GSM634725 1 0.6307 0.5936 0.660 0.012 0.328
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0000 0.7451 1.000 0.000 0.000 0.000
#> GSM634648 1 0.7349 -0.0838 0.500 0.004 0.348 0.148
#> GSM634649 1 0.1211 0.7327 0.960 0.000 0.040 0.000
#> GSM634650 2 0.4833 0.7127 0.032 0.740 0.000 0.228
#> GSM634653 3 0.6238 0.5061 0.296 0.000 0.620 0.084
#> GSM634659 1 0.9657 0.2219 0.352 0.284 0.148 0.216
#> GSM634666 4 0.3668 0.7461 0.000 0.004 0.188 0.808
#> GSM634667 2 0.1716 0.8814 0.000 0.936 0.000 0.064
#> GSM634669 1 0.0376 0.7452 0.992 0.004 0.004 0.000
#> GSM634670 3 0.0657 0.6830 0.012 0.000 0.984 0.004
#> GSM634679 3 0.3837 0.4776 0.000 0.000 0.776 0.224
#> GSM634680 3 0.1305 0.6875 0.036 0.000 0.960 0.004
#> GSM634681 1 0.4454 0.3408 0.692 0.000 0.308 0.000
#> GSM634688 4 0.4149 0.7630 0.000 0.036 0.152 0.812
#> GSM634690 2 0.1474 0.8840 0.000 0.948 0.000 0.052
#> GSM634694 1 0.0188 0.7452 0.996 0.004 0.000 0.000
#> GSM634698 1 0.1302 0.7312 0.956 0.000 0.044 0.000
#> GSM634704 2 0.2399 0.8628 0.048 0.920 0.000 0.032
#> GSM634705 1 0.1474 0.7273 0.948 0.000 0.052 0.000
#> GSM634706 2 0.2376 0.8335 0.068 0.916 0.000 0.016
#> GSM634707 1 0.7375 0.3137 0.488 0.000 0.336 0.176
#> GSM634711 1 0.7366 0.3045 0.484 0.000 0.344 0.172
#> GSM634715 2 0.2345 0.8736 0.000 0.900 0.000 0.100
#> GSM634633 3 0.4114 0.6398 0.060 0.000 0.828 0.112
#> GSM634634 4 0.4054 0.7491 0.000 0.016 0.188 0.796
#> GSM634635 1 0.1389 0.7294 0.952 0.000 0.048 0.000
#> GSM634636 1 0.0895 0.7441 0.976 0.000 0.020 0.004
#> GSM634637 1 0.7413 0.2884 0.472 0.000 0.352 0.176
#> GSM634638 2 0.1940 0.8777 0.000 0.924 0.000 0.076
#> GSM634639 1 0.4964 0.5089 0.716 0.000 0.256 0.028
#> GSM634640 2 0.1867 0.8789 0.000 0.928 0.000 0.072
#> GSM634641 1 0.6417 0.5289 0.660 0.004 0.200 0.136
#> GSM634642 4 0.5733 0.6454 0.000 0.312 0.048 0.640
#> GSM634644 2 0.2408 0.8609 0.000 0.896 0.000 0.104
#> GSM634645 1 0.2081 0.7156 0.916 0.000 0.084 0.000
#> GSM634646 3 0.4981 0.2797 0.464 0.000 0.536 0.000
#> GSM634647 3 0.4456 0.4187 0.004 0.000 0.716 0.280
#> GSM634651 2 0.0469 0.8762 0.000 0.988 0.000 0.012
#> GSM634652 4 0.4564 0.5616 0.000 0.328 0.000 0.672
#> GSM634654 3 0.5522 0.5360 0.288 0.000 0.668 0.044
#> GSM634655 3 0.4379 0.5904 0.036 0.000 0.792 0.172
#> GSM634656 3 0.2799 0.6376 0.008 0.000 0.884 0.108
#> GSM634657 2 0.1940 0.8800 0.000 0.924 0.000 0.076
#> GSM634658 1 0.2198 0.7263 0.920 0.000 0.008 0.072
#> GSM634660 1 0.7882 0.2979 0.472 0.016 0.336 0.176
#> GSM634661 2 0.0000 0.8788 0.000 1.000 0.000 0.000
#> GSM634662 2 0.1978 0.8490 0.000 0.928 0.004 0.068
#> GSM634663 2 0.1302 0.8848 0.000 0.956 0.000 0.044
#> GSM634664 4 0.4004 0.7583 0.000 0.024 0.164 0.812
#> GSM634665 3 0.5693 0.2255 0.472 0.000 0.504 0.024
#> GSM634668 2 0.4617 0.6779 0.000 0.764 0.032 0.204
#> GSM634671 1 0.4344 0.6760 0.816 0.000 0.076 0.108
#> GSM634672 3 0.0895 0.6855 0.020 0.000 0.976 0.004
#> GSM634673 3 0.0779 0.6845 0.016 0.000 0.980 0.004
#> GSM634674 2 0.1489 0.8745 0.000 0.952 0.004 0.044
#> GSM634675 2 0.0592 0.8749 0.000 0.984 0.000 0.016
#> GSM634676 1 0.3289 0.7011 0.852 0.004 0.004 0.140
#> GSM634677 2 0.0469 0.8762 0.000 0.988 0.000 0.012
#> GSM634678 2 0.1724 0.8614 0.020 0.948 0.000 0.032
#> GSM634682 2 0.1940 0.8777 0.000 0.924 0.000 0.076
#> GSM634683 2 0.1389 0.8847 0.000 0.952 0.000 0.048
#> GSM634684 1 0.2271 0.7242 0.916 0.000 0.008 0.076
#> GSM634685 4 0.5510 0.4960 0.000 0.024 0.376 0.600
#> GSM634686 1 0.0000 0.7451 1.000 0.000 0.000 0.000
#> GSM634687 2 0.1940 0.8777 0.000 0.924 0.000 0.076
#> GSM634689 4 0.6400 0.6945 0.000 0.180 0.168 0.652
#> GSM634691 2 0.0469 0.8762 0.000 0.988 0.000 0.012
#> GSM634692 1 0.0779 0.7436 0.980 0.000 0.004 0.016
#> GSM634693 3 0.6278 0.3273 0.408 0.000 0.532 0.060
#> GSM634695 2 0.1940 0.8777 0.000 0.924 0.000 0.076
#> GSM634696 4 0.3632 0.7447 0.008 0.004 0.156 0.832
#> GSM634697 3 0.2142 0.6650 0.016 0.000 0.928 0.056
#> GSM634699 4 0.4900 0.7419 0.036 0.016 0.168 0.780
#> GSM634700 2 0.0817 0.8720 0.000 0.976 0.000 0.024
#> GSM634701 1 0.2965 0.7131 0.892 0.000 0.072 0.036
#> GSM634702 2 0.9809 -0.1527 0.276 0.328 0.176 0.220
#> GSM634703 2 0.5993 0.4133 0.308 0.628 0.000 0.064
#> GSM634708 2 0.1389 0.8848 0.000 0.952 0.000 0.048
#> GSM634709 1 0.0000 0.7451 1.000 0.000 0.000 0.000
#> GSM634710 3 0.4916 -0.0301 0.000 0.000 0.576 0.424
#> GSM634712 3 0.3123 0.5706 0.000 0.000 0.844 0.156
#> GSM634713 4 0.4817 0.4231 0.000 0.388 0.000 0.612
#> GSM634714 3 0.3400 0.6527 0.180 0.000 0.820 0.000
#> GSM634716 3 0.7133 0.1554 0.280 0.000 0.548 0.172
#> GSM634717 1 0.0188 0.7452 0.996 0.004 0.000 0.000
#> GSM634718 1 0.5028 0.3130 0.596 0.400 0.000 0.004
#> GSM634719 1 0.0336 0.7457 0.992 0.000 0.008 0.000
#> GSM634720 3 0.1209 0.6874 0.032 0.000 0.964 0.004
#> GSM634721 4 0.6179 0.4796 0.072 0.000 0.320 0.608
#> GSM634722 4 0.4245 0.7058 0.000 0.196 0.020 0.784
#> GSM634723 1 0.5902 0.5454 0.696 0.184 0.000 0.120
#> GSM634724 3 0.3355 0.6136 0.004 0.000 0.836 0.160
#> GSM634725 1 0.8416 0.2381 0.420 0.028 0.324 0.228
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1216 0.8136 0.960 0.000 0.020 0.000 0.020
#> GSM634648 1 0.6101 0.3930 0.580 0.000 0.288 0.120 0.012
#> GSM634649 1 0.1740 0.8106 0.932 0.000 0.056 0.000 0.012
#> GSM634650 2 0.6567 0.3853 0.028 0.552 0.000 0.136 0.284
#> GSM634653 3 0.5383 0.5987 0.212 0.000 0.688 0.080 0.020
#> GSM634659 5 0.2121 0.7336 0.016 0.020 0.020 0.012 0.932
#> GSM634666 4 0.1121 0.7732 0.000 0.000 0.044 0.956 0.000
#> GSM634667 2 0.0798 0.8691 0.000 0.976 0.000 0.016 0.008
#> GSM634669 1 0.1864 0.7964 0.924 0.000 0.004 0.004 0.068
#> GSM634670 3 0.0579 0.7486 0.000 0.000 0.984 0.008 0.008
#> GSM634679 3 0.4384 0.6004 0.000 0.000 0.728 0.228 0.044
#> GSM634680 3 0.1314 0.7534 0.016 0.000 0.960 0.012 0.012
#> GSM634681 1 0.3521 0.6707 0.764 0.000 0.232 0.000 0.004
#> GSM634688 4 0.0579 0.7877 0.000 0.008 0.008 0.984 0.000
#> GSM634690 2 0.1195 0.8732 0.000 0.960 0.000 0.012 0.028
#> GSM634694 1 0.1604 0.8070 0.944 0.004 0.004 0.004 0.044
#> GSM634698 1 0.1557 0.8118 0.940 0.000 0.052 0.000 0.008
#> GSM634704 2 0.2338 0.8547 0.048 0.916 0.004 0.008 0.024
#> GSM634705 1 0.2511 0.8004 0.892 0.000 0.080 0.000 0.028
#> GSM634706 2 0.4766 0.7796 0.072 0.748 0.004 0.008 0.168
#> GSM634707 5 0.4025 0.7614 0.060 0.004 0.140 0.000 0.796
#> GSM634711 5 0.4502 0.7381 0.076 0.000 0.180 0.000 0.744
#> GSM634715 2 0.3194 0.7786 0.000 0.832 0.000 0.020 0.148
#> GSM634633 3 0.3247 0.6588 0.016 0.008 0.840 0.000 0.136
#> GSM634634 4 0.1997 0.7840 0.000 0.036 0.040 0.924 0.000
#> GSM634635 1 0.1571 0.8106 0.936 0.000 0.060 0.000 0.004
#> GSM634636 1 0.2209 0.8041 0.912 0.000 0.032 0.000 0.056
#> GSM634637 5 0.4237 0.7536 0.076 0.000 0.152 0.000 0.772
#> GSM634638 2 0.1211 0.8610 0.000 0.960 0.000 0.024 0.016
#> GSM634639 1 0.5167 0.5868 0.668 0.000 0.240 0.000 0.092
#> GSM634640 2 0.0798 0.8650 0.000 0.976 0.000 0.016 0.008
#> GSM634641 5 0.5472 0.5119 0.320 0.000 0.072 0.004 0.604
#> GSM634642 4 0.4063 0.7182 0.000 0.112 0.004 0.800 0.084
#> GSM634644 2 0.1697 0.8440 0.000 0.932 0.000 0.060 0.008
#> GSM634645 1 0.2984 0.7865 0.860 0.000 0.108 0.000 0.032
#> GSM634646 3 0.4438 0.3295 0.384 0.000 0.608 0.004 0.004
#> GSM634647 3 0.3336 0.6465 0.000 0.000 0.772 0.228 0.000
#> GSM634651 2 0.3154 0.8413 0.000 0.836 0.004 0.012 0.148
#> GSM634652 4 0.3635 0.6922 0.000 0.248 0.000 0.748 0.004
#> GSM634654 3 0.4039 0.6609 0.184 0.000 0.776 0.036 0.004
#> GSM634655 3 0.4706 -0.1522 0.004 0.008 0.500 0.000 0.488
#> GSM634656 3 0.1965 0.7403 0.000 0.000 0.904 0.096 0.000
#> GSM634657 2 0.2368 0.8596 0.012 0.912 0.004 0.012 0.060
#> GSM634658 1 0.3627 0.7622 0.836 0.000 0.008 0.092 0.064
#> GSM634660 5 0.4109 0.7583 0.060 0.004 0.148 0.000 0.788
#> GSM634661 2 0.1492 0.8741 0.000 0.948 0.004 0.008 0.040
#> GSM634662 2 0.4632 0.5839 0.000 0.608 0.004 0.012 0.376
#> GSM634663 2 0.2707 0.8684 0.000 0.876 0.000 0.024 0.100
#> GSM634664 4 0.0579 0.7864 0.000 0.008 0.008 0.984 0.000
#> GSM634665 1 0.5362 0.0994 0.500 0.000 0.456 0.036 0.008
#> GSM634668 5 0.3723 0.5847 0.000 0.152 0.000 0.044 0.804
#> GSM634671 1 0.4402 0.7246 0.764 0.000 0.056 0.172 0.008
#> GSM634672 3 0.0960 0.7507 0.016 0.000 0.972 0.004 0.008
#> GSM634673 3 0.0854 0.7511 0.004 0.000 0.976 0.012 0.008
#> GSM634674 2 0.2329 0.8504 0.000 0.876 0.000 0.000 0.124
#> GSM634675 2 0.4055 0.8221 0.016 0.796 0.004 0.024 0.160
#> GSM634676 1 0.5920 0.5211 0.624 0.008 0.000 0.160 0.208
#> GSM634677 2 0.3244 0.8371 0.004 0.832 0.004 0.008 0.152
#> GSM634678 2 0.4696 0.7861 0.024 0.748 0.004 0.032 0.192
#> GSM634682 2 0.1300 0.8595 0.000 0.956 0.000 0.028 0.016
#> GSM634683 2 0.1568 0.8738 0.000 0.944 0.000 0.020 0.036
#> GSM634684 1 0.3812 0.7560 0.824 0.000 0.008 0.092 0.076
#> GSM634685 4 0.6443 0.3522 0.004 0.108 0.324 0.544 0.020
#> GSM634686 1 0.1116 0.8086 0.964 0.000 0.004 0.004 0.028
#> GSM634687 2 0.0912 0.8645 0.000 0.972 0.000 0.016 0.012
#> GSM634689 4 0.4077 0.7196 0.000 0.060 0.012 0.804 0.124
#> GSM634691 2 0.3396 0.8331 0.004 0.824 0.004 0.012 0.156
#> GSM634692 1 0.1651 0.8123 0.944 0.000 0.012 0.036 0.008
#> GSM634693 3 0.5829 0.2461 0.364 0.000 0.548 0.080 0.008
#> GSM634695 2 0.1399 0.8586 0.000 0.952 0.000 0.028 0.020
#> GSM634696 4 0.2617 0.7574 0.028 0.000 0.032 0.904 0.036
#> GSM634697 3 0.1928 0.7489 0.004 0.000 0.920 0.072 0.004
#> GSM634699 4 0.1488 0.7858 0.008 0.008 0.016 0.956 0.012
#> GSM634700 2 0.3500 0.8241 0.000 0.808 0.004 0.016 0.172
#> GSM634701 1 0.3805 0.6812 0.784 0.000 0.032 0.000 0.184
#> GSM634702 5 0.2642 0.7441 0.016 0.024 0.040 0.012 0.908
#> GSM634703 5 0.7156 0.0371 0.192 0.324 0.004 0.024 0.456
#> GSM634708 2 0.1195 0.8735 0.000 0.960 0.000 0.012 0.028
#> GSM634709 1 0.1211 0.8141 0.960 0.000 0.024 0.000 0.016
#> GSM634710 3 0.4653 0.1486 0.000 0.000 0.516 0.472 0.012
#> GSM634712 3 0.3656 0.6698 0.000 0.000 0.800 0.168 0.032
#> GSM634713 4 0.4632 0.3315 0.000 0.448 0.000 0.540 0.012
#> GSM634714 3 0.1845 0.7411 0.056 0.000 0.928 0.000 0.016
#> GSM634716 5 0.4967 0.6150 0.060 0.000 0.280 0.000 0.660
#> GSM634717 1 0.0451 0.8128 0.988 0.000 0.004 0.000 0.008
#> GSM634718 1 0.6406 0.3737 0.584 0.220 0.004 0.012 0.180
#> GSM634719 1 0.1525 0.8095 0.948 0.000 0.012 0.004 0.036
#> GSM634720 3 0.1419 0.7537 0.016 0.000 0.956 0.012 0.016
#> GSM634721 4 0.4925 0.4523 0.044 0.000 0.252 0.692 0.012
#> GSM634722 4 0.3353 0.7268 0.000 0.196 0.000 0.796 0.008
#> GSM634723 1 0.6119 0.5603 0.652 0.200 0.000 0.084 0.064
#> GSM634724 3 0.3837 0.3961 0.000 0.000 0.692 0.000 0.308
#> GSM634725 5 0.4244 0.7567 0.068 0.004 0.092 0.024 0.812
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1065 0.68939 0.964 0.000 0.008 0.000 0.020 0.008
#> GSM634648 1 0.6615 0.36758 0.552 0.000 0.200 0.120 0.004 0.124
#> GSM634649 1 0.1148 0.68931 0.960 0.000 0.020 0.000 0.004 0.016
#> GSM634650 2 0.6953 0.04545 0.004 0.488 0.004 0.092 0.144 0.268
#> GSM634653 3 0.6029 0.58204 0.172 0.000 0.620 0.076 0.004 0.128
#> GSM634659 5 0.2377 0.73458 0.000 0.004 0.000 0.004 0.868 0.124
#> GSM634666 4 0.1562 0.80418 0.000 0.004 0.032 0.940 0.000 0.024
#> GSM634667 2 0.1701 0.66480 0.000 0.920 0.000 0.008 0.000 0.072
#> GSM634669 1 0.4364 0.57570 0.720 0.000 0.008 0.004 0.052 0.216
#> GSM634670 3 0.0777 0.75564 0.004 0.000 0.972 0.000 0.024 0.000
#> GSM634679 3 0.4024 0.66558 0.000 0.000 0.776 0.140 0.068 0.016
#> GSM634680 3 0.1888 0.75141 0.012 0.000 0.916 0.000 0.004 0.068
#> GSM634681 1 0.3992 0.61115 0.780 0.000 0.120 0.000 0.012 0.088
#> GSM634688 4 0.0748 0.80989 0.000 0.016 0.004 0.976 0.000 0.004
#> GSM634690 2 0.2320 0.66104 0.000 0.864 0.000 0.004 0.000 0.132
#> GSM634694 1 0.3469 0.62578 0.788 0.004 0.004 0.000 0.020 0.184
#> GSM634698 1 0.1552 0.68428 0.940 0.000 0.020 0.000 0.004 0.036
#> GSM634704 2 0.4272 0.58822 0.020 0.760 0.012 0.008 0.020 0.180
#> GSM634705 1 0.1788 0.68233 0.928 0.000 0.028 0.000 0.004 0.040
#> GSM634706 2 0.4802 0.30349 0.052 0.496 0.000 0.000 0.000 0.452
#> GSM634707 5 0.1794 0.76662 0.028 0.000 0.024 0.000 0.932 0.016
#> GSM634711 5 0.2703 0.76135 0.052 0.000 0.064 0.000 0.876 0.008
#> GSM634715 2 0.4071 0.52921 0.000 0.768 0.000 0.008 0.128 0.096
#> GSM634633 3 0.5823 0.52808 0.028 0.016 0.640 0.004 0.196 0.116
#> GSM634634 4 0.2731 0.79396 0.000 0.032 0.072 0.880 0.008 0.008
#> GSM634635 1 0.1485 0.68810 0.944 0.000 0.024 0.000 0.004 0.028
#> GSM634636 1 0.2739 0.67308 0.872 0.000 0.012 0.000 0.084 0.032
#> GSM634637 5 0.1777 0.77464 0.024 0.000 0.032 0.000 0.932 0.012
#> GSM634638 2 0.1901 0.62719 0.000 0.912 0.000 0.008 0.004 0.076
#> GSM634639 1 0.5420 0.51464 0.676 0.000 0.128 0.000 0.132 0.064
#> GSM634640 2 0.0622 0.65707 0.000 0.980 0.000 0.008 0.000 0.012
#> GSM634641 5 0.4505 0.53674 0.252 0.000 0.008 0.000 0.684 0.056
#> GSM634642 4 0.3416 0.73459 0.000 0.036 0.004 0.812 0.004 0.144
#> GSM634644 2 0.1780 0.63712 0.000 0.924 0.000 0.048 0.000 0.028
#> GSM634645 1 0.2213 0.67814 0.908 0.000 0.048 0.000 0.012 0.032
#> GSM634646 1 0.4780 -0.05858 0.480 0.000 0.476 0.000 0.004 0.040
#> GSM634647 3 0.2358 0.72752 0.000 0.000 0.876 0.108 0.000 0.016
#> GSM634651 2 0.4076 0.52824 0.000 0.636 0.000 0.004 0.012 0.348
#> GSM634652 4 0.2964 0.70818 0.000 0.204 0.000 0.792 0.000 0.004
#> GSM634654 3 0.3934 0.64555 0.180 0.000 0.764 0.012 0.000 0.044
#> GSM634655 5 0.5610 0.29303 0.000 0.004 0.324 0.004 0.540 0.128
#> GSM634656 3 0.0858 0.75812 0.004 0.000 0.968 0.028 0.000 0.000
#> GSM634657 2 0.4083 0.55134 0.008 0.752 0.004 0.016 0.016 0.204
#> GSM634658 1 0.5846 0.54487 0.644 0.000 0.028 0.064 0.056 0.208
#> GSM634660 5 0.2637 0.76031 0.028 0.004 0.040 0.000 0.892 0.036
#> GSM634661 2 0.2730 0.64448 0.000 0.808 0.000 0.000 0.000 0.192
#> GSM634662 2 0.6084 0.15479 0.000 0.424 0.000 0.004 0.228 0.344
#> GSM634663 2 0.3259 0.63760 0.000 0.772 0.000 0.000 0.012 0.216
#> GSM634664 4 0.0748 0.80936 0.000 0.016 0.004 0.976 0.000 0.004
#> GSM634665 1 0.5600 0.15938 0.500 0.000 0.400 0.016 0.004 0.080
#> GSM634668 5 0.4822 0.33815 0.000 0.040 0.000 0.016 0.608 0.336
#> GSM634671 1 0.5508 0.56715 0.680 0.000 0.076 0.136 0.004 0.104
#> GSM634672 3 0.1003 0.75718 0.016 0.000 0.964 0.000 0.020 0.000
#> GSM634673 3 0.1536 0.75543 0.004 0.000 0.940 0.000 0.016 0.040
#> GSM634674 2 0.4201 0.60425 0.000 0.740 0.000 0.004 0.080 0.176
#> GSM634675 2 0.4158 0.46163 0.004 0.572 0.000 0.000 0.008 0.416
#> GSM634676 1 0.7341 0.07114 0.384 0.000 0.004 0.172 0.124 0.316
#> GSM634677 2 0.3737 0.49927 0.000 0.608 0.000 0.000 0.000 0.392
#> GSM634678 2 0.5270 0.34952 0.004 0.492 0.000 0.016 0.048 0.440
#> GSM634682 2 0.1901 0.62719 0.000 0.912 0.000 0.008 0.004 0.076
#> GSM634683 2 0.2597 0.65201 0.000 0.824 0.000 0.000 0.000 0.176
#> GSM634684 1 0.6089 0.49377 0.608 0.000 0.012 0.092 0.068 0.220
#> GSM634685 3 0.7870 -0.00956 0.000 0.244 0.312 0.268 0.012 0.164
#> GSM634686 1 0.2783 0.64640 0.836 0.000 0.000 0.000 0.016 0.148
#> GSM634687 2 0.0717 0.65297 0.000 0.976 0.000 0.008 0.000 0.016
#> GSM634689 4 0.3749 0.75199 0.000 0.024 0.004 0.812 0.048 0.112
#> GSM634691 2 0.3984 0.48605 0.000 0.596 0.000 0.000 0.008 0.396
#> GSM634692 1 0.3739 0.65964 0.800 0.000 0.024 0.016 0.012 0.148
#> GSM634693 3 0.6045 0.04113 0.404 0.000 0.468 0.044 0.004 0.080
#> GSM634695 2 0.2163 0.61674 0.000 0.892 0.000 0.008 0.004 0.096
#> GSM634696 4 0.4081 0.71081 0.032 0.000 0.032 0.804 0.028 0.104
#> GSM634697 3 0.1059 0.75819 0.004 0.000 0.964 0.016 0.016 0.000
#> GSM634699 4 0.1799 0.80100 0.004 0.008 0.008 0.928 0.000 0.052
#> GSM634700 2 0.4766 0.44083 0.000 0.552 0.000 0.004 0.044 0.400
#> GSM634701 1 0.4685 0.49810 0.668 0.000 0.004 0.000 0.248 0.080
#> GSM634702 5 0.2146 0.74176 0.000 0.000 0.000 0.004 0.880 0.116
#> GSM634703 6 0.6085 0.38570 0.064 0.164 0.000 0.004 0.160 0.608
#> GSM634708 2 0.2340 0.65910 0.000 0.852 0.000 0.000 0.000 0.148
#> GSM634709 1 0.0881 0.68889 0.972 0.000 0.008 0.000 0.008 0.012
#> GSM634710 3 0.4662 0.28120 0.000 0.000 0.560 0.404 0.016 0.020
#> GSM634712 3 0.3093 0.71838 0.000 0.000 0.852 0.076 0.060 0.012
#> GSM634713 2 0.4746 -0.07312 0.000 0.532 0.000 0.424 0.004 0.040
#> GSM634714 3 0.3687 0.72435 0.072 0.000 0.820 0.004 0.020 0.084
#> GSM634716 5 0.3780 0.70393 0.032 0.000 0.156 0.000 0.788 0.024
#> GSM634717 1 0.2450 0.66911 0.868 0.000 0.000 0.000 0.016 0.116
#> GSM634718 6 0.5925 0.39061 0.340 0.136 0.000 0.000 0.020 0.504
#> GSM634719 1 0.4564 0.60927 0.732 0.000 0.016 0.008 0.064 0.180
#> GSM634720 3 0.2252 0.74805 0.016 0.000 0.900 0.000 0.012 0.072
#> GSM634721 4 0.5854 0.28357 0.060 0.000 0.300 0.564 0.000 0.076
#> GSM634722 4 0.3986 0.57151 0.000 0.316 0.000 0.664 0.000 0.020
#> GSM634723 1 0.6935 -0.00260 0.452 0.132 0.004 0.056 0.016 0.340
#> GSM634724 3 0.3852 0.30490 0.004 0.000 0.612 0.000 0.384 0.000
#> GSM634725 5 0.3978 0.73686 0.024 0.000 0.036 0.016 0.800 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 individual(p) k
#> SD:skmeans 91 0.564 2
#> SD:skmeans 88 0.619 3
#> SD:skmeans 72 0.964 4
#> SD:skmeans 80 0.905 5
#> SD:skmeans 68 0.816 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 17698 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.802 0.936 0.971 0.4402 0.566 0.566
#> 3 3 0.726 0.844 0.926 0.3730 0.776 0.626
#> 4 4 0.586 0.635 0.820 0.1704 0.885 0.722
#> 5 5 0.713 0.762 0.855 0.0857 0.846 0.555
#> 6 6 0.700 0.634 0.766 0.0404 0.960 0.837
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
#> GSM634643 1 0.0000 0.968 1.000 0.000
#> GSM634648 1 0.0000 0.968 1.000 0.000
#> GSM634649 1 0.0000 0.968 1.000 0.000
#> GSM634650 1 0.7376 0.764 0.792 0.208
#> GSM634653 1 0.0000 0.968 1.000 0.000
#> GSM634659 1 0.7376 0.764 0.792 0.208
#> GSM634666 2 0.7219 0.749 0.200 0.800
#> GSM634667 2 0.0000 0.968 0.000 1.000
#> GSM634669 1 0.0000 0.968 1.000 0.000
#> GSM634670 1 0.0000 0.968 1.000 0.000
#> GSM634679 1 0.0376 0.966 0.996 0.004
#> GSM634680 1 0.0000 0.968 1.000 0.000
#> GSM634681 1 0.0000 0.968 1.000 0.000
#> GSM634688 2 0.0000 0.968 0.000 1.000
#> GSM634690 2 0.0000 0.968 0.000 1.000
#> GSM634694 1 0.0000 0.968 1.000 0.000
#> GSM634698 1 0.0000 0.968 1.000 0.000
#> GSM634704 1 0.0000 0.968 1.000 0.000
#> GSM634705 1 0.0000 0.968 1.000 0.000
#> GSM634706 1 0.0000 0.968 1.000 0.000
#> GSM634707 1 0.0000 0.968 1.000 0.000
#> GSM634711 1 0.0000 0.968 1.000 0.000
#> GSM634715 1 0.7376 0.764 0.792 0.208
#> GSM634633 1 0.0000 0.968 1.000 0.000
#> GSM634634 2 0.2423 0.934 0.040 0.960
#> GSM634635 1 0.0000 0.968 1.000 0.000
#> GSM634636 1 0.0000 0.968 1.000 0.000
#> GSM634637 1 0.0000 0.968 1.000 0.000
#> GSM634638 2 0.0000 0.968 0.000 1.000
#> GSM634639 1 0.0000 0.968 1.000 0.000
#> GSM634640 2 0.0000 0.968 0.000 1.000
#> GSM634641 1 0.0000 0.968 1.000 0.000
#> GSM634642 2 0.0000 0.968 0.000 1.000
#> GSM634644 2 0.0000 0.968 0.000 1.000
#> GSM634645 1 0.0000 0.968 1.000 0.000
#> GSM634646 1 0.0000 0.968 1.000 0.000
#> GSM634647 1 0.0000 0.968 1.000 0.000
#> GSM634651 2 0.0000 0.968 0.000 1.000
#> GSM634652 2 0.0000 0.968 0.000 1.000
#> GSM634654 1 0.0000 0.968 1.000 0.000
#> GSM634655 1 0.0000 0.968 1.000 0.000
#> GSM634656 1 0.0000 0.968 1.000 0.000
#> GSM634657 1 0.0672 0.963 0.992 0.008
#> GSM634658 1 0.7299 0.769 0.796 0.204
#> GSM634660 1 0.0000 0.968 1.000 0.000
#> GSM634661 2 0.0000 0.968 0.000 1.000
#> GSM634662 1 0.7139 0.779 0.804 0.196
#> GSM634663 2 0.0938 0.959 0.012 0.988
#> GSM634664 2 0.0000 0.968 0.000 1.000
#> GSM634665 1 0.0000 0.968 1.000 0.000
#> GSM634668 2 0.0000 0.968 0.000 1.000
#> GSM634671 1 0.0000 0.968 1.000 0.000
#> GSM634672 1 0.0000 0.968 1.000 0.000
#> GSM634673 1 0.0000 0.968 1.000 0.000
#> GSM634674 2 0.0000 0.968 0.000 1.000
#> GSM634675 2 0.6623 0.787 0.172 0.828
#> GSM634676 1 0.0000 0.968 1.000 0.000
#> GSM634677 2 0.0000 0.968 0.000 1.000
#> GSM634678 1 0.0938 0.960 0.988 0.012
#> GSM634682 2 0.0000 0.968 0.000 1.000
#> GSM634683 2 0.0000 0.968 0.000 1.000
#> GSM634684 1 0.0000 0.968 1.000 0.000
#> GSM634685 1 0.7376 0.764 0.792 0.208
#> GSM634686 1 0.0000 0.968 1.000 0.000
#> GSM634687 2 0.0000 0.968 0.000 1.000
#> GSM634689 2 0.0672 0.962 0.008 0.992
#> GSM634691 2 0.0000 0.968 0.000 1.000
#> GSM634692 1 0.0000 0.968 1.000 0.000
#> GSM634693 1 0.0000 0.968 1.000 0.000
#> GSM634695 2 0.0000 0.968 0.000 1.000
#> GSM634696 1 0.7299 0.769 0.796 0.204
#> GSM634697 1 0.0000 0.968 1.000 0.000
#> GSM634699 1 0.0000 0.968 1.000 0.000
#> GSM634700 2 0.0000 0.968 0.000 1.000
#> GSM634701 1 0.0000 0.968 1.000 0.000
#> GSM634702 1 0.7376 0.764 0.792 0.208
#> GSM634703 2 0.9710 0.279 0.400 0.600
#> GSM634708 2 0.0000 0.968 0.000 1.000
#> GSM634709 1 0.0000 0.968 1.000 0.000
#> GSM634710 1 0.0376 0.966 0.996 0.004
#> GSM634712 1 0.0376 0.966 0.996 0.004
#> GSM634713 2 0.0000 0.968 0.000 1.000
#> GSM634714 1 0.0000 0.968 1.000 0.000
#> GSM634716 1 0.0000 0.968 1.000 0.000
#> GSM634717 1 0.0000 0.968 1.000 0.000
#> GSM634718 1 0.0000 0.968 1.000 0.000
#> GSM634719 1 0.0000 0.968 1.000 0.000
#> GSM634720 1 0.0000 0.968 1.000 0.000
#> GSM634721 1 0.0376 0.966 0.996 0.004
#> GSM634722 2 0.0000 0.968 0.000 1.000
#> GSM634723 1 0.0376 0.966 0.996 0.004
#> GSM634724 1 0.0000 0.968 1.000 0.000
#> GSM634725 1 0.7056 0.784 0.808 0.192
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634648 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634649 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634650 1 0.5384 0.754 0.788 0.188 0.024
#> GSM634653 3 0.2878 0.843 0.096 0.000 0.904
#> GSM634659 1 0.5637 0.756 0.788 0.172 0.040
#> GSM634666 3 0.0237 0.868 0.004 0.000 0.996
#> GSM634667 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634670 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634679 3 0.0000 0.867 0.000 0.000 1.000
#> GSM634680 1 0.6045 0.336 0.620 0.000 0.380
#> GSM634681 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634688 3 0.0892 0.864 0.000 0.020 0.980
#> GSM634690 2 0.1860 0.905 0.000 0.948 0.052
#> GSM634694 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634698 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634704 1 0.0424 0.922 0.992 0.008 0.000
#> GSM634705 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634706 1 0.0237 0.924 0.996 0.000 0.004
#> GSM634707 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634711 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634715 1 0.5741 0.742 0.776 0.188 0.036
#> GSM634633 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634634 3 0.3482 0.795 0.000 0.128 0.872
#> GSM634635 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634636 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634637 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634638 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634639 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634640 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634641 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634642 3 0.0661 0.867 0.004 0.008 0.988
#> GSM634644 2 0.3619 0.817 0.000 0.864 0.136
#> GSM634645 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634646 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634647 3 0.2590 0.856 0.072 0.004 0.924
#> GSM634651 2 0.0237 0.930 0.000 0.996 0.004
#> GSM634652 2 0.5363 0.636 0.000 0.724 0.276
#> GSM634654 1 0.5465 0.568 0.712 0.000 0.288
#> GSM634655 1 0.1031 0.914 0.976 0.000 0.024
#> GSM634656 3 0.6026 0.443 0.376 0.000 0.624
#> GSM634657 1 0.0424 0.922 0.992 0.008 0.000
#> GSM634658 1 0.4235 0.785 0.824 0.176 0.000
#> GSM634660 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634661 2 0.0892 0.927 0.000 0.980 0.020
#> GSM634662 1 0.4409 0.787 0.824 0.172 0.004
#> GSM634663 2 0.1170 0.924 0.008 0.976 0.016
#> GSM634664 3 0.0237 0.867 0.000 0.004 0.996
#> GSM634665 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634668 3 0.6026 0.343 0.000 0.376 0.624
#> GSM634671 1 0.1860 0.895 0.948 0.000 0.052
#> GSM634672 1 0.5138 0.646 0.748 0.000 0.252
#> GSM634673 3 0.2448 0.854 0.076 0.000 0.924
#> GSM634674 2 0.2096 0.909 0.004 0.944 0.052
#> GSM634675 2 0.5393 0.725 0.148 0.808 0.044
#> GSM634676 1 0.3267 0.839 0.884 0.000 0.116
#> GSM634677 2 0.1964 0.908 0.000 0.944 0.056
#> GSM634678 1 0.3031 0.867 0.912 0.012 0.076
#> GSM634682 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634684 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634685 3 0.5062 0.763 0.016 0.184 0.800
#> GSM634686 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634689 3 0.0237 0.867 0.000 0.004 0.996
#> GSM634691 2 0.0592 0.929 0.000 0.988 0.012
#> GSM634692 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634693 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634695 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634696 3 0.4371 0.792 0.108 0.032 0.860
#> GSM634697 3 0.3551 0.816 0.132 0.000 0.868
#> GSM634699 3 0.2590 0.856 0.072 0.004 0.924
#> GSM634700 2 0.0747 0.927 0.000 0.984 0.016
#> GSM634701 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634702 1 0.8043 0.312 0.556 0.072 0.372
#> GSM634703 1 0.6745 0.301 0.560 0.428 0.012
#> GSM634708 2 0.0424 0.929 0.000 0.992 0.008
#> GSM634709 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634710 3 0.0237 0.868 0.004 0.000 0.996
#> GSM634712 3 0.3267 0.817 0.116 0.000 0.884
#> GSM634713 2 0.6062 0.464 0.000 0.616 0.384
#> GSM634714 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634716 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634717 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634718 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634719 1 0.0000 0.925 1.000 0.000 0.000
#> GSM634720 1 0.4796 0.685 0.780 0.000 0.220
#> GSM634721 3 0.0237 0.868 0.004 0.000 0.996
#> GSM634722 3 0.4605 0.752 0.000 0.204 0.796
#> GSM634723 1 0.0237 0.924 0.996 0.004 0.000
#> GSM634724 1 0.0237 0.925 0.996 0.000 0.004
#> GSM634725 1 0.5889 0.771 0.796 0.108 0.096
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0657 0.7687 0.984 0.000 0.004 0.012
#> GSM634648 1 0.0188 0.7699 0.996 0.000 0.000 0.004
#> GSM634649 1 0.0000 0.7694 1.000 0.000 0.000 0.000
#> GSM634650 3 0.7199 0.5566 0.176 0.136 0.644 0.044
#> GSM634653 4 0.2949 0.8170 0.088 0.000 0.024 0.888
#> GSM634659 3 0.6980 0.5771 0.176 0.124 0.660 0.040
#> GSM634666 4 0.0592 0.8424 0.016 0.000 0.000 0.984
#> GSM634667 2 0.1474 0.8442 0.000 0.948 0.052 0.000
#> GSM634669 1 0.0188 0.7700 0.996 0.000 0.000 0.004
#> GSM634670 3 0.4804 0.4249 0.384 0.000 0.616 0.000
#> GSM634679 4 0.1637 0.8364 0.000 0.000 0.060 0.940
#> GSM634680 1 0.7344 0.0776 0.528 0.000 0.248 0.224
#> GSM634681 1 0.0000 0.7694 1.000 0.000 0.000 0.000
#> GSM634688 4 0.1209 0.8376 0.000 0.032 0.004 0.964
#> GSM634690 2 0.2644 0.8340 0.000 0.908 0.060 0.032
#> GSM634694 1 0.0000 0.7694 1.000 0.000 0.000 0.000
#> GSM634698 1 0.0469 0.7689 0.988 0.000 0.000 0.012
#> GSM634704 1 0.4630 0.3982 0.732 0.016 0.252 0.000
#> GSM634705 1 0.0657 0.7687 0.984 0.000 0.004 0.012
#> GSM634706 1 0.2975 0.7160 0.900 0.060 0.008 0.032
#> GSM634707 3 0.4730 0.5307 0.364 0.000 0.636 0.000
#> GSM634711 1 0.4948 -0.1771 0.560 0.000 0.440 0.000
#> GSM634715 1 0.5932 0.5005 0.744 0.128 0.092 0.036
#> GSM634633 1 0.2408 0.7047 0.896 0.000 0.104 0.000
#> GSM634634 4 0.2714 0.8048 0.000 0.112 0.004 0.884
#> GSM634635 1 0.0000 0.7694 1.000 0.000 0.000 0.000
#> GSM634636 1 0.1297 0.7613 0.964 0.000 0.020 0.016
#> GSM634637 1 0.4948 -0.1771 0.560 0.000 0.440 0.000
#> GSM634638 2 0.2973 0.8272 0.000 0.856 0.144 0.000
#> GSM634639 1 0.4713 0.0381 0.640 0.000 0.360 0.000
#> GSM634640 2 0.1302 0.8423 0.000 0.956 0.044 0.000
#> GSM634641 1 0.5420 0.0502 0.628 0.008 0.352 0.012
#> GSM634642 4 0.1771 0.8370 0.012 0.036 0.004 0.948
#> GSM634644 2 0.3300 0.7986 0.000 0.848 0.008 0.144
#> GSM634645 1 0.0817 0.7613 0.976 0.000 0.024 0.000
#> GSM634646 1 0.0000 0.7694 1.000 0.000 0.000 0.000
#> GSM634647 4 0.3421 0.8269 0.044 0.000 0.088 0.868
#> GSM634651 2 0.4008 0.7351 0.000 0.756 0.244 0.000
#> GSM634652 2 0.3710 0.7393 0.000 0.804 0.004 0.192
#> GSM634654 1 0.6401 0.3203 0.652 0.000 0.172 0.176
#> GSM634655 3 0.4690 0.5202 0.276 0.000 0.712 0.012
#> GSM634656 4 0.7689 0.2019 0.300 0.000 0.248 0.452
#> GSM634657 1 0.5793 0.2093 0.628 0.020 0.336 0.016
#> GSM634658 1 0.2654 0.6746 0.888 0.108 0.004 0.000
#> GSM634660 3 0.3649 0.6247 0.204 0.000 0.796 0.000
#> GSM634661 2 0.2021 0.8457 0.000 0.936 0.040 0.024
#> GSM634662 3 0.7151 0.3343 0.404 0.104 0.484 0.008
#> GSM634663 2 0.5252 0.6941 0.008 0.692 0.280 0.020
#> GSM634664 4 0.0188 0.8407 0.000 0.004 0.000 0.996
#> GSM634665 1 0.0657 0.7686 0.984 0.000 0.004 0.012
#> GSM634668 3 0.5897 0.2881 0.000 0.136 0.700 0.164
#> GSM634671 1 0.1743 0.7469 0.940 0.000 0.004 0.056
#> GSM634672 3 0.5428 0.4295 0.380 0.000 0.600 0.020
#> GSM634673 4 0.4767 0.7341 0.020 0.000 0.256 0.724
#> GSM634674 2 0.5256 0.6805 0.000 0.596 0.392 0.012
#> GSM634675 2 0.7113 0.6600 0.072 0.640 0.224 0.064
#> GSM634676 1 0.2944 0.6732 0.868 0.000 0.004 0.128
#> GSM634677 2 0.1661 0.8373 0.000 0.944 0.004 0.052
#> GSM634678 1 0.5873 0.2752 0.660 0.004 0.280 0.056
#> GSM634682 2 0.4564 0.7389 0.000 0.672 0.328 0.000
#> GSM634683 2 0.0376 0.8422 0.000 0.992 0.004 0.004
#> GSM634684 1 0.0657 0.7687 0.984 0.000 0.004 0.012
#> GSM634685 4 0.6808 0.6026 0.000 0.120 0.320 0.560
#> GSM634686 1 0.0188 0.7690 0.996 0.000 0.004 0.000
#> GSM634687 2 0.2021 0.8409 0.000 0.932 0.056 0.012
#> GSM634689 4 0.1209 0.8398 0.000 0.032 0.004 0.964
#> GSM634691 2 0.1151 0.8407 0.000 0.968 0.008 0.024
#> GSM634692 1 0.0000 0.7694 1.000 0.000 0.000 0.000
#> GSM634693 1 0.0188 0.7689 0.996 0.000 0.004 0.000
#> GSM634695 2 0.2814 0.8304 0.000 0.868 0.132 0.000
#> GSM634696 4 0.4286 0.7163 0.152 0.028 0.008 0.812
#> GSM634697 4 0.6134 0.6632 0.104 0.000 0.236 0.660
#> GSM634699 4 0.1786 0.8405 0.036 0.008 0.008 0.948
#> GSM634700 2 0.4936 0.7016 0.000 0.672 0.316 0.012
#> GSM634701 1 0.0469 0.7651 0.988 0.000 0.012 0.000
#> GSM634702 3 0.4882 0.6098 0.164 0.004 0.776 0.056
#> GSM634703 1 0.8476 -0.2042 0.416 0.300 0.256 0.028
#> GSM634708 2 0.0895 0.8402 0.000 0.976 0.004 0.020
#> GSM634709 1 0.0657 0.7687 0.984 0.000 0.004 0.012
#> GSM634710 4 0.1510 0.8445 0.028 0.000 0.016 0.956
#> GSM634712 4 0.4036 0.7893 0.076 0.000 0.088 0.836
#> GSM634713 2 0.5436 0.7492 0.000 0.732 0.092 0.176
#> GSM634714 1 0.3266 0.5932 0.832 0.000 0.168 0.000
#> GSM634716 1 0.4977 -0.2251 0.540 0.000 0.460 0.000
#> GSM634717 1 0.0657 0.7687 0.984 0.000 0.004 0.012
#> GSM634718 1 0.2954 0.7159 0.900 0.064 0.008 0.028
#> GSM634719 1 0.0376 0.7695 0.992 0.000 0.004 0.004
#> GSM634720 1 0.6205 0.3601 0.668 0.000 0.196 0.136
#> GSM634721 4 0.2670 0.8213 0.040 0.000 0.052 0.908
#> GSM634722 4 0.3937 0.7630 0.000 0.188 0.012 0.800
#> GSM634723 1 0.2877 0.7174 0.904 0.060 0.008 0.028
#> GSM634724 3 0.4843 0.4091 0.396 0.000 0.604 0.000
#> GSM634725 3 0.7690 0.4079 0.428 0.052 0.448 0.072
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1018 0.870 0.968 0.000 0.016 0.000 0.016
#> GSM634648 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634649 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634650 5 0.3970 0.794 0.000 0.076 0.008 0.104 0.812
#> GSM634653 4 0.2448 0.813 0.088 0.000 0.020 0.892 0.000
#> GSM634659 5 0.4407 0.815 0.000 0.052 0.112 0.040 0.796
#> GSM634666 4 0.0000 0.861 0.000 0.000 0.000 1.000 0.000
#> GSM634667 2 0.1106 0.837 0.000 0.964 0.012 0.000 0.024
#> GSM634669 1 0.0451 0.872 0.988 0.000 0.008 0.000 0.004
#> GSM634670 3 0.1270 0.755 0.052 0.000 0.948 0.000 0.000
#> GSM634679 4 0.3707 0.625 0.000 0.000 0.284 0.716 0.000
#> GSM634680 3 0.2127 0.764 0.108 0.000 0.892 0.000 0.000
#> GSM634681 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634688 4 0.0162 0.861 0.000 0.000 0.000 0.996 0.004
#> GSM634690 2 0.2929 0.833 0.000 0.820 0.000 0.000 0.180
#> GSM634694 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634698 1 0.0798 0.871 0.976 0.000 0.008 0.000 0.016
#> GSM634704 5 0.4137 0.669 0.248 0.012 0.008 0.000 0.732
#> GSM634705 1 0.0912 0.870 0.972 0.000 0.012 0.000 0.016
#> GSM634706 1 0.3692 0.769 0.812 0.028 0.008 0.000 0.152
#> GSM634707 1 0.6200 0.318 0.540 0.000 0.180 0.000 0.280
#> GSM634711 1 0.4126 0.447 0.620 0.000 0.380 0.000 0.000
#> GSM634715 1 0.5793 0.665 0.708 0.068 0.016 0.048 0.160
#> GSM634633 1 0.4836 0.198 0.612 0.000 0.356 0.000 0.032
#> GSM634634 4 0.1630 0.847 0.000 0.036 0.004 0.944 0.016
#> GSM634635 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634636 1 0.2673 0.833 0.892 0.000 0.076 0.016 0.016
#> GSM634637 1 0.4264 0.448 0.620 0.000 0.376 0.004 0.000
#> GSM634638 2 0.2625 0.809 0.000 0.876 0.016 0.000 0.108
#> GSM634639 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634640 2 0.1124 0.840 0.000 0.960 0.004 0.000 0.036
#> GSM634641 1 0.2362 0.834 0.900 0.000 0.084 0.008 0.008
#> GSM634642 4 0.2270 0.826 0.000 0.020 0.000 0.904 0.076
#> GSM634644 2 0.4021 0.775 0.000 0.780 0.000 0.168 0.052
#> GSM634645 1 0.1270 0.859 0.948 0.000 0.052 0.000 0.000
#> GSM634646 1 0.0290 0.872 0.992 0.000 0.008 0.000 0.000
#> GSM634647 4 0.3779 0.677 0.012 0.000 0.236 0.752 0.000
#> GSM634651 5 0.3521 0.669 0.000 0.232 0.004 0.000 0.764
#> GSM634652 2 0.4194 0.681 0.000 0.720 0.004 0.260 0.016
#> GSM634654 3 0.5100 0.388 0.448 0.000 0.516 0.036 0.000
#> GSM634655 3 0.1704 0.712 0.000 0.000 0.928 0.004 0.068
#> GSM634656 3 0.2338 0.765 0.112 0.000 0.884 0.004 0.000
#> GSM634657 5 0.3333 0.809 0.060 0.076 0.008 0.000 0.856
#> GSM634658 1 0.1949 0.846 0.932 0.040 0.012 0.000 0.016
#> GSM634660 5 0.4637 0.727 0.100 0.000 0.160 0.000 0.740
#> GSM634661 2 0.3074 0.829 0.000 0.804 0.000 0.000 0.196
#> GSM634662 5 0.4132 0.828 0.044 0.032 0.084 0.012 0.828
#> GSM634663 5 0.2650 0.805 0.000 0.068 0.004 0.036 0.892
#> GSM634664 4 0.0000 0.861 0.000 0.000 0.000 1.000 0.000
#> GSM634665 1 0.1117 0.869 0.964 0.000 0.020 0.000 0.016
#> GSM634668 5 0.3567 0.814 0.000 0.004 0.068 0.092 0.836
#> GSM634671 1 0.1815 0.862 0.940 0.000 0.020 0.024 0.016
#> GSM634672 3 0.1704 0.764 0.068 0.000 0.928 0.004 0.000
#> GSM634673 3 0.2522 0.702 0.012 0.000 0.880 0.108 0.000
#> GSM634674 5 0.3323 0.786 0.000 0.116 0.036 0.004 0.844
#> GSM634675 5 0.4222 0.710 0.048 0.156 0.000 0.012 0.784
#> GSM634676 1 0.3516 0.768 0.820 0.000 0.008 0.152 0.020
#> GSM634677 2 0.2929 0.836 0.000 0.856 0.004 0.012 0.128
#> GSM634678 5 0.4347 0.769 0.156 0.004 0.004 0.060 0.776
#> GSM634682 2 0.4990 0.387 0.000 0.600 0.040 0.000 0.360
#> GSM634683 2 0.2561 0.837 0.000 0.856 0.000 0.000 0.144
#> GSM634684 1 0.1716 0.863 0.944 0.000 0.016 0.024 0.016
#> GSM634685 3 0.5949 0.543 0.000 0.156 0.672 0.128 0.044
#> GSM634686 1 0.0290 0.871 0.992 0.000 0.008 0.000 0.000
#> GSM634687 2 0.0992 0.836 0.000 0.968 0.008 0.000 0.024
#> GSM634689 4 0.2331 0.831 0.000 0.016 0.008 0.908 0.068
#> GSM634691 2 0.2377 0.836 0.000 0.872 0.000 0.000 0.128
#> GSM634692 1 0.0162 0.872 0.996 0.000 0.004 0.000 0.000
#> GSM634693 1 0.0771 0.868 0.976 0.000 0.020 0.000 0.004
#> GSM634695 2 0.3192 0.799 0.000 0.848 0.040 0.000 0.112
#> GSM634696 4 0.3489 0.714 0.148 0.000 0.012 0.824 0.016
#> GSM634697 3 0.2726 0.755 0.064 0.000 0.884 0.052 0.000
#> GSM634699 4 0.1815 0.851 0.020 0.000 0.016 0.940 0.024
#> GSM634700 5 0.0963 0.800 0.000 0.036 0.000 0.000 0.964
#> GSM634701 1 0.0162 0.872 0.996 0.000 0.004 0.000 0.000
#> GSM634702 5 0.3197 0.804 0.000 0.000 0.140 0.024 0.836
#> GSM634703 5 0.3180 0.769 0.068 0.076 0.000 0.000 0.856
#> GSM634708 2 0.2377 0.836 0.000 0.872 0.000 0.000 0.128
#> GSM634709 1 0.0912 0.870 0.972 0.000 0.012 0.000 0.016
#> GSM634710 4 0.0290 0.861 0.000 0.000 0.008 0.992 0.000
#> GSM634712 4 0.4769 0.431 0.016 0.000 0.392 0.588 0.004
#> GSM634713 2 0.4298 0.783 0.000 0.788 0.008 0.108 0.096
#> GSM634714 3 0.4235 0.469 0.424 0.000 0.576 0.000 0.000
#> GSM634716 1 0.4171 0.432 0.604 0.000 0.396 0.000 0.000
#> GSM634717 1 0.1012 0.870 0.968 0.000 0.012 0.000 0.020
#> GSM634718 1 0.3650 0.771 0.816 0.028 0.008 0.000 0.148
#> GSM634719 1 0.0404 0.870 0.988 0.000 0.012 0.000 0.000
#> GSM634720 3 0.4354 0.546 0.368 0.000 0.624 0.008 0.000
#> GSM634721 4 0.0798 0.860 0.016 0.000 0.000 0.976 0.008
#> GSM634722 4 0.3218 0.798 0.000 0.128 0.004 0.844 0.024
#> GSM634723 1 0.3827 0.773 0.812 0.024 0.020 0.000 0.144
#> GSM634724 3 0.1478 0.758 0.064 0.000 0.936 0.000 0.000
#> GSM634725 1 0.4897 0.703 0.744 0.012 0.016 0.044 0.184
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.3202 0.7643 0.800 0.000 0.000 0.000 0.024 0.176
#> GSM634648 1 0.0000 0.7772 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634649 1 0.0000 0.7772 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634650 5 0.1531 0.7950 0.000 0.000 0.000 0.004 0.928 0.068
#> GSM634653 4 0.2408 0.7696 0.108 0.000 0.012 0.876 0.004 0.000
#> GSM634659 5 0.3788 0.7661 0.000 0.000 0.056 0.040 0.812 0.092
#> GSM634666 4 0.0146 0.8183 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM634667 2 0.3520 0.5720 0.000 0.776 0.000 0.000 0.036 0.188
#> GSM634669 1 0.0865 0.7847 0.964 0.000 0.000 0.000 0.000 0.036
#> GSM634670 3 0.0547 0.5592 0.000 0.000 0.980 0.000 0.020 0.000
#> GSM634679 4 0.3584 0.5864 0.000 0.000 0.308 0.688 0.004 0.000
#> GSM634680 3 0.2737 0.5527 0.160 0.000 0.832 0.000 0.004 0.004
#> GSM634681 1 0.0000 0.7772 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634688 4 0.0146 0.8183 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM634690 2 0.0146 0.7159 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM634694 1 0.0000 0.7772 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634698 1 0.2597 0.7675 0.824 0.000 0.000 0.000 0.000 0.176
#> GSM634704 5 0.2191 0.7521 0.120 0.004 0.000 0.000 0.876 0.000
#> GSM634705 1 0.3202 0.7643 0.800 0.000 0.000 0.000 0.024 0.176
#> GSM634706 1 0.5636 0.4993 0.516 0.308 0.000 0.000 0.000 0.176
#> GSM634707 1 0.6595 0.2260 0.452 0.000 0.100 0.000 0.352 0.096
#> GSM634711 3 0.5840 -0.0355 0.432 0.000 0.448 0.000 0.032 0.088
#> GSM634715 1 0.7368 0.5106 0.528 0.060 0.008 0.096 0.092 0.216
#> GSM634633 1 0.4217 0.2773 0.672 0.000 0.296 0.000 0.024 0.008
#> GSM634634 4 0.1082 0.8105 0.000 0.000 0.000 0.956 0.040 0.004
#> GSM634635 1 0.0000 0.7772 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.5286 0.6864 0.680 0.000 0.108 0.008 0.028 0.176
#> GSM634637 3 0.5897 -0.0388 0.432 0.000 0.444 0.000 0.036 0.088
#> GSM634638 6 0.3652 0.7397 0.000 0.264 0.000 0.000 0.016 0.720
#> GSM634639 1 0.1806 0.7281 0.908 0.000 0.000 0.000 0.004 0.088
#> GSM634640 2 0.4530 0.4608 0.000 0.692 0.000 0.000 0.100 0.208
#> GSM634641 1 0.5258 0.6911 0.656 0.008 0.040 0.004 0.040 0.252
#> GSM634642 4 0.2278 0.7600 0.000 0.128 0.000 0.868 0.004 0.000
#> GSM634644 2 0.5945 0.0494 0.000 0.520 0.000 0.192 0.012 0.276
#> GSM634645 1 0.2965 0.7286 0.864 0.000 0.036 0.000 0.024 0.076
#> GSM634646 1 0.0458 0.7797 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM634647 4 0.3727 0.6879 0.008 0.000 0.212 0.760 0.012 0.008
#> GSM634651 5 0.3103 0.7460 0.000 0.100 0.000 0.000 0.836 0.064
#> GSM634652 2 0.5054 0.3907 0.000 0.632 0.000 0.288 0.044 0.036
#> GSM634654 3 0.4098 0.3135 0.496 0.000 0.496 0.008 0.000 0.000
#> GSM634655 3 0.1807 0.5294 0.000 0.000 0.920 0.000 0.060 0.020
#> GSM634656 3 0.1387 0.5734 0.068 0.000 0.932 0.000 0.000 0.000
#> GSM634657 5 0.1749 0.8101 0.024 0.000 0.000 0.008 0.932 0.036
#> GSM634658 1 0.0777 0.7722 0.972 0.000 0.000 0.000 0.024 0.004
#> GSM634660 5 0.4965 0.6346 0.108 0.000 0.076 0.000 0.724 0.092
#> GSM634661 2 0.0405 0.7126 0.000 0.988 0.000 0.000 0.004 0.008
#> GSM634662 5 0.1065 0.8166 0.008 0.000 0.020 0.008 0.964 0.000
#> GSM634663 5 0.2201 0.8078 0.000 0.056 0.000 0.036 0.904 0.004
#> GSM634664 4 0.0000 0.8184 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634665 1 0.2597 0.7675 0.824 0.000 0.000 0.000 0.000 0.176
#> GSM634668 5 0.2177 0.8085 0.000 0.000 0.032 0.052 0.908 0.008
#> GSM634671 1 0.2597 0.7675 0.824 0.000 0.000 0.000 0.000 0.176
#> GSM634672 3 0.0632 0.5648 0.024 0.000 0.976 0.000 0.000 0.000
#> GSM634673 3 0.0937 0.5501 0.000 0.000 0.960 0.040 0.000 0.000
#> GSM634674 5 0.2739 0.7788 0.000 0.008 0.024 0.008 0.876 0.084
#> GSM634675 5 0.4533 0.4558 0.000 0.376 0.000 0.004 0.588 0.032
#> GSM634676 1 0.5508 0.6442 0.636 0.000 0.000 0.160 0.028 0.176
#> GSM634677 2 0.0146 0.7145 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM634678 5 0.3065 0.7850 0.088 0.012 0.000 0.048 0.852 0.000
#> GSM634682 6 0.5302 0.6550 0.000 0.140 0.024 0.000 0.180 0.656
#> GSM634683 2 0.0692 0.7103 0.000 0.976 0.000 0.000 0.020 0.004
#> GSM634684 1 0.4394 0.7383 0.740 0.000 0.000 0.048 0.032 0.180
#> GSM634685 3 0.5829 0.1802 0.000 0.000 0.600 0.096 0.060 0.244
#> GSM634686 1 0.0692 0.7812 0.976 0.000 0.000 0.000 0.020 0.004
#> GSM634687 6 0.4414 0.7181 0.000 0.260 0.000 0.000 0.064 0.676
#> GSM634689 4 0.2544 0.7626 0.000 0.120 0.012 0.864 0.004 0.000
#> GSM634691 2 0.0000 0.7164 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634692 1 0.0146 0.7783 0.996 0.000 0.000 0.000 0.004 0.000
#> GSM634693 1 0.0858 0.7840 0.968 0.000 0.004 0.000 0.000 0.028
#> GSM634695 2 0.4783 0.4021 0.000 0.684 0.024 0.000 0.060 0.232
#> GSM634696 4 0.4154 0.5840 0.164 0.000 0.000 0.740 0.000 0.096
#> GSM634697 3 0.2119 0.5554 0.036 0.000 0.904 0.060 0.000 0.000
#> GSM634699 4 0.2656 0.7880 0.028 0.008 0.000 0.892 0.024 0.048
#> GSM634700 5 0.1845 0.8065 0.000 0.072 0.000 0.004 0.916 0.008
#> GSM634701 1 0.1644 0.7401 0.920 0.000 0.000 0.000 0.004 0.076
#> GSM634702 5 0.3513 0.7585 0.000 0.000 0.072 0.008 0.816 0.104
#> GSM634703 5 0.5915 0.5223 0.056 0.208 0.000 0.000 0.604 0.132
#> GSM634708 2 0.0000 0.7164 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634709 1 0.3202 0.7643 0.800 0.000 0.000 0.000 0.024 0.176
#> GSM634710 4 0.0603 0.8189 0.000 0.000 0.016 0.980 0.004 0.000
#> GSM634712 4 0.3854 0.3504 0.000 0.000 0.464 0.536 0.000 0.000
#> GSM634713 2 0.5033 0.4546 0.000 0.672 0.000 0.072 0.032 0.224
#> GSM634714 3 0.3864 0.3461 0.480 0.000 0.520 0.000 0.000 0.000
#> GSM634716 3 0.5570 -0.0306 0.436 0.000 0.456 0.000 0.012 0.096
#> GSM634717 1 0.3483 0.7624 0.792 0.004 0.000 0.004 0.024 0.176
#> GSM634718 1 0.5625 0.5044 0.520 0.304 0.000 0.000 0.000 0.176
#> GSM634719 1 0.0777 0.7809 0.972 0.000 0.000 0.000 0.024 0.004
#> GSM634720 3 0.4375 0.3869 0.432 0.000 0.548 0.000 0.012 0.008
#> GSM634721 4 0.1857 0.8022 0.028 0.000 0.000 0.924 0.004 0.044
#> GSM634722 4 0.3461 0.7432 0.000 0.076 0.000 0.836 0.040 0.048
#> GSM634723 1 0.5600 0.5147 0.528 0.296 0.000 0.000 0.000 0.176
#> GSM634724 3 0.2436 0.5199 0.000 0.000 0.880 0.000 0.032 0.088
#> GSM634725 1 0.5924 0.5850 0.692 0.092 0.012 0.036 0.072 0.096
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n individual(p) k
#> SD:pam 92 0.191 2
#> SD:pam 87 0.176 3
#> SD:pam 74 0.140 4
#> SD:pam 84 0.707 5
#> SD:pam 76 0.911 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 17698 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.249 0.611 0.745 0.4166 0.502 0.502
#> 3 3 0.175 0.622 0.749 0.2602 0.737 0.594
#> 4 4 0.364 0.609 0.750 0.2022 0.806 0.648
#> 5 5 0.616 0.663 0.825 0.0883 0.860 0.656
#> 6 6 0.643 0.662 0.790 0.1284 0.878 0.625
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
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
#> GSM634643 1 0.6148 0.6290 0.848 0.152
#> GSM634648 1 0.9944 0.6310 0.544 0.456
#> GSM634649 1 0.6148 0.6290 0.848 0.152
#> GSM634650 1 0.9286 0.5647 0.656 0.344
#> GSM634653 2 0.1414 0.7641 0.020 0.980
#> GSM634659 1 0.9996 0.6407 0.512 0.488
#> GSM634666 2 0.0000 0.7834 0.000 1.000
#> GSM634667 2 0.6801 0.7329 0.180 0.820
#> GSM634669 1 0.7376 0.6627 0.792 0.208
#> GSM634670 2 0.0000 0.7834 0.000 1.000
#> GSM634679 2 0.0000 0.7834 0.000 1.000
#> GSM634680 2 0.0000 0.7834 0.000 1.000
#> GSM634681 1 0.6438 0.6378 0.836 0.164
#> GSM634688 2 0.6148 0.7345 0.152 0.848
#> GSM634690 2 0.6801 0.7329 0.180 0.820
#> GSM634694 1 0.8081 0.6701 0.752 0.248
#> GSM634698 1 0.6531 0.6404 0.832 0.168
#> GSM634704 1 0.9996 0.6341 0.512 0.488
#> GSM634705 1 0.7139 0.6531 0.804 0.196
#> GSM634706 1 0.9996 0.6410 0.512 0.488
#> GSM634707 1 1.0000 0.6333 0.504 0.496
#> GSM634711 1 1.0000 0.6333 0.504 0.496
#> GSM634715 1 0.9323 0.5683 0.652 0.348
#> GSM634633 1 1.0000 0.6333 0.504 0.496
#> GSM634634 2 0.0000 0.7834 0.000 1.000
#> GSM634635 1 0.6148 0.6290 0.848 0.152
#> GSM634636 1 0.7376 0.6627 0.792 0.208
#> GSM634637 1 0.9983 0.6482 0.524 0.476
#> GSM634638 2 0.6801 0.7329 0.180 0.820
#> GSM634639 1 0.6343 0.6351 0.840 0.160
#> GSM634640 2 0.6801 0.7329 0.180 0.820
#> GSM634641 1 0.7376 0.6627 0.792 0.208
#> GSM634642 2 0.4298 0.7649 0.088 0.912
#> GSM634644 2 0.6801 0.7329 0.180 0.820
#> GSM634645 1 0.7376 0.6627 0.792 0.208
#> GSM634646 1 0.9977 0.6189 0.528 0.472
#> GSM634647 2 0.0000 0.7834 0.000 1.000
#> GSM634651 1 0.9286 0.5647 0.656 0.344
#> GSM634652 2 0.6148 0.7345 0.152 0.848
#> GSM634654 2 0.0000 0.7834 0.000 1.000
#> GSM634655 2 0.2236 0.7537 0.036 0.964
#> GSM634656 2 0.0000 0.7834 0.000 1.000
#> GSM634657 1 0.9323 0.5681 0.652 0.348
#> GSM634658 1 0.7376 0.6627 0.792 0.208
#> GSM634660 1 1.0000 0.6333 0.504 0.496
#> GSM634661 2 0.9933 0.1433 0.452 0.548
#> GSM634662 1 0.9933 0.6247 0.548 0.452
#> GSM634663 1 0.9286 0.5647 0.656 0.344
#> GSM634664 2 0.5408 0.7504 0.124 0.876
#> GSM634665 2 0.9970 -0.6006 0.468 0.532
#> GSM634668 1 0.9977 0.6311 0.528 0.472
#> GSM634671 2 0.9977 -0.6074 0.472 0.528
#> GSM634672 2 0.0000 0.7834 0.000 1.000
#> GSM634673 2 0.0000 0.7834 0.000 1.000
#> GSM634674 1 0.9286 0.5647 0.656 0.344
#> GSM634675 1 0.9580 0.5887 0.620 0.380
#> GSM634676 1 0.9732 0.6678 0.596 0.404
#> GSM634677 1 0.9358 0.5710 0.648 0.352
#> GSM634678 1 0.9998 0.6339 0.508 0.492
#> GSM634682 2 0.6801 0.7329 0.180 0.820
#> GSM634683 1 0.9286 0.5647 0.656 0.344
#> GSM634684 1 0.7376 0.6627 0.792 0.208
#> GSM634685 2 0.3584 0.7728 0.068 0.932
#> GSM634686 1 0.6148 0.6290 0.848 0.152
#> GSM634687 2 0.6973 0.7289 0.188 0.812
#> GSM634689 2 0.0000 0.7834 0.000 1.000
#> GSM634691 1 0.9286 0.5647 0.656 0.344
#> GSM634692 1 0.7745 0.6673 0.772 0.228
#> GSM634693 2 0.9881 -0.5369 0.436 0.564
#> GSM634695 2 0.6801 0.7329 0.180 0.820
#> GSM634696 2 0.7602 0.3087 0.220 0.780
#> GSM634697 2 0.0000 0.7834 0.000 1.000
#> GSM634699 2 0.0000 0.7834 0.000 1.000
#> GSM634700 1 0.9286 0.5647 0.656 0.344
#> GSM634701 1 0.7376 0.6627 0.792 0.208
#> GSM634702 1 0.9998 0.6373 0.508 0.492
#> GSM634703 1 0.9209 0.5785 0.664 0.336
#> GSM634708 1 0.9286 0.5647 0.656 0.344
#> GSM634709 1 0.6148 0.6290 0.848 0.152
#> GSM634710 2 0.0000 0.7834 0.000 1.000
#> GSM634712 2 0.0000 0.7834 0.000 1.000
#> GSM634713 2 0.6148 0.7345 0.152 0.848
#> GSM634714 2 0.9000 -0.0957 0.316 0.684
#> GSM634716 1 1.0000 0.6333 0.504 0.496
#> GSM634717 1 0.6801 0.6482 0.820 0.180
#> GSM634718 1 0.9954 0.6538 0.540 0.460
#> GSM634719 1 0.7815 0.6680 0.768 0.232
#> GSM634720 2 0.0376 0.7810 0.004 0.996
#> GSM634721 2 0.0000 0.7834 0.000 1.000
#> GSM634722 2 0.6148 0.7345 0.152 0.848
#> GSM634723 1 0.9522 0.6102 0.628 0.372
#> GSM634724 2 0.9286 -0.2176 0.344 0.656
#> GSM634725 1 0.9993 0.6435 0.516 0.484
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.594 0.683 0.732 0.248 0.020
#> GSM634648 1 0.625 0.703 0.776 0.116 0.108
#> GSM634649 1 0.629 0.655 0.692 0.288 0.020
#> GSM634650 1 0.483 0.509 0.792 0.204 0.004
#> GSM634653 1 0.522 0.585 0.740 0.000 0.260
#> GSM634659 1 0.392 0.702 0.884 0.036 0.080
#> GSM634666 3 0.529 0.733 0.228 0.008 0.764
#> GSM634667 2 0.801 0.746 0.332 0.588 0.080
#> GSM634669 1 0.357 0.727 0.876 0.120 0.004
#> GSM634670 3 0.676 0.705 0.148 0.108 0.744
#> GSM634679 3 0.327 0.699 0.116 0.000 0.884
#> GSM634680 3 0.730 0.707 0.188 0.108 0.704
#> GSM634681 1 0.598 0.674 0.728 0.252 0.020
#> GSM634688 3 0.745 0.590 0.160 0.140 0.700
#> GSM634690 1 0.652 0.168 0.644 0.340 0.016
#> GSM634694 1 0.343 0.729 0.884 0.112 0.004
#> GSM634698 1 0.633 0.652 0.688 0.292 0.020
#> GSM634704 1 0.319 0.649 0.896 0.100 0.004
#> GSM634705 1 0.701 0.670 0.696 0.240 0.064
#> GSM634706 1 0.153 0.692 0.964 0.032 0.004
#> GSM634707 1 0.449 0.713 0.856 0.036 0.108
#> GSM634711 1 0.429 0.706 0.840 0.008 0.152
#> GSM634715 1 0.495 0.536 0.808 0.176 0.016
#> GSM634633 1 0.296 0.716 0.912 0.008 0.080
#> GSM634634 3 0.414 0.732 0.124 0.016 0.860
#> GSM634635 1 0.629 0.654 0.692 0.288 0.020
#> GSM634636 1 0.541 0.707 0.780 0.200 0.020
#> GSM634637 1 0.517 0.708 0.816 0.036 0.148
#> GSM634638 2 0.830 0.709 0.200 0.632 0.168
#> GSM634639 1 0.564 0.699 0.760 0.220 0.020
#> GSM634640 2 0.710 0.718 0.384 0.588 0.028
#> GSM634641 1 0.536 0.710 0.784 0.196 0.020
#> GSM634642 3 0.718 0.679 0.240 0.072 0.688
#> GSM634644 2 0.956 0.609 0.260 0.484 0.256
#> GSM634645 1 0.612 0.706 0.772 0.164 0.064
#> GSM634646 1 0.644 0.694 0.764 0.100 0.136
#> GSM634647 3 0.288 0.713 0.096 0.000 0.904
#> GSM634651 1 0.562 0.360 0.716 0.280 0.004
#> GSM634652 3 0.760 0.561 0.140 0.172 0.688
#> GSM634654 1 0.611 0.270 0.604 0.000 0.396
#> GSM634655 1 0.877 0.391 0.580 0.168 0.252
#> GSM634656 3 0.280 0.712 0.092 0.000 0.908
#> GSM634657 1 0.468 0.521 0.804 0.192 0.004
#> GSM634658 1 0.537 0.703 0.776 0.208 0.016
#> GSM634660 1 0.313 0.708 0.904 0.008 0.088
#> GSM634661 1 0.643 0.104 0.640 0.348 0.012
#> GSM634662 1 0.346 0.652 0.892 0.096 0.012
#> GSM634663 1 0.493 0.486 0.784 0.212 0.004
#> GSM634664 3 0.747 0.616 0.176 0.128 0.696
#> GSM634665 1 0.440 0.667 0.812 0.000 0.188
#> GSM634668 1 0.350 0.694 0.900 0.028 0.072
#> GSM634671 1 0.440 0.667 0.812 0.000 0.188
#> GSM634672 3 0.619 0.366 0.420 0.000 0.580
#> GSM634673 3 0.725 0.709 0.184 0.108 0.708
#> GSM634674 1 0.691 0.495 0.724 0.192 0.084
#> GSM634675 1 0.491 0.553 0.804 0.184 0.012
#> GSM634676 1 0.207 0.724 0.940 0.060 0.000
#> GSM634677 1 0.536 0.489 0.768 0.220 0.012
#> GSM634678 1 0.145 0.695 0.968 0.024 0.008
#> GSM634682 2 0.830 0.709 0.200 0.632 0.168
#> GSM634683 1 0.559 0.376 0.720 0.276 0.004
#> GSM634684 1 0.532 0.705 0.780 0.204 0.016
#> GSM634685 3 0.805 0.450 0.108 0.264 0.628
#> GSM634686 1 0.560 0.693 0.764 0.216 0.020
#> GSM634687 2 0.728 0.728 0.376 0.588 0.036
#> GSM634689 3 0.634 0.704 0.264 0.028 0.708
#> GSM634691 1 0.588 0.372 0.716 0.272 0.012
#> GSM634692 1 0.537 0.703 0.776 0.208 0.016
#> GSM634693 1 0.475 0.649 0.784 0.000 0.216
#> GSM634695 2 0.817 0.740 0.236 0.632 0.132
#> GSM634696 1 0.480 0.633 0.780 0.000 0.220
#> GSM634697 3 0.435 0.740 0.184 0.000 0.816
#> GSM634699 3 0.629 0.711 0.272 0.024 0.704
#> GSM634700 1 0.555 0.380 0.724 0.272 0.004
#> GSM634701 1 0.448 0.723 0.840 0.144 0.016
#> GSM634702 1 0.312 0.699 0.908 0.012 0.080
#> GSM634703 1 0.486 0.591 0.808 0.180 0.012
#> GSM634708 1 0.543 0.369 0.716 0.284 0.000
#> GSM634709 1 0.633 0.652 0.688 0.292 0.020
#> GSM634710 3 0.465 0.730 0.208 0.000 0.792
#> GSM634712 3 0.327 0.699 0.116 0.000 0.884
#> GSM634713 3 0.760 0.561 0.140 0.172 0.688
#> GSM634714 1 0.516 0.624 0.764 0.004 0.232
#> GSM634716 1 0.411 0.706 0.844 0.004 0.152
#> GSM634717 1 0.533 0.690 0.748 0.248 0.004
#> GSM634718 1 0.346 0.683 0.892 0.096 0.012
#> GSM634719 1 0.448 0.723 0.840 0.144 0.016
#> GSM634720 3 0.834 0.468 0.344 0.096 0.560
#> GSM634721 1 0.613 0.234 0.600 0.000 0.400
#> GSM634722 3 0.760 0.561 0.140 0.172 0.688
#> GSM634723 1 0.364 0.659 0.872 0.124 0.004
#> GSM634724 1 0.534 0.674 0.760 0.008 0.232
#> GSM634725 1 0.337 0.723 0.904 0.024 0.072
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.1174 0.7832 0.968 0.012 0.020 0.000
#> GSM634648 1 0.4618 0.7290 0.816 0.028 0.120 0.036
#> GSM634649 1 0.1297 0.7822 0.964 0.016 0.020 0.000
#> GSM634650 1 0.6605 0.4104 0.616 0.248 0.000 0.136
#> GSM634653 1 0.6530 0.6353 0.692 0.028 0.144 0.136
#> GSM634659 1 0.5718 0.7093 0.732 0.072 0.180 0.016
#> GSM634666 4 0.6182 0.6080 0.152 0.040 0.084 0.724
#> GSM634667 2 0.4248 0.4530 0.012 0.768 0.000 0.220
#> GSM634669 1 0.1022 0.7872 0.968 0.032 0.000 0.000
#> GSM634670 3 0.4037 0.6290 0.056 0.000 0.832 0.112
#> GSM634679 3 0.6106 0.5375 0.060 0.000 0.592 0.348
#> GSM634680 3 0.4525 0.6288 0.080 0.000 0.804 0.116
#> GSM634681 1 0.1733 0.7835 0.948 0.028 0.024 0.000
#> GSM634688 4 0.3689 0.7857 0.048 0.088 0.004 0.860
#> GSM634690 2 0.4685 0.5323 0.060 0.784 0.000 0.156
#> GSM634694 1 0.0336 0.7901 0.992 0.008 0.000 0.000
#> GSM634698 1 0.1297 0.7822 0.964 0.016 0.020 0.000
#> GSM634704 2 0.6517 0.2357 0.464 0.480 0.040 0.016
#> GSM634705 1 0.1510 0.7853 0.956 0.016 0.028 0.000
#> GSM634706 1 0.3810 0.7203 0.804 0.188 0.008 0.000
#> GSM634707 1 0.4817 0.7348 0.768 0.040 0.188 0.004
#> GSM634711 1 0.4122 0.7318 0.760 0.004 0.236 0.000
#> GSM634715 1 0.6631 0.6351 0.676 0.196 0.032 0.096
#> GSM634633 1 0.3900 0.7662 0.816 0.020 0.164 0.000
#> GSM634634 4 0.4393 0.6720 0.024 0.020 0.140 0.816
#> GSM634635 1 0.1297 0.7822 0.964 0.016 0.020 0.000
#> GSM634636 1 0.0804 0.7897 0.980 0.012 0.008 0.000
#> GSM634637 1 0.4098 0.7432 0.784 0.012 0.204 0.000
#> GSM634638 2 0.7080 0.3231 0.000 0.568 0.196 0.236
#> GSM634639 1 0.1297 0.7849 0.964 0.016 0.020 0.000
#> GSM634640 2 0.3764 0.4915 0.012 0.816 0.000 0.172
#> GSM634641 1 0.2179 0.7865 0.924 0.012 0.064 0.000
#> GSM634642 4 0.5087 0.6935 0.084 0.140 0.004 0.772
#> GSM634644 2 0.6116 0.3826 0.016 0.692 0.076 0.216
#> GSM634645 1 0.1576 0.7921 0.948 0.004 0.048 0.000
#> GSM634646 1 0.3781 0.7397 0.844 0.028 0.124 0.004
#> GSM634647 3 0.6165 0.4296 0.024 0.016 0.532 0.428
#> GSM634651 2 0.3123 0.5862 0.156 0.844 0.000 0.000
#> GSM634652 4 0.3898 0.7577 0.008 0.092 0.048 0.852
#> GSM634654 1 0.7861 -0.0779 0.456 0.036 0.396 0.112
#> GSM634655 1 0.5929 0.3507 0.520 0.004 0.448 0.028
#> GSM634656 3 0.6127 0.4580 0.024 0.016 0.552 0.408
#> GSM634657 2 0.5798 0.1718 0.464 0.512 0.008 0.016
#> GSM634658 1 0.1471 0.7893 0.960 0.024 0.004 0.012
#> GSM634660 1 0.5122 0.7289 0.756 0.048 0.188 0.008
#> GSM634661 2 0.1635 0.5406 0.044 0.948 0.000 0.008
#> GSM634662 1 0.7067 0.5534 0.628 0.196 0.156 0.020
#> GSM634663 2 0.5360 0.2887 0.436 0.552 0.000 0.012
#> GSM634664 4 0.3648 0.7871 0.056 0.076 0.004 0.864
#> GSM634665 1 0.6143 0.6783 0.724 0.028 0.124 0.124
#> GSM634668 1 0.6116 0.6921 0.712 0.172 0.096 0.020
#> GSM634671 1 0.5957 0.6732 0.720 0.012 0.116 0.152
#> GSM634672 3 0.6167 0.5359 0.188 0.012 0.696 0.104
#> GSM634673 3 0.4037 0.6290 0.056 0.000 0.832 0.112
#> GSM634674 1 0.7859 -0.1170 0.428 0.396 0.160 0.016
#> GSM634675 2 0.5492 0.3594 0.416 0.568 0.004 0.012
#> GSM634676 1 0.1970 0.7844 0.932 0.060 0.000 0.008
#> GSM634677 2 0.5302 0.4808 0.356 0.628 0.004 0.012
#> GSM634678 1 0.4356 0.7055 0.780 0.200 0.004 0.016
#> GSM634682 2 0.7080 0.3231 0.000 0.568 0.196 0.236
#> GSM634683 2 0.5900 0.5968 0.244 0.680 0.004 0.072
#> GSM634684 1 0.1471 0.7893 0.960 0.024 0.004 0.012
#> GSM634685 3 0.6951 0.4607 0.024 0.112 0.632 0.232
#> GSM634686 1 0.1042 0.7839 0.972 0.008 0.020 0.000
#> GSM634687 2 0.4059 0.4729 0.012 0.788 0.000 0.200
#> GSM634689 4 0.6686 0.6696 0.072 0.112 0.112 0.704
#> GSM634691 2 0.4762 0.5687 0.300 0.692 0.004 0.004
#> GSM634692 1 0.2019 0.7912 0.940 0.024 0.004 0.032
#> GSM634693 1 0.6775 0.5944 0.652 0.016 0.184 0.148
#> GSM634695 2 0.7058 0.3273 0.000 0.572 0.200 0.228
#> GSM634696 1 0.6336 0.6456 0.700 0.020 0.136 0.144
#> GSM634697 3 0.6163 0.5392 0.060 0.000 0.576 0.364
#> GSM634699 4 0.3781 0.7067 0.124 0.028 0.004 0.844
#> GSM634700 2 0.4755 0.5909 0.260 0.724 0.012 0.004
#> GSM634701 1 0.1256 0.7919 0.964 0.008 0.028 0.000
#> GSM634702 1 0.5950 0.7057 0.716 0.084 0.184 0.016
#> GSM634703 1 0.4813 0.5907 0.716 0.268 0.004 0.012
#> GSM634708 2 0.5204 0.5891 0.160 0.752 0.000 0.088
#> GSM634709 1 0.1297 0.7822 0.964 0.016 0.020 0.000
#> GSM634710 3 0.8419 0.3496 0.240 0.024 0.384 0.352
#> GSM634712 3 0.6039 0.5492 0.056 0.000 0.596 0.348
#> GSM634713 4 0.4285 0.7504 0.008 0.092 0.068 0.832
#> GSM634714 1 0.7221 0.4979 0.616 0.036 0.240 0.108
#> GSM634716 1 0.4155 0.7313 0.756 0.004 0.240 0.000
#> GSM634717 1 0.1543 0.7897 0.956 0.032 0.008 0.004
#> GSM634718 1 0.3907 0.7177 0.808 0.180 0.004 0.008
#> GSM634719 1 0.1339 0.7891 0.964 0.024 0.004 0.008
#> GSM634720 3 0.7436 0.3424 0.348 0.020 0.520 0.112
#> GSM634721 1 0.6808 0.5778 0.668 0.036 0.188 0.108
#> GSM634722 4 0.3959 0.7490 0.000 0.092 0.068 0.840
#> GSM634723 1 0.4793 0.7427 0.800 0.112 0.008 0.080
#> GSM634724 1 0.6606 0.2627 0.496 0.012 0.440 0.052
#> GSM634725 1 0.5027 0.7555 0.808 0.060 0.052 0.080
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634648 1 0.0771 0.8714 0.976 0.020 0.004 0.000 0.000
#> GSM634649 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634650 2 0.6671 0.5204 0.360 0.480 0.000 0.140 0.020
#> GSM634653 1 0.1682 0.8575 0.944 0.012 0.012 0.032 0.000
#> GSM634659 1 0.5393 0.3872 0.628 0.300 0.064 0.000 0.008
#> GSM634666 4 0.3239 0.7099 0.156 0.012 0.004 0.828 0.000
#> GSM634667 5 0.6118 0.6372 0.000 0.404 0.000 0.128 0.468
#> GSM634669 1 0.1041 0.8686 0.964 0.032 0.004 0.000 0.000
#> GSM634670 3 0.0854 0.7845 0.004 0.000 0.976 0.012 0.008
#> GSM634679 3 0.0671 0.7877 0.004 0.000 0.980 0.016 0.000
#> GSM634680 3 0.0451 0.7886 0.008 0.000 0.988 0.000 0.004
#> GSM634681 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634688 4 0.1739 0.8121 0.024 0.032 0.000 0.940 0.004
#> GSM634690 2 0.4046 0.2344 0.008 0.804 0.000 0.120 0.068
#> GSM634694 1 0.0609 0.8713 0.980 0.020 0.000 0.000 0.000
#> GSM634698 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634704 2 0.4725 0.6142 0.264 0.700 0.012 0.012 0.012
#> GSM634705 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634706 2 0.4383 0.4971 0.424 0.572 0.004 0.000 0.000
#> GSM634707 1 0.4194 0.7387 0.788 0.128 0.080 0.000 0.004
#> GSM634711 1 0.3300 0.7579 0.792 0.000 0.204 0.000 0.004
#> GSM634715 2 0.5708 0.5435 0.340 0.580 0.068 0.000 0.012
#> GSM634633 1 0.2052 0.8494 0.912 0.004 0.080 0.000 0.004
#> GSM634634 4 0.3129 0.7450 0.000 0.004 0.008 0.832 0.156
#> GSM634635 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634636 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634637 1 0.3300 0.7579 0.792 0.000 0.204 0.000 0.004
#> GSM634638 5 0.3031 0.5500 0.000 0.020 0.004 0.120 0.856
#> GSM634639 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634640 5 0.6118 0.6372 0.000 0.404 0.000 0.128 0.468
#> GSM634641 1 0.2900 0.7939 0.864 0.108 0.028 0.000 0.000
#> GSM634642 4 0.3929 0.7070 0.032 0.164 0.004 0.796 0.004
#> GSM634644 2 0.3674 0.2921 0.024 0.816 0.000 0.148 0.012
#> GSM634645 1 0.0912 0.8715 0.972 0.016 0.012 0.000 0.000
#> GSM634646 1 0.0671 0.8716 0.980 0.016 0.004 0.000 0.000
#> GSM634647 3 0.4100 0.6358 0.000 0.004 0.784 0.052 0.160
#> GSM634651 2 0.1854 0.5026 0.036 0.936 0.008 0.000 0.020
#> GSM634652 4 0.1915 0.7900 0.000 0.032 0.000 0.928 0.040
#> GSM634654 1 0.5270 0.0546 0.548 0.012 0.412 0.028 0.000
#> GSM634655 1 0.3940 0.7419 0.768 0.008 0.208 0.000 0.016
#> GSM634656 3 0.3887 0.6474 0.000 0.004 0.796 0.040 0.160
#> GSM634657 2 0.4978 0.5906 0.336 0.632 0.012 0.008 0.012
#> GSM634658 1 0.0968 0.8661 0.972 0.012 0.004 0.012 0.000
#> GSM634660 1 0.4951 0.6768 0.736 0.148 0.104 0.000 0.012
#> GSM634661 2 0.1306 0.5055 0.016 0.960 0.016 0.000 0.008
#> GSM634662 2 0.5507 0.5527 0.348 0.588 0.052 0.000 0.012
#> GSM634663 2 0.1768 0.5533 0.072 0.924 0.004 0.000 0.000
#> GSM634664 4 0.1195 0.8117 0.028 0.012 0.000 0.960 0.000
#> GSM634665 1 0.1682 0.8575 0.944 0.012 0.012 0.032 0.000
#> GSM634668 2 0.5420 0.3977 0.416 0.524 0.060 0.000 0.000
#> GSM634671 1 0.1695 0.8565 0.940 0.008 0.008 0.044 0.000
#> GSM634672 3 0.0609 0.7814 0.020 0.000 0.980 0.000 0.000
#> GSM634673 3 0.0451 0.7886 0.008 0.000 0.988 0.000 0.004
#> GSM634674 2 0.5743 0.5811 0.308 0.600 0.080 0.000 0.012
#> GSM634675 2 0.1704 0.5392 0.068 0.928 0.000 0.000 0.004
#> GSM634676 1 0.1153 0.8679 0.964 0.024 0.004 0.008 0.000
#> GSM634677 2 0.1571 0.5340 0.060 0.936 0.000 0.000 0.004
#> GSM634678 2 0.4359 0.5142 0.412 0.584 0.004 0.000 0.000
#> GSM634682 5 0.3059 0.5500 0.000 0.016 0.008 0.120 0.856
#> GSM634683 2 0.2699 0.3853 0.012 0.880 0.000 0.100 0.008
#> GSM634684 1 0.1173 0.8637 0.964 0.012 0.004 0.020 0.000
#> GSM634685 5 0.5912 -0.1789 0.000 0.004 0.392 0.092 0.512
#> GSM634686 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634687 5 0.6118 0.6372 0.000 0.404 0.000 0.128 0.468
#> GSM634689 4 0.4316 0.6853 0.012 0.152 0.056 0.780 0.000
#> GSM634691 2 0.1408 0.5161 0.044 0.948 0.000 0.000 0.008
#> GSM634692 1 0.1281 0.8606 0.956 0.012 0.000 0.032 0.000
#> GSM634693 1 0.2838 0.8191 0.884 0.008 0.072 0.036 0.000
#> GSM634695 2 0.6750 -0.0469 0.012 0.444 0.012 0.120 0.412
#> GSM634696 1 0.1808 0.8560 0.936 0.008 0.012 0.044 0.000
#> GSM634697 3 0.0912 0.7881 0.012 0.000 0.972 0.016 0.000
#> GSM634699 4 0.2707 0.7300 0.132 0.008 0.000 0.860 0.000
#> GSM634700 2 0.1386 0.5158 0.032 0.952 0.016 0.000 0.000
#> GSM634701 1 0.0912 0.8716 0.972 0.016 0.012 0.000 0.000
#> GSM634702 1 0.5595 0.4268 0.632 0.276 0.080 0.000 0.012
#> GSM634703 2 0.4321 0.5442 0.396 0.600 0.000 0.000 0.004
#> GSM634708 2 0.3206 0.3708 0.012 0.864 0.004 0.096 0.024
#> GSM634709 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634710 3 0.4633 0.4347 0.348 0.004 0.632 0.016 0.000
#> GSM634712 3 0.0671 0.7877 0.004 0.000 0.980 0.016 0.000
#> GSM634713 4 0.1943 0.7926 0.000 0.020 0.000 0.924 0.056
#> GSM634714 1 0.3234 0.7795 0.836 0.008 0.144 0.012 0.000
#> GSM634716 1 0.3300 0.7579 0.792 0.000 0.204 0.000 0.004
#> GSM634717 1 0.0510 0.8720 0.984 0.016 0.000 0.000 0.000
#> GSM634718 2 0.4375 0.5027 0.420 0.576 0.000 0.000 0.004
#> GSM634719 1 0.0854 0.8692 0.976 0.012 0.004 0.008 0.000
#> GSM634720 3 0.4440 0.1319 0.468 0.004 0.528 0.000 0.000
#> GSM634721 1 0.1982 0.8545 0.932 0.012 0.028 0.028 0.000
#> GSM634722 4 0.1725 0.7967 0.000 0.020 0.000 0.936 0.044
#> GSM634723 1 0.5443 -0.2813 0.504 0.436 0.000 0.060 0.000
#> GSM634724 1 0.3906 0.6674 0.704 0.000 0.292 0.000 0.004
#> GSM634725 1 0.3780 0.7532 0.808 0.132 0.060 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.0405 0.7985 0.988 0.000 0.000 0.004 0.008 0.000
#> GSM634648 1 0.2594 0.7815 0.880 0.000 0.004 0.004 0.084 0.028
#> GSM634649 1 0.0291 0.7992 0.992 0.000 0.000 0.004 0.004 0.000
#> GSM634650 5 0.6119 0.5528 0.084 0.244 0.000 0.044 0.600 0.028
#> GSM634653 1 0.4498 0.7560 0.784 0.000 0.032 0.072 0.076 0.036
#> GSM634659 5 0.3351 0.6740 0.152 0.000 0.036 0.004 0.808 0.000
#> GSM634666 4 0.3024 0.7711 0.064 0.004 0.012 0.868 0.048 0.004
#> GSM634667 2 0.3133 0.5204 0.000 0.780 0.000 0.008 0.000 0.212
#> GSM634669 1 0.3868 -0.2437 0.508 0.000 0.000 0.000 0.492 0.000
#> GSM634670 3 0.0603 0.7801 0.004 0.000 0.980 0.000 0.016 0.000
#> GSM634679 3 0.2290 0.7738 0.004 0.000 0.904 0.024 0.060 0.008
#> GSM634680 3 0.1418 0.7891 0.024 0.000 0.944 0.000 0.032 0.000
#> GSM634681 1 0.1542 0.7970 0.936 0.000 0.000 0.004 0.052 0.008
#> GSM634688 4 0.1484 0.8282 0.004 0.040 0.008 0.944 0.000 0.004
#> GSM634690 2 0.2422 0.7555 0.000 0.892 0.000 0.012 0.072 0.024
#> GSM634694 1 0.3955 -0.1388 0.560 0.000 0.004 0.000 0.436 0.000
#> GSM634698 1 0.0858 0.8006 0.968 0.000 0.000 0.004 0.000 0.028
#> GSM634704 5 0.3369 0.6707 0.040 0.096 0.000 0.028 0.836 0.000
#> GSM634705 1 0.1226 0.7994 0.952 0.000 0.000 0.004 0.004 0.040
#> GSM634706 5 0.5530 0.6019 0.220 0.220 0.000 0.000 0.560 0.000
#> GSM634707 5 0.3781 0.6431 0.204 0.000 0.036 0.004 0.756 0.000
#> GSM634711 1 0.4523 0.6478 0.724 0.000 0.144 0.000 0.124 0.008
#> GSM634715 5 0.3013 0.6847 0.040 0.080 0.004 0.008 0.864 0.004
#> GSM634633 5 0.4533 0.5160 0.256 0.016 0.044 0.000 0.684 0.000
#> GSM634634 4 0.3517 0.7650 0.004 0.000 0.056 0.804 0.000 0.136
#> GSM634635 1 0.0405 0.7985 0.988 0.000 0.000 0.004 0.008 0.000
#> GSM634636 1 0.0146 0.8012 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM634637 1 0.4352 0.6456 0.724 0.000 0.128 0.000 0.148 0.000
#> GSM634638 6 0.2921 0.7414 0.000 0.156 0.000 0.008 0.008 0.828
#> GSM634639 1 0.0692 0.7977 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM634640 2 0.3133 0.5204 0.000 0.780 0.000 0.008 0.000 0.212
#> GSM634641 1 0.2101 0.7580 0.892 0.004 0.004 0.000 0.100 0.000
#> GSM634642 4 0.3536 0.7360 0.004 0.060 0.000 0.804 0.132 0.000
#> GSM634644 2 0.3898 0.6732 0.000 0.780 0.000 0.148 0.060 0.012
#> GSM634645 1 0.0665 0.8021 0.980 0.000 0.008 0.000 0.004 0.008
#> GSM634646 1 0.3117 0.7710 0.852 0.000 0.016 0.000 0.080 0.052
#> GSM634647 3 0.3050 0.6692 0.004 0.000 0.832 0.028 0.000 0.136
#> GSM634651 2 0.2912 0.7779 0.012 0.816 0.000 0.000 0.172 0.000
#> GSM634652 4 0.3394 0.7881 0.000 0.144 0.000 0.804 0.000 0.052
#> GSM634654 1 0.6783 0.1979 0.476 0.000 0.348 0.056 0.076 0.044
#> GSM634655 5 0.5746 0.0174 0.376 0.000 0.172 0.000 0.452 0.000
#> GSM634656 3 0.2973 0.6714 0.004 0.000 0.836 0.024 0.000 0.136
#> GSM634657 5 0.3235 0.6639 0.024 0.124 0.000 0.020 0.832 0.000
#> GSM634658 1 0.2190 0.7937 0.908 0.000 0.008 0.040 0.044 0.000
#> GSM634660 5 0.3857 0.6519 0.148 0.000 0.072 0.004 0.776 0.000
#> GSM634661 2 0.2664 0.7732 0.000 0.816 0.000 0.000 0.184 0.000
#> GSM634662 5 0.2973 0.6999 0.084 0.040 0.016 0.000 0.860 0.000
#> GSM634663 5 0.4388 0.3795 0.012 0.372 0.000 0.008 0.604 0.004
#> GSM634664 4 0.1554 0.8288 0.004 0.044 0.008 0.940 0.000 0.004
#> GSM634665 1 0.4818 0.7383 0.756 0.000 0.016 0.076 0.088 0.064
#> GSM634668 5 0.4169 0.7003 0.096 0.080 0.032 0.004 0.788 0.000
#> GSM634671 1 0.5402 0.7065 0.700 0.000 0.016 0.140 0.084 0.060
#> GSM634672 3 0.2250 0.7623 0.020 0.000 0.888 0.000 0.092 0.000
#> GSM634673 3 0.1334 0.7890 0.020 0.000 0.948 0.000 0.032 0.000
#> GSM634674 5 0.3086 0.6616 0.020 0.076 0.048 0.000 0.856 0.000
#> GSM634675 2 0.3974 0.7239 0.056 0.752 0.000 0.004 0.188 0.000
#> GSM634676 1 0.4770 -0.1343 0.508 0.000 0.004 0.040 0.448 0.000
#> GSM634677 2 0.3557 0.7676 0.056 0.800 0.000 0.004 0.140 0.000
#> GSM634678 5 0.4765 0.6591 0.152 0.172 0.000 0.000 0.676 0.000
#> GSM634682 6 0.2921 0.7414 0.000 0.156 0.000 0.008 0.008 0.828
#> GSM634683 2 0.2573 0.7798 0.000 0.872 0.000 0.012 0.104 0.012
#> GSM634684 1 0.2445 0.7905 0.892 0.000 0.008 0.040 0.060 0.000
#> GSM634685 6 0.5418 0.5850 0.004 0.000 0.148 0.052 0.116 0.680
#> GSM634686 1 0.0603 0.7977 0.980 0.000 0.000 0.004 0.016 0.000
#> GSM634687 2 0.3133 0.5204 0.000 0.780 0.000 0.008 0.000 0.212
#> GSM634689 4 0.3339 0.7315 0.000 0.008 0.008 0.792 0.188 0.004
#> GSM634691 2 0.3477 0.7706 0.056 0.808 0.000 0.004 0.132 0.000
#> GSM634692 1 0.2357 0.7967 0.900 0.000 0.008 0.068 0.012 0.012
#> GSM634693 1 0.4902 0.7350 0.752 0.000 0.020 0.076 0.088 0.064
#> GSM634695 6 0.6092 0.6037 0.012 0.140 0.012 0.008 0.260 0.568
#> GSM634696 1 0.5735 0.6867 0.668 0.000 0.016 0.148 0.108 0.060
#> GSM634697 3 0.1959 0.7887 0.020 0.000 0.924 0.024 0.032 0.000
#> GSM634699 4 0.0622 0.8044 0.012 0.000 0.008 0.980 0.000 0.000
#> GSM634700 2 0.3248 0.7746 0.032 0.804 0.000 0.000 0.164 0.000
#> GSM634701 1 0.1219 0.7987 0.948 0.000 0.004 0.000 0.048 0.000
#> GSM634702 5 0.3635 0.6648 0.168 0.004 0.036 0.004 0.788 0.000
#> GSM634703 5 0.5642 0.6020 0.216 0.220 0.000 0.004 0.560 0.000
#> GSM634708 2 0.2473 0.7778 0.000 0.876 0.000 0.008 0.104 0.012
#> GSM634709 1 0.0405 0.8003 0.988 0.000 0.000 0.004 0.000 0.008
#> GSM634710 3 0.5911 0.4611 0.268 0.000 0.600 0.032 0.072 0.028
#> GSM634712 3 0.1909 0.7761 0.000 0.000 0.920 0.024 0.052 0.004
#> GSM634713 4 0.3468 0.7886 0.000 0.128 0.000 0.804 0.000 0.068
#> GSM634714 1 0.4868 0.7399 0.744 0.000 0.072 0.024 0.128 0.032
#> GSM634716 1 0.4674 0.6289 0.708 0.000 0.144 0.000 0.140 0.008
#> GSM634717 1 0.0146 0.7998 0.996 0.000 0.000 0.004 0.000 0.000
#> GSM634718 5 0.5642 0.6028 0.220 0.216 0.000 0.004 0.560 0.000
#> GSM634719 1 0.2344 0.7904 0.896 0.000 0.008 0.028 0.068 0.000
#> GSM634720 3 0.5640 0.0605 0.416 0.000 0.460 0.000 0.116 0.008
#> GSM634721 1 0.4703 0.7418 0.760 0.000 0.024 0.040 0.120 0.056
#> GSM634722 4 0.3316 0.7937 0.000 0.136 0.000 0.812 0.000 0.052
#> GSM634723 5 0.7255 0.5583 0.172 0.164 0.008 0.180 0.476 0.000
#> GSM634724 1 0.5919 0.1183 0.436 0.000 0.396 0.000 0.160 0.008
#> GSM634725 1 0.3073 0.6958 0.788 0.000 0.008 0.000 0.204 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 individual(p) k
#> SD:mclust 86 0.768 2
#> SD:mclust 77 0.624 3
#> SD:mclust 70 0.607 4
#> SD:mclust 79 0.899 5
#> SD:mclust 84 0.637 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 17698 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.889 0.918 0.967 0.4940 0.504 0.504
#> 3 3 0.630 0.835 0.910 0.3419 0.698 0.469
#> 4 4 0.540 0.646 0.814 0.1146 0.866 0.631
#> 5 5 0.525 0.474 0.675 0.0671 0.906 0.675
#> 6 6 0.615 0.535 0.725 0.0419 0.886 0.555
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
#> GSM634643 1 0.0000 0.97065 1.000 0.000
#> GSM634648 1 0.0000 0.97065 1.000 0.000
#> GSM634649 1 0.0000 0.97065 1.000 0.000
#> GSM634650 2 0.0000 0.95699 0.000 1.000
#> GSM634653 1 0.0000 0.97065 1.000 0.000
#> GSM634659 2 0.8555 0.60392 0.280 0.720
#> GSM634666 1 0.5294 0.85747 0.880 0.120
#> GSM634667 2 0.0000 0.95699 0.000 1.000
#> GSM634669 1 0.2778 0.93172 0.952 0.048
#> GSM634670 1 0.0000 0.97065 1.000 0.000
#> GSM634679 1 0.0000 0.97065 1.000 0.000
#> GSM634680 1 0.0000 0.97065 1.000 0.000
#> GSM634681 1 0.0000 0.97065 1.000 0.000
#> GSM634688 2 0.0000 0.95699 0.000 1.000
#> GSM634690 2 0.0000 0.95699 0.000 1.000
#> GSM634694 1 0.9635 0.34177 0.612 0.388
#> GSM634698 1 0.0000 0.97065 1.000 0.000
#> GSM634704 2 0.5737 0.82799 0.136 0.864
#> GSM634705 1 0.0000 0.97065 1.000 0.000
#> GSM634706 2 0.0376 0.95428 0.004 0.996
#> GSM634707 1 0.1843 0.94963 0.972 0.028
#> GSM634711 1 0.0000 0.97065 1.000 0.000
#> GSM634715 2 0.0000 0.95699 0.000 1.000
#> GSM634633 1 0.0000 0.97065 1.000 0.000
#> GSM634634 1 0.9866 0.23207 0.568 0.432
#> GSM634635 1 0.0000 0.97065 1.000 0.000
#> GSM634636 1 0.0000 0.97065 1.000 0.000
#> GSM634637 1 0.0000 0.97065 1.000 0.000
#> GSM634638 2 0.0000 0.95699 0.000 1.000
#> GSM634639 1 0.0000 0.97065 1.000 0.000
#> GSM634640 2 0.0000 0.95699 0.000 1.000
#> GSM634641 1 0.0000 0.97065 1.000 0.000
#> GSM634642 2 0.0000 0.95699 0.000 1.000
#> GSM634644 2 0.0000 0.95699 0.000 1.000
#> GSM634645 1 0.0000 0.97065 1.000 0.000
#> GSM634646 1 0.0000 0.97065 1.000 0.000
#> GSM634647 1 0.0000 0.97065 1.000 0.000
#> GSM634651 2 0.0000 0.95699 0.000 1.000
#> GSM634652 2 0.0000 0.95699 0.000 1.000
#> GSM634654 1 0.0000 0.97065 1.000 0.000
#> GSM634655 1 0.0938 0.96197 0.988 0.012
#> GSM634656 1 0.0000 0.97065 1.000 0.000
#> GSM634657 2 0.0000 0.95699 0.000 1.000
#> GSM634658 1 0.0000 0.97065 1.000 0.000
#> GSM634660 1 0.6148 0.81698 0.848 0.152
#> GSM634661 2 0.0000 0.95699 0.000 1.000
#> GSM634662 2 0.0000 0.95699 0.000 1.000
#> GSM634663 2 0.0000 0.95699 0.000 1.000
#> GSM634664 2 0.2043 0.93283 0.032 0.968
#> GSM634665 1 0.0000 0.97065 1.000 0.000
#> GSM634668 2 0.0000 0.95699 0.000 1.000
#> GSM634671 1 0.0000 0.97065 1.000 0.000
#> GSM634672 1 0.0000 0.97065 1.000 0.000
#> GSM634673 1 0.0000 0.97065 1.000 0.000
#> GSM634674 2 0.0000 0.95699 0.000 1.000
#> GSM634675 2 0.0000 0.95699 0.000 1.000
#> GSM634676 1 0.6247 0.81257 0.844 0.156
#> GSM634677 2 0.0000 0.95699 0.000 1.000
#> GSM634678 2 0.2236 0.92923 0.036 0.964
#> GSM634682 2 0.0000 0.95699 0.000 1.000
#> GSM634683 2 0.0000 0.95699 0.000 1.000
#> GSM634684 1 0.0000 0.97065 1.000 0.000
#> GSM634685 2 1.0000 -0.00159 0.496 0.504
#> GSM634686 1 0.0000 0.97065 1.000 0.000
#> GSM634687 2 0.0000 0.95699 0.000 1.000
#> GSM634689 2 0.1633 0.93952 0.024 0.976
#> GSM634691 2 0.0000 0.95699 0.000 1.000
#> GSM634692 1 0.0000 0.97065 1.000 0.000
#> GSM634693 1 0.0000 0.97065 1.000 0.000
#> GSM634695 2 0.0000 0.95699 0.000 1.000
#> GSM634696 1 0.3879 0.90500 0.924 0.076
#> GSM634697 1 0.0000 0.97065 1.000 0.000
#> GSM634699 2 0.6148 0.81176 0.152 0.848
#> GSM634700 2 0.0000 0.95699 0.000 1.000
#> GSM634701 1 0.0000 0.97065 1.000 0.000
#> GSM634702 2 0.9881 0.21881 0.436 0.564
#> GSM634703 2 0.0000 0.95699 0.000 1.000
#> GSM634708 2 0.0000 0.95699 0.000 1.000
#> GSM634709 1 0.0000 0.97065 1.000 0.000
#> GSM634710 1 0.0000 0.97065 1.000 0.000
#> GSM634712 1 0.0000 0.97065 1.000 0.000
#> GSM634713 2 0.0000 0.95699 0.000 1.000
#> GSM634714 1 0.0000 0.97065 1.000 0.000
#> GSM634716 1 0.0000 0.97065 1.000 0.000
#> GSM634717 1 0.0000 0.97065 1.000 0.000
#> GSM634718 2 0.0000 0.95699 0.000 1.000
#> GSM634719 1 0.0000 0.97065 1.000 0.000
#> GSM634720 1 0.0000 0.97065 1.000 0.000
#> GSM634721 1 0.0000 0.97065 1.000 0.000
#> GSM634722 2 0.0000 0.95699 0.000 1.000
#> GSM634723 2 0.0000 0.95699 0.000 1.000
#> GSM634724 1 0.0000 0.97065 1.000 0.000
#> GSM634725 1 0.2423 0.93915 0.960 0.040
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.9059 1.000 0.000 0.000
#> GSM634648 1 0.4931 0.6318 0.768 0.000 0.232
#> GSM634649 1 0.0424 0.9063 0.992 0.000 0.008
#> GSM634650 2 0.7599 0.5929 0.260 0.656 0.084
#> GSM634653 3 0.3879 0.8624 0.152 0.000 0.848
#> GSM634659 1 0.3686 0.8141 0.860 0.140 0.000
#> GSM634666 3 0.1129 0.8654 0.004 0.020 0.976
#> GSM634667 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634669 1 0.0475 0.9064 0.992 0.004 0.004
#> GSM634670 3 0.0592 0.8669 0.012 0.000 0.988
#> GSM634679 3 0.4399 0.8460 0.188 0.000 0.812
#> GSM634680 3 0.4235 0.8542 0.176 0.000 0.824
#> GSM634681 1 0.1163 0.8989 0.972 0.000 0.028
#> GSM634688 2 0.5291 0.6763 0.000 0.732 0.268
#> GSM634690 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634694 1 0.0237 0.9063 0.996 0.000 0.004
#> GSM634698 1 0.0424 0.9063 0.992 0.000 0.008
#> GSM634704 2 0.4654 0.7364 0.208 0.792 0.000
#> GSM634705 1 0.1163 0.8987 0.972 0.000 0.028
#> GSM634706 1 0.2356 0.8726 0.928 0.072 0.000
#> GSM634707 1 0.0000 0.9059 1.000 0.000 0.000
#> GSM634711 1 0.3551 0.8006 0.868 0.000 0.132
#> GSM634715 2 0.0237 0.9139 0.004 0.996 0.000
#> GSM634633 1 0.4399 0.7049 0.812 0.000 0.188
#> GSM634634 3 0.1753 0.8434 0.000 0.048 0.952
#> GSM634635 1 0.0237 0.9063 0.996 0.000 0.004
#> GSM634636 1 0.0000 0.9059 1.000 0.000 0.000
#> GSM634637 1 0.0000 0.9059 1.000 0.000 0.000
#> GSM634638 2 0.1163 0.9054 0.000 0.972 0.028
#> GSM634639 1 0.0747 0.8999 0.984 0.000 0.016
#> GSM634640 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.9059 1.000 0.000 0.000
#> GSM634642 2 0.0592 0.9113 0.000 0.988 0.012
#> GSM634644 2 0.0892 0.9091 0.000 0.980 0.020
#> GSM634645 1 0.0424 0.9038 0.992 0.000 0.008
#> GSM634646 3 0.6154 0.4910 0.408 0.000 0.592
#> GSM634647 3 0.0000 0.8649 0.000 0.000 1.000
#> GSM634651 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634652 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634654 3 0.4399 0.8415 0.188 0.000 0.812
#> GSM634655 3 0.0592 0.8667 0.012 0.000 0.988
#> GSM634656 3 0.0000 0.8649 0.000 0.000 1.000
#> GSM634657 2 0.3267 0.8436 0.116 0.884 0.000
#> GSM634658 1 0.1411 0.8969 0.964 0.000 0.036
#> GSM634660 1 0.0829 0.9039 0.984 0.012 0.004
#> GSM634661 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634662 1 0.6308 0.0751 0.508 0.492 0.000
#> GSM634663 2 0.2796 0.8655 0.092 0.908 0.000
#> GSM634664 3 0.4750 0.6614 0.000 0.216 0.784
#> GSM634665 3 0.1643 0.8745 0.044 0.000 0.956
#> GSM634668 2 0.2796 0.8688 0.092 0.908 0.000
#> GSM634671 3 0.3879 0.7785 0.152 0.000 0.848
#> GSM634672 3 0.4605 0.8339 0.204 0.000 0.796
#> GSM634673 3 0.4291 0.8514 0.180 0.000 0.820
#> GSM634674 2 0.1031 0.9075 0.024 0.976 0.000
#> GSM634675 2 0.3551 0.8344 0.132 0.868 0.000
#> GSM634676 1 0.1315 0.9007 0.972 0.020 0.008
#> GSM634677 2 0.1163 0.9069 0.028 0.972 0.000
#> GSM634678 2 0.4750 0.7214 0.216 0.784 0.000
#> GSM634682 2 0.0237 0.9139 0.000 0.996 0.004
#> GSM634683 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634684 1 0.2625 0.8665 0.916 0.000 0.084
#> GSM634685 3 0.2165 0.8341 0.000 0.064 0.936
#> GSM634686 1 0.0424 0.9063 0.992 0.000 0.008
#> GSM634687 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634689 2 0.6189 0.3828 0.004 0.632 0.364
#> GSM634691 2 0.0592 0.9122 0.012 0.988 0.000
#> GSM634692 1 0.1031 0.9016 0.976 0.000 0.024
#> GSM634693 3 0.0424 0.8668 0.008 0.000 0.992
#> GSM634695 2 0.0747 0.9106 0.000 0.984 0.016
#> GSM634696 3 0.0237 0.8643 0.000 0.004 0.996
#> GSM634697 3 0.4235 0.8540 0.176 0.000 0.824
#> GSM634699 3 0.4293 0.7272 0.004 0.164 0.832
#> GSM634700 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634701 1 0.0000 0.9059 1.000 0.000 0.000
#> GSM634702 1 0.5988 0.4495 0.632 0.368 0.000
#> GSM634703 1 0.4887 0.7068 0.772 0.228 0.000
#> GSM634708 2 0.0000 0.9145 0.000 1.000 0.000
#> GSM634709 1 0.0424 0.9063 0.992 0.000 0.008
#> GSM634710 3 0.4121 0.8582 0.168 0.000 0.832
#> GSM634712 3 0.3941 0.8634 0.156 0.000 0.844
#> GSM634713 2 0.3482 0.8354 0.000 0.872 0.128
#> GSM634714 3 0.3267 0.8723 0.116 0.000 0.884
#> GSM634716 1 0.3038 0.8321 0.896 0.000 0.104
#> GSM634717 1 0.0424 0.9063 0.992 0.000 0.008
#> GSM634718 1 0.4293 0.7829 0.832 0.164 0.004
#> GSM634719 1 0.0424 0.9063 0.992 0.000 0.008
#> GSM634720 3 0.3482 0.8709 0.128 0.000 0.872
#> GSM634721 3 0.0000 0.8649 0.000 0.000 1.000
#> GSM634722 2 0.4702 0.7542 0.000 0.788 0.212
#> GSM634723 1 0.5619 0.6775 0.744 0.244 0.012
#> GSM634724 3 0.4974 0.7998 0.236 0.000 0.764
#> GSM634725 1 0.4253 0.8470 0.872 0.080 0.048
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.2011 0.7985 0.920 0.000 0.080 0.000
#> GSM634648 1 0.5961 0.4379 0.636 0.004 0.052 0.308
#> GSM634649 1 0.1004 0.8184 0.972 0.000 0.004 0.024
#> GSM634650 2 0.9221 0.2609 0.256 0.408 0.092 0.244
#> GSM634653 4 0.5394 0.5449 0.228 0.000 0.060 0.712
#> GSM634659 1 0.7607 0.2293 0.472 0.292 0.236 0.000
#> GSM634666 4 0.3404 0.6779 0.000 0.032 0.104 0.864
#> GSM634667 2 0.0000 0.8385 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0592 0.8165 0.984 0.000 0.016 0.000
#> GSM634670 3 0.3873 0.6130 0.000 0.000 0.772 0.228
#> GSM634679 3 0.4331 0.5504 0.000 0.000 0.712 0.288
#> GSM634680 3 0.3444 0.6334 0.000 0.000 0.816 0.184
#> GSM634681 1 0.3384 0.7689 0.860 0.000 0.024 0.116
#> GSM634688 4 0.4776 0.5278 0.000 0.272 0.016 0.712
#> GSM634690 2 0.0336 0.8371 0.000 0.992 0.008 0.000
#> GSM634694 1 0.0000 0.8187 1.000 0.000 0.000 0.000
#> GSM634698 1 0.1978 0.8084 0.928 0.000 0.004 0.068
#> GSM634704 2 0.6761 0.6069 0.252 0.612 0.132 0.004
#> GSM634705 1 0.3427 0.7761 0.860 0.000 0.028 0.112
#> GSM634706 1 0.3174 0.7838 0.888 0.076 0.008 0.028
#> GSM634707 1 0.5127 0.4779 0.632 0.012 0.356 0.000
#> GSM634711 3 0.4295 0.5527 0.240 0.000 0.752 0.008
#> GSM634715 2 0.2909 0.8226 0.020 0.888 0.092 0.000
#> GSM634633 3 0.3774 0.6024 0.168 0.008 0.820 0.004
#> GSM634634 4 0.3301 0.6731 0.000 0.048 0.076 0.876
#> GSM634635 1 0.1209 0.8173 0.964 0.000 0.004 0.032
#> GSM634636 1 0.3760 0.7647 0.836 0.000 0.136 0.028
#> GSM634637 3 0.5268 0.1938 0.396 0.000 0.592 0.012
#> GSM634638 2 0.2976 0.8110 0.000 0.872 0.120 0.008
#> GSM634639 1 0.3257 0.7460 0.844 0.000 0.152 0.004
#> GSM634640 2 0.0188 0.8388 0.000 0.996 0.004 0.000
#> GSM634641 1 0.4535 0.6621 0.744 0.000 0.240 0.016
#> GSM634642 2 0.2553 0.8186 0.008 0.916 0.016 0.060
#> GSM634644 2 0.3991 0.7348 0.000 0.808 0.020 0.172
#> GSM634645 1 0.4485 0.7022 0.772 0.000 0.200 0.028
#> GSM634646 1 0.7078 -0.0405 0.456 0.000 0.124 0.420
#> GSM634647 4 0.2760 0.6611 0.000 0.000 0.128 0.872
#> GSM634651 2 0.0188 0.8390 0.004 0.996 0.000 0.000
#> GSM634652 2 0.2402 0.8154 0.000 0.912 0.012 0.076
#> GSM634654 4 0.5429 0.5555 0.208 0.000 0.072 0.720
#> GSM634655 3 0.1722 0.6207 0.000 0.008 0.944 0.048
#> GSM634656 4 0.3311 0.6143 0.000 0.000 0.172 0.828
#> GSM634657 2 0.5853 0.6947 0.132 0.716 0.148 0.004
#> GSM634658 1 0.1576 0.8140 0.948 0.000 0.004 0.048
#> GSM634660 1 0.5865 0.3197 0.552 0.036 0.412 0.000
#> GSM634661 2 0.0188 0.8388 0.000 0.996 0.004 0.000
#> GSM634662 2 0.6409 0.3284 0.364 0.560 0.076 0.000
#> GSM634663 2 0.2089 0.8304 0.048 0.932 0.020 0.000
#> GSM634664 4 0.3196 0.6545 0.000 0.136 0.008 0.856
#> GSM634665 4 0.3278 0.6640 0.116 0.000 0.020 0.864
#> GSM634668 2 0.3818 0.7958 0.048 0.852 0.096 0.004
#> GSM634671 4 0.3271 0.6360 0.132 0.000 0.012 0.856
#> GSM634672 3 0.4632 0.5380 0.004 0.000 0.688 0.308
#> GSM634673 3 0.3751 0.6353 0.004 0.000 0.800 0.196
#> GSM634674 2 0.4008 0.7839 0.032 0.820 0.148 0.000
#> GSM634675 2 0.4339 0.6825 0.224 0.764 0.008 0.004
#> GSM634676 1 0.1557 0.8163 0.944 0.000 0.000 0.056
#> GSM634677 2 0.3351 0.7674 0.148 0.844 0.008 0.000
#> GSM634678 2 0.4514 0.7501 0.148 0.796 0.056 0.000
#> GSM634682 2 0.2976 0.8109 0.000 0.872 0.120 0.008
#> GSM634683 2 0.0000 0.8385 0.000 1.000 0.000 0.000
#> GSM634684 1 0.2611 0.7927 0.896 0.000 0.008 0.096
#> GSM634685 3 0.6830 0.0456 0.000 0.104 0.508 0.388
#> GSM634686 1 0.0188 0.8185 0.996 0.000 0.000 0.004
#> GSM634687 2 0.0188 0.8388 0.000 0.996 0.004 0.000
#> GSM634689 2 0.5393 0.5315 0.000 0.688 0.044 0.268
#> GSM634691 2 0.2271 0.8177 0.076 0.916 0.008 0.000
#> GSM634692 1 0.1557 0.8154 0.944 0.000 0.000 0.056
#> GSM634693 4 0.2124 0.6950 0.028 0.000 0.040 0.932
#> GSM634695 2 0.4423 0.7612 0.000 0.788 0.176 0.036
#> GSM634696 4 0.2329 0.6924 0.012 0.000 0.072 0.916
#> GSM634697 4 0.4977 -0.0318 0.000 0.000 0.460 0.540
#> GSM634699 4 0.5030 0.6441 0.120 0.080 0.012 0.788
#> GSM634700 2 0.0895 0.8377 0.004 0.976 0.020 0.000
#> GSM634701 1 0.3123 0.7481 0.844 0.000 0.156 0.000
#> GSM634702 3 0.8135 0.2783 0.244 0.288 0.452 0.016
#> GSM634703 1 0.3881 0.6960 0.812 0.172 0.016 0.000
#> GSM634708 2 0.0000 0.8385 0.000 1.000 0.000 0.000
#> GSM634709 1 0.0779 0.8197 0.980 0.000 0.004 0.016
#> GSM634710 4 0.5060 0.1362 0.004 0.000 0.412 0.584
#> GSM634712 3 0.3975 0.5954 0.000 0.000 0.760 0.240
#> GSM634713 2 0.3306 0.7513 0.000 0.840 0.004 0.156
#> GSM634714 3 0.6785 0.0829 0.096 0.000 0.484 0.420
#> GSM634716 3 0.3356 0.6041 0.176 0.000 0.824 0.000
#> GSM634717 1 0.1902 0.8096 0.932 0.000 0.004 0.064
#> GSM634718 1 0.0000 0.8187 1.000 0.000 0.000 0.000
#> GSM634719 1 0.0779 0.8175 0.980 0.000 0.016 0.004
#> GSM634720 3 0.3569 0.6167 0.000 0.000 0.804 0.196
#> GSM634721 4 0.2530 0.6731 0.000 0.000 0.112 0.888
#> GSM634722 4 0.6214 -0.0850 0.000 0.472 0.052 0.476
#> GSM634723 1 0.2593 0.8032 0.904 0.016 0.000 0.080
#> GSM634724 3 0.2714 0.6513 0.004 0.000 0.884 0.112
#> GSM634725 1 0.7336 0.5107 0.604 0.140 0.228 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.3628 0.624768 0.772 0.000 0.012 0.000 0.216
#> GSM634648 1 0.6390 0.371214 0.660 0.052 0.196 0.056 0.036
#> GSM634649 1 0.0794 0.669812 0.972 0.000 0.000 0.000 0.028
#> GSM634650 5 0.7743 0.241070 0.104 0.196 0.000 0.228 0.472
#> GSM634653 4 0.6104 0.321067 0.432 0.000 0.008 0.464 0.096
#> GSM634659 5 0.7954 0.112456 0.080 0.200 0.336 0.004 0.380
#> GSM634666 3 0.7951 0.000427 0.004 0.128 0.424 0.312 0.132
#> GSM634667 2 0.0566 0.779546 0.000 0.984 0.000 0.004 0.012
#> GSM634669 1 0.4232 0.541126 0.676 0.012 0.000 0.000 0.312
#> GSM634670 3 0.4025 0.552013 0.000 0.000 0.792 0.076 0.132
#> GSM634679 3 0.1822 0.584791 0.000 0.004 0.936 0.036 0.024
#> GSM634680 3 0.5875 0.402913 0.004 0.000 0.616 0.156 0.224
#> GSM634681 1 0.2374 0.645117 0.912 0.000 0.052 0.020 0.016
#> GSM634688 4 0.6726 0.287189 0.000 0.356 0.056 0.504 0.084
#> GSM634690 2 0.1251 0.774763 0.000 0.956 0.000 0.008 0.036
#> GSM634694 1 0.2583 0.661894 0.864 0.004 0.000 0.000 0.132
#> GSM634698 1 0.1331 0.654749 0.952 0.000 0.000 0.040 0.008
#> GSM634704 2 0.6301 0.332923 0.084 0.496 0.008 0.012 0.400
#> GSM634705 1 0.3522 0.632556 0.844 0.000 0.104 0.020 0.032
#> GSM634706 1 0.3751 0.585238 0.832 0.108 0.000 0.028 0.032
#> GSM634707 5 0.7177 0.289208 0.264 0.060 0.160 0.000 0.516
#> GSM634711 3 0.6144 -0.027376 0.100 0.000 0.456 0.008 0.436
#> GSM634715 2 0.4015 0.638077 0.004 0.708 0.000 0.004 0.284
#> GSM634633 3 0.6380 0.242678 0.044 0.020 0.560 0.036 0.340
#> GSM634634 4 0.3053 0.546196 0.000 0.044 0.008 0.872 0.076
#> GSM634635 1 0.0324 0.665801 0.992 0.000 0.000 0.004 0.004
#> GSM634636 1 0.6565 0.324707 0.536 0.000 0.252 0.012 0.200
#> GSM634637 3 0.4891 0.380110 0.056 0.004 0.708 0.004 0.228
#> GSM634638 2 0.4820 0.638464 0.000 0.696 0.000 0.068 0.236
#> GSM634639 1 0.4187 0.624197 0.764 0.000 0.032 0.008 0.196
#> GSM634640 2 0.1956 0.777314 0.000 0.916 0.000 0.008 0.076
#> GSM634641 1 0.7258 0.154978 0.436 0.020 0.252 0.004 0.288
#> GSM634642 2 0.2438 0.768138 0.004 0.912 0.008 0.032 0.044
#> GSM634644 2 0.4916 0.677367 0.000 0.716 0.000 0.160 0.124
#> GSM634645 1 0.4957 0.401471 0.624 0.000 0.332 0.000 0.044
#> GSM634646 1 0.5382 0.276434 0.596 0.000 0.340 0.060 0.004
#> GSM634647 4 0.3019 0.522696 0.000 0.000 0.048 0.864 0.088
#> GSM634651 2 0.0510 0.779778 0.000 0.984 0.000 0.000 0.016
#> GSM634652 2 0.3412 0.731485 0.000 0.820 0.000 0.152 0.028
#> GSM634654 4 0.7352 0.458283 0.332 0.000 0.080 0.464 0.124
#> GSM634655 5 0.6459 -0.202862 0.000 0.020 0.400 0.108 0.472
#> GSM634656 4 0.4599 0.415150 0.000 0.000 0.156 0.744 0.100
#> GSM634657 5 0.5535 -0.007669 0.072 0.392 0.000 0.000 0.536
#> GSM634658 1 0.5353 0.444313 0.576 0.000 0.000 0.064 0.360
#> GSM634660 5 0.7123 0.415362 0.192 0.112 0.128 0.000 0.568
#> GSM634661 2 0.1121 0.780725 0.000 0.956 0.000 0.000 0.044
#> GSM634662 2 0.5733 0.311718 0.056 0.580 0.020 0.000 0.344
#> GSM634663 2 0.2439 0.756837 0.004 0.876 0.000 0.000 0.120
#> GSM634664 4 0.5407 0.524815 0.012 0.184 0.012 0.708 0.084
#> GSM634665 4 0.4701 0.450906 0.368 0.000 0.004 0.612 0.016
#> GSM634668 2 0.5778 0.459245 0.000 0.640 0.208 0.008 0.144
#> GSM634671 4 0.4234 0.566966 0.252 0.000 0.004 0.724 0.020
#> GSM634672 3 0.1364 0.585993 0.000 0.000 0.952 0.036 0.012
#> GSM634673 3 0.4277 0.511904 0.000 0.000 0.768 0.076 0.156
#> GSM634674 2 0.2966 0.720681 0.000 0.816 0.000 0.000 0.184
#> GSM634675 2 0.4424 0.619749 0.188 0.752 0.000 0.004 0.056
#> GSM634676 1 0.6252 0.419580 0.556 0.008 0.000 0.148 0.288
#> GSM634677 2 0.4033 0.582239 0.236 0.744 0.000 0.004 0.016
#> GSM634678 2 0.4484 0.719179 0.052 0.808 0.040 0.012 0.088
#> GSM634682 2 0.4519 0.659768 0.000 0.720 0.000 0.052 0.228
#> GSM634683 2 0.2843 0.759526 0.000 0.876 0.000 0.076 0.048
#> GSM634684 5 0.6241 -0.263036 0.424 0.000 0.004 0.124 0.448
#> GSM634685 4 0.6272 0.247517 0.000 0.020 0.092 0.508 0.380
#> GSM634686 1 0.2773 0.655106 0.836 0.000 0.000 0.000 0.164
#> GSM634687 2 0.2629 0.756504 0.000 0.860 0.000 0.004 0.136
#> GSM634689 2 0.4599 0.656102 0.000 0.768 0.156 0.044 0.032
#> GSM634691 2 0.1399 0.776318 0.028 0.952 0.000 0.000 0.020
#> GSM634692 1 0.4297 0.616290 0.764 0.000 0.000 0.164 0.072
#> GSM634693 4 0.4343 0.580845 0.184 0.000 0.012 0.764 0.040
#> GSM634695 2 0.6517 0.325258 0.000 0.488 0.004 0.184 0.324
#> GSM634696 4 0.6123 0.403965 0.048 0.008 0.228 0.648 0.068
#> GSM634697 3 0.3278 0.569119 0.000 0.000 0.824 0.156 0.020
#> GSM634699 4 0.5999 0.562975 0.204 0.032 0.000 0.648 0.116
#> GSM634700 2 0.0963 0.777484 0.000 0.964 0.000 0.000 0.036
#> GSM634701 1 0.6132 0.199977 0.472 0.004 0.112 0.000 0.412
#> GSM634702 3 0.6423 0.169766 0.004 0.232 0.556 0.004 0.204
#> GSM634703 1 0.6878 -0.048680 0.396 0.264 0.000 0.004 0.336
#> GSM634708 2 0.0290 0.779311 0.000 0.992 0.000 0.000 0.008
#> GSM634709 1 0.3196 0.644201 0.804 0.000 0.004 0.000 0.192
#> GSM634710 3 0.4035 0.550581 0.000 0.000 0.784 0.156 0.060
#> GSM634712 3 0.1701 0.587740 0.000 0.000 0.936 0.048 0.016
#> GSM634713 2 0.3413 0.745860 0.000 0.832 0.000 0.124 0.044
#> GSM634714 4 0.8540 0.070590 0.244 0.000 0.220 0.316 0.220
#> GSM634716 5 0.5652 -0.161320 0.064 0.000 0.460 0.004 0.472
#> GSM634717 1 0.1251 0.658408 0.956 0.000 0.000 0.036 0.008
#> GSM634718 1 0.2411 0.668973 0.884 0.008 0.000 0.000 0.108
#> GSM634719 1 0.4162 0.544301 0.680 0.000 0.004 0.004 0.312
#> GSM634720 3 0.6767 0.272436 0.004 0.000 0.452 0.264 0.280
#> GSM634721 3 0.6536 -0.112198 0.004 0.000 0.416 0.412 0.168
#> GSM634722 4 0.4953 0.455150 0.000 0.216 0.000 0.696 0.088
#> GSM634723 1 0.3262 0.610908 0.840 0.000 0.000 0.124 0.036
#> GSM634724 3 0.3388 0.542116 0.000 0.000 0.792 0.008 0.200
#> GSM634725 3 0.8660 0.114946 0.152 0.052 0.448 0.124 0.224
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.4364 0.47699 0.608 0.000 0.004 0.000 0.364 0.024
#> GSM634648 1 0.1924 0.72980 0.928 0.024 0.004 0.004 0.004 0.036
#> GSM634649 1 0.2100 0.74549 0.884 0.000 0.000 0.000 0.112 0.004
#> GSM634650 5 0.5107 0.35455 0.000 0.052 0.012 0.280 0.640 0.016
#> GSM634653 1 0.3910 0.65262 0.812 0.000 0.052 0.036 0.092 0.008
#> GSM634659 6 0.4835 0.28464 0.000 0.068 0.000 0.000 0.352 0.580
#> GSM634666 6 0.6848 0.26349 0.000 0.168 0.012 0.160 0.116 0.544
#> GSM634667 2 0.1074 0.79011 0.000 0.960 0.012 0.028 0.000 0.000
#> GSM634669 5 0.4185 0.27088 0.332 0.020 0.000 0.000 0.644 0.004
#> GSM634670 3 0.3797 0.47087 0.000 0.000 0.580 0.000 0.000 0.420
#> GSM634679 3 0.4049 0.48918 0.000 0.004 0.580 0.004 0.000 0.412
#> GSM634680 3 0.3002 0.60414 0.048 0.000 0.848 0.004 0.000 0.100
#> GSM634681 1 0.1057 0.74149 0.968 0.004 0.004 0.004 0.008 0.012
#> GSM634688 4 0.6704 0.36179 0.000 0.236 0.004 0.508 0.068 0.184
#> GSM634690 2 0.0922 0.78611 0.000 0.968 0.004 0.004 0.000 0.024
#> GSM634694 1 0.2520 0.73385 0.844 0.004 0.000 0.000 0.152 0.000
#> GSM634698 1 0.0291 0.74193 0.992 0.000 0.000 0.004 0.004 0.000
#> GSM634704 2 0.7323 0.38948 0.132 0.448 0.236 0.008 0.176 0.000
#> GSM634705 1 0.4441 0.61186 0.700 0.000 0.000 0.000 0.092 0.208
#> GSM634706 1 0.1226 0.73390 0.952 0.040 0.000 0.004 0.004 0.000
#> GSM634707 5 0.4433 0.51310 0.012 0.040 0.024 0.000 0.748 0.176
#> GSM634711 5 0.4367 0.29029 0.000 0.000 0.032 0.000 0.604 0.364
#> GSM634715 2 0.5710 0.53265 0.000 0.596 0.084 0.052 0.268 0.000
#> GSM634633 3 0.2978 0.59616 0.028 0.012 0.872 0.000 0.020 0.068
#> GSM634634 4 0.1562 0.70313 0.000 0.024 0.032 0.940 0.004 0.000
#> GSM634635 1 0.1444 0.75071 0.928 0.000 0.000 0.000 0.072 0.000
#> GSM634636 6 0.4742 0.31003 0.076 0.004 0.000 0.000 0.268 0.652
#> GSM634637 6 0.3283 0.52854 0.000 0.000 0.036 0.000 0.160 0.804
#> GSM634638 2 0.5517 0.62487 0.000 0.628 0.240 0.048 0.084 0.000
#> GSM634639 1 0.4964 0.64241 0.704 0.000 0.080 0.000 0.172 0.044
#> GSM634640 2 0.2945 0.78552 0.000 0.868 0.028 0.040 0.064 0.000
#> GSM634641 6 0.4999 0.31048 0.052 0.024 0.000 0.000 0.296 0.628
#> GSM634642 2 0.1719 0.77727 0.000 0.928 0.000 0.008 0.008 0.056
#> GSM634644 2 0.4727 0.72335 0.000 0.732 0.144 0.080 0.044 0.000
#> GSM634645 1 0.4261 0.64131 0.728 0.000 0.016 0.000 0.044 0.212
#> GSM634646 1 0.2504 0.71187 0.880 0.000 0.028 0.004 0.000 0.088
#> GSM634647 4 0.2683 0.70235 0.000 0.000 0.056 0.880 0.012 0.052
#> GSM634651 2 0.0922 0.78487 0.004 0.968 0.000 0.000 0.004 0.024
#> GSM634652 2 0.4266 0.63629 0.000 0.700 0.000 0.252 0.008 0.040
#> GSM634654 1 0.7129 0.30737 0.548 0.000 0.156 0.112 0.140 0.044
#> GSM634655 3 0.3313 0.48444 0.000 0.024 0.808 0.000 0.160 0.008
#> GSM634656 4 0.3068 0.68177 0.000 0.000 0.088 0.840 0.000 0.072
#> GSM634657 5 0.5671 0.35249 0.000 0.184 0.160 0.012 0.628 0.016
#> GSM634658 5 0.4356 0.55821 0.132 0.000 0.004 0.024 0.764 0.076
#> GSM634660 5 0.4839 0.50469 0.012 0.160 0.072 0.000 0.728 0.028
#> GSM634661 2 0.1554 0.79318 0.004 0.940 0.044 0.004 0.008 0.000
#> GSM634662 2 0.5223 0.19367 0.004 0.508 0.004 0.000 0.416 0.068
#> GSM634663 2 0.3927 0.63086 0.004 0.712 0.000 0.000 0.260 0.024
#> GSM634664 4 0.3912 0.66833 0.004 0.044 0.004 0.804 0.120 0.024
#> GSM634665 4 0.4062 0.44061 0.344 0.000 0.004 0.640 0.012 0.000
#> GSM634668 6 0.4662 0.02541 0.000 0.468 0.000 0.004 0.032 0.496
#> GSM634671 4 0.2291 0.69949 0.040 0.000 0.000 0.904 0.012 0.044
#> GSM634672 3 0.4217 0.40502 0.008 0.000 0.524 0.004 0.000 0.464
#> GSM634673 3 0.3323 0.58276 0.008 0.000 0.752 0.000 0.000 0.240
#> GSM634674 2 0.2971 0.75070 0.004 0.832 0.020 0.000 0.144 0.000
#> GSM634675 2 0.4261 0.67138 0.160 0.760 0.000 0.004 0.056 0.020
#> GSM634676 5 0.6033 0.44038 0.116 0.000 0.016 0.156 0.640 0.072
#> GSM634677 2 0.3840 0.57338 0.264 0.716 0.000 0.004 0.004 0.012
#> GSM634678 2 0.3708 0.65719 0.008 0.760 0.000 0.004 0.016 0.212
#> GSM634682 2 0.4915 0.62941 0.000 0.652 0.272 0.032 0.044 0.000
#> GSM634683 2 0.3252 0.76359 0.004 0.832 0.020 0.128 0.016 0.000
#> GSM634684 5 0.3343 0.53550 0.020 0.000 0.016 0.072 0.852 0.040
#> GSM634685 4 0.6474 0.21026 0.000 0.020 0.376 0.444 0.140 0.020
#> GSM634686 1 0.3266 0.63959 0.728 0.000 0.000 0.000 0.272 0.000
#> GSM634687 2 0.4405 0.74192 0.000 0.760 0.064 0.044 0.132 0.000
#> GSM634689 2 0.2848 0.72043 0.000 0.828 0.000 0.008 0.004 0.160
#> GSM634691 2 0.1293 0.78536 0.016 0.956 0.000 0.004 0.004 0.020
#> GSM634692 1 0.6157 0.16762 0.416 0.000 0.000 0.268 0.312 0.004
#> GSM634693 4 0.3253 0.68820 0.088 0.000 0.020 0.848 0.004 0.040
#> GSM634695 3 0.6169 -0.30809 0.000 0.420 0.428 0.044 0.108 0.000
#> GSM634696 4 0.3967 0.41342 0.000 0.000 0.000 0.632 0.012 0.356
#> GSM634697 6 0.4164 0.30104 0.008 0.000 0.184 0.064 0.000 0.744
#> GSM634699 4 0.6708 0.46563 0.264 0.004 0.036 0.512 0.168 0.016
#> GSM634700 2 0.1750 0.77701 0.004 0.928 0.000 0.004 0.008 0.056
#> GSM634701 5 0.5156 0.46091 0.092 0.004 0.012 0.000 0.644 0.248
#> GSM634702 6 0.3930 0.53218 0.000 0.116 0.004 0.000 0.104 0.776
#> GSM634703 5 0.6316 0.33463 0.040 0.304 0.000 0.000 0.496 0.160
#> GSM634708 2 0.1036 0.79026 0.004 0.964 0.008 0.024 0.000 0.000
#> GSM634709 1 0.5814 0.15409 0.468 0.000 0.000 0.004 0.364 0.164
#> GSM634710 6 0.2660 0.45874 0.000 0.000 0.048 0.084 0.000 0.868
#> GSM634712 3 0.3828 0.45828 0.000 0.000 0.560 0.000 0.000 0.440
#> GSM634713 2 0.2909 0.78511 0.000 0.868 0.060 0.060 0.008 0.004
#> GSM634714 3 0.5685 0.32742 0.300 0.000 0.560 0.120 0.000 0.020
#> GSM634716 5 0.5963 -0.00743 0.000 0.004 0.396 0.000 0.412 0.188
#> GSM634717 1 0.2100 0.74710 0.884 0.000 0.000 0.000 0.112 0.004
#> GSM634718 1 0.3290 0.65451 0.744 0.004 0.000 0.000 0.252 0.000
#> GSM634719 5 0.3905 0.44061 0.260 0.000 0.004 0.004 0.716 0.016
#> GSM634720 3 0.4059 0.54992 0.036 0.008 0.796 0.116 0.000 0.044
#> GSM634721 6 0.5224 0.20682 0.000 0.000 0.008 0.304 0.096 0.592
#> GSM634722 4 0.2129 0.68588 0.000 0.056 0.040 0.904 0.000 0.000
#> GSM634723 1 0.3093 0.73879 0.852 0.004 0.008 0.044 0.092 0.000
#> GSM634724 6 0.4291 0.20343 0.000 0.000 0.268 0.000 0.052 0.680
#> GSM634725 6 0.5919 0.47830 0.000 0.028 0.016 0.184 0.152 0.620
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 individual(p) k
#> SD:NMF 89 0.6572 2
#> SD:NMF 89 0.2753 3
#> SD:NMF 79 0.4713 4
#> SD:NMF 54 0.0393 5
#> SD:NMF 56 0.0620 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 17698 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.258 0.737 0.845 0.4385 0.537 0.537
#> 3 3 0.358 0.663 0.804 0.3759 0.786 0.632
#> 4 4 0.408 0.643 0.790 0.0966 0.943 0.866
#> 5 5 0.432 0.578 0.755 0.0374 0.997 0.993
#> 6 6 0.463 0.558 0.732 0.0343 0.996 0.989
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
#> GSM634643 1 0.6712 0.821 0.824 0.176
#> GSM634648 1 0.9686 0.484 0.604 0.396
#> GSM634649 1 0.4690 0.822 0.900 0.100
#> GSM634650 2 0.9954 -0.118 0.460 0.540
#> GSM634653 1 0.6887 0.758 0.816 0.184
#> GSM634659 1 0.9286 0.678 0.656 0.344
#> GSM634666 1 0.8909 0.586 0.692 0.308
#> GSM634667 2 0.0000 0.847 0.000 1.000
#> GSM634669 1 0.7602 0.806 0.780 0.220
#> GSM634670 1 0.0000 0.785 1.000 0.000
#> GSM634679 1 0.3733 0.787 0.928 0.072
#> GSM634680 1 0.0000 0.785 1.000 0.000
#> GSM634681 1 0.2948 0.810 0.948 0.052
#> GSM634688 2 0.5842 0.783 0.140 0.860
#> GSM634690 2 0.0000 0.847 0.000 1.000
#> GSM634694 1 0.7299 0.815 0.796 0.204
#> GSM634698 1 0.7219 0.817 0.800 0.200
#> GSM634704 2 0.5178 0.796 0.116 0.884
#> GSM634705 1 0.1184 0.795 0.984 0.016
#> GSM634706 1 0.7950 0.795 0.760 0.240
#> GSM634707 1 0.7299 0.814 0.796 0.204
#> GSM634711 1 0.6531 0.822 0.832 0.168
#> GSM634715 1 0.9850 0.501 0.572 0.428
#> GSM634633 1 0.6712 0.803 0.824 0.176
#> GSM634634 2 0.7815 0.671 0.232 0.768
#> GSM634635 1 0.4562 0.821 0.904 0.096
#> GSM634636 1 0.6712 0.821 0.824 0.176
#> GSM634637 1 0.6801 0.822 0.820 0.180
#> GSM634638 2 0.0000 0.847 0.000 1.000
#> GSM634639 1 0.5408 0.825 0.876 0.124
#> GSM634640 2 0.0000 0.847 0.000 1.000
#> GSM634641 1 0.7299 0.814 0.796 0.204
#> GSM634642 2 0.5737 0.791 0.136 0.864
#> GSM634644 2 0.2423 0.844 0.040 0.960
#> GSM634645 1 0.1184 0.795 0.984 0.016
#> GSM634646 1 0.1184 0.795 0.984 0.016
#> GSM634647 1 0.0000 0.785 1.000 0.000
#> GSM634651 2 0.0000 0.847 0.000 1.000
#> GSM634652 2 0.0672 0.849 0.008 0.992
#> GSM634654 1 0.1843 0.801 0.972 0.028
#> GSM634655 1 0.8207 0.780 0.744 0.256
#> GSM634656 1 0.0000 0.785 1.000 0.000
#> GSM634657 2 0.9970 -0.169 0.468 0.532
#> GSM634658 1 0.7528 0.810 0.784 0.216
#> GSM634660 1 0.7299 0.814 0.796 0.204
#> GSM634661 2 0.0000 0.847 0.000 1.000
#> GSM634662 2 0.8443 0.568 0.272 0.728
#> GSM634663 2 0.9286 0.350 0.344 0.656
#> GSM634664 2 0.4022 0.826 0.080 0.920
#> GSM634665 1 0.1843 0.801 0.972 0.028
#> GSM634668 1 0.9427 0.653 0.640 0.360
#> GSM634671 1 0.2423 0.793 0.960 0.040
#> GSM634672 1 0.0000 0.785 1.000 0.000
#> GSM634673 1 0.0376 0.788 0.996 0.004
#> GSM634674 1 0.9988 0.352 0.520 0.480
#> GSM634675 2 0.1843 0.846 0.028 0.972
#> GSM634676 1 0.9044 0.710 0.680 0.320
#> GSM634677 2 0.0672 0.849 0.008 0.992
#> GSM634678 2 0.8813 0.550 0.300 0.700
#> GSM634682 2 0.0000 0.847 0.000 1.000
#> GSM634683 2 0.1414 0.846 0.020 0.980
#> GSM634684 1 0.8955 0.723 0.688 0.312
#> GSM634685 2 0.8713 0.557 0.292 0.708
#> GSM634686 1 0.7139 0.818 0.804 0.196
#> GSM634687 2 0.0000 0.847 0.000 1.000
#> GSM634689 2 0.5737 0.791 0.136 0.864
#> GSM634691 2 0.0000 0.847 0.000 1.000
#> GSM634692 1 0.7219 0.818 0.800 0.200
#> GSM634693 1 0.0672 0.790 0.992 0.008
#> GSM634695 2 0.1184 0.848 0.016 0.984
#> GSM634696 1 0.9795 0.508 0.584 0.416
#> GSM634697 1 0.0000 0.785 1.000 0.000
#> GSM634699 2 0.4298 0.827 0.088 0.912
#> GSM634700 2 0.2236 0.844 0.036 0.964
#> GSM634701 1 0.7139 0.817 0.804 0.196
#> GSM634702 1 0.9286 0.678 0.656 0.344
#> GSM634703 2 0.9608 0.200 0.384 0.616
#> GSM634708 2 0.0000 0.847 0.000 1.000
#> GSM634709 1 0.6712 0.821 0.824 0.176
#> GSM634710 1 0.8909 0.586 0.692 0.308
#> GSM634712 1 0.3733 0.787 0.928 0.072
#> GSM634713 2 0.0376 0.848 0.004 0.996
#> GSM634714 1 0.2948 0.810 0.948 0.052
#> GSM634716 1 0.6623 0.822 0.828 0.172
#> GSM634717 1 0.6712 0.821 0.824 0.176
#> GSM634718 1 0.9896 0.483 0.560 0.440
#> GSM634719 1 0.7528 0.810 0.784 0.216
#> GSM634720 1 0.3274 0.813 0.940 0.060
#> GSM634721 1 0.9087 0.627 0.676 0.324
#> GSM634722 2 0.5178 0.803 0.116 0.884
#> GSM634723 1 0.9686 0.589 0.604 0.396
#> GSM634724 1 0.2236 0.806 0.964 0.036
#> GSM634725 1 0.8861 0.731 0.696 0.304
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.176 0.7292 0.956 0.004 0.040
#> GSM634648 1 0.885 0.3608 0.556 0.292 0.152
#> GSM634649 1 0.392 0.6752 0.856 0.004 0.140
#> GSM634650 1 0.851 0.3266 0.528 0.372 0.100
#> GSM634653 1 0.867 0.4764 0.584 0.152 0.264
#> GSM634659 1 0.498 0.6851 0.828 0.136 0.036
#> GSM634666 3 0.889 0.4970 0.192 0.236 0.572
#> GSM634667 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634669 1 0.215 0.7360 0.948 0.036 0.016
#> GSM634670 3 0.435 0.7703 0.184 0.000 0.816
#> GSM634679 3 0.659 0.7617 0.216 0.056 0.728
#> GSM634680 3 0.429 0.7701 0.180 0.000 0.820
#> GSM634681 1 0.468 0.6168 0.804 0.004 0.192
#> GSM634688 2 0.631 0.7666 0.084 0.768 0.148
#> GSM634690 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634694 1 0.192 0.7362 0.956 0.020 0.024
#> GSM634698 1 0.148 0.7358 0.968 0.012 0.020
#> GSM634704 2 0.457 0.7660 0.160 0.828 0.012
#> GSM634705 1 0.506 0.5538 0.756 0.000 0.244
#> GSM634706 1 0.260 0.7343 0.932 0.052 0.016
#> GSM634707 1 0.241 0.7344 0.940 0.020 0.040
#> GSM634711 1 0.216 0.7240 0.936 0.000 0.064
#> GSM634715 1 0.607 0.5921 0.736 0.236 0.028
#> GSM634633 1 0.763 0.4470 0.652 0.084 0.264
#> GSM634634 2 0.697 0.6420 0.044 0.668 0.288
#> GSM634635 1 0.378 0.6763 0.864 0.004 0.132
#> GSM634636 1 0.188 0.7297 0.952 0.004 0.044
#> GSM634637 1 0.260 0.7304 0.932 0.016 0.052
#> GSM634638 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634639 1 0.378 0.6806 0.864 0.004 0.132
#> GSM634640 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634641 1 0.127 0.7330 0.972 0.004 0.024
#> GSM634642 2 0.623 0.7674 0.128 0.776 0.096
#> GSM634644 2 0.255 0.8654 0.056 0.932 0.012
#> GSM634645 1 0.506 0.5538 0.756 0.000 0.244
#> GSM634646 1 0.510 0.5476 0.752 0.000 0.248
#> GSM634647 3 0.304 0.7477 0.104 0.000 0.896
#> GSM634651 2 0.230 0.8712 0.036 0.944 0.020
#> GSM634652 2 0.304 0.8474 0.036 0.920 0.044
#> GSM634654 1 0.606 0.4093 0.656 0.004 0.340
#> GSM634655 1 0.483 0.7160 0.848 0.084 0.068
#> GSM634656 3 0.304 0.7477 0.104 0.000 0.896
#> GSM634657 1 0.781 0.4286 0.584 0.352 0.064
#> GSM634658 1 0.230 0.7374 0.944 0.036 0.020
#> GSM634660 1 0.241 0.7344 0.940 0.020 0.040
#> GSM634661 2 0.230 0.8712 0.036 0.944 0.020
#> GSM634662 2 0.726 0.2894 0.400 0.568 0.032
#> GSM634663 1 0.729 0.0784 0.496 0.476 0.028
#> GSM634664 2 0.479 0.8158 0.056 0.848 0.096
#> GSM634665 1 0.626 0.2975 0.616 0.004 0.380
#> GSM634668 1 0.524 0.6757 0.812 0.152 0.036
#> GSM634671 1 0.689 0.4167 0.632 0.028 0.340
#> GSM634672 3 0.484 0.7548 0.224 0.000 0.776
#> GSM634673 3 0.556 0.6713 0.300 0.000 0.700
#> GSM634674 1 0.662 0.5433 0.684 0.284 0.032
#> GSM634675 2 0.295 0.8673 0.060 0.920 0.020
#> GSM634676 1 0.539 0.6881 0.808 0.148 0.044
#> GSM634677 2 0.253 0.8708 0.044 0.936 0.020
#> GSM634678 2 0.816 0.4435 0.320 0.588 0.092
#> GSM634682 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634683 2 0.281 0.8707 0.036 0.928 0.036
#> GSM634684 1 0.503 0.6939 0.828 0.132 0.040
#> GSM634685 2 0.796 0.5788 0.092 0.620 0.288
#> GSM634686 1 0.164 0.7349 0.964 0.016 0.020
#> GSM634687 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634689 2 0.623 0.7674 0.128 0.776 0.096
#> GSM634691 2 0.230 0.8712 0.036 0.944 0.020
#> GSM634692 1 0.371 0.7289 0.892 0.032 0.076
#> GSM634693 1 0.597 0.3842 0.636 0.000 0.364
#> GSM634695 2 0.171 0.8739 0.032 0.960 0.008
#> GSM634696 1 0.893 0.4339 0.568 0.240 0.192
#> GSM634697 3 0.429 0.7699 0.180 0.000 0.820
#> GSM634699 2 0.512 0.8147 0.060 0.832 0.108
#> GSM634700 2 0.346 0.8574 0.076 0.900 0.024
#> GSM634701 1 0.238 0.7370 0.940 0.016 0.044
#> GSM634702 1 0.498 0.6851 0.828 0.136 0.036
#> GSM634703 1 0.714 0.2334 0.540 0.436 0.024
#> GSM634708 2 0.103 0.8737 0.024 0.976 0.000
#> GSM634709 1 0.176 0.7292 0.956 0.004 0.040
#> GSM634710 3 0.889 0.4970 0.192 0.236 0.572
#> GSM634712 3 0.654 0.7634 0.212 0.056 0.732
#> GSM634713 2 0.113 0.8720 0.020 0.976 0.004
#> GSM634714 1 0.615 0.2691 0.592 0.000 0.408
#> GSM634716 1 0.175 0.7260 0.952 0.000 0.048
#> GSM634717 1 0.176 0.7292 0.956 0.004 0.040
#> GSM634718 1 0.622 0.5937 0.712 0.264 0.024
#> GSM634719 1 0.230 0.7374 0.944 0.036 0.020
#> GSM634720 1 0.615 0.3441 0.640 0.004 0.356
#> GSM634721 3 0.976 0.0922 0.384 0.228 0.388
#> GSM634722 2 0.552 0.8027 0.040 0.796 0.164
#> GSM634723 1 0.564 0.6390 0.760 0.220 0.020
#> GSM634724 3 0.623 0.4153 0.436 0.000 0.564
#> GSM634725 1 0.604 0.6785 0.788 0.108 0.104
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.1847 0.7395 0.940 0.004 0.052 0.004
#> GSM634648 1 0.8630 0.3779 0.524 0.152 0.108 0.216
#> GSM634649 1 0.3401 0.6888 0.840 0.000 0.152 0.008
#> GSM634650 1 0.8277 0.3566 0.504 0.288 0.052 0.156
#> GSM634653 1 0.8044 0.4841 0.548 0.116 0.268 0.068
#> GSM634659 1 0.3986 0.7053 0.832 0.132 0.004 0.032
#> GSM634666 3 0.8684 0.2747 0.152 0.092 0.496 0.260
#> GSM634667 2 0.0707 0.8346 0.000 0.980 0.000 0.020
#> GSM634669 1 0.1690 0.7470 0.952 0.032 0.008 0.008
#> GSM634670 3 0.3161 0.7716 0.124 0.000 0.864 0.012
#> GSM634679 3 0.4906 0.7565 0.140 0.000 0.776 0.084
#> GSM634680 3 0.3105 0.7672 0.120 0.000 0.868 0.012
#> GSM634681 1 0.3870 0.6375 0.788 0.000 0.208 0.004
#> GSM634688 4 0.4172 0.7485 0.044 0.092 0.020 0.844
#> GSM634690 2 0.0592 0.8357 0.000 0.984 0.000 0.016
#> GSM634694 1 0.1484 0.7464 0.960 0.020 0.016 0.004
#> GSM634698 1 0.1139 0.7460 0.972 0.008 0.008 0.012
#> GSM634704 2 0.4614 0.6294 0.144 0.792 0.000 0.064
#> GSM634705 1 0.4452 0.5823 0.732 0.000 0.260 0.008
#> GSM634706 1 0.2099 0.7473 0.936 0.044 0.008 0.012
#> GSM634707 1 0.2297 0.7456 0.932 0.024 0.032 0.012
#> GSM634711 1 0.2156 0.7387 0.928 0.004 0.060 0.008
#> GSM634715 1 0.5502 0.6311 0.724 0.212 0.008 0.056
#> GSM634633 1 0.6908 0.4574 0.608 0.084 0.284 0.024
#> GSM634634 4 0.3266 0.6210 0.000 0.024 0.108 0.868
#> GSM634635 1 0.3208 0.6899 0.848 0.000 0.148 0.004
#> GSM634636 1 0.1994 0.7402 0.936 0.004 0.052 0.008
#> GSM634637 1 0.2421 0.7436 0.924 0.020 0.048 0.008
#> GSM634638 2 0.1022 0.8319 0.000 0.968 0.000 0.032
#> GSM634639 1 0.3105 0.7106 0.868 0.000 0.120 0.012
#> GSM634640 2 0.0707 0.8346 0.000 0.980 0.000 0.020
#> GSM634641 1 0.0992 0.7436 0.976 0.004 0.008 0.012
#> GSM634642 4 0.6129 0.7415 0.096 0.184 0.016 0.704
#> GSM634644 2 0.3367 0.7668 0.028 0.864 0.000 0.108
#> GSM634645 1 0.4452 0.5823 0.732 0.000 0.260 0.008
#> GSM634646 1 0.4482 0.5769 0.728 0.000 0.264 0.008
#> GSM634647 3 0.0779 0.6754 0.004 0.000 0.980 0.016
#> GSM634651 2 0.1369 0.8279 0.016 0.964 0.004 0.016
#> GSM634652 4 0.4277 0.7212 0.000 0.280 0.000 0.720
#> GSM634654 1 0.5323 0.4537 0.628 0.000 0.352 0.020
#> GSM634655 1 0.4241 0.7329 0.840 0.088 0.056 0.016
#> GSM634656 3 0.0779 0.6754 0.004 0.000 0.980 0.016
#> GSM634657 1 0.7166 0.4548 0.576 0.312 0.032 0.080
#> GSM634658 1 0.2089 0.7475 0.940 0.028 0.012 0.020
#> GSM634660 1 0.2297 0.7456 0.932 0.024 0.032 0.012
#> GSM634661 2 0.1796 0.8252 0.016 0.948 0.004 0.032
#> GSM634662 2 0.6130 0.2272 0.396 0.560 0.008 0.036
#> GSM634663 1 0.6175 0.1368 0.492 0.464 0.004 0.040
#> GSM634664 4 0.4662 0.7753 0.016 0.204 0.012 0.768
#> GSM634665 1 0.5465 0.3563 0.588 0.000 0.392 0.020
#> GSM634668 1 0.4190 0.6981 0.816 0.148 0.004 0.032
#> GSM634671 1 0.6300 0.4561 0.608 0.000 0.308 0.084
#> GSM634672 3 0.3718 0.7627 0.168 0.000 0.820 0.012
#> GSM634673 3 0.4630 0.6817 0.252 0.000 0.732 0.016
#> GSM634674 1 0.5701 0.5837 0.672 0.276 0.004 0.048
#> GSM634675 2 0.2099 0.8192 0.040 0.936 0.004 0.020
#> GSM634676 1 0.4785 0.7103 0.812 0.108 0.028 0.052
#> GSM634677 2 0.2019 0.8249 0.024 0.940 0.004 0.032
#> GSM634678 2 0.8431 0.0305 0.292 0.464 0.040 0.204
#> GSM634682 2 0.1022 0.8319 0.000 0.968 0.000 0.032
#> GSM634683 2 0.2859 0.7502 0.008 0.880 0.000 0.112
#> GSM634684 1 0.4627 0.7097 0.820 0.104 0.024 0.052
#> GSM634685 4 0.7623 0.6265 0.032 0.240 0.152 0.576
#> GSM634686 1 0.1247 0.7452 0.968 0.012 0.016 0.004
#> GSM634687 2 0.0707 0.8346 0.000 0.980 0.000 0.020
#> GSM634689 4 0.6129 0.7415 0.096 0.184 0.016 0.704
#> GSM634691 2 0.1369 0.8279 0.016 0.964 0.004 0.016
#> GSM634692 1 0.3272 0.7368 0.884 0.004 0.060 0.052
#> GSM634693 1 0.5865 0.4390 0.612 0.000 0.340 0.048
#> GSM634695 2 0.2365 0.8097 0.012 0.920 0.004 0.064
#> GSM634696 1 0.7826 0.4656 0.552 0.072 0.084 0.292
#> GSM634697 3 0.2918 0.7686 0.116 0.000 0.876 0.008
#> GSM634699 4 0.5101 0.7690 0.016 0.196 0.032 0.756
#> GSM634700 2 0.2441 0.7994 0.056 0.920 0.004 0.020
#> GSM634701 1 0.2360 0.7479 0.924 0.020 0.052 0.004
#> GSM634702 1 0.3986 0.7053 0.832 0.132 0.004 0.032
#> GSM634703 1 0.5902 0.2768 0.540 0.428 0.004 0.028
#> GSM634708 2 0.0592 0.8357 0.000 0.984 0.000 0.016
#> GSM634709 1 0.1847 0.7395 0.940 0.004 0.052 0.004
#> GSM634710 3 0.8684 0.2747 0.152 0.092 0.496 0.260
#> GSM634712 3 0.4856 0.7573 0.136 0.000 0.780 0.084
#> GSM634713 2 0.3311 0.7058 0.000 0.828 0.000 0.172
#> GSM634714 1 0.5708 0.2997 0.556 0.000 0.416 0.028
#> GSM634716 1 0.1822 0.7389 0.944 0.004 0.044 0.008
#> GSM634717 1 0.1847 0.7395 0.940 0.004 0.052 0.004
#> GSM634718 1 0.5328 0.6323 0.704 0.248 0.000 0.048
#> GSM634719 1 0.2089 0.7475 0.940 0.028 0.012 0.020
#> GSM634720 1 0.5513 0.3578 0.596 0.004 0.384 0.016
#> GSM634721 1 0.9331 -0.1046 0.364 0.092 0.296 0.248
#> GSM634722 4 0.5110 0.4883 0.000 0.352 0.012 0.636
#> GSM634723 1 0.5136 0.6665 0.752 0.188 0.004 0.056
#> GSM634724 3 0.5492 0.3549 0.416 0.004 0.568 0.012
#> GSM634725 1 0.5364 0.7013 0.788 0.080 0.048 0.084
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1443 0.7354 0.948 0.000 0.044 0.004 0.004
#> GSM634648 1 0.7688 0.3358 0.508 0.084 0.108 0.276 0.024
#> GSM634649 1 0.3044 0.6907 0.840 0.000 0.148 0.004 0.008
#> GSM634650 1 0.8300 0.3366 0.488 0.168 0.032 0.132 0.180
#> GSM634653 1 0.7363 0.4550 0.540 0.040 0.260 0.128 0.032
#> GSM634659 1 0.3757 0.6958 0.816 0.136 0.000 0.040 0.008
#> GSM634666 3 0.7791 0.2159 0.140 0.028 0.484 0.288 0.060
#> GSM634667 2 0.1670 0.8002 0.000 0.936 0.000 0.052 0.012
#> GSM634669 1 0.1560 0.7429 0.948 0.004 0.000 0.028 0.020
#> GSM634670 3 0.2865 0.4165 0.132 0.000 0.856 0.004 0.008
#> GSM634679 3 0.4368 0.4350 0.144 0.000 0.772 0.080 0.004
#> GSM634680 5 0.5988 0.0000 0.120 0.000 0.364 0.000 0.516
#> GSM634681 1 0.3421 0.6412 0.788 0.000 0.204 0.000 0.008
#> GSM634688 4 0.4444 0.6693 0.032 0.024 0.020 0.800 0.124
#> GSM634690 2 0.1282 0.8019 0.000 0.952 0.000 0.044 0.004
#> GSM634694 1 0.1475 0.7423 0.956 0.004 0.012 0.016 0.012
#> GSM634698 1 0.1467 0.7432 0.956 0.016 0.008 0.004 0.016
#> GSM634704 2 0.5774 0.5755 0.136 0.676 0.000 0.160 0.028
#> GSM634705 1 0.4070 0.5848 0.728 0.000 0.256 0.004 0.012
#> GSM634706 1 0.2311 0.7443 0.920 0.044 0.008 0.012 0.016
#> GSM634707 1 0.2660 0.7388 0.908 0.024 0.036 0.012 0.020
#> GSM634711 1 0.2301 0.7362 0.916 0.004 0.048 0.004 0.028
#> GSM634715 1 0.5641 0.6054 0.696 0.196 0.008 0.060 0.040
#> GSM634633 1 0.7056 0.4709 0.604 0.072 0.200 0.024 0.100
#> GSM634634 4 0.5505 0.5365 0.000 0.000 0.092 0.604 0.304
#> GSM634635 1 0.2843 0.6918 0.848 0.000 0.144 0.000 0.008
#> GSM634636 1 0.1569 0.7361 0.944 0.000 0.044 0.008 0.004
#> GSM634637 1 0.2513 0.7396 0.912 0.020 0.044 0.008 0.016
#> GSM634638 2 0.3354 0.7767 0.000 0.844 0.000 0.088 0.068
#> GSM634639 1 0.3141 0.7137 0.860 0.004 0.096 0.000 0.040
#> GSM634640 2 0.2446 0.7926 0.000 0.900 0.000 0.056 0.044
#> GSM634641 1 0.1269 0.7404 0.964 0.012 0.008 0.008 0.008
#> GSM634642 4 0.4314 0.6598 0.080 0.088 0.012 0.808 0.012
#> GSM634644 2 0.4505 0.6856 0.020 0.744 0.000 0.208 0.028
#> GSM634645 1 0.4070 0.5848 0.728 0.000 0.256 0.004 0.012
#> GSM634646 1 0.4096 0.5796 0.724 0.000 0.260 0.004 0.012
#> GSM634647 3 0.1197 0.2354 0.000 0.000 0.952 0.000 0.048
#> GSM634651 2 0.1200 0.7912 0.012 0.964 0.000 0.016 0.008
#> GSM634652 4 0.3841 0.6550 0.000 0.188 0.000 0.780 0.032
#> GSM634654 1 0.4905 0.4640 0.624 0.000 0.344 0.008 0.024
#> GSM634655 1 0.4442 0.7226 0.816 0.076 0.044 0.020 0.044
#> GSM634656 3 0.1197 0.2354 0.000 0.000 0.952 0.000 0.048
#> GSM634657 1 0.7443 0.4349 0.552 0.192 0.008 0.144 0.104
#> GSM634658 1 0.1526 0.7423 0.948 0.004 0.004 0.040 0.004
#> GSM634660 1 0.2660 0.7388 0.908 0.024 0.036 0.012 0.020
#> GSM634661 2 0.1442 0.7895 0.012 0.952 0.000 0.032 0.004
#> GSM634662 2 0.5550 0.1985 0.388 0.552 0.004 0.052 0.004
#> GSM634663 1 0.5429 0.1546 0.488 0.464 0.000 0.040 0.008
#> GSM634664 4 0.3700 0.6985 0.012 0.076 0.012 0.848 0.052
#> GSM634665 1 0.4950 0.3770 0.588 0.000 0.384 0.008 0.020
#> GSM634668 1 0.3928 0.6878 0.800 0.152 0.000 0.040 0.008
#> GSM634671 1 0.6143 0.4547 0.600 0.000 0.284 0.040 0.076
#> GSM634672 3 0.3360 0.4165 0.168 0.000 0.816 0.004 0.012
#> GSM634673 3 0.5557 0.2228 0.252 0.000 0.644 0.008 0.096
#> GSM634674 1 0.5669 0.5603 0.648 0.268 0.008 0.056 0.020
#> GSM634675 2 0.2359 0.7853 0.036 0.904 0.000 0.060 0.000
#> GSM634676 1 0.4236 0.7007 0.808 0.044 0.004 0.116 0.028
#> GSM634677 2 0.1728 0.7884 0.020 0.940 0.000 0.036 0.004
#> GSM634678 2 0.7841 0.0184 0.284 0.388 0.040 0.276 0.012
#> GSM634682 2 0.3354 0.7767 0.000 0.844 0.000 0.088 0.068
#> GSM634683 2 0.2953 0.7403 0.004 0.868 0.000 0.028 0.100
#> GSM634684 1 0.4270 0.7000 0.804 0.024 0.004 0.120 0.048
#> GSM634685 4 0.7925 0.4930 0.012 0.124 0.104 0.432 0.328
#> GSM634686 1 0.1209 0.7414 0.964 0.000 0.012 0.012 0.012
#> GSM634687 2 0.2446 0.7926 0.000 0.900 0.000 0.056 0.044
#> GSM634689 4 0.4314 0.6598 0.080 0.088 0.012 0.808 0.012
#> GSM634691 2 0.0912 0.7905 0.012 0.972 0.000 0.016 0.000
#> GSM634692 1 0.2937 0.7350 0.888 0.000 0.032 0.036 0.044
#> GSM634693 1 0.5571 0.4414 0.604 0.000 0.316 0.008 0.072
#> GSM634695 2 0.3900 0.7594 0.008 0.816 0.000 0.108 0.068
#> GSM634696 1 0.7577 0.4302 0.548 0.024 0.080 0.216 0.132
#> GSM634697 3 0.3828 0.3066 0.120 0.000 0.808 0.000 0.072
#> GSM634699 4 0.2929 0.6723 0.004 0.044 0.000 0.876 0.076
#> GSM634700 2 0.1943 0.7673 0.056 0.924 0.000 0.020 0.000
#> GSM634701 1 0.2148 0.7433 0.924 0.016 0.048 0.008 0.004
#> GSM634702 1 0.3757 0.6958 0.816 0.136 0.000 0.040 0.008
#> GSM634703 1 0.5284 0.2886 0.532 0.424 0.000 0.040 0.004
#> GSM634708 2 0.1282 0.8019 0.000 0.952 0.000 0.044 0.004
#> GSM634709 1 0.1443 0.7354 0.948 0.000 0.044 0.004 0.004
#> GSM634710 3 0.7791 0.2159 0.140 0.028 0.484 0.288 0.060
#> GSM634712 3 0.4326 0.4352 0.140 0.000 0.776 0.080 0.004
#> GSM634713 2 0.4815 0.6290 0.000 0.692 0.000 0.244 0.064
#> GSM634714 1 0.6202 0.3453 0.556 0.000 0.280 0.004 0.160
#> GSM634716 1 0.2045 0.7355 0.928 0.004 0.044 0.004 0.020
#> GSM634717 1 0.1443 0.7354 0.948 0.000 0.044 0.004 0.004
#> GSM634718 1 0.5383 0.6199 0.692 0.180 0.000 0.116 0.012
#> GSM634719 1 0.1526 0.7423 0.948 0.004 0.004 0.040 0.004
#> GSM634720 1 0.6174 0.4016 0.588 0.004 0.280 0.012 0.116
#> GSM634721 1 0.8415 -0.1698 0.356 0.016 0.280 0.260 0.088
#> GSM634722 4 0.6994 0.4231 0.000 0.288 0.008 0.400 0.304
#> GSM634723 1 0.4979 0.6545 0.740 0.088 0.000 0.152 0.020
#> GSM634724 3 0.4870 0.1521 0.412 0.004 0.568 0.004 0.012
#> GSM634725 1 0.5111 0.6934 0.776 0.092 0.044 0.060 0.028
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1554 0.72451 0.940 0.000 0.044 0.004 0.008 0.004
#> GSM634648 1 0.7589 0.32662 0.484 0.056 0.092 0.276 0.024 0.068
#> GSM634649 1 0.3082 0.67625 0.828 0.000 0.144 0.000 0.020 0.008
#> GSM634650 1 0.7148 0.28214 0.460 0.100 0.012 0.076 0.020 0.332
#> GSM634653 1 0.7490 0.43691 0.512 0.028 0.244 0.108 0.060 0.048
#> GSM634659 1 0.4464 0.67802 0.788 0.088 0.004 0.064 0.028 0.028
#> GSM634666 3 0.7336 0.28420 0.120 0.000 0.468 0.272 0.032 0.108
#> GSM634667 2 0.1230 0.74390 0.000 0.956 0.000 0.008 0.028 0.008
#> GSM634669 1 0.1690 0.73090 0.940 0.004 0.000 0.020 0.016 0.020
#> GSM634670 3 0.2257 0.51954 0.116 0.000 0.876 0.000 0.008 0.000
#> GSM634679 3 0.4149 0.53137 0.128 0.000 0.784 0.056 0.008 0.024
#> GSM634680 5 0.4749 0.00000 0.108 0.000 0.188 0.004 0.696 0.004
#> GSM634681 1 0.3630 0.62642 0.772 0.000 0.196 0.000 0.020 0.012
#> GSM634688 4 0.3780 0.51043 0.024 0.000 0.004 0.780 0.016 0.176
#> GSM634690 2 0.0806 0.74671 0.000 0.972 0.000 0.008 0.020 0.000
#> GSM634694 1 0.1583 0.73097 0.948 0.004 0.012 0.008 0.016 0.012
#> GSM634698 1 0.1683 0.73253 0.944 0.008 0.008 0.012 0.020 0.008
#> GSM634704 2 0.6381 0.51120 0.124 0.620 0.000 0.128 0.024 0.104
#> GSM634705 1 0.4277 0.55858 0.700 0.000 0.260 0.004 0.020 0.016
#> GSM634706 1 0.2562 0.73158 0.904 0.036 0.008 0.020 0.020 0.012
#> GSM634707 1 0.2935 0.72374 0.884 0.016 0.048 0.016 0.008 0.028
#> GSM634711 1 0.2848 0.72150 0.876 0.004 0.068 0.004 0.008 0.040
#> GSM634715 1 0.6048 0.59482 0.676 0.128 0.012 0.048 0.044 0.092
#> GSM634633 1 0.6945 0.45343 0.580 0.048 0.156 0.024 0.160 0.032
#> GSM634634 6 0.5080 0.35008 0.000 0.000 0.020 0.308 0.060 0.612
#> GSM634635 1 0.2957 0.67741 0.836 0.000 0.140 0.000 0.016 0.008
#> GSM634636 1 0.1667 0.72527 0.936 0.000 0.044 0.008 0.008 0.004
#> GSM634637 1 0.2859 0.72398 0.880 0.012 0.064 0.008 0.004 0.032
#> GSM634638 2 0.3934 0.68324 0.000 0.788 0.000 0.028 0.048 0.136
#> GSM634639 1 0.3411 0.69645 0.832 0.000 0.084 0.004 0.072 0.008
#> GSM634640 2 0.2853 0.71811 0.000 0.868 0.000 0.012 0.048 0.072
#> GSM634641 1 0.1766 0.73130 0.940 0.004 0.012 0.020 0.016 0.008
#> GSM634642 4 0.4113 0.62699 0.064 0.060 0.000 0.808 0.016 0.052
#> GSM634644 2 0.5426 0.59422 0.012 0.668 0.000 0.176 0.024 0.120
#> GSM634645 1 0.4277 0.55858 0.700 0.000 0.260 0.004 0.020 0.016
#> GSM634646 1 0.4299 0.55303 0.696 0.000 0.264 0.004 0.020 0.016
#> GSM634647 3 0.2536 0.34631 0.000 0.000 0.864 0.000 0.116 0.020
#> GSM634651 2 0.2407 0.74171 0.012 0.904 0.000 0.036 0.040 0.008
#> GSM634652 4 0.4378 0.47149 0.000 0.208 0.000 0.724 0.048 0.020
#> GSM634654 1 0.5228 0.44791 0.596 0.000 0.328 0.008 0.048 0.020
#> GSM634655 1 0.4395 0.70928 0.804 0.072 0.044 0.020 0.040 0.020
#> GSM634656 3 0.2536 0.34631 0.000 0.000 0.864 0.000 0.116 0.020
#> GSM634657 1 0.7149 0.40260 0.520 0.116 0.000 0.116 0.032 0.216
#> GSM634658 1 0.1828 0.72995 0.936 0.004 0.008 0.028 0.016 0.008
#> GSM634660 1 0.2935 0.72374 0.884 0.016 0.048 0.016 0.008 0.028
#> GSM634661 2 0.2351 0.74062 0.012 0.900 0.000 0.036 0.052 0.000
#> GSM634662 2 0.6064 0.18975 0.368 0.508 0.004 0.084 0.020 0.016
#> GSM634663 1 0.6173 0.15500 0.464 0.412 0.000 0.060 0.044 0.020
#> GSM634664 4 0.4008 0.60589 0.008 0.084 0.000 0.804 0.028 0.076
#> GSM634665 1 0.5168 0.35923 0.560 0.000 0.376 0.008 0.040 0.016
#> GSM634668 1 0.4651 0.66969 0.772 0.104 0.004 0.064 0.028 0.028
#> GSM634671 1 0.6459 0.43207 0.576 0.000 0.244 0.032 0.072 0.076
#> GSM634672 3 0.2971 0.51386 0.144 0.000 0.832 0.000 0.020 0.004
#> GSM634673 3 0.5567 0.26568 0.228 0.000 0.600 0.008 0.160 0.004
#> GSM634674 1 0.6042 0.54000 0.624 0.236 0.008 0.056 0.044 0.032
#> GSM634675 2 0.2778 0.72708 0.032 0.872 0.000 0.080 0.016 0.000
#> GSM634676 1 0.4844 0.68632 0.764 0.036 0.004 0.096 0.036 0.064
#> GSM634677 2 0.2658 0.73921 0.016 0.888 0.000 0.040 0.052 0.004
#> GSM634678 2 0.7900 -0.00833 0.260 0.356 0.028 0.276 0.016 0.064
#> GSM634682 2 0.3934 0.68324 0.000 0.788 0.000 0.028 0.048 0.136
#> GSM634683 2 0.3438 0.70195 0.004 0.836 0.000 0.016 0.064 0.080
#> GSM634684 1 0.4266 0.68842 0.792 0.016 0.000 0.088 0.032 0.072
#> GSM634685 6 0.2907 0.51826 0.004 0.000 0.024 0.084 0.020 0.868
#> GSM634686 1 0.1337 0.73024 0.956 0.000 0.012 0.008 0.016 0.008
#> GSM634687 2 0.2853 0.71811 0.000 0.868 0.000 0.012 0.048 0.072
#> GSM634689 4 0.4113 0.62699 0.064 0.060 0.000 0.808 0.016 0.052
#> GSM634691 2 0.2152 0.74045 0.012 0.912 0.000 0.036 0.040 0.000
#> GSM634692 1 0.3024 0.72274 0.876 0.000 0.028 0.032 0.044 0.020
#> GSM634693 1 0.5981 0.41681 0.576 0.000 0.264 0.000 0.092 0.068
#> GSM634695 2 0.4625 0.62981 0.004 0.724 0.004 0.028 0.040 0.200
#> GSM634696 1 0.6849 0.39970 0.516 0.000 0.048 0.196 0.024 0.216
#> GSM634697 3 0.3932 0.42973 0.112 0.000 0.776 0.004 0.108 0.000
#> GSM634699 4 0.3145 0.59705 0.000 0.028 0.000 0.856 0.060 0.056
#> GSM634700 2 0.3114 0.71613 0.048 0.864 0.000 0.052 0.032 0.004
#> GSM634701 1 0.2258 0.73174 0.912 0.008 0.052 0.012 0.012 0.004
#> GSM634702 1 0.4464 0.67802 0.788 0.088 0.004 0.064 0.028 0.028
#> GSM634703 1 0.6104 0.29011 0.508 0.364 0.000 0.076 0.036 0.016
#> GSM634708 2 0.0806 0.74671 0.000 0.972 0.000 0.008 0.020 0.000
#> GSM634709 1 0.1554 0.72451 0.940 0.000 0.044 0.004 0.008 0.004
#> GSM634710 3 0.7336 0.28420 0.120 0.000 0.468 0.272 0.032 0.108
#> GSM634712 3 0.4109 0.53134 0.124 0.000 0.788 0.056 0.008 0.024
#> GSM634713 2 0.5626 0.53924 0.000 0.636 0.000 0.184 0.044 0.136
#> GSM634714 1 0.5890 0.31713 0.528 0.000 0.180 0.000 0.280 0.012
#> GSM634716 1 0.2400 0.72155 0.900 0.004 0.060 0.004 0.004 0.028
#> GSM634717 1 0.1554 0.72451 0.940 0.000 0.044 0.004 0.008 0.004
#> GSM634718 1 0.5534 0.60772 0.676 0.160 0.000 0.112 0.032 0.020
#> GSM634719 1 0.1828 0.72995 0.936 0.004 0.008 0.028 0.016 0.008
#> GSM634720 1 0.5977 0.39300 0.560 0.000 0.224 0.012 0.196 0.008
#> GSM634721 1 0.7906 -0.17649 0.324 0.000 0.240 0.232 0.012 0.192
#> GSM634722 6 0.5587 0.45841 0.000 0.180 0.000 0.116 0.056 0.648
#> GSM634723 1 0.5159 0.64296 0.724 0.072 0.000 0.136 0.032 0.036
#> GSM634724 3 0.4552 0.22285 0.384 0.004 0.588 0.004 0.008 0.012
#> GSM634725 1 0.5449 0.66947 0.740 0.052 0.028 0.048 0.048 0.084
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 individual(p) k
#> CV:hclust 86 0.171 2
#> CV:hclust 73 0.246 3
#> CV:hclust 72 0.459 4
#> CV:hclust 62 0.347 5
#> CV:hclust 65 0.552 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 17698 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.929 0.940 0.958 0.4924 0.508 0.508
#> 3 3 0.505 0.740 0.837 0.3189 0.694 0.469
#> 4 4 0.506 0.514 0.719 0.1153 0.869 0.648
#> 5 5 0.586 0.588 0.722 0.0752 0.849 0.527
#> 6 6 0.625 0.576 0.722 0.0482 0.917 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
#> GSM634643 1 0.3274 0.950 0.940 0.060
#> GSM634648 1 0.0938 0.948 0.988 0.012
#> GSM634649 1 0.3274 0.950 0.940 0.060
#> GSM634650 2 0.0000 0.973 0.000 1.000
#> GSM634653 1 0.0376 0.947 0.996 0.004
#> GSM634659 1 0.8861 0.660 0.696 0.304
#> GSM634666 1 0.6712 0.792 0.824 0.176
#> GSM634667 2 0.0000 0.973 0.000 1.000
#> GSM634669 1 0.3274 0.950 0.940 0.060
#> GSM634670 1 0.0000 0.946 1.000 0.000
#> GSM634679 1 0.0000 0.946 1.000 0.000
#> GSM634680 1 0.0000 0.946 1.000 0.000
#> GSM634681 1 0.1633 0.950 0.976 0.024
#> GSM634688 2 0.3879 0.939 0.076 0.924
#> GSM634690 2 0.0000 0.973 0.000 1.000
#> GSM634694 1 0.3733 0.943 0.928 0.072
#> GSM634698 1 0.3274 0.950 0.940 0.060
#> GSM634704 2 0.3584 0.925 0.068 0.932
#> GSM634705 1 0.0672 0.948 0.992 0.008
#> GSM634706 2 0.3733 0.922 0.072 0.928
#> GSM634707 1 0.3114 0.949 0.944 0.056
#> GSM634711 1 0.3114 0.949 0.944 0.056
#> GSM634715 2 0.0376 0.972 0.004 0.996
#> GSM634633 1 0.3114 0.949 0.944 0.056
#> GSM634634 2 0.4022 0.938 0.080 0.920
#> GSM634635 1 0.3274 0.950 0.940 0.060
#> GSM634636 1 0.3274 0.950 0.940 0.060
#> GSM634637 1 0.3114 0.949 0.944 0.056
#> GSM634638 2 0.0376 0.972 0.004 0.996
#> GSM634639 1 0.3274 0.950 0.940 0.060
#> GSM634640 2 0.0000 0.973 0.000 1.000
#> GSM634641 1 0.3274 0.950 0.940 0.060
#> GSM634642 2 0.3114 0.945 0.056 0.944
#> GSM634644 2 0.0000 0.973 0.000 1.000
#> GSM634645 1 0.1633 0.950 0.976 0.024
#> GSM634646 1 0.0376 0.947 0.996 0.004
#> GSM634647 1 0.0000 0.946 1.000 0.000
#> GSM634651 2 0.0000 0.973 0.000 1.000
#> GSM634652 2 0.3114 0.945 0.056 0.944
#> GSM634654 1 0.0376 0.947 0.996 0.004
#> GSM634655 1 0.3114 0.949 0.944 0.056
#> GSM634656 1 0.0000 0.946 1.000 0.000
#> GSM634657 2 0.0000 0.973 0.000 1.000
#> GSM634658 1 0.3274 0.950 0.940 0.060
#> GSM634660 1 0.3114 0.949 0.944 0.056
#> GSM634661 2 0.0000 0.973 0.000 1.000
#> GSM634662 2 0.0938 0.967 0.012 0.988
#> GSM634663 2 0.0000 0.973 0.000 1.000
#> GSM634664 2 0.3879 0.939 0.076 0.924
#> GSM634665 1 0.0376 0.947 0.996 0.004
#> GSM634668 2 0.3431 0.930 0.064 0.936
#> GSM634671 1 0.0376 0.947 0.996 0.004
#> GSM634672 1 0.0000 0.946 1.000 0.000
#> GSM634673 1 0.0000 0.946 1.000 0.000
#> GSM634674 2 0.0376 0.972 0.004 0.996
#> GSM634675 2 0.0000 0.973 0.000 1.000
#> GSM634676 1 0.7453 0.805 0.788 0.212
#> GSM634677 2 0.0000 0.973 0.000 1.000
#> GSM634678 2 0.3274 0.933 0.060 0.940
#> GSM634682 2 0.0376 0.972 0.004 0.996
#> GSM634683 2 0.0000 0.973 0.000 1.000
#> GSM634684 1 0.3274 0.950 0.940 0.060
#> GSM634685 2 0.4298 0.934 0.088 0.912
#> GSM634686 1 0.3274 0.950 0.940 0.060
#> GSM634687 2 0.0000 0.973 0.000 1.000
#> GSM634689 2 0.5294 0.909 0.120 0.880
#> GSM634691 2 0.0000 0.973 0.000 1.000
#> GSM634692 1 0.3274 0.950 0.940 0.060
#> GSM634693 1 0.0000 0.946 1.000 0.000
#> GSM634695 2 0.0376 0.972 0.004 0.996
#> GSM634696 1 0.6438 0.808 0.836 0.164
#> GSM634697 1 0.0000 0.946 1.000 0.000
#> GSM634699 2 0.4431 0.931 0.092 0.908
#> GSM634700 2 0.0000 0.973 0.000 1.000
#> GSM634701 1 0.3274 0.950 0.940 0.060
#> GSM634702 1 0.8661 0.683 0.712 0.288
#> GSM634703 2 0.0000 0.973 0.000 1.000
#> GSM634708 2 0.0000 0.973 0.000 1.000
#> GSM634709 1 0.3274 0.950 0.940 0.060
#> GSM634710 1 0.0000 0.946 1.000 0.000
#> GSM634712 1 0.0000 0.946 1.000 0.000
#> GSM634713 2 0.3274 0.943 0.060 0.940
#> GSM634714 1 0.0000 0.946 1.000 0.000
#> GSM634716 1 0.3114 0.949 0.944 0.056
#> GSM634717 1 0.3274 0.950 0.940 0.060
#> GSM634718 2 0.0000 0.973 0.000 1.000
#> GSM634719 1 0.3274 0.950 0.940 0.060
#> GSM634720 1 0.0000 0.946 1.000 0.000
#> GSM634721 1 0.0376 0.947 0.996 0.004
#> GSM634722 2 0.3114 0.945 0.056 0.944
#> GSM634723 2 0.0000 0.973 0.000 1.000
#> GSM634724 1 0.0000 0.946 1.000 0.000
#> GSM634725 1 0.7056 0.825 0.808 0.192
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634648 1 0.2165 0.8311 0.936 0.000 0.064
#> GSM634649 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634650 2 0.8521 0.0284 0.440 0.468 0.092
#> GSM634653 3 0.5529 0.7298 0.296 0.000 0.704
#> GSM634659 1 0.6291 0.7454 0.768 0.152 0.080
#> GSM634666 3 0.3649 0.7491 0.068 0.036 0.896
#> GSM634667 2 0.1964 0.8522 0.000 0.944 0.056
#> GSM634669 1 0.1832 0.8467 0.956 0.036 0.008
#> GSM634670 3 0.4702 0.7842 0.212 0.000 0.788
#> GSM634679 3 0.3752 0.8003 0.144 0.000 0.856
#> GSM634680 3 0.4399 0.7944 0.188 0.000 0.812
#> GSM634681 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634688 3 0.5202 0.5456 0.008 0.220 0.772
#> GSM634690 2 0.1860 0.8527 0.000 0.948 0.052
#> GSM634694 1 0.2173 0.8418 0.944 0.048 0.008
#> GSM634698 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634704 2 0.4663 0.7666 0.156 0.828 0.016
#> GSM634705 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634706 1 0.5899 0.6448 0.736 0.244 0.020
#> GSM634707 1 0.4370 0.8249 0.868 0.056 0.076
#> GSM634711 1 0.3482 0.7986 0.872 0.000 0.128
#> GSM634715 2 0.7013 0.3548 0.364 0.608 0.028
#> GSM634633 1 0.2066 0.8416 0.940 0.000 0.060
#> GSM634634 3 0.1529 0.7373 0.000 0.040 0.960
#> GSM634635 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634636 1 0.0892 0.8553 0.980 0.000 0.020
#> GSM634637 1 0.3349 0.8171 0.888 0.004 0.108
#> GSM634638 2 0.2165 0.8508 0.000 0.936 0.064
#> GSM634639 1 0.1163 0.8532 0.972 0.000 0.028
#> GSM634640 2 0.2066 0.8519 0.000 0.940 0.060
#> GSM634641 1 0.2773 0.8462 0.928 0.024 0.048
#> GSM634642 2 0.6416 0.6521 0.032 0.708 0.260
#> GSM634644 2 0.2165 0.8508 0.000 0.936 0.064
#> GSM634645 1 0.1163 0.8532 0.972 0.000 0.028
#> GSM634646 1 0.6305 -0.4255 0.516 0.000 0.484
#> GSM634647 3 0.2711 0.7951 0.088 0.000 0.912
#> GSM634651 2 0.1015 0.8518 0.012 0.980 0.008
#> GSM634652 2 0.3482 0.8121 0.000 0.872 0.128
#> GSM634654 3 0.5291 0.7575 0.268 0.000 0.732
#> GSM634655 1 0.4575 0.7282 0.812 0.004 0.184
#> GSM634656 3 0.2878 0.7971 0.096 0.000 0.904
#> GSM634657 2 0.6303 0.6246 0.248 0.720 0.032
#> GSM634658 1 0.2903 0.8358 0.924 0.028 0.048
#> GSM634660 1 0.4379 0.8238 0.868 0.060 0.072
#> GSM634661 2 0.0661 0.8528 0.008 0.988 0.004
#> GSM634662 2 0.7213 0.2128 0.420 0.552 0.028
#> GSM634663 2 0.1182 0.8513 0.012 0.976 0.012
#> GSM634664 3 0.5061 0.5595 0.008 0.208 0.784
#> GSM634665 3 0.6225 0.5208 0.432 0.000 0.568
#> GSM634668 1 0.7847 0.4272 0.588 0.344 0.068
#> GSM634671 1 0.4399 0.6977 0.812 0.000 0.188
#> GSM634672 3 0.4796 0.7821 0.220 0.000 0.780
#> GSM634673 3 0.4750 0.7828 0.216 0.000 0.784
#> GSM634674 2 0.1636 0.8495 0.016 0.964 0.020
#> GSM634675 2 0.3528 0.8135 0.092 0.892 0.016
#> GSM634676 1 0.3967 0.8168 0.884 0.044 0.072
#> GSM634677 2 0.1751 0.8479 0.028 0.960 0.012
#> GSM634678 2 0.5708 0.7090 0.204 0.768 0.028
#> GSM634682 2 0.2165 0.8508 0.000 0.936 0.064
#> GSM634683 2 0.0829 0.8538 0.004 0.984 0.012
#> GSM634684 1 0.2066 0.8400 0.940 0.000 0.060
#> GSM634685 3 0.1411 0.7371 0.000 0.036 0.964
#> GSM634686 1 0.1015 0.8570 0.980 0.012 0.008
#> GSM634687 2 0.2066 0.8519 0.000 0.940 0.060
#> GSM634689 3 0.7024 0.5641 0.072 0.224 0.704
#> GSM634691 2 0.1751 0.8479 0.028 0.960 0.012
#> GSM634692 1 0.2066 0.8389 0.940 0.000 0.060
#> GSM634693 3 0.6026 0.5913 0.376 0.000 0.624
#> GSM634695 2 0.2066 0.8519 0.000 0.940 0.060
#> GSM634696 3 0.7517 0.3445 0.420 0.040 0.540
#> GSM634697 3 0.3686 0.8002 0.140 0.000 0.860
#> GSM634699 3 0.6100 0.6583 0.096 0.120 0.784
#> GSM634700 2 0.2152 0.8435 0.036 0.948 0.016
#> GSM634701 1 0.0000 0.8570 1.000 0.000 0.000
#> GSM634702 1 0.6313 0.7471 0.768 0.148 0.084
#> GSM634703 1 0.6677 0.5206 0.652 0.324 0.024
#> GSM634708 2 0.1289 0.8542 0.000 0.968 0.032
#> GSM634709 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634710 3 0.4121 0.7994 0.168 0.000 0.832
#> GSM634712 3 0.3686 0.8004 0.140 0.000 0.860
#> GSM634713 2 0.3482 0.8131 0.000 0.872 0.128
#> GSM634714 3 0.6111 0.5834 0.396 0.000 0.604
#> GSM634716 1 0.3482 0.7953 0.872 0.000 0.128
#> GSM634717 1 0.0848 0.8552 0.984 0.008 0.008
#> GSM634718 1 0.5597 0.6900 0.764 0.216 0.020
#> GSM634719 1 0.0747 0.8556 0.984 0.000 0.016
#> GSM634720 3 0.4796 0.7821 0.220 0.000 0.780
#> GSM634721 3 0.4235 0.7919 0.176 0.000 0.824
#> GSM634722 2 0.4654 0.7458 0.000 0.792 0.208
#> GSM634723 1 0.6984 0.6623 0.720 0.192 0.088
#> GSM634724 3 0.6244 0.4531 0.440 0.000 0.560
#> GSM634725 1 0.5004 0.8039 0.840 0.072 0.088
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0188 0.7599 0.996 0.000 0.004 0.000
#> GSM634648 1 0.2036 0.7528 0.936 0.000 0.032 0.032
#> GSM634649 1 0.1118 0.7549 0.964 0.000 0.036 0.000
#> GSM634650 4 0.8490 0.3034 0.276 0.212 0.044 0.468
#> GSM634653 3 0.5821 0.4937 0.368 0.000 0.592 0.040
#> GSM634659 4 0.6681 -0.0605 0.432 0.024 0.040 0.504
#> GSM634666 4 0.6215 -0.1822 0.036 0.008 0.444 0.512
#> GSM634667 2 0.0188 0.7338 0.000 0.996 0.000 0.004
#> GSM634669 1 0.2466 0.7320 0.900 0.000 0.004 0.096
#> GSM634670 3 0.2266 0.7589 0.084 0.000 0.912 0.004
#> GSM634679 3 0.3820 0.7316 0.064 0.000 0.848 0.088
#> GSM634680 3 0.2805 0.7580 0.100 0.000 0.888 0.012
#> GSM634681 1 0.1118 0.7549 0.964 0.000 0.036 0.000
#> GSM634688 4 0.6553 0.0956 0.000 0.100 0.316 0.584
#> GSM634690 2 0.0817 0.7346 0.000 0.976 0.000 0.024
#> GSM634694 1 0.2888 0.7027 0.872 0.004 0.000 0.124
#> GSM634698 1 0.0921 0.7561 0.972 0.000 0.028 0.000
#> GSM634704 2 0.7089 0.4174 0.176 0.584 0.004 0.236
#> GSM634705 1 0.1022 0.7554 0.968 0.000 0.032 0.000
#> GSM634706 1 0.5947 0.2385 0.572 0.044 0.000 0.384
#> GSM634707 1 0.5988 0.4987 0.632 0.008 0.044 0.316
#> GSM634711 1 0.5962 0.5824 0.692 0.000 0.128 0.180
#> GSM634715 4 0.7973 0.2113 0.260 0.336 0.004 0.400
#> GSM634633 1 0.4789 0.6672 0.772 0.000 0.056 0.172
#> GSM634634 3 0.5643 0.2493 0.000 0.024 0.548 0.428
#> GSM634635 1 0.1118 0.7549 0.964 0.000 0.036 0.000
#> GSM634636 1 0.0779 0.7607 0.980 0.000 0.004 0.016
#> GSM634637 1 0.5631 0.5853 0.700 0.000 0.076 0.224
#> GSM634638 2 0.1284 0.7273 0.000 0.964 0.012 0.024
#> GSM634639 1 0.1888 0.7530 0.940 0.000 0.044 0.016
#> GSM634640 2 0.0000 0.7333 0.000 1.000 0.000 0.000
#> GSM634641 1 0.4290 0.6511 0.772 0.000 0.016 0.212
#> GSM634642 4 0.7505 0.1867 0.024 0.176 0.216 0.584
#> GSM634644 2 0.0779 0.7311 0.000 0.980 0.004 0.016
#> GSM634645 1 0.1452 0.7556 0.956 0.000 0.036 0.008
#> GSM634646 1 0.4941 -0.1373 0.564 0.000 0.436 0.000
#> GSM634647 3 0.2473 0.6989 0.012 0.000 0.908 0.080
#> GSM634651 2 0.3444 0.6884 0.000 0.816 0.000 0.184
#> GSM634652 2 0.5204 0.3506 0.000 0.612 0.012 0.376
#> GSM634654 3 0.4212 0.6938 0.216 0.000 0.772 0.012
#> GSM634655 1 0.7598 0.3027 0.476 0.000 0.284 0.240
#> GSM634656 3 0.2300 0.7254 0.028 0.000 0.924 0.048
#> GSM634657 2 0.6299 0.2370 0.040 0.496 0.008 0.456
#> GSM634658 1 0.3778 0.7192 0.848 0.000 0.052 0.100
#> GSM634660 1 0.6125 0.5121 0.636 0.008 0.056 0.300
#> GSM634661 2 0.2973 0.7075 0.000 0.856 0.000 0.144
#> GSM634662 4 0.6708 -0.0652 0.080 0.392 0.004 0.524
#> GSM634663 2 0.4905 0.5001 0.004 0.632 0.000 0.364
#> GSM634664 4 0.6792 0.0502 0.000 0.112 0.340 0.548
#> GSM634665 1 0.5488 -0.0930 0.532 0.000 0.452 0.016
#> GSM634668 4 0.7126 0.1110 0.376 0.068 0.028 0.528
#> GSM634671 1 0.4181 0.6931 0.820 0.000 0.128 0.052
#> GSM634672 3 0.3485 0.7560 0.116 0.000 0.856 0.028
#> GSM634673 3 0.3143 0.7587 0.100 0.000 0.876 0.024
#> GSM634674 4 0.5946 -0.2709 0.028 0.472 0.004 0.496
#> GSM634675 2 0.6179 0.5050 0.072 0.608 0.000 0.320
#> GSM634676 1 0.4974 0.6332 0.736 0.000 0.040 0.224
#> GSM634677 2 0.4964 0.6216 0.028 0.716 0.000 0.256
#> GSM634678 4 0.7303 -0.0402 0.136 0.376 0.004 0.484
#> GSM634682 2 0.1284 0.7273 0.000 0.964 0.012 0.024
#> GSM634683 2 0.2530 0.7183 0.000 0.888 0.000 0.112
#> GSM634684 1 0.2494 0.7391 0.916 0.000 0.048 0.036
#> GSM634685 3 0.5321 0.4682 0.000 0.032 0.672 0.296
#> GSM634686 1 0.0336 0.7597 0.992 0.000 0.000 0.008
#> GSM634687 2 0.0336 0.7327 0.000 0.992 0.000 0.008
#> GSM634689 4 0.6428 0.1364 0.032 0.048 0.272 0.648
#> GSM634691 2 0.4964 0.6216 0.028 0.716 0.000 0.256
#> GSM634692 1 0.1913 0.7465 0.940 0.000 0.040 0.020
#> GSM634693 3 0.5728 0.4514 0.364 0.000 0.600 0.036
#> GSM634695 2 0.1388 0.7253 0.000 0.960 0.012 0.028
#> GSM634696 1 0.7847 0.0832 0.436 0.008 0.196 0.360
#> GSM634697 3 0.2722 0.7523 0.064 0.000 0.904 0.032
#> GSM634699 4 0.8340 -0.1161 0.120 0.064 0.360 0.456
#> GSM634700 2 0.5069 0.5618 0.016 0.664 0.000 0.320
#> GSM634701 1 0.2737 0.7347 0.888 0.000 0.008 0.104
#> GSM634702 4 0.6681 -0.0605 0.432 0.024 0.040 0.504
#> GSM634703 4 0.7093 0.1336 0.396 0.128 0.000 0.476
#> GSM634708 2 0.1022 0.7342 0.000 0.968 0.000 0.032
#> GSM634709 1 0.0188 0.7599 0.996 0.000 0.004 0.000
#> GSM634710 3 0.5113 0.6882 0.088 0.000 0.760 0.152
#> GSM634712 3 0.3745 0.7326 0.060 0.000 0.852 0.088
#> GSM634713 2 0.5204 0.3565 0.000 0.612 0.012 0.376
#> GSM634714 3 0.5217 0.4707 0.380 0.000 0.608 0.012
#> GSM634716 1 0.6240 0.5591 0.668 0.000 0.156 0.176
#> GSM634717 1 0.1022 0.7557 0.968 0.000 0.000 0.032
#> GSM634718 1 0.5141 0.4897 0.700 0.032 0.000 0.268
#> GSM634719 1 0.0524 0.7607 0.988 0.000 0.004 0.008
#> GSM634720 3 0.3325 0.7583 0.112 0.000 0.864 0.024
#> GSM634721 3 0.6423 0.5411 0.156 0.000 0.648 0.196
#> GSM634722 2 0.5950 0.2575 0.000 0.544 0.040 0.416
#> GSM634723 1 0.5529 0.6192 0.760 0.056 0.032 0.152
#> GSM634724 3 0.6435 0.5512 0.224 0.000 0.640 0.136
#> GSM634725 1 0.6059 0.3467 0.560 0.008 0.032 0.400
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0807 0.7422 0.976 0.000 0.012 0.000 0.012
#> GSM634648 1 0.2665 0.7352 0.900 0.000 0.048 0.032 0.020
#> GSM634649 1 0.1365 0.7455 0.952 0.000 0.040 0.004 0.004
#> GSM634650 5 0.6134 0.5730 0.120 0.044 0.000 0.188 0.648
#> GSM634653 1 0.6794 0.2453 0.540 0.004 0.312 0.088 0.056
#> GSM634659 5 0.4017 0.6755 0.196 0.008 0.008 0.012 0.776
#> GSM634666 4 0.3872 0.6754 0.012 0.004 0.100 0.828 0.056
#> GSM634667 2 0.0771 0.7440 0.000 0.976 0.000 0.020 0.004
#> GSM634669 1 0.3304 0.6038 0.816 0.000 0.000 0.016 0.168
#> GSM634670 3 0.1074 0.7848 0.016 0.000 0.968 0.012 0.004
#> GSM634679 3 0.3781 0.7600 0.032 0.000 0.840 0.064 0.064
#> GSM634680 3 0.3090 0.7774 0.056 0.000 0.876 0.016 0.052
#> GSM634681 1 0.1644 0.7431 0.940 0.000 0.048 0.008 0.004
#> GSM634688 4 0.3436 0.6966 0.004 0.024 0.052 0.864 0.056
#> GSM634690 2 0.1549 0.7560 0.000 0.944 0.000 0.016 0.040
#> GSM634694 1 0.2727 0.6818 0.868 0.000 0.000 0.016 0.116
#> GSM634698 1 0.1331 0.7453 0.952 0.000 0.040 0.008 0.000
#> GSM634704 2 0.7311 0.5378 0.180 0.536 0.004 0.068 0.212
#> GSM634705 1 0.1408 0.7448 0.948 0.000 0.044 0.008 0.000
#> GSM634706 5 0.5770 0.4043 0.356 0.020 0.000 0.056 0.568
#> GSM634707 5 0.5650 0.5273 0.356 0.004 0.044 0.016 0.580
#> GSM634711 5 0.6558 0.4207 0.380 0.000 0.132 0.016 0.472
#> GSM634715 5 0.5287 0.5484 0.088 0.220 0.004 0.004 0.684
#> GSM634633 1 0.6359 -0.2243 0.464 0.000 0.088 0.024 0.424
#> GSM634634 4 0.3786 0.6047 0.000 0.004 0.204 0.776 0.016
#> GSM634635 1 0.1365 0.7455 0.952 0.000 0.040 0.004 0.004
#> GSM634636 1 0.1564 0.7350 0.948 0.000 0.024 0.004 0.024
#> GSM634637 5 0.6203 0.4531 0.388 0.000 0.092 0.016 0.504
#> GSM634638 2 0.1661 0.7290 0.000 0.940 0.000 0.036 0.024
#> GSM634639 1 0.3067 0.7194 0.876 0.000 0.068 0.016 0.040
#> GSM634640 2 0.0771 0.7440 0.000 0.976 0.000 0.020 0.004
#> GSM634641 1 0.5206 -0.2105 0.528 0.000 0.028 0.008 0.436
#> GSM634642 4 0.5515 0.6457 0.008 0.052 0.040 0.704 0.196
#> GSM634644 2 0.1626 0.7292 0.000 0.940 0.000 0.044 0.016
#> GSM634645 1 0.1704 0.7392 0.928 0.000 0.068 0.004 0.000
#> GSM634646 1 0.4735 0.2661 0.608 0.000 0.372 0.008 0.012
#> GSM634647 3 0.3256 0.7008 0.000 0.004 0.832 0.148 0.016
#> GSM634651 2 0.4451 0.7250 0.000 0.712 0.000 0.040 0.248
#> GSM634652 4 0.4218 0.5509 0.000 0.332 0.000 0.660 0.008
#> GSM634654 3 0.4983 0.6527 0.208 0.000 0.720 0.032 0.040
#> GSM634655 5 0.6990 0.4679 0.208 0.004 0.232 0.028 0.528
#> GSM634656 3 0.2625 0.7310 0.000 0.000 0.876 0.108 0.016
#> GSM634657 5 0.6514 0.3433 0.044 0.220 0.000 0.136 0.600
#> GSM634658 1 0.4022 0.6624 0.804 0.000 0.004 0.100 0.092
#> GSM634660 5 0.5761 0.5280 0.352 0.004 0.052 0.016 0.576
#> GSM634661 2 0.4083 0.7365 0.000 0.744 0.000 0.028 0.228
#> GSM634662 5 0.3404 0.5276 0.012 0.124 0.000 0.024 0.840
#> GSM634663 2 0.5284 0.5334 0.004 0.532 0.000 0.040 0.424
#> GSM634664 4 0.3058 0.6975 0.004 0.032 0.056 0.884 0.024
#> GSM634665 1 0.5545 0.4604 0.648 0.000 0.272 0.044 0.036
#> GSM634668 5 0.3287 0.6603 0.108 0.008 0.008 0.020 0.856
#> GSM634671 1 0.4774 0.6607 0.760 0.000 0.052 0.152 0.036
#> GSM634672 3 0.2270 0.7869 0.072 0.000 0.908 0.016 0.004
#> GSM634673 3 0.2661 0.7858 0.052 0.000 0.896 0.008 0.044
#> GSM634674 5 0.3128 0.4881 0.000 0.168 0.004 0.004 0.824
#> GSM634675 2 0.6366 0.6109 0.036 0.556 0.000 0.088 0.320
#> GSM634676 1 0.6139 0.1909 0.564 0.004 0.004 0.124 0.304
#> GSM634677 2 0.5299 0.6852 0.012 0.640 0.000 0.052 0.296
#> GSM634678 5 0.4866 0.5068 0.048 0.112 0.000 0.072 0.768
#> GSM634682 2 0.1661 0.7290 0.000 0.940 0.000 0.036 0.024
#> GSM634683 2 0.3386 0.7567 0.000 0.832 0.000 0.040 0.128
#> GSM634684 1 0.3604 0.6866 0.836 0.004 0.004 0.108 0.048
#> GSM634685 4 0.6710 0.0642 0.000 0.040 0.384 0.476 0.100
#> GSM634686 1 0.0898 0.7396 0.972 0.000 0.000 0.008 0.020
#> GSM634687 2 0.0671 0.7442 0.000 0.980 0.000 0.016 0.004
#> GSM634689 4 0.4964 0.6379 0.000 0.008 0.056 0.692 0.244
#> GSM634691 2 0.5279 0.6882 0.012 0.644 0.000 0.052 0.292
#> GSM634692 1 0.2234 0.7337 0.916 0.000 0.004 0.044 0.036
#> GSM634693 1 0.6539 0.0167 0.460 0.000 0.420 0.080 0.040
#> GSM634695 2 0.1741 0.7273 0.000 0.936 0.000 0.040 0.024
#> GSM634696 4 0.7103 0.2373 0.240 0.000 0.044 0.516 0.200
#> GSM634697 3 0.2515 0.7864 0.032 0.000 0.908 0.040 0.020
#> GSM634699 4 0.3664 0.6665 0.072 0.012 0.060 0.848 0.008
#> GSM634700 2 0.5406 0.6343 0.008 0.592 0.000 0.052 0.348
#> GSM634701 1 0.4311 0.3846 0.712 0.000 0.020 0.004 0.264
#> GSM634702 5 0.3838 0.6793 0.176 0.008 0.008 0.012 0.796
#> GSM634703 5 0.5042 0.6473 0.188 0.040 0.000 0.044 0.728
#> GSM634708 2 0.2012 0.7611 0.000 0.920 0.000 0.020 0.060
#> GSM634709 1 0.0807 0.7422 0.976 0.000 0.012 0.000 0.012
#> GSM634710 3 0.5758 0.5752 0.036 0.000 0.664 0.220 0.080
#> GSM634712 3 0.3414 0.7640 0.024 0.000 0.860 0.060 0.056
#> GSM634713 4 0.4653 0.3140 0.000 0.472 0.000 0.516 0.012
#> GSM634714 3 0.5743 0.3327 0.360 0.000 0.568 0.024 0.048
#> GSM634716 5 0.6677 0.4232 0.360 0.000 0.152 0.016 0.472
#> GSM634717 1 0.1485 0.7363 0.948 0.000 0.000 0.032 0.020
#> GSM634718 1 0.5732 0.0626 0.544 0.020 0.000 0.048 0.388
#> GSM634719 1 0.1205 0.7409 0.956 0.000 0.000 0.004 0.040
#> GSM634720 3 0.3279 0.7749 0.072 0.000 0.864 0.016 0.048
#> GSM634721 3 0.7643 0.1849 0.172 0.000 0.436 0.312 0.080
#> GSM634722 4 0.4329 0.5621 0.000 0.312 0.000 0.672 0.016
#> GSM634723 1 0.5275 0.5785 0.712 0.008 0.004 0.132 0.144
#> GSM634724 3 0.3678 0.7351 0.048 0.000 0.836 0.016 0.100
#> GSM634725 5 0.4658 0.6161 0.284 0.000 0.016 0.016 0.684
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1536 0.77891 0.940 0.000 0.000 0.004 0.040 0.016
#> GSM634648 1 0.1773 0.77784 0.932 0.000 0.016 0.000 0.016 0.036
#> GSM634649 1 0.0767 0.78220 0.976 0.000 0.012 0.008 0.004 0.000
#> GSM634650 5 0.7067 0.26467 0.024 0.044 0.000 0.196 0.444 0.292
#> GSM634653 1 0.6591 0.52238 0.616 0.000 0.136 0.056 0.100 0.092
#> GSM634659 5 0.4237 0.65110 0.048 0.000 0.000 0.004 0.704 0.244
#> GSM634666 4 0.2755 0.72032 0.000 0.000 0.056 0.880 0.028 0.036
#> GSM634667 2 0.1866 0.74228 0.000 0.908 0.000 0.000 0.008 0.084
#> GSM634669 1 0.4505 0.66267 0.732 0.000 0.000 0.016 0.160 0.092
#> GSM634670 3 0.1490 0.76126 0.004 0.000 0.948 0.016 0.024 0.008
#> GSM634679 3 0.3331 0.73702 0.008 0.000 0.840 0.032 0.104 0.016
#> GSM634680 3 0.4730 0.70494 0.048 0.000 0.760 0.016 0.080 0.096
#> GSM634681 1 0.1109 0.77949 0.964 0.000 0.016 0.004 0.004 0.012
#> GSM634688 4 0.1743 0.73298 0.000 0.008 0.028 0.936 0.004 0.024
#> GSM634690 2 0.3357 0.58922 0.000 0.764 0.000 0.004 0.008 0.224
#> GSM634694 1 0.4024 0.70574 0.776 0.000 0.000 0.016 0.068 0.140
#> GSM634698 1 0.1007 0.78075 0.968 0.000 0.016 0.004 0.004 0.008
#> GSM634704 6 0.7196 0.23798 0.136 0.384 0.000 0.028 0.068 0.384
#> GSM634705 1 0.1293 0.77876 0.956 0.000 0.016 0.004 0.004 0.020
#> GSM634706 6 0.4616 0.41275 0.180 0.000 0.000 0.008 0.104 0.708
#> GSM634707 5 0.3688 0.70486 0.140 0.000 0.020 0.000 0.800 0.040
#> GSM634711 5 0.3700 0.69448 0.152 0.000 0.068 0.000 0.780 0.000
#> GSM634715 5 0.5073 0.54073 0.008 0.164 0.000 0.000 0.660 0.168
#> GSM634633 5 0.6064 0.38969 0.272 0.004 0.084 0.000 0.572 0.068
#> GSM634634 4 0.3577 0.67323 0.000 0.004 0.136 0.812 0.028 0.020
#> GSM634635 1 0.0665 0.78281 0.980 0.000 0.008 0.008 0.004 0.000
#> GSM634636 1 0.1779 0.77602 0.920 0.000 0.000 0.000 0.064 0.016
#> GSM634637 5 0.4291 0.70136 0.148 0.000 0.060 0.004 0.764 0.024
#> GSM634638 2 0.0862 0.74342 0.000 0.972 0.000 0.008 0.016 0.004
#> GSM634639 1 0.4507 0.66017 0.744 0.000 0.028 0.004 0.164 0.060
#> GSM634640 2 0.1444 0.74897 0.000 0.928 0.000 0.000 0.000 0.072
#> GSM634641 5 0.5405 0.48433 0.328 0.000 0.012 0.004 0.572 0.084
#> GSM634642 4 0.4403 0.63042 0.000 0.012 0.028 0.712 0.012 0.236
#> GSM634644 2 0.1346 0.74835 0.000 0.952 0.000 0.008 0.016 0.024
#> GSM634645 1 0.1396 0.77837 0.952 0.000 0.024 0.004 0.008 0.012
#> GSM634646 1 0.3838 0.64608 0.784 0.000 0.164 0.004 0.020 0.028
#> GSM634647 3 0.3543 0.69726 0.000 0.004 0.832 0.088 0.048 0.028
#> GSM634651 6 0.3982 0.21193 0.000 0.460 0.000 0.004 0.000 0.536
#> GSM634652 4 0.3971 0.55442 0.000 0.268 0.000 0.704 0.004 0.024
#> GSM634654 3 0.6454 0.37137 0.344 0.000 0.496 0.016 0.056 0.088
#> GSM634655 5 0.4739 0.59367 0.056 0.012 0.108 0.000 0.756 0.068
#> GSM634656 3 0.2968 0.72700 0.004 0.000 0.872 0.056 0.040 0.028
#> GSM634657 6 0.7673 0.00364 0.024 0.164 0.000 0.120 0.340 0.352
#> GSM634658 1 0.5376 0.65319 0.680 0.000 0.000 0.148 0.104 0.068
#> GSM634660 5 0.3801 0.70556 0.136 0.004 0.036 0.000 0.800 0.024
#> GSM634661 6 0.3989 0.18797 0.000 0.468 0.000 0.004 0.000 0.528
#> GSM634662 5 0.4577 0.33573 0.004 0.020 0.000 0.004 0.528 0.444
#> GSM634663 6 0.4233 0.54856 0.000 0.208 0.000 0.004 0.064 0.724
#> GSM634664 4 0.1844 0.73498 0.000 0.012 0.028 0.932 0.004 0.024
#> GSM634665 1 0.4446 0.68101 0.780 0.000 0.096 0.020 0.032 0.072
#> GSM634668 5 0.4105 0.55686 0.016 0.000 0.000 0.004 0.648 0.332
#> GSM634671 1 0.5143 0.63820 0.696 0.000 0.020 0.196 0.032 0.056
#> GSM634672 3 0.2507 0.76429 0.044 0.000 0.900 0.020 0.028 0.008
#> GSM634673 3 0.3493 0.74401 0.040 0.000 0.840 0.004 0.068 0.048
#> GSM634674 5 0.4721 0.46651 0.004 0.048 0.000 0.000 0.592 0.356
#> GSM634675 6 0.4465 0.53222 0.004 0.252 0.000 0.028 0.020 0.696
#> GSM634676 1 0.6991 0.25091 0.452 0.000 0.000 0.148 0.280 0.120
#> GSM634677 6 0.3804 0.46435 0.000 0.336 0.000 0.008 0.000 0.656
#> GSM634678 6 0.4350 0.37459 0.020 0.020 0.000 0.008 0.240 0.712
#> GSM634682 2 0.0862 0.74342 0.000 0.972 0.000 0.008 0.016 0.004
#> GSM634683 2 0.4293 -0.02945 0.000 0.536 0.000 0.012 0.004 0.448
#> GSM634684 1 0.5277 0.66682 0.688 0.000 0.000 0.144 0.108 0.060
#> GSM634685 4 0.8626 0.17500 0.000 0.184 0.200 0.332 0.176 0.108
#> GSM634686 1 0.2621 0.76747 0.884 0.000 0.000 0.012 0.052 0.052
#> GSM634687 2 0.1387 0.75014 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM634689 4 0.4987 0.64625 0.000 0.000 0.036 0.704 0.108 0.152
#> GSM634691 6 0.3861 0.44366 0.000 0.352 0.000 0.008 0.000 0.640
#> GSM634692 1 0.2038 0.78274 0.920 0.000 0.000 0.020 0.028 0.032
#> GSM634693 1 0.6644 0.40256 0.560 0.000 0.252 0.060 0.052 0.076
#> GSM634695 2 0.1649 0.72679 0.000 0.936 0.000 0.008 0.040 0.016
#> GSM634696 4 0.5914 0.43538 0.200 0.000 0.000 0.612 0.120 0.068
#> GSM634697 3 0.2572 0.76365 0.028 0.000 0.900 0.032 0.016 0.024
#> GSM634699 4 0.3124 0.72052 0.032 0.008 0.040 0.876 0.028 0.016
#> GSM634700 6 0.3779 0.52146 0.000 0.276 0.000 0.008 0.008 0.708
#> GSM634701 1 0.4275 0.43917 0.644 0.000 0.000 0.008 0.328 0.020
#> GSM634702 5 0.4152 0.65151 0.044 0.000 0.000 0.004 0.712 0.240
#> GSM634703 6 0.4982 0.23972 0.068 0.004 0.000 0.016 0.252 0.660
#> GSM634708 2 0.3861 0.41409 0.000 0.672 0.000 0.004 0.008 0.316
#> GSM634709 1 0.1390 0.78084 0.948 0.000 0.000 0.004 0.032 0.016
#> GSM634710 3 0.5232 0.61193 0.016 0.000 0.684 0.200 0.072 0.028
#> GSM634712 3 0.2786 0.75090 0.008 0.000 0.876 0.032 0.076 0.008
#> GSM634713 2 0.4693 0.03566 0.000 0.588 0.004 0.372 0.028 0.008
#> GSM634714 1 0.7283 -0.15555 0.388 0.000 0.372 0.024 0.116 0.100
#> GSM634716 5 0.4030 0.68525 0.132 0.000 0.068 0.000 0.780 0.020
#> GSM634717 1 0.2384 0.77161 0.896 0.000 0.000 0.008 0.040 0.056
#> GSM634718 6 0.5471 0.27884 0.292 0.000 0.000 0.020 0.100 0.588
#> GSM634719 1 0.3014 0.75726 0.856 0.000 0.000 0.012 0.084 0.048
#> GSM634720 3 0.5582 0.65924 0.108 0.000 0.692 0.016 0.096 0.088
#> GSM634721 3 0.7757 0.11145 0.200 0.000 0.356 0.324 0.048 0.072
#> GSM634722 4 0.4437 0.53250 0.000 0.304 0.000 0.656 0.020 0.020
#> GSM634723 1 0.6250 0.57935 0.600 0.000 0.004 0.140 0.092 0.164
#> GSM634724 3 0.3541 0.62159 0.012 0.000 0.728 0.000 0.260 0.000
#> GSM634725 5 0.4756 0.68359 0.104 0.000 0.004 0.012 0.712 0.168
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 individual(p) k
#> CV:kmeans 93 0.296 2
#> CV:kmeans 86 0.184 3
#> CV:kmeans 60 0.323 4
#> CV:kmeans 72 0.573 5
#> CV:kmeans 67 0.755 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 17698 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.962 0.984 0.5001 0.499 0.499
#> 3 3 0.670 0.807 0.885 0.3412 0.699 0.466
#> 4 4 0.608 0.600 0.780 0.1092 0.888 0.681
#> 5 5 0.673 0.696 0.813 0.0665 0.927 0.731
#> 6 6 0.681 0.546 0.748 0.0431 0.964 0.842
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
#> GSM634643 1 0.000 0.987 1.000 0.000
#> GSM634648 1 0.000 0.987 1.000 0.000
#> GSM634649 1 0.000 0.987 1.000 0.000
#> GSM634650 2 0.000 0.979 0.000 1.000
#> GSM634653 1 0.000 0.987 1.000 0.000
#> GSM634659 2 0.952 0.404 0.372 0.628
#> GSM634666 2 0.118 0.965 0.016 0.984
#> GSM634667 2 0.000 0.979 0.000 1.000
#> GSM634669 1 0.000 0.987 1.000 0.000
#> GSM634670 1 0.000 0.987 1.000 0.000
#> GSM634679 1 0.000 0.987 1.000 0.000
#> GSM634680 1 0.000 0.987 1.000 0.000
#> GSM634681 1 0.000 0.987 1.000 0.000
#> GSM634688 2 0.000 0.979 0.000 1.000
#> GSM634690 2 0.000 0.979 0.000 1.000
#> GSM634694 1 0.000 0.987 1.000 0.000
#> GSM634698 1 0.000 0.987 1.000 0.000
#> GSM634704 2 0.373 0.907 0.072 0.928
#> GSM634705 1 0.000 0.987 1.000 0.000
#> GSM634706 2 0.000 0.979 0.000 1.000
#> GSM634707 1 0.000 0.987 1.000 0.000
#> GSM634711 1 0.000 0.987 1.000 0.000
#> GSM634715 2 0.000 0.979 0.000 1.000
#> GSM634633 1 0.000 0.987 1.000 0.000
#> GSM634634 2 0.000 0.979 0.000 1.000
#> GSM634635 1 0.000 0.987 1.000 0.000
#> GSM634636 1 0.000 0.987 1.000 0.000
#> GSM634637 1 0.000 0.987 1.000 0.000
#> GSM634638 2 0.000 0.979 0.000 1.000
#> GSM634639 1 0.000 0.987 1.000 0.000
#> GSM634640 2 0.000 0.979 0.000 1.000
#> GSM634641 1 0.000 0.987 1.000 0.000
#> GSM634642 2 0.000 0.979 0.000 1.000
#> GSM634644 2 0.000 0.979 0.000 1.000
#> GSM634645 1 0.000 0.987 1.000 0.000
#> GSM634646 1 0.000 0.987 1.000 0.000
#> GSM634647 1 0.000 0.987 1.000 0.000
#> GSM634651 2 0.000 0.979 0.000 1.000
#> GSM634652 2 0.000 0.979 0.000 1.000
#> GSM634654 1 0.000 0.987 1.000 0.000
#> GSM634655 1 0.000 0.987 1.000 0.000
#> GSM634656 1 0.000 0.987 1.000 0.000
#> GSM634657 2 0.000 0.979 0.000 1.000
#> GSM634658 1 0.000 0.987 1.000 0.000
#> GSM634660 1 0.000 0.987 1.000 0.000
#> GSM634661 2 0.000 0.979 0.000 1.000
#> GSM634662 2 0.000 0.979 0.000 1.000
#> GSM634663 2 0.000 0.979 0.000 1.000
#> GSM634664 2 0.000 0.979 0.000 1.000
#> GSM634665 1 0.000 0.987 1.000 0.000
#> GSM634668 2 0.000 0.979 0.000 1.000
#> GSM634671 1 0.000 0.987 1.000 0.000
#> GSM634672 1 0.000 0.987 1.000 0.000
#> GSM634673 1 0.000 0.987 1.000 0.000
#> GSM634674 2 0.000 0.979 0.000 1.000
#> GSM634675 2 0.000 0.979 0.000 1.000
#> GSM634676 1 0.781 0.700 0.768 0.232
#> GSM634677 2 0.000 0.979 0.000 1.000
#> GSM634678 2 0.000 0.979 0.000 1.000
#> GSM634682 2 0.000 0.979 0.000 1.000
#> GSM634683 2 0.000 0.979 0.000 1.000
#> GSM634684 1 0.000 0.987 1.000 0.000
#> GSM634685 2 0.000 0.979 0.000 1.000
#> GSM634686 1 0.000 0.987 1.000 0.000
#> GSM634687 2 0.000 0.979 0.000 1.000
#> GSM634689 2 0.000 0.979 0.000 1.000
#> GSM634691 2 0.000 0.979 0.000 1.000
#> GSM634692 1 0.000 0.987 1.000 0.000
#> GSM634693 1 0.000 0.987 1.000 0.000
#> GSM634695 2 0.000 0.979 0.000 1.000
#> GSM634696 1 0.722 0.751 0.800 0.200
#> GSM634697 1 0.000 0.987 1.000 0.000
#> GSM634699 2 0.000 0.979 0.000 1.000
#> GSM634700 2 0.000 0.979 0.000 1.000
#> GSM634701 1 0.000 0.987 1.000 0.000
#> GSM634702 2 0.952 0.404 0.372 0.628
#> GSM634703 2 0.000 0.979 0.000 1.000
#> GSM634708 2 0.000 0.979 0.000 1.000
#> GSM634709 1 0.000 0.987 1.000 0.000
#> GSM634710 1 0.000 0.987 1.000 0.000
#> GSM634712 1 0.000 0.987 1.000 0.000
#> GSM634713 2 0.000 0.979 0.000 1.000
#> GSM634714 1 0.000 0.987 1.000 0.000
#> GSM634716 1 0.000 0.987 1.000 0.000
#> GSM634717 1 0.000 0.987 1.000 0.000
#> GSM634718 2 0.000 0.979 0.000 1.000
#> GSM634719 1 0.000 0.987 1.000 0.000
#> GSM634720 1 0.000 0.987 1.000 0.000
#> GSM634721 1 0.000 0.987 1.000 0.000
#> GSM634722 2 0.000 0.979 0.000 1.000
#> GSM634723 2 0.000 0.979 0.000 1.000
#> GSM634724 1 0.000 0.987 1.000 0.000
#> GSM634725 1 0.722 0.751 0.800 0.200
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634648 3 0.5835 0.6657 0.340 0.000 0.660
#> GSM634649 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634650 2 0.1643 0.9296 0.000 0.956 0.044
#> GSM634653 3 0.5016 0.7246 0.240 0.000 0.760
#> GSM634659 1 0.8371 0.5361 0.592 0.292 0.116
#> GSM634666 3 0.3879 0.7625 0.000 0.152 0.848
#> GSM634667 2 0.0237 0.9523 0.000 0.996 0.004
#> GSM634669 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634670 3 0.2261 0.8192 0.068 0.000 0.932
#> GSM634679 3 0.1643 0.8138 0.044 0.000 0.956
#> GSM634680 3 0.2796 0.8197 0.092 0.000 0.908
#> GSM634681 1 0.2537 0.8008 0.920 0.000 0.080
#> GSM634688 3 0.6008 0.4564 0.000 0.372 0.628
#> GSM634690 2 0.0237 0.9523 0.000 0.996 0.004
#> GSM634694 1 0.0237 0.8622 0.996 0.004 0.000
#> GSM634698 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634704 2 0.4195 0.8207 0.136 0.852 0.012
#> GSM634705 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634706 2 0.4679 0.7972 0.148 0.832 0.020
#> GSM634707 1 0.5723 0.7152 0.744 0.016 0.240
#> GSM634711 1 0.5016 0.7171 0.760 0.000 0.240
#> GSM634715 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634633 3 0.5926 0.4568 0.356 0.000 0.644
#> GSM634634 3 0.1643 0.8101 0.000 0.044 0.956
#> GSM634635 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634636 1 0.1289 0.8565 0.968 0.000 0.032
#> GSM634637 1 0.5016 0.7171 0.760 0.000 0.240
#> GSM634638 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634639 1 0.0892 0.8581 0.980 0.000 0.020
#> GSM634640 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634641 1 0.4172 0.7885 0.840 0.004 0.156
#> GSM634642 2 0.2066 0.9090 0.000 0.940 0.060
#> GSM634644 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634645 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634646 3 0.5926 0.6505 0.356 0.000 0.644
#> GSM634647 3 0.1643 0.8204 0.044 0.000 0.956
#> GSM634651 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634652 2 0.0747 0.9503 0.000 0.984 0.016
#> GSM634654 3 0.5291 0.7211 0.268 0.000 0.732
#> GSM634655 3 0.4834 0.6762 0.204 0.004 0.792
#> GSM634656 3 0.1411 0.8201 0.036 0.000 0.964
#> GSM634657 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634658 1 0.1411 0.8483 0.964 0.000 0.036
#> GSM634660 1 0.5578 0.7161 0.748 0.012 0.240
#> GSM634661 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634662 2 0.1643 0.9250 0.000 0.956 0.044
#> GSM634663 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634664 3 0.5291 0.6418 0.000 0.268 0.732
#> GSM634665 3 0.5560 0.6867 0.300 0.000 0.700
#> GSM634668 2 0.1753 0.9220 0.000 0.952 0.048
#> GSM634671 1 0.4291 0.7113 0.820 0.000 0.180
#> GSM634672 3 0.2261 0.8192 0.068 0.000 0.932
#> GSM634673 3 0.2261 0.8192 0.068 0.000 0.932
#> GSM634674 2 0.0892 0.9418 0.000 0.980 0.020
#> GSM634675 2 0.0592 0.9476 0.012 0.988 0.000
#> GSM634676 1 0.3155 0.8282 0.916 0.040 0.044
#> GSM634677 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634678 2 0.2918 0.9074 0.032 0.924 0.044
#> GSM634682 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634683 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634684 1 0.1643 0.8449 0.956 0.000 0.044
#> GSM634685 3 0.1753 0.8095 0.000 0.048 0.952
#> GSM634686 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634687 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634689 3 0.5948 0.4798 0.000 0.360 0.640
#> GSM634691 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634692 1 0.1289 0.8498 0.968 0.000 0.032
#> GSM634693 3 0.5216 0.7262 0.260 0.000 0.740
#> GSM634695 2 0.0592 0.9516 0.000 0.988 0.012
#> GSM634696 3 0.5852 0.7532 0.060 0.152 0.788
#> GSM634697 3 0.2165 0.8195 0.064 0.000 0.936
#> GSM634699 3 0.6594 0.7401 0.128 0.116 0.756
#> GSM634700 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634701 1 0.1643 0.8527 0.956 0.000 0.044
#> GSM634702 1 0.9067 0.2986 0.476 0.384 0.140
#> GSM634703 2 0.6267 0.0356 0.452 0.548 0.000
#> GSM634708 2 0.0000 0.9522 0.000 1.000 0.000
#> GSM634709 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634710 3 0.0592 0.8139 0.012 0.000 0.988
#> GSM634712 3 0.1643 0.8138 0.044 0.000 0.956
#> GSM634713 2 0.0747 0.9503 0.000 0.984 0.016
#> GSM634714 3 0.5138 0.7424 0.252 0.000 0.748
#> GSM634716 1 0.5254 0.6915 0.736 0.000 0.264
#> GSM634717 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634718 1 0.5016 0.6707 0.760 0.240 0.000
#> GSM634719 1 0.0000 0.8629 1.000 0.000 0.000
#> GSM634720 3 0.2796 0.8197 0.092 0.000 0.908
#> GSM634721 3 0.2261 0.8198 0.068 0.000 0.932
#> GSM634722 2 0.2796 0.8887 0.000 0.908 0.092
#> GSM634723 1 0.6247 0.6635 0.744 0.212 0.044
#> GSM634724 3 0.4605 0.6913 0.204 0.000 0.796
#> GSM634725 1 0.7421 0.6699 0.676 0.084 0.240
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0188 0.7421 0.996 0.000 0.000 0.004
#> GSM634648 1 0.7407 -0.1631 0.496 0.004 0.344 0.156
#> GSM634649 1 0.0524 0.7406 0.988 0.000 0.008 0.004
#> GSM634650 2 0.4914 0.6552 0.012 0.676 0.000 0.312
#> GSM634653 3 0.6013 0.4986 0.288 0.000 0.640 0.072
#> GSM634659 1 0.9740 0.2152 0.324 0.208 0.164 0.304
#> GSM634666 4 0.4477 0.5748 0.000 0.000 0.312 0.688
#> GSM634667 2 0.2216 0.8579 0.000 0.908 0.000 0.092
#> GSM634669 1 0.0804 0.7419 0.980 0.012 0.000 0.008
#> GSM634670 3 0.1151 0.6460 0.024 0.000 0.968 0.008
#> GSM634679 3 0.2868 0.5262 0.000 0.000 0.864 0.136
#> GSM634680 3 0.1474 0.6513 0.052 0.000 0.948 0.000
#> GSM634681 1 0.4262 0.4442 0.756 0.000 0.236 0.008
#> GSM634688 4 0.5343 0.6195 0.000 0.052 0.240 0.708
#> GSM634690 2 0.1474 0.8692 0.000 0.948 0.000 0.052
#> GSM634694 1 0.0804 0.7419 0.980 0.012 0.000 0.008
#> GSM634698 1 0.0672 0.7396 0.984 0.000 0.008 0.008
#> GSM634704 2 0.3521 0.8169 0.084 0.864 0.000 0.052
#> GSM634705 1 0.0927 0.7364 0.976 0.000 0.016 0.008
#> GSM634706 2 0.2867 0.7905 0.104 0.884 0.000 0.012
#> GSM634707 1 0.8180 0.2753 0.416 0.012 0.284 0.288
#> GSM634711 1 0.7790 0.2602 0.424 0.000 0.304 0.272
#> GSM634715 2 0.2704 0.8563 0.000 0.876 0.000 0.124
#> GSM634633 3 0.5888 0.5484 0.100 0.004 0.704 0.192
#> GSM634634 4 0.4820 0.5898 0.000 0.012 0.296 0.692
#> GSM634635 1 0.0524 0.7406 0.988 0.000 0.008 0.004
#> GSM634636 1 0.0895 0.7424 0.976 0.000 0.020 0.004
#> GSM634637 1 0.7958 0.2649 0.420 0.004 0.296 0.280
#> GSM634638 2 0.2345 0.8545 0.000 0.900 0.000 0.100
#> GSM634639 1 0.3913 0.6373 0.824 0.000 0.148 0.028
#> GSM634640 2 0.2281 0.8562 0.000 0.904 0.000 0.096
#> GSM634641 1 0.7910 0.4757 0.576 0.056 0.152 0.216
#> GSM634642 4 0.6532 0.4027 0.000 0.420 0.076 0.504
#> GSM634644 2 0.2760 0.8350 0.000 0.872 0.000 0.128
#> GSM634645 1 0.1256 0.7322 0.964 0.000 0.028 0.008
#> GSM634646 3 0.5296 0.2598 0.492 0.000 0.500 0.008
#> GSM634647 3 0.4387 0.4170 0.012 0.000 0.752 0.236
#> GSM634651 2 0.0592 0.8607 0.000 0.984 0.000 0.016
#> GSM634652 4 0.5070 0.2801 0.000 0.416 0.004 0.580
#> GSM634654 3 0.5169 0.5267 0.272 0.000 0.696 0.032
#> GSM634655 3 0.4826 0.4853 0.020 0.000 0.716 0.264
#> GSM634656 3 0.2867 0.5886 0.012 0.000 0.884 0.104
#> GSM634657 2 0.2469 0.8571 0.000 0.892 0.000 0.108
#> GSM634658 1 0.2611 0.7135 0.896 0.000 0.008 0.096
#> GSM634660 1 0.8081 0.2673 0.416 0.008 0.296 0.280
#> GSM634661 2 0.0469 0.8659 0.000 0.988 0.000 0.012
#> GSM634662 2 0.4378 0.7116 0.000 0.796 0.040 0.164
#> GSM634663 2 0.1302 0.8700 0.000 0.956 0.000 0.044
#> GSM634664 4 0.5337 0.6129 0.000 0.044 0.260 0.696
#> GSM634665 3 0.6315 0.3340 0.432 0.000 0.508 0.060
#> GSM634668 2 0.6240 0.4344 0.000 0.604 0.076 0.320
#> GSM634671 1 0.4037 0.6772 0.832 0.000 0.056 0.112
#> GSM634672 3 0.1545 0.6511 0.040 0.000 0.952 0.008
#> GSM634673 3 0.0921 0.6453 0.028 0.000 0.972 0.000
#> GSM634674 2 0.2402 0.8246 0.000 0.912 0.012 0.076
#> GSM634675 2 0.1297 0.8588 0.020 0.964 0.000 0.016
#> GSM634676 1 0.4136 0.6627 0.788 0.016 0.000 0.196
#> GSM634677 2 0.0469 0.8621 0.000 0.988 0.000 0.012
#> GSM634678 2 0.2757 0.8277 0.052 0.912 0.020 0.016
#> GSM634682 2 0.2345 0.8545 0.000 0.900 0.000 0.100
#> GSM634683 2 0.1118 0.8701 0.000 0.964 0.000 0.036
#> GSM634684 1 0.2831 0.7052 0.876 0.000 0.004 0.120
#> GSM634685 4 0.5392 0.3497 0.000 0.012 0.460 0.528
#> GSM634686 1 0.0336 0.7424 0.992 0.000 0.000 0.008
#> GSM634687 2 0.2281 0.8562 0.000 0.904 0.000 0.096
#> GSM634689 4 0.7315 0.5203 0.000 0.184 0.300 0.516
#> GSM634691 2 0.0469 0.8621 0.000 0.988 0.000 0.012
#> GSM634692 1 0.1635 0.7346 0.948 0.000 0.008 0.044
#> GSM634693 3 0.6491 0.3864 0.396 0.000 0.528 0.076
#> GSM634695 2 0.2345 0.8545 0.000 0.900 0.000 0.100
#> GSM634696 4 0.4509 0.5832 0.004 0.000 0.288 0.708
#> GSM634697 3 0.1936 0.6346 0.028 0.000 0.940 0.032
#> GSM634699 4 0.6261 0.5998 0.028 0.048 0.260 0.664
#> GSM634700 2 0.0592 0.8607 0.000 0.984 0.000 0.016
#> GSM634701 1 0.3471 0.7025 0.868 0.000 0.060 0.072
#> GSM634702 4 0.9864 -0.1616 0.236 0.276 0.180 0.308
#> GSM634703 2 0.6685 0.3650 0.284 0.592 0.000 0.124
#> GSM634708 2 0.1389 0.8697 0.000 0.952 0.000 0.048
#> GSM634709 1 0.0000 0.7425 1.000 0.000 0.000 0.000
#> GSM634710 3 0.4560 0.2341 0.004 0.000 0.700 0.296
#> GSM634712 3 0.2345 0.5680 0.000 0.000 0.900 0.100
#> GSM634713 4 0.4985 0.1336 0.000 0.468 0.000 0.532
#> GSM634714 3 0.4697 0.5615 0.296 0.000 0.696 0.008
#> GSM634716 3 0.7707 0.0412 0.272 0.000 0.452 0.276
#> GSM634717 1 0.0657 0.7426 0.984 0.012 0.000 0.004
#> GSM634718 1 0.5075 0.4450 0.644 0.344 0.000 0.012
#> GSM634719 1 0.0524 0.7425 0.988 0.000 0.004 0.008
#> GSM634720 3 0.1474 0.6513 0.052 0.000 0.948 0.000
#> GSM634721 4 0.5925 0.2625 0.036 0.000 0.452 0.512
#> GSM634722 4 0.5392 0.5196 0.000 0.280 0.040 0.680
#> GSM634723 1 0.5771 0.5800 0.712 0.144 0.000 0.144
#> GSM634724 3 0.4468 0.5199 0.016 0.000 0.752 0.232
#> GSM634725 1 0.9242 0.2472 0.368 0.084 0.240 0.308
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1493 0.8267 0.948 0.000 0.028 0.000 0.024
#> GSM634648 1 0.6231 0.1336 0.524 0.000 0.360 0.100 0.016
#> GSM634649 1 0.1412 0.8273 0.952 0.000 0.036 0.004 0.008
#> GSM634650 2 0.6447 0.4514 0.016 0.560 0.000 0.164 0.260
#> GSM634653 3 0.5395 0.6246 0.188 0.000 0.676 0.132 0.004
#> GSM634659 5 0.1173 0.7205 0.012 0.020 0.004 0.000 0.964
#> GSM634666 4 0.1908 0.7535 0.000 0.000 0.092 0.908 0.000
#> GSM634667 2 0.0880 0.8579 0.000 0.968 0.000 0.032 0.000
#> GSM634669 1 0.2206 0.8086 0.912 0.000 0.004 0.016 0.068
#> GSM634670 3 0.0865 0.7580 0.000 0.000 0.972 0.004 0.024
#> GSM634679 3 0.3555 0.6904 0.000 0.000 0.824 0.124 0.052
#> GSM634680 3 0.1442 0.7668 0.032 0.000 0.952 0.004 0.012
#> GSM634681 1 0.3578 0.6794 0.784 0.000 0.204 0.004 0.008
#> GSM634688 4 0.1364 0.7752 0.000 0.012 0.036 0.952 0.000
#> GSM634690 2 0.0566 0.8618 0.000 0.984 0.000 0.012 0.004
#> GSM634694 1 0.1630 0.8198 0.944 0.000 0.004 0.016 0.036
#> GSM634698 1 0.1731 0.8249 0.940 0.000 0.040 0.008 0.012
#> GSM634704 2 0.3142 0.8437 0.060 0.876 0.004 0.048 0.012
#> GSM634705 1 0.2228 0.8204 0.916 0.000 0.056 0.008 0.020
#> GSM634706 2 0.5059 0.7669 0.072 0.752 0.012 0.020 0.144
#> GSM634707 5 0.3694 0.7490 0.084 0.004 0.084 0.000 0.828
#> GSM634711 5 0.4457 0.7170 0.092 0.000 0.152 0.000 0.756
#> GSM634715 2 0.3723 0.7511 0.000 0.804 0.000 0.044 0.152
#> GSM634633 3 0.4109 0.6307 0.048 0.000 0.780 0.004 0.168
#> GSM634634 4 0.2905 0.7643 0.000 0.036 0.096 0.868 0.000
#> GSM634635 1 0.1282 0.8264 0.952 0.000 0.044 0.004 0.000
#> GSM634636 1 0.3142 0.8018 0.868 0.000 0.056 0.008 0.068
#> GSM634637 5 0.3806 0.7414 0.084 0.000 0.104 0.000 0.812
#> GSM634638 2 0.1597 0.8505 0.000 0.940 0.000 0.048 0.012
#> GSM634639 1 0.5192 0.6372 0.700 0.000 0.164 0.004 0.132
#> GSM634640 2 0.1205 0.8545 0.000 0.956 0.000 0.040 0.004
#> GSM634641 5 0.4550 0.5550 0.276 0.000 0.028 0.004 0.692
#> GSM634642 4 0.5044 0.6702 0.004 0.124 0.020 0.748 0.104
#> GSM634644 2 0.1892 0.8355 0.000 0.916 0.000 0.080 0.004
#> GSM634645 1 0.2610 0.8090 0.892 0.000 0.076 0.004 0.028
#> GSM634646 3 0.4633 0.4417 0.372 0.000 0.612 0.008 0.008
#> GSM634647 3 0.3109 0.6531 0.000 0.000 0.800 0.200 0.000
#> GSM634651 2 0.3274 0.8270 0.004 0.848 0.012 0.012 0.124
#> GSM634652 4 0.3452 0.6784 0.000 0.244 0.000 0.756 0.000
#> GSM634654 3 0.3779 0.6887 0.200 0.000 0.776 0.024 0.000
#> GSM634655 5 0.4813 0.1415 0.008 0.008 0.476 0.000 0.508
#> GSM634656 3 0.1544 0.7510 0.000 0.000 0.932 0.068 0.000
#> GSM634657 2 0.3224 0.8294 0.012 0.864 0.000 0.080 0.044
#> GSM634658 1 0.3934 0.7753 0.820 0.000 0.016 0.104 0.060
#> GSM634660 5 0.4144 0.7413 0.092 0.008 0.100 0.000 0.800
#> GSM634661 2 0.1442 0.8615 0.000 0.952 0.012 0.004 0.032
#> GSM634662 2 0.4331 0.5339 0.000 0.596 0.004 0.000 0.400
#> GSM634663 2 0.1764 0.8624 0.000 0.928 0.000 0.008 0.064
#> GSM634664 4 0.1124 0.7736 0.000 0.004 0.036 0.960 0.000
#> GSM634665 3 0.5504 0.2000 0.432 0.000 0.516 0.040 0.012
#> GSM634668 5 0.3359 0.5997 0.000 0.164 0.000 0.020 0.816
#> GSM634671 1 0.4514 0.7437 0.760 0.000 0.068 0.164 0.008
#> GSM634672 3 0.1356 0.7666 0.028 0.000 0.956 0.004 0.012
#> GSM634673 3 0.0854 0.7634 0.008 0.000 0.976 0.004 0.012
#> GSM634674 2 0.2690 0.8118 0.000 0.844 0.000 0.000 0.156
#> GSM634675 2 0.3944 0.8223 0.020 0.824 0.012 0.024 0.120
#> GSM634676 1 0.6214 0.4853 0.568 0.000 0.004 0.240 0.188
#> GSM634677 2 0.3125 0.8352 0.004 0.864 0.012 0.016 0.104
#> GSM634678 2 0.4786 0.7694 0.028 0.752 0.016 0.020 0.184
#> GSM634682 2 0.1670 0.8490 0.000 0.936 0.000 0.052 0.012
#> GSM634683 2 0.0771 0.8635 0.000 0.976 0.000 0.004 0.020
#> GSM634684 1 0.4436 0.7323 0.768 0.000 0.008 0.156 0.068
#> GSM634685 4 0.5498 0.4098 0.000 0.048 0.336 0.600 0.016
#> GSM634686 1 0.1356 0.8234 0.956 0.000 0.004 0.012 0.028
#> GSM634687 2 0.1205 0.8545 0.000 0.956 0.000 0.040 0.004
#> GSM634689 4 0.4998 0.6719 0.000 0.052 0.044 0.744 0.160
#> GSM634691 2 0.3423 0.8240 0.004 0.840 0.012 0.016 0.128
#> GSM634692 1 0.2095 0.8280 0.928 0.000 0.024 0.028 0.020
#> GSM634693 3 0.5579 0.3941 0.352 0.000 0.580 0.056 0.012
#> GSM634695 2 0.1774 0.8481 0.000 0.932 0.000 0.052 0.016
#> GSM634696 4 0.2945 0.7554 0.008 0.008 0.052 0.888 0.044
#> GSM634697 3 0.1186 0.7638 0.008 0.000 0.964 0.020 0.008
#> GSM634699 4 0.1525 0.7727 0.012 0.004 0.036 0.948 0.000
#> GSM634700 2 0.3825 0.7963 0.004 0.796 0.012 0.012 0.176
#> GSM634701 1 0.4224 0.6524 0.744 0.000 0.040 0.000 0.216
#> GSM634702 5 0.1490 0.7140 0.008 0.032 0.004 0.004 0.952
#> GSM634703 5 0.7253 0.0276 0.156 0.344 0.012 0.028 0.460
#> GSM634708 2 0.0324 0.8623 0.000 0.992 0.000 0.004 0.004
#> GSM634709 1 0.1211 0.8281 0.960 0.000 0.016 0.000 0.024
#> GSM634710 3 0.4299 0.2927 0.000 0.000 0.608 0.388 0.004
#> GSM634712 3 0.2830 0.7248 0.000 0.000 0.876 0.080 0.044
#> GSM634713 4 0.4552 0.2208 0.000 0.468 0.000 0.524 0.008
#> GSM634714 3 0.2464 0.7482 0.092 0.000 0.892 0.004 0.012
#> GSM634716 5 0.5051 0.5978 0.072 0.000 0.264 0.000 0.664
#> GSM634717 1 0.0566 0.8287 0.984 0.000 0.000 0.012 0.004
#> GSM634718 1 0.6345 0.4989 0.644 0.184 0.012 0.032 0.128
#> GSM634719 1 0.2026 0.8229 0.928 0.000 0.016 0.012 0.044
#> GSM634720 3 0.1630 0.7668 0.036 0.000 0.944 0.004 0.016
#> GSM634721 4 0.4826 0.3859 0.024 0.000 0.324 0.644 0.008
#> GSM634722 4 0.3333 0.7039 0.000 0.208 0.000 0.788 0.004
#> GSM634723 1 0.6000 0.6175 0.676 0.148 0.004 0.132 0.040
#> GSM634724 3 0.4101 0.3381 0.004 0.000 0.664 0.000 0.332
#> GSM634725 5 0.2749 0.7376 0.060 0.012 0.028 0.004 0.896
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1426 0.67226 0.948 0.000 0.008 0.000 0.016 0.028
#> GSM634648 1 0.5814 0.33822 0.584 0.000 0.276 0.068 0.000 0.072
#> GSM634649 1 0.1232 0.67350 0.956 0.000 0.024 0.000 0.004 0.016
#> GSM634650 2 0.7125 -0.00544 0.004 0.428 0.004 0.096 0.144 0.324
#> GSM634653 3 0.6459 0.56345 0.172 0.000 0.564 0.112 0.000 0.152
#> GSM634659 5 0.2488 0.71869 0.000 0.000 0.004 0.008 0.864 0.124
#> GSM634666 4 0.2176 0.73873 0.000 0.000 0.080 0.896 0.000 0.024
#> GSM634667 2 0.0520 0.65647 0.000 0.984 0.000 0.008 0.000 0.008
#> GSM634669 1 0.4248 0.57152 0.708 0.000 0.000 0.004 0.052 0.236
#> GSM634670 3 0.0858 0.76304 0.004 0.000 0.968 0.000 0.028 0.000
#> GSM634679 3 0.3737 0.65298 0.000 0.000 0.780 0.168 0.044 0.008
#> GSM634680 3 0.2222 0.75513 0.012 0.000 0.896 0.000 0.008 0.084
#> GSM634681 1 0.3928 0.58300 0.764 0.000 0.176 0.000 0.008 0.052
#> GSM634688 4 0.1078 0.74919 0.000 0.008 0.016 0.964 0.000 0.012
#> GSM634690 2 0.1531 0.65234 0.000 0.928 0.000 0.004 0.000 0.068
#> GSM634694 1 0.3109 0.59671 0.772 0.000 0.000 0.000 0.004 0.224
#> GSM634698 1 0.1334 0.66929 0.948 0.000 0.020 0.000 0.000 0.032
#> GSM634704 2 0.4916 0.56194 0.016 0.688 0.016 0.032 0.008 0.240
#> GSM634705 1 0.1370 0.66847 0.948 0.000 0.036 0.000 0.004 0.012
#> GSM634706 2 0.5916 0.10624 0.104 0.500 0.000 0.000 0.032 0.364
#> GSM634707 5 0.2051 0.77205 0.008 0.000 0.036 0.000 0.916 0.040
#> GSM634711 5 0.2454 0.76651 0.008 0.000 0.088 0.000 0.884 0.020
#> GSM634715 2 0.4670 0.53650 0.000 0.732 0.000 0.028 0.128 0.112
#> GSM634633 3 0.5674 0.52451 0.028 0.004 0.640 0.004 0.184 0.140
#> GSM634634 4 0.2773 0.74396 0.000 0.044 0.076 0.872 0.004 0.004
#> GSM634635 1 0.1719 0.67349 0.932 0.000 0.032 0.000 0.004 0.032
#> GSM634636 1 0.3634 0.61702 0.808 0.000 0.020 0.000 0.128 0.044
#> GSM634637 5 0.1655 0.77701 0.008 0.000 0.052 0.000 0.932 0.008
#> GSM634638 2 0.2971 0.61850 0.000 0.832 0.000 0.020 0.004 0.144
#> GSM634639 1 0.5896 0.45963 0.624 0.000 0.152 0.000 0.152 0.072
#> GSM634640 2 0.1297 0.65291 0.000 0.948 0.000 0.012 0.000 0.040
#> GSM634641 5 0.4406 0.56163 0.212 0.000 0.020 0.000 0.720 0.048
#> GSM634642 4 0.4242 0.65120 0.000 0.040 0.008 0.772 0.032 0.148
#> GSM634644 2 0.3112 0.61777 0.000 0.836 0.000 0.068 0.000 0.096
#> GSM634645 1 0.1781 0.66372 0.924 0.000 0.060 0.000 0.008 0.008
#> GSM634646 3 0.4314 0.04588 0.484 0.000 0.500 0.000 0.004 0.012
#> GSM634647 3 0.3213 0.68885 0.000 0.000 0.808 0.160 0.000 0.032
#> GSM634651 2 0.3925 0.53646 0.000 0.724 0.000 0.000 0.040 0.236
#> GSM634652 4 0.3457 0.63255 0.000 0.232 0.000 0.752 0.000 0.016
#> GSM634654 3 0.3997 0.65825 0.188 0.000 0.756 0.012 0.000 0.044
#> GSM634655 5 0.5610 0.44191 0.000 0.012 0.264 0.000 0.576 0.148
#> GSM634656 3 0.2231 0.74594 0.004 0.000 0.900 0.068 0.000 0.028
#> GSM634657 2 0.4338 0.52191 0.000 0.660 0.000 0.036 0.004 0.300
#> GSM634658 1 0.5845 0.52497 0.624 0.000 0.016 0.080 0.048 0.232
#> GSM634660 5 0.2706 0.76513 0.008 0.004 0.040 0.000 0.880 0.068
#> GSM634661 2 0.2446 0.63188 0.000 0.864 0.000 0.000 0.012 0.124
#> GSM634662 2 0.6182 0.02726 0.000 0.440 0.000 0.008 0.304 0.248
#> GSM634663 2 0.3164 0.61938 0.000 0.824 0.000 0.004 0.032 0.140
#> GSM634664 4 0.1167 0.74972 0.000 0.008 0.012 0.960 0.000 0.020
#> GSM634665 1 0.5459 0.04977 0.480 0.000 0.436 0.032 0.000 0.052
#> GSM634668 5 0.4944 0.45338 0.000 0.092 0.004 0.012 0.680 0.212
#> GSM634671 1 0.5799 0.54251 0.656 0.000 0.076 0.148 0.008 0.112
#> GSM634672 3 0.0820 0.76452 0.012 0.000 0.972 0.000 0.016 0.000
#> GSM634673 3 0.1816 0.76250 0.004 0.000 0.928 0.004 0.016 0.048
#> GSM634674 2 0.4418 0.56644 0.000 0.728 0.000 0.004 0.128 0.140
#> GSM634675 2 0.4877 0.44065 0.008 0.628 0.000 0.024 0.024 0.316
#> GSM634676 1 0.7370 0.07965 0.376 0.008 0.004 0.168 0.096 0.348
#> GSM634677 2 0.4271 0.47405 0.004 0.664 0.000 0.000 0.032 0.300
#> GSM634678 2 0.5398 0.35866 0.012 0.572 0.000 0.016 0.056 0.344
#> GSM634682 2 0.3010 0.61662 0.000 0.828 0.000 0.020 0.004 0.148
#> GSM634683 2 0.1663 0.64674 0.000 0.912 0.000 0.000 0.000 0.088
#> GSM634684 1 0.6262 0.43672 0.552 0.000 0.004 0.124 0.056 0.264
#> GSM634685 4 0.7955 0.17679 0.000 0.140 0.232 0.324 0.024 0.280
#> GSM634686 1 0.2809 0.63238 0.824 0.000 0.000 0.004 0.004 0.168
#> GSM634687 2 0.1779 0.64804 0.000 0.920 0.000 0.016 0.000 0.064
#> GSM634689 4 0.4409 0.66971 0.000 0.024 0.016 0.776 0.080 0.104
#> GSM634691 2 0.4372 0.46206 0.004 0.652 0.000 0.000 0.036 0.308
#> GSM634692 1 0.3655 0.65312 0.804 0.000 0.020 0.028 0.004 0.144
#> GSM634693 1 0.6062 0.03031 0.448 0.000 0.428 0.040 0.008 0.076
#> GSM634695 2 0.3239 0.61113 0.000 0.816 0.000 0.024 0.008 0.152
#> GSM634696 4 0.3813 0.69055 0.012 0.000 0.036 0.824 0.056 0.072
#> GSM634697 3 0.1870 0.75708 0.004 0.000 0.928 0.044 0.012 0.012
#> GSM634699 4 0.2032 0.73947 0.004 0.004 0.012 0.912 0.000 0.068
#> GSM634700 2 0.4802 0.43041 0.000 0.620 0.000 0.008 0.056 0.316
#> GSM634701 1 0.5120 0.41221 0.612 0.000 0.016 0.000 0.300 0.072
#> GSM634702 5 0.2445 0.72219 0.000 0.000 0.004 0.008 0.868 0.120
#> GSM634703 6 0.6579 0.23509 0.028 0.236 0.000 0.012 0.228 0.496
#> GSM634708 2 0.1285 0.65390 0.000 0.944 0.000 0.004 0.000 0.052
#> GSM634709 1 0.1138 0.67397 0.960 0.000 0.004 0.000 0.012 0.024
#> GSM634710 3 0.4275 0.30814 0.000 0.000 0.592 0.388 0.004 0.016
#> GSM634712 3 0.3051 0.71011 0.000 0.000 0.844 0.112 0.036 0.008
#> GSM634713 2 0.5142 -0.07119 0.000 0.488 0.000 0.428 0.000 0.084
#> GSM634714 3 0.4313 0.70469 0.124 0.000 0.760 0.004 0.012 0.100
#> GSM634716 5 0.3932 0.68931 0.008 0.000 0.184 0.000 0.760 0.048
#> GSM634717 1 0.2389 0.65030 0.864 0.000 0.000 0.008 0.000 0.128
#> GSM634718 6 0.5980 0.21871 0.352 0.164 0.000 0.000 0.012 0.472
#> GSM634719 1 0.4383 0.60429 0.724 0.000 0.008 0.012 0.040 0.216
#> GSM634720 3 0.2537 0.75375 0.024 0.000 0.880 0.000 0.008 0.088
#> GSM634721 4 0.5272 0.22163 0.020 0.000 0.352 0.564 0.000 0.064
#> GSM634722 4 0.4481 0.54293 0.000 0.284 0.000 0.656 0.000 0.060
#> GSM634723 1 0.6337 0.10847 0.452 0.092 0.000 0.072 0.000 0.384
#> GSM634724 3 0.3819 0.29716 0.000 0.000 0.624 0.000 0.372 0.004
#> GSM634725 5 0.3544 0.72927 0.008 0.012 0.032 0.012 0.836 0.100
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 individual(p) k
#> CV:skmeans 91 0.564 2
#> CV:skmeans 88 0.501 3
#> CV:skmeans 67 0.982 4
#> CV:skmeans 79 0.877 5
#> CV:skmeans 67 0.756 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 17698 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.849 0.928 0.964 0.4393 0.575 0.575
#> 3 3 0.679 0.804 0.898 0.3887 0.780 0.633
#> 4 4 0.603 0.786 0.846 0.1894 0.842 0.618
#> 5 5 0.614 0.642 0.779 0.0696 0.822 0.478
#> 6 6 0.646 0.589 0.740 0.0482 0.942 0.759
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
#> GSM634643 1 0.0000 0.957 1.000 0.000
#> GSM634648 1 0.0000 0.957 1.000 0.000
#> GSM634649 1 0.0000 0.957 1.000 0.000
#> GSM634650 1 0.7376 0.768 0.792 0.208
#> GSM634653 1 0.0000 0.957 1.000 0.000
#> GSM634659 1 0.7376 0.771 0.792 0.208
#> GSM634666 2 0.7219 0.769 0.200 0.800
#> GSM634667 2 0.0000 0.975 0.000 1.000
#> GSM634669 1 0.0000 0.957 1.000 0.000
#> GSM634670 1 0.0376 0.956 0.996 0.004
#> GSM634679 1 0.0938 0.954 0.988 0.012
#> GSM634680 1 0.0376 0.956 0.996 0.004
#> GSM634681 1 0.0000 0.957 1.000 0.000
#> GSM634688 2 0.2043 0.956 0.032 0.968
#> GSM634690 2 0.0376 0.976 0.004 0.996
#> GSM634694 1 0.0000 0.957 1.000 0.000
#> GSM634698 1 0.0000 0.957 1.000 0.000
#> GSM634704 1 0.1843 0.940 0.972 0.028
#> GSM634705 1 0.0000 0.957 1.000 0.000
#> GSM634706 1 0.0376 0.956 0.996 0.004
#> GSM634707 1 0.0376 0.956 0.996 0.004
#> GSM634711 1 0.0376 0.956 0.996 0.004
#> GSM634715 1 0.8081 0.721 0.752 0.248
#> GSM634633 1 0.0376 0.956 0.996 0.004
#> GSM634634 2 0.0376 0.974 0.004 0.996
#> GSM634635 1 0.0000 0.957 1.000 0.000
#> GSM634636 1 0.0000 0.957 1.000 0.000
#> GSM634637 1 0.0376 0.956 0.996 0.004
#> GSM634638 2 0.0000 0.975 0.000 1.000
#> GSM634639 1 0.0000 0.957 1.000 0.000
#> GSM634640 2 0.0376 0.976 0.004 0.996
#> GSM634641 1 0.0000 0.957 1.000 0.000
#> GSM634642 2 0.0376 0.976 0.004 0.996
#> GSM634644 2 0.0376 0.976 0.004 0.996
#> GSM634645 1 0.0000 0.957 1.000 0.000
#> GSM634646 1 0.0000 0.957 1.000 0.000
#> GSM634647 1 0.0376 0.956 0.996 0.004
#> GSM634651 2 0.0376 0.976 0.004 0.996
#> GSM634652 2 0.0376 0.976 0.004 0.996
#> GSM634654 1 0.0000 0.957 1.000 0.000
#> GSM634655 1 0.0376 0.956 0.996 0.004
#> GSM634656 1 0.0376 0.956 0.996 0.004
#> GSM634657 1 0.1843 0.940 0.972 0.028
#> GSM634658 1 0.7139 0.780 0.804 0.196
#> GSM634660 1 0.0672 0.955 0.992 0.008
#> GSM634661 2 0.0000 0.975 0.000 1.000
#> GSM634662 1 0.7056 0.789 0.808 0.192
#> GSM634663 2 0.4022 0.908 0.080 0.920
#> GSM634664 2 0.2948 0.939 0.052 0.948
#> GSM634665 1 0.0000 0.957 1.000 0.000
#> GSM634668 2 0.0672 0.974 0.008 0.992
#> GSM634671 1 0.0000 0.957 1.000 0.000
#> GSM634672 1 0.0000 0.957 1.000 0.000
#> GSM634673 1 0.0376 0.956 0.996 0.004
#> GSM634674 2 0.0000 0.975 0.000 1.000
#> GSM634675 2 0.7528 0.740 0.216 0.784
#> GSM634676 1 0.0000 0.957 1.000 0.000
#> GSM634677 2 0.0376 0.976 0.004 0.996
#> GSM634678 1 0.1184 0.949 0.984 0.016
#> GSM634682 2 0.0000 0.975 0.000 1.000
#> GSM634683 2 0.0376 0.976 0.004 0.996
#> GSM634684 1 0.0000 0.957 1.000 0.000
#> GSM634685 1 0.7453 0.767 0.788 0.212
#> GSM634686 1 0.0000 0.957 1.000 0.000
#> GSM634687 2 0.0000 0.975 0.000 1.000
#> GSM634689 2 0.1633 0.964 0.024 0.976
#> GSM634691 2 0.0376 0.976 0.004 0.996
#> GSM634692 1 0.0000 0.957 1.000 0.000
#> GSM634693 1 0.0000 0.957 1.000 0.000
#> GSM634695 2 0.0000 0.975 0.000 1.000
#> GSM634696 1 0.7299 0.772 0.796 0.204
#> GSM634697 1 0.0376 0.956 0.996 0.004
#> GSM634699 1 0.0000 0.957 1.000 0.000
#> GSM634700 2 0.0376 0.976 0.004 0.996
#> GSM634701 1 0.0000 0.957 1.000 0.000
#> GSM634702 1 0.7376 0.771 0.792 0.208
#> GSM634703 1 0.9993 0.136 0.516 0.484
#> GSM634708 2 0.0376 0.976 0.004 0.996
#> GSM634709 1 0.0000 0.957 1.000 0.000
#> GSM634710 1 0.0938 0.954 0.988 0.012
#> GSM634712 1 0.0938 0.954 0.988 0.012
#> GSM634713 2 0.0000 0.975 0.000 1.000
#> GSM634714 1 0.0376 0.956 0.996 0.004
#> GSM634716 1 0.0376 0.956 0.996 0.004
#> GSM634717 1 0.0000 0.957 1.000 0.000
#> GSM634718 1 0.1633 0.942 0.976 0.024
#> GSM634719 1 0.0000 0.957 1.000 0.000
#> GSM634720 1 0.0376 0.956 0.996 0.004
#> GSM634721 1 0.0938 0.952 0.988 0.012
#> GSM634722 2 0.0000 0.975 0.000 1.000
#> GSM634723 1 0.3733 0.904 0.928 0.072
#> GSM634724 1 0.0376 0.956 0.996 0.004
#> GSM634725 1 0.7299 0.776 0.796 0.204
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634648 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634649 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634650 1 0.6151 0.7421 0.764 0.180 0.056
#> GSM634653 3 0.4235 0.7918 0.176 0.000 0.824
#> GSM634659 1 0.7034 0.7301 0.728 0.124 0.148
#> GSM634666 3 0.2860 0.8258 0.084 0.004 0.912
#> GSM634667 2 0.0237 0.9094 0.000 0.996 0.004
#> GSM634669 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634670 1 0.2625 0.8807 0.916 0.000 0.084
#> GSM634679 3 0.1163 0.8109 0.028 0.000 0.972
#> GSM634680 1 0.6252 0.0972 0.556 0.000 0.444
#> GSM634681 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634688 3 0.3998 0.8193 0.056 0.060 0.884
#> GSM634690 2 0.2625 0.8650 0.000 0.916 0.084
#> GSM634694 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634698 1 0.0237 0.9043 0.996 0.004 0.000
#> GSM634704 1 0.1860 0.8889 0.948 0.052 0.000
#> GSM634705 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634706 1 0.0983 0.9025 0.980 0.016 0.004
#> GSM634707 1 0.2625 0.8807 0.916 0.000 0.084
#> GSM634711 1 0.2625 0.8807 0.916 0.000 0.084
#> GSM634715 1 0.6762 0.6154 0.676 0.288 0.036
#> GSM634633 1 0.0661 0.9043 0.988 0.004 0.008
#> GSM634634 3 0.3879 0.7466 0.000 0.152 0.848
#> GSM634635 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634636 1 0.1643 0.8944 0.956 0.000 0.044
#> GSM634637 1 0.2537 0.8816 0.920 0.000 0.080
#> GSM634638 2 0.0424 0.9089 0.000 0.992 0.008
#> GSM634639 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634640 2 0.0237 0.9094 0.000 0.996 0.004
#> GSM634641 1 0.1878 0.8941 0.952 0.004 0.044
#> GSM634642 3 0.3234 0.7981 0.020 0.072 0.908
#> GSM634644 2 0.3682 0.8222 0.008 0.876 0.116
#> GSM634645 1 0.1529 0.8940 0.960 0.000 0.040
#> GSM634646 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634647 3 0.3482 0.8085 0.128 0.000 0.872
#> GSM634651 2 0.0424 0.9096 0.000 0.992 0.008
#> GSM634652 2 0.6180 0.3040 0.000 0.584 0.416
#> GSM634654 1 0.6204 0.1285 0.576 0.000 0.424
#> GSM634655 1 0.3213 0.8754 0.900 0.008 0.092
#> GSM634656 3 0.5905 0.5415 0.352 0.000 0.648
#> GSM634657 1 0.1964 0.8896 0.944 0.056 0.000
#> GSM634658 1 0.4047 0.8012 0.848 0.148 0.004
#> GSM634660 1 0.3207 0.8775 0.904 0.012 0.084
#> GSM634661 2 0.1289 0.9009 0.000 0.968 0.032
#> GSM634662 1 0.5435 0.7903 0.808 0.144 0.048
#> GSM634663 2 0.1482 0.8999 0.012 0.968 0.020
#> GSM634664 3 0.3045 0.8242 0.064 0.020 0.916
#> GSM634665 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634668 3 0.6686 0.3036 0.016 0.372 0.612
#> GSM634671 1 0.2448 0.8643 0.924 0.000 0.076
#> GSM634672 1 0.6274 0.1799 0.544 0.000 0.456
#> GSM634673 3 0.3482 0.8085 0.128 0.000 0.872
#> GSM634674 2 0.2486 0.8819 0.008 0.932 0.060
#> GSM634675 2 0.5823 0.7109 0.144 0.792 0.064
#> GSM634676 1 0.2945 0.8541 0.908 0.004 0.088
#> GSM634677 2 0.2804 0.8761 0.016 0.924 0.060
#> GSM634678 1 0.3207 0.8568 0.904 0.012 0.084
#> GSM634682 2 0.0424 0.9089 0.000 0.992 0.008
#> GSM634683 2 0.0237 0.9094 0.000 0.996 0.004
#> GSM634684 1 0.0424 0.9044 0.992 0.000 0.008
#> GSM634685 3 0.5746 0.7499 0.040 0.180 0.780
#> GSM634686 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634687 2 0.0237 0.9094 0.000 0.996 0.004
#> GSM634689 3 0.2945 0.7871 0.004 0.088 0.908
#> GSM634691 2 0.0592 0.9086 0.000 0.988 0.012
#> GSM634692 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634693 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634695 2 0.0424 0.9089 0.000 0.992 0.008
#> GSM634696 3 0.4384 0.8154 0.064 0.068 0.868
#> GSM634697 3 0.2796 0.8210 0.092 0.000 0.908
#> GSM634699 3 0.4062 0.8000 0.164 0.000 0.836
#> GSM634700 2 0.0424 0.9096 0.000 0.992 0.008
#> GSM634701 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634702 3 0.8046 0.1480 0.396 0.068 0.536
#> GSM634703 1 0.5619 0.6936 0.744 0.244 0.012
#> GSM634708 2 0.0424 0.9095 0.000 0.992 0.008
#> GSM634709 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634710 3 0.1860 0.8245 0.052 0.000 0.948
#> GSM634712 3 0.2878 0.7899 0.096 0.000 0.904
#> GSM634713 2 0.6305 0.1676 0.000 0.516 0.484
#> GSM634714 1 0.0000 0.9047 1.000 0.000 0.000
#> GSM634716 1 0.2625 0.8807 0.916 0.000 0.084
#> GSM634717 1 0.0237 0.9043 0.996 0.004 0.000
#> GSM634718 1 0.1411 0.8974 0.964 0.036 0.000
#> GSM634719 1 0.0237 0.9044 0.996 0.000 0.004
#> GSM634720 1 0.3482 0.8137 0.872 0.000 0.128
#> GSM634721 3 0.2711 0.8252 0.088 0.000 0.912
#> GSM634722 3 0.5098 0.6820 0.000 0.248 0.752
#> GSM634723 1 0.2165 0.8811 0.936 0.064 0.000
#> GSM634724 1 0.2625 0.8807 0.916 0.000 0.084
#> GSM634725 1 0.6659 0.7328 0.752 0.132 0.116
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0779 0.8746 0.980 0.000 0.004 0.016
#> GSM634648 1 0.0779 0.8771 0.980 0.016 0.000 0.004
#> GSM634649 1 0.0188 0.8750 0.996 0.000 0.000 0.004
#> GSM634650 3 0.6329 0.6826 0.120 0.104 0.724 0.052
#> GSM634653 4 0.3659 0.7931 0.136 0.000 0.024 0.840
#> GSM634659 3 0.4148 0.7162 0.012 0.072 0.844 0.072
#> GSM634666 4 0.0804 0.8403 0.008 0.000 0.012 0.980
#> GSM634667 2 0.1978 0.8757 0.000 0.928 0.068 0.004
#> GSM634669 1 0.0469 0.8757 0.988 0.000 0.000 0.012
#> GSM634670 3 0.4644 0.8183 0.228 0.000 0.748 0.024
#> GSM634679 4 0.2335 0.8332 0.020 0.000 0.060 0.920
#> GSM634680 4 0.7083 0.1655 0.432 0.000 0.124 0.444
#> GSM634681 1 0.0188 0.8750 0.996 0.000 0.000 0.004
#> GSM634688 4 0.2141 0.8361 0.012 0.040 0.012 0.936
#> GSM634690 2 0.1798 0.8739 0.000 0.944 0.040 0.016
#> GSM634694 1 0.0779 0.8769 0.980 0.016 0.000 0.004
#> GSM634698 1 0.2335 0.8573 0.920 0.060 0.000 0.020
#> GSM634704 1 0.5140 0.6878 0.760 0.144 0.096 0.000
#> GSM634705 1 0.0779 0.8746 0.980 0.000 0.004 0.016
#> GSM634706 1 0.3264 0.8335 0.876 0.096 0.004 0.024
#> GSM634707 3 0.3172 0.8180 0.160 0.000 0.840 0.000
#> GSM634711 3 0.4328 0.8219 0.244 0.000 0.748 0.008
#> GSM634715 1 0.7904 0.4628 0.584 0.228 0.096 0.092
#> GSM634633 1 0.2060 0.8536 0.932 0.000 0.052 0.016
#> GSM634634 4 0.2706 0.8182 0.000 0.080 0.020 0.900
#> GSM634635 1 0.0188 0.8750 0.996 0.000 0.000 0.004
#> GSM634636 1 0.2882 0.8221 0.892 0.000 0.084 0.024
#> GSM634637 3 0.4567 0.8215 0.244 0.000 0.740 0.016
#> GSM634638 2 0.3052 0.8635 0.000 0.860 0.136 0.004
#> GSM634639 3 0.5039 0.6327 0.404 0.000 0.592 0.004
#> GSM634640 2 0.1938 0.8739 0.000 0.936 0.052 0.012
#> GSM634641 3 0.5182 0.7638 0.304 0.008 0.676 0.012
#> GSM634642 4 0.2820 0.8331 0.020 0.068 0.008 0.904
#> GSM634644 2 0.3909 0.8152 0.016 0.840 0.016 0.128
#> GSM634645 1 0.2799 0.7947 0.884 0.000 0.108 0.008
#> GSM634646 1 0.0188 0.8746 0.996 0.000 0.004 0.000
#> GSM634647 4 0.3778 0.8220 0.052 0.000 0.100 0.848
#> GSM634651 2 0.2401 0.8578 0.000 0.904 0.092 0.004
#> GSM634652 2 0.5290 0.3760 0.000 0.584 0.012 0.404
#> GSM634654 1 0.5838 -0.0161 0.524 0.000 0.032 0.444
#> GSM634655 3 0.3757 0.8150 0.152 0.000 0.828 0.020
#> GSM634656 4 0.6238 0.6063 0.236 0.000 0.112 0.652
#> GSM634657 1 0.5781 0.6857 0.740 0.076 0.160 0.024
#> GSM634658 1 0.2563 0.8489 0.916 0.060 0.012 0.012
#> GSM634660 3 0.2266 0.7834 0.084 0.004 0.912 0.000
#> GSM634661 2 0.1677 0.8769 0.000 0.948 0.040 0.012
#> GSM634662 3 0.5768 0.7277 0.192 0.068 0.724 0.016
#> GSM634663 2 0.4288 0.8288 0.008 0.824 0.124 0.044
#> GSM634664 4 0.1362 0.8387 0.020 0.004 0.012 0.964
#> GSM634665 1 0.1733 0.8704 0.948 0.000 0.024 0.028
#> GSM634668 3 0.3749 0.6875 0.000 0.032 0.840 0.128
#> GSM634671 1 0.2443 0.8554 0.916 0.000 0.024 0.060
#> GSM634672 3 0.5188 0.8091 0.240 0.000 0.716 0.044
#> GSM634673 4 0.4036 0.8063 0.076 0.000 0.088 0.836
#> GSM634674 2 0.4993 0.7808 0.000 0.712 0.260 0.028
#> GSM634675 2 0.5728 0.7491 0.112 0.764 0.072 0.052
#> GSM634676 1 0.3272 0.8132 0.860 0.008 0.004 0.128
#> GSM634677 2 0.2099 0.8619 0.020 0.936 0.004 0.040
#> GSM634678 1 0.5855 0.6365 0.704 0.000 0.160 0.136
#> GSM634682 2 0.3791 0.8455 0.000 0.796 0.200 0.004
#> GSM634683 2 0.0000 0.8722 0.000 1.000 0.000 0.000
#> GSM634684 1 0.1610 0.8720 0.952 0.000 0.016 0.032
#> GSM634685 4 0.5165 0.7867 0.000 0.080 0.168 0.752
#> GSM634686 1 0.0376 0.8750 0.992 0.000 0.004 0.004
#> GSM634687 2 0.1970 0.8741 0.000 0.932 0.060 0.008
#> GSM634689 4 0.2996 0.8291 0.000 0.064 0.044 0.892
#> GSM634691 2 0.1114 0.8686 0.008 0.972 0.004 0.016
#> GSM634692 1 0.0188 0.8750 0.996 0.000 0.000 0.004
#> GSM634693 1 0.1284 0.8689 0.964 0.000 0.024 0.012
#> GSM634695 2 0.2704 0.8659 0.000 0.876 0.124 0.000
#> GSM634696 4 0.3703 0.8301 0.056 0.064 0.012 0.868
#> GSM634697 4 0.3877 0.8183 0.048 0.000 0.112 0.840
#> GSM634699 4 0.3707 0.7926 0.132 0.000 0.028 0.840
#> GSM634700 2 0.3306 0.8449 0.000 0.840 0.156 0.004
#> GSM634701 1 0.1489 0.8616 0.952 0.000 0.044 0.004
#> GSM634702 3 0.2457 0.7236 0.008 0.004 0.912 0.076
#> GSM634703 1 0.6663 0.6039 0.668 0.196 0.112 0.024
#> GSM634708 2 0.0188 0.8729 0.000 0.996 0.000 0.004
#> GSM634709 1 0.0779 0.8746 0.980 0.000 0.004 0.016
#> GSM634710 4 0.1297 0.8393 0.016 0.000 0.020 0.964
#> GSM634712 4 0.4633 0.7503 0.048 0.000 0.172 0.780
#> GSM634713 2 0.6508 0.4664 0.000 0.568 0.088 0.344
#> GSM634714 1 0.2019 0.8631 0.940 0.004 0.032 0.024
#> GSM634716 3 0.3975 0.8232 0.240 0.000 0.760 0.000
#> GSM634717 1 0.1484 0.8727 0.960 0.016 0.004 0.020
#> GSM634718 1 0.3679 0.8019 0.840 0.140 0.004 0.016
#> GSM634719 1 0.0524 0.8751 0.988 0.000 0.004 0.008
#> GSM634720 1 0.5352 0.6566 0.740 0.000 0.092 0.168
#> GSM634721 4 0.4332 0.7732 0.072 0.000 0.112 0.816
#> GSM634722 4 0.4387 0.7485 0.000 0.200 0.024 0.776
#> GSM634723 1 0.3809 0.8334 0.864 0.080 0.024 0.032
#> GSM634724 3 0.4576 0.8225 0.232 0.000 0.748 0.020
#> GSM634725 3 0.6620 0.7465 0.096 0.072 0.708 0.124
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.3558 0.7674 0.832 0.000 0.020 0.020 0.128
#> GSM634648 1 0.0404 0.7665 0.988 0.000 0.012 0.000 0.000
#> GSM634649 1 0.0566 0.7664 0.984 0.000 0.012 0.000 0.004
#> GSM634650 5 0.4085 0.6085 0.008 0.092 0.004 0.084 0.812
#> GSM634653 4 0.3399 0.7788 0.080 0.000 0.048 0.856 0.016
#> GSM634659 5 0.5611 0.6007 0.000 0.040 0.184 0.084 0.692
#> GSM634666 4 0.0162 0.8372 0.004 0.000 0.000 0.996 0.000
#> GSM634667 2 0.1121 0.7729 0.000 0.956 0.000 0.000 0.044
#> GSM634669 1 0.1106 0.7746 0.964 0.000 0.012 0.000 0.024
#> GSM634670 3 0.1478 0.6722 0.064 0.000 0.936 0.000 0.000
#> GSM634679 4 0.2929 0.7365 0.000 0.000 0.180 0.820 0.000
#> GSM634680 3 0.3508 0.6913 0.252 0.000 0.748 0.000 0.000
#> GSM634681 1 0.0693 0.7661 0.980 0.000 0.012 0.000 0.008
#> GSM634688 4 0.0963 0.8351 0.000 0.036 0.000 0.964 0.000
#> GSM634690 2 0.2852 0.7732 0.000 0.828 0.000 0.000 0.172
#> GSM634694 1 0.0566 0.7675 0.984 0.000 0.012 0.000 0.004
#> GSM634698 1 0.4106 0.7515 0.780 0.008 0.008 0.020 0.184
#> GSM634704 5 0.6592 0.3914 0.400 0.116 0.016 0.004 0.464
#> GSM634705 1 0.3463 0.7676 0.836 0.000 0.016 0.020 0.128
#> GSM634706 1 0.4455 0.7068 0.724 0.008 0.004 0.020 0.244
#> GSM634707 1 0.6661 0.1791 0.440 0.000 0.256 0.000 0.304
#> GSM634711 1 0.6100 0.3429 0.500 0.000 0.368 0.000 0.132
#> GSM634715 1 0.7537 0.3595 0.536 0.200 0.008 0.096 0.160
#> GSM634633 1 0.5058 -0.0734 0.576 0.000 0.384 0.000 0.040
#> GSM634634 4 0.1124 0.8335 0.000 0.036 0.000 0.960 0.004
#> GSM634635 1 0.0404 0.7665 0.988 0.000 0.012 0.000 0.000
#> GSM634636 1 0.4781 0.7377 0.760 0.000 0.092 0.020 0.128
#> GSM634637 1 0.6237 0.3435 0.500 0.000 0.364 0.004 0.132
#> GSM634638 2 0.2873 0.7356 0.000 0.856 0.016 0.000 0.128
#> GSM634639 1 0.2771 0.7002 0.860 0.000 0.012 0.000 0.128
#> GSM634640 2 0.0451 0.7748 0.000 0.988 0.000 0.004 0.008
#> GSM634641 1 0.6130 0.6004 0.632 0.004 0.168 0.016 0.180
#> GSM634642 4 0.2554 0.8058 0.020 0.008 0.000 0.896 0.076
#> GSM634644 2 0.4270 0.7081 0.004 0.772 0.000 0.164 0.060
#> GSM634645 1 0.2561 0.7300 0.884 0.000 0.096 0.000 0.020
#> GSM634646 1 0.0579 0.7727 0.984 0.000 0.008 0.000 0.008
#> GSM634647 4 0.4675 0.4897 0.020 0.000 0.336 0.640 0.004
#> GSM634651 2 0.4297 0.0727 0.000 0.528 0.000 0.000 0.472
#> GSM634652 2 0.4249 0.3079 0.000 0.568 0.000 0.432 0.000
#> GSM634654 3 0.5467 0.5077 0.412 0.000 0.524 0.064 0.000
#> GSM634655 3 0.2727 0.5986 0.016 0.000 0.868 0.000 0.116
#> GSM634656 3 0.2852 0.7156 0.172 0.000 0.828 0.000 0.000
#> GSM634657 5 0.5120 0.5724 0.164 0.076 0.012 0.012 0.736
#> GSM634658 1 0.1948 0.7513 0.932 0.036 0.008 0.000 0.024
#> GSM634660 5 0.4441 0.5684 0.044 0.000 0.236 0.000 0.720
#> GSM634661 2 0.3398 0.7546 0.000 0.780 0.000 0.004 0.216
#> GSM634662 5 0.4696 0.6252 0.028 0.020 0.164 0.020 0.768
#> GSM634663 5 0.4920 0.4044 0.000 0.308 0.000 0.048 0.644
#> GSM634664 4 0.0000 0.8369 0.000 0.000 0.000 1.000 0.000
#> GSM634665 1 0.4185 0.7600 0.800 0.000 0.052 0.020 0.128
#> GSM634668 5 0.4994 0.6064 0.000 0.004 0.152 0.124 0.720
#> GSM634671 1 0.3849 0.7632 0.820 0.000 0.052 0.012 0.116
#> GSM634672 3 0.2074 0.7034 0.104 0.000 0.896 0.000 0.000
#> GSM634673 3 0.3844 0.6483 0.044 0.000 0.792 0.164 0.000
#> GSM634674 5 0.5005 0.3885 0.000 0.340 0.020 0.016 0.624
#> GSM634675 5 0.6475 0.0852 0.084 0.376 0.004 0.028 0.508
#> GSM634676 1 0.5019 0.7150 0.732 0.000 0.012 0.128 0.128
#> GSM634677 2 0.3755 0.7651 0.008 0.828 0.004 0.044 0.116
#> GSM634678 5 0.6613 0.4604 0.332 0.004 0.012 0.144 0.508
#> GSM634682 2 0.3759 0.6443 0.000 0.764 0.016 0.000 0.220
#> GSM634683 2 0.2280 0.7716 0.000 0.880 0.000 0.000 0.120
#> GSM634684 1 0.4635 0.7397 0.768 0.000 0.016 0.088 0.128
#> GSM634685 3 0.6020 0.5221 0.000 0.160 0.644 0.172 0.024
#> GSM634686 1 0.0510 0.7704 0.984 0.000 0.016 0.000 0.000
#> GSM634687 2 0.0290 0.7744 0.000 0.992 0.000 0.000 0.008
#> GSM634689 4 0.2745 0.8122 0.000 0.024 0.052 0.896 0.028
#> GSM634691 2 0.2824 0.7680 0.000 0.864 0.000 0.020 0.116
#> GSM634692 1 0.0404 0.7706 0.988 0.000 0.012 0.000 0.000
#> GSM634693 1 0.1670 0.7565 0.936 0.000 0.052 0.000 0.012
#> GSM634695 2 0.3016 0.7306 0.000 0.848 0.020 0.000 0.132
#> GSM634696 4 0.3215 0.8199 0.028 0.044 0.008 0.880 0.040
#> GSM634697 3 0.3134 0.6664 0.032 0.000 0.848 0.120 0.000
#> GSM634699 4 0.4853 0.6918 0.084 0.000 0.052 0.772 0.092
#> GSM634700 5 0.3636 0.3673 0.000 0.272 0.000 0.000 0.728
#> GSM634701 1 0.1012 0.7635 0.968 0.000 0.012 0.000 0.020
#> GSM634702 5 0.4337 0.6027 0.000 0.000 0.196 0.056 0.748
#> GSM634703 5 0.4721 0.5281 0.164 0.068 0.000 0.016 0.752
#> GSM634708 2 0.2389 0.7721 0.000 0.880 0.000 0.004 0.116
#> GSM634709 1 0.3463 0.7676 0.836 0.000 0.016 0.020 0.128
#> GSM634710 4 0.1179 0.8341 0.016 0.000 0.016 0.964 0.004
#> GSM634712 4 0.4538 0.3253 0.008 0.000 0.452 0.540 0.000
#> GSM634713 2 0.5357 0.5329 0.000 0.640 0.000 0.264 0.096
#> GSM634714 3 0.4182 0.5700 0.400 0.000 0.600 0.000 0.000
#> GSM634716 1 0.6092 0.3532 0.504 0.000 0.364 0.000 0.132
#> GSM634717 1 0.3809 0.7599 0.804 0.000 0.016 0.020 0.160
#> GSM634718 1 0.4455 0.7068 0.724 0.008 0.004 0.020 0.244
#> GSM634719 1 0.1630 0.7778 0.944 0.000 0.016 0.004 0.036
#> GSM634720 3 0.4900 0.6547 0.300 0.000 0.656 0.040 0.004
#> GSM634721 4 0.2795 0.8032 0.028 0.000 0.000 0.872 0.100
#> GSM634722 4 0.3452 0.7664 0.000 0.148 0.000 0.820 0.032
#> GSM634723 1 0.5191 0.6946 0.692 0.008 0.036 0.020 0.244
#> GSM634724 3 0.4017 0.5571 0.068 0.000 0.800 0.004 0.128
#> GSM634725 1 0.7009 0.3624 0.516 0.020 0.076 0.048 0.340
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.0260 0.6898 0.992 0.000 0.008 0.000 0.000 0.000
#> GSM634648 1 0.3583 0.6906 0.728 0.008 0.004 0.000 0.000 0.260
#> GSM634649 1 0.3528 0.6668 0.700 0.000 0.004 0.000 0.000 0.296
#> GSM634650 5 0.3329 0.6727 0.064 0.008 0.000 0.016 0.848 0.064
#> GSM634653 4 0.3005 0.7601 0.036 0.000 0.016 0.856 0.000 0.092
#> GSM634659 5 0.6469 0.0669 0.000 0.000 0.124 0.060 0.416 0.400
#> GSM634666 4 0.0000 0.8165 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634667 2 0.3566 0.7719 0.000 0.800 0.000 0.000 0.096 0.104
#> GSM634669 1 0.3109 0.7062 0.772 0.000 0.004 0.000 0.000 0.224
#> GSM634670 3 0.1196 0.5479 0.040 0.000 0.952 0.000 0.000 0.008
#> GSM634679 4 0.3126 0.6682 0.000 0.000 0.248 0.752 0.000 0.000
#> GSM634680 3 0.4503 0.5664 0.100 0.000 0.696 0.000 0.000 0.204
#> GSM634681 1 0.3684 0.6320 0.664 0.000 0.004 0.000 0.000 0.332
#> GSM634688 4 0.0000 0.8165 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634690 2 0.0891 0.7782 0.000 0.968 0.000 0.008 0.024 0.000
#> GSM634694 1 0.3606 0.6875 0.724 0.008 0.004 0.000 0.000 0.264
#> GSM634698 1 0.2145 0.6739 0.900 0.072 0.000 0.000 0.000 0.028
#> GSM634704 5 0.4814 0.5866 0.196 0.052 0.004 0.008 0.716 0.024
#> GSM634705 1 0.0146 0.6913 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM634706 1 0.3050 0.5126 0.764 0.236 0.000 0.000 0.000 0.000
#> GSM634707 6 0.7266 0.3972 0.168 0.000 0.148 0.000 0.272 0.412
#> GSM634711 6 0.6482 0.6455 0.208 0.000 0.368 0.000 0.028 0.396
#> GSM634715 1 0.7882 0.1050 0.488 0.140 0.008 0.108 0.080 0.176
#> GSM634633 3 0.6576 0.1908 0.340 0.000 0.404 0.000 0.032 0.224
#> GSM634634 4 0.1262 0.8126 0.000 0.008 0.000 0.956 0.016 0.020
#> GSM634635 1 0.3405 0.6826 0.724 0.000 0.004 0.000 0.000 0.272
#> GSM634636 1 0.1814 0.6095 0.900 0.000 0.100 0.000 0.000 0.000
#> GSM634637 6 0.6578 0.6459 0.204 0.000 0.364 0.000 0.036 0.396
#> GSM634638 2 0.5859 0.6619 0.000 0.536 0.020 0.000 0.140 0.304
#> GSM634639 6 0.3835 0.1742 0.336 0.000 0.004 0.000 0.004 0.656
#> GSM634640 2 0.4043 0.7558 0.000 0.756 0.000 0.000 0.128 0.116
#> GSM634641 1 0.6598 -0.5239 0.452 0.028 0.112 0.000 0.032 0.376
#> GSM634642 4 0.2278 0.7660 0.000 0.128 0.000 0.868 0.000 0.004
#> GSM634644 2 0.4942 0.7085 0.000 0.704 0.000 0.180 0.064 0.052
#> GSM634645 1 0.4391 0.5234 0.644 0.000 0.028 0.000 0.008 0.320
#> GSM634646 1 0.3271 0.7017 0.760 0.000 0.008 0.000 0.000 0.232
#> GSM634647 4 0.4178 0.5319 0.004 0.000 0.316 0.660 0.004 0.016
#> GSM634651 5 0.3998 0.4728 0.000 0.340 0.000 0.000 0.644 0.016
#> GSM634652 2 0.5129 0.4653 0.000 0.568 0.000 0.364 0.036 0.032
#> GSM634654 3 0.6316 0.4057 0.216 0.000 0.492 0.028 0.000 0.264
#> GSM634655 3 0.2784 0.5264 0.020 0.000 0.876 0.000 0.064 0.040
#> GSM634656 3 0.2905 0.6044 0.064 0.000 0.852 0.000 0.000 0.084
#> GSM634657 5 0.3604 0.6529 0.160 0.000 0.004 0.008 0.796 0.032
#> GSM634658 1 0.4933 0.6047 0.616 0.000 0.004 0.000 0.080 0.300
#> GSM634660 5 0.6072 0.1359 0.032 0.000 0.124 0.000 0.484 0.360
#> GSM634661 2 0.0363 0.7760 0.000 0.988 0.000 0.000 0.012 0.000
#> GSM634662 5 0.3724 0.6521 0.052 0.004 0.076 0.012 0.832 0.024
#> GSM634663 5 0.3792 0.6740 0.000 0.160 0.000 0.052 0.780 0.008
#> GSM634664 4 0.0000 0.8165 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634665 1 0.1391 0.6989 0.944 0.000 0.016 0.000 0.000 0.040
#> GSM634668 5 0.4184 0.6345 0.000 0.000 0.108 0.076 0.780 0.036
#> GSM634671 1 0.2076 0.7015 0.912 0.000 0.016 0.012 0.000 0.060
#> GSM634672 3 0.1649 0.5793 0.032 0.000 0.932 0.000 0.000 0.036
#> GSM634673 3 0.2662 0.5708 0.012 0.000 0.868 0.108 0.004 0.008
#> GSM634674 5 0.3800 0.6653 0.000 0.088 0.032 0.004 0.816 0.060
#> GSM634675 5 0.5911 0.3339 0.160 0.384 0.000 0.008 0.448 0.000
#> GSM634676 1 0.2191 0.6024 0.876 0.000 0.000 0.120 0.004 0.000
#> GSM634677 2 0.0405 0.7733 0.008 0.988 0.000 0.000 0.000 0.004
#> GSM634678 5 0.5322 0.6041 0.116 0.012 0.008 0.104 0.716 0.044
#> GSM634682 2 0.6419 0.5726 0.000 0.468 0.032 0.000 0.204 0.296
#> GSM634683 2 0.0520 0.7768 0.000 0.984 0.000 0.000 0.008 0.008
#> GSM634684 1 0.1931 0.6430 0.916 0.000 0.004 0.068 0.004 0.008
#> GSM634685 3 0.5979 0.4800 0.000 0.004 0.632 0.092 0.116 0.156
#> GSM634686 1 0.3081 0.6996 0.776 0.000 0.004 0.000 0.000 0.220
#> GSM634687 2 0.5425 0.6869 0.000 0.560 0.000 0.000 0.156 0.284
#> GSM634689 4 0.2914 0.7793 0.000 0.084 0.048 0.860 0.008 0.000
#> GSM634691 2 0.0508 0.7717 0.012 0.984 0.000 0.000 0.004 0.000
#> GSM634692 1 0.3050 0.6947 0.764 0.000 0.000 0.000 0.000 0.236
#> GSM634693 1 0.3566 0.6989 0.744 0.000 0.020 0.000 0.000 0.236
#> GSM634695 2 0.4857 0.7384 0.000 0.712 0.032 0.000 0.096 0.160
#> GSM634696 4 0.2738 0.7319 0.176 0.000 0.004 0.820 0.000 0.000
#> GSM634697 3 0.2375 0.5837 0.008 0.000 0.896 0.060 0.000 0.036
#> GSM634699 4 0.3368 0.6944 0.232 0.000 0.012 0.756 0.000 0.000
#> GSM634700 5 0.2762 0.6624 0.000 0.196 0.000 0.000 0.804 0.000
#> GSM634701 1 0.4353 0.5392 0.588 0.000 0.004 0.000 0.020 0.388
#> GSM634702 5 0.6032 0.0786 0.000 0.000 0.140 0.020 0.444 0.396
#> GSM634703 5 0.4996 0.5765 0.200 0.156 0.000 0.000 0.644 0.000
#> GSM634708 2 0.0146 0.7753 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM634709 1 0.0146 0.6913 0.996 0.000 0.004 0.000 0.000 0.000
#> GSM634710 4 0.1225 0.8129 0.004 0.000 0.032 0.956 0.004 0.004
#> GSM634712 4 0.3996 0.3155 0.000 0.000 0.484 0.512 0.000 0.004
#> GSM634713 2 0.6095 0.6826 0.000 0.608 0.000 0.160 0.096 0.136
#> GSM634714 3 0.5455 0.4791 0.172 0.000 0.564 0.000 0.000 0.264
#> GSM634716 6 0.6423 0.6476 0.208 0.000 0.372 0.000 0.024 0.396
#> GSM634717 1 0.1340 0.6701 0.948 0.040 0.004 0.008 0.000 0.000
#> GSM634718 1 0.3076 0.5107 0.760 0.240 0.000 0.000 0.000 0.000
#> GSM634719 1 0.2838 0.7025 0.808 0.000 0.004 0.000 0.000 0.188
#> GSM634720 3 0.5214 0.5196 0.148 0.000 0.624 0.000 0.004 0.224
#> GSM634721 4 0.3602 0.7384 0.116 0.000 0.000 0.796 0.000 0.088
#> GSM634722 4 0.3590 0.7447 0.000 0.092 0.000 0.820 0.068 0.020
#> GSM634723 1 0.2879 0.5801 0.816 0.176 0.000 0.004 0.000 0.004
#> GSM634724 3 0.5179 -0.3362 0.044 0.000 0.536 0.000 0.024 0.396
#> GSM634725 6 0.7596 0.5379 0.184 0.104 0.036 0.052 0.084 0.540
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 individual(p) k
#> CV:pam 92 0.191 2
#> CV:pam 86 0.176 3
#> CV:pam 88 0.465 4
#> CV:pam 76 0.718 5
#> CV:pam 77 0.850 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 17698 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.189 0.571 0.773 0.406 0.497 0.497
#> 3 3 0.223 0.683 0.770 0.223 0.716 0.562
#> 4 4 0.328 0.574 0.714 0.266 0.826 0.676
#> 5 5 0.587 0.610 0.803 0.110 0.811 0.565
#> 6 6 0.629 0.628 0.772 0.117 0.865 0.598
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
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
#> GSM634643 1 0.0672 0.6431 0.992 0.008
#> GSM634648 1 0.8386 0.6469 0.732 0.268
#> GSM634649 1 0.0000 0.6350 1.000 0.000
#> GSM634650 2 1.0000 -0.4277 0.496 0.504
#> GSM634653 2 0.7883 0.6528 0.236 0.764
#> GSM634659 1 0.8713 0.7091 0.708 0.292
#> GSM634666 2 0.7056 0.6988 0.192 0.808
#> GSM634667 2 0.3584 0.6373 0.068 0.932
#> GSM634669 1 0.2948 0.6737 0.948 0.052
#> GSM634670 2 0.7056 0.6988 0.192 0.808
#> GSM634679 2 0.7056 0.6988 0.192 0.808
#> GSM634680 2 0.7056 0.6988 0.192 0.808
#> GSM634681 1 0.0672 0.6430 0.992 0.008
#> GSM634688 2 0.1843 0.6580 0.028 0.972
#> GSM634690 2 0.4022 0.6332 0.080 0.920
#> GSM634694 1 0.6438 0.7173 0.836 0.164
#> GSM634698 1 0.2603 0.6670 0.956 0.044
#> GSM634704 1 0.9044 0.6922 0.680 0.320
#> GSM634705 1 0.2603 0.6669 0.956 0.044
#> GSM634706 1 0.8813 0.7046 0.700 0.300
#> GSM634707 1 0.8955 0.6954 0.688 0.312
#> GSM634711 1 0.8955 0.6954 0.688 0.312
#> GSM634715 2 1.0000 -0.4277 0.496 0.504
#> GSM634633 1 0.8955 0.6954 0.688 0.312
#> GSM634634 2 0.7056 0.6988 0.192 0.808
#> GSM634635 1 0.0000 0.6350 1.000 0.000
#> GSM634636 1 0.1414 0.6526 0.980 0.020
#> GSM634637 1 0.8661 0.7112 0.712 0.288
#> GSM634638 2 0.3431 0.6382 0.064 0.936
#> GSM634639 1 0.0672 0.6431 0.992 0.008
#> GSM634640 2 0.4161 0.6310 0.084 0.916
#> GSM634641 1 0.5842 0.7113 0.860 0.140
#> GSM634642 2 0.6712 0.6982 0.176 0.824
#> GSM634644 2 0.3431 0.6382 0.064 0.936
#> GSM634645 1 0.6343 0.7166 0.840 0.160
#> GSM634646 1 0.9170 0.6412 0.668 0.332
#> GSM634647 2 0.7056 0.6988 0.192 0.808
#> GSM634651 2 0.9998 -0.4203 0.492 0.508
#> GSM634652 2 0.0000 0.6426 0.000 1.000
#> GSM634654 2 0.7299 0.6892 0.204 0.796
#> GSM634655 2 0.8813 0.5769 0.300 0.700
#> GSM634656 2 0.7056 0.6988 0.192 0.808
#> GSM634657 1 1.0000 0.4206 0.504 0.496
#> GSM634658 1 0.1414 0.6526 0.980 0.020
#> GSM634660 1 0.8955 0.6954 0.688 0.312
#> GSM634661 2 0.9170 0.0981 0.332 0.668
#> GSM634662 1 0.9000 0.6941 0.684 0.316
#> GSM634663 2 1.0000 -0.4277 0.496 0.504
#> GSM634664 2 0.3879 0.6772 0.076 0.924
#> GSM634665 1 0.9552 0.6172 0.624 0.376
#> GSM634668 1 0.8955 0.6954 0.688 0.312
#> GSM634671 1 0.9552 0.6172 0.624 0.376
#> GSM634672 2 0.7139 0.6961 0.196 0.804
#> GSM634673 2 0.7056 0.6988 0.192 0.808
#> GSM634674 1 1.0000 0.4115 0.500 0.500
#> GSM634675 1 0.9358 0.6660 0.648 0.352
#> GSM634676 1 0.7883 0.7206 0.764 0.236
#> GSM634677 1 0.9608 0.6263 0.616 0.384
#> GSM634678 1 0.8955 0.6954 0.688 0.312
#> GSM634682 2 0.3431 0.6382 0.064 0.936
#> GSM634683 2 1.0000 -0.4277 0.496 0.504
#> GSM634684 1 0.2236 0.6643 0.964 0.036
#> GSM634685 2 0.7883 0.6558 0.236 0.764
#> GSM634686 1 0.3879 0.6864 0.924 0.076
#> GSM634687 2 0.4161 0.6310 0.084 0.916
#> GSM634689 2 0.7056 0.6988 0.192 0.808
#> GSM634691 2 1.0000 -0.4366 0.500 0.500
#> GSM634692 1 0.6247 0.7168 0.844 0.156
#> GSM634693 1 0.9580 0.6096 0.620 0.380
#> GSM634695 2 0.4022 0.6332 0.080 0.920
#> GSM634696 2 0.9044 0.4893 0.320 0.680
#> GSM634697 2 0.7056 0.6988 0.192 0.808
#> GSM634699 2 0.7056 0.6988 0.192 0.808
#> GSM634700 1 0.9998 0.4296 0.508 0.492
#> GSM634701 1 0.5946 0.7129 0.856 0.144
#> GSM634702 1 0.8955 0.6954 0.688 0.312
#> GSM634703 1 0.9833 0.5497 0.576 0.424
#> GSM634708 2 1.0000 -0.4277 0.496 0.504
#> GSM634709 1 0.0000 0.6350 1.000 0.000
#> GSM634710 2 0.7056 0.6988 0.192 0.808
#> GSM634712 2 0.7056 0.6988 0.192 0.808
#> GSM634713 2 0.0000 0.6426 0.000 1.000
#> GSM634714 1 0.9460 0.6116 0.636 0.364
#> GSM634716 1 0.8955 0.6954 0.688 0.312
#> GSM634717 1 0.0672 0.6430 0.992 0.008
#> GSM634718 1 0.8608 0.7138 0.716 0.284
#> GSM634719 1 0.3431 0.6778 0.936 0.064
#> GSM634720 2 0.7056 0.6988 0.192 0.808
#> GSM634721 2 0.7139 0.6962 0.196 0.804
#> GSM634722 2 0.0000 0.6426 0.000 1.000
#> GSM634723 1 0.9580 0.6139 0.620 0.380
#> GSM634724 1 0.9393 0.6300 0.644 0.356
#> GSM634725 1 0.8608 0.7126 0.716 0.284
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.141 0.8043 0.964 0.036 0.000
#> GSM634648 1 0.200 0.8077 0.952 0.036 0.012
#> GSM634649 1 0.175 0.7966 0.952 0.048 0.000
#> GSM634650 1 0.758 0.4339 0.604 0.340 0.056
#> GSM634653 1 0.375 0.7852 0.856 0.000 0.144
#> GSM634659 1 0.566 0.7919 0.804 0.128 0.068
#> GSM634666 3 0.592 0.6979 0.276 0.012 0.712
#> GSM634667 2 0.550 0.7903 0.084 0.816 0.100
#> GSM634669 1 0.101 0.8145 0.980 0.012 0.008
#> GSM634670 3 0.516 0.6954 0.140 0.040 0.820
#> GSM634679 3 0.429 0.7219 0.180 0.000 0.820
#> GSM634680 3 0.641 0.7119 0.248 0.036 0.716
#> GSM634681 1 0.153 0.8002 0.960 0.040 0.000
#> GSM634688 3 0.811 0.5250 0.108 0.272 0.620
#> GSM634690 2 0.846 -0.0173 0.444 0.468 0.088
#> GSM634694 1 0.244 0.8207 0.940 0.032 0.028
#> GSM634698 1 0.153 0.8024 0.960 0.040 0.000
#> GSM634704 1 0.563 0.7585 0.800 0.144 0.056
#> GSM634705 1 0.199 0.7985 0.948 0.048 0.004
#> GSM634706 1 0.437 0.7971 0.864 0.096 0.040
#> GSM634707 1 0.530 0.7953 0.824 0.068 0.108
#> GSM634711 1 0.497 0.7923 0.840 0.060 0.100
#> GSM634715 1 0.762 0.5567 0.648 0.272 0.080
#> GSM634633 1 0.383 0.8009 0.868 0.008 0.124
#> GSM634634 3 0.377 0.6821 0.112 0.012 0.876
#> GSM634635 1 0.175 0.7966 0.952 0.048 0.000
#> GSM634636 1 0.103 0.8093 0.976 0.024 0.000
#> GSM634637 1 0.515 0.7915 0.832 0.068 0.100
#> GSM634638 2 0.464 0.7662 0.036 0.848 0.116
#> GSM634639 1 0.116 0.8080 0.972 0.028 0.000
#> GSM634640 2 0.565 0.7782 0.108 0.808 0.084
#> GSM634641 1 0.228 0.8201 0.940 0.008 0.052
#> GSM634642 3 0.844 0.6078 0.192 0.188 0.620
#> GSM634644 2 0.753 0.6223 0.088 0.668 0.244
#> GSM634645 1 0.329 0.8101 0.900 0.012 0.088
#> GSM634646 1 0.346 0.8127 0.900 0.024 0.076
#> GSM634647 3 0.226 0.6258 0.068 0.000 0.932
#> GSM634651 1 0.825 0.2477 0.528 0.392 0.080
#> GSM634652 3 0.708 0.3392 0.036 0.336 0.628
#> GSM634654 1 0.559 0.5319 0.696 0.000 0.304
#> GSM634655 1 0.652 0.7499 0.760 0.108 0.132
#> GSM634656 3 0.216 0.6236 0.064 0.000 0.936
#> GSM634657 1 0.726 0.6127 0.680 0.248 0.072
#> GSM634658 1 0.103 0.8095 0.976 0.024 0.000
#> GSM634660 1 0.526 0.8017 0.828 0.080 0.092
#> GSM634661 1 0.840 -0.0205 0.460 0.456 0.084
#> GSM634662 1 0.552 0.7808 0.796 0.164 0.040
#> GSM634663 1 0.759 0.5154 0.632 0.300 0.068
#> GSM634664 3 0.808 0.5942 0.128 0.232 0.640
#> GSM634665 1 0.341 0.7973 0.876 0.000 0.124
#> GSM634668 1 0.570 0.7873 0.800 0.136 0.064
#> GSM634671 1 0.341 0.7973 0.876 0.000 0.124
#> GSM634672 3 0.595 0.5823 0.360 0.000 0.640
#> GSM634673 3 0.605 0.7220 0.204 0.040 0.756
#> GSM634674 1 0.742 0.5789 0.632 0.312 0.056
#> GSM634675 1 0.681 0.6767 0.720 0.212 0.068
#> GSM634676 1 0.362 0.8156 0.896 0.032 0.072
#> GSM634677 1 0.698 0.6692 0.712 0.212 0.076
#> GSM634678 1 0.509 0.7891 0.836 0.092 0.072
#> GSM634682 2 0.464 0.7662 0.036 0.848 0.116
#> GSM634683 1 0.797 0.3319 0.560 0.372 0.068
#> GSM634684 1 0.103 0.8095 0.976 0.024 0.000
#> GSM634685 3 0.681 0.3342 0.044 0.268 0.688
#> GSM634686 1 0.165 0.8074 0.960 0.036 0.004
#> GSM634687 2 0.558 0.7857 0.100 0.812 0.088
#> GSM634689 3 0.689 0.6856 0.256 0.052 0.692
#> GSM634691 1 0.738 0.6069 0.672 0.252 0.076
#> GSM634692 1 0.234 0.8175 0.940 0.012 0.048
#> GSM634693 1 0.348 0.7963 0.872 0.000 0.128
#> GSM634695 2 0.482 0.7760 0.048 0.844 0.108
#> GSM634696 1 0.362 0.7907 0.864 0.000 0.136
#> GSM634697 3 0.465 0.7277 0.208 0.000 0.792
#> GSM634699 3 0.771 0.6897 0.264 0.088 0.648
#> GSM634700 1 0.731 0.6324 0.684 0.236 0.080
#> GSM634701 1 0.158 0.8179 0.964 0.008 0.028
#> GSM634702 1 0.579 0.7928 0.800 0.116 0.084
#> GSM634703 1 0.576 0.7734 0.800 0.124 0.076
#> GSM634708 1 0.812 0.2518 0.532 0.396 0.072
#> GSM634709 1 0.175 0.7966 0.952 0.048 0.000
#> GSM634710 3 0.536 0.6986 0.276 0.000 0.724
#> GSM634712 3 0.429 0.7219 0.180 0.000 0.820
#> GSM634713 3 0.708 0.3392 0.036 0.336 0.628
#> GSM634714 1 0.334 0.7993 0.880 0.000 0.120
#> GSM634716 1 0.497 0.7923 0.840 0.060 0.100
#> GSM634717 1 0.129 0.8071 0.968 0.032 0.000
#> GSM634718 1 0.515 0.7906 0.832 0.100 0.068
#> GSM634719 1 0.103 0.8095 0.976 0.024 0.000
#> GSM634720 3 0.749 0.3453 0.464 0.036 0.500
#> GSM634721 1 0.606 0.2559 0.616 0.000 0.384
#> GSM634722 3 0.708 0.3392 0.036 0.336 0.628
#> GSM634723 1 0.563 0.7826 0.808 0.116 0.076
#> GSM634724 1 0.454 0.8014 0.836 0.016 0.148
#> GSM634725 1 0.341 0.8074 0.876 0.000 0.124
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.1118 0.742 0.964 0.000 0.036 0.000
#> GSM634648 1 0.4117 0.708 0.840 0.024 0.112 0.024
#> GSM634649 1 0.1584 0.740 0.952 0.000 0.036 0.012
#> GSM634650 1 0.7496 0.346 0.548 0.316 0.032 0.104
#> GSM634653 1 0.6176 0.559 0.652 0.036 0.284 0.028
#> GSM634659 1 0.7336 0.648 0.648 0.108 0.076 0.168
#> GSM634666 4 0.8072 0.135 0.216 0.012 0.384 0.388
#> GSM634667 2 0.4344 0.538 0.000 0.816 0.076 0.108
#> GSM634669 1 0.1394 0.761 0.964 0.016 0.012 0.008
#> GSM634670 3 0.1867 0.622 0.072 0.000 0.928 0.000
#> GSM634679 3 0.4937 0.589 0.072 0.004 0.780 0.144
#> GSM634680 3 0.3182 0.619 0.132 0.004 0.860 0.004
#> GSM634681 1 0.3138 0.735 0.896 0.024 0.060 0.020
#> GSM634688 4 0.8176 0.639 0.084 0.136 0.216 0.564
#> GSM634690 2 0.4857 0.593 0.048 0.808 0.032 0.112
#> GSM634694 1 0.1394 0.762 0.964 0.016 0.012 0.008
#> GSM634698 1 0.1796 0.743 0.948 0.004 0.032 0.016
#> GSM634704 1 0.5968 0.505 0.624 0.328 0.008 0.040
#> GSM634705 1 0.1888 0.741 0.940 0.000 0.044 0.016
#> GSM634706 1 0.4175 0.685 0.776 0.212 0.000 0.012
#> GSM634707 1 0.7325 0.671 0.656 0.092 0.108 0.144
#> GSM634711 1 0.6593 0.662 0.664 0.024 0.220 0.092
#> GSM634715 1 0.7106 0.481 0.564 0.332 0.076 0.028
#> GSM634633 1 0.6122 0.716 0.736 0.052 0.132 0.080
#> GSM634634 4 0.6478 0.261 0.044 0.012 0.448 0.496
#> GSM634635 1 0.1706 0.739 0.948 0.000 0.036 0.016
#> GSM634636 1 0.1369 0.759 0.964 0.004 0.016 0.016
#> GSM634637 1 0.6710 0.689 0.684 0.052 0.180 0.084
#> GSM634638 2 0.6957 0.351 0.000 0.580 0.248 0.172
#> GSM634639 1 0.0844 0.758 0.980 0.004 0.012 0.004
#> GSM634640 2 0.3818 0.560 0.000 0.844 0.048 0.108
#> GSM634641 1 0.3538 0.746 0.868 0.044 0.084 0.004
#> GSM634642 4 0.9092 0.566 0.104 0.244 0.200 0.452
#> GSM634644 2 0.6810 0.421 0.048 0.676 0.180 0.096
#> GSM634645 1 0.3292 0.740 0.868 0.004 0.112 0.016
#> GSM634646 1 0.5587 0.679 0.740 0.028 0.188 0.044
#> GSM634647 3 0.5166 0.498 0.044 0.004 0.736 0.216
#> GSM634651 2 0.2796 0.608 0.096 0.892 0.004 0.008
#> GSM634652 4 0.7468 0.589 0.000 0.228 0.268 0.504
#> GSM634654 3 0.5997 0.340 0.368 0.028 0.592 0.012
#> GSM634655 1 0.7687 0.423 0.508 0.048 0.360 0.084
#> GSM634656 3 0.5083 0.496 0.040 0.004 0.740 0.216
#> GSM634657 1 0.5943 0.224 0.504 0.464 0.004 0.028
#> GSM634658 1 0.1114 0.761 0.972 0.008 0.016 0.004
#> GSM634660 1 0.7297 0.658 0.652 0.096 0.084 0.168
#> GSM634661 2 0.2186 0.605 0.048 0.932 0.012 0.008
#> GSM634662 1 0.7584 0.597 0.616 0.192 0.060 0.132
#> GSM634663 2 0.5168 -0.187 0.492 0.504 0.000 0.004
#> GSM634664 4 0.7979 0.617 0.092 0.092 0.248 0.568
#> GSM634665 1 0.6206 0.601 0.672 0.028 0.252 0.048
#> GSM634668 1 0.7360 0.652 0.644 0.120 0.068 0.168
#> GSM634671 1 0.5571 0.639 0.712 0.028 0.236 0.024
#> GSM634672 3 0.4178 0.589 0.160 0.020 0.812 0.008
#> GSM634673 3 0.2081 0.629 0.084 0.000 0.916 0.000
#> GSM634674 1 0.8057 0.316 0.480 0.360 0.056 0.104
#> GSM634675 2 0.5337 0.163 0.424 0.564 0.000 0.012
#> GSM634676 1 0.2553 0.759 0.916 0.016 0.060 0.008
#> GSM634677 2 0.5285 0.391 0.352 0.632 0.004 0.012
#> GSM634678 1 0.5394 0.639 0.696 0.268 0.012 0.024
#> GSM634682 2 0.6957 0.351 0.000 0.580 0.248 0.172
#> GSM634683 2 0.4149 0.605 0.168 0.804 0.000 0.028
#> GSM634684 1 0.1247 0.761 0.968 0.012 0.016 0.004
#> GSM634685 3 0.6764 0.355 0.040 0.096 0.672 0.192
#> GSM634686 1 0.1584 0.745 0.952 0.012 0.036 0.000
#> GSM634687 2 0.4171 0.548 0.000 0.824 0.060 0.116
#> GSM634689 4 0.8979 0.451 0.092 0.156 0.368 0.384
#> GSM634691 2 0.4785 0.531 0.264 0.720 0.004 0.012
#> GSM634692 1 0.0967 0.760 0.976 0.004 0.016 0.004
#> GSM634693 1 0.6288 0.587 0.660 0.028 0.264 0.048
#> GSM634695 2 0.6875 0.395 0.008 0.616 0.236 0.140
#> GSM634696 1 0.5895 0.592 0.676 0.032 0.268 0.024
#> GSM634697 3 0.4756 0.591 0.072 0.000 0.784 0.144
#> GSM634699 4 0.8315 0.425 0.180 0.048 0.268 0.504
#> GSM634700 2 0.3992 0.583 0.188 0.800 0.004 0.008
#> GSM634701 1 0.1262 0.761 0.968 0.008 0.016 0.008
#> GSM634702 1 0.7654 0.640 0.620 0.128 0.076 0.176
#> GSM634703 1 0.5328 0.557 0.660 0.316 0.004 0.020
#> GSM634708 2 0.4010 0.619 0.100 0.836 0.000 0.064
#> GSM634709 1 0.1706 0.739 0.948 0.000 0.036 0.016
#> GSM634710 3 0.6684 0.454 0.228 0.004 0.628 0.140
#> GSM634712 3 0.4756 0.591 0.072 0.000 0.784 0.144
#> GSM634713 4 0.7309 0.603 0.000 0.200 0.272 0.528
#> GSM634714 1 0.6158 0.597 0.664 0.040 0.268 0.028
#> GSM634716 1 0.6687 0.659 0.660 0.028 0.220 0.092
#> GSM634717 1 0.1484 0.750 0.960 0.004 0.020 0.016
#> GSM634718 1 0.4098 0.686 0.784 0.204 0.000 0.012
#> GSM634719 1 0.0804 0.761 0.980 0.012 0.008 0.000
#> GSM634720 3 0.5404 0.390 0.328 0.028 0.644 0.000
#> GSM634721 1 0.6515 0.119 0.524 0.028 0.420 0.028
#> GSM634722 4 0.7328 0.606 0.000 0.200 0.276 0.524
#> GSM634723 1 0.4912 0.715 0.800 0.108 0.076 0.016
#> GSM634724 1 0.7334 0.307 0.476 0.048 0.424 0.052
#> GSM634725 1 0.6365 0.697 0.692 0.084 0.196 0.028
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634648 1 0.0404 0.8471 0.988 0.000 0.012 0.000 0.000
#> GSM634649 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634650 2 0.6838 0.4501 0.308 0.480 0.016 0.000 0.196
#> GSM634653 1 0.1547 0.8384 0.948 0.004 0.032 0.016 0.000
#> GSM634659 1 0.6079 0.2657 0.560 0.360 0.036 0.016 0.028
#> GSM634666 4 0.3891 0.6532 0.172 0.008 0.028 0.792 0.000
#> GSM634667 5 0.4633 0.8176 0.000 0.348 0.016 0.004 0.632
#> GSM634669 1 0.1544 0.8182 0.932 0.068 0.000 0.000 0.000
#> GSM634670 3 0.1117 0.7883 0.016 0.000 0.964 0.020 0.000
#> GSM634679 3 0.1278 0.7837 0.016 0.000 0.960 0.020 0.004
#> GSM634680 3 0.1357 0.7892 0.048 0.000 0.948 0.004 0.000
#> GSM634681 1 0.0290 0.8476 0.992 0.000 0.008 0.000 0.000
#> GSM634688 4 0.4011 0.7520 0.016 0.008 0.024 0.808 0.144
#> GSM634690 2 0.4714 -0.3212 0.000 0.608 0.016 0.004 0.372
#> GSM634694 1 0.1121 0.8306 0.956 0.044 0.000 0.000 0.000
#> GSM634698 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634704 2 0.5124 0.4240 0.380 0.588 0.012 0.008 0.012
#> GSM634705 1 0.0324 0.8472 0.992 0.000 0.004 0.000 0.004
#> GSM634706 2 0.4276 0.4691 0.380 0.616 0.000 0.000 0.004
#> GSM634707 1 0.5998 0.4180 0.612 0.300 0.044 0.016 0.028
#> GSM634711 1 0.4537 0.6861 0.756 0.008 0.192 0.012 0.032
#> GSM634715 2 0.5580 0.5232 0.308 0.620 0.032 0.000 0.040
#> GSM634633 1 0.4006 0.7412 0.816 0.116 0.040 0.000 0.028
#> GSM634634 4 0.1644 0.6882 0.004 0.000 0.048 0.940 0.008
#> GSM634635 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634636 1 0.0162 0.8473 0.996 0.004 0.000 0.000 0.000
#> GSM634637 1 0.5388 0.6497 0.720 0.060 0.180 0.012 0.028
#> GSM634638 5 0.2331 0.7007 0.000 0.068 0.016 0.008 0.908
#> GSM634639 1 0.0000 0.8476 1.000 0.000 0.000 0.000 0.000
#> GSM634640 5 0.4633 0.8176 0.000 0.348 0.016 0.004 0.632
#> GSM634641 1 0.3567 0.7052 0.820 0.144 0.032 0.004 0.000
#> GSM634642 4 0.4762 0.5757 0.016 0.260 0.020 0.700 0.004
#> GSM634644 2 0.6162 -0.2591 0.004 0.612 0.016 0.124 0.244
#> GSM634645 1 0.0451 0.8483 0.988 0.000 0.008 0.000 0.004
#> GSM634646 1 0.0727 0.8450 0.980 0.000 0.012 0.004 0.004
#> GSM634647 3 0.3475 0.7084 0.004 0.000 0.804 0.180 0.012
#> GSM634651 2 0.3252 0.2648 0.008 0.828 0.008 0.000 0.156
#> GSM634652 4 0.4542 0.6845 0.000 0.020 0.020 0.724 0.236
#> GSM634654 1 0.4632 0.2520 0.608 0.004 0.376 0.012 0.000
#> GSM634655 1 0.6427 0.5586 0.636 0.108 0.200 0.008 0.048
#> GSM634656 3 0.3399 0.7133 0.004 0.000 0.812 0.172 0.012
#> GSM634657 2 0.4861 0.5642 0.252 0.700 0.012 0.004 0.032
#> GSM634658 1 0.0451 0.8466 0.988 0.004 0.008 0.000 0.000
#> GSM634660 1 0.6176 0.2935 0.564 0.348 0.044 0.016 0.028
#> GSM634661 2 0.2674 0.2945 0.004 0.856 0.000 0.000 0.140
#> GSM634662 2 0.5709 0.5168 0.312 0.616 0.024 0.008 0.040
#> GSM634663 2 0.2301 0.4638 0.064 0.912 0.004 0.004 0.016
#> GSM634664 4 0.4109 0.7531 0.024 0.008 0.024 0.808 0.136
#> GSM634665 1 0.1404 0.8398 0.956 0.004 0.028 0.008 0.004
#> GSM634668 2 0.5995 0.3681 0.376 0.548 0.040 0.008 0.028
#> GSM634671 1 0.1725 0.8380 0.944 0.004 0.024 0.024 0.004
#> GSM634672 3 0.1484 0.7883 0.048 0.000 0.944 0.008 0.000
#> GSM634673 3 0.0963 0.7918 0.036 0.000 0.964 0.000 0.000
#> GSM634674 2 0.5827 0.5593 0.268 0.644 0.036 0.012 0.040
#> GSM634675 2 0.1741 0.4160 0.024 0.936 0.000 0.000 0.040
#> GSM634676 1 0.0932 0.8444 0.972 0.020 0.004 0.004 0.000
#> GSM634677 2 0.2036 0.4053 0.024 0.920 0.000 0.000 0.056
#> GSM634678 2 0.4925 0.5061 0.340 0.628 0.004 0.004 0.024
#> GSM634682 5 0.2390 0.6952 0.000 0.060 0.024 0.008 0.908
#> GSM634683 2 0.3430 0.1417 0.000 0.776 0.004 0.000 0.220
#> GSM634684 1 0.0854 0.8461 0.976 0.004 0.008 0.012 0.000
#> GSM634685 3 0.7067 0.1727 0.004 0.004 0.364 0.340 0.288
#> GSM634686 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634687 5 0.4633 0.8176 0.000 0.348 0.016 0.004 0.632
#> GSM634689 4 0.5669 0.4536 0.000 0.320 0.052 0.604 0.024
#> GSM634691 2 0.3055 0.3042 0.016 0.840 0.000 0.000 0.144
#> GSM634692 1 0.0451 0.8466 0.988 0.004 0.008 0.000 0.000
#> GSM634693 1 0.2880 0.7651 0.864 0.004 0.120 0.008 0.004
#> GSM634695 2 0.5050 -0.1072 0.000 0.496 0.024 0.004 0.476
#> GSM634696 1 0.1329 0.8399 0.956 0.004 0.032 0.008 0.000
#> GSM634697 3 0.1211 0.7917 0.024 0.000 0.960 0.016 0.000
#> GSM634699 4 0.3525 0.6647 0.156 0.004 0.024 0.816 0.000
#> GSM634700 2 0.2416 0.3466 0.012 0.888 0.000 0.000 0.100
#> GSM634701 1 0.0324 0.8473 0.992 0.004 0.004 0.000 0.000
#> GSM634702 1 0.6124 0.2830 0.564 0.352 0.040 0.016 0.028
#> GSM634703 2 0.4151 0.5199 0.344 0.652 0.000 0.000 0.004
#> GSM634708 2 0.3809 0.0167 0.000 0.736 0.008 0.000 0.256
#> GSM634709 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634710 3 0.4401 0.5102 0.296 0.004 0.684 0.016 0.000
#> GSM634712 3 0.1018 0.7875 0.016 0.000 0.968 0.016 0.000
#> GSM634713 4 0.4166 0.7242 0.000 0.020 0.020 0.772 0.188
#> GSM634714 1 0.2011 0.8069 0.908 0.004 0.088 0.000 0.000
#> GSM634716 1 0.4674 0.6859 0.756 0.016 0.184 0.012 0.032
#> GSM634717 1 0.0162 0.8475 0.996 0.000 0.004 0.000 0.000
#> GSM634718 2 0.4299 0.4584 0.388 0.608 0.000 0.000 0.004
#> GSM634719 1 0.0451 0.8466 0.988 0.004 0.008 0.000 0.000
#> GSM634720 1 0.4166 0.3792 0.648 0.004 0.348 0.000 0.000
#> GSM634721 1 0.1679 0.8321 0.940 0.004 0.048 0.004 0.004
#> GSM634722 4 0.4037 0.7287 0.000 0.016 0.020 0.780 0.184
#> GSM634723 1 0.5217 0.2914 0.636 0.312 0.020 0.032 0.000
#> GSM634724 3 0.4705 0.1403 0.404 0.000 0.580 0.012 0.004
#> GSM634725 1 0.5457 0.5274 0.672 0.248 0.052 0.004 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.0858 0.7670 0.968 0.000 0.000 0.004 0.028 0.000
#> GSM634648 1 0.1642 0.7611 0.936 0.000 0.000 0.004 0.028 0.032
#> GSM634649 1 0.0858 0.7670 0.968 0.000 0.000 0.004 0.028 0.000
#> GSM634650 5 0.6269 0.4803 0.020 0.232 0.000 0.044 0.584 0.120
#> GSM634653 1 0.4455 0.7175 0.792 0.008 0.028 0.072 0.024 0.076
#> GSM634659 5 0.1663 0.6535 0.088 0.000 0.000 0.000 0.912 0.000
#> GSM634666 4 0.2970 0.7051 0.052 0.040 0.024 0.876 0.004 0.004
#> GSM634667 2 0.3969 0.4825 0.000 0.668 0.000 0.020 0.000 0.312
#> GSM634669 1 0.4442 -0.0577 0.536 0.020 0.004 0.000 0.440 0.000
#> GSM634670 3 0.1080 0.7892 0.004 0.000 0.960 0.000 0.032 0.004
#> GSM634679 3 0.2821 0.7545 0.000 0.000 0.832 0.016 0.152 0.000
#> GSM634680 3 0.2941 0.7987 0.124 0.012 0.848 0.000 0.012 0.004
#> GSM634681 1 0.0922 0.7707 0.968 0.000 0.000 0.004 0.024 0.004
#> GSM634688 4 0.1553 0.7573 0.008 0.012 0.004 0.944 0.000 0.032
#> GSM634690 2 0.3290 0.5924 0.000 0.776 0.000 0.016 0.000 0.208
#> GSM634694 1 0.3955 -0.0378 0.560 0.000 0.004 0.000 0.436 0.000
#> GSM634698 1 0.0692 0.7693 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM634704 5 0.5667 0.6241 0.088 0.204 0.000 0.072 0.636 0.000
#> GSM634705 1 0.1478 0.7686 0.944 0.000 0.000 0.004 0.020 0.032
#> GSM634706 5 0.5865 0.5748 0.228 0.296 0.000 0.000 0.476 0.000
#> GSM634707 5 0.1908 0.6406 0.096 0.000 0.004 0.000 0.900 0.000
#> GSM634711 1 0.5133 0.3854 0.536 0.000 0.076 0.004 0.384 0.000
#> GSM634715 5 0.4494 0.6604 0.048 0.184 0.000 0.000 0.732 0.036
#> GSM634633 5 0.4504 0.4675 0.308 0.032 0.012 0.000 0.648 0.000
#> GSM634634 4 0.3868 0.6743 0.004 0.000 0.140 0.784 0.004 0.068
#> GSM634635 1 0.0692 0.7683 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM634636 1 0.0951 0.7686 0.968 0.008 0.004 0.000 0.020 0.000
#> GSM634637 1 0.4878 0.3224 0.516 0.000 0.060 0.000 0.424 0.000
#> GSM634638 6 0.3017 0.7262 0.000 0.132 0.016 0.008 0.004 0.840
#> GSM634639 1 0.1753 0.7550 0.912 0.000 0.000 0.004 0.084 0.000
#> GSM634640 2 0.3969 0.4825 0.000 0.668 0.000 0.020 0.000 0.312
#> GSM634641 1 0.3410 0.6465 0.768 0.008 0.008 0.000 0.216 0.000
#> GSM634642 4 0.4461 0.5831 0.000 0.196 0.000 0.716 0.080 0.008
#> GSM634644 2 0.4539 0.4498 0.000 0.668 0.004 0.268 0.000 0.060
#> GSM634645 1 0.1666 0.7715 0.936 0.000 0.008 0.000 0.036 0.020
#> GSM634646 1 0.2132 0.7554 0.912 0.000 0.004 0.004 0.028 0.052
#> GSM634647 3 0.2822 0.7108 0.004 0.000 0.864 0.056 0.000 0.076
#> GSM634651 2 0.1700 0.7588 0.024 0.928 0.000 0.000 0.048 0.000
#> GSM634652 4 0.4201 0.6465 0.000 0.068 0.004 0.732 0.000 0.196
#> GSM634654 1 0.5809 0.3242 0.568 0.020 0.316 0.004 0.012 0.080
#> GSM634655 5 0.4478 0.3710 0.244 0.000 0.076 0.000 0.680 0.000
#> GSM634656 3 0.2493 0.7260 0.004 0.000 0.884 0.036 0.000 0.076
#> GSM634657 5 0.5303 0.6054 0.028 0.272 0.000 0.032 0.640 0.028
#> GSM634658 1 0.2476 0.7345 0.880 0.024 0.004 0.000 0.092 0.000
#> GSM634660 5 0.1007 0.6408 0.044 0.000 0.000 0.000 0.956 0.000
#> GSM634661 2 0.1745 0.7542 0.020 0.924 0.000 0.000 0.056 0.000
#> GSM634662 5 0.2706 0.6664 0.024 0.124 0.000 0.000 0.852 0.000
#> GSM634663 5 0.4631 0.3910 0.024 0.464 0.000 0.000 0.504 0.008
#> GSM634664 4 0.1514 0.7571 0.004 0.012 0.004 0.944 0.000 0.036
#> GSM634665 1 0.3629 0.7322 0.832 0.008 0.024 0.008 0.028 0.100
#> GSM634668 5 0.2889 0.6620 0.108 0.044 0.000 0.000 0.848 0.000
#> GSM634671 1 0.5279 0.6664 0.720 0.008 0.024 0.132 0.028 0.088
#> GSM634672 3 0.3812 0.8046 0.104 0.000 0.804 0.000 0.068 0.024
#> GSM634673 3 0.2804 0.8080 0.120 0.000 0.852 0.000 0.024 0.004
#> GSM634674 5 0.1531 0.6383 0.004 0.068 0.000 0.000 0.928 0.000
#> GSM634675 2 0.2801 0.7343 0.072 0.860 0.000 0.000 0.068 0.000
#> GSM634676 1 0.5846 -0.0880 0.492 0.024 0.004 0.092 0.388 0.000
#> GSM634677 2 0.2571 0.7449 0.064 0.876 0.000 0.000 0.060 0.000
#> GSM634678 5 0.5246 0.6544 0.164 0.232 0.000 0.000 0.604 0.000
#> GSM634682 6 0.3017 0.7262 0.000 0.132 0.016 0.008 0.004 0.840
#> GSM634683 2 0.2027 0.7593 0.032 0.920 0.000 0.000 0.032 0.016
#> GSM634684 1 0.4090 0.7143 0.792 0.020 0.008 0.076 0.104 0.000
#> GSM634685 6 0.6228 0.4280 0.004 0.004 0.180 0.184 0.044 0.584
#> GSM634686 1 0.2146 0.7178 0.880 0.000 0.000 0.004 0.116 0.000
#> GSM634687 2 0.3969 0.4825 0.000 0.668 0.000 0.020 0.000 0.312
#> GSM634689 4 0.5109 0.4637 0.000 0.028 0.040 0.612 0.316 0.004
#> GSM634691 2 0.2511 0.7467 0.064 0.880 0.000 0.000 0.056 0.000
#> GSM634692 1 0.1507 0.7704 0.948 0.004 0.012 0.004 0.028 0.004
#> GSM634693 1 0.3706 0.7302 0.828 0.008 0.028 0.008 0.028 0.100
#> GSM634695 6 0.5927 0.5965 0.000 0.196 0.016 0.024 0.152 0.612
#> GSM634696 1 0.5211 0.6806 0.732 0.032 0.008 0.120 0.028 0.080
#> GSM634697 3 0.3105 0.8199 0.080 0.000 0.848 0.008 0.064 0.000
#> GSM634699 4 0.1599 0.7201 0.008 0.000 0.024 0.940 0.000 0.028
#> GSM634700 2 0.1812 0.7471 0.008 0.912 0.000 0.000 0.080 0.000
#> GSM634701 1 0.1390 0.7660 0.948 0.016 0.004 0.000 0.032 0.000
#> GSM634702 5 0.2048 0.6358 0.120 0.000 0.000 0.000 0.880 0.000
#> GSM634703 5 0.5816 0.5777 0.212 0.304 0.000 0.000 0.484 0.000
#> GSM634708 2 0.1346 0.7563 0.016 0.952 0.000 0.000 0.024 0.008
#> GSM634709 1 0.0603 0.7687 0.980 0.000 0.000 0.004 0.016 0.000
#> GSM634710 3 0.4233 0.6341 0.236 0.024 0.720 0.008 0.000 0.012
#> GSM634712 3 0.2513 0.7665 0.000 0.000 0.852 0.008 0.140 0.000
#> GSM634713 4 0.3615 0.7063 0.000 0.060 0.004 0.796 0.000 0.140
#> GSM634714 1 0.4053 0.7380 0.808 0.028 0.028 0.000 0.096 0.040
#> GSM634716 1 0.5042 0.3410 0.520 0.000 0.064 0.004 0.412 0.000
#> GSM634717 1 0.0692 0.7683 0.976 0.000 0.000 0.004 0.020 0.000
#> GSM634718 5 0.5830 0.5783 0.220 0.296 0.000 0.000 0.484 0.000
#> GSM634719 1 0.2454 0.7442 0.876 0.016 0.004 0.000 0.104 0.000
#> GSM634720 1 0.5325 0.2818 0.564 0.028 0.364 0.000 0.012 0.032
#> GSM634721 1 0.3915 0.7362 0.832 0.032 0.052 0.008 0.028 0.048
#> GSM634722 4 0.3576 0.7085 0.000 0.060 0.004 0.800 0.000 0.136
#> GSM634723 5 0.8240 0.4930 0.228 0.112 0.024 0.172 0.420 0.044
#> GSM634724 1 0.6210 0.1375 0.384 0.000 0.284 0.004 0.328 0.000
#> GSM634725 1 0.4622 0.4198 0.608 0.036 0.008 0.000 0.348 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 individual(p) k
#> CV:mclust 81 0.872 2
#> CV:mclust 81 0.739 3
#> CV:mclust 69 0.674 4
#> CV:mclust 66 0.966 5
#> CV:mclust 72 0.705 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 17698 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.827 0.915 0.963 0.4938 0.508 0.508
#> 3 3 0.638 0.825 0.906 0.3437 0.705 0.480
#> 4 4 0.547 0.655 0.805 0.1150 0.866 0.631
#> 5 5 0.531 0.471 0.687 0.0665 0.907 0.676
#> 6 6 0.607 0.519 0.715 0.0415 0.908 0.621
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM634643 1 0.0000 0.959 1.000 0.000
#> GSM634648 1 0.0000 0.959 1.000 0.000
#> GSM634649 1 0.0000 0.959 1.000 0.000
#> GSM634650 2 0.0000 0.964 0.000 1.000
#> GSM634653 1 0.0000 0.959 1.000 0.000
#> GSM634659 2 0.8499 0.607 0.276 0.724
#> GSM634666 1 0.5737 0.839 0.864 0.136
#> GSM634667 2 0.0000 0.964 0.000 1.000
#> GSM634669 1 0.3584 0.904 0.932 0.068
#> GSM634670 1 0.0000 0.959 1.000 0.000
#> GSM634679 1 0.0000 0.959 1.000 0.000
#> GSM634680 1 0.0000 0.959 1.000 0.000
#> GSM634681 1 0.0000 0.959 1.000 0.000
#> GSM634688 2 0.0000 0.964 0.000 1.000
#> GSM634690 2 0.0000 0.964 0.000 1.000
#> GSM634694 1 0.9552 0.395 0.624 0.376
#> GSM634698 1 0.0000 0.959 1.000 0.000
#> GSM634704 2 0.6712 0.784 0.176 0.824
#> GSM634705 1 0.0000 0.959 1.000 0.000
#> GSM634706 2 0.0376 0.961 0.004 0.996
#> GSM634707 1 0.1843 0.938 0.972 0.028
#> GSM634711 1 0.0000 0.959 1.000 0.000
#> GSM634715 2 0.0000 0.964 0.000 1.000
#> GSM634633 1 0.0000 0.959 1.000 0.000
#> GSM634634 1 0.9933 0.203 0.548 0.452
#> GSM634635 1 0.0000 0.959 1.000 0.000
#> GSM634636 1 0.0000 0.959 1.000 0.000
#> GSM634637 1 0.0000 0.959 1.000 0.000
#> GSM634638 2 0.0000 0.964 0.000 1.000
#> GSM634639 1 0.0000 0.959 1.000 0.000
#> GSM634640 2 0.0000 0.964 0.000 1.000
#> GSM634641 1 0.0000 0.959 1.000 0.000
#> GSM634642 2 0.0000 0.964 0.000 1.000
#> GSM634644 2 0.0000 0.964 0.000 1.000
#> GSM634645 1 0.0000 0.959 1.000 0.000
#> GSM634646 1 0.0000 0.959 1.000 0.000
#> GSM634647 1 0.0000 0.959 1.000 0.000
#> GSM634651 2 0.0000 0.964 0.000 1.000
#> GSM634652 2 0.0000 0.964 0.000 1.000
#> GSM634654 1 0.0000 0.959 1.000 0.000
#> GSM634655 1 0.2948 0.919 0.948 0.052
#> GSM634656 1 0.0000 0.959 1.000 0.000
#> GSM634657 2 0.0000 0.964 0.000 1.000
#> GSM634658 1 0.0000 0.959 1.000 0.000
#> GSM634660 1 0.6148 0.822 0.848 0.152
#> GSM634661 2 0.0000 0.964 0.000 1.000
#> GSM634662 2 0.0000 0.964 0.000 1.000
#> GSM634663 2 0.0000 0.964 0.000 1.000
#> GSM634664 2 0.2423 0.932 0.040 0.960
#> GSM634665 1 0.0000 0.959 1.000 0.000
#> GSM634668 2 0.0000 0.964 0.000 1.000
#> GSM634671 1 0.0000 0.959 1.000 0.000
#> GSM634672 1 0.0000 0.959 1.000 0.000
#> GSM634673 1 0.0000 0.959 1.000 0.000
#> GSM634674 2 0.0000 0.964 0.000 1.000
#> GSM634675 2 0.0000 0.964 0.000 1.000
#> GSM634676 1 0.7299 0.753 0.796 0.204
#> GSM634677 2 0.0000 0.964 0.000 1.000
#> GSM634678 2 0.5178 0.857 0.116 0.884
#> GSM634682 2 0.0000 0.964 0.000 1.000
#> GSM634683 2 0.0000 0.964 0.000 1.000
#> GSM634684 1 0.0000 0.959 1.000 0.000
#> GSM634685 1 0.9552 0.429 0.624 0.376
#> GSM634686 1 0.0000 0.959 1.000 0.000
#> GSM634687 2 0.0000 0.964 0.000 1.000
#> GSM634689 2 0.2603 0.929 0.044 0.956
#> GSM634691 2 0.0000 0.964 0.000 1.000
#> GSM634692 1 0.0000 0.959 1.000 0.000
#> GSM634693 1 0.0000 0.959 1.000 0.000
#> GSM634695 2 0.0000 0.964 0.000 1.000
#> GSM634696 1 0.5946 0.830 0.856 0.144
#> GSM634697 1 0.0000 0.959 1.000 0.000
#> GSM634699 2 0.7602 0.728 0.220 0.780
#> GSM634700 2 0.0000 0.964 0.000 1.000
#> GSM634701 1 0.0000 0.959 1.000 0.000
#> GSM634702 2 0.9754 0.280 0.408 0.592
#> GSM634703 2 0.0000 0.964 0.000 1.000
#> GSM634708 2 0.0000 0.964 0.000 1.000
#> GSM634709 1 0.0000 0.959 1.000 0.000
#> GSM634710 1 0.0000 0.959 1.000 0.000
#> GSM634712 1 0.0000 0.959 1.000 0.000
#> GSM634713 2 0.0000 0.964 0.000 1.000
#> GSM634714 1 0.0000 0.959 1.000 0.000
#> GSM634716 1 0.0000 0.959 1.000 0.000
#> GSM634717 1 0.0000 0.959 1.000 0.000
#> GSM634718 2 0.0000 0.964 0.000 1.000
#> GSM634719 1 0.0000 0.959 1.000 0.000
#> GSM634720 1 0.0000 0.959 1.000 0.000
#> GSM634721 1 0.0000 0.959 1.000 0.000
#> GSM634722 2 0.0000 0.964 0.000 1.000
#> GSM634723 2 0.0000 0.964 0.000 1.000
#> GSM634724 1 0.0000 0.959 1.000 0.000
#> GSM634725 1 0.5408 0.852 0.876 0.124
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634648 1 0.5254 0.559 0.736 0.000 0.264
#> GSM634649 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634650 2 0.8278 0.576 0.248 0.620 0.132
#> GSM634653 3 0.2796 0.866 0.092 0.000 0.908
#> GSM634659 1 0.2796 0.852 0.908 0.092 0.000
#> GSM634666 3 0.0592 0.857 0.000 0.012 0.988
#> GSM634667 2 0.0000 0.908 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.902 1.000 0.000 0.000
#> GSM634670 3 0.0237 0.862 0.004 0.000 0.996
#> GSM634679 3 0.4733 0.825 0.196 0.004 0.800
#> GSM634680 3 0.4555 0.821 0.200 0.000 0.800
#> GSM634681 1 0.1411 0.885 0.964 0.000 0.036
#> GSM634688 2 0.6095 0.449 0.000 0.608 0.392
#> GSM634690 2 0.0237 0.909 0.004 0.996 0.000
#> GSM634694 1 0.0000 0.902 1.000 0.000 0.000
#> GSM634698 1 0.0000 0.902 1.000 0.000 0.000
#> GSM634704 2 0.4750 0.734 0.216 0.784 0.000
#> GSM634705 1 0.1031 0.893 0.976 0.000 0.024
#> GSM634706 1 0.1643 0.886 0.956 0.044 0.000
#> GSM634707 1 0.0237 0.901 0.996 0.004 0.000
#> GSM634711 1 0.4399 0.728 0.812 0.000 0.188
#> GSM634715 2 0.0424 0.909 0.008 0.992 0.000
#> GSM634633 1 0.4351 0.746 0.828 0.004 0.168
#> GSM634634 3 0.1031 0.851 0.000 0.024 0.976
#> GSM634635 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634636 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634637 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634638 2 0.1964 0.883 0.000 0.944 0.056
#> GSM634639 1 0.0892 0.895 0.980 0.000 0.020
#> GSM634640 2 0.0000 0.908 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.902 1.000 0.000 0.000
#> GSM634642 2 0.2297 0.891 0.036 0.944 0.020
#> GSM634644 2 0.0747 0.904 0.000 0.984 0.016
#> GSM634645 1 0.0747 0.897 0.984 0.000 0.016
#> GSM634646 3 0.6235 0.403 0.436 0.000 0.564
#> GSM634647 3 0.0237 0.859 0.000 0.004 0.996
#> GSM634651 2 0.0424 0.909 0.008 0.992 0.000
#> GSM634652 2 0.0000 0.908 0.000 1.000 0.000
#> GSM634654 3 0.4291 0.837 0.180 0.000 0.820
#> GSM634655 3 0.0000 0.861 0.000 0.000 1.000
#> GSM634656 3 0.0000 0.861 0.000 0.000 1.000
#> GSM634657 2 0.2878 0.861 0.096 0.904 0.000
#> GSM634658 1 0.1031 0.896 0.976 0.000 0.024
#> GSM634660 1 0.0237 0.901 0.996 0.004 0.000
#> GSM634661 2 0.0237 0.909 0.004 0.996 0.000
#> GSM634662 1 0.6244 0.234 0.560 0.440 0.000
#> GSM634663 2 0.2356 0.881 0.072 0.928 0.000
#> GSM634664 3 0.4750 0.636 0.000 0.216 0.784
#> GSM634665 3 0.1031 0.865 0.024 0.000 0.976
#> GSM634668 2 0.3551 0.838 0.132 0.868 0.000
#> GSM634671 3 0.4654 0.690 0.208 0.000 0.792
#> GSM634672 3 0.4702 0.810 0.212 0.000 0.788
#> GSM634673 3 0.4002 0.848 0.160 0.000 0.840
#> GSM634674 2 0.0747 0.907 0.016 0.984 0.000
#> GSM634675 2 0.2711 0.873 0.088 0.912 0.000
#> GSM634676 1 0.1860 0.879 0.948 0.052 0.000
#> GSM634677 2 0.1031 0.905 0.024 0.976 0.000
#> GSM634678 2 0.5058 0.691 0.244 0.756 0.000
#> GSM634682 2 0.0424 0.907 0.000 0.992 0.008
#> GSM634683 2 0.0237 0.909 0.004 0.996 0.000
#> GSM634684 1 0.4346 0.762 0.816 0.000 0.184
#> GSM634685 3 0.1289 0.847 0.000 0.032 0.968
#> GSM634686 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634687 2 0.0000 0.908 0.000 1.000 0.000
#> GSM634689 2 0.6794 0.466 0.028 0.648 0.324
#> GSM634691 2 0.1031 0.905 0.024 0.976 0.000
#> GSM634692 1 0.1753 0.883 0.952 0.000 0.048
#> GSM634693 3 0.0000 0.861 0.000 0.000 1.000
#> GSM634695 2 0.0000 0.908 0.000 1.000 0.000
#> GSM634696 3 0.0237 0.859 0.000 0.004 0.996
#> GSM634697 3 0.4121 0.844 0.168 0.000 0.832
#> GSM634699 3 0.4178 0.704 0.000 0.172 0.828
#> GSM634700 2 0.0424 0.909 0.008 0.992 0.000
#> GSM634701 1 0.0000 0.902 1.000 0.000 0.000
#> GSM634702 1 0.5560 0.599 0.700 0.300 0.000
#> GSM634703 1 0.4842 0.713 0.776 0.224 0.000
#> GSM634708 2 0.0237 0.909 0.004 0.996 0.000
#> GSM634709 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634710 3 0.4002 0.848 0.160 0.000 0.840
#> GSM634712 3 0.3686 0.856 0.140 0.000 0.860
#> GSM634713 2 0.3551 0.828 0.000 0.868 0.132
#> GSM634714 3 0.4555 0.822 0.200 0.000 0.800
#> GSM634716 1 0.4235 0.741 0.824 0.000 0.176
#> GSM634717 1 0.0000 0.902 1.000 0.000 0.000
#> GSM634718 1 0.4346 0.761 0.816 0.184 0.000
#> GSM634719 1 0.0237 0.902 0.996 0.000 0.004
#> GSM634720 3 0.3340 0.861 0.120 0.000 0.880
#> GSM634721 3 0.0000 0.861 0.000 0.000 1.000
#> GSM634722 2 0.4974 0.719 0.000 0.764 0.236
#> GSM634723 1 0.5254 0.658 0.736 0.264 0.000
#> GSM634724 3 0.4796 0.801 0.220 0.000 0.780
#> GSM634725 1 0.3987 0.836 0.872 0.108 0.020
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.2081 0.7795 0.916 0.000 0.084 0.000
#> GSM634648 1 0.6079 0.3848 0.628 0.000 0.072 0.300
#> GSM634649 1 0.1389 0.7990 0.952 0.000 0.000 0.048
#> GSM634650 2 0.9556 -0.0098 0.224 0.328 0.124 0.324
#> GSM634653 4 0.4607 0.5931 0.204 0.004 0.024 0.768
#> GSM634659 1 0.7812 0.0723 0.396 0.256 0.348 0.000
#> GSM634666 4 0.4199 0.6202 0.000 0.032 0.164 0.804
#> GSM634667 2 0.0188 0.8397 0.000 0.996 0.004 0.000
#> GSM634669 1 0.1305 0.7971 0.960 0.004 0.036 0.000
#> GSM634670 3 0.3583 0.6970 0.004 0.000 0.816 0.180
#> GSM634679 3 0.4434 0.6737 0.016 0.000 0.756 0.228
#> GSM634680 3 0.4307 0.6867 0.024 0.000 0.784 0.192
#> GSM634681 1 0.2867 0.7704 0.884 0.000 0.012 0.104
#> GSM634688 4 0.4673 0.5413 0.000 0.292 0.008 0.700
#> GSM634690 2 0.0376 0.8395 0.000 0.992 0.004 0.004
#> GSM634694 1 0.0188 0.8025 0.996 0.000 0.004 0.000
#> GSM634698 1 0.1716 0.7931 0.936 0.000 0.000 0.064
#> GSM634704 2 0.6066 0.6436 0.248 0.672 0.072 0.008
#> GSM634705 1 0.2676 0.7798 0.896 0.000 0.012 0.092
#> GSM634706 1 0.3189 0.7864 0.888 0.060 0.004 0.048
#> GSM634707 1 0.5730 0.4783 0.616 0.040 0.344 0.000
#> GSM634711 3 0.3498 0.6315 0.160 0.000 0.832 0.008
#> GSM634715 2 0.3015 0.8212 0.024 0.884 0.092 0.000
#> GSM634633 3 0.4690 0.5227 0.276 0.000 0.712 0.012
#> GSM634634 4 0.3793 0.6552 0.000 0.044 0.112 0.844
#> GSM634635 1 0.1474 0.7978 0.948 0.000 0.000 0.052
#> GSM634636 1 0.3545 0.7329 0.828 0.000 0.164 0.008
#> GSM634637 3 0.4699 0.4215 0.320 0.000 0.676 0.004
#> GSM634638 2 0.2915 0.8238 0.000 0.892 0.080 0.028
#> GSM634639 1 0.3355 0.7389 0.836 0.000 0.160 0.004
#> GSM634640 2 0.0000 0.8397 0.000 1.000 0.000 0.000
#> GSM634641 1 0.4302 0.6575 0.756 0.004 0.236 0.004
#> GSM634642 2 0.2055 0.8269 0.008 0.936 0.008 0.048
#> GSM634644 2 0.3978 0.7075 0.000 0.796 0.012 0.192
#> GSM634645 1 0.3991 0.7255 0.808 0.000 0.172 0.020
#> GSM634646 1 0.6536 0.2202 0.560 0.000 0.088 0.352
#> GSM634647 4 0.2704 0.6446 0.000 0.000 0.124 0.876
#> GSM634651 2 0.0376 0.8401 0.004 0.992 0.004 0.000
#> GSM634652 2 0.2918 0.7881 0.000 0.876 0.008 0.116
#> GSM634654 4 0.5395 0.5668 0.184 0.000 0.084 0.732
#> GSM634655 3 0.2287 0.6445 0.012 0.004 0.924 0.060
#> GSM634656 4 0.4103 0.5086 0.000 0.000 0.256 0.744
#> GSM634657 2 0.5506 0.7419 0.096 0.764 0.120 0.020
#> GSM634658 1 0.2297 0.7994 0.928 0.004 0.024 0.044
#> GSM634660 1 0.6837 0.2700 0.504 0.104 0.392 0.000
#> GSM634661 2 0.0336 0.8403 0.000 0.992 0.008 0.000
#> GSM634662 2 0.6444 0.4715 0.284 0.612 0.104 0.000
#> GSM634663 2 0.2660 0.8209 0.056 0.908 0.036 0.000
#> GSM634664 4 0.4050 0.6363 0.000 0.168 0.024 0.808
#> GSM634665 4 0.3853 0.6372 0.160 0.000 0.020 0.820
#> GSM634668 2 0.3962 0.7815 0.044 0.832 0.124 0.000
#> GSM634671 4 0.3444 0.6026 0.184 0.000 0.000 0.816
#> GSM634672 3 0.4775 0.6752 0.028 0.000 0.740 0.232
#> GSM634673 3 0.4139 0.7024 0.024 0.000 0.800 0.176
#> GSM634674 2 0.4123 0.7784 0.044 0.820 0.136 0.000
#> GSM634675 2 0.4163 0.6930 0.220 0.772 0.004 0.004
#> GSM634676 1 0.2654 0.7779 0.888 0.004 0.000 0.108
#> GSM634677 2 0.3765 0.7396 0.180 0.812 0.004 0.004
#> GSM634678 2 0.3962 0.7543 0.152 0.820 0.028 0.000
#> GSM634682 2 0.2266 0.8276 0.000 0.912 0.084 0.004
#> GSM634683 2 0.0376 0.8407 0.004 0.992 0.004 0.000
#> GSM634684 1 0.4707 0.6716 0.760 0.000 0.036 0.204
#> GSM634685 4 0.6568 0.2348 0.000 0.080 0.408 0.512
#> GSM634686 1 0.0469 0.8027 0.988 0.000 0.000 0.012
#> GSM634687 2 0.0188 0.8407 0.000 0.996 0.004 0.000
#> GSM634689 2 0.5410 0.6075 0.000 0.728 0.080 0.192
#> GSM634691 2 0.2266 0.8138 0.084 0.912 0.004 0.000
#> GSM634692 1 0.2647 0.7742 0.880 0.000 0.000 0.120
#> GSM634693 4 0.3156 0.6745 0.068 0.000 0.048 0.884
#> GSM634695 2 0.3342 0.8115 0.000 0.868 0.100 0.032
#> GSM634696 4 0.3335 0.6611 0.020 0.000 0.120 0.860
#> GSM634697 3 0.5452 0.3547 0.016 0.000 0.556 0.428
#> GSM634699 4 0.4492 0.6621 0.080 0.084 0.012 0.824
#> GSM634700 2 0.0524 0.8405 0.004 0.988 0.008 0.000
#> GSM634701 1 0.3074 0.7440 0.848 0.000 0.152 0.000
#> GSM634702 3 0.7553 0.3184 0.152 0.296 0.536 0.016
#> GSM634703 1 0.5136 0.6212 0.728 0.224 0.048 0.000
#> GSM634708 2 0.0188 0.8397 0.000 0.996 0.004 0.000
#> GSM634709 1 0.1004 0.8030 0.972 0.000 0.004 0.024
#> GSM634710 3 0.5678 0.2970 0.024 0.000 0.524 0.452
#> GSM634712 3 0.3933 0.6882 0.008 0.000 0.792 0.200
#> GSM634713 2 0.3831 0.6920 0.000 0.792 0.004 0.204
#> GSM634714 4 0.7808 0.0834 0.360 0.000 0.252 0.388
#> GSM634716 3 0.3494 0.6170 0.172 0.000 0.824 0.004
#> GSM634717 1 0.1978 0.7915 0.928 0.004 0.000 0.068
#> GSM634718 1 0.0927 0.8036 0.976 0.016 0.000 0.008
#> GSM634719 1 0.1305 0.7982 0.960 0.000 0.036 0.004
#> GSM634720 3 0.4567 0.6353 0.016 0.000 0.740 0.244
#> GSM634721 4 0.3583 0.6121 0.004 0.000 0.180 0.816
#> GSM634722 4 0.6044 0.1349 0.000 0.428 0.044 0.528
#> GSM634723 1 0.3257 0.7529 0.844 0.004 0.000 0.152
#> GSM634724 3 0.3367 0.7033 0.028 0.000 0.864 0.108
#> GSM634725 1 0.7863 0.3551 0.516 0.168 0.292 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.4465 0.52453 0.672 0.000 0.024 0.000 0.304
#> GSM634648 1 0.5650 0.41280 0.724 0.072 0.144 0.020 0.040
#> GSM634649 1 0.1544 0.64804 0.932 0.000 0.000 0.000 0.068
#> GSM634650 5 0.6903 0.25011 0.060 0.192 0.000 0.176 0.572
#> GSM634653 1 0.6257 -0.16546 0.536 0.004 0.008 0.340 0.112
#> GSM634659 5 0.7467 0.17914 0.044 0.216 0.340 0.000 0.400
#> GSM634666 3 0.7666 0.13077 0.000 0.092 0.472 0.248 0.188
#> GSM634667 2 0.0992 0.77774 0.000 0.968 0.000 0.008 0.024
#> GSM634669 1 0.4455 0.38734 0.588 0.008 0.000 0.000 0.404
#> GSM634670 3 0.3759 0.61584 0.000 0.000 0.816 0.092 0.092
#> GSM634679 3 0.1885 0.62942 0.000 0.004 0.932 0.044 0.020
#> GSM634680 3 0.5523 0.52966 0.008 0.000 0.668 0.200 0.124
#> GSM634681 1 0.1117 0.63494 0.964 0.000 0.020 0.000 0.016
#> GSM634688 4 0.7232 0.21580 0.000 0.392 0.044 0.404 0.160
#> GSM634690 2 0.0798 0.77191 0.000 0.976 0.008 0.000 0.016
#> GSM634694 1 0.3143 0.61434 0.796 0.000 0.000 0.000 0.204
#> GSM634698 1 0.0671 0.63640 0.980 0.000 0.000 0.016 0.004
#> GSM634704 2 0.6638 0.33020 0.104 0.464 0.000 0.032 0.400
#> GSM634705 1 0.2125 0.63502 0.920 0.000 0.052 0.004 0.024
#> GSM634706 1 0.2616 0.60544 0.888 0.076 0.000 0.000 0.036
#> GSM634707 5 0.6774 0.38703 0.224 0.048 0.156 0.000 0.572
#> GSM634711 5 0.5683 0.16503 0.064 0.000 0.388 0.008 0.540
#> GSM634715 2 0.4445 0.61709 0.000 0.676 0.000 0.024 0.300
#> GSM634633 3 0.6920 0.34014 0.088 0.008 0.532 0.056 0.316
#> GSM634634 4 0.1800 0.54621 0.000 0.048 0.020 0.932 0.000
#> GSM634635 1 0.0794 0.64614 0.972 0.000 0.000 0.000 0.028
#> GSM634636 1 0.6857 -0.05421 0.412 0.004 0.320 0.000 0.264
#> GSM634637 3 0.4754 0.33228 0.052 0.000 0.684 0.000 0.264
#> GSM634638 2 0.5083 0.65754 0.000 0.696 0.000 0.120 0.184
#> GSM634639 1 0.4297 0.55444 0.692 0.000 0.020 0.000 0.288
#> GSM634640 2 0.1894 0.77489 0.000 0.920 0.000 0.008 0.072
#> GSM634641 1 0.7416 -0.11389 0.384 0.036 0.232 0.000 0.348
#> GSM634642 2 0.2207 0.76634 0.004 0.924 0.012 0.020 0.040
#> GSM634644 2 0.4905 0.65553 0.000 0.696 0.000 0.224 0.080
#> GSM634645 1 0.4840 0.44901 0.676 0.000 0.268 0.000 0.056
#> GSM634646 1 0.4754 0.40559 0.712 0.000 0.232 0.048 0.008
#> GSM634647 4 0.1469 0.52815 0.000 0.000 0.036 0.948 0.016
#> GSM634651 2 0.0963 0.77585 0.000 0.964 0.000 0.000 0.036
#> GSM634652 2 0.3264 0.73312 0.000 0.836 0.004 0.140 0.020
#> GSM634654 4 0.7604 0.39406 0.368 0.000 0.076 0.396 0.160
#> GSM634655 3 0.6579 0.27619 0.000 0.016 0.452 0.132 0.400
#> GSM634656 4 0.3944 0.39498 0.000 0.000 0.160 0.788 0.052
#> GSM634657 5 0.4518 0.12315 0.016 0.320 0.000 0.004 0.660
#> GSM634658 1 0.5081 0.34422 0.540 0.004 0.004 0.020 0.432
#> GSM634660 5 0.6655 0.48056 0.136 0.140 0.100 0.000 0.624
#> GSM634661 2 0.1764 0.77640 0.000 0.928 0.000 0.008 0.064
#> GSM634662 2 0.5748 0.01266 0.044 0.492 0.020 0.000 0.444
#> GSM634663 2 0.2674 0.74883 0.004 0.856 0.000 0.000 0.140
#> GSM634664 4 0.6689 0.49573 0.020 0.228 0.016 0.588 0.148
#> GSM634665 4 0.5089 0.35840 0.432 0.000 0.004 0.536 0.028
#> GSM634668 2 0.5673 0.49137 0.008 0.656 0.184 0.000 0.152
#> GSM634671 4 0.4318 0.54513 0.296 0.000 0.008 0.688 0.008
#> GSM634672 3 0.1673 0.62621 0.008 0.000 0.944 0.032 0.016
#> GSM634673 3 0.4111 0.60373 0.000 0.000 0.788 0.120 0.092
#> GSM634674 2 0.3462 0.71082 0.000 0.792 0.012 0.000 0.196
#> GSM634675 2 0.4482 0.63190 0.160 0.752 0.000 0.000 0.088
#> GSM634676 1 0.5356 0.26035 0.508 0.008 0.000 0.036 0.448
#> GSM634677 2 0.4141 0.58100 0.236 0.736 0.000 0.000 0.028
#> GSM634678 2 0.4795 0.69505 0.060 0.776 0.064 0.000 0.100
#> GSM634682 2 0.4558 0.68993 0.000 0.744 0.000 0.088 0.168
#> GSM634683 2 0.3413 0.74905 0.000 0.832 0.000 0.124 0.044
#> GSM634684 5 0.5643 0.00955 0.340 0.008 0.008 0.052 0.592
#> GSM634685 4 0.5840 0.30412 0.000 0.012 0.084 0.584 0.320
#> GSM634686 1 0.3305 0.60472 0.776 0.000 0.000 0.000 0.224
#> GSM634687 2 0.2969 0.76151 0.000 0.852 0.000 0.020 0.128
#> GSM634689 2 0.4831 0.62857 0.000 0.748 0.172 0.040 0.040
#> GSM634691 2 0.1493 0.77423 0.024 0.948 0.000 0.000 0.028
#> GSM634692 1 0.4343 0.60584 0.768 0.000 0.000 0.096 0.136
#> GSM634693 4 0.3819 0.57208 0.228 0.000 0.016 0.756 0.000
#> GSM634695 2 0.6496 0.44854 0.000 0.512 0.004 0.280 0.204
#> GSM634696 4 0.6803 0.38947 0.068 0.012 0.240 0.596 0.084
#> GSM634697 3 0.3141 0.60151 0.000 0.000 0.832 0.152 0.016
#> GSM634699 4 0.6817 0.52706 0.244 0.028 0.004 0.552 0.172
#> GSM634700 2 0.1522 0.77109 0.000 0.944 0.012 0.000 0.044
#> GSM634701 5 0.6073 -0.10187 0.436 0.004 0.104 0.000 0.456
#> GSM634702 3 0.6499 0.15022 0.008 0.244 0.536 0.000 0.212
#> GSM634703 5 0.7155 0.27477 0.292 0.292 0.016 0.000 0.400
#> GSM634708 2 0.0955 0.77687 0.000 0.968 0.000 0.004 0.028
#> GSM634709 1 0.3992 0.55701 0.720 0.000 0.012 0.000 0.268
#> GSM634710 3 0.3834 0.59902 0.000 0.008 0.816 0.124 0.052
#> GSM634712 3 0.2325 0.63526 0.000 0.000 0.904 0.068 0.028
#> GSM634713 2 0.3093 0.72941 0.000 0.824 0.000 0.168 0.008
#> GSM634714 4 0.7945 0.18241 0.360 0.000 0.160 0.364 0.116
#> GSM634716 5 0.5368 -0.14815 0.036 0.000 0.472 0.008 0.484
#> GSM634717 1 0.0510 0.64419 0.984 0.000 0.000 0.000 0.016
#> GSM634718 1 0.3160 0.62430 0.808 0.004 0.000 0.000 0.188
#> GSM634719 1 0.4276 0.43774 0.616 0.000 0.000 0.004 0.380
#> GSM634720 3 0.6555 0.27029 0.000 0.008 0.452 0.384 0.156
#> GSM634721 3 0.6779 -0.03261 0.004 0.008 0.448 0.368 0.172
#> GSM634722 4 0.4134 0.46298 0.000 0.224 0.000 0.744 0.032
#> GSM634723 1 0.3971 0.54305 0.800 0.000 0.000 0.100 0.100
#> GSM634724 3 0.3456 0.58047 0.000 0.000 0.800 0.016 0.184
#> GSM634725 3 0.8745 0.08949 0.124 0.076 0.460 0.136 0.204
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.4482 0.4344 0.580 0.000 0.000 0.000 0.384 0.036
#> GSM634648 1 0.2030 0.7190 0.920 0.016 0.000 0.012 0.004 0.048
#> GSM634649 1 0.2100 0.7348 0.884 0.000 0.000 0.000 0.112 0.004
#> GSM634650 5 0.5261 0.1733 0.000 0.040 0.000 0.368 0.556 0.036
#> GSM634653 1 0.3904 0.6369 0.812 0.000 0.040 0.028 0.104 0.016
#> GSM634659 6 0.4524 0.3561 0.000 0.048 0.000 0.000 0.336 0.616
#> GSM634666 6 0.7049 0.2776 0.008 0.112 0.036 0.172 0.104 0.568
#> GSM634667 2 0.0436 0.7783 0.000 0.988 0.004 0.004 0.000 0.004
#> GSM634669 5 0.4247 0.3315 0.296 0.040 0.000 0.000 0.664 0.000
#> GSM634670 3 0.3969 0.5419 0.000 0.000 0.644 0.008 0.004 0.344
#> GSM634679 3 0.4079 0.5300 0.000 0.004 0.608 0.008 0.000 0.380
#> GSM634680 3 0.2895 0.6503 0.052 0.000 0.868 0.016 0.000 0.064
#> GSM634681 1 0.0665 0.7373 0.980 0.004 0.000 0.000 0.008 0.008
#> GSM634688 4 0.6333 0.2985 0.000 0.192 0.000 0.504 0.036 0.268
#> GSM634690 2 0.1219 0.7739 0.000 0.948 0.004 0.000 0.000 0.048
#> GSM634694 1 0.3121 0.6984 0.796 0.008 0.000 0.000 0.192 0.004
#> GSM634698 1 0.0363 0.7362 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM634704 2 0.7535 0.4856 0.112 0.512 0.200 0.004 0.104 0.068
#> GSM634705 1 0.3847 0.6873 0.780 0.000 0.000 0.004 0.080 0.136
#> GSM634706 1 0.1196 0.7307 0.952 0.040 0.000 0.000 0.008 0.000
#> GSM634707 5 0.4482 0.5017 0.020 0.036 0.032 0.000 0.760 0.152
#> GSM634711 5 0.5045 0.3074 0.004 0.000 0.084 0.004 0.624 0.284
#> GSM634715 2 0.6156 0.4798 0.000 0.584 0.056 0.036 0.272 0.052
#> GSM634633 3 0.3107 0.6318 0.044 0.024 0.868 0.000 0.012 0.052
#> GSM634634 4 0.1699 0.6613 0.000 0.016 0.032 0.936 0.000 0.016
#> GSM634635 1 0.1471 0.7422 0.932 0.004 0.000 0.000 0.064 0.000
#> GSM634636 6 0.5359 0.2419 0.092 0.000 0.008 0.004 0.316 0.580
#> GSM634637 6 0.4392 0.4927 0.004 0.000 0.072 0.000 0.216 0.708
#> GSM634638 2 0.6006 0.6431 0.000 0.640 0.192 0.032 0.080 0.056
#> GSM634639 1 0.5216 0.5928 0.644 0.000 0.116 0.000 0.224 0.016
#> GSM634640 2 0.3135 0.7729 0.000 0.868 0.016 0.024 0.048 0.044
#> GSM634641 6 0.5595 0.3108 0.072 0.016 0.008 0.008 0.300 0.596
#> GSM634642 2 0.2611 0.7553 0.004 0.876 0.000 0.016 0.008 0.096
#> GSM634644 2 0.5014 0.7346 0.004 0.744 0.088 0.104 0.020 0.040
#> GSM634645 1 0.4354 0.6294 0.732 0.000 0.032 0.000 0.036 0.200
#> GSM634646 1 0.2291 0.7162 0.904 0.000 0.040 0.012 0.000 0.044
#> GSM634647 4 0.2872 0.6608 0.000 0.000 0.080 0.868 0.024 0.028
#> GSM634651 2 0.1225 0.7747 0.000 0.952 0.000 0.000 0.012 0.036
#> GSM634652 2 0.4517 0.5698 0.000 0.648 0.000 0.292 0.000 0.060
#> GSM634654 1 0.6948 0.2562 0.544 0.000 0.172 0.116 0.148 0.020
#> GSM634655 3 0.4526 0.4482 0.000 0.040 0.736 0.000 0.172 0.052
#> GSM634656 4 0.4032 0.5991 0.000 0.000 0.140 0.764 0.004 0.092
#> GSM634657 5 0.5927 0.3892 0.000 0.176 0.100 0.004 0.632 0.088
#> GSM634658 5 0.4611 0.5351 0.132 0.008 0.000 0.032 0.752 0.076
#> GSM634660 5 0.5410 0.4980 0.012 0.148 0.096 0.000 0.692 0.052
#> GSM634661 2 0.1577 0.7788 0.000 0.940 0.036 0.000 0.008 0.016
#> GSM634662 5 0.5387 0.0790 0.000 0.424 0.000 0.000 0.464 0.112
#> GSM634663 2 0.4532 0.5316 0.000 0.656 0.000 0.008 0.292 0.044
#> GSM634664 4 0.4012 0.6318 0.004 0.024 0.004 0.800 0.112 0.056
#> GSM634665 4 0.4446 0.2440 0.424 0.000 0.000 0.552 0.016 0.008
#> GSM634668 6 0.4589 -0.0231 0.000 0.460 0.000 0.000 0.036 0.504
#> GSM634671 4 0.2545 0.6613 0.068 0.000 0.000 0.888 0.020 0.024
#> GSM634672 3 0.4284 0.5110 0.008 0.000 0.596 0.012 0.000 0.384
#> GSM634673 3 0.2946 0.6419 0.000 0.000 0.808 0.004 0.004 0.184
#> GSM634674 2 0.3357 0.7262 0.000 0.816 0.020 0.000 0.144 0.020
#> GSM634675 2 0.4361 0.6867 0.144 0.764 0.000 0.004 0.048 0.040
#> GSM634676 5 0.6047 0.4323 0.112 0.008 0.004 0.156 0.640 0.080
#> GSM634677 2 0.3652 0.5797 0.264 0.720 0.000 0.000 0.000 0.016
#> GSM634678 2 0.3946 0.6515 0.004 0.736 0.004 0.000 0.028 0.228
#> GSM634682 2 0.5337 0.6651 0.000 0.684 0.196 0.020 0.056 0.044
#> GSM634683 2 0.3399 0.7416 0.000 0.816 0.020 0.140 0.000 0.024
#> GSM634684 5 0.3491 0.5026 0.020 0.000 0.012 0.080 0.840 0.048
#> GSM634685 4 0.7397 0.1740 0.000 0.028 0.340 0.404 0.132 0.096
#> GSM634686 1 0.3390 0.6093 0.704 0.000 0.000 0.000 0.296 0.000
#> GSM634687 2 0.4692 0.7323 0.000 0.764 0.036 0.036 0.116 0.048
#> GSM634689 2 0.3507 0.6456 0.000 0.752 0.004 0.012 0.000 0.232
#> GSM634691 2 0.1599 0.7748 0.024 0.940 0.000 0.000 0.008 0.028
#> GSM634692 1 0.6251 0.0641 0.380 0.000 0.000 0.248 0.364 0.008
#> GSM634693 4 0.3795 0.6307 0.136 0.000 0.024 0.796 0.000 0.044
#> GSM634695 2 0.6722 0.3328 0.000 0.444 0.388 0.040 0.080 0.048
#> GSM634696 4 0.4151 0.2796 0.000 0.004 0.000 0.576 0.008 0.412
#> GSM634697 6 0.4805 0.1540 0.004 0.000 0.284 0.064 0.004 0.644
#> GSM634699 4 0.6823 0.4636 0.264 0.012 0.012 0.512 0.160 0.040
#> GSM634700 2 0.1779 0.7694 0.000 0.920 0.000 0.000 0.016 0.064
#> GSM634701 5 0.5634 0.4856 0.136 0.020 0.020 0.000 0.652 0.172
#> GSM634702 6 0.4596 0.5147 0.000 0.132 0.016 0.000 0.124 0.728
#> GSM634703 5 0.6343 0.3787 0.048 0.264 0.000 0.004 0.536 0.148
#> GSM634708 2 0.0582 0.7779 0.000 0.984 0.004 0.004 0.004 0.004
#> GSM634709 1 0.5422 0.0815 0.448 0.000 0.000 0.000 0.436 0.116
#> GSM634710 6 0.3815 0.3924 0.000 0.004 0.124 0.076 0.004 0.792
#> GSM634712 3 0.4109 0.5021 0.000 0.000 0.596 0.008 0.004 0.392
#> GSM634713 2 0.3456 0.7743 0.000 0.844 0.064 0.056 0.008 0.028
#> GSM634714 3 0.5573 0.2579 0.340 0.000 0.548 0.096 0.008 0.008
#> GSM634716 5 0.5907 -0.0236 0.000 0.004 0.396 0.000 0.424 0.176
#> GSM634717 1 0.1814 0.7402 0.900 0.000 0.000 0.000 0.100 0.000
#> GSM634718 1 0.3337 0.6483 0.736 0.004 0.000 0.000 0.260 0.000
#> GSM634719 5 0.3916 0.3832 0.276 0.004 0.008 0.000 0.704 0.008
#> GSM634720 3 0.3707 0.5806 0.044 0.000 0.808 0.120 0.000 0.028
#> GSM634721 6 0.5582 0.1303 0.004 0.000 0.008 0.304 0.120 0.564
#> GSM634722 4 0.2359 0.6494 0.000 0.052 0.024 0.904 0.004 0.016
#> GSM634723 1 0.3991 0.6809 0.796 0.004 0.004 0.076 0.108 0.012
#> GSM634724 6 0.4666 -0.0699 0.000 0.000 0.388 0.000 0.048 0.564
#> GSM634725 6 0.6199 0.4717 0.004 0.032 0.012 0.200 0.160 0.592
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 individual(p) k
#> CV:NMF 89 0.6572 2
#> CV:NMF 89 0.2404 3
#> CV:NMF 78 0.4374 4
#> CV:NMF 52 0.0573 5
#> CV:NMF 57 0.0364 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 17698 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.299 0.734 0.849 0.4487 0.520 0.520
#> 3 3 0.411 0.692 0.828 0.3686 0.819 0.672
#> 4 4 0.438 0.654 0.801 0.0970 0.904 0.780
#> 5 5 0.467 0.583 0.765 0.0479 0.981 0.950
#> 6 6 0.473 0.531 0.742 0.0374 0.955 0.878
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
#> GSM634643 1 0.7376 0.7979 0.792 0.208
#> GSM634648 1 0.9580 0.5512 0.620 0.380
#> GSM634649 1 0.5842 0.8051 0.860 0.140
#> GSM634650 2 0.9209 0.3575 0.336 0.664
#> GSM634653 1 0.6247 0.7735 0.844 0.156
#> GSM634659 1 0.9775 0.5651 0.588 0.412
#> GSM634666 1 0.7602 0.6506 0.780 0.220
#> GSM634667 2 0.0000 0.8651 0.000 1.000
#> GSM634669 1 0.8207 0.7766 0.744 0.256
#> GSM634670 1 0.0000 0.7737 1.000 0.000
#> GSM634679 1 0.0672 0.7766 0.992 0.008
#> GSM634680 1 0.0000 0.7737 1.000 0.000
#> GSM634681 1 0.5519 0.8048 0.872 0.128
#> GSM634688 2 0.3879 0.8452 0.076 0.924
#> GSM634690 2 0.0000 0.8651 0.000 1.000
#> GSM634694 1 0.8144 0.7797 0.748 0.252
#> GSM634698 1 0.7139 0.8022 0.804 0.196
#> GSM634704 2 0.4939 0.8156 0.108 0.892
#> GSM634705 1 0.0938 0.7812 0.988 0.012
#> GSM634706 2 0.9977 -0.1225 0.472 0.528
#> GSM634707 1 0.8327 0.7700 0.736 0.264
#> GSM634711 1 0.7674 0.7930 0.776 0.224
#> GSM634715 1 0.9896 0.4960 0.560 0.440
#> GSM634633 1 0.9732 0.5564 0.596 0.404
#> GSM634634 2 0.5519 0.8005 0.128 0.872
#> GSM634635 1 0.5946 0.8052 0.856 0.144
#> GSM634636 1 0.7376 0.7979 0.792 0.208
#> GSM634637 1 0.8144 0.7788 0.748 0.252
#> GSM634638 2 0.0000 0.8651 0.000 1.000
#> GSM634639 1 0.2603 0.7926 0.956 0.044
#> GSM634640 2 0.0000 0.8651 0.000 1.000
#> GSM634641 1 0.7674 0.7938 0.776 0.224
#> GSM634642 2 0.2948 0.8570 0.052 0.948
#> GSM634644 2 0.2778 0.8568 0.048 0.952
#> GSM634645 1 0.0938 0.7812 0.988 0.012
#> GSM634646 1 0.0672 0.7788 0.992 0.008
#> GSM634647 1 0.0000 0.7737 1.000 0.000
#> GSM634651 2 0.0000 0.8651 0.000 1.000
#> GSM634652 2 0.0376 0.8659 0.004 0.996
#> GSM634654 1 0.2778 0.7918 0.952 0.048
#> GSM634655 1 0.8267 0.7735 0.740 0.260
#> GSM634656 1 0.0000 0.7737 1.000 0.000
#> GSM634657 2 0.9209 0.3604 0.336 0.664
#> GSM634658 1 0.8016 0.7845 0.756 0.244
#> GSM634660 1 0.8327 0.7700 0.736 0.264
#> GSM634661 2 0.0376 0.8657 0.004 0.996
#> GSM634662 2 0.4690 0.8158 0.100 0.900
#> GSM634663 2 0.5408 0.7921 0.124 0.876
#> GSM634664 2 0.3584 0.8498 0.068 0.932
#> GSM634665 1 0.1184 0.7829 0.984 0.016
#> GSM634668 1 0.9996 0.3590 0.512 0.488
#> GSM634671 1 0.1843 0.7852 0.972 0.028
#> GSM634672 1 0.0000 0.7737 1.000 0.000
#> GSM634673 1 0.0000 0.7737 1.000 0.000
#> GSM634674 1 0.9922 0.4755 0.552 0.448
#> GSM634675 2 0.0938 0.8658 0.012 0.988
#> GSM634676 1 0.9323 0.6706 0.652 0.348
#> GSM634677 2 0.0938 0.8659 0.012 0.988
#> GSM634678 2 0.5946 0.7821 0.144 0.856
#> GSM634682 2 0.0000 0.8651 0.000 1.000
#> GSM634683 2 0.0376 0.8657 0.004 0.996
#> GSM634684 1 0.8207 0.7767 0.744 0.256
#> GSM634685 2 0.7219 0.7049 0.200 0.800
#> GSM634686 1 0.8144 0.7797 0.748 0.252
#> GSM634687 2 0.0000 0.8651 0.000 1.000
#> GSM634689 2 0.2948 0.8570 0.052 0.948
#> GSM634691 2 0.0000 0.8651 0.000 1.000
#> GSM634692 1 0.7528 0.7961 0.784 0.216
#> GSM634693 1 0.0672 0.7788 0.992 0.008
#> GSM634695 2 0.0000 0.8651 0.000 1.000
#> GSM634696 1 0.9710 0.5694 0.600 0.400
#> GSM634697 1 0.0000 0.7737 1.000 0.000
#> GSM634699 2 0.3584 0.8495 0.068 0.932
#> GSM634700 2 0.1414 0.8648 0.020 0.980
#> GSM634701 1 0.7883 0.7890 0.764 0.236
#> GSM634702 1 0.9754 0.5730 0.592 0.408
#> GSM634703 2 0.8499 0.5157 0.276 0.724
#> GSM634708 2 0.0000 0.8651 0.000 1.000
#> GSM634709 1 0.7376 0.7979 0.792 0.208
#> GSM634710 1 0.7602 0.6506 0.780 0.220
#> GSM634712 1 0.0672 0.7766 0.992 0.008
#> GSM634713 2 0.0376 0.8659 0.004 0.996
#> GSM634714 1 0.2423 0.7914 0.960 0.040
#> GSM634716 1 0.7950 0.7862 0.760 0.240
#> GSM634717 1 0.7376 0.7979 0.792 0.208
#> GSM634718 2 0.9775 0.0417 0.412 0.588
#> GSM634719 1 0.8016 0.7845 0.756 0.244
#> GSM634720 1 0.2603 0.7926 0.956 0.044
#> GSM634721 1 0.8661 0.6578 0.712 0.288
#> GSM634722 2 0.1184 0.8658 0.016 0.984
#> GSM634723 2 0.9988 -0.2465 0.480 0.520
#> GSM634724 1 0.2603 0.7910 0.956 0.044
#> GSM634725 1 0.9427 0.6574 0.640 0.360
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.2200 0.7560 0.940 0.004 0.056
#> GSM634648 1 0.8321 0.5429 0.624 0.228 0.148
#> GSM634649 1 0.3412 0.7267 0.876 0.000 0.124
#> GSM634650 2 0.7493 0.0119 0.480 0.484 0.036
#> GSM634653 1 0.7616 0.5098 0.636 0.072 0.292
#> GSM634659 1 0.5036 0.6824 0.808 0.172 0.020
#> GSM634666 3 0.8162 0.6094 0.192 0.164 0.644
#> GSM634667 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634669 1 0.1781 0.7589 0.960 0.020 0.020
#> GSM634670 3 0.3192 0.8545 0.112 0.000 0.888
#> GSM634679 3 0.4121 0.8416 0.168 0.000 0.832
#> GSM634680 3 0.2959 0.8527 0.100 0.000 0.900
#> GSM634681 1 0.4589 0.6957 0.820 0.008 0.172
#> GSM634688 2 0.4458 0.8336 0.080 0.864 0.056
#> GSM634690 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634694 1 0.1636 0.7592 0.964 0.016 0.020
#> GSM634698 1 0.2356 0.7544 0.928 0.000 0.072
#> GSM634704 2 0.5858 0.6991 0.240 0.740 0.020
#> GSM634705 1 0.6026 0.3881 0.624 0.000 0.376
#> GSM634706 1 0.6906 0.4378 0.644 0.324 0.032
#> GSM634707 1 0.2527 0.7562 0.936 0.020 0.044
#> GSM634711 1 0.2625 0.7525 0.916 0.000 0.084
#> GSM634715 1 0.5619 0.6201 0.744 0.244 0.012
#> GSM634633 1 0.7106 0.6034 0.696 0.232 0.072
#> GSM634634 2 0.5330 0.7883 0.044 0.812 0.144
#> GSM634635 1 0.3412 0.7269 0.876 0.000 0.124
#> GSM634636 1 0.2200 0.7560 0.940 0.004 0.056
#> GSM634637 1 0.4121 0.7521 0.876 0.040 0.084
#> GSM634638 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634639 1 0.5098 0.6133 0.752 0.000 0.248
#> GSM634640 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634641 1 0.1647 0.7579 0.960 0.004 0.036
#> GSM634642 2 0.3983 0.8452 0.068 0.884 0.048
#> GSM634644 2 0.3045 0.8521 0.064 0.916 0.020
#> GSM634645 1 0.6026 0.3881 0.624 0.000 0.376
#> GSM634646 1 0.6062 0.3660 0.616 0.000 0.384
#> GSM634647 3 0.2066 0.8320 0.060 0.000 0.940
#> GSM634651 2 0.0237 0.8636 0.004 0.996 0.000
#> GSM634652 2 0.1525 0.8603 0.004 0.964 0.032
#> GSM634654 1 0.6314 0.3952 0.604 0.004 0.392
#> GSM634655 1 0.3083 0.7572 0.916 0.024 0.060
#> GSM634656 3 0.2066 0.8320 0.060 0.000 0.940
#> GSM634657 2 0.7395 0.0337 0.476 0.492 0.032
#> GSM634658 1 0.2031 0.7599 0.952 0.016 0.032
#> GSM634660 1 0.2527 0.7562 0.936 0.020 0.044
#> GSM634661 2 0.0747 0.8643 0.016 0.984 0.000
#> GSM634662 2 0.5378 0.6965 0.236 0.756 0.008
#> GSM634663 2 0.4963 0.7471 0.200 0.792 0.008
#> GSM634664 2 0.4269 0.8381 0.076 0.872 0.052
#> GSM634665 1 0.6154 0.3185 0.592 0.000 0.408
#> GSM634668 1 0.6294 0.5687 0.692 0.288 0.020
#> GSM634671 1 0.5810 0.5256 0.664 0.000 0.336
#> GSM634672 3 0.4452 0.8096 0.192 0.000 0.808
#> GSM634673 3 0.3686 0.8490 0.140 0.000 0.860
#> GSM634674 1 0.5775 0.6082 0.728 0.260 0.012
#> GSM634675 2 0.1711 0.8640 0.032 0.960 0.008
#> GSM634676 1 0.4371 0.7203 0.860 0.108 0.032
#> GSM634677 2 0.1031 0.8640 0.024 0.976 0.000
#> GSM634678 2 0.6441 0.6333 0.276 0.696 0.028
#> GSM634682 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634683 2 0.0592 0.8649 0.012 0.988 0.000
#> GSM634684 1 0.2152 0.7584 0.948 0.016 0.036
#> GSM634685 2 0.7058 0.6913 0.180 0.720 0.100
#> GSM634686 1 0.1774 0.7598 0.960 0.016 0.024
#> GSM634687 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634689 2 0.3983 0.8452 0.068 0.884 0.048
#> GSM634691 2 0.0592 0.8644 0.012 0.988 0.000
#> GSM634692 1 0.2959 0.7549 0.900 0.000 0.100
#> GSM634693 1 0.6008 0.4619 0.628 0.000 0.372
#> GSM634695 2 0.0475 0.8646 0.004 0.992 0.004
#> GSM634696 1 0.6181 0.6623 0.772 0.156 0.072
#> GSM634697 3 0.2796 0.8505 0.092 0.000 0.908
#> GSM634699 2 0.4179 0.8399 0.072 0.876 0.052
#> GSM634700 2 0.2774 0.8514 0.072 0.920 0.008
#> GSM634701 1 0.2096 0.7597 0.944 0.004 0.052
#> GSM634702 1 0.4897 0.6849 0.812 0.172 0.016
#> GSM634703 2 0.6680 0.0900 0.484 0.508 0.008
#> GSM634708 2 0.0237 0.8636 0.000 0.996 0.004
#> GSM634709 1 0.2200 0.7560 0.940 0.004 0.056
#> GSM634710 3 0.8162 0.6094 0.192 0.164 0.644
#> GSM634712 3 0.4121 0.8416 0.168 0.000 0.832
#> GSM634713 2 0.0661 0.8647 0.004 0.988 0.008
#> GSM634714 1 0.6045 0.4267 0.620 0.000 0.380
#> GSM634716 1 0.2400 0.7554 0.932 0.004 0.064
#> GSM634717 1 0.2200 0.7560 0.940 0.004 0.056
#> GSM634718 1 0.6773 0.4168 0.636 0.340 0.024
#> GSM634719 1 0.2031 0.7599 0.952 0.016 0.032
#> GSM634720 1 0.5859 0.4856 0.656 0.000 0.344
#> GSM634721 1 0.9154 0.0699 0.468 0.148 0.384
#> GSM634722 2 0.2806 0.8606 0.032 0.928 0.040
#> GSM634723 1 0.6337 0.5611 0.708 0.264 0.028
#> GSM634724 3 0.5968 0.5123 0.364 0.000 0.636
#> GSM634725 1 0.4345 0.7134 0.848 0.136 0.016
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.1635 0.7378 0.948 0.000 0.044 0.008
#> GSM634648 1 0.8014 0.5492 0.600 0.120 0.132 0.148
#> GSM634649 1 0.2714 0.7131 0.884 0.000 0.112 0.004
#> GSM634650 1 0.7756 0.1303 0.428 0.320 0.000 0.252
#> GSM634653 1 0.7033 0.4849 0.604 0.028 0.280 0.088
#> GSM634659 1 0.4646 0.6848 0.796 0.120 0.000 0.084
#> GSM634666 3 0.7098 0.5903 0.120 0.036 0.640 0.204
#> GSM634667 2 0.0469 0.8346 0.000 0.988 0.000 0.012
#> GSM634669 1 0.2049 0.7418 0.940 0.012 0.012 0.036
#> GSM634670 3 0.2081 0.8339 0.084 0.000 0.916 0.000
#> GSM634679 3 0.3351 0.8274 0.148 0.000 0.844 0.008
#> GSM634680 3 0.2011 0.8311 0.080 0.000 0.920 0.000
#> GSM634681 1 0.3632 0.6852 0.832 0.008 0.156 0.004
#> GSM634688 4 0.3992 0.8152 0.040 0.080 0.024 0.856
#> GSM634690 2 0.0469 0.8346 0.000 0.988 0.000 0.012
#> GSM634694 1 0.1953 0.7424 0.944 0.012 0.012 0.032
#> GSM634698 1 0.2021 0.7385 0.932 0.000 0.056 0.012
#> GSM634704 2 0.6106 0.5214 0.204 0.684 0.004 0.108
#> GSM634705 1 0.4730 0.4061 0.636 0.000 0.364 0.000
#> GSM634706 1 0.5716 0.4559 0.644 0.320 0.016 0.020
#> GSM634707 1 0.2221 0.7381 0.936 0.020 0.020 0.024
#> GSM634711 1 0.2623 0.7371 0.908 0.000 0.064 0.028
#> GSM634715 1 0.5395 0.6426 0.732 0.184 0.000 0.084
#> GSM634633 1 0.6714 0.6058 0.668 0.216 0.060 0.056
#> GSM634634 4 0.4365 0.7457 0.016 0.044 0.112 0.828
#> GSM634635 1 0.2654 0.7132 0.888 0.000 0.108 0.004
#> GSM634636 1 0.1635 0.7378 0.948 0.000 0.044 0.008
#> GSM634637 1 0.3599 0.7361 0.876 0.040 0.064 0.020
#> GSM634638 2 0.1211 0.8284 0.000 0.960 0.000 0.040
#> GSM634639 1 0.4088 0.6125 0.764 0.000 0.232 0.004
#> GSM634640 2 0.1022 0.8315 0.000 0.968 0.000 0.032
#> GSM634641 1 0.1082 0.7402 0.972 0.004 0.020 0.004
#> GSM634642 4 0.4342 0.8215 0.044 0.128 0.008 0.820
#> GSM634644 2 0.4471 0.7106 0.036 0.796 0.004 0.164
#> GSM634645 1 0.4730 0.4061 0.636 0.000 0.364 0.000
#> GSM634646 1 0.4761 0.3864 0.628 0.000 0.372 0.000
#> GSM634647 3 0.1042 0.7693 0.008 0.000 0.972 0.020
#> GSM634651 2 0.0524 0.8339 0.004 0.988 0.000 0.008
#> GSM634652 4 0.4188 0.7426 0.000 0.244 0.004 0.752
#> GSM634654 1 0.5428 0.3985 0.600 0.000 0.380 0.020
#> GSM634655 1 0.2826 0.7393 0.912 0.024 0.040 0.024
#> GSM634656 3 0.1042 0.7693 0.008 0.000 0.972 0.020
#> GSM634657 1 0.7717 0.1254 0.424 0.344 0.000 0.232
#> GSM634658 1 0.2189 0.7414 0.932 0.004 0.020 0.044
#> GSM634660 1 0.2221 0.7381 0.936 0.020 0.020 0.024
#> GSM634661 2 0.1151 0.8325 0.008 0.968 0.000 0.024
#> GSM634662 2 0.5661 0.5370 0.220 0.700 0.000 0.080
#> GSM634663 2 0.5200 0.6091 0.184 0.744 0.000 0.072
#> GSM634664 4 0.4289 0.8112 0.024 0.132 0.020 0.824
#> GSM634665 1 0.5376 0.3276 0.588 0.000 0.396 0.016
#> GSM634668 1 0.5851 0.5886 0.680 0.236 0.000 0.084
#> GSM634671 1 0.5492 0.5150 0.640 0.000 0.328 0.032
#> GSM634672 3 0.3400 0.7953 0.180 0.000 0.820 0.000
#> GSM634673 3 0.2530 0.8339 0.112 0.000 0.888 0.000
#> GSM634674 1 0.5500 0.6247 0.708 0.224 0.000 0.068
#> GSM634675 2 0.2089 0.8234 0.020 0.932 0.000 0.048
#> GSM634676 1 0.4807 0.7005 0.800 0.064 0.012 0.124
#> GSM634677 2 0.1510 0.8304 0.016 0.956 0.000 0.028
#> GSM634678 2 0.7013 0.4060 0.252 0.604 0.012 0.132
#> GSM634682 2 0.1211 0.8284 0.000 0.960 0.000 0.040
#> GSM634683 2 0.1151 0.8310 0.008 0.968 0.000 0.024
#> GSM634684 1 0.2778 0.7374 0.900 0.004 0.016 0.080
#> GSM634685 4 0.8158 0.2637 0.116 0.348 0.056 0.480
#> GSM634686 1 0.2074 0.7426 0.940 0.012 0.016 0.032
#> GSM634687 2 0.1022 0.8315 0.000 0.968 0.000 0.032
#> GSM634689 4 0.4342 0.8215 0.044 0.128 0.008 0.820
#> GSM634691 2 0.0927 0.8346 0.008 0.976 0.000 0.016
#> GSM634692 1 0.2662 0.7399 0.900 0.000 0.084 0.016
#> GSM634693 1 0.5040 0.4679 0.628 0.000 0.364 0.008
#> GSM634695 2 0.2125 0.8091 0.004 0.920 0.000 0.076
#> GSM634696 1 0.6128 0.6382 0.716 0.044 0.056 0.184
#> GSM634697 3 0.1716 0.8241 0.064 0.000 0.936 0.000
#> GSM634699 4 0.4747 0.7648 0.024 0.180 0.016 0.780
#> GSM634700 2 0.3471 0.7662 0.060 0.868 0.000 0.072
#> GSM634701 1 0.1443 0.7430 0.960 0.004 0.028 0.008
#> GSM634702 1 0.4581 0.6866 0.800 0.120 0.000 0.080
#> GSM634703 1 0.6610 0.0235 0.468 0.452 0.000 0.080
#> GSM634708 2 0.0469 0.8346 0.000 0.988 0.000 0.012
#> GSM634709 1 0.1635 0.7378 0.948 0.000 0.044 0.008
#> GSM634710 3 0.7098 0.5903 0.120 0.036 0.640 0.204
#> GSM634712 3 0.3351 0.8274 0.148 0.000 0.844 0.008
#> GSM634713 2 0.3444 0.7139 0.000 0.816 0.000 0.184
#> GSM634714 1 0.4905 0.4491 0.632 0.000 0.364 0.004
#> GSM634716 1 0.2207 0.7386 0.932 0.004 0.040 0.024
#> GSM634717 1 0.1635 0.7378 0.948 0.000 0.044 0.008
#> GSM634718 1 0.6524 0.4601 0.608 0.296 0.004 0.092
#> GSM634719 1 0.2189 0.7414 0.932 0.004 0.020 0.044
#> GSM634720 1 0.5018 0.4927 0.656 0.000 0.332 0.012
#> GSM634721 1 0.8469 -0.0896 0.388 0.036 0.380 0.196
#> GSM634722 2 0.5811 0.2219 0.020 0.564 0.008 0.408
#> GSM634723 1 0.6328 0.5463 0.664 0.212 0.004 0.120
#> GSM634724 3 0.5323 0.4849 0.352 0.000 0.628 0.020
#> GSM634725 1 0.4266 0.7096 0.828 0.100 0.004 0.068
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1329 0.7133 0.956 0.000 0.032 0.008 0.004
#> GSM634648 1 0.7533 0.5090 0.580 0.092 0.120 0.172 0.036
#> GSM634649 1 0.2339 0.6869 0.892 0.000 0.100 0.004 0.004
#> GSM634650 1 0.8320 -0.0418 0.348 0.224 0.000 0.144 0.284
#> GSM634653 1 0.6476 0.4359 0.600 0.004 0.260 0.056 0.080
#> GSM634659 1 0.6009 0.6304 0.700 0.104 0.008 0.104 0.084
#> GSM634666 3 0.6354 0.4811 0.084 0.008 0.640 0.212 0.056
#> GSM634667 2 0.0912 0.7832 0.000 0.972 0.000 0.012 0.016
#> GSM634669 1 0.1774 0.7180 0.932 0.000 0.000 0.016 0.052
#> GSM634670 3 0.1671 0.6750 0.076 0.000 0.924 0.000 0.000
#> GSM634679 3 0.3099 0.6855 0.132 0.000 0.848 0.008 0.012
#> GSM634680 5 0.5650 -0.3277 0.076 0.000 0.460 0.000 0.464
#> GSM634681 1 0.3190 0.6591 0.840 0.008 0.140 0.000 0.012
#> GSM634688 4 0.2086 0.7833 0.028 0.012 0.008 0.932 0.020
#> GSM634690 2 0.0693 0.7854 0.000 0.980 0.000 0.008 0.012
#> GSM634694 1 0.1628 0.7182 0.936 0.000 0.000 0.008 0.056
#> GSM634698 1 0.2522 0.7143 0.904 0.000 0.056 0.012 0.028
#> GSM634704 2 0.7090 0.3976 0.192 0.564 0.000 0.084 0.160
#> GSM634705 1 0.4182 0.3786 0.644 0.000 0.352 0.000 0.004
#> GSM634706 1 0.5735 0.4411 0.616 0.312 0.016 0.016 0.040
#> GSM634707 1 0.3948 0.6970 0.828 0.020 0.024 0.016 0.112
#> GSM634711 1 0.3622 0.6967 0.820 0.000 0.056 0.000 0.124
#> GSM634715 1 0.6684 0.5525 0.624 0.172 0.008 0.060 0.136
#> GSM634633 1 0.6894 0.5502 0.612 0.196 0.048 0.024 0.120
#> GSM634634 4 0.3635 0.7016 0.000 0.008 0.088 0.836 0.068
#> GSM634635 1 0.2249 0.6871 0.896 0.000 0.096 0.000 0.008
#> GSM634636 1 0.1329 0.7133 0.956 0.000 0.032 0.008 0.004
#> GSM634637 1 0.4247 0.6962 0.808 0.036 0.056 0.000 0.100
#> GSM634638 2 0.2813 0.7564 0.000 0.868 0.000 0.024 0.108
#> GSM634639 1 0.4429 0.6003 0.744 0.000 0.192 0.000 0.064
#> GSM634640 2 0.2505 0.7636 0.000 0.888 0.000 0.020 0.092
#> GSM634641 1 0.1960 0.7176 0.936 0.004 0.020 0.012 0.028
#> GSM634642 4 0.2478 0.7929 0.028 0.060 0.000 0.904 0.008
#> GSM634644 2 0.5742 0.6063 0.028 0.680 0.000 0.148 0.144
#> GSM634645 1 0.4182 0.3786 0.644 0.000 0.352 0.000 0.004
#> GSM634646 1 0.4211 0.3588 0.636 0.000 0.360 0.000 0.004
#> GSM634647 3 0.1251 0.5764 0.000 0.000 0.956 0.008 0.036
#> GSM634651 2 0.0693 0.7855 0.000 0.980 0.000 0.012 0.008
#> GSM634652 4 0.3675 0.6384 0.000 0.188 0.000 0.788 0.024
#> GSM634654 1 0.5139 0.3697 0.596 0.000 0.360 0.004 0.040
#> GSM634655 1 0.4229 0.6974 0.808 0.024 0.024 0.016 0.128
#> GSM634656 3 0.1251 0.5764 0.000 0.000 0.956 0.008 0.036
#> GSM634657 1 0.8271 -0.0497 0.348 0.228 0.000 0.132 0.292
#> GSM634658 1 0.1731 0.7182 0.940 0.000 0.008 0.012 0.040
#> GSM634660 1 0.3948 0.6970 0.828 0.020 0.024 0.016 0.112
#> GSM634661 2 0.1484 0.7834 0.000 0.944 0.000 0.008 0.048
#> GSM634662 2 0.5874 0.4844 0.192 0.668 0.000 0.100 0.040
#> GSM634663 2 0.5437 0.5731 0.148 0.720 0.000 0.080 0.052
#> GSM634664 4 0.3633 0.7503 0.012 0.036 0.008 0.844 0.100
#> GSM634665 1 0.4927 0.2900 0.584 0.000 0.388 0.004 0.024
#> GSM634668 1 0.6918 0.5155 0.592 0.220 0.008 0.104 0.076
#> GSM634671 1 0.4886 0.4877 0.648 0.000 0.312 0.004 0.036
#> GSM634672 3 0.3010 0.6489 0.172 0.000 0.824 0.000 0.004
#> GSM634673 3 0.2616 0.6819 0.100 0.000 0.880 0.000 0.020
#> GSM634674 1 0.6637 0.5443 0.612 0.212 0.008 0.048 0.120
#> GSM634675 2 0.3103 0.7542 0.012 0.872 0.000 0.044 0.072
#> GSM634676 1 0.4647 0.6745 0.772 0.020 0.004 0.060 0.144
#> GSM634677 2 0.1651 0.7808 0.008 0.944 0.000 0.012 0.036
#> GSM634678 2 0.6963 0.3542 0.228 0.564 0.008 0.160 0.040
#> GSM634682 2 0.2813 0.7564 0.000 0.868 0.000 0.024 0.108
#> GSM634683 2 0.1281 0.7827 0.000 0.956 0.000 0.012 0.032
#> GSM634684 1 0.2625 0.7130 0.876 0.000 0.000 0.016 0.108
#> GSM634685 5 0.7814 -0.3087 0.040 0.236 0.012 0.344 0.368
#> GSM634686 1 0.1788 0.7181 0.932 0.000 0.004 0.008 0.056
#> GSM634687 2 0.2505 0.7636 0.000 0.888 0.000 0.020 0.092
#> GSM634689 4 0.2478 0.7929 0.028 0.060 0.000 0.904 0.008
#> GSM634691 2 0.1310 0.7831 0.000 0.956 0.000 0.020 0.024
#> GSM634692 1 0.2206 0.7182 0.912 0.000 0.068 0.004 0.016
#> GSM634693 1 0.4570 0.4422 0.632 0.000 0.348 0.000 0.020
#> GSM634695 2 0.3684 0.7377 0.004 0.824 0.000 0.056 0.116
#> GSM634696 1 0.5598 0.6022 0.696 0.004 0.048 0.196 0.056
#> GSM634697 3 0.2193 0.6504 0.060 0.000 0.912 0.000 0.028
#> GSM634699 4 0.4673 0.6688 0.020 0.052 0.000 0.752 0.176
#> GSM634700 2 0.3702 0.7194 0.032 0.840 0.000 0.092 0.036
#> GSM634701 1 0.2246 0.7195 0.924 0.004 0.028 0.016 0.028
#> GSM634702 1 0.6013 0.6310 0.700 0.104 0.008 0.100 0.088
#> GSM634703 1 0.6740 0.0565 0.432 0.428 0.000 0.100 0.040
#> GSM634708 2 0.0693 0.7854 0.000 0.980 0.000 0.008 0.012
#> GSM634709 1 0.1329 0.7133 0.956 0.000 0.032 0.008 0.004
#> GSM634710 3 0.6354 0.4811 0.084 0.008 0.640 0.212 0.056
#> GSM634712 3 0.3099 0.6855 0.132 0.000 0.848 0.008 0.012
#> GSM634713 2 0.4909 0.6491 0.000 0.716 0.000 0.164 0.120
#> GSM634714 1 0.5162 0.4382 0.628 0.000 0.308 0.000 0.064
#> GSM634716 1 0.3691 0.6994 0.836 0.004 0.040 0.012 0.108
#> GSM634717 1 0.1329 0.7133 0.956 0.000 0.032 0.008 0.004
#> GSM634718 1 0.6887 0.4395 0.576 0.212 0.000 0.068 0.144
#> GSM634719 1 0.1731 0.7182 0.940 0.000 0.008 0.012 0.040
#> GSM634720 1 0.5269 0.4817 0.648 0.000 0.276 0.004 0.072
#> GSM634721 3 0.7844 0.1711 0.332 0.000 0.380 0.208 0.080
#> GSM634722 2 0.6342 0.2063 0.000 0.464 0.000 0.372 0.164
#> GSM634723 1 0.6476 0.5184 0.636 0.116 0.000 0.084 0.164
#> GSM634724 3 0.5053 0.4464 0.324 0.000 0.624 0.000 0.052
#> GSM634725 1 0.5404 0.6638 0.740 0.084 0.008 0.048 0.120
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1382 0.6981 0.948 0.000 0.036 0.008 0.008 0.000
#> GSM634648 1 0.7119 0.4571 0.572 0.084 0.128 0.164 0.032 0.020
#> GSM634649 1 0.2001 0.6872 0.900 0.000 0.092 0.004 0.000 0.004
#> GSM634650 5 0.6707 0.4253 0.308 0.120 0.000 0.076 0.488 0.008
#> GSM634653 1 0.6139 0.4575 0.596 0.004 0.260 0.052 0.064 0.024
#> GSM634659 1 0.6368 0.5277 0.656 0.100 0.024 0.096 0.100 0.024
#> GSM634666 3 0.5918 0.4886 0.072 0.004 0.644 0.208 0.040 0.032
#> GSM634667 2 0.1779 0.6788 0.000 0.920 0.000 0.000 0.064 0.016
#> GSM634669 1 0.1768 0.6914 0.932 0.012 0.000 0.008 0.044 0.004
#> GSM634670 3 0.1297 0.6211 0.040 0.000 0.948 0.000 0.000 0.012
#> GSM634679 3 0.2357 0.6356 0.068 0.000 0.900 0.012 0.008 0.012
#> GSM634680 6 0.4516 0.0000 0.048 0.000 0.276 0.000 0.008 0.668
#> GSM634681 1 0.2825 0.6712 0.844 0.000 0.136 0.000 0.012 0.008
#> GSM634688 4 0.1723 0.7531 0.016 0.012 0.000 0.940 0.012 0.020
#> GSM634690 2 0.1367 0.6838 0.000 0.944 0.000 0.000 0.044 0.012
#> GSM634694 1 0.1699 0.6922 0.936 0.012 0.000 0.004 0.040 0.008
#> GSM634698 1 0.2684 0.7029 0.888 0.004 0.064 0.008 0.008 0.028
#> GSM634704 2 0.7630 0.0839 0.180 0.452 0.000 0.068 0.236 0.064
#> GSM634705 1 0.4046 0.3966 0.620 0.000 0.368 0.000 0.008 0.004
#> GSM634706 1 0.5391 0.2574 0.596 0.328 0.028 0.012 0.008 0.028
#> GSM634707 1 0.4975 0.6287 0.744 0.024 0.064 0.008 0.132 0.028
#> GSM634711 1 0.4719 0.6367 0.732 0.000 0.100 0.004 0.140 0.024
#> GSM634715 1 0.6582 0.4071 0.572 0.096 0.024 0.020 0.252 0.036
#> GSM634633 1 0.6973 0.4179 0.576 0.148 0.072 0.016 0.160 0.028
#> GSM634634 4 0.3932 0.6613 0.000 0.000 0.044 0.804 0.076 0.076
#> GSM634635 1 0.2001 0.6885 0.900 0.000 0.092 0.000 0.004 0.004
#> GSM634636 1 0.1382 0.6981 0.948 0.000 0.036 0.008 0.008 0.000
#> GSM634637 1 0.5157 0.6299 0.724 0.024 0.100 0.004 0.124 0.024
#> GSM634638 2 0.3936 0.5647 0.000 0.688 0.000 0.000 0.288 0.024
#> GSM634639 1 0.4620 0.6167 0.732 0.000 0.176 0.004 0.032 0.056
#> GSM634640 2 0.3424 0.6149 0.000 0.772 0.000 0.000 0.204 0.024
#> GSM634641 1 0.2684 0.6975 0.896 0.008 0.044 0.008 0.020 0.024
#> GSM634642 4 0.2451 0.7567 0.020 0.060 0.004 0.900 0.004 0.012
#> GSM634644 2 0.6739 0.3547 0.024 0.544 0.000 0.128 0.236 0.068
#> GSM634645 1 0.4046 0.3966 0.620 0.000 0.368 0.000 0.008 0.004
#> GSM634646 1 0.4069 0.3768 0.612 0.000 0.376 0.000 0.008 0.004
#> GSM634647 3 0.2920 0.5165 0.000 0.000 0.820 0.008 0.004 0.168
#> GSM634651 2 0.0603 0.6859 0.000 0.980 0.000 0.004 0.016 0.000
#> GSM634652 4 0.3953 0.6116 0.000 0.160 0.000 0.776 0.040 0.024
#> GSM634654 1 0.4904 0.3695 0.568 0.000 0.384 0.004 0.020 0.024
#> GSM634655 1 0.5187 0.6322 0.736 0.028 0.060 0.008 0.124 0.044
#> GSM634656 3 0.2920 0.5165 0.000 0.000 0.820 0.008 0.004 0.168
#> GSM634657 5 0.6654 0.4239 0.308 0.108 0.000 0.072 0.500 0.012
#> GSM634658 1 0.1836 0.6935 0.928 0.000 0.012 0.004 0.048 0.008
#> GSM634660 1 0.4975 0.6287 0.744 0.024 0.064 0.008 0.132 0.028
#> GSM634661 2 0.1686 0.6807 0.000 0.924 0.000 0.000 0.064 0.012
#> GSM634662 2 0.5896 0.3242 0.184 0.640 0.000 0.100 0.064 0.012
#> GSM634663 2 0.4978 0.4634 0.144 0.728 0.000 0.076 0.036 0.016
#> GSM634664 4 0.4424 0.6552 0.004 0.004 0.000 0.708 0.224 0.060
#> GSM634665 1 0.4812 0.2933 0.560 0.000 0.400 0.008 0.016 0.016
#> GSM634668 1 0.7126 0.3572 0.552 0.216 0.024 0.096 0.088 0.024
#> GSM634671 1 0.5404 0.4972 0.628 0.000 0.264 0.004 0.036 0.068
#> GSM634672 3 0.2883 0.5984 0.132 0.000 0.844 0.000 0.012 0.012
#> GSM634673 3 0.2011 0.6315 0.064 0.000 0.912 0.000 0.004 0.020
#> GSM634674 1 0.6928 0.4023 0.564 0.172 0.024 0.032 0.176 0.032
#> GSM634675 2 0.2959 0.6500 0.012 0.876 0.000 0.032 0.056 0.024
#> GSM634676 1 0.4631 0.6139 0.752 0.012 0.004 0.052 0.152 0.028
#> GSM634677 2 0.1223 0.6800 0.008 0.960 0.000 0.004 0.016 0.012
#> GSM634678 2 0.6560 0.2256 0.212 0.568 0.012 0.160 0.024 0.024
#> GSM634682 2 0.3936 0.5647 0.000 0.688 0.000 0.000 0.288 0.024
#> GSM634683 2 0.1340 0.6821 0.000 0.948 0.000 0.004 0.040 0.008
#> GSM634684 1 0.2773 0.6772 0.852 0.000 0.004 0.004 0.128 0.012
#> GSM634685 5 0.3167 0.1215 0.000 0.012 0.000 0.120 0.836 0.032
#> GSM634686 1 0.1843 0.6925 0.932 0.012 0.004 0.004 0.040 0.008
#> GSM634687 2 0.3424 0.6149 0.000 0.772 0.000 0.000 0.204 0.024
#> GSM634689 4 0.2451 0.7567 0.020 0.060 0.004 0.900 0.004 0.012
#> GSM634691 2 0.0909 0.6822 0.000 0.968 0.000 0.012 0.000 0.020
#> GSM634692 1 0.2384 0.6988 0.904 0.000 0.044 0.004 0.016 0.032
#> GSM634693 1 0.5182 0.4531 0.612 0.000 0.296 0.000 0.020 0.072
#> GSM634695 2 0.4495 0.4656 0.000 0.580 0.000 0.004 0.388 0.028
#> GSM634696 1 0.5544 0.5305 0.676 0.004 0.040 0.200 0.048 0.032
#> GSM634697 3 0.2201 0.5734 0.028 0.000 0.896 0.000 0.000 0.076
#> GSM634699 4 0.5460 0.5777 0.012 0.016 0.000 0.612 0.280 0.080
#> GSM634700 2 0.3377 0.6123 0.024 0.848 0.000 0.084 0.024 0.020
#> GSM634701 1 0.2705 0.6996 0.892 0.008 0.048 0.004 0.032 0.016
#> GSM634702 1 0.6397 0.5297 0.656 0.100 0.024 0.092 0.100 0.028
#> GSM634703 2 0.6309 -0.1484 0.424 0.432 0.000 0.096 0.024 0.024
#> GSM634708 2 0.1367 0.6838 0.000 0.944 0.000 0.000 0.044 0.012
#> GSM634709 1 0.1382 0.6981 0.948 0.000 0.036 0.008 0.008 0.000
#> GSM634710 3 0.5918 0.4886 0.072 0.004 0.644 0.208 0.040 0.032
#> GSM634712 3 0.2357 0.6356 0.068 0.000 0.900 0.012 0.008 0.012
#> GSM634713 2 0.5972 0.3930 0.000 0.524 0.000 0.132 0.316 0.028
#> GSM634714 1 0.5426 0.4586 0.604 0.000 0.264 0.000 0.016 0.116
#> GSM634716 1 0.4762 0.6383 0.748 0.008 0.080 0.008 0.132 0.024
#> GSM634717 1 0.1382 0.6981 0.948 0.000 0.036 0.008 0.008 0.000
#> GSM634718 1 0.6832 0.2873 0.580 0.184 0.000 0.064 0.096 0.076
#> GSM634719 1 0.1836 0.6935 0.928 0.000 0.012 0.004 0.048 0.008
#> GSM634720 1 0.5591 0.4981 0.616 0.000 0.248 0.004 0.028 0.104
#> GSM634721 3 0.7561 0.1646 0.308 0.000 0.376 0.208 0.084 0.024
#> GSM634722 5 0.6231 -0.0250 0.000 0.268 0.000 0.196 0.508 0.028
#> GSM634723 1 0.6436 0.4092 0.636 0.092 0.000 0.080 0.120 0.072
#> GSM634724 3 0.4772 0.3862 0.264 0.000 0.668 0.004 0.048 0.016
#> GSM634725 1 0.5836 0.5760 0.688 0.076 0.024 0.032 0.148 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 individual(p) k
#> MAD:hclust 85 0.138 2
#> MAD:hclust 79 0.159 3
#> MAD:hclust 74 0.427 4
#> MAD:hclust 68 0.377 5
#> MAD:hclust 58 0.600 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 17698 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 1.000 0.972 0.985 0.4952 0.508 0.508
#> 3 3 0.529 0.720 0.849 0.3160 0.721 0.507
#> 4 4 0.562 0.586 0.773 0.1094 0.898 0.720
#> 5 5 0.628 0.615 0.764 0.0771 0.812 0.452
#> 6 6 0.639 0.564 0.711 0.0492 0.942 0.743
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
#> GSM634643 1 0.0938 0.977 0.988 0.012
#> GSM634648 1 0.0000 0.976 1.000 0.000
#> GSM634649 1 0.0938 0.977 0.988 0.012
#> GSM634650 2 0.0000 0.997 0.000 1.000
#> GSM634653 1 0.0000 0.976 1.000 0.000
#> GSM634659 1 0.8955 0.583 0.688 0.312
#> GSM634666 1 0.7883 0.700 0.764 0.236
#> GSM634667 2 0.0000 0.997 0.000 1.000
#> GSM634669 1 0.0938 0.977 0.988 0.012
#> GSM634670 1 0.0000 0.976 1.000 0.000
#> GSM634679 1 0.0000 0.976 1.000 0.000
#> GSM634680 1 0.0000 0.976 1.000 0.000
#> GSM634681 1 0.0000 0.976 1.000 0.000
#> GSM634688 2 0.0938 0.990 0.012 0.988
#> GSM634690 2 0.0000 0.997 0.000 1.000
#> GSM634694 1 0.0938 0.977 0.988 0.012
#> GSM634698 1 0.0938 0.977 0.988 0.012
#> GSM634704 2 0.0000 0.997 0.000 1.000
#> GSM634705 1 0.0000 0.976 1.000 0.000
#> GSM634706 2 0.0000 0.997 0.000 1.000
#> GSM634707 1 0.0938 0.977 0.988 0.012
#> GSM634711 1 0.0938 0.977 0.988 0.012
#> GSM634715 2 0.0000 0.997 0.000 1.000
#> GSM634633 1 0.0938 0.977 0.988 0.012
#> GSM634634 2 0.0938 0.990 0.012 0.988
#> GSM634635 1 0.0938 0.977 0.988 0.012
#> GSM634636 1 0.0938 0.977 0.988 0.012
#> GSM634637 1 0.0938 0.977 0.988 0.012
#> GSM634638 2 0.0000 0.997 0.000 1.000
#> GSM634639 1 0.0938 0.977 0.988 0.012
#> GSM634640 2 0.0000 0.997 0.000 1.000
#> GSM634641 1 0.0938 0.977 0.988 0.012
#> GSM634642 2 0.0938 0.990 0.012 0.988
#> GSM634644 2 0.0000 0.997 0.000 1.000
#> GSM634645 1 0.0000 0.976 1.000 0.000
#> GSM634646 1 0.0000 0.976 1.000 0.000
#> GSM634647 1 0.0000 0.976 1.000 0.000
#> GSM634651 2 0.0000 0.997 0.000 1.000
#> GSM634652 2 0.0938 0.990 0.012 0.988
#> GSM634654 1 0.0000 0.976 1.000 0.000
#> GSM634655 1 0.0938 0.977 0.988 0.012
#> GSM634656 1 0.0000 0.976 1.000 0.000
#> GSM634657 2 0.0000 0.997 0.000 1.000
#> GSM634658 1 0.0938 0.977 0.988 0.012
#> GSM634660 1 0.0938 0.977 0.988 0.012
#> GSM634661 2 0.0000 0.997 0.000 1.000
#> GSM634662 2 0.0000 0.997 0.000 1.000
#> GSM634663 2 0.0000 0.997 0.000 1.000
#> GSM634664 2 0.0938 0.990 0.012 0.988
#> GSM634665 1 0.0000 0.976 1.000 0.000
#> GSM634668 2 0.0000 0.997 0.000 1.000
#> GSM634671 1 0.0000 0.976 1.000 0.000
#> GSM634672 1 0.0000 0.976 1.000 0.000
#> GSM634673 1 0.0000 0.976 1.000 0.000
#> GSM634674 2 0.0000 0.997 0.000 1.000
#> GSM634675 2 0.0000 0.997 0.000 1.000
#> GSM634676 1 0.4298 0.907 0.912 0.088
#> GSM634677 2 0.0000 0.997 0.000 1.000
#> GSM634678 2 0.0000 0.997 0.000 1.000
#> GSM634682 2 0.0000 0.997 0.000 1.000
#> GSM634683 2 0.0000 0.997 0.000 1.000
#> GSM634684 1 0.0938 0.977 0.988 0.012
#> GSM634685 2 0.0938 0.990 0.012 0.988
#> GSM634686 1 0.0938 0.977 0.988 0.012
#> GSM634687 2 0.0000 0.997 0.000 1.000
#> GSM634689 2 0.0938 0.990 0.012 0.988
#> GSM634691 2 0.0000 0.997 0.000 1.000
#> GSM634692 1 0.0938 0.977 0.988 0.012
#> GSM634693 1 0.0000 0.976 1.000 0.000
#> GSM634695 2 0.0000 0.997 0.000 1.000
#> GSM634696 1 0.1414 0.964 0.980 0.020
#> GSM634697 1 0.0000 0.976 1.000 0.000
#> GSM634699 2 0.0938 0.990 0.012 0.988
#> GSM634700 2 0.0000 0.997 0.000 1.000
#> GSM634701 1 0.0938 0.977 0.988 0.012
#> GSM634702 1 0.8909 0.591 0.692 0.308
#> GSM634703 2 0.0000 0.997 0.000 1.000
#> GSM634708 2 0.0000 0.997 0.000 1.000
#> GSM634709 1 0.0938 0.977 0.988 0.012
#> GSM634710 1 0.0000 0.976 1.000 0.000
#> GSM634712 1 0.0000 0.976 1.000 0.000
#> GSM634713 2 0.0938 0.990 0.012 0.988
#> GSM634714 1 0.0000 0.976 1.000 0.000
#> GSM634716 1 0.0938 0.977 0.988 0.012
#> GSM634717 1 0.0938 0.977 0.988 0.012
#> GSM634718 2 0.0000 0.997 0.000 1.000
#> GSM634719 1 0.0938 0.977 0.988 0.012
#> GSM634720 1 0.0000 0.976 1.000 0.000
#> GSM634721 1 0.0000 0.976 1.000 0.000
#> GSM634722 2 0.0938 0.990 0.012 0.988
#> GSM634723 2 0.0000 0.997 0.000 1.000
#> GSM634724 1 0.0000 0.976 1.000 0.000
#> GSM634725 1 0.0938 0.977 0.988 0.012
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0424 0.8240 0.992 0.000 0.008
#> GSM634648 1 0.1163 0.8237 0.972 0.000 0.028
#> GSM634649 1 0.0592 0.8232 0.988 0.000 0.012
#> GSM634650 2 0.8604 0.3550 0.348 0.540 0.112
#> GSM634653 3 0.6111 0.5776 0.396 0.000 0.604
#> GSM634659 1 0.7462 0.6443 0.696 0.124 0.180
#> GSM634666 3 0.2527 0.7328 0.020 0.044 0.936
#> GSM634667 2 0.1289 0.8928 0.000 0.968 0.032
#> GSM634669 1 0.2550 0.8052 0.932 0.012 0.056
#> GSM634670 3 0.5216 0.7198 0.260 0.000 0.740
#> GSM634679 3 0.3192 0.7715 0.112 0.000 0.888
#> GSM634680 3 0.4974 0.7361 0.236 0.000 0.764
#> GSM634681 1 0.0592 0.8232 0.988 0.000 0.012
#> GSM634688 3 0.5988 0.1824 0.000 0.368 0.632
#> GSM634690 2 0.0892 0.8943 0.000 0.980 0.020
#> GSM634694 1 0.1919 0.8131 0.956 0.024 0.020
#> GSM634698 1 0.0424 0.8240 0.992 0.000 0.008
#> GSM634704 2 0.3888 0.8570 0.064 0.888 0.048
#> GSM634705 1 0.0592 0.8232 0.988 0.000 0.012
#> GSM634706 1 0.8119 0.0762 0.500 0.432 0.068
#> GSM634707 1 0.4692 0.7520 0.820 0.012 0.168
#> GSM634711 1 0.3816 0.7550 0.852 0.000 0.148
#> GSM634715 2 0.6388 0.7155 0.184 0.752 0.064
#> GSM634633 1 0.3482 0.7693 0.872 0.000 0.128
#> GSM634634 3 0.1031 0.7319 0.000 0.024 0.976
#> GSM634635 1 0.0592 0.8232 0.988 0.000 0.012
#> GSM634636 1 0.0747 0.8247 0.984 0.000 0.016
#> GSM634637 1 0.3686 0.7579 0.860 0.000 0.140
#> GSM634638 2 0.1411 0.8928 0.000 0.964 0.036
#> GSM634639 1 0.0424 0.8240 0.992 0.000 0.008
#> GSM634640 2 0.1289 0.8928 0.000 0.968 0.032
#> GSM634641 1 0.1411 0.8201 0.964 0.000 0.036
#> GSM634642 2 0.5591 0.6377 0.000 0.696 0.304
#> GSM634644 2 0.1289 0.8928 0.000 0.968 0.032
#> GSM634645 1 0.0592 0.8232 0.988 0.000 0.012
#> GSM634646 3 0.6309 0.3643 0.496 0.000 0.504
#> GSM634647 3 0.3619 0.7724 0.136 0.000 0.864
#> GSM634651 2 0.0424 0.8948 0.000 0.992 0.008
#> GSM634652 2 0.3686 0.8243 0.000 0.860 0.140
#> GSM634654 3 0.6045 0.6129 0.380 0.000 0.620
#> GSM634655 1 0.5948 0.4233 0.640 0.000 0.360
#> GSM634656 3 0.3816 0.7714 0.148 0.000 0.852
#> GSM634657 2 0.4609 0.8521 0.052 0.856 0.092
#> GSM634658 1 0.2356 0.8018 0.928 0.000 0.072
#> GSM634660 1 0.4575 0.7557 0.828 0.012 0.160
#> GSM634661 2 0.0000 0.8943 0.000 1.000 0.000
#> GSM634662 2 0.5506 0.8004 0.092 0.816 0.092
#> GSM634663 2 0.2384 0.8845 0.008 0.936 0.056
#> GSM634664 3 0.5178 0.4434 0.000 0.256 0.744
#> GSM634665 1 0.5948 0.1330 0.640 0.000 0.360
#> GSM634668 2 0.8201 0.5072 0.276 0.612 0.112
#> GSM634671 1 0.1529 0.8170 0.960 0.000 0.040
#> GSM634672 3 0.5216 0.7198 0.260 0.000 0.740
#> GSM634673 3 0.5216 0.7198 0.260 0.000 0.740
#> GSM634674 2 0.2173 0.8876 0.008 0.944 0.048
#> GSM634675 2 0.2280 0.8861 0.008 0.940 0.052
#> GSM634676 1 0.3375 0.7812 0.892 0.008 0.100
#> GSM634677 2 0.1170 0.8933 0.008 0.976 0.016
#> GSM634678 2 0.3539 0.8639 0.012 0.888 0.100
#> GSM634682 2 0.1411 0.8928 0.000 0.964 0.036
#> GSM634683 2 0.0237 0.8942 0.004 0.996 0.000
#> GSM634684 1 0.1031 0.8243 0.976 0.000 0.024
#> GSM634685 3 0.1289 0.7278 0.000 0.032 0.968
#> GSM634686 1 0.0237 0.8245 0.996 0.000 0.004
#> GSM634687 2 0.1289 0.8928 0.000 0.968 0.032
#> GSM634689 3 0.5678 0.3577 0.000 0.316 0.684
#> GSM634691 2 0.1170 0.8933 0.008 0.976 0.016
#> GSM634692 1 0.0592 0.8247 0.988 0.000 0.012
#> GSM634693 1 0.6026 0.0722 0.624 0.000 0.376
#> GSM634695 2 0.1529 0.8934 0.000 0.960 0.040
#> GSM634696 1 0.5692 0.6583 0.724 0.008 0.268
#> GSM634697 3 0.3879 0.7707 0.152 0.000 0.848
#> GSM634699 3 0.6848 0.5862 0.100 0.164 0.736
#> GSM634700 2 0.2173 0.8868 0.008 0.944 0.048
#> GSM634701 1 0.0592 0.8249 0.988 0.000 0.012
#> GSM634702 1 0.7462 0.6443 0.696 0.124 0.180
#> GSM634703 1 0.8034 0.3851 0.584 0.336 0.080
#> GSM634708 2 0.0592 0.8947 0.000 0.988 0.012
#> GSM634709 1 0.0424 0.8240 0.992 0.000 0.008
#> GSM634710 3 0.2537 0.7642 0.080 0.000 0.920
#> GSM634712 3 0.3340 0.7721 0.120 0.000 0.880
#> GSM634713 2 0.3412 0.8357 0.000 0.876 0.124
#> GSM634714 1 0.6307 -0.3184 0.512 0.000 0.488
#> GSM634716 1 0.3686 0.7579 0.860 0.000 0.140
#> GSM634717 1 0.0747 0.8230 0.984 0.000 0.016
#> GSM634718 1 0.6673 0.6204 0.732 0.200 0.068
#> GSM634719 1 0.0237 0.8245 0.996 0.000 0.004
#> GSM634720 3 0.5291 0.7143 0.268 0.000 0.732
#> GSM634721 3 0.4002 0.7374 0.160 0.000 0.840
#> GSM634722 2 0.4235 0.7955 0.000 0.824 0.176
#> GSM634723 1 0.6875 0.6131 0.724 0.196 0.080
#> GSM634724 3 0.6026 0.5120 0.376 0.000 0.624
#> GSM634725 1 0.5122 0.7334 0.788 0.012 0.200
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0000 0.7998 1.000 0.000 0.000 0.000
#> GSM634648 1 0.1936 0.7949 0.940 0.000 0.032 0.028
#> GSM634649 1 0.0817 0.7925 0.976 0.000 0.024 0.000
#> GSM634650 4 0.8451 0.0425 0.296 0.252 0.028 0.424
#> GSM634653 3 0.5203 0.5325 0.348 0.000 0.636 0.016
#> GSM634659 1 0.7577 0.3383 0.468 0.056 0.060 0.416
#> GSM634666 4 0.5024 0.3817 0.000 0.008 0.360 0.632
#> GSM634667 2 0.0817 0.7308 0.000 0.976 0.000 0.024
#> GSM634669 1 0.3032 0.7812 0.868 0.000 0.008 0.124
#> GSM634670 3 0.2011 0.7143 0.080 0.000 0.920 0.000
#> GSM634679 3 0.2224 0.6808 0.032 0.000 0.928 0.040
#> GSM634680 3 0.2197 0.7139 0.080 0.000 0.916 0.004
#> GSM634681 1 0.0817 0.7925 0.976 0.000 0.024 0.000
#> GSM634688 4 0.5496 0.5139 0.000 0.064 0.232 0.704
#> GSM634690 2 0.1211 0.7356 0.000 0.960 0.000 0.040
#> GSM634694 1 0.3345 0.7605 0.860 0.004 0.012 0.124
#> GSM634698 1 0.0592 0.7956 0.984 0.000 0.016 0.000
#> GSM634704 2 0.5544 0.6623 0.076 0.744 0.012 0.168
#> GSM634705 1 0.0921 0.7901 0.972 0.000 0.028 0.000
#> GSM634706 1 0.7635 0.2805 0.500 0.160 0.012 0.328
#> GSM634707 1 0.6167 0.6515 0.664 0.000 0.116 0.220
#> GSM634711 1 0.5714 0.6821 0.716 0.000 0.128 0.156
#> GSM634715 2 0.8040 0.0534 0.244 0.412 0.008 0.336
#> GSM634633 1 0.5496 0.7100 0.732 0.000 0.108 0.160
#> GSM634634 4 0.5112 0.2707 0.000 0.004 0.436 0.560
#> GSM634635 1 0.0707 0.7944 0.980 0.000 0.020 0.000
#> GSM634636 1 0.0376 0.8018 0.992 0.000 0.004 0.004
#> GSM634637 1 0.5758 0.6832 0.712 0.000 0.128 0.160
#> GSM634638 2 0.1004 0.7314 0.000 0.972 0.004 0.024
#> GSM634639 1 0.0707 0.7961 0.980 0.000 0.020 0.000
#> GSM634640 2 0.0817 0.7308 0.000 0.976 0.000 0.024
#> GSM634641 1 0.4259 0.7567 0.816 0.000 0.056 0.128
#> GSM634642 4 0.6187 0.4200 0.000 0.184 0.144 0.672
#> GSM634644 2 0.1022 0.7305 0.000 0.968 0.000 0.032
#> GSM634645 1 0.0921 0.7901 0.972 0.000 0.028 0.000
#> GSM634646 3 0.4981 0.4352 0.464 0.000 0.536 0.000
#> GSM634647 3 0.2578 0.6618 0.036 0.000 0.912 0.052
#> GSM634651 2 0.2593 0.7369 0.000 0.892 0.004 0.104
#> GSM634652 2 0.5167 -0.0793 0.000 0.508 0.004 0.488
#> GSM634654 3 0.4049 0.6496 0.212 0.000 0.780 0.008
#> GSM634655 3 0.7623 -0.0300 0.380 0.000 0.416 0.204
#> GSM634656 3 0.2300 0.6913 0.048 0.000 0.924 0.028
#> GSM634657 2 0.5587 0.5594 0.012 0.612 0.012 0.364
#> GSM634658 1 0.2662 0.7914 0.900 0.000 0.016 0.084
#> GSM634660 1 0.6184 0.6517 0.664 0.000 0.120 0.216
#> GSM634661 2 0.2053 0.7412 0.000 0.924 0.004 0.072
#> GSM634662 2 0.5558 0.4721 0.012 0.528 0.004 0.456
#> GSM634663 2 0.4456 0.6670 0.000 0.716 0.004 0.280
#> GSM634664 4 0.5998 0.5026 0.000 0.088 0.248 0.664
#> GSM634665 1 0.4837 0.1474 0.648 0.000 0.348 0.004
#> GSM634668 4 0.8348 0.0175 0.296 0.228 0.028 0.448
#> GSM634671 1 0.2214 0.7866 0.928 0.000 0.044 0.028
#> GSM634672 3 0.2281 0.7131 0.096 0.000 0.904 0.000
#> GSM634673 3 0.2011 0.7138 0.080 0.000 0.920 0.000
#> GSM634674 2 0.5204 0.5593 0.000 0.612 0.012 0.376
#> GSM634675 2 0.4516 0.6811 0.000 0.736 0.012 0.252
#> GSM634676 1 0.4808 0.7107 0.736 0.000 0.028 0.236
#> GSM634677 2 0.3937 0.7139 0.000 0.800 0.012 0.188
#> GSM634678 2 0.5478 0.5416 0.008 0.580 0.008 0.404
#> GSM634682 2 0.1004 0.7314 0.000 0.972 0.004 0.024
#> GSM634683 2 0.1902 0.7420 0.000 0.932 0.004 0.064
#> GSM634684 1 0.1297 0.8007 0.964 0.000 0.016 0.020
#> GSM634685 3 0.5832 0.1987 0.004 0.044 0.640 0.312
#> GSM634686 1 0.0672 0.8006 0.984 0.000 0.008 0.008
#> GSM634687 2 0.1004 0.7314 0.000 0.972 0.004 0.024
#> GSM634689 4 0.5693 0.5035 0.000 0.072 0.240 0.688
#> GSM634691 2 0.3895 0.7147 0.000 0.804 0.012 0.184
#> GSM634692 1 0.0657 0.7999 0.984 0.000 0.012 0.004
#> GSM634693 3 0.5000 0.3336 0.496 0.000 0.504 0.000
#> GSM634695 2 0.1305 0.7312 0.000 0.960 0.004 0.036
#> GSM634696 1 0.6602 0.4311 0.552 0.000 0.092 0.356
#> GSM634697 3 0.2489 0.7046 0.068 0.000 0.912 0.020
#> GSM634699 4 0.7573 0.4106 0.076 0.068 0.276 0.580
#> GSM634700 2 0.4283 0.6803 0.000 0.740 0.004 0.256
#> GSM634701 1 0.2334 0.7958 0.908 0.000 0.004 0.088
#> GSM634702 1 0.7632 0.3406 0.468 0.056 0.064 0.412
#> GSM634703 4 0.7534 -0.2296 0.412 0.160 0.004 0.424
#> GSM634708 2 0.0592 0.7386 0.000 0.984 0.000 0.016
#> GSM634709 1 0.0000 0.7998 1.000 0.000 0.000 0.000
#> GSM634710 3 0.3552 0.5978 0.024 0.000 0.848 0.128
#> GSM634712 3 0.2032 0.6859 0.036 0.000 0.936 0.028
#> GSM634713 2 0.5158 -0.0494 0.000 0.524 0.004 0.472
#> GSM634714 3 0.5060 0.5043 0.412 0.000 0.584 0.004
#> GSM634716 1 0.5815 0.6768 0.708 0.000 0.140 0.152
#> GSM634717 1 0.1256 0.8010 0.964 0.000 0.008 0.028
#> GSM634718 1 0.5658 0.6305 0.700 0.044 0.012 0.244
#> GSM634719 1 0.0188 0.8001 0.996 0.000 0.000 0.004
#> GSM634720 3 0.2401 0.7144 0.092 0.000 0.904 0.004
#> GSM634721 3 0.7446 0.0703 0.396 0.000 0.432 0.172
#> GSM634722 4 0.5478 0.1244 0.000 0.444 0.016 0.540
#> GSM634723 1 0.4573 0.7374 0.816 0.036 0.024 0.124
#> GSM634724 3 0.4872 0.6278 0.148 0.000 0.776 0.076
#> GSM634725 1 0.6058 0.5739 0.604 0.000 0.060 0.336
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0693 0.7798 0.980 0.000 0.000 0.008 0.012
#> GSM634648 1 0.1721 0.7781 0.944 0.000 0.016 0.020 0.020
#> GSM634649 1 0.0865 0.7809 0.972 0.000 0.024 0.004 0.000
#> GSM634650 5 0.5928 0.5490 0.084 0.068 0.004 0.152 0.692
#> GSM634653 1 0.6310 0.2881 0.568 0.000 0.316 0.056 0.060
#> GSM634659 5 0.4844 0.6291 0.160 0.012 0.012 0.060 0.756
#> GSM634666 4 0.2905 0.7160 0.000 0.000 0.096 0.868 0.036
#> GSM634667 2 0.1216 0.7534 0.000 0.960 0.000 0.020 0.020
#> GSM634669 1 0.3211 0.6544 0.824 0.000 0.004 0.008 0.164
#> GSM634670 3 0.1059 0.8507 0.020 0.000 0.968 0.008 0.004
#> GSM634679 3 0.2609 0.8218 0.008 0.000 0.896 0.028 0.068
#> GSM634680 3 0.2158 0.8409 0.020 0.000 0.920 0.008 0.052
#> GSM634681 1 0.0992 0.7803 0.968 0.000 0.024 0.008 0.000
#> GSM634688 4 0.2551 0.7403 0.000 0.012 0.040 0.904 0.044
#> GSM634690 2 0.2464 0.7780 0.000 0.888 0.000 0.016 0.096
#> GSM634694 1 0.2660 0.7110 0.864 0.000 0.000 0.008 0.128
#> GSM634698 1 0.1012 0.7808 0.968 0.000 0.020 0.012 0.000
#> GSM634704 2 0.6130 0.6759 0.052 0.616 0.000 0.068 0.264
#> GSM634705 1 0.1106 0.7803 0.964 0.000 0.024 0.012 0.000
#> GSM634706 5 0.6813 0.3329 0.344 0.072 0.000 0.076 0.508
#> GSM634707 5 0.5928 0.4972 0.348 0.000 0.076 0.016 0.560
#> GSM634711 5 0.6438 0.4396 0.380 0.000 0.128 0.012 0.480
#> GSM634715 5 0.4731 0.5170 0.052 0.148 0.004 0.028 0.768
#> GSM634633 5 0.6264 0.3239 0.412 0.000 0.104 0.012 0.472
#> GSM634634 4 0.3081 0.6831 0.000 0.000 0.156 0.832 0.012
#> GSM634635 1 0.0865 0.7809 0.972 0.000 0.024 0.004 0.000
#> GSM634636 1 0.1442 0.7709 0.952 0.000 0.004 0.012 0.032
#> GSM634637 5 0.6335 0.4497 0.380 0.000 0.116 0.012 0.492
#> GSM634638 2 0.2664 0.7200 0.000 0.892 0.004 0.040 0.064
#> GSM634639 1 0.1547 0.7729 0.948 0.000 0.016 0.004 0.032
#> GSM634640 2 0.0771 0.7490 0.000 0.976 0.000 0.020 0.004
#> GSM634641 1 0.5088 0.1809 0.620 0.000 0.024 0.016 0.340
#> GSM634642 4 0.4320 0.6981 0.000 0.056 0.032 0.800 0.112
#> GSM634644 2 0.2291 0.7275 0.000 0.908 0.000 0.036 0.056
#> GSM634645 1 0.1195 0.7799 0.960 0.000 0.028 0.012 0.000
#> GSM634646 1 0.4798 -0.0504 0.512 0.000 0.472 0.012 0.004
#> GSM634647 3 0.1768 0.8235 0.000 0.000 0.924 0.072 0.004
#> GSM634651 2 0.4096 0.7626 0.000 0.760 0.000 0.040 0.200
#> GSM634652 4 0.3849 0.6466 0.000 0.232 0.000 0.752 0.016
#> GSM634654 3 0.4375 0.6460 0.236 0.000 0.728 0.004 0.032
#> GSM634655 5 0.6193 0.4196 0.136 0.000 0.256 0.016 0.592
#> GSM634656 3 0.1365 0.8407 0.004 0.000 0.952 0.040 0.004
#> GSM634657 5 0.5510 0.1716 0.012 0.280 0.000 0.072 0.636
#> GSM634658 1 0.3031 0.6977 0.852 0.000 0.004 0.016 0.128
#> GSM634660 5 0.5873 0.5009 0.344 0.000 0.080 0.012 0.564
#> GSM634661 2 0.3427 0.7761 0.000 0.796 0.000 0.012 0.192
#> GSM634662 5 0.4123 0.4445 0.004 0.132 0.000 0.072 0.792
#> GSM634663 2 0.5386 0.5861 0.000 0.564 0.000 0.064 0.372
#> GSM634664 4 0.2100 0.7410 0.000 0.016 0.048 0.924 0.012
#> GSM634665 1 0.3531 0.6757 0.820 0.000 0.152 0.016 0.012
#> GSM634668 5 0.4198 0.5899 0.072 0.044 0.000 0.068 0.816
#> GSM634671 1 0.2585 0.7562 0.896 0.000 0.024 0.072 0.008
#> GSM634672 3 0.1195 0.8512 0.028 0.000 0.960 0.000 0.012
#> GSM634673 3 0.1885 0.8456 0.020 0.000 0.932 0.004 0.044
#> GSM634674 5 0.3795 0.3858 0.004 0.184 0.000 0.024 0.788
#> GSM634675 2 0.5687 0.6437 0.004 0.584 0.000 0.088 0.324
#> GSM634676 1 0.5794 0.3513 0.624 0.000 0.004 0.144 0.228
#> GSM634677 2 0.5062 0.7075 0.000 0.656 0.000 0.068 0.276
#> GSM634678 5 0.5879 0.2393 0.020 0.228 0.000 0.112 0.640
#> GSM634682 2 0.2664 0.7200 0.000 0.892 0.004 0.040 0.064
#> GSM634683 2 0.3319 0.7805 0.000 0.820 0.000 0.020 0.160
#> GSM634684 1 0.2538 0.7532 0.900 0.000 0.004 0.048 0.048
#> GSM634685 4 0.7843 0.1355 0.000 0.104 0.340 0.396 0.160
#> GSM634686 1 0.0955 0.7763 0.968 0.000 0.000 0.004 0.028
#> GSM634687 2 0.1403 0.7437 0.000 0.952 0.000 0.024 0.024
#> GSM634689 4 0.4062 0.7021 0.000 0.020 0.040 0.804 0.136
#> GSM634691 2 0.5040 0.7106 0.000 0.660 0.000 0.068 0.272
#> GSM634692 1 0.0451 0.7813 0.988 0.000 0.000 0.004 0.008
#> GSM634693 1 0.5111 0.2890 0.588 0.000 0.376 0.024 0.012
#> GSM634695 2 0.2804 0.7167 0.000 0.884 0.004 0.044 0.068
#> GSM634696 4 0.6540 -0.0701 0.372 0.000 0.008 0.464 0.156
#> GSM634697 3 0.1026 0.8460 0.004 0.000 0.968 0.024 0.004
#> GSM634699 4 0.3287 0.7309 0.028 0.024 0.044 0.880 0.024
#> GSM634700 2 0.5538 0.6416 0.000 0.588 0.000 0.088 0.324
#> GSM634701 1 0.3475 0.6132 0.804 0.000 0.004 0.012 0.180
#> GSM634702 5 0.4593 0.6269 0.152 0.008 0.012 0.056 0.772
#> GSM634703 5 0.5941 0.5582 0.164 0.072 0.000 0.084 0.680
#> GSM634708 2 0.2179 0.7803 0.000 0.896 0.000 0.004 0.100
#> GSM634709 1 0.0693 0.7798 0.980 0.000 0.000 0.008 0.012
#> GSM634710 3 0.5301 0.4998 0.004 0.000 0.648 0.272 0.076
#> GSM634712 3 0.2193 0.8333 0.008 0.000 0.920 0.028 0.044
#> GSM634713 4 0.5068 0.4203 0.000 0.384 0.004 0.580 0.032
#> GSM634714 3 0.5393 0.4535 0.344 0.000 0.596 0.008 0.052
#> GSM634716 5 0.6405 0.4379 0.380 0.000 0.124 0.012 0.484
#> GSM634717 1 0.0992 0.7783 0.968 0.000 0.000 0.008 0.024
#> GSM634718 1 0.6060 -0.0794 0.484 0.028 0.000 0.056 0.432
#> GSM634719 1 0.1202 0.7732 0.960 0.000 0.004 0.004 0.032
#> GSM634720 3 0.2806 0.8286 0.052 0.000 0.888 0.008 0.052
#> GSM634721 1 0.7952 -0.1305 0.336 0.000 0.268 0.320 0.076
#> GSM634722 4 0.4116 0.6279 0.000 0.248 0.004 0.732 0.016
#> GSM634723 1 0.4600 0.6465 0.776 0.020 0.000 0.096 0.108
#> GSM634724 3 0.3023 0.7986 0.028 0.000 0.872 0.012 0.088
#> GSM634725 5 0.5944 0.5451 0.312 0.000 0.028 0.068 0.592
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.2625 0.7749 0.872 0.000 0.000 0.000 0.072 0.056
#> GSM634648 1 0.2143 0.7695 0.916 0.000 0.012 0.008 0.016 0.048
#> GSM634649 1 0.1109 0.7753 0.964 0.000 0.012 0.004 0.016 0.004
#> GSM634650 5 0.6848 0.1841 0.016 0.032 0.012 0.132 0.432 0.376
#> GSM634653 1 0.5796 0.4444 0.644 0.000 0.168 0.008 0.052 0.128
#> GSM634659 5 0.4459 0.6442 0.052 0.000 0.000 0.040 0.744 0.164
#> GSM634666 4 0.2390 0.7704 0.004 0.000 0.024 0.900 0.012 0.060
#> GSM634667 2 0.1714 0.6759 0.000 0.908 0.000 0.000 0.000 0.092
#> GSM634669 1 0.4957 0.6592 0.664 0.000 0.000 0.004 0.184 0.148
#> GSM634670 3 0.1760 0.7634 0.020 0.000 0.936 0.012 0.028 0.004
#> GSM634679 3 0.3771 0.7116 0.000 0.000 0.800 0.036 0.132 0.032
#> GSM634680 3 0.4349 0.7211 0.032 0.000 0.772 0.004 0.080 0.112
#> GSM634681 1 0.1109 0.7715 0.964 0.000 0.016 0.004 0.004 0.012
#> GSM634688 4 0.1812 0.7770 0.000 0.004 0.008 0.924 0.004 0.060
#> GSM634690 2 0.3136 0.5949 0.000 0.768 0.000 0.004 0.000 0.228
#> GSM634694 1 0.4998 0.6542 0.656 0.000 0.000 0.008 0.112 0.224
#> GSM634698 1 0.1223 0.7725 0.960 0.000 0.016 0.004 0.008 0.012
#> GSM634704 2 0.5976 -0.1425 0.064 0.464 0.004 0.012 0.028 0.428
#> GSM634705 1 0.0798 0.7731 0.976 0.000 0.012 0.004 0.004 0.004
#> GSM634706 6 0.4830 0.4314 0.172 0.004 0.000 0.012 0.108 0.704
#> GSM634707 5 0.2418 0.6818 0.096 0.000 0.008 0.004 0.884 0.008
#> GSM634711 5 0.3483 0.6635 0.144 0.000 0.036 0.000 0.808 0.012
#> GSM634715 5 0.4896 0.5100 0.000 0.120 0.004 0.000 0.664 0.212
#> GSM634633 5 0.5316 0.5158 0.172 0.000 0.044 0.000 0.672 0.112
#> GSM634634 4 0.2239 0.7515 0.000 0.000 0.072 0.900 0.020 0.008
#> GSM634635 1 0.1129 0.7758 0.964 0.000 0.012 0.004 0.012 0.008
#> GSM634636 1 0.2897 0.7720 0.852 0.000 0.000 0.000 0.088 0.060
#> GSM634637 5 0.3293 0.6760 0.132 0.000 0.032 0.000 0.824 0.012
#> GSM634638 2 0.1269 0.6609 0.000 0.956 0.000 0.012 0.020 0.012
#> GSM634639 1 0.4268 0.7017 0.764 0.000 0.020 0.004 0.148 0.064
#> GSM634640 2 0.1387 0.6813 0.000 0.932 0.000 0.000 0.000 0.068
#> GSM634641 5 0.4906 0.1731 0.404 0.000 0.004 0.004 0.544 0.044
#> GSM634642 4 0.3245 0.7207 0.000 0.008 0.008 0.812 0.008 0.164
#> GSM634644 2 0.0291 0.6743 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM634645 1 0.1198 0.7723 0.960 0.000 0.020 0.004 0.012 0.004
#> GSM634646 1 0.3759 0.5110 0.732 0.000 0.248 0.004 0.008 0.008
#> GSM634647 3 0.2281 0.7407 0.004 0.000 0.908 0.048 0.012 0.028
#> GSM634651 2 0.4165 0.2634 0.000 0.568 0.000 0.008 0.004 0.420
#> GSM634652 4 0.3450 0.6573 0.000 0.208 0.000 0.772 0.008 0.012
#> GSM634654 3 0.6170 0.3369 0.380 0.000 0.476 0.004 0.044 0.096
#> GSM634655 5 0.4054 0.5511 0.012 0.004 0.096 0.000 0.784 0.104
#> GSM634656 3 0.2288 0.7481 0.012 0.000 0.912 0.036 0.012 0.028
#> GSM634657 6 0.6635 0.1178 0.012 0.144 0.004 0.032 0.348 0.460
#> GSM634658 1 0.5021 0.7024 0.700 0.000 0.008 0.016 0.152 0.124
#> GSM634660 5 0.2225 0.6823 0.092 0.000 0.008 0.000 0.892 0.008
#> GSM634661 2 0.3872 0.3596 0.000 0.604 0.000 0.004 0.000 0.392
#> GSM634662 5 0.4849 0.0793 0.000 0.012 0.000 0.032 0.480 0.476
#> GSM634663 6 0.5353 0.4586 0.000 0.252 0.000 0.028 0.092 0.628
#> GSM634664 4 0.1768 0.7781 0.000 0.004 0.012 0.932 0.008 0.044
#> GSM634665 1 0.3430 0.6966 0.836 0.000 0.104 0.012 0.016 0.032
#> GSM634668 5 0.4452 0.4768 0.000 0.000 0.000 0.048 0.636 0.316
#> GSM634671 1 0.3093 0.7484 0.868 0.000 0.032 0.052 0.008 0.040
#> GSM634672 3 0.1980 0.7647 0.036 0.000 0.920 0.008 0.036 0.000
#> GSM634673 3 0.3687 0.7436 0.020 0.000 0.820 0.004 0.084 0.072
#> GSM634674 5 0.5174 0.3471 0.000 0.060 0.004 0.012 0.580 0.344
#> GSM634675 6 0.4389 0.3919 0.004 0.304 0.000 0.024 0.008 0.660
#> GSM634676 1 0.7075 0.3628 0.476 0.000 0.008 0.100 0.248 0.168
#> GSM634677 6 0.4116 0.1509 0.000 0.416 0.000 0.012 0.000 0.572
#> GSM634678 6 0.5389 0.4489 0.008 0.064 0.000 0.044 0.228 0.656
#> GSM634682 2 0.1269 0.6609 0.000 0.956 0.000 0.012 0.020 0.012
#> GSM634683 2 0.3934 0.3809 0.000 0.616 0.000 0.008 0.000 0.376
#> GSM634684 1 0.4831 0.7312 0.732 0.000 0.008 0.028 0.128 0.104
#> GSM634685 4 0.8726 0.1593 0.000 0.192 0.168 0.324 0.172 0.144
#> GSM634686 1 0.3655 0.7591 0.800 0.000 0.000 0.004 0.088 0.108
#> GSM634687 2 0.1141 0.6819 0.000 0.948 0.000 0.000 0.000 0.052
#> GSM634689 4 0.3288 0.7495 0.000 0.000 0.012 0.836 0.056 0.096
#> GSM634691 6 0.4129 0.1302 0.000 0.424 0.000 0.012 0.000 0.564
#> GSM634692 1 0.3052 0.7765 0.852 0.000 0.008 0.000 0.064 0.076
#> GSM634693 1 0.4740 0.5012 0.692 0.000 0.240 0.016 0.016 0.036
#> GSM634695 2 0.1991 0.6365 0.000 0.920 0.000 0.012 0.024 0.044
#> GSM634696 4 0.6539 0.3201 0.288 0.000 0.004 0.512 0.124 0.072
#> GSM634697 3 0.1901 0.7609 0.012 0.000 0.932 0.016 0.024 0.016
#> GSM634699 4 0.3052 0.7585 0.036 0.004 0.020 0.872 0.008 0.060
#> GSM634700 6 0.4652 0.3713 0.000 0.324 0.000 0.032 0.016 0.628
#> GSM634701 1 0.4444 0.6384 0.676 0.000 0.000 0.000 0.256 0.068
#> GSM634702 5 0.4538 0.6445 0.048 0.000 0.004 0.040 0.744 0.164
#> GSM634703 6 0.5390 0.3134 0.060 0.016 0.000 0.028 0.252 0.644
#> GSM634708 2 0.3426 0.5484 0.000 0.720 0.000 0.004 0.000 0.276
#> GSM634709 1 0.2511 0.7764 0.880 0.000 0.000 0.000 0.064 0.056
#> GSM634710 3 0.5563 0.3690 0.000 0.000 0.576 0.312 0.076 0.036
#> GSM634712 3 0.3300 0.7305 0.000 0.000 0.840 0.036 0.096 0.028
#> GSM634713 2 0.4427 -0.0721 0.000 0.564 0.000 0.412 0.016 0.008
#> GSM634714 3 0.6804 0.2992 0.380 0.000 0.420 0.008 0.084 0.108
#> GSM634716 5 0.3350 0.6680 0.124 0.000 0.040 0.000 0.824 0.012
#> GSM634717 1 0.3253 0.7684 0.832 0.000 0.000 0.004 0.068 0.096
#> GSM634718 6 0.5483 0.2609 0.256 0.000 0.000 0.008 0.148 0.588
#> GSM634719 1 0.3842 0.7543 0.784 0.000 0.004 0.000 0.112 0.100
#> GSM634720 3 0.5944 0.6414 0.156 0.000 0.636 0.004 0.096 0.108
#> GSM634721 1 0.7678 -0.1517 0.352 0.000 0.192 0.340 0.040 0.076
#> GSM634722 4 0.4117 0.6186 0.000 0.264 0.008 0.704 0.020 0.004
#> GSM634723 1 0.5887 0.5601 0.568 0.000 0.008 0.028 0.104 0.292
#> GSM634724 3 0.3499 0.6324 0.004 0.000 0.728 0.000 0.264 0.004
#> GSM634725 5 0.4611 0.6673 0.096 0.000 0.004 0.036 0.752 0.112
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n individual(p) k
#> MAD:kmeans 93 0.296 2
#> MAD:kmeans 82 0.282 3
#> MAD:kmeans 71 0.560 4
#> MAD:kmeans 70 0.690 5
#> MAD:kmeans 65 0.937 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 17698 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 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.966 0.987 0.4998 0.499 0.499
#> 3 3 0.750 0.801 0.903 0.3413 0.711 0.481
#> 4 4 0.654 0.607 0.806 0.1054 0.818 0.525
#> 5 5 0.704 0.728 0.834 0.0672 0.919 0.706
#> 6 6 0.707 0.607 0.759 0.0430 0.965 0.842
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
#> GSM634643 1 0.0000 0.991 1.000 0.000
#> GSM634648 1 0.0000 0.991 1.000 0.000
#> GSM634649 1 0.0000 0.991 1.000 0.000
#> GSM634650 2 0.0000 0.979 0.000 1.000
#> GSM634653 1 0.0000 0.991 1.000 0.000
#> GSM634659 2 0.9710 0.336 0.400 0.600
#> GSM634666 2 0.1414 0.961 0.020 0.980
#> GSM634667 2 0.0000 0.979 0.000 1.000
#> GSM634669 1 0.0000 0.991 1.000 0.000
#> GSM634670 1 0.0000 0.991 1.000 0.000
#> GSM634679 1 0.0000 0.991 1.000 0.000
#> GSM634680 1 0.0000 0.991 1.000 0.000
#> GSM634681 1 0.0000 0.991 1.000 0.000
#> GSM634688 2 0.0000 0.979 0.000 1.000
#> GSM634690 2 0.0000 0.979 0.000 1.000
#> GSM634694 1 0.0376 0.988 0.996 0.004
#> GSM634698 1 0.0000 0.991 1.000 0.000
#> GSM634704 2 0.0000 0.979 0.000 1.000
#> GSM634705 1 0.0000 0.991 1.000 0.000
#> GSM634706 2 0.0000 0.979 0.000 1.000
#> GSM634707 1 0.0000 0.991 1.000 0.000
#> GSM634711 1 0.0000 0.991 1.000 0.000
#> GSM634715 2 0.0000 0.979 0.000 1.000
#> GSM634633 1 0.0000 0.991 1.000 0.000
#> GSM634634 2 0.0000 0.979 0.000 1.000
#> GSM634635 1 0.0000 0.991 1.000 0.000
#> GSM634636 1 0.0000 0.991 1.000 0.000
#> GSM634637 1 0.0000 0.991 1.000 0.000
#> GSM634638 2 0.0000 0.979 0.000 1.000
#> GSM634639 1 0.0000 0.991 1.000 0.000
#> GSM634640 2 0.0000 0.979 0.000 1.000
#> GSM634641 1 0.0000 0.991 1.000 0.000
#> GSM634642 2 0.0000 0.979 0.000 1.000
#> GSM634644 2 0.0000 0.979 0.000 1.000
#> GSM634645 1 0.0000 0.991 1.000 0.000
#> GSM634646 1 0.0000 0.991 1.000 0.000
#> GSM634647 1 0.0000 0.991 1.000 0.000
#> GSM634651 2 0.0000 0.979 0.000 1.000
#> GSM634652 2 0.0000 0.979 0.000 1.000
#> GSM634654 1 0.0000 0.991 1.000 0.000
#> GSM634655 1 0.0000 0.991 1.000 0.000
#> GSM634656 1 0.0000 0.991 1.000 0.000
#> GSM634657 2 0.0000 0.979 0.000 1.000
#> GSM634658 1 0.0000 0.991 1.000 0.000
#> GSM634660 1 0.0000 0.991 1.000 0.000
#> GSM634661 2 0.0000 0.979 0.000 1.000
#> GSM634662 2 0.0000 0.979 0.000 1.000
#> GSM634663 2 0.0000 0.979 0.000 1.000
#> GSM634664 2 0.0000 0.979 0.000 1.000
#> GSM634665 1 0.0000 0.991 1.000 0.000
#> GSM634668 2 0.0000 0.979 0.000 1.000
#> GSM634671 1 0.0000 0.991 1.000 0.000
#> GSM634672 1 0.0000 0.991 1.000 0.000
#> GSM634673 1 0.0000 0.991 1.000 0.000
#> GSM634674 2 0.0000 0.979 0.000 1.000
#> GSM634675 2 0.0000 0.979 0.000 1.000
#> GSM634676 1 0.8207 0.649 0.744 0.256
#> GSM634677 2 0.0000 0.979 0.000 1.000
#> GSM634678 2 0.0000 0.979 0.000 1.000
#> GSM634682 2 0.0000 0.979 0.000 1.000
#> GSM634683 2 0.0000 0.979 0.000 1.000
#> GSM634684 1 0.0000 0.991 1.000 0.000
#> GSM634685 2 0.0000 0.979 0.000 1.000
#> GSM634686 1 0.0000 0.991 1.000 0.000
#> GSM634687 2 0.0000 0.979 0.000 1.000
#> GSM634689 2 0.0000 0.979 0.000 1.000
#> GSM634691 2 0.0000 0.979 0.000 1.000
#> GSM634692 1 0.0000 0.991 1.000 0.000
#> GSM634693 1 0.0000 0.991 1.000 0.000
#> GSM634695 2 0.0000 0.979 0.000 1.000
#> GSM634696 1 0.6247 0.810 0.844 0.156
#> GSM634697 1 0.0000 0.991 1.000 0.000
#> GSM634699 2 0.0000 0.979 0.000 1.000
#> GSM634700 2 0.0000 0.979 0.000 1.000
#> GSM634701 1 0.0000 0.991 1.000 0.000
#> GSM634702 2 0.9710 0.336 0.400 0.600
#> GSM634703 2 0.0000 0.979 0.000 1.000
#> GSM634708 2 0.0000 0.979 0.000 1.000
#> GSM634709 1 0.0000 0.991 1.000 0.000
#> GSM634710 1 0.0000 0.991 1.000 0.000
#> GSM634712 1 0.0000 0.991 1.000 0.000
#> GSM634713 2 0.0000 0.979 0.000 1.000
#> GSM634714 1 0.0000 0.991 1.000 0.000
#> GSM634716 1 0.0000 0.991 1.000 0.000
#> GSM634717 1 0.0000 0.991 1.000 0.000
#> GSM634718 2 0.0000 0.979 0.000 1.000
#> GSM634719 1 0.0000 0.991 1.000 0.000
#> GSM634720 1 0.0000 0.991 1.000 0.000
#> GSM634721 1 0.0000 0.991 1.000 0.000
#> GSM634722 2 0.0000 0.979 0.000 1.000
#> GSM634723 2 0.0000 0.979 0.000 1.000
#> GSM634724 1 0.0000 0.991 1.000 0.000
#> GSM634725 1 0.0000 0.991 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634648 3 0.5948 0.5818 0.360 0.000 0.640
#> GSM634649 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634650 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634653 3 0.5785 0.6136 0.332 0.000 0.668
#> GSM634659 1 0.9357 0.4273 0.516 0.248 0.236
#> GSM634666 3 0.3619 0.7494 0.000 0.136 0.864
#> GSM634667 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634670 3 0.0592 0.8145 0.012 0.000 0.988
#> GSM634679 3 0.0000 0.8103 0.000 0.000 1.000
#> GSM634680 3 0.0892 0.8146 0.020 0.000 0.980
#> GSM634681 1 0.1529 0.8330 0.960 0.000 0.040
#> GSM634688 2 0.4750 0.6855 0.000 0.784 0.216
#> GSM634690 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634694 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634698 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634704 2 0.0747 0.9554 0.016 0.984 0.000
#> GSM634705 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634706 2 0.1031 0.9474 0.024 0.976 0.000
#> GSM634707 1 0.5785 0.5991 0.668 0.000 0.332
#> GSM634711 1 0.5785 0.5991 0.668 0.000 0.332
#> GSM634715 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634633 3 0.2711 0.7732 0.088 0.000 0.912
#> GSM634634 3 0.0237 0.8109 0.000 0.004 0.996
#> GSM634635 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634636 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634637 1 0.5785 0.5991 0.668 0.000 0.332
#> GSM634638 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634639 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634640 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634641 1 0.3619 0.7840 0.864 0.000 0.136
#> GSM634642 2 0.1289 0.9421 0.000 0.968 0.032
#> GSM634644 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634645 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634646 3 0.6026 0.5643 0.376 0.000 0.624
#> GSM634647 3 0.0747 0.8148 0.016 0.000 0.984
#> GSM634651 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634652 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634654 3 0.5785 0.6136 0.332 0.000 0.668
#> GSM634655 3 0.1643 0.7937 0.044 0.000 0.956
#> GSM634656 3 0.0592 0.8145 0.012 0.000 0.988
#> GSM634657 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634658 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634660 1 0.5785 0.5991 0.668 0.000 0.332
#> GSM634661 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634662 2 0.0237 0.9665 0.000 0.996 0.004
#> GSM634663 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634664 3 0.6045 0.4167 0.000 0.380 0.620
#> GSM634665 3 0.6244 0.4518 0.440 0.000 0.560
#> GSM634668 2 0.1163 0.9461 0.000 0.972 0.028
#> GSM634671 1 0.0747 0.8537 0.984 0.000 0.016
#> GSM634672 3 0.0747 0.8148 0.016 0.000 0.984
#> GSM634673 3 0.0592 0.8145 0.012 0.000 0.988
#> GSM634674 2 0.0237 0.9665 0.000 0.996 0.004
#> GSM634675 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634676 1 0.0747 0.8561 0.984 0.016 0.000
#> GSM634677 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634678 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634682 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634684 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634685 3 0.1031 0.8084 0.000 0.024 0.976
#> GSM634686 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634689 3 0.6309 0.0781 0.000 0.496 0.504
#> GSM634691 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634692 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634693 3 0.6260 0.4359 0.448 0.000 0.552
#> GSM634695 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634696 3 0.6852 0.6290 0.300 0.036 0.664
#> GSM634697 3 0.0592 0.8145 0.012 0.000 0.988
#> GSM634699 3 0.7731 0.6324 0.108 0.228 0.664
#> GSM634700 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634701 1 0.0424 0.8621 0.992 0.000 0.008
#> GSM634702 1 0.9838 0.2877 0.424 0.288 0.288
#> GSM634703 2 0.6305 -0.0320 0.484 0.516 0.000
#> GSM634708 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634709 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634710 3 0.0000 0.8103 0.000 0.000 1.000
#> GSM634712 3 0.0000 0.8103 0.000 0.000 1.000
#> GSM634713 2 0.0000 0.9692 0.000 1.000 0.000
#> GSM634714 3 0.5291 0.6731 0.268 0.000 0.732
#> GSM634716 1 0.5835 0.5887 0.660 0.000 0.340
#> GSM634717 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634718 1 0.4121 0.7298 0.832 0.168 0.000
#> GSM634719 1 0.0000 0.8650 1.000 0.000 0.000
#> GSM634720 3 0.1031 0.8143 0.024 0.000 0.976
#> GSM634721 3 0.2537 0.7954 0.080 0.000 0.920
#> GSM634722 2 0.1031 0.9494 0.000 0.976 0.024
#> GSM634723 1 0.3482 0.7676 0.872 0.128 0.000
#> GSM634724 3 0.1753 0.7915 0.048 0.000 0.952
#> GSM634725 1 0.5835 0.5887 0.660 0.000 0.340
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634648 1 0.7512 0.12064 0.496 0.000 0.268 0.236
#> GSM634649 1 0.1211 0.76243 0.960 0.000 0.040 0.000
#> GSM634650 2 0.4825 0.77291 0.020 0.792 0.036 0.152
#> GSM634653 3 0.7599 0.32570 0.316 0.000 0.464 0.220
#> GSM634659 1 0.9552 -0.03084 0.344 0.180 0.328 0.148
#> GSM634666 4 0.1716 0.65669 0.000 0.000 0.064 0.936
#> GSM634667 2 0.1211 0.91333 0.000 0.960 0.000 0.040
#> GSM634669 1 0.0712 0.76811 0.984 0.004 0.008 0.004
#> GSM634670 3 0.3625 0.57202 0.012 0.000 0.828 0.160
#> GSM634679 3 0.4817 0.29878 0.000 0.000 0.612 0.388
#> GSM634680 3 0.3946 0.57192 0.020 0.000 0.812 0.168
#> GSM634681 1 0.4343 0.50984 0.732 0.000 0.264 0.004
#> GSM634688 4 0.2216 0.70538 0.000 0.092 0.000 0.908
#> GSM634690 2 0.0921 0.91594 0.000 0.972 0.000 0.028
#> GSM634694 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634698 1 0.1211 0.76243 0.960 0.000 0.040 0.000
#> GSM634704 2 0.1211 0.91301 0.000 0.960 0.000 0.040
#> GSM634705 1 0.1302 0.76078 0.956 0.000 0.044 0.000
#> GSM634706 2 0.0657 0.91217 0.012 0.984 0.000 0.004
#> GSM634707 3 0.6495 0.01714 0.444 0.004 0.492 0.060
#> GSM634711 3 0.6323 0.03044 0.440 0.000 0.500 0.060
#> GSM634715 2 0.2596 0.88548 0.000 0.908 0.024 0.068
#> GSM634633 3 0.1833 0.56804 0.032 0.000 0.944 0.024
#> GSM634634 4 0.3024 0.59856 0.000 0.000 0.148 0.852
#> GSM634635 1 0.1118 0.76387 0.964 0.000 0.036 0.000
#> GSM634636 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634637 3 0.6319 0.03931 0.436 0.000 0.504 0.060
#> GSM634638 2 0.1389 0.90999 0.000 0.952 0.000 0.048
#> GSM634639 1 0.3688 0.62184 0.792 0.000 0.208 0.000
#> GSM634640 2 0.1302 0.91162 0.000 0.956 0.000 0.044
#> GSM634641 1 0.5662 0.46409 0.692 0.000 0.236 0.072
#> GSM634642 4 0.4382 0.61763 0.000 0.296 0.000 0.704
#> GSM634644 2 0.1637 0.90257 0.000 0.940 0.000 0.060
#> GSM634645 1 0.1474 0.75773 0.948 0.000 0.052 0.000
#> GSM634646 1 0.6276 -0.03416 0.480 0.000 0.464 0.056
#> GSM634647 3 0.4761 0.34922 0.000 0.000 0.628 0.372
#> GSM634651 2 0.0188 0.91553 0.000 0.996 0.000 0.004
#> GSM634652 4 0.4898 0.38762 0.000 0.416 0.000 0.584
#> GSM634654 3 0.7423 0.36402 0.292 0.000 0.504 0.204
#> GSM634655 3 0.1706 0.53657 0.016 0.000 0.948 0.036
#> GSM634656 3 0.4353 0.52810 0.012 0.000 0.756 0.232
#> GSM634657 2 0.1545 0.91284 0.000 0.952 0.008 0.040
#> GSM634658 1 0.0804 0.76769 0.980 0.000 0.008 0.012
#> GSM634660 3 0.6495 0.01714 0.444 0.004 0.492 0.060
#> GSM634661 2 0.0000 0.91604 0.000 1.000 0.000 0.000
#> GSM634662 2 0.3342 0.82190 0.000 0.868 0.032 0.100
#> GSM634663 2 0.0336 0.91487 0.000 0.992 0.000 0.008
#> GSM634664 4 0.2342 0.70374 0.000 0.080 0.008 0.912
#> GSM634665 1 0.6102 0.10983 0.532 0.000 0.420 0.048
#> GSM634668 2 0.5932 0.59781 0.000 0.696 0.132 0.172
#> GSM634671 1 0.2965 0.73954 0.892 0.000 0.036 0.072
#> GSM634672 3 0.3946 0.57167 0.020 0.000 0.812 0.168
#> GSM634673 3 0.3881 0.56983 0.016 0.000 0.812 0.172
#> GSM634674 2 0.0937 0.90934 0.000 0.976 0.012 0.012
#> GSM634675 2 0.0469 0.91359 0.000 0.988 0.000 0.012
#> GSM634676 1 0.3790 0.65706 0.820 0.000 0.016 0.164
#> GSM634677 2 0.0188 0.91553 0.000 0.996 0.000 0.004
#> GSM634678 2 0.1792 0.87357 0.000 0.932 0.000 0.068
#> GSM634682 2 0.1389 0.90999 0.000 0.952 0.000 0.048
#> GSM634683 2 0.0000 0.91604 0.000 1.000 0.000 0.000
#> GSM634684 1 0.1151 0.76336 0.968 0.000 0.008 0.024
#> GSM634685 4 0.4819 0.30022 0.000 0.004 0.344 0.652
#> GSM634686 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634687 2 0.1302 0.91162 0.000 0.956 0.000 0.044
#> GSM634689 4 0.4098 0.67916 0.000 0.204 0.012 0.784
#> GSM634691 2 0.0188 0.91553 0.000 0.996 0.000 0.004
#> GSM634692 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634693 1 0.6120 0.07965 0.520 0.000 0.432 0.048
#> GSM634695 2 0.1389 0.90999 0.000 0.952 0.000 0.048
#> GSM634696 4 0.1837 0.64712 0.028 0.000 0.028 0.944
#> GSM634697 3 0.4319 0.53068 0.012 0.000 0.760 0.228
#> GSM634699 4 0.3360 0.69640 0.008 0.124 0.008 0.860
#> GSM634700 2 0.1557 0.88354 0.000 0.944 0.000 0.056
#> GSM634701 1 0.1305 0.75681 0.960 0.000 0.036 0.004
#> GSM634702 3 0.9690 0.04057 0.280 0.228 0.344 0.148
#> GSM634703 2 0.7364 0.27689 0.340 0.536 0.024 0.100
#> GSM634708 2 0.0707 0.91677 0.000 0.980 0.000 0.020
#> GSM634709 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634710 4 0.4866 0.13603 0.000 0.000 0.404 0.596
#> GSM634712 3 0.4500 0.42176 0.000 0.000 0.684 0.316
#> GSM634713 4 0.4985 0.24781 0.000 0.468 0.000 0.532
#> GSM634714 3 0.5677 0.46358 0.256 0.000 0.680 0.064
#> GSM634716 3 0.4959 0.42973 0.196 0.000 0.752 0.052
#> GSM634717 1 0.0000 0.77190 1.000 0.000 0.000 0.000
#> GSM634718 1 0.4964 0.35766 0.616 0.380 0.000 0.004
#> GSM634719 1 0.0188 0.77084 0.996 0.000 0.004 0.000
#> GSM634720 3 0.4050 0.57177 0.024 0.000 0.808 0.168
#> GSM634721 4 0.4781 0.46951 0.036 0.000 0.212 0.752
#> GSM634722 4 0.4222 0.63136 0.000 0.272 0.000 0.728
#> GSM634723 1 0.4937 0.58268 0.764 0.172 0.000 0.064
#> GSM634724 3 0.0188 0.55139 0.000 0.000 0.996 0.004
#> GSM634725 1 0.8001 -0.00426 0.424 0.028 0.404 0.144
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1026 0.8358 0.968 0.000 0.004 0.004 0.024
#> GSM634648 1 0.6026 0.4477 0.592 0.000 0.244 0.160 0.004
#> GSM634649 1 0.0566 0.8351 0.984 0.000 0.012 0.000 0.004
#> GSM634650 2 0.5715 0.5104 0.012 0.620 0.000 0.088 0.280
#> GSM634653 3 0.5401 0.5900 0.244 0.000 0.668 0.072 0.016
#> GSM634659 5 0.1743 0.7249 0.004 0.028 0.000 0.028 0.940
#> GSM634666 4 0.2463 0.7828 0.000 0.004 0.100 0.888 0.008
#> GSM634667 2 0.1082 0.8876 0.000 0.964 0.000 0.028 0.008
#> GSM634669 1 0.2429 0.8169 0.900 0.000 0.004 0.020 0.076
#> GSM634670 3 0.0693 0.8151 0.008 0.000 0.980 0.000 0.012
#> GSM634679 3 0.2966 0.7211 0.000 0.000 0.848 0.136 0.016
#> GSM634680 3 0.1059 0.8178 0.020 0.000 0.968 0.004 0.008
#> GSM634681 1 0.2966 0.7146 0.816 0.000 0.184 0.000 0.000
#> GSM634688 4 0.2149 0.8007 0.000 0.036 0.028 0.924 0.012
#> GSM634690 2 0.1018 0.8929 0.000 0.968 0.000 0.016 0.016
#> GSM634694 1 0.2122 0.8243 0.924 0.000 0.008 0.032 0.036
#> GSM634698 1 0.0671 0.8350 0.980 0.000 0.016 0.004 0.000
#> GSM634704 2 0.2142 0.8848 0.000 0.920 0.004 0.048 0.028
#> GSM634705 1 0.1442 0.8323 0.952 0.000 0.032 0.004 0.012
#> GSM634706 2 0.4698 0.8199 0.044 0.792 0.008 0.064 0.092
#> GSM634707 5 0.3130 0.7650 0.048 0.000 0.096 0.000 0.856
#> GSM634711 5 0.3798 0.7524 0.064 0.000 0.128 0.000 0.808
#> GSM634715 2 0.3805 0.7451 0.000 0.784 0.000 0.032 0.184
#> GSM634633 3 0.3078 0.7266 0.016 0.004 0.848 0.000 0.132
#> GSM634634 4 0.3031 0.7839 0.000 0.020 0.120 0.856 0.004
#> GSM634635 1 0.0609 0.8346 0.980 0.000 0.020 0.000 0.000
#> GSM634636 1 0.1934 0.8324 0.928 0.000 0.016 0.004 0.052
#> GSM634637 5 0.3427 0.7625 0.056 0.000 0.108 0.000 0.836
#> GSM634638 2 0.1830 0.8750 0.000 0.932 0.000 0.040 0.028
#> GSM634639 1 0.3535 0.7650 0.832 0.000 0.088 0.000 0.080
#> GSM634640 2 0.1106 0.8847 0.000 0.964 0.000 0.024 0.012
#> GSM634641 5 0.4848 0.4744 0.320 0.000 0.032 0.004 0.644
#> GSM634642 4 0.3902 0.7668 0.000 0.092 0.016 0.824 0.068
#> GSM634644 2 0.2172 0.8571 0.000 0.908 0.000 0.076 0.016
#> GSM634645 1 0.1970 0.8217 0.924 0.000 0.060 0.004 0.012
#> GSM634646 3 0.4192 0.3344 0.404 0.000 0.596 0.000 0.000
#> GSM634647 3 0.2054 0.7893 0.008 0.000 0.916 0.072 0.004
#> GSM634651 2 0.2362 0.8766 0.000 0.900 0.000 0.024 0.076
#> GSM634652 4 0.3231 0.7449 0.000 0.196 0.000 0.800 0.004
#> GSM634654 3 0.3647 0.6730 0.228 0.000 0.764 0.004 0.004
#> GSM634655 5 0.4383 0.2879 0.004 0.000 0.424 0.000 0.572
#> GSM634656 3 0.0579 0.8166 0.008 0.000 0.984 0.008 0.000
#> GSM634657 2 0.2157 0.8815 0.004 0.920 0.000 0.036 0.040
#> GSM634658 1 0.2069 0.8237 0.912 0.000 0.000 0.012 0.076
#> GSM634660 5 0.3237 0.7630 0.048 0.000 0.104 0.000 0.848
#> GSM634661 2 0.1106 0.8938 0.000 0.964 0.000 0.012 0.024
#> GSM634662 2 0.3912 0.7609 0.000 0.752 0.000 0.020 0.228
#> GSM634663 2 0.2012 0.8874 0.000 0.920 0.000 0.020 0.060
#> GSM634664 4 0.1750 0.8002 0.000 0.028 0.036 0.936 0.000
#> GSM634665 1 0.4211 0.3986 0.636 0.000 0.360 0.000 0.004
#> GSM634668 5 0.4429 0.5610 0.000 0.192 0.000 0.064 0.744
#> GSM634671 1 0.2605 0.8161 0.896 0.000 0.044 0.056 0.004
#> GSM634672 3 0.0865 0.8153 0.024 0.000 0.972 0.000 0.004
#> GSM634673 3 0.0740 0.8162 0.008 0.000 0.980 0.004 0.008
#> GSM634674 2 0.2179 0.8749 0.000 0.896 0.000 0.004 0.100
#> GSM634675 2 0.3450 0.8591 0.000 0.848 0.008 0.060 0.084
#> GSM634676 1 0.6489 0.4612 0.572 0.008 0.008 0.180 0.232
#> GSM634677 2 0.3257 0.8637 0.000 0.860 0.008 0.052 0.080
#> GSM634678 2 0.3855 0.8408 0.000 0.816 0.008 0.056 0.120
#> GSM634682 2 0.1830 0.8750 0.000 0.932 0.000 0.040 0.028
#> GSM634683 2 0.1386 0.8926 0.000 0.952 0.000 0.016 0.032
#> GSM634684 1 0.3635 0.7822 0.828 0.000 0.004 0.056 0.112
#> GSM634685 4 0.6641 0.2727 0.000 0.100 0.380 0.484 0.036
#> GSM634686 1 0.1153 0.8334 0.964 0.000 0.004 0.008 0.024
#> GSM634687 2 0.1300 0.8830 0.000 0.956 0.000 0.028 0.016
#> GSM634689 4 0.3713 0.7798 0.000 0.056 0.032 0.844 0.068
#> GSM634691 2 0.3257 0.8637 0.000 0.860 0.008 0.052 0.080
#> GSM634692 1 0.0693 0.8348 0.980 0.000 0.000 0.008 0.012
#> GSM634693 1 0.4219 0.2533 0.584 0.000 0.416 0.000 0.000
#> GSM634695 2 0.1915 0.8738 0.000 0.928 0.000 0.040 0.032
#> GSM634696 4 0.3296 0.7702 0.024 0.004 0.052 0.872 0.048
#> GSM634697 3 0.0798 0.8159 0.008 0.000 0.976 0.016 0.000
#> GSM634699 4 0.2165 0.7928 0.000 0.016 0.036 0.924 0.024
#> GSM634700 2 0.3273 0.8553 0.000 0.848 0.004 0.036 0.112
#> GSM634701 1 0.3341 0.7715 0.840 0.000 0.024 0.008 0.128
#> GSM634702 5 0.1653 0.7257 0.000 0.024 0.004 0.028 0.944
#> GSM634703 5 0.7535 -0.0719 0.152 0.392 0.008 0.052 0.396
#> GSM634708 2 0.0510 0.8932 0.000 0.984 0.000 0.000 0.016
#> GSM634709 1 0.1059 0.8361 0.968 0.000 0.008 0.004 0.020
#> GSM634710 3 0.4473 0.1795 0.000 0.000 0.580 0.412 0.008
#> GSM634712 3 0.2110 0.7829 0.000 0.000 0.912 0.072 0.016
#> GSM634713 4 0.4639 0.4767 0.000 0.368 0.000 0.612 0.020
#> GSM634714 3 0.3053 0.7348 0.164 0.000 0.828 0.000 0.008
#> GSM634716 5 0.4169 0.6535 0.028 0.000 0.240 0.000 0.732
#> GSM634717 1 0.1597 0.8314 0.948 0.000 0.008 0.024 0.020
#> GSM634718 1 0.7316 0.3169 0.528 0.264 0.008 0.068 0.132
#> GSM634719 1 0.1830 0.8269 0.924 0.000 0.000 0.008 0.068
#> GSM634720 3 0.1153 0.8174 0.024 0.000 0.964 0.004 0.008
#> GSM634721 4 0.5087 0.3348 0.028 0.000 0.376 0.588 0.008
#> GSM634722 4 0.3734 0.7418 0.000 0.184 0.008 0.792 0.016
#> GSM634723 1 0.5949 0.6071 0.692 0.160 0.008 0.080 0.060
#> GSM634724 3 0.3752 0.4646 0.000 0.000 0.708 0.000 0.292
#> GSM634725 5 0.3313 0.7523 0.048 0.004 0.048 0.028 0.872
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1692 0.6759 0.932 0.000 0.012 0.000 0.008 0.048
#> GSM634648 1 0.5800 0.4379 0.640 0.000 0.176 0.064 0.004 0.116
#> GSM634649 1 0.1624 0.6789 0.936 0.000 0.020 0.000 0.004 0.040
#> GSM634650 2 0.6617 0.2061 0.000 0.436 0.004 0.040 0.176 0.344
#> GSM634653 3 0.6310 0.4972 0.228 0.000 0.572 0.080 0.004 0.116
#> GSM634659 5 0.1196 0.7534 0.000 0.000 0.000 0.008 0.952 0.040
#> GSM634666 4 0.1726 0.7547 0.000 0.000 0.044 0.932 0.012 0.012
#> GSM634667 2 0.1745 0.7558 0.000 0.920 0.000 0.012 0.000 0.068
#> GSM634669 1 0.4092 0.3710 0.636 0.000 0.000 0.000 0.020 0.344
#> GSM634670 3 0.0924 0.7866 0.004 0.000 0.972 0.008 0.008 0.008
#> GSM634679 3 0.2933 0.7520 0.000 0.000 0.860 0.092 0.032 0.016
#> GSM634680 3 0.1745 0.7776 0.012 0.000 0.920 0.000 0.000 0.068
#> GSM634681 1 0.3253 0.6417 0.832 0.000 0.096 0.000 0.004 0.068
#> GSM634688 4 0.0810 0.7617 0.000 0.004 0.008 0.976 0.008 0.004
#> GSM634690 2 0.0551 0.7596 0.000 0.984 0.000 0.004 0.008 0.004
#> GSM634694 1 0.3684 0.4106 0.664 0.000 0.000 0.000 0.004 0.332
#> GSM634698 1 0.1549 0.6758 0.936 0.000 0.020 0.000 0.000 0.044
#> GSM634704 2 0.3946 0.7124 0.000 0.696 0.004 0.012 0.004 0.284
#> GSM634705 1 0.1851 0.6723 0.928 0.000 0.024 0.000 0.012 0.036
#> GSM634706 2 0.4513 0.5831 0.024 0.700 0.000 0.000 0.040 0.236
#> GSM634707 5 0.2513 0.7741 0.008 0.000 0.044 0.000 0.888 0.060
#> GSM634711 5 0.3451 0.7646 0.028 0.000 0.076 0.004 0.840 0.052
#> GSM634715 2 0.4883 0.6560 0.000 0.704 0.000 0.028 0.096 0.172
#> GSM634633 3 0.5219 0.6132 0.028 0.000 0.692 0.008 0.124 0.148
#> GSM634634 4 0.2112 0.7443 0.000 0.000 0.088 0.896 0.000 0.016
#> GSM634635 1 0.1972 0.6777 0.916 0.000 0.024 0.000 0.004 0.056
#> GSM634636 1 0.3376 0.6528 0.836 0.000 0.020 0.000 0.060 0.084
#> GSM634637 5 0.1616 0.7794 0.020 0.000 0.048 0.000 0.932 0.000
#> GSM634638 2 0.3460 0.7046 0.000 0.760 0.000 0.020 0.000 0.220
#> GSM634639 1 0.5308 0.5238 0.692 0.000 0.104 0.000 0.124 0.080
#> GSM634640 2 0.2402 0.7459 0.000 0.868 0.000 0.012 0.000 0.120
#> GSM634641 5 0.4661 0.5182 0.240 0.000 0.024 0.000 0.688 0.048
#> GSM634642 4 0.3717 0.7167 0.000 0.076 0.004 0.824 0.036 0.060
#> GSM634644 2 0.3939 0.6983 0.000 0.752 0.000 0.068 0.000 0.180
#> GSM634645 1 0.1901 0.6726 0.924 0.000 0.028 0.000 0.008 0.040
#> GSM634646 1 0.4565 0.1617 0.532 0.000 0.432 0.000 0.000 0.036
#> GSM634647 3 0.2039 0.7752 0.000 0.000 0.904 0.076 0.000 0.020
#> GSM634651 2 0.2651 0.7265 0.000 0.872 0.000 0.004 0.036 0.088
#> GSM634652 4 0.3231 0.6771 0.000 0.200 0.000 0.784 0.000 0.016
#> GSM634654 3 0.4044 0.6065 0.212 0.000 0.740 0.004 0.004 0.040
#> GSM634655 5 0.5386 0.3136 0.000 0.000 0.352 0.000 0.524 0.124
#> GSM634656 3 0.1296 0.7878 0.004 0.000 0.952 0.032 0.000 0.012
#> GSM634657 2 0.4128 0.6788 0.000 0.676 0.004 0.012 0.008 0.300
#> GSM634658 1 0.4852 0.3845 0.624 0.000 0.004 0.020 0.032 0.320
#> GSM634660 5 0.3142 0.7586 0.008 0.000 0.044 0.000 0.840 0.108
#> GSM634661 2 0.1644 0.7604 0.000 0.932 0.000 0.004 0.012 0.052
#> GSM634662 2 0.5387 0.5267 0.000 0.620 0.004 0.008 0.236 0.132
#> GSM634663 2 0.2307 0.7435 0.000 0.896 0.000 0.004 0.032 0.068
#> GSM634664 4 0.0653 0.7615 0.000 0.004 0.012 0.980 0.000 0.004
#> GSM634665 1 0.4847 0.4619 0.648 0.000 0.268 0.008 0.000 0.076
#> GSM634668 5 0.4851 0.4235 0.000 0.196 0.000 0.024 0.696 0.084
#> GSM634671 1 0.4055 0.6111 0.792 0.000 0.040 0.068 0.000 0.100
#> GSM634672 3 0.0976 0.7868 0.016 0.000 0.968 0.000 0.008 0.008
#> GSM634673 3 0.1413 0.7838 0.004 0.000 0.948 0.004 0.008 0.036
#> GSM634674 2 0.3911 0.7220 0.000 0.768 0.000 0.004 0.068 0.160
#> GSM634675 2 0.3819 0.6530 0.004 0.756 0.000 0.000 0.040 0.200
#> GSM634676 6 0.7206 0.2439 0.308 0.000 0.000 0.148 0.144 0.400
#> GSM634677 2 0.3590 0.6657 0.004 0.776 0.000 0.000 0.032 0.188
#> GSM634678 2 0.4420 0.6319 0.004 0.720 0.000 0.004 0.072 0.200
#> GSM634682 2 0.3487 0.7026 0.000 0.756 0.000 0.020 0.000 0.224
#> GSM634683 2 0.1563 0.7468 0.000 0.932 0.000 0.000 0.012 0.056
#> GSM634684 1 0.5398 0.3197 0.584 0.000 0.004 0.036 0.048 0.328
#> GSM634685 3 0.7329 -0.0145 0.000 0.104 0.328 0.256 0.000 0.312
#> GSM634686 1 0.3360 0.5058 0.732 0.000 0.000 0.000 0.004 0.264
#> GSM634687 2 0.2692 0.7369 0.000 0.840 0.000 0.012 0.000 0.148
#> GSM634689 4 0.3538 0.7376 0.000 0.048 0.016 0.844 0.060 0.032
#> GSM634691 2 0.3628 0.6658 0.004 0.776 0.000 0.000 0.036 0.184
#> GSM634692 1 0.2400 0.6533 0.872 0.000 0.008 0.004 0.000 0.116
#> GSM634693 1 0.5202 0.3899 0.588 0.000 0.320 0.012 0.000 0.080
#> GSM634695 2 0.3780 0.6873 0.000 0.728 0.000 0.020 0.004 0.248
#> GSM634696 4 0.4499 0.6453 0.048 0.000 0.020 0.780 0.060 0.092
#> GSM634697 3 0.0858 0.7882 0.004 0.000 0.968 0.028 0.000 0.000
#> GSM634699 4 0.2099 0.7474 0.004 0.000 0.008 0.904 0.004 0.080
#> GSM634700 2 0.3929 0.6735 0.000 0.776 0.000 0.008 0.072 0.144
#> GSM634701 1 0.5092 0.4039 0.656 0.000 0.004 0.004 0.204 0.132
#> GSM634702 5 0.1413 0.7559 0.000 0.004 0.004 0.008 0.948 0.036
#> GSM634703 6 0.7084 0.2287 0.052 0.304 0.000 0.008 0.252 0.384
#> GSM634708 2 0.0547 0.7572 0.000 0.980 0.000 0.000 0.000 0.020
#> GSM634709 1 0.1655 0.6737 0.932 0.000 0.008 0.000 0.008 0.052
#> GSM634710 3 0.4171 0.3749 0.000 0.000 0.604 0.380 0.012 0.004
#> GSM634712 3 0.2164 0.7725 0.000 0.000 0.908 0.060 0.020 0.012
#> GSM634713 4 0.5779 0.0816 0.000 0.392 0.000 0.432 0.000 0.176
#> GSM634714 3 0.3961 0.6974 0.148 0.000 0.768 0.000 0.004 0.080
#> GSM634716 5 0.4355 0.6584 0.016 0.000 0.208 0.000 0.724 0.052
#> GSM634717 1 0.2558 0.6256 0.840 0.000 0.000 0.000 0.004 0.156
#> GSM634718 6 0.6152 0.4937 0.248 0.240 0.000 0.000 0.016 0.496
#> GSM634719 1 0.4094 0.4806 0.692 0.000 0.004 0.004 0.020 0.280
#> GSM634720 3 0.2238 0.7726 0.016 0.000 0.900 0.004 0.004 0.076
#> GSM634721 4 0.6517 0.2298 0.108 0.000 0.296 0.512 0.004 0.080
#> GSM634722 4 0.4482 0.6168 0.000 0.168 0.000 0.708 0.000 0.124
#> GSM634723 6 0.5683 0.2449 0.392 0.088 0.000 0.024 0.000 0.496
#> GSM634724 3 0.3979 0.3155 0.000 0.000 0.628 0.000 0.360 0.012
#> GSM634725 5 0.3012 0.7564 0.028 0.004 0.028 0.004 0.872 0.064
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 individual(p) k
#> MAD:skmeans 91 0.564 2
#> MAD:skmeans 86 0.784 3
#> MAD:skmeans 67 0.860 4
#> MAD:skmeans 79 0.918 5
#> MAD:skmeans 70 0.822 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 17698 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.834 0.938 0.971 0.4410 0.566 0.566
#> 3 3 0.589 0.818 0.899 0.3795 0.776 0.626
#> 4 4 0.544 0.641 0.808 0.1729 0.865 0.673
#> 5 5 0.664 0.712 0.837 0.0757 0.818 0.476
#> 6 6 0.656 0.634 0.785 0.0391 0.981 0.919
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
#> GSM634643 1 0.0000 0.968 1.000 0.000
#> GSM634648 1 0.0000 0.968 1.000 0.000
#> GSM634649 1 0.0000 0.968 1.000 0.000
#> GSM634650 1 0.7528 0.760 0.784 0.216
#> GSM634653 1 0.0000 0.968 1.000 0.000
#> GSM634659 1 0.7528 0.760 0.784 0.216
#> GSM634666 2 0.7139 0.757 0.196 0.804
#> GSM634667 2 0.0000 0.971 0.000 1.000
#> GSM634669 1 0.0000 0.968 1.000 0.000
#> GSM634670 1 0.0000 0.968 1.000 0.000
#> GSM634679 1 0.0000 0.968 1.000 0.000
#> GSM634680 1 0.0000 0.968 1.000 0.000
#> GSM634681 1 0.0000 0.968 1.000 0.000
#> GSM634688 2 0.0000 0.971 0.000 1.000
#> GSM634690 2 0.0000 0.971 0.000 1.000
#> GSM634694 1 0.0000 0.968 1.000 0.000
#> GSM634698 1 0.0000 0.968 1.000 0.000
#> GSM634704 1 0.0000 0.968 1.000 0.000
#> GSM634705 1 0.0000 0.968 1.000 0.000
#> GSM634706 1 0.0000 0.968 1.000 0.000
#> GSM634707 1 0.0672 0.963 0.992 0.008
#> GSM634711 1 0.0000 0.968 1.000 0.000
#> GSM634715 1 0.7602 0.754 0.780 0.220
#> GSM634633 1 0.0000 0.968 1.000 0.000
#> GSM634634 2 0.3114 0.921 0.056 0.944
#> GSM634635 1 0.0000 0.968 1.000 0.000
#> GSM634636 1 0.0000 0.968 1.000 0.000
#> GSM634637 1 0.0000 0.968 1.000 0.000
#> GSM634638 2 0.0000 0.971 0.000 1.000
#> GSM634639 1 0.0000 0.968 1.000 0.000
#> GSM634640 2 0.0000 0.971 0.000 1.000
#> GSM634641 1 0.0672 0.962 0.992 0.008
#> GSM634642 2 0.3584 0.912 0.068 0.932
#> GSM634644 2 0.0000 0.971 0.000 1.000
#> GSM634645 1 0.0000 0.968 1.000 0.000
#> GSM634646 1 0.0000 0.968 1.000 0.000
#> GSM634647 1 0.0000 0.968 1.000 0.000
#> GSM634651 2 0.0000 0.971 0.000 1.000
#> GSM634652 2 0.0000 0.971 0.000 1.000
#> GSM634654 1 0.0000 0.968 1.000 0.000
#> GSM634655 1 0.0672 0.963 0.992 0.008
#> GSM634656 1 0.0000 0.968 1.000 0.000
#> GSM634657 1 0.4298 0.900 0.912 0.088
#> GSM634658 1 0.5946 0.841 0.856 0.144
#> GSM634660 1 0.1414 0.954 0.980 0.020
#> GSM634661 2 0.0000 0.971 0.000 1.000
#> GSM634662 1 0.7528 0.760 0.784 0.216
#> GSM634663 2 0.0000 0.971 0.000 1.000
#> GSM634664 2 0.0376 0.968 0.004 0.996
#> GSM634665 1 0.0000 0.968 1.000 0.000
#> GSM634668 2 0.0000 0.971 0.000 1.000
#> GSM634671 1 0.0000 0.968 1.000 0.000
#> GSM634672 1 0.0000 0.968 1.000 0.000
#> GSM634673 1 0.0000 0.968 1.000 0.000
#> GSM634674 2 0.0000 0.971 0.000 1.000
#> GSM634675 2 0.0376 0.968 0.004 0.996
#> GSM634676 1 0.0000 0.968 1.000 0.000
#> GSM634677 2 0.1633 0.953 0.024 0.976
#> GSM634678 1 0.4939 0.881 0.892 0.108
#> GSM634682 2 0.0000 0.971 0.000 1.000
#> GSM634683 2 0.0000 0.971 0.000 1.000
#> GSM634684 1 0.0000 0.968 1.000 0.000
#> GSM634685 1 0.7528 0.760 0.784 0.216
#> GSM634686 1 0.0000 0.968 1.000 0.000
#> GSM634687 2 0.0000 0.971 0.000 1.000
#> GSM634689 2 0.0000 0.971 0.000 1.000
#> GSM634691 2 0.0000 0.971 0.000 1.000
#> GSM634692 1 0.0000 0.968 1.000 0.000
#> GSM634693 1 0.0000 0.968 1.000 0.000
#> GSM634695 2 0.0000 0.971 0.000 1.000
#> GSM634696 1 0.7139 0.785 0.804 0.196
#> GSM634697 1 0.0000 0.968 1.000 0.000
#> GSM634699 1 0.0000 0.968 1.000 0.000
#> GSM634700 2 0.0000 0.971 0.000 1.000
#> GSM634701 1 0.0000 0.968 1.000 0.000
#> GSM634702 1 0.7528 0.760 0.784 0.216
#> GSM634703 2 0.9754 0.247 0.408 0.592
#> GSM634708 2 0.0000 0.971 0.000 1.000
#> GSM634709 1 0.0000 0.968 1.000 0.000
#> GSM634710 1 0.0000 0.968 1.000 0.000
#> GSM634712 1 0.0000 0.968 1.000 0.000
#> GSM634713 2 0.0000 0.971 0.000 1.000
#> GSM634714 1 0.0000 0.968 1.000 0.000
#> GSM634716 1 0.0000 0.968 1.000 0.000
#> GSM634717 1 0.0000 0.968 1.000 0.000
#> GSM634718 1 0.0000 0.968 1.000 0.000
#> GSM634719 1 0.0000 0.968 1.000 0.000
#> GSM634720 1 0.0000 0.968 1.000 0.000
#> GSM634721 1 0.0000 0.968 1.000 0.000
#> GSM634722 2 0.0000 0.971 0.000 1.000
#> GSM634723 1 0.0000 0.968 1.000 0.000
#> GSM634724 1 0.0000 0.968 1.000 0.000
#> GSM634725 1 0.4298 0.899 0.912 0.088
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0424 0.889 0.992 0.000 0.008
#> GSM634648 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634649 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634650 1 0.5635 0.752 0.784 0.180 0.036
#> GSM634653 3 0.4842 0.795 0.224 0.000 0.776
#> GSM634659 1 0.6174 0.778 0.768 0.064 0.168
#> GSM634666 3 0.3752 0.837 0.144 0.000 0.856
#> GSM634667 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634670 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634679 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634680 1 0.5760 0.403 0.672 0.000 0.328
#> GSM634681 1 0.0237 0.889 0.996 0.000 0.004
#> GSM634688 3 0.4291 0.788 0.008 0.152 0.840
#> GSM634690 2 0.0424 0.944 0.000 0.992 0.008
#> GSM634694 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634698 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634704 1 0.1753 0.866 0.952 0.048 0.000
#> GSM634705 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634706 1 0.0424 0.888 0.992 0.008 0.000
#> GSM634707 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634711 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634715 1 0.6107 0.733 0.764 0.184 0.052
#> GSM634633 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634634 3 0.4110 0.785 0.004 0.152 0.844
#> GSM634635 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634636 1 0.3686 0.841 0.860 0.000 0.140
#> GSM634637 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634638 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634639 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634640 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634641 1 0.3989 0.843 0.864 0.012 0.124
#> GSM634642 3 0.4349 0.839 0.128 0.020 0.852
#> GSM634644 2 0.1031 0.931 0.000 0.976 0.024
#> GSM634645 1 0.0237 0.889 0.996 0.000 0.004
#> GSM634646 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634647 3 0.4555 0.812 0.200 0.000 0.800
#> GSM634651 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634652 2 0.6045 0.359 0.000 0.620 0.380
#> GSM634654 1 0.6192 0.101 0.580 0.000 0.420
#> GSM634655 1 0.4002 0.831 0.840 0.000 0.160
#> GSM634656 3 0.5810 0.607 0.336 0.000 0.664
#> GSM634657 1 0.3752 0.809 0.856 0.144 0.000
#> GSM634658 1 0.1529 0.874 0.960 0.040 0.000
#> GSM634660 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634661 2 0.0424 0.943 0.000 0.992 0.008
#> GSM634662 1 0.5292 0.769 0.800 0.172 0.028
#> GSM634663 2 0.1031 0.931 0.000 0.976 0.024
#> GSM634664 3 0.3918 0.791 0.004 0.140 0.856
#> GSM634665 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634668 3 0.5178 0.559 0.000 0.256 0.744
#> GSM634671 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634672 1 0.6095 0.480 0.608 0.000 0.392
#> GSM634673 3 0.4291 0.819 0.180 0.000 0.820
#> GSM634674 2 0.0747 0.939 0.000 0.984 0.016
#> GSM634675 2 0.0661 0.942 0.004 0.988 0.008
#> GSM634676 1 0.0424 0.887 0.992 0.000 0.008
#> GSM634677 2 0.1877 0.905 0.032 0.956 0.012
#> GSM634678 1 0.4807 0.811 0.848 0.092 0.060
#> GSM634682 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634684 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634685 3 0.4531 0.779 0.008 0.168 0.824
#> GSM634686 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634689 3 0.2796 0.804 0.000 0.092 0.908
#> GSM634691 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634692 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634693 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634695 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634696 3 0.6788 0.756 0.136 0.120 0.744
#> GSM634697 3 0.2537 0.822 0.080 0.000 0.920
#> GSM634699 3 0.4346 0.822 0.184 0.000 0.816
#> GSM634700 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634701 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634702 1 0.7493 0.221 0.484 0.036 0.480
#> GSM634703 1 0.5986 0.645 0.704 0.284 0.012
#> GSM634708 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634709 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634710 3 0.3686 0.838 0.140 0.000 0.860
#> GSM634712 3 0.0592 0.797 0.012 0.000 0.988
#> GSM634713 2 0.6045 0.366 0.000 0.620 0.380
#> GSM634714 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634716 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634717 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634718 1 0.1031 0.884 0.976 0.024 0.000
#> GSM634719 1 0.0000 0.890 1.000 0.000 0.000
#> GSM634720 1 0.5621 0.454 0.692 0.000 0.308
#> GSM634721 3 0.3686 0.838 0.140 0.000 0.860
#> GSM634722 3 0.4842 0.731 0.000 0.224 0.776
#> GSM634723 1 0.0237 0.889 0.996 0.004 0.000
#> GSM634724 1 0.3752 0.839 0.856 0.000 0.144
#> GSM634725 1 0.5219 0.793 0.788 0.016 0.196
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0937 0.7581 0.976 0.000 0.012 0.012
#> GSM634648 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634649 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634650 3 0.7505 0.4749 0.188 0.060 0.624 0.128
#> GSM634653 4 0.3958 0.7781 0.160 0.000 0.024 0.816
#> GSM634659 3 0.4282 0.6104 0.140 0.016 0.820 0.024
#> GSM634666 4 0.1637 0.8155 0.060 0.000 0.000 0.940
#> GSM634667 2 0.1824 0.8475 0.000 0.936 0.004 0.060
#> GSM634669 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634670 3 0.4477 0.5877 0.312 0.000 0.688 0.000
#> GSM634679 4 0.3311 0.7599 0.000 0.000 0.172 0.828
#> GSM634680 1 0.7182 0.1687 0.552 0.000 0.200 0.248
#> GSM634681 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634688 4 0.1191 0.8018 0.004 0.024 0.004 0.968
#> GSM634690 2 0.0336 0.8412 0.000 0.992 0.000 0.008
#> GSM634694 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634698 1 0.0469 0.7615 0.988 0.000 0.000 0.012
#> GSM634704 1 0.6501 0.2701 0.628 0.104 0.264 0.004
#> GSM634705 1 0.0657 0.7605 0.984 0.000 0.004 0.012
#> GSM634706 1 0.3932 0.6420 0.836 0.128 0.004 0.032
#> GSM634707 3 0.4817 0.5982 0.388 0.000 0.612 0.000
#> GSM634711 3 0.4972 0.5253 0.456 0.000 0.544 0.000
#> GSM634715 1 0.7156 0.3600 0.668 0.140 0.112 0.080
#> GSM634633 1 0.3074 0.6427 0.848 0.000 0.152 0.000
#> GSM634634 4 0.3370 0.7788 0.000 0.080 0.048 0.872
#> GSM634635 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634636 1 0.4225 0.5147 0.792 0.000 0.184 0.024
#> GSM634637 3 0.4972 0.5253 0.456 0.000 0.544 0.000
#> GSM634638 2 0.3398 0.8455 0.000 0.872 0.068 0.060
#> GSM634639 1 0.4522 0.1026 0.680 0.000 0.320 0.000
#> GSM634640 2 0.2142 0.8482 0.000 0.928 0.016 0.056
#> GSM634641 1 0.5512 -0.4765 0.496 0.000 0.488 0.016
#> GSM634642 4 0.3390 0.7826 0.016 0.132 0.000 0.852
#> GSM634644 2 0.2775 0.8138 0.000 0.896 0.020 0.084
#> GSM634645 1 0.1940 0.7065 0.924 0.000 0.076 0.000
#> GSM634646 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634647 4 0.4656 0.7860 0.136 0.000 0.072 0.792
#> GSM634651 2 0.4181 0.8225 0.000 0.820 0.128 0.052
#> GSM634652 2 0.5016 0.4218 0.000 0.600 0.004 0.396
#> GSM634654 1 0.7119 0.0181 0.508 0.000 0.140 0.352
#> GSM634655 3 0.4391 0.6105 0.252 0.000 0.740 0.008
#> GSM634656 4 0.7393 0.3988 0.332 0.000 0.180 0.488
#> GSM634657 1 0.8643 0.0174 0.468 0.084 0.312 0.136
#> GSM634658 1 0.0376 0.7614 0.992 0.004 0.004 0.000
#> GSM634660 3 0.3219 0.6303 0.164 0.000 0.836 0.000
#> GSM634661 2 0.1576 0.8469 0.000 0.948 0.048 0.004
#> GSM634662 3 0.7447 0.3981 0.300 0.068 0.572 0.060
#> GSM634663 2 0.6078 0.6928 0.000 0.620 0.312 0.068
#> GSM634664 4 0.0592 0.8055 0.000 0.016 0.000 0.984
#> GSM634665 1 0.0336 0.7624 0.992 0.000 0.000 0.008
#> GSM634668 3 0.4336 0.4143 0.000 0.060 0.812 0.128
#> GSM634671 1 0.0469 0.7615 0.988 0.000 0.000 0.012
#> GSM634672 3 0.5517 0.5567 0.316 0.000 0.648 0.036
#> GSM634673 4 0.5962 0.7397 0.128 0.000 0.180 0.692
#> GSM634674 2 0.5937 0.6748 0.000 0.608 0.340 0.052
#> GSM634675 2 0.4581 0.7822 0.000 0.800 0.120 0.080
#> GSM634676 1 0.2714 0.6996 0.884 0.000 0.004 0.112
#> GSM634677 2 0.1042 0.8346 0.008 0.972 0.000 0.020
#> GSM634678 1 0.7917 0.0566 0.512 0.060 0.336 0.092
#> GSM634682 2 0.4685 0.8149 0.000 0.784 0.156 0.060
#> GSM634683 2 0.0817 0.8480 0.000 0.976 0.000 0.024
#> GSM634684 1 0.2125 0.7250 0.920 0.000 0.004 0.076
#> GSM634685 4 0.5327 0.7106 0.000 0.060 0.220 0.720
#> GSM634686 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634687 2 0.3168 0.8477 0.000 0.884 0.060 0.056
#> GSM634689 4 0.3621 0.8004 0.000 0.072 0.068 0.860
#> GSM634691 2 0.0188 0.8432 0.000 0.996 0.000 0.004
#> GSM634692 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634693 1 0.0000 0.7631 1.000 0.000 0.000 0.000
#> GSM634695 2 0.3088 0.8477 0.000 0.888 0.052 0.060
#> GSM634696 4 0.3831 0.6493 0.204 0.004 0.000 0.792
#> GSM634697 4 0.5901 0.7178 0.068 0.000 0.280 0.652
#> GSM634699 4 0.2467 0.8112 0.024 0.052 0.004 0.920
#> GSM634700 2 0.5807 0.7034 0.000 0.636 0.312 0.052
#> GSM634701 1 0.1389 0.7300 0.952 0.000 0.048 0.000
#> GSM634702 3 0.3932 0.6169 0.140 0.008 0.832 0.020
#> GSM634703 1 0.8375 0.1088 0.520 0.124 0.272 0.084
#> GSM634708 2 0.0000 0.8426 0.000 1.000 0.000 0.000
#> GSM634709 1 0.0657 0.7605 0.984 0.000 0.004 0.012
#> GSM634710 4 0.3638 0.8033 0.120 0.000 0.032 0.848
#> GSM634712 4 0.4053 0.7313 0.004 0.000 0.228 0.768
#> GSM634713 2 0.5323 0.4191 0.000 0.628 0.020 0.352
#> GSM634714 1 0.2921 0.6265 0.860 0.000 0.140 0.000
#> GSM634716 3 0.4989 0.4945 0.472 0.000 0.528 0.000
#> GSM634717 1 0.2053 0.7270 0.924 0.000 0.004 0.072
#> GSM634718 1 0.4334 0.6058 0.804 0.160 0.004 0.032
#> GSM634719 1 0.0188 0.7623 0.996 0.000 0.004 0.000
#> GSM634720 1 0.6954 0.2066 0.568 0.000 0.152 0.280
#> GSM634721 4 0.4535 0.7616 0.112 0.000 0.084 0.804
#> GSM634722 4 0.3306 0.7253 0.000 0.156 0.004 0.840
#> GSM634723 1 0.3764 0.6706 0.852 0.072 0.000 0.076
#> GSM634724 3 0.4564 0.5896 0.328 0.000 0.672 0.000
#> GSM634725 3 0.6217 0.5844 0.400 0.008 0.552 0.040
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.1731 0.8721 0.940 0.000 0.012 0.008 0.040
#> GSM634648 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634649 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634650 5 0.3538 0.6755 0.000 0.028 0.012 0.128 0.832
#> GSM634653 4 0.2629 0.7695 0.136 0.000 0.004 0.860 0.000
#> GSM634659 5 0.3805 0.6957 0.000 0.008 0.192 0.016 0.784
#> GSM634666 4 0.0290 0.8388 0.008 0.000 0.000 0.992 0.000
#> GSM634667 2 0.0290 0.7512 0.000 0.992 0.000 0.000 0.008
#> GSM634669 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634670 3 0.0162 0.6954 0.004 0.000 0.996 0.000 0.000
#> GSM634679 4 0.2891 0.7350 0.000 0.000 0.176 0.824 0.000
#> GSM634680 3 0.3210 0.7272 0.212 0.000 0.788 0.000 0.000
#> GSM634681 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634688 4 0.0510 0.8368 0.000 0.000 0.000 0.984 0.016
#> GSM634690 2 0.2852 0.7570 0.000 0.828 0.000 0.000 0.172
#> GSM634694 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634698 1 0.1331 0.8730 0.952 0.000 0.000 0.008 0.040
#> GSM634704 5 0.4754 0.4982 0.316 0.028 0.004 0.000 0.652
#> GSM634705 1 0.1492 0.8726 0.948 0.000 0.004 0.008 0.040
#> GSM634706 1 0.3996 0.7597 0.776 0.016 0.004 0.008 0.196
#> GSM634707 1 0.5088 0.6505 0.680 0.000 0.228 0.000 0.092
#> GSM634711 1 0.3942 0.6999 0.728 0.000 0.260 0.000 0.012
#> GSM634715 1 0.6983 0.5252 0.608 0.100 0.016 0.084 0.192
#> GSM634633 3 0.5694 0.4053 0.460 0.000 0.460 0.000 0.080
#> GSM634634 4 0.0798 0.8357 0.000 0.008 0.000 0.976 0.016
#> GSM634635 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.4296 0.7694 0.776 0.000 0.168 0.016 0.040
#> GSM634637 1 0.3942 0.6999 0.728 0.000 0.260 0.000 0.012
#> GSM634638 2 0.2536 0.7022 0.000 0.868 0.004 0.000 0.128
#> GSM634639 1 0.0404 0.8739 0.988 0.000 0.000 0.000 0.012
#> GSM634640 2 0.0865 0.7537 0.000 0.972 0.004 0.000 0.024
#> GSM634641 1 0.4114 0.7598 0.772 0.000 0.184 0.004 0.040
#> GSM634642 4 0.3005 0.7602 0.008 0.012 0.000 0.856 0.124
#> GSM634644 2 0.5335 0.6544 0.000 0.676 0.004 0.208 0.112
#> GSM634645 1 0.0451 0.8767 0.988 0.000 0.008 0.000 0.004
#> GSM634646 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634647 4 0.5314 0.1826 0.052 0.000 0.420 0.528 0.000
#> GSM634651 5 0.4283 -0.0814 0.000 0.456 0.000 0.000 0.544
#> GSM634652 2 0.4824 0.1982 0.000 0.512 0.000 0.468 0.020
#> GSM634654 3 0.5286 0.4725 0.448 0.000 0.504 0.048 0.000
#> GSM634655 3 0.1790 0.6794 0.016 0.004 0.940 0.004 0.036
#> GSM634656 3 0.3086 0.7359 0.180 0.000 0.816 0.004 0.000
#> GSM634657 5 0.3708 0.6666 0.012 0.160 0.000 0.020 0.808
#> GSM634658 1 0.0324 0.8755 0.992 0.004 0.000 0.000 0.004
#> GSM634660 5 0.6409 0.4081 0.244 0.004 0.216 0.000 0.536
#> GSM634661 2 0.3707 0.7087 0.000 0.716 0.000 0.000 0.284
#> GSM634662 5 0.4271 0.7073 0.008 0.024 0.160 0.020 0.788
#> GSM634663 5 0.1943 0.6673 0.000 0.056 0.000 0.020 0.924
#> GSM634664 4 0.0000 0.8385 0.000 0.000 0.000 1.000 0.000
#> GSM634665 1 0.1168 0.8745 0.960 0.000 0.000 0.008 0.032
#> GSM634668 5 0.4035 0.6988 0.000 0.000 0.156 0.060 0.784
#> GSM634671 1 0.1251 0.8739 0.956 0.000 0.000 0.008 0.036
#> GSM634672 3 0.1282 0.7282 0.044 0.000 0.952 0.004 0.000
#> GSM634673 3 0.3495 0.6387 0.032 0.000 0.816 0.152 0.000
#> GSM634674 5 0.3643 0.6443 0.000 0.212 0.004 0.008 0.776
#> GSM634675 5 0.4744 0.0595 0.000 0.408 0.000 0.020 0.572
#> GSM634676 1 0.3961 0.7649 0.792 0.000 0.004 0.160 0.044
#> GSM634677 2 0.3224 0.7537 0.000 0.824 0.000 0.016 0.160
#> GSM634678 5 0.3861 0.6766 0.128 0.000 0.000 0.068 0.804
#> GSM634682 2 0.3741 0.5209 0.000 0.732 0.004 0.000 0.264
#> GSM634683 2 0.2891 0.7563 0.000 0.824 0.000 0.000 0.176
#> GSM634684 1 0.1990 0.8671 0.928 0.000 0.004 0.028 0.040
#> GSM634685 3 0.4610 0.6166 0.000 0.176 0.752 0.060 0.012
#> GSM634686 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634687 2 0.1892 0.7370 0.000 0.916 0.004 0.000 0.080
#> GSM634689 4 0.2053 0.8238 0.000 0.004 0.024 0.924 0.048
#> GSM634691 2 0.2852 0.7560 0.000 0.828 0.000 0.000 0.172
#> GSM634692 1 0.0000 0.8767 1.000 0.000 0.000 0.000 0.000
#> GSM634693 1 0.0290 0.8745 0.992 0.000 0.008 0.000 0.000
#> GSM634695 2 0.2763 0.6874 0.000 0.848 0.004 0.000 0.148
#> GSM634696 4 0.3368 0.7006 0.156 0.000 0.000 0.820 0.024
#> GSM634697 3 0.1914 0.7363 0.060 0.000 0.924 0.016 0.000
#> GSM634699 4 0.1518 0.8302 0.004 0.000 0.004 0.944 0.048
#> GSM634700 5 0.1410 0.6588 0.000 0.060 0.000 0.000 0.940
#> GSM634701 1 0.0162 0.8761 0.996 0.000 0.000 0.000 0.004
#> GSM634702 5 0.3846 0.6897 0.000 0.004 0.200 0.020 0.776
#> GSM634703 5 0.2753 0.6345 0.104 0.012 0.000 0.008 0.876
#> GSM634708 2 0.2852 0.7560 0.000 0.828 0.000 0.000 0.172
#> GSM634709 1 0.1492 0.8726 0.948 0.000 0.004 0.008 0.040
#> GSM634710 4 0.1701 0.8320 0.016 0.000 0.048 0.936 0.000
#> GSM634712 4 0.4219 0.4550 0.000 0.000 0.416 0.584 0.000
#> GSM634713 2 0.5186 0.4191 0.000 0.624 0.004 0.320 0.052
#> GSM634714 3 0.4161 0.6035 0.392 0.000 0.608 0.000 0.000
#> GSM634716 1 0.3942 0.6999 0.728 0.000 0.260 0.000 0.012
#> GSM634717 1 0.1808 0.8696 0.936 0.000 0.004 0.020 0.040
#> GSM634718 1 0.4138 0.7550 0.768 0.012 0.004 0.016 0.200
#> GSM634719 1 0.0162 0.8768 0.996 0.000 0.004 0.000 0.000
#> GSM634720 3 0.3661 0.6989 0.276 0.000 0.724 0.000 0.000
#> GSM634721 4 0.1579 0.8342 0.024 0.000 0.000 0.944 0.032
#> GSM634722 4 0.2873 0.7665 0.000 0.120 0.000 0.860 0.020
#> GSM634723 1 0.3899 0.7636 0.780 0.008 0.000 0.020 0.192
#> GSM634724 3 0.1012 0.6921 0.020 0.000 0.968 0.000 0.012
#> GSM634725 1 0.6279 0.5957 0.652 0.004 0.164 0.048 0.132
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.3316 0.7642 0.804 0.000 0.004 0.000 0.028 0.164
#> GSM634648 1 0.0146 0.7647 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM634649 1 0.0000 0.7647 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634650 5 0.1440 0.7467 0.004 0.004 0.000 0.012 0.948 0.032
#> GSM634653 4 0.3418 0.6899 0.192 0.000 0.016 0.784 0.008 0.000
#> GSM634659 5 0.4774 0.6304 0.000 0.004 0.136 0.020 0.724 0.116
#> GSM634666 4 0.0146 0.7920 0.000 0.000 0.000 0.996 0.004 0.000
#> GSM634667 2 0.3564 0.4042 0.000 0.724 0.000 0.000 0.012 0.264
#> GSM634669 1 0.0363 0.7672 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM634670 3 0.0000 0.6789 0.000 0.000 1.000 0.000 0.000 0.000
#> GSM634679 4 0.2805 0.7139 0.000 0.000 0.160 0.828 0.012 0.000
#> GSM634680 3 0.3050 0.6848 0.236 0.000 0.764 0.000 0.000 0.000
#> GSM634681 1 0.0146 0.7646 0.996 0.000 0.000 0.000 0.000 0.004
#> GSM634688 4 0.0777 0.7906 0.000 0.004 0.000 0.972 0.024 0.000
#> GSM634690 2 0.0291 0.6546 0.000 0.992 0.000 0.004 0.004 0.000
#> GSM634694 1 0.0000 0.7647 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634698 1 0.2301 0.7689 0.884 0.000 0.000 0.000 0.020 0.096
#> GSM634704 5 0.3309 0.6441 0.172 0.024 0.000 0.000 0.800 0.004
#> GSM634705 1 0.3175 0.7644 0.808 0.000 0.000 0.000 0.028 0.164
#> GSM634706 1 0.6096 0.5386 0.512 0.296 0.000 0.000 0.024 0.168
#> GSM634707 1 0.6974 0.4780 0.492 0.000 0.172 0.000 0.184 0.152
#> GSM634711 1 0.6305 0.4927 0.496 0.000 0.284 0.000 0.032 0.188
#> GSM634715 1 0.7375 0.5391 0.528 0.032 0.008 0.128 0.160 0.144
#> GSM634633 1 0.4310 -0.2068 0.540 0.000 0.440 0.000 0.020 0.000
#> GSM634634 4 0.1387 0.7767 0.000 0.000 0.000 0.932 0.068 0.000
#> GSM634635 1 0.0000 0.7647 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.5622 0.6843 0.640 0.000 0.156 0.004 0.032 0.168
#> GSM634637 1 0.6305 0.4927 0.496 0.000 0.284 0.000 0.032 0.188
#> GSM634638 6 0.3734 0.7784 0.000 0.264 0.000 0.000 0.020 0.716
#> GSM634639 1 0.2146 0.7162 0.880 0.000 0.000 0.000 0.004 0.116
#> GSM634640 2 0.4479 0.3640 0.000 0.684 0.000 0.000 0.080 0.236
#> GSM634641 1 0.6172 0.6210 0.552 0.000 0.140 0.000 0.052 0.256
#> GSM634642 4 0.2489 0.7339 0.000 0.128 0.000 0.860 0.012 0.000
#> GSM634644 2 0.6161 -0.0987 0.000 0.496 0.000 0.196 0.020 0.288
#> GSM634645 1 0.2695 0.7542 0.844 0.000 0.004 0.000 0.008 0.144
#> GSM634646 1 0.1387 0.7747 0.932 0.000 0.000 0.000 0.000 0.068
#> GSM634647 4 0.4715 0.2497 0.048 0.000 0.416 0.536 0.000 0.000
#> GSM634651 5 0.4382 0.5012 0.000 0.228 0.000 0.000 0.696 0.076
#> GSM634652 2 0.5286 0.2289 0.000 0.528 0.000 0.388 0.072 0.012
#> GSM634654 3 0.4755 0.4578 0.460 0.000 0.492 0.048 0.000 0.000
#> GSM634655 3 0.2895 0.6373 0.008 0.004 0.868 0.000 0.072 0.048
#> GSM634656 3 0.2219 0.7145 0.136 0.000 0.864 0.000 0.000 0.000
#> GSM634657 5 0.2597 0.7290 0.004 0.008 0.000 0.020 0.880 0.088
#> GSM634658 1 0.0405 0.7636 0.988 0.000 0.000 0.000 0.004 0.008
#> GSM634660 5 0.6776 0.2915 0.264 0.004 0.112 0.000 0.504 0.116
#> GSM634661 2 0.1390 0.6277 0.000 0.948 0.000 0.004 0.016 0.032
#> GSM634662 5 0.1377 0.7500 0.004 0.004 0.016 0.024 0.952 0.000
#> GSM634663 5 0.1829 0.7445 0.000 0.056 0.000 0.024 0.920 0.000
#> GSM634664 4 0.0260 0.7919 0.000 0.000 0.000 0.992 0.008 0.000
#> GSM634665 1 0.2170 0.7707 0.888 0.000 0.000 0.000 0.012 0.100
#> GSM634668 5 0.2884 0.7347 0.000 0.000 0.064 0.064 0.864 0.008
#> GSM634671 1 0.2214 0.7694 0.888 0.000 0.000 0.000 0.016 0.096
#> GSM634672 3 0.1141 0.7173 0.052 0.000 0.948 0.000 0.000 0.000
#> GSM634673 3 0.2605 0.6680 0.028 0.000 0.864 0.108 0.000 0.000
#> GSM634674 5 0.2862 0.7233 0.000 0.048 0.000 0.008 0.864 0.080
#> GSM634675 5 0.4432 0.3143 0.000 0.432 0.000 0.020 0.544 0.004
#> GSM634676 1 0.5583 0.6731 0.640 0.000 0.000 0.152 0.040 0.168
#> GSM634677 2 0.0363 0.6533 0.000 0.988 0.000 0.012 0.000 0.000
#> GSM634678 5 0.3007 0.7364 0.020 0.040 0.000 0.080 0.860 0.000
#> GSM634682 6 0.4760 0.7572 0.000 0.212 0.000 0.000 0.120 0.668
#> GSM634683 2 0.0865 0.6459 0.000 0.964 0.000 0.000 0.036 0.000
#> GSM634684 1 0.3996 0.7557 0.772 0.000 0.000 0.028 0.036 0.164
#> GSM634685 3 0.5147 0.3848 0.000 0.004 0.616 0.056 0.020 0.304
#> GSM634686 1 0.1387 0.7747 0.932 0.000 0.000 0.000 0.000 0.068
#> GSM634687 6 0.4973 0.7330 0.000 0.264 0.000 0.000 0.112 0.624
#> GSM634689 4 0.1882 0.7853 0.000 0.028 0.020 0.928 0.024 0.000
#> GSM634691 2 0.0260 0.6545 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM634692 1 0.0632 0.7715 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM634693 1 0.1367 0.7762 0.944 0.000 0.012 0.000 0.000 0.044
#> GSM634695 2 0.4537 0.2959 0.000 0.664 0.000 0.000 0.072 0.264
#> GSM634696 4 0.4387 0.5996 0.180 0.000 0.000 0.732 0.012 0.076
#> GSM634697 3 0.1219 0.7170 0.048 0.000 0.948 0.004 0.000 0.000
#> GSM634699 4 0.3347 0.7453 0.040 0.004 0.000 0.848 0.036 0.072
#> GSM634700 5 0.1663 0.7393 0.000 0.088 0.000 0.000 0.912 0.000
#> GSM634701 1 0.1387 0.7485 0.932 0.000 0.000 0.000 0.000 0.068
#> GSM634702 5 0.4747 0.6195 0.000 0.004 0.152 0.012 0.716 0.116
#> GSM634703 5 0.4350 0.6512 0.044 0.116 0.000 0.000 0.768 0.072
#> GSM634708 2 0.0260 0.6545 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM634709 1 0.3175 0.7644 0.808 0.000 0.000 0.000 0.028 0.164
#> GSM634710 4 0.1888 0.7841 0.004 0.000 0.068 0.916 0.012 0.000
#> GSM634712 4 0.3797 0.4437 0.000 0.000 0.420 0.580 0.000 0.000
#> GSM634713 2 0.5770 0.2533 0.000 0.568 0.000 0.148 0.020 0.264
#> GSM634714 3 0.3810 0.5468 0.428 0.000 0.572 0.000 0.000 0.000
#> GSM634716 1 0.6305 0.4927 0.496 0.000 0.284 0.000 0.032 0.188
#> GSM634717 1 0.3875 0.7573 0.776 0.000 0.000 0.020 0.036 0.168
#> GSM634718 1 0.6084 0.5441 0.516 0.292 0.000 0.000 0.024 0.168
#> GSM634719 1 0.1812 0.7742 0.912 0.000 0.000 0.000 0.008 0.080
#> GSM634720 3 0.3844 0.6350 0.312 0.000 0.676 0.000 0.008 0.004
#> GSM634721 4 0.3548 0.7398 0.076 0.000 0.000 0.824 0.020 0.080
#> GSM634722 4 0.3240 0.6934 0.000 0.144 0.000 0.820 0.028 0.008
#> GSM634723 1 0.5581 0.5925 0.620 0.252 0.000 0.012 0.020 0.096
#> GSM634724 3 0.3062 0.5856 0.016 0.000 0.844 0.000 0.024 0.116
#> GSM634725 1 0.6495 0.5624 0.628 0.004 0.120 0.036 0.100 0.112
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n individual(p) k
#> MAD:pam 92 0.191 2
#> MAD:pam 86 0.148 3
#> MAD:pam 76 0.355 4
#> MAD:pam 83 0.589 5
#> MAD:pam 76 0.801 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 17698 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.219 0.650 0.779 0.4394 0.525 0.525
#> 3 3 0.295 0.586 0.708 0.2728 0.673 0.450
#> 4 4 0.367 0.589 0.744 0.1664 0.790 0.529
#> 5 5 0.581 0.645 0.802 0.0841 0.863 0.641
#> 6 6 0.639 0.568 0.784 0.0980 0.873 0.600
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
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
#> GSM634643 1 0.0000 0.6753 1.000 0.000
#> GSM634648 1 0.8955 0.6017 0.688 0.312
#> GSM634649 1 0.0376 0.6781 0.996 0.004
#> GSM634650 1 0.9963 0.5670 0.536 0.464
#> GSM634653 2 0.8555 0.7011 0.280 0.720
#> GSM634659 1 0.7883 0.6769 0.764 0.236
#> GSM634666 2 0.7674 0.7610 0.224 0.776
#> GSM634667 2 0.5178 0.6717 0.116 0.884
#> GSM634669 1 0.0000 0.6753 1.000 0.000
#> GSM634670 2 0.7674 0.7610 0.224 0.776
#> GSM634679 2 0.7674 0.7610 0.224 0.776
#> GSM634680 2 0.7674 0.7610 0.224 0.776
#> GSM634681 1 0.1184 0.6822 0.984 0.016
#> GSM634688 2 0.0000 0.7309 0.000 1.000
#> GSM634690 2 0.5629 0.6542 0.132 0.868
#> GSM634694 1 0.1633 0.6842 0.976 0.024
#> GSM634698 1 0.0672 0.6800 0.992 0.008
#> GSM634704 1 0.9896 0.5853 0.560 0.440
#> GSM634705 1 0.2423 0.6728 0.960 0.040
#> GSM634706 1 0.7745 0.6782 0.772 0.228
#> GSM634707 1 0.7815 0.6724 0.768 0.232
#> GSM634711 1 0.7950 0.6675 0.760 0.240
#> GSM634715 1 0.9933 0.5763 0.548 0.452
#> GSM634633 1 0.7950 0.6675 0.760 0.240
#> GSM634634 2 0.7674 0.7610 0.224 0.776
#> GSM634635 1 0.0376 0.6781 0.996 0.004
#> GSM634636 1 0.0376 0.6781 0.996 0.004
#> GSM634637 1 0.7453 0.6817 0.788 0.212
#> GSM634638 2 0.3733 0.7021 0.072 0.928
#> GSM634639 1 0.0376 0.6781 0.996 0.004
#> GSM634640 2 0.5629 0.6542 0.132 0.868
#> GSM634641 1 0.0672 0.6801 0.992 0.008
#> GSM634642 2 0.0000 0.7309 0.000 1.000
#> GSM634644 2 0.4161 0.6970 0.084 0.916
#> GSM634645 1 0.0376 0.6784 0.996 0.004
#> GSM634646 1 0.8955 0.6017 0.688 0.312
#> GSM634647 2 0.7674 0.7610 0.224 0.776
#> GSM634651 1 0.9963 0.5670 0.536 0.464
#> GSM634652 2 0.0000 0.7309 0.000 1.000
#> GSM634654 2 0.8016 0.7465 0.244 0.756
#> GSM634655 2 0.9427 0.5847 0.360 0.640
#> GSM634656 2 0.7674 0.7610 0.224 0.776
#> GSM634657 1 0.9963 0.5670 0.536 0.464
#> GSM634658 1 0.0000 0.6753 1.000 0.000
#> GSM634660 1 0.7883 0.6698 0.764 0.236
#> GSM634661 2 0.9087 0.1051 0.324 0.676
#> GSM634662 1 0.9963 0.5670 0.536 0.464
#> GSM634663 1 0.9963 0.5670 0.536 0.464
#> GSM634664 2 0.0000 0.7309 0.000 1.000
#> GSM634665 1 0.8955 0.6017 0.688 0.312
#> GSM634668 1 0.9933 0.5767 0.548 0.452
#> GSM634671 1 0.8955 0.6017 0.688 0.312
#> GSM634672 2 0.7950 0.7503 0.240 0.760
#> GSM634673 2 0.7674 0.7610 0.224 0.776
#> GSM634674 1 0.9963 0.5670 0.536 0.464
#> GSM634675 1 0.9963 0.5670 0.536 0.464
#> GSM634676 1 0.6531 0.6907 0.832 0.168
#> GSM634677 1 0.9963 0.5670 0.536 0.464
#> GSM634678 1 0.8713 0.6614 0.708 0.292
#> GSM634682 2 0.3733 0.7021 0.072 0.928
#> GSM634683 1 0.9963 0.5670 0.536 0.464
#> GSM634684 1 0.0376 0.6782 0.996 0.004
#> GSM634685 2 0.6048 0.7467 0.148 0.852
#> GSM634686 1 0.0376 0.6781 0.996 0.004
#> GSM634687 2 0.5842 0.6421 0.140 0.860
#> GSM634689 2 0.3274 0.7542 0.060 0.940
#> GSM634691 1 0.9963 0.5670 0.536 0.464
#> GSM634692 1 0.0376 0.6783 0.996 0.004
#> GSM634693 1 0.8955 0.6017 0.688 0.312
#> GSM634695 2 0.5408 0.6632 0.124 0.876
#> GSM634696 1 0.9710 0.4100 0.600 0.400
#> GSM634697 2 0.7674 0.7610 0.224 0.776
#> GSM634699 2 0.6623 0.7670 0.172 0.828
#> GSM634700 1 0.9963 0.5670 0.536 0.464
#> GSM634701 1 0.0000 0.6753 1.000 0.000
#> GSM634702 1 0.8267 0.6681 0.740 0.260
#> GSM634703 1 0.9815 0.5861 0.580 0.420
#> GSM634708 1 0.9963 0.5670 0.536 0.464
#> GSM634709 1 0.0000 0.6753 1.000 0.000
#> GSM634710 2 0.7674 0.7610 0.224 0.776
#> GSM634712 2 0.7674 0.7610 0.224 0.776
#> GSM634713 2 0.0000 0.7309 0.000 1.000
#> GSM634714 1 0.9710 0.3663 0.600 0.400
#> GSM634716 1 0.7950 0.6675 0.760 0.240
#> GSM634717 1 0.0672 0.6802 0.992 0.008
#> GSM634718 1 0.9710 0.6024 0.600 0.400
#> GSM634719 1 0.1633 0.6840 0.976 0.024
#> GSM634720 2 0.7950 0.7504 0.240 0.760
#> GSM634721 2 0.8207 0.7336 0.256 0.744
#> GSM634722 2 0.0000 0.7309 0.000 1.000
#> GSM634723 1 0.9754 0.5953 0.592 0.408
#> GSM634724 1 1.0000 -0.0942 0.504 0.496
#> GSM634725 1 0.7056 0.6871 0.808 0.192
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.5905 0.8542 0.648 0.352 0.000
#> GSM634648 1 0.8346 0.8438 0.548 0.360 0.092
#> GSM634649 1 0.5882 0.8522 0.652 0.348 0.000
#> GSM634650 2 0.3112 0.5485 0.096 0.900 0.004
#> GSM634653 1 0.9589 0.6610 0.464 0.316 0.220
#> GSM634659 2 0.7130 -0.4801 0.432 0.544 0.024
#> GSM634666 3 0.6887 0.7137 0.236 0.060 0.704
#> GSM634667 2 0.7188 0.3544 0.280 0.664 0.056
#> GSM634669 1 0.6204 0.8406 0.576 0.424 0.000
#> GSM634670 3 0.4068 0.7354 0.120 0.016 0.864
#> GSM634679 3 0.4473 0.7498 0.164 0.008 0.828
#> GSM634680 3 0.5414 0.7453 0.212 0.016 0.772
#> GSM634681 1 0.5926 0.8546 0.644 0.356 0.000
#> GSM634688 3 0.5859 0.6141 0.000 0.344 0.656
#> GSM634690 2 0.5497 0.5144 0.148 0.804 0.048
#> GSM634694 1 0.6192 0.8437 0.580 0.420 0.000
#> GSM634698 1 0.5882 0.8522 0.652 0.348 0.000
#> GSM634704 2 0.4178 0.4031 0.172 0.828 0.000
#> GSM634705 1 0.7533 0.8597 0.600 0.348 0.052
#> GSM634706 2 0.6045 -0.3890 0.380 0.620 0.000
#> GSM634707 1 0.8022 0.8188 0.544 0.388 0.068
#> GSM634711 1 0.8239 0.8134 0.532 0.388 0.080
#> GSM634715 2 0.4418 0.5087 0.132 0.848 0.020
#> GSM634633 2 0.8275 -0.7222 0.452 0.472 0.076
#> GSM634634 3 0.5875 0.7538 0.160 0.056 0.784
#> GSM634635 1 0.5882 0.8522 0.652 0.348 0.000
#> GSM634636 1 0.5926 0.8567 0.644 0.356 0.000
#> GSM634637 1 0.8215 0.8180 0.540 0.380 0.080
#> GSM634638 2 0.8732 0.2229 0.316 0.552 0.132
#> GSM634639 1 0.5988 0.8590 0.632 0.368 0.000
#> GSM634640 2 0.7188 0.3544 0.280 0.664 0.056
#> GSM634641 1 0.6984 0.8428 0.560 0.420 0.020
#> GSM634642 3 0.5968 0.5968 0.000 0.364 0.636
#> GSM634644 2 0.9640 -0.0439 0.280 0.468 0.252
#> GSM634645 1 0.7658 0.8598 0.588 0.356 0.056
#> GSM634646 1 0.8533 0.8378 0.536 0.360 0.104
#> GSM634647 3 0.1751 0.7127 0.028 0.012 0.960
#> GSM634651 2 0.3038 0.5890 0.104 0.896 0.000
#> GSM634652 3 0.5835 0.6042 0.000 0.340 0.660
#> GSM634654 3 0.7901 0.3531 0.400 0.060 0.540
#> GSM634655 2 0.8890 -0.1895 0.328 0.532 0.140
#> GSM634656 3 0.1905 0.7130 0.028 0.016 0.956
#> GSM634657 2 0.2878 0.5469 0.096 0.904 0.000
#> GSM634658 1 0.6168 0.8484 0.588 0.412 0.000
#> GSM634660 1 0.7681 0.8011 0.540 0.412 0.048
#> GSM634661 2 0.4645 0.5151 0.176 0.816 0.008
#> GSM634662 2 0.3482 0.5557 0.128 0.872 0.000
#> GSM634663 2 0.2165 0.5745 0.064 0.936 0.000
#> GSM634664 3 0.6008 0.6192 0.004 0.332 0.664
#> GSM634665 1 0.8875 0.8053 0.528 0.336 0.136
#> GSM634668 2 0.6255 0.0645 0.300 0.684 0.016
#> GSM634671 1 0.8769 0.8181 0.528 0.348 0.124
#> GSM634672 3 0.7357 0.5151 0.332 0.048 0.620
#> GSM634673 3 0.5318 0.7474 0.204 0.016 0.780
#> GSM634674 2 0.3618 0.5725 0.104 0.884 0.012
#> GSM634675 2 0.0747 0.5992 0.016 0.984 0.000
#> GSM634676 1 0.6432 0.8211 0.568 0.428 0.004
#> GSM634677 2 0.0592 0.6009 0.012 0.988 0.000
#> GSM634678 2 0.5905 -0.3049 0.352 0.648 0.000
#> GSM634682 2 0.8732 0.2229 0.316 0.552 0.132
#> GSM634683 2 0.0237 0.6026 0.004 0.996 0.000
#> GSM634684 1 0.6169 0.8592 0.636 0.360 0.004
#> GSM634685 3 0.8345 0.4883 0.096 0.344 0.560
#> GSM634686 1 0.6168 0.8466 0.588 0.412 0.000
#> GSM634687 2 0.7188 0.3544 0.280 0.664 0.056
#> GSM634689 3 0.7676 0.6997 0.112 0.216 0.672
#> GSM634691 2 0.0237 0.6030 0.004 0.996 0.000
#> GSM634692 1 0.5926 0.8567 0.644 0.356 0.000
#> GSM634693 1 0.9062 0.7935 0.512 0.336 0.152
#> GSM634695 2 0.8625 0.2375 0.316 0.560 0.124
#> GSM634696 1 0.9306 0.7551 0.480 0.348 0.172
#> GSM634697 3 0.4782 0.7512 0.164 0.016 0.820
#> GSM634699 3 0.7932 0.7038 0.140 0.200 0.660
#> GSM634700 2 0.0000 0.6034 0.000 1.000 0.000
#> GSM634701 1 0.6410 0.8460 0.576 0.420 0.004
#> GSM634702 2 0.7112 -0.4689 0.424 0.552 0.024
#> GSM634703 2 0.3752 0.4926 0.144 0.856 0.000
#> GSM634708 2 0.1411 0.6035 0.036 0.964 0.000
#> GSM634709 1 0.5882 0.8522 0.652 0.348 0.000
#> GSM634710 3 0.5639 0.7165 0.232 0.016 0.752
#> GSM634712 3 0.4634 0.7508 0.164 0.012 0.824
#> GSM634713 3 0.5835 0.6042 0.000 0.340 0.660
#> GSM634714 1 0.8900 0.8081 0.512 0.356 0.132
#> GSM634716 1 0.8239 0.8134 0.532 0.388 0.080
#> GSM634717 1 0.5905 0.8549 0.648 0.352 0.000
#> GSM634718 2 0.5363 0.1107 0.276 0.724 0.000
#> GSM634719 1 0.6180 0.8458 0.584 0.416 0.000
#> GSM634720 3 0.6629 0.6037 0.360 0.016 0.624
#> GSM634721 1 0.9709 0.5047 0.448 0.244 0.308
#> GSM634722 3 0.6057 0.6032 0.004 0.340 0.656
#> GSM634723 2 0.5156 0.3343 0.216 0.776 0.008
#> GSM634724 1 0.8983 0.7541 0.480 0.388 0.132
#> GSM634725 1 0.8045 0.8271 0.504 0.432 0.064
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0817 0.788 0.976 0.000 0.024 0.000
#> GSM634648 1 0.5187 0.738 0.796 0.056 0.100 0.048
#> GSM634649 1 0.0817 0.788 0.976 0.000 0.024 0.000
#> GSM634650 1 0.6626 0.434 0.596 0.312 0.008 0.084
#> GSM634653 1 0.7491 0.458 0.632 0.064 0.156 0.148
#> GSM634659 1 0.6690 0.634 0.664 0.128 0.188 0.020
#> GSM634666 4 0.7368 0.600 0.112 0.120 0.112 0.656
#> GSM634667 2 0.4406 0.428 0.000 0.700 0.000 0.300
#> GSM634669 1 0.0336 0.793 0.992 0.008 0.000 0.000
#> GSM634670 3 0.4459 0.566 0.032 0.000 0.780 0.188
#> GSM634679 3 0.5511 0.526 0.032 0.000 0.636 0.332
#> GSM634680 3 0.4755 0.570 0.040 0.000 0.760 0.200
#> GSM634681 1 0.2500 0.778 0.916 0.044 0.040 0.000
#> GSM634688 4 0.4464 0.700 0.024 0.208 0.000 0.768
#> GSM634690 2 0.3845 0.549 0.016 0.840 0.012 0.132
#> GSM634694 1 0.0804 0.794 0.980 0.012 0.008 0.000
#> GSM634698 1 0.1022 0.786 0.968 0.000 0.032 0.000
#> GSM634704 2 0.5216 0.543 0.272 0.700 0.012 0.016
#> GSM634705 1 0.1635 0.790 0.948 0.000 0.044 0.008
#> GSM634706 1 0.3852 0.702 0.800 0.192 0.008 0.000
#> GSM634707 1 0.6458 0.654 0.680 0.104 0.196 0.020
#> GSM634711 1 0.5180 0.631 0.672 0.004 0.308 0.016
#> GSM634715 1 0.6990 0.487 0.564 0.344 0.032 0.060
#> GSM634633 1 0.6588 0.691 0.708 0.136 0.084 0.072
#> GSM634634 4 0.5612 0.552 0.032 0.032 0.208 0.728
#> GSM634635 1 0.0817 0.788 0.976 0.000 0.024 0.000
#> GSM634636 1 0.0000 0.793 1.000 0.000 0.000 0.000
#> GSM634637 1 0.5243 0.658 0.696 0.012 0.276 0.016
#> GSM634638 2 0.7540 0.190 0.000 0.468 0.204 0.328
#> GSM634639 1 0.0817 0.788 0.976 0.000 0.024 0.000
#> GSM634640 2 0.3710 0.516 0.000 0.804 0.004 0.192
#> GSM634641 1 0.0804 0.795 0.980 0.008 0.012 0.000
#> GSM634642 4 0.4644 0.679 0.024 0.228 0.000 0.748
#> GSM634644 2 0.6804 0.301 0.020 0.640 0.108 0.232
#> GSM634645 1 0.0817 0.794 0.976 0.000 0.024 0.000
#> GSM634646 1 0.5064 0.740 0.800 0.044 0.108 0.048
#> GSM634647 3 0.5592 0.421 0.024 0.000 0.572 0.404
#> GSM634651 2 0.1762 0.595 0.048 0.944 0.004 0.004
#> GSM634652 4 0.2816 0.699 0.000 0.064 0.036 0.900
#> GSM634654 3 0.8615 0.280 0.364 0.048 0.400 0.188
#> GSM634655 3 0.6974 -0.158 0.420 0.048 0.500 0.032
#> GSM634656 3 0.5291 0.523 0.024 0.000 0.652 0.324
#> GSM634657 2 0.5511 0.296 0.376 0.604 0.008 0.012
#> GSM634658 1 0.0188 0.794 0.996 0.004 0.000 0.000
#> GSM634660 1 0.6458 0.654 0.680 0.104 0.196 0.020
#> GSM634661 2 0.0524 0.573 0.004 0.988 0.008 0.000
#> GSM634662 1 0.7140 0.450 0.572 0.280 0.140 0.008
#> GSM634663 2 0.5349 0.352 0.368 0.616 0.004 0.012
#> GSM634664 4 0.3862 0.721 0.024 0.152 0.000 0.824
#> GSM634665 1 0.6069 0.680 0.740 0.048 0.088 0.124
#> GSM634668 1 0.7327 0.554 0.580 0.252 0.152 0.016
#> GSM634671 1 0.5326 0.713 0.784 0.032 0.080 0.104
#> GSM634672 3 0.6843 0.549 0.084 0.044 0.660 0.212
#> GSM634673 3 0.4459 0.566 0.032 0.000 0.780 0.188
#> GSM634674 2 0.7758 0.258 0.328 0.472 0.192 0.008
#> GSM634675 2 0.5070 0.446 0.372 0.620 0.008 0.000
#> GSM634676 1 0.1297 0.794 0.964 0.016 0.020 0.000
#> GSM634677 2 0.4973 0.473 0.348 0.644 0.008 0.000
#> GSM634678 1 0.5851 0.522 0.604 0.360 0.028 0.008
#> GSM634682 2 0.7540 0.190 0.000 0.468 0.204 0.328
#> GSM634683 2 0.3528 0.602 0.192 0.808 0.000 0.000
#> GSM634684 1 0.0000 0.793 1.000 0.000 0.000 0.000
#> GSM634685 3 0.6973 0.258 0.024 0.072 0.568 0.336
#> GSM634686 1 0.1452 0.786 0.956 0.008 0.036 0.000
#> GSM634687 2 0.4053 0.499 0.000 0.768 0.004 0.228
#> GSM634689 4 0.6922 0.604 0.028 0.152 0.164 0.656
#> GSM634691 2 0.3975 0.586 0.240 0.760 0.000 0.000
#> GSM634692 1 0.0469 0.792 0.988 0.000 0.012 0.000
#> GSM634693 1 0.6069 0.680 0.740 0.048 0.088 0.124
#> GSM634695 2 0.7429 0.230 0.000 0.492 0.192 0.316
#> GSM634696 1 0.7132 0.632 0.672 0.132 0.088 0.108
#> GSM634697 3 0.5511 0.526 0.032 0.000 0.636 0.332
#> GSM634699 4 0.4998 0.540 0.200 0.052 0.000 0.748
#> GSM634700 2 0.2408 0.607 0.104 0.896 0.000 0.000
#> GSM634701 1 0.0817 0.794 0.976 0.024 0.000 0.000
#> GSM634702 1 0.7302 0.599 0.600 0.164 0.216 0.020
#> GSM634703 1 0.4690 0.614 0.724 0.260 0.016 0.000
#> GSM634708 2 0.2522 0.604 0.076 0.908 0.000 0.016
#> GSM634709 1 0.0817 0.788 0.976 0.000 0.024 0.000
#> GSM634710 3 0.7938 0.406 0.172 0.020 0.476 0.332
#> GSM634712 3 0.5511 0.526 0.032 0.000 0.636 0.332
#> GSM634713 4 0.3652 0.677 0.000 0.052 0.092 0.856
#> GSM634714 1 0.6456 0.633 0.708 0.044 0.148 0.100
#> GSM634716 1 0.5592 0.623 0.652 0.016 0.316 0.016
#> GSM634717 1 0.0707 0.789 0.980 0.000 0.020 0.000
#> GSM634718 1 0.3925 0.703 0.808 0.176 0.016 0.000
#> GSM634719 1 0.1256 0.790 0.964 0.008 0.028 0.000
#> GSM634720 3 0.8816 0.338 0.256 0.080 0.472 0.192
#> GSM634721 1 0.8430 0.362 0.552 0.116 0.196 0.136
#> GSM634722 4 0.3810 0.683 0.000 0.060 0.092 0.848
#> GSM634723 1 0.3548 0.769 0.876 0.056 0.012 0.056
#> GSM634724 3 0.6523 0.311 0.264 0.056 0.648 0.032
#> GSM634725 1 0.6542 0.702 0.708 0.124 0.116 0.052
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634648 1 0.1430 0.84859 0.944 0.004 0.052 0.000 0.000
#> GSM634649 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634650 2 0.5964 0.52250 0.280 0.584 0.004 0.000 0.132
#> GSM634653 1 0.2074 0.84160 0.920 0.004 0.060 0.016 0.000
#> GSM634659 1 0.7585 0.42175 0.560 0.216 0.108 0.076 0.040
#> GSM634666 4 0.4712 0.73988 0.108 0.080 0.028 0.780 0.004
#> GSM634667 5 0.4540 0.66598 0.000 0.340 0.020 0.000 0.640
#> GSM634669 1 0.1341 0.83637 0.944 0.056 0.000 0.000 0.000
#> GSM634670 3 0.0912 0.68812 0.000 0.000 0.972 0.012 0.016
#> GSM634679 3 0.1908 0.68248 0.000 0.000 0.908 0.092 0.000
#> GSM634680 3 0.2555 0.69662 0.072 0.004 0.900 0.008 0.016
#> GSM634681 1 0.0451 0.86197 0.988 0.004 0.008 0.000 0.000
#> GSM634688 4 0.4488 0.80494 0.000 0.112 0.020 0.784 0.084
#> GSM634690 2 0.4067 0.25365 0.004 0.748 0.020 0.000 0.228
#> GSM634694 1 0.1121 0.84402 0.956 0.044 0.000 0.000 0.000
#> GSM634698 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634704 2 0.2873 0.56821 0.120 0.860 0.000 0.000 0.020
#> GSM634705 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634706 2 0.4627 0.39422 0.444 0.544 0.000 0.000 0.012
#> GSM634707 1 0.6887 0.60348 0.648 0.104 0.132 0.076 0.040
#> GSM634711 1 0.4976 0.70866 0.752 0.004 0.144 0.076 0.024
#> GSM634715 2 0.4558 0.58276 0.252 0.708 0.004 0.000 0.036
#> GSM634633 1 0.5005 0.71773 0.740 0.160 0.072 0.000 0.028
#> GSM634634 4 0.3400 0.77704 0.000 0.004 0.072 0.848 0.076
#> GSM634635 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634637 1 0.5633 0.68445 0.724 0.020 0.144 0.076 0.036
#> GSM634638 5 0.1818 0.61767 0.000 0.044 0.024 0.000 0.932
#> GSM634639 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634640 5 0.4570 0.65765 0.000 0.348 0.020 0.000 0.632
#> GSM634641 1 0.2726 0.81025 0.884 0.000 0.064 0.052 0.000
#> GSM634642 4 0.3812 0.73402 0.004 0.196 0.020 0.780 0.000
#> GSM634644 2 0.5067 0.21436 0.000 0.712 0.020 0.060 0.208
#> GSM634645 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634646 1 0.1357 0.84907 0.948 0.000 0.048 0.000 0.004
#> GSM634647 3 0.3854 0.56964 0.000 0.004 0.816 0.100 0.080
#> GSM634651 2 0.3851 0.28421 0.004 0.768 0.016 0.000 0.212
#> GSM634652 4 0.3988 0.80119 0.000 0.008 0.024 0.776 0.192
#> GSM634654 3 0.4580 0.29930 0.460 0.004 0.532 0.004 0.000
#> GSM634655 1 0.7222 0.59434 0.620 0.084 0.160 0.076 0.060
#> GSM634656 3 0.2775 0.64547 0.000 0.004 0.876 0.100 0.020
#> GSM634657 2 0.4481 0.58366 0.232 0.720 0.000 0.000 0.048
#> GSM634658 1 0.0510 0.86106 0.984 0.016 0.000 0.000 0.000
#> GSM634660 1 0.7491 0.49258 0.584 0.168 0.132 0.076 0.040
#> GSM634661 2 0.2068 0.47027 0.004 0.904 0.000 0.000 0.092
#> GSM634662 2 0.6334 0.55062 0.284 0.604 0.052 0.016 0.044
#> GSM634663 2 0.1211 0.52766 0.024 0.960 0.000 0.000 0.016
#> GSM634664 4 0.4457 0.81477 0.000 0.072 0.020 0.784 0.124
#> GSM634665 1 0.1857 0.84242 0.928 0.000 0.060 0.008 0.004
#> GSM634668 2 0.7468 0.49320 0.268 0.540 0.088 0.068 0.036
#> GSM634671 1 0.1808 0.85148 0.936 0.004 0.040 0.020 0.000
#> GSM634672 3 0.1648 0.70474 0.040 0.000 0.940 0.020 0.000
#> GSM634673 3 0.1386 0.70482 0.032 0.000 0.952 0.000 0.016
#> GSM634674 2 0.6534 0.55598 0.212 0.636 0.084 0.024 0.044
#> GSM634675 2 0.3090 0.52740 0.088 0.860 0.000 0.000 0.052
#> GSM634676 1 0.0510 0.86214 0.984 0.016 0.000 0.000 0.000
#> GSM634677 2 0.3281 0.52365 0.092 0.848 0.000 0.000 0.060
#> GSM634678 2 0.4445 0.57662 0.300 0.676 0.000 0.000 0.024
#> GSM634682 5 0.1818 0.61767 0.000 0.044 0.024 0.000 0.932
#> GSM634683 2 0.2338 0.46877 0.004 0.884 0.000 0.000 0.112
#> GSM634684 1 0.0771 0.86014 0.976 0.020 0.000 0.004 0.000
#> GSM634685 5 0.6585 -0.08425 0.000 0.012 0.408 0.144 0.436
#> GSM634686 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634687 5 0.4540 0.66598 0.000 0.340 0.020 0.000 0.640
#> GSM634689 4 0.3731 0.72396 0.000 0.072 0.112 0.816 0.000
#> GSM634691 2 0.3849 0.47823 0.080 0.808 0.000 0.000 0.112
#> GSM634692 1 0.0290 0.86206 0.992 0.000 0.000 0.008 0.000
#> GSM634693 1 0.1857 0.84242 0.928 0.000 0.060 0.008 0.004
#> GSM634695 2 0.4829 0.03028 0.000 0.500 0.020 0.000 0.480
#> GSM634696 1 0.3333 0.80466 0.856 0.076 0.060 0.008 0.000
#> GSM634697 3 0.1285 0.68973 0.004 0.000 0.956 0.036 0.004
#> GSM634699 4 0.2873 0.71896 0.120 0.000 0.020 0.860 0.000
#> GSM634700 2 0.2349 0.47857 0.004 0.900 0.012 0.000 0.084
#> GSM634701 1 0.0703 0.85869 0.976 0.024 0.000 0.000 0.000
#> GSM634702 1 0.7585 0.42497 0.560 0.216 0.108 0.076 0.040
#> GSM634703 2 0.4505 0.50079 0.384 0.604 0.000 0.000 0.012
#> GSM634708 2 0.3124 0.41655 0.004 0.844 0.016 0.000 0.136
#> GSM634709 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634710 3 0.5474 0.58276 0.192 0.048 0.700 0.060 0.000
#> GSM634712 3 0.1908 0.68248 0.000 0.000 0.908 0.092 0.000
#> GSM634713 4 0.3779 0.79491 0.000 0.000 0.024 0.776 0.200
#> GSM634714 1 0.2124 0.82171 0.900 0.004 0.096 0.000 0.000
#> GSM634716 1 0.5443 0.69141 0.732 0.012 0.144 0.076 0.036
#> GSM634717 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634718 2 0.4627 0.40032 0.444 0.544 0.000 0.000 0.012
#> GSM634719 1 0.0000 0.86263 1.000 0.000 0.000 0.000 0.000
#> GSM634720 3 0.5860 0.41991 0.360 0.068 0.556 0.000 0.016
#> GSM634721 1 0.3870 0.78185 0.820 0.080 0.092 0.008 0.000
#> GSM634722 4 0.3988 0.80119 0.000 0.008 0.024 0.776 0.192
#> GSM634723 1 0.6271 -0.19733 0.488 0.412 0.012 0.080 0.008
#> GSM634724 3 0.6271 0.00868 0.400 0.004 0.500 0.076 0.020
#> GSM634725 1 0.5139 0.72059 0.752 0.044 0.140 0.056 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.0458 0.7822 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM634648 1 0.3248 0.7220 0.804 0.000 0.000 0.000 0.164 0.032
#> GSM634649 1 0.0458 0.7822 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM634650 5 0.7055 0.4247 0.132 0.236 0.000 0.168 0.464 0.000
#> GSM634653 1 0.3585 0.7181 0.792 0.000 0.004 0.000 0.156 0.048
#> GSM634659 5 0.2948 0.5982 0.188 0.008 0.000 0.000 0.804 0.000
#> GSM634666 4 0.2384 0.8332 0.032 0.044 0.004 0.904 0.016 0.000
#> GSM634667 2 0.4813 0.2385 0.000 0.608 0.000 0.076 0.000 0.316
#> GSM634669 1 0.3620 0.2257 0.648 0.000 0.000 0.000 0.352 0.000
#> GSM634670 3 0.1387 0.7685 0.000 0.000 0.932 0.000 0.068 0.000
#> GSM634679 3 0.3074 0.7260 0.000 0.000 0.792 0.004 0.200 0.004
#> GSM634680 3 0.3248 0.7480 0.116 0.004 0.828 0.000 0.052 0.000
#> GSM634681 1 0.1663 0.7675 0.912 0.000 0.000 0.000 0.088 0.000
#> GSM634688 4 0.0790 0.8570 0.000 0.032 0.000 0.968 0.000 0.000
#> GSM634690 2 0.2122 0.5697 0.000 0.900 0.000 0.024 0.000 0.076
#> GSM634694 1 0.3634 0.2055 0.644 0.000 0.000 0.000 0.356 0.000
#> GSM634698 1 0.0363 0.7843 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM634704 5 0.6112 0.2284 0.052 0.384 0.000 0.092 0.472 0.000
#> GSM634705 1 0.1151 0.7798 0.956 0.000 0.000 0.000 0.032 0.012
#> GSM634706 2 0.6124 -0.2726 0.316 0.356 0.000 0.000 0.328 0.000
#> GSM634707 5 0.3050 0.5737 0.236 0.000 0.000 0.000 0.764 0.000
#> GSM634711 1 0.3899 0.2670 0.592 0.000 0.004 0.000 0.404 0.000
#> GSM634715 5 0.4892 0.4193 0.048 0.348 0.000 0.012 0.592 0.000
#> GSM634633 5 0.3964 0.4969 0.232 0.044 0.000 0.000 0.724 0.000
#> GSM634634 4 0.2714 0.8295 0.000 0.000 0.020 0.880 0.064 0.036
#> GSM634635 1 0.0363 0.7831 0.988 0.000 0.000 0.000 0.012 0.000
#> GSM634636 1 0.0146 0.7849 0.996 0.004 0.000 0.000 0.000 0.000
#> GSM634637 1 0.3823 0.1784 0.564 0.000 0.000 0.000 0.436 0.000
#> GSM634638 6 0.2547 0.7401 0.000 0.020 0.004 0.064 0.020 0.892
#> GSM634639 1 0.1141 0.7707 0.948 0.000 0.000 0.000 0.052 0.000
#> GSM634640 2 0.4783 0.2487 0.000 0.616 0.000 0.076 0.000 0.308
#> GSM634641 1 0.2730 0.6636 0.836 0.012 0.000 0.000 0.152 0.000
#> GSM634642 4 0.2933 0.7118 0.000 0.200 0.004 0.796 0.000 0.000
#> GSM634644 2 0.3721 0.3108 0.000 0.684 0.004 0.308 0.000 0.004
#> GSM634645 1 0.0520 0.7848 0.984 0.000 0.000 0.000 0.008 0.008
#> GSM634646 1 0.3319 0.7200 0.800 0.000 0.000 0.000 0.164 0.036
#> GSM634647 3 0.0777 0.7321 0.000 0.000 0.972 0.004 0.000 0.024
#> GSM634651 2 0.0291 0.6186 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM634652 4 0.2357 0.7966 0.000 0.012 0.000 0.872 0.000 0.116
#> GSM634654 1 0.6240 0.1354 0.484 0.000 0.340 0.000 0.136 0.040
#> GSM634655 5 0.3445 0.4102 0.244 0.000 0.012 0.000 0.744 0.000
#> GSM634656 3 0.0603 0.7338 0.000 0.000 0.980 0.004 0.000 0.016
#> GSM634657 5 0.6067 0.3018 0.040 0.364 0.000 0.108 0.488 0.000
#> GSM634658 1 0.0547 0.7814 0.980 0.000 0.000 0.000 0.020 0.000
#> GSM634660 5 0.2562 0.5928 0.172 0.000 0.000 0.000 0.828 0.000
#> GSM634661 2 0.0146 0.6188 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM634662 5 0.4765 0.5743 0.132 0.196 0.000 0.000 0.672 0.000
#> GSM634663 2 0.3714 0.1707 0.004 0.656 0.000 0.000 0.340 0.000
#> GSM634664 4 0.0632 0.8592 0.000 0.024 0.000 0.976 0.000 0.000
#> GSM634665 1 0.3453 0.7158 0.792 0.000 0.000 0.000 0.164 0.044
#> GSM634668 5 0.4121 0.5825 0.116 0.136 0.000 0.000 0.748 0.000
#> GSM634671 1 0.3432 0.7254 0.800 0.000 0.000 0.000 0.148 0.052
#> GSM634672 3 0.4546 0.6719 0.104 0.000 0.692 0.000 0.204 0.000
#> GSM634673 3 0.2457 0.7842 0.036 0.000 0.880 0.000 0.084 0.000
#> GSM634674 5 0.3789 0.4935 0.024 0.260 0.000 0.000 0.716 0.000
#> GSM634675 2 0.1500 0.6108 0.052 0.936 0.000 0.000 0.012 0.000
#> GSM634676 1 0.3217 0.4944 0.768 0.000 0.000 0.008 0.224 0.000
#> GSM634677 2 0.1141 0.6118 0.052 0.948 0.000 0.000 0.000 0.000
#> GSM634678 2 0.5343 -0.1708 0.108 0.484 0.000 0.000 0.408 0.000
#> GSM634682 6 0.2547 0.7401 0.000 0.020 0.004 0.064 0.020 0.892
#> GSM634683 2 0.0405 0.6200 0.004 0.988 0.000 0.008 0.000 0.000
#> GSM634684 1 0.1327 0.7641 0.936 0.000 0.000 0.000 0.064 0.000
#> GSM634685 6 0.5917 0.5773 0.000 0.000 0.080 0.248 0.080 0.592
#> GSM634686 1 0.0713 0.7796 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM634687 2 0.4813 0.2385 0.000 0.608 0.000 0.076 0.000 0.316
#> GSM634689 4 0.3635 0.7016 0.000 0.028 0.004 0.788 0.172 0.008
#> GSM634691 2 0.1141 0.6118 0.052 0.948 0.000 0.000 0.000 0.000
#> GSM634692 1 0.0260 0.7836 0.992 0.000 0.000 0.000 0.008 0.000
#> GSM634693 1 0.3453 0.7158 0.792 0.000 0.000 0.000 0.164 0.044
#> GSM634695 6 0.6903 0.5335 0.000 0.132 0.004 0.128 0.232 0.504
#> GSM634696 1 0.4272 0.6938 0.756 0.040 0.000 0.000 0.164 0.040
#> GSM634697 3 0.2056 0.7782 0.012 0.000 0.904 0.004 0.080 0.000
#> GSM634699 4 0.1769 0.8284 0.004 0.000 0.012 0.924 0.000 0.060
#> GSM634700 2 0.0260 0.6188 0.000 0.992 0.000 0.000 0.008 0.000
#> GSM634701 1 0.0914 0.7808 0.968 0.016 0.000 0.000 0.016 0.000
#> GSM634702 5 0.3133 0.5833 0.212 0.008 0.000 0.000 0.780 0.000
#> GSM634703 2 0.6116 -0.2829 0.300 0.360 0.000 0.000 0.340 0.000
#> GSM634708 2 0.0508 0.6173 0.000 0.984 0.000 0.012 0.000 0.004
#> GSM634709 1 0.0000 0.7844 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634710 3 0.4914 0.7121 0.120 0.040 0.744 0.004 0.080 0.012
#> GSM634712 3 0.2979 0.7338 0.000 0.000 0.804 0.004 0.188 0.004
#> GSM634713 4 0.1674 0.8366 0.000 0.004 0.004 0.924 0.000 0.068
#> GSM634714 1 0.3865 0.7167 0.768 0.000 0.028 0.000 0.184 0.020
#> GSM634716 1 0.3851 0.1102 0.540 0.000 0.000 0.000 0.460 0.000
#> GSM634717 1 0.0000 0.7844 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634718 2 0.6125 -0.2888 0.312 0.348 0.000 0.000 0.340 0.000
#> GSM634719 1 0.1444 0.7587 0.928 0.000 0.000 0.000 0.072 0.000
#> GSM634720 3 0.6563 0.0724 0.404 0.040 0.416 0.000 0.128 0.012
#> GSM634721 1 0.4713 0.6806 0.736 0.044 0.012 0.000 0.168 0.040
#> GSM634722 4 0.0964 0.8553 0.000 0.012 0.004 0.968 0.000 0.016
#> GSM634723 5 0.8489 0.3447 0.264 0.200 0.012 0.124 0.340 0.060
#> GSM634724 5 0.5948 -0.0472 0.260 0.000 0.284 0.000 0.456 0.000
#> GSM634725 1 0.3784 0.4415 0.680 0.012 0.000 0.000 0.308 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 individual(p) k
#> MAD:mclust 89 0.886 2
#> MAD:mclust 73 0.741 3
#> MAD:mclust 70 0.846 4
#> MAD:mclust 73 0.969 5
#> MAD:mclust 66 0.738 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 17698 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.975 0.939 0.974 0.4950 0.502 0.502
#> 3 3 0.719 0.835 0.921 0.3475 0.704 0.475
#> 4 4 0.536 0.632 0.800 0.1101 0.889 0.684
#> 5 5 0.529 0.445 0.649 0.0613 0.893 0.639
#> 6 6 0.611 0.532 0.721 0.0427 0.881 0.544
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
#> GSM634643 1 0.0000 0.985 1.000 0.000
#> GSM634648 1 0.0000 0.985 1.000 0.000
#> GSM634649 1 0.0000 0.985 1.000 0.000
#> GSM634650 2 0.0000 0.957 0.000 1.000
#> GSM634653 1 0.0000 0.985 1.000 0.000
#> GSM634659 2 0.9044 0.550 0.320 0.680
#> GSM634666 1 0.5629 0.842 0.868 0.132
#> GSM634667 2 0.0000 0.957 0.000 1.000
#> GSM634669 1 0.2423 0.949 0.960 0.040
#> GSM634670 1 0.0000 0.985 1.000 0.000
#> GSM634679 1 0.0000 0.985 1.000 0.000
#> GSM634680 1 0.0000 0.985 1.000 0.000
#> GSM634681 1 0.0000 0.985 1.000 0.000
#> GSM634688 2 0.0000 0.957 0.000 1.000
#> GSM634690 2 0.0000 0.957 0.000 1.000
#> GSM634694 1 0.9248 0.460 0.660 0.340
#> GSM634698 1 0.0000 0.985 1.000 0.000
#> GSM634704 2 0.0938 0.949 0.012 0.988
#> GSM634705 1 0.0000 0.985 1.000 0.000
#> GSM634706 2 0.0000 0.957 0.000 1.000
#> GSM634707 1 0.1184 0.971 0.984 0.016
#> GSM634711 1 0.0000 0.985 1.000 0.000
#> GSM634715 2 0.0000 0.957 0.000 1.000
#> GSM634633 1 0.0376 0.982 0.996 0.004
#> GSM634634 2 0.9635 0.399 0.388 0.612
#> GSM634635 1 0.0000 0.985 1.000 0.000
#> GSM634636 1 0.0000 0.985 1.000 0.000
#> GSM634637 1 0.0000 0.985 1.000 0.000
#> GSM634638 2 0.0000 0.957 0.000 1.000
#> GSM634639 1 0.0000 0.985 1.000 0.000
#> GSM634640 2 0.0000 0.957 0.000 1.000
#> GSM634641 1 0.0000 0.985 1.000 0.000
#> GSM634642 2 0.0000 0.957 0.000 1.000
#> GSM634644 2 0.0000 0.957 0.000 1.000
#> GSM634645 1 0.0000 0.985 1.000 0.000
#> GSM634646 1 0.0000 0.985 1.000 0.000
#> GSM634647 1 0.0000 0.985 1.000 0.000
#> GSM634651 2 0.0000 0.957 0.000 1.000
#> GSM634652 2 0.0000 0.957 0.000 1.000
#> GSM634654 1 0.0000 0.985 1.000 0.000
#> GSM634655 1 0.0000 0.985 1.000 0.000
#> GSM634656 1 0.0000 0.985 1.000 0.000
#> GSM634657 2 0.0000 0.957 0.000 1.000
#> GSM634658 1 0.0000 0.985 1.000 0.000
#> GSM634660 1 0.4298 0.898 0.912 0.088
#> GSM634661 2 0.0000 0.957 0.000 1.000
#> GSM634662 2 0.0000 0.957 0.000 1.000
#> GSM634663 2 0.0000 0.957 0.000 1.000
#> GSM634664 2 0.1633 0.939 0.024 0.976
#> GSM634665 1 0.0000 0.985 1.000 0.000
#> GSM634668 2 0.0000 0.957 0.000 1.000
#> GSM634671 1 0.0000 0.985 1.000 0.000
#> GSM634672 1 0.0000 0.985 1.000 0.000
#> GSM634673 1 0.0000 0.985 1.000 0.000
#> GSM634674 2 0.0000 0.957 0.000 1.000
#> GSM634675 2 0.0000 0.957 0.000 1.000
#> GSM634676 1 0.4562 0.889 0.904 0.096
#> GSM634677 2 0.0000 0.957 0.000 1.000
#> GSM634678 2 0.0000 0.957 0.000 1.000
#> GSM634682 2 0.0000 0.957 0.000 1.000
#> GSM634683 2 0.0000 0.957 0.000 1.000
#> GSM634684 1 0.0000 0.985 1.000 0.000
#> GSM634685 2 0.9460 0.457 0.364 0.636
#> GSM634686 1 0.0000 0.985 1.000 0.000
#> GSM634687 2 0.0000 0.957 0.000 1.000
#> GSM634689 2 0.2236 0.929 0.036 0.964
#> GSM634691 2 0.0000 0.957 0.000 1.000
#> GSM634692 1 0.0000 0.985 1.000 0.000
#> GSM634693 1 0.0000 0.985 1.000 0.000
#> GSM634695 2 0.0000 0.957 0.000 1.000
#> GSM634696 1 0.0000 0.985 1.000 0.000
#> GSM634697 1 0.0000 0.985 1.000 0.000
#> GSM634699 2 0.4431 0.878 0.092 0.908
#> GSM634700 2 0.0000 0.957 0.000 1.000
#> GSM634701 1 0.0000 0.985 1.000 0.000
#> GSM634702 2 0.9833 0.301 0.424 0.576
#> GSM634703 2 0.0000 0.957 0.000 1.000
#> GSM634708 2 0.0000 0.957 0.000 1.000
#> GSM634709 1 0.0000 0.985 1.000 0.000
#> GSM634710 1 0.0000 0.985 1.000 0.000
#> GSM634712 1 0.0000 0.985 1.000 0.000
#> GSM634713 2 0.0000 0.957 0.000 1.000
#> GSM634714 1 0.0000 0.985 1.000 0.000
#> GSM634716 1 0.0000 0.985 1.000 0.000
#> GSM634717 1 0.0000 0.985 1.000 0.000
#> GSM634718 2 0.0000 0.957 0.000 1.000
#> GSM634719 1 0.0000 0.985 1.000 0.000
#> GSM634720 1 0.0000 0.985 1.000 0.000
#> GSM634721 1 0.0000 0.985 1.000 0.000
#> GSM634722 2 0.0000 0.957 0.000 1.000
#> GSM634723 2 0.0000 0.957 0.000 1.000
#> GSM634724 1 0.0000 0.985 1.000 0.000
#> GSM634725 1 0.0000 0.985 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634648 1 0.5621 0.482 0.692 0.000 0.308
#> GSM634649 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634650 2 0.5497 0.578 0.292 0.708 0.000
#> GSM634653 3 0.3551 0.853 0.132 0.000 0.868
#> GSM634659 1 0.4504 0.740 0.804 0.196 0.000
#> GSM634666 3 0.0892 0.893 0.000 0.020 0.980
#> GSM634667 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.909 1.000 0.000 0.000
#> GSM634670 3 0.0000 0.898 0.000 0.000 1.000
#> GSM634679 3 0.2878 0.874 0.096 0.000 0.904
#> GSM634680 3 0.3340 0.860 0.120 0.000 0.880
#> GSM634681 1 0.0747 0.905 0.984 0.000 0.016
#> GSM634688 2 0.4291 0.760 0.000 0.820 0.180
#> GSM634690 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634694 1 0.0000 0.909 1.000 0.000 0.000
#> GSM634698 1 0.0000 0.909 1.000 0.000 0.000
#> GSM634704 2 0.3038 0.862 0.104 0.896 0.000
#> GSM634705 1 0.0747 0.905 0.984 0.000 0.016
#> GSM634706 1 0.0747 0.904 0.984 0.016 0.000
#> GSM634707 1 0.1015 0.904 0.980 0.008 0.012
#> GSM634711 1 0.5706 0.557 0.680 0.000 0.320
#> GSM634715 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634633 1 0.6244 0.115 0.560 0.000 0.440
#> GSM634634 3 0.1753 0.879 0.000 0.048 0.952
#> GSM634635 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634636 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634637 1 0.0747 0.906 0.984 0.000 0.016
#> GSM634638 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634639 1 0.0592 0.907 0.988 0.000 0.012
#> GSM634640 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.909 1.000 0.000 0.000
#> GSM634642 2 0.1129 0.917 0.004 0.976 0.020
#> GSM634644 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634645 1 0.0424 0.908 0.992 0.000 0.008
#> GSM634646 3 0.5859 0.564 0.344 0.000 0.656
#> GSM634647 3 0.0000 0.898 0.000 0.000 1.000
#> GSM634651 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634652 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634654 3 0.3192 0.867 0.112 0.000 0.888
#> GSM634655 3 0.0237 0.897 0.000 0.004 0.996
#> GSM634656 3 0.0000 0.898 0.000 0.000 1.000
#> GSM634657 2 0.2165 0.896 0.064 0.936 0.000
#> GSM634658 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634660 1 0.2063 0.886 0.948 0.044 0.008
#> GSM634661 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634662 2 0.6204 0.249 0.424 0.576 0.000
#> GSM634663 2 0.2448 0.889 0.076 0.924 0.000
#> GSM634664 3 0.5760 0.499 0.000 0.328 0.672
#> GSM634665 3 0.0747 0.899 0.016 0.000 0.984
#> GSM634668 2 0.1289 0.916 0.032 0.968 0.000
#> GSM634671 3 0.5178 0.611 0.256 0.000 0.744
#> GSM634672 3 0.4121 0.822 0.168 0.000 0.832
#> GSM634673 3 0.0747 0.899 0.016 0.000 0.984
#> GSM634674 2 0.1031 0.919 0.024 0.976 0.000
#> GSM634675 2 0.2537 0.890 0.080 0.920 0.000
#> GSM634676 1 0.1267 0.900 0.972 0.024 0.004
#> GSM634677 2 0.1964 0.905 0.056 0.944 0.000
#> GSM634678 2 0.4346 0.765 0.184 0.816 0.000
#> GSM634682 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634683 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634684 1 0.4062 0.796 0.836 0.000 0.164
#> GSM634685 3 0.2165 0.868 0.000 0.064 0.936
#> GSM634686 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634687 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634689 2 0.6104 0.429 0.004 0.648 0.348
#> GSM634691 2 0.0747 0.922 0.016 0.984 0.000
#> GSM634692 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634693 3 0.0424 0.899 0.008 0.000 0.992
#> GSM634695 2 0.0000 0.925 0.000 1.000 0.000
#> GSM634696 3 0.0000 0.898 0.000 0.000 1.000
#> GSM634697 3 0.1643 0.894 0.044 0.000 0.956
#> GSM634699 3 0.5722 0.567 0.004 0.292 0.704
#> GSM634700 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634701 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634702 1 0.6192 0.270 0.580 0.420 0.000
#> GSM634703 1 0.4504 0.736 0.804 0.196 0.000
#> GSM634708 2 0.0237 0.925 0.004 0.996 0.000
#> GSM634709 1 0.0237 0.909 0.996 0.000 0.004
#> GSM634710 3 0.0592 0.899 0.012 0.000 0.988
#> GSM634712 3 0.0237 0.899 0.004 0.000 0.996
#> GSM634713 2 0.0747 0.918 0.000 0.984 0.016
#> GSM634714 3 0.4121 0.824 0.168 0.000 0.832
#> GSM634716 1 0.4702 0.721 0.788 0.000 0.212
#> GSM634717 1 0.0000 0.909 1.000 0.000 0.000
#> GSM634718 1 0.2625 0.854 0.916 0.084 0.000
#> GSM634719 1 0.0424 0.909 0.992 0.000 0.008
#> GSM634720 3 0.2448 0.883 0.076 0.000 0.924
#> GSM634721 3 0.0000 0.898 0.000 0.000 1.000
#> GSM634722 2 0.3192 0.842 0.000 0.888 0.112
#> GSM634723 1 0.4235 0.759 0.824 0.176 0.000
#> GSM634724 3 0.3879 0.836 0.152 0.000 0.848
#> GSM634725 1 0.1315 0.902 0.972 0.008 0.020
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.1302 0.8089 0.956 0.000 0.044 0.000
#> GSM634648 4 0.7062 0.1797 0.452 0.016 0.076 0.456
#> GSM634649 1 0.1743 0.8101 0.940 0.000 0.004 0.056
#> GSM634650 2 0.8179 0.5217 0.224 0.564 0.104 0.108
#> GSM634653 4 0.4839 0.5521 0.184 0.000 0.052 0.764
#> GSM634659 1 0.7388 0.2734 0.500 0.188 0.312 0.000
#> GSM634666 4 0.3962 0.5900 0.000 0.028 0.152 0.820
#> GSM634667 2 0.0000 0.8504 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0469 0.8146 0.988 0.000 0.012 0.000
#> GSM634670 3 0.4193 0.5335 0.000 0.000 0.732 0.268
#> GSM634679 3 0.4697 0.4080 0.000 0.000 0.644 0.356
#> GSM634680 3 0.3873 0.5595 0.000 0.000 0.772 0.228
#> GSM634681 1 0.3392 0.7684 0.856 0.000 0.020 0.124
#> GSM634688 4 0.5686 0.3013 0.000 0.376 0.032 0.592
#> GSM634690 2 0.0336 0.8491 0.000 0.992 0.008 0.000
#> GSM634694 1 0.0000 0.8153 1.000 0.000 0.000 0.000
#> GSM634698 1 0.2466 0.7951 0.900 0.000 0.004 0.096
#> GSM634704 2 0.6567 0.6560 0.204 0.660 0.124 0.012
#> GSM634705 1 0.3335 0.7830 0.860 0.000 0.020 0.120
#> GSM634706 1 0.3874 0.7695 0.856 0.072 0.008 0.064
#> GSM634707 1 0.4837 0.5183 0.648 0.004 0.348 0.000
#> GSM634711 3 0.4452 0.4687 0.260 0.000 0.732 0.008
#> GSM634715 2 0.2345 0.8384 0.000 0.900 0.100 0.000
#> GSM634633 3 0.5317 0.5414 0.176 0.016 0.756 0.052
#> GSM634634 4 0.3674 0.5911 0.000 0.044 0.104 0.852
#> GSM634635 1 0.1716 0.8073 0.936 0.000 0.000 0.064
#> GSM634636 1 0.4057 0.7455 0.812 0.000 0.160 0.028
#> GSM634637 3 0.5508 0.0895 0.408 0.000 0.572 0.020
#> GSM634638 2 0.3760 0.8130 0.000 0.836 0.136 0.028
#> GSM634639 1 0.2831 0.7729 0.876 0.000 0.120 0.004
#> GSM634640 2 0.0592 0.8511 0.000 0.984 0.016 0.000
#> GSM634641 1 0.4482 0.6416 0.728 0.000 0.264 0.008
#> GSM634642 2 0.2748 0.8221 0.004 0.904 0.020 0.072
#> GSM634644 2 0.3328 0.8144 0.004 0.872 0.024 0.100
#> GSM634645 1 0.4050 0.7503 0.820 0.000 0.144 0.036
#> GSM634646 4 0.6464 0.3203 0.384 0.000 0.076 0.540
#> GSM634647 4 0.3074 0.5788 0.000 0.000 0.152 0.848
#> GSM634651 2 0.0000 0.8504 0.000 1.000 0.000 0.000
#> GSM634652 2 0.2255 0.8319 0.000 0.920 0.012 0.068
#> GSM634654 4 0.5033 0.5586 0.168 0.000 0.072 0.760
#> GSM634655 3 0.2796 0.5563 0.004 0.008 0.892 0.096
#> GSM634656 4 0.3873 0.4986 0.000 0.000 0.228 0.772
#> GSM634657 2 0.5515 0.7231 0.116 0.732 0.152 0.000
#> GSM634658 1 0.1356 0.8146 0.960 0.000 0.008 0.032
#> GSM634660 1 0.5901 0.3025 0.532 0.036 0.432 0.000
#> GSM634661 2 0.0707 0.8512 0.000 0.980 0.020 0.000
#> GSM634662 2 0.6690 0.3221 0.352 0.548 0.100 0.000
#> GSM634663 2 0.1913 0.8451 0.040 0.940 0.020 0.000
#> GSM634664 4 0.4248 0.5156 0.000 0.220 0.012 0.768
#> GSM634665 4 0.3392 0.6127 0.124 0.000 0.020 0.856
#> GSM634668 2 0.4395 0.7717 0.044 0.816 0.132 0.008
#> GSM634671 4 0.3810 0.5402 0.188 0.000 0.008 0.804
#> GSM634672 3 0.4713 0.4256 0.000 0.000 0.640 0.360
#> GSM634673 3 0.4103 0.5512 0.000 0.000 0.744 0.256
#> GSM634674 2 0.3718 0.7989 0.012 0.820 0.168 0.000
#> GSM634675 2 0.3591 0.7500 0.168 0.824 0.008 0.000
#> GSM634676 1 0.3123 0.7585 0.844 0.000 0.000 0.156
#> GSM634677 2 0.3450 0.7697 0.156 0.836 0.008 0.000
#> GSM634678 2 0.1452 0.8494 0.008 0.956 0.036 0.000
#> GSM634682 2 0.3351 0.8123 0.000 0.844 0.148 0.008
#> GSM634683 2 0.0188 0.8511 0.004 0.996 0.000 0.000
#> GSM634684 1 0.4567 0.6420 0.740 0.000 0.016 0.244
#> GSM634685 3 0.6758 0.0725 0.000 0.096 0.504 0.400
#> GSM634686 1 0.0592 0.8157 0.984 0.000 0.000 0.016
#> GSM634687 2 0.0817 0.8510 0.000 0.976 0.024 0.000
#> GSM634689 2 0.6136 0.4227 0.000 0.632 0.080 0.288
#> GSM634691 2 0.1151 0.8497 0.024 0.968 0.008 0.000
#> GSM634692 1 0.2469 0.7959 0.892 0.000 0.000 0.108
#> GSM634693 4 0.2675 0.6333 0.048 0.000 0.044 0.908
#> GSM634695 2 0.4375 0.7808 0.000 0.788 0.180 0.032
#> GSM634696 4 0.3945 0.6187 0.024 0.004 0.144 0.828
#> GSM634697 4 0.4972 -0.0255 0.000 0.000 0.456 0.544
#> GSM634699 4 0.3739 0.6061 0.024 0.076 0.032 0.868
#> GSM634700 2 0.0921 0.8501 0.000 0.972 0.028 0.000
#> GSM634701 1 0.3764 0.6909 0.784 0.000 0.216 0.000
#> GSM634702 3 0.8327 0.2505 0.284 0.192 0.484 0.040
#> GSM634703 1 0.4728 0.6227 0.752 0.216 0.032 0.000
#> GSM634708 2 0.0188 0.8507 0.000 0.996 0.004 0.000
#> GSM634709 1 0.1256 0.8168 0.964 0.000 0.008 0.028
#> GSM634710 4 0.4877 0.1558 0.000 0.000 0.408 0.592
#> GSM634712 3 0.4643 0.4454 0.000 0.000 0.656 0.344
#> GSM634713 2 0.3351 0.7792 0.000 0.844 0.008 0.148
#> GSM634714 3 0.7808 0.1192 0.272 0.000 0.416 0.312
#> GSM634716 3 0.4088 0.5073 0.232 0.000 0.764 0.004
#> GSM634717 1 0.2011 0.8008 0.920 0.000 0.000 0.080
#> GSM634718 1 0.0336 0.8159 0.992 0.000 0.000 0.008
#> GSM634719 1 0.0707 0.8143 0.980 0.000 0.020 0.000
#> GSM634720 3 0.4452 0.5275 0.008 0.000 0.732 0.260
#> GSM634721 4 0.3444 0.5797 0.000 0.000 0.184 0.816
#> GSM634722 2 0.5754 0.5314 0.000 0.636 0.048 0.316
#> GSM634723 1 0.4241 0.7430 0.808 0.016 0.012 0.164
#> GSM634724 3 0.2921 0.5853 0.000 0.000 0.860 0.140
#> GSM634725 1 0.6667 0.4280 0.576 0.040 0.352 0.032
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.3884 0.52307 0.708 0.000 0.004 0.000 0.288
#> GSM634648 1 0.6406 0.28384 0.640 0.040 0.008 0.140 0.172
#> GSM634649 1 0.0963 0.65196 0.964 0.000 0.000 0.000 0.036
#> GSM634650 5 0.9249 0.19294 0.128 0.224 0.072 0.220 0.356
#> GSM634653 1 0.5573 -0.24103 0.488 0.000 0.028 0.460 0.024
#> GSM634659 5 0.6397 0.35103 0.044 0.156 0.096 0.032 0.672
#> GSM634666 4 0.7675 0.26330 0.000 0.124 0.140 0.480 0.256
#> GSM634667 2 0.0579 0.77607 0.000 0.984 0.000 0.008 0.008
#> GSM634669 1 0.4235 0.45789 0.656 0.008 0.000 0.000 0.336
#> GSM634670 3 0.4779 0.52480 0.000 0.000 0.716 0.084 0.200
#> GSM634679 3 0.6040 0.45363 0.000 0.000 0.556 0.152 0.292
#> GSM634680 3 0.2972 0.51325 0.004 0.000 0.864 0.108 0.024
#> GSM634681 1 0.2438 0.62961 0.908 0.000 0.008 0.040 0.044
#> GSM634688 2 0.5953 0.03262 0.000 0.476 0.004 0.428 0.092
#> GSM634690 2 0.0880 0.77126 0.000 0.968 0.000 0.000 0.032
#> GSM634694 1 0.2516 0.63172 0.860 0.000 0.000 0.000 0.140
#> GSM634698 1 0.1892 0.62491 0.916 0.000 0.000 0.080 0.004
#> GSM634704 2 0.8289 0.47417 0.128 0.524 0.152 0.068 0.128
#> GSM634705 1 0.3273 0.62336 0.848 0.000 0.004 0.036 0.112
#> GSM634706 1 0.3209 0.60269 0.860 0.100 0.000 0.020 0.020
#> GSM634707 5 0.6356 0.29446 0.284 0.044 0.088 0.000 0.584
#> GSM634711 5 0.6131 0.28532 0.092 0.000 0.244 0.040 0.624
#> GSM634715 2 0.5112 0.69944 0.004 0.740 0.080 0.024 0.152
#> GSM634633 3 0.4077 0.45618 0.060 0.012 0.804 0.000 0.124
#> GSM634634 4 0.5782 0.39955 0.000 0.144 0.144 0.680 0.032
#> GSM634635 1 0.0693 0.65021 0.980 0.000 0.000 0.008 0.012
#> GSM634636 1 0.7705 -0.20890 0.408 0.000 0.136 0.104 0.352
#> GSM634637 5 0.5682 0.16555 0.052 0.000 0.288 0.032 0.628
#> GSM634638 2 0.5988 0.64190 0.000 0.672 0.176 0.084 0.068
#> GSM634639 1 0.3906 0.56321 0.744 0.000 0.016 0.000 0.240
#> GSM634640 2 0.1597 0.77641 0.000 0.940 0.000 0.012 0.048
#> GSM634641 5 0.7243 0.18622 0.360 0.004 0.116 0.060 0.460
#> GSM634642 2 0.2209 0.75926 0.000 0.912 0.000 0.032 0.056
#> GSM634644 2 0.4181 0.74314 0.000 0.816 0.056 0.084 0.044
#> GSM634645 1 0.5927 0.39390 0.640 0.000 0.148 0.016 0.196
#> GSM634646 1 0.6734 0.20699 0.608 0.000 0.080 0.148 0.164
#> GSM634647 4 0.4693 0.38174 0.000 0.000 0.244 0.700 0.056
#> GSM634651 2 0.0404 0.77365 0.000 0.988 0.000 0.000 0.012
#> GSM634652 2 0.2654 0.75916 0.000 0.884 0.000 0.084 0.032
#> GSM634654 4 0.6745 0.39000 0.352 0.000 0.124 0.492 0.032
#> GSM634655 3 0.4870 0.40852 0.000 0.012 0.728 0.068 0.192
#> GSM634656 4 0.5719 0.17058 0.000 0.000 0.352 0.552 0.096
#> GSM634657 2 0.7947 0.12681 0.076 0.400 0.148 0.016 0.360
#> GSM634658 1 0.5595 0.37215 0.568 0.004 0.000 0.072 0.356
#> GSM634660 5 0.7410 0.32263 0.232 0.084 0.172 0.000 0.512
#> GSM634661 2 0.1967 0.77581 0.000 0.932 0.020 0.012 0.036
#> GSM634662 2 0.5977 0.26250 0.080 0.556 0.016 0.000 0.348
#> GSM634663 2 0.2179 0.75057 0.000 0.888 0.000 0.000 0.112
#> GSM634664 4 0.4874 0.40380 0.012 0.292 0.008 0.672 0.016
#> GSM634665 4 0.4705 0.34374 0.404 0.000 0.012 0.580 0.004
#> GSM634668 2 0.5883 0.39754 0.000 0.596 0.012 0.096 0.296
#> GSM634671 4 0.4269 0.48204 0.300 0.000 0.016 0.684 0.000
#> GSM634672 3 0.6291 0.43882 0.004 0.000 0.544 0.172 0.280
#> GSM634673 3 0.3110 0.54851 0.000 0.000 0.860 0.060 0.080
#> GSM634674 2 0.4104 0.66672 0.000 0.748 0.032 0.000 0.220
#> GSM634675 2 0.2561 0.73700 0.096 0.884 0.000 0.000 0.020
#> GSM634676 1 0.6811 0.33479 0.504 0.016 0.000 0.232 0.248
#> GSM634677 2 0.3013 0.68656 0.160 0.832 0.000 0.000 0.008
#> GSM634678 2 0.2338 0.75059 0.004 0.884 0.000 0.000 0.112
#> GSM634682 2 0.5875 0.63613 0.000 0.664 0.212 0.060 0.064
#> GSM634683 2 0.0865 0.77848 0.004 0.972 0.000 0.000 0.024
#> GSM634684 1 0.7339 0.07718 0.392 0.000 0.036 0.208 0.364
#> GSM634685 3 0.6222 0.04628 0.000 0.020 0.516 0.376 0.088
#> GSM634686 1 0.2424 0.63712 0.868 0.000 0.000 0.000 0.132
#> GSM634687 2 0.2703 0.76915 0.000 0.896 0.024 0.020 0.060
#> GSM634689 2 0.4668 0.65842 0.000 0.764 0.016 0.084 0.136
#> GSM634691 2 0.0579 0.77468 0.008 0.984 0.000 0.000 0.008
#> GSM634692 1 0.4404 0.60201 0.760 0.000 0.000 0.152 0.088
#> GSM634693 4 0.5756 0.51952 0.276 0.000 0.072 0.628 0.024
#> GSM634695 2 0.7661 0.25165 0.000 0.400 0.368 0.128 0.104
#> GSM634696 4 0.6427 0.36005 0.024 0.020 0.140 0.640 0.176
#> GSM634697 3 0.6731 0.31884 0.000 0.000 0.416 0.304 0.280
#> GSM634699 4 0.5691 0.52945 0.204 0.036 0.028 0.696 0.036
#> GSM634700 2 0.1043 0.77112 0.000 0.960 0.000 0.000 0.040
#> GSM634701 5 0.5256 0.00916 0.420 0.000 0.048 0.000 0.532
#> GSM634702 5 0.7102 0.17032 0.000 0.220 0.188 0.056 0.536
#> GSM634703 5 0.6810 0.14357 0.348 0.300 0.000 0.000 0.352
#> GSM634708 2 0.0451 0.77586 0.000 0.988 0.000 0.004 0.008
#> GSM634709 1 0.3424 0.56979 0.760 0.000 0.000 0.000 0.240
#> GSM634710 5 0.6789 -0.36292 0.000 0.000 0.348 0.284 0.368
#> GSM634712 3 0.5689 0.48700 0.000 0.000 0.616 0.136 0.248
#> GSM634713 2 0.3129 0.75510 0.000 0.872 0.032 0.076 0.020
#> GSM634714 3 0.5971 0.14025 0.300 0.000 0.580 0.112 0.008
#> GSM634716 3 0.6173 -0.12920 0.116 0.004 0.460 0.000 0.420
#> GSM634717 1 0.1626 0.64557 0.940 0.000 0.000 0.044 0.016
#> GSM634718 1 0.2536 0.63706 0.868 0.004 0.000 0.000 0.128
#> GSM634719 1 0.4318 0.44761 0.644 0.000 0.004 0.004 0.348
#> GSM634720 3 0.4047 0.43365 0.004 0.004 0.788 0.168 0.036
#> GSM634721 4 0.6407 0.17741 0.004 0.004 0.152 0.528 0.312
#> GSM634722 2 0.6700 0.19019 0.000 0.448 0.096 0.416 0.040
#> GSM634723 1 0.3488 0.53362 0.808 0.000 0.000 0.168 0.024
#> GSM634724 3 0.5432 0.32371 0.000 0.000 0.544 0.064 0.392
#> GSM634725 5 0.7839 0.23799 0.100 0.040 0.188 0.124 0.548
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.4129 0.3631 0.564 0.000 0.000 0.000 0.424 0.012
#> GSM634648 1 0.2421 0.7607 0.896 0.052 0.004 0.000 0.004 0.044
#> GSM634649 1 0.2006 0.7868 0.892 0.000 0.000 0.004 0.104 0.000
#> GSM634650 5 0.6327 0.3698 0.004 0.080 0.044 0.308 0.544 0.020
#> GSM634653 1 0.2677 0.7491 0.892 0.000 0.028 0.032 0.040 0.008
#> GSM634659 5 0.4968 -0.1832 0.000 0.056 0.004 0.000 0.508 0.432
#> GSM634666 6 0.5934 0.1385 0.004 0.152 0.000 0.248 0.024 0.572
#> GSM634667 2 0.1642 0.7905 0.000 0.936 0.032 0.028 0.004 0.000
#> GSM634669 5 0.4314 0.5024 0.236 0.032 0.008 0.004 0.716 0.004
#> GSM634670 3 0.4263 0.3736 0.000 0.000 0.504 0.000 0.016 0.480
#> GSM634679 3 0.4408 0.4581 0.000 0.012 0.512 0.008 0.000 0.468
#> GSM634680 3 0.3351 0.6050 0.028 0.000 0.800 0.004 0.000 0.168
#> GSM634681 1 0.0893 0.7846 0.972 0.004 0.004 0.000 0.004 0.016
#> GSM634688 4 0.6211 0.2641 0.000 0.276 0.000 0.460 0.012 0.252
#> GSM634690 2 0.0935 0.7790 0.000 0.964 0.000 0.000 0.004 0.032
#> GSM634694 1 0.2400 0.7846 0.872 0.008 0.004 0.000 0.116 0.000
#> GSM634698 1 0.0405 0.7881 0.988 0.000 0.000 0.000 0.008 0.004
#> GSM634704 2 0.6737 0.5804 0.088 0.564 0.224 0.008 0.100 0.016
#> GSM634705 1 0.3787 0.7141 0.780 0.000 0.000 0.000 0.100 0.120
#> GSM634706 1 0.1524 0.7805 0.932 0.060 0.000 0.000 0.008 0.000
#> GSM634707 5 0.2972 0.5408 0.004 0.024 0.016 0.000 0.860 0.096
#> GSM634711 5 0.3643 0.4573 0.000 0.000 0.024 0.008 0.768 0.200
#> GSM634715 2 0.6767 0.6005 0.000 0.560 0.156 0.088 0.176 0.020
#> GSM634633 3 0.3236 0.5963 0.036 0.020 0.840 0.000 0.000 0.104
#> GSM634634 4 0.3301 0.5897 0.000 0.056 0.056 0.848 0.000 0.040
#> GSM634635 1 0.1007 0.7936 0.956 0.000 0.000 0.000 0.044 0.000
#> GSM634636 6 0.4939 0.2606 0.056 0.004 0.000 0.000 0.408 0.532
#> GSM634637 6 0.3898 0.4609 0.000 0.000 0.012 0.000 0.336 0.652
#> GSM634638 2 0.5888 0.6522 0.000 0.620 0.236 0.060 0.068 0.016
#> GSM634639 1 0.4305 0.6749 0.712 0.000 0.044 0.000 0.232 0.012
#> GSM634640 2 0.3644 0.7746 0.000 0.832 0.076 0.048 0.036 0.008
#> GSM634641 6 0.4932 0.3077 0.028 0.012 0.008 0.000 0.392 0.560
#> GSM634642 2 0.2158 0.7718 0.004 0.912 0.000 0.016 0.012 0.056
#> GSM634644 2 0.4979 0.7115 0.004 0.700 0.172 0.108 0.008 0.008
#> GSM634645 1 0.3655 0.7358 0.796 0.000 0.012 0.000 0.044 0.148
#> GSM634646 1 0.1967 0.7713 0.904 0.000 0.012 0.000 0.000 0.084
#> GSM634647 4 0.2644 0.5876 0.000 0.000 0.052 0.880 0.008 0.060
#> GSM634651 2 0.0405 0.7854 0.000 0.988 0.000 0.000 0.004 0.008
#> GSM634652 2 0.4178 0.6319 0.000 0.708 0.000 0.248 0.008 0.036
#> GSM634654 1 0.7298 0.1964 0.520 0.000 0.148 0.196 0.064 0.072
#> GSM634655 3 0.3700 0.4160 0.000 0.020 0.784 0.004 0.176 0.016
#> GSM634656 4 0.4459 0.5103 0.000 0.000 0.156 0.712 0.000 0.132
#> GSM634657 5 0.5970 0.3993 0.000 0.152 0.180 0.020 0.620 0.028
#> GSM634658 5 0.3247 0.5887 0.116 0.016 0.000 0.012 0.840 0.016
#> GSM634660 5 0.4426 0.5328 0.004 0.088 0.132 0.000 0.756 0.020
#> GSM634661 2 0.1876 0.7904 0.000 0.916 0.072 0.004 0.004 0.004
#> GSM634662 2 0.4253 0.2180 0.000 0.524 0.000 0.000 0.460 0.016
#> GSM634663 2 0.4145 0.7030 0.000 0.740 0.052 0.004 0.200 0.004
#> GSM634664 4 0.3003 0.5959 0.000 0.032 0.004 0.868 0.028 0.068
#> GSM634665 4 0.4128 0.0552 0.492 0.000 0.000 0.500 0.004 0.004
#> GSM634668 2 0.5071 0.2795 0.000 0.564 0.000 0.004 0.076 0.356
#> GSM634671 4 0.3403 0.5815 0.080 0.000 0.004 0.836 0.012 0.068
#> GSM634672 3 0.4095 0.4411 0.000 0.000 0.512 0.008 0.000 0.480
#> GSM634673 3 0.3215 0.5945 0.004 0.000 0.756 0.000 0.000 0.240
#> GSM634674 2 0.4157 0.7406 0.000 0.760 0.100 0.000 0.132 0.008
#> GSM634675 2 0.2816 0.7609 0.060 0.876 0.000 0.000 0.036 0.028
#> GSM634676 5 0.6750 0.3623 0.108 0.016 0.004 0.272 0.528 0.072
#> GSM634677 2 0.3740 0.5899 0.252 0.728 0.008 0.000 0.000 0.012
#> GSM634678 2 0.2786 0.7520 0.012 0.864 0.000 0.000 0.024 0.100
#> GSM634682 2 0.5237 0.6672 0.000 0.648 0.260 0.052 0.028 0.012
#> GSM634683 2 0.2450 0.7912 0.000 0.896 0.068 0.016 0.012 0.008
#> GSM634684 5 0.4157 0.5309 0.020 0.000 0.020 0.128 0.788 0.044
#> GSM634685 4 0.6839 0.0784 0.000 0.032 0.396 0.420 0.100 0.052
#> GSM634686 1 0.3337 0.6734 0.736 0.000 0.000 0.004 0.260 0.000
#> GSM634687 2 0.5596 0.7173 0.000 0.688 0.120 0.072 0.104 0.016
#> GSM634689 2 0.2979 0.6986 0.000 0.804 0.000 0.004 0.004 0.188
#> GSM634691 2 0.0837 0.7831 0.004 0.972 0.000 0.000 0.004 0.020
#> GSM634692 1 0.5964 0.2600 0.468 0.000 0.000 0.208 0.320 0.004
#> GSM634693 4 0.5585 0.4901 0.212 0.000 0.040 0.640 0.004 0.104
#> GSM634695 3 0.6466 -0.2564 0.000 0.364 0.480 0.068 0.072 0.016
#> GSM634696 4 0.4357 0.0896 0.004 0.004 0.000 0.500 0.008 0.484
#> GSM634697 6 0.3943 0.2905 0.004 0.000 0.148 0.068 0.004 0.776
#> GSM634699 4 0.5254 0.5220 0.184 0.012 0.004 0.696 0.068 0.036
#> GSM634700 2 0.1049 0.7792 0.000 0.960 0.000 0.000 0.008 0.032
#> GSM634701 5 0.4382 0.5298 0.148 0.004 0.004 0.000 0.740 0.104
#> GSM634702 6 0.5154 0.4564 0.000 0.132 0.000 0.000 0.264 0.604
#> GSM634703 5 0.5776 0.3794 0.040 0.272 0.000 0.004 0.592 0.092
#> GSM634708 2 0.1534 0.7900 0.000 0.944 0.032 0.016 0.004 0.004
#> GSM634709 5 0.5077 0.1261 0.400 0.000 0.000 0.008 0.532 0.060
#> GSM634710 6 0.3842 0.4576 0.000 0.008 0.012 0.172 0.028 0.780
#> GSM634712 3 0.3851 0.4625 0.000 0.000 0.540 0.000 0.000 0.460
#> GSM634713 2 0.3397 0.7735 0.000 0.836 0.048 0.096 0.004 0.016
#> GSM634714 3 0.5165 0.3048 0.332 0.000 0.596 0.028 0.004 0.040
#> GSM634716 5 0.5606 0.1958 0.000 0.000 0.324 0.000 0.512 0.164
#> GSM634717 1 0.1501 0.7933 0.924 0.000 0.000 0.000 0.076 0.000
#> GSM634718 1 0.3348 0.7129 0.768 0.016 0.000 0.000 0.216 0.000
#> GSM634719 5 0.3593 0.5762 0.176 0.000 0.024 0.008 0.788 0.004
#> GSM634720 3 0.3972 0.5679 0.024 0.004 0.800 0.080 0.000 0.092
#> GSM634721 6 0.4921 0.1458 0.000 0.000 0.004 0.372 0.060 0.564
#> GSM634722 4 0.4173 0.4928 0.000 0.176 0.056 0.752 0.000 0.016
#> GSM634723 1 0.3252 0.7568 0.824 0.000 0.000 0.108 0.068 0.000
#> GSM634724 6 0.5259 0.2639 0.000 0.000 0.240 0.000 0.160 0.600
#> GSM634725 6 0.5770 0.5266 0.004 0.048 0.024 0.060 0.212 0.652
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 individual(p) k
#> MAD:NMF 89 0.6572 2
#> MAD:NMF 87 0.3282 3
#> MAD:NMF 74 0.4723 4
#> MAD:NMF 43 0.0427 5
#> MAD:NMF 58 0.1360 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 17698 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 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.297 0.630 0.790 0.3533 0.647 0.647
#> 3 3 0.541 0.782 0.847 0.6497 0.747 0.626
#> 4 4 0.645 0.799 0.858 0.0805 0.964 0.921
#> 5 5 0.615 0.737 0.837 0.1894 0.817 0.561
#> 6 6 0.660 0.712 0.823 0.0382 0.979 0.912
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
#> GSM634643 1 0.0672 0.740 0.992 0.008
#> GSM634648 1 0.2423 0.741 0.960 0.040
#> GSM634649 1 0.1843 0.741 0.972 0.028
#> GSM634650 1 0.6247 0.657 0.844 0.156
#> GSM634653 1 0.2236 0.731 0.964 0.036
#> GSM634659 1 0.5178 0.703 0.884 0.116
#> GSM634666 1 0.9248 0.493 0.660 0.340
#> GSM634667 2 0.9170 0.960 0.332 0.668
#> GSM634669 1 0.5519 0.691 0.872 0.128
#> GSM634670 1 0.9170 0.470 0.668 0.332
#> GSM634679 1 0.9248 0.493 0.660 0.340
#> GSM634680 1 0.9170 0.470 0.668 0.332
#> GSM634681 1 0.3114 0.733 0.944 0.056
#> GSM634688 1 0.9896 -0.378 0.560 0.440
#> GSM634690 2 0.9170 0.960 0.332 0.668
#> GSM634694 1 0.5629 0.687 0.868 0.132
#> GSM634698 1 0.1184 0.741 0.984 0.016
#> GSM634704 2 0.9248 0.954 0.340 0.660
#> GSM634705 1 0.0938 0.737 0.988 0.012
#> GSM634706 1 0.8909 0.295 0.692 0.308
#> GSM634707 1 0.5178 0.702 0.884 0.116
#> GSM634711 1 0.1414 0.737 0.980 0.020
#> GSM634715 1 0.8955 0.280 0.688 0.312
#> GSM634633 1 0.3879 0.725 0.924 0.076
#> GSM634634 1 0.9866 -0.346 0.568 0.432
#> GSM634635 1 0.4562 0.716 0.904 0.096
#> GSM634636 1 0.2603 0.737 0.956 0.044
#> GSM634637 1 0.3274 0.732 0.940 0.060
#> GSM634638 2 0.9170 0.960 0.332 0.668
#> GSM634639 1 0.2043 0.730 0.968 0.032
#> GSM634640 2 0.9170 0.960 0.332 0.668
#> GSM634641 1 0.2603 0.736 0.956 0.044
#> GSM634642 1 0.9896 -0.378 0.560 0.440
#> GSM634644 2 0.9248 0.954 0.340 0.660
#> GSM634645 1 0.0938 0.737 0.988 0.012
#> GSM634646 1 0.5059 0.669 0.888 0.112
#> GSM634647 1 0.9170 0.470 0.668 0.332
#> GSM634651 2 0.9170 0.960 0.332 0.668
#> GSM634652 2 0.9323 0.944 0.348 0.652
#> GSM634654 1 0.2043 0.730 0.968 0.032
#> GSM634655 1 0.2236 0.732 0.964 0.036
#> GSM634656 1 0.9170 0.470 0.668 0.332
#> GSM634657 1 0.6247 0.657 0.844 0.156
#> GSM634658 1 0.5178 0.702 0.884 0.116
#> GSM634660 1 0.5178 0.702 0.884 0.116
#> GSM634661 2 0.9170 0.960 0.332 0.668
#> GSM634662 1 0.9209 0.181 0.664 0.336
#> GSM634663 1 0.9866 -0.313 0.568 0.432
#> GSM634664 1 0.9896 -0.378 0.560 0.440
#> GSM634665 1 0.1414 0.735 0.980 0.020
#> GSM634668 1 0.7745 0.528 0.772 0.228
#> GSM634671 1 0.1633 0.737 0.976 0.024
#> GSM634672 1 0.9170 0.470 0.668 0.332
#> GSM634673 1 0.3274 0.712 0.940 0.060
#> GSM634674 1 0.9209 0.181 0.664 0.336
#> GSM634675 2 0.9170 0.960 0.332 0.668
#> GSM634676 1 0.3431 0.730 0.936 0.064
#> GSM634677 2 0.9170 0.960 0.332 0.668
#> GSM634678 1 0.9087 0.232 0.676 0.324
#> GSM634682 2 0.9170 0.960 0.332 0.668
#> GSM634683 2 0.9170 0.960 0.332 0.668
#> GSM634684 1 0.1414 0.739 0.980 0.020
#> GSM634685 2 0.9970 0.697 0.468 0.532
#> GSM634686 1 0.5059 0.705 0.888 0.112
#> GSM634687 2 0.9170 0.960 0.332 0.668
#> GSM634689 1 0.9896 -0.378 0.560 0.440
#> GSM634691 2 0.9170 0.960 0.332 0.668
#> GSM634692 1 0.4815 0.711 0.896 0.104
#> GSM634693 1 0.2948 0.719 0.948 0.052
#> GSM634695 2 0.9850 0.797 0.428 0.572
#> GSM634696 1 0.2603 0.736 0.956 0.044
#> GSM634697 1 0.9170 0.470 0.668 0.332
#> GSM634699 1 0.9896 -0.378 0.560 0.440
#> GSM634700 2 0.9170 0.960 0.332 0.668
#> GSM634701 1 0.5178 0.702 0.884 0.116
#> GSM634702 1 0.5178 0.703 0.884 0.116
#> GSM634703 1 0.5737 0.683 0.864 0.136
#> GSM634708 2 0.9170 0.960 0.332 0.668
#> GSM634709 1 0.0376 0.739 0.996 0.004
#> GSM634710 1 0.9248 0.493 0.660 0.340
#> GSM634712 1 0.9248 0.493 0.660 0.340
#> GSM634713 2 0.9323 0.944 0.348 0.652
#> GSM634714 1 0.2043 0.730 0.968 0.032
#> GSM634716 1 0.2423 0.740 0.960 0.040
#> GSM634717 1 0.1843 0.739 0.972 0.028
#> GSM634718 1 0.5629 0.687 0.868 0.132
#> GSM634719 1 0.5059 0.705 0.888 0.112
#> GSM634720 1 0.2043 0.730 0.968 0.032
#> GSM634721 1 0.1843 0.733 0.972 0.028
#> GSM634722 2 0.9954 0.719 0.460 0.540
#> GSM634723 1 0.5629 0.687 0.868 0.132
#> GSM634724 1 0.2423 0.731 0.960 0.040
#> GSM634725 1 0.4690 0.714 0.900 0.100
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.4452 0.803 0.808 0.000 0.192
#> GSM634648 1 0.4784 0.802 0.796 0.004 0.200
#> GSM634649 1 0.4702 0.794 0.788 0.000 0.212
#> GSM634650 1 0.2356 0.752 0.928 0.072 0.000
#> GSM634653 1 0.5815 0.739 0.692 0.004 0.304
#> GSM634659 1 0.0237 0.792 0.996 0.004 0.000
#> GSM634666 3 0.5508 0.808 0.188 0.028 0.784
#> GSM634667 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634669 1 0.0747 0.786 0.984 0.016 0.000
#> GSM634670 3 0.2625 0.830 0.084 0.000 0.916
#> GSM634679 3 0.5508 0.808 0.188 0.028 0.784
#> GSM634680 3 0.0892 0.868 0.020 0.000 0.980
#> GSM634681 1 0.4473 0.809 0.828 0.008 0.164
#> GSM634688 2 0.7548 0.731 0.204 0.684 0.112
#> GSM634690 2 0.2165 0.879 0.064 0.936 0.000
#> GSM634694 1 0.0892 0.784 0.980 0.020 0.000
#> GSM634698 1 0.4504 0.802 0.804 0.000 0.196
#> GSM634704 2 0.2356 0.876 0.072 0.928 0.000
#> GSM634705 1 0.4974 0.783 0.764 0.000 0.236
#> GSM634706 1 0.5216 0.563 0.740 0.260 0.000
#> GSM634707 1 0.0237 0.791 0.996 0.004 0.000
#> GSM634711 1 0.5016 0.782 0.760 0.000 0.240
#> GSM634715 1 0.4931 0.602 0.768 0.232 0.000
#> GSM634633 1 0.3375 0.811 0.892 0.008 0.100
#> GSM634634 2 0.7677 0.722 0.204 0.676 0.120
#> GSM634635 1 0.1031 0.799 0.976 0.000 0.024
#> GSM634636 1 0.3941 0.810 0.844 0.000 0.156
#> GSM634637 1 0.2356 0.806 0.928 0.000 0.072
#> GSM634638 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634639 1 0.5621 0.736 0.692 0.000 0.308
#> GSM634640 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634641 1 0.3879 0.809 0.848 0.000 0.152
#> GSM634642 2 0.7548 0.731 0.204 0.684 0.112
#> GSM634644 2 0.2356 0.876 0.072 0.928 0.000
#> GSM634645 1 0.4974 0.783 0.764 0.000 0.236
#> GSM634646 1 0.6235 0.540 0.564 0.000 0.436
#> GSM634647 3 0.0892 0.868 0.020 0.000 0.980
#> GSM634651 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634652 2 0.1170 0.874 0.016 0.976 0.008
#> GSM634654 1 0.5678 0.729 0.684 0.000 0.316
#> GSM634655 1 0.5529 0.744 0.704 0.000 0.296
#> GSM634656 3 0.0892 0.868 0.020 0.000 0.980
#> GSM634657 1 0.2356 0.752 0.928 0.072 0.000
#> GSM634658 1 0.0661 0.795 0.988 0.004 0.008
#> GSM634660 1 0.0237 0.791 0.996 0.004 0.000
#> GSM634661 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634662 1 0.5327 0.557 0.728 0.272 0.000
#> GSM634663 1 0.6154 0.299 0.592 0.408 0.000
#> GSM634664 2 0.7548 0.731 0.204 0.684 0.112
#> GSM634665 1 0.5397 0.760 0.720 0.000 0.280
#> GSM634668 1 0.3267 0.738 0.884 0.116 0.000
#> GSM634671 1 0.5216 0.771 0.740 0.000 0.260
#> GSM634672 3 0.2625 0.830 0.084 0.000 0.916
#> GSM634673 1 0.6126 0.616 0.600 0.000 0.400
#> GSM634674 1 0.5327 0.557 0.728 0.272 0.000
#> GSM634675 2 0.2165 0.879 0.064 0.936 0.000
#> GSM634676 1 0.4326 0.810 0.844 0.012 0.144
#> GSM634677 2 0.2165 0.879 0.064 0.936 0.000
#> GSM634678 1 0.5138 0.580 0.748 0.252 0.000
#> GSM634682 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634684 1 0.4931 0.786 0.768 0.000 0.232
#> GSM634685 2 0.5402 0.805 0.180 0.792 0.028
#> GSM634686 1 0.0424 0.796 0.992 0.000 0.008
#> GSM634687 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634689 2 0.7548 0.731 0.204 0.684 0.112
#> GSM634691 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634692 1 0.0747 0.798 0.984 0.000 0.016
#> GSM634693 1 0.5882 0.694 0.652 0.000 0.348
#> GSM634695 2 0.4121 0.823 0.168 0.832 0.000
#> GSM634696 1 0.3879 0.809 0.848 0.000 0.152
#> GSM634697 3 0.0892 0.868 0.020 0.000 0.980
#> GSM634699 2 0.7548 0.731 0.204 0.684 0.112
#> GSM634700 2 0.2165 0.879 0.064 0.936 0.000
#> GSM634701 1 0.0661 0.795 0.988 0.004 0.008
#> GSM634702 1 0.0237 0.792 0.996 0.004 0.000
#> GSM634703 1 0.1031 0.782 0.976 0.024 0.000
#> GSM634708 2 0.0000 0.876 0.000 1.000 0.000
#> GSM634709 1 0.4842 0.790 0.776 0.000 0.224
#> GSM634710 3 0.5508 0.808 0.188 0.028 0.784
#> GSM634712 3 0.5508 0.808 0.188 0.028 0.784
#> GSM634713 2 0.1170 0.874 0.016 0.976 0.008
#> GSM634714 1 0.5678 0.729 0.684 0.000 0.316
#> GSM634716 1 0.4291 0.807 0.820 0.000 0.180
#> GSM634717 1 0.4178 0.807 0.828 0.000 0.172
#> GSM634718 1 0.0892 0.784 0.980 0.020 0.000
#> GSM634719 1 0.0424 0.796 0.992 0.000 0.008
#> GSM634720 1 0.5621 0.736 0.692 0.000 0.308
#> GSM634721 1 0.5397 0.761 0.720 0.000 0.280
#> GSM634722 2 0.5147 0.809 0.180 0.800 0.020
#> GSM634723 1 0.0892 0.784 0.980 0.020 0.000
#> GSM634724 1 0.5254 0.771 0.736 0.000 0.264
#> GSM634725 1 0.1289 0.803 0.968 0.000 0.032
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.3528 0.819 0.808 0.000 0.192 0.000
#> GSM634648 1 0.3791 0.819 0.796 0.000 0.200 0.004
#> GSM634649 1 0.3726 0.814 0.788 0.000 0.212 0.000
#> GSM634650 1 0.1867 0.778 0.928 0.072 0.000 0.000
#> GSM634653 1 0.4608 0.758 0.692 0.000 0.304 0.004
#> GSM634659 1 0.0188 0.811 0.996 0.004 0.000 0.000
#> GSM634666 3 0.4134 0.700 0.000 0.000 0.740 0.260
#> GSM634667 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0592 0.807 0.984 0.016 0.000 0.000
#> GSM634670 3 0.1716 0.763 0.064 0.000 0.936 0.000
#> GSM634679 3 0.4134 0.700 0.000 0.000 0.740 0.260
#> GSM634680 3 0.0000 0.822 0.000 0.000 1.000 0.000
#> GSM634681 1 0.3585 0.826 0.828 0.004 0.164 0.004
#> GSM634688 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> GSM634690 2 0.1716 0.917 0.064 0.936 0.000 0.000
#> GSM634694 1 0.0707 0.805 0.980 0.020 0.000 0.000
#> GSM634698 1 0.3569 0.818 0.804 0.000 0.196 0.000
#> GSM634704 2 0.1867 0.912 0.072 0.928 0.000 0.000
#> GSM634705 1 0.3942 0.802 0.764 0.000 0.236 0.000
#> GSM634706 1 0.4283 0.604 0.740 0.256 0.000 0.004
#> GSM634707 1 0.0188 0.811 0.996 0.004 0.000 0.000
#> GSM634711 1 0.3975 0.800 0.760 0.000 0.240 0.000
#> GSM634715 1 0.4158 0.643 0.768 0.224 0.000 0.008
#> GSM634633 1 0.2715 0.827 0.892 0.004 0.100 0.004
#> GSM634634 4 0.0336 0.878 0.000 0.000 0.008 0.992
#> GSM634635 1 0.0817 0.818 0.976 0.000 0.024 0.000
#> GSM634636 1 0.3123 0.827 0.844 0.000 0.156 0.000
#> GSM634637 1 0.1867 0.826 0.928 0.000 0.072 0.000
#> GSM634638 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634639 1 0.4454 0.755 0.692 0.000 0.308 0.000
#> GSM634640 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634641 1 0.3074 0.826 0.848 0.000 0.152 0.000
#> GSM634642 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> GSM634644 2 0.1867 0.912 0.072 0.928 0.000 0.000
#> GSM634645 1 0.3942 0.802 0.764 0.000 0.236 0.000
#> GSM634646 1 0.4948 0.571 0.560 0.000 0.440 0.000
#> GSM634647 3 0.0000 0.822 0.000 0.000 1.000 0.000
#> GSM634651 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634652 4 0.4356 0.658 0.000 0.292 0.000 0.708
#> GSM634654 1 0.4500 0.749 0.684 0.000 0.316 0.000
#> GSM634655 1 0.4382 0.764 0.704 0.000 0.296 0.000
#> GSM634656 3 0.0000 0.822 0.000 0.000 1.000 0.000
#> GSM634657 1 0.1867 0.778 0.928 0.072 0.000 0.000
#> GSM634658 1 0.0524 0.814 0.988 0.004 0.008 0.000
#> GSM634660 1 0.0188 0.811 0.996 0.004 0.000 0.000
#> GSM634661 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634662 1 0.4372 0.593 0.728 0.268 0.000 0.004
#> GSM634663 1 0.4877 0.320 0.592 0.408 0.000 0.000
#> GSM634664 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> GSM634665 1 0.4277 0.780 0.720 0.000 0.280 0.000
#> GSM634668 1 0.2714 0.762 0.884 0.112 0.000 0.004
#> GSM634671 1 0.4134 0.792 0.740 0.000 0.260 0.000
#> GSM634672 3 0.1716 0.763 0.064 0.000 0.936 0.000
#> GSM634673 1 0.4877 0.635 0.592 0.000 0.408 0.000
#> GSM634674 1 0.4372 0.593 0.728 0.268 0.000 0.004
#> GSM634675 2 0.1716 0.917 0.064 0.936 0.000 0.000
#> GSM634676 1 0.3484 0.827 0.844 0.008 0.144 0.004
#> GSM634677 2 0.1716 0.917 0.064 0.936 0.000 0.000
#> GSM634678 1 0.4220 0.619 0.748 0.248 0.000 0.004
#> GSM634682 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634683 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634684 1 0.3907 0.805 0.768 0.000 0.232 0.000
#> GSM634685 2 0.5150 0.775 0.156 0.768 0.008 0.068
#> GSM634686 1 0.0336 0.814 0.992 0.000 0.008 0.000
#> GSM634687 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634689 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> GSM634691 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634692 1 0.0592 0.817 0.984 0.000 0.016 0.000
#> GSM634693 1 0.4661 0.717 0.652 0.000 0.348 0.000
#> GSM634695 2 0.4057 0.807 0.160 0.812 0.000 0.028
#> GSM634696 1 0.3074 0.826 0.848 0.000 0.152 0.000
#> GSM634697 3 0.0000 0.822 0.000 0.000 1.000 0.000
#> GSM634699 4 0.0000 0.884 0.000 0.000 0.000 1.000
#> GSM634700 2 0.1716 0.917 0.064 0.936 0.000 0.000
#> GSM634701 1 0.0524 0.814 0.988 0.004 0.008 0.000
#> GSM634702 1 0.0188 0.811 0.996 0.004 0.000 0.000
#> GSM634703 1 0.0817 0.803 0.976 0.024 0.000 0.000
#> GSM634708 2 0.0000 0.926 0.000 1.000 0.000 0.000
#> GSM634709 1 0.3837 0.808 0.776 0.000 0.224 0.000
#> GSM634710 3 0.4134 0.700 0.000 0.000 0.740 0.260
#> GSM634712 3 0.4134 0.700 0.000 0.000 0.740 0.260
#> GSM634713 4 0.4356 0.658 0.000 0.292 0.000 0.708
#> GSM634714 1 0.4500 0.749 0.684 0.000 0.316 0.000
#> GSM634716 1 0.3400 0.824 0.820 0.000 0.180 0.000
#> GSM634717 1 0.3311 0.823 0.828 0.000 0.172 0.000
#> GSM634718 1 0.0707 0.805 0.980 0.020 0.000 0.000
#> GSM634719 1 0.0336 0.814 0.992 0.000 0.008 0.000
#> GSM634720 1 0.4454 0.755 0.692 0.000 0.308 0.000
#> GSM634721 1 0.4277 0.780 0.720 0.000 0.280 0.000
#> GSM634722 2 0.4829 0.782 0.156 0.776 0.000 0.068
#> GSM634723 1 0.0707 0.805 0.980 0.020 0.000 0.000
#> GSM634724 1 0.4164 0.790 0.736 0.000 0.264 0.000
#> GSM634725 1 0.1022 0.821 0.968 0.000 0.032 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.3508 0.707 0.748 0.000 0.000 0.000 0.252
#> GSM634648 1 0.4327 0.545 0.632 0.000 0.008 0.000 0.360
#> GSM634649 1 0.4331 0.427 0.596 0.000 0.004 0.000 0.400
#> GSM634650 5 0.1710 0.778 0.016 0.040 0.004 0.000 0.940
#> GSM634653 1 0.2450 0.793 0.900 0.000 0.052 0.000 0.048
#> GSM634659 5 0.2690 0.748 0.156 0.000 0.000 0.000 0.844
#> GSM634666 3 0.4872 0.761 0.056 0.000 0.692 0.248 0.004
#> GSM634667 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634669 5 0.2127 0.778 0.108 0.000 0.000 0.000 0.892
#> GSM634670 3 0.2813 0.789 0.168 0.000 0.832 0.000 0.000
#> GSM634679 3 0.4872 0.761 0.056 0.000 0.692 0.248 0.004
#> GSM634680 3 0.1410 0.809 0.060 0.000 0.940 0.000 0.000
#> GSM634681 5 0.4101 0.315 0.372 0.000 0.000 0.000 0.628
#> GSM634688 4 0.0290 0.882 0.008 0.000 0.000 0.992 0.000
#> GSM634690 2 0.2793 0.877 0.000 0.876 0.036 0.000 0.088
#> GSM634694 5 0.0703 0.785 0.024 0.000 0.000 0.000 0.976
#> GSM634698 1 0.3612 0.689 0.732 0.000 0.000 0.000 0.268
#> GSM634704 2 0.3836 0.868 0.036 0.832 0.036 0.000 0.096
#> GSM634705 1 0.2439 0.804 0.876 0.000 0.004 0.000 0.120
#> GSM634706 5 0.4109 0.654 0.004 0.192 0.036 0.000 0.768
#> GSM634707 5 0.2891 0.735 0.176 0.000 0.000 0.000 0.824
#> GSM634711 1 0.2233 0.807 0.892 0.000 0.004 0.000 0.104
#> GSM634715 5 0.4043 0.686 0.012 0.160 0.036 0.000 0.792
#> GSM634633 5 0.3177 0.675 0.208 0.000 0.000 0.000 0.792
#> GSM634634 4 0.0451 0.876 0.000 0.000 0.008 0.988 0.004
#> GSM634635 5 0.3366 0.647 0.232 0.000 0.000 0.000 0.768
#> GSM634636 5 0.4304 -0.154 0.484 0.000 0.000 0.000 0.516
#> GSM634637 1 0.4161 0.458 0.608 0.000 0.000 0.000 0.392
#> GSM634638 2 0.1205 0.879 0.040 0.956 0.004 0.000 0.000
#> GSM634639 1 0.2370 0.791 0.904 0.000 0.056 0.000 0.040
#> GSM634640 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634641 1 0.4287 0.298 0.540 0.000 0.000 0.000 0.460
#> GSM634642 4 0.0290 0.882 0.008 0.000 0.000 0.992 0.000
#> GSM634644 2 0.3836 0.868 0.036 0.832 0.036 0.000 0.096
#> GSM634645 1 0.2439 0.804 0.876 0.000 0.004 0.000 0.120
#> GSM634646 1 0.3876 0.663 0.776 0.000 0.192 0.000 0.032
#> GSM634647 3 0.1851 0.838 0.088 0.000 0.912 0.000 0.000
#> GSM634651 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634652 4 0.4479 0.671 0.004 0.264 0.028 0.704 0.000
#> GSM634654 1 0.2504 0.786 0.896 0.000 0.064 0.000 0.040
#> GSM634655 1 0.2592 0.793 0.892 0.000 0.056 0.000 0.052
#> GSM634656 3 0.1851 0.838 0.088 0.000 0.912 0.000 0.000
#> GSM634657 5 0.1710 0.778 0.016 0.040 0.004 0.000 0.940
#> GSM634658 5 0.1478 0.784 0.064 0.000 0.000 0.000 0.936
#> GSM634660 5 0.2891 0.735 0.176 0.000 0.000 0.000 0.824
#> GSM634661 2 0.1205 0.879 0.040 0.956 0.004 0.000 0.000
#> GSM634662 5 0.4242 0.634 0.004 0.208 0.036 0.000 0.752
#> GSM634663 5 0.4880 0.373 0.000 0.348 0.036 0.000 0.616
#> GSM634664 4 0.0162 0.881 0.004 0.000 0.000 0.996 0.000
#> GSM634665 1 0.2331 0.811 0.900 0.000 0.020 0.000 0.080
#> GSM634668 5 0.3245 0.755 0.044 0.048 0.036 0.000 0.872
#> GSM634671 1 0.2519 0.811 0.884 0.000 0.016 0.000 0.100
#> GSM634672 3 0.2813 0.789 0.168 0.000 0.832 0.000 0.000
#> GSM634673 1 0.3957 0.495 0.712 0.000 0.280 0.000 0.008
#> GSM634674 5 0.4242 0.634 0.004 0.208 0.036 0.000 0.752
#> GSM634675 2 0.2793 0.877 0.000 0.876 0.036 0.000 0.088
#> GSM634676 5 0.3837 0.450 0.308 0.000 0.000 0.000 0.692
#> GSM634677 2 0.2793 0.877 0.000 0.876 0.036 0.000 0.088
#> GSM634678 5 0.4074 0.658 0.004 0.188 0.036 0.000 0.772
#> GSM634682 2 0.1205 0.879 0.040 0.956 0.004 0.000 0.000
#> GSM634683 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634684 1 0.2488 0.804 0.872 0.000 0.004 0.000 0.124
#> GSM634685 2 0.6376 0.735 0.048 0.668 0.048 0.052 0.184
#> GSM634686 5 0.1792 0.781 0.084 0.000 0.000 0.000 0.916
#> GSM634687 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634689 4 0.0290 0.882 0.008 0.000 0.000 0.992 0.000
#> GSM634691 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634692 5 0.3274 0.663 0.220 0.000 0.000 0.000 0.780
#> GSM634693 1 0.2927 0.770 0.868 0.000 0.092 0.000 0.040
#> GSM634695 2 0.5490 0.768 0.048 0.712 0.040 0.012 0.188
#> GSM634696 1 0.4287 0.298 0.540 0.000 0.000 0.000 0.460
#> GSM634697 3 0.1851 0.838 0.088 0.000 0.912 0.000 0.000
#> GSM634699 4 0.0162 0.881 0.004 0.000 0.000 0.996 0.000
#> GSM634700 2 0.2793 0.877 0.000 0.876 0.036 0.000 0.088
#> GSM634701 5 0.1608 0.784 0.072 0.000 0.000 0.000 0.928
#> GSM634702 5 0.2690 0.748 0.156 0.000 0.000 0.000 0.844
#> GSM634703 5 0.0609 0.785 0.020 0.000 0.000 0.000 0.980
#> GSM634708 2 0.0324 0.887 0.000 0.992 0.004 0.000 0.004
#> GSM634709 1 0.3430 0.739 0.776 0.000 0.004 0.000 0.220
#> GSM634710 3 0.4872 0.761 0.056 0.000 0.692 0.248 0.004
#> GSM634712 3 0.4872 0.761 0.056 0.000 0.692 0.248 0.004
#> GSM634713 4 0.4479 0.671 0.004 0.264 0.028 0.704 0.000
#> GSM634714 1 0.2504 0.786 0.896 0.000 0.064 0.000 0.040
#> GSM634716 1 0.3333 0.752 0.788 0.000 0.004 0.000 0.208
#> GSM634717 1 0.4291 0.290 0.536 0.000 0.000 0.000 0.464
#> GSM634718 5 0.0703 0.785 0.024 0.000 0.000 0.000 0.976
#> GSM634719 5 0.1792 0.781 0.084 0.000 0.000 0.000 0.916
#> GSM634720 1 0.2370 0.791 0.904 0.000 0.056 0.000 0.040
#> GSM634721 1 0.2423 0.812 0.896 0.000 0.024 0.000 0.080
#> GSM634722 2 0.6241 0.742 0.048 0.676 0.040 0.052 0.184
#> GSM634723 5 0.0794 0.786 0.028 0.000 0.000 0.000 0.972
#> GSM634724 1 0.2423 0.811 0.896 0.000 0.024 0.000 0.080
#> GSM634725 5 0.3039 0.715 0.192 0.000 0.000 0.000 0.808
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.3101 0.711 0.756 0.000 0.000 0.000 0.244 0.000
#> GSM634648 1 0.4174 0.536 0.628 0.000 0.016 0.000 0.352 0.004
#> GSM634649 1 0.3872 0.434 0.604 0.000 0.004 0.000 0.392 0.000
#> GSM634650 5 0.1723 0.772 0.000 0.036 0.000 0.000 0.928 0.036
#> GSM634653 1 0.1749 0.799 0.932 0.000 0.024 0.000 0.036 0.008
#> GSM634659 5 0.2531 0.740 0.132 0.000 0.000 0.000 0.856 0.012
#> GSM634666 3 0.4744 0.760 0.052 0.000 0.688 0.232 0.000 0.028
#> GSM634667 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634669 5 0.1812 0.772 0.080 0.000 0.000 0.000 0.912 0.008
#> GSM634670 3 0.2378 0.778 0.152 0.000 0.848 0.000 0.000 0.000
#> GSM634679 3 0.4744 0.760 0.052 0.000 0.688 0.232 0.000 0.028
#> GSM634680 3 0.2558 0.733 0.028 0.000 0.868 0.000 0.000 0.104
#> GSM634681 5 0.3819 0.316 0.372 0.000 0.000 0.000 0.624 0.004
#> GSM634688 4 0.0692 0.868 0.004 0.000 0.000 0.976 0.000 0.020
#> GSM634690 2 0.2260 0.798 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM634694 5 0.0363 0.779 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM634698 1 0.3221 0.690 0.736 0.000 0.000 0.000 0.264 0.000
#> GSM634704 6 0.3756 0.600 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM634705 1 0.2006 0.806 0.892 0.000 0.004 0.000 0.104 0.000
#> GSM634706 5 0.4902 0.599 0.004 0.172 0.000 0.000 0.672 0.152
#> GSM634707 5 0.2553 0.731 0.144 0.000 0.000 0.000 0.848 0.008
#> GSM634711 1 0.1908 0.808 0.900 0.000 0.004 0.000 0.096 0.000
#> GSM634715 5 0.4537 0.624 0.008 0.060 0.000 0.000 0.684 0.248
#> GSM634633 5 0.2915 0.687 0.184 0.000 0.000 0.000 0.808 0.008
#> GSM634634 4 0.0508 0.867 0.000 0.000 0.004 0.984 0.000 0.012
#> GSM634635 5 0.2854 0.639 0.208 0.000 0.000 0.000 0.792 0.000
#> GSM634636 5 0.3862 -0.144 0.476 0.000 0.000 0.000 0.524 0.000
#> GSM634637 1 0.3881 0.464 0.600 0.000 0.000 0.000 0.396 0.004
#> GSM634638 6 0.3833 0.672 0.000 0.444 0.000 0.000 0.000 0.556
#> GSM634639 1 0.1716 0.797 0.932 0.000 0.028 0.000 0.036 0.004
#> GSM634640 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634641 1 0.3857 0.279 0.532 0.000 0.000 0.000 0.468 0.000
#> GSM634642 4 0.0692 0.868 0.004 0.000 0.000 0.976 0.000 0.020
#> GSM634644 6 0.3756 0.600 0.000 0.400 0.000 0.000 0.000 0.600
#> GSM634645 1 0.2006 0.806 0.892 0.000 0.004 0.000 0.104 0.000
#> GSM634646 1 0.3134 0.674 0.808 0.000 0.168 0.000 0.024 0.000
#> GSM634647 3 0.1267 0.824 0.060 0.000 0.940 0.000 0.000 0.000
#> GSM634651 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634652 4 0.4183 0.603 0.004 0.268 0.000 0.692 0.000 0.036
#> GSM634654 1 0.1719 0.792 0.932 0.000 0.032 0.000 0.032 0.004
#> GSM634655 1 0.2164 0.800 0.908 0.000 0.028 0.000 0.056 0.008
#> GSM634656 3 0.1267 0.824 0.060 0.000 0.940 0.000 0.000 0.000
#> GSM634657 5 0.1723 0.772 0.000 0.036 0.000 0.000 0.928 0.036
#> GSM634658 5 0.0713 0.777 0.028 0.000 0.000 0.000 0.972 0.000
#> GSM634660 5 0.2553 0.731 0.144 0.000 0.000 0.000 0.848 0.008
#> GSM634661 6 0.3833 0.672 0.000 0.444 0.000 0.000 0.000 0.556
#> GSM634662 5 0.5086 0.576 0.004 0.184 0.000 0.000 0.648 0.164
#> GSM634663 5 0.5498 0.349 0.000 0.324 0.000 0.000 0.528 0.148
#> GSM634664 4 0.0603 0.868 0.004 0.000 0.000 0.980 0.000 0.016
#> GSM634665 1 0.1926 0.810 0.912 0.000 0.020 0.000 0.068 0.000
#> GSM634668 5 0.4053 0.718 0.044 0.024 0.000 0.000 0.768 0.164
#> GSM634671 1 0.1967 0.811 0.904 0.000 0.012 0.000 0.084 0.000
#> GSM634672 3 0.2378 0.778 0.152 0.000 0.848 0.000 0.000 0.000
#> GSM634673 1 0.3330 0.483 0.716 0.000 0.284 0.000 0.000 0.000
#> GSM634674 5 0.5055 0.580 0.004 0.184 0.000 0.000 0.652 0.160
#> GSM634675 2 0.2260 0.798 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM634676 5 0.3634 0.468 0.296 0.000 0.000 0.000 0.696 0.008
#> GSM634677 2 0.2260 0.798 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM634678 5 0.4937 0.602 0.004 0.164 0.000 0.000 0.668 0.164
#> GSM634682 6 0.3833 0.672 0.000 0.444 0.000 0.000 0.000 0.556
#> GSM634683 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634684 1 0.2146 0.804 0.880 0.000 0.004 0.000 0.116 0.000
#> GSM634685 6 0.3101 0.694 0.000 0.104 0.004 0.036 0.008 0.848
#> GSM634686 5 0.1075 0.775 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM634687 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634689 4 0.0692 0.868 0.004 0.000 0.000 0.976 0.000 0.020
#> GSM634691 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634692 5 0.2762 0.654 0.196 0.000 0.000 0.000 0.804 0.000
#> GSM634693 1 0.2106 0.778 0.904 0.000 0.064 0.000 0.032 0.000
#> GSM634695 6 0.2473 0.707 0.000 0.136 0.000 0.000 0.008 0.856
#> GSM634696 1 0.3857 0.279 0.532 0.000 0.000 0.000 0.468 0.000
#> GSM634697 3 0.1267 0.824 0.060 0.000 0.940 0.000 0.000 0.000
#> GSM634699 4 0.0603 0.868 0.004 0.000 0.000 0.980 0.000 0.016
#> GSM634700 2 0.2260 0.798 0.000 0.860 0.000 0.000 0.000 0.140
#> GSM634701 5 0.0865 0.778 0.036 0.000 0.000 0.000 0.964 0.000
#> GSM634702 5 0.2531 0.740 0.132 0.000 0.000 0.000 0.856 0.012
#> GSM634703 5 0.0547 0.779 0.000 0.000 0.000 0.000 0.980 0.020
#> GSM634708 2 0.0000 0.891 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634709 1 0.2964 0.745 0.792 0.000 0.004 0.000 0.204 0.000
#> GSM634710 3 0.4744 0.760 0.052 0.000 0.688 0.232 0.000 0.028
#> GSM634712 3 0.4744 0.760 0.052 0.000 0.688 0.232 0.000 0.028
#> GSM634713 4 0.4183 0.603 0.004 0.268 0.000 0.692 0.000 0.036
#> GSM634714 1 0.1719 0.792 0.932 0.000 0.032 0.000 0.032 0.004
#> GSM634716 1 0.3133 0.743 0.780 0.000 0.000 0.000 0.212 0.008
#> GSM634717 1 0.3854 0.294 0.536 0.000 0.000 0.000 0.464 0.000
#> GSM634718 5 0.0363 0.779 0.000 0.000 0.000 0.000 0.988 0.012
#> GSM634719 5 0.1075 0.775 0.048 0.000 0.000 0.000 0.952 0.000
#> GSM634720 1 0.1716 0.797 0.932 0.000 0.028 0.000 0.036 0.004
#> GSM634721 1 0.2350 0.811 0.888 0.000 0.036 0.000 0.076 0.000
#> GSM634722 6 0.3005 0.697 0.000 0.108 0.000 0.036 0.008 0.848
#> GSM634723 5 0.0508 0.779 0.004 0.000 0.000 0.000 0.984 0.012
#> GSM634724 1 0.2066 0.810 0.904 0.000 0.024 0.000 0.072 0.000
#> GSM634725 5 0.2632 0.714 0.164 0.000 0.000 0.000 0.832 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 individual(p) k
#> ATC:hclust 71 0.443 2
#> ATC:hclust 92 0.241 3
#> ATC:hclust 92 0.411 4
#> ATC:hclust 83 0.564 5
#> ATC:hclust 83 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.
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 17698 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 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.894 0.908 0.961 0.4755 0.531 0.531
#> 3 3 0.920 0.906 0.956 0.3717 0.717 0.513
#> 4 4 0.660 0.666 0.811 0.1049 0.890 0.706
#> 5 5 0.677 0.665 0.826 0.0775 0.849 0.546
#> 6 6 0.691 0.548 0.747 0.0479 0.933 0.730
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
#> GSM634643 1 0.0938 0.952 0.988 0.012
#> GSM634648 1 0.0938 0.952 0.988 0.012
#> GSM634649 1 0.0938 0.952 0.988 0.012
#> GSM634650 2 0.0000 0.971 0.000 1.000
#> GSM634653 1 0.0000 0.950 1.000 0.000
#> GSM634659 1 0.0938 0.952 0.988 0.012
#> GSM634666 1 0.0000 0.950 1.000 0.000
#> GSM634667 2 0.0000 0.971 0.000 1.000
#> GSM634669 1 0.0938 0.952 0.988 0.012
#> GSM634670 1 0.0000 0.950 1.000 0.000
#> GSM634679 1 0.0000 0.950 1.000 0.000
#> GSM634680 1 0.0000 0.950 1.000 0.000
#> GSM634681 1 0.0938 0.952 0.988 0.012
#> GSM634688 1 0.9635 0.392 0.612 0.388
#> GSM634690 2 0.0000 0.971 0.000 1.000
#> GSM634694 2 0.9209 0.467 0.336 0.664
#> GSM634698 1 0.0938 0.952 0.988 0.012
#> GSM634704 2 0.0000 0.971 0.000 1.000
#> GSM634705 1 0.0938 0.952 0.988 0.012
#> GSM634706 2 0.0000 0.971 0.000 1.000
#> GSM634707 1 0.0938 0.952 0.988 0.012
#> GSM634711 1 0.0938 0.952 0.988 0.012
#> GSM634715 2 0.0000 0.971 0.000 1.000
#> GSM634633 1 0.0938 0.952 0.988 0.012
#> GSM634634 1 0.9608 0.401 0.616 0.384
#> GSM634635 1 0.0938 0.952 0.988 0.012
#> GSM634636 1 0.0938 0.952 0.988 0.012
#> GSM634637 1 0.0938 0.952 0.988 0.012
#> GSM634638 2 0.0000 0.971 0.000 1.000
#> GSM634639 1 0.0938 0.952 0.988 0.012
#> GSM634640 2 0.0000 0.971 0.000 1.000
#> GSM634641 1 0.0938 0.952 0.988 0.012
#> GSM634642 2 0.0938 0.962 0.012 0.988
#> GSM634644 2 0.0000 0.971 0.000 1.000
#> GSM634645 1 0.0938 0.952 0.988 0.012
#> GSM634646 1 0.0000 0.950 1.000 0.000
#> GSM634647 1 0.0000 0.950 1.000 0.000
#> GSM634651 2 0.0000 0.971 0.000 1.000
#> GSM634652 2 0.0938 0.962 0.012 0.988
#> GSM634654 1 0.0000 0.950 1.000 0.000
#> GSM634655 1 0.0000 0.950 1.000 0.000
#> GSM634656 1 0.0000 0.950 1.000 0.000
#> GSM634657 2 0.0000 0.971 0.000 1.000
#> GSM634658 1 0.0938 0.952 0.988 0.012
#> GSM634660 1 0.0938 0.952 0.988 0.012
#> GSM634661 2 0.0000 0.971 0.000 1.000
#> GSM634662 2 0.0000 0.971 0.000 1.000
#> GSM634663 2 0.0000 0.971 0.000 1.000
#> GSM634664 1 0.9608 0.401 0.616 0.384
#> GSM634665 1 0.0000 0.950 1.000 0.000
#> GSM634668 2 0.9732 0.249 0.404 0.596
#> GSM634671 1 0.0938 0.952 0.988 0.012
#> GSM634672 1 0.0000 0.950 1.000 0.000
#> GSM634673 1 0.0000 0.950 1.000 0.000
#> GSM634674 2 0.0000 0.971 0.000 1.000
#> GSM634675 2 0.0000 0.971 0.000 1.000
#> GSM634676 1 0.0938 0.952 0.988 0.012
#> GSM634677 2 0.0000 0.971 0.000 1.000
#> GSM634678 2 0.0000 0.971 0.000 1.000
#> GSM634682 2 0.0000 0.971 0.000 1.000
#> GSM634683 2 0.0000 0.971 0.000 1.000
#> GSM634684 1 0.0938 0.952 0.988 0.012
#> GSM634685 1 0.9608 0.401 0.616 0.384
#> GSM634686 1 0.0938 0.952 0.988 0.012
#> GSM634687 2 0.0000 0.971 0.000 1.000
#> GSM634689 1 0.9686 0.371 0.604 0.396
#> GSM634691 2 0.0000 0.971 0.000 1.000
#> GSM634692 1 0.0938 0.952 0.988 0.012
#> GSM634693 1 0.0000 0.950 1.000 0.000
#> GSM634695 2 0.0000 0.971 0.000 1.000
#> GSM634696 1 0.0938 0.952 0.988 0.012
#> GSM634697 1 0.0000 0.950 1.000 0.000
#> GSM634699 1 0.9608 0.401 0.616 0.384
#> GSM634700 2 0.0000 0.971 0.000 1.000
#> GSM634701 1 0.0938 0.952 0.988 0.012
#> GSM634702 1 0.0938 0.952 0.988 0.012
#> GSM634703 2 0.1843 0.948 0.028 0.972
#> GSM634708 2 0.0000 0.971 0.000 1.000
#> GSM634709 1 0.0938 0.952 0.988 0.012
#> GSM634710 1 0.0000 0.950 1.000 0.000
#> GSM634712 1 0.0000 0.950 1.000 0.000
#> GSM634713 2 0.0938 0.962 0.012 0.988
#> GSM634714 1 0.0000 0.950 1.000 0.000
#> GSM634716 1 0.0938 0.952 0.988 0.012
#> GSM634717 1 0.0938 0.952 0.988 0.012
#> GSM634718 2 0.1843 0.948 0.028 0.972
#> GSM634719 1 0.0938 0.952 0.988 0.012
#> GSM634720 1 0.0000 0.950 1.000 0.000
#> GSM634721 1 0.0000 0.950 1.000 0.000
#> GSM634722 2 0.0938 0.962 0.012 0.988
#> GSM634723 2 0.2603 0.934 0.044 0.956
#> GSM634724 1 0.0000 0.950 1.000 0.000
#> GSM634725 1 0.0938 0.952 0.988 0.012
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634648 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634649 1 0.1529 0.931 0.960 0.000 0.040
#> GSM634650 1 0.0747 0.943 0.984 0.016 0.000
#> GSM634653 3 0.1753 0.949 0.048 0.000 0.952
#> GSM634659 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634666 3 0.0000 0.954 0.000 0.000 1.000
#> GSM634667 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634670 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634679 3 0.0000 0.954 0.000 0.000 1.000
#> GSM634680 3 0.0592 0.959 0.012 0.000 0.988
#> GSM634681 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634688 3 0.1529 0.944 0.040 0.000 0.960
#> GSM634690 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634694 1 0.0747 0.943 0.984 0.016 0.000
#> GSM634698 1 0.0424 0.949 0.992 0.000 0.008
#> GSM634704 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634705 1 0.2537 0.903 0.920 0.000 0.080
#> GSM634706 2 0.2625 0.885 0.084 0.916 0.000
#> GSM634707 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634711 1 0.2537 0.903 0.920 0.000 0.080
#> GSM634715 2 0.5785 0.537 0.332 0.668 0.000
#> GSM634633 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634634 3 0.1289 0.950 0.032 0.000 0.968
#> GSM634635 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634636 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634637 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634638 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634639 1 0.1529 0.931 0.960 0.000 0.040
#> GSM634640 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634642 2 0.6286 0.146 0.000 0.536 0.464
#> GSM634644 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634645 1 0.2537 0.903 0.920 0.000 0.080
#> GSM634646 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634647 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634651 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634652 2 0.0592 0.940 0.000 0.988 0.012
#> GSM634654 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634655 1 0.5178 0.637 0.744 0.000 0.256
#> GSM634656 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634657 2 0.4002 0.809 0.160 0.840 0.000
#> GSM634658 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634660 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634661 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634662 2 0.4062 0.803 0.164 0.836 0.000
#> GSM634663 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634664 3 0.1289 0.950 0.032 0.000 0.968
#> GSM634665 1 0.5465 0.630 0.712 0.000 0.288
#> GSM634668 1 0.0829 0.944 0.984 0.004 0.012
#> GSM634671 1 0.4235 0.802 0.824 0.000 0.176
#> GSM634672 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634673 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634674 2 0.0892 0.935 0.020 0.980 0.000
#> GSM634675 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634676 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634677 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634678 2 0.1529 0.920 0.040 0.960 0.000
#> GSM634682 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634684 1 0.1529 0.931 0.960 0.000 0.040
#> GSM634685 3 0.1529 0.944 0.040 0.000 0.960
#> GSM634686 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634689 3 0.1529 0.944 0.040 0.000 0.960
#> GSM634691 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634692 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634693 1 0.6235 0.272 0.564 0.000 0.436
#> GSM634695 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634696 1 0.0237 0.950 0.996 0.000 0.004
#> GSM634697 3 0.0747 0.960 0.016 0.000 0.984
#> GSM634699 3 0.1289 0.950 0.032 0.000 0.968
#> GSM634700 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634701 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634702 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634703 1 0.0747 0.943 0.984 0.016 0.000
#> GSM634708 2 0.0000 0.947 0.000 1.000 0.000
#> GSM634709 1 0.1529 0.931 0.960 0.000 0.040
#> GSM634710 3 0.0592 0.959 0.012 0.000 0.988
#> GSM634712 3 0.0000 0.954 0.000 0.000 1.000
#> GSM634713 2 0.0592 0.940 0.000 0.988 0.012
#> GSM634714 3 0.1643 0.941 0.044 0.000 0.956
#> GSM634716 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634717 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634718 1 0.0747 0.943 0.984 0.016 0.000
#> GSM634719 1 0.0000 0.952 1.000 0.000 0.000
#> GSM634720 3 0.1529 0.952 0.040 0.000 0.960
#> GSM634721 3 0.5988 0.373 0.368 0.000 0.632
#> GSM634722 2 0.1774 0.927 0.024 0.960 0.016
#> GSM634723 1 0.0747 0.943 0.984 0.016 0.000
#> GSM634724 1 0.4750 0.750 0.784 0.000 0.216
#> GSM634725 1 0.0000 0.952 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.3942 0.772176 0.764 0.000 0.236 0.000
#> GSM634648 1 0.4072 0.769897 0.748 0.000 0.252 0.000
#> GSM634649 1 0.4679 0.678839 0.648 0.000 0.352 0.000
#> GSM634650 1 0.2256 0.748580 0.924 0.000 0.056 0.020
#> GSM634653 3 0.6732 0.506580 0.108 0.000 0.556 0.336
#> GSM634659 1 0.0707 0.780485 0.980 0.000 0.000 0.020
#> GSM634666 4 0.1792 0.689174 0.000 0.000 0.068 0.932
#> GSM634667 2 0.0000 0.837896 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0188 0.786406 0.996 0.000 0.000 0.004
#> GSM634670 3 0.3172 0.643154 0.000 0.000 0.840 0.160
#> GSM634679 4 0.4994 -0.314029 0.000 0.000 0.480 0.520
#> GSM634680 3 0.4543 0.616490 0.000 0.000 0.676 0.324
#> GSM634681 1 0.4193 0.761091 0.732 0.000 0.268 0.000
#> GSM634688 4 0.0469 0.716561 0.000 0.000 0.012 0.988
#> GSM634690 2 0.0188 0.838079 0.000 0.996 0.000 0.004
#> GSM634694 1 0.2256 0.748580 0.924 0.000 0.056 0.020
#> GSM634698 1 0.4356 0.744543 0.708 0.000 0.292 0.000
#> GSM634704 2 0.3353 0.808211 0.020 0.888 0.056 0.036
#> GSM634705 1 0.4961 0.557944 0.552 0.000 0.448 0.000
#> GSM634706 2 0.7000 0.440402 0.420 0.496 0.060 0.024
#> GSM634707 1 0.0336 0.789834 0.992 0.000 0.008 0.000
#> GSM634711 1 0.4898 0.593147 0.584 0.000 0.416 0.000
#> GSM634715 1 0.6798 0.168429 0.620 0.284 0.060 0.036
#> GSM634633 1 0.1042 0.777878 0.972 0.000 0.008 0.020
#> GSM634634 4 0.1118 0.714636 0.000 0.000 0.036 0.964
#> GSM634635 1 0.3975 0.770768 0.760 0.000 0.240 0.000
#> GSM634636 1 0.4072 0.769424 0.748 0.000 0.252 0.000
#> GSM634637 1 0.4008 0.769054 0.756 0.000 0.244 0.000
#> GSM634638 2 0.0469 0.836505 0.000 0.988 0.000 0.012
#> GSM634639 1 0.4713 0.668876 0.640 0.000 0.360 0.000
#> GSM634640 2 0.0000 0.837896 0.000 1.000 0.000 0.000
#> GSM634641 1 0.3024 0.794730 0.852 0.000 0.148 0.000
#> GSM634642 4 0.1890 0.701982 0.000 0.056 0.008 0.936
#> GSM634644 2 0.1022 0.834809 0.000 0.968 0.000 0.032
#> GSM634645 1 0.4961 0.557944 0.552 0.000 0.448 0.000
#> GSM634646 3 0.2224 0.603945 0.032 0.000 0.928 0.040
#> GSM634647 3 0.4564 0.616557 0.000 0.000 0.672 0.328
#> GSM634651 2 0.0000 0.837896 0.000 1.000 0.000 0.000
#> GSM634652 4 0.4955 0.274839 0.000 0.444 0.000 0.556
#> GSM634654 3 0.4222 0.638417 0.000 0.000 0.728 0.272
#> GSM634655 1 0.5512 0.275742 0.496 0.000 0.488 0.016
#> GSM634656 3 0.4564 0.616557 0.000 0.000 0.672 0.328
#> GSM634657 2 0.7222 0.478410 0.404 0.500 0.060 0.036
#> GSM634658 1 0.0592 0.791722 0.984 0.000 0.016 0.000
#> GSM634660 1 0.0336 0.784994 0.992 0.000 0.000 0.008
#> GSM634661 2 0.0469 0.836505 0.000 0.988 0.000 0.012
#> GSM634662 2 0.6891 0.506113 0.392 0.528 0.056 0.024
#> GSM634663 2 0.5474 0.707512 0.164 0.756 0.056 0.024
#> GSM634664 4 0.1118 0.714636 0.000 0.000 0.036 0.964
#> GSM634665 3 0.4624 -0.000439 0.340 0.000 0.660 0.000
#> GSM634668 1 0.2670 0.745842 0.904 0.000 0.072 0.024
#> GSM634671 1 0.4961 0.557944 0.552 0.000 0.448 0.000
#> GSM634672 3 0.3266 0.644280 0.000 0.000 0.832 0.168
#> GSM634673 3 0.4477 0.624079 0.000 0.000 0.688 0.312
#> GSM634674 2 0.6820 0.598646 0.288 0.616 0.060 0.036
#> GSM634675 2 0.1661 0.830070 0.000 0.944 0.052 0.004
#> GSM634676 1 0.1118 0.788054 0.964 0.000 0.036 0.000
#> GSM634677 2 0.1305 0.835721 0.000 0.960 0.036 0.004
#> GSM634678 2 0.6854 0.547031 0.348 0.568 0.056 0.028
#> GSM634682 2 0.0469 0.836505 0.000 0.988 0.000 0.012
#> GSM634683 2 0.0592 0.839386 0.000 0.984 0.016 0.000
#> GSM634684 1 0.4382 0.733969 0.704 0.000 0.296 0.000
#> GSM634685 4 0.4401 0.336261 0.004 0.000 0.272 0.724
#> GSM634686 1 0.0707 0.792608 0.980 0.000 0.020 0.000
#> GSM634687 2 0.0000 0.837896 0.000 1.000 0.000 0.000
#> GSM634689 4 0.0592 0.716669 0.000 0.000 0.016 0.984
#> GSM634691 2 0.0592 0.839386 0.000 0.984 0.016 0.000
#> GSM634692 1 0.2589 0.796950 0.884 0.000 0.116 0.000
#> GSM634693 3 0.2281 0.567150 0.096 0.000 0.904 0.000
#> GSM634695 2 0.2513 0.820725 0.024 0.924 0.016 0.036
#> GSM634696 1 0.4134 0.765629 0.740 0.000 0.260 0.000
#> GSM634697 3 0.4564 0.616557 0.000 0.000 0.672 0.328
#> GSM634699 4 0.1211 0.714635 0.000 0.000 0.040 0.960
#> GSM634700 2 0.1209 0.836781 0.000 0.964 0.032 0.004
#> GSM634701 1 0.1022 0.794470 0.968 0.000 0.032 0.000
#> GSM634702 1 0.0895 0.779012 0.976 0.000 0.004 0.020
#> GSM634703 1 0.2174 0.751418 0.928 0.000 0.052 0.020
#> GSM634708 2 0.0000 0.837896 0.000 1.000 0.000 0.000
#> GSM634709 1 0.4543 0.717442 0.676 0.000 0.324 0.000
#> GSM634710 3 0.4843 0.528255 0.000 0.000 0.604 0.396
#> GSM634712 3 0.4888 0.500026 0.000 0.000 0.588 0.412
#> GSM634713 4 0.4933 0.281360 0.000 0.432 0.000 0.568
#> GSM634714 3 0.2483 0.600894 0.052 0.000 0.916 0.032
#> GSM634716 1 0.4040 0.767085 0.752 0.000 0.248 0.000
#> GSM634717 1 0.3024 0.794730 0.852 0.000 0.148 0.000
#> GSM634718 1 0.2174 0.751418 0.928 0.000 0.052 0.020
#> GSM634719 1 0.2647 0.796833 0.880 0.000 0.120 0.000
#> GSM634720 3 0.6031 0.498311 0.048 0.000 0.564 0.388
#> GSM634721 3 0.4795 0.166739 0.292 0.000 0.696 0.012
#> GSM634722 4 0.4527 0.607653 0.020 0.192 0.008 0.780
#> GSM634723 1 0.2174 0.751418 0.928 0.000 0.052 0.020
#> GSM634724 3 0.2589 0.563678 0.116 0.000 0.884 0.000
#> GSM634725 1 0.1118 0.793159 0.964 0.000 0.036 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0771 0.7597 0.976 0.000 0.000 0.004 0.020
#> GSM634648 1 0.1828 0.7556 0.936 0.000 0.028 0.004 0.032
#> GSM634649 1 0.1908 0.7584 0.936 0.000 0.016 0.024 0.024
#> GSM634650 5 0.2773 0.7426 0.164 0.000 0.000 0.000 0.836
#> GSM634653 3 0.6695 0.5527 0.272 0.000 0.536 0.024 0.168
#> GSM634659 5 0.4517 0.4458 0.388 0.000 0.000 0.012 0.600
#> GSM634666 4 0.4003 0.5569 0.000 0.000 0.288 0.704 0.008
#> GSM634667 2 0.0290 0.9007 0.000 0.992 0.000 0.008 0.000
#> GSM634669 1 0.4829 -0.1794 0.496 0.000 0.000 0.020 0.484
#> GSM634670 3 0.0794 0.7944 0.028 0.000 0.972 0.000 0.000
#> GSM634679 3 0.3612 0.6258 0.000 0.000 0.764 0.228 0.008
#> GSM634680 3 0.3165 0.7735 0.000 0.000 0.848 0.036 0.116
#> GSM634681 1 0.1743 0.7557 0.940 0.000 0.028 0.004 0.028
#> GSM634688 4 0.1484 0.8608 0.000 0.000 0.048 0.944 0.008
#> GSM634690 2 0.0451 0.9000 0.000 0.988 0.000 0.004 0.008
#> GSM634694 5 0.3231 0.7360 0.196 0.000 0.000 0.004 0.800
#> GSM634698 1 0.1124 0.7552 0.960 0.000 0.036 0.004 0.000
#> GSM634704 2 0.4504 0.3985 0.000 0.564 0.000 0.008 0.428
#> GSM634705 1 0.2536 0.7121 0.868 0.000 0.128 0.004 0.000
#> GSM634706 5 0.3632 0.6795 0.020 0.176 0.000 0.004 0.800
#> GSM634707 1 0.4948 0.0371 0.536 0.000 0.000 0.028 0.436
#> GSM634711 1 0.3178 0.7444 0.872 0.000 0.068 0.024 0.036
#> GSM634715 5 0.3396 0.7027 0.028 0.136 0.000 0.004 0.832
#> GSM634633 5 0.4564 0.4464 0.372 0.000 0.000 0.016 0.612
#> GSM634634 4 0.1270 0.8591 0.000 0.000 0.052 0.948 0.000
#> GSM634635 1 0.1153 0.7601 0.964 0.000 0.004 0.008 0.024
#> GSM634636 1 0.0613 0.7601 0.984 0.000 0.004 0.004 0.008
#> GSM634637 1 0.1564 0.7591 0.948 0.000 0.004 0.024 0.024
#> GSM634638 2 0.1195 0.8927 0.000 0.960 0.000 0.012 0.028
#> GSM634639 1 0.4204 0.6764 0.792 0.000 0.036 0.024 0.148
#> GSM634640 2 0.0290 0.9007 0.000 0.992 0.000 0.008 0.000
#> GSM634641 1 0.1251 0.7530 0.956 0.000 0.000 0.008 0.036
#> GSM634642 4 0.1408 0.8599 0.000 0.000 0.044 0.948 0.008
#> GSM634644 2 0.2012 0.8835 0.000 0.920 0.000 0.020 0.060
#> GSM634645 1 0.2338 0.7219 0.884 0.000 0.112 0.004 0.000
#> GSM634646 3 0.3762 0.6542 0.244 0.000 0.748 0.004 0.004
#> GSM634647 3 0.1121 0.7943 0.000 0.000 0.956 0.044 0.000
#> GSM634651 2 0.0000 0.9017 0.000 1.000 0.000 0.000 0.000
#> GSM634652 4 0.2753 0.7783 0.000 0.136 0.000 0.856 0.008
#> GSM634654 3 0.3616 0.7735 0.052 0.000 0.828 0.004 0.116
#> GSM634655 1 0.7167 -0.1250 0.432 0.000 0.336 0.028 0.204
#> GSM634656 3 0.1121 0.7943 0.000 0.000 0.956 0.044 0.000
#> GSM634657 5 0.2770 0.7034 0.008 0.124 0.000 0.004 0.864
#> GSM634658 1 0.4689 0.0594 0.560 0.000 0.000 0.016 0.424
#> GSM634660 5 0.4902 0.3643 0.408 0.000 0.000 0.028 0.564
#> GSM634661 2 0.1012 0.8963 0.000 0.968 0.000 0.012 0.020
#> GSM634662 5 0.3351 0.7024 0.020 0.148 0.000 0.004 0.828
#> GSM634663 5 0.4118 0.3726 0.000 0.336 0.000 0.004 0.660
#> GSM634664 4 0.1270 0.8591 0.000 0.000 0.052 0.948 0.000
#> GSM634665 1 0.3895 0.5410 0.728 0.000 0.264 0.004 0.004
#> GSM634668 5 0.3328 0.7407 0.176 0.008 0.000 0.004 0.812
#> GSM634671 1 0.2536 0.7121 0.868 0.000 0.128 0.004 0.000
#> GSM634672 3 0.0794 0.7944 0.028 0.000 0.972 0.000 0.000
#> GSM634673 3 0.2616 0.7846 0.000 0.000 0.880 0.020 0.100
#> GSM634674 5 0.3132 0.6578 0.000 0.172 0.000 0.008 0.820
#> GSM634675 2 0.3398 0.7429 0.000 0.780 0.000 0.004 0.216
#> GSM634676 1 0.4410 -0.0162 0.556 0.000 0.000 0.004 0.440
#> GSM634677 2 0.2233 0.8532 0.000 0.892 0.000 0.004 0.104
#> GSM634678 5 0.3328 0.6623 0.004 0.176 0.000 0.008 0.812
#> GSM634682 2 0.1195 0.8927 0.000 0.960 0.000 0.012 0.028
#> GSM634683 2 0.0000 0.9017 0.000 1.000 0.000 0.000 0.000
#> GSM634684 1 0.1954 0.7557 0.932 0.000 0.008 0.028 0.032
#> GSM634685 4 0.6477 0.0917 0.000 0.000 0.352 0.456 0.192
#> GSM634686 1 0.4835 0.1989 0.592 0.000 0.000 0.028 0.380
#> GSM634687 2 0.0290 0.9007 0.000 0.992 0.000 0.008 0.000
#> GSM634689 4 0.1484 0.8608 0.000 0.000 0.048 0.944 0.008
#> GSM634691 2 0.0162 0.9013 0.000 0.996 0.000 0.000 0.004
#> GSM634692 1 0.1764 0.7423 0.928 0.000 0.000 0.008 0.064
#> GSM634693 1 0.4583 0.0169 0.528 0.000 0.464 0.004 0.004
#> GSM634695 2 0.4717 0.4498 0.000 0.584 0.000 0.020 0.396
#> GSM634696 1 0.1153 0.7583 0.964 0.000 0.024 0.004 0.008
#> GSM634697 3 0.1121 0.7943 0.000 0.000 0.956 0.044 0.000
#> GSM634699 4 0.1270 0.8591 0.000 0.000 0.052 0.948 0.000
#> GSM634700 2 0.2233 0.8541 0.000 0.892 0.000 0.004 0.104
#> GSM634701 1 0.3807 0.5186 0.748 0.000 0.000 0.012 0.240
#> GSM634702 5 0.4470 0.4823 0.372 0.000 0.000 0.012 0.616
#> GSM634703 5 0.3430 0.7240 0.220 0.000 0.000 0.004 0.776
#> GSM634708 2 0.0000 0.9017 0.000 1.000 0.000 0.000 0.000
#> GSM634709 1 0.0727 0.7604 0.980 0.000 0.012 0.004 0.004
#> GSM634710 3 0.2011 0.7758 0.000 0.000 0.908 0.088 0.004
#> GSM634712 3 0.2304 0.7652 0.000 0.000 0.892 0.100 0.008
#> GSM634713 4 0.2969 0.7778 0.000 0.128 0.000 0.852 0.020
#> GSM634714 3 0.5500 0.7062 0.144 0.000 0.704 0.028 0.124
#> GSM634716 1 0.2178 0.7541 0.920 0.000 0.008 0.024 0.048
#> GSM634717 1 0.1408 0.7493 0.948 0.000 0.000 0.008 0.044
#> GSM634718 5 0.3430 0.7240 0.220 0.000 0.000 0.004 0.776
#> GSM634719 1 0.2325 0.7354 0.904 0.000 0.000 0.028 0.068
#> GSM634720 3 0.6448 0.6606 0.148 0.000 0.640 0.080 0.132
#> GSM634721 1 0.4151 0.3737 0.652 0.000 0.344 0.004 0.000
#> GSM634722 4 0.2299 0.8250 0.000 0.052 0.004 0.912 0.032
#> GSM634723 5 0.3461 0.7210 0.224 0.000 0.000 0.004 0.772
#> GSM634724 3 0.4915 0.5548 0.300 0.000 0.660 0.024 0.016
#> GSM634725 1 0.4252 0.3074 0.652 0.000 0.000 0.008 0.340
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.1913 0.6218 0.908 0.000 0.000 0.000 0.012 0.080
#> GSM634648 1 0.2870 0.6069 0.856 0.000 0.000 0.004 0.040 0.100
#> GSM634649 1 0.2773 0.6149 0.828 0.000 0.004 0.000 0.004 0.164
#> GSM634650 5 0.3642 0.6131 0.036 0.000 0.000 0.000 0.760 0.204
#> GSM634653 6 0.7467 -0.1103 0.208 0.000 0.292 0.024 0.076 0.400
#> GSM634659 5 0.5818 0.3716 0.228 0.000 0.000 0.000 0.492 0.280
#> GSM634666 4 0.4677 0.3315 0.000 0.000 0.328 0.620 0.008 0.044
#> GSM634667 2 0.0146 0.8774 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM634669 5 0.6131 0.1492 0.328 0.000 0.000 0.000 0.340 0.332
#> GSM634670 3 0.0458 0.7387 0.016 0.000 0.984 0.000 0.000 0.000
#> GSM634679 3 0.3695 0.6150 0.000 0.000 0.776 0.176 0.004 0.044
#> GSM634680 3 0.3528 0.5879 0.000 0.000 0.700 0.000 0.004 0.296
#> GSM634681 1 0.2393 0.6138 0.884 0.000 0.000 0.004 0.020 0.092
#> GSM634688 4 0.0520 0.8929 0.000 0.000 0.008 0.984 0.000 0.008
#> GSM634690 2 0.2398 0.8435 0.000 0.876 0.000 0.000 0.104 0.020
#> GSM634694 5 0.4107 0.5958 0.044 0.000 0.000 0.000 0.700 0.256
#> GSM634698 1 0.2048 0.6146 0.880 0.000 0.000 0.000 0.000 0.120
#> GSM634704 5 0.4783 0.0828 0.000 0.308 0.000 0.000 0.616 0.076
#> GSM634705 1 0.3150 0.5919 0.828 0.000 0.052 0.000 0.000 0.120
#> GSM634706 5 0.1692 0.6196 0.008 0.048 0.000 0.000 0.932 0.012
#> GSM634707 6 0.6105 -0.3091 0.352 0.000 0.000 0.000 0.288 0.360
#> GSM634711 1 0.3706 0.6026 0.780 0.000 0.040 0.000 0.008 0.172
#> GSM634715 5 0.1457 0.6176 0.004 0.028 0.000 0.004 0.948 0.016
#> GSM634633 5 0.5532 0.3948 0.208 0.000 0.000 0.004 0.580 0.208
#> GSM634634 4 0.1149 0.8942 0.000 0.000 0.008 0.960 0.008 0.024
#> GSM634635 1 0.1584 0.6299 0.928 0.000 0.000 0.000 0.008 0.064
#> GSM634636 1 0.0622 0.6337 0.980 0.000 0.000 0.000 0.012 0.008
#> GSM634637 1 0.2266 0.6165 0.880 0.000 0.000 0.000 0.012 0.108
#> GSM634638 2 0.2501 0.8357 0.000 0.872 0.000 0.004 0.016 0.108
#> GSM634639 1 0.3852 0.3729 0.612 0.000 0.004 0.000 0.000 0.384
#> GSM634640 2 0.0146 0.8774 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM634641 1 0.3027 0.5624 0.824 0.000 0.000 0.000 0.028 0.148
#> GSM634642 4 0.0865 0.8902 0.000 0.000 0.000 0.964 0.000 0.036
#> GSM634644 2 0.4486 0.7670 0.000 0.728 0.000 0.008 0.124 0.140
#> GSM634645 1 0.3213 0.5954 0.820 0.000 0.048 0.000 0.000 0.132
#> GSM634646 1 0.5418 0.1399 0.492 0.000 0.388 0.000 0.000 0.120
#> GSM634647 3 0.0146 0.7426 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM634651 2 0.0146 0.8780 0.000 0.996 0.000 0.000 0.004 0.000
#> GSM634652 4 0.2390 0.8658 0.000 0.044 0.000 0.896 0.008 0.052
#> GSM634654 3 0.5399 0.3465 0.108 0.000 0.528 0.000 0.004 0.360
#> GSM634655 6 0.7196 0.2100 0.296 0.000 0.160 0.004 0.116 0.424
#> GSM634656 3 0.0146 0.7426 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM634657 5 0.1780 0.6310 0.000 0.028 0.000 0.000 0.924 0.048
#> GSM634658 1 0.6111 -0.1581 0.372 0.000 0.000 0.000 0.324 0.304
#> GSM634660 5 0.6089 0.2036 0.276 0.000 0.000 0.000 0.364 0.360
#> GSM634661 2 0.2121 0.8455 0.000 0.892 0.000 0.000 0.012 0.096
#> GSM634662 5 0.1194 0.6294 0.008 0.032 0.000 0.000 0.956 0.004
#> GSM634663 5 0.3534 0.4101 0.000 0.244 0.000 0.000 0.740 0.016
#> GSM634664 4 0.1138 0.8931 0.000 0.000 0.012 0.960 0.004 0.024
#> GSM634665 1 0.3787 0.5583 0.780 0.000 0.100 0.000 0.000 0.120
#> GSM634668 5 0.1793 0.6171 0.036 0.000 0.000 0.004 0.928 0.032
#> GSM634671 1 0.3150 0.5919 0.828 0.000 0.052 0.000 0.000 0.120
#> GSM634672 3 0.0458 0.7387 0.016 0.000 0.984 0.000 0.000 0.000
#> GSM634673 3 0.3073 0.6475 0.008 0.000 0.788 0.000 0.000 0.204
#> GSM634674 5 0.1152 0.6177 0.000 0.044 0.000 0.000 0.952 0.004
#> GSM634675 2 0.4150 0.4824 0.000 0.592 0.000 0.000 0.392 0.016
#> GSM634676 1 0.6004 -0.2236 0.392 0.000 0.000 0.000 0.372 0.236
#> GSM634677 2 0.3374 0.7614 0.000 0.772 0.000 0.000 0.208 0.020
#> GSM634678 5 0.1528 0.6127 0.000 0.048 0.000 0.000 0.936 0.016
#> GSM634682 2 0.2612 0.8331 0.000 0.868 0.000 0.008 0.016 0.108
#> GSM634683 2 0.1088 0.8750 0.000 0.960 0.000 0.000 0.024 0.016
#> GSM634684 1 0.3688 0.5737 0.724 0.000 0.000 0.000 0.020 0.256
#> GSM634685 6 0.7037 -0.1206 0.000 0.000 0.192 0.280 0.096 0.432
#> GSM634686 1 0.6076 -0.0734 0.384 0.000 0.000 0.000 0.272 0.344
#> GSM634687 2 0.0291 0.8769 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM634689 4 0.0520 0.8929 0.000 0.000 0.008 0.984 0.000 0.008
#> GSM634691 2 0.1088 0.8750 0.000 0.960 0.000 0.000 0.024 0.016
#> GSM634692 1 0.3933 0.4704 0.716 0.000 0.000 0.000 0.036 0.248
#> GSM634693 1 0.4926 0.4026 0.640 0.000 0.240 0.000 0.000 0.120
#> GSM634695 5 0.5599 -0.0181 0.000 0.320 0.000 0.008 0.540 0.132
#> GSM634696 1 0.2112 0.6194 0.896 0.000 0.000 0.000 0.016 0.088
#> GSM634697 3 0.0146 0.7426 0.000 0.000 0.996 0.004 0.000 0.000
#> GSM634699 4 0.1340 0.8912 0.000 0.000 0.008 0.948 0.004 0.040
#> GSM634700 2 0.3566 0.7330 0.000 0.744 0.000 0.000 0.236 0.020
#> GSM634701 1 0.5396 0.2822 0.564 0.000 0.000 0.000 0.152 0.284
#> GSM634702 5 0.5296 0.3942 0.260 0.000 0.000 0.000 0.588 0.152
#> GSM634703 5 0.4099 0.5986 0.048 0.000 0.000 0.000 0.708 0.244
#> GSM634708 2 0.0603 0.8769 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM634709 1 0.1531 0.6344 0.928 0.000 0.000 0.000 0.004 0.068
#> GSM634710 3 0.2401 0.7130 0.000 0.000 0.892 0.060 0.004 0.044
#> GSM634712 3 0.2340 0.7131 0.000 0.000 0.896 0.056 0.004 0.044
#> GSM634713 4 0.2407 0.8581 0.000 0.048 0.000 0.892 0.004 0.056
#> GSM634714 3 0.5850 0.1370 0.192 0.000 0.424 0.000 0.000 0.384
#> GSM634716 1 0.2623 0.6028 0.852 0.000 0.000 0.000 0.016 0.132
#> GSM634717 1 0.2950 0.5645 0.828 0.000 0.000 0.000 0.024 0.148
#> GSM634718 5 0.4145 0.5953 0.048 0.000 0.000 0.000 0.700 0.252
#> GSM634719 1 0.4606 0.3810 0.604 0.000 0.000 0.000 0.052 0.344
#> GSM634720 3 0.7236 0.0832 0.136 0.000 0.388 0.040 0.056 0.380
#> GSM634721 1 0.4651 0.4739 0.700 0.000 0.172 0.000 0.004 0.124
#> GSM634722 4 0.3163 0.8040 0.000 0.008 0.000 0.824 0.024 0.144
#> GSM634723 5 0.4845 0.5464 0.092 0.000 0.000 0.000 0.628 0.280
#> GSM634724 1 0.5641 0.2254 0.504 0.000 0.328 0.000 0.000 0.168
#> GSM634725 1 0.5282 0.2265 0.568 0.000 0.000 0.000 0.304 0.128
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
Test correlation between subgroups and known annotations. If the known annotation is numeric, one-way ANOVA test is applied, and if the known annotation is discrete, chi-squared contingency table test is applied.
test_to_known_factors(res)
#> n individual(p) k
#> ATC:kmeans 85 0.466 2
#> ATC:kmeans 90 0.596 3
#> ATC:kmeans 82 0.496 4
#> ATC:kmeans 76 0.730 5
#> ATC:kmeans 64 0.470 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 17698 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 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.990 0.995 0.4969 0.504 0.504
#> 3 3 0.927 0.938 0.971 0.3516 0.701 0.471
#> 4 4 0.857 0.862 0.934 0.0950 0.902 0.716
#> 5 5 0.801 0.767 0.876 0.0757 0.880 0.593
#> 6 6 0.779 0.672 0.813 0.0353 0.968 0.851
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
#> GSM634643 1 0.0000 0.993 1.000 0.000
#> GSM634648 1 0.0000 0.993 1.000 0.000
#> GSM634649 1 0.0000 0.993 1.000 0.000
#> GSM634650 2 0.0000 0.999 0.000 1.000
#> GSM634653 1 0.0000 0.993 1.000 0.000
#> GSM634659 1 0.7139 0.763 0.804 0.196
#> GSM634666 1 0.0000 0.993 1.000 0.000
#> GSM634667 2 0.0000 0.999 0.000 1.000
#> GSM634669 1 0.0000 0.993 1.000 0.000
#> GSM634670 1 0.0000 0.993 1.000 0.000
#> GSM634679 1 0.0000 0.993 1.000 0.000
#> GSM634680 1 0.0000 0.993 1.000 0.000
#> GSM634681 1 0.0000 0.993 1.000 0.000
#> GSM634688 2 0.0000 0.999 0.000 1.000
#> GSM634690 2 0.0000 0.999 0.000 1.000
#> GSM634694 2 0.0000 0.999 0.000 1.000
#> GSM634698 1 0.0000 0.993 1.000 0.000
#> GSM634704 2 0.0000 0.999 0.000 1.000
#> GSM634705 1 0.0000 0.993 1.000 0.000
#> GSM634706 2 0.0000 0.999 0.000 1.000
#> GSM634707 1 0.0000 0.993 1.000 0.000
#> GSM634711 1 0.0000 0.993 1.000 0.000
#> GSM634715 2 0.0000 0.999 0.000 1.000
#> GSM634633 1 0.0672 0.985 0.992 0.008
#> GSM634634 2 0.0000 0.999 0.000 1.000
#> GSM634635 1 0.0000 0.993 1.000 0.000
#> GSM634636 1 0.0000 0.993 1.000 0.000
#> GSM634637 1 0.0000 0.993 1.000 0.000
#> GSM634638 2 0.0000 0.999 0.000 1.000
#> GSM634639 1 0.0000 0.993 1.000 0.000
#> GSM634640 2 0.0000 0.999 0.000 1.000
#> GSM634641 1 0.0000 0.993 1.000 0.000
#> GSM634642 2 0.0000 0.999 0.000 1.000
#> GSM634644 2 0.0000 0.999 0.000 1.000
#> GSM634645 1 0.0000 0.993 1.000 0.000
#> GSM634646 1 0.0000 0.993 1.000 0.000
#> GSM634647 1 0.0000 0.993 1.000 0.000
#> GSM634651 2 0.0000 0.999 0.000 1.000
#> GSM634652 2 0.0000 0.999 0.000 1.000
#> GSM634654 1 0.0000 0.993 1.000 0.000
#> GSM634655 1 0.0000 0.993 1.000 0.000
#> GSM634656 1 0.0000 0.993 1.000 0.000
#> GSM634657 2 0.0000 0.999 0.000 1.000
#> GSM634658 1 0.0000 0.993 1.000 0.000
#> GSM634660 1 0.1633 0.970 0.976 0.024
#> GSM634661 2 0.0000 0.999 0.000 1.000
#> GSM634662 2 0.0000 0.999 0.000 1.000
#> GSM634663 2 0.0000 0.999 0.000 1.000
#> GSM634664 2 0.1633 0.976 0.024 0.976
#> GSM634665 1 0.0000 0.993 1.000 0.000
#> GSM634668 2 0.0000 0.999 0.000 1.000
#> GSM634671 1 0.0000 0.993 1.000 0.000
#> GSM634672 1 0.0000 0.993 1.000 0.000
#> GSM634673 1 0.0000 0.993 1.000 0.000
#> GSM634674 2 0.0000 0.999 0.000 1.000
#> GSM634675 2 0.0000 0.999 0.000 1.000
#> GSM634676 1 0.0000 0.993 1.000 0.000
#> GSM634677 2 0.0000 0.999 0.000 1.000
#> GSM634678 2 0.0000 0.999 0.000 1.000
#> GSM634682 2 0.0000 0.999 0.000 1.000
#> GSM634683 2 0.0000 0.999 0.000 1.000
#> GSM634684 1 0.0000 0.993 1.000 0.000
#> GSM634685 2 0.0000 0.999 0.000 1.000
#> GSM634686 1 0.0000 0.993 1.000 0.000
#> GSM634687 2 0.0000 0.999 0.000 1.000
#> GSM634689 2 0.0000 0.999 0.000 1.000
#> GSM634691 2 0.0000 0.999 0.000 1.000
#> GSM634692 1 0.0000 0.993 1.000 0.000
#> GSM634693 1 0.0000 0.993 1.000 0.000
#> GSM634695 2 0.0000 0.999 0.000 1.000
#> GSM634696 1 0.0000 0.993 1.000 0.000
#> GSM634697 1 0.0000 0.993 1.000 0.000
#> GSM634699 2 0.1633 0.976 0.024 0.976
#> GSM634700 2 0.0000 0.999 0.000 1.000
#> GSM634701 1 0.0000 0.993 1.000 0.000
#> GSM634702 1 0.6247 0.820 0.844 0.156
#> GSM634703 2 0.0000 0.999 0.000 1.000
#> GSM634708 2 0.0000 0.999 0.000 1.000
#> GSM634709 1 0.0000 0.993 1.000 0.000
#> GSM634710 1 0.0000 0.993 1.000 0.000
#> GSM634712 1 0.0000 0.993 1.000 0.000
#> GSM634713 2 0.0000 0.999 0.000 1.000
#> GSM634714 1 0.0000 0.993 1.000 0.000
#> GSM634716 1 0.0000 0.993 1.000 0.000
#> GSM634717 1 0.0000 0.993 1.000 0.000
#> GSM634718 2 0.0000 0.999 0.000 1.000
#> GSM634719 1 0.0000 0.993 1.000 0.000
#> GSM634720 1 0.0000 0.993 1.000 0.000
#> GSM634721 1 0.0000 0.993 1.000 0.000
#> GSM634722 2 0.0000 0.999 0.000 1.000
#> GSM634723 2 0.0000 0.999 0.000 1.000
#> GSM634724 1 0.0000 0.993 1.000 0.000
#> GSM634725 1 0.0000 0.993 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634648 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634649 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634650 2 0.6267 0.112 0.452 0.548 0.000
#> GSM634653 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634659 1 0.1289 0.947 0.968 0.032 0.000
#> GSM634666 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634667 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634670 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634679 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634680 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634681 3 0.4062 0.830 0.164 0.000 0.836
#> GSM634688 3 0.0424 0.952 0.000 0.008 0.992
#> GSM634690 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634694 1 0.4291 0.793 0.820 0.180 0.000
#> GSM634698 1 0.0424 0.964 0.992 0.000 0.008
#> GSM634704 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634705 1 0.0424 0.964 0.992 0.000 0.008
#> GSM634706 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634707 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634711 1 0.0237 0.967 0.996 0.000 0.004
#> GSM634715 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634633 1 0.2313 0.931 0.944 0.032 0.024
#> GSM634634 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634635 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634636 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634637 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634638 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634639 1 0.0424 0.964 0.992 0.000 0.008
#> GSM634640 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634642 2 0.1753 0.934 0.000 0.952 0.048
#> GSM634644 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634645 1 0.0424 0.964 0.992 0.000 0.008
#> GSM634646 3 0.1411 0.938 0.036 0.000 0.964
#> GSM634647 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634651 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634652 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634654 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634655 3 0.1964 0.925 0.056 0.000 0.944
#> GSM634656 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634657 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634658 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634660 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634661 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634662 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634663 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634664 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634665 3 0.4974 0.739 0.236 0.000 0.764
#> GSM634668 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634671 1 0.1411 0.943 0.964 0.000 0.036
#> GSM634672 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634673 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634674 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634675 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634676 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634677 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634678 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634682 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634684 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634685 3 0.0592 0.949 0.000 0.012 0.988
#> GSM634686 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634689 3 0.0592 0.949 0.000 0.012 0.988
#> GSM634691 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634692 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634693 3 0.4346 0.808 0.184 0.000 0.816
#> GSM634695 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634696 3 0.5810 0.560 0.336 0.000 0.664
#> GSM634697 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634699 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634700 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634701 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634702 1 0.1289 0.947 0.968 0.032 0.000
#> GSM634703 1 0.4452 0.778 0.808 0.192 0.000
#> GSM634708 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634709 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634710 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634712 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634713 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634714 3 0.1163 0.942 0.028 0.000 0.972
#> GSM634716 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634717 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634718 1 0.4399 0.783 0.812 0.188 0.000
#> GSM634719 1 0.0000 0.968 1.000 0.000 0.000
#> GSM634720 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634721 3 0.0000 0.957 0.000 0.000 1.000
#> GSM634722 2 0.0000 0.982 0.000 1.000 0.000
#> GSM634723 1 0.4178 0.803 0.828 0.172 0.000
#> GSM634724 3 0.4504 0.795 0.196 0.000 0.804
#> GSM634725 1 0.0000 0.968 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.1211 0.887 0.960 0.000 0.040 0.000
#> GSM634648 3 0.2469 0.840 0.000 0.000 0.892 0.108
#> GSM634649 1 0.2081 0.874 0.916 0.000 0.084 0.000
#> GSM634650 2 0.3311 0.774 0.172 0.828 0.000 0.000
#> GSM634653 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634659 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634666 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634667 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634670 3 0.0336 0.900 0.000 0.000 0.992 0.008
#> GSM634679 4 0.4761 0.373 0.000 0.000 0.372 0.628
#> GSM634680 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634681 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> GSM634688 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634690 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634694 1 0.2647 0.813 0.880 0.120 0.000 0.000
#> GSM634698 1 0.4761 0.509 0.628 0.000 0.372 0.000
#> GSM634704 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634705 1 0.4925 0.385 0.572 0.000 0.428 0.000
#> GSM634706 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634707 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634711 1 0.3356 0.799 0.824 0.000 0.176 0.000
#> GSM634715 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634633 3 0.5964 0.235 0.424 0.040 0.536 0.000
#> GSM634634 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634635 1 0.1867 0.880 0.928 0.000 0.072 0.000
#> GSM634636 1 0.2149 0.874 0.912 0.000 0.088 0.000
#> GSM634637 1 0.1474 0.885 0.948 0.000 0.052 0.000
#> GSM634638 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634639 3 0.4331 0.499 0.288 0.000 0.712 0.000
#> GSM634640 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634641 1 0.0469 0.891 0.988 0.000 0.012 0.000
#> GSM634642 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634644 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634645 1 0.4907 0.404 0.580 0.000 0.420 0.000
#> GSM634646 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> GSM634647 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634651 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634652 4 0.2149 0.875 0.000 0.088 0.000 0.912
#> GSM634654 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634655 3 0.0707 0.901 0.000 0.000 0.980 0.020
#> GSM634656 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634657 2 0.0336 0.975 0.008 0.992 0.000 0.000
#> GSM634658 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634660 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634661 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634662 2 0.0188 0.979 0.004 0.996 0.000 0.000
#> GSM634663 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634664 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634665 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> GSM634668 2 0.3726 0.725 0.000 0.788 0.000 0.212
#> GSM634671 1 0.4955 0.343 0.556 0.000 0.444 0.000
#> GSM634672 3 0.0336 0.900 0.000 0.000 0.992 0.008
#> GSM634673 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634674 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634675 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634676 1 0.0188 0.890 0.996 0.000 0.004 0.000
#> GSM634677 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634678 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634682 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634683 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634684 1 0.1792 0.880 0.932 0.000 0.068 0.000
#> GSM634685 4 0.2530 0.838 0.000 0.000 0.112 0.888
#> GSM634686 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634687 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634689 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634691 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634692 1 0.0188 0.890 0.996 0.000 0.004 0.000
#> GSM634693 3 0.0000 0.898 0.000 0.000 1.000 0.000
#> GSM634695 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634696 3 0.7063 0.112 0.360 0.000 0.508 0.132
#> GSM634697 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634699 4 0.0000 0.929 0.000 0.000 0.000 1.000
#> GSM634700 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634701 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634702 1 0.0672 0.890 0.984 0.008 0.008 0.000
#> GSM634703 1 0.3219 0.769 0.836 0.164 0.000 0.000
#> GSM634708 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> GSM634709 1 0.2149 0.874 0.912 0.000 0.088 0.000
#> GSM634710 3 0.2530 0.847 0.000 0.000 0.888 0.112
#> GSM634712 3 0.2408 0.852 0.000 0.000 0.896 0.104
#> GSM634713 4 0.2149 0.875 0.000 0.088 0.000 0.912
#> GSM634714 3 0.0469 0.901 0.000 0.000 0.988 0.012
#> GSM634716 1 0.2281 0.869 0.904 0.000 0.096 0.000
#> GSM634717 1 0.0469 0.891 0.988 0.000 0.012 0.000
#> GSM634718 1 0.2921 0.794 0.860 0.140 0.000 0.000
#> GSM634719 1 0.0000 0.890 1.000 0.000 0.000 0.000
#> GSM634720 3 0.1302 0.899 0.000 0.000 0.956 0.044
#> GSM634721 3 0.0817 0.891 0.000 0.000 0.976 0.024
#> GSM634722 4 0.1118 0.910 0.000 0.036 0.000 0.964
#> GSM634723 1 0.2345 0.829 0.900 0.100 0.000 0.000
#> GSM634724 3 0.0188 0.897 0.004 0.000 0.996 0.000
#> GSM634725 1 0.0817 0.890 0.976 0.000 0.024 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.3305 0.670888 0.776 0.000 0.000 0.000 0.224
#> GSM634648 3 0.5691 0.237543 0.444 0.000 0.476 0.080 0.000
#> GSM634649 1 0.3676 0.655664 0.760 0.000 0.004 0.004 0.232
#> GSM634650 5 0.2891 0.638895 0.000 0.176 0.000 0.000 0.824
#> GSM634653 3 0.0290 0.850958 0.008 0.000 0.992 0.000 0.000
#> GSM634659 5 0.1082 0.790579 0.028 0.000 0.000 0.008 0.964
#> GSM634666 4 0.0510 0.937582 0.000 0.000 0.016 0.984 0.000
#> GSM634667 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634669 5 0.1478 0.815834 0.064 0.000 0.000 0.000 0.936
#> GSM634670 3 0.1965 0.858322 0.096 0.000 0.904 0.000 0.000
#> GSM634679 3 0.5302 0.265933 0.052 0.000 0.536 0.412 0.000
#> GSM634680 3 0.0290 0.850958 0.008 0.000 0.992 0.000 0.000
#> GSM634681 1 0.4262 0.000578 0.560 0.000 0.440 0.000 0.000
#> GSM634688 4 0.0290 0.942816 0.000 0.000 0.008 0.992 0.000
#> GSM634690 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634694 5 0.1502 0.816628 0.056 0.004 0.000 0.000 0.940
#> GSM634698 1 0.1952 0.717062 0.912 0.000 0.004 0.000 0.084
#> GSM634704 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634705 1 0.1965 0.714789 0.924 0.000 0.024 0.000 0.052
#> GSM634706 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634707 5 0.1331 0.801579 0.040 0.000 0.000 0.008 0.952
#> GSM634711 1 0.4289 0.641842 0.708 0.000 0.012 0.008 0.272
#> GSM634715 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634633 3 0.6002 0.278378 0.060 0.016 0.560 0.008 0.356
#> GSM634634 4 0.0290 0.942816 0.000 0.000 0.008 0.992 0.000
#> GSM634635 1 0.3550 0.655516 0.760 0.000 0.004 0.000 0.236
#> GSM634636 1 0.2583 0.711917 0.864 0.000 0.004 0.000 0.132
#> GSM634637 1 0.3885 0.639916 0.724 0.000 0.000 0.008 0.268
#> GSM634638 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634639 1 0.5791 0.404557 0.548 0.000 0.368 0.008 0.076
#> GSM634640 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634641 1 0.2929 0.693636 0.820 0.000 0.000 0.000 0.180
#> GSM634642 4 0.0290 0.942816 0.000 0.000 0.008 0.992 0.000
#> GSM634644 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634645 1 0.2124 0.716681 0.916 0.000 0.028 0.000 0.056
#> GSM634646 3 0.3424 0.736740 0.240 0.000 0.760 0.000 0.000
#> GSM634647 3 0.2124 0.858071 0.096 0.000 0.900 0.004 0.000
#> GSM634651 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634652 4 0.0609 0.929600 0.000 0.020 0.000 0.980 0.000
#> GSM634654 3 0.0794 0.857175 0.028 0.000 0.972 0.000 0.000
#> GSM634655 3 0.1954 0.819384 0.028 0.000 0.932 0.008 0.032
#> GSM634656 3 0.2124 0.858071 0.096 0.000 0.900 0.004 0.000
#> GSM634657 2 0.2280 0.860026 0.000 0.880 0.000 0.000 0.120
#> GSM634658 5 0.2329 0.790965 0.124 0.000 0.000 0.000 0.876
#> GSM634660 5 0.1331 0.801579 0.040 0.000 0.000 0.008 0.952
#> GSM634661 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634662 2 0.0794 0.961177 0.000 0.972 0.000 0.000 0.028
#> GSM634663 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634664 4 0.0290 0.942816 0.000 0.000 0.008 0.992 0.000
#> GSM634665 1 0.3508 0.480736 0.748 0.000 0.252 0.000 0.000
#> GSM634668 2 0.4556 0.556473 0.004 0.680 0.000 0.292 0.024
#> GSM634671 1 0.2012 0.686091 0.920 0.000 0.060 0.000 0.020
#> GSM634672 3 0.2179 0.856747 0.100 0.000 0.896 0.004 0.000
#> GSM634673 3 0.0162 0.851051 0.004 0.000 0.996 0.000 0.000
#> GSM634674 2 0.0162 0.977450 0.000 0.996 0.000 0.000 0.004
#> GSM634675 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634676 5 0.3999 0.535128 0.344 0.000 0.000 0.000 0.656
#> GSM634677 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634678 2 0.0290 0.976543 0.000 0.992 0.000 0.000 0.008
#> GSM634682 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634683 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634684 1 0.4081 0.566453 0.696 0.000 0.004 0.004 0.296
#> GSM634685 4 0.4448 0.137203 0.004 0.000 0.480 0.516 0.000
#> GSM634686 5 0.1792 0.811430 0.084 0.000 0.000 0.000 0.916
#> GSM634687 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634689 4 0.0290 0.942816 0.000 0.000 0.008 0.992 0.000
#> GSM634691 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634692 5 0.4307 0.040077 0.496 0.000 0.000 0.000 0.504
#> GSM634693 1 0.3366 0.516235 0.768 0.000 0.232 0.000 0.000
#> GSM634695 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634696 1 0.2786 0.661013 0.884 0.000 0.084 0.012 0.020
#> GSM634697 3 0.2193 0.858655 0.092 0.000 0.900 0.008 0.000
#> GSM634699 4 0.0290 0.942816 0.000 0.000 0.008 0.992 0.000
#> GSM634700 2 0.0162 0.978397 0.000 0.996 0.000 0.000 0.004
#> GSM634701 5 0.4114 0.432172 0.376 0.000 0.000 0.000 0.624
#> GSM634702 5 0.3487 0.640141 0.212 0.000 0.000 0.008 0.780
#> GSM634703 5 0.1251 0.811975 0.036 0.008 0.000 0.000 0.956
#> GSM634708 2 0.0000 0.979193 0.000 1.000 0.000 0.000 0.000
#> GSM634709 1 0.2536 0.713700 0.868 0.000 0.004 0.000 0.128
#> GSM634710 3 0.2708 0.849565 0.072 0.000 0.884 0.044 0.000
#> GSM634712 3 0.2351 0.858630 0.088 0.000 0.896 0.016 0.000
#> GSM634713 4 0.0703 0.926019 0.000 0.024 0.000 0.976 0.000
#> GSM634714 3 0.0290 0.850958 0.008 0.000 0.992 0.000 0.000
#> GSM634716 1 0.4546 0.601951 0.688 0.000 0.020 0.008 0.284
#> GSM634717 1 0.2966 0.685204 0.816 0.000 0.000 0.000 0.184
#> GSM634718 5 0.1484 0.815685 0.048 0.008 0.000 0.000 0.944
#> GSM634719 5 0.3895 0.547077 0.320 0.000 0.000 0.000 0.680
#> GSM634720 3 0.0451 0.849285 0.008 0.000 0.988 0.004 0.000
#> GSM634721 1 0.4434 -0.122798 0.536 0.000 0.460 0.004 0.000
#> GSM634722 4 0.0451 0.938558 0.000 0.008 0.004 0.988 0.000
#> GSM634723 5 0.1628 0.816659 0.056 0.008 0.000 0.000 0.936
#> GSM634724 3 0.3895 0.801808 0.164 0.000 0.796 0.008 0.032
#> GSM634725 1 0.3398 0.686161 0.780 0.000 0.000 0.004 0.216
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.3014 0.7130 0.832 0.000 0.000 0.000 0.132 0.036
#> GSM634648 3 0.5399 0.3214 0.360 0.000 0.552 0.056 0.000 0.032
#> GSM634649 1 0.3522 0.7044 0.800 0.000 0.000 0.000 0.128 0.072
#> GSM634650 5 0.4024 0.4480 0.008 0.128 0.000 0.000 0.772 0.092
#> GSM634653 3 0.3547 0.5178 0.000 0.000 0.668 0.000 0.000 0.332
#> GSM634659 6 0.4746 -0.1446 0.048 0.000 0.000 0.000 0.444 0.508
#> GSM634666 4 0.1765 0.8613 0.000 0.000 0.096 0.904 0.000 0.000
#> GSM634667 2 0.0146 0.9365 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM634669 5 0.1151 0.7012 0.032 0.000 0.000 0.000 0.956 0.012
#> GSM634670 3 0.0291 0.6819 0.004 0.000 0.992 0.000 0.000 0.004
#> GSM634679 3 0.3515 0.3830 0.000 0.000 0.676 0.324 0.000 0.000
#> GSM634680 3 0.3547 0.5177 0.000 0.000 0.668 0.000 0.000 0.332
#> GSM634681 3 0.4703 0.0544 0.464 0.000 0.492 0.000 0.000 0.044
#> GSM634688 4 0.0000 0.9670 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634690 2 0.0146 0.9364 0.000 0.996 0.000 0.000 0.000 0.004
#> GSM634694 5 0.1225 0.7020 0.036 0.000 0.000 0.000 0.952 0.012
#> GSM634698 1 0.1262 0.7310 0.956 0.000 0.008 0.000 0.016 0.020
#> GSM634704 2 0.1462 0.9222 0.000 0.936 0.000 0.000 0.008 0.056
#> GSM634705 1 0.1503 0.7236 0.944 0.000 0.032 0.000 0.008 0.016
#> GSM634706 2 0.0603 0.9343 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM634707 5 0.3683 0.5824 0.044 0.000 0.000 0.000 0.764 0.192
#> GSM634711 1 0.4303 0.6766 0.740 0.000 0.004 0.000 0.124 0.132
#> GSM634715 2 0.1219 0.9280 0.000 0.948 0.000 0.000 0.004 0.048
#> GSM634633 6 0.6094 0.1816 0.024 0.008 0.216 0.000 0.184 0.568
#> GSM634634 4 0.0000 0.9670 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634635 1 0.3455 0.6849 0.784 0.000 0.000 0.000 0.180 0.036
#> GSM634636 1 0.1226 0.7361 0.952 0.000 0.004 0.000 0.040 0.004
#> GSM634637 1 0.4699 0.6200 0.668 0.000 0.000 0.000 0.104 0.228
#> GSM634638 2 0.1701 0.9154 0.000 0.920 0.000 0.000 0.008 0.072
#> GSM634639 1 0.6268 0.2276 0.464 0.000 0.112 0.000 0.052 0.372
#> GSM634640 2 0.0508 0.9353 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM634641 1 0.4256 0.6504 0.744 0.000 0.004 0.000 0.112 0.140
#> GSM634642 4 0.0000 0.9670 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634644 2 0.1701 0.9154 0.000 0.920 0.000 0.000 0.008 0.072
#> GSM634645 1 0.2216 0.7380 0.908 0.000 0.024 0.000 0.016 0.052
#> GSM634646 3 0.3460 0.5441 0.220 0.000 0.760 0.000 0.000 0.020
#> GSM634647 3 0.0692 0.6820 0.004 0.000 0.976 0.020 0.000 0.000
#> GSM634651 2 0.0000 0.9367 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634652 4 0.0858 0.9461 0.000 0.028 0.000 0.968 0.000 0.004
#> GSM634654 3 0.2491 0.6299 0.000 0.000 0.836 0.000 0.000 0.164
#> GSM634655 3 0.4289 0.3835 0.020 0.000 0.556 0.000 0.000 0.424
#> GSM634656 3 0.0508 0.6824 0.004 0.000 0.984 0.012 0.000 0.000
#> GSM634657 2 0.3772 0.7603 0.000 0.772 0.000 0.000 0.160 0.068
#> GSM634658 5 0.3695 0.6534 0.164 0.000 0.000 0.000 0.776 0.060
#> GSM634660 5 0.3456 0.6053 0.040 0.000 0.000 0.000 0.788 0.172
#> GSM634661 2 0.1524 0.9207 0.000 0.932 0.000 0.000 0.008 0.060
#> GSM634662 2 0.2617 0.8607 0.004 0.876 0.000 0.000 0.040 0.080
#> GSM634663 2 0.0603 0.9345 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM634664 4 0.0000 0.9670 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634665 1 0.3711 0.5131 0.720 0.000 0.260 0.000 0.000 0.020
#> GSM634668 2 0.6711 0.0593 0.016 0.428 0.000 0.192 0.024 0.340
#> GSM634671 1 0.2652 0.6825 0.868 0.000 0.104 0.000 0.008 0.020
#> GSM634672 3 0.0551 0.6817 0.008 0.000 0.984 0.004 0.000 0.004
#> GSM634673 3 0.2883 0.6039 0.000 0.000 0.788 0.000 0.000 0.212
#> GSM634674 2 0.0935 0.9325 0.000 0.964 0.000 0.000 0.004 0.032
#> GSM634675 2 0.0603 0.9343 0.000 0.980 0.000 0.000 0.004 0.016
#> GSM634676 5 0.4955 0.4350 0.296 0.000 0.000 0.000 0.608 0.096
#> GSM634677 2 0.0291 0.9362 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM634678 2 0.0858 0.9299 0.000 0.968 0.000 0.000 0.004 0.028
#> GSM634682 2 0.1701 0.9154 0.000 0.920 0.000 0.000 0.008 0.072
#> GSM634683 2 0.0291 0.9362 0.000 0.992 0.000 0.000 0.004 0.004
#> GSM634684 1 0.4539 0.5987 0.688 0.000 0.000 0.000 0.216 0.096
#> GSM634685 6 0.6190 -0.0694 0.000 0.000 0.280 0.316 0.004 0.400
#> GSM634686 5 0.2006 0.7011 0.080 0.000 0.000 0.000 0.904 0.016
#> GSM634687 2 0.0858 0.9323 0.000 0.968 0.000 0.000 0.004 0.028
#> GSM634689 4 0.0000 0.9670 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634691 2 0.0405 0.9357 0.000 0.988 0.000 0.000 0.004 0.008
#> GSM634692 5 0.3986 0.1736 0.464 0.000 0.000 0.000 0.532 0.004
#> GSM634693 1 0.3778 0.4939 0.708 0.000 0.272 0.000 0.000 0.020
#> GSM634695 2 0.1701 0.9154 0.000 0.920 0.000 0.000 0.008 0.072
#> GSM634696 1 0.4828 0.5903 0.732 0.000 0.120 0.016 0.016 0.116
#> GSM634697 3 0.0692 0.6820 0.004 0.000 0.976 0.020 0.000 0.000
#> GSM634699 4 0.0000 0.9670 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634700 2 0.0508 0.9351 0.000 0.984 0.000 0.000 0.004 0.012
#> GSM634701 5 0.4396 0.4612 0.352 0.000 0.000 0.000 0.612 0.036
#> GSM634702 6 0.5776 0.0665 0.160 0.000 0.012 0.000 0.284 0.544
#> GSM634703 5 0.1913 0.6362 0.012 0.000 0.000 0.000 0.908 0.080
#> GSM634708 2 0.0000 0.9367 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634709 1 0.1913 0.7338 0.908 0.000 0.000 0.000 0.080 0.012
#> GSM634710 3 0.1267 0.6659 0.000 0.000 0.940 0.060 0.000 0.000
#> GSM634712 3 0.0692 0.6820 0.004 0.000 0.976 0.020 0.000 0.000
#> GSM634713 4 0.1321 0.9382 0.000 0.024 0.000 0.952 0.004 0.020
#> GSM634714 3 0.3898 0.5087 0.012 0.000 0.652 0.000 0.000 0.336
#> GSM634716 1 0.5198 0.6112 0.648 0.000 0.012 0.000 0.140 0.200
#> GSM634717 1 0.3071 0.6532 0.804 0.000 0.000 0.000 0.180 0.016
#> GSM634718 5 0.1257 0.6928 0.028 0.000 0.000 0.000 0.952 0.020
#> GSM634719 5 0.4408 0.5422 0.292 0.000 0.000 0.000 0.656 0.052
#> GSM634720 3 0.3592 0.5056 0.000 0.000 0.656 0.000 0.000 0.344
#> GSM634721 3 0.4629 0.3082 0.388 0.000 0.576 0.016 0.000 0.020
#> GSM634722 4 0.1483 0.9332 0.000 0.012 0.000 0.944 0.008 0.036
#> GSM634723 5 0.1245 0.6974 0.032 0.000 0.000 0.000 0.952 0.016
#> GSM634724 3 0.4597 0.4896 0.148 0.000 0.716 0.000 0.008 0.128
#> GSM634725 1 0.5155 0.2266 0.488 0.000 0.004 0.000 0.072 0.436
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 individual(p) k
#> ATC:skmeans 93 0.499 2
#> ATC:skmeans 92 0.595 3
#> ATC:skmeans 86 0.914 4
#> ATC:skmeans 83 0.784 5
#> ATC:skmeans 75 0.946 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 17698 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 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.892 0.940 0.973 0.4427 0.551 0.551
#> 3 3 0.865 0.878 0.951 0.4062 0.788 0.629
#> 4 4 0.743 0.765 0.869 0.0989 0.907 0.769
#> 5 5 0.909 0.897 0.956 0.0979 0.865 0.626
#> 6 6 0.852 0.804 0.892 0.0425 0.993 0.974
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> GSM634643 1 0.0000 0.986 1.000 0.000
#> GSM634648 1 0.0000 0.986 1.000 0.000
#> GSM634649 1 0.0000 0.986 1.000 0.000
#> GSM634650 1 0.0000 0.986 1.000 0.000
#> GSM634653 1 0.0000 0.986 1.000 0.000
#> GSM634659 1 0.0000 0.986 1.000 0.000
#> GSM634666 1 0.0000 0.986 1.000 0.000
#> GSM634667 2 0.0000 0.941 0.000 1.000
#> GSM634669 1 0.0000 0.986 1.000 0.000
#> GSM634670 1 0.0000 0.986 1.000 0.000
#> GSM634679 1 0.0000 0.986 1.000 0.000
#> GSM634680 1 0.0000 0.986 1.000 0.000
#> GSM634681 1 0.0000 0.986 1.000 0.000
#> GSM634688 2 0.5842 0.834 0.140 0.860
#> GSM634690 2 0.0000 0.941 0.000 1.000
#> GSM634694 1 0.0000 0.986 1.000 0.000
#> GSM634698 1 0.0000 0.986 1.000 0.000
#> GSM634704 2 0.9754 0.332 0.408 0.592
#> GSM634705 1 0.0000 0.986 1.000 0.000
#> GSM634706 2 0.8267 0.661 0.260 0.740
#> GSM634707 1 0.0000 0.986 1.000 0.000
#> GSM634711 1 0.0000 0.986 1.000 0.000
#> GSM634715 1 0.3733 0.912 0.928 0.072
#> GSM634633 1 0.0000 0.986 1.000 0.000
#> GSM634634 2 0.6438 0.810 0.164 0.836
#> GSM634635 1 0.0000 0.986 1.000 0.000
#> GSM634636 1 0.0000 0.986 1.000 0.000
#> GSM634637 1 0.0000 0.986 1.000 0.000
#> GSM634638 2 0.0000 0.941 0.000 1.000
#> GSM634639 1 0.0000 0.986 1.000 0.000
#> GSM634640 2 0.0000 0.941 0.000 1.000
#> GSM634641 1 0.0000 0.986 1.000 0.000
#> GSM634642 2 0.0000 0.941 0.000 1.000
#> GSM634644 2 0.0000 0.941 0.000 1.000
#> GSM634645 1 0.0000 0.986 1.000 0.000
#> GSM634646 1 0.0000 0.986 1.000 0.000
#> GSM634647 1 0.0000 0.986 1.000 0.000
#> GSM634651 2 0.0000 0.941 0.000 1.000
#> GSM634652 2 0.0000 0.941 0.000 1.000
#> GSM634654 1 0.0000 0.986 1.000 0.000
#> GSM634655 1 0.0000 0.986 1.000 0.000
#> GSM634656 1 0.0000 0.986 1.000 0.000
#> GSM634657 1 0.7219 0.739 0.800 0.200
#> GSM634658 1 0.0000 0.986 1.000 0.000
#> GSM634660 1 0.0000 0.986 1.000 0.000
#> GSM634661 2 0.0000 0.941 0.000 1.000
#> GSM634662 1 0.9552 0.375 0.624 0.376
#> GSM634663 2 0.0000 0.941 0.000 1.000
#> GSM634664 2 0.7139 0.775 0.196 0.804
#> GSM634665 1 0.0000 0.986 1.000 0.000
#> GSM634668 2 0.8555 0.646 0.280 0.720
#> GSM634671 1 0.0000 0.986 1.000 0.000
#> GSM634672 1 0.0000 0.986 1.000 0.000
#> GSM634673 1 0.0000 0.986 1.000 0.000
#> GSM634674 2 0.0000 0.941 0.000 1.000
#> GSM634675 2 0.0000 0.941 0.000 1.000
#> GSM634676 1 0.0000 0.986 1.000 0.000
#> GSM634677 2 0.0000 0.941 0.000 1.000
#> GSM634678 2 0.0000 0.941 0.000 1.000
#> GSM634682 2 0.0000 0.941 0.000 1.000
#> GSM634683 2 0.0000 0.941 0.000 1.000
#> GSM634684 1 0.0000 0.986 1.000 0.000
#> GSM634685 1 0.0000 0.986 1.000 0.000
#> GSM634686 1 0.0000 0.986 1.000 0.000
#> GSM634687 2 0.0000 0.941 0.000 1.000
#> GSM634689 2 0.0672 0.936 0.008 0.992
#> GSM634691 2 0.0000 0.941 0.000 1.000
#> GSM634692 1 0.0000 0.986 1.000 0.000
#> GSM634693 1 0.0000 0.986 1.000 0.000
#> GSM634695 2 0.0000 0.941 0.000 1.000
#> GSM634696 1 0.0000 0.986 1.000 0.000
#> GSM634697 1 0.0000 0.986 1.000 0.000
#> GSM634699 2 0.8144 0.700 0.252 0.748
#> GSM634700 2 0.0000 0.941 0.000 1.000
#> GSM634701 1 0.0000 0.986 1.000 0.000
#> GSM634702 1 0.0000 0.986 1.000 0.000
#> GSM634703 1 0.5408 0.847 0.876 0.124
#> GSM634708 2 0.0000 0.941 0.000 1.000
#> GSM634709 1 0.0000 0.986 1.000 0.000
#> GSM634710 1 0.0000 0.986 1.000 0.000
#> GSM634712 1 0.0000 0.986 1.000 0.000
#> GSM634713 2 0.0000 0.941 0.000 1.000
#> GSM634714 1 0.0000 0.986 1.000 0.000
#> GSM634716 1 0.0000 0.986 1.000 0.000
#> GSM634717 1 0.0000 0.986 1.000 0.000
#> GSM634718 1 0.0000 0.986 1.000 0.000
#> GSM634719 1 0.0000 0.986 1.000 0.000
#> GSM634720 1 0.0000 0.986 1.000 0.000
#> GSM634721 1 0.0000 0.986 1.000 0.000
#> GSM634722 2 0.0000 0.941 0.000 1.000
#> GSM634723 1 0.0000 0.986 1.000 0.000
#> GSM634724 1 0.0000 0.986 1.000 0.000
#> GSM634725 1 0.0000 0.986 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0424 0.954 0.992 0.000 0.008
#> GSM634648 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634649 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634650 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634653 1 0.6045 0.324 0.620 0.000 0.380
#> GSM634659 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634666 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634667 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634669 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634670 3 0.6180 0.205 0.416 0.000 0.584
#> GSM634679 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634680 3 0.0000 0.921 0.000 0.000 1.000
#> GSM634681 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634688 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634690 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634694 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634698 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634704 2 0.6154 0.301 0.408 0.592 0.000
#> GSM634705 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634706 2 0.5254 0.617 0.264 0.736 0.000
#> GSM634707 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634711 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634715 1 0.3340 0.840 0.880 0.120 0.000
#> GSM634633 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634634 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634635 1 0.0592 0.953 0.988 0.000 0.012
#> GSM634636 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634637 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634638 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634639 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634640 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634642 3 0.6252 0.133 0.000 0.444 0.556
#> GSM634644 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634645 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634646 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634647 3 0.0000 0.921 0.000 0.000 1.000
#> GSM634651 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634652 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634654 3 0.3816 0.772 0.148 0.000 0.852
#> GSM634655 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634656 3 0.0000 0.921 0.000 0.000 1.000
#> GSM634657 1 0.4504 0.745 0.804 0.196 0.000
#> GSM634658 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634660 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634661 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634662 1 0.6026 0.385 0.624 0.376 0.000
#> GSM634663 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634664 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634665 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634668 2 0.5698 0.620 0.252 0.736 0.012
#> GSM634671 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634672 3 0.0000 0.921 0.000 0.000 1.000
#> GSM634673 3 0.0000 0.921 0.000 0.000 1.000
#> GSM634674 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634675 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634676 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634677 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634678 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634682 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634683 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634684 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634685 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634686 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634687 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634689 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634691 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634692 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634693 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634695 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634696 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634697 3 0.0000 0.921 0.000 0.000 1.000
#> GSM634699 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634700 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634701 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634702 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634703 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634708 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634709 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634710 3 0.0237 0.923 0.004 0.000 0.996
#> GSM634712 3 0.0892 0.926 0.020 0.000 0.980
#> GSM634713 2 0.0000 0.930 0.000 1.000 0.000
#> GSM634714 1 0.4452 0.769 0.808 0.000 0.192
#> GSM634716 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634717 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634718 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634719 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634720 3 0.1031 0.924 0.024 0.000 0.976
#> GSM634721 1 0.6095 0.385 0.608 0.000 0.392
#> GSM634722 2 0.6180 0.262 0.000 0.584 0.416
#> GSM634723 1 0.0000 0.956 1.000 0.000 0.000
#> GSM634724 1 0.0892 0.950 0.980 0.000 0.020
#> GSM634725 1 0.0000 0.956 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634648 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634649 1 0.0188 0.9000 0.996 0.000 0.004 0.000
#> GSM634650 1 0.4356 0.6426 0.708 0.000 0.292 0.000
#> GSM634653 1 0.0817 0.8874 0.976 0.000 0.000 0.024
#> GSM634659 1 0.4331 0.6480 0.712 0.000 0.288 0.000
#> GSM634666 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634667 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634670 3 0.4882 0.7740 0.020 0.000 0.708 0.272
#> GSM634679 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634680 3 0.4382 0.7800 0.000 0.000 0.704 0.296
#> GSM634681 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634688 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634690 2 0.2973 0.8143 0.000 0.856 0.144 0.000
#> GSM634694 1 0.0188 0.9002 0.996 0.000 0.004 0.000
#> GSM634698 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634704 1 0.7890 -0.2143 0.372 0.336 0.292 0.000
#> GSM634705 1 0.0188 0.9000 0.996 0.000 0.004 0.000
#> GSM634706 2 0.7845 0.3752 0.304 0.404 0.292 0.000
#> GSM634707 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634711 1 0.0817 0.8883 0.976 0.000 0.024 0.000
#> GSM634715 1 0.7597 0.4223 0.564 0.096 0.292 0.048
#> GSM634633 1 0.4277 0.6562 0.720 0.000 0.280 0.000
#> GSM634634 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634635 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634636 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634637 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634638 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634639 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634640 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634641 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634642 4 0.0376 0.8543 0.000 0.004 0.004 0.992
#> GSM634644 2 0.4331 0.7627 0.000 0.712 0.288 0.000
#> GSM634645 1 0.0188 0.9000 0.996 0.000 0.004 0.000
#> GSM634646 1 0.3528 0.7149 0.808 0.000 0.192 0.000
#> GSM634647 3 0.4406 0.7784 0.000 0.000 0.700 0.300
#> GSM634651 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634652 2 0.2921 0.7089 0.000 0.860 0.000 0.140
#> GSM634654 3 0.5690 0.7119 0.096 0.000 0.708 0.196
#> GSM634655 3 0.4331 0.3591 0.288 0.000 0.712 0.000
#> GSM634656 3 0.4356 0.7818 0.000 0.000 0.708 0.292
#> GSM634657 1 0.7369 0.2637 0.512 0.196 0.292 0.000
#> GSM634658 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634660 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634661 2 0.3311 0.8096 0.000 0.828 0.172 0.000
#> GSM634662 1 0.7818 -0.0662 0.416 0.292 0.292 0.000
#> GSM634663 2 0.4356 0.7603 0.000 0.708 0.292 0.000
#> GSM634664 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634665 1 0.1792 0.8535 0.932 0.000 0.068 0.000
#> GSM634668 4 0.6465 0.4742 0.012 0.072 0.292 0.624
#> GSM634671 1 0.0817 0.8882 0.976 0.000 0.024 0.000
#> GSM634672 3 0.4356 0.7818 0.000 0.000 0.708 0.292
#> GSM634673 3 0.4356 0.7818 0.000 0.000 0.708 0.292
#> GSM634674 2 0.6681 0.6507 0.120 0.588 0.292 0.000
#> GSM634675 2 0.3266 0.8098 0.000 0.832 0.168 0.000
#> GSM634676 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634677 2 0.2973 0.8143 0.000 0.856 0.144 0.000
#> GSM634678 2 0.7103 0.6435 0.120 0.576 0.292 0.012
#> GSM634682 2 0.2011 0.8080 0.000 0.920 0.080 0.000
#> GSM634683 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634684 1 0.0188 0.9000 0.996 0.000 0.004 0.000
#> GSM634685 3 0.3764 0.2582 0.000 0.000 0.784 0.216
#> GSM634686 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634687 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634689 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634691 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634692 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634693 1 0.2921 0.7807 0.860 0.000 0.140 0.000
#> GSM634695 2 0.4331 0.7627 0.000 0.712 0.288 0.000
#> GSM634696 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634697 3 0.4356 0.7818 0.000 0.000 0.708 0.292
#> GSM634699 4 0.0000 0.8605 0.000 0.000 0.000 1.000
#> GSM634700 2 0.4331 0.7627 0.000 0.712 0.288 0.000
#> GSM634701 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634702 1 0.4356 0.6426 0.708 0.000 0.292 0.000
#> GSM634703 1 0.1474 0.8696 0.948 0.000 0.052 0.000
#> GSM634708 2 0.0000 0.8070 0.000 1.000 0.000 0.000
#> GSM634709 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634710 3 0.4804 0.6887 0.000 0.000 0.616 0.384
#> GSM634712 3 0.4522 0.7641 0.000 0.000 0.680 0.320
#> GSM634713 2 0.5630 0.7333 0.000 0.724 0.140 0.136
#> GSM634714 3 0.4621 0.5291 0.284 0.000 0.708 0.008
#> GSM634716 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634717 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634718 1 0.0188 0.9002 0.996 0.000 0.004 0.000
#> GSM634719 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634720 3 0.4769 0.7712 0.008 0.000 0.684 0.308
#> GSM634721 1 0.3958 0.7438 0.824 0.000 0.032 0.144
#> GSM634722 4 0.6811 0.4040 0.000 0.144 0.268 0.588
#> GSM634723 1 0.0000 0.9015 1.000 0.000 0.000 0.000
#> GSM634724 3 0.4356 0.5208 0.292 0.000 0.708 0.000
#> GSM634725 1 0.0188 0.9000 0.996 0.000 0.004 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634648 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634649 1 0.0290 0.964 0.992 0.000 0.008 0.000 0.000
#> GSM634650 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634653 1 0.0162 0.965 0.996 0.000 0.004 0.000 0.000
#> GSM634659 5 0.0162 0.889 0.004 0.000 0.000 0.000 0.996
#> GSM634666 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634667 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634669 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634670 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000
#> GSM634679 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634680 3 0.0290 0.951 0.000 0.000 0.992 0.008 0.000
#> GSM634681 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634688 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634690 5 0.4150 0.430 0.000 0.388 0.000 0.000 0.612
#> GSM634694 1 0.0703 0.953 0.976 0.000 0.000 0.000 0.024
#> GSM634698 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634704 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634705 1 0.0290 0.964 0.992 0.000 0.008 0.000 0.000
#> GSM634706 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634707 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634711 1 0.0703 0.955 0.976 0.000 0.024 0.000 0.000
#> GSM634715 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634633 5 0.3274 0.606 0.220 0.000 0.000 0.000 0.780
#> GSM634634 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634635 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634637 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634638 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634639 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634640 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634641 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634642 4 0.0162 0.967 0.000 0.004 0.000 0.996 0.000
#> GSM634644 5 0.0510 0.884 0.000 0.016 0.000 0.000 0.984
#> GSM634645 1 0.0290 0.964 0.992 0.000 0.008 0.000 0.000
#> GSM634646 1 0.3109 0.769 0.800 0.000 0.200 0.000 0.000
#> GSM634647 3 0.0162 0.953 0.000 0.000 0.996 0.004 0.000
#> GSM634651 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634652 4 0.0404 0.962 0.000 0.012 0.000 0.988 0.000
#> GSM634654 3 0.0162 0.953 0.000 0.000 0.996 0.004 0.000
#> GSM634655 3 0.3109 0.696 0.200 0.000 0.800 0.000 0.000
#> GSM634656 3 0.0162 0.953 0.000 0.000 0.996 0.004 0.000
#> GSM634657 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634658 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634660 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634661 5 0.4192 0.349 0.000 0.404 0.000 0.000 0.596
#> GSM634662 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634663 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634664 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634665 1 0.1544 0.920 0.932 0.000 0.068 0.000 0.000
#> GSM634668 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634671 1 0.0703 0.955 0.976 0.000 0.024 0.000 0.000
#> GSM634672 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000
#> GSM634673 3 0.0162 0.953 0.000 0.000 0.996 0.004 0.000
#> GSM634674 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634675 5 0.4045 0.489 0.000 0.356 0.000 0.000 0.644
#> GSM634676 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634677 5 0.4101 0.461 0.000 0.372 0.000 0.000 0.628
#> GSM634678 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634682 2 0.3999 0.413 0.000 0.656 0.000 0.000 0.344
#> GSM634683 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634684 1 0.0290 0.964 0.992 0.000 0.008 0.000 0.000
#> GSM634685 3 0.4204 0.710 0.000 0.000 0.756 0.196 0.048
#> GSM634686 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634687 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634689 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634691 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634692 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634693 1 0.2516 0.845 0.860 0.000 0.140 0.000 0.000
#> GSM634695 5 0.0290 0.888 0.000 0.008 0.000 0.000 0.992
#> GSM634696 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634697 3 0.0162 0.953 0.000 0.000 0.996 0.004 0.000
#> GSM634699 4 0.0000 0.970 0.000 0.000 0.000 1.000 0.000
#> GSM634700 5 0.0290 0.888 0.000 0.008 0.000 0.000 0.992
#> GSM634701 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634702 5 0.0000 0.892 0.000 0.000 0.000 0.000 1.000
#> GSM634703 1 0.3837 0.570 0.692 0.000 0.000 0.000 0.308
#> GSM634708 2 0.0000 0.947 0.000 1.000 0.000 0.000 0.000
#> GSM634709 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634710 3 0.1732 0.898 0.000 0.000 0.920 0.080 0.000
#> GSM634712 3 0.0404 0.949 0.000 0.000 0.988 0.012 0.000
#> GSM634713 4 0.0404 0.962 0.000 0.012 0.000 0.988 0.000
#> GSM634714 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000
#> GSM634716 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634717 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634718 1 0.1608 0.910 0.928 0.000 0.000 0.000 0.072
#> GSM634719 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634720 3 0.0807 0.942 0.012 0.000 0.976 0.012 0.000
#> GSM634721 1 0.0963 0.947 0.964 0.000 0.036 0.000 0.000
#> GSM634722 4 0.3398 0.705 0.000 0.004 0.000 0.780 0.216
#> GSM634723 1 0.0000 0.967 1.000 0.000 0.000 0.000 0.000
#> GSM634724 3 0.0162 0.949 0.004 0.000 0.996 0.000 0.000
#> GSM634725 1 0.3242 0.717 0.784 0.000 0.000 0.000 0.216
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634648 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634649 1 0.2664 0.794 0.816 0.000 0.000 0.000 0.000 0.184
#> GSM634650 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634653 1 0.0964 0.866 0.968 0.000 0.012 0.016 0.000 0.004
#> GSM634659 5 0.0713 0.858 0.000 0.000 0.000 0.000 0.972 0.028
#> GSM634666 4 0.0146 0.956 0.000 0.000 0.000 0.996 0.000 0.004
#> GSM634667 2 0.3833 0.850 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM634669 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634670 3 0.0260 0.910 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM634679 4 0.1285 0.926 0.000 0.000 0.004 0.944 0.000 0.052
#> GSM634680 3 0.0146 0.910 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM634681 1 0.0713 0.870 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM634688 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634690 5 0.4808 0.120 0.000 0.052 0.000 0.000 0.480 0.468
#> GSM634694 1 0.0713 0.868 0.972 0.000 0.000 0.000 0.028 0.000
#> GSM634698 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634704 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634705 1 0.3774 0.631 0.592 0.000 0.000 0.000 0.000 0.408
#> GSM634706 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634707 1 0.0713 0.870 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM634711 1 0.2969 0.781 0.776 0.000 0.000 0.000 0.000 0.224
#> GSM634715 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634633 5 0.2941 0.603 0.220 0.000 0.000 0.000 0.780 0.000
#> GSM634634 4 0.0458 0.957 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM634635 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634637 1 0.0713 0.870 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM634638 2 0.0000 0.618 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634639 1 0.0713 0.870 0.972 0.000 0.000 0.000 0.000 0.028
#> GSM634640 2 0.3833 0.850 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM634641 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634642 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634644 5 0.3025 0.751 0.000 0.156 0.000 0.000 0.820 0.024
#> GSM634645 1 0.3797 0.626 0.580 0.000 0.000 0.000 0.000 0.420
#> GSM634646 1 0.4334 0.609 0.568 0.000 0.024 0.000 0.000 0.408
#> GSM634647 3 0.1644 0.893 0.000 0.000 0.920 0.004 0.000 0.076
#> GSM634651 2 0.3833 0.850 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM634652 4 0.0937 0.945 0.000 0.000 0.000 0.960 0.000 0.040
#> GSM634654 3 0.0146 0.910 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM634655 3 0.3543 0.660 0.200 0.000 0.768 0.000 0.000 0.032
#> GSM634656 3 0.1501 0.894 0.000 0.000 0.924 0.000 0.000 0.076
#> GSM634657 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634658 1 0.0632 0.872 0.976 0.000 0.000 0.000 0.000 0.024
#> GSM634660 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634661 2 0.4210 0.220 0.000 0.672 0.000 0.000 0.288 0.040
#> GSM634662 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634663 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634664 4 0.0458 0.957 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM634665 1 0.4184 0.617 0.576 0.000 0.016 0.000 0.000 0.408
#> GSM634668 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634671 1 0.4261 0.613 0.572 0.000 0.020 0.000 0.000 0.408
#> GSM634672 3 0.1141 0.902 0.000 0.000 0.948 0.000 0.000 0.052
#> GSM634673 3 0.0146 0.910 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM634674 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634675 5 0.4465 0.196 0.000 0.028 0.000 0.000 0.512 0.460
#> GSM634676 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634677 5 0.4649 0.155 0.000 0.040 0.000 0.000 0.492 0.468
#> GSM634678 5 0.0000 0.874 0.000 0.000 0.000 0.000 1.000 0.000
#> GSM634682 2 0.0713 0.600 0.000 0.972 0.000 0.000 0.028 0.000
#> GSM634683 2 0.3838 0.847 0.000 0.552 0.000 0.000 0.000 0.448
#> GSM634684 1 0.3563 0.691 0.664 0.000 0.000 0.000 0.000 0.336
#> GSM634685 3 0.6738 0.318 0.000 0.300 0.452 0.196 0.048 0.004
#> GSM634686 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634687 2 0.3833 0.850 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM634689 4 0.0000 0.957 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634691 2 0.3833 0.850 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM634692 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634693 1 0.4261 0.613 0.572 0.000 0.020 0.000 0.000 0.408
#> GSM634695 5 0.0547 0.866 0.000 0.000 0.000 0.000 0.980 0.020
#> GSM634696 1 0.1714 0.844 0.908 0.000 0.000 0.000 0.000 0.092
#> GSM634697 3 0.0260 0.910 0.000 0.000 0.992 0.000 0.000 0.008
#> GSM634699 4 0.0458 0.957 0.000 0.000 0.000 0.984 0.000 0.016
#> GSM634700 5 0.0632 0.864 0.000 0.000 0.000 0.000 0.976 0.024
#> GSM634701 1 0.0363 0.875 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM634702 5 0.0713 0.858 0.000 0.000 0.000 0.000 0.972 0.028
#> GSM634703 1 0.3446 0.593 0.692 0.000 0.000 0.000 0.308 0.000
#> GSM634708 2 0.3833 0.850 0.000 0.556 0.000 0.000 0.000 0.444
#> GSM634709 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634710 3 0.2165 0.854 0.000 0.000 0.884 0.108 0.000 0.008
#> GSM634712 3 0.2420 0.879 0.000 0.000 0.884 0.040 0.000 0.076
#> GSM634713 4 0.0777 0.947 0.000 0.004 0.000 0.972 0.000 0.024
#> GSM634714 3 0.0146 0.910 0.000 0.000 0.996 0.000 0.000 0.004
#> GSM634716 1 0.0363 0.875 0.988 0.000 0.000 0.000 0.000 0.012
#> GSM634717 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634718 1 0.1501 0.841 0.924 0.000 0.000 0.000 0.076 0.000
#> GSM634719 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634720 3 0.0692 0.904 0.000 0.000 0.976 0.020 0.000 0.004
#> GSM634721 1 0.4305 0.597 0.544 0.000 0.020 0.000 0.000 0.436
#> GSM634722 4 0.3243 0.708 0.000 0.000 0.008 0.780 0.208 0.004
#> GSM634723 1 0.0000 0.878 1.000 0.000 0.000 0.000 0.000 0.000
#> GSM634724 3 0.1168 0.892 0.016 0.000 0.956 0.000 0.000 0.028
#> GSM634725 1 0.3586 0.644 0.756 0.000 0.000 0.000 0.216 0.028
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 individual(p) k
#> ATC:pam 91 0.152 2
#> ATC:pam 86 0.340 3
#> ATC:pam 84 0.181 4
#> ATC:pam 88 0.656 5
#> ATC:pam 88 0.651 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 17698 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 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.888 0.910 0.958 0.4876 0.511 0.511
#> 3 3 0.645 0.826 0.880 0.2109 0.713 0.516
#> 4 4 0.705 0.689 0.836 0.1649 0.818 0.575
#> 5 5 0.718 0.483 0.772 0.1221 0.821 0.509
#> 6 6 0.853 0.769 0.860 0.0186 0.836 0.489
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
#> GSM634643 1 0.0000 0.968 1.000 0.000
#> GSM634648 2 0.4690 0.880 0.100 0.900
#> GSM634649 1 0.0938 0.971 0.988 0.012
#> GSM634650 1 0.0938 0.971 0.988 0.012
#> GSM634653 2 0.0672 0.948 0.008 0.992
#> GSM634659 1 0.0376 0.969 0.996 0.004
#> GSM634666 2 0.0000 0.947 0.000 1.000
#> GSM634667 2 0.0672 0.948 0.008 0.992
#> GSM634669 1 0.0938 0.971 0.988 0.012
#> GSM634670 2 0.0672 0.948 0.008 0.992
#> GSM634679 2 0.0000 0.947 0.000 1.000
#> GSM634680 2 0.0000 0.947 0.000 1.000
#> GSM634681 1 0.2778 0.943 0.952 0.048
#> GSM634688 2 0.0000 0.947 0.000 1.000
#> GSM634690 2 0.0672 0.948 0.008 0.992
#> GSM634694 1 0.0938 0.971 0.988 0.012
#> GSM634698 1 0.0000 0.968 1.000 0.000
#> GSM634704 2 0.3879 0.903 0.076 0.924
#> GSM634705 1 0.0672 0.970 0.992 0.008
#> GSM634706 2 0.9896 0.264 0.440 0.560
#> GSM634707 1 0.0938 0.971 0.988 0.012
#> GSM634711 1 0.0938 0.971 0.988 0.012
#> GSM634715 2 0.2603 0.927 0.044 0.956
#> GSM634633 2 0.8144 0.686 0.252 0.748
#> GSM634634 2 0.0000 0.947 0.000 1.000
#> GSM634635 1 0.0000 0.968 1.000 0.000
#> GSM634636 1 0.0000 0.968 1.000 0.000
#> GSM634637 1 0.0000 0.968 1.000 0.000
#> GSM634638 2 0.0376 0.948 0.004 0.996
#> GSM634639 1 0.3733 0.921 0.928 0.072
#> GSM634640 2 0.0672 0.948 0.008 0.992
#> GSM634641 1 0.0000 0.968 1.000 0.000
#> GSM634642 2 0.0000 0.947 0.000 1.000
#> GSM634644 2 0.0376 0.948 0.004 0.996
#> GSM634645 1 0.0672 0.970 0.992 0.008
#> GSM634646 2 0.1414 0.943 0.020 0.980
#> GSM634647 2 0.0000 0.947 0.000 1.000
#> GSM634651 2 0.0672 0.948 0.008 0.992
#> GSM634652 2 0.0000 0.947 0.000 1.000
#> GSM634654 2 0.0672 0.948 0.008 0.992
#> GSM634655 2 0.0672 0.948 0.008 0.992
#> GSM634656 2 0.0000 0.947 0.000 1.000
#> GSM634657 1 0.9881 0.168 0.564 0.436
#> GSM634658 1 0.0000 0.968 1.000 0.000
#> GSM634660 1 0.1843 0.960 0.972 0.028
#> GSM634661 2 0.0672 0.948 0.008 0.992
#> GSM634662 1 0.0938 0.971 0.988 0.012
#> GSM634663 1 0.3274 0.933 0.940 0.060
#> GSM634664 2 0.0000 0.947 0.000 1.000
#> GSM634665 1 0.6801 0.776 0.820 0.180
#> GSM634668 2 0.2778 0.924 0.048 0.952
#> GSM634671 1 0.3584 0.924 0.932 0.068
#> GSM634672 2 0.0672 0.948 0.008 0.992
#> GSM634673 2 0.0000 0.947 0.000 1.000
#> GSM634674 2 0.9963 0.182 0.464 0.536
#> GSM634675 2 0.7815 0.717 0.232 0.768
#> GSM634676 1 0.0000 0.968 1.000 0.000
#> GSM634677 2 0.4298 0.891 0.088 0.912
#> GSM634678 2 0.0938 0.947 0.012 0.988
#> GSM634682 2 0.0000 0.947 0.000 1.000
#> GSM634683 2 0.5842 0.839 0.140 0.860
#> GSM634684 1 0.0938 0.971 0.988 0.012
#> GSM634685 2 0.0000 0.947 0.000 1.000
#> GSM634686 1 0.0938 0.971 0.988 0.012
#> GSM634687 2 0.0672 0.948 0.008 0.992
#> GSM634689 2 0.0000 0.947 0.000 1.000
#> GSM634691 2 0.0938 0.947 0.012 0.988
#> GSM634692 1 0.0000 0.968 1.000 0.000
#> GSM634693 2 0.9954 0.201 0.460 0.540
#> GSM634695 2 0.0672 0.948 0.008 0.992
#> GSM634696 2 0.3584 0.909 0.068 0.932
#> GSM634697 2 0.0000 0.947 0.000 1.000
#> GSM634699 2 0.0000 0.947 0.000 1.000
#> GSM634700 2 0.0938 0.947 0.012 0.988
#> GSM634701 1 0.0000 0.968 1.000 0.000
#> GSM634702 1 0.1184 0.969 0.984 0.016
#> GSM634703 1 0.1184 0.969 0.984 0.016
#> GSM634708 2 0.0938 0.947 0.012 0.988
#> GSM634709 1 0.0000 0.968 1.000 0.000
#> GSM634710 2 0.0000 0.947 0.000 1.000
#> GSM634712 2 0.0000 0.947 0.000 1.000
#> GSM634713 2 0.0000 0.947 0.000 1.000
#> GSM634714 2 0.0672 0.948 0.008 0.992
#> GSM634716 1 0.0938 0.971 0.988 0.012
#> GSM634717 1 0.0000 0.968 1.000 0.000
#> GSM634718 1 0.0938 0.971 0.988 0.012
#> GSM634719 1 0.0938 0.971 0.988 0.012
#> GSM634720 2 0.0672 0.948 0.008 0.992
#> GSM634721 2 0.0938 0.947 0.012 0.988
#> GSM634722 2 0.0000 0.947 0.000 1.000
#> GSM634723 1 0.1184 0.969 0.984 0.016
#> GSM634724 2 0.6048 0.829 0.148 0.852
#> GSM634725 1 0.0376 0.969 0.996 0.004
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634648 1 0.7534 0.243 0.584 0.048 0.368
#> GSM634649 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634650 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634653 3 0.8484 0.620 0.196 0.188 0.616
#> GSM634659 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634666 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634667 2 0.4840 0.930 0.168 0.816 0.016
#> GSM634669 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634670 3 0.5119 0.772 0.032 0.152 0.816
#> GSM634679 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634680 3 0.4346 0.772 0.000 0.184 0.816
#> GSM634681 1 0.1860 0.918 0.948 0.052 0.000
#> GSM634688 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634690 2 0.4897 0.929 0.172 0.812 0.016
#> GSM634694 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634698 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634704 2 0.6662 0.830 0.252 0.704 0.044
#> GSM634705 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634706 1 0.2703 0.900 0.928 0.056 0.016
#> GSM634707 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634711 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634715 1 0.3683 0.868 0.896 0.060 0.044
#> GSM634633 1 0.2599 0.905 0.932 0.052 0.016
#> GSM634634 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634635 1 0.0000 0.946 1.000 0.000 0.000
#> GSM634636 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634637 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634638 3 0.6215 0.615 0.000 0.428 0.572
#> GSM634639 1 0.1399 0.938 0.968 0.028 0.004
#> GSM634640 2 0.4840 0.930 0.168 0.816 0.016
#> GSM634641 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634642 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634644 3 0.6225 0.611 0.000 0.432 0.568
#> GSM634645 1 0.0000 0.946 1.000 0.000 0.000
#> GSM634646 3 0.7699 0.294 0.420 0.048 0.532
#> GSM634647 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634651 2 0.4840 0.930 0.168 0.816 0.016
#> GSM634652 3 0.4452 0.700 0.000 0.192 0.808
#> GSM634654 3 0.5109 0.764 0.008 0.212 0.780
#> GSM634655 3 0.8876 0.598 0.204 0.220 0.576
#> GSM634656 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634657 1 0.2269 0.917 0.944 0.040 0.016
#> GSM634658 1 0.0000 0.946 1.000 0.000 0.000
#> GSM634660 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634661 2 0.2200 0.616 0.004 0.940 0.056
#> GSM634662 1 0.0848 0.945 0.984 0.008 0.008
#> GSM634663 2 0.6936 0.441 0.460 0.524 0.016
#> GSM634664 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634665 1 0.2280 0.913 0.940 0.052 0.008
#> GSM634668 1 0.5955 0.663 0.772 0.048 0.180
#> GSM634671 1 0.1163 0.936 0.972 0.028 0.000
#> GSM634672 3 0.3791 0.761 0.060 0.048 0.892
#> GSM634673 3 0.4605 0.769 0.000 0.204 0.796
#> GSM634674 1 0.3769 0.850 0.880 0.104 0.016
#> GSM634675 2 0.5008 0.923 0.180 0.804 0.016
#> GSM634676 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634677 2 0.4897 0.929 0.172 0.812 0.016
#> GSM634678 3 0.7796 0.335 0.392 0.056 0.552
#> GSM634682 3 0.6126 0.637 0.000 0.400 0.600
#> GSM634683 2 0.5115 0.912 0.188 0.796 0.016
#> GSM634684 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634685 3 0.4399 0.772 0.000 0.188 0.812
#> GSM634686 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634687 2 0.4840 0.930 0.168 0.816 0.016
#> GSM634689 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634691 2 0.4840 0.930 0.168 0.816 0.016
#> GSM634692 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634693 1 0.2031 0.926 0.952 0.032 0.016
#> GSM634695 3 0.6225 0.611 0.000 0.432 0.568
#> GSM634696 1 0.6523 0.565 0.724 0.048 0.228
#> GSM634697 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634699 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634700 2 0.4897 0.929 0.172 0.812 0.016
#> GSM634701 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634702 1 0.1289 0.934 0.968 0.032 0.000
#> GSM634703 1 0.0983 0.941 0.980 0.004 0.016
#> GSM634708 2 0.4840 0.930 0.168 0.816 0.016
#> GSM634709 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634710 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634712 3 0.0000 0.795 0.000 0.000 1.000
#> GSM634713 3 0.4452 0.700 0.000 0.192 0.808
#> GSM634714 3 0.8876 0.598 0.204 0.220 0.576
#> GSM634716 1 0.0747 0.946 0.984 0.016 0.000
#> GSM634717 1 0.0237 0.946 0.996 0.004 0.000
#> GSM634718 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634719 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634720 3 0.4654 0.767 0.000 0.208 0.792
#> GSM634721 3 0.7567 0.373 0.376 0.048 0.576
#> GSM634722 3 0.6026 0.661 0.000 0.376 0.624
#> GSM634723 1 0.0592 0.946 0.988 0.012 0.000
#> GSM634724 1 0.3112 0.893 0.916 0.056 0.028
#> GSM634725 1 0.0747 0.943 0.984 0.016 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634648 3 0.5685 0.41294 0.460 0.024 0.516 0.000
#> GSM634649 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634650 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634653 3 0.5222 0.43026 0.112 0.000 0.756 0.132
#> GSM634659 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634666 4 0.2408 0.79921 0.000 0.000 0.104 0.896
#> GSM634667 2 0.0895 0.85038 0.020 0.976 0.004 0.000
#> GSM634669 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634670 3 0.5239 0.39457 0.080 0.012 0.772 0.136
#> GSM634679 4 0.4040 0.77217 0.000 0.000 0.248 0.752
#> GSM634680 4 0.4994 0.60689 0.000 0.000 0.480 0.520
#> GSM634681 3 0.5685 0.41294 0.460 0.024 0.516 0.000
#> GSM634688 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634690 2 0.0188 0.84073 0.004 0.996 0.000 0.000
#> GSM634694 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634698 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634704 2 0.2773 0.77379 0.116 0.880 0.000 0.004
#> GSM634705 1 0.0707 0.88380 0.980 0.020 0.000 0.000
#> GSM634706 1 0.4998 0.00548 0.512 0.488 0.000 0.000
#> GSM634707 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634711 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634715 2 0.4985 0.10124 0.468 0.532 0.000 0.000
#> GSM634633 1 0.6644 -0.31281 0.532 0.004 0.388 0.076
#> GSM634634 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634635 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634636 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634637 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634638 2 0.5932 0.59852 0.000 0.696 0.172 0.132
#> GSM634639 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634640 2 0.0895 0.85038 0.020 0.976 0.004 0.000
#> GSM634641 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634642 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634644 2 0.5932 0.59852 0.000 0.696 0.172 0.132
#> GSM634645 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634646 3 0.5510 0.49612 0.376 0.024 0.600 0.000
#> GSM634647 4 0.4454 0.74937 0.000 0.000 0.308 0.692
#> GSM634651 2 0.0895 0.85038 0.020 0.976 0.004 0.000
#> GSM634652 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634654 3 0.2814 0.29837 0.000 0.000 0.868 0.132
#> GSM634655 3 0.6832 0.54319 0.296 0.000 0.572 0.132
#> GSM634656 4 0.4454 0.74937 0.000 0.000 0.308 0.692
#> GSM634657 1 0.0469 0.89131 0.988 0.012 0.000 0.000
#> GSM634658 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634660 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634661 2 0.2926 0.80384 0.012 0.888 0.096 0.004
#> GSM634662 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634663 1 0.4907 0.18194 0.580 0.420 0.000 0.000
#> GSM634664 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634665 3 0.5685 0.41294 0.460 0.024 0.516 0.000
#> GSM634668 1 0.8048 -0.40986 0.416 0.192 0.376 0.016
#> GSM634671 1 0.3711 0.70061 0.836 0.024 0.140 0.000
#> GSM634672 3 0.6181 0.40065 0.120 0.012 0.700 0.168
#> GSM634673 3 0.2814 0.29837 0.000 0.000 0.868 0.132
#> GSM634674 2 0.4730 0.37156 0.364 0.636 0.000 0.000
#> GSM634675 2 0.0592 0.84902 0.016 0.984 0.000 0.000
#> GSM634676 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634677 2 0.0707 0.85037 0.020 0.980 0.000 0.000
#> GSM634678 2 0.3219 0.67674 0.164 0.836 0.000 0.000
#> GSM634682 4 0.7431 0.21893 0.000 0.380 0.172 0.448
#> GSM634683 2 0.0707 0.85037 0.020 0.980 0.000 0.000
#> GSM634684 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634685 4 0.4992 0.61022 0.000 0.000 0.476 0.524
#> GSM634686 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634687 2 0.0895 0.85038 0.020 0.976 0.004 0.000
#> GSM634689 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634691 2 0.0707 0.85037 0.020 0.980 0.000 0.000
#> GSM634692 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634693 3 0.5682 0.41940 0.456 0.024 0.520 0.000
#> GSM634695 2 0.5932 0.59852 0.000 0.696 0.172 0.132
#> GSM634696 3 0.5685 0.41294 0.460 0.024 0.516 0.000
#> GSM634697 4 0.4454 0.74937 0.000 0.000 0.308 0.692
#> GSM634699 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634700 2 0.0469 0.84695 0.012 0.988 0.000 0.000
#> GSM634701 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634702 1 0.0592 0.89049 0.984 0.016 0.000 0.000
#> GSM634703 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634708 2 0.0707 0.85037 0.020 0.980 0.000 0.000
#> GSM634709 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634710 4 0.4454 0.74937 0.000 0.000 0.308 0.692
#> GSM634712 4 0.4193 0.76571 0.000 0.000 0.268 0.732
#> GSM634713 4 0.0000 0.80429 0.000 0.000 0.000 1.000
#> GSM634714 3 0.2999 0.30481 0.004 0.000 0.864 0.132
#> GSM634716 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634717 1 0.0188 0.90072 0.996 0.004 0.000 0.000
#> GSM634718 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634719 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634720 3 0.2814 0.29837 0.000 0.000 0.868 0.132
#> GSM634721 3 0.5682 0.41940 0.456 0.024 0.520 0.000
#> GSM634722 4 0.3400 0.71309 0.000 0.000 0.180 0.820
#> GSM634723 1 0.0000 0.90231 1.000 0.000 0.000 0.000
#> GSM634724 1 0.7349 -0.40094 0.488 0.016 0.392 0.104
#> GSM634725 1 0.0592 0.89049 0.984 0.016 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634648 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634649 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634650 1 0.4307 -0.2791 0.500 0.000 0.000 0.000 0.500
#> GSM634653 3 0.5883 0.1771 0.368 0.000 0.524 0.000 0.108
#> GSM634659 1 0.4150 0.0262 0.612 0.000 0.000 0.000 0.388
#> GSM634666 4 0.4291 -0.2033 0.000 0.000 0.464 0.536 0.000
#> GSM634667 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634669 1 0.4294 -0.1995 0.532 0.000 0.000 0.000 0.468
#> GSM634670 3 0.3534 0.5446 0.000 0.000 0.744 0.000 0.256
#> GSM634679 3 0.4306 0.1952 0.000 0.000 0.508 0.492 0.000
#> GSM634680 3 0.0000 0.6093 0.000 0.000 1.000 0.000 0.000
#> GSM634681 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634688 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634690 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634694 1 0.4307 -0.2791 0.500 0.000 0.000 0.000 0.500
#> GSM634698 1 0.1043 0.6252 0.960 0.000 0.000 0.000 0.040
#> GSM634704 2 0.3796 0.2803 0.000 0.700 0.000 0.000 0.300
#> GSM634705 1 0.1043 0.6252 0.960 0.000 0.000 0.000 0.040
#> GSM634706 5 0.4917 0.4458 0.028 0.416 0.000 0.000 0.556
#> GSM634707 1 0.3966 0.1689 0.664 0.000 0.000 0.000 0.336
#> GSM634711 1 0.0162 0.6352 0.996 0.000 0.000 0.000 0.004
#> GSM634715 5 0.4905 0.3905 0.024 0.476 0.000 0.000 0.500
#> GSM634633 5 0.3468 0.4380 0.048 0.092 0.012 0.000 0.848
#> GSM634634 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634635 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634636 1 0.0609 0.6319 0.980 0.000 0.000 0.000 0.020
#> GSM634637 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634638 2 0.4779 0.4940 0.000 0.588 0.388 0.000 0.024
#> GSM634639 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634640 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634641 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634642 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634644 2 0.4779 0.4940 0.000 0.588 0.388 0.000 0.024
#> GSM634645 1 0.0162 0.6352 0.996 0.000 0.000 0.000 0.004
#> GSM634646 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634647 3 0.4150 0.4041 0.000 0.000 0.612 0.388 0.000
#> GSM634651 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634652 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634654 3 0.1410 0.6111 0.000 0.000 0.940 0.000 0.060
#> GSM634655 3 0.5615 0.2822 0.320 0.000 0.584 0.000 0.096
#> GSM634656 3 0.4126 0.4137 0.000 0.000 0.620 0.380 0.000
#> GSM634657 5 0.4452 0.1851 0.496 0.004 0.000 0.000 0.500
#> GSM634658 1 0.2732 0.4862 0.840 0.000 0.000 0.000 0.160
#> GSM634660 5 0.4307 0.1784 0.500 0.000 0.000 0.000 0.500
#> GSM634661 2 0.1768 0.7868 0.000 0.924 0.072 0.000 0.004
#> GSM634662 1 0.4307 -0.2791 0.500 0.000 0.000 0.000 0.500
#> GSM634663 5 0.6290 0.5192 0.168 0.332 0.000 0.000 0.500
#> GSM634664 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634665 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634668 5 0.1117 0.3947 0.020 0.016 0.000 0.000 0.964
#> GSM634671 1 0.4297 0.3969 0.528 0.000 0.000 0.000 0.472
#> GSM634672 3 0.4161 0.4567 0.000 0.000 0.608 0.000 0.392
#> GSM634673 3 0.0000 0.6093 0.000 0.000 1.000 0.000 0.000
#> GSM634674 5 0.4747 0.3711 0.016 0.484 0.000 0.000 0.500
#> GSM634675 2 0.0162 0.8266 0.000 0.996 0.000 0.000 0.004
#> GSM634676 1 0.4249 -0.1038 0.568 0.000 0.000 0.000 0.432
#> GSM634677 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634678 5 0.4481 0.4224 0.008 0.416 0.000 0.000 0.576
#> GSM634682 2 0.4779 0.4940 0.000 0.588 0.388 0.000 0.024
#> GSM634683 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634684 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634685 3 0.0703 0.6008 0.000 0.000 0.976 0.000 0.024
#> GSM634686 1 0.3876 0.2150 0.684 0.000 0.000 0.000 0.316
#> GSM634687 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634689 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634691 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634692 1 0.0703 0.6229 0.976 0.000 0.000 0.000 0.024
#> GSM634693 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634695 2 0.6534 0.3461 0.000 0.416 0.388 0.000 0.196
#> GSM634696 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634697 3 0.4150 0.4041 0.000 0.000 0.612 0.388 0.000
#> GSM634699 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634700 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634701 1 0.0794 0.6201 0.972 0.000 0.000 0.000 0.028
#> GSM634702 1 0.4030 0.4720 0.648 0.000 0.000 0.000 0.352
#> GSM634703 5 0.4307 0.1784 0.500 0.000 0.000 0.000 0.500
#> GSM634708 2 0.0000 0.8298 0.000 1.000 0.000 0.000 0.000
#> GSM634709 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634710 3 0.4138 0.4094 0.000 0.000 0.616 0.384 0.000
#> GSM634712 3 0.4201 0.3727 0.000 0.000 0.592 0.408 0.000
#> GSM634713 4 0.0000 0.8641 0.000 0.000 0.000 1.000 0.000
#> GSM634714 3 0.2331 0.5841 0.020 0.000 0.900 0.000 0.080
#> GSM634716 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634717 1 0.0000 0.6355 1.000 0.000 0.000 0.000 0.000
#> GSM634718 1 0.4307 -0.2791 0.500 0.000 0.000 0.000 0.500
#> GSM634719 1 0.0609 0.6253 0.980 0.000 0.000 0.000 0.020
#> GSM634720 3 0.0000 0.6093 0.000 0.000 1.000 0.000 0.000
#> GSM634721 1 0.4300 0.3946 0.524 0.000 0.000 0.000 0.476
#> GSM634722 4 0.4686 0.2690 0.000 0.000 0.384 0.596 0.020
#> GSM634723 1 0.4307 -0.2791 0.500 0.000 0.000 0.000 0.500
#> GSM634724 1 0.4470 0.4462 0.616 0.000 0.012 0.000 0.372
#> GSM634725 1 0.3949 0.4761 0.668 0.000 0.000 0.000 0.332
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.0458 0.9381 0.984 0.000 0.000 0.000 0.016 0.000
#> GSM634648 5 0.0713 0.6905 0.028 0.000 0.000 0.000 0.972 0.000
#> GSM634649 1 0.1644 0.9216 0.920 0.000 0.076 0.000 0.004 0.000
#> GSM634650 1 0.1323 0.9321 0.956 0.008 0.008 0.000 0.020 0.008
#> GSM634653 5 0.6438 0.1356 0.024 0.000 0.240 0.000 0.440 0.296
#> GSM634659 1 0.1049 0.9359 0.960 0.000 0.008 0.000 0.032 0.000
#> GSM634666 4 0.3634 0.3595 0.000 0.000 0.356 0.644 0.000 0.000
#> GSM634667 2 0.0508 0.9651 0.000 0.984 0.004 0.000 0.000 0.012
#> GSM634669 1 0.0806 0.9354 0.972 0.000 0.008 0.000 0.020 0.000
#> GSM634670 5 0.5115 0.0909 0.000 0.000 0.456 0.000 0.464 0.080
#> GSM634679 4 0.3867 -0.0387 0.000 0.000 0.488 0.512 0.000 0.000
#> GSM634680 3 0.2703 0.6140 0.000 0.000 0.824 0.000 0.004 0.172
#> GSM634681 5 0.1082 0.6854 0.040 0.000 0.004 0.000 0.956 0.000
#> GSM634688 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634690 2 0.0260 0.9660 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM634694 1 0.1065 0.9338 0.964 0.000 0.008 0.000 0.020 0.008
#> GSM634698 1 0.1124 0.9301 0.956 0.000 0.008 0.000 0.036 0.000
#> GSM634704 2 0.1198 0.9538 0.004 0.960 0.004 0.000 0.020 0.012
#> GSM634705 1 0.2212 0.8712 0.880 0.000 0.008 0.000 0.112 0.000
#> GSM634706 2 0.1268 0.9461 0.004 0.952 0.000 0.000 0.036 0.008
#> GSM634707 1 0.2094 0.9140 0.900 0.000 0.080 0.000 0.020 0.000
#> GSM634711 1 0.1471 0.9246 0.932 0.000 0.064 0.000 0.004 0.000
#> GSM634715 2 0.1453 0.9419 0.008 0.944 0.000 0.000 0.040 0.008
#> GSM634633 5 0.5166 0.4375 0.288 0.060 0.012 0.000 0.628 0.012
#> GSM634634 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634635 1 0.0622 0.9377 0.980 0.000 0.008 0.000 0.012 0.000
#> GSM634636 1 0.1196 0.9277 0.952 0.000 0.008 0.000 0.040 0.000
#> GSM634637 1 0.0520 0.9382 0.984 0.000 0.008 0.000 0.008 0.000
#> GSM634638 6 0.1267 0.7605 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM634639 1 0.1588 0.9213 0.924 0.000 0.072 0.000 0.004 0.000
#> GSM634640 2 0.0508 0.9651 0.000 0.984 0.004 0.000 0.000 0.012
#> GSM634641 1 0.0692 0.9365 0.976 0.000 0.004 0.000 0.020 0.000
#> GSM634642 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634644 6 0.1267 0.7605 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM634645 1 0.0717 0.9366 0.976 0.000 0.008 0.000 0.016 0.000
#> GSM634646 5 0.0632 0.6907 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM634647 3 0.2631 0.7144 0.000 0.000 0.820 0.180 0.000 0.000
#> GSM634651 2 0.0508 0.9651 0.000 0.984 0.004 0.000 0.000 0.012
#> GSM634652 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634654 3 0.5631 -0.1700 0.000 0.000 0.444 0.000 0.408 0.148
#> GSM634655 6 0.6099 -0.0140 0.040 0.000 0.108 0.000 0.388 0.464
#> GSM634656 3 0.2092 0.7222 0.000 0.000 0.876 0.124 0.000 0.000
#> GSM634657 1 0.2622 0.9113 0.892 0.024 0.056 0.000 0.020 0.008
#> GSM634658 1 0.0717 0.9387 0.976 0.000 0.008 0.000 0.016 0.000
#> GSM634660 1 0.2094 0.9140 0.900 0.000 0.080 0.000 0.020 0.000
#> GSM634661 2 0.2482 0.8198 0.000 0.848 0.004 0.000 0.000 0.148
#> GSM634662 1 0.1667 0.9294 0.940 0.012 0.008 0.000 0.032 0.008
#> GSM634663 2 0.1806 0.9186 0.044 0.928 0.000 0.000 0.020 0.008
#> GSM634664 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634665 5 0.0632 0.6907 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM634668 5 0.0951 0.6586 0.004 0.020 0.000 0.000 0.968 0.008
#> GSM634671 5 0.3881 0.2184 0.396 0.000 0.004 0.000 0.600 0.000
#> GSM634672 5 0.4116 0.2528 0.000 0.000 0.416 0.000 0.572 0.012
#> GSM634673 3 0.2558 0.6206 0.000 0.000 0.840 0.000 0.004 0.156
#> GSM634674 2 0.0951 0.9528 0.004 0.968 0.000 0.000 0.020 0.008
#> GSM634675 2 0.0260 0.9628 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM634676 1 0.1124 0.9355 0.956 0.000 0.008 0.000 0.036 0.000
#> GSM634677 2 0.0000 0.9651 0.000 1.000 0.000 0.000 0.000 0.000
#> GSM634678 2 0.1477 0.9391 0.004 0.940 0.000 0.000 0.048 0.008
#> GSM634682 6 0.1267 0.7605 0.000 0.060 0.000 0.000 0.000 0.940
#> GSM634683 2 0.0260 0.9660 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM634684 1 0.1644 0.9212 0.920 0.000 0.076 0.000 0.004 0.000
#> GSM634685 6 0.0692 0.7250 0.000 0.000 0.020 0.000 0.004 0.976
#> GSM634686 1 0.1951 0.9176 0.908 0.000 0.076 0.000 0.016 0.000
#> GSM634687 2 0.0508 0.9651 0.000 0.984 0.004 0.000 0.000 0.012
#> GSM634689 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634691 2 0.0260 0.9660 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM634692 1 0.0717 0.9386 0.976 0.000 0.008 0.000 0.016 0.000
#> GSM634693 5 0.0777 0.6901 0.024 0.000 0.004 0.000 0.972 0.000
#> GSM634695 6 0.2070 0.7322 0.000 0.100 0.008 0.000 0.000 0.892
#> GSM634696 5 0.0632 0.6907 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM634697 3 0.2762 0.7009 0.000 0.000 0.804 0.196 0.000 0.000
#> GSM634699 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634700 2 0.0260 0.9660 0.000 0.992 0.000 0.000 0.000 0.008
#> GSM634701 1 0.0692 0.9365 0.976 0.000 0.004 0.000 0.020 0.000
#> GSM634702 1 0.3448 0.6080 0.716 0.000 0.004 0.000 0.280 0.000
#> GSM634703 1 0.1639 0.9313 0.940 0.008 0.008 0.000 0.036 0.008
#> GSM634708 2 0.0363 0.9656 0.000 0.988 0.000 0.000 0.000 0.012
#> GSM634709 1 0.0692 0.9365 0.976 0.000 0.004 0.000 0.020 0.000
#> GSM634710 3 0.2697 0.7094 0.000 0.000 0.812 0.188 0.000 0.000
#> GSM634712 3 0.3464 0.5179 0.000 0.000 0.688 0.312 0.000 0.000
#> GSM634713 4 0.0000 0.8855 0.000 0.000 0.000 1.000 0.000 0.000
#> GSM634714 5 0.6248 -0.0369 0.008 0.000 0.248 0.000 0.388 0.356
#> GSM634716 1 0.1010 0.9342 0.960 0.000 0.036 0.000 0.004 0.000
#> GSM634717 1 0.0806 0.9353 0.972 0.000 0.008 0.000 0.020 0.000
#> GSM634718 1 0.1608 0.9297 0.944 0.008 0.020 0.000 0.020 0.008
#> GSM634719 1 0.1700 0.9192 0.916 0.000 0.080 0.000 0.004 0.000
#> GSM634720 6 0.5841 0.2030 0.000 0.000 0.300 0.000 0.220 0.480
#> GSM634721 5 0.0632 0.6907 0.024 0.000 0.000 0.000 0.976 0.000
#> GSM634722 6 0.2260 0.6693 0.000 0.000 0.000 0.140 0.000 0.860
#> GSM634723 1 0.1994 0.9258 0.924 0.008 0.040 0.000 0.020 0.008
#> GSM634724 5 0.5198 0.4514 0.308 0.000 0.044 0.000 0.608 0.040
#> GSM634725 1 0.3360 0.6482 0.732 0.000 0.004 0.000 0.264 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 individual(p) k
#> ATC:mclust 89 0.500 2
#> ATC:mclust 88 0.674 3
#> ATC:mclust 71 0.771 4
#> ATC:mclust 46 0.837 5
#> ATC:mclust 81 0.613 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 17698 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.913 0.939 0.974 0.4807 0.520 0.520
#> 3 3 0.875 0.892 0.950 0.3813 0.689 0.465
#> 4 4 0.705 0.752 0.873 0.1018 0.916 0.756
#> 5 5 0.647 0.619 0.801 0.0554 0.895 0.665
#> 6 6 0.606 0.442 0.701 0.0473 0.939 0.778
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
#> GSM634643 1 0.0000 0.972 1.000 0.000
#> GSM634648 1 0.0000 0.972 1.000 0.000
#> GSM634649 1 0.0000 0.972 1.000 0.000
#> GSM634650 2 0.0000 0.973 0.000 1.000
#> GSM634653 1 0.0000 0.972 1.000 0.000
#> GSM634659 1 0.7453 0.745 0.788 0.212
#> GSM634666 1 0.0000 0.972 1.000 0.000
#> GSM634667 2 0.0000 0.973 0.000 1.000
#> GSM634669 1 0.5408 0.861 0.876 0.124
#> GSM634670 1 0.0000 0.972 1.000 0.000
#> GSM634679 1 0.0000 0.972 1.000 0.000
#> GSM634680 1 0.0000 0.972 1.000 0.000
#> GSM634681 1 0.0000 0.972 1.000 0.000
#> GSM634688 2 0.9323 0.442 0.348 0.652
#> GSM634690 2 0.0000 0.973 0.000 1.000
#> GSM634694 2 0.0672 0.966 0.008 0.992
#> GSM634698 1 0.0000 0.972 1.000 0.000
#> GSM634704 2 0.0000 0.973 0.000 1.000
#> GSM634705 1 0.0000 0.972 1.000 0.000
#> GSM634706 2 0.0000 0.973 0.000 1.000
#> GSM634707 1 0.0000 0.972 1.000 0.000
#> GSM634711 1 0.0000 0.972 1.000 0.000
#> GSM634715 2 0.0000 0.973 0.000 1.000
#> GSM634633 1 0.4815 0.882 0.896 0.104
#> GSM634634 1 0.6048 0.833 0.852 0.148
#> GSM634635 1 0.0000 0.972 1.000 0.000
#> GSM634636 1 0.0000 0.972 1.000 0.000
#> GSM634637 1 0.0000 0.972 1.000 0.000
#> GSM634638 2 0.0000 0.973 0.000 1.000
#> GSM634639 1 0.0000 0.972 1.000 0.000
#> GSM634640 2 0.0000 0.973 0.000 1.000
#> GSM634641 1 0.0000 0.972 1.000 0.000
#> GSM634642 2 0.0000 0.973 0.000 1.000
#> GSM634644 2 0.0000 0.973 0.000 1.000
#> GSM634645 1 0.0000 0.972 1.000 0.000
#> GSM634646 1 0.0000 0.972 1.000 0.000
#> GSM634647 1 0.0000 0.972 1.000 0.000
#> GSM634651 2 0.0000 0.973 0.000 1.000
#> GSM634652 2 0.0000 0.973 0.000 1.000
#> GSM634654 1 0.0000 0.972 1.000 0.000
#> GSM634655 1 0.0000 0.972 1.000 0.000
#> GSM634656 1 0.0000 0.972 1.000 0.000
#> GSM634657 2 0.0000 0.973 0.000 1.000
#> GSM634658 1 0.0000 0.972 1.000 0.000
#> GSM634660 1 0.8327 0.659 0.736 0.264
#> GSM634661 2 0.0000 0.973 0.000 1.000
#> GSM634662 2 0.0000 0.973 0.000 1.000
#> GSM634663 2 0.0000 0.973 0.000 1.000
#> GSM634664 1 0.2423 0.942 0.960 0.040
#> GSM634665 1 0.0000 0.972 1.000 0.000
#> GSM634668 2 0.3584 0.905 0.068 0.932
#> GSM634671 1 0.0000 0.972 1.000 0.000
#> GSM634672 1 0.0000 0.972 1.000 0.000
#> GSM634673 1 0.0000 0.972 1.000 0.000
#> GSM634674 2 0.0000 0.973 0.000 1.000
#> GSM634675 2 0.0000 0.973 0.000 1.000
#> GSM634676 1 0.2236 0.945 0.964 0.036
#> GSM634677 2 0.0000 0.973 0.000 1.000
#> GSM634678 2 0.0000 0.973 0.000 1.000
#> GSM634682 2 0.0000 0.973 0.000 1.000
#> GSM634683 2 0.0000 0.973 0.000 1.000
#> GSM634684 1 0.0000 0.972 1.000 0.000
#> GSM634685 1 0.9661 0.377 0.608 0.392
#> GSM634686 1 0.0000 0.972 1.000 0.000
#> GSM634687 2 0.0000 0.973 0.000 1.000
#> GSM634689 2 0.9954 0.104 0.460 0.540
#> GSM634691 2 0.0000 0.973 0.000 1.000
#> GSM634692 1 0.0000 0.972 1.000 0.000
#> GSM634693 1 0.0000 0.972 1.000 0.000
#> GSM634695 2 0.0000 0.973 0.000 1.000
#> GSM634696 1 0.0000 0.972 1.000 0.000
#> GSM634697 1 0.0000 0.972 1.000 0.000
#> GSM634699 1 0.3114 0.929 0.944 0.056
#> GSM634700 2 0.0000 0.973 0.000 1.000
#> GSM634701 1 0.0000 0.972 1.000 0.000
#> GSM634702 1 0.5408 0.861 0.876 0.124
#> GSM634703 2 0.0000 0.973 0.000 1.000
#> GSM634708 2 0.0000 0.973 0.000 1.000
#> GSM634709 1 0.0000 0.972 1.000 0.000
#> GSM634710 1 0.0000 0.972 1.000 0.000
#> GSM634712 1 0.0000 0.972 1.000 0.000
#> GSM634713 2 0.0000 0.973 0.000 1.000
#> GSM634714 1 0.0000 0.972 1.000 0.000
#> GSM634716 1 0.0000 0.972 1.000 0.000
#> GSM634717 1 0.0000 0.972 1.000 0.000
#> GSM634718 2 0.0000 0.973 0.000 1.000
#> GSM634719 1 0.0000 0.972 1.000 0.000
#> GSM634720 1 0.0000 0.972 1.000 0.000
#> GSM634721 1 0.0000 0.972 1.000 0.000
#> GSM634722 2 0.0000 0.973 0.000 1.000
#> GSM634723 2 0.0000 0.973 0.000 1.000
#> GSM634724 1 0.0000 0.972 1.000 0.000
#> GSM634725 1 0.0000 0.972 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> GSM634643 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634648 3 0.2356 0.895 0.072 0.000 0.928
#> GSM634649 1 0.0237 0.958 0.996 0.000 0.004
#> GSM634650 1 0.0747 0.955 0.984 0.016 0.000
#> GSM634653 3 0.0237 0.931 0.004 0.000 0.996
#> GSM634659 1 0.0424 0.959 0.992 0.008 0.000
#> GSM634666 3 0.0237 0.928 0.000 0.004 0.996
#> GSM634667 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634669 1 0.0424 0.959 0.992 0.008 0.000
#> GSM634670 3 0.0592 0.930 0.012 0.000 0.988
#> GSM634679 3 0.0000 0.930 0.000 0.000 1.000
#> GSM634680 3 0.0000 0.930 0.000 0.000 1.000
#> GSM634681 1 0.6192 0.235 0.580 0.000 0.420
#> GSM634688 3 0.5327 0.651 0.000 0.272 0.728
#> GSM634690 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634694 1 0.0424 0.959 0.992 0.008 0.000
#> GSM634698 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634704 2 0.0592 0.934 0.012 0.988 0.000
#> GSM634705 1 0.1289 0.941 0.968 0.000 0.032
#> GSM634706 2 0.6252 0.237 0.444 0.556 0.000
#> GSM634707 1 0.0237 0.960 0.996 0.004 0.000
#> GSM634711 1 0.1163 0.944 0.972 0.000 0.028
#> GSM634715 2 0.2878 0.875 0.096 0.904 0.000
#> GSM634633 1 0.2414 0.925 0.940 0.040 0.020
#> GSM634634 3 0.2711 0.875 0.000 0.088 0.912
#> GSM634635 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634636 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634637 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634638 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634639 1 0.1753 0.928 0.952 0.000 0.048
#> GSM634640 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634641 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634642 2 0.2537 0.874 0.000 0.920 0.080
#> GSM634644 2 0.0424 0.934 0.000 0.992 0.008
#> GSM634645 1 0.1031 0.946 0.976 0.000 0.024
#> GSM634646 3 0.0592 0.930 0.012 0.000 0.988
#> GSM634647 3 0.0424 0.931 0.008 0.000 0.992
#> GSM634651 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634652 2 0.0592 0.932 0.000 0.988 0.012
#> GSM634654 3 0.0424 0.931 0.008 0.000 0.992
#> GSM634655 3 0.1289 0.923 0.032 0.000 0.968
#> GSM634656 3 0.0424 0.931 0.008 0.000 0.992
#> GSM634657 1 0.5650 0.519 0.688 0.312 0.000
#> GSM634658 1 0.0237 0.960 0.996 0.004 0.000
#> GSM634660 1 0.0424 0.959 0.992 0.008 0.000
#> GSM634661 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634662 1 0.3879 0.806 0.848 0.152 0.000
#> GSM634663 2 0.6126 0.367 0.400 0.600 0.000
#> GSM634664 3 0.1643 0.908 0.000 0.044 0.956
#> GSM634665 3 0.4062 0.800 0.164 0.000 0.836
#> GSM634668 2 0.3690 0.863 0.100 0.884 0.016
#> GSM634671 1 0.3116 0.867 0.892 0.000 0.108
#> GSM634672 3 0.0424 0.931 0.008 0.000 0.992
#> GSM634673 3 0.0424 0.931 0.008 0.000 0.992
#> GSM634674 2 0.3752 0.829 0.144 0.856 0.000
#> GSM634675 2 0.1964 0.907 0.056 0.944 0.000
#> GSM634676 1 0.0424 0.959 0.992 0.008 0.000
#> GSM634677 2 0.0592 0.934 0.012 0.988 0.000
#> GSM634678 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634682 2 0.0424 0.934 0.000 0.992 0.008
#> GSM634683 2 0.0592 0.934 0.012 0.988 0.000
#> GSM634684 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634685 3 0.5560 0.597 0.000 0.300 0.700
#> GSM634686 1 0.0237 0.960 0.996 0.004 0.000
#> GSM634687 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634689 3 0.5291 0.657 0.000 0.268 0.732
#> GSM634691 2 0.0424 0.936 0.008 0.992 0.000
#> GSM634692 1 0.0237 0.960 0.996 0.004 0.000
#> GSM634693 3 0.2448 0.892 0.076 0.000 0.924
#> GSM634695 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634696 3 0.5733 0.531 0.324 0.000 0.676
#> GSM634697 3 0.0424 0.931 0.008 0.000 0.992
#> GSM634699 3 0.2066 0.897 0.000 0.060 0.940
#> GSM634700 2 0.0000 0.938 0.000 1.000 0.000
#> GSM634701 1 0.0237 0.960 0.996 0.004 0.000
#> GSM634702 1 0.1529 0.935 0.960 0.040 0.000
#> GSM634703 1 0.0592 0.957 0.988 0.012 0.000
#> GSM634708 2 0.0237 0.937 0.004 0.996 0.000
#> GSM634709 1 0.0237 0.958 0.996 0.000 0.004
#> GSM634710 3 0.0000 0.930 0.000 0.000 1.000
#> GSM634712 3 0.0000 0.930 0.000 0.000 1.000
#> GSM634713 2 0.0592 0.932 0.000 0.988 0.012
#> GSM634714 3 0.0747 0.929 0.016 0.000 0.984
#> GSM634716 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634717 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634718 1 0.0592 0.957 0.988 0.012 0.000
#> GSM634719 1 0.0000 0.960 1.000 0.000 0.000
#> GSM634720 3 0.0000 0.930 0.000 0.000 1.000
#> GSM634721 3 0.0592 0.930 0.012 0.000 0.988
#> GSM634722 2 0.0892 0.928 0.000 0.980 0.020
#> GSM634723 1 0.0592 0.957 0.988 0.012 0.000
#> GSM634724 3 0.2066 0.904 0.060 0.000 0.940
#> GSM634725 1 0.0000 0.960 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> GSM634643 1 0.0000 0.916 1.000 0.000 0.000 0.000
#> GSM634648 4 0.2342 0.734 0.080 0.008 0.000 0.912
#> GSM634649 1 0.0336 0.916 0.992 0.000 0.008 0.000
#> GSM634650 1 0.1913 0.890 0.940 0.040 0.020 0.000
#> GSM634653 3 0.4454 0.483 0.000 0.000 0.692 0.308
#> GSM634659 1 0.0895 0.912 0.976 0.020 0.000 0.004
#> GSM634666 4 0.2345 0.772 0.000 0.000 0.100 0.900
#> GSM634667 2 0.0000 0.862 0.000 1.000 0.000 0.000
#> GSM634669 1 0.0592 0.914 0.984 0.000 0.016 0.000
#> GSM634670 4 0.5119 0.191 0.004 0.000 0.440 0.556
#> GSM634679 4 0.1716 0.774 0.000 0.000 0.064 0.936
#> GSM634680 3 0.2081 0.746 0.000 0.000 0.916 0.084
#> GSM634681 1 0.4961 0.187 0.552 0.000 0.000 0.448
#> GSM634688 4 0.3306 0.660 0.000 0.156 0.004 0.840
#> GSM634690 2 0.1398 0.853 0.004 0.956 0.000 0.040
#> GSM634694 1 0.0469 0.915 0.988 0.000 0.012 0.000
#> GSM634698 1 0.1474 0.901 0.948 0.000 0.000 0.052
#> GSM634704 2 0.5383 0.576 0.036 0.672 0.292 0.000
#> GSM634705 1 0.4343 0.652 0.732 0.000 0.004 0.264
#> GSM634706 2 0.5918 0.629 0.208 0.696 0.004 0.092
#> GSM634707 1 0.2408 0.860 0.896 0.000 0.104 0.000
#> GSM634711 1 0.2313 0.888 0.924 0.000 0.032 0.044
#> GSM634715 2 0.2363 0.835 0.056 0.920 0.024 0.000
#> GSM634633 3 0.5276 0.624 0.156 0.084 0.756 0.004
#> GSM634634 4 0.4535 0.671 0.000 0.112 0.084 0.804
#> GSM634635 1 0.0188 0.916 0.996 0.000 0.004 0.000
#> GSM634636 1 0.1867 0.889 0.928 0.000 0.000 0.072
#> GSM634637 1 0.0524 0.917 0.988 0.000 0.004 0.008
#> GSM634638 2 0.4222 0.644 0.000 0.728 0.272 0.000
#> GSM634639 3 0.4295 0.580 0.240 0.000 0.752 0.008
#> GSM634640 2 0.0188 0.862 0.000 0.996 0.004 0.000
#> GSM634641 1 0.1118 0.909 0.964 0.000 0.000 0.036
#> GSM634642 2 0.3668 0.743 0.000 0.808 0.004 0.188
#> GSM634644 2 0.1716 0.839 0.000 0.936 0.064 0.000
#> GSM634645 1 0.1305 0.910 0.960 0.000 0.004 0.036
#> GSM634646 4 0.2845 0.771 0.028 0.000 0.076 0.896
#> GSM634647 4 0.3123 0.749 0.000 0.000 0.156 0.844
#> GSM634651 2 0.0376 0.862 0.004 0.992 0.004 0.000
#> GSM634652 2 0.2675 0.816 0.000 0.892 0.008 0.100
#> GSM634654 3 0.4776 0.319 0.000 0.000 0.624 0.376
#> GSM634655 3 0.0592 0.746 0.000 0.000 0.984 0.016
#> GSM634656 4 0.4406 0.558 0.000 0.000 0.300 0.700
#> GSM634657 1 0.7133 0.206 0.512 0.144 0.344 0.000
#> GSM634658 1 0.0336 0.916 0.992 0.000 0.000 0.008
#> GSM634660 1 0.3764 0.726 0.784 0.000 0.216 0.000
#> GSM634661 2 0.3074 0.777 0.000 0.848 0.152 0.000
#> GSM634662 1 0.3610 0.727 0.800 0.200 0.000 0.000
#> GSM634663 2 0.4564 0.504 0.328 0.672 0.000 0.000
#> GSM634664 4 0.1584 0.760 0.000 0.036 0.012 0.952
#> GSM634665 4 0.3249 0.699 0.140 0.000 0.008 0.852
#> GSM634668 2 0.5459 0.282 0.016 0.552 0.000 0.432
#> GSM634671 4 0.5137 0.114 0.452 0.000 0.004 0.544
#> GSM634672 4 0.2859 0.770 0.008 0.000 0.112 0.880
#> GSM634673 3 0.3528 0.670 0.000 0.000 0.808 0.192
#> GSM634674 2 0.3999 0.742 0.140 0.824 0.036 0.000
#> GSM634675 2 0.0188 0.863 0.004 0.996 0.000 0.000
#> GSM634676 1 0.0469 0.916 0.988 0.000 0.000 0.012
#> GSM634677 2 0.0188 0.863 0.004 0.996 0.000 0.000
#> GSM634678 2 0.1661 0.847 0.004 0.944 0.000 0.052
#> GSM634682 2 0.4500 0.574 0.000 0.684 0.316 0.000
#> GSM634683 2 0.0188 0.863 0.004 0.996 0.000 0.000
#> GSM634684 1 0.0188 0.916 0.996 0.000 0.004 0.000
#> GSM634685 3 0.1938 0.728 0.000 0.052 0.936 0.012
#> GSM634686 1 0.0592 0.914 0.984 0.000 0.016 0.000
#> GSM634687 2 0.0188 0.862 0.000 0.996 0.004 0.000
#> GSM634689 4 0.4103 0.549 0.000 0.256 0.000 0.744
#> GSM634691 2 0.0188 0.863 0.004 0.996 0.000 0.000
#> GSM634692 1 0.0188 0.916 0.996 0.000 0.000 0.004
#> GSM634693 4 0.3056 0.755 0.072 0.000 0.040 0.888
#> GSM634695 3 0.4543 0.350 0.000 0.324 0.676 0.000
#> GSM634696 4 0.2999 0.685 0.132 0.000 0.004 0.864
#> GSM634697 4 0.2814 0.762 0.000 0.000 0.132 0.868
#> GSM634699 4 0.5122 0.626 0.000 0.080 0.164 0.756
#> GSM634700 2 0.1209 0.855 0.004 0.964 0.000 0.032
#> GSM634701 1 0.0336 0.916 0.992 0.000 0.000 0.008
#> GSM634702 1 0.2983 0.872 0.892 0.040 0.000 0.068
#> GSM634703 1 0.0524 0.916 0.988 0.004 0.008 0.000
#> GSM634708 2 0.0188 0.863 0.004 0.996 0.000 0.000
#> GSM634709 1 0.1209 0.911 0.964 0.000 0.004 0.032
#> GSM634710 4 0.3123 0.753 0.000 0.000 0.156 0.844
#> GSM634712 4 0.2973 0.757 0.000 0.000 0.144 0.856
#> GSM634713 2 0.2125 0.834 0.000 0.920 0.004 0.076
#> GSM634714 3 0.2048 0.751 0.008 0.000 0.928 0.064
#> GSM634716 1 0.2704 0.840 0.876 0.000 0.124 0.000
#> GSM634717 1 0.1118 0.909 0.964 0.000 0.000 0.036
#> GSM634718 1 0.0469 0.915 0.988 0.000 0.012 0.000
#> GSM634719 1 0.0592 0.914 0.984 0.000 0.016 0.000
#> GSM634720 3 0.1576 0.752 0.000 0.004 0.948 0.048
#> GSM634721 4 0.0927 0.768 0.016 0.000 0.008 0.976
#> GSM634722 2 0.0921 0.856 0.000 0.972 0.028 0.000
#> GSM634723 1 0.0707 0.913 0.980 0.000 0.020 0.000
#> GSM634724 3 0.4630 0.613 0.016 0.000 0.732 0.252
#> GSM634725 1 0.2345 0.867 0.900 0.000 0.000 0.100
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> GSM634643 1 0.0510 0.8107 0.984 0.000 0.000 0.016 0.000
#> GSM634648 3 0.4202 0.6346 0.116 0.020 0.808 0.052 0.004
#> GSM634649 1 0.0162 0.8101 0.996 0.000 0.000 0.004 0.000
#> GSM634650 1 0.4835 0.7103 0.780 0.064 0.004 0.056 0.096
#> GSM634653 4 0.4354 0.5279 0.000 0.000 0.032 0.712 0.256
#> GSM634659 1 0.7170 0.5817 0.612 0.092 0.184 0.052 0.060
#> GSM634666 3 0.1908 0.7052 0.000 0.000 0.908 0.092 0.000
#> GSM634667 2 0.0404 0.8177 0.000 0.988 0.000 0.012 0.000
#> GSM634669 1 0.1041 0.8073 0.964 0.004 0.000 0.032 0.000
#> GSM634670 3 0.3343 0.6336 0.000 0.000 0.812 0.016 0.172
#> GSM634679 3 0.1502 0.7121 0.000 0.000 0.940 0.056 0.004
#> GSM634680 5 0.4707 0.1809 0.000 0.000 0.020 0.392 0.588
#> GSM634681 3 0.5504 0.3122 0.360 0.012 0.584 0.040 0.004
#> GSM634688 3 0.6837 -0.0175 0.000 0.352 0.400 0.244 0.004
#> GSM634690 2 0.0613 0.8180 0.000 0.984 0.004 0.008 0.004
#> GSM634694 1 0.1990 0.8009 0.928 0.040 0.004 0.028 0.000
#> GSM634698 1 0.1282 0.8086 0.952 0.004 0.000 0.044 0.000
#> GSM634704 2 0.4645 0.4153 0.008 0.608 0.000 0.008 0.376
#> GSM634705 1 0.4338 0.5860 0.696 0.000 0.280 0.024 0.000
#> GSM634706 1 0.6261 0.2283 0.488 0.156 0.000 0.356 0.000
#> GSM634707 1 0.4370 0.6211 0.724 0.000 0.000 0.040 0.236
#> GSM634711 1 0.5706 0.5902 0.656 0.000 0.244 0.040 0.060
#> GSM634715 2 0.6635 0.4709 0.216 0.604 0.000 0.080 0.100
#> GSM634633 5 0.4147 0.5898 0.052 0.052 0.028 0.032 0.836
#> GSM634634 4 0.3543 0.6736 0.000 0.056 0.068 0.852 0.024
#> GSM634635 1 0.0693 0.8114 0.980 0.000 0.008 0.012 0.000
#> GSM634636 1 0.1857 0.8039 0.928 0.000 0.060 0.008 0.004
#> GSM634637 1 0.5980 0.3488 0.532 0.004 0.392 0.044 0.028
#> GSM634638 2 0.4654 0.4812 0.000 0.628 0.000 0.024 0.348
#> GSM634639 5 0.6024 0.2090 0.432 0.000 0.008 0.088 0.472
#> GSM634640 2 0.0566 0.8173 0.000 0.984 0.000 0.004 0.012
#> GSM634641 1 0.1889 0.8094 0.936 0.004 0.020 0.036 0.004
#> GSM634642 2 0.3706 0.7231 0.000 0.796 0.012 0.180 0.012
#> GSM634644 2 0.4514 0.6843 0.000 0.740 0.000 0.072 0.188
#> GSM634645 1 0.1484 0.8098 0.944 0.000 0.048 0.008 0.000
#> GSM634646 3 0.5649 0.4908 0.104 0.000 0.636 0.252 0.008
#> GSM634647 3 0.2790 0.6985 0.000 0.000 0.880 0.068 0.052
#> GSM634651 2 0.0404 0.8185 0.000 0.988 0.000 0.000 0.012
#> GSM634652 2 0.4305 0.2496 0.000 0.512 0.000 0.488 0.000
#> GSM634654 4 0.5360 0.3263 0.000 0.000 0.060 0.556 0.384
#> GSM634655 5 0.1412 0.6096 0.004 0.000 0.008 0.036 0.952
#> GSM634656 3 0.3657 0.6600 0.000 0.000 0.820 0.064 0.116
#> GSM634657 5 0.6792 0.3756 0.280 0.140 0.000 0.040 0.540
#> GSM634658 1 0.3069 0.7984 0.888 0.020 0.036 0.044 0.012
#> GSM634660 1 0.5303 0.4081 0.604 0.012 0.000 0.040 0.344
#> GSM634661 2 0.3061 0.7541 0.000 0.844 0.000 0.020 0.136
#> GSM634662 1 0.6631 0.1461 0.456 0.436 0.016 0.056 0.036
#> GSM634663 2 0.1618 0.8100 0.000 0.944 0.008 0.040 0.008
#> GSM634664 4 0.3265 0.6899 0.000 0.020 0.120 0.848 0.012
#> GSM634665 1 0.6641 -0.1386 0.420 0.000 0.168 0.404 0.008
#> GSM634668 2 0.5664 0.4444 0.012 0.616 0.304 0.064 0.004
#> GSM634671 1 0.5113 0.3390 0.576 0.000 0.380 0.044 0.000
#> GSM634672 3 0.0740 0.7130 0.004 0.000 0.980 0.008 0.008
#> GSM634673 5 0.4923 0.4155 0.000 0.000 0.212 0.088 0.700
#> GSM634674 2 0.2540 0.7921 0.004 0.904 0.004 0.036 0.052
#> GSM634675 2 0.1329 0.8151 0.008 0.956 0.004 0.032 0.000
#> GSM634676 1 0.1410 0.8013 0.940 0.000 0.000 0.060 0.000
#> GSM634677 2 0.1202 0.8158 0.004 0.960 0.004 0.032 0.000
#> GSM634678 2 0.2235 0.8022 0.004 0.920 0.032 0.040 0.004
#> GSM634682 2 0.4902 0.2038 0.000 0.508 0.000 0.024 0.468
#> GSM634683 2 0.0510 0.8184 0.000 0.984 0.000 0.016 0.000
#> GSM634684 1 0.1569 0.8039 0.948 0.000 0.012 0.032 0.008
#> GSM634685 5 0.1924 0.6062 0.000 0.008 0.004 0.064 0.924
#> GSM634686 1 0.0451 0.8090 0.988 0.000 0.000 0.008 0.004
#> GSM634687 2 0.0992 0.8151 0.000 0.968 0.000 0.008 0.024
#> GSM634689 2 0.6495 0.2362 0.000 0.496 0.316 0.184 0.004
#> GSM634691 2 0.0404 0.8179 0.000 0.988 0.000 0.012 0.000
#> GSM634692 1 0.0609 0.8111 0.980 0.000 0.000 0.020 0.000
#> GSM634693 3 0.5196 0.5535 0.136 0.000 0.700 0.160 0.004
#> GSM634695 5 0.3807 0.4649 0.000 0.240 0.000 0.012 0.748
#> GSM634696 4 0.5482 0.4938 0.144 0.000 0.204 0.652 0.000
#> GSM634697 4 0.4510 0.2800 0.000 0.000 0.432 0.560 0.008
#> GSM634699 4 0.2899 0.6712 0.000 0.008 0.036 0.880 0.076
#> GSM634700 2 0.1026 0.8164 0.000 0.968 0.004 0.024 0.004
#> GSM634701 1 0.2522 0.8039 0.908 0.008 0.040 0.040 0.004
#> GSM634702 3 0.5868 0.5566 0.068 0.120 0.724 0.052 0.036
#> GSM634703 1 0.2444 0.7943 0.908 0.056 0.004 0.028 0.004
#> GSM634708 2 0.0566 0.8181 0.000 0.984 0.000 0.012 0.004
#> GSM634709 1 0.0324 0.8101 0.992 0.000 0.004 0.004 0.000
#> GSM634710 3 0.3182 0.6744 0.000 0.000 0.844 0.124 0.032
#> GSM634712 3 0.1818 0.7123 0.000 0.000 0.932 0.044 0.024
#> GSM634713 2 0.2408 0.7904 0.000 0.892 0.004 0.096 0.008
#> GSM634714 5 0.3936 0.5572 0.004 0.000 0.052 0.144 0.800
#> GSM634716 1 0.4605 0.6418 0.732 0.000 0.012 0.040 0.216
#> GSM634717 1 0.0703 0.8111 0.976 0.000 0.000 0.024 0.000
#> GSM634718 1 0.0566 0.8103 0.984 0.004 0.000 0.012 0.000
#> GSM634719 1 0.0451 0.8092 0.988 0.000 0.000 0.008 0.004
#> GSM634720 5 0.3612 0.5443 0.000 0.000 0.028 0.172 0.800
#> GSM634721 3 0.1251 0.7074 0.008 0.000 0.956 0.036 0.000
#> GSM634722 2 0.3460 0.7750 0.000 0.844 0.004 0.076 0.076
#> GSM634723 1 0.0740 0.8087 0.980 0.004 0.000 0.008 0.008
#> GSM634724 3 0.5251 0.4392 0.020 0.000 0.628 0.032 0.320
#> GSM634725 1 0.5186 0.5192 0.612 0.008 0.348 0.024 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> GSM634643 1 0.2053 0.54242 0.888 0.000 0.004 0.000 0.108 0.000
#> GSM634648 3 0.5501 0.47762 0.124 0.056 0.692 0.008 0.116 0.004
#> GSM634649 1 0.0858 0.56956 0.968 0.000 0.004 0.000 0.028 0.000
#> GSM634650 1 0.6415 -0.00615 0.496 0.064 0.004 0.012 0.356 0.068
#> GSM634653 4 0.6424 0.05043 0.032 0.000 0.056 0.488 0.056 0.368
#> GSM634659 5 0.7069 0.17843 0.292 0.076 0.184 0.000 0.440 0.008
#> GSM634666 3 0.2527 0.61008 0.000 0.008 0.892 0.056 0.040 0.004
#> GSM634667 2 0.1007 0.74819 0.000 0.956 0.000 0.000 0.044 0.000
#> GSM634669 1 0.2595 0.50793 0.836 0.000 0.000 0.000 0.160 0.004
#> GSM634670 3 0.3626 0.52011 0.000 0.000 0.776 0.028 0.008 0.188
#> GSM634679 3 0.2112 0.62347 0.000 0.000 0.916 0.020 0.028 0.036
#> GSM634680 6 0.5104 0.13428 0.000 0.000 0.008 0.420 0.060 0.512
#> GSM634681 5 0.7358 -0.05112 0.288 0.028 0.236 0.028 0.408 0.012
#> GSM634688 3 0.7149 0.01333 0.000 0.208 0.396 0.312 0.080 0.004
#> GSM634690 2 0.1411 0.75520 0.000 0.936 0.000 0.004 0.060 0.000
#> GSM634694 1 0.4910 0.28349 0.628 0.072 0.000 0.008 0.292 0.000
#> GSM634698 1 0.3905 0.43978 0.744 0.000 0.004 0.040 0.212 0.000
#> GSM634704 2 0.4256 0.68682 0.004 0.752 0.000 0.004 0.096 0.144
#> GSM634705 1 0.5462 0.26426 0.592 0.000 0.200 0.004 0.204 0.000
#> GSM634706 1 0.7364 -0.05017 0.416 0.124 0.000 0.168 0.284 0.008
#> GSM634707 1 0.5924 -0.03706 0.484 0.000 0.000 0.012 0.348 0.156
#> GSM634711 1 0.6567 -0.00565 0.496 0.000 0.176 0.004 0.276 0.048
#> GSM634715 2 0.8154 0.22039 0.096 0.424 0.000 0.164 0.192 0.124
#> GSM634633 6 0.5089 0.57851 0.048 0.044 0.064 0.020 0.060 0.764
#> GSM634634 4 0.3524 0.67500 0.000 0.036 0.052 0.848 0.040 0.024
#> GSM634635 1 0.1937 0.56437 0.924 0.004 0.032 0.000 0.036 0.004
#> GSM634636 1 0.2867 0.53264 0.848 0.000 0.112 0.000 0.040 0.000
#> GSM634637 3 0.5999 0.04840 0.232 0.000 0.472 0.000 0.292 0.004
#> GSM634638 2 0.4970 0.59230 0.000 0.672 0.000 0.008 0.144 0.176
#> GSM634639 1 0.6515 0.04807 0.516 0.000 0.008 0.056 0.132 0.288
#> GSM634640 2 0.0777 0.75505 0.000 0.972 0.000 0.000 0.024 0.004
#> GSM634641 1 0.4357 0.42398 0.660 0.000 0.016 0.020 0.304 0.000
#> GSM634642 2 0.4361 0.64114 0.000 0.748 0.004 0.160 0.076 0.012
#> GSM634644 2 0.3747 0.70145 0.000 0.804 0.000 0.016 0.108 0.072
#> GSM634645 1 0.4253 0.43261 0.732 0.000 0.160 0.000 0.108 0.000
#> GSM634646 3 0.7941 0.01441 0.224 0.000 0.340 0.088 0.300 0.048
#> GSM634647 3 0.2697 0.59495 0.000 0.000 0.864 0.044 0.000 0.092
#> GSM634651 2 0.1531 0.75375 0.000 0.928 0.000 0.000 0.068 0.004
#> GSM634652 2 0.5119 0.18112 0.000 0.480 0.000 0.456 0.052 0.012
#> GSM634654 6 0.6188 0.18126 0.012 0.000 0.252 0.268 0.000 0.468
#> GSM634655 6 0.4574 0.53443 0.032 0.000 0.000 0.056 0.188 0.724
#> GSM634656 3 0.2726 0.58622 0.000 0.000 0.856 0.032 0.000 0.112
#> GSM634657 5 0.7543 0.10013 0.300 0.092 0.000 0.012 0.332 0.264
#> GSM634658 1 0.5180 0.27200 0.580 0.028 0.020 0.016 0.356 0.000
#> GSM634660 1 0.6238 -0.12062 0.452 0.004 0.000 0.012 0.340 0.192
#> GSM634661 2 0.2542 0.73168 0.000 0.876 0.000 0.000 0.080 0.044
#> GSM634662 2 0.6803 0.09305 0.136 0.424 0.012 0.012 0.384 0.032
#> GSM634663 2 0.2958 0.71899 0.008 0.824 0.000 0.008 0.160 0.000
#> GSM634664 4 0.1951 0.69660 0.000 0.020 0.060 0.916 0.004 0.000
#> GSM634665 1 0.6024 0.15715 0.536 0.000 0.172 0.268 0.024 0.000
#> GSM634668 2 0.7188 -0.01305 0.024 0.352 0.244 0.036 0.344 0.000
#> GSM634671 1 0.6538 -0.01186 0.444 0.000 0.360 0.064 0.132 0.000
#> GSM634672 3 0.1340 0.62755 0.000 0.000 0.948 0.004 0.040 0.008
#> GSM634673 6 0.4041 0.54713 0.000 0.000 0.216 0.040 0.008 0.736
#> GSM634674 2 0.3803 0.70620 0.000 0.788 0.004 0.012 0.156 0.040
#> GSM634675 2 0.3980 0.65782 0.068 0.760 0.000 0.004 0.168 0.000
#> GSM634676 1 0.3914 0.49851 0.768 0.000 0.000 0.128 0.104 0.000
#> GSM634677 2 0.2450 0.74732 0.032 0.892 0.000 0.004 0.068 0.004
#> GSM634678 2 0.4161 0.67836 0.008 0.760 0.028 0.024 0.180 0.000
#> GSM634682 2 0.5310 0.51036 0.000 0.604 0.000 0.004 0.144 0.248
#> GSM634683 2 0.2196 0.74384 0.004 0.884 0.000 0.000 0.108 0.004
#> GSM634684 1 0.3383 0.42661 0.728 0.000 0.004 0.000 0.268 0.000
#> GSM634685 6 0.3338 0.59554 0.000 0.004 0.016 0.036 0.108 0.836
#> GSM634686 1 0.1010 0.56860 0.960 0.000 0.000 0.000 0.036 0.004
#> GSM634687 2 0.1296 0.75233 0.000 0.948 0.000 0.004 0.044 0.004
#> GSM634689 2 0.6965 0.19673 0.000 0.444 0.324 0.152 0.068 0.012
#> GSM634691 2 0.1908 0.74795 0.004 0.900 0.000 0.000 0.096 0.000
#> GSM634692 1 0.1075 0.56513 0.952 0.000 0.000 0.000 0.048 0.000
#> GSM634693 3 0.7118 0.02762 0.316 0.000 0.396 0.100 0.188 0.000
#> GSM634695 6 0.6162 0.32212 0.000 0.256 0.000 0.024 0.204 0.516
#> GSM634696 4 0.4088 0.63569 0.020 0.000 0.100 0.780 0.100 0.000
#> GSM634697 4 0.4355 0.49247 0.000 0.000 0.320 0.644 0.004 0.032
#> GSM634699 4 0.2306 0.63980 0.000 0.004 0.004 0.888 0.008 0.096
#> GSM634700 2 0.2070 0.74955 0.000 0.896 0.000 0.012 0.092 0.000
#> GSM634701 1 0.4404 0.37558 0.648 0.008 0.016 0.008 0.320 0.000
#> GSM634702 3 0.5533 0.42516 0.032 0.044 0.604 0.008 0.304 0.008
#> GSM634703 1 0.4008 0.46406 0.740 0.064 0.000 0.000 0.196 0.000
#> GSM634708 2 0.0777 0.75212 0.000 0.972 0.000 0.000 0.024 0.004
#> GSM634709 1 0.2053 0.54571 0.888 0.000 0.004 0.000 0.108 0.000
#> GSM634710 3 0.3354 0.57422 0.000 0.000 0.824 0.128 0.028 0.020
#> GSM634712 3 0.1251 0.62306 0.000 0.000 0.956 0.012 0.008 0.024
#> GSM634713 2 0.3178 0.71923 0.000 0.848 0.000 0.056 0.080 0.016
#> GSM634714 6 0.3743 0.59606 0.008 0.000 0.112 0.072 0.004 0.804
#> GSM634716 1 0.5389 0.11901 0.548 0.000 0.008 0.000 0.344 0.100
#> GSM634717 1 0.1588 0.55833 0.924 0.000 0.000 0.004 0.072 0.000
#> GSM634718 1 0.1624 0.56707 0.936 0.020 0.000 0.000 0.040 0.004
#> GSM634719 1 0.2219 0.53996 0.864 0.000 0.000 0.000 0.136 0.000
#> GSM634720 6 0.3721 0.60194 0.000 0.000 0.064 0.108 0.020 0.808
#> GSM634721 3 0.3511 0.58423 0.004 0.000 0.800 0.048 0.148 0.000
#> GSM634722 2 0.5420 0.63412 0.000 0.696 0.020 0.056 0.156 0.072
#> GSM634723 1 0.2146 0.53606 0.880 0.000 0.000 0.000 0.116 0.004
#> GSM634724 3 0.6018 0.42329 0.040 0.000 0.608 0.012 0.132 0.208
#> GSM634725 3 0.6326 0.12744 0.220 0.008 0.480 0.012 0.280 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 individual(p) k
#> ATC:NMF 90 0.682 2
#> ATC:NMF 90 0.560 3
#> ATC:NMF 85 0.558 4
#> ATC:NMF 68 0.203 5
#> ATC:NMF 53 0.346 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