Date: 2019-12-26 01:19:33 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 16752 rows and 81 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)
Dimension of the input matrix:
mat = get_matrix(res_list)
dim(mat)
#> [1] 16752 81
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, 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.996 | 0.998 | ** | |
SD:skmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
CV:kmeans | 2 | 1.000 | 0.987 | 0.995 | ** | |
CV:mclust | 2 | 1.000 | 0.993 | 0.997 | ** | |
MAD:kmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
MAD:skmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
MAD:NMF | 2 | 1.000 | 0.980 | 0.992 | ** | |
ATC:hclust | 2 | 1.000 | 0.983 | 0.990 | ** | |
ATC:kmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
ATC:skmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
ATC:mclust | 2 | 1.000 | 0.999 | 1.000 | ** | |
ATC:NMF | 2 | 1.000 | 0.978 | 0.991 | ** | |
MAD:hclust | 2 | 0.998 | 0.963 | 0.981 | ** | |
CV:skmeans | 3 | 0.984 | 0.957 | 0.960 | ** | 2 |
ATC:pam | 4 | 0.959 | 0.933 | 0.971 | ** | 2 |
SD:NMF | 3 | 0.951 | 0.926 | 0.971 | ** | 2 |
SD:pam | 2 | 0.947 | 0.930 | 0.972 | * | |
MAD:pam | 4 | 0.946 | 0.894 | 0.959 | * | 2 |
MAD:mclust | 3 | 0.946 | 0.919 | 0.949 | * | 2 |
SD:mclust | 3 | 0.920 | 0.912 | 0.950 | * | 2 |
CV:NMF | 6 | 0.918 | 0.869 | 0.940 | * | 2,3 |
CV:hclust | 5 | 0.917 | 0.887 | 0.941 | * | |
CV:pam | 3 | 0.891 | 0.852 | 0.944 | ||
SD:hclust | 2 | 0.870 | 0.949 | 0.977 |
**: 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 1.000 0.978 0.991 0.505 0.494 0.494
#> CV:NMF 2 1.000 0.995 0.998 0.506 0.494 0.494
#> MAD:NMF 2 1.000 0.980 0.992 0.505 0.494 0.494
#> ATC:NMF 2 1.000 0.978 0.991 0.505 0.494 0.494
#> SD:skmeans 2 1.000 1.000 1.000 0.506 0.494 0.494
#> CV:skmeans 2 1.000 0.990 0.996 0.505 0.496 0.496
#> MAD:skmeans 2 1.000 1.000 1.000 0.506 0.494 0.494
#> ATC:skmeans 2 1.000 1.000 1.000 0.506 0.494 0.494
#> SD:mclust 2 1.000 0.992 0.997 0.507 0.494 0.494
#> CV:mclust 2 1.000 0.993 0.997 0.507 0.494 0.494
#> MAD:mclust 2 1.000 0.991 0.996 0.506 0.494 0.494
#> ATC:mclust 2 1.000 0.999 1.000 0.506 0.494 0.494
#> SD:kmeans 2 1.000 0.996 0.998 0.506 0.494 0.494
#> CV:kmeans 2 1.000 0.987 0.995 0.504 0.496 0.496
#> MAD:kmeans 2 1.000 1.000 1.000 0.506 0.494 0.494
#> ATC:kmeans 2 1.000 1.000 1.000 0.506 0.494 0.494
#> SD:pam 2 0.947 0.930 0.972 0.501 0.498 0.498
#> CV:pam 2 0.743 0.869 0.947 0.342 0.664 0.664
#> MAD:pam 2 1.000 0.978 0.990 0.505 0.494 0.494
#> ATC:pam 2 1.000 0.992 0.996 0.503 0.498 0.498
#> SD:hclust 2 0.870 0.949 0.977 0.500 0.496 0.496
#> CV:hclust 2 0.557 0.809 0.910 0.422 0.542 0.542
#> MAD:hclust 2 0.998 0.963 0.981 0.503 0.494 0.494
#> ATC:hclust 2 1.000 0.983 0.990 0.504 0.494 0.494
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 0.951 0.926 0.971 0.233 0.848 0.702
#> CV:NMF 3 1.000 0.982 0.992 0.243 0.867 0.733
#> MAD:NMF 3 0.833 0.865 0.943 0.229 0.852 0.710
#> ATC:NMF 3 0.849 0.807 0.888 0.188 0.872 0.747
#> SD:skmeans 3 0.854 0.919 0.929 0.243 0.864 0.729
#> CV:skmeans 3 0.984 0.957 0.960 0.245 0.859 0.721
#> MAD:skmeans 3 0.700 0.758 0.861 0.235 0.901 0.801
#> ATC:skmeans 3 0.867 0.916 0.929 0.205 0.905 0.808
#> SD:mclust 3 0.920 0.912 0.950 0.225 0.859 0.721
#> CV:mclust 3 0.750 0.870 0.876 0.257 0.792 0.602
#> MAD:mclust 3 0.946 0.919 0.949 0.226 0.859 0.721
#> ATC:mclust 3 0.725 0.718 0.835 0.182 0.883 0.763
#> SD:kmeans 3 0.673 0.738 0.756 0.227 0.848 0.703
#> CV:kmeans 3 0.640 0.697 0.755 0.227 0.904 0.806
#> MAD:kmeans 3 0.664 0.421 0.786 0.228 0.988 0.976
#> ATC:kmeans 3 0.656 0.697 0.718 0.225 0.883 0.764
#> SD:pam 3 0.802 0.797 0.920 0.172 0.839 0.701
#> CV:pam 3 0.891 0.852 0.944 0.453 0.836 0.756
#> MAD:pam 3 0.808 0.827 0.919 0.175 0.868 0.746
#> ATC:pam 3 0.862 0.731 0.833 0.186 0.895 0.793
#> SD:hclust 3 0.843 0.824 0.868 0.192 0.883 0.770
#> CV:hclust 3 0.670 0.727 0.852 0.205 0.880 0.792
#> MAD:hclust 3 0.806 0.842 0.915 0.154 0.916 0.835
#> ATC:hclust 3 0.762 0.725 0.868 0.205 0.883 0.764
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.760 0.796 0.892 0.1752 0.810 0.539
#> CV:NMF 4 0.775 0.773 0.900 0.1504 0.826 0.575
#> MAD:NMF 4 0.614 0.637 0.815 0.1633 0.817 0.557
#> ATC:NMF 4 0.692 0.703 0.849 0.1579 0.856 0.662
#> SD:skmeans 4 0.794 0.818 0.896 0.1923 0.858 0.623
#> CV:skmeans 4 0.743 0.806 0.882 0.1840 0.860 0.632
#> MAD:skmeans 4 0.746 0.695 0.823 0.1899 0.778 0.487
#> ATC:skmeans 4 0.711 0.818 0.873 0.1798 0.857 0.645
#> SD:mclust 4 0.683 0.801 0.852 0.0818 0.924 0.812
#> CV:mclust 4 0.742 0.796 0.877 0.0552 0.881 0.703
#> MAD:mclust 4 0.670 0.721 0.783 0.1103 0.935 0.837
#> ATC:mclust 4 0.718 0.769 0.793 0.0885 0.948 0.867
#> SD:kmeans 4 0.606 0.321 0.597 0.1408 0.701 0.391
#> CV:kmeans 4 0.612 0.576 0.665 0.1296 0.780 0.498
#> MAD:kmeans 4 0.614 0.705 0.717 0.1398 0.747 0.482
#> ATC:kmeans 4 0.600 0.573 0.717 0.1436 0.846 0.609
#> SD:pam 4 0.806 0.881 0.925 0.1195 0.889 0.748
#> CV:pam 4 0.592 0.723 0.804 0.2508 0.843 0.709
#> MAD:pam 4 0.946 0.894 0.959 0.1069 0.898 0.762
#> ATC:pam 4 0.959 0.933 0.971 0.0669 0.910 0.792
#> SD:hclust 4 0.706 0.757 0.819 0.0813 0.970 0.927
#> CV:hclust 4 0.749 0.760 0.877 0.1790 0.807 0.640
#> MAD:hclust 4 0.655 0.579 0.822 0.1374 0.909 0.797
#> ATC:hclust 4 0.814 0.862 0.917 0.0650 0.935 0.834
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.837 0.779 0.902 0.0847 0.831 0.465
#> CV:NMF 5 0.789 0.743 0.890 0.0885 0.800 0.412
#> MAD:NMF 5 0.662 0.655 0.797 0.0869 0.829 0.472
#> ATC:NMF 5 0.678 0.647 0.817 0.1193 0.812 0.469
#> SD:skmeans 5 0.808 0.819 0.888 0.0545 0.934 0.742
#> CV:skmeans 5 0.724 0.721 0.844 0.0577 0.938 0.760
#> MAD:skmeans 5 0.789 0.791 0.875 0.0637 0.942 0.772
#> ATC:skmeans 5 0.689 0.679 0.821 0.0702 0.938 0.770
#> SD:mclust 5 0.776 0.703 0.881 0.1235 0.861 0.625
#> CV:mclust 5 0.839 0.813 0.909 0.0853 0.934 0.808
#> MAD:mclust 5 0.834 0.778 0.909 0.1106 0.838 0.564
#> ATC:mclust 5 0.678 0.662 0.816 0.0898 0.914 0.768
#> SD:kmeans 5 0.677 0.775 0.810 0.0827 0.808 0.459
#> CV:kmeans 5 0.633 0.730 0.795 0.0859 0.886 0.613
#> MAD:kmeans 5 0.618 0.785 0.800 0.0887 0.934 0.747
#> ATC:kmeans 5 0.592 0.719 0.757 0.0842 0.902 0.653
#> SD:pam 5 0.821 0.804 0.914 0.1916 0.859 0.603
#> CV:pam 5 0.582 0.541 0.798 0.0874 0.862 0.678
#> MAD:pam 5 0.747 0.771 0.892 0.1885 0.853 0.580
#> ATC:pam 5 0.773 0.803 0.907 0.2221 0.851 0.591
#> SD:hclust 5 0.685 0.776 0.828 0.0838 0.961 0.898
#> CV:hclust 5 0.917 0.887 0.941 0.0802 0.956 0.886
#> MAD:hclust 5 0.648 0.587 0.754 0.0818 0.869 0.657
#> ATC:hclust 5 0.844 0.857 0.938 0.0186 0.998 0.994
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.851 0.729 0.880 0.0382 0.930 0.692
#> CV:NMF 6 0.918 0.869 0.940 0.0373 0.902 0.602
#> MAD:NMF 6 0.763 0.769 0.862 0.0437 0.923 0.682
#> ATC:NMF 6 0.690 0.654 0.803 0.0350 0.880 0.524
#> SD:skmeans 6 0.791 0.642 0.800 0.0393 0.982 0.915
#> CV:skmeans 6 0.736 0.639 0.799 0.0426 0.939 0.727
#> MAD:skmeans 6 0.782 0.680 0.823 0.0390 0.969 0.856
#> ATC:skmeans 6 0.674 0.622 0.796 0.0384 0.963 0.836
#> SD:mclust 6 0.809 0.781 0.864 0.0465 0.901 0.635
#> CV:mclust 6 0.723 0.728 0.824 0.0523 0.973 0.908
#> MAD:mclust 6 0.770 0.714 0.823 0.0410 0.948 0.777
#> ATC:mclust 6 0.616 0.627 0.760 0.0806 0.927 0.767
#> SD:kmeans 6 0.771 0.621 0.747 0.0600 0.938 0.723
#> CV:kmeans 6 0.731 0.701 0.784 0.0449 0.959 0.821
#> MAD:kmeans 6 0.751 0.704 0.810 0.0551 0.937 0.720
#> ATC:kmeans 6 0.667 0.662 0.755 0.0498 0.962 0.825
#> SD:pam 6 0.831 0.770 0.902 0.0306 0.973 0.875
#> CV:pam 6 0.686 0.652 0.846 0.0851 0.939 0.814
#> MAD:pam 6 0.739 0.697 0.840 0.0390 0.967 0.847
#> ATC:pam 6 0.742 0.737 0.860 0.0282 0.971 0.873
#> SD:hclust 6 0.711 0.716 0.849 0.1031 0.871 0.625
#> CV:hclust 6 0.727 0.780 0.831 0.0921 1.000 1.000
#> MAD:hclust 6 0.740 0.676 0.852 0.0779 0.897 0.647
#> ATC:hclust 6 0.678 0.729 0.847 0.1491 0.884 0.660
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)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.870 0.949 0.977 0.4997 0.496 0.496
#> 3 3 0.843 0.824 0.868 0.1922 0.883 0.770
#> 4 4 0.706 0.757 0.819 0.0813 0.970 0.927
#> 5 5 0.685 0.776 0.828 0.0838 0.961 0.898
#> 6 6 0.711 0.716 0.849 0.1031 0.871 0.625
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
#> SRR2532323 1 0.0000 0.9641 1.000 0.000
#> SRR2532322 1 0.0000 0.9641 1.000 0.000
#> SRR2532321 2 0.0000 0.9860 0.000 1.000
#> SRR2532320 2 0.0000 0.9860 0.000 1.000
#> SRR2532319 1 0.1414 0.9622 0.980 0.020
#> SRR2532317 2 0.0000 0.9860 0.000 1.000
#> SRR2532318 2 0.0000 0.9860 0.000 1.000
#> SRR2532315 1 0.0672 0.9662 0.992 0.008
#> SRR2532316 1 0.0672 0.9662 0.992 0.008
#> SRR2532396 2 0.0000 0.9860 0.000 1.000
#> SRR2532395 2 0.0000 0.9860 0.000 1.000
#> SRR2532394 2 0.0000 0.9860 0.000 1.000
#> SRR2532393 2 0.0000 0.9860 0.000 1.000
#> SRR2532392 2 0.0000 0.9860 0.000 1.000
#> SRR2532391 1 0.5059 0.8916 0.888 0.112
#> SRR2532390 2 0.0000 0.9860 0.000 1.000
#> SRR2532389 1 0.9833 0.3046 0.576 0.424
#> SRR2532388 2 0.0000 0.9860 0.000 1.000
#> SRR2532387 2 0.0000 0.9860 0.000 1.000
#> SRR2532386 1 0.0672 0.9662 0.992 0.008
#> SRR2532384 2 0.0000 0.9860 0.000 1.000
#> SRR2532385 2 0.3584 0.9129 0.068 0.932
#> SRR2532383 2 0.0000 0.9860 0.000 1.000
#> SRR2532381 1 0.0672 0.9662 0.992 0.008
#> SRR2532382 1 0.0000 0.9641 1.000 0.000
#> SRR2532379 1 0.0672 0.9662 0.992 0.008
#> SRR2532380 1 0.0000 0.9641 1.000 0.000
#> SRR2532378 1 0.0000 0.9641 1.000 0.000
#> SRR2532377 2 0.0000 0.9860 0.000 1.000
#> SRR2532376 2 0.0000 0.9860 0.000 1.000
#> SRR2532375 2 0.0000 0.9860 0.000 1.000
#> SRR2532374 1 0.5059 0.8916 0.888 0.112
#> SRR2532372 1 0.1184 0.9643 0.984 0.016
#> SRR2532373 2 0.0000 0.9860 0.000 1.000
#> SRR2532371 2 0.0000 0.9860 0.000 1.000
#> SRR2532370 1 0.0000 0.9641 1.000 0.000
#> SRR2532369 2 0.0000 0.9860 0.000 1.000
#> SRR2532368 2 0.0000 0.9860 0.000 1.000
#> SRR2532367 2 0.0000 0.9860 0.000 1.000
#> SRR2532366 1 0.0000 0.9641 1.000 0.000
#> SRR2532365 2 0.0000 0.9860 0.000 1.000
#> SRR2532364 1 0.0000 0.9641 1.000 0.000
#> SRR2532363 2 0.0000 0.9860 0.000 1.000
#> SRR2532362 2 0.0000 0.9860 0.000 1.000
#> SRR2532361 1 0.0672 0.9662 0.992 0.008
#> SRR2532360 1 0.0672 0.9662 0.992 0.008
#> SRR2532359 1 0.0672 0.9662 0.992 0.008
#> SRR2532358 1 0.1184 0.9643 0.984 0.016
#> SRR2532357 2 0.0000 0.9860 0.000 1.000
#> SRR2532356 2 0.0000 0.9860 0.000 1.000
#> SRR2532355 1 0.1184 0.9643 0.984 0.016
#> SRR2532354 1 0.0000 0.9641 1.000 0.000
#> SRR2532353 1 0.0938 0.9656 0.988 0.012
#> SRR2532352 2 0.0000 0.9860 0.000 1.000
#> SRR2532350 1 0.5059 0.8916 0.888 0.112
#> SRR2532349 1 0.1184 0.9643 0.984 0.016
#> SRR2532348 2 0.0000 0.9860 0.000 1.000
#> SRR2532347 2 0.0000 0.9860 0.000 1.000
#> SRR2532346 2 0.0000 0.9860 0.000 1.000
#> SRR2532345 2 0.0000 0.9860 0.000 1.000
#> SRR2532344 1 0.2043 0.9546 0.968 0.032
#> SRR2532343 1 0.0938 0.9656 0.988 0.012
#> SRR2532342 1 0.0672 0.9662 0.992 0.008
#> SRR2532341 1 0.5059 0.8916 0.888 0.112
#> SRR2532340 1 0.5059 0.8916 0.888 0.112
#> SRR2532339 2 0.0000 0.9860 0.000 1.000
#> SRR2532338 2 0.0000 0.9860 0.000 1.000
#> SRR2532337 2 0.0000 0.9860 0.000 1.000
#> SRR2532336 1 0.0000 0.9641 1.000 0.000
#> SRR2532335 1 0.4939 0.8952 0.892 0.108
#> SRR2532334 1 0.0938 0.9656 0.988 0.012
#> SRR2532333 2 0.0000 0.9860 0.000 1.000
#> SRR2532332 1 0.0000 0.9641 1.000 0.000
#> SRR2532331 2 0.0000 0.9860 0.000 1.000
#> SRR2532330 2 0.0000 0.9860 0.000 1.000
#> SRR2532329 2 0.0000 0.9860 0.000 1.000
#> SRR2532328 2 0.9993 -0.0307 0.484 0.516
#> SRR2532327 2 0.0000 0.9860 0.000 1.000
#> SRR2532326 1 0.0938 0.9656 0.988 0.012
#> SRR2532324 2 0.0000 0.9860 0.000 1.000
#> SRR2532325 1 0.0000 0.9641 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.4750 0.772 0.784 0.000 0.216
#> SRR2532322 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532321 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532319 3 0.0237 0.735 0.000 0.004 0.996
#> SRR2532317 2 0.0475 0.965 0.004 0.992 0.004
#> SRR2532318 2 0.1182 0.955 0.012 0.976 0.012
#> SRR2532315 3 0.5968 0.561 0.364 0.000 0.636
#> SRR2532316 3 0.5968 0.561 0.364 0.000 0.636
#> SRR2532396 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532393 2 0.0661 0.962 0.004 0.988 0.008
#> SRR2532392 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532391 3 0.5344 0.600 0.092 0.084 0.824
#> SRR2532390 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532389 2 0.9753 -0.316 0.228 0.400 0.372
#> SRR2532388 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532386 3 0.6252 0.398 0.444 0.000 0.556
#> SRR2532384 2 0.0237 0.967 0.004 0.996 0.000
#> SRR2532385 2 0.3310 0.888 0.028 0.908 0.064
#> SRR2532383 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532381 3 0.6252 0.398 0.444 0.000 0.556
#> SRR2532382 1 0.4750 0.765 0.784 0.000 0.216
#> SRR2532379 3 0.5968 0.561 0.364 0.000 0.636
#> SRR2532380 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532378 1 0.4750 0.672 0.784 0.000 0.216
#> SRR2532377 2 0.0237 0.967 0.004 0.996 0.000
#> SRR2532376 2 0.1182 0.955 0.012 0.976 0.012
#> SRR2532375 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532374 3 0.5344 0.600 0.092 0.084 0.824
#> SRR2532372 3 0.0475 0.735 0.004 0.004 0.992
#> SRR2532373 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532370 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532369 2 0.0475 0.965 0.004 0.992 0.004
#> SRR2532368 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532366 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532365 2 0.0237 0.967 0.004 0.996 0.000
#> SRR2532364 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532363 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532361 3 0.5968 0.561 0.364 0.000 0.636
#> SRR2532360 3 0.5968 0.561 0.364 0.000 0.636
#> SRR2532359 3 0.2356 0.677 0.072 0.000 0.928
#> SRR2532358 3 0.3030 0.708 0.092 0.004 0.904
#> SRR2532357 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532355 3 0.0000 0.735 0.000 0.000 1.000
#> SRR2532354 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532353 3 0.0237 0.734 0.004 0.000 0.996
#> SRR2532352 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532350 3 0.5344 0.600 0.092 0.084 0.824
#> SRR2532349 3 0.0475 0.735 0.004 0.004 0.992
#> SRR2532348 2 0.1182 0.955 0.012 0.976 0.012
#> SRR2532347 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532346 2 0.1182 0.955 0.012 0.976 0.012
#> SRR2532345 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532344 3 0.0848 0.732 0.008 0.008 0.984
#> SRR2532343 3 0.0237 0.734 0.004 0.000 0.996
#> SRR2532342 3 0.2356 0.677 0.072 0.000 0.928
#> SRR2532341 3 0.5344 0.600 0.092 0.084 0.824
#> SRR2532340 3 0.5344 0.600 0.092 0.084 0.824
#> SRR2532339 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532336 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532335 3 0.5260 0.604 0.092 0.080 0.828
#> SRR2532334 3 0.0237 0.734 0.004 0.000 0.996
#> SRR2532333 2 0.1182 0.955 0.012 0.976 0.012
#> SRR2532332 1 0.5968 0.918 0.636 0.000 0.364
#> SRR2532331 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532330 2 0.0237 0.967 0.004 0.996 0.000
#> SRR2532329 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532328 2 0.8264 0.229 0.436 0.488 0.076
#> SRR2532327 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532326 3 0.0237 0.734 0.004 0.000 0.996
#> SRR2532324 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532325 1 0.5968 0.918 0.636 0.000 0.364
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.3208 0.73524 0.848 0.000 0.148 0.004
#> SRR2532322 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532320 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532319 3 0.5167 0.70385 0.340 0.000 0.644 0.016
#> SRR2532317 2 0.3266 0.82705 0.000 0.832 0.000 0.168
#> SRR2532318 2 0.3569 0.79767 0.000 0.804 0.000 0.196
#> SRR2532315 3 0.3024 0.38630 0.000 0.000 0.852 0.148
#> SRR2532316 3 0.3024 0.38630 0.000 0.000 0.852 0.148
#> SRR2532396 2 0.0921 0.90751 0.000 0.972 0.000 0.028
#> SRR2532395 2 0.2011 0.88533 0.000 0.920 0.000 0.080
#> SRR2532394 2 0.0921 0.90751 0.000 0.972 0.000 0.028
#> SRR2532393 2 0.3024 0.84484 0.000 0.852 0.000 0.148
#> SRR2532392 2 0.1302 0.90450 0.000 0.956 0.000 0.044
#> SRR2532391 3 0.7559 0.59384 0.356 0.004 0.468 0.172
#> SRR2532390 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532389 1 0.7071 0.00444 0.504 0.112 0.004 0.380
#> SRR2532388 2 0.0817 0.90592 0.000 0.976 0.000 0.024
#> SRR2532387 2 0.0921 0.90751 0.000 0.972 0.000 0.028
#> SRR2532386 3 0.5759 0.34472 0.268 0.000 0.668 0.064
#> SRR2532384 2 0.2704 0.86244 0.000 0.876 0.000 0.124
#> SRR2532385 2 0.5256 0.68689 0.000 0.732 0.064 0.204
#> SRR2532383 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532381 3 0.5759 0.34472 0.268 0.000 0.668 0.064
#> SRR2532382 1 0.3401 0.72710 0.840 0.000 0.152 0.008
#> SRR2532379 3 0.3024 0.38630 0.000 0.000 0.852 0.148
#> SRR2532380 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532378 1 0.4799 0.62738 0.744 0.000 0.224 0.032
#> SRR2532377 2 0.1792 0.89237 0.000 0.932 0.000 0.068
#> SRR2532376 2 0.3569 0.79767 0.000 0.804 0.000 0.196
#> SRR2532375 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532374 3 0.7559 0.59384 0.356 0.004 0.468 0.172
#> SRR2532372 3 0.4936 0.70551 0.340 0.000 0.652 0.008
#> SRR2532373 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532371 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532370 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532369 2 0.3311 0.82369 0.000 0.828 0.000 0.172
#> SRR2532368 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532367 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532366 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532365 2 0.2530 0.87039 0.000 0.888 0.000 0.112
#> SRR2532364 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532362 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532361 3 0.3024 0.38630 0.000 0.000 0.852 0.148
#> SRR2532360 3 0.3024 0.38630 0.000 0.000 0.852 0.148
#> SRR2532359 3 0.5050 0.65096 0.408 0.000 0.588 0.004
#> SRR2532358 3 0.4934 0.66988 0.252 0.000 0.720 0.028
#> SRR2532357 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532356 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532355 3 0.4936 0.70557 0.340 0.000 0.652 0.008
#> SRR2532354 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532353 3 0.4800 0.70543 0.340 0.000 0.656 0.004
#> SRR2532352 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532350 3 0.7559 0.59384 0.356 0.004 0.468 0.172
#> SRR2532349 3 0.4936 0.70551 0.340 0.000 0.652 0.008
#> SRR2532348 2 0.3569 0.79767 0.000 0.804 0.000 0.196
#> SRR2532347 2 0.2081 0.88367 0.000 0.916 0.000 0.084
#> SRR2532346 2 0.3569 0.79767 0.000 0.804 0.000 0.196
#> SRR2532345 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532344 3 0.5548 0.69808 0.340 0.000 0.628 0.032
#> SRR2532343 3 0.4800 0.70543 0.340 0.000 0.656 0.004
#> SRR2532342 3 0.5050 0.65096 0.408 0.000 0.588 0.004
#> SRR2532341 3 0.7559 0.59384 0.356 0.004 0.468 0.172
#> SRR2532340 3 0.7559 0.59384 0.356 0.004 0.468 0.172
#> SRR2532339 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532338 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532337 2 0.2011 0.88533 0.000 0.920 0.000 0.080
#> SRR2532336 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532335 3 0.7530 0.59709 0.356 0.004 0.472 0.168
#> SRR2532334 3 0.4800 0.70543 0.340 0.000 0.656 0.004
#> SRR2532333 2 0.3569 0.79767 0.000 0.804 0.000 0.196
#> SRR2532332 1 0.0000 0.87517 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532330 2 0.2281 0.87845 0.000 0.904 0.000 0.096
#> SRR2532329 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532328 4 0.5219 0.00000 0.016 0.160 0.056 0.768
#> SRR2532327 2 0.1389 0.89924 0.000 0.952 0.000 0.048
#> SRR2532326 3 0.4800 0.70543 0.340 0.000 0.656 0.004
#> SRR2532324 2 0.0000 0.90799 0.000 1.000 0.000 0.000
#> SRR2532325 1 0.0000 0.87517 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.3412 0.7656 0.820 0.000 0.028 0.152 0.000
#> SRR2532322 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532321 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532320 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532319 3 0.3462 0.8103 0.000 0.000 0.792 0.196 0.012
#> SRR2532317 2 0.3684 0.7473 0.000 0.720 0.000 0.000 0.280
#> SRR2532318 2 0.3966 0.7053 0.000 0.664 0.000 0.000 0.336
#> SRR2532315 4 0.2179 0.8705 0.000 0.000 0.112 0.888 0.000
#> SRR2532316 4 0.2179 0.8705 0.000 0.000 0.112 0.888 0.000
#> SRR2532396 2 0.0703 0.8570 0.000 0.976 0.000 0.000 0.024
#> SRR2532395 2 0.3305 0.7874 0.000 0.776 0.000 0.000 0.224
#> SRR2532394 2 0.0703 0.8570 0.000 0.976 0.000 0.000 0.024
#> SRR2532393 2 0.3966 0.7135 0.000 0.664 0.000 0.000 0.336
#> SRR2532392 2 0.1544 0.8557 0.000 0.932 0.000 0.000 0.068
#> SRR2532391 3 0.0162 0.7500 0.000 0.000 0.996 0.000 0.004
#> SRR2532390 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532389 1 0.8419 -0.0892 0.388 0.016 0.292 0.112 0.192
#> SRR2532388 2 0.2648 0.8176 0.000 0.848 0.000 0.000 0.152
#> SRR2532387 2 0.0880 0.8565 0.000 0.968 0.000 0.000 0.032
#> SRR2532386 4 0.5472 0.6669 0.260 0.000 0.108 0.632 0.000
#> SRR2532384 2 0.3876 0.7304 0.000 0.684 0.000 0.000 0.316
#> SRR2532385 2 0.5755 0.5200 0.000 0.516 0.052 0.016 0.416
#> SRR2532383 2 0.0510 0.8576 0.000 0.984 0.000 0.000 0.016
#> SRR2532381 4 0.5472 0.6669 0.260 0.000 0.108 0.632 0.000
#> SRR2532382 1 0.3495 0.7582 0.812 0.000 0.028 0.160 0.000
#> SRR2532379 4 0.2179 0.8705 0.000 0.000 0.112 0.888 0.000
#> SRR2532380 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532378 1 0.4193 0.6531 0.720 0.000 0.024 0.256 0.000
#> SRR2532377 2 0.2280 0.8332 0.000 0.880 0.000 0.000 0.120
#> SRR2532376 2 0.3966 0.7053 0.000 0.664 0.000 0.000 0.336
#> SRR2532375 2 0.0404 0.8575 0.000 0.988 0.000 0.000 0.012
#> SRR2532374 3 0.0162 0.7500 0.000 0.000 0.996 0.000 0.004
#> SRR2532372 3 0.3109 0.8120 0.000 0.000 0.800 0.200 0.000
#> SRR2532373 2 0.0404 0.8572 0.000 0.988 0.000 0.000 0.012
#> SRR2532371 2 0.0404 0.8575 0.000 0.988 0.000 0.000 0.012
#> SRR2532370 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532369 2 0.4138 0.6636 0.000 0.616 0.000 0.000 0.384
#> SRR2532368 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532367 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532366 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532365 2 0.3003 0.8062 0.000 0.812 0.000 0.000 0.188
#> SRR2532364 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532363 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532362 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532361 4 0.2179 0.8705 0.000 0.000 0.112 0.888 0.000
#> SRR2532360 4 0.2179 0.8705 0.000 0.000 0.112 0.888 0.000
#> SRR2532359 3 0.6357 0.4024 0.200 0.000 0.512 0.288 0.000
#> SRR2532358 3 0.3983 0.6447 0.000 0.000 0.660 0.340 0.000
#> SRR2532357 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532356 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532355 3 0.3300 0.8106 0.000 0.000 0.792 0.204 0.004
#> SRR2532354 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532353 3 0.3242 0.8065 0.000 0.000 0.784 0.216 0.000
#> SRR2532352 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532350 3 0.0162 0.7500 0.000 0.000 0.996 0.000 0.004
#> SRR2532349 3 0.3109 0.8120 0.000 0.000 0.800 0.200 0.000
#> SRR2532348 2 0.3966 0.7053 0.000 0.664 0.000 0.000 0.336
#> SRR2532347 2 0.3424 0.7794 0.000 0.760 0.000 0.000 0.240
#> SRR2532346 2 0.3966 0.7053 0.000 0.664 0.000 0.000 0.336
#> SRR2532345 2 0.0404 0.8575 0.000 0.988 0.000 0.000 0.012
#> SRR2532344 3 0.3687 0.8058 0.000 0.000 0.792 0.180 0.028
#> SRR2532343 3 0.3242 0.8065 0.000 0.000 0.784 0.216 0.000
#> SRR2532342 3 0.6333 0.4119 0.196 0.000 0.516 0.288 0.000
#> SRR2532341 3 0.0162 0.7500 0.000 0.000 0.996 0.000 0.004
#> SRR2532340 3 0.0162 0.7500 0.000 0.000 0.996 0.000 0.004
#> SRR2532339 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532338 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532337 2 0.3305 0.7874 0.000 0.776 0.000 0.000 0.224
#> SRR2532336 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532335 3 0.0324 0.7529 0.000 0.000 0.992 0.004 0.004
#> SRR2532334 3 0.3242 0.8065 0.000 0.000 0.784 0.216 0.000
#> SRR2532333 2 0.3966 0.7053 0.000 0.664 0.000 0.000 0.336
#> SRR2532332 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
#> SRR2532331 2 0.0404 0.8575 0.000 0.988 0.000 0.000 0.012
#> SRR2532330 2 0.3586 0.7657 0.000 0.736 0.000 0.000 0.264
#> SRR2532329 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532328 5 0.7541 0.0000 0.100 0.028 0.192 0.112 0.568
#> SRR2532327 2 0.1270 0.8491 0.000 0.948 0.000 0.000 0.052
#> SRR2532326 3 0.3242 0.8065 0.000 0.000 0.784 0.216 0.000
#> SRR2532324 2 0.0404 0.8575 0.000 0.988 0.000 0.000 0.012
#> SRR2532325 1 0.2020 0.8906 0.900 0.000 0.100 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.2378 0.7587 0.848 0.000 0.000 0.152 0.000 0.000
#> SRR2532322 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0632 0.8113 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR2532320 2 0.0713 0.8115 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR2532319 3 0.0725 0.7972 0.000 0.000 0.976 0.012 0.012 0.000
#> SRR2532317 5 0.3789 0.3642 0.000 0.416 0.000 0.000 0.584 0.000
#> SRR2532318 5 0.2823 0.7450 0.000 0.204 0.000 0.000 0.796 0.000
#> SRR2532315 4 0.2854 0.8706 0.000 0.000 0.208 0.792 0.000 0.000
#> SRR2532316 4 0.2854 0.8706 0.000 0.000 0.208 0.792 0.000 0.000
#> SRR2532396 2 0.3244 0.6530 0.000 0.732 0.000 0.000 0.268 0.000
#> SRR2532395 5 0.3076 0.6969 0.000 0.240 0.000 0.000 0.760 0.000
#> SRR2532394 2 0.3244 0.6530 0.000 0.732 0.000 0.000 0.268 0.000
#> SRR2532393 5 0.2491 0.7595 0.000 0.164 0.000 0.000 0.836 0.000
#> SRR2532392 2 0.1327 0.7973 0.000 0.936 0.000 0.000 0.064 0.000
#> SRR2532391 3 0.3450 0.7422 0.000 0.000 0.772 0.208 0.012 0.008
#> SRR2532390 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532389 6 0.3996 0.0863 0.484 0.000 0.004 0.000 0.000 0.512
#> SRR2532388 5 0.3851 0.1756 0.000 0.460 0.000 0.000 0.540 0.000
#> SRR2532387 2 0.3578 0.5192 0.000 0.660 0.000 0.000 0.340 0.000
#> SRR2532386 4 0.5640 0.6315 0.268 0.000 0.200 0.532 0.000 0.000
#> SRR2532384 5 0.1957 0.7470 0.000 0.112 0.000 0.000 0.888 0.000
#> SRR2532385 5 0.1594 0.6093 0.000 0.000 0.052 0.016 0.932 0.000
#> SRR2532383 2 0.2996 0.7113 0.000 0.772 0.000 0.000 0.228 0.000
#> SRR2532381 4 0.5640 0.6315 0.268 0.000 0.200 0.532 0.000 0.000
#> SRR2532382 1 0.2454 0.7481 0.840 0.000 0.000 0.160 0.000 0.000
#> SRR2532379 4 0.2854 0.8706 0.000 0.000 0.208 0.792 0.000 0.000
#> SRR2532380 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.3175 0.6074 0.744 0.000 0.000 0.256 0.000 0.000
#> SRR2532377 2 0.3695 0.3935 0.000 0.624 0.000 0.000 0.376 0.000
#> SRR2532376 5 0.2823 0.7450 0.000 0.204 0.000 0.000 0.796 0.000
#> SRR2532375 2 0.2969 0.7161 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR2532374 3 0.3450 0.7422 0.000 0.000 0.772 0.208 0.012 0.008
#> SRR2532372 3 0.0000 0.8000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532373 2 0.2762 0.7351 0.000 0.804 0.000 0.000 0.196 0.000
#> SRR2532371 2 0.2969 0.7161 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR2532370 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.1007 0.6941 0.000 0.044 0.000 0.000 0.956 0.000
#> SRR2532368 2 0.0713 0.8115 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR2532367 2 0.0713 0.8115 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR2532366 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532365 2 0.3868 -0.1398 0.000 0.508 0.000 0.000 0.492 0.000
#> SRR2532364 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532361 4 0.2854 0.8706 0.000 0.000 0.208 0.792 0.000 0.000
#> SRR2532360 4 0.2854 0.8706 0.000 0.000 0.208 0.792 0.000 0.000
#> SRR2532359 3 0.5523 0.0749 0.268 0.000 0.552 0.180 0.000 0.000
#> SRR2532358 3 0.2378 0.6565 0.000 0.000 0.848 0.152 0.000 0.000
#> SRR2532357 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532355 3 0.0603 0.7970 0.000 0.000 0.980 0.016 0.004 0.000
#> SRR2532354 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0713 0.7913 0.000 0.000 0.972 0.028 0.000 0.000
#> SRR2532352 2 0.0632 0.8113 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR2532350 3 0.3450 0.7422 0.000 0.000 0.772 0.208 0.012 0.008
#> SRR2532349 3 0.0000 0.8000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532348 5 0.2823 0.7450 0.000 0.204 0.000 0.000 0.796 0.000
#> SRR2532347 5 0.2969 0.7129 0.000 0.224 0.000 0.000 0.776 0.000
#> SRR2532346 5 0.2823 0.7450 0.000 0.204 0.000 0.000 0.796 0.000
#> SRR2532345 2 0.2969 0.7161 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR2532344 3 0.1074 0.7942 0.000 0.000 0.960 0.012 0.028 0.000
#> SRR2532343 3 0.0713 0.7913 0.000 0.000 0.972 0.028 0.000 0.000
#> SRR2532342 3 0.5506 0.0863 0.264 0.000 0.556 0.180 0.000 0.000
#> SRR2532341 3 0.3450 0.7422 0.000 0.000 0.772 0.208 0.012 0.008
#> SRR2532340 3 0.3450 0.7422 0.000 0.000 0.772 0.208 0.012 0.008
#> SRR2532339 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 5 0.3076 0.6969 0.000 0.240 0.000 0.000 0.760 0.000
#> SRR2532336 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.3341 0.7432 0.000 0.000 0.776 0.208 0.012 0.004
#> SRR2532334 3 0.0713 0.7913 0.000 0.000 0.972 0.028 0.000 0.000
#> SRR2532333 5 0.2823 0.7450 0.000 0.204 0.000 0.000 0.796 0.000
#> SRR2532332 1 0.0000 0.9155 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.2969 0.7161 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR2532330 5 0.2562 0.7444 0.000 0.172 0.000 0.000 0.828 0.000
#> SRR2532329 2 0.0146 0.8070 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532328 6 0.0000 0.3919 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2532327 2 0.0000 0.8057 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.0713 0.7913 0.000 0.000 0.972 0.028 0.000 0.000
#> SRR2532324 2 0.2969 0.7161 0.000 0.776 0.000 0.000 0.224 0.000
#> SRR2532325 1 0.0146 0.9101 0.996 0.000 0.004 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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.996 0.998 0.5059 0.494 0.494
#> 3 3 0.673 0.738 0.756 0.2267 0.848 0.703
#> 4 4 0.606 0.321 0.597 0.1408 0.701 0.391
#> 5 5 0.677 0.775 0.810 0.0827 0.808 0.459
#> 6 6 0.771 0.621 0.747 0.0600 0.938 0.723
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2532323 1 0.000 0.996 1.000 0.000
#> SRR2532322 1 0.000 0.996 1.000 0.000
#> SRR2532321 2 0.000 1.000 0.000 1.000
#> SRR2532320 2 0.000 1.000 0.000 1.000
#> SRR2532319 1 0.000 0.996 1.000 0.000
#> SRR2532317 2 0.000 1.000 0.000 1.000
#> SRR2532318 2 0.000 1.000 0.000 1.000
#> SRR2532315 1 0.000 0.996 1.000 0.000
#> SRR2532316 1 0.000 0.996 1.000 0.000
#> SRR2532396 2 0.000 1.000 0.000 1.000
#> SRR2532395 2 0.000 1.000 0.000 1.000
#> SRR2532394 2 0.000 1.000 0.000 1.000
#> SRR2532393 2 0.000 1.000 0.000 1.000
#> SRR2532392 2 0.000 1.000 0.000 1.000
#> SRR2532391 1 0.000 0.996 1.000 0.000
#> SRR2532390 2 0.000 1.000 0.000 1.000
#> SRR2532389 1 0.000 0.996 1.000 0.000
#> SRR2532388 2 0.000 1.000 0.000 1.000
#> SRR2532387 2 0.000 1.000 0.000 1.000
#> SRR2532386 1 0.000 0.996 1.000 0.000
#> SRR2532384 2 0.000 1.000 0.000 1.000
#> SRR2532385 2 0.000 1.000 0.000 1.000
#> SRR2532383 2 0.000 1.000 0.000 1.000
#> SRR2532381 1 0.000 0.996 1.000 0.000
#> SRR2532382 1 0.000 0.996 1.000 0.000
#> SRR2532379 1 0.000 0.996 1.000 0.000
#> SRR2532380 1 0.000 0.996 1.000 0.000
#> SRR2532378 1 0.000 0.996 1.000 0.000
#> SRR2532377 2 0.000 1.000 0.000 1.000
#> SRR2532376 2 0.000 1.000 0.000 1.000
#> SRR2532375 2 0.000 1.000 0.000 1.000
#> SRR2532374 1 0.000 0.996 1.000 0.000
#> SRR2532372 1 0.000 0.996 1.000 0.000
#> SRR2532373 2 0.000 1.000 0.000 1.000
#> SRR2532371 2 0.000 1.000 0.000 1.000
#> SRR2532370 1 0.000 0.996 1.000 0.000
#> SRR2532369 2 0.000 1.000 0.000 1.000
#> SRR2532368 2 0.000 1.000 0.000 1.000
#> SRR2532367 2 0.000 1.000 0.000 1.000
#> SRR2532366 1 0.000 0.996 1.000 0.000
#> SRR2532365 2 0.000 1.000 0.000 1.000
#> SRR2532364 1 0.000 0.996 1.000 0.000
#> SRR2532363 2 0.000 1.000 0.000 1.000
#> SRR2532362 2 0.000 1.000 0.000 1.000
#> SRR2532361 1 0.000 0.996 1.000 0.000
#> SRR2532360 1 0.000 0.996 1.000 0.000
#> SRR2532359 1 0.000 0.996 1.000 0.000
#> SRR2532358 1 0.000 0.996 1.000 0.000
#> SRR2532357 2 0.000 1.000 0.000 1.000
#> SRR2532356 2 0.000 1.000 0.000 1.000
#> SRR2532355 1 0.000 0.996 1.000 0.000
#> SRR2532354 1 0.000 0.996 1.000 0.000
#> SRR2532353 1 0.000 0.996 1.000 0.000
#> SRR2532352 2 0.000 1.000 0.000 1.000
#> SRR2532350 1 0.000 0.996 1.000 0.000
#> SRR2532349 1 0.000 0.996 1.000 0.000
#> SRR2532348 2 0.000 1.000 0.000 1.000
#> SRR2532347 2 0.000 1.000 0.000 1.000
#> SRR2532346 2 0.000 1.000 0.000 1.000
#> SRR2532345 2 0.000 1.000 0.000 1.000
#> SRR2532344 1 0.000 0.996 1.000 0.000
#> SRR2532343 1 0.000 0.996 1.000 0.000
#> SRR2532342 1 0.000 0.996 1.000 0.000
#> SRR2532341 1 0.000 0.996 1.000 0.000
#> SRR2532340 1 0.000 0.996 1.000 0.000
#> SRR2532339 2 0.000 1.000 0.000 1.000
#> SRR2532338 2 0.000 1.000 0.000 1.000
#> SRR2532337 2 0.000 1.000 0.000 1.000
#> SRR2532336 1 0.000 0.996 1.000 0.000
#> SRR2532335 1 0.000 0.996 1.000 0.000
#> SRR2532334 1 0.000 0.996 1.000 0.000
#> SRR2532333 2 0.000 1.000 0.000 1.000
#> SRR2532332 1 0.000 0.996 1.000 0.000
#> SRR2532331 2 0.000 1.000 0.000 1.000
#> SRR2532330 2 0.000 1.000 0.000 1.000
#> SRR2532329 2 0.000 1.000 0.000 1.000
#> SRR2532328 1 0.595 0.832 0.856 0.144
#> SRR2532327 2 0.000 1.000 0.000 1.000
#> SRR2532326 1 0.000 0.996 1.000 0.000
#> SRR2532324 2 0.000 1.000 0.000 1.000
#> SRR2532325 1 0.000 0.996 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.826 1.000 0.000 0.000
#> SRR2532322 1 0.0424 0.826 0.992 0.000 0.008
#> SRR2532321 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532319 3 0.5706 0.625 0.320 0.000 0.680
#> SRR2532317 2 0.5621 0.846 0.000 0.692 0.308
#> SRR2532318 2 0.5948 0.829 0.000 0.640 0.360
#> SRR2532315 3 0.6299 0.561 0.476 0.000 0.524
#> SRR2532316 3 0.6299 0.561 0.476 0.000 0.524
#> SRR2532396 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532395 2 0.5785 0.840 0.000 0.668 0.332
#> SRR2532394 2 0.5621 0.846 0.000 0.692 0.308
#> SRR2532393 2 0.5810 0.839 0.000 0.664 0.336
#> SRR2532392 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532391 3 0.6274 0.812 0.456 0.000 0.544
#> SRR2532390 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532389 1 0.2356 0.736 0.928 0.000 0.072
#> SRR2532388 2 0.5785 0.840 0.000 0.668 0.332
#> SRR2532387 2 0.3752 0.849 0.000 0.856 0.144
#> SRR2532386 1 0.6309 -0.612 0.500 0.000 0.500
#> SRR2532384 2 0.5810 0.839 0.000 0.664 0.336
#> SRR2532385 3 0.3267 0.196 0.000 0.116 0.884
#> SRR2532383 2 0.5465 0.848 0.000 0.712 0.288
#> SRR2532381 1 0.6309 -0.612 0.500 0.000 0.500
#> SRR2532382 1 0.0000 0.826 1.000 0.000 0.000
#> SRR2532379 3 0.6299 0.561 0.476 0.000 0.524
#> SRR2532380 1 0.0000 0.826 1.000 0.000 0.000
#> SRR2532378 1 0.0000 0.826 1.000 0.000 0.000
#> SRR2532377 2 0.5785 0.840 0.000 0.668 0.332
#> SRR2532376 2 0.5948 0.829 0.000 0.640 0.360
#> SRR2532375 2 0.4555 0.851 0.000 0.800 0.200
#> SRR2532374 3 0.6267 0.810 0.452 0.000 0.548
#> SRR2532372 3 0.6225 0.794 0.432 0.000 0.568
#> SRR2532373 2 0.1753 0.842 0.000 0.952 0.048
#> SRR2532371 2 0.2537 0.846 0.000 0.920 0.080
#> SRR2532370 1 0.0424 0.826 0.992 0.000 0.008
#> SRR2532369 2 0.5810 0.839 0.000 0.664 0.336
#> SRR2532368 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532366 1 0.0424 0.826 0.992 0.000 0.008
#> SRR2532365 2 0.5621 0.846 0.000 0.692 0.308
#> SRR2532364 1 0.0424 0.826 0.992 0.000 0.008
#> SRR2532363 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532361 3 0.6204 0.650 0.424 0.000 0.576
#> SRR2532360 3 0.6299 0.561 0.476 0.000 0.524
#> SRR2532359 1 0.5733 -0.264 0.676 0.000 0.324
#> SRR2532358 3 0.6286 0.809 0.464 0.000 0.536
#> SRR2532357 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532355 3 0.6280 0.811 0.460 0.000 0.540
#> SRR2532354 1 0.0000 0.826 1.000 0.000 0.000
#> SRR2532353 3 0.6280 0.811 0.460 0.000 0.540
#> SRR2532352 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532350 3 0.6280 0.811 0.460 0.000 0.540
#> SRR2532349 3 0.6274 0.812 0.456 0.000 0.544
#> SRR2532348 2 0.5948 0.829 0.000 0.640 0.360
#> SRR2532347 2 0.5785 0.840 0.000 0.668 0.332
#> SRR2532346 2 0.5948 0.829 0.000 0.640 0.360
#> SRR2532345 2 0.5785 0.840 0.000 0.668 0.332
#> SRR2532344 3 0.5706 0.625 0.320 0.000 0.680
#> SRR2532343 3 0.6280 0.811 0.460 0.000 0.540
#> SRR2532342 3 0.6291 0.802 0.468 0.000 0.532
#> SRR2532341 3 0.6215 0.790 0.428 0.000 0.572
#> SRR2532340 3 0.6274 0.812 0.456 0.000 0.544
#> SRR2532339 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532337 2 0.5678 0.844 0.000 0.684 0.316
#> SRR2532336 1 0.0000 0.826 1.000 0.000 0.000
#> SRR2532335 3 0.6244 0.802 0.440 0.000 0.560
#> SRR2532334 3 0.6280 0.811 0.460 0.000 0.540
#> SRR2532333 2 0.5926 0.831 0.000 0.644 0.356
#> SRR2532332 1 0.0424 0.826 0.992 0.000 0.008
#> SRR2532331 2 0.5178 0.850 0.000 0.744 0.256
#> SRR2532330 2 0.5810 0.839 0.000 0.664 0.336
#> SRR2532329 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532328 2 0.9491 -0.236 0.396 0.420 0.184
#> SRR2532327 2 0.0000 0.835 0.000 1.000 0.000
#> SRR2532326 3 0.6280 0.811 0.460 0.000 0.540
#> SRR2532324 2 0.2356 0.845 0.000 0.928 0.072
#> SRR2532325 1 0.0592 0.822 0.988 0.000 0.012
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.7968 -0.0793 0.408 0.324 0.264 0.004
#> SRR2532322 1 0.7836 -0.0829 0.400 0.328 0.272 0.000
#> SRR2532321 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532320 2 0.4713 0.9903 0.360 0.640 0.000 0.000
#> SRR2532319 3 0.3718 0.6946 0.012 0.000 0.820 0.168
#> SRR2532317 1 0.5750 -0.6000 0.532 0.028 0.000 0.440
#> SRR2532318 4 0.4843 0.8365 0.396 0.000 0.000 0.604
#> SRR2532315 3 0.8015 0.6006 0.148 0.036 0.504 0.312
#> SRR2532316 3 0.8015 0.6006 0.148 0.036 0.504 0.312
#> SRR2532396 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532395 1 0.4967 -0.6100 0.548 0.000 0.000 0.452
#> SRR2532394 1 0.5821 -0.5869 0.536 0.032 0.000 0.432
#> SRR2532393 1 0.4989 -0.6432 0.528 0.000 0.000 0.472
#> SRR2532392 2 0.4697 0.9943 0.356 0.644 0.000 0.000
#> SRR2532391 3 0.2124 0.7690 0.000 0.008 0.924 0.068
#> SRR2532390 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532389 3 0.8926 0.3420 0.312 0.180 0.428 0.080
#> SRR2532388 1 0.4916 -0.5970 0.576 0.000 0.000 0.424
#> SRR2532387 1 0.7372 -0.3721 0.524 0.240 0.000 0.236
#> SRR2532386 3 0.7680 0.6323 0.148 0.032 0.564 0.256
#> SRR2532384 1 0.4989 -0.6432 0.528 0.000 0.000 0.472
#> SRR2532385 4 0.6634 0.3774 0.116 0.000 0.292 0.592
#> SRR2532383 1 0.5980 -0.5653 0.560 0.044 0.000 0.396
#> SRR2532381 3 0.7680 0.6323 0.148 0.032 0.564 0.256
#> SRR2532382 1 0.7812 -0.0786 0.408 0.328 0.264 0.000
#> SRR2532379 3 0.8015 0.6006 0.148 0.036 0.504 0.312
#> SRR2532380 1 0.7812 -0.0786 0.408 0.328 0.264 0.000
#> SRR2532378 1 0.7968 -0.0793 0.408 0.324 0.264 0.004
#> SRR2532377 1 0.4961 -0.6073 0.552 0.000 0.000 0.448
#> SRR2532376 4 0.4843 0.8365 0.396 0.000 0.000 0.604
#> SRR2532375 1 0.7297 -0.3842 0.532 0.204 0.000 0.264
#> SRR2532374 3 0.3544 0.7498 0.012 0.008 0.852 0.128
#> SRR2532372 3 0.3569 0.7177 0.000 0.000 0.804 0.196
#> SRR2532373 1 0.6557 -0.6991 0.476 0.448 0.000 0.076
#> SRR2532371 1 0.7184 -0.5217 0.492 0.364 0.000 0.144
#> SRR2532370 1 0.7836 -0.0829 0.400 0.328 0.272 0.000
#> SRR2532369 1 0.4989 -0.6432 0.528 0.000 0.000 0.472
#> SRR2532368 2 0.4697 0.9943 0.356 0.644 0.000 0.000
#> SRR2532367 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532366 1 0.7992 -0.0839 0.400 0.324 0.272 0.004
#> SRR2532365 1 0.5744 -0.5881 0.536 0.028 0.000 0.436
#> SRR2532364 1 0.7836 -0.0829 0.400 0.328 0.272 0.000
#> SRR2532363 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532362 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532361 3 0.7207 0.6335 0.096 0.024 0.568 0.312
#> SRR2532360 3 0.8015 0.6006 0.148 0.036 0.504 0.312
#> SRR2532359 3 0.7053 0.6129 0.160 0.124 0.664 0.052
#> SRR2532358 3 0.0188 0.7780 0.000 0.000 0.996 0.004
#> SRR2532357 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532356 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532355 3 0.0000 0.7780 0.000 0.000 1.000 0.000
#> SRR2532354 1 0.7812 -0.0786 0.408 0.328 0.264 0.000
#> SRR2532353 3 0.0000 0.7780 0.000 0.000 1.000 0.000
#> SRR2532352 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532350 3 0.2124 0.7690 0.000 0.008 0.924 0.068
#> SRR2532349 3 0.1716 0.7718 0.000 0.000 0.936 0.064
#> SRR2532348 4 0.4866 0.8346 0.404 0.000 0.000 0.596
#> SRR2532347 1 0.4967 -0.6100 0.548 0.000 0.000 0.452
#> SRR2532346 4 0.4866 0.8346 0.404 0.000 0.000 0.596
#> SRR2532345 1 0.5257 -0.6220 0.548 0.008 0.000 0.444
#> SRR2532344 3 0.3718 0.6946 0.012 0.000 0.820 0.168
#> SRR2532343 3 0.0188 0.7780 0.000 0.000 0.996 0.004
#> SRR2532342 3 0.1576 0.7718 0.000 0.004 0.948 0.048
#> SRR2532341 3 0.4212 0.7006 0.012 0.000 0.772 0.216
#> SRR2532340 3 0.2124 0.7690 0.000 0.008 0.924 0.068
#> SRR2532339 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532338 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532337 1 0.4941 -0.6008 0.564 0.000 0.000 0.436
#> SRR2532336 1 0.7812 -0.0786 0.408 0.328 0.264 0.000
#> SRR2532335 3 0.3157 0.7480 0.000 0.004 0.852 0.144
#> SRR2532334 3 0.0000 0.7780 0.000 0.000 1.000 0.000
#> SRR2532333 4 0.4877 0.8221 0.408 0.000 0.000 0.592
#> SRR2532332 1 0.7836 -0.0829 0.400 0.328 0.272 0.000
#> SRR2532331 1 0.6839 -0.4870 0.552 0.120 0.000 0.328
#> SRR2532330 1 0.4989 -0.6432 0.528 0.000 0.000 0.472
#> SRR2532329 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532328 3 0.9722 0.0721 0.264 0.232 0.348 0.156
#> SRR2532327 2 0.4679 0.9985 0.352 0.648 0.000 0.000
#> SRR2532326 3 0.0000 0.7780 0.000 0.000 1.000 0.000
#> SRR2532324 1 0.6788 -0.6624 0.480 0.424 0.000 0.096
#> SRR2532325 1 0.8390 -0.0965 0.396 0.308 0.276 0.020
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0324 0.9344 0.992 0.004 0.004 0.000 0.000
#> SRR2532322 1 0.0740 0.9349 0.980 0.004 0.008 0.008 0.000
#> SRR2532321 2 0.3048 0.8954 0.004 0.820 0.000 0.000 0.176
#> SRR2532320 2 0.3966 0.8686 0.000 0.784 0.004 0.036 0.176
#> SRR2532319 3 0.3087 0.7217 0.008 0.000 0.836 0.152 0.004
#> SRR2532317 5 0.1597 0.8281 0.000 0.020 0.008 0.024 0.948
#> SRR2532318 5 0.4078 0.7707 0.000 0.000 0.068 0.148 0.784
#> SRR2532315 4 0.5222 0.9432 0.124 0.000 0.196 0.680 0.000
#> SRR2532316 4 0.5222 0.9432 0.124 0.000 0.196 0.680 0.000
#> SRR2532396 2 0.2891 0.8954 0.000 0.824 0.000 0.000 0.176
#> SRR2532395 5 0.0000 0.8350 0.000 0.000 0.000 0.000 1.000
#> SRR2532394 5 0.0865 0.8276 0.000 0.024 0.000 0.004 0.972
#> SRR2532393 5 0.0290 0.8352 0.000 0.000 0.000 0.008 0.992
#> SRR2532392 2 0.3003 0.8885 0.000 0.812 0.000 0.000 0.188
#> SRR2532391 3 0.3640 0.7889 0.084 0.072 0.836 0.008 0.000
#> SRR2532390 2 0.2891 0.8954 0.000 0.824 0.000 0.000 0.176
#> SRR2532389 1 0.6930 0.0515 0.464 0.172 0.340 0.024 0.000
#> SRR2532388 5 0.0963 0.8296 0.000 0.000 0.000 0.036 0.964
#> SRR2532387 5 0.4755 0.3819 0.000 0.300 0.004 0.032 0.664
#> SRR2532386 4 0.6491 0.8763 0.136 0.032 0.252 0.580 0.000
#> SRR2532384 5 0.0000 0.8350 0.000 0.000 0.000 0.000 1.000
#> SRR2532385 5 0.5612 0.5492 0.000 0.000 0.248 0.128 0.624
#> SRR2532383 5 0.3717 0.7680 0.000 0.028 0.012 0.144 0.816
#> SRR2532381 4 0.6491 0.8763 0.136 0.032 0.252 0.580 0.000
#> SRR2532382 1 0.0486 0.9350 0.988 0.004 0.004 0.004 0.000
#> SRR2532379 4 0.5222 0.9432 0.124 0.000 0.196 0.680 0.000
#> SRR2532380 1 0.0613 0.9345 0.984 0.004 0.004 0.008 0.000
#> SRR2532378 1 0.0324 0.9344 0.992 0.004 0.004 0.000 0.000
#> SRR2532377 5 0.0162 0.8347 0.000 0.000 0.000 0.004 0.996
#> SRR2532376 5 0.4078 0.7707 0.000 0.000 0.068 0.148 0.784
#> SRR2532375 5 0.6550 0.4120 0.000 0.216 0.020 0.200 0.564
#> SRR2532374 3 0.4574 0.7419 0.060 0.088 0.792 0.060 0.000
#> SRR2532372 3 0.1195 0.7778 0.012 0.000 0.960 0.028 0.000
#> SRR2532373 2 0.6675 0.3237 0.000 0.444 0.012 0.160 0.384
#> SRR2532371 5 0.6191 -0.1459 0.000 0.400 0.004 0.120 0.476
#> SRR2532370 1 0.0451 0.9342 0.988 0.004 0.008 0.000 0.000
#> SRR2532369 5 0.0162 0.8351 0.000 0.000 0.000 0.004 0.996
#> SRR2532368 2 0.3381 0.8874 0.000 0.808 0.000 0.016 0.176
#> SRR2532367 2 0.2891 0.8954 0.000 0.824 0.000 0.000 0.176
#> SRR2532366 1 0.0579 0.9328 0.984 0.008 0.008 0.000 0.000
#> SRR2532365 5 0.1117 0.8299 0.000 0.020 0.000 0.016 0.964
#> SRR2532364 1 0.0740 0.9349 0.980 0.004 0.008 0.008 0.000
#> SRR2532363 2 0.3048 0.8954 0.004 0.820 0.000 0.000 0.176
#> SRR2532362 2 0.3171 0.8939 0.000 0.816 0.000 0.008 0.176
#> SRR2532361 4 0.5064 0.9079 0.088 0.000 0.232 0.680 0.000
#> SRR2532360 4 0.5222 0.9432 0.124 0.000 0.196 0.680 0.000
#> SRR2532359 3 0.7314 0.0789 0.288 0.052 0.476 0.184 0.000
#> SRR2532358 3 0.3634 0.8059 0.072 0.012 0.840 0.076 0.000
#> SRR2532357 2 0.3171 0.8939 0.000 0.816 0.000 0.008 0.176
#> SRR2532356 2 0.3171 0.8939 0.000 0.816 0.000 0.008 0.176
#> SRR2532355 3 0.3397 0.8055 0.068 0.004 0.848 0.080 0.000
#> SRR2532354 1 0.0613 0.9345 0.984 0.004 0.004 0.008 0.000
#> SRR2532353 3 0.3397 0.8055 0.068 0.004 0.848 0.080 0.000
#> SRR2532352 2 0.3048 0.8954 0.004 0.820 0.000 0.000 0.176
#> SRR2532350 3 0.3053 0.8037 0.076 0.044 0.872 0.008 0.000
#> SRR2532349 3 0.2396 0.8120 0.068 0.024 0.904 0.004 0.000
#> SRR2532348 5 0.4605 0.7525 0.000 0.000 0.076 0.192 0.732
#> SRR2532347 5 0.0000 0.8350 0.000 0.000 0.000 0.000 1.000
#> SRR2532346 5 0.4547 0.7548 0.000 0.000 0.072 0.192 0.736
#> SRR2532345 5 0.3247 0.7955 0.000 0.008 0.016 0.136 0.840
#> SRR2532344 3 0.3044 0.7247 0.008 0.000 0.840 0.148 0.004
#> SRR2532343 3 0.3397 0.8055 0.068 0.004 0.848 0.080 0.000
#> SRR2532342 3 0.5250 0.6364 0.080 0.024 0.712 0.184 0.000
#> SRR2532341 3 0.3242 0.7109 0.000 0.072 0.852 0.076 0.000
#> SRR2532340 3 0.3640 0.7889 0.084 0.072 0.836 0.008 0.000
#> SRR2532339 2 0.3048 0.8954 0.004 0.820 0.000 0.000 0.176
#> SRR2532338 2 0.3205 0.8944 0.004 0.816 0.000 0.004 0.176
#> SRR2532337 5 0.0162 0.8347 0.000 0.000 0.000 0.004 0.996
#> SRR2532336 1 0.0613 0.9345 0.984 0.004 0.004 0.008 0.000
#> SRR2532335 3 0.3706 0.7842 0.052 0.072 0.844 0.032 0.000
#> SRR2532334 3 0.3397 0.8055 0.068 0.004 0.848 0.080 0.000
#> SRR2532333 5 0.3888 0.7760 0.000 0.000 0.064 0.136 0.800
#> SRR2532332 1 0.0451 0.9342 0.988 0.004 0.008 0.000 0.000
#> SRR2532331 5 0.5593 0.6459 0.000 0.104 0.020 0.200 0.676
#> SRR2532330 5 0.0162 0.8351 0.000 0.000 0.000 0.004 0.996
#> SRR2532329 2 0.3048 0.8950 0.000 0.820 0.000 0.004 0.176
#> SRR2532328 2 0.8251 -0.2296 0.044 0.380 0.324 0.212 0.040
#> SRR2532327 2 0.2891 0.8954 0.000 0.824 0.000 0.000 0.176
#> SRR2532326 3 0.3397 0.8055 0.068 0.004 0.848 0.080 0.000
#> SRR2532324 2 0.6938 0.3126 0.000 0.436 0.020 0.180 0.364
#> SRR2532325 1 0.1869 0.8973 0.936 0.036 0.012 0.016 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.9328 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2532322 1 0.0146 0.9326 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532321 2 0.0363 0.8617 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR2532320 2 0.3496 0.7406 0.000 0.836 0.000 0.056 0.056 0.052
#> SRR2532319 3 0.4418 0.5860 0.000 0.000 0.716 0.072 0.008 0.204
#> SRR2532317 6 0.5306 -0.4775 0.000 0.076 0.004 0.004 0.412 0.504
#> SRR2532318 6 0.3384 0.4169 0.000 0.060 0.024 0.004 0.068 0.844
#> SRR2532315 4 0.3472 0.9448 0.100 0.000 0.092 0.808 0.000 0.000
#> SRR2532316 4 0.3472 0.9448 0.100 0.000 0.092 0.808 0.000 0.000
#> SRR2532396 2 0.0603 0.8561 0.000 0.980 0.000 0.004 0.016 0.000
#> SRR2532395 5 0.4892 0.6271 0.000 0.060 0.000 0.000 0.500 0.440
#> SRR2532394 5 0.5087 0.5886 0.000 0.080 0.000 0.000 0.508 0.412
#> SRR2532393 5 0.4903 0.6064 0.000 0.060 0.000 0.000 0.476 0.464
#> SRR2532392 2 0.0777 0.8514 0.000 0.972 0.000 0.004 0.024 0.000
#> SRR2532391 3 0.4346 0.6729 0.036 0.000 0.712 0.020 0.232 0.000
#> SRR2532390 2 0.0260 0.8620 0.000 0.992 0.000 0.008 0.000 0.000
#> SRR2532389 1 0.7491 -0.0262 0.372 0.000 0.268 0.040 0.276 0.044
#> SRR2532388 5 0.5263 0.4270 0.000 0.060 0.000 0.020 0.552 0.368
#> SRR2532387 5 0.6672 -0.0308 0.000 0.308 0.000 0.064 0.460 0.168
#> SRR2532386 4 0.5317 0.8810 0.112 0.000 0.152 0.692 0.028 0.016
#> SRR2532384 5 0.4889 0.6256 0.000 0.060 0.000 0.000 0.504 0.436
#> SRR2532385 6 0.4757 0.2233 0.000 0.004 0.132 0.000 0.176 0.688
#> SRR2532383 6 0.6633 0.2019 0.000 0.088 0.004 0.096 0.364 0.448
#> SRR2532381 4 0.5317 0.8810 0.112 0.000 0.152 0.692 0.028 0.016
#> SRR2532382 1 0.0000 0.9329 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.3472 0.9448 0.100 0.000 0.092 0.808 0.000 0.000
#> SRR2532380 1 0.0146 0.9326 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532378 1 0.0146 0.9328 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2532377 5 0.4882 0.6193 0.000 0.060 0.000 0.000 0.512 0.428
#> SRR2532376 6 0.3384 0.4169 0.000 0.060 0.024 0.004 0.068 0.844
#> SRR2532375 6 0.7317 0.2750 0.000 0.196 0.008 0.112 0.248 0.436
#> SRR2532374 3 0.4519 0.6511 0.024 0.000 0.696 0.028 0.248 0.004
#> SRR2532372 3 0.1237 0.7327 0.000 0.000 0.956 0.004 0.020 0.020
#> SRR2532373 2 0.7598 -0.1887 0.000 0.332 0.008 0.116 0.292 0.252
#> SRR2532371 2 0.7348 -0.2156 0.000 0.344 0.000 0.108 0.284 0.264
#> SRR2532370 1 0.0291 0.9321 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR2532369 5 0.4895 0.6137 0.000 0.060 0.000 0.000 0.496 0.444
#> SRR2532368 2 0.1408 0.8348 0.000 0.944 0.000 0.020 0.036 0.000
#> SRR2532367 2 0.0000 0.8613 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532366 1 0.0291 0.9321 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR2532365 6 0.5203 -0.5946 0.000 0.076 0.000 0.004 0.456 0.464
#> SRR2532364 1 0.0260 0.9325 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR2532363 2 0.0458 0.8614 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR2532362 2 0.0547 0.8601 0.000 0.980 0.000 0.020 0.000 0.000
#> SRR2532361 4 0.3395 0.9087 0.060 0.000 0.132 0.808 0.000 0.000
#> SRR2532360 4 0.3472 0.9448 0.100 0.000 0.092 0.808 0.000 0.000
#> SRR2532359 3 0.6824 0.1200 0.252 0.000 0.472 0.224 0.036 0.016
#> SRR2532358 3 0.3344 0.7320 0.032 0.000 0.828 0.120 0.020 0.000
#> SRR2532357 2 0.0547 0.8601 0.000 0.980 0.000 0.020 0.000 0.000
#> SRR2532356 2 0.0547 0.8601 0.000 0.980 0.000 0.020 0.000 0.000
#> SRR2532355 3 0.2771 0.7303 0.032 0.000 0.852 0.116 0.000 0.000
#> SRR2532354 1 0.0146 0.9326 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532353 3 0.2771 0.7303 0.032 0.000 0.852 0.116 0.000 0.000
#> SRR2532352 2 0.0363 0.8617 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR2532350 3 0.3687 0.7061 0.032 0.000 0.788 0.016 0.164 0.000
#> SRR2532349 3 0.2249 0.7360 0.032 0.000 0.900 0.004 0.064 0.000
#> SRR2532348 6 0.2290 0.4477 0.000 0.060 0.024 0.004 0.008 0.904
#> SRR2532347 5 0.4892 0.6271 0.000 0.060 0.000 0.000 0.500 0.440
#> SRR2532346 6 0.2034 0.4482 0.000 0.060 0.024 0.004 0.000 0.912
#> SRR2532345 6 0.5737 0.3244 0.000 0.084 0.004 0.084 0.180 0.648
#> SRR2532344 3 0.4418 0.5860 0.000 0.000 0.716 0.072 0.008 0.204
#> SRR2532343 3 0.2771 0.7303 0.032 0.000 0.852 0.116 0.000 0.000
#> SRR2532342 3 0.4366 0.5790 0.048 0.000 0.708 0.232 0.012 0.000
#> SRR2532341 3 0.3934 0.6529 0.000 0.000 0.728 0.020 0.240 0.012
#> SRR2532340 3 0.4346 0.6729 0.036 0.000 0.712 0.020 0.232 0.000
#> SRR2532339 2 0.0458 0.8614 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR2532338 2 0.0458 0.8616 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR2532337 5 0.4831 0.5788 0.000 0.060 0.000 0.000 0.548 0.392
#> SRR2532336 1 0.0146 0.9326 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532335 3 0.4193 0.6713 0.020 0.000 0.724 0.020 0.232 0.004
#> SRR2532334 3 0.2771 0.7303 0.032 0.000 0.852 0.116 0.000 0.000
#> SRR2532333 6 0.3833 0.3188 0.000 0.060 0.024 0.000 0.116 0.800
#> SRR2532332 1 0.0291 0.9321 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR2532331 6 0.7118 0.2970 0.000 0.156 0.008 0.112 0.252 0.472
#> SRR2532330 5 0.4902 0.6019 0.000 0.060 0.000 0.000 0.480 0.460
#> SRR2532329 2 0.0363 0.8613 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR2532328 5 0.7827 -0.2001 0.004 0.020 0.196 0.152 0.412 0.216
#> SRR2532327 2 0.0000 0.8613 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.2771 0.7303 0.032 0.000 0.852 0.116 0.000 0.000
#> SRR2532324 2 0.7604 -0.1722 0.000 0.336 0.008 0.120 0.240 0.296
#> SRR2532325 1 0.2255 0.8684 0.912 0.000 0.004 0.028 0.036 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 1.000 1.000 0.5060 0.494 0.494
#> 3 3 0.854 0.919 0.929 0.2435 0.864 0.729
#> 4 4 0.794 0.818 0.896 0.1923 0.858 0.623
#> 5 5 0.808 0.819 0.888 0.0545 0.934 0.742
#> 6 6 0.791 0.642 0.800 0.0393 0.982 0.915
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
#> SRR2532323 1 0.0000 1.000 1.000 0.000
#> SRR2532322 1 0.0000 1.000 1.000 0.000
#> SRR2532321 2 0.0000 1.000 0.000 1.000
#> SRR2532320 2 0.0000 1.000 0.000 1.000
#> SRR2532319 1 0.0000 1.000 1.000 0.000
#> SRR2532317 2 0.0000 1.000 0.000 1.000
#> SRR2532318 2 0.0000 1.000 0.000 1.000
#> SRR2532315 1 0.0000 1.000 1.000 0.000
#> SRR2532316 1 0.0000 1.000 1.000 0.000
#> SRR2532396 2 0.0000 1.000 0.000 1.000
#> SRR2532395 2 0.0000 1.000 0.000 1.000
#> SRR2532394 2 0.0000 1.000 0.000 1.000
#> SRR2532393 2 0.0000 1.000 0.000 1.000
#> SRR2532392 2 0.0000 1.000 0.000 1.000
#> SRR2532391 1 0.0000 1.000 1.000 0.000
#> SRR2532390 2 0.0000 1.000 0.000 1.000
#> SRR2532389 1 0.0000 1.000 1.000 0.000
#> SRR2532388 2 0.0000 1.000 0.000 1.000
#> SRR2532387 2 0.0000 1.000 0.000 1.000
#> SRR2532386 1 0.0000 1.000 1.000 0.000
#> SRR2532384 2 0.0000 1.000 0.000 1.000
#> SRR2532385 2 0.0376 0.996 0.004 0.996
#> SRR2532383 2 0.0000 1.000 0.000 1.000
#> SRR2532381 1 0.0000 1.000 1.000 0.000
#> SRR2532382 1 0.0000 1.000 1.000 0.000
#> SRR2532379 1 0.0000 1.000 1.000 0.000
#> SRR2532380 1 0.0000 1.000 1.000 0.000
#> SRR2532378 1 0.0000 1.000 1.000 0.000
#> SRR2532377 2 0.0000 1.000 0.000 1.000
#> SRR2532376 2 0.0000 1.000 0.000 1.000
#> SRR2532375 2 0.0000 1.000 0.000 1.000
#> SRR2532374 1 0.0000 1.000 1.000 0.000
#> SRR2532372 1 0.0000 1.000 1.000 0.000
#> SRR2532373 2 0.0000 1.000 0.000 1.000
#> SRR2532371 2 0.0000 1.000 0.000 1.000
#> SRR2532370 1 0.0000 1.000 1.000 0.000
#> SRR2532369 2 0.0000 1.000 0.000 1.000
#> SRR2532368 2 0.0000 1.000 0.000 1.000
#> SRR2532367 2 0.0000 1.000 0.000 1.000
#> SRR2532366 1 0.0000 1.000 1.000 0.000
#> SRR2532365 2 0.0000 1.000 0.000 1.000
#> SRR2532364 1 0.0000 1.000 1.000 0.000
#> SRR2532363 2 0.0000 1.000 0.000 1.000
#> SRR2532362 2 0.0000 1.000 0.000 1.000
#> SRR2532361 1 0.0000 1.000 1.000 0.000
#> SRR2532360 1 0.0000 1.000 1.000 0.000
#> SRR2532359 1 0.0000 1.000 1.000 0.000
#> SRR2532358 1 0.0000 1.000 1.000 0.000
#> SRR2532357 2 0.0000 1.000 0.000 1.000
#> SRR2532356 2 0.0000 1.000 0.000 1.000
#> SRR2532355 1 0.0000 1.000 1.000 0.000
#> SRR2532354 1 0.0000 1.000 1.000 0.000
#> SRR2532353 1 0.0000 1.000 1.000 0.000
#> SRR2532352 2 0.0000 1.000 0.000 1.000
#> SRR2532350 1 0.0000 1.000 1.000 0.000
#> SRR2532349 1 0.0000 1.000 1.000 0.000
#> SRR2532348 2 0.0000 1.000 0.000 1.000
#> SRR2532347 2 0.0000 1.000 0.000 1.000
#> SRR2532346 2 0.0000 1.000 0.000 1.000
#> SRR2532345 2 0.0000 1.000 0.000 1.000
#> SRR2532344 1 0.0000 1.000 1.000 0.000
#> SRR2532343 1 0.0000 1.000 1.000 0.000
#> SRR2532342 1 0.0000 1.000 1.000 0.000
#> SRR2532341 1 0.0000 1.000 1.000 0.000
#> SRR2532340 1 0.0000 1.000 1.000 0.000
#> SRR2532339 2 0.0000 1.000 0.000 1.000
#> SRR2532338 2 0.0000 1.000 0.000 1.000
#> SRR2532337 2 0.0000 1.000 0.000 1.000
#> SRR2532336 1 0.0000 1.000 1.000 0.000
#> SRR2532335 1 0.0000 1.000 1.000 0.000
#> SRR2532334 1 0.0000 1.000 1.000 0.000
#> SRR2532333 2 0.0000 1.000 0.000 1.000
#> SRR2532332 1 0.0000 1.000 1.000 0.000
#> SRR2532331 2 0.0000 1.000 0.000 1.000
#> SRR2532330 2 0.0000 1.000 0.000 1.000
#> SRR2532329 2 0.0000 1.000 0.000 1.000
#> SRR2532328 1 0.0376 0.996 0.996 0.004
#> SRR2532327 2 0.0000 1.000 0.000 1.000
#> SRR2532326 1 0.0000 1.000 1.000 0.000
#> SRR2532324 2 0.0000 1.000 0.000 1.000
#> SRR2532325 1 0.0000 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532322 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532321 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532320 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532319 3 0.2066 0.903 0.060 0.000 0.940
#> SRR2532317 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532318 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532315 3 0.3038 0.883 0.104 0.000 0.896
#> SRR2532316 3 0.2959 0.884 0.100 0.000 0.900
#> SRR2532396 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532395 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532394 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532393 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532392 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532391 1 0.4399 0.855 0.812 0.000 0.188
#> SRR2532390 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532389 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532388 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532387 2 0.1643 0.969 0.044 0.956 0.000
#> SRR2532386 3 0.3038 0.883 0.104 0.000 0.896
#> SRR2532384 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532385 3 0.2846 0.820 0.056 0.020 0.924
#> SRR2532383 2 0.1529 0.968 0.040 0.960 0.000
#> SRR2532381 3 0.3038 0.883 0.104 0.000 0.896
#> SRR2532382 1 0.3038 0.904 0.896 0.000 0.104
#> SRR2532379 3 0.3038 0.883 0.104 0.000 0.896
#> SRR2532380 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532378 1 0.3619 0.876 0.864 0.000 0.136
#> SRR2532377 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532376 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532375 2 0.0000 0.969 0.000 1.000 0.000
#> SRR2532374 1 0.4291 0.860 0.820 0.000 0.180
#> SRR2532372 3 0.2165 0.902 0.064 0.000 0.936
#> SRR2532373 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532371 2 0.0237 0.969 0.004 0.996 0.000
#> SRR2532370 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532369 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532368 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532367 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532366 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532365 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532364 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532363 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532362 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532361 3 0.2878 0.886 0.096 0.000 0.904
#> SRR2532360 3 0.3038 0.883 0.104 0.000 0.896
#> SRR2532359 1 0.6252 0.162 0.556 0.000 0.444
#> SRR2532358 3 0.1163 0.894 0.028 0.000 0.972
#> SRR2532357 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532356 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532355 3 0.2448 0.896 0.076 0.000 0.924
#> SRR2532354 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532353 3 0.2066 0.903 0.060 0.000 0.940
#> SRR2532352 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532350 1 0.4702 0.838 0.788 0.000 0.212
#> SRR2532349 3 0.2356 0.899 0.072 0.000 0.928
#> SRR2532348 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532347 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532346 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532345 2 0.1860 0.967 0.052 0.948 0.000
#> SRR2532344 3 0.2066 0.903 0.060 0.000 0.940
#> SRR2532343 3 0.2066 0.903 0.060 0.000 0.940
#> SRR2532342 3 0.4062 0.872 0.164 0.000 0.836
#> SRR2532341 3 0.4291 0.741 0.180 0.000 0.820
#> SRR2532340 1 0.4346 0.857 0.816 0.000 0.184
#> SRR2532339 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532338 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532337 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532336 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532335 1 0.5016 0.809 0.760 0.000 0.240
#> SRR2532334 3 0.2165 0.902 0.064 0.000 0.936
#> SRR2532333 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532332 1 0.2448 0.923 0.924 0.000 0.076
#> SRR2532331 2 0.0237 0.969 0.004 0.996 0.000
#> SRR2532330 2 0.1964 0.967 0.056 0.944 0.000
#> SRR2532329 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532328 1 0.3850 0.836 0.884 0.028 0.088
#> SRR2532327 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532326 3 0.2066 0.903 0.060 0.000 0.940
#> SRR2532324 2 0.0892 0.968 0.020 0.980 0.000
#> SRR2532325 1 0.2448 0.923 0.924 0.000 0.076
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0000 0.864 1.000 0.000 0.000 0.000
#> SRR2532322 1 0.0188 0.865 0.996 0.000 0.004 0.000
#> SRR2532321 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532320 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532319 3 0.2053 0.825 0.072 0.004 0.924 0.000
#> SRR2532317 2 0.1792 0.882 0.000 0.932 0.000 0.068
#> SRR2532318 2 0.0188 0.919 0.000 0.996 0.004 0.000
#> SRR2532315 3 0.4553 0.788 0.180 0.000 0.780 0.040
#> SRR2532316 3 0.4553 0.788 0.180 0.000 0.780 0.040
#> SRR2532396 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532395 2 0.0188 0.920 0.000 0.996 0.000 0.004
#> SRR2532394 2 0.2814 0.821 0.000 0.868 0.000 0.132
#> SRR2532393 2 0.0000 0.919 0.000 1.000 0.000 0.000
#> SRR2532392 4 0.1557 0.951 0.000 0.056 0.000 0.944
#> SRR2532391 1 0.4606 0.668 0.724 0.000 0.264 0.012
#> SRR2532390 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532389 1 0.0188 0.865 0.996 0.000 0.004 0.000
#> SRR2532388 2 0.0188 0.920 0.000 0.996 0.000 0.004
#> SRR2532387 4 0.4907 0.329 0.000 0.420 0.000 0.580
#> SRR2532386 3 0.4636 0.781 0.188 0.000 0.772 0.040
#> SRR2532384 2 0.0000 0.919 0.000 1.000 0.000 0.000
#> SRR2532385 2 0.3082 0.817 0.000 0.884 0.084 0.032
#> SRR2532383 2 0.3688 0.720 0.000 0.792 0.000 0.208
#> SRR2532381 3 0.4636 0.781 0.188 0.000 0.772 0.040
#> SRR2532382 1 0.1474 0.828 0.948 0.000 0.052 0.000
#> SRR2532379 3 0.4553 0.788 0.180 0.000 0.780 0.040
#> SRR2532380 1 0.0000 0.864 1.000 0.000 0.000 0.000
#> SRR2532378 1 0.2216 0.799 0.908 0.000 0.092 0.000
#> SRR2532377 2 0.0188 0.920 0.000 0.996 0.000 0.004
#> SRR2532376 2 0.0188 0.919 0.000 0.996 0.004 0.000
#> SRR2532375 2 0.5000 -0.101 0.000 0.500 0.000 0.500
#> SRR2532374 1 0.4212 0.709 0.772 0.000 0.216 0.012
#> SRR2532372 3 0.2271 0.822 0.076 0.000 0.916 0.008
#> SRR2532373 4 0.2408 0.910 0.000 0.104 0.000 0.896
#> SRR2532371 4 0.4304 0.656 0.000 0.284 0.000 0.716
#> SRR2532370 1 0.0188 0.865 0.996 0.000 0.004 0.000
#> SRR2532369 2 0.0188 0.920 0.000 0.996 0.000 0.004
#> SRR2532368 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532367 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532366 1 0.0188 0.865 0.996 0.000 0.004 0.000
#> SRR2532365 2 0.1302 0.899 0.000 0.956 0.000 0.044
#> SRR2532364 1 0.0188 0.865 0.996 0.000 0.004 0.000
#> SRR2532363 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532362 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532361 3 0.4511 0.790 0.176 0.000 0.784 0.040
#> SRR2532360 3 0.4553 0.788 0.180 0.000 0.780 0.040
#> SRR2532359 1 0.4977 -0.213 0.540 0.000 0.460 0.000
#> SRR2532358 3 0.3706 0.807 0.112 0.000 0.848 0.040
#> SRR2532357 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532356 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532355 3 0.2081 0.824 0.084 0.000 0.916 0.000
#> SRR2532354 1 0.0000 0.864 1.000 0.000 0.000 0.000
#> SRR2532353 3 0.1940 0.827 0.076 0.000 0.924 0.000
#> SRR2532352 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532350 1 0.4820 0.630 0.692 0.000 0.296 0.012
#> SRR2532349 3 0.2473 0.820 0.080 0.000 0.908 0.012
#> SRR2532348 2 0.0188 0.919 0.000 0.996 0.004 0.000
#> SRR2532347 2 0.0188 0.920 0.000 0.996 0.000 0.004
#> SRR2532346 2 0.0188 0.919 0.000 0.996 0.004 0.000
#> SRR2532345 2 0.1474 0.893 0.000 0.948 0.000 0.052
#> SRR2532344 3 0.2053 0.825 0.072 0.004 0.924 0.000
#> SRR2532343 3 0.1940 0.827 0.076 0.000 0.924 0.000
#> SRR2532342 3 0.4158 0.793 0.224 0.000 0.768 0.008
#> SRR2532341 3 0.4661 0.531 0.256 0.000 0.728 0.016
#> SRR2532340 1 0.4387 0.694 0.752 0.000 0.236 0.012
#> SRR2532339 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532338 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532337 2 0.0336 0.919 0.000 0.992 0.000 0.008
#> SRR2532336 1 0.0188 0.862 0.996 0.000 0.004 0.000
#> SRR2532335 1 0.5127 0.529 0.632 0.000 0.356 0.012
#> SRR2532334 3 0.2011 0.826 0.080 0.000 0.920 0.000
#> SRR2532333 2 0.0188 0.919 0.000 0.996 0.004 0.000
#> SRR2532332 1 0.0188 0.865 0.996 0.000 0.004 0.000
#> SRR2532331 2 0.4643 0.431 0.000 0.656 0.000 0.344
#> SRR2532330 2 0.0188 0.920 0.000 0.996 0.000 0.004
#> SRR2532329 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532328 1 0.2623 0.806 0.908 0.000 0.064 0.028
#> SRR2532327 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR2532326 3 0.1940 0.827 0.076 0.000 0.924 0.000
#> SRR2532324 4 0.3123 0.853 0.000 0.156 0.000 0.844
#> SRR2532325 1 0.0188 0.865 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
#> SRR2532323 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.1471 0.911 0.000 0.952 0.020 0.024 0.004
#> SRR2532319 3 0.3873 0.746 0.012 0.000 0.768 0.212 0.008
#> SRR2532317 5 0.3446 0.813 0.000 0.144 0.012 0.016 0.828
#> SRR2532318 5 0.2308 0.870 0.000 0.004 0.048 0.036 0.912
#> SRR2532315 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532316 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532396 2 0.0727 0.923 0.000 0.980 0.004 0.004 0.012
#> SRR2532395 5 0.0609 0.883 0.000 0.020 0.000 0.000 0.980
#> SRR2532394 5 0.3421 0.749 0.000 0.204 0.000 0.008 0.788
#> SRR2532393 5 0.1507 0.882 0.000 0.012 0.024 0.012 0.952
#> SRR2532392 2 0.0671 0.922 0.000 0.980 0.000 0.004 0.016
#> SRR2532391 3 0.3474 0.719 0.192 0.000 0.796 0.008 0.004
#> SRR2532390 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 1 0.0162 0.945 0.996 0.000 0.000 0.004 0.000
#> SRR2532388 5 0.1518 0.883 0.000 0.020 0.012 0.016 0.952
#> SRR2532387 2 0.4893 0.393 0.000 0.612 0.012 0.016 0.360
#> SRR2532386 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532384 5 0.0404 0.882 0.000 0.012 0.000 0.000 0.988
#> SRR2532385 5 0.4025 0.739 0.000 0.000 0.132 0.076 0.792
#> SRR2532383 5 0.4846 0.692 0.000 0.220 0.032 0.028 0.720
#> SRR2532381 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532382 1 0.0609 0.932 0.980 0.000 0.000 0.020 0.000
#> SRR2532379 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532380 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.2605 0.808 0.852 0.000 0.000 0.148 0.000
#> SRR2532377 5 0.0898 0.883 0.000 0.020 0.000 0.008 0.972
#> SRR2532376 5 0.2308 0.870 0.000 0.004 0.048 0.036 0.912
#> SRR2532375 5 0.6413 0.204 0.000 0.412 0.060 0.048 0.480
#> SRR2532374 3 0.4523 0.506 0.344 0.000 0.640 0.012 0.004
#> SRR2532372 3 0.1845 0.779 0.016 0.000 0.928 0.056 0.000
#> SRR2532373 2 0.4060 0.788 0.000 0.812 0.036 0.032 0.120
#> SRR2532371 2 0.5438 0.453 0.000 0.628 0.032 0.032 0.308
#> SRR2532370 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0404 0.882 0.000 0.012 0.000 0.000 0.988
#> SRR2532368 2 0.0451 0.926 0.000 0.988 0.004 0.008 0.000
#> SRR2532367 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000
#> SRR2532366 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.2011 0.860 0.000 0.088 0.000 0.004 0.908
#> SRR2532364 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0162 0.928 0.000 0.996 0.004 0.000 0.000
#> SRR2532362 2 0.0324 0.926 0.000 0.992 0.004 0.000 0.004
#> SRR2532361 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532360 4 0.1800 0.902 0.048 0.000 0.020 0.932 0.000
#> SRR2532359 1 0.4920 0.389 0.644 0.000 0.048 0.308 0.000
#> SRR2532358 4 0.4321 0.591 0.024 0.000 0.252 0.720 0.004
#> SRR2532357 2 0.0324 0.926 0.000 0.992 0.004 0.000 0.004
#> SRR2532356 2 0.0324 0.926 0.000 0.992 0.004 0.000 0.004
#> SRR2532355 3 0.4841 0.719 0.084 0.000 0.708 0.208 0.000
#> SRR2532354 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.4000 0.742 0.024 0.000 0.748 0.228 0.000
#> SRR2532352 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.3456 0.719 0.204 0.000 0.788 0.004 0.004
#> SRR2532349 3 0.2124 0.782 0.028 0.000 0.916 0.056 0.000
#> SRR2532348 5 0.2438 0.872 0.000 0.008 0.044 0.040 0.908
#> SRR2532347 5 0.0510 0.883 0.000 0.016 0.000 0.000 0.984
#> SRR2532346 5 0.2459 0.869 0.000 0.004 0.052 0.040 0.904
#> SRR2532345 5 0.3656 0.847 0.000 0.080 0.052 0.024 0.844
#> SRR2532344 3 0.3807 0.751 0.012 0.000 0.776 0.204 0.008
#> SRR2532343 3 0.3970 0.745 0.024 0.000 0.752 0.224 0.000
#> SRR2532342 4 0.6124 0.231 0.144 0.000 0.336 0.520 0.000
#> SRR2532341 3 0.2740 0.767 0.044 0.000 0.888 0.064 0.004
#> SRR2532340 3 0.3616 0.693 0.224 0.000 0.768 0.004 0.004
#> SRR2532339 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.928 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.1205 0.881 0.000 0.040 0.000 0.004 0.956
#> SRR2532336 1 0.0290 0.942 0.992 0.000 0.000 0.008 0.000
#> SRR2532335 3 0.2284 0.769 0.096 0.000 0.896 0.004 0.004
#> SRR2532334 3 0.3829 0.764 0.028 0.000 0.776 0.196 0.000
#> SRR2532333 5 0.1564 0.874 0.000 0.004 0.024 0.024 0.948
#> SRR2532332 1 0.0000 0.947 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.6144 0.499 0.000 0.304 0.060 0.048 0.588
#> SRR2532330 5 0.0740 0.882 0.000 0.008 0.004 0.008 0.980
#> SRR2532329 2 0.0451 0.926 0.000 0.988 0.008 0.000 0.004
#> SRR2532328 1 0.3400 0.838 0.852 0.016 0.036 0.096 0.000
#> SRR2532327 2 0.0162 0.928 0.000 0.996 0.004 0.000 0.000
#> SRR2532326 3 0.3877 0.755 0.024 0.000 0.764 0.212 0.000
#> SRR2532324 2 0.4682 0.742 0.000 0.772 0.052 0.040 0.136
#> SRR2532325 1 0.0162 0.945 0.996 0.000 0.000 0.004 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.92582 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532322 1 0.0146 0.92582 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532321 2 0.0146 0.87831 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532320 2 0.1989 0.84447 0.000 0.916 0.004 0.000 0.028 0.052
#> SRR2532319 3 0.4026 0.59046 0.000 0.000 0.772 0.072 0.144 0.012
#> SRR2532317 5 0.5281 0.53442 0.000 0.084 0.004 0.000 0.464 0.448
#> SRR2532318 5 0.0717 0.53356 0.000 0.000 0.008 0.000 0.976 0.016
#> SRR2532315 4 0.0146 0.94097 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532316 4 0.0146 0.94097 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532396 2 0.1049 0.86970 0.000 0.960 0.008 0.000 0.000 0.032
#> SRR2532395 5 0.3854 0.61954 0.000 0.000 0.000 0.000 0.536 0.464
#> SRR2532394 6 0.5819 -0.67069 0.000 0.168 0.004 0.000 0.352 0.476
#> SRR2532393 5 0.3672 0.63289 0.000 0.000 0.000 0.000 0.632 0.368
#> SRR2532392 2 0.1493 0.85367 0.000 0.936 0.004 0.000 0.004 0.056
#> SRR2532391 3 0.5560 0.25642 0.140 0.000 0.476 0.000 0.000 0.384
#> SRR2532390 2 0.0260 0.87776 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532389 1 0.0858 0.90703 0.968 0.000 0.004 0.000 0.000 0.028
#> SRR2532388 5 0.4072 0.61304 0.000 0.000 0.008 0.000 0.544 0.448
#> SRR2532387 2 0.6135 -0.00424 0.000 0.448 0.012 0.000 0.196 0.344
#> SRR2532386 4 0.0653 0.93473 0.004 0.000 0.004 0.980 0.000 0.012
#> SRR2532384 5 0.3851 0.62384 0.000 0.000 0.000 0.000 0.540 0.460
#> SRR2532385 5 0.5252 0.39458 0.000 0.000 0.160 0.016 0.652 0.172
#> SRR2532383 5 0.6138 0.41619 0.000 0.160 0.020 0.000 0.444 0.376
#> SRR2532381 4 0.0653 0.93473 0.004 0.000 0.004 0.980 0.000 0.012
#> SRR2532382 1 0.0260 0.92380 0.992 0.000 0.000 0.008 0.000 0.000
#> SRR2532379 4 0.0146 0.94097 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532380 1 0.0146 0.92582 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532378 1 0.2597 0.77067 0.824 0.000 0.000 0.176 0.000 0.000
#> SRR2532377 5 0.3989 0.61960 0.000 0.000 0.004 0.000 0.528 0.468
#> SRR2532376 5 0.0717 0.53356 0.000 0.000 0.008 0.000 0.976 0.016
#> SRR2532375 5 0.6217 0.20581 0.000 0.316 0.016 0.000 0.460 0.208
#> SRR2532374 6 0.6054 -0.54919 0.212 0.000 0.380 0.004 0.000 0.404
#> SRR2532372 3 0.2629 0.61523 0.000 0.000 0.868 0.040 0.000 0.092
#> SRR2532373 2 0.5504 0.50834 0.000 0.604 0.016 0.000 0.136 0.244
#> SRR2532371 2 0.5990 0.33809 0.000 0.532 0.016 0.000 0.212 0.240
#> SRR2532370 1 0.0291 0.92522 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR2532369 5 0.3847 0.62144 0.000 0.000 0.000 0.000 0.544 0.456
#> SRR2532368 2 0.1075 0.86451 0.000 0.952 0.000 0.000 0.000 0.048
#> SRR2532367 2 0.0436 0.87777 0.000 0.988 0.004 0.000 0.004 0.004
#> SRR2532366 1 0.0291 0.92522 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR2532365 5 0.4722 0.58733 0.000 0.036 0.004 0.000 0.492 0.468
#> SRR2532364 1 0.0146 0.92582 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532363 2 0.0146 0.87831 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532362 2 0.0405 0.87715 0.000 0.988 0.004 0.000 0.000 0.008
#> SRR2532361 4 0.0146 0.94097 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532360 4 0.0146 0.94097 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532359 1 0.5185 0.30740 0.568 0.000 0.080 0.344 0.000 0.008
#> SRR2532358 4 0.4071 0.45268 0.004 0.000 0.304 0.672 0.000 0.020
#> SRR2532357 2 0.0291 0.87799 0.000 0.992 0.004 0.000 0.000 0.004
#> SRR2532356 2 0.0291 0.87799 0.000 0.992 0.004 0.000 0.000 0.004
#> SRR2532355 3 0.3388 0.60482 0.036 0.000 0.792 0.172 0.000 0.000
#> SRR2532354 1 0.0146 0.92582 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532353 3 0.2697 0.61114 0.000 0.000 0.812 0.188 0.000 0.000
#> SRR2532352 2 0.0000 0.87829 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532350 3 0.5438 0.35363 0.148 0.000 0.548 0.000 0.000 0.304
#> SRR2532349 3 0.3388 0.58200 0.000 0.000 0.792 0.036 0.000 0.172
#> SRR2532348 5 0.1152 0.51944 0.000 0.000 0.004 0.000 0.952 0.044
#> SRR2532347 5 0.3854 0.62189 0.000 0.000 0.000 0.000 0.536 0.464
#> SRR2532346 5 0.0692 0.52441 0.000 0.000 0.004 0.000 0.976 0.020
#> SRR2532345 5 0.4572 0.51513 0.000 0.080 0.008 0.000 0.700 0.212
#> SRR2532344 3 0.3949 0.59631 0.000 0.000 0.780 0.072 0.136 0.012
#> SRR2532343 3 0.2597 0.62080 0.000 0.000 0.824 0.176 0.000 0.000
#> SRR2532342 3 0.5120 0.04128 0.068 0.000 0.472 0.456 0.000 0.004
#> SRR2532341 3 0.5919 0.32363 0.048 0.000 0.492 0.024 0.032 0.404
#> SRR2532340 3 0.5865 0.14517 0.196 0.000 0.424 0.000 0.000 0.380
#> SRR2532339 2 0.0146 0.87831 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532338 2 0.0260 0.87776 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532337 5 0.3997 0.61416 0.000 0.004 0.000 0.000 0.508 0.488
#> SRR2532336 1 0.0146 0.92582 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532335 3 0.5072 0.38522 0.064 0.000 0.556 0.008 0.000 0.372
#> SRR2532334 3 0.2562 0.62307 0.000 0.000 0.828 0.172 0.000 0.000
#> SRR2532333 5 0.2431 0.55662 0.000 0.000 0.008 0.000 0.860 0.132
#> SRR2532332 1 0.0291 0.92522 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR2532331 5 0.6031 0.31855 0.000 0.236 0.016 0.000 0.524 0.224
#> SRR2532330 5 0.3789 0.62648 0.000 0.000 0.000 0.000 0.584 0.416
#> SRR2532329 2 0.0405 0.87790 0.000 0.988 0.008 0.000 0.000 0.004
#> SRR2532328 1 0.6135 0.61056 0.652 0.024 0.032 0.132 0.020 0.140
#> SRR2532327 2 0.0777 0.87496 0.000 0.972 0.004 0.000 0.000 0.024
#> SRR2532326 3 0.2597 0.62080 0.000 0.000 0.824 0.176 0.000 0.000
#> SRR2532324 2 0.6074 0.38027 0.000 0.528 0.016 0.004 0.272 0.180
#> SRR2532325 1 0.0146 0.92294 0.996 0.000 0.000 0.000 0.000 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)
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 16752 rows and 81 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.947 0.930 0.972 0.5006 0.498 0.498
#> 3 3 0.802 0.797 0.920 0.1717 0.839 0.701
#> 4 4 0.806 0.881 0.925 0.1195 0.889 0.748
#> 5 5 0.821 0.804 0.914 0.1916 0.859 0.603
#> 6 6 0.831 0.770 0.902 0.0306 0.973 0.875
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
#> SRR2532323 1 0.0000 0.959 1.000 0.000
#> SRR2532322 1 0.0000 0.959 1.000 0.000
#> SRR2532321 2 0.0000 0.980 0.000 1.000
#> SRR2532320 2 0.0000 0.980 0.000 1.000
#> SRR2532319 2 0.9522 0.367 0.372 0.628
#> SRR2532317 2 0.0000 0.980 0.000 1.000
#> SRR2532318 2 0.0000 0.980 0.000 1.000
#> SRR2532315 1 0.0000 0.959 1.000 0.000
#> SRR2532316 1 0.0000 0.959 1.000 0.000
#> SRR2532396 2 0.0000 0.980 0.000 1.000
#> SRR2532395 2 0.0000 0.980 0.000 1.000
#> SRR2532394 2 0.0000 0.980 0.000 1.000
#> SRR2532393 2 0.0000 0.980 0.000 1.000
#> SRR2532392 2 0.0000 0.980 0.000 1.000
#> SRR2532391 1 0.0000 0.959 1.000 0.000
#> SRR2532390 2 0.0000 0.980 0.000 1.000
#> SRR2532389 1 0.0000 0.959 1.000 0.000
#> SRR2532388 2 0.0000 0.980 0.000 1.000
#> SRR2532387 2 0.0000 0.980 0.000 1.000
#> SRR2532386 1 0.0000 0.959 1.000 0.000
#> SRR2532384 2 0.0000 0.980 0.000 1.000
#> SRR2532385 2 0.3114 0.922 0.056 0.944
#> SRR2532383 2 0.0000 0.980 0.000 1.000
#> SRR2532381 1 0.0000 0.959 1.000 0.000
#> SRR2532382 1 0.0000 0.959 1.000 0.000
#> SRR2532379 1 0.0000 0.959 1.000 0.000
#> SRR2532380 1 0.0000 0.959 1.000 0.000
#> SRR2532378 1 0.0000 0.959 1.000 0.000
#> SRR2532377 2 0.0000 0.980 0.000 1.000
#> SRR2532376 2 0.0000 0.980 0.000 1.000
#> SRR2532375 2 0.0000 0.980 0.000 1.000
#> SRR2532374 1 0.6438 0.795 0.836 0.164
#> SRR2532372 1 0.3431 0.906 0.936 0.064
#> SRR2532373 2 0.0000 0.980 0.000 1.000
#> SRR2532371 2 0.0000 0.980 0.000 1.000
#> SRR2532370 1 0.0000 0.959 1.000 0.000
#> SRR2532369 2 0.0000 0.980 0.000 1.000
#> SRR2532368 2 0.0000 0.980 0.000 1.000
#> SRR2532367 2 0.0000 0.980 0.000 1.000
#> SRR2532366 1 0.0000 0.959 1.000 0.000
#> SRR2532365 2 0.0000 0.980 0.000 1.000
#> SRR2532364 1 0.0000 0.959 1.000 0.000
#> SRR2532363 2 0.0000 0.980 0.000 1.000
#> SRR2532362 2 0.0000 0.980 0.000 1.000
#> SRR2532361 1 0.0376 0.956 0.996 0.004
#> SRR2532360 1 0.0000 0.959 1.000 0.000
#> SRR2532359 1 0.0000 0.959 1.000 0.000
#> SRR2532358 1 0.0000 0.959 1.000 0.000
#> SRR2532357 2 0.0000 0.980 0.000 1.000
#> SRR2532356 2 0.0000 0.980 0.000 1.000
#> SRR2532355 1 0.0000 0.959 1.000 0.000
#> SRR2532354 1 0.0000 0.959 1.000 0.000
#> SRR2532353 1 0.0000 0.959 1.000 0.000
#> SRR2532352 2 0.0000 0.980 0.000 1.000
#> SRR2532350 1 0.0000 0.959 1.000 0.000
#> SRR2532349 1 0.0000 0.959 1.000 0.000
#> SRR2532348 2 0.0000 0.980 0.000 1.000
#> SRR2532347 2 0.0000 0.980 0.000 1.000
#> SRR2532346 2 0.0000 0.980 0.000 1.000
#> SRR2532345 2 0.0000 0.980 0.000 1.000
#> SRR2532344 1 0.9323 0.490 0.652 0.348
#> SRR2532343 1 0.0000 0.959 1.000 0.000
#> SRR2532342 1 0.0000 0.959 1.000 0.000
#> SRR2532341 1 0.9933 0.209 0.548 0.452
#> SRR2532340 1 0.0000 0.959 1.000 0.000
#> SRR2532339 2 0.0000 0.980 0.000 1.000
#> SRR2532338 2 0.0000 0.980 0.000 1.000
#> SRR2532337 2 0.0000 0.980 0.000 1.000
#> SRR2532336 1 0.0000 0.959 1.000 0.000
#> SRR2532335 1 0.9000 0.555 0.684 0.316
#> SRR2532334 1 0.0000 0.959 1.000 0.000
#> SRR2532333 2 0.0000 0.980 0.000 1.000
#> SRR2532332 1 0.0000 0.959 1.000 0.000
#> SRR2532331 2 0.0000 0.980 0.000 1.000
#> SRR2532330 2 0.0000 0.980 0.000 1.000
#> SRR2532329 2 0.0000 0.980 0.000 1.000
#> SRR2532328 2 0.9732 0.299 0.404 0.596
#> SRR2532327 2 0.0000 0.980 0.000 1.000
#> SRR2532326 1 0.0000 0.959 1.000 0.000
#> SRR2532324 2 0.0000 0.980 0.000 1.000
#> SRR2532325 1 0.3879 0.893 0.924 0.076
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532322 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532321 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532319 2 0.5621 0.5200 0.000 0.692 0.308
#> SRR2532317 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532318 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532315 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532316 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532396 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532391 1 0.5859 0.3444 0.656 0.000 0.344
#> SRR2532390 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532389 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532388 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532386 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532384 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532385 2 0.4605 0.7096 0.000 0.796 0.204
#> SRR2532383 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532381 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532382 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532379 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532378 1 0.5760 0.4746 0.672 0.000 0.328
#> SRR2532377 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532376 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532375 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532374 2 0.9910 -0.2454 0.344 0.384 0.272
#> SRR2532372 3 0.7190 0.4232 0.036 0.356 0.608
#> SRR2532373 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532370 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532369 2 0.0237 0.9464 0.000 0.996 0.004
#> SRR2532368 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532366 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532365 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532363 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532361 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532360 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532359 1 0.0592 0.8768 0.988 0.000 0.012
#> SRR2532358 3 0.0000 0.7507 0.000 0.000 1.000
#> SRR2532357 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532355 1 0.6204 0.0824 0.576 0.000 0.424
#> SRR2532354 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532353 3 0.5760 0.4656 0.328 0.000 0.672
#> SRR2532352 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532350 1 0.3192 0.7771 0.888 0.000 0.112
#> SRR2532349 3 0.6079 0.4408 0.388 0.000 0.612
#> SRR2532348 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532347 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532346 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532345 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532344 3 0.6079 0.3529 0.000 0.388 0.612
#> SRR2532343 3 0.4452 0.6531 0.192 0.000 0.808
#> SRR2532342 3 0.6026 0.4604 0.376 0.000 0.624
#> SRR2532341 2 0.5291 0.5929 0.000 0.732 0.268
#> SRR2532340 1 0.5254 0.5287 0.736 0.000 0.264
#> SRR2532339 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532336 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532335 2 0.8614 -0.0648 0.100 0.484 0.416
#> SRR2532334 3 0.6126 0.4152 0.400 0.000 0.600
#> SRR2532333 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.8854 1.000 0.000 0.000
#> SRR2532331 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532330 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532329 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532328 2 0.5863 0.7236 0.120 0.796 0.084
#> SRR2532327 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532326 3 0.6062 0.4480 0.384 0.000 0.616
#> SRR2532324 2 0.0000 0.9500 0.000 1.000 0.000
#> SRR2532325 1 0.0000 0.8854 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532320 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532319 3 0.2635 0.813 0.000 0.076 0.904 0.020
#> SRR2532317 2 0.1722 0.939 0.000 0.944 0.008 0.048
#> SRR2532318 2 0.1584 0.941 0.000 0.952 0.012 0.036
#> SRR2532315 4 0.2469 0.930 0.000 0.000 0.108 0.892
#> SRR2532316 4 0.2469 0.930 0.000 0.000 0.108 0.892
#> SRR2532396 2 0.1389 0.941 0.000 0.952 0.000 0.048
#> SRR2532395 2 0.1635 0.940 0.000 0.948 0.008 0.044
#> SRR2532394 2 0.1635 0.940 0.000 0.948 0.008 0.044
#> SRR2532393 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532392 2 0.2149 0.943 0.000 0.912 0.000 0.088
#> SRR2532391 3 0.4564 0.504 0.328 0.000 0.672 0.000
#> SRR2532390 2 0.1792 0.940 0.000 0.932 0.000 0.068
#> SRR2532389 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532388 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532387 2 0.1743 0.944 0.000 0.940 0.004 0.056
#> SRR2532386 4 0.2469 0.930 0.000 0.000 0.108 0.892
#> SRR2532384 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532385 3 0.3758 0.725 0.000 0.104 0.848 0.048
#> SRR2532383 2 0.1635 0.940 0.000 0.948 0.008 0.044
#> SRR2532381 4 0.4967 0.329 0.000 0.000 0.452 0.548
#> SRR2532382 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532379 4 0.2469 0.930 0.000 0.000 0.108 0.892
#> SRR2532380 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532378 1 0.5069 0.510 0.664 0.000 0.016 0.320
#> SRR2532377 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532376 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532375 2 0.0895 0.946 0.000 0.976 0.004 0.020
#> SRR2532374 1 0.7031 0.276 0.536 0.324 0.140 0.000
#> SRR2532372 3 0.0376 0.886 0.000 0.004 0.992 0.004
#> SRR2532373 2 0.1109 0.946 0.000 0.968 0.004 0.028
#> SRR2532371 2 0.0895 0.946 0.000 0.976 0.004 0.020
#> SRR2532370 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532369 2 0.4307 0.815 0.000 0.808 0.144 0.048
#> SRR2532368 2 0.1557 0.940 0.000 0.944 0.000 0.056
#> SRR2532367 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532366 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532365 2 0.1635 0.940 0.000 0.948 0.008 0.044
#> SRR2532364 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532362 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532361 4 0.2469 0.930 0.000 0.000 0.108 0.892
#> SRR2532360 4 0.2469 0.930 0.000 0.000 0.108 0.892
#> SRR2532359 1 0.0672 0.897 0.984 0.000 0.008 0.008
#> SRR2532358 3 0.1557 0.855 0.000 0.000 0.944 0.056
#> SRR2532357 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532356 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532355 3 0.0817 0.883 0.024 0.000 0.976 0.000
#> SRR2532354 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532353 3 0.0707 0.885 0.020 0.000 0.980 0.000
#> SRR2532352 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532350 3 0.4134 0.639 0.260 0.000 0.740 0.000
#> SRR2532349 3 0.0524 0.887 0.004 0.000 0.988 0.008
#> SRR2532348 2 0.2399 0.929 0.000 0.920 0.032 0.048
#> SRR2532347 2 0.1584 0.941 0.000 0.952 0.012 0.036
#> SRR2532346 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532345 2 0.1284 0.946 0.000 0.964 0.012 0.024
#> SRR2532344 3 0.0927 0.874 0.000 0.016 0.976 0.008
#> SRR2532343 3 0.0469 0.885 0.000 0.000 0.988 0.012
#> SRR2532342 3 0.0779 0.884 0.004 0.000 0.980 0.016
#> SRR2532341 2 0.3249 0.861 0.000 0.852 0.140 0.008
#> SRR2532340 1 0.4543 0.476 0.676 0.000 0.324 0.000
#> SRR2532339 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532338 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532337 2 0.1545 0.941 0.000 0.952 0.008 0.040
#> SRR2532336 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532335 3 0.2256 0.833 0.020 0.056 0.924 0.000
#> SRR2532334 3 0.0672 0.887 0.008 0.000 0.984 0.008
#> SRR2532333 2 0.3301 0.893 0.000 0.876 0.076 0.048
#> SRR2532332 1 0.0000 0.909 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.0927 0.945 0.000 0.976 0.008 0.016
#> SRR2532330 2 0.1854 0.938 0.000 0.940 0.012 0.048
#> SRR2532329 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532328 2 0.3790 0.860 0.088 0.860 0.040 0.012
#> SRR2532327 2 0.1637 0.939 0.000 0.940 0.000 0.060
#> SRR2532326 3 0.0524 0.887 0.004 0.000 0.988 0.008
#> SRR2532324 2 0.1557 0.940 0.000 0.944 0.000 0.056
#> SRR2532325 1 0.0000 0.909 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0703 0.8431 0.000 0.976 0.000 0.000 0.024
#> SRR2532320 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 3 0.1018 0.9146 0.000 0.016 0.968 0.000 0.016
#> SRR2532317 5 0.1341 0.8714 0.000 0.056 0.000 0.000 0.944
#> SRR2532318 5 0.4291 -0.0392 0.000 0.464 0.000 0.000 0.536
#> SRR2532315 4 0.0000 0.9391 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.9391 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.0703 0.8453 0.000 0.976 0.000 0.000 0.024
#> SRR2532395 5 0.0794 0.8801 0.000 0.028 0.000 0.000 0.972
#> SRR2532394 5 0.2020 0.8427 0.000 0.100 0.000 0.000 0.900
#> SRR2532393 5 0.0404 0.8772 0.000 0.012 0.000 0.000 0.988
#> SRR2532392 5 0.4126 0.3853 0.000 0.380 0.000 0.000 0.620
#> SRR2532391 3 0.4196 0.4338 0.356 0.000 0.640 0.000 0.004
#> SRR2532390 2 0.0404 0.8484 0.000 0.988 0.000 0.000 0.012
#> SRR2532389 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532388 5 0.4045 0.3545 0.000 0.356 0.000 0.000 0.644
#> SRR2532387 2 0.4219 0.2672 0.000 0.584 0.000 0.000 0.416
#> SRR2532386 4 0.0000 0.9391 0.000 0.000 0.000 1.000 0.000
#> SRR2532384 5 0.0880 0.8799 0.000 0.032 0.000 0.000 0.968
#> SRR2532385 3 0.2293 0.8392 0.000 0.016 0.900 0.000 0.084
#> SRR2532383 5 0.0794 0.8801 0.000 0.028 0.000 0.000 0.972
#> SRR2532381 4 0.3966 0.4528 0.000 0.000 0.336 0.664 0.000
#> SRR2532382 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.9391 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.4066 0.5399 0.672 0.000 0.004 0.324 0.000
#> SRR2532377 5 0.0290 0.8748 0.000 0.008 0.000 0.000 0.992
#> SRR2532376 5 0.0609 0.8759 0.000 0.020 0.000 0.000 0.980
#> SRR2532375 2 0.3366 0.6978 0.000 0.768 0.000 0.000 0.232
#> SRR2532374 1 0.5138 0.5392 0.672 0.268 0.040 0.000 0.020
#> SRR2532372 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532373 2 0.3586 0.6582 0.000 0.736 0.000 0.000 0.264
#> SRR2532371 2 0.2966 0.7430 0.000 0.816 0.000 0.000 0.184
#> SRR2532370 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0703 0.8798 0.000 0.024 0.000 0.000 0.976
#> SRR2532368 2 0.3895 0.4487 0.000 0.680 0.000 0.000 0.320
#> SRR2532367 2 0.0703 0.8430 0.000 0.976 0.000 0.000 0.024
#> SRR2532366 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.1043 0.8765 0.000 0.040 0.000 0.000 0.960
#> SRR2532364 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532361 4 0.0000 0.9391 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.9391 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.0404 0.9221 0.988 0.000 0.000 0.012 0.000
#> SRR2532358 3 0.1043 0.9043 0.000 0.000 0.960 0.040 0.000
#> SRR2532357 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532354 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532352 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.2970 0.7616 0.168 0.000 0.828 0.000 0.004
#> SRR2532349 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532348 5 0.2732 0.7547 0.000 0.160 0.000 0.000 0.840
#> SRR2532347 5 0.2690 0.7599 0.000 0.156 0.000 0.000 0.844
#> SRR2532346 5 0.0404 0.8761 0.000 0.012 0.000 0.000 0.988
#> SRR2532345 2 0.3983 0.5250 0.000 0.660 0.000 0.000 0.340
#> SRR2532344 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532343 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532342 3 0.0290 0.9265 0.000 0.000 0.992 0.008 0.000
#> SRR2532341 2 0.5112 0.6015 0.000 0.664 0.080 0.000 0.256
#> SRR2532340 1 0.3579 0.6551 0.756 0.000 0.240 0.000 0.004
#> SRR2532339 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.1197 0.8742 0.000 0.048 0.000 0.000 0.952
#> SRR2532336 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.1502 0.8771 0.000 0.056 0.940 0.000 0.004
#> SRR2532334 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532333 5 0.0162 0.8724 0.000 0.004 0.000 0.000 0.996
#> SRR2532332 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.3837 0.5881 0.000 0.692 0.000 0.000 0.308
#> SRR2532330 5 0.0703 0.8751 0.000 0.024 0.000 0.000 0.976
#> SRR2532329 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 2 0.5341 0.3844 0.064 0.580 0.000 0.000 0.356
#> SRR2532327 2 0.0000 0.8506 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 3 0.0000 0.9303 0.000 0.000 1.000 0.000 0.000
#> SRR2532324 2 0.1341 0.8320 0.000 0.944 0.000 0.000 0.056
#> SRR2532325 1 0.0000 0.9313 1.000 0.000 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0713 0.8268 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR2532320 2 0.0363 0.8328 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR2532319 3 0.0748 0.8888 0.000 0.004 0.976 0.000 0.016 0.004
#> SRR2532317 5 0.0713 0.8704 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR2532318 5 0.4531 -0.0625 0.000 0.464 0.000 0.000 0.504 0.032
#> SRR2532315 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.0632 0.8311 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR2532395 5 0.0713 0.8704 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR2532394 5 0.1387 0.8536 0.000 0.068 0.000 0.000 0.932 0.000
#> SRR2532393 5 0.0993 0.8651 0.000 0.012 0.000 0.000 0.964 0.024
#> SRR2532392 5 0.3782 0.2880 0.000 0.412 0.000 0.000 0.588 0.000
#> SRR2532391 6 0.0972 0.5968 0.008 0.000 0.028 0.000 0.000 0.964
#> SRR2532390 2 0.0458 0.8328 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532389 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532388 5 0.4230 0.3171 0.000 0.364 0.000 0.000 0.612 0.024
#> SRR2532387 2 0.3774 0.2928 0.000 0.592 0.000 0.000 0.408 0.000
#> SRR2532386 6 0.3847 0.1179 0.000 0.000 0.000 0.456 0.000 0.544
#> SRR2532384 5 0.1334 0.8669 0.000 0.032 0.000 0.000 0.948 0.020
#> SRR2532385 3 0.1588 0.8289 0.000 0.004 0.924 0.000 0.072 0.000
#> SRR2532383 5 0.0858 0.8710 0.000 0.028 0.000 0.000 0.968 0.004
#> SRR2532381 6 0.3975 0.1253 0.000 0.000 0.004 0.452 0.000 0.544
#> SRR2532382 1 0.0632 0.9485 0.976 0.000 0.000 0.000 0.000 0.024
#> SRR2532379 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.5173 0.4677 0.616 0.000 0.000 0.224 0.000 0.160
#> SRR2532377 5 0.0291 0.8640 0.000 0.004 0.000 0.000 0.992 0.004
#> SRR2532376 5 0.0777 0.8608 0.000 0.004 0.000 0.000 0.972 0.024
#> SRR2532375 2 0.3529 0.6888 0.000 0.764 0.000 0.000 0.208 0.028
#> SRR2532374 6 0.2734 0.5786 0.008 0.148 0.004 0.000 0.000 0.840
#> SRR2532372 3 0.0363 0.8958 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR2532373 2 0.3641 0.6713 0.000 0.748 0.000 0.000 0.224 0.028
#> SRR2532371 2 0.3210 0.7280 0.000 0.804 0.000 0.000 0.168 0.028
#> SRR2532370 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0547 0.8699 0.000 0.020 0.000 0.000 0.980 0.000
#> SRR2532368 2 0.3508 0.4976 0.000 0.704 0.000 0.000 0.292 0.004
#> SRR2532367 2 0.0713 0.8268 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR2532366 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.0632 0.8704 0.000 0.024 0.000 0.000 0.976 0.000
#> SRR2532364 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532361 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.0363 0.9584 0.988 0.000 0.000 0.012 0.000 0.000
#> SRR2532358 3 0.0146 0.8989 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR2532357 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532355 3 0.0000 0.9004 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532354 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.9004 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532352 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532350 3 0.4361 0.3795 0.024 0.000 0.552 0.000 0.000 0.424
#> SRR2532349 3 0.2597 0.7647 0.000 0.000 0.824 0.000 0.000 0.176
#> SRR2532348 5 0.2680 0.7868 0.000 0.108 0.000 0.000 0.860 0.032
#> SRR2532347 5 0.2454 0.7498 0.000 0.160 0.000 0.000 0.840 0.000
#> SRR2532346 5 0.0806 0.8622 0.000 0.008 0.000 0.000 0.972 0.020
#> SRR2532345 2 0.4170 0.5234 0.000 0.660 0.000 0.000 0.308 0.032
#> SRR2532344 3 0.0000 0.9004 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532343 3 0.0000 0.9004 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532342 3 0.0146 0.8989 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR2532341 6 0.3508 0.4507 0.000 0.292 0.004 0.000 0.000 0.704
#> SRR2532340 6 0.1434 0.5934 0.048 0.000 0.012 0.000 0.000 0.940
#> SRR2532339 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 5 0.0790 0.8693 0.000 0.032 0.000 0.000 0.968 0.000
#> SRR2532336 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.4681 0.3132 0.000 0.044 0.524 0.000 0.000 0.432
#> SRR2532334 3 0.0000 0.9004 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532333 5 0.0260 0.8613 0.000 0.000 0.000 0.000 0.992 0.008
#> SRR2532332 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.4278 0.4664 0.000 0.632 0.000 0.000 0.336 0.032
#> SRR2532330 5 0.0146 0.8632 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532329 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532328 2 0.6061 0.0292 0.016 0.424 0.000 0.000 0.156 0.404
#> SRR2532327 2 0.0000 0.8355 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.0000 0.9004 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532324 2 0.1780 0.8089 0.000 0.924 0.000 0.000 0.048 0.028
#> SRR2532325 1 0.0000 0.9680 1.000 0.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 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.992 0.997 0.5065 0.494 0.494
#> 3 3 0.920 0.912 0.950 0.2254 0.859 0.721
#> 4 4 0.683 0.801 0.852 0.0818 0.924 0.812
#> 5 5 0.776 0.703 0.881 0.1235 0.861 0.625
#> 6 6 0.809 0.781 0.864 0.0465 0.901 0.635
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
#> SRR2532323 1 0.000 0.993 1.00 0.00
#> SRR2532322 1 0.000 0.993 1.00 0.00
#> SRR2532321 2 0.000 1.000 0.00 1.00
#> SRR2532320 2 0.000 1.000 0.00 1.00
#> SRR2532319 1 0.000 0.993 1.00 0.00
#> SRR2532317 2 0.000 1.000 0.00 1.00
#> SRR2532318 2 0.000 1.000 0.00 1.00
#> SRR2532315 1 0.000 0.993 1.00 0.00
#> SRR2532316 1 0.000 0.993 1.00 0.00
#> SRR2532396 2 0.000 1.000 0.00 1.00
#> SRR2532395 2 0.000 1.000 0.00 1.00
#> SRR2532394 2 0.000 1.000 0.00 1.00
#> SRR2532393 2 0.000 1.000 0.00 1.00
#> SRR2532392 2 0.000 1.000 0.00 1.00
#> SRR2532391 1 0.000 0.993 1.00 0.00
#> SRR2532390 2 0.000 1.000 0.00 1.00
#> SRR2532389 1 0.000 0.993 1.00 0.00
#> SRR2532388 2 0.000 1.000 0.00 1.00
#> SRR2532387 2 0.000 1.000 0.00 1.00
#> SRR2532386 1 0.000 0.993 1.00 0.00
#> SRR2532384 2 0.000 1.000 0.00 1.00
#> SRR2532385 1 0.827 0.649 0.74 0.26
#> SRR2532383 2 0.000 1.000 0.00 1.00
#> SRR2532381 1 0.000 0.993 1.00 0.00
#> SRR2532382 1 0.000 0.993 1.00 0.00
#> SRR2532379 1 0.000 0.993 1.00 0.00
#> SRR2532380 1 0.000 0.993 1.00 0.00
#> SRR2532378 1 0.000 0.993 1.00 0.00
#> SRR2532377 2 0.000 1.000 0.00 1.00
#> SRR2532376 2 0.000 1.000 0.00 1.00
#> SRR2532375 2 0.000 1.000 0.00 1.00
#> SRR2532374 1 0.000 0.993 1.00 0.00
#> SRR2532372 1 0.000 0.993 1.00 0.00
#> SRR2532373 2 0.000 1.000 0.00 1.00
#> SRR2532371 2 0.000 1.000 0.00 1.00
#> SRR2532370 1 0.000 0.993 1.00 0.00
#> SRR2532369 2 0.000 1.000 0.00 1.00
#> SRR2532368 2 0.000 1.000 0.00 1.00
#> SRR2532367 2 0.000 1.000 0.00 1.00
#> SRR2532366 1 0.000 0.993 1.00 0.00
#> SRR2532365 2 0.000 1.000 0.00 1.00
#> SRR2532364 1 0.000 0.993 1.00 0.00
#> SRR2532363 2 0.000 1.000 0.00 1.00
#> SRR2532362 2 0.000 1.000 0.00 1.00
#> SRR2532361 1 0.000 0.993 1.00 0.00
#> SRR2532360 1 0.000 0.993 1.00 0.00
#> SRR2532359 1 0.000 0.993 1.00 0.00
#> SRR2532358 1 0.000 0.993 1.00 0.00
#> SRR2532357 2 0.000 1.000 0.00 1.00
#> SRR2532356 2 0.000 1.000 0.00 1.00
#> SRR2532355 1 0.000 0.993 1.00 0.00
#> SRR2532354 1 0.000 0.993 1.00 0.00
#> SRR2532353 1 0.000 0.993 1.00 0.00
#> SRR2532352 2 0.000 1.000 0.00 1.00
#> SRR2532350 1 0.000 0.993 1.00 0.00
#> SRR2532349 1 0.000 0.993 1.00 0.00
#> SRR2532348 2 0.000 1.000 0.00 1.00
#> SRR2532347 2 0.000 1.000 0.00 1.00
#> SRR2532346 2 0.000 1.000 0.00 1.00
#> SRR2532345 2 0.000 1.000 0.00 1.00
#> SRR2532344 1 0.000 0.993 1.00 0.00
#> SRR2532343 1 0.000 0.993 1.00 0.00
#> SRR2532342 1 0.000 0.993 1.00 0.00
#> SRR2532341 1 0.000 0.993 1.00 0.00
#> SRR2532340 1 0.000 0.993 1.00 0.00
#> SRR2532339 2 0.000 1.000 0.00 1.00
#> SRR2532338 2 0.000 1.000 0.00 1.00
#> SRR2532337 2 0.000 1.000 0.00 1.00
#> SRR2532336 1 0.000 0.993 1.00 0.00
#> SRR2532335 1 0.000 0.993 1.00 0.00
#> SRR2532334 1 0.000 0.993 1.00 0.00
#> SRR2532333 2 0.000 1.000 0.00 1.00
#> SRR2532332 1 0.000 0.993 1.00 0.00
#> SRR2532331 2 0.000 1.000 0.00 1.00
#> SRR2532330 2 0.000 1.000 0.00 1.00
#> SRR2532329 2 0.000 1.000 0.00 1.00
#> SRR2532328 1 0.000 0.993 1.00 0.00
#> SRR2532327 2 0.000 1.000 0.00 1.00
#> SRR2532326 1 0.000 0.993 1.00 0.00
#> SRR2532324 2 0.000 1.000 0.00 1.00
#> SRR2532325 1 0.000 0.993 1.00 0.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.1643 0.906 0.956 0.000 0.044
#> SRR2532322 1 0.5138 0.720 0.748 0.000 0.252
#> SRR2532321 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532319 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532317 2 0.1289 0.975 0.032 0.968 0.000
#> SRR2532318 2 0.1289 0.975 0.032 0.968 0.000
#> SRR2532315 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532316 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532396 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532395 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532394 2 0.0747 0.982 0.016 0.984 0.000
#> SRR2532393 2 0.1163 0.977 0.028 0.972 0.000
#> SRR2532392 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532391 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532390 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532389 3 0.1964 0.880 0.056 0.000 0.944
#> SRR2532388 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532387 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532386 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532384 2 0.1163 0.977 0.028 0.972 0.000
#> SRR2532385 2 0.4555 0.764 0.000 0.800 0.200
#> SRR2532383 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532381 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532382 1 0.1753 0.911 0.952 0.000 0.048
#> SRR2532379 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532380 1 0.1643 0.906 0.956 0.000 0.044
#> SRR2532378 1 0.2165 0.909 0.936 0.000 0.064
#> SRR2532377 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532376 2 0.1289 0.975 0.032 0.968 0.000
#> SRR2532375 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532374 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532372 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532373 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532370 1 0.4178 0.814 0.828 0.000 0.172
#> SRR2532369 2 0.1289 0.975 0.032 0.968 0.000
#> SRR2532368 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532366 3 0.6026 0.380 0.376 0.000 0.624
#> SRR2532365 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532364 1 0.5138 0.720 0.748 0.000 0.252
#> SRR2532363 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532361 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532360 1 0.1860 0.912 0.948 0.000 0.052
#> SRR2532359 3 0.5882 0.442 0.348 0.000 0.652
#> SRR2532358 1 0.6140 0.397 0.596 0.000 0.404
#> SRR2532357 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532355 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532354 1 0.1643 0.906 0.956 0.000 0.044
#> SRR2532353 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532352 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532350 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532349 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532348 2 0.2806 0.943 0.032 0.928 0.040
#> SRR2532347 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532346 2 0.2569 0.951 0.032 0.936 0.032
#> SRR2532345 2 0.0747 0.982 0.016 0.984 0.000
#> SRR2532344 3 0.0237 0.917 0.000 0.004 0.996
#> SRR2532343 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532342 3 0.5882 0.442 0.348 0.000 0.652
#> SRR2532341 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532340 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532339 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532337 2 0.0237 0.986 0.004 0.996 0.000
#> SRR2532336 1 0.1643 0.906 0.956 0.000 0.044
#> SRR2532335 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532334 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532333 2 0.1289 0.975 0.032 0.968 0.000
#> SRR2532332 1 0.5138 0.720 0.748 0.000 0.252
#> SRR2532331 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532330 2 0.1289 0.975 0.032 0.968 0.000
#> SRR2532329 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532328 3 0.4087 0.821 0.052 0.068 0.880
#> SRR2532327 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532326 3 0.0000 0.921 0.000 0.000 1.000
#> SRR2532324 2 0.0000 0.987 0.000 1.000 0.000
#> SRR2532325 3 0.2537 0.860 0.080 0.000 0.920
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.3577 0.6813 0.832 0.000 0.012 0.156
#> SRR2532322 1 0.3266 0.7086 0.832 0.000 0.168 0.000
#> SRR2532321 2 0.0188 0.8879 0.004 0.996 0.000 0.000
#> SRR2532320 2 0.0188 0.8877 0.000 0.996 0.000 0.004
#> SRR2532319 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532317 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532318 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532315 4 0.5063 0.9515 0.124 0.000 0.108 0.768
#> SRR2532316 4 0.5063 0.9515 0.124 0.000 0.108 0.768
#> SRR2532396 2 0.2197 0.8532 0.080 0.916 0.000 0.004
#> SRR2532395 2 0.2480 0.8840 0.008 0.904 0.000 0.088
#> SRR2532394 2 0.3300 0.8678 0.008 0.848 0.000 0.144
#> SRR2532393 2 0.3672 0.8587 0.012 0.824 0.000 0.164
#> SRR2532392 2 0.0188 0.8877 0.000 0.996 0.000 0.004
#> SRR2532391 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532390 2 0.0921 0.8896 0.000 0.972 0.000 0.028
#> SRR2532389 3 0.4843 0.1022 0.396 0.000 0.604 0.000
#> SRR2532388 2 0.2546 0.8815 0.008 0.900 0.000 0.092
#> SRR2532387 2 0.0657 0.8846 0.012 0.984 0.000 0.004
#> SRR2532386 4 0.5581 0.9295 0.132 0.000 0.140 0.728
#> SRR2532384 2 0.3479 0.8650 0.012 0.840 0.000 0.148
#> SRR2532385 2 0.6794 0.3532 0.000 0.524 0.372 0.104
#> SRR2532383 2 0.1118 0.8891 0.000 0.964 0.000 0.036
#> SRR2532381 4 0.6407 0.8254 0.204 0.000 0.148 0.648
#> SRR2532382 1 0.6422 0.4720 0.632 0.000 0.120 0.248
#> SRR2532379 4 0.5063 0.9515 0.124 0.000 0.108 0.768
#> SRR2532380 1 0.3577 0.6813 0.832 0.000 0.012 0.156
#> SRR2532378 1 0.7258 0.1639 0.508 0.000 0.164 0.328
#> SRR2532377 2 0.3196 0.8705 0.008 0.856 0.000 0.136
#> SRR2532376 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532375 2 0.0000 0.8883 0.000 1.000 0.000 0.000
#> SRR2532374 3 0.0707 0.9081 0.020 0.000 0.980 0.000
#> SRR2532372 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532373 2 0.3306 0.7987 0.156 0.840 0.000 0.004
#> SRR2532371 2 0.0188 0.8877 0.000 0.996 0.000 0.004
#> SRR2532370 1 0.4093 0.7084 0.832 0.000 0.072 0.096
#> SRR2532369 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532368 2 0.0188 0.8877 0.000 0.996 0.000 0.004
#> SRR2532367 2 0.0469 0.8894 0.000 0.988 0.000 0.012
#> SRR2532366 1 0.5947 0.5604 0.628 0.000 0.312 0.060
#> SRR2532365 2 0.2773 0.8770 0.004 0.880 0.000 0.116
#> SRR2532364 1 0.3266 0.7086 0.832 0.000 0.168 0.000
#> SRR2532363 2 0.0000 0.8883 0.000 1.000 0.000 0.000
#> SRR2532362 2 0.0188 0.8877 0.000 0.996 0.000 0.004
#> SRR2532361 4 0.5432 0.9366 0.124 0.000 0.136 0.740
#> SRR2532360 4 0.5063 0.9515 0.124 0.000 0.108 0.768
#> SRR2532359 1 0.7431 0.2902 0.448 0.000 0.380 0.172
#> SRR2532358 3 0.5565 0.4535 0.068 0.000 0.700 0.232
#> SRR2532357 2 0.3306 0.7987 0.156 0.840 0.000 0.004
#> SRR2532356 2 0.3306 0.7987 0.156 0.840 0.000 0.004
#> SRR2532355 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532354 1 0.3577 0.6813 0.832 0.000 0.012 0.156
#> SRR2532353 3 0.0336 0.9210 0.008 0.000 0.992 0.000
#> SRR2532352 2 0.0000 0.8883 0.000 1.000 0.000 0.000
#> SRR2532350 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532349 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532348 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532347 2 0.3161 0.8742 0.012 0.864 0.000 0.124
#> SRR2532346 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532345 2 0.3157 0.8694 0.004 0.852 0.000 0.144
#> SRR2532344 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532343 3 0.0188 0.9242 0.000 0.000 0.996 0.004
#> SRR2532342 3 0.4307 0.7067 0.048 0.000 0.808 0.144
#> SRR2532341 3 0.1940 0.8539 0.076 0.000 0.924 0.000
#> SRR2532340 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532339 2 0.0000 0.8883 0.000 1.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8883 0.000 1.000 0.000 0.000
#> SRR2532337 2 0.2596 0.8870 0.024 0.908 0.000 0.068
#> SRR2532336 1 0.3577 0.6813 0.832 0.000 0.012 0.156
#> SRR2532335 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532334 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532333 2 0.4319 0.8254 0.012 0.760 0.000 0.228
#> SRR2532332 1 0.3266 0.7086 0.832 0.000 0.168 0.000
#> SRR2532331 2 0.0188 0.8877 0.000 0.996 0.000 0.004
#> SRR2532330 2 0.3597 0.8651 0.016 0.836 0.000 0.148
#> SRR2532329 2 0.3306 0.7987 0.156 0.840 0.000 0.004
#> SRR2532328 2 0.7916 -0.0629 0.316 0.356 0.328 0.000
#> SRR2532327 2 0.0000 0.8883 0.000 1.000 0.000 0.000
#> SRR2532326 3 0.0000 0.9266 0.000 0.000 1.000 0.000
#> SRR2532324 2 0.2053 0.8572 0.072 0.924 0.000 0.004
#> SRR2532325 1 0.4643 0.5670 0.656 0.000 0.344 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 3 0.0880 0.8846 0.000 0.000 0.968 0.000 0.032
#> SRR2532317 5 0.2929 0.6674 0.000 0.180 0.000 0.000 0.820
#> SRR2532318 5 0.1965 0.7131 0.000 0.096 0.000 0.000 0.904
#> SRR2532315 4 0.0000 0.8176 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.8176 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.0880 0.8190 0.000 0.968 0.000 0.000 0.032
#> SRR2532395 2 0.4235 0.2524 0.000 0.576 0.000 0.000 0.424
#> SRR2532394 2 0.4306 -0.0286 0.000 0.508 0.000 0.000 0.492
#> SRR2532393 5 0.4242 0.2253 0.000 0.428 0.000 0.000 0.572
#> SRR2532392 2 0.0290 0.8272 0.000 0.992 0.000 0.000 0.008
#> SRR2532391 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532390 2 0.1478 0.7903 0.000 0.936 0.000 0.000 0.064
#> SRR2532389 3 0.3994 0.6830 0.188 0.000 0.772 0.040 0.000
#> SRR2532388 2 0.4182 0.2852 0.000 0.600 0.000 0.000 0.400
#> SRR2532387 2 0.3305 0.6239 0.000 0.776 0.000 0.000 0.224
#> SRR2532386 4 0.4734 0.6840 0.088 0.000 0.188 0.724 0.000
#> SRR2532384 5 0.4273 0.1634 0.000 0.448 0.000 0.000 0.552
#> SRR2532385 5 0.4648 -0.2098 0.000 0.012 0.464 0.000 0.524
#> SRR2532383 2 0.0963 0.8109 0.000 0.964 0.000 0.000 0.036
#> SRR2532381 4 0.4974 0.6588 0.092 0.000 0.212 0.696 0.000
#> SRR2532382 1 0.3988 0.6810 0.768 0.000 0.036 0.196 0.000
#> SRR2532379 4 0.0000 0.8176 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 4 0.6682 0.2022 0.368 0.000 0.236 0.396 0.000
#> SRR2532377 2 0.4300 0.0373 0.000 0.524 0.000 0.000 0.476
#> SRR2532376 5 0.1544 0.7133 0.000 0.068 0.000 0.000 0.932
#> SRR2532375 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532374 3 0.1121 0.8702 0.044 0.000 0.956 0.000 0.000
#> SRR2532372 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532373 2 0.0404 0.8252 0.000 0.988 0.000 0.000 0.012
#> SRR2532371 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532370 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.1270 0.7086 0.000 0.052 0.000 0.000 0.948
#> SRR2532368 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532367 2 0.0162 0.8289 0.000 0.996 0.000 0.000 0.004
#> SRR2532366 1 0.2424 0.7969 0.868 0.000 0.132 0.000 0.000
#> SRR2532365 2 0.4256 0.1820 0.000 0.564 0.000 0.000 0.436
#> SRR2532364 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0162 0.8289 0.000 0.996 0.000 0.000 0.004
#> SRR2532361 4 0.0404 0.8155 0.000 0.000 0.012 0.988 0.000
#> SRR2532360 4 0.0000 0.8176 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 3 0.6081 0.1909 0.376 0.000 0.496 0.128 0.000
#> SRR2532358 3 0.2536 0.7851 0.004 0.000 0.868 0.128 0.000
#> SRR2532357 2 0.0404 0.8252 0.000 0.988 0.000 0.000 0.012
#> SRR2532356 2 0.0404 0.8252 0.000 0.988 0.000 0.000 0.012
#> SRR2532355 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532354 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532352 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532349 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532348 5 0.0510 0.6706 0.000 0.016 0.000 0.000 0.984
#> SRR2532347 2 0.4268 0.1905 0.000 0.556 0.000 0.000 0.444
#> SRR2532346 5 0.1121 0.7036 0.000 0.044 0.000 0.000 0.956
#> SRR2532345 2 0.4201 0.2491 0.000 0.592 0.000 0.000 0.408
#> SRR2532344 3 0.0609 0.8903 0.000 0.000 0.980 0.000 0.020
#> SRR2532343 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532342 3 0.2953 0.7638 0.012 0.000 0.844 0.144 0.000
#> SRR2532341 3 0.2329 0.8125 0.000 0.000 0.876 0.000 0.124
#> SRR2532340 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532339 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0404 0.8250 0.000 0.988 0.000 0.000 0.012
#> SRR2532337 2 0.4060 0.4028 0.000 0.640 0.000 0.000 0.360
#> SRR2532336 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532334 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532333 5 0.0963 0.6964 0.000 0.036 0.000 0.000 0.964
#> SRR2532332 1 0.0000 0.9289 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532330 5 0.4249 0.1787 0.000 0.432 0.000 0.000 0.568
#> SRR2532329 2 0.0404 0.8252 0.000 0.988 0.000 0.000 0.012
#> SRR2532328 3 0.8418 0.2989 0.084 0.152 0.496 0.076 0.192
#> SRR2532327 2 0.0000 0.8299 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 3 0.0000 0.8980 0.000 0.000 1.000 0.000 0.000
#> SRR2532324 2 0.0162 0.8289 0.000 0.996 0.000 0.000 0.004
#> SRR2532325 1 0.3438 0.7224 0.808 0.000 0.172 0.020 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0146 0.916 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532320 2 0.0146 0.917 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532319 3 0.0405 0.953 0.000 0.000 0.988 0.000 0.004 0.008
#> SRR2532317 5 0.1049 0.825 0.000 0.032 0.000 0.000 0.960 0.008
#> SRR2532318 5 0.1320 0.823 0.000 0.036 0.000 0.000 0.948 0.016
#> SRR2532315 4 0.0000 0.966 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.966 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.0260 0.916 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532395 6 0.4047 0.807 0.000 0.296 0.000 0.000 0.028 0.676
#> SRR2532394 6 0.5146 0.753 0.000 0.396 0.000 0.000 0.088 0.516
#> SRR2532393 5 0.4681 0.334 0.000 0.212 0.000 0.000 0.676 0.112
#> SRR2532392 2 0.0146 0.916 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532391 3 0.0790 0.948 0.000 0.000 0.968 0.000 0.000 0.032
#> SRR2532390 2 0.2432 0.784 0.000 0.876 0.000 0.000 0.100 0.024
#> SRR2532389 1 0.6274 0.464 0.432 0.000 0.308 0.012 0.000 0.248
#> SRR2532388 6 0.4429 0.735 0.000 0.424 0.000 0.000 0.028 0.548
#> SRR2532387 2 0.3862 -0.563 0.000 0.524 0.000 0.000 0.000 0.476
#> SRR2532386 1 0.7485 0.315 0.352 0.000 0.160 0.288 0.000 0.200
#> SRR2532384 6 0.5095 0.678 0.000 0.180 0.000 0.000 0.188 0.632
#> SRR2532385 5 0.4157 0.124 0.000 0.000 0.444 0.000 0.544 0.012
#> SRR2532383 2 0.1682 0.847 0.000 0.928 0.000 0.000 0.020 0.052
#> SRR2532381 1 0.7626 0.325 0.328 0.000 0.188 0.248 0.000 0.236
#> SRR2532382 1 0.4222 0.636 0.692 0.000 0.008 0.032 0.000 0.268
#> SRR2532379 4 0.0000 0.966 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.7091 0.505 0.452 0.000 0.180 0.124 0.000 0.244
#> SRR2532377 6 0.5002 0.743 0.000 0.412 0.000 0.000 0.072 0.516
#> SRR2532376 5 0.0914 0.834 0.000 0.016 0.000 0.000 0.968 0.016
#> SRR2532375 2 0.0146 0.916 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532374 3 0.3183 0.788 0.112 0.000 0.828 0.000 0.000 0.060
#> SRR2532372 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532373 2 0.0260 0.916 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532371 2 0.0363 0.915 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR2532370 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.1501 0.808 0.000 0.000 0.000 0.000 0.924 0.076
#> SRR2532368 2 0.0146 0.916 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532367 2 0.1219 0.871 0.000 0.948 0.000 0.000 0.004 0.048
#> SRR2532366 1 0.1297 0.715 0.948 0.000 0.012 0.000 0.000 0.040
#> SRR2532365 2 0.4011 0.440 0.000 0.736 0.000 0.000 0.060 0.204
#> SRR2532364 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0260 0.916 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532362 2 0.0260 0.917 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532361 4 0.2135 0.857 0.000 0.000 0.000 0.872 0.000 0.128
#> SRR2532360 4 0.0000 0.966 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.6529 0.513 0.448 0.000 0.248 0.032 0.000 0.272
#> SRR2532358 3 0.1649 0.915 0.016 0.000 0.936 0.040 0.000 0.008
#> SRR2532357 2 0.0260 0.916 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532356 2 0.0260 0.916 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532355 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532354 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532352 2 0.0260 0.916 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532350 3 0.0713 0.950 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR2532349 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532348 5 0.0000 0.832 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532347 6 0.4233 0.806 0.000 0.268 0.000 0.000 0.048 0.684
#> SRR2532346 5 0.0000 0.832 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532345 2 0.3637 0.635 0.000 0.792 0.000 0.000 0.124 0.084
#> SRR2532344 3 0.0260 0.953 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR2532343 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532342 3 0.4361 0.623 0.004 0.000 0.700 0.060 0.000 0.236
#> SRR2532341 3 0.0993 0.946 0.000 0.000 0.964 0.000 0.012 0.024
#> SRR2532340 3 0.0790 0.948 0.000 0.000 0.968 0.000 0.000 0.032
#> SRR2532339 2 0.0000 0.917 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.1082 0.879 0.000 0.956 0.000 0.000 0.040 0.004
#> SRR2532337 6 0.4283 0.776 0.000 0.384 0.000 0.000 0.024 0.592
#> SRR2532336 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.0713 0.950 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR2532334 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532333 5 0.0000 0.832 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.723 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.0363 0.916 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR2532330 6 0.5065 0.669 0.000 0.172 0.000 0.000 0.192 0.636
#> SRR2532329 2 0.0146 0.916 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532328 1 0.7926 0.414 0.344 0.080 0.280 0.016 0.020 0.260
#> SRR2532327 2 0.0000 0.917 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.0000 0.956 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532324 2 0.0146 0.917 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532325 1 0.4601 0.649 0.688 0.000 0.072 0.008 0.000 0.232
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)
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 16752 rows and 81 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 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.978 0.991 0.5049 0.494 0.494
#> 3 3 0.951 0.926 0.971 0.2332 0.848 0.702
#> 4 4 0.760 0.796 0.892 0.1752 0.810 0.539
#> 5 5 0.837 0.779 0.902 0.0847 0.831 0.465
#> 6 6 0.851 0.729 0.880 0.0382 0.930 0.692
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 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
#> SRR2532323 1 0.0000 0.981 1.000 0.000
#> SRR2532322 1 0.0000 0.981 1.000 0.000
#> SRR2532321 2 0.0000 1.000 0.000 1.000
#> SRR2532320 2 0.0000 1.000 0.000 1.000
#> SRR2532319 1 0.7056 0.767 0.808 0.192
#> SRR2532317 2 0.0000 1.000 0.000 1.000
#> SRR2532318 2 0.0000 1.000 0.000 1.000
#> SRR2532315 1 0.0000 0.981 1.000 0.000
#> SRR2532316 1 0.0000 0.981 1.000 0.000
#> SRR2532396 2 0.0000 1.000 0.000 1.000
#> SRR2532395 2 0.0000 1.000 0.000 1.000
#> SRR2532394 2 0.0000 1.000 0.000 1.000
#> SRR2532393 2 0.0000 1.000 0.000 1.000
#> SRR2532392 2 0.0000 1.000 0.000 1.000
#> SRR2532391 1 0.0000 0.981 1.000 0.000
#> SRR2532390 2 0.0000 1.000 0.000 1.000
#> SRR2532389 1 0.0000 0.981 1.000 0.000
#> SRR2532388 2 0.0000 1.000 0.000 1.000
#> SRR2532387 2 0.0000 1.000 0.000 1.000
#> SRR2532386 1 0.0000 0.981 1.000 0.000
#> SRR2532384 2 0.0000 1.000 0.000 1.000
#> SRR2532385 2 0.0000 1.000 0.000 1.000
#> SRR2532383 2 0.0000 1.000 0.000 1.000
#> SRR2532381 1 0.0000 0.981 1.000 0.000
#> SRR2532382 1 0.0000 0.981 1.000 0.000
#> SRR2532379 1 0.0000 0.981 1.000 0.000
#> SRR2532380 1 0.0000 0.981 1.000 0.000
#> SRR2532378 1 0.0000 0.981 1.000 0.000
#> SRR2532377 2 0.0000 1.000 0.000 1.000
#> SRR2532376 2 0.0000 1.000 0.000 1.000
#> SRR2532375 2 0.0000 1.000 0.000 1.000
#> SRR2532374 1 0.0000 0.981 1.000 0.000
#> SRR2532372 1 0.0000 0.981 1.000 0.000
#> SRR2532373 2 0.0000 1.000 0.000 1.000
#> SRR2532371 2 0.0000 1.000 0.000 1.000
#> SRR2532370 1 0.0000 0.981 1.000 0.000
#> SRR2532369 2 0.0000 1.000 0.000 1.000
#> SRR2532368 2 0.0000 1.000 0.000 1.000
#> SRR2532367 2 0.0000 1.000 0.000 1.000
#> SRR2532366 1 0.0000 0.981 1.000 0.000
#> SRR2532365 2 0.0000 1.000 0.000 1.000
#> SRR2532364 1 0.0000 0.981 1.000 0.000
#> SRR2532363 2 0.0000 1.000 0.000 1.000
#> SRR2532362 2 0.0000 1.000 0.000 1.000
#> SRR2532361 1 0.0000 0.981 1.000 0.000
#> SRR2532360 1 0.0000 0.981 1.000 0.000
#> SRR2532359 1 0.0000 0.981 1.000 0.000
#> SRR2532358 1 0.0000 0.981 1.000 0.000
#> SRR2532357 2 0.0000 1.000 0.000 1.000
#> SRR2532356 2 0.0000 1.000 0.000 1.000
#> SRR2532355 1 0.0000 0.981 1.000 0.000
#> SRR2532354 1 0.0000 0.981 1.000 0.000
#> SRR2532353 1 0.0000 0.981 1.000 0.000
#> SRR2532352 2 0.0000 1.000 0.000 1.000
#> SRR2532350 1 0.0000 0.981 1.000 0.000
#> SRR2532349 1 0.0000 0.981 1.000 0.000
#> SRR2532348 2 0.0000 1.000 0.000 1.000
#> SRR2532347 2 0.0000 1.000 0.000 1.000
#> SRR2532346 2 0.0000 1.000 0.000 1.000
#> SRR2532345 2 0.0000 1.000 0.000 1.000
#> SRR2532344 1 0.0376 0.977 0.996 0.004
#> SRR2532343 1 0.0000 0.981 1.000 0.000
#> SRR2532342 1 0.0000 0.981 1.000 0.000
#> SRR2532341 1 0.5842 0.836 0.860 0.140
#> SRR2532340 1 0.0000 0.981 1.000 0.000
#> SRR2532339 2 0.0000 1.000 0.000 1.000
#> SRR2532338 2 0.0000 1.000 0.000 1.000
#> SRR2532337 2 0.0000 1.000 0.000 1.000
#> SRR2532336 1 0.0000 0.981 1.000 0.000
#> SRR2532335 1 0.0000 0.981 1.000 0.000
#> SRR2532334 1 0.0000 0.981 1.000 0.000
#> SRR2532333 2 0.0000 1.000 0.000 1.000
#> SRR2532332 1 0.0000 0.981 1.000 0.000
#> SRR2532331 2 0.0000 1.000 0.000 1.000
#> SRR2532330 2 0.0000 1.000 0.000 1.000
#> SRR2532329 2 0.0000 1.000 0.000 1.000
#> SRR2532328 1 0.9710 0.354 0.600 0.400
#> SRR2532327 2 0.0000 1.000 0.000 1.000
#> SRR2532326 1 0.0000 0.981 1.000 0.000
#> SRR2532324 2 0.0000 1.000 0.000 1.000
#> SRR2532325 1 0.0000 0.981 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0237 0.9461 0.996 0.000 0.004
#> SRR2532322 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532321 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532319 3 0.3461 0.8520 0.024 0.076 0.900
#> SRR2532317 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532318 2 0.0237 0.9837 0.000 0.996 0.004
#> SRR2532315 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532316 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532396 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532391 1 0.0747 0.9392 0.984 0.000 0.016
#> SRR2532390 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532389 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532388 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532386 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532384 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532385 3 0.0237 0.9362 0.000 0.004 0.996
#> SRR2532383 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532381 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532382 1 0.0237 0.9461 0.996 0.000 0.004
#> SRR2532379 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532378 1 0.1163 0.9300 0.972 0.000 0.028
#> SRR2532377 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532376 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532375 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532374 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532372 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532373 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532370 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532369 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532368 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532366 1 0.0237 0.9461 0.996 0.000 0.004
#> SRR2532365 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532363 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532361 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532360 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532359 1 0.2796 0.8702 0.908 0.000 0.092
#> SRR2532358 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532357 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532355 1 0.5948 0.4109 0.640 0.000 0.360
#> SRR2532354 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532353 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532352 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532350 1 0.0237 0.9461 0.996 0.000 0.004
#> SRR2532349 3 0.6192 0.2739 0.420 0.000 0.580
#> SRR2532348 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532347 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532346 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532345 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532344 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532343 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532342 3 0.3482 0.8264 0.128 0.000 0.872
#> SRR2532341 2 0.7979 0.0166 0.060 0.500 0.440
#> SRR2532340 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532339 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532336 1 0.0237 0.9461 0.996 0.000 0.004
#> SRR2532335 1 0.4654 0.7172 0.792 0.000 0.208
#> SRR2532334 3 0.5431 0.6002 0.284 0.000 0.716
#> SRR2532333 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.9467 1.000 0.000 0.000
#> SRR2532331 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532330 2 0.0237 0.9838 0.000 0.996 0.004
#> SRR2532329 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532328 1 0.4504 0.6999 0.804 0.196 0.000
#> SRR2532327 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532326 3 0.0000 0.9401 0.000 0.000 1.000
#> SRR2532324 2 0.0000 0.9875 0.000 1.000 0.000
#> SRR2532325 1 0.0000 0.9467 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.1118 0.8970 0.964 0.000 0.000 0.036
#> SRR2532322 1 0.0000 0.8959 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0188 0.9375 0.000 0.996 0.004 0.000
#> SRR2532320 2 0.0336 0.9376 0.000 0.992 0.008 0.000
#> SRR2532319 3 0.1792 0.7496 0.000 0.000 0.932 0.068
#> SRR2532317 2 0.3764 0.6628 0.000 0.784 0.216 0.000
#> SRR2532318 3 0.1978 0.8116 0.000 0.068 0.928 0.004
#> SRR2532315 4 0.0817 0.8435 0.024 0.000 0.000 0.976
#> SRR2532316 4 0.0000 0.8559 0.000 0.000 0.000 1.000
#> SRR2532396 2 0.0336 0.9376 0.000 0.992 0.008 0.000
#> SRR2532395 3 0.4941 0.4457 0.000 0.436 0.564 0.000
#> SRR2532394 2 0.0469 0.9366 0.000 0.988 0.012 0.000
#> SRR2532393 3 0.2081 0.8139 0.000 0.084 0.916 0.000
#> SRR2532392 2 0.0469 0.9366 0.000 0.988 0.012 0.000
#> SRR2532391 1 0.3015 0.8600 0.884 0.000 0.092 0.024
#> SRR2532390 2 0.0592 0.9313 0.000 0.984 0.016 0.000
#> SRR2532389 1 0.0000 0.8959 1.000 0.000 0.000 0.000
#> SRR2532388 3 0.4500 0.6626 0.000 0.316 0.684 0.000
#> SRR2532387 2 0.0469 0.9366 0.000 0.988 0.012 0.000
#> SRR2532386 4 0.0188 0.8556 0.004 0.000 0.000 0.996
#> SRR2532384 3 0.2868 0.8058 0.000 0.136 0.864 0.000
#> SRR2532385 3 0.2149 0.7473 0.000 0.000 0.912 0.088
#> SRR2532383 2 0.3486 0.7208 0.000 0.812 0.188 0.000
#> SRR2532381 4 0.0188 0.8556 0.004 0.000 0.000 0.996
#> SRR2532382 1 0.1118 0.8970 0.964 0.000 0.000 0.036
#> SRR2532379 4 0.0000 0.8559 0.000 0.000 0.000 1.000
#> SRR2532380 1 0.1022 0.8974 0.968 0.000 0.000 0.032
#> SRR2532378 1 0.3074 0.7997 0.848 0.000 0.000 0.152
#> SRR2532377 3 0.4933 0.4417 0.000 0.432 0.568 0.000
#> SRR2532376 3 0.2101 0.8079 0.000 0.060 0.928 0.012
#> SRR2532375 2 0.4643 0.3493 0.000 0.656 0.344 0.000
#> SRR2532374 1 0.2198 0.8694 0.920 0.008 0.072 0.000
#> SRR2532372 3 0.2281 0.7410 0.000 0.000 0.904 0.096
#> SRR2532373 2 0.0469 0.9366 0.000 0.988 0.012 0.000
#> SRR2532371 2 0.0469 0.9366 0.000 0.988 0.012 0.000
#> SRR2532370 1 0.1022 0.8974 0.968 0.000 0.000 0.032
#> SRR2532369 3 0.4382 0.6893 0.000 0.296 0.704 0.000
#> SRR2532368 2 0.0336 0.9376 0.000 0.992 0.008 0.000
#> SRR2532367 2 0.0336 0.9376 0.000 0.992 0.008 0.000
#> SRR2532366 1 0.1118 0.8970 0.964 0.000 0.000 0.036
#> SRR2532365 2 0.0707 0.9325 0.000 0.980 0.020 0.000
#> SRR2532364 1 0.0000 0.8959 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.1151 0.9230 0.008 0.968 0.024 0.000
#> SRR2532362 2 0.0188 0.9375 0.000 0.996 0.004 0.000
#> SRR2532361 4 0.0000 0.8559 0.000 0.000 0.000 1.000
#> SRR2532360 4 0.0188 0.8556 0.004 0.000 0.000 0.996
#> SRR2532359 1 0.4972 0.0681 0.544 0.000 0.000 0.456
#> SRR2532358 4 0.0188 0.8545 0.000 0.000 0.004 0.996
#> SRR2532357 2 0.0921 0.9243 0.000 0.972 0.028 0.000
#> SRR2532356 2 0.0336 0.9347 0.000 0.992 0.008 0.000
#> SRR2532355 1 0.5312 0.5667 0.692 0.000 0.040 0.268
#> SRR2532354 1 0.1118 0.8970 0.964 0.000 0.000 0.036
#> SRR2532353 4 0.6968 0.2385 0.392 0.000 0.116 0.492
#> SRR2532352 2 0.0188 0.9375 0.000 0.996 0.004 0.000
#> SRR2532350 1 0.2011 0.8800 0.920 0.000 0.080 0.000
#> SRR2532349 1 0.5528 0.6690 0.732 0.000 0.124 0.144
#> SRR2532348 3 0.1716 0.8114 0.000 0.064 0.936 0.000
#> SRR2532347 3 0.4961 0.4143 0.000 0.448 0.552 0.000
#> SRR2532346 3 0.1489 0.7997 0.000 0.044 0.952 0.004
#> SRR2532345 3 0.3610 0.7774 0.000 0.200 0.800 0.000
#> SRR2532344 3 0.3074 0.6801 0.000 0.000 0.848 0.152
#> SRR2532343 4 0.3208 0.7613 0.004 0.000 0.148 0.848
#> SRR2532342 4 0.1940 0.8143 0.076 0.000 0.000 0.924
#> SRR2532341 3 0.2499 0.7488 0.032 0.012 0.924 0.032
#> SRR2532340 1 0.1637 0.8861 0.940 0.000 0.060 0.000
#> SRR2532339 2 0.0336 0.9348 0.000 0.992 0.008 0.000
#> SRR2532338 2 0.1211 0.9155 0.000 0.960 0.040 0.000
#> SRR2532337 2 0.0921 0.9269 0.000 0.972 0.028 0.000
#> SRR2532336 1 0.1118 0.8970 0.964 0.000 0.000 0.036
#> SRR2532335 1 0.4098 0.7716 0.784 0.012 0.204 0.000
#> SRR2532334 4 0.6387 0.1218 0.444 0.000 0.064 0.492
#> SRR2532333 3 0.2053 0.8123 0.000 0.072 0.924 0.004
#> SRR2532332 1 0.0000 0.8959 1.000 0.000 0.000 0.000
#> SRR2532331 3 0.4585 0.6401 0.000 0.332 0.668 0.000
#> SRR2532330 3 0.2530 0.8108 0.000 0.112 0.888 0.000
#> SRR2532329 2 0.1118 0.9183 0.000 0.964 0.036 0.000
#> SRR2532328 2 0.4820 0.7052 0.168 0.772 0.060 0.000
#> SRR2532327 2 0.0469 0.9331 0.000 0.988 0.012 0.000
#> SRR2532326 4 0.6978 0.5428 0.208 0.000 0.208 0.584
#> SRR2532324 2 0.2048 0.9035 0.008 0.928 0.064 0.000
#> SRR2532325 1 0.0817 0.8912 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
#> SRR2532323 1 0.0162 0.9405 0.996 0.000 0.000 0.004 0.000
#> SRR2532322 1 0.0000 0.9399 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0510 0.9114 0.000 0.984 0.000 0.000 0.016
#> SRR2532320 2 0.0510 0.9114 0.000 0.984 0.000 0.000 0.016
#> SRR2532319 3 0.2067 0.8471 0.000 0.000 0.920 0.048 0.032
#> SRR2532317 5 0.1341 0.8236 0.000 0.056 0.000 0.000 0.944
#> SRR2532318 5 0.3534 0.6246 0.000 0.000 0.256 0.000 0.744
#> SRR2532315 4 0.0000 0.9533 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.9533 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.0510 0.9114 0.000 0.984 0.000 0.000 0.016
#> SRR2532395 5 0.0794 0.8306 0.000 0.028 0.000 0.000 0.972
#> SRR2532394 5 0.4235 0.2843 0.000 0.424 0.000 0.000 0.576
#> SRR2532393 5 0.0566 0.8226 0.000 0.004 0.012 0.000 0.984
#> SRR2532392 2 0.0794 0.9035 0.000 0.972 0.000 0.000 0.028
#> SRR2532391 3 0.1043 0.8542 0.040 0.000 0.960 0.000 0.000
#> SRR2532390 2 0.0404 0.9123 0.000 0.988 0.000 0.000 0.012
#> SRR2532389 1 0.0867 0.9268 0.976 0.008 0.008 0.000 0.008
#> SRR2532388 5 0.0609 0.8303 0.000 0.020 0.000 0.000 0.980
#> SRR2532387 5 0.4300 0.1328 0.000 0.476 0.000 0.000 0.524
#> SRR2532386 4 0.0162 0.9520 0.000 0.000 0.004 0.996 0.000
#> SRR2532384 5 0.0579 0.8268 0.000 0.008 0.008 0.000 0.984
#> SRR2532385 3 0.4150 0.3266 0.000 0.000 0.612 0.000 0.388
#> SRR2532383 5 0.2773 0.7422 0.000 0.164 0.000 0.000 0.836
#> SRR2532381 4 0.0162 0.9520 0.000 0.000 0.004 0.996 0.000
#> SRR2532382 1 0.0290 0.9389 0.992 0.000 0.000 0.008 0.000
#> SRR2532379 4 0.0000 0.9533 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0162 0.9405 0.996 0.000 0.000 0.004 0.000
#> SRR2532378 1 0.0404 0.9366 0.988 0.000 0.000 0.012 0.000
#> SRR2532377 5 0.0794 0.8306 0.000 0.028 0.000 0.000 0.972
#> SRR2532376 5 0.3109 0.6872 0.000 0.000 0.200 0.000 0.800
#> SRR2532375 5 0.3884 0.5670 0.000 0.288 0.004 0.000 0.708
#> SRR2532374 1 0.4938 0.5127 0.652 0.028 0.308 0.000 0.012
#> SRR2532372 3 0.0290 0.8624 0.000 0.000 0.992 0.000 0.008
#> SRR2532373 2 0.4171 0.2326 0.000 0.604 0.000 0.000 0.396
#> SRR2532371 5 0.4304 0.0954 0.000 0.484 0.000 0.000 0.516
#> SRR2532370 1 0.0162 0.9405 0.996 0.000 0.000 0.004 0.000
#> SRR2532369 5 0.0693 0.8285 0.000 0.012 0.008 0.000 0.980
#> SRR2532368 2 0.0609 0.9098 0.000 0.980 0.000 0.000 0.020
#> SRR2532367 2 0.0794 0.9035 0.000 0.972 0.000 0.000 0.028
#> SRR2532366 1 0.0324 0.9389 0.992 0.000 0.004 0.004 0.000
#> SRR2532365 5 0.1270 0.8253 0.000 0.052 0.000 0.000 0.948
#> SRR2532364 1 0.0000 0.9399 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.9104 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0404 0.9123 0.000 0.988 0.000 0.000 0.012
#> SRR2532361 4 0.0000 0.9533 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.9533 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.4481 0.3034 0.576 0.000 0.008 0.416 0.000
#> SRR2532358 4 0.4088 0.5474 0.008 0.000 0.304 0.688 0.000
#> SRR2532357 2 0.0000 0.9104 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.9104 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.2659 0.8357 0.052 0.000 0.888 0.060 0.000
#> SRR2532354 1 0.0162 0.9405 0.996 0.000 0.000 0.004 0.000
#> SRR2532353 3 0.2270 0.8412 0.020 0.000 0.904 0.076 0.000
#> SRR2532352 2 0.0290 0.9120 0.000 0.992 0.000 0.000 0.008
#> SRR2532350 3 0.2516 0.7824 0.140 0.000 0.860 0.000 0.000
#> SRR2532349 3 0.0290 0.8624 0.000 0.000 0.992 0.000 0.008
#> SRR2532348 5 0.2690 0.7307 0.000 0.000 0.156 0.000 0.844
#> SRR2532347 5 0.0703 0.8307 0.000 0.024 0.000 0.000 0.976
#> SRR2532346 5 0.4182 0.3610 0.000 0.000 0.400 0.000 0.600
#> SRR2532345 5 0.0609 0.8306 0.000 0.020 0.000 0.000 0.980
#> SRR2532344 3 0.1741 0.8544 0.000 0.000 0.936 0.040 0.024
#> SRR2532343 3 0.3480 0.6539 0.000 0.000 0.752 0.248 0.000
#> SRR2532342 4 0.0880 0.9314 0.000 0.000 0.032 0.968 0.000
#> SRR2532341 3 0.0510 0.8605 0.000 0.000 0.984 0.000 0.016
#> SRR2532340 3 0.4306 -0.0321 0.492 0.000 0.508 0.000 0.000
#> SRR2532339 2 0.0404 0.9123 0.000 0.988 0.000 0.000 0.012
#> SRR2532338 2 0.0000 0.9104 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.1121 0.8276 0.000 0.044 0.000 0.000 0.956
#> SRR2532336 1 0.0162 0.9405 0.996 0.000 0.000 0.004 0.000
#> SRR2532335 3 0.0290 0.8620 0.008 0.000 0.992 0.000 0.000
#> SRR2532334 3 0.0566 0.8633 0.004 0.000 0.984 0.012 0.000
#> SRR2532333 5 0.3966 0.4626 0.000 0.000 0.336 0.000 0.664
#> SRR2532332 1 0.0000 0.9399 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.0693 0.8285 0.000 0.012 0.008 0.000 0.980
#> SRR2532330 5 0.0693 0.8285 0.000 0.012 0.008 0.000 0.980
#> SRR2532329 2 0.0000 0.9104 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 2 0.6122 0.2639 0.372 0.536 0.048 0.000 0.044
#> SRR2532327 2 0.0000 0.9104 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 3 0.1153 0.8620 0.004 0.000 0.964 0.024 0.008
#> SRR2532324 2 0.4553 0.2838 0.004 0.604 0.008 0.000 0.384
#> SRR2532325 1 0.0162 0.9385 0.996 0.000 0.000 0.000 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.9216 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532322 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0260 0.9516 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532320 2 0.0820 0.9403 0.000 0.972 0.000 0.000 0.012 0.016
#> SRR2532319 3 0.0405 0.7653 0.000 0.000 0.988 0.004 0.000 0.008
#> SRR2532317 5 0.0260 0.8470 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532318 5 0.4465 0.2655 0.000 0.000 0.460 0.000 0.512 0.028
#> SRR2532315 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.0146 0.9530 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532395 5 0.0260 0.8470 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532394 5 0.3851 0.1226 0.000 0.460 0.000 0.000 0.540 0.000
#> SRR2532393 5 0.0622 0.8461 0.000 0.000 0.012 0.000 0.980 0.008
#> SRR2532392 2 0.0458 0.9472 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532391 6 0.3853 0.4189 0.016 0.000 0.304 0.000 0.000 0.680
#> SRR2532390 2 0.0146 0.9530 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532389 1 0.4088 0.3460 0.556 0.004 0.004 0.000 0.000 0.436
#> SRR2532388 5 0.0603 0.8448 0.000 0.000 0.004 0.000 0.980 0.016
#> SRR2532387 2 0.3868 -0.0277 0.000 0.508 0.000 0.000 0.492 0.000
#> SRR2532386 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532384 5 0.0000 0.8468 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532385 3 0.3978 0.4447 0.000 0.000 0.700 0.000 0.268 0.032
#> SRR2532383 5 0.2121 0.8131 0.000 0.012 0.000 0.000 0.892 0.096
#> SRR2532381 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532382 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.0146 0.9216 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532377 5 0.0000 0.8468 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532376 5 0.4473 0.2087 0.000 0.000 0.480 0.000 0.492 0.028
#> SRR2532375 5 0.3274 0.7532 0.000 0.024 0.004 0.000 0.804 0.168
#> SRR2532374 6 0.1442 0.5377 0.040 0.004 0.012 0.000 0.000 0.944
#> SRR2532372 3 0.3756 0.1325 0.000 0.000 0.600 0.000 0.000 0.400
#> SRR2532373 5 0.5207 0.4801 0.000 0.132 0.000 0.000 0.592 0.276
#> SRR2532371 5 0.2907 0.7488 0.000 0.152 0.000 0.000 0.828 0.020
#> SRR2532370 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0632 0.8440 0.000 0.000 0.024 0.000 0.976 0.000
#> SRR2532368 2 0.1349 0.9012 0.000 0.940 0.000 0.000 0.056 0.004
#> SRR2532367 2 0.0363 0.9494 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR2532366 1 0.0692 0.9094 0.976 0.000 0.004 0.000 0.000 0.020
#> SRR2532365 5 0.0260 0.8470 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532364 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.9514 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0405 0.9516 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR2532361 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 0.9148 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.4452 0.2889 0.572 0.000 0.004 0.400 0.000 0.024
#> SRR2532358 4 0.4980 0.4736 0.000 0.000 0.168 0.648 0.000 0.184
#> SRR2532357 2 0.0146 0.9503 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532356 2 0.0146 0.9503 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532355 3 0.1194 0.7579 0.008 0.000 0.956 0.004 0.000 0.032
#> SRR2532354 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.1196 0.7659 0.000 0.000 0.952 0.008 0.000 0.040
#> SRR2532352 2 0.0146 0.9530 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532350 6 0.5178 0.1831 0.088 0.000 0.424 0.000 0.000 0.488
#> SRR2532349 6 0.3869 0.0402 0.000 0.000 0.500 0.000 0.000 0.500
#> SRR2532348 5 0.3213 0.7613 0.000 0.000 0.160 0.000 0.808 0.032
#> SRR2532347 5 0.0146 0.8472 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532346 5 0.3475 0.7598 0.000 0.000 0.140 0.000 0.800 0.060
#> SRR2532345 5 0.1257 0.8422 0.000 0.000 0.028 0.000 0.952 0.020
#> SRR2532344 3 0.0146 0.7658 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR2532343 3 0.2624 0.6804 0.000 0.000 0.856 0.124 0.000 0.020
#> SRR2532342 4 0.3619 0.6381 0.000 0.000 0.232 0.744 0.000 0.024
#> SRR2532341 6 0.1444 0.5362 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR2532340 6 0.4760 0.4021 0.328 0.000 0.068 0.000 0.000 0.604
#> SRR2532339 2 0.0146 0.9530 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532338 2 0.0146 0.9530 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532337 5 0.0363 0.8461 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR2532336 1 0.0000 0.9225 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532335 6 0.3797 0.2582 0.000 0.000 0.420 0.000 0.000 0.580
#> SRR2532334 3 0.3912 0.2936 0.000 0.000 0.648 0.012 0.000 0.340
#> SRR2532333 3 0.1967 0.7169 0.000 0.000 0.904 0.000 0.084 0.012
#> SRR2532332 1 0.0146 0.9216 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532331 5 0.2199 0.8185 0.000 0.000 0.020 0.000 0.892 0.088
#> SRR2532330 5 0.1757 0.8212 0.000 0.008 0.076 0.000 0.916 0.000
#> SRR2532329 2 0.0000 0.9514 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532328 6 0.2709 0.4926 0.020 0.088 0.008 0.000 0.008 0.876
#> SRR2532327 2 0.0146 0.9530 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532326 3 0.1141 0.7530 0.000 0.000 0.948 0.000 0.000 0.052
#> SRR2532324 6 0.5198 -0.0800 0.000 0.096 0.000 0.000 0.380 0.524
#> SRR2532325 1 0.1219 0.8920 0.948 0.000 0.004 0.000 0.000 0.048
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)
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 16752 rows and 81 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 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.557 0.809 0.910 0.4223 0.542 0.542
#> 3 3 0.670 0.727 0.852 0.2053 0.880 0.792
#> 4 4 0.749 0.760 0.877 0.1790 0.807 0.640
#> 5 5 0.917 0.887 0.941 0.0802 0.956 0.886
#> 6 6 0.727 0.780 0.831 0.0921 1.000 1.000
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
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
#> SRR2532323 1 0.2043 0.829 0.968 0.032
#> SRR2532322 1 0.0672 0.820 0.992 0.008
#> SRR2532321 2 0.0000 0.930 0.000 1.000
#> SRR2532320 2 0.0000 0.930 0.000 1.000
#> SRR2532319 2 0.2236 0.899 0.036 0.964
#> SRR2532317 2 0.0000 0.930 0.000 1.000
#> SRR2532318 2 0.0000 0.930 0.000 1.000
#> SRR2532315 1 0.7056 0.836 0.808 0.192
#> SRR2532316 1 0.7056 0.836 0.808 0.192
#> SRR2532396 2 0.0000 0.930 0.000 1.000
#> SRR2532395 2 0.0000 0.930 0.000 1.000
#> SRR2532394 2 0.0000 0.930 0.000 1.000
#> SRR2532393 2 0.0000 0.930 0.000 1.000
#> SRR2532392 2 0.0000 0.930 0.000 1.000
#> SRR2532391 2 0.9427 0.294 0.360 0.640
#> SRR2532390 2 0.0000 0.930 0.000 1.000
#> SRR2532389 2 0.1633 0.909 0.024 0.976
#> SRR2532388 2 0.0000 0.930 0.000 1.000
#> SRR2532387 2 0.0000 0.930 0.000 1.000
#> SRR2532386 1 0.7056 0.836 0.808 0.192
#> SRR2532384 2 0.0000 0.930 0.000 1.000
#> SRR2532385 2 0.3431 0.868 0.064 0.936
#> SRR2532383 2 0.0000 0.930 0.000 1.000
#> SRR2532381 1 0.7056 0.836 0.808 0.192
#> SRR2532382 1 0.0376 0.817 0.996 0.004
#> SRR2532379 1 0.7056 0.836 0.808 0.192
#> SRR2532380 1 0.0672 0.820 0.992 0.008
#> SRR2532378 1 0.2236 0.830 0.964 0.036
#> SRR2532377 2 0.0000 0.930 0.000 1.000
#> SRR2532376 2 0.0000 0.930 0.000 1.000
#> SRR2532375 2 0.0000 0.930 0.000 1.000
#> SRR2532374 2 0.9393 0.307 0.356 0.644
#> SRR2532372 1 1.0000 0.243 0.504 0.496
#> SRR2532373 2 0.0000 0.930 0.000 1.000
#> SRR2532371 2 0.0000 0.930 0.000 1.000
#> SRR2532370 1 0.1184 0.823 0.984 0.016
#> SRR2532369 2 0.0000 0.930 0.000 1.000
#> SRR2532368 2 0.0000 0.930 0.000 1.000
#> SRR2532367 2 0.0000 0.930 0.000 1.000
#> SRR2532366 1 0.4690 0.834 0.900 0.100
#> SRR2532365 2 0.0000 0.930 0.000 1.000
#> SRR2532364 1 0.0000 0.815 1.000 0.000
#> SRR2532363 2 0.0000 0.930 0.000 1.000
#> SRR2532362 2 0.0000 0.930 0.000 1.000
#> SRR2532361 1 0.7056 0.836 0.808 0.192
#> SRR2532360 1 0.7056 0.836 0.808 0.192
#> SRR2532359 1 0.7056 0.830 0.808 0.192
#> SRR2532358 2 0.9996 -0.199 0.488 0.512
#> SRR2532357 2 0.0000 0.930 0.000 1.000
#> SRR2532356 2 0.0000 0.930 0.000 1.000
#> SRR2532355 1 0.7528 0.816 0.784 0.216
#> SRR2532354 1 0.0000 0.815 1.000 0.000
#> SRR2532353 1 0.6048 0.846 0.852 0.148
#> SRR2532352 2 0.0000 0.930 0.000 1.000
#> SRR2532350 2 0.9427 0.294 0.360 0.640
#> SRR2532349 1 0.9988 0.295 0.520 0.480
#> SRR2532348 2 0.0000 0.930 0.000 1.000
#> SRR2532347 2 0.0000 0.930 0.000 1.000
#> SRR2532346 2 0.0000 0.930 0.000 1.000
#> SRR2532345 2 0.0000 0.930 0.000 1.000
#> SRR2532344 2 0.2236 0.899 0.036 0.964
#> SRR2532343 1 0.6623 0.842 0.828 0.172
#> SRR2532342 1 0.6048 0.846 0.852 0.148
#> SRR2532341 2 0.9393 0.307 0.356 0.644
#> SRR2532340 2 0.9393 0.307 0.356 0.644
#> SRR2532339 2 0.0000 0.930 0.000 1.000
#> SRR2532338 2 0.0000 0.930 0.000 1.000
#> SRR2532337 2 0.0000 0.930 0.000 1.000
#> SRR2532336 1 0.0000 0.815 1.000 0.000
#> SRR2532335 2 0.9393 0.307 0.356 0.644
#> SRR2532334 1 0.9977 0.320 0.528 0.472
#> SRR2532333 2 0.0000 0.930 0.000 1.000
#> SRR2532332 1 0.1843 0.828 0.972 0.028
#> SRR2532331 2 0.0000 0.930 0.000 1.000
#> SRR2532330 2 0.0000 0.930 0.000 1.000
#> SRR2532329 2 0.0000 0.930 0.000 1.000
#> SRR2532328 2 0.1633 0.909 0.024 0.976
#> SRR2532327 2 0.0000 0.930 0.000 1.000
#> SRR2532326 1 0.6048 0.846 0.852 0.148
#> SRR2532324 2 0.0000 0.930 0.000 1.000
#> SRR2532325 1 0.9661 0.522 0.608 0.392
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.1905 0.6603 0.956 0.028 0.016
#> SRR2532322 1 0.0237 0.6664 0.996 0.000 0.004
#> SRR2532321 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532319 2 0.3375 0.8054 0.008 0.892 0.100
#> SRR2532317 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532318 2 0.0237 0.8935 0.000 0.996 0.004
#> SRR2532315 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532316 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532396 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532391 2 0.8213 0.2531 0.344 0.568 0.088
#> SRR2532390 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532389 2 0.6275 0.5299 0.008 0.644 0.348
#> SRR2532388 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532386 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532384 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532385 2 0.3851 0.7721 0.004 0.860 0.136
#> SRR2532383 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532381 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532382 1 0.1129 0.6661 0.976 0.004 0.020
#> SRR2532379 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532380 1 0.0237 0.6664 0.996 0.000 0.004
#> SRR2532378 1 0.2050 0.6575 0.952 0.028 0.020
#> SRR2532377 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532376 2 0.0237 0.8935 0.000 0.996 0.004
#> SRR2532375 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532374 2 0.8194 0.2650 0.340 0.572 0.088
#> SRR2532372 2 0.9925 -0.2799 0.336 0.384 0.280
#> SRR2532373 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532370 1 0.1315 0.6647 0.972 0.008 0.020
#> SRR2532369 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532368 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532366 1 0.5454 0.5118 0.804 0.044 0.152
#> SRR2532365 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532364 1 0.0424 0.6632 0.992 0.000 0.008
#> SRR2532363 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532361 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532360 3 0.7962 0.9247 0.352 0.072 0.576
#> SRR2532359 1 0.7578 -0.4509 0.500 0.040 0.460
#> SRR2532358 1 0.9151 0.1484 0.436 0.420 0.144
#> SRR2532357 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532355 3 0.8425 0.8499 0.364 0.096 0.540
#> SRR2532354 1 0.0424 0.6632 0.992 0.000 0.008
#> SRR2532353 3 0.5859 0.8326 0.344 0.000 0.656
#> SRR2532352 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532350 2 0.8162 0.2502 0.348 0.568 0.084
#> SRR2532349 2 0.9917 -0.3029 0.352 0.376 0.272
#> SRR2532348 2 0.0237 0.8935 0.000 0.996 0.004
#> SRR2532347 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532346 2 0.0237 0.8935 0.000 0.996 0.004
#> SRR2532345 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532344 2 0.3375 0.8054 0.008 0.892 0.100
#> SRR2532343 3 0.7230 0.8909 0.344 0.040 0.616
#> SRR2532342 3 0.5859 0.8326 0.344 0.000 0.656
#> SRR2532341 2 0.8194 0.2650 0.340 0.572 0.088
#> SRR2532340 2 0.8194 0.2650 0.340 0.572 0.088
#> SRR2532339 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532336 1 0.0424 0.6632 0.992 0.000 0.008
#> SRR2532335 2 0.8194 0.2650 0.340 0.572 0.088
#> SRR2532334 1 0.9977 -0.0385 0.352 0.348 0.300
#> SRR2532333 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532332 1 0.1774 0.6623 0.960 0.024 0.016
#> SRR2532331 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532330 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532329 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532328 2 0.6275 0.5299 0.008 0.644 0.348
#> SRR2532327 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532326 3 0.5859 0.8326 0.344 0.000 0.656
#> SRR2532324 2 0.0000 0.8962 0.000 1.000 0.000
#> SRR2532325 1 0.7961 0.2467 0.588 0.336 0.076
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.2111 0.5898 0.932 0.000 0.044 0.024
#> SRR2532322 1 0.1151 0.5901 0.968 0.000 0.024 0.008
#> SRR2532321 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532320 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532319 2 0.3217 0.8129 0.000 0.860 0.128 0.012
#> SRR2532317 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532318 2 0.0524 0.9746 0.000 0.988 0.004 0.008
#> SRR2532315 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532316 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532396 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532395 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532394 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532393 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532392 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532391 1 0.9288 0.1614 0.332 0.252 0.084 0.332
#> SRR2532390 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532389 4 0.3581 1.0000 0.000 0.116 0.032 0.852
#> SRR2532388 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532387 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532386 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532384 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532385 2 0.3712 0.7684 0.004 0.832 0.152 0.012
#> SRR2532383 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532381 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532382 1 0.1305 0.5915 0.960 0.000 0.036 0.004
#> SRR2532379 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532380 1 0.1151 0.5901 0.968 0.000 0.024 0.008
#> SRR2532378 1 0.2300 0.5893 0.924 0.000 0.048 0.028
#> SRR2532377 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532376 2 0.0524 0.9746 0.000 0.988 0.004 0.008
#> SRR2532375 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532374 1 0.9247 0.1577 0.336 0.252 0.080 0.332
#> SRR2532372 3 0.9578 -0.0147 0.216 0.200 0.404 0.180
#> SRR2532373 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532371 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532370 1 0.1767 0.5917 0.944 0.000 0.044 0.012
#> SRR2532369 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532368 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532367 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532366 1 0.5293 0.4827 0.748 0.000 0.152 0.100
#> SRR2532365 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532364 1 0.1042 0.5852 0.972 0.000 0.020 0.008
#> SRR2532363 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532362 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532361 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532360 3 0.0779 0.7624 0.004 0.016 0.980 0.000
#> SRR2532359 3 0.7184 0.1616 0.364 0.000 0.492 0.144
#> SRR2532358 1 0.9181 0.1278 0.388 0.128 0.140 0.344
#> SRR2532357 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532356 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532355 3 0.2910 0.7234 0.020 0.044 0.908 0.028
#> SRR2532354 1 0.1042 0.5852 0.972 0.000 0.020 0.008
#> SRR2532353 3 0.2345 0.7046 0.000 0.000 0.900 0.100
#> SRR2532352 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532350 1 0.9326 0.1603 0.332 0.252 0.088 0.328
#> SRR2532349 3 0.9621 -0.0286 0.232 0.176 0.392 0.200
#> SRR2532348 2 0.0524 0.9746 0.000 0.988 0.004 0.008
#> SRR2532347 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532346 2 0.0524 0.9746 0.000 0.988 0.004 0.008
#> SRR2532345 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532344 2 0.3217 0.8129 0.000 0.860 0.128 0.012
#> SRR2532343 3 0.2060 0.7418 0.000 0.016 0.932 0.052
#> SRR2532342 3 0.2281 0.7049 0.000 0.000 0.904 0.096
#> SRR2532341 1 0.9247 0.1577 0.336 0.252 0.080 0.332
#> SRR2532340 1 0.9247 0.1577 0.336 0.252 0.080 0.332
#> SRR2532339 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532338 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532337 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532336 1 0.1042 0.5852 0.972 0.000 0.020 0.008
#> SRR2532335 1 0.9247 0.1577 0.336 0.252 0.080 0.332
#> SRR2532334 3 0.9450 0.0235 0.232 0.156 0.420 0.192
#> SRR2532333 2 0.0188 0.9819 0.000 0.996 0.000 0.004
#> SRR2532332 1 0.2089 0.5888 0.932 0.000 0.048 0.020
#> SRR2532331 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532330 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532329 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532328 4 0.3581 1.0000 0.000 0.116 0.032 0.852
#> SRR2532327 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532326 3 0.2345 0.7046 0.000 0.000 0.900 0.100
#> SRR2532324 2 0.0000 0.9857 0.000 1.000 0.000 0.000
#> SRR2532325 1 0.7978 0.3337 0.556 0.112 0.068 0.264
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.1596 0.896 0.948 0.000 0.012 0.012 0.028
#> SRR2532322 1 0.0162 0.900 0.996 0.000 0.004 0.000 0.000
#> SRR2532321 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 2 0.3504 0.804 0.000 0.840 0.064 0.092 0.004
#> SRR2532317 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532318 2 0.0510 0.972 0.000 0.984 0.016 0.000 0.000
#> SRR2532315 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532316 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532396 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532395 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532394 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532393 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532392 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532391 3 0.1187 0.786 0.004 0.024 0.964 0.004 0.004
#> SRR2532390 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 5 0.1399 1.000 0.000 0.028 0.020 0.000 0.952
#> SRR2532388 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532387 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532386 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532384 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532385 2 0.3924 0.758 0.000 0.808 0.068 0.120 0.004
#> SRR2532383 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532381 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532382 1 0.1095 0.901 0.968 0.000 0.012 0.012 0.008
#> SRR2532379 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532380 1 0.0162 0.900 0.996 0.000 0.004 0.000 0.000
#> SRR2532378 1 0.1806 0.894 0.940 0.000 0.016 0.016 0.028
#> SRR2532377 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532376 2 0.0510 0.972 0.000 0.984 0.016 0.000 0.000
#> SRR2532375 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532374 3 0.0703 0.787 0.000 0.024 0.976 0.000 0.000
#> SRR2532372 3 0.5487 0.488 0.004 0.060 0.604 0.328 0.004
#> SRR2532373 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532371 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532370 1 0.1179 0.900 0.964 0.000 0.016 0.016 0.004
#> SRR2532369 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532368 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532367 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532366 1 0.5042 0.706 0.756 0.000 0.088 0.108 0.048
#> SRR2532365 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532364 1 0.0566 0.894 0.984 0.000 0.004 0.000 0.012
#> SRR2532363 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532361 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532360 4 0.2011 0.892 0.004 0.000 0.088 0.908 0.000
#> SRR2532359 4 0.7060 0.084 0.364 0.000 0.100 0.468 0.068
#> SRR2532358 3 0.5634 0.513 0.152 0.000 0.704 0.092 0.052
#> SRR2532357 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 4 0.3301 0.845 0.020 0.024 0.080 0.868 0.008
#> SRR2532354 1 0.0566 0.894 0.984 0.000 0.004 0.000 0.012
#> SRR2532353 4 0.1485 0.830 0.000 0.000 0.020 0.948 0.032
#> SRR2532352 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.1314 0.786 0.004 0.024 0.960 0.008 0.004
#> SRR2532349 3 0.4651 0.552 0.004 0.016 0.660 0.316 0.004
#> SRR2532348 2 0.0510 0.972 0.000 0.984 0.016 0.000 0.000
#> SRR2532347 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532346 2 0.0510 0.972 0.000 0.984 0.016 0.000 0.000
#> SRR2532345 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532344 2 0.3504 0.804 0.000 0.840 0.064 0.092 0.004
#> SRR2532343 4 0.1740 0.874 0.000 0.000 0.056 0.932 0.012
#> SRR2532342 4 0.1399 0.831 0.000 0.000 0.020 0.952 0.028
#> SRR2532341 3 0.0703 0.787 0.000 0.024 0.976 0.000 0.000
#> SRR2532340 3 0.0703 0.787 0.000 0.024 0.976 0.000 0.000
#> SRR2532339 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532336 1 0.0693 0.894 0.980 0.000 0.008 0.000 0.012
#> SRR2532335 3 0.0703 0.787 0.000 0.024 0.976 0.000 0.000
#> SRR2532334 3 0.4570 0.503 0.004 0.008 0.640 0.344 0.004
#> SRR2532333 2 0.0162 0.982 0.000 0.996 0.000 0.000 0.004
#> SRR2532332 1 0.1518 0.897 0.952 0.000 0.012 0.016 0.020
#> SRR2532331 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532330 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532329 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 5 0.1399 1.000 0.000 0.028 0.020 0.000 0.952
#> SRR2532327 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 4 0.1485 0.830 0.000 0.000 0.020 0.948 0.032
#> SRR2532324 2 0.0000 0.985 0.000 1.000 0.000 0.000 0.000
#> SRR2532325 1 0.6112 0.174 0.488 0.004 0.416 0.008 0.084
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.1458 0.863 0.948 0.000 0.000 0.016 NA 0.016
#> SRR2532322 1 0.0692 0.866 0.976 0.000 0.004 0.000 NA 0.000
#> SRR2532321 2 0.2562 0.822 0.000 0.828 0.000 0.000 NA 0.000
#> SRR2532320 2 0.2340 0.835 0.000 0.852 0.000 0.000 NA 0.000
#> SRR2532319 2 0.5479 0.515 0.000 0.596 0.012 0.136 NA 0.000
#> SRR2532317 2 0.1556 0.831 0.000 0.920 0.000 0.000 NA 0.000
#> SRR2532318 2 0.3470 0.709 0.000 0.740 0.012 0.000 NA 0.000
#> SRR2532315 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532316 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532396 2 0.2300 0.839 0.000 0.856 0.000 0.000 NA 0.000
#> SRR2532395 2 0.0146 0.858 0.000 0.996 0.000 0.000 NA 0.000
#> SRR2532394 2 0.2260 0.841 0.000 0.860 0.000 0.000 NA 0.000
#> SRR2532393 2 0.2340 0.793 0.000 0.852 0.000 0.000 NA 0.000
#> SRR2532392 2 0.2340 0.836 0.000 0.852 0.000 0.000 NA 0.000
#> SRR2532391 3 0.1793 0.757 0.000 0.004 0.928 0.032 NA 0.000
#> SRR2532390 2 0.2491 0.829 0.000 0.836 0.000 0.000 NA 0.000
#> SRR2532389 6 0.0000 1.000 0.000 0.000 0.000 0.000 NA 1.000
#> SRR2532388 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532387 2 0.0458 0.858 0.000 0.984 0.000 0.000 NA 0.000
#> SRR2532386 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532384 2 0.2762 0.761 0.000 0.804 0.000 0.000 NA 0.000
#> SRR2532385 2 0.5786 0.478 0.000 0.572 0.020 0.160 NA 0.000
#> SRR2532383 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532381 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532382 1 0.0951 0.868 0.968 0.000 0.004 0.020 NA 0.000
#> SRR2532379 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532380 1 0.0692 0.866 0.976 0.000 0.004 0.000 NA 0.000
#> SRR2532378 1 0.1630 0.861 0.940 0.000 0.000 0.020 NA 0.016
#> SRR2532377 2 0.0458 0.859 0.000 0.984 0.000 0.000 NA 0.000
#> SRR2532376 2 0.3470 0.709 0.000 0.740 0.012 0.000 NA 0.000
#> SRR2532375 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532374 3 0.0777 0.761 0.000 0.004 0.972 0.024 NA 0.000
#> SRR2532372 3 0.5329 0.463 0.000 0.032 0.544 0.376 NA 0.000
#> SRR2532373 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532371 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532370 1 0.1138 0.866 0.960 0.000 0.000 0.024 NA 0.004
#> SRR2532369 2 0.3076 0.726 0.000 0.760 0.000 0.000 NA 0.000
#> SRR2532368 2 0.2378 0.834 0.000 0.848 0.000 0.000 NA 0.000
#> SRR2532367 2 0.2378 0.834 0.000 0.848 0.000 0.000 NA 0.000
#> SRR2532366 1 0.5371 0.566 0.640 0.000 0.008 0.116 NA 0.012
#> SRR2532365 2 0.1556 0.831 0.000 0.920 0.000 0.000 NA 0.000
#> SRR2532364 1 0.1765 0.849 0.924 0.000 0.024 0.000 NA 0.000
#> SRR2532363 2 0.2562 0.822 0.000 0.828 0.000 0.000 NA 0.000
#> SRR2532362 2 0.2491 0.826 0.000 0.836 0.000 0.000 NA 0.000
#> SRR2532361 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532360 4 0.0260 0.876 0.000 0.000 0.008 0.992 NA 0.000
#> SRR2532359 4 0.6530 0.145 0.244 0.000 0.008 0.392 NA 0.012
#> SRR2532358 3 0.6417 0.365 0.072 0.000 0.528 0.084 NA 0.012
#> SRR2532357 2 0.2491 0.826 0.000 0.836 0.000 0.000 NA 0.000
#> SRR2532356 2 0.2491 0.826 0.000 0.836 0.000 0.000 NA 0.000
#> SRR2532355 4 0.2700 0.828 0.020 0.020 0.012 0.888 NA 0.000
#> SRR2532354 1 0.1765 0.849 0.924 0.000 0.024 0.000 NA 0.000
#> SRR2532353 4 0.3023 0.773 0.000 0.000 0.000 0.768 NA 0.000
#> SRR2532352 2 0.2562 0.822 0.000 0.828 0.000 0.000 NA 0.000
#> SRR2532350 3 0.1867 0.757 0.000 0.004 0.924 0.036 NA 0.000
#> SRR2532349 3 0.4266 0.543 0.000 0.004 0.620 0.356 NA 0.000
#> SRR2532348 2 0.3470 0.709 0.000 0.740 0.012 0.000 NA 0.000
#> SRR2532347 2 0.0146 0.858 0.000 0.996 0.000 0.000 NA 0.000
#> SRR2532346 2 0.3470 0.709 0.000 0.740 0.012 0.000 NA 0.000
#> SRR2532345 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532344 2 0.5479 0.515 0.000 0.596 0.012 0.136 NA 0.000
#> SRR2532343 4 0.1663 0.849 0.000 0.000 0.000 0.912 NA 0.000
#> SRR2532342 4 0.2697 0.790 0.000 0.000 0.000 0.812 NA 0.000
#> SRR2532341 3 0.0777 0.761 0.000 0.004 0.972 0.024 NA 0.000
#> SRR2532340 3 0.0777 0.761 0.000 0.004 0.972 0.024 NA 0.000
#> SRR2532339 2 0.2562 0.822 0.000 0.828 0.000 0.000 NA 0.000
#> SRR2532338 2 0.2562 0.822 0.000 0.828 0.000 0.000 NA 0.000
#> SRR2532337 2 0.0146 0.858 0.000 0.996 0.000 0.000 NA 0.000
#> SRR2532336 1 0.1845 0.847 0.920 0.000 0.028 0.000 NA 0.000
#> SRR2532335 3 0.0777 0.761 0.000 0.004 0.972 0.024 NA 0.000
#> SRR2532334 3 0.4533 0.502 0.000 0.004 0.588 0.376 NA 0.000
#> SRR2532333 2 0.3126 0.720 0.000 0.752 0.000 0.000 NA 0.000
#> SRR2532332 1 0.1364 0.865 0.952 0.000 0.000 0.020 NA 0.016
#> SRR2532331 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532330 2 0.0146 0.858 0.000 0.996 0.000 0.000 NA 0.000
#> SRR2532329 2 0.2491 0.829 0.000 0.836 0.000 0.000 NA 0.000
#> SRR2532328 6 0.0000 1.000 0.000 0.000 0.000 0.000 NA 1.000
#> SRR2532327 2 0.1007 0.856 0.000 0.956 0.000 0.000 NA 0.000
#> SRR2532326 4 0.3023 0.773 0.000 0.000 0.000 0.768 NA 0.000
#> SRR2532324 2 0.0000 0.858 0.000 1.000 0.000 0.000 NA 0.000
#> SRR2532325 1 0.7257 0.113 0.368 0.000 0.268 0.024 NA 0.040
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 1.000 0.987 0.995 0.5040 0.496 0.496
#> 3 3 0.640 0.697 0.755 0.2272 0.904 0.806
#> 4 4 0.612 0.576 0.665 0.1296 0.780 0.498
#> 5 5 0.633 0.730 0.795 0.0859 0.886 0.613
#> 6 6 0.731 0.701 0.784 0.0449 0.959 0.821
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
#> SRR2532323 1 0.000 0.989 1.000 0.000
#> SRR2532322 1 0.000 0.989 1.000 0.000
#> SRR2532321 2 0.000 1.000 0.000 1.000
#> SRR2532320 2 0.000 1.000 0.000 1.000
#> SRR2532319 2 0.000 1.000 0.000 1.000
#> SRR2532317 2 0.000 1.000 0.000 1.000
#> SRR2532318 2 0.000 1.000 0.000 1.000
#> SRR2532315 1 0.000 0.989 1.000 0.000
#> SRR2532316 1 0.000 0.989 1.000 0.000
#> SRR2532396 2 0.000 1.000 0.000 1.000
#> SRR2532395 2 0.000 1.000 0.000 1.000
#> SRR2532394 2 0.000 1.000 0.000 1.000
#> SRR2532393 2 0.000 1.000 0.000 1.000
#> SRR2532392 2 0.000 1.000 0.000 1.000
#> SRR2532391 1 0.000 0.989 1.000 0.000
#> SRR2532390 2 0.000 1.000 0.000 1.000
#> SRR2532389 1 0.000 0.989 1.000 0.000
#> SRR2532388 2 0.000 1.000 0.000 1.000
#> SRR2532387 2 0.000 1.000 0.000 1.000
#> SRR2532386 1 0.000 0.989 1.000 0.000
#> SRR2532384 2 0.000 1.000 0.000 1.000
#> SRR2532385 2 0.000 1.000 0.000 1.000
#> SRR2532383 2 0.000 1.000 0.000 1.000
#> SRR2532381 1 0.000 0.989 1.000 0.000
#> SRR2532382 1 0.000 0.989 1.000 0.000
#> SRR2532379 1 0.000 0.989 1.000 0.000
#> SRR2532380 1 0.000 0.989 1.000 0.000
#> SRR2532378 1 0.000 0.989 1.000 0.000
#> SRR2532377 2 0.000 1.000 0.000 1.000
#> SRR2532376 2 0.000 1.000 0.000 1.000
#> SRR2532375 2 0.000 1.000 0.000 1.000
#> SRR2532374 1 0.000 0.989 1.000 0.000
#> SRR2532372 1 0.000 0.989 1.000 0.000
#> SRR2532373 2 0.000 1.000 0.000 1.000
#> SRR2532371 2 0.000 1.000 0.000 1.000
#> SRR2532370 1 0.000 0.989 1.000 0.000
#> SRR2532369 2 0.000 1.000 0.000 1.000
#> SRR2532368 2 0.000 1.000 0.000 1.000
#> SRR2532367 2 0.000 1.000 0.000 1.000
#> SRR2532366 1 0.000 0.989 1.000 0.000
#> SRR2532365 2 0.000 1.000 0.000 1.000
#> SRR2532364 1 0.000 0.989 1.000 0.000
#> SRR2532363 2 0.000 1.000 0.000 1.000
#> SRR2532362 2 0.000 1.000 0.000 1.000
#> SRR2532361 1 0.000 0.989 1.000 0.000
#> SRR2532360 1 0.000 0.989 1.000 0.000
#> SRR2532359 1 0.000 0.989 1.000 0.000
#> SRR2532358 1 0.000 0.989 1.000 0.000
#> SRR2532357 2 0.000 1.000 0.000 1.000
#> SRR2532356 2 0.000 1.000 0.000 1.000
#> SRR2532355 1 0.000 0.989 1.000 0.000
#> SRR2532354 1 0.000 0.989 1.000 0.000
#> SRR2532353 1 0.000 0.989 1.000 0.000
#> SRR2532352 2 0.000 1.000 0.000 1.000
#> SRR2532350 1 0.000 0.989 1.000 0.000
#> SRR2532349 1 0.000 0.989 1.000 0.000
#> SRR2532348 2 0.000 1.000 0.000 1.000
#> SRR2532347 2 0.000 1.000 0.000 1.000
#> SRR2532346 2 0.000 1.000 0.000 1.000
#> SRR2532345 2 0.000 1.000 0.000 1.000
#> SRR2532344 1 0.295 0.938 0.948 0.052
#> SRR2532343 1 0.000 0.989 1.000 0.000
#> SRR2532342 1 0.000 0.989 1.000 0.000
#> SRR2532341 1 0.000 0.989 1.000 0.000
#> SRR2532340 1 0.000 0.989 1.000 0.000
#> SRR2532339 2 0.000 1.000 0.000 1.000
#> SRR2532338 2 0.000 1.000 0.000 1.000
#> SRR2532337 2 0.000 1.000 0.000 1.000
#> SRR2532336 1 0.000 0.989 1.000 0.000
#> SRR2532335 1 0.000 0.989 1.000 0.000
#> SRR2532334 1 0.000 0.989 1.000 0.000
#> SRR2532333 2 0.000 1.000 0.000 1.000
#> SRR2532332 1 0.000 0.989 1.000 0.000
#> SRR2532331 2 0.000 1.000 0.000 1.000
#> SRR2532330 2 0.000 1.000 0.000 1.000
#> SRR2532329 2 0.000 1.000 0.000 1.000
#> SRR2532328 1 0.943 0.441 0.640 0.360
#> SRR2532327 2 0.000 1.000 0.000 1.000
#> SRR2532326 1 0.000 0.989 1.000 0.000
#> SRR2532324 2 0.000 1.000 0.000 1.000
#> SRR2532325 1 0.000 0.989 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532322 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532321 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532320 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532319 2 0.7966 0.584757 0.128 0.652 0.220
#> SRR2532317 2 0.1031 0.884083 0.024 0.976 0.000
#> SRR2532318 2 0.3482 0.848327 0.128 0.872 0.000
#> SRR2532315 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532316 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532396 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532395 2 0.1964 0.876316 0.056 0.944 0.000
#> SRR2532394 2 0.0747 0.883629 0.016 0.984 0.000
#> SRR2532393 2 0.3038 0.860224 0.104 0.896 0.000
#> SRR2532392 2 0.4399 0.856472 0.188 0.812 0.000
#> SRR2532391 3 0.5497 0.230699 0.292 0.000 0.708
#> SRR2532390 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532389 3 0.6307 -0.556196 0.488 0.000 0.512
#> SRR2532388 2 0.1964 0.876316 0.056 0.944 0.000
#> SRR2532387 2 0.2878 0.874737 0.096 0.904 0.000
#> SRR2532386 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532384 2 0.2959 0.861865 0.100 0.900 0.000
#> SRR2532385 2 0.8773 0.342276 0.128 0.536 0.336
#> SRR2532383 2 0.0237 0.883539 0.004 0.996 0.000
#> SRR2532381 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532382 1 0.6291 0.937409 0.532 0.000 0.468
#> SRR2532379 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532380 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532378 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532377 2 0.1753 0.877961 0.048 0.952 0.000
#> SRR2532376 2 0.3482 0.848327 0.128 0.872 0.000
#> SRR2532375 2 0.1964 0.876316 0.056 0.944 0.000
#> SRR2532374 3 0.5529 0.218705 0.296 0.000 0.704
#> SRR2532372 3 0.3784 0.491927 0.132 0.004 0.864
#> SRR2532373 2 0.0747 0.883629 0.016 0.984 0.000
#> SRR2532371 2 0.0424 0.883977 0.008 0.992 0.000
#> SRR2532370 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532369 2 0.3038 0.861329 0.104 0.896 0.000
#> SRR2532368 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532367 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532366 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532365 2 0.0592 0.883881 0.012 0.988 0.000
#> SRR2532364 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532363 2 0.4399 0.856472 0.188 0.812 0.000
#> SRR2532362 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532361 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532360 3 0.4555 0.485247 0.200 0.000 0.800
#> SRR2532359 3 0.5591 -0.255757 0.304 0.000 0.696
#> SRR2532358 3 0.3879 0.430946 0.152 0.000 0.848
#> SRR2532357 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532356 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532355 3 0.0747 0.527397 0.016 0.000 0.984
#> SRR2532354 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532353 3 0.0592 0.525818 0.012 0.000 0.988
#> SRR2532352 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532350 3 0.5327 0.203088 0.272 0.000 0.728
#> SRR2532349 3 0.5178 0.312755 0.256 0.000 0.744
#> SRR2532348 2 0.3482 0.848327 0.128 0.872 0.000
#> SRR2532347 2 0.1860 0.877185 0.052 0.948 0.000
#> SRR2532346 2 0.3482 0.848327 0.128 0.872 0.000
#> SRR2532345 2 0.2261 0.873057 0.068 0.932 0.000
#> SRR2532344 3 0.8821 0.262003 0.188 0.232 0.580
#> SRR2532343 3 0.2066 0.534398 0.060 0.000 0.940
#> SRR2532342 3 0.4452 0.482950 0.192 0.000 0.808
#> SRR2532341 3 0.5529 0.268444 0.296 0.000 0.704
#> SRR2532340 3 0.5529 0.218705 0.296 0.000 0.704
#> SRR2532339 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532338 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532337 2 0.0237 0.883539 0.004 0.996 0.000
#> SRR2532336 1 0.6267 0.911290 0.548 0.000 0.452
#> SRR2532335 3 0.5431 0.264905 0.284 0.000 0.716
#> SRR2532334 3 0.1031 0.531442 0.024 0.000 0.976
#> SRR2532333 2 0.3551 0.847014 0.132 0.868 0.000
#> SRR2532332 1 0.6305 0.972170 0.516 0.000 0.484
#> SRR2532331 2 0.1964 0.876316 0.056 0.944 0.000
#> SRR2532330 2 0.2959 0.861865 0.100 0.900 0.000
#> SRR2532329 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532328 3 0.9847 -0.000948 0.340 0.256 0.404
#> SRR2532327 2 0.4346 0.857968 0.184 0.816 0.000
#> SRR2532326 3 0.0000 0.531166 0.000 0.000 1.000
#> SRR2532324 2 0.0747 0.883629 0.016 0.984 0.000
#> SRR2532325 1 0.6252 0.821295 0.556 0.000 0.444
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532322 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532321 4 0.4981 0.866 0.000 0.464 0.000 0.536
#> SRR2532320 2 0.4989 -0.762 0.000 0.528 0.000 0.472
#> SRR2532319 2 0.6002 0.573 0.032 0.736 0.096 0.136
#> SRR2532317 2 0.2149 0.720 0.000 0.912 0.000 0.088
#> SRR2532318 2 0.3082 0.762 0.032 0.884 0.000 0.084
#> SRR2532315 3 0.0000 0.649 0.000 0.000 1.000 0.000
#> SRR2532316 3 0.0000 0.649 0.000 0.000 1.000 0.000
#> SRR2532396 4 0.4994 0.855 0.000 0.480 0.000 0.520
#> SRR2532395 2 0.0188 0.788 0.000 0.996 0.000 0.004
#> SRR2532394 2 0.2973 0.614 0.000 0.856 0.000 0.144
#> SRR2532393 2 0.1940 0.779 0.000 0.924 0.000 0.076
#> SRR2532392 4 0.4981 0.866 0.000 0.464 0.000 0.536
#> SRR2532391 1 0.7665 0.168 0.456 0.000 0.240 0.304
#> SRR2532390 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532389 1 0.6618 0.296 0.604 0.000 0.124 0.272
#> SRR2532388 2 0.0000 0.789 0.000 1.000 0.000 0.000
#> SRR2532387 2 0.4522 -0.188 0.000 0.680 0.000 0.320
#> SRR2532386 3 0.0188 0.649 0.000 0.000 0.996 0.004
#> SRR2532384 2 0.1940 0.779 0.000 0.924 0.000 0.076
#> SRR2532385 2 0.6537 0.473 0.032 0.672 0.076 0.220
#> SRR2532383 2 0.1867 0.734 0.000 0.928 0.000 0.072
#> SRR2532381 3 0.0188 0.649 0.000 0.000 0.996 0.004
#> SRR2532382 1 0.4543 0.534 0.676 0.000 0.324 0.000
#> SRR2532379 3 0.0000 0.649 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532378 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532377 2 0.0188 0.788 0.000 0.996 0.000 0.004
#> SRR2532376 2 0.3082 0.762 0.032 0.884 0.000 0.084
#> SRR2532375 2 0.0000 0.789 0.000 1.000 0.000 0.000
#> SRR2532374 1 0.7618 0.177 0.464 0.000 0.228 0.308
#> SRR2532372 4 0.8799 -0.611 0.292 0.040 0.316 0.352
#> SRR2532373 2 0.2589 0.670 0.000 0.884 0.000 0.116
#> SRR2532371 2 0.1940 0.731 0.000 0.924 0.000 0.076
#> SRR2532370 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532369 2 0.1940 0.779 0.000 0.924 0.000 0.076
#> SRR2532368 4 0.4994 0.855 0.000 0.480 0.000 0.520
#> SRR2532367 4 0.4994 0.855 0.000 0.480 0.000 0.520
#> SRR2532366 1 0.4792 0.542 0.680 0.000 0.312 0.008
#> SRR2532365 2 0.2647 0.670 0.000 0.880 0.000 0.120
#> SRR2532364 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532363 4 0.4981 0.866 0.000 0.464 0.000 0.536
#> SRR2532362 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532361 3 0.0000 0.649 0.000 0.000 1.000 0.000
#> SRR2532360 3 0.0000 0.649 0.000 0.000 1.000 0.000
#> SRR2532359 3 0.5697 0.256 0.280 0.000 0.664 0.056
#> SRR2532358 3 0.7913 0.107 0.320 0.000 0.360 0.320
#> SRR2532357 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532356 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532355 3 0.7114 0.495 0.192 0.004 0.584 0.220
#> SRR2532354 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532353 3 0.7148 0.481 0.220 0.000 0.560 0.220
#> SRR2532352 4 0.4981 0.866 0.000 0.464 0.000 0.536
#> SRR2532350 1 0.7649 0.169 0.456 0.000 0.232 0.312
#> SRR2532349 1 0.7733 0.132 0.440 0.000 0.256 0.304
#> SRR2532348 2 0.3149 0.760 0.032 0.880 0.000 0.088
#> SRR2532347 2 0.0188 0.788 0.000 0.996 0.000 0.004
#> SRR2532346 2 0.3082 0.762 0.032 0.884 0.000 0.084
#> SRR2532345 2 0.0707 0.789 0.000 0.980 0.000 0.020
#> SRR2532344 3 0.8738 0.243 0.040 0.320 0.380 0.260
#> SRR2532343 3 0.6739 0.527 0.172 0.000 0.612 0.216
#> SRR2532342 3 0.3099 0.619 0.020 0.000 0.876 0.104
#> SRR2532341 1 0.7588 0.163 0.468 0.000 0.220 0.312
#> SRR2532340 1 0.7665 0.168 0.456 0.000 0.240 0.304
#> SRR2532339 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532338 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532337 2 0.1867 0.734 0.000 0.928 0.000 0.072
#> SRR2532336 1 0.4103 0.533 0.744 0.000 0.256 0.000
#> SRR2532335 1 0.7597 0.160 0.468 0.000 0.224 0.308
#> SRR2532334 3 0.7098 0.445 0.244 0.000 0.564 0.192
#> SRR2532333 2 0.3082 0.762 0.032 0.884 0.000 0.084
#> SRR2532332 1 0.4477 0.547 0.688 0.000 0.312 0.000
#> SRR2532331 2 0.0000 0.789 0.000 1.000 0.000 0.000
#> SRR2532330 2 0.2125 0.778 0.004 0.920 0.000 0.076
#> SRR2532329 4 0.4985 0.868 0.000 0.468 0.000 0.532
#> SRR2532328 1 0.9194 0.104 0.424 0.212 0.100 0.264
#> SRR2532327 4 0.4994 0.855 0.000 0.480 0.000 0.520
#> SRR2532326 3 0.7148 0.481 0.220 0.000 0.560 0.220
#> SRR2532324 2 0.2647 0.669 0.000 0.880 0.000 0.120
#> SRR2532325 1 0.5848 0.488 0.684 0.000 0.228 0.088
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0290 0.9403 0.000 0.992 0.008 0.000 0.000
#> SRR2532320 2 0.2488 0.8064 0.000 0.872 0.000 0.004 0.124
#> SRR2532319 5 0.5711 0.6739 0.000 0.104 0.072 0.116 0.708
#> SRR2532317 5 0.4835 0.6795 0.000 0.380 0.000 0.028 0.592
#> SRR2532318 5 0.5854 0.7390 0.000 0.168 0.060 0.088 0.684
#> SRR2532315 4 0.3691 0.8652 0.104 0.000 0.076 0.820 0.000
#> SRR2532316 4 0.3691 0.8652 0.104 0.000 0.076 0.820 0.000
#> SRR2532396 2 0.1043 0.9192 0.000 0.960 0.000 0.000 0.040
#> SRR2532395 5 0.3561 0.8006 0.000 0.260 0.000 0.000 0.740
#> SRR2532394 5 0.4383 0.6188 0.000 0.424 0.000 0.004 0.572
#> SRR2532393 5 0.2929 0.7979 0.000 0.180 0.000 0.000 0.820
#> SRR2532392 2 0.0613 0.9387 0.000 0.984 0.008 0.004 0.004
#> SRR2532391 3 0.3937 0.6419 0.132 0.000 0.804 0.060 0.004
#> SRR2532390 2 0.0000 0.9408 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 3 0.6784 0.3753 0.268 0.000 0.556 0.052 0.124
#> SRR2532388 5 0.3508 0.8030 0.000 0.252 0.000 0.000 0.748
#> SRR2532387 2 0.4288 0.0204 0.000 0.612 0.000 0.004 0.384
#> SRR2532386 4 0.4295 0.8572 0.104 0.000 0.084 0.796 0.016
#> SRR2532384 5 0.3074 0.8015 0.000 0.196 0.000 0.000 0.804
#> SRR2532385 5 0.5831 0.6574 0.000 0.088 0.096 0.116 0.700
#> SRR2532383 5 0.3932 0.7541 0.000 0.328 0.000 0.000 0.672
#> SRR2532381 4 0.4295 0.8572 0.104 0.000 0.084 0.796 0.016
#> SRR2532382 1 0.0324 0.9636 0.992 0.000 0.004 0.004 0.000
#> SRR2532379 4 0.3691 0.8652 0.104 0.000 0.076 0.820 0.000
#> SRR2532380 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.0290 0.9658 0.992 0.000 0.000 0.000 0.008
#> SRR2532377 5 0.3561 0.8006 0.000 0.260 0.000 0.000 0.740
#> SRR2532376 5 0.5854 0.7390 0.000 0.168 0.060 0.088 0.684
#> SRR2532375 5 0.3480 0.8039 0.000 0.248 0.000 0.000 0.752
#> SRR2532374 3 0.3981 0.6412 0.136 0.000 0.800 0.060 0.004
#> SRR2532372 3 0.4103 0.5647 0.008 0.000 0.796 0.136 0.060
#> SRR2532373 5 0.4264 0.6940 0.000 0.376 0.000 0.004 0.620
#> SRR2532371 5 0.3913 0.7579 0.000 0.324 0.000 0.000 0.676
#> SRR2532370 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.4235 0.7917 0.000 0.184 0.008 0.040 0.768
#> SRR2532368 2 0.1124 0.9209 0.000 0.960 0.000 0.004 0.036
#> SRR2532367 2 0.0865 0.9293 0.000 0.972 0.000 0.004 0.024
#> SRR2532366 1 0.0912 0.9487 0.972 0.000 0.016 0.000 0.012
#> SRR2532365 5 0.4940 0.6563 0.000 0.392 0.000 0.032 0.576
#> SRR2532364 1 0.0290 0.9649 0.992 0.000 0.008 0.000 0.000
#> SRR2532363 2 0.0290 0.9403 0.000 0.992 0.008 0.000 0.000
#> SRR2532362 2 0.0000 0.9408 0.000 1.000 0.000 0.000 0.000
#> SRR2532361 4 0.3691 0.8652 0.104 0.000 0.076 0.820 0.000
#> SRR2532360 4 0.3691 0.8652 0.104 0.000 0.076 0.820 0.000
#> SRR2532359 4 0.7923 0.2490 0.332 0.000 0.220 0.364 0.084
#> SRR2532358 3 0.5525 0.5306 0.060 0.000 0.720 0.124 0.096
#> SRR2532357 2 0.0000 0.9408 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.9408 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.7500 0.0696 0.076 0.000 0.420 0.360 0.144
#> SRR2532354 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.7221 0.1321 0.072 0.000 0.448 0.368 0.112
#> SRR2532352 2 0.0290 0.9403 0.000 0.992 0.008 0.000 0.000
#> SRR2532350 3 0.3304 0.6403 0.128 0.000 0.840 0.028 0.004
#> SRR2532349 3 0.4350 0.6436 0.120 0.000 0.792 0.068 0.020
#> SRR2532348 5 0.6001 0.7351 0.000 0.168 0.060 0.100 0.672
#> SRR2532347 5 0.3561 0.8006 0.000 0.260 0.000 0.000 0.740
#> SRR2532346 5 0.5854 0.7390 0.000 0.168 0.060 0.088 0.684
#> SRR2532345 5 0.3336 0.8047 0.000 0.228 0.000 0.000 0.772
#> SRR2532344 5 0.6849 -0.1666 0.000 0.016 0.180 0.356 0.448
#> SRR2532343 3 0.6938 0.0763 0.048 0.000 0.456 0.384 0.112
#> SRR2532342 4 0.7058 0.4603 0.088 0.000 0.244 0.552 0.116
#> SRR2532341 3 0.3715 0.6430 0.108 0.000 0.824 0.064 0.004
#> SRR2532340 3 0.3981 0.6412 0.136 0.000 0.800 0.060 0.004
#> SRR2532339 2 0.0290 0.9403 0.000 0.992 0.008 0.000 0.000
#> SRR2532338 2 0.0290 0.9403 0.000 0.992 0.008 0.000 0.000
#> SRR2532337 5 0.3932 0.7541 0.000 0.328 0.000 0.000 0.672
#> SRR2532336 1 0.0794 0.9453 0.972 0.000 0.028 0.000 0.000
#> SRR2532335 3 0.3715 0.6430 0.108 0.000 0.824 0.064 0.004
#> SRR2532334 3 0.6860 0.2309 0.064 0.000 0.480 0.372 0.084
#> SRR2532333 5 0.6215 0.7269 0.000 0.172 0.060 0.116 0.652
#> SRR2532332 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.3480 0.8039 0.000 0.248 0.000 0.000 0.752
#> SRR2532330 5 0.4037 0.7936 0.000 0.188 0.008 0.028 0.776
#> SRR2532329 2 0.0000 0.9408 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 3 0.8251 0.3407 0.092 0.112 0.504 0.068 0.224
#> SRR2532327 2 0.1043 0.9192 0.000 0.960 0.000 0.000 0.040
#> SRR2532326 3 0.7221 0.1321 0.072 0.000 0.448 0.368 0.112
#> SRR2532324 5 0.4114 0.6972 0.000 0.376 0.000 0.000 0.624
#> SRR2532325 1 0.3639 0.7230 0.792 0.000 0.184 0.000 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.96397 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532322 1 0.0405 0.96355 0.988 0.008 0.004 0.000 0.000 0.000
#> SRR2532321 2 0.1987 0.92206 0.000 0.908 0.004 0.004 0.080 0.004
#> SRR2532320 2 0.4223 0.59871 0.000 0.632 0.008 0.008 0.348 0.004
#> SRR2532319 5 0.4364 0.49365 0.000 0.004 0.024 0.000 0.608 0.364
#> SRR2532317 5 0.4702 0.67979 0.000 0.132 0.004 0.008 0.716 0.140
#> SRR2532318 5 0.3952 0.57774 0.000 0.000 0.020 0.000 0.672 0.308
#> SRR2532315 4 0.1327 0.89328 0.064 0.000 0.000 0.936 0.000 0.000
#> SRR2532316 4 0.1327 0.89328 0.064 0.000 0.000 0.936 0.000 0.000
#> SRR2532396 2 0.3383 0.84369 0.000 0.776 0.004 0.008 0.208 0.004
#> SRR2532395 5 0.1663 0.77819 0.000 0.088 0.000 0.000 0.912 0.000
#> SRR2532394 5 0.4219 0.61877 0.000 0.232 0.008 0.004 0.720 0.036
#> SRR2532393 5 0.0146 0.76612 0.000 0.000 0.000 0.000 0.996 0.004
#> SRR2532392 2 0.2099 0.92083 0.000 0.904 0.008 0.004 0.080 0.004
#> SRR2532391 3 0.2876 0.68195 0.080 0.000 0.860 0.056 0.000 0.004
#> SRR2532390 2 0.1556 0.92279 0.000 0.920 0.000 0.000 0.080 0.000
#> SRR2532389 3 0.7234 0.17523 0.120 0.064 0.436 0.044 0.000 0.336
#> SRR2532388 5 0.1610 0.77906 0.000 0.084 0.000 0.000 0.916 0.000
#> SRR2532387 5 0.4022 0.32983 0.000 0.360 0.008 0.004 0.628 0.000
#> SRR2532386 4 0.1923 0.88000 0.064 0.000 0.004 0.916 0.000 0.016
#> SRR2532384 5 0.0458 0.77137 0.000 0.016 0.000 0.000 0.984 0.000
#> SRR2532385 5 0.4452 0.53647 0.000 0.004 0.028 0.004 0.636 0.328
#> SRR2532383 5 0.2191 0.76194 0.000 0.120 0.004 0.000 0.876 0.000
#> SRR2532381 4 0.1923 0.88000 0.064 0.000 0.004 0.916 0.000 0.016
#> SRR2532382 1 0.0291 0.96431 0.992 0.004 0.000 0.000 0.000 0.004
#> SRR2532379 4 0.1327 0.89328 0.064 0.000 0.000 0.936 0.000 0.000
#> SRR2532380 1 0.0405 0.96355 0.988 0.008 0.004 0.000 0.000 0.000
#> SRR2532378 1 0.0146 0.96397 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532377 5 0.1663 0.77819 0.000 0.088 0.000 0.000 0.912 0.000
#> SRR2532376 5 0.3952 0.57774 0.000 0.000 0.020 0.000 0.672 0.308
#> SRR2532375 5 0.1700 0.77964 0.000 0.080 0.004 0.000 0.916 0.000
#> SRR2532374 3 0.2733 0.68296 0.080 0.000 0.864 0.056 0.000 0.000
#> SRR2532372 3 0.4487 0.50249 0.004 0.004 0.732 0.056 0.012 0.192
#> SRR2532373 5 0.2520 0.73598 0.000 0.152 0.004 0.000 0.844 0.000
#> SRR2532371 5 0.2278 0.75627 0.000 0.128 0.004 0.000 0.868 0.000
#> SRR2532370 1 0.0146 0.96397 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532369 5 0.2948 0.70258 0.000 0.000 0.000 0.008 0.804 0.188
#> SRR2532368 2 0.3521 0.83546 0.000 0.768 0.008 0.008 0.212 0.004
#> SRR2532367 2 0.3197 0.86411 0.000 0.800 0.004 0.008 0.184 0.004
#> SRR2532366 1 0.0909 0.94623 0.968 0.000 0.012 0.000 0.000 0.020
#> SRR2532365 5 0.4847 0.66325 0.000 0.148 0.004 0.008 0.700 0.140
#> SRR2532364 1 0.0622 0.96175 0.980 0.012 0.008 0.000 0.000 0.000
#> SRR2532363 2 0.1987 0.92206 0.000 0.908 0.004 0.004 0.080 0.004
#> SRR2532362 2 0.2368 0.91980 0.000 0.888 0.004 0.008 0.092 0.008
#> SRR2532361 4 0.1327 0.89328 0.064 0.000 0.000 0.936 0.000 0.000
#> SRR2532360 4 0.1327 0.89328 0.064 0.000 0.000 0.936 0.000 0.000
#> SRR2532359 6 0.6856 0.18319 0.288 0.000 0.044 0.328 0.000 0.340
#> SRR2532358 3 0.6574 -0.22602 0.052 0.000 0.452 0.168 0.000 0.328
#> SRR2532357 2 0.2368 0.91980 0.000 0.888 0.004 0.008 0.092 0.008
#> SRR2532356 2 0.2418 0.91873 0.000 0.884 0.004 0.008 0.096 0.008
#> SRR2532355 6 0.7244 0.49507 0.052 0.004 0.240 0.260 0.016 0.428
#> SRR2532354 1 0.0551 0.96293 0.984 0.008 0.004 0.000 0.000 0.004
#> SRR2532353 6 0.7044 0.54521 0.064 0.000 0.284 0.300 0.000 0.352
#> SRR2532352 2 0.1987 0.92206 0.000 0.908 0.004 0.004 0.080 0.004
#> SRR2532350 3 0.3528 0.66524 0.076 0.000 0.832 0.048 0.000 0.044
#> SRR2532349 3 0.3548 0.66671 0.068 0.004 0.836 0.056 0.000 0.036
#> SRR2532348 5 0.4254 0.51217 0.000 0.000 0.020 0.000 0.576 0.404
#> SRR2532347 5 0.1663 0.77819 0.000 0.088 0.000 0.000 0.912 0.000
#> SRR2532346 5 0.4002 0.57092 0.000 0.000 0.020 0.000 0.660 0.320
#> SRR2532345 5 0.1471 0.77953 0.000 0.064 0.004 0.000 0.932 0.000
#> SRR2532344 6 0.6888 0.00989 0.000 0.004 0.068 0.164 0.352 0.412
#> SRR2532343 6 0.6880 0.54968 0.048 0.000 0.280 0.308 0.000 0.364
#> SRR2532342 4 0.6201 -0.26402 0.068 0.000 0.084 0.480 0.000 0.368
#> SRR2532341 3 0.2806 0.68104 0.060 0.000 0.872 0.056 0.000 0.012
#> SRR2532340 3 0.2733 0.68296 0.080 0.000 0.864 0.056 0.000 0.000
#> SRR2532339 2 0.1987 0.92206 0.000 0.908 0.004 0.004 0.080 0.004
#> SRR2532338 2 0.1700 0.92271 0.000 0.916 0.004 0.000 0.080 0.000
#> SRR2532337 5 0.2048 0.76256 0.000 0.120 0.000 0.000 0.880 0.000
#> SRR2532336 1 0.1036 0.94774 0.964 0.008 0.024 0.000 0.000 0.004
#> SRR2532335 3 0.2806 0.68104 0.060 0.000 0.872 0.056 0.000 0.012
#> SRR2532334 3 0.6976 -0.46535 0.048 0.004 0.376 0.308 0.000 0.264
#> SRR2532333 5 0.4453 0.46812 0.000 0.000 0.020 0.004 0.524 0.452
#> SRR2532332 1 0.0291 0.96353 0.992 0.004 0.000 0.000 0.000 0.004
#> SRR2532331 5 0.1700 0.77964 0.000 0.080 0.004 0.000 0.916 0.000
#> SRR2532330 5 0.1858 0.75104 0.000 0.012 0.000 0.000 0.912 0.076
#> SRR2532329 2 0.1556 0.92279 0.000 0.920 0.000 0.000 0.080 0.000
#> SRR2532328 3 0.7726 0.19645 0.016 0.108 0.444 0.044 0.092 0.296
#> SRR2532327 2 0.3492 0.84079 0.000 0.772 0.008 0.008 0.208 0.004
#> SRR2532326 6 0.7044 0.54521 0.064 0.000 0.284 0.300 0.000 0.352
#> SRR2532324 5 0.2520 0.73598 0.000 0.152 0.004 0.000 0.844 0.000
#> SRR2532325 1 0.4432 0.68822 0.752 0.024 0.168 0.012 0.000 0.044
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.990 0.996 0.5050 0.496 0.496
#> 3 3 0.984 0.957 0.960 0.2452 0.859 0.721
#> 4 4 0.743 0.806 0.882 0.1840 0.860 0.632
#> 5 5 0.724 0.721 0.844 0.0577 0.938 0.760
#> 6 6 0.736 0.639 0.799 0.0426 0.939 0.727
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
#> SRR2532323 1 0.0000 0.998 1.000 0.000
#> SRR2532322 1 0.0000 0.998 1.000 0.000
#> SRR2532321 2 0.0000 0.994 0.000 1.000
#> SRR2532320 2 0.0000 0.994 0.000 1.000
#> SRR2532319 2 0.8144 0.661 0.252 0.748
#> SRR2532317 2 0.0000 0.994 0.000 1.000
#> SRR2532318 2 0.0000 0.994 0.000 1.000
#> SRR2532315 1 0.0000 0.998 1.000 0.000
#> SRR2532316 1 0.0000 0.998 1.000 0.000
#> SRR2532396 2 0.0000 0.994 0.000 1.000
#> SRR2532395 2 0.0000 0.994 0.000 1.000
#> SRR2532394 2 0.0000 0.994 0.000 1.000
#> SRR2532393 2 0.0000 0.994 0.000 1.000
#> SRR2532392 2 0.0000 0.994 0.000 1.000
#> SRR2532391 1 0.0000 0.998 1.000 0.000
#> SRR2532390 2 0.0000 0.994 0.000 1.000
#> SRR2532389 1 0.0000 0.998 1.000 0.000
#> SRR2532388 2 0.0000 0.994 0.000 1.000
#> SRR2532387 2 0.0000 0.994 0.000 1.000
#> SRR2532386 1 0.0000 0.998 1.000 0.000
#> SRR2532384 2 0.0000 0.994 0.000 1.000
#> SRR2532385 2 0.0672 0.986 0.008 0.992
#> SRR2532383 2 0.0000 0.994 0.000 1.000
#> SRR2532381 1 0.0000 0.998 1.000 0.000
#> SRR2532382 1 0.0000 0.998 1.000 0.000
#> SRR2532379 1 0.0000 0.998 1.000 0.000
#> SRR2532380 1 0.0000 0.998 1.000 0.000
#> SRR2532378 1 0.0000 0.998 1.000 0.000
#> SRR2532377 2 0.0000 0.994 0.000 1.000
#> SRR2532376 2 0.0000 0.994 0.000 1.000
#> SRR2532375 2 0.0000 0.994 0.000 1.000
#> SRR2532374 1 0.0000 0.998 1.000 0.000
#> SRR2532372 1 0.0000 0.998 1.000 0.000
#> SRR2532373 2 0.0000 0.994 0.000 1.000
#> SRR2532371 2 0.0000 0.994 0.000 1.000
#> SRR2532370 1 0.0000 0.998 1.000 0.000
#> SRR2532369 2 0.0000 0.994 0.000 1.000
#> SRR2532368 2 0.0000 0.994 0.000 1.000
#> SRR2532367 2 0.0000 0.994 0.000 1.000
#> SRR2532366 1 0.0000 0.998 1.000 0.000
#> SRR2532365 2 0.0000 0.994 0.000 1.000
#> SRR2532364 1 0.0000 0.998 1.000 0.000
#> SRR2532363 2 0.0000 0.994 0.000 1.000
#> SRR2532362 2 0.0000 0.994 0.000 1.000
#> SRR2532361 1 0.0000 0.998 1.000 0.000
#> SRR2532360 1 0.0000 0.998 1.000 0.000
#> SRR2532359 1 0.0000 0.998 1.000 0.000
#> SRR2532358 1 0.0000 0.998 1.000 0.000
#> SRR2532357 2 0.0000 0.994 0.000 1.000
#> SRR2532356 2 0.0000 0.994 0.000 1.000
#> SRR2532355 1 0.0000 0.998 1.000 0.000
#> SRR2532354 1 0.0000 0.998 1.000 0.000
#> SRR2532353 1 0.0000 0.998 1.000 0.000
#> SRR2532352 2 0.0000 0.994 0.000 1.000
#> SRR2532350 1 0.0000 0.998 1.000 0.000
#> SRR2532349 1 0.0000 0.998 1.000 0.000
#> SRR2532348 2 0.0000 0.994 0.000 1.000
#> SRR2532347 2 0.0000 0.994 0.000 1.000
#> SRR2532346 2 0.0000 0.994 0.000 1.000
#> SRR2532345 2 0.0000 0.994 0.000 1.000
#> SRR2532344 1 0.0000 0.998 1.000 0.000
#> SRR2532343 1 0.0000 0.998 1.000 0.000
#> SRR2532342 1 0.0000 0.998 1.000 0.000
#> SRR2532341 1 0.0000 0.998 1.000 0.000
#> SRR2532340 1 0.0000 0.998 1.000 0.000
#> SRR2532339 2 0.0000 0.994 0.000 1.000
#> SRR2532338 2 0.0000 0.994 0.000 1.000
#> SRR2532337 2 0.0000 0.994 0.000 1.000
#> SRR2532336 1 0.0000 0.998 1.000 0.000
#> SRR2532335 1 0.0000 0.998 1.000 0.000
#> SRR2532334 1 0.0000 0.998 1.000 0.000
#> SRR2532333 2 0.0000 0.994 0.000 1.000
#> SRR2532332 1 0.0000 0.998 1.000 0.000
#> SRR2532331 2 0.0000 0.994 0.000 1.000
#> SRR2532330 2 0.0000 0.994 0.000 1.000
#> SRR2532329 2 0.0000 0.994 0.000 1.000
#> SRR2532328 1 0.4298 0.902 0.912 0.088
#> SRR2532327 2 0.0000 0.994 0.000 1.000
#> SRR2532326 1 0.0000 0.998 1.000 0.000
#> SRR2532324 2 0.0000 0.994 0.000 1.000
#> SRR2532325 1 0.0000 0.998 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532322 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532321 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532320 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532319 3 0.1964 0.874 0.000 0.056 0.944
#> SRR2532317 2 0.0424 0.976 0.000 0.992 0.008
#> SRR2532318 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532315 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532316 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532396 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532395 2 0.1753 0.971 0.000 0.952 0.048
#> SRR2532394 2 0.0592 0.974 0.000 0.988 0.012
#> SRR2532393 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532392 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532391 1 0.1163 0.955 0.972 0.000 0.028
#> SRR2532390 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532389 1 0.0237 0.962 0.996 0.000 0.004
#> SRR2532388 2 0.1753 0.971 0.000 0.952 0.048
#> SRR2532387 2 0.1031 0.975 0.000 0.976 0.024
#> SRR2532386 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532384 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532385 3 0.0747 0.912 0.000 0.016 0.984
#> SRR2532383 2 0.1031 0.975 0.000 0.976 0.024
#> SRR2532381 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532382 1 0.0424 0.960 0.992 0.000 0.008
#> SRR2532379 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532380 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532378 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532377 2 0.1529 0.972 0.000 0.960 0.040
#> SRR2532376 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532375 2 0.1643 0.971 0.000 0.956 0.044
#> SRR2532374 1 0.1031 0.956 0.976 0.000 0.024
#> SRR2532372 3 0.2261 0.964 0.068 0.000 0.932
#> SRR2532373 2 0.0592 0.975 0.000 0.988 0.012
#> SRR2532371 2 0.1031 0.975 0.000 0.976 0.024
#> SRR2532370 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532369 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532368 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532367 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532366 1 0.0237 0.962 0.996 0.000 0.004
#> SRR2532365 2 0.0237 0.975 0.000 0.996 0.004
#> SRR2532364 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532363 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532362 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532361 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532360 3 0.2448 0.969 0.076 0.000 0.924
#> SRR2532359 1 0.3816 0.818 0.852 0.000 0.148
#> SRR2532358 1 0.5216 0.656 0.740 0.000 0.260
#> SRR2532357 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532356 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532355 3 0.2711 0.960 0.088 0.000 0.912
#> SRR2532354 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532353 3 0.3816 0.900 0.148 0.000 0.852
#> SRR2532352 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532350 1 0.1163 0.955 0.972 0.000 0.028
#> SRR2532349 1 0.4062 0.815 0.836 0.000 0.164
#> SRR2532348 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532347 2 0.1753 0.971 0.000 0.952 0.048
#> SRR2532346 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532345 2 0.1753 0.971 0.000 0.952 0.048
#> SRR2532344 3 0.0747 0.912 0.000 0.016 0.984
#> SRR2532343 3 0.2261 0.966 0.068 0.000 0.932
#> SRR2532342 3 0.2537 0.968 0.080 0.000 0.920
#> SRR2532341 1 0.1411 0.951 0.964 0.000 0.036
#> SRR2532340 1 0.1163 0.955 0.972 0.000 0.028
#> SRR2532339 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532338 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532337 2 0.1163 0.974 0.000 0.972 0.028
#> SRR2532336 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532335 1 0.1529 0.948 0.960 0.000 0.040
#> SRR2532334 3 0.2448 0.965 0.076 0.000 0.924
#> SRR2532333 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532332 1 0.0000 0.963 1.000 0.000 0.000
#> SRR2532331 2 0.1753 0.971 0.000 0.952 0.048
#> SRR2532330 2 0.1860 0.969 0.000 0.948 0.052
#> SRR2532329 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532328 1 0.0983 0.950 0.980 0.004 0.016
#> SRR2532327 2 0.0747 0.974 0.000 0.984 0.016
#> SRR2532326 3 0.2625 0.960 0.084 0.000 0.916
#> SRR2532324 2 0.0592 0.975 0.000 0.988 0.012
#> SRR2532325 1 0.0000 0.963 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532322 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532321 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532320 4 0.3074 0.869 0.000 0.152 0.000 0.848
#> SRR2532319 3 0.4761 0.547 0.000 0.332 0.664 0.004
#> SRR2532317 2 0.4661 0.524 0.000 0.652 0.000 0.348
#> SRR2532318 2 0.0000 0.834 0.000 1.000 0.000 0.000
#> SRR2532315 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532316 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532396 4 0.2081 0.940 0.000 0.084 0.000 0.916
#> SRR2532395 2 0.1716 0.844 0.000 0.936 0.000 0.064
#> SRR2532394 4 0.4961 0.130 0.000 0.448 0.000 0.552
#> SRR2532393 2 0.0469 0.840 0.000 0.988 0.000 0.012
#> SRR2532392 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532391 1 0.4155 0.826 0.828 0.000 0.100 0.072
#> SRR2532390 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532389 1 0.0469 0.881 0.988 0.000 0.012 0.000
#> SRR2532388 2 0.1637 0.845 0.000 0.940 0.000 0.060
#> SRR2532387 4 0.4697 0.489 0.000 0.356 0.000 0.644
#> SRR2532386 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532384 2 0.0817 0.843 0.000 0.976 0.000 0.024
#> SRR2532385 2 0.5028 0.167 0.000 0.596 0.400 0.004
#> SRR2532383 2 0.3873 0.727 0.000 0.772 0.000 0.228
#> SRR2532381 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532382 1 0.0707 0.878 0.980 0.000 0.020 0.000
#> SRR2532379 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532380 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532378 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532377 2 0.2469 0.826 0.000 0.892 0.000 0.108
#> SRR2532376 2 0.0000 0.834 0.000 1.000 0.000 0.000
#> SRR2532375 2 0.2530 0.825 0.000 0.888 0.000 0.112
#> SRR2532374 1 0.3764 0.836 0.852 0.000 0.076 0.072
#> SRR2532372 3 0.4031 0.856 0.032 0.036 0.856 0.076
#> SRR2532373 2 0.4804 0.449 0.000 0.616 0.000 0.384
#> SRR2532371 2 0.3975 0.712 0.000 0.760 0.000 0.240
#> SRR2532370 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532369 2 0.1474 0.833 0.000 0.948 0.000 0.052
#> SRR2532368 4 0.2149 0.937 0.000 0.088 0.000 0.912
#> SRR2532367 4 0.2149 0.937 0.000 0.088 0.000 0.912
#> SRR2532366 1 0.0336 0.883 0.992 0.000 0.008 0.000
#> SRR2532365 2 0.4776 0.470 0.000 0.624 0.000 0.376
#> SRR2532364 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532363 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532362 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532361 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532360 3 0.1398 0.921 0.040 0.000 0.956 0.004
#> SRR2532359 1 0.4907 0.226 0.580 0.000 0.420 0.000
#> SRR2532358 1 0.6207 0.206 0.496 0.000 0.452 0.052
#> SRR2532357 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532356 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532355 3 0.3161 0.861 0.124 0.000 0.864 0.012
#> SRR2532354 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532353 3 0.3427 0.839 0.112 0.000 0.860 0.028
#> SRR2532352 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532350 1 0.4144 0.825 0.828 0.000 0.104 0.068
#> SRR2532349 1 0.6507 0.347 0.520 0.000 0.404 0.076
#> SRR2532348 2 0.0336 0.829 0.000 0.992 0.000 0.008
#> SRR2532347 2 0.1867 0.842 0.000 0.928 0.000 0.072
#> SRR2532346 2 0.0000 0.834 0.000 1.000 0.000 0.000
#> SRR2532345 2 0.1637 0.845 0.000 0.940 0.000 0.060
#> SRR2532344 3 0.2401 0.872 0.000 0.092 0.904 0.004
#> SRR2532343 3 0.0817 0.903 0.000 0.000 0.976 0.024
#> SRR2532342 3 0.1489 0.918 0.044 0.000 0.952 0.004
#> SRR2532341 1 0.4552 0.806 0.800 0.000 0.128 0.072
#> SRR2532340 1 0.4155 0.826 0.828 0.000 0.100 0.072
#> SRR2532339 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532338 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532337 2 0.3649 0.751 0.000 0.796 0.000 0.204
#> SRR2532336 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532335 1 0.4656 0.799 0.792 0.000 0.136 0.072
#> SRR2532334 3 0.2546 0.879 0.028 0.000 0.912 0.060
#> SRR2532333 2 0.0592 0.833 0.000 0.984 0.000 0.016
#> SRR2532332 1 0.0188 0.884 0.996 0.000 0.004 0.000
#> SRR2532331 2 0.1792 0.844 0.000 0.932 0.000 0.068
#> SRR2532330 2 0.0469 0.840 0.000 0.988 0.000 0.012
#> SRR2532329 4 0.2011 0.942 0.000 0.080 0.000 0.920
#> SRR2532328 1 0.2699 0.847 0.904 0.000 0.028 0.068
#> SRR2532327 4 0.2216 0.934 0.000 0.092 0.000 0.908
#> SRR2532326 3 0.2500 0.885 0.040 0.000 0.916 0.044
#> SRR2532324 2 0.4830 0.427 0.000 0.608 0.000 0.392
#> SRR2532325 1 0.0000 0.883 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0162 0.9112 0.996 0.000 0.000 0.004 0.000
#> SRR2532322 1 0.0162 0.9111 0.996 0.000 0.004 0.000 0.000
#> SRR2532321 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.2136 0.8542 0.000 0.904 0.008 0.000 0.088
#> SRR2532319 4 0.6765 0.2311 0.000 0.004 0.220 0.408 0.368
#> SRR2532317 5 0.4800 0.5323 0.000 0.368 0.028 0.000 0.604
#> SRR2532318 5 0.3019 0.7510 0.000 0.016 0.108 0.012 0.864
#> SRR2532315 4 0.0404 0.7841 0.012 0.000 0.000 0.988 0.000
#> SRR2532316 4 0.0404 0.7841 0.012 0.000 0.000 0.988 0.000
#> SRR2532396 2 0.0566 0.9316 0.000 0.984 0.004 0.000 0.012
#> SRR2532395 5 0.2068 0.8103 0.000 0.092 0.004 0.000 0.904
#> SRR2532394 2 0.4585 0.2550 0.000 0.628 0.020 0.000 0.352
#> SRR2532393 5 0.1661 0.7929 0.000 0.024 0.036 0.000 0.940
#> SRR2532392 2 0.0290 0.9344 0.000 0.992 0.008 0.000 0.000
#> SRR2532391 3 0.3845 0.7082 0.224 0.000 0.760 0.012 0.004
#> SRR2532390 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 1 0.2672 0.8082 0.872 0.000 0.116 0.008 0.004
#> SRR2532388 5 0.1892 0.8116 0.000 0.080 0.004 0.000 0.916
#> SRR2532387 2 0.4419 0.4146 0.000 0.668 0.020 0.000 0.312
#> SRR2532386 4 0.0693 0.7812 0.012 0.000 0.008 0.980 0.000
#> SRR2532384 5 0.1357 0.8059 0.000 0.048 0.004 0.000 0.948
#> SRR2532385 5 0.6006 0.3344 0.000 0.000 0.220 0.196 0.584
#> SRR2532383 5 0.4382 0.6674 0.000 0.288 0.024 0.000 0.688
#> SRR2532381 4 0.0693 0.7812 0.012 0.000 0.008 0.980 0.000
#> SRR2532382 1 0.1478 0.8641 0.936 0.000 0.000 0.064 0.000
#> SRR2532379 4 0.0404 0.7841 0.012 0.000 0.000 0.988 0.000
#> SRR2532380 1 0.0162 0.9111 0.996 0.000 0.004 0.000 0.000
#> SRR2532378 1 0.0290 0.9101 0.992 0.000 0.000 0.008 0.000
#> SRR2532377 5 0.2825 0.8011 0.000 0.124 0.016 0.000 0.860
#> SRR2532376 5 0.3019 0.7510 0.000 0.016 0.108 0.012 0.864
#> SRR2532375 5 0.3194 0.7917 0.000 0.148 0.020 0.000 0.832
#> SRR2532374 3 0.4146 0.6540 0.268 0.000 0.716 0.012 0.004
#> SRR2532372 3 0.2733 0.5902 0.004 0.000 0.872 0.112 0.012
#> SRR2532373 5 0.4736 0.4570 0.000 0.404 0.020 0.000 0.576
#> SRR2532371 5 0.3942 0.7015 0.000 0.260 0.012 0.000 0.728
#> SRR2532370 1 0.0000 0.9115 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.3178 0.7959 0.000 0.088 0.048 0.004 0.860
#> SRR2532368 2 0.0510 0.9296 0.000 0.984 0.000 0.000 0.016
#> SRR2532367 2 0.0404 0.9338 0.000 0.988 0.000 0.000 0.012
#> SRR2532366 1 0.0451 0.9075 0.988 0.000 0.004 0.008 0.000
#> SRR2532365 5 0.5044 0.3076 0.000 0.464 0.032 0.000 0.504
#> SRR2532364 1 0.0000 0.9115 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0324 0.9356 0.000 0.992 0.004 0.000 0.004
#> SRR2532361 4 0.0404 0.7841 0.012 0.000 0.000 0.988 0.000
#> SRR2532360 4 0.0404 0.7841 0.012 0.000 0.000 0.988 0.000
#> SRR2532359 1 0.5008 0.4091 0.632 0.000 0.040 0.324 0.004
#> SRR2532358 3 0.6526 0.4978 0.188 0.000 0.540 0.260 0.012
#> SRR2532357 2 0.0324 0.9356 0.000 0.992 0.004 0.000 0.004
#> SRR2532356 2 0.0324 0.9356 0.000 0.992 0.004 0.000 0.004
#> SRR2532355 4 0.7011 0.2128 0.264 0.000 0.244 0.472 0.020
#> SRR2532354 1 0.0162 0.9111 0.996 0.000 0.004 0.000 0.000
#> SRR2532353 3 0.6411 0.0686 0.120 0.000 0.444 0.424 0.012
#> SRR2532352 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.3882 0.7154 0.224 0.000 0.756 0.020 0.000
#> SRR2532349 3 0.3779 0.7144 0.144 0.000 0.804 0.052 0.000
#> SRR2532348 5 0.3163 0.7479 0.000 0.012 0.128 0.012 0.848
#> SRR2532347 5 0.2179 0.8079 0.000 0.112 0.000 0.000 0.888
#> SRR2532346 5 0.2967 0.7547 0.000 0.016 0.104 0.012 0.868
#> SRR2532345 5 0.2077 0.8122 0.000 0.084 0.008 0.000 0.908
#> SRR2532344 4 0.5396 0.5378 0.000 0.000 0.220 0.656 0.124
#> SRR2532343 4 0.5029 0.2307 0.020 0.000 0.376 0.592 0.012
#> SRR2532342 4 0.3449 0.6898 0.040 0.000 0.120 0.836 0.004
#> SRR2532341 3 0.3612 0.7280 0.184 0.000 0.796 0.016 0.004
#> SRR2532340 3 0.4004 0.7021 0.232 0.000 0.748 0.016 0.004
#> SRR2532339 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.3582 0.7378 0.000 0.224 0.008 0.000 0.768
#> SRR2532336 1 0.0794 0.8954 0.972 0.000 0.028 0.000 0.000
#> SRR2532335 3 0.3722 0.7317 0.176 0.000 0.796 0.024 0.004
#> SRR2532334 3 0.5080 0.1270 0.016 0.000 0.524 0.448 0.012
#> SRR2532333 5 0.4343 0.6983 0.000 0.044 0.176 0.012 0.768
#> SRR2532332 1 0.0162 0.9112 0.996 0.000 0.000 0.004 0.000
#> SRR2532331 5 0.2677 0.8069 0.000 0.112 0.016 0.000 0.872
#> SRR2532330 5 0.1493 0.7948 0.000 0.028 0.024 0.000 0.948
#> SRR2532329 2 0.0000 0.9365 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 1 0.6654 0.3680 0.580 0.084 0.280 0.044 0.012
#> SRR2532327 2 0.0703 0.9256 0.000 0.976 0.000 0.000 0.024
#> SRR2532326 3 0.5525 0.0630 0.040 0.000 0.488 0.460 0.012
#> SRR2532324 5 0.4767 0.4247 0.000 0.420 0.020 0.000 0.560
#> SRR2532325 1 0.0510 0.9051 0.984 0.000 0.016 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.9178 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532322 1 0.0146 0.9178 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532321 2 0.0260 0.9426 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532320 2 0.3738 0.6914 0.000 0.752 0.000 0.000 0.208 0.040
#> SRR2532319 6 0.6029 0.4716 0.000 0.000 0.068 0.160 0.168 0.604
#> SRR2532317 5 0.5836 0.5272 0.000 0.216 0.020 0.000 0.572 0.192
#> SRR2532318 5 0.3864 -0.1457 0.000 0.000 0.000 0.000 0.520 0.480
#> SRR2532315 4 0.0146 0.8625 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532316 4 0.0146 0.8625 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532396 2 0.1461 0.9248 0.000 0.940 0.000 0.000 0.044 0.016
#> SRR2532395 5 0.2265 0.6768 0.000 0.052 0.000 0.000 0.896 0.052
#> SRR2532394 5 0.5258 0.3377 0.000 0.412 0.004 0.000 0.500 0.084
#> SRR2532393 5 0.2389 0.5918 0.000 0.008 0.000 0.000 0.864 0.128
#> SRR2532392 2 0.2209 0.9026 0.000 0.904 0.004 0.000 0.052 0.040
#> SRR2532391 3 0.1700 0.6719 0.080 0.000 0.916 0.000 0.000 0.004
#> SRR2532390 2 0.0405 0.9429 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR2532389 1 0.4655 0.6145 0.692 0.000 0.200 0.004 0.000 0.104
#> SRR2532388 5 0.2258 0.6786 0.000 0.060 0.000 0.000 0.896 0.044
#> SRR2532387 5 0.4717 0.2184 0.000 0.456 0.004 0.000 0.504 0.036
#> SRR2532386 4 0.0405 0.8600 0.008 0.000 0.000 0.988 0.000 0.004
#> SRR2532384 5 0.2622 0.6340 0.000 0.024 0.004 0.000 0.868 0.104
#> SRR2532385 6 0.5452 0.4257 0.000 0.000 0.024 0.084 0.312 0.580
#> SRR2532383 5 0.4328 0.6541 0.000 0.180 0.000 0.000 0.720 0.100
#> SRR2532381 4 0.0405 0.8600 0.008 0.000 0.000 0.988 0.000 0.004
#> SRR2532382 1 0.0865 0.8971 0.964 0.000 0.000 0.036 0.000 0.000
#> SRR2532379 4 0.0146 0.8625 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532380 1 0.0146 0.9178 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532378 1 0.0405 0.9158 0.988 0.000 0.004 0.000 0.000 0.008
#> SRR2532377 5 0.2629 0.6846 0.000 0.092 0.000 0.000 0.868 0.040
#> SRR2532376 5 0.3864 -0.1457 0.000 0.000 0.000 0.000 0.520 0.480
#> SRR2532375 5 0.2998 0.6798 0.000 0.076 0.004 0.000 0.852 0.068
#> SRR2532374 3 0.2118 0.6534 0.104 0.000 0.888 0.000 0.000 0.008
#> SRR2532372 3 0.4113 0.5354 0.000 0.000 0.712 0.040 0.004 0.244
#> SRR2532373 5 0.4364 0.6037 0.000 0.256 0.004 0.000 0.688 0.052
#> SRR2532371 5 0.3065 0.6731 0.000 0.152 0.000 0.000 0.820 0.028
#> SRR2532370 1 0.0260 0.9173 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR2532369 5 0.4495 0.4455 0.000 0.044 0.008 0.000 0.664 0.284
#> SRR2532368 2 0.2361 0.8833 0.000 0.884 0.000 0.000 0.088 0.028
#> SRR2532367 2 0.2106 0.9022 0.000 0.904 0.000 0.000 0.064 0.032
#> SRR2532366 1 0.1370 0.8939 0.948 0.000 0.012 0.004 0.000 0.036
#> SRR2532365 5 0.5702 0.5250 0.000 0.272 0.012 0.000 0.560 0.156
#> SRR2532364 1 0.0146 0.9178 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532363 2 0.0363 0.9419 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR2532362 2 0.0603 0.9407 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR2532361 4 0.0146 0.8625 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532360 4 0.0146 0.8625 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532359 1 0.5732 0.3822 0.572 0.000 0.028 0.284 0.000 0.116
#> SRR2532358 3 0.7015 0.4400 0.148 0.000 0.484 0.180 0.000 0.188
#> SRR2532357 2 0.0603 0.9407 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR2532356 2 0.0717 0.9404 0.000 0.976 0.000 0.000 0.008 0.016
#> SRR2532355 6 0.7555 -0.2267 0.220 0.000 0.180 0.244 0.000 0.356
#> SRR2532354 1 0.0146 0.9178 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532353 3 0.7272 0.1907 0.096 0.000 0.332 0.252 0.000 0.320
#> SRR2532352 2 0.0260 0.9426 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR2532350 3 0.2786 0.6736 0.084 0.000 0.860 0.000 0.000 0.056
#> SRR2532349 3 0.2833 0.6540 0.040 0.000 0.864 0.008 0.000 0.088
#> SRR2532348 5 0.4097 -0.0961 0.000 0.000 0.008 0.000 0.500 0.492
#> SRR2532347 5 0.2390 0.6778 0.000 0.056 0.000 0.000 0.888 0.056
#> SRR2532346 6 0.3868 -0.0304 0.000 0.000 0.000 0.000 0.492 0.508
#> SRR2532345 5 0.2328 0.6724 0.000 0.052 0.000 0.000 0.892 0.056
#> SRR2532344 6 0.5785 0.1489 0.000 0.000 0.072 0.344 0.048 0.536
#> SRR2532343 4 0.6439 -0.0745 0.016 0.000 0.288 0.392 0.000 0.304
#> SRR2532342 4 0.4958 0.5717 0.040 0.000 0.060 0.684 0.000 0.216
#> SRR2532341 3 0.1434 0.6697 0.048 0.000 0.940 0.000 0.000 0.012
#> SRR2532340 3 0.1644 0.6688 0.076 0.000 0.920 0.000 0.000 0.004
#> SRR2532339 2 0.0146 0.9426 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532338 2 0.0000 0.9427 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 5 0.2872 0.6755 0.000 0.140 0.000 0.000 0.836 0.024
#> SRR2532336 1 0.1141 0.8889 0.948 0.000 0.052 0.000 0.000 0.000
#> SRR2532335 3 0.1268 0.6730 0.036 0.000 0.952 0.004 0.000 0.008
#> SRR2532334 3 0.6484 0.2253 0.024 0.000 0.424 0.300 0.000 0.252
#> SRR2532333 6 0.4372 0.3205 0.000 0.036 0.004 0.000 0.308 0.652
#> SRR2532332 1 0.0405 0.9175 0.988 0.000 0.004 0.000 0.000 0.008
#> SRR2532331 5 0.2571 0.6751 0.000 0.060 0.000 0.000 0.876 0.064
#> SRR2532330 5 0.3201 0.5054 0.000 0.012 0.000 0.000 0.780 0.208
#> SRR2532329 2 0.0653 0.9415 0.000 0.980 0.004 0.000 0.004 0.012
#> SRR2532328 3 0.7984 0.0663 0.340 0.068 0.368 0.036 0.028 0.160
#> SRR2532327 2 0.2263 0.8837 0.000 0.884 0.000 0.000 0.100 0.016
#> SRR2532326 3 0.6697 0.1743 0.032 0.000 0.368 0.288 0.000 0.312
#> SRR2532324 5 0.4688 0.5739 0.000 0.288 0.004 0.000 0.644 0.064
#> SRR2532325 1 0.2209 0.8680 0.904 0.000 0.052 0.004 0.000 0.040
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 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.743 0.869 0.947 0.3418 0.664 0.664
#> 3 3 0.891 0.852 0.944 0.4527 0.836 0.756
#> 4 4 0.592 0.723 0.804 0.2508 0.843 0.709
#> 5 5 0.582 0.541 0.798 0.0874 0.862 0.678
#> 6 6 0.686 0.652 0.846 0.0851 0.939 0.814
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
#> SRR2532323 2 0.8443 0.6106 0.272 0.728
#> SRR2532322 2 0.2778 0.9158 0.048 0.952
#> SRR2532321 2 0.0000 0.9531 0.000 1.000
#> SRR2532320 2 0.0000 0.9531 0.000 1.000
#> SRR2532319 2 0.0000 0.9531 0.000 1.000
#> SRR2532317 2 0.0000 0.9531 0.000 1.000
#> SRR2532318 2 0.0000 0.9531 0.000 1.000
#> SRR2532315 1 0.0000 0.8860 1.000 0.000
#> SRR2532316 1 0.0000 0.8860 1.000 0.000
#> SRR2532396 2 0.0000 0.9531 0.000 1.000
#> SRR2532395 2 0.0000 0.9531 0.000 1.000
#> SRR2532394 2 0.0000 0.9531 0.000 1.000
#> SRR2532393 2 0.0000 0.9531 0.000 1.000
#> SRR2532392 2 0.0000 0.9531 0.000 1.000
#> SRR2532391 2 0.5294 0.8456 0.120 0.880
#> SRR2532390 2 0.0000 0.9531 0.000 1.000
#> SRR2532389 2 0.3733 0.8942 0.072 0.928
#> SRR2532388 2 0.0000 0.9531 0.000 1.000
#> SRR2532387 2 0.0000 0.9531 0.000 1.000
#> SRR2532386 1 0.0000 0.8860 1.000 0.000
#> SRR2532384 2 0.0000 0.9531 0.000 1.000
#> SRR2532385 2 0.0000 0.9531 0.000 1.000
#> SRR2532383 2 0.0000 0.9531 0.000 1.000
#> SRR2532381 1 0.0000 0.8860 1.000 0.000
#> SRR2532382 1 0.1184 0.8830 0.984 0.016
#> SRR2532379 1 0.0000 0.8860 1.000 0.000
#> SRR2532380 2 0.4815 0.8632 0.104 0.896
#> SRR2532378 1 0.9732 0.3686 0.596 0.404
#> SRR2532377 2 0.0000 0.9531 0.000 1.000
#> SRR2532376 2 0.0000 0.9531 0.000 1.000
#> SRR2532375 2 0.0000 0.9531 0.000 1.000
#> SRR2532374 2 0.0000 0.9531 0.000 1.000
#> SRR2532372 2 0.0000 0.9531 0.000 1.000
#> SRR2532373 2 0.0000 0.9531 0.000 1.000
#> SRR2532371 2 0.0000 0.9531 0.000 1.000
#> SRR2532370 2 0.9129 0.4884 0.328 0.672
#> SRR2532369 2 0.0000 0.9531 0.000 1.000
#> SRR2532368 2 0.0000 0.9531 0.000 1.000
#> SRR2532367 2 0.0000 0.9531 0.000 1.000
#> SRR2532366 1 0.9580 0.4275 0.620 0.380
#> SRR2532365 2 0.0000 0.9531 0.000 1.000
#> SRR2532364 2 0.4815 0.8632 0.104 0.896
#> SRR2532363 2 0.0000 0.9531 0.000 1.000
#> SRR2532362 2 0.0000 0.9531 0.000 1.000
#> SRR2532361 1 0.0000 0.8860 1.000 0.000
#> SRR2532360 1 0.0000 0.8860 1.000 0.000
#> SRR2532359 1 0.0376 0.8857 0.996 0.004
#> SRR2532358 1 0.7453 0.7147 0.788 0.212
#> SRR2532357 2 0.0000 0.9531 0.000 1.000
#> SRR2532356 2 0.0000 0.9531 0.000 1.000
#> SRR2532355 2 0.4690 0.8676 0.100 0.900
#> SRR2532354 1 1.0000 0.0420 0.500 0.500
#> SRR2532353 1 0.3879 0.8498 0.924 0.076
#> SRR2532352 2 0.0000 0.9531 0.000 1.000
#> SRR2532350 2 0.4815 0.8632 0.104 0.896
#> SRR2532349 2 0.9732 0.2712 0.404 0.596
#> SRR2532348 2 0.0000 0.9531 0.000 1.000
#> SRR2532347 2 0.0000 0.9531 0.000 1.000
#> SRR2532346 2 0.0000 0.9531 0.000 1.000
#> SRR2532345 2 0.0000 0.9531 0.000 1.000
#> SRR2532344 2 0.0672 0.9467 0.008 0.992
#> SRR2532343 1 0.2236 0.8759 0.964 0.036
#> SRR2532342 1 0.0000 0.8860 1.000 0.000
#> SRR2532341 2 0.0000 0.9531 0.000 1.000
#> SRR2532340 2 0.1843 0.9321 0.028 0.972
#> SRR2532339 2 0.0000 0.9531 0.000 1.000
#> SRR2532338 2 0.0000 0.9531 0.000 1.000
#> SRR2532337 2 0.0000 0.9531 0.000 1.000
#> SRR2532336 2 0.5519 0.8362 0.128 0.872
#> SRR2532335 2 0.0000 0.9531 0.000 1.000
#> SRR2532334 2 1.0000 -0.0977 0.496 0.504
#> SRR2532333 2 0.0000 0.9531 0.000 1.000
#> SRR2532332 2 0.8661 0.5781 0.288 0.712
#> SRR2532331 2 0.0000 0.9531 0.000 1.000
#> SRR2532330 2 0.0000 0.9531 0.000 1.000
#> SRR2532329 2 0.0000 0.9531 0.000 1.000
#> SRR2532328 2 0.0000 0.9531 0.000 1.000
#> SRR2532327 2 0.0000 0.9531 0.000 1.000
#> SRR2532326 1 0.2236 0.8759 0.964 0.036
#> SRR2532324 2 0.0000 0.9531 0.000 1.000
#> SRR2532325 2 0.0000 0.9531 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532322 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532321 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532320 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532319 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532317 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532318 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532315 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532316 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532396 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532395 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532392 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532391 2 0.6244 0.212 0.440 0.560 0.000
#> SRR2532390 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532389 2 0.5948 0.399 0.360 0.640 0.000
#> SRR2532388 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532387 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532386 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532384 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532385 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532383 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532381 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532382 1 0.2356 0.823 0.928 0.000 0.072
#> SRR2532379 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532378 1 0.4291 0.656 0.820 0.000 0.180
#> SRR2532377 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532376 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532375 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532374 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532372 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532373 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532371 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532370 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532369 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532368 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532367 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532366 1 0.0424 0.883 0.992 0.008 0.000
#> SRR2532365 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532364 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532363 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532362 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532361 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532360 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532359 3 0.6309 0.179 0.496 0.000 0.504
#> SRR2532358 3 0.6079 0.554 0.036 0.216 0.748
#> SRR2532357 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532356 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532355 2 0.1337 0.935 0.016 0.972 0.012
#> SRR2532354 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532353 3 0.7059 0.258 0.460 0.020 0.520
#> SRR2532352 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532350 1 0.6286 0.105 0.536 0.464 0.000
#> SRR2532349 2 0.6282 0.348 0.004 0.612 0.384
#> SRR2532348 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532347 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532346 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532345 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532344 2 0.0237 0.955 0.000 0.996 0.004
#> SRR2532343 3 0.1163 0.826 0.000 0.028 0.972
#> SRR2532342 3 0.0000 0.849 0.000 0.000 1.000
#> SRR2532341 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532340 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532339 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532338 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532337 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532336 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532335 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532334 2 0.6140 0.307 0.000 0.596 0.404
#> SRR2532333 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.890 1.000 0.000 0.000
#> SRR2532331 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532330 2 0.0000 0.958 0.000 1.000 0.000
#> SRR2532329 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532328 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532327 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532326 3 0.6630 0.562 0.300 0.028 0.672
#> SRR2532324 2 0.0237 0.958 0.004 0.996 0.000
#> SRR2532325 2 0.6286 0.146 0.464 0.536 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0000 0.8161 1.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.8161 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532320 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532319 2 0.4454 0.7001 0.000 0.692 0.308 0.000
#> SRR2532317 2 0.4008 0.7529 0.000 0.756 0.244 0.000
#> SRR2532318 2 0.4522 0.6875 0.000 0.680 0.320 0.000
#> SRR2532315 4 0.0000 0.9206 0.000 0.000 0.000 1.000
#> SRR2532316 4 0.0000 0.9206 0.000 0.000 0.000 1.000
#> SRR2532396 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532395 2 0.4277 0.7255 0.000 0.720 0.280 0.000
#> SRR2532394 2 0.1211 0.8287 0.000 0.960 0.040 0.000
#> SRR2532393 2 0.4356 0.7174 0.000 0.708 0.292 0.000
#> SRR2532392 2 0.0188 0.8329 0.000 0.996 0.004 0.000
#> SRR2532391 3 0.6236 0.5622 0.152 0.180 0.668 0.000
#> SRR2532390 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532389 2 0.7683 -0.2533 0.304 0.452 0.244 0.000
#> SRR2532388 2 0.2589 0.8097 0.000 0.884 0.116 0.000
#> SRR2532387 2 0.0336 0.8331 0.000 0.992 0.008 0.000
#> SRR2532386 4 0.3266 0.8362 0.000 0.000 0.168 0.832
#> SRR2532384 2 0.4277 0.7255 0.000 0.720 0.280 0.000
#> SRR2532385 2 0.4585 0.6721 0.000 0.668 0.332 0.000
#> SRR2532383 2 0.0817 0.8331 0.000 0.976 0.024 0.000
#> SRR2532381 4 0.3311 0.8335 0.000 0.000 0.172 0.828
#> SRR2532382 1 0.4094 0.7194 0.828 0.000 0.116 0.056
#> SRR2532379 4 0.0000 0.9206 0.000 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.8161 1.000 0.000 0.000 0.000
#> SRR2532378 1 0.3400 0.6700 0.820 0.000 0.000 0.180
#> SRR2532377 2 0.4134 0.7395 0.000 0.740 0.260 0.000
#> SRR2532376 2 0.4500 0.6925 0.000 0.684 0.316 0.000
#> SRR2532375 2 0.0336 0.8331 0.000 0.992 0.008 0.000
#> SRR2532374 2 0.2647 0.7277 0.000 0.880 0.120 0.000
#> SRR2532372 3 0.3311 0.6683 0.000 0.172 0.828 0.000
#> SRR2532373 2 0.0336 0.8331 0.000 0.992 0.008 0.000
#> SRR2532371 2 0.0336 0.8331 0.000 0.992 0.008 0.000
#> SRR2532370 1 0.0592 0.8111 0.984 0.000 0.016 0.000
#> SRR2532369 2 0.4277 0.7255 0.000 0.720 0.280 0.000
#> SRR2532368 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532367 2 0.0336 0.8334 0.000 0.992 0.008 0.000
#> SRR2532366 1 0.4978 0.3816 0.612 0.004 0.384 0.000
#> SRR2532365 2 0.4103 0.7413 0.000 0.744 0.256 0.000
#> SRR2532364 1 0.0000 0.8161 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532361 4 0.0000 0.9206 0.000 0.000 0.000 1.000
#> SRR2532360 4 0.0000 0.9206 0.000 0.000 0.000 1.000
#> SRR2532359 1 0.7752 0.2246 0.436 0.000 0.300 0.264
#> SRR2532358 3 0.4395 0.5744 0.004 0.016 0.776 0.204
#> SRR2532357 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532355 3 0.3486 0.6590 0.000 0.188 0.812 0.000
#> SRR2532354 1 0.0000 0.8161 1.000 0.000 0.000 0.000
#> SRR2532353 3 0.5472 0.3310 0.280 0.000 0.676 0.044
#> SRR2532352 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532350 3 0.3647 0.6417 0.108 0.040 0.852 0.000
#> SRR2532349 3 0.3528 0.6212 0.000 0.192 0.808 0.000
#> SRR2532348 2 0.3074 0.7983 0.000 0.848 0.152 0.000
#> SRR2532347 2 0.3942 0.7557 0.000 0.764 0.236 0.000
#> SRR2532346 2 0.4500 0.6925 0.000 0.684 0.316 0.000
#> SRR2532345 2 0.4164 0.7380 0.000 0.736 0.264 0.000
#> SRR2532344 3 0.4360 0.5785 0.000 0.248 0.744 0.008
#> SRR2532343 3 0.4454 0.4298 0.000 0.000 0.692 0.308
#> SRR2532342 4 0.3569 0.7351 0.000 0.000 0.196 0.804
#> SRR2532341 2 0.2973 0.7244 0.000 0.856 0.144 0.000
#> SRR2532340 3 0.4855 0.2627 0.000 0.400 0.600 0.000
#> SRR2532339 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532337 2 0.3726 0.7704 0.000 0.788 0.212 0.000
#> SRR2532336 1 0.0469 0.8110 0.988 0.000 0.012 0.000
#> SRR2532335 2 0.4500 0.6794 0.000 0.684 0.316 0.000
#> SRR2532334 3 0.2483 0.6683 0.000 0.052 0.916 0.032
#> SRR2532333 2 0.4406 0.7071 0.000 0.700 0.300 0.000
#> SRR2532332 1 0.0000 0.8161 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.0817 0.8322 0.000 0.976 0.024 0.000
#> SRR2532330 2 0.4406 0.7071 0.000 0.700 0.300 0.000
#> SRR2532329 2 0.0000 0.8323 0.000 1.000 0.000 0.000
#> SRR2532328 2 0.1716 0.8252 0.000 0.936 0.064 0.000
#> SRR2532327 2 0.0188 0.8324 0.000 0.996 0.004 0.000
#> SRR2532326 3 0.3107 0.6055 0.080 0.000 0.884 0.036
#> SRR2532324 2 0.0336 0.8331 0.000 0.992 0.008 0.000
#> SRR2532325 1 0.6843 -0.0959 0.460 0.440 0.100 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.749439 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.749439 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 3 0.5901 0.281703 0.000 0.400 0.496 0.000 0.104
#> SRR2532317 2 0.4003 0.561473 0.000 0.704 0.288 0.000 0.008
#> SRR2532318 3 0.5834 0.330240 0.000 0.364 0.532 0.000 0.104
#> SRR2532315 4 0.0000 0.933694 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.933694 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532395 2 0.4327 0.421177 0.000 0.632 0.360 0.000 0.008
#> SRR2532394 2 0.1697 0.802308 0.000 0.932 0.060 0.000 0.008
#> SRR2532393 3 0.5847 0.188227 0.000 0.424 0.480 0.000 0.096
#> SRR2532392 2 0.1211 0.820515 0.000 0.960 0.016 0.000 0.024
#> SRR2532391 3 0.7350 -0.189078 0.080 0.116 0.428 0.000 0.376
#> SRR2532390 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 2 0.7217 0.000823 0.252 0.500 0.200 0.000 0.048
#> SRR2532388 2 0.2612 0.755116 0.000 0.868 0.124 0.000 0.008
#> SRR2532387 2 0.0693 0.823418 0.000 0.980 0.012 0.000 0.008
#> SRR2532386 5 0.2690 0.523939 0.000 0.000 0.000 0.156 0.844
#> SRR2532384 2 0.4327 0.421177 0.000 0.632 0.360 0.000 0.008
#> SRR2532385 3 0.5670 0.303065 0.000 0.388 0.528 0.000 0.084
#> SRR2532383 2 0.1399 0.816732 0.000 0.952 0.028 0.000 0.020
#> SRR2532381 5 0.2806 0.527794 0.000 0.000 0.004 0.152 0.844
#> SRR2532382 5 0.4528 -0.044932 0.444 0.000 0.000 0.008 0.548
#> SRR2532379 4 0.0000 0.933694 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.749439 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.4172 0.546781 0.784 0.000 0.000 0.108 0.108
#> SRR2532377 2 0.4655 0.458261 0.000 0.644 0.328 0.000 0.028
#> SRR2532376 3 0.5874 0.326157 0.000 0.364 0.528 0.000 0.108
#> SRR2532375 2 0.0798 0.821695 0.000 0.976 0.016 0.000 0.008
#> SRR2532374 2 0.2813 0.717406 0.000 0.876 0.084 0.000 0.040
#> SRR2532372 3 0.1907 0.278430 0.000 0.028 0.928 0.000 0.044
#> SRR2532373 2 0.0671 0.822829 0.000 0.980 0.016 0.000 0.004
#> SRR2532371 2 0.0290 0.824069 0.000 0.992 0.008 0.000 0.000
#> SRR2532370 1 0.1270 0.715265 0.948 0.000 0.000 0.000 0.052
#> SRR2532369 2 0.4327 0.421177 0.000 0.632 0.360 0.000 0.008
#> SRR2532368 2 0.0771 0.819049 0.000 0.976 0.004 0.000 0.020
#> SRR2532367 2 0.0290 0.825017 0.000 0.992 0.008 0.000 0.000
#> SRR2532366 1 0.6630 -0.016351 0.488 0.004 0.272 0.000 0.236
#> SRR2532365 2 0.4718 0.424866 0.000 0.628 0.344 0.000 0.028
#> SRR2532364 1 0.0000 0.749439 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0771 0.819049 0.000 0.976 0.004 0.000 0.020
#> SRR2532361 4 0.0000 0.933694 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.933694 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.8236 -0.180155 0.352 0.000 0.196 0.312 0.140
#> SRR2532358 3 0.4648 0.158683 0.000 0.004 0.752 0.136 0.108
#> SRR2532357 2 0.0771 0.819049 0.000 0.976 0.004 0.000 0.020
#> SRR2532356 2 0.0771 0.819049 0.000 0.976 0.004 0.000 0.020
#> SRR2532355 3 0.1701 0.323258 0.000 0.048 0.936 0.000 0.016
#> SRR2532354 1 0.0000 0.749439 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.6839 -0.225606 0.200 0.000 0.576 0.056 0.168
#> SRR2532352 2 0.0771 0.819049 0.000 0.976 0.004 0.000 0.020
#> SRR2532350 3 0.5488 -0.038802 0.088 0.020 0.680 0.000 0.212
#> SRR2532349 3 0.5556 -0.103225 0.000 0.108 0.616 0.000 0.276
#> SRR2532348 2 0.3863 0.613844 0.000 0.740 0.248 0.000 0.012
#> SRR2532347 2 0.4380 0.518688 0.000 0.676 0.304 0.000 0.020
#> SRR2532346 3 0.5844 0.323583 0.000 0.368 0.528 0.000 0.104
#> SRR2532345 2 0.4067 0.538263 0.000 0.692 0.300 0.000 0.008
#> SRR2532344 3 0.3536 0.376543 0.000 0.084 0.832 0.000 0.084
#> SRR2532343 3 0.5289 -0.123481 0.000 0.000 0.616 0.312 0.072
#> SRR2532342 4 0.3690 0.621136 0.000 0.000 0.224 0.764 0.012
#> SRR2532341 2 0.3141 0.705418 0.000 0.852 0.108 0.000 0.040
#> SRR2532340 3 0.5420 0.187802 0.000 0.416 0.524 0.000 0.060
#> SRR2532339 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 2 0.4397 0.564917 0.000 0.696 0.276 0.000 0.028
#> SRR2532336 1 0.0162 0.746776 0.996 0.000 0.004 0.000 0.000
#> SRR2532335 2 0.4655 0.456003 0.000 0.644 0.328 0.000 0.028
#> SRR2532334 3 0.4084 -0.083319 0.000 0.004 0.668 0.000 0.328
#> SRR2532333 3 0.5895 0.286855 0.000 0.396 0.500 0.000 0.104
#> SRR2532332 1 0.0000 0.749439 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.1331 0.813645 0.000 0.952 0.040 0.000 0.008
#> SRR2532330 3 0.5981 0.240066 0.000 0.404 0.484 0.000 0.112
#> SRR2532329 2 0.0000 0.823850 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 2 0.2270 0.788603 0.000 0.904 0.076 0.000 0.020
#> SRR2532327 2 0.0162 0.823842 0.000 0.996 0.004 0.000 0.000
#> SRR2532326 5 0.4560 0.288618 0.000 0.000 0.484 0.008 0.508
#> SRR2532324 2 0.0451 0.824842 0.000 0.988 0.008 0.000 0.004
#> SRR2532325 1 0.5929 0.003802 0.464 0.432 0.104 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0000 0.7476 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.7476 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532320 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532319 5 0.1141 0.8123 0.000 0.052 0.000 0.000 0.948 0.000
#> SRR2532317 2 0.3371 0.6504 0.000 0.708 0.000 0.000 0.292 0.000
#> SRR2532318 5 0.0865 0.8304 0.000 0.036 0.000 0.000 0.964 0.000
#> SRR2532315 4 0.0000 0.9220 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.9220 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532395 2 0.3659 0.5420 0.000 0.636 0.000 0.000 0.364 0.000
#> SRR2532394 2 0.1501 0.8186 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR2532393 5 0.2854 0.6387 0.000 0.208 0.000 0.000 0.792 0.000
#> SRR2532392 2 0.1267 0.8331 0.000 0.940 0.000 0.000 0.060 0.000
#> SRR2532391 3 0.4251 0.2915 0.040 0.016 0.740 0.000 0.004 0.200
#> SRR2532390 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532389 2 0.7232 0.0611 0.264 0.476 0.160 0.000 0.060 0.040
#> SRR2532388 2 0.2219 0.7897 0.000 0.864 0.000 0.000 0.136 0.000
#> SRR2532387 2 0.0547 0.8378 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR2532386 6 0.0000 0.7787 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2532384 2 0.3659 0.5420 0.000 0.636 0.000 0.000 0.364 0.000
#> SRR2532385 5 0.2553 0.7459 0.000 0.144 0.008 0.000 0.848 0.000
#> SRR2532383 2 0.1501 0.8254 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR2532381 6 0.0000 0.7787 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2532382 6 0.3515 0.4190 0.324 0.000 0.000 0.000 0.000 0.676
#> SRR2532379 4 0.0000 0.9220 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0000 0.7476 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.3822 0.5402 0.776 0.000 0.000 0.096 0.000 0.128
#> SRR2532377 2 0.3695 0.5597 0.000 0.624 0.000 0.000 0.376 0.000
#> SRR2532376 5 0.0363 0.8297 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR2532375 2 0.0632 0.8365 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR2532374 3 0.3868 -0.0656 0.000 0.496 0.504 0.000 0.000 0.000
#> SRR2532372 3 0.2871 0.5250 0.000 0.004 0.804 0.000 0.192 0.000
#> SRR2532373 2 0.0547 0.8373 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR2532371 2 0.0260 0.8383 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532370 1 0.1141 0.7165 0.948 0.000 0.000 0.000 0.000 0.052
#> SRR2532369 2 0.3684 0.5291 0.000 0.628 0.000 0.000 0.372 0.000
#> SRR2532368 2 0.1141 0.8258 0.000 0.948 0.000 0.000 0.052 0.000
#> SRR2532367 2 0.0260 0.8388 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532366 1 0.6535 0.0992 0.516 0.004 0.208 0.000 0.048 0.224
#> SRR2532365 2 0.3727 0.5411 0.000 0.612 0.000 0.000 0.388 0.000
#> SRR2532364 1 0.0000 0.7476 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.1141 0.8258 0.000 0.948 0.000 0.000 0.052 0.000
#> SRR2532361 4 0.0000 0.9220 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 0.9220 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.7217 -0.0656 0.368 0.000 0.216 0.316 0.000 0.100
#> SRR2532358 3 0.5379 0.2281 0.000 0.004 0.580 0.084 0.320 0.012
#> SRR2532357 2 0.1141 0.8258 0.000 0.948 0.000 0.000 0.052 0.000
#> SRR2532356 2 0.1141 0.8258 0.000 0.948 0.000 0.000 0.052 0.000
#> SRR2532355 5 0.4509 0.1466 0.000 0.032 0.436 0.000 0.532 0.000
#> SRR2532354 1 0.0000 0.7476 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.6947 0.2865 0.200 0.000 0.556 0.060 0.124 0.060
#> SRR2532352 2 0.1141 0.8258 0.000 0.948 0.000 0.000 0.052 0.000
#> SRR2532350 3 0.1010 0.5194 0.000 0.004 0.960 0.000 0.036 0.000
#> SRR2532349 3 0.1353 0.4962 0.000 0.012 0.952 0.000 0.012 0.024
#> SRR2532348 2 0.3482 0.5955 0.000 0.684 0.000 0.000 0.316 0.000
#> SRR2532347 2 0.3578 0.6113 0.000 0.660 0.000 0.000 0.340 0.000
#> SRR2532346 5 0.0865 0.8305 0.000 0.036 0.000 0.000 0.964 0.000
#> SRR2532345 2 0.3409 0.6389 0.000 0.700 0.000 0.000 0.300 0.000
#> SRR2532344 5 0.1327 0.7874 0.000 0.000 0.064 0.000 0.936 0.000
#> SRR2532343 3 0.4411 0.4948 0.000 0.000 0.736 0.132 0.124 0.008
#> SRR2532342 4 0.3626 0.5725 0.000 0.000 0.288 0.704 0.004 0.004
#> SRR2532341 3 0.3864 -0.0136 0.000 0.480 0.520 0.000 0.000 0.000
#> SRR2532340 3 0.3833 0.3878 0.000 0.272 0.708 0.000 0.016 0.004
#> SRR2532339 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 2 0.3563 0.6265 0.000 0.664 0.000 0.000 0.336 0.000
#> SRR2532336 1 0.1141 0.7107 0.948 0.000 0.052 0.000 0.000 0.000
#> SRR2532335 2 0.5219 0.3613 0.000 0.568 0.316 0.000 0.116 0.000
#> SRR2532334 3 0.4463 0.5056 0.000 0.012 0.732 0.000 0.160 0.096
#> SRR2532333 5 0.0547 0.8268 0.000 0.020 0.000 0.000 0.980 0.000
#> SRR2532332 1 0.0000 0.7476 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.1204 0.8278 0.000 0.944 0.000 0.000 0.056 0.000
#> SRR2532330 5 0.1327 0.8091 0.000 0.064 0.000 0.000 0.936 0.000
#> SRR2532329 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532328 2 0.2003 0.8107 0.000 0.884 0.000 0.000 0.116 0.000
#> SRR2532327 2 0.0000 0.8376 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.3633 0.3849 0.000 0.000 0.732 0.004 0.012 0.252
#> SRR2532324 2 0.0632 0.8383 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR2532325 1 0.5259 0.0441 0.468 0.436 0.000 0.000 0.096 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)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.993 0.997 0.5066 0.494 0.494
#> 3 3 0.750 0.870 0.876 0.2571 0.792 0.602
#> 4 4 0.742 0.796 0.877 0.0552 0.881 0.703
#> 5 5 0.839 0.813 0.909 0.0853 0.934 0.808
#> 6 6 0.723 0.728 0.824 0.0523 0.973 0.908
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
#> SRR2532323 1 0.000 0.996 1.000 0.000
#> SRR2532322 1 0.000 0.996 1.000 0.000
#> SRR2532321 2 0.000 0.997 0.000 1.000
#> SRR2532320 2 0.000 0.997 0.000 1.000
#> SRR2532319 1 0.000 0.996 1.000 0.000
#> SRR2532317 2 0.000 0.997 0.000 1.000
#> SRR2532318 2 0.000 0.997 0.000 1.000
#> SRR2532315 1 0.000 0.996 1.000 0.000
#> SRR2532316 1 0.000 0.996 1.000 0.000
#> SRR2532396 2 0.000 0.997 0.000 1.000
#> SRR2532395 2 0.000 0.997 0.000 1.000
#> SRR2532394 2 0.000 0.997 0.000 1.000
#> SRR2532393 2 0.000 0.997 0.000 1.000
#> SRR2532392 2 0.000 0.997 0.000 1.000
#> SRR2532391 1 0.000 0.996 1.000 0.000
#> SRR2532390 2 0.000 0.997 0.000 1.000
#> SRR2532389 1 0.000 0.996 1.000 0.000
#> SRR2532388 2 0.000 0.997 0.000 1.000
#> SRR2532387 2 0.000 0.997 0.000 1.000
#> SRR2532386 1 0.000 0.996 1.000 0.000
#> SRR2532384 2 0.000 0.997 0.000 1.000
#> SRR2532385 1 0.584 0.836 0.860 0.140
#> SRR2532383 2 0.000 0.997 0.000 1.000
#> SRR2532381 1 0.000 0.996 1.000 0.000
#> SRR2532382 1 0.000 0.996 1.000 0.000
#> SRR2532379 1 0.000 0.996 1.000 0.000
#> SRR2532380 1 0.000 0.996 1.000 0.000
#> SRR2532378 1 0.000 0.996 1.000 0.000
#> SRR2532377 2 0.000 0.997 0.000 1.000
#> SRR2532376 2 0.000 0.997 0.000 1.000
#> SRR2532375 2 0.000 0.997 0.000 1.000
#> SRR2532374 1 0.000 0.996 1.000 0.000
#> SRR2532372 1 0.000 0.996 1.000 0.000
#> SRR2532373 2 0.000 0.997 0.000 1.000
#> SRR2532371 2 0.000 0.997 0.000 1.000
#> SRR2532370 1 0.000 0.996 1.000 0.000
#> SRR2532369 2 0.000 0.997 0.000 1.000
#> SRR2532368 2 0.000 0.997 0.000 1.000
#> SRR2532367 2 0.000 0.997 0.000 1.000
#> SRR2532366 1 0.000 0.996 1.000 0.000
#> SRR2532365 2 0.000 0.997 0.000 1.000
#> SRR2532364 1 0.000 0.996 1.000 0.000
#> SRR2532363 2 0.000 0.997 0.000 1.000
#> SRR2532362 2 0.000 0.997 0.000 1.000
#> SRR2532361 1 0.000 0.996 1.000 0.000
#> SRR2532360 1 0.000 0.996 1.000 0.000
#> SRR2532359 1 0.000 0.996 1.000 0.000
#> SRR2532358 1 0.000 0.996 1.000 0.000
#> SRR2532357 2 0.000 0.997 0.000 1.000
#> SRR2532356 2 0.000 0.997 0.000 1.000
#> SRR2532355 1 0.000 0.996 1.000 0.000
#> SRR2532354 1 0.000 0.996 1.000 0.000
#> SRR2532353 1 0.000 0.996 1.000 0.000
#> SRR2532352 2 0.000 0.997 0.000 1.000
#> SRR2532350 1 0.000 0.996 1.000 0.000
#> SRR2532349 1 0.000 0.996 1.000 0.000
#> SRR2532348 2 0.000 0.997 0.000 1.000
#> SRR2532347 2 0.000 0.997 0.000 1.000
#> SRR2532346 2 0.000 0.997 0.000 1.000
#> SRR2532345 2 0.000 0.997 0.000 1.000
#> SRR2532344 1 0.000 0.996 1.000 0.000
#> SRR2532343 1 0.000 0.996 1.000 0.000
#> SRR2532342 1 0.000 0.996 1.000 0.000
#> SRR2532341 1 0.000 0.996 1.000 0.000
#> SRR2532340 1 0.000 0.996 1.000 0.000
#> SRR2532339 2 0.000 0.997 0.000 1.000
#> SRR2532338 2 0.000 0.997 0.000 1.000
#> SRR2532337 2 0.000 0.997 0.000 1.000
#> SRR2532336 1 0.000 0.996 1.000 0.000
#> SRR2532335 1 0.000 0.996 1.000 0.000
#> SRR2532334 1 0.000 0.996 1.000 0.000
#> SRR2532333 2 0.506 0.873 0.112 0.888
#> SRR2532332 1 0.000 0.996 1.000 0.000
#> SRR2532331 2 0.000 0.997 0.000 1.000
#> SRR2532330 2 0.000 0.997 0.000 1.000
#> SRR2532329 2 0.000 0.997 0.000 1.000
#> SRR2532328 1 0.000 0.996 1.000 0.000
#> SRR2532327 2 0.000 0.997 0.000 1.000
#> SRR2532326 1 0.000 0.996 1.000 0.000
#> SRR2532324 2 0.000 0.997 0.000 1.000
#> SRR2532325 1 0.000 0.996 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532322 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532321 2 0.0592 0.964 0.000 0.988 0.012
#> SRR2532320 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2532319 3 0.4409 0.814 0.172 0.004 0.824
#> SRR2532317 3 0.4834 0.562 0.004 0.204 0.792
#> SRR2532318 2 0.4452 0.856 0.000 0.808 0.192
#> SRR2532315 1 0.3412 0.889 0.876 0.000 0.124
#> SRR2532316 1 0.3412 0.889 0.876 0.000 0.124
#> SRR2532396 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532395 2 0.1753 0.962 0.000 0.952 0.048
#> SRR2532394 2 0.2261 0.958 0.000 0.932 0.068
#> SRR2532393 2 0.2711 0.946 0.000 0.912 0.088
#> SRR2532392 2 0.0424 0.965 0.000 0.992 0.008
#> SRR2532391 3 0.5058 0.810 0.244 0.000 0.756
#> SRR2532390 2 0.1031 0.966 0.000 0.976 0.024
#> SRR2532389 3 0.6204 0.486 0.424 0.000 0.576
#> SRR2532388 2 0.1964 0.960 0.000 0.944 0.056
#> SRR2532387 2 0.0892 0.966 0.000 0.980 0.020
#> SRR2532386 1 0.3340 0.888 0.880 0.000 0.120
#> SRR2532384 2 0.3116 0.934 0.000 0.892 0.108
#> SRR2532385 3 0.5816 0.772 0.156 0.056 0.788
#> SRR2532383 2 0.2066 0.959 0.000 0.940 0.060
#> SRR2532381 1 0.3267 0.887 0.884 0.000 0.116
#> SRR2532382 1 0.1163 0.905 0.972 0.000 0.028
#> SRR2532379 1 0.3412 0.889 0.876 0.000 0.124
#> SRR2532380 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532378 1 0.1964 0.903 0.944 0.000 0.056
#> SRR2532377 2 0.2066 0.959 0.000 0.940 0.060
#> SRR2532376 2 0.4002 0.891 0.000 0.840 0.160
#> SRR2532375 2 0.2066 0.959 0.000 0.940 0.060
#> SRR2532374 3 0.5098 0.808 0.248 0.000 0.752
#> SRR2532372 3 0.4555 0.827 0.200 0.000 0.800
#> SRR2532373 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532371 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532370 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532369 3 0.4784 0.566 0.004 0.200 0.796
#> SRR2532368 2 0.0424 0.965 0.000 0.992 0.008
#> SRR2532367 2 0.0424 0.965 0.000 0.992 0.008
#> SRR2532366 1 0.0237 0.903 0.996 0.000 0.004
#> SRR2532365 2 0.2261 0.958 0.000 0.932 0.068
#> SRR2532364 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532363 2 0.0592 0.964 0.000 0.988 0.012
#> SRR2532362 2 0.0592 0.964 0.000 0.988 0.012
#> SRR2532361 1 0.3340 0.884 0.880 0.000 0.120
#> SRR2532360 1 0.3412 0.889 0.876 0.000 0.124
#> SRR2532359 1 0.2711 0.897 0.912 0.000 0.088
#> SRR2532358 3 0.4974 0.814 0.236 0.000 0.764
#> SRR2532357 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532356 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532355 3 0.5621 0.723 0.308 0.000 0.692
#> SRR2532354 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532353 3 0.4555 0.827 0.200 0.000 0.800
#> SRR2532352 2 0.1163 0.966 0.000 0.972 0.028
#> SRR2532350 3 0.5058 0.810 0.244 0.000 0.756
#> SRR2532349 3 0.4702 0.825 0.212 0.000 0.788
#> SRR2532348 3 0.4575 0.580 0.004 0.184 0.812
#> SRR2532347 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532346 3 0.4682 0.573 0.004 0.192 0.804
#> SRR2532345 2 0.2066 0.959 0.000 0.940 0.060
#> SRR2532344 3 0.4629 0.822 0.188 0.004 0.808
#> SRR2532343 3 0.4555 0.827 0.200 0.000 0.800
#> SRR2532342 1 0.4555 0.780 0.800 0.000 0.200
#> SRR2532341 3 0.4555 0.827 0.200 0.000 0.800
#> SRR2532340 3 0.5058 0.810 0.244 0.000 0.756
#> SRR2532339 2 0.0592 0.964 0.000 0.988 0.012
#> SRR2532338 2 0.2878 0.943 0.000 0.904 0.096
#> SRR2532337 2 0.0000 0.965 0.000 1.000 0.000
#> SRR2532336 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532335 3 0.4750 0.824 0.216 0.000 0.784
#> SRR2532334 3 0.5098 0.806 0.248 0.000 0.752
#> SRR2532333 3 0.4228 0.611 0.008 0.148 0.844
#> SRR2532332 1 0.0000 0.903 1.000 0.000 0.000
#> SRR2532331 2 0.2066 0.959 0.000 0.940 0.060
#> SRR2532330 2 0.3116 0.933 0.000 0.892 0.108
#> SRR2532329 2 0.2066 0.960 0.000 0.940 0.060
#> SRR2532328 3 0.4887 0.814 0.228 0.000 0.772
#> SRR2532327 2 0.0237 0.965 0.000 0.996 0.004
#> SRR2532326 3 0.4555 0.827 0.200 0.000 0.800
#> SRR2532324 2 0.1163 0.966 0.000 0.972 0.028
#> SRR2532325 1 0.5968 0.314 0.636 0.000 0.364
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532322 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532321 2 0.1209 0.9019 0.000 0.964 0.004 0.032
#> SRR2532320 2 0.0336 0.9061 0.000 0.992 0.000 0.008
#> SRR2532319 3 0.5212 0.6722 0.028 0.112 0.788 0.072
#> SRR2532317 2 0.8251 0.2606 0.036 0.472 0.316 0.176
#> SRR2532318 2 0.5479 0.7716 0.028 0.768 0.072 0.132
#> SRR2532315 4 0.5066 0.8539 0.148 0.000 0.088 0.764
#> SRR2532316 4 0.5066 0.8539 0.148 0.000 0.088 0.764
#> SRR2532396 2 0.0469 0.9052 0.000 0.988 0.000 0.012
#> SRR2532395 2 0.1211 0.9043 0.000 0.960 0.000 0.040
#> SRR2532394 2 0.1716 0.9032 0.000 0.936 0.000 0.064
#> SRR2532393 2 0.2480 0.8833 0.008 0.904 0.000 0.088
#> SRR2532392 2 0.0817 0.9048 0.000 0.976 0.000 0.024
#> SRR2532391 3 0.0592 0.8423 0.016 0.000 0.984 0.000
#> SRR2532390 2 0.0921 0.9059 0.000 0.972 0.000 0.028
#> SRR2532389 3 0.3444 0.6935 0.184 0.000 0.816 0.000
#> SRR2532388 2 0.1302 0.9033 0.000 0.956 0.000 0.044
#> SRR2532387 2 0.0817 0.9065 0.000 0.976 0.000 0.024
#> SRR2532386 4 0.6613 0.7717 0.200 0.000 0.172 0.628
#> SRR2532384 2 0.2401 0.8833 0.004 0.904 0.000 0.092
#> SRR2532385 3 0.6338 0.4716 0.008 0.236 0.660 0.096
#> SRR2532383 2 0.1302 0.9032 0.000 0.956 0.000 0.044
#> SRR2532381 4 0.7771 0.5059 0.328 0.000 0.252 0.420
#> SRR2532382 1 0.5421 0.5893 0.724 0.000 0.076 0.200
#> SRR2532379 4 0.5066 0.8539 0.148 0.000 0.088 0.764
#> SRR2532380 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532378 1 0.3024 0.7732 0.852 0.000 0.148 0.000
#> SRR2532377 2 0.1557 0.9004 0.000 0.944 0.000 0.056
#> SRR2532376 2 0.4739 0.8089 0.028 0.804 0.032 0.136
#> SRR2532375 2 0.1557 0.9038 0.000 0.944 0.000 0.056
#> SRR2532374 3 0.0592 0.8422 0.016 0.000 0.984 0.000
#> SRR2532372 3 0.1004 0.8300 0.004 0.000 0.972 0.024
#> SRR2532373 2 0.0469 0.9052 0.000 0.988 0.000 0.012
#> SRR2532371 2 0.0592 0.9052 0.000 0.984 0.000 0.016
#> SRR2532370 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532369 2 0.8310 0.1920 0.036 0.448 0.340 0.176
#> SRR2532368 2 0.0817 0.9048 0.000 0.976 0.000 0.024
#> SRR2532367 2 0.0921 0.9070 0.000 0.972 0.000 0.028
#> SRR2532366 1 0.1743 0.8985 0.940 0.000 0.056 0.004
#> SRR2532365 2 0.1637 0.9034 0.000 0.940 0.000 0.060
#> SRR2532364 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532363 2 0.1209 0.9019 0.000 0.964 0.004 0.032
#> SRR2532362 2 0.0921 0.9031 0.000 0.972 0.000 0.028
#> SRR2532361 4 0.6366 0.7407 0.120 0.000 0.240 0.640
#> SRR2532360 4 0.5066 0.8539 0.148 0.000 0.088 0.764
#> SRR2532359 1 0.5540 0.5736 0.728 0.000 0.164 0.108
#> SRR2532358 3 0.0592 0.8423 0.016 0.000 0.984 0.000
#> SRR2532357 2 0.0469 0.9052 0.000 0.988 0.000 0.012
#> SRR2532356 2 0.0469 0.9052 0.000 0.988 0.000 0.012
#> SRR2532355 3 0.1902 0.8063 0.064 0.000 0.932 0.004
#> SRR2532354 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532353 3 0.0000 0.8381 0.000 0.000 1.000 0.000
#> SRR2532352 2 0.1004 0.9063 0.000 0.972 0.004 0.024
#> SRR2532350 3 0.0592 0.8423 0.016 0.000 0.984 0.000
#> SRR2532349 3 0.0469 0.8425 0.012 0.000 0.988 0.000
#> SRR2532348 2 0.8362 0.0219 0.036 0.400 0.388 0.176
#> SRR2532347 2 0.0592 0.9052 0.000 0.984 0.000 0.016
#> SRR2532346 2 0.8282 0.2007 0.036 0.452 0.340 0.172
#> SRR2532345 2 0.1824 0.8977 0.004 0.936 0.000 0.060
#> SRR2532344 3 0.4130 0.7015 0.000 0.108 0.828 0.064
#> SRR2532343 3 0.0000 0.8381 0.000 0.000 1.000 0.000
#> SRR2532342 3 0.6418 0.3313 0.216 0.000 0.644 0.140
#> SRR2532341 3 0.0469 0.8425 0.012 0.000 0.988 0.000
#> SRR2532340 3 0.0592 0.8423 0.016 0.000 0.984 0.000
#> SRR2532339 2 0.1022 0.9022 0.000 0.968 0.000 0.032
#> SRR2532338 2 0.3105 0.8846 0.012 0.896 0.032 0.060
#> SRR2532337 2 0.0469 0.9069 0.000 0.988 0.000 0.012
#> SRR2532336 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532335 3 0.0469 0.8425 0.012 0.000 0.988 0.000
#> SRR2532334 3 0.0707 0.8402 0.020 0.000 0.980 0.000
#> SRR2532333 3 0.8278 0.0452 0.032 0.368 0.424 0.176
#> SRR2532332 1 0.1118 0.9182 0.964 0.000 0.036 0.000
#> SRR2532331 2 0.1474 0.9015 0.000 0.948 0.000 0.052
#> SRR2532330 2 0.2805 0.8750 0.012 0.888 0.000 0.100
#> SRR2532329 2 0.1635 0.9037 0.008 0.948 0.000 0.044
#> SRR2532328 3 0.3105 0.7598 0.120 0.000 0.868 0.012
#> SRR2532327 2 0.0469 0.9052 0.000 0.988 0.000 0.012
#> SRR2532326 3 0.0000 0.8381 0.000 0.000 1.000 0.000
#> SRR2532324 2 0.0817 0.9067 0.000 0.976 0.000 0.024
#> SRR2532325 3 0.4250 0.5592 0.276 0.000 0.724 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0510 0.914 0.000 0.984 0.000 0.000 0.016
#> SRR2532320 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 5 0.4440 0.136 0.004 0.000 0.468 0.000 0.528
#> SRR2532317 5 0.3432 0.646 0.000 0.132 0.040 0.000 0.828
#> SRR2532318 2 0.4403 0.400 0.000 0.560 0.004 0.000 0.436
#> SRR2532315 4 0.0000 0.864 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0404 0.864 0.000 0.000 0.012 0.988 0.000
#> SRR2532396 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532395 2 0.1544 0.906 0.000 0.932 0.000 0.000 0.068
#> SRR2532394 2 0.1908 0.899 0.000 0.908 0.000 0.000 0.092
#> SRR2532393 2 0.3752 0.680 0.000 0.708 0.000 0.000 0.292
#> SRR2532392 2 0.0510 0.917 0.000 0.984 0.000 0.000 0.016
#> SRR2532391 3 0.0000 0.891 0.000 0.000 1.000 0.000 0.000
#> SRR2532390 2 0.0510 0.919 0.000 0.984 0.000 0.000 0.016
#> SRR2532389 3 0.2020 0.807 0.100 0.000 0.900 0.000 0.000
#> SRR2532388 2 0.1544 0.906 0.000 0.932 0.000 0.000 0.068
#> SRR2532387 2 0.0609 0.918 0.000 0.980 0.000 0.000 0.020
#> SRR2532386 4 0.4101 0.687 0.048 0.000 0.184 0.768 0.000
#> SRR2532384 2 0.3949 0.623 0.000 0.668 0.000 0.000 0.332
#> SRR2532385 5 0.4555 0.141 0.000 0.008 0.472 0.000 0.520
#> SRR2532383 2 0.1410 0.908 0.000 0.940 0.000 0.000 0.060
#> SRR2532381 4 0.5766 0.559 0.164 0.000 0.220 0.616 0.000
#> SRR2532382 1 0.4031 0.717 0.772 0.000 0.044 0.184 0.000
#> SRR2532379 4 0.0000 0.864 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.1792 0.862 0.916 0.000 0.084 0.000 0.000
#> SRR2532377 2 0.1732 0.901 0.000 0.920 0.000 0.000 0.080
#> SRR2532376 2 0.4420 0.370 0.000 0.548 0.004 0.000 0.448
#> SRR2532375 2 0.1608 0.904 0.000 0.928 0.000 0.000 0.072
#> SRR2532374 3 0.0162 0.891 0.004 0.000 0.996 0.000 0.000
#> SRR2532372 3 0.1197 0.867 0.000 0.000 0.952 0.000 0.048
#> SRR2532373 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532371 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532370 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.2376 0.716 0.000 0.052 0.044 0.000 0.904
#> SRR2532368 2 0.0510 0.917 0.000 0.984 0.000 0.000 0.016
#> SRR2532367 2 0.0510 0.919 0.000 0.984 0.000 0.000 0.016
#> SRR2532366 1 0.1121 0.899 0.956 0.000 0.044 0.000 0.000
#> SRR2532365 2 0.1851 0.901 0.000 0.912 0.000 0.000 0.088
#> SRR2532364 1 0.0162 0.928 0.996 0.000 0.004 0.000 0.000
#> SRR2532363 2 0.0510 0.914 0.000 0.984 0.000 0.000 0.016
#> SRR2532362 2 0.0162 0.918 0.000 0.996 0.000 0.000 0.004
#> SRR2532361 4 0.0963 0.854 0.000 0.000 0.036 0.964 0.000
#> SRR2532360 4 0.0000 0.864 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.4725 0.615 0.720 0.000 0.200 0.080 0.000
#> SRR2532358 3 0.0162 0.892 0.004 0.000 0.996 0.000 0.000
#> SRR2532357 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.0703 0.880 0.024 0.000 0.976 0.000 0.000
#> SRR2532354 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0162 0.892 0.004 0.000 0.996 0.000 0.000
#> SRR2532352 2 0.0609 0.916 0.000 0.980 0.000 0.000 0.020
#> SRR2532350 3 0.0162 0.892 0.004 0.000 0.996 0.000 0.000
#> SRR2532349 3 0.0000 0.891 0.000 0.000 1.000 0.000 0.000
#> SRR2532348 5 0.2450 0.718 0.000 0.048 0.052 0.000 0.900
#> SRR2532347 2 0.0290 0.919 0.000 0.992 0.000 0.000 0.008
#> SRR2532346 5 0.2782 0.713 0.000 0.072 0.048 0.000 0.880
#> SRR2532345 2 0.2471 0.859 0.000 0.864 0.000 0.000 0.136
#> SRR2532344 3 0.4101 0.314 0.000 0.000 0.628 0.000 0.372
#> SRR2532343 3 0.0162 0.892 0.004 0.000 0.996 0.000 0.000
#> SRR2532342 3 0.5110 0.549 0.096 0.000 0.680 0.224 0.000
#> SRR2532341 3 0.0609 0.884 0.000 0.000 0.980 0.000 0.020
#> SRR2532340 3 0.0000 0.891 0.000 0.000 1.000 0.000 0.000
#> SRR2532339 2 0.0510 0.914 0.000 0.984 0.000 0.000 0.016
#> SRR2532338 2 0.1478 0.909 0.000 0.936 0.000 0.000 0.064
#> SRR2532337 2 0.0162 0.918 0.000 0.996 0.000 0.000 0.004
#> SRR2532336 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.0404 0.888 0.000 0.000 0.988 0.000 0.012
#> SRR2532334 3 0.0000 0.891 0.000 0.000 1.000 0.000 0.000
#> SRR2532333 5 0.3578 0.698 0.000 0.048 0.132 0.000 0.820
#> SRR2532332 1 0.0000 0.930 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.1544 0.906 0.000 0.932 0.000 0.000 0.068
#> SRR2532330 2 0.4015 0.591 0.000 0.652 0.000 0.000 0.348
#> SRR2532329 2 0.1544 0.908 0.000 0.932 0.000 0.000 0.068
#> SRR2532328 3 0.4100 0.653 0.044 0.000 0.764 0.000 0.192
#> SRR2532327 2 0.0000 0.918 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 3 0.0162 0.892 0.004 0.000 0.996 0.000 0.000
#> SRR2532324 2 0.0290 0.919 0.000 0.992 0.000 0.000 0.008
#> SRR2532325 3 0.4201 0.331 0.408 0.000 0.592 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0000 0.887 1.000 0.000 0.000 0.000 0.000 NA
#> SRR2532322 1 0.0260 0.886 0.992 0.000 0.000 0.000 0.000 NA
#> SRR2532321 2 0.3804 0.634 0.000 0.656 0.000 0.000 0.008 NA
#> SRR2532320 2 0.1663 0.818 0.000 0.912 0.000 0.000 0.000 NA
#> SRR2532319 3 0.4636 0.248 0.000 0.000 0.516 0.000 0.444 NA
#> SRR2532317 5 0.2742 0.758 0.000 0.036 0.072 0.000 0.876 NA
#> SRR2532318 2 0.4757 0.120 0.000 0.484 0.000 0.000 0.468 NA
#> SRR2532315 4 0.0000 0.805 0.000 0.000 0.000 1.000 0.000 NA
#> SRR2532316 4 0.0000 0.805 0.000 0.000 0.000 1.000 0.000 NA
#> SRR2532396 2 0.1556 0.821 0.000 0.920 0.000 0.000 0.000 NA
#> SRR2532395 2 0.2662 0.807 0.000 0.856 0.000 0.000 0.024 NA
#> SRR2532394 2 0.3149 0.810 0.000 0.824 0.000 0.000 0.044 NA
#> SRR2532393 2 0.4767 0.513 0.000 0.620 0.000 0.000 0.304 NA
#> SRR2532392 2 0.3457 0.725 0.000 0.752 0.000 0.000 0.016 NA
#> SRR2532391 3 0.2178 0.791 0.000 0.000 0.868 0.000 0.000 NA
#> SRR2532390 2 0.2214 0.816 0.000 0.888 0.000 0.000 0.016 NA
#> SRR2532389 3 0.1701 0.793 0.072 0.000 0.920 0.000 0.000 NA
#> SRR2532388 2 0.2784 0.804 0.000 0.848 0.000 0.000 0.028 NA
#> SRR2532387 2 0.2250 0.819 0.000 0.888 0.000 0.000 0.020 NA
#> SRR2532386 4 0.5699 0.557 0.020 0.000 0.236 0.588 0.000 NA
#> SRR2532384 2 0.4766 0.498 0.000 0.612 0.000 0.000 0.316 NA
#> SRR2532385 3 0.4636 0.232 0.000 0.000 0.516 0.000 0.444 NA
#> SRR2532383 2 0.1745 0.824 0.000 0.924 0.000 0.000 0.020 NA
#> SRR2532381 4 0.7339 0.323 0.152 0.000 0.300 0.380 0.000 NA
#> SRR2532382 1 0.5642 0.617 0.656 0.000 0.096 0.092 0.000 NA
#> SRR2532379 4 0.0000 0.805 0.000 0.000 0.000 1.000 0.000 NA
#> SRR2532380 1 0.0260 0.886 0.992 0.000 0.000 0.000 0.000 NA
#> SRR2532378 1 0.3316 0.766 0.812 0.000 0.136 0.000 0.000 NA
#> SRR2532377 2 0.2457 0.807 0.000 0.880 0.000 0.000 0.036 NA
#> SRR2532376 5 0.4748 -0.173 0.000 0.448 0.000 0.000 0.504 NA
#> SRR2532375 2 0.2527 0.820 0.000 0.876 0.000 0.000 0.040 NA
#> SRR2532374 3 0.2135 0.793 0.000 0.000 0.872 0.000 0.000 NA
#> SRR2532372 3 0.0520 0.810 0.000 0.000 0.984 0.000 0.008 NA
#> SRR2532373 2 0.1444 0.821 0.000 0.928 0.000 0.000 0.000 NA
#> SRR2532371 2 0.1663 0.818 0.000 0.912 0.000 0.000 0.000 NA
#> SRR2532370 1 0.0000 0.887 1.000 0.000 0.000 0.000 0.000 NA
#> SRR2532369 5 0.1802 0.777 0.000 0.012 0.072 0.000 0.916 NA
#> SRR2532368 2 0.3314 0.731 0.000 0.764 0.000 0.000 0.012 NA
#> SRR2532367 2 0.2312 0.819 0.000 0.876 0.000 0.000 0.012 NA
#> SRR2532366 1 0.2404 0.824 0.884 0.000 0.080 0.000 0.000 NA
#> SRR2532365 2 0.3268 0.807 0.000 0.812 0.000 0.000 0.044 NA
#> SRR2532364 1 0.0806 0.877 0.972 0.000 0.020 0.000 0.000 NA
#> SRR2532363 2 0.3804 0.634 0.000 0.656 0.000 0.000 0.008 NA
#> SRR2532362 2 0.1812 0.815 0.000 0.912 0.000 0.000 0.008 NA
#> SRR2532361 4 0.2129 0.775 0.000 0.000 0.056 0.904 0.000 NA
#> SRR2532360 4 0.0000 0.805 0.000 0.000 0.000 1.000 0.000 NA
#> SRR2532359 1 0.5737 0.469 0.572 0.000 0.248 0.016 0.000 NA
#> SRR2532358 3 0.0146 0.809 0.000 0.000 0.996 0.000 0.000 NA
#> SRR2532357 2 0.1588 0.824 0.000 0.924 0.000 0.000 0.004 NA
#> SRR2532356 2 0.1556 0.820 0.000 0.920 0.000 0.000 0.000 NA
#> SRR2532355 3 0.0972 0.807 0.008 0.000 0.964 0.000 0.000 NA
#> SRR2532354 1 0.0547 0.884 0.980 0.000 0.000 0.000 0.000 NA
#> SRR2532353 3 0.2527 0.764 0.000 0.000 0.832 0.000 0.000 NA
#> SRR2532352 2 0.3984 0.635 0.000 0.648 0.000 0.000 0.016 NA
#> SRR2532350 3 0.2135 0.794 0.000 0.000 0.872 0.000 0.000 NA
#> SRR2532349 3 0.0632 0.811 0.000 0.000 0.976 0.000 0.000 NA
#> SRR2532348 5 0.1757 0.775 0.000 0.008 0.076 0.000 0.916 NA
#> SRR2532347 2 0.2048 0.811 0.000 0.880 0.000 0.000 0.000 NA
#> SRR2532346 5 0.1701 0.776 0.000 0.008 0.072 0.000 0.920 NA
#> SRR2532345 2 0.3172 0.777 0.000 0.832 0.000 0.000 0.076 NA
#> SRR2532344 3 0.4247 0.555 0.000 0.000 0.664 0.000 0.296 NA
#> SRR2532343 3 0.2597 0.762 0.000 0.000 0.824 0.000 0.000 NA
#> SRR2532342 3 0.5634 0.478 0.048 0.000 0.592 0.076 0.000 NA
#> SRR2532341 3 0.2092 0.794 0.000 0.000 0.876 0.000 0.000 NA
#> SRR2532340 3 0.2178 0.791 0.000 0.000 0.868 0.000 0.000 NA
#> SRR2532339 2 0.3804 0.634 0.000 0.656 0.000 0.000 0.008 NA
#> SRR2532338 2 0.2651 0.815 0.000 0.860 0.000 0.000 0.028 NA
#> SRR2532337 2 0.1625 0.831 0.000 0.928 0.000 0.000 0.012 NA
#> SRR2532336 1 0.0000 0.887 1.000 0.000 0.000 0.000 0.000 NA
#> SRR2532335 3 0.2178 0.791 0.000 0.000 0.868 0.000 0.000 NA
#> SRR2532334 3 0.0713 0.809 0.000 0.000 0.972 0.000 0.000 NA
#> SRR2532333 5 0.2706 0.687 0.000 0.008 0.160 0.000 0.832 NA
#> SRR2532332 1 0.0000 0.887 1.000 0.000 0.000 0.000 0.000 NA
#> SRR2532331 2 0.2858 0.803 0.000 0.844 0.000 0.000 0.032 NA
#> SRR2532330 2 0.4938 0.440 0.000 0.580 0.000 0.000 0.340 NA
#> SRR2532329 2 0.2361 0.823 0.000 0.884 0.000 0.000 0.028 NA
#> SRR2532328 3 0.2647 0.778 0.016 0.000 0.876 0.000 0.088 NA
#> SRR2532327 2 0.1387 0.821 0.000 0.932 0.000 0.000 0.000 NA
#> SRR2532326 3 0.2562 0.763 0.000 0.000 0.828 0.000 0.000 NA
#> SRR2532324 2 0.1970 0.824 0.000 0.900 0.000 0.000 0.008 NA
#> SRR2532325 3 0.3490 0.598 0.268 0.000 0.724 0.000 0.000 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 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 1.000 0.995 0.998 0.5059 0.494 0.494
#> 3 3 1.000 0.982 0.992 0.2429 0.867 0.733
#> 4 4 0.775 0.773 0.900 0.1504 0.826 0.575
#> 5 5 0.789 0.743 0.890 0.0885 0.800 0.412
#> 6 6 0.918 0.869 0.940 0.0373 0.902 0.602
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2532323 1 0.000 0.995 1.000 0.000
#> SRR2532322 1 0.000 0.995 1.000 0.000
#> SRR2532321 2 0.000 1.000 0.000 1.000
#> SRR2532320 2 0.000 1.000 0.000 1.000
#> SRR2532319 1 0.163 0.973 0.976 0.024
#> SRR2532317 2 0.000 1.000 0.000 1.000
#> SRR2532318 2 0.000 1.000 0.000 1.000
#> SRR2532315 1 0.000 0.995 1.000 0.000
#> SRR2532316 1 0.000 0.995 1.000 0.000
#> SRR2532396 2 0.000 1.000 0.000 1.000
#> SRR2532395 2 0.000 1.000 0.000 1.000
#> SRR2532394 2 0.000 1.000 0.000 1.000
#> SRR2532393 2 0.000 1.000 0.000 1.000
#> SRR2532392 2 0.000 1.000 0.000 1.000
#> SRR2532391 1 0.000 0.995 1.000 0.000
#> SRR2532390 2 0.000 1.000 0.000 1.000
#> SRR2532389 1 0.000 0.995 1.000 0.000
#> SRR2532388 2 0.000 1.000 0.000 1.000
#> SRR2532387 2 0.000 1.000 0.000 1.000
#> SRR2532386 1 0.000 0.995 1.000 0.000
#> SRR2532384 2 0.000 1.000 0.000 1.000
#> SRR2532385 2 0.118 0.984 0.016 0.984
#> SRR2532383 2 0.000 1.000 0.000 1.000
#> SRR2532381 1 0.000 0.995 1.000 0.000
#> SRR2532382 1 0.000 0.995 1.000 0.000
#> SRR2532379 1 0.000 0.995 1.000 0.000
#> SRR2532380 1 0.000 0.995 1.000 0.000
#> SRR2532378 1 0.000 0.995 1.000 0.000
#> SRR2532377 2 0.000 1.000 0.000 1.000
#> SRR2532376 2 0.000 1.000 0.000 1.000
#> SRR2532375 2 0.000 1.000 0.000 1.000
#> SRR2532374 1 0.000 0.995 1.000 0.000
#> SRR2532372 1 0.000 0.995 1.000 0.000
#> SRR2532373 2 0.000 1.000 0.000 1.000
#> SRR2532371 2 0.000 1.000 0.000 1.000
#> SRR2532370 1 0.000 0.995 1.000 0.000
#> SRR2532369 2 0.000 1.000 0.000 1.000
#> SRR2532368 2 0.000 1.000 0.000 1.000
#> SRR2532367 2 0.000 1.000 0.000 1.000
#> SRR2532366 1 0.000 0.995 1.000 0.000
#> SRR2532365 2 0.000 1.000 0.000 1.000
#> SRR2532364 1 0.000 0.995 1.000 0.000
#> SRR2532363 2 0.000 1.000 0.000 1.000
#> SRR2532362 2 0.000 1.000 0.000 1.000
#> SRR2532361 1 0.000 0.995 1.000 0.000
#> SRR2532360 1 0.000 0.995 1.000 0.000
#> SRR2532359 1 0.000 0.995 1.000 0.000
#> SRR2532358 1 0.000 0.995 1.000 0.000
#> SRR2532357 2 0.000 1.000 0.000 1.000
#> SRR2532356 2 0.000 1.000 0.000 1.000
#> SRR2532355 1 0.000 0.995 1.000 0.000
#> SRR2532354 1 0.000 0.995 1.000 0.000
#> SRR2532353 1 0.000 0.995 1.000 0.000
#> SRR2532352 2 0.000 1.000 0.000 1.000
#> SRR2532350 1 0.000 0.995 1.000 0.000
#> SRR2532349 1 0.000 0.995 1.000 0.000
#> SRR2532348 2 0.000 1.000 0.000 1.000
#> SRR2532347 2 0.000 1.000 0.000 1.000
#> SRR2532346 2 0.000 1.000 0.000 1.000
#> SRR2532345 2 0.000 1.000 0.000 1.000
#> SRR2532344 1 0.000 0.995 1.000 0.000
#> SRR2532343 1 0.000 0.995 1.000 0.000
#> SRR2532342 1 0.000 0.995 1.000 0.000
#> SRR2532341 1 0.000 0.995 1.000 0.000
#> SRR2532340 1 0.000 0.995 1.000 0.000
#> SRR2532339 2 0.000 1.000 0.000 1.000
#> SRR2532338 2 0.000 1.000 0.000 1.000
#> SRR2532337 2 0.000 1.000 0.000 1.000
#> SRR2532336 1 0.000 0.995 1.000 0.000
#> SRR2532335 1 0.000 0.995 1.000 0.000
#> SRR2532334 1 0.000 0.995 1.000 0.000
#> SRR2532333 2 0.000 1.000 0.000 1.000
#> SRR2532332 1 0.000 0.995 1.000 0.000
#> SRR2532331 2 0.000 1.000 0.000 1.000
#> SRR2532330 2 0.000 1.000 0.000 1.000
#> SRR2532329 2 0.000 1.000 0.000 1.000
#> SRR2532328 1 0.605 0.827 0.852 0.148
#> SRR2532327 2 0.000 1.000 0.000 1.000
#> SRR2532326 1 0.000 0.995 1.000 0.000
#> SRR2532324 2 0.000 1.000 0.000 1.000
#> SRR2532325 1 0.000 0.995 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532322 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532321 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532320 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532319 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532317 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532318 2 0.0237 0.996 0.000 0.996 0.004
#> SRR2532315 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532316 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532396 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532395 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532394 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532393 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532392 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532391 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532390 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532389 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532388 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532387 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532386 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532384 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532385 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532383 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532381 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532382 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532379 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532378 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532377 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532376 2 0.0237 0.996 0.000 0.996 0.004
#> SRR2532375 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532374 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532372 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532373 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532371 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532370 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532369 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532368 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532367 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532366 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532365 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532363 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532362 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532361 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532360 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532359 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532358 1 0.4887 0.706 0.772 0.000 0.228
#> SRR2532357 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532356 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532355 3 0.0424 0.978 0.008 0.000 0.992
#> SRR2532354 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532353 3 0.0237 0.982 0.004 0.000 0.996
#> SRR2532352 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532350 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532349 3 0.4931 0.688 0.232 0.000 0.768
#> SRR2532348 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532347 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532346 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532345 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532344 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532343 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532342 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532341 1 0.2878 0.892 0.904 0.000 0.096
#> SRR2532340 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532339 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532338 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532337 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532336 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532335 1 0.1964 0.934 0.944 0.000 0.056
#> SRR2532334 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532333 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.981 1.000 0.000 0.000
#> SRR2532331 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532330 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532329 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532328 1 0.0237 0.977 0.996 0.004 0.000
#> SRR2532327 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532326 3 0.0000 0.985 0.000 0.000 1.000
#> SRR2532324 2 0.0000 1.000 0.000 1.000 0.000
#> SRR2532325 1 0.0000 0.981 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532320 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532319 3 0.2345 0.711 0.000 0.000 0.900 0.100
#> SRR2532317 2 0.2149 0.867 0.000 0.912 0.088 0.000
#> SRR2532318 3 0.1716 0.786 0.000 0.064 0.936 0.000
#> SRR2532315 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532316 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532396 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532395 2 0.4431 0.570 0.000 0.696 0.304 0.000
#> SRR2532394 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532393 3 0.3400 0.712 0.000 0.180 0.820 0.000
#> SRR2532392 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532391 1 0.2469 0.823 0.892 0.000 0.108 0.000
#> SRR2532390 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532389 1 0.0188 0.860 0.996 0.000 0.004 0.000
#> SRR2532388 2 0.4500 0.545 0.000 0.684 0.316 0.000
#> SRR2532387 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532386 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532384 3 0.4382 0.569 0.000 0.296 0.704 0.000
#> SRR2532385 3 0.1557 0.749 0.000 0.000 0.944 0.056
#> SRR2532383 2 0.1022 0.912 0.000 0.968 0.032 0.000
#> SRR2532381 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532382 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532378 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532377 2 0.2868 0.819 0.000 0.864 0.136 0.000
#> SRR2532376 3 0.1716 0.786 0.000 0.064 0.936 0.000
#> SRR2532375 2 0.3569 0.747 0.000 0.804 0.196 0.000
#> SRR2532374 1 0.2345 0.828 0.900 0.000 0.100 0.000
#> SRR2532372 3 0.0592 0.746 0.000 0.000 0.984 0.016
#> SRR2532373 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532371 2 0.0592 0.923 0.000 0.984 0.016 0.000
#> SRR2532370 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532369 3 0.4585 0.497 0.000 0.332 0.668 0.000
#> SRR2532368 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532367 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532366 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532365 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532364 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532362 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532361 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532360 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532359 4 0.4624 0.489 0.340 0.000 0.000 0.660
#> SRR2532358 1 0.2222 0.838 0.924 0.000 0.060 0.016
#> SRR2532357 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532356 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532355 1 0.6623 0.539 0.620 0.000 0.232 0.148
#> SRR2532354 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532353 1 0.7640 0.266 0.456 0.000 0.316 0.228
#> SRR2532352 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532350 1 0.2081 0.835 0.916 0.000 0.084 0.000
#> SRR2532349 1 0.4985 0.350 0.532 0.000 0.468 0.000
#> SRR2532348 3 0.1022 0.778 0.000 0.032 0.968 0.000
#> SRR2532347 2 0.4103 0.657 0.000 0.744 0.256 0.000
#> SRR2532346 3 0.0592 0.768 0.000 0.016 0.984 0.000
#> SRR2532345 3 0.4977 0.117 0.000 0.460 0.540 0.000
#> SRR2532344 3 0.3024 0.656 0.000 0.000 0.852 0.148
#> SRR2532343 4 0.2868 0.797 0.000 0.000 0.136 0.864
#> SRR2532342 4 0.0000 0.891 0.000 0.000 0.000 1.000
#> SRR2532341 3 0.4961 -0.202 0.448 0.000 0.552 0.000
#> SRR2532340 1 0.4103 0.693 0.744 0.000 0.256 0.000
#> SRR2532339 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532338 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532337 2 0.0336 0.928 0.000 0.992 0.008 0.000
#> SRR2532336 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532335 1 0.4981 0.359 0.536 0.000 0.464 0.000
#> SRR2532334 4 0.3583 0.776 0.004 0.000 0.180 0.816
#> SRR2532333 3 0.1557 0.785 0.000 0.056 0.944 0.000
#> SRR2532332 1 0.0000 0.861 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.4843 0.343 0.000 0.604 0.396 0.000
#> SRR2532330 3 0.1792 0.784 0.000 0.068 0.932 0.000
#> SRR2532329 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532328 1 0.5746 0.314 0.572 0.396 0.032 0.000
#> SRR2532327 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532326 4 0.4989 0.218 0.000 0.000 0.472 0.528
#> SRR2532324 2 0.0000 0.932 0.000 1.000 0.000 0.000
#> SRR2532325 1 0.0000 0.861 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0162 0.9776 0.996 0.000 0.004 0.000 0.000
#> SRR2532322 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 3 0.6186 0.2347 0.000 0.000 0.452 0.136 0.412
#> SRR2532317 5 0.3837 0.5999 0.000 0.308 0.000 0.000 0.692
#> SRR2532318 5 0.0000 0.8234 0.000 0.000 0.000 0.000 1.000
#> SRR2532315 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532395 5 0.2690 0.7765 0.000 0.156 0.000 0.000 0.844
#> SRR2532394 2 0.3913 0.4416 0.000 0.676 0.000 0.000 0.324
#> SRR2532393 5 0.0162 0.8253 0.000 0.004 0.000 0.000 0.996
#> SRR2532392 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532391 3 0.2439 0.7230 0.120 0.000 0.876 0.000 0.004
#> SRR2532390 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 1 0.1043 0.9539 0.960 0.000 0.040 0.000 0.000
#> SRR2532388 5 0.1478 0.8257 0.000 0.064 0.000 0.000 0.936
#> SRR2532387 2 0.4235 0.1363 0.000 0.576 0.000 0.000 0.424
#> SRR2532386 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532384 5 0.0404 0.8278 0.000 0.012 0.000 0.000 0.988
#> SRR2532385 5 0.2329 0.6989 0.000 0.000 0.124 0.000 0.876
#> SRR2532383 5 0.4101 0.4860 0.000 0.372 0.000 0.000 0.628
#> SRR2532381 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532382 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.0404 0.9743 0.988 0.000 0.012 0.000 0.000
#> SRR2532377 5 0.2424 0.7935 0.000 0.132 0.000 0.000 0.868
#> SRR2532376 5 0.0000 0.8234 0.000 0.000 0.000 0.000 1.000
#> SRR2532375 5 0.1792 0.8188 0.000 0.084 0.000 0.000 0.916
#> SRR2532374 3 0.3928 0.5229 0.296 0.000 0.700 0.000 0.004
#> SRR2532372 3 0.0609 0.7649 0.000 0.000 0.980 0.000 0.020
#> SRR2532373 2 0.4210 0.1910 0.000 0.588 0.000 0.000 0.412
#> SRR2532371 5 0.4030 0.5252 0.000 0.352 0.000 0.000 0.648
#> SRR2532370 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0290 0.8268 0.000 0.008 0.000 0.000 0.992
#> SRR2532368 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532367 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532366 1 0.0510 0.9715 0.984 0.000 0.016 0.000 0.000
#> SRR2532365 5 0.4227 0.3662 0.000 0.420 0.000 0.000 0.580
#> SRR2532364 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532361 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.8684 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.3264 0.7932 0.820 0.000 0.016 0.164 0.000
#> SRR2532358 3 0.0162 0.7663 0.004 0.000 0.996 0.000 0.000
#> SRR2532357 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.6343 0.2338 0.420 0.000 0.472 0.080 0.028
#> SRR2532354 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.6220 0.4125 0.316 0.000 0.544 0.132 0.008
#> SRR2532352 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.0162 0.7666 0.004 0.000 0.996 0.000 0.000
#> SRR2532349 3 0.0510 0.7654 0.000 0.000 0.984 0.000 0.016
#> SRR2532348 5 0.0000 0.8234 0.000 0.000 0.000 0.000 1.000
#> SRR2532347 5 0.2813 0.7667 0.000 0.168 0.000 0.000 0.832
#> SRR2532346 5 0.0000 0.8234 0.000 0.000 0.000 0.000 1.000
#> SRR2532345 5 0.0703 0.8296 0.000 0.024 0.000 0.000 0.976
#> SRR2532344 4 0.6557 0.0721 0.000 0.000 0.352 0.440 0.208
#> SRR2532343 4 0.4555 0.0436 0.000 0.000 0.472 0.520 0.008
#> SRR2532342 4 0.0609 0.8557 0.000 0.000 0.020 0.980 0.000
#> SRR2532341 3 0.1018 0.7677 0.016 0.000 0.968 0.000 0.016
#> SRR2532340 3 0.2286 0.7310 0.108 0.000 0.888 0.000 0.004
#> SRR2532339 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.4150 0.4496 0.000 0.388 0.000 0.000 0.612
#> SRR2532336 1 0.0162 0.9762 0.996 0.000 0.004 0.000 0.000
#> SRR2532335 3 0.0807 0.7682 0.012 0.000 0.976 0.000 0.012
#> SRR2532334 3 0.1124 0.7542 0.000 0.000 0.960 0.036 0.004
#> SRR2532333 5 0.3932 0.2988 0.000 0.000 0.328 0.000 0.672
#> SRR2532332 1 0.0000 0.9786 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.0963 0.8301 0.000 0.036 0.000 0.000 0.964
#> SRR2532330 5 0.0000 0.8234 0.000 0.000 0.000 0.000 1.000
#> SRR2532329 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 2 0.6651 0.0857 0.256 0.444 0.300 0.000 0.000
#> SRR2532327 2 0.0000 0.8820 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 3 0.5438 0.3536 0.032 0.000 0.628 0.308 0.032
#> SRR2532324 2 0.3774 0.5000 0.000 0.704 0.000 0.000 0.296
#> SRR2532325 1 0.0404 0.9743 0.988 0.000 0.012 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.9805 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532322 1 0.0146 0.9822 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532321 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532320 2 0.0260 0.9899 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532319 3 0.0260 0.8292 0.000 0.000 0.992 0.000 0.008 0.000
#> SRR2532317 5 0.0405 0.9208 0.000 0.008 0.000 0.000 0.988 0.004
#> SRR2532318 5 0.1444 0.8869 0.000 0.000 0.072 0.000 0.928 0.000
#> SRR2532315 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532395 5 0.0260 0.9211 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532394 5 0.2697 0.7652 0.000 0.188 0.000 0.000 0.812 0.000
#> SRR2532393 5 0.0000 0.9204 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532391 6 0.0725 0.8239 0.012 0.000 0.012 0.000 0.000 0.976
#> SRR2532390 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532389 6 0.5147 0.0829 0.436 0.000 0.084 0.000 0.000 0.480
#> SRR2532388 5 0.0146 0.9214 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532387 5 0.2996 0.7229 0.000 0.228 0.000 0.000 0.772 0.000
#> SRR2532386 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532384 5 0.0000 0.9204 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532385 5 0.3838 0.2395 0.000 0.000 0.448 0.000 0.552 0.000
#> SRR2532383 5 0.1141 0.9038 0.000 0.052 0.000 0.000 0.948 0.000
#> SRR2532381 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532382 1 0.0146 0.9822 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532379 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0146 0.9822 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532378 1 0.0260 0.9788 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR2532377 5 0.0146 0.9214 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532376 5 0.1444 0.8871 0.000 0.000 0.072 0.000 0.928 0.000
#> SRR2532375 5 0.0146 0.9214 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532374 6 0.0692 0.8200 0.020 0.000 0.004 0.000 0.000 0.976
#> SRR2532372 3 0.2454 0.7390 0.000 0.000 0.840 0.000 0.000 0.160
#> SRR2532373 5 0.1141 0.9041 0.000 0.052 0.000 0.000 0.948 0.000
#> SRR2532371 5 0.0260 0.9211 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532370 1 0.0146 0.9822 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532369 5 0.0632 0.9134 0.000 0.000 0.024 0.000 0.976 0.000
#> SRR2532368 2 0.0146 0.9948 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532367 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532366 1 0.0363 0.9766 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR2532365 5 0.1075 0.9059 0.000 0.048 0.000 0.000 0.952 0.000
#> SRR2532364 1 0.0146 0.9822 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532363 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532361 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 1.0000 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.2322 0.9082 0.904 0.000 0.048 0.024 0.000 0.024
#> SRR2532358 3 0.4238 0.1560 0.016 0.000 0.540 0.000 0.000 0.444
#> SRR2532357 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532355 3 0.0622 0.8276 0.012 0.000 0.980 0.000 0.000 0.008
#> SRR2532354 1 0.0146 0.9822 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532353 3 0.0748 0.8251 0.004 0.000 0.976 0.000 0.004 0.016
#> SRR2532352 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532350 6 0.3727 0.1957 0.000 0.000 0.388 0.000 0.000 0.612
#> SRR2532349 6 0.0790 0.8203 0.000 0.000 0.032 0.000 0.000 0.968
#> SRR2532348 5 0.0000 0.9204 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532347 5 0.0260 0.9211 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532346 5 0.1141 0.9000 0.000 0.000 0.052 0.000 0.948 0.000
#> SRR2532345 5 0.0146 0.9214 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532344 3 0.1812 0.7988 0.000 0.000 0.912 0.080 0.008 0.000
#> SRR2532343 3 0.0508 0.8302 0.000 0.000 0.984 0.012 0.004 0.000
#> SRR2532342 3 0.4356 0.2070 0.004 0.000 0.548 0.432 0.000 0.016
#> SRR2532341 6 0.0713 0.8221 0.000 0.000 0.028 0.000 0.000 0.972
#> SRR2532340 6 0.0725 0.8239 0.012 0.000 0.012 0.000 0.000 0.976
#> SRR2532339 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 5 0.1075 0.9058 0.000 0.048 0.000 0.000 0.952 0.000
#> SRR2532336 1 0.0632 0.9672 0.976 0.000 0.000 0.000 0.000 0.024
#> SRR2532335 6 0.0713 0.8221 0.000 0.000 0.028 0.000 0.000 0.972
#> SRR2532334 3 0.3151 0.6338 0.000 0.000 0.748 0.000 0.000 0.252
#> SRR2532333 3 0.1075 0.8080 0.000 0.000 0.952 0.000 0.048 0.000
#> SRR2532332 1 0.0000 0.9816 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.0146 0.9214 0.000 0.004 0.000 0.000 0.996 0.000
#> SRR2532330 5 0.2135 0.8376 0.000 0.000 0.128 0.000 0.872 0.000
#> SRR2532329 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532328 6 0.4191 0.6836 0.052 0.060 0.084 0.000 0.008 0.796
#> SRR2532327 2 0.0000 0.9990 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.0291 0.8298 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR2532324 5 0.4793 0.5433 0.000 0.100 0.000 0.000 0.648 0.252
#> SRR2532325 1 0.1341 0.9480 0.948 0.000 0.024 0.000 0.000 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)
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 16752 rows and 81 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.998 0.963 0.981 0.5026 0.494 0.494
#> 3 3 0.806 0.842 0.915 0.1536 0.916 0.835
#> 4 4 0.655 0.579 0.822 0.1374 0.909 0.797
#> 5 5 0.648 0.587 0.754 0.0818 0.869 0.657
#> 6 6 0.740 0.676 0.852 0.0779 0.897 0.647
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
#> SRR2532323 1 0.0000 0.967 1.000 0.000
#> SRR2532322 1 0.0000 0.967 1.000 0.000
#> SRR2532321 2 0.0000 0.992 0.000 1.000
#> SRR2532320 2 0.0000 0.992 0.000 1.000
#> SRR2532319 1 0.3584 0.931 0.932 0.068
#> SRR2532317 2 0.0000 0.992 0.000 1.000
#> SRR2532318 2 0.2948 0.949 0.052 0.948
#> SRR2532315 1 0.1414 0.963 0.980 0.020
#> SRR2532316 1 0.1414 0.963 0.980 0.020
#> SRR2532396 2 0.0000 0.992 0.000 1.000
#> SRR2532395 2 0.0000 0.992 0.000 1.000
#> SRR2532394 2 0.0000 0.992 0.000 1.000
#> SRR2532393 2 0.0000 0.992 0.000 1.000
#> SRR2532392 2 0.0000 0.992 0.000 1.000
#> SRR2532391 1 0.2043 0.961 0.968 0.032
#> SRR2532390 2 0.0000 0.992 0.000 1.000
#> SRR2532389 1 0.3584 0.925 0.932 0.068
#> SRR2532388 2 0.0000 0.992 0.000 1.000
#> SRR2532387 2 0.0000 0.992 0.000 1.000
#> SRR2532386 1 0.0000 0.967 1.000 0.000
#> SRR2532384 2 0.0000 0.992 0.000 1.000
#> SRR2532385 2 0.0938 0.983 0.012 0.988
#> SRR2532383 2 0.0000 0.992 0.000 1.000
#> SRR2532381 1 0.0000 0.967 1.000 0.000
#> SRR2532382 1 0.0000 0.967 1.000 0.000
#> SRR2532379 1 0.1414 0.963 0.980 0.020
#> SRR2532380 1 0.0000 0.967 1.000 0.000
#> SRR2532378 1 0.0000 0.967 1.000 0.000
#> SRR2532377 2 0.0000 0.992 0.000 1.000
#> SRR2532376 2 0.2948 0.949 0.052 0.948
#> SRR2532375 2 0.0000 0.992 0.000 1.000
#> SRR2532374 1 0.2043 0.961 0.968 0.032
#> SRR2532372 1 0.1184 0.967 0.984 0.016
#> SRR2532373 2 0.0376 0.989 0.004 0.996
#> SRR2532371 2 0.0000 0.992 0.000 1.000
#> SRR2532370 1 0.0000 0.967 1.000 0.000
#> SRR2532369 2 0.0000 0.992 0.000 1.000
#> SRR2532368 2 0.0000 0.992 0.000 1.000
#> SRR2532367 2 0.0000 0.992 0.000 1.000
#> SRR2532366 1 0.0000 0.967 1.000 0.000
#> SRR2532365 2 0.0000 0.992 0.000 1.000
#> SRR2532364 1 0.0000 0.967 1.000 0.000
#> SRR2532363 2 0.0000 0.992 0.000 1.000
#> SRR2532362 2 0.0000 0.992 0.000 1.000
#> SRR2532361 1 0.1414 0.963 0.980 0.020
#> SRR2532360 1 0.1414 0.963 0.980 0.020
#> SRR2532359 1 0.0000 0.967 1.000 0.000
#> SRR2532358 1 0.9922 0.215 0.552 0.448
#> SRR2532357 2 0.0000 0.992 0.000 1.000
#> SRR2532356 2 0.0000 0.992 0.000 1.000
#> SRR2532355 1 0.1184 0.967 0.984 0.016
#> SRR2532354 1 0.0000 0.967 1.000 0.000
#> SRR2532353 1 0.1184 0.967 0.984 0.016
#> SRR2532352 2 0.0000 0.992 0.000 1.000
#> SRR2532350 1 0.2043 0.961 0.968 0.032
#> SRR2532349 1 0.1184 0.967 0.984 0.016
#> SRR2532348 2 0.2948 0.949 0.052 0.948
#> SRR2532347 2 0.0000 0.992 0.000 1.000
#> SRR2532346 2 0.2948 0.949 0.052 0.948
#> SRR2532345 2 0.0000 0.992 0.000 1.000
#> SRR2532344 1 0.4815 0.896 0.896 0.104
#> SRR2532343 1 0.1184 0.967 0.984 0.016
#> SRR2532342 1 0.0000 0.967 1.000 0.000
#> SRR2532341 1 0.2043 0.961 0.968 0.032
#> SRR2532340 1 0.2043 0.961 0.968 0.032
#> SRR2532339 2 0.0000 0.992 0.000 1.000
#> SRR2532338 2 0.0000 0.992 0.000 1.000
#> SRR2532337 2 0.0000 0.992 0.000 1.000
#> SRR2532336 1 0.0000 0.967 1.000 0.000
#> SRR2532335 1 0.2043 0.961 0.968 0.032
#> SRR2532334 1 0.1184 0.967 0.984 0.016
#> SRR2532333 2 0.2948 0.949 0.052 0.948
#> SRR2532332 1 0.0000 0.967 1.000 0.000
#> SRR2532331 2 0.0000 0.992 0.000 1.000
#> SRR2532330 2 0.2236 0.962 0.036 0.964
#> SRR2532329 2 0.0376 0.989 0.004 0.996
#> SRR2532328 1 0.6247 0.826 0.844 0.156
#> SRR2532327 2 0.0000 0.992 0.000 1.000
#> SRR2532326 1 0.1184 0.967 0.984 0.016
#> SRR2532324 2 0.0000 0.992 0.000 1.000
#> SRR2532325 1 0.0000 0.967 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.5397 0.5502 0.720 0.000 0.280
#> SRR2532322 1 0.2878 0.8250 0.904 0.000 0.096
#> SRR2532321 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532319 1 0.2599 0.7876 0.932 0.052 0.016
#> SRR2532317 2 0.1289 0.9521 0.000 0.968 0.032
#> SRR2532318 2 0.3669 0.8950 0.064 0.896 0.040
#> SRR2532315 3 0.5678 0.9109 0.316 0.000 0.684
#> SRR2532316 3 0.5678 0.9109 0.316 0.000 0.684
#> SRR2532396 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532391 1 0.2063 0.8225 0.948 0.008 0.044
#> SRR2532390 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532389 1 0.5588 0.6394 0.720 0.004 0.276
#> SRR2532388 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532386 1 0.6204 -0.0382 0.576 0.000 0.424
#> SRR2532384 2 0.0592 0.9623 0.000 0.988 0.012
#> SRR2532385 2 0.1860 0.9412 0.000 0.948 0.052
#> SRR2532383 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532381 1 0.6204 -0.0382 0.576 0.000 0.424
#> SRR2532382 1 0.5760 0.3971 0.672 0.000 0.328
#> SRR2532379 3 0.5678 0.9109 0.316 0.000 0.684
#> SRR2532380 1 0.3482 0.8090 0.872 0.000 0.128
#> SRR2532378 1 0.5988 0.2886 0.632 0.000 0.368
#> SRR2532377 2 0.0592 0.9623 0.000 0.988 0.012
#> SRR2532376 2 0.3669 0.8950 0.064 0.896 0.040
#> SRR2532375 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532374 1 0.2063 0.8225 0.948 0.008 0.044
#> SRR2532372 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532373 2 0.0237 0.9653 0.004 0.996 0.000
#> SRR2532371 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532370 1 0.3686 0.7999 0.860 0.000 0.140
#> SRR2532369 2 0.1289 0.9521 0.000 0.968 0.032
#> SRR2532368 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532366 1 0.2878 0.8250 0.904 0.000 0.096
#> SRR2532365 2 0.1163 0.9544 0.000 0.972 0.028
#> SRR2532364 1 0.2878 0.8250 0.904 0.000 0.096
#> SRR2532363 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532361 3 0.5678 0.9109 0.316 0.000 0.684
#> SRR2532360 3 0.5678 0.9109 0.316 0.000 0.684
#> SRR2532359 1 0.1964 0.8365 0.944 0.000 0.056
#> SRR2532358 2 0.9434 -0.2770 0.412 0.412 0.176
#> SRR2532357 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532355 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532354 1 0.2878 0.8250 0.904 0.000 0.096
#> SRR2532353 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532352 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532350 1 0.2063 0.8225 0.948 0.008 0.044
#> SRR2532349 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532348 2 0.3764 0.8912 0.068 0.892 0.040
#> SRR2532347 2 0.0592 0.9623 0.000 0.988 0.012
#> SRR2532346 2 0.3764 0.8912 0.068 0.892 0.040
#> SRR2532345 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532344 1 0.3694 0.7576 0.896 0.052 0.052
#> SRR2532343 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532342 1 0.1964 0.8365 0.944 0.000 0.056
#> SRR2532341 1 0.2063 0.8225 0.948 0.008 0.044
#> SRR2532340 1 0.2063 0.8225 0.948 0.008 0.044
#> SRR2532339 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532336 1 0.3482 0.8090 0.872 0.000 0.128
#> SRR2532335 1 0.2063 0.8225 0.948 0.008 0.044
#> SRR2532334 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532333 2 0.3764 0.8912 0.068 0.892 0.040
#> SRR2532332 1 0.2878 0.8250 0.904 0.000 0.096
#> SRR2532331 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532330 2 0.2537 0.9160 0.000 0.920 0.080
#> SRR2532329 2 0.0237 0.9653 0.004 0.996 0.000
#> SRR2532328 3 0.2200 0.6523 0.056 0.004 0.940
#> SRR2532327 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532326 1 0.0592 0.8350 0.988 0.000 0.012
#> SRR2532324 2 0.0000 0.9671 0.000 1.000 0.000
#> SRR2532325 1 0.2878 0.8250 0.904 0.000 0.096
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.5742 0.35424 0.648 0.000 0.052 0.300
#> SRR2532322 1 0.3279 0.75511 0.872 0.000 0.096 0.032
#> SRR2532321 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532320 2 0.0707 0.74915 0.000 0.980 0.020 0.000
#> SRR2532319 1 0.3712 0.74777 0.868 0.024 0.028 0.080
#> SRR2532317 2 0.3444 0.54812 0.000 0.816 0.184 0.000
#> SRR2532318 2 0.5732 0.23943 0.064 0.672 0.264 0.000
#> SRR2532315 4 0.3024 0.80053 0.148 0.000 0.000 0.852
#> SRR2532316 4 0.3024 0.80053 0.148 0.000 0.000 0.852
#> SRR2532396 2 0.1716 0.71635 0.000 0.936 0.064 0.000
#> SRR2532395 2 0.4955 -0.64006 0.000 0.556 0.444 0.000
#> SRR2532394 2 0.1716 0.71635 0.000 0.936 0.064 0.000
#> SRR2532393 2 0.4941 -0.62333 0.000 0.564 0.436 0.000
#> SRR2532392 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532391 1 0.2966 0.77524 0.896 0.008 0.020 0.076
#> SRR2532390 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532389 1 0.6121 0.60696 0.680 0.000 0.164 0.156
#> SRR2532388 2 0.4948 -0.63063 0.000 0.560 0.440 0.000
#> SRR2532387 2 0.4040 0.29321 0.000 0.752 0.248 0.000
#> SRR2532386 4 0.5937 0.26924 0.472 0.000 0.036 0.492
#> SRR2532384 3 0.4967 0.89232 0.000 0.452 0.548 0.000
#> SRR2532385 3 0.5310 0.90994 0.000 0.412 0.576 0.012
#> SRR2532383 2 0.0817 0.74481 0.000 0.976 0.024 0.000
#> SRR2532381 4 0.5937 0.26924 0.472 0.000 0.036 0.492
#> SRR2532382 1 0.5756 0.10897 0.592 0.000 0.036 0.372
#> SRR2532379 4 0.3024 0.80053 0.148 0.000 0.000 0.852
#> SRR2532380 1 0.4231 0.72069 0.824 0.000 0.096 0.080
#> SRR2532378 1 0.5847 0.00105 0.560 0.000 0.036 0.404
#> SRR2532377 2 0.2868 0.63113 0.000 0.864 0.136 0.000
#> SRR2532376 2 0.5732 0.23943 0.064 0.672 0.264 0.000
#> SRR2532375 2 0.0817 0.74492 0.000 0.976 0.024 0.000
#> SRR2532374 1 0.2966 0.77524 0.896 0.008 0.020 0.076
#> SRR2532372 1 0.1940 0.78154 0.924 0.000 0.000 0.076
#> SRR2532373 2 0.0524 0.74842 0.004 0.988 0.008 0.000
#> SRR2532371 2 0.0817 0.74492 0.000 0.976 0.024 0.000
#> SRR2532370 1 0.4426 0.70905 0.812 0.000 0.096 0.092
#> SRR2532369 3 0.4948 0.91261 0.000 0.440 0.560 0.000
#> SRR2532368 2 0.0707 0.74915 0.000 0.980 0.020 0.000
#> SRR2532367 2 0.1557 0.72399 0.000 0.944 0.056 0.000
#> SRR2532366 1 0.3279 0.75511 0.872 0.000 0.096 0.032
#> SRR2532365 2 0.3356 0.56241 0.000 0.824 0.176 0.000
#> SRR2532364 1 0.3279 0.75511 0.872 0.000 0.096 0.032
#> SRR2532363 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532362 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532361 4 0.3024 0.80053 0.148 0.000 0.000 0.852
#> SRR2532360 4 0.3024 0.80053 0.148 0.000 0.000 0.852
#> SRR2532359 1 0.2586 0.77090 0.912 0.000 0.048 0.040
#> SRR2532358 1 0.9476 -0.24796 0.344 0.108 0.304 0.244
#> SRR2532357 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532356 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532355 1 0.1940 0.78154 0.924 0.000 0.000 0.076
#> SRR2532354 1 0.3279 0.75511 0.872 0.000 0.096 0.032
#> SRR2532353 1 0.1940 0.78154 0.924 0.000 0.000 0.076
#> SRR2532352 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532350 1 0.2966 0.77524 0.896 0.008 0.020 0.076
#> SRR2532349 1 0.1940 0.78154 0.924 0.000 0.000 0.076
#> SRR2532348 2 0.5925 0.16320 0.068 0.648 0.284 0.000
#> SRR2532347 2 0.4985 -0.71841 0.000 0.532 0.468 0.000
#> SRR2532346 2 0.5925 0.16320 0.068 0.648 0.284 0.000
#> SRR2532345 2 0.2011 0.70336 0.000 0.920 0.080 0.000
#> SRR2532344 1 0.4476 0.71696 0.832 0.024 0.064 0.080
#> SRR2532343 1 0.1940 0.78154 0.924 0.000 0.000 0.076
#> SRR2532342 1 0.2586 0.77090 0.912 0.000 0.048 0.040
#> SRR2532341 1 0.2966 0.77524 0.896 0.008 0.020 0.076
#> SRR2532340 1 0.2966 0.77524 0.896 0.008 0.020 0.076
#> SRR2532339 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532338 2 0.0336 0.74841 0.000 0.992 0.008 0.000
#> SRR2532337 2 0.4948 -0.62762 0.000 0.560 0.440 0.000
#> SRR2532336 1 0.4297 0.71751 0.820 0.000 0.096 0.084
#> SRR2532335 1 0.2966 0.77524 0.896 0.008 0.020 0.076
#> SRR2532334 1 0.2011 0.78177 0.920 0.000 0.000 0.080
#> SRR2532333 2 0.5925 0.16320 0.068 0.648 0.284 0.000
#> SRR2532332 1 0.3279 0.75511 0.872 0.000 0.096 0.032
#> SRR2532331 2 0.0817 0.74492 0.000 0.976 0.024 0.000
#> SRR2532330 3 0.6197 0.86560 0.000 0.400 0.544 0.056
#> SRR2532329 2 0.0376 0.74839 0.004 0.992 0.004 0.000
#> SRR2532328 4 0.4836 0.55780 0.008 0.000 0.320 0.672
#> SRR2532327 2 0.0336 0.74877 0.000 0.992 0.008 0.000
#> SRR2532326 1 0.1940 0.78154 0.924 0.000 0.000 0.076
#> SRR2532324 2 0.0817 0.74492 0.000 0.976 0.024 0.000
#> SRR2532325 1 0.3279 0.75511 0.872 0.000 0.096 0.032
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.6626 0.4542 0.456 0.000 0.272 0.272 0.000
#> SRR2532322 1 0.4306 0.5898 0.508 0.000 0.492 0.000 0.000
#> SRR2532321 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.0510 0.8084 0.000 0.984 0.000 0.000 0.016
#> SRR2532319 3 0.1772 0.7142 0.000 0.020 0.940 0.008 0.032
#> SRR2532317 2 0.3816 0.4795 0.000 0.696 0.000 0.000 0.304
#> SRR2532318 2 0.5473 0.0726 0.000 0.520 0.064 0.000 0.416
#> SRR2532315 4 0.3196 0.8085 0.004 0.000 0.192 0.804 0.000
#> SRR2532316 4 0.3196 0.8085 0.004 0.000 0.192 0.804 0.000
#> SRR2532396 2 0.2020 0.7644 0.000 0.900 0.000 0.000 0.100
#> SRR2532395 5 0.4138 0.7703 0.000 0.384 0.000 0.000 0.616
#> SRR2532394 2 0.2020 0.7644 0.000 0.900 0.000 0.000 0.100
#> SRR2532393 5 0.4101 0.7721 0.000 0.372 0.000 0.000 0.628
#> SRR2532392 2 0.0162 0.8087 0.000 0.996 0.000 0.000 0.004
#> SRR2532391 3 0.1644 0.7456 0.000 0.008 0.940 0.048 0.004
#> SRR2532390 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 3 0.6845 -0.3011 0.284 0.000 0.500 0.196 0.020
#> SRR2532388 5 0.4182 0.7348 0.000 0.400 0.000 0.000 0.600
#> SRR2532387 2 0.4088 0.1117 0.000 0.632 0.000 0.000 0.368
#> SRR2532386 4 0.6564 0.1562 0.296 0.000 0.236 0.468 0.000
#> SRR2532384 5 0.3143 0.8074 0.000 0.204 0.000 0.000 0.796
#> SRR2532385 5 0.3211 0.7813 0.000 0.164 0.004 0.008 0.824
#> SRR2532383 2 0.1410 0.7959 0.000 0.940 0.000 0.000 0.060
#> SRR2532381 4 0.6564 0.1562 0.296 0.000 0.236 0.468 0.000
#> SRR2532382 1 0.6697 0.2681 0.404 0.000 0.244 0.352 0.000
#> SRR2532379 4 0.3196 0.8085 0.004 0.000 0.192 0.804 0.000
#> SRR2532380 1 0.5283 0.6197 0.508 0.000 0.444 0.048 0.000
#> SRR2532378 1 0.6546 0.2106 0.424 0.000 0.200 0.376 0.000
#> SRR2532377 2 0.3177 0.6439 0.000 0.792 0.000 0.000 0.208
#> SRR2532376 2 0.5473 0.0726 0.000 0.520 0.064 0.000 0.416
#> SRR2532375 2 0.1121 0.8037 0.000 0.956 0.000 0.000 0.044
#> SRR2532374 3 0.1644 0.7456 0.000 0.008 0.940 0.048 0.004
#> SRR2532372 3 0.0162 0.7524 0.000 0.000 0.996 0.004 0.000
#> SRR2532373 2 0.1041 0.8060 0.000 0.964 0.004 0.000 0.032
#> SRR2532371 2 0.1410 0.7965 0.000 0.940 0.000 0.000 0.060
#> SRR2532370 1 0.5450 0.6169 0.496 0.000 0.444 0.060 0.000
#> SRR2532369 5 0.3039 0.7983 0.000 0.192 0.000 0.000 0.808
#> SRR2532368 2 0.0510 0.8084 0.000 0.984 0.000 0.000 0.016
#> SRR2532367 2 0.1608 0.7808 0.000 0.928 0.000 0.000 0.072
#> SRR2532366 1 0.4307 0.5777 0.500 0.000 0.500 0.000 0.000
#> SRR2532365 2 0.3752 0.5027 0.000 0.708 0.000 0.000 0.292
#> SRR2532364 1 0.4306 0.5898 0.508 0.000 0.492 0.000 0.000
#> SRR2532363 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532361 4 0.3196 0.8085 0.004 0.000 0.192 0.804 0.000
#> SRR2532360 4 0.3196 0.8085 0.004 0.000 0.192 0.804 0.000
#> SRR2532359 3 0.4522 -0.1015 0.316 0.000 0.660 0.024 0.000
#> SRR2532358 3 0.6803 -0.2117 0.004 0.008 0.412 0.172 0.404
#> SRR2532357 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.0162 0.7524 0.000 0.000 0.996 0.004 0.000
#> SRR2532354 1 0.4306 0.5898 0.508 0.000 0.492 0.000 0.000
#> SRR2532353 3 0.0162 0.7524 0.000 0.000 0.996 0.004 0.000
#> SRR2532352 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.1644 0.7456 0.000 0.008 0.940 0.048 0.004
#> SRR2532349 3 0.0162 0.7524 0.000 0.000 0.996 0.004 0.000
#> SRR2532348 2 0.5551 -0.0212 0.000 0.488 0.068 0.000 0.444
#> SRR2532347 5 0.3983 0.8031 0.000 0.340 0.000 0.000 0.660
#> SRR2532346 2 0.5551 -0.0212 0.000 0.488 0.068 0.000 0.444
#> SRR2532345 2 0.2377 0.7411 0.000 0.872 0.000 0.000 0.128
#> SRR2532344 3 0.2304 0.6866 0.000 0.020 0.908 0.004 0.068
#> SRR2532343 3 0.0162 0.7524 0.000 0.000 0.996 0.004 0.000
#> SRR2532342 3 0.4503 -0.0833 0.312 0.000 0.664 0.024 0.000
#> SRR2532341 3 0.1644 0.7456 0.000 0.008 0.940 0.048 0.004
#> SRR2532340 3 0.1644 0.7456 0.000 0.008 0.940 0.048 0.004
#> SRR2532339 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8080 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.4150 0.7644 0.000 0.388 0.000 0.000 0.612
#> SRR2532336 1 0.5393 0.6194 0.504 0.000 0.440 0.056 0.000
#> SRR2532335 3 0.1644 0.7456 0.000 0.008 0.940 0.048 0.004
#> SRR2532334 3 0.0324 0.7500 0.004 0.000 0.992 0.004 0.000
#> SRR2532333 2 0.5551 -0.0212 0.000 0.488 0.068 0.000 0.444
#> SRR2532332 1 0.4307 0.5777 0.500 0.000 0.500 0.000 0.000
#> SRR2532331 2 0.1121 0.8037 0.000 0.956 0.000 0.000 0.044
#> SRR2532330 5 0.4088 0.7771 0.000 0.168 0.000 0.056 0.776
#> SRR2532329 2 0.0566 0.8093 0.000 0.984 0.004 0.000 0.012
#> SRR2532328 1 0.6461 -0.3226 0.492 0.000 0.004 0.332 0.172
#> SRR2532327 2 0.0404 0.8089 0.000 0.988 0.000 0.000 0.012
#> SRR2532326 3 0.0162 0.7524 0.000 0.000 0.996 0.004 0.000
#> SRR2532324 2 0.1121 0.8037 0.000 0.956 0.000 0.000 0.044
#> SRR2532325 3 0.4307 -0.6236 0.496 0.000 0.504 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.3512 0.5215 0.720 0.000 0.008 0.272 0.000 0.000
#> SRR2532322 1 0.0547 0.7698 0.980 0.000 0.020 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532320 2 0.0458 0.8713 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532319 3 0.3574 0.8805 0.016 0.012 0.808 0.148 0.016 0.000
#> SRR2532317 2 0.3817 0.1559 0.000 0.568 0.000 0.000 0.432 0.000
#> SRR2532318 5 0.5337 0.3971 0.016 0.372 0.072 0.000 0.540 0.000
#> SRR2532315 4 0.0000 0.7462 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.7462 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.2597 0.7483 0.000 0.824 0.000 0.000 0.176 0.000
#> SRR2532395 5 0.3151 0.5793 0.000 0.252 0.000 0.000 0.748 0.000
#> SRR2532394 2 0.2597 0.7483 0.000 0.824 0.000 0.000 0.176 0.000
#> SRR2532393 5 0.2969 0.6033 0.000 0.224 0.000 0.000 0.776 0.000
#> SRR2532392 2 0.0458 0.8716 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532391 3 0.0000 0.8812 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532390 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532389 1 0.3874 0.5454 0.732 0.000 0.040 0.000 0.000 0.228
#> SRR2532388 5 0.3288 0.5681 0.000 0.276 0.000 0.000 0.724 0.000
#> SRR2532387 2 0.3864 -0.0426 0.000 0.520 0.000 0.000 0.480 0.000
#> SRR2532386 4 0.3843 0.0972 0.452 0.000 0.000 0.548 0.000 0.000
#> SRR2532384 5 0.0790 0.5432 0.000 0.032 0.000 0.000 0.968 0.000
#> SRR2532385 5 0.0260 0.5071 0.000 0.000 0.000 0.008 0.992 0.000
#> SRR2532383 2 0.1714 0.8392 0.000 0.908 0.000 0.000 0.092 0.000
#> SRR2532381 4 0.3843 0.0972 0.452 0.000 0.000 0.548 0.000 0.000
#> SRR2532382 1 0.3672 0.3470 0.632 0.000 0.000 0.368 0.000 0.000
#> SRR2532379 4 0.0000 0.7462 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.1616 0.7608 0.932 0.000 0.020 0.048 0.000 0.000
#> SRR2532378 1 0.3695 0.3326 0.624 0.000 0.000 0.376 0.000 0.000
#> SRR2532377 2 0.3351 0.5658 0.000 0.712 0.000 0.000 0.288 0.000
#> SRR2532376 5 0.5337 0.3971 0.016 0.372 0.072 0.000 0.540 0.000
#> SRR2532375 2 0.1387 0.8566 0.000 0.932 0.000 0.000 0.068 0.000
#> SRR2532374 3 0.0000 0.8812 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532372 3 0.2553 0.9114 0.008 0.000 0.848 0.144 0.000 0.000
#> SRR2532373 2 0.1411 0.8555 0.000 0.936 0.004 0.000 0.060 0.000
#> SRR2532371 2 0.1663 0.8462 0.000 0.912 0.000 0.000 0.088 0.000
#> SRR2532370 1 0.2046 0.7577 0.908 0.000 0.032 0.060 0.000 0.000
#> SRR2532369 5 0.0713 0.5336 0.000 0.028 0.000 0.000 0.972 0.000
#> SRR2532368 2 0.0458 0.8713 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532367 2 0.1444 0.8452 0.000 0.928 0.000 0.000 0.072 0.000
#> SRR2532366 1 0.0865 0.7707 0.964 0.000 0.036 0.000 0.000 0.000
#> SRR2532365 2 0.3789 0.2102 0.000 0.584 0.000 0.000 0.416 0.000
#> SRR2532364 1 0.0632 0.7703 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532361 4 0.0000 0.7462 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 0.7462 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.5171 0.2224 0.496 0.000 0.416 0.088 0.000 0.000
#> SRR2532358 5 0.6329 -0.1207 0.012 0.000 0.268 0.308 0.412 0.000
#> SRR2532357 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532355 3 0.2553 0.9114 0.008 0.000 0.848 0.144 0.000 0.000
#> SRR2532354 1 0.0547 0.7698 0.980 0.000 0.020 0.000 0.000 0.000
#> SRR2532353 3 0.2553 0.9114 0.008 0.000 0.848 0.144 0.000 0.000
#> SRR2532352 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532350 3 0.0000 0.8812 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532349 3 0.2553 0.9114 0.008 0.000 0.848 0.144 0.000 0.000
#> SRR2532348 5 0.5314 0.4427 0.016 0.344 0.076 0.000 0.564 0.000
#> SRR2532347 5 0.2823 0.5921 0.000 0.204 0.000 0.000 0.796 0.000
#> SRR2532346 5 0.5314 0.4427 0.016 0.344 0.076 0.000 0.564 0.000
#> SRR2532345 2 0.2454 0.7804 0.000 0.840 0.000 0.000 0.160 0.000
#> SRR2532344 3 0.3940 0.8630 0.016 0.012 0.800 0.120 0.052 0.000
#> SRR2532343 3 0.2553 0.9114 0.008 0.000 0.848 0.144 0.000 0.000
#> SRR2532342 1 0.5184 0.1723 0.480 0.000 0.432 0.088 0.000 0.000
#> SRR2532341 3 0.0000 0.8812 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532340 3 0.0000 0.8812 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532339 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8715 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 5 0.3175 0.5770 0.000 0.256 0.000 0.000 0.744 0.000
#> SRR2532336 1 0.1745 0.7579 0.924 0.000 0.020 0.056 0.000 0.000
#> SRR2532335 3 0.0000 0.8812 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532334 3 0.2653 0.9089 0.012 0.000 0.844 0.144 0.000 0.000
#> SRR2532333 5 0.5314 0.4427 0.016 0.344 0.076 0.000 0.564 0.000
#> SRR2532332 1 0.0865 0.7707 0.964 0.000 0.036 0.000 0.000 0.000
#> SRR2532331 2 0.1387 0.8566 0.000 0.932 0.000 0.000 0.068 0.000
#> SRR2532330 5 0.2278 0.5164 0.004 0.044 0.000 0.052 0.900 0.000
#> SRR2532329 2 0.0603 0.8720 0.000 0.980 0.004 0.000 0.016 0.000
#> SRR2532328 6 0.0000 0.0000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2532327 2 0.0363 0.8721 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR2532326 3 0.2553 0.9114 0.008 0.000 0.848 0.144 0.000 0.000
#> SRR2532324 2 0.1387 0.8566 0.000 0.932 0.000 0.000 0.068 0.000
#> SRR2532325 1 0.0937 0.7692 0.960 0.000 0.040 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 1.000 1.000 0.5060 0.494 0.494
#> 3 3 0.664 0.421 0.786 0.2280 0.988 0.976
#> 4 4 0.614 0.705 0.717 0.1398 0.747 0.482
#> 5 5 0.618 0.785 0.800 0.0887 0.934 0.747
#> 6 6 0.751 0.704 0.810 0.0551 0.937 0.720
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following 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
#> SRR2532323 1 0.0000 1.000 1.000 0.000
#> SRR2532322 1 0.0000 1.000 1.000 0.000
#> SRR2532321 2 0.0000 1.000 0.000 1.000
#> SRR2532320 2 0.0000 1.000 0.000 1.000
#> SRR2532319 1 0.0000 1.000 1.000 0.000
#> SRR2532317 2 0.0000 1.000 0.000 1.000
#> SRR2532318 2 0.0000 1.000 0.000 1.000
#> SRR2532315 1 0.0000 1.000 1.000 0.000
#> SRR2532316 1 0.0000 1.000 1.000 0.000
#> SRR2532396 2 0.0000 1.000 0.000 1.000
#> SRR2532395 2 0.0000 1.000 0.000 1.000
#> SRR2532394 2 0.0000 1.000 0.000 1.000
#> SRR2532393 2 0.0000 1.000 0.000 1.000
#> SRR2532392 2 0.0000 1.000 0.000 1.000
#> SRR2532391 1 0.0000 1.000 1.000 0.000
#> SRR2532390 2 0.0000 1.000 0.000 1.000
#> SRR2532389 1 0.0000 1.000 1.000 0.000
#> SRR2532388 2 0.0000 1.000 0.000 1.000
#> SRR2532387 2 0.0000 1.000 0.000 1.000
#> SRR2532386 1 0.0000 1.000 1.000 0.000
#> SRR2532384 2 0.0000 1.000 0.000 1.000
#> SRR2532385 2 0.0000 1.000 0.000 1.000
#> SRR2532383 2 0.0000 1.000 0.000 1.000
#> SRR2532381 1 0.0000 1.000 1.000 0.000
#> SRR2532382 1 0.0000 1.000 1.000 0.000
#> SRR2532379 1 0.0000 1.000 1.000 0.000
#> SRR2532380 1 0.0000 1.000 1.000 0.000
#> SRR2532378 1 0.0000 1.000 1.000 0.000
#> SRR2532377 2 0.0000 1.000 0.000 1.000
#> SRR2532376 2 0.0000 1.000 0.000 1.000
#> SRR2532375 2 0.0000 1.000 0.000 1.000
#> SRR2532374 1 0.0000 1.000 1.000 0.000
#> SRR2532372 1 0.0000 1.000 1.000 0.000
#> SRR2532373 2 0.0000 1.000 0.000 1.000
#> SRR2532371 2 0.0000 1.000 0.000 1.000
#> SRR2532370 1 0.0000 1.000 1.000 0.000
#> SRR2532369 2 0.0000 1.000 0.000 1.000
#> SRR2532368 2 0.0000 1.000 0.000 1.000
#> SRR2532367 2 0.0000 1.000 0.000 1.000
#> SRR2532366 1 0.0000 1.000 1.000 0.000
#> SRR2532365 2 0.0000 1.000 0.000 1.000
#> SRR2532364 1 0.0000 1.000 1.000 0.000
#> SRR2532363 2 0.0000 1.000 0.000 1.000
#> SRR2532362 2 0.0000 1.000 0.000 1.000
#> SRR2532361 1 0.0000 1.000 1.000 0.000
#> SRR2532360 1 0.0000 1.000 1.000 0.000
#> SRR2532359 1 0.0000 1.000 1.000 0.000
#> SRR2532358 1 0.0000 1.000 1.000 0.000
#> SRR2532357 2 0.0000 1.000 0.000 1.000
#> SRR2532356 2 0.0000 1.000 0.000 1.000
#> SRR2532355 1 0.0000 1.000 1.000 0.000
#> SRR2532354 1 0.0000 1.000 1.000 0.000
#> SRR2532353 1 0.0000 1.000 1.000 0.000
#> SRR2532352 2 0.0000 1.000 0.000 1.000
#> SRR2532350 1 0.0000 1.000 1.000 0.000
#> SRR2532349 1 0.0000 1.000 1.000 0.000
#> SRR2532348 2 0.0000 1.000 0.000 1.000
#> SRR2532347 2 0.0000 1.000 0.000 1.000
#> SRR2532346 2 0.0000 1.000 0.000 1.000
#> SRR2532345 2 0.0000 1.000 0.000 1.000
#> SRR2532344 1 0.0000 1.000 1.000 0.000
#> SRR2532343 1 0.0000 1.000 1.000 0.000
#> SRR2532342 1 0.0000 1.000 1.000 0.000
#> SRR2532341 1 0.0000 1.000 1.000 0.000
#> SRR2532340 1 0.0000 1.000 1.000 0.000
#> SRR2532339 2 0.0000 1.000 0.000 1.000
#> SRR2532338 2 0.0000 1.000 0.000 1.000
#> SRR2532337 2 0.0000 1.000 0.000 1.000
#> SRR2532336 1 0.0000 1.000 1.000 0.000
#> SRR2532335 1 0.0000 1.000 1.000 0.000
#> SRR2532334 1 0.0000 1.000 1.000 0.000
#> SRR2532333 2 0.0000 1.000 0.000 1.000
#> SRR2532332 1 0.0000 1.000 1.000 0.000
#> SRR2532331 2 0.0000 1.000 0.000 1.000
#> SRR2532330 2 0.0000 1.000 0.000 1.000
#> SRR2532329 2 0.0000 1.000 0.000 1.000
#> SRR2532328 1 0.0376 0.996 0.996 0.004
#> SRR2532327 2 0.0000 1.000 0.000 1.000
#> SRR2532326 1 0.0000 1.000 1.000 0.000
#> SRR2532324 2 0.0000 1.000 0.000 1.000
#> SRR2532325 1 0.0000 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.1163 0.3412 0.972 0.000 0.028
#> SRR2532322 1 0.0000 0.3532 1.000 0.000 0.000
#> SRR2532321 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532320 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532319 1 0.6314 -0.1544 0.604 0.004 0.392
#> SRR2532317 2 0.1643 0.8253 0.000 0.956 0.044
#> SRR2532318 2 0.0592 0.8134 0.000 0.988 0.012
#> SRR2532315 1 0.6252 -0.2908 0.556 0.000 0.444
#> SRR2532316 1 0.6252 -0.2908 0.556 0.000 0.444
#> SRR2532396 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532395 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532394 2 0.1031 0.8216 0.000 0.976 0.024
#> SRR2532393 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532392 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532391 1 0.5948 -0.0798 0.640 0.000 0.360
#> SRR2532390 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532389 1 0.2261 0.3141 0.932 0.000 0.068
#> SRR2532388 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532387 2 0.2356 0.8288 0.000 0.928 0.072
#> SRR2532386 1 0.6225 -0.2945 0.568 0.000 0.432
#> SRR2532384 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532385 2 0.5706 0.3649 0.000 0.680 0.320
#> SRR2532383 2 0.3038 0.8312 0.000 0.896 0.104
#> SRR2532381 1 0.6225 -0.2945 0.568 0.000 0.432
#> SRR2532382 1 0.4399 0.1560 0.812 0.000 0.188
#> SRR2532379 1 0.6252 -0.2908 0.556 0.000 0.444
#> SRR2532380 1 0.1163 0.3412 0.972 0.000 0.028
#> SRR2532378 1 0.4654 0.1379 0.792 0.000 0.208
#> SRR2532377 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532376 2 0.0592 0.8134 0.000 0.988 0.012
#> SRR2532375 2 0.5678 0.8329 0.000 0.684 0.316
#> SRR2532374 1 0.5948 -0.0798 0.640 0.000 0.360
#> SRR2532372 1 0.6062 -0.1282 0.616 0.000 0.384
#> SRR2532373 2 0.5948 0.8296 0.000 0.640 0.360
#> SRR2532371 2 0.5785 0.8320 0.000 0.668 0.332
#> SRR2532370 1 0.0000 0.3532 1.000 0.000 0.000
#> SRR2532369 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532368 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532367 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532366 1 0.0000 0.3532 1.000 0.000 0.000
#> SRR2532365 2 0.1643 0.8253 0.000 0.956 0.044
#> SRR2532364 1 0.0000 0.3532 1.000 0.000 0.000
#> SRR2532363 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532362 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532361 1 0.6308 -0.4638 0.508 0.000 0.492
#> SRR2532360 1 0.6252 -0.2908 0.556 0.000 0.444
#> SRR2532359 1 0.3752 0.2040 0.856 0.000 0.144
#> SRR2532358 3 0.6252 0.0000 0.444 0.000 0.556
#> SRR2532357 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532356 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532355 1 0.6045 -0.1212 0.620 0.000 0.380
#> SRR2532354 1 0.1163 0.3412 0.972 0.000 0.028
#> SRR2532353 1 0.6045 -0.1212 0.620 0.000 0.380
#> SRR2532352 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532350 1 0.5988 -0.0929 0.632 0.000 0.368
#> SRR2532349 1 0.6045 -0.1212 0.620 0.000 0.380
#> SRR2532348 2 0.1289 0.8199 0.000 0.968 0.032
#> SRR2532347 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532346 2 0.1289 0.8199 0.000 0.968 0.032
#> SRR2532345 2 0.2625 0.8293 0.000 0.916 0.084
#> SRR2532344 1 0.6314 -0.1544 0.604 0.004 0.392
#> SRR2532343 1 0.6045 -0.1212 0.620 0.000 0.380
#> SRR2532342 1 0.5810 -0.1266 0.664 0.000 0.336
#> SRR2532341 1 0.7236 -0.2610 0.576 0.032 0.392
#> SRR2532340 1 0.5948 -0.0798 0.640 0.000 0.360
#> SRR2532339 2 0.6062 0.8252 0.000 0.616 0.384
#> SRR2532338 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532337 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532336 1 0.1163 0.3412 0.972 0.000 0.028
#> SRR2532335 1 0.6008 -0.0976 0.628 0.000 0.372
#> SRR2532334 1 0.6045 -0.1212 0.620 0.000 0.380
#> SRR2532333 2 0.0592 0.8134 0.000 0.988 0.012
#> SRR2532332 1 0.0000 0.3532 1.000 0.000 0.000
#> SRR2532331 2 0.5363 0.8335 0.000 0.724 0.276
#> SRR2532330 2 0.0000 0.8157 0.000 1.000 0.000
#> SRR2532329 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532328 1 0.8536 -0.1237 0.596 0.144 0.260
#> SRR2532327 2 0.6095 0.8240 0.000 0.608 0.392
#> SRR2532326 1 0.6045 -0.1212 0.620 0.000 0.380
#> SRR2532324 2 0.5905 0.8304 0.000 0.648 0.352
#> SRR2532325 1 0.0592 0.3484 0.988 0.000 0.012
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.4431 0.66493 0.696 0.000 0.304 0.000
#> SRR2532322 1 0.4543 0.65789 0.676 0.000 0.324 0.000
#> SRR2532321 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532320 4 0.5311 0.91673 0.024 0.328 0.000 0.648
#> SRR2532319 3 0.1637 0.77061 0.060 0.000 0.940 0.000
#> SRR2532317 2 0.3182 0.78602 0.028 0.876 0.000 0.096
#> SRR2532318 2 0.3027 0.82240 0.088 0.888 0.004 0.020
#> SRR2532315 1 0.7846 0.33029 0.392 0.000 0.336 0.272
#> SRR2532316 1 0.7846 0.33029 0.392 0.000 0.336 0.272
#> SRR2532396 4 0.4837 0.94235 0.004 0.348 0.000 0.648
#> SRR2532395 2 0.0000 0.85788 0.000 1.000 0.000 0.000
#> SRR2532394 2 0.0376 0.85626 0.004 0.992 0.000 0.004
#> SRR2532393 2 0.0188 0.85791 0.004 0.996 0.000 0.000
#> SRR2532392 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532391 3 0.2002 0.77851 0.020 0.000 0.936 0.044
#> SRR2532390 4 0.4624 0.94552 0.000 0.340 0.000 0.660
#> SRR2532389 1 0.6074 0.40908 0.500 0.000 0.456 0.044
#> SRR2532388 2 0.0524 0.85559 0.008 0.988 0.000 0.004
#> SRR2532387 2 0.2805 0.75804 0.012 0.888 0.000 0.100
#> SRR2532386 1 0.7808 0.31133 0.388 0.000 0.360 0.252
#> SRR2532384 2 0.0000 0.85788 0.000 1.000 0.000 0.000
#> SRR2532385 2 0.5383 0.63137 0.064 0.764 0.152 0.020
#> SRR2532383 2 0.4595 0.59190 0.044 0.780 0.000 0.176
#> SRR2532381 1 0.7808 0.31133 0.388 0.000 0.360 0.252
#> SRR2532382 1 0.2973 0.60436 0.856 0.000 0.144 0.000
#> SRR2532379 1 0.7846 0.33029 0.392 0.000 0.336 0.272
#> SRR2532380 1 0.4431 0.66493 0.696 0.000 0.304 0.000
#> SRR2532378 1 0.5250 0.58423 0.736 0.000 0.196 0.068
#> SRR2532377 2 0.0188 0.85726 0.004 0.996 0.000 0.000
#> SRR2532376 2 0.3027 0.82240 0.088 0.888 0.004 0.020
#> SRR2532375 4 0.6575 0.71126 0.080 0.412 0.000 0.508
#> SRR2532374 3 0.2926 0.76035 0.056 0.000 0.896 0.048
#> SRR2532372 3 0.2363 0.77084 0.056 0.000 0.920 0.024
#> SRR2532373 4 0.6168 0.81246 0.056 0.388 0.000 0.556
#> SRR2532371 4 0.5526 0.83637 0.020 0.416 0.000 0.564
#> SRR2532370 1 0.4543 0.65789 0.676 0.000 0.324 0.000
#> SRR2532369 2 0.0000 0.85788 0.000 1.000 0.000 0.000
#> SRR2532368 4 0.4661 0.94435 0.000 0.348 0.000 0.652
#> SRR2532367 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532366 1 0.4543 0.65789 0.676 0.000 0.324 0.000
#> SRR2532365 2 0.2021 0.82242 0.012 0.932 0.000 0.056
#> SRR2532364 1 0.4543 0.65789 0.676 0.000 0.324 0.000
#> SRR2532363 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532362 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532361 3 0.7823 -0.25299 0.320 0.000 0.408 0.272
#> SRR2532360 1 0.7846 0.33029 0.392 0.000 0.336 0.272
#> SRR2532359 3 0.5352 -0.20604 0.388 0.000 0.596 0.016
#> SRR2532358 3 0.3123 0.62067 0.156 0.000 0.844 0.000
#> SRR2532357 4 0.4605 0.94370 0.000 0.336 0.000 0.664
#> SRR2532356 4 0.4605 0.94370 0.000 0.336 0.000 0.664
#> SRR2532355 3 0.0188 0.78978 0.004 0.000 0.996 0.000
#> SRR2532354 1 0.4431 0.66493 0.696 0.000 0.304 0.000
#> SRR2532353 3 0.0188 0.78978 0.004 0.000 0.996 0.000
#> SRR2532352 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532350 3 0.1767 0.78337 0.012 0.000 0.944 0.044
#> SRR2532349 3 0.0817 0.79155 0.000 0.000 0.976 0.024
#> SRR2532348 2 0.4535 0.77290 0.104 0.812 0.004 0.080
#> SRR2532347 2 0.0000 0.85788 0.000 1.000 0.000 0.000
#> SRR2532346 2 0.4535 0.77290 0.104 0.812 0.004 0.080
#> SRR2532345 2 0.4565 0.70295 0.064 0.796 0.000 0.140
#> SRR2532344 3 0.1637 0.77061 0.060 0.000 0.940 0.000
#> SRR2532343 3 0.0188 0.78978 0.004 0.000 0.996 0.000
#> SRR2532342 3 0.2222 0.71807 0.060 0.000 0.924 0.016
#> SRR2532341 3 0.4411 0.67780 0.108 0.000 0.812 0.080
#> SRR2532340 3 0.2111 0.77524 0.024 0.000 0.932 0.044
#> SRR2532339 4 0.4643 0.94596 0.000 0.344 0.000 0.656
#> SRR2532338 4 0.4624 0.94552 0.000 0.340 0.000 0.660
#> SRR2532337 2 0.0000 0.85788 0.000 1.000 0.000 0.000
#> SRR2532336 1 0.4431 0.66493 0.696 0.000 0.304 0.000
#> SRR2532335 3 0.2840 0.76992 0.056 0.000 0.900 0.044
#> SRR2532334 3 0.0188 0.78978 0.004 0.000 0.996 0.000
#> SRR2532333 2 0.2402 0.83483 0.076 0.912 0.000 0.012
#> SRR2532332 1 0.4543 0.65789 0.676 0.000 0.324 0.000
#> SRR2532331 2 0.6611 -0.59857 0.080 0.464 0.000 0.456
#> SRR2532330 2 0.0188 0.85722 0.000 0.996 0.000 0.004
#> SRR2532329 4 0.4857 0.92903 0.008 0.324 0.000 0.668
#> SRR2532328 3 0.9645 0.00766 0.232 0.140 0.352 0.276
#> SRR2532327 4 0.4585 0.94063 0.000 0.332 0.000 0.668
#> SRR2532326 3 0.0188 0.78978 0.004 0.000 0.996 0.000
#> SRR2532324 4 0.6426 0.76955 0.072 0.392 0.000 0.536
#> SRR2532325 1 0.4978 0.64849 0.664 0.000 0.324 0.012
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.8543 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0566 0.8560 0.984 0.000 0.012 0.004 0.000
#> SRR2532321 2 0.2377 0.8614 0.000 0.872 0.000 0.000 0.128
#> SRR2532320 2 0.6022 0.7618 0.000 0.676 0.068 0.104 0.152
#> SRR2532319 3 0.4471 0.8321 0.120 0.004 0.768 0.108 0.000
#> SRR2532317 5 0.5306 0.7030 0.000 0.128 0.096 0.044 0.732
#> SRR2532318 5 0.4592 0.7929 0.000 0.008 0.108 0.120 0.764
#> SRR2532315 4 0.4541 0.9646 0.172 0.000 0.084 0.744 0.000
#> SRR2532316 4 0.4541 0.9646 0.172 0.000 0.084 0.744 0.000
#> SRR2532396 2 0.2694 0.8598 0.000 0.864 0.004 0.004 0.128
#> SRR2532395 5 0.0290 0.8453 0.000 0.008 0.000 0.000 0.992
#> SRR2532394 5 0.1329 0.8354 0.000 0.032 0.008 0.004 0.956
#> SRR2532393 5 0.0727 0.8456 0.000 0.004 0.004 0.012 0.980
#> SRR2532392 2 0.2377 0.8614 0.000 0.872 0.000 0.000 0.128
#> SRR2532391 3 0.4686 0.8383 0.188 0.052 0.744 0.016 0.000
#> SRR2532390 2 0.2280 0.8609 0.000 0.880 0.000 0.000 0.120
#> SRR2532389 1 0.5912 0.4091 0.624 0.112 0.248 0.016 0.000
#> SRR2532388 5 0.0486 0.8460 0.000 0.004 0.004 0.004 0.988
#> SRR2532387 5 0.4092 0.7221 0.000 0.104 0.020 0.064 0.812
#> SRR2532386 4 0.5266 0.9432 0.184 0.008 0.112 0.696 0.000
#> SRR2532384 5 0.0451 0.8453 0.000 0.008 0.004 0.000 0.988
#> SRR2532385 5 0.4514 0.7660 0.000 0.008 0.136 0.088 0.768
#> SRR2532383 5 0.6716 0.4283 0.000 0.228 0.088 0.092 0.592
#> SRR2532381 4 0.5266 0.9432 0.184 0.008 0.112 0.696 0.000
#> SRR2532382 1 0.2280 0.6903 0.880 0.000 0.000 0.120 0.000
#> SRR2532379 4 0.4541 0.9646 0.172 0.000 0.084 0.744 0.000
#> SRR2532380 1 0.0162 0.8541 0.996 0.000 0.000 0.004 0.000
#> SRR2532378 1 0.3819 0.4976 0.756 0.000 0.016 0.228 0.000
#> SRR2532377 5 0.0613 0.8449 0.000 0.008 0.004 0.004 0.984
#> SRR2532376 5 0.4592 0.7929 0.000 0.008 0.108 0.120 0.764
#> SRR2532375 2 0.7674 0.5298 0.000 0.484 0.116 0.156 0.244
#> SRR2532374 3 0.5065 0.7909 0.152 0.076 0.740 0.032 0.000
#> SRR2532372 3 0.2825 0.8521 0.124 0.000 0.860 0.016 0.000
#> SRR2532373 2 0.6890 0.6807 0.000 0.588 0.096 0.116 0.200
#> SRR2532371 2 0.5760 0.7320 0.000 0.660 0.028 0.092 0.220
#> SRR2532370 1 0.0807 0.8557 0.976 0.012 0.012 0.000 0.000
#> SRR2532369 5 0.0854 0.8449 0.000 0.008 0.004 0.012 0.976
#> SRR2532368 2 0.3768 0.8383 0.000 0.812 0.008 0.036 0.144
#> SRR2532367 2 0.2488 0.8616 0.000 0.872 0.000 0.004 0.124
#> SRR2532366 1 0.0912 0.8546 0.972 0.012 0.016 0.000 0.000
#> SRR2532365 5 0.3361 0.8009 0.000 0.080 0.036 0.024 0.860
#> SRR2532364 1 0.0833 0.8559 0.976 0.004 0.016 0.004 0.000
#> SRR2532363 2 0.2377 0.8614 0.000 0.872 0.000 0.000 0.128
#> SRR2532362 2 0.2563 0.8595 0.000 0.872 0.000 0.008 0.120
#> SRR2532361 4 0.4634 0.9086 0.120 0.000 0.136 0.744 0.000
#> SRR2532360 4 0.4541 0.9646 0.172 0.000 0.084 0.744 0.000
#> SRR2532359 1 0.6459 -0.0844 0.516 0.028 0.356 0.100 0.000
#> SRR2532358 3 0.5200 0.6822 0.072 0.012 0.688 0.228 0.000
#> SRR2532357 2 0.2563 0.8595 0.000 0.872 0.000 0.008 0.120
#> SRR2532356 2 0.2563 0.8595 0.000 0.872 0.000 0.008 0.120
#> SRR2532355 3 0.4683 0.8638 0.176 0.000 0.732 0.092 0.000
#> SRR2532354 1 0.0162 0.8541 0.996 0.000 0.000 0.004 0.000
#> SRR2532353 3 0.4683 0.8638 0.176 0.000 0.732 0.092 0.000
#> SRR2532352 2 0.2377 0.8614 0.000 0.872 0.000 0.000 0.128
#> SRR2532350 3 0.3742 0.8596 0.184 0.012 0.792 0.012 0.000
#> SRR2532349 3 0.3476 0.8663 0.176 0.000 0.804 0.020 0.000
#> SRR2532348 5 0.6335 0.7143 0.000 0.056 0.156 0.148 0.640
#> SRR2532347 5 0.0290 0.8453 0.000 0.008 0.000 0.000 0.992
#> SRR2532346 5 0.6335 0.7143 0.000 0.056 0.156 0.148 0.640
#> SRR2532345 5 0.7058 0.5675 0.000 0.160 0.108 0.152 0.580
#> SRR2532344 3 0.4364 0.8329 0.120 0.000 0.768 0.112 0.000
#> SRR2532343 3 0.4683 0.8638 0.176 0.000 0.732 0.092 0.000
#> SRR2532342 3 0.5541 0.8100 0.212 0.012 0.668 0.108 0.000
#> SRR2532341 3 0.3506 0.6859 0.036 0.068 0.856 0.040 0.000
#> SRR2532340 3 0.4686 0.8383 0.188 0.052 0.744 0.016 0.000
#> SRR2532339 2 0.2377 0.8614 0.000 0.872 0.000 0.000 0.128
#> SRR2532338 2 0.2280 0.8609 0.000 0.880 0.000 0.000 0.120
#> SRR2532337 5 0.0451 0.8450 0.000 0.008 0.000 0.004 0.988
#> SRR2532336 1 0.0162 0.8541 0.996 0.000 0.000 0.004 0.000
#> SRR2532335 3 0.4361 0.8251 0.144 0.052 0.784 0.020 0.000
#> SRR2532334 3 0.4683 0.8638 0.176 0.000 0.732 0.092 0.000
#> SRR2532333 5 0.4606 0.7977 0.000 0.012 0.112 0.108 0.768
#> SRR2532332 1 0.0912 0.8546 0.972 0.012 0.016 0.000 0.000
#> SRR2532331 2 0.7941 0.3819 0.000 0.416 0.124 0.160 0.300
#> SRR2532330 5 0.1364 0.8407 0.000 0.012 0.000 0.036 0.952
#> SRR2532329 2 0.3699 0.8380 0.000 0.824 0.036 0.012 0.128
#> SRR2532328 2 0.8166 0.0188 0.124 0.384 0.336 0.148 0.008
#> SRR2532327 2 0.2329 0.8615 0.000 0.876 0.000 0.000 0.124
#> SRR2532326 3 0.4683 0.8638 0.176 0.000 0.732 0.092 0.000
#> SRR2532324 2 0.7270 0.6408 0.000 0.552 0.116 0.140 0.192
#> SRR2532325 1 0.1893 0.8334 0.936 0.028 0.024 0.012 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.1075 0.913502 0.952 0.000 0.048 0.000 0.000 0.000
#> SRR2532322 1 0.1219 0.913603 0.948 0.000 0.048 0.000 0.000 0.004
#> SRR2532321 2 0.0820 0.889751 0.000 0.972 0.000 0.012 0.016 0.000
#> SRR2532320 2 0.4103 -0.097203 0.004 0.544 0.000 0.004 0.000 0.448
#> SRR2532319 3 0.2937 0.771703 0.000 0.000 0.848 0.096 0.000 0.056
#> SRR2532317 5 0.5888 0.208169 0.012 0.144 0.000 0.012 0.572 0.260
#> SRR2532318 5 0.6837 0.221825 0.008 0.052 0.040 0.068 0.476 0.356
#> SRR2532315 4 0.2573 0.947114 0.112 0.000 0.024 0.864 0.000 0.000
#> SRR2532316 4 0.2573 0.947114 0.112 0.000 0.024 0.864 0.000 0.000
#> SRR2532396 2 0.1377 0.881577 0.016 0.952 0.000 0.004 0.024 0.004
#> SRR2532395 5 0.1464 0.771499 0.000 0.036 0.000 0.004 0.944 0.016
#> SRR2532394 5 0.2477 0.736227 0.012 0.084 0.000 0.008 0.888 0.008
#> SRR2532393 5 0.1340 0.770752 0.000 0.040 0.000 0.004 0.948 0.008
#> SRR2532392 2 0.1540 0.884856 0.012 0.948 0.000 0.012 0.016 0.012
#> SRR2532391 3 0.4129 0.759296 0.044 0.000 0.776 0.012 0.016 0.152
#> SRR2532390 2 0.0405 0.889564 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR2532389 1 0.6440 0.263350 0.452 0.000 0.264 0.012 0.008 0.264
#> SRR2532388 5 0.2316 0.759539 0.016 0.040 0.000 0.000 0.904 0.040
#> SRR2532387 5 0.5134 0.475605 0.016 0.112 0.000 0.004 0.672 0.196
#> SRR2532386 4 0.4832 0.891450 0.116 0.000 0.076 0.744 0.008 0.056
#> SRR2532384 5 0.1010 0.770386 0.000 0.036 0.000 0.004 0.960 0.000
#> SRR2532385 5 0.5660 0.545910 0.004 0.020 0.064 0.064 0.680 0.168
#> SRR2532383 6 0.6387 0.349198 0.020 0.192 0.000 0.004 0.340 0.444
#> SRR2532381 4 0.4832 0.891450 0.116 0.000 0.076 0.744 0.008 0.056
#> SRR2532382 1 0.1555 0.852543 0.932 0.000 0.004 0.060 0.004 0.000
#> SRR2532379 4 0.2573 0.947114 0.112 0.000 0.024 0.864 0.000 0.000
#> SRR2532380 1 0.1219 0.913603 0.948 0.000 0.048 0.000 0.000 0.004
#> SRR2532378 1 0.3309 0.676533 0.788 0.000 0.016 0.192 0.004 0.000
#> SRR2532377 5 0.1767 0.768046 0.012 0.036 0.000 0.000 0.932 0.020
#> SRR2532376 5 0.6837 0.221825 0.008 0.052 0.040 0.068 0.476 0.356
#> SRR2532375 6 0.4917 0.496970 0.000 0.348 0.000 0.000 0.076 0.576
#> SRR2532374 3 0.4609 0.695145 0.032 0.000 0.696 0.012 0.016 0.244
#> SRR2532372 3 0.1198 0.815778 0.004 0.000 0.960 0.020 0.004 0.012
#> SRR2532373 6 0.5111 0.272849 0.008 0.456 0.000 0.004 0.048 0.484
#> SRR2532371 2 0.5026 0.321819 0.016 0.640 0.000 0.000 0.076 0.268
#> SRR2532370 1 0.1816 0.909646 0.928 0.000 0.048 0.004 0.004 0.016
#> SRR2532369 5 0.1382 0.769583 0.000 0.036 0.000 0.008 0.948 0.008
#> SRR2532368 2 0.1858 0.839725 0.000 0.912 0.000 0.000 0.012 0.076
#> SRR2532367 2 0.1109 0.887782 0.004 0.964 0.000 0.004 0.016 0.012
#> SRR2532366 1 0.1929 0.908258 0.924 0.000 0.048 0.004 0.008 0.016
#> SRR2532365 5 0.4696 0.588231 0.016 0.088 0.000 0.012 0.736 0.148
#> SRR2532364 1 0.1434 0.913204 0.940 0.000 0.048 0.000 0.000 0.012
#> SRR2532363 2 0.0820 0.889751 0.000 0.972 0.000 0.012 0.016 0.000
#> SRR2532362 2 0.1799 0.877497 0.016 0.936 0.000 0.024 0.016 0.008
#> SRR2532361 4 0.2744 0.919155 0.072 0.000 0.064 0.864 0.000 0.000
#> SRR2532360 4 0.2573 0.947114 0.112 0.000 0.024 0.864 0.000 0.000
#> SRR2532359 3 0.6409 0.213693 0.364 0.000 0.472 0.116 0.016 0.032
#> SRR2532358 3 0.4181 0.766430 0.020 0.000 0.760 0.172 0.004 0.044
#> SRR2532357 2 0.1346 0.873374 0.016 0.952 0.000 0.024 0.000 0.008
#> SRR2532356 2 0.1346 0.873374 0.016 0.952 0.000 0.024 0.000 0.008
#> SRR2532355 3 0.2772 0.817103 0.040 0.000 0.864 0.092 0.004 0.000
#> SRR2532354 1 0.1219 0.913603 0.948 0.000 0.048 0.000 0.000 0.004
#> SRR2532353 3 0.2629 0.818161 0.040 0.000 0.868 0.092 0.000 0.000
#> SRR2532352 2 0.0820 0.889751 0.000 0.972 0.000 0.012 0.016 0.000
#> SRR2532350 3 0.2384 0.809865 0.044 0.000 0.904 0.004 0.016 0.032
#> SRR2532349 3 0.1982 0.820267 0.040 0.000 0.924 0.020 0.004 0.012
#> SRR2532348 6 0.6987 0.000686 0.012 0.068 0.036 0.060 0.376 0.448
#> SRR2532347 5 0.1268 0.771205 0.000 0.036 0.000 0.004 0.952 0.008
#> SRR2532346 6 0.6913 0.008881 0.012 0.068 0.028 0.064 0.376 0.452
#> SRR2532345 6 0.6397 0.329205 0.012 0.144 0.000 0.032 0.300 0.512
#> SRR2532344 3 0.2937 0.771703 0.000 0.000 0.848 0.096 0.000 0.056
#> SRR2532343 3 0.2629 0.818161 0.040 0.000 0.868 0.092 0.000 0.000
#> SRR2532342 3 0.4496 0.751527 0.080 0.000 0.768 0.112 0.016 0.024
#> SRR2532341 3 0.4039 0.677170 0.004 0.000 0.720 0.012 0.016 0.248
#> SRR2532340 3 0.4129 0.759296 0.044 0.000 0.776 0.012 0.016 0.152
#> SRR2532339 2 0.0820 0.889751 0.000 0.972 0.000 0.012 0.016 0.000
#> SRR2532338 2 0.0622 0.889253 0.000 0.980 0.000 0.012 0.008 0.000
#> SRR2532337 5 0.1911 0.767650 0.012 0.036 0.000 0.004 0.928 0.020
#> SRR2532336 1 0.1219 0.913603 0.948 0.000 0.048 0.000 0.000 0.004
#> SRR2532335 3 0.4100 0.756406 0.040 0.000 0.776 0.012 0.016 0.156
#> SRR2532334 3 0.2629 0.818161 0.040 0.000 0.868 0.092 0.000 0.000
#> SRR2532333 5 0.6333 0.393558 0.012 0.036 0.028 0.064 0.560 0.300
#> SRR2532332 1 0.1528 0.911024 0.936 0.000 0.048 0.000 0.000 0.016
#> SRR2532331 6 0.5074 0.549741 0.000 0.296 0.000 0.000 0.108 0.596
#> SRR2532330 5 0.2174 0.761389 0.000 0.036 0.000 0.016 0.912 0.036
#> SRR2532329 2 0.2755 0.713802 0.004 0.844 0.000 0.012 0.000 0.140
#> SRR2532328 6 0.5021 0.264689 0.036 0.052 0.152 0.024 0.004 0.732
#> SRR2532327 2 0.0000 0.886221 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532326 3 0.2629 0.818161 0.040 0.000 0.868 0.092 0.000 0.000
#> SRR2532324 6 0.4847 0.375136 0.000 0.416 0.000 0.004 0.048 0.532
#> SRR2532325 1 0.2775 0.878253 0.880 0.000 0.052 0.008 0.008 0.052
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)
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 16752 rows and 81 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 1.000 1.000 0.5061 0.494 0.494
#> 3 3 0.700 0.758 0.861 0.2354 0.901 0.801
#> 4 4 0.746 0.695 0.823 0.1899 0.778 0.487
#> 5 5 0.789 0.791 0.875 0.0637 0.942 0.772
#> 6 6 0.782 0.680 0.823 0.0390 0.969 0.856
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
#> SRR2532323 1 0 1 1 0
#> SRR2532322 1 0 1 1 0
#> SRR2532321 2 0 1 0 1
#> SRR2532320 2 0 1 0 1
#> SRR2532319 1 0 1 1 0
#> SRR2532317 2 0 1 0 1
#> SRR2532318 2 0 1 0 1
#> SRR2532315 1 0 1 1 0
#> SRR2532316 1 0 1 1 0
#> SRR2532396 2 0 1 0 1
#> SRR2532395 2 0 1 0 1
#> SRR2532394 2 0 1 0 1
#> SRR2532393 2 0 1 0 1
#> SRR2532392 2 0 1 0 1
#> SRR2532391 1 0 1 1 0
#> SRR2532390 2 0 1 0 1
#> SRR2532389 1 0 1 1 0
#> SRR2532388 2 0 1 0 1
#> SRR2532387 2 0 1 0 1
#> SRR2532386 1 0 1 1 0
#> SRR2532384 2 0 1 0 1
#> SRR2532385 2 0 1 0 1
#> SRR2532383 2 0 1 0 1
#> SRR2532381 1 0 1 1 0
#> SRR2532382 1 0 1 1 0
#> SRR2532379 1 0 1 1 0
#> SRR2532380 1 0 1 1 0
#> SRR2532378 1 0 1 1 0
#> SRR2532377 2 0 1 0 1
#> SRR2532376 2 0 1 0 1
#> SRR2532375 2 0 1 0 1
#> SRR2532374 1 0 1 1 0
#> SRR2532372 1 0 1 1 0
#> SRR2532373 2 0 1 0 1
#> SRR2532371 2 0 1 0 1
#> SRR2532370 1 0 1 1 0
#> SRR2532369 2 0 1 0 1
#> SRR2532368 2 0 1 0 1
#> SRR2532367 2 0 1 0 1
#> SRR2532366 1 0 1 1 0
#> SRR2532365 2 0 1 0 1
#> SRR2532364 1 0 1 1 0
#> SRR2532363 2 0 1 0 1
#> SRR2532362 2 0 1 0 1
#> SRR2532361 1 0 1 1 0
#> SRR2532360 1 0 1 1 0
#> SRR2532359 1 0 1 1 0
#> SRR2532358 1 0 1 1 0
#> SRR2532357 2 0 1 0 1
#> SRR2532356 2 0 1 0 1
#> SRR2532355 1 0 1 1 0
#> SRR2532354 1 0 1 1 0
#> SRR2532353 1 0 1 1 0
#> SRR2532352 2 0 1 0 1
#> SRR2532350 1 0 1 1 0
#> SRR2532349 1 0 1 1 0
#> SRR2532348 2 0 1 0 1
#> SRR2532347 2 0 1 0 1
#> SRR2532346 2 0 1 0 1
#> SRR2532345 2 0 1 0 1
#> SRR2532344 1 0 1 1 0
#> SRR2532343 1 0 1 1 0
#> SRR2532342 1 0 1 1 0
#> SRR2532341 1 0 1 1 0
#> SRR2532340 1 0 1 1 0
#> SRR2532339 2 0 1 0 1
#> SRR2532338 2 0 1 0 1
#> SRR2532337 2 0 1 0 1
#> SRR2532336 1 0 1 1 0
#> SRR2532335 1 0 1 1 0
#> SRR2532334 1 0 1 1 0
#> SRR2532333 2 0 1 0 1
#> SRR2532332 1 0 1 1 0
#> SRR2532331 2 0 1 0 1
#> SRR2532330 2 0 1 0 1
#> SRR2532329 2 0 1 0 1
#> SRR2532328 1 0 1 1 0
#> SRR2532327 2 0 1 0 1
#> SRR2532326 1 0 1 1 0
#> SRR2532324 2 0 1 0 1
#> SRR2532325 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0424 0.685 0.992 0.000 0.008
#> SRR2532322 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532321 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532320 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532319 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532317 2 0.0592 0.924 0.000 0.988 0.012
#> SRR2532318 2 0.0237 0.920 0.000 0.996 0.004
#> SRR2532315 3 0.5058 0.893 0.244 0.000 0.756
#> SRR2532316 3 0.5058 0.893 0.244 0.000 0.756
#> SRR2532396 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532395 2 0.0424 0.918 0.000 0.992 0.008
#> SRR2532394 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532392 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532391 1 0.2796 0.675 0.908 0.000 0.092
#> SRR2532390 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532389 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532388 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532387 2 0.1643 0.927 0.000 0.956 0.044
#> SRR2532386 3 0.5138 0.887 0.252 0.000 0.748
#> SRR2532384 2 0.0424 0.918 0.000 0.992 0.008
#> SRR2532385 3 0.4002 0.620 0.000 0.160 0.840
#> SRR2532383 2 0.1031 0.925 0.000 0.976 0.024
#> SRR2532381 3 0.5138 0.887 0.252 0.000 0.748
#> SRR2532382 1 0.5621 0.116 0.692 0.000 0.308
#> SRR2532379 3 0.5058 0.893 0.244 0.000 0.756
#> SRR2532380 1 0.0237 0.688 0.996 0.000 0.004
#> SRR2532378 1 0.6204 -0.221 0.576 0.000 0.424
#> SRR2532377 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532376 2 0.0237 0.920 0.000 0.996 0.004
#> SRR2532375 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532374 1 0.2537 0.677 0.920 0.000 0.080
#> SRR2532372 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532373 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532371 2 0.3879 0.930 0.000 0.848 0.152
#> SRR2532370 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532369 2 0.0424 0.918 0.000 0.992 0.008
#> SRR2532368 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532367 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532366 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532365 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532363 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532362 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532361 3 0.5016 0.892 0.240 0.000 0.760
#> SRR2532360 3 0.5058 0.893 0.244 0.000 0.756
#> SRR2532359 1 0.4062 0.593 0.836 0.000 0.164
#> SRR2532358 3 0.4346 0.828 0.184 0.000 0.816
#> SRR2532357 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532356 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532355 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532354 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532353 1 0.6291 0.310 0.532 0.000 0.468
#> SRR2532352 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532350 1 0.2796 0.675 0.908 0.000 0.092
#> SRR2532349 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532348 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532347 2 0.0424 0.918 0.000 0.992 0.008
#> SRR2532346 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532345 2 0.1031 0.925 0.000 0.976 0.024
#> SRR2532344 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532343 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532342 1 0.5810 0.394 0.664 0.000 0.336
#> SRR2532341 3 0.6008 0.493 0.372 0.000 0.628
#> SRR2532340 1 0.2711 0.675 0.912 0.000 0.088
#> SRR2532339 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532338 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532337 2 0.0000 0.921 0.000 1.000 0.000
#> SRR2532336 1 0.0747 0.679 0.984 0.000 0.016
#> SRR2532335 1 0.2878 0.674 0.904 0.000 0.096
#> SRR2532334 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532333 2 0.0237 0.920 0.000 0.996 0.004
#> SRR2532332 1 0.0000 0.690 1.000 0.000 0.000
#> SRR2532331 2 0.3686 0.930 0.000 0.860 0.140
#> SRR2532330 2 0.0424 0.918 0.000 0.992 0.008
#> SRR2532329 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532328 1 0.6308 -0.253 0.508 0.000 0.492
#> SRR2532327 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532326 1 0.6192 0.424 0.580 0.000 0.420
#> SRR2532324 2 0.3941 0.930 0.000 0.844 0.156
#> SRR2532325 1 0.0000 0.690 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.1716 0.683 0.936 0.000 0.064 0.000
#> SRR2532322 1 0.0000 0.719 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532320 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532319 3 0.5942 0.376 0.412 0.000 0.548 0.040
#> SRR2532317 4 0.3873 0.807 0.000 0.228 0.000 0.772
#> SRR2532318 4 0.2125 0.919 0.000 0.076 0.004 0.920
#> SRR2532315 3 0.4194 0.491 0.172 0.000 0.800 0.028
#> SRR2532316 3 0.4194 0.491 0.172 0.000 0.800 0.028
#> SRR2532396 2 0.0817 0.955 0.000 0.976 0.000 0.024
#> SRR2532395 4 0.1867 0.921 0.000 0.072 0.000 0.928
#> SRR2532394 4 0.3942 0.797 0.000 0.236 0.000 0.764
#> SRR2532393 4 0.1940 0.921 0.000 0.076 0.000 0.924
#> SRR2532392 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532391 1 0.4728 0.508 0.752 0.000 0.216 0.032
#> SRR2532390 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532389 1 0.0000 0.719 1.000 0.000 0.000 0.000
#> SRR2532388 4 0.1940 0.921 0.000 0.076 0.000 0.924
#> SRR2532387 4 0.4431 0.674 0.000 0.304 0.000 0.696
#> SRR2532386 3 0.4182 0.486 0.180 0.000 0.796 0.024
#> SRR2532384 4 0.1867 0.921 0.000 0.072 0.000 0.928
#> SRR2532385 4 0.1022 0.845 0.000 0.000 0.032 0.968
#> SRR2532383 4 0.4992 0.273 0.000 0.476 0.000 0.524
#> SRR2532381 3 0.4182 0.486 0.180 0.000 0.796 0.024
#> SRR2532382 1 0.4643 0.302 0.656 0.000 0.344 0.000
#> SRR2532379 3 0.4194 0.491 0.172 0.000 0.800 0.028
#> SRR2532380 1 0.1302 0.698 0.956 0.000 0.044 0.000
#> SRR2532378 1 0.5126 0.144 0.552 0.000 0.444 0.004
#> SRR2532377 4 0.1940 0.921 0.000 0.076 0.000 0.924
#> SRR2532376 4 0.2125 0.919 0.000 0.076 0.004 0.920
#> SRR2532375 2 0.2469 0.859 0.000 0.892 0.000 0.108
#> SRR2532374 1 0.4139 0.560 0.800 0.000 0.176 0.024
#> SRR2532372 3 0.6087 0.371 0.412 0.000 0.540 0.048
#> SRR2532373 2 0.0188 0.969 0.000 0.996 0.000 0.004
#> SRR2532371 2 0.1792 0.912 0.000 0.932 0.000 0.068
#> SRR2532370 1 0.0000 0.719 1.000 0.000 0.000 0.000
#> SRR2532369 4 0.1867 0.921 0.000 0.072 0.000 0.928
#> SRR2532368 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532367 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532366 1 0.0000 0.719 1.000 0.000 0.000 0.000
#> SRR2532365 4 0.2973 0.881 0.000 0.144 0.000 0.856
#> SRR2532364 1 0.0000 0.719 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532362 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532361 3 0.4149 0.492 0.168 0.000 0.804 0.028
#> SRR2532360 3 0.4194 0.491 0.172 0.000 0.800 0.028
#> SRR2532359 1 0.3942 0.326 0.764 0.000 0.236 0.000
#> SRR2532358 3 0.3570 0.489 0.092 0.000 0.860 0.048
#> SRR2532357 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532356 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532355 3 0.5957 0.370 0.420 0.000 0.540 0.040
#> SRR2532354 1 0.0921 0.707 0.972 0.000 0.028 0.000
#> SRR2532353 3 0.5592 0.417 0.300 0.000 0.656 0.044
#> SRR2532352 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532350 1 0.4799 0.498 0.744 0.000 0.224 0.032
#> SRR2532349 3 0.6094 0.370 0.416 0.000 0.536 0.048
#> SRR2532348 4 0.2334 0.917 0.000 0.088 0.004 0.908
#> SRR2532347 4 0.1867 0.921 0.000 0.072 0.000 0.928
#> SRR2532346 4 0.2530 0.912 0.000 0.100 0.004 0.896
#> SRR2532345 4 0.4356 0.707 0.000 0.292 0.000 0.708
#> SRR2532344 3 0.6016 0.375 0.412 0.000 0.544 0.044
#> SRR2532343 3 0.6007 0.381 0.408 0.000 0.548 0.044
#> SRR2532342 1 0.5244 -0.235 0.556 0.000 0.436 0.008
#> SRR2532341 3 0.5489 0.203 0.296 0.000 0.664 0.040
#> SRR2532340 1 0.4365 0.543 0.784 0.000 0.188 0.028
#> SRR2532339 2 0.0188 0.971 0.000 0.996 0.000 0.004
#> SRR2532338 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532337 4 0.2011 0.920 0.000 0.080 0.000 0.920
#> SRR2532336 1 0.2011 0.668 0.920 0.000 0.080 0.000
#> SRR2532335 1 0.5067 0.486 0.736 0.000 0.216 0.048
#> SRR2532334 3 0.6024 0.373 0.416 0.000 0.540 0.044
#> SRR2532333 4 0.1940 0.921 0.000 0.076 0.000 0.924
#> SRR2532332 1 0.0000 0.719 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.4164 0.592 0.000 0.736 0.000 0.264
#> SRR2532330 4 0.1867 0.921 0.000 0.072 0.000 0.928
#> SRR2532329 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532328 1 0.5963 0.161 0.548 0.032 0.416 0.004
#> SRR2532327 2 0.0000 0.971 0.000 1.000 0.000 0.000
#> SRR2532326 3 0.6016 0.378 0.412 0.000 0.544 0.044
#> SRR2532324 2 0.0336 0.967 0.000 0.992 0.000 0.008
#> SRR2532325 1 0.0000 0.719 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0609 0.8265 0.980 0.000 0.000 0.020 0.000
#> SRR2532322 1 0.0404 0.8296 0.988 0.000 0.012 0.000 0.000
#> SRR2532321 2 0.0162 0.9380 0.004 0.996 0.000 0.000 0.000
#> SRR2532320 2 0.2082 0.9128 0.004 0.928 0.012 0.044 0.012
#> SRR2532319 3 0.1992 0.8064 0.032 0.000 0.924 0.044 0.000
#> SRR2532317 5 0.4250 0.7344 0.004 0.220 0.004 0.024 0.748
#> SRR2532318 5 0.2723 0.8724 0.008 0.008 0.044 0.040 0.900
#> SRR2532315 4 0.2770 0.9677 0.044 0.000 0.076 0.880 0.000
#> SRR2532316 4 0.2754 0.9657 0.040 0.000 0.080 0.880 0.000
#> SRR2532396 2 0.1364 0.9197 0.000 0.952 0.000 0.012 0.036
#> SRR2532395 5 0.0566 0.8860 0.000 0.012 0.000 0.004 0.984
#> SRR2532394 5 0.3630 0.7609 0.000 0.204 0.000 0.016 0.780
#> SRR2532393 5 0.0902 0.8867 0.008 0.008 0.004 0.004 0.976
#> SRR2532392 2 0.0671 0.9322 0.004 0.980 0.000 0.000 0.016
#> SRR2532391 3 0.4997 0.3417 0.404 0.000 0.568 0.020 0.008
#> SRR2532390 2 0.0000 0.9382 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 1 0.1211 0.8190 0.960 0.000 0.024 0.016 0.000
#> SRR2532388 5 0.1334 0.8858 0.004 0.012 0.004 0.020 0.960
#> SRR2532387 5 0.4323 0.6739 0.000 0.240 0.004 0.028 0.728
#> SRR2532386 4 0.2914 0.9632 0.052 0.000 0.076 0.872 0.000
#> SRR2532384 5 0.0451 0.8858 0.000 0.008 0.000 0.004 0.988
#> SRR2532385 5 0.2694 0.8558 0.004 0.000 0.076 0.032 0.888
#> SRR2532383 5 0.5701 0.4363 0.004 0.340 0.008 0.064 0.584
#> SRR2532381 4 0.2914 0.9632 0.052 0.000 0.076 0.872 0.000
#> SRR2532382 1 0.1478 0.8006 0.936 0.000 0.000 0.064 0.000
#> SRR2532379 4 0.2770 0.9677 0.044 0.000 0.076 0.880 0.000
#> SRR2532380 1 0.0510 0.8281 0.984 0.000 0.000 0.016 0.000
#> SRR2532378 1 0.4443 0.0619 0.524 0.000 0.004 0.472 0.000
#> SRR2532377 5 0.1211 0.8850 0.000 0.024 0.000 0.016 0.960
#> SRR2532376 5 0.2723 0.8724 0.008 0.008 0.044 0.040 0.900
#> SRR2532375 2 0.4876 0.7424 0.004 0.752 0.016 0.076 0.152
#> SRR2532374 1 0.5253 0.1760 0.572 0.000 0.384 0.036 0.008
#> SRR2532372 3 0.1365 0.8088 0.040 0.000 0.952 0.004 0.004
#> SRR2532373 2 0.2584 0.8970 0.000 0.900 0.008 0.052 0.040
#> SRR2532371 2 0.3896 0.8190 0.004 0.820 0.008 0.052 0.116
#> SRR2532370 1 0.0404 0.8296 0.988 0.000 0.012 0.000 0.000
#> SRR2532369 5 0.0693 0.8855 0.000 0.012 0.000 0.008 0.980
#> SRR2532368 2 0.0932 0.9314 0.000 0.972 0.004 0.020 0.004
#> SRR2532367 2 0.0162 0.9380 0.004 0.996 0.000 0.000 0.000
#> SRR2532366 1 0.0609 0.8261 0.980 0.000 0.020 0.000 0.000
#> SRR2532365 5 0.2511 0.8604 0.004 0.088 0.000 0.016 0.892
#> SRR2532364 1 0.0404 0.8296 0.988 0.000 0.012 0.000 0.000
#> SRR2532363 2 0.0162 0.9379 0.000 0.996 0.000 0.004 0.000
#> SRR2532362 2 0.0162 0.9380 0.004 0.996 0.000 0.000 0.000
#> SRR2532361 4 0.2712 0.9587 0.032 0.000 0.088 0.880 0.000
#> SRR2532360 4 0.2770 0.9677 0.044 0.000 0.076 0.880 0.000
#> SRR2532359 1 0.4599 0.5786 0.744 0.000 0.156 0.100 0.000
#> SRR2532358 4 0.4067 0.7901 0.020 0.000 0.228 0.748 0.004
#> SRR2532357 2 0.0162 0.9380 0.004 0.996 0.000 0.000 0.000
#> SRR2532356 2 0.0162 0.9380 0.004 0.996 0.000 0.000 0.000
#> SRR2532355 3 0.3269 0.8063 0.096 0.000 0.848 0.056 0.000
#> SRR2532354 1 0.0404 0.8291 0.988 0.000 0.000 0.012 0.000
#> SRR2532353 3 0.2871 0.7978 0.040 0.000 0.872 0.088 0.000
#> SRR2532352 2 0.0000 0.9382 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.4644 0.4433 0.380 0.000 0.604 0.012 0.004
#> SRR2532349 3 0.2005 0.8133 0.056 0.000 0.924 0.016 0.004
#> SRR2532348 5 0.3950 0.8520 0.004 0.040 0.072 0.048 0.836
#> SRR2532347 5 0.0566 0.8858 0.000 0.012 0.000 0.004 0.984
#> SRR2532346 5 0.3758 0.8598 0.012 0.028 0.052 0.056 0.852
#> SRR2532345 5 0.5591 0.6418 0.008 0.248 0.028 0.048 0.668
#> SRR2532344 3 0.2067 0.8054 0.032 0.000 0.920 0.048 0.000
#> SRR2532343 3 0.2661 0.8164 0.056 0.000 0.888 0.056 0.000
#> SRR2532342 3 0.5920 0.5146 0.272 0.000 0.580 0.148 0.000
#> SRR2532341 3 0.4893 0.6209 0.064 0.000 0.712 0.216 0.008
#> SRR2532340 1 0.5083 -0.1614 0.496 0.000 0.476 0.020 0.008
#> SRR2532339 2 0.0000 0.9382 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.9382 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.1216 0.8850 0.000 0.020 0.000 0.020 0.960
#> SRR2532336 1 0.0609 0.8271 0.980 0.000 0.000 0.020 0.000
#> SRR2532335 3 0.4313 0.6272 0.260 0.000 0.716 0.016 0.008
#> SRR2532334 3 0.2729 0.8167 0.060 0.000 0.884 0.056 0.000
#> SRR2532333 5 0.2353 0.8808 0.008 0.012 0.028 0.032 0.920
#> SRR2532332 1 0.0404 0.8296 0.988 0.000 0.012 0.000 0.000
#> SRR2532331 2 0.6328 0.3486 0.004 0.560 0.032 0.076 0.328
#> SRR2532330 5 0.0854 0.8858 0.004 0.012 0.000 0.008 0.976
#> SRR2532329 2 0.0486 0.9373 0.004 0.988 0.004 0.004 0.000
#> SRR2532328 1 0.5119 0.2004 0.532 0.008 0.016 0.440 0.004
#> SRR2532327 2 0.0162 0.9379 0.000 0.996 0.000 0.004 0.000
#> SRR2532326 3 0.2520 0.8155 0.048 0.000 0.896 0.056 0.000
#> SRR2532324 2 0.3455 0.8679 0.004 0.856 0.012 0.080 0.048
#> SRR2532325 1 0.0912 0.8239 0.972 0.000 0.016 0.012 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0405 0.88193 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR2532322 1 0.0291 0.88286 0.992 0.000 0.004 0.000 0.000 0.004
#> SRR2532321 2 0.0000 0.88234 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532320 2 0.3534 0.65739 0.000 0.740 0.000 0.000 0.016 0.244
#> SRR2532319 3 0.1873 0.72148 0.008 0.000 0.924 0.020 0.000 0.048
#> SRR2532317 5 0.5102 0.54742 0.000 0.228 0.000 0.000 0.624 0.148
#> SRR2532318 5 0.3996 0.62948 0.000 0.000 0.008 0.004 0.636 0.352
#> SRR2532315 4 0.0405 0.95977 0.004 0.000 0.008 0.988 0.000 0.000
#> SRR2532316 4 0.0405 0.95977 0.004 0.000 0.008 0.988 0.000 0.000
#> SRR2532396 2 0.2176 0.80807 0.000 0.896 0.000 0.000 0.080 0.024
#> SRR2532395 5 0.0508 0.76288 0.000 0.004 0.000 0.000 0.984 0.012
#> SRR2532394 5 0.3766 0.61290 0.000 0.212 0.000 0.000 0.748 0.040
#> SRR2532393 5 0.1588 0.76701 0.000 0.004 0.000 0.000 0.924 0.072
#> SRR2532392 2 0.0935 0.86946 0.000 0.964 0.000 0.000 0.032 0.004
#> SRR2532391 3 0.6106 0.22328 0.236 0.000 0.420 0.004 0.000 0.340
#> SRR2532390 2 0.0146 0.88250 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532389 1 0.0935 0.86392 0.964 0.000 0.004 0.000 0.000 0.032
#> SRR2532388 5 0.1858 0.76162 0.000 0.004 0.000 0.000 0.904 0.092
#> SRR2532387 5 0.4560 0.53790 0.000 0.200 0.000 0.000 0.692 0.108
#> SRR2532386 4 0.1230 0.94697 0.008 0.000 0.008 0.956 0.000 0.028
#> SRR2532384 5 0.0692 0.76407 0.000 0.004 0.000 0.000 0.976 0.020
#> SRR2532385 5 0.4431 0.68972 0.000 0.000 0.036 0.048 0.740 0.176
#> SRR2532383 5 0.5269 0.45002 0.000 0.248 0.000 0.000 0.596 0.156
#> SRR2532381 4 0.1230 0.94697 0.008 0.000 0.008 0.956 0.000 0.028
#> SRR2532382 1 0.1007 0.85818 0.956 0.000 0.000 0.044 0.000 0.000
#> SRR2532379 4 0.0405 0.95977 0.004 0.000 0.008 0.988 0.000 0.000
#> SRR2532380 1 0.0405 0.88193 0.988 0.000 0.000 0.004 0.000 0.008
#> SRR2532378 1 0.3995 0.10305 0.516 0.000 0.000 0.480 0.000 0.004
#> SRR2532377 5 0.1492 0.75909 0.000 0.024 0.000 0.000 0.940 0.036
#> SRR2532376 5 0.3996 0.62948 0.000 0.000 0.008 0.004 0.636 0.352
#> SRR2532375 6 0.5850 -0.13662 0.000 0.412 0.000 0.004 0.164 0.420
#> SRR2532374 6 0.6302 -0.22378 0.368 0.000 0.236 0.012 0.000 0.384
#> SRR2532372 3 0.1686 0.71608 0.000 0.000 0.924 0.012 0.000 0.064
#> SRR2532373 2 0.4639 0.54621 0.000 0.660 0.000 0.000 0.084 0.256
#> SRR2532371 2 0.5067 0.45763 0.000 0.636 0.000 0.000 0.180 0.184
#> SRR2532370 1 0.0146 0.88263 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532369 5 0.1082 0.76295 0.000 0.004 0.000 0.000 0.956 0.040
#> SRR2532368 2 0.1563 0.85196 0.000 0.932 0.000 0.000 0.012 0.056
#> SRR2532367 2 0.0622 0.87959 0.000 0.980 0.000 0.000 0.012 0.008
#> SRR2532366 1 0.0260 0.88110 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532365 5 0.3475 0.70166 0.000 0.140 0.000 0.000 0.800 0.060
#> SRR2532364 1 0.0291 0.88286 0.992 0.000 0.004 0.000 0.000 0.004
#> SRR2532363 2 0.0146 0.88244 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532362 2 0.0547 0.87889 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR2532361 4 0.0405 0.95977 0.004 0.000 0.008 0.988 0.000 0.000
#> SRR2532360 4 0.0405 0.95977 0.004 0.000 0.008 0.988 0.000 0.000
#> SRR2532359 1 0.4422 0.58129 0.720 0.000 0.180 0.096 0.000 0.004
#> SRR2532358 4 0.3043 0.74044 0.000 0.000 0.200 0.792 0.000 0.008
#> SRR2532357 2 0.0713 0.87811 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR2532356 2 0.0713 0.87811 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR2532355 3 0.2365 0.70995 0.072 0.000 0.888 0.040 0.000 0.000
#> SRR2532354 1 0.0291 0.88286 0.992 0.000 0.004 0.000 0.000 0.004
#> SRR2532353 3 0.1531 0.72609 0.000 0.000 0.928 0.068 0.000 0.004
#> SRR2532352 2 0.0146 0.88250 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532350 3 0.5838 0.36869 0.264 0.000 0.516 0.004 0.000 0.216
#> SRR2532349 3 0.1982 0.71649 0.004 0.000 0.912 0.016 0.000 0.068
#> SRR2532348 5 0.4510 0.56905 0.000 0.020 0.008 0.000 0.556 0.416
#> SRR2532347 5 0.0405 0.76299 0.000 0.004 0.000 0.000 0.988 0.008
#> SRR2532346 5 0.4691 0.51975 0.000 0.020 0.008 0.004 0.504 0.464
#> SRR2532345 5 0.5719 0.35511 0.000 0.168 0.000 0.000 0.460 0.372
#> SRR2532344 3 0.1693 0.72602 0.004 0.000 0.932 0.020 0.000 0.044
#> SRR2532343 3 0.1333 0.73358 0.008 0.000 0.944 0.048 0.000 0.000
#> SRR2532342 3 0.4942 0.51623 0.192 0.000 0.652 0.156 0.000 0.000
#> SRR2532341 6 0.6422 -0.35656 0.056 0.000 0.392 0.124 0.000 0.428
#> SRR2532340 3 0.6251 0.12001 0.324 0.000 0.344 0.004 0.000 0.328
#> SRR2532339 2 0.0000 0.88234 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0146 0.88250 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR2532337 5 0.1257 0.76276 0.000 0.020 0.000 0.000 0.952 0.028
#> SRR2532336 1 0.0717 0.87616 0.976 0.000 0.000 0.016 0.000 0.008
#> SRR2532335 3 0.5640 0.34675 0.148 0.000 0.520 0.004 0.000 0.328
#> SRR2532334 3 0.1390 0.73630 0.016 0.000 0.948 0.032 0.000 0.004
#> SRR2532333 5 0.3281 0.73211 0.000 0.012 0.000 0.004 0.784 0.200
#> SRR2532332 1 0.0146 0.88263 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532331 6 0.6240 -0.00106 0.000 0.312 0.004 0.004 0.252 0.428
#> SRR2532330 5 0.1010 0.76305 0.000 0.000 0.000 0.004 0.960 0.036
#> SRR2532329 2 0.1285 0.86393 0.000 0.944 0.000 0.000 0.004 0.052
#> SRR2532328 1 0.6790 0.12763 0.424 0.016 0.024 0.316 0.000 0.220
#> SRR2532327 2 0.0632 0.87989 0.000 0.976 0.000 0.000 0.000 0.024
#> SRR2532326 3 0.1226 0.73443 0.004 0.000 0.952 0.040 0.000 0.004
#> SRR2532324 2 0.4845 0.32143 0.000 0.560 0.000 0.004 0.052 0.384
#> SRR2532325 1 0.0000 0.88206 1.000 0.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.978 0.990 0.505 0.494 0.494
#> 3 3 0.808 0.827 0.919 0.175 0.868 0.746
#> 4 4 0.946 0.894 0.959 0.107 0.898 0.762
#> 5 5 0.747 0.771 0.892 0.189 0.853 0.580
#> 6 6 0.739 0.697 0.840 0.039 0.967 0.847
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2
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
#> SRR2532323 1 0.0000 0.980 1.000 0.000
#> SRR2532322 1 0.0000 0.980 1.000 0.000
#> SRR2532321 2 0.0000 0.999 0.000 1.000
#> SRR2532320 2 0.0000 0.999 0.000 1.000
#> SRR2532319 1 0.0000 0.980 1.000 0.000
#> SRR2532317 2 0.0000 0.999 0.000 1.000
#> SRR2532318 2 0.0938 0.988 0.012 0.988
#> SRR2532315 1 0.0000 0.980 1.000 0.000
#> SRR2532316 1 0.0000 0.980 1.000 0.000
#> SRR2532396 2 0.0000 0.999 0.000 1.000
#> SRR2532395 2 0.0000 0.999 0.000 1.000
#> SRR2532394 2 0.0000 0.999 0.000 1.000
#> SRR2532393 2 0.0000 0.999 0.000 1.000
#> SRR2532392 2 0.0000 0.999 0.000 1.000
#> SRR2532391 1 0.0000 0.980 1.000 0.000
#> SRR2532390 2 0.0000 0.999 0.000 1.000
#> SRR2532389 1 0.0000 0.980 1.000 0.000
#> SRR2532388 2 0.0000 0.999 0.000 1.000
#> SRR2532387 2 0.0000 0.999 0.000 1.000
#> SRR2532386 1 0.0000 0.980 1.000 0.000
#> SRR2532384 2 0.0000 0.999 0.000 1.000
#> SRR2532385 2 0.0376 0.996 0.004 0.996
#> SRR2532383 2 0.0000 0.999 0.000 1.000
#> SRR2532381 1 0.0000 0.980 1.000 0.000
#> SRR2532382 1 0.0000 0.980 1.000 0.000
#> SRR2532379 1 0.0000 0.980 1.000 0.000
#> SRR2532380 1 0.0000 0.980 1.000 0.000
#> SRR2532378 1 0.0000 0.980 1.000 0.000
#> SRR2532377 2 0.0000 0.999 0.000 1.000
#> SRR2532376 2 0.0938 0.988 0.012 0.988
#> SRR2532375 2 0.0000 0.999 0.000 1.000
#> SRR2532374 1 0.0000 0.980 1.000 0.000
#> SRR2532372 1 0.0000 0.980 1.000 0.000
#> SRR2532373 2 0.0000 0.999 0.000 1.000
#> SRR2532371 2 0.0000 0.999 0.000 1.000
#> SRR2532370 1 0.0000 0.980 1.000 0.000
#> SRR2532369 2 0.0376 0.996 0.004 0.996
#> SRR2532368 2 0.0000 0.999 0.000 1.000
#> SRR2532367 2 0.0000 0.999 0.000 1.000
#> SRR2532366 1 0.0000 0.980 1.000 0.000
#> SRR2532365 2 0.0000 0.999 0.000 1.000
#> SRR2532364 1 0.0000 0.980 1.000 0.000
#> SRR2532363 2 0.0000 0.999 0.000 1.000
#> SRR2532362 2 0.0000 0.999 0.000 1.000
#> SRR2532361 1 0.0000 0.980 1.000 0.000
#> SRR2532360 1 0.0000 0.980 1.000 0.000
#> SRR2532359 1 0.0000 0.980 1.000 0.000
#> SRR2532358 1 0.0000 0.980 1.000 0.000
#> SRR2532357 2 0.0000 0.999 0.000 1.000
#> SRR2532356 2 0.0000 0.999 0.000 1.000
#> SRR2532355 1 0.0000 0.980 1.000 0.000
#> SRR2532354 1 0.0000 0.980 1.000 0.000
#> SRR2532353 1 0.0000 0.980 1.000 0.000
#> SRR2532352 2 0.0000 0.999 0.000 1.000
#> SRR2532350 1 0.0000 0.980 1.000 0.000
#> SRR2532349 1 0.0000 0.980 1.000 0.000
#> SRR2532348 2 0.0938 0.988 0.012 0.988
#> SRR2532347 2 0.0000 0.999 0.000 1.000
#> SRR2532346 2 0.0000 0.999 0.000 1.000
#> SRR2532345 2 0.0000 0.999 0.000 1.000
#> SRR2532344 1 0.0672 0.973 0.992 0.008
#> SRR2532343 1 0.0000 0.980 1.000 0.000
#> SRR2532342 1 0.0000 0.980 1.000 0.000
#> SRR2532341 1 0.6973 0.771 0.812 0.188
#> SRR2532340 1 0.0000 0.980 1.000 0.000
#> SRR2532339 2 0.0000 0.999 0.000 1.000
#> SRR2532338 2 0.0000 0.999 0.000 1.000
#> SRR2532337 2 0.0000 0.999 0.000 1.000
#> SRR2532336 1 0.0000 0.980 1.000 0.000
#> SRR2532335 1 0.8861 0.572 0.696 0.304
#> SRR2532334 1 0.0000 0.980 1.000 0.000
#> SRR2532333 2 0.0000 0.999 0.000 1.000
#> SRR2532332 1 0.0000 0.980 1.000 0.000
#> SRR2532331 2 0.0000 0.999 0.000 1.000
#> SRR2532330 2 0.0000 0.999 0.000 1.000
#> SRR2532329 2 0.0000 0.999 0.000 1.000
#> SRR2532328 1 0.8016 0.685 0.756 0.244
#> SRR2532327 2 0.0000 0.999 0.000 1.000
#> SRR2532326 1 0.0000 0.980 1.000 0.000
#> SRR2532324 2 0.0000 0.999 0.000 1.000
#> SRR2532325 1 0.0000 0.980 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532322 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532321 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532319 1 0.9292 0.368 0.516 0.200 0.284
#> SRR2532317 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532318 2 0.0424 0.967 0.008 0.992 0.000
#> SRR2532315 3 0.4062 0.773 0.164 0.000 0.836
#> SRR2532316 3 0.0000 0.839 0.000 0.000 1.000
#> SRR2532396 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532391 1 0.2356 0.762 0.928 0.000 0.072
#> SRR2532390 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532389 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532388 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532386 3 0.4062 0.773 0.164 0.000 0.836
#> SRR2532384 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532385 2 0.5216 0.643 0.000 0.740 0.260
#> SRR2532383 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532381 3 0.3412 0.808 0.124 0.000 0.876
#> SRR2532382 1 0.4062 0.597 0.836 0.000 0.164
#> SRR2532379 3 0.0000 0.839 0.000 0.000 1.000
#> SRR2532380 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532378 3 0.5859 0.558 0.344 0.000 0.656
#> SRR2532377 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532376 2 0.0424 0.967 0.008 0.992 0.000
#> SRR2532375 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532374 1 0.1267 0.780 0.972 0.004 0.024
#> SRR2532372 1 0.6881 0.580 0.648 0.032 0.320
#> SRR2532373 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532370 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532369 2 0.3349 0.856 0.004 0.888 0.108
#> SRR2532368 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532366 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532365 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532363 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532361 3 0.0000 0.839 0.000 0.000 1.000
#> SRR2532360 3 0.0424 0.839 0.008 0.000 0.992
#> SRR2532359 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532358 3 0.0000 0.839 0.000 0.000 1.000
#> SRR2532357 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532355 1 0.5431 0.643 0.716 0.000 0.284
#> SRR2532354 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532353 3 0.5785 0.332 0.332 0.000 0.668
#> SRR2532352 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532350 1 0.4235 0.713 0.824 0.000 0.176
#> SRR2532349 1 0.5497 0.636 0.708 0.000 0.292
#> SRR2532348 2 0.0424 0.967 0.008 0.992 0.000
#> SRR2532347 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532346 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532345 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532344 1 0.9919 0.173 0.392 0.284 0.324
#> SRR2532343 1 0.6215 0.436 0.572 0.000 0.428
#> SRR2532342 1 0.5706 0.608 0.680 0.000 0.320
#> SRR2532341 2 0.8026 0.488 0.164 0.656 0.180
#> SRR2532340 1 0.0592 0.785 0.988 0.000 0.012
#> SRR2532339 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532336 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532335 1 0.9808 0.216 0.428 0.308 0.264
#> SRR2532334 1 0.5363 0.648 0.724 0.000 0.276
#> SRR2532333 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.788 1.000 0.000 0.000
#> SRR2532331 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532330 2 0.0592 0.964 0.000 0.988 0.012
#> SRR2532329 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532328 2 0.6224 0.627 0.240 0.728 0.032
#> SRR2532327 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532326 1 0.5706 0.608 0.680 0.000 0.320
#> SRR2532324 2 0.0000 0.974 0.000 1.000 0.000
#> SRR2532325 1 0.0000 0.788 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532320 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532319 3 0.0188 0.893 0.000 0.004 0.996 0.000
#> SRR2532317 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532318 2 0.0707 0.967 0.000 0.980 0.020 0.000
#> SRR2532315 4 0.0376 0.874 0.004 0.000 0.004 0.992
#> SRR2532316 4 0.0336 0.875 0.000 0.000 0.008 0.992
#> SRR2532396 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532395 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532394 2 0.0336 0.976 0.000 0.992 0.000 0.008
#> SRR2532393 2 0.0657 0.969 0.000 0.984 0.012 0.004
#> SRR2532392 2 0.0336 0.976 0.000 0.992 0.000 0.008
#> SRR2532391 3 0.4761 0.391 0.372 0.000 0.628 0.000
#> SRR2532390 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532389 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532388 2 0.0376 0.976 0.000 0.992 0.004 0.004
#> SRR2532387 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532386 4 0.0376 0.874 0.004 0.000 0.004 0.992
#> SRR2532384 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532385 3 0.1824 0.823 0.000 0.060 0.936 0.004
#> SRR2532383 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532381 4 0.4961 0.121 0.000 0.000 0.448 0.552
#> SRR2532382 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532379 4 0.0336 0.875 0.000 0.000 0.008 0.992
#> SRR2532380 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532378 4 0.4800 0.415 0.340 0.000 0.004 0.656
#> SRR2532377 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532376 2 0.1109 0.955 0.000 0.968 0.028 0.004
#> SRR2532375 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532374 1 0.0469 0.948 0.988 0.000 0.012 0.000
#> SRR2532372 3 0.0000 0.895 0.000 0.000 1.000 0.000
#> SRR2532373 2 0.0188 0.977 0.000 0.996 0.004 0.000
#> SRR2532371 2 0.0188 0.977 0.000 0.996 0.004 0.000
#> SRR2532370 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532369 2 0.4978 0.353 0.000 0.612 0.384 0.004
#> SRR2532368 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532367 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532366 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532365 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532364 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532362 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532361 4 0.0336 0.875 0.000 0.000 0.008 0.992
#> SRR2532360 4 0.0336 0.875 0.000 0.000 0.008 0.992
#> SRR2532359 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532358 3 0.0921 0.879 0.000 0.000 0.972 0.028
#> SRR2532357 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532356 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532355 3 0.0188 0.896 0.004 0.000 0.996 0.000
#> SRR2532354 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532353 3 0.0592 0.887 0.000 0.000 0.984 0.016
#> SRR2532352 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532350 3 0.3942 0.652 0.236 0.000 0.764 0.000
#> SRR2532349 3 0.0188 0.896 0.004 0.000 0.996 0.000
#> SRR2532348 2 0.0779 0.966 0.000 0.980 0.016 0.004
#> SRR2532347 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532346 2 0.0657 0.969 0.000 0.984 0.012 0.004
#> SRR2532345 2 0.0188 0.977 0.000 0.996 0.004 0.000
#> SRR2532344 3 0.0000 0.895 0.000 0.000 1.000 0.000
#> SRR2532343 3 0.0188 0.896 0.004 0.000 0.996 0.000
#> SRR2532342 3 0.0188 0.896 0.004 0.000 0.996 0.000
#> SRR2532341 3 0.4605 0.393 0.000 0.336 0.664 0.000
#> SRR2532340 1 0.4925 0.176 0.572 0.000 0.428 0.000
#> SRR2532339 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532338 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532337 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532336 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532335 3 0.0336 0.894 0.008 0.000 0.992 0.000
#> SRR2532334 3 0.0188 0.896 0.004 0.000 0.996 0.000
#> SRR2532333 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532332 1 0.0000 0.960 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.0188 0.977 0.000 0.996 0.004 0.000
#> SRR2532330 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR2532329 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532328 2 0.4040 0.659 0.248 0.752 0.000 0.000
#> SRR2532327 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532326 3 0.0188 0.896 0.004 0.000 0.996 0.000
#> SRR2532324 2 0.0376 0.977 0.000 0.992 0.004 0.004
#> SRR2532325 1 0.0000 0.960 1.000 0.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.3949 0.4720 0.000 0.668 0.000 0.000 0.332
#> SRR2532320 2 0.0162 0.7861 0.000 0.996 0.000 0.000 0.004
#> SRR2532319 3 0.0290 0.9300 0.000 0.008 0.992 0.000 0.000
#> SRR2532317 5 0.0880 0.8195 0.000 0.032 0.000 0.000 0.968
#> SRR2532318 2 0.4114 0.4518 0.000 0.624 0.000 0.000 0.376
#> SRR2532315 4 0.0000 0.8752 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.8752 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.2813 0.6887 0.000 0.832 0.000 0.000 0.168
#> SRR2532395 5 0.0703 0.8163 0.000 0.024 0.000 0.000 0.976
#> SRR2532394 5 0.2230 0.7862 0.000 0.116 0.000 0.000 0.884
#> SRR2532393 5 0.2773 0.8046 0.000 0.164 0.000 0.000 0.836
#> SRR2532392 5 0.3612 0.7266 0.000 0.268 0.000 0.000 0.732
#> SRR2532391 3 0.4126 0.3801 0.380 0.000 0.620 0.000 0.000
#> SRR2532390 2 0.3452 0.6277 0.000 0.756 0.000 0.000 0.244
#> SRR2532389 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532388 5 0.4088 0.2701 0.000 0.368 0.000 0.000 0.632
#> SRR2532387 5 0.3999 0.5774 0.000 0.344 0.000 0.000 0.656
#> SRR2532386 4 0.0000 0.8752 0.000 0.000 0.000 1.000 0.000
#> SRR2532384 5 0.1671 0.8054 0.000 0.076 0.000 0.000 0.924
#> SRR2532385 3 0.0771 0.9151 0.000 0.020 0.976 0.000 0.004
#> SRR2532383 5 0.3177 0.7839 0.000 0.208 0.000 0.000 0.792
#> SRR2532381 4 0.4283 0.0876 0.000 0.000 0.456 0.544 0.000
#> SRR2532382 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.8752 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 4 0.3999 0.4008 0.344 0.000 0.000 0.656 0.000
#> SRR2532377 5 0.0703 0.8143 0.000 0.024 0.000 0.000 0.976
#> SRR2532376 5 0.2230 0.8179 0.000 0.116 0.000 0.000 0.884
#> SRR2532375 2 0.3177 0.6783 0.000 0.792 0.000 0.000 0.208
#> SRR2532374 1 0.0898 0.9306 0.972 0.020 0.008 0.000 0.000
#> SRR2532372 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532373 2 0.3366 0.6505 0.000 0.768 0.000 0.000 0.232
#> SRR2532371 2 0.2424 0.7610 0.000 0.868 0.000 0.000 0.132
#> SRR2532370 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0771 0.8136 0.000 0.020 0.004 0.000 0.976
#> SRR2532368 5 0.4278 0.3238 0.000 0.452 0.000 0.000 0.548
#> SRR2532367 2 0.3730 0.5703 0.000 0.712 0.000 0.000 0.288
#> SRR2532366 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.0794 0.8182 0.000 0.028 0.000 0.000 0.972
#> SRR2532364 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.2020 0.7651 0.000 0.900 0.000 0.000 0.100
#> SRR2532362 2 0.0404 0.7872 0.000 0.988 0.000 0.000 0.012
#> SRR2532361 4 0.0000 0.8752 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.8752 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532358 3 0.0290 0.9303 0.000 0.000 0.992 0.008 0.000
#> SRR2532357 2 0.0000 0.7854 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0404 0.7877 0.000 0.988 0.000 0.000 0.012
#> SRR2532355 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532354 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532352 2 0.2230 0.7562 0.000 0.884 0.000 0.000 0.116
#> SRR2532350 3 0.3336 0.6794 0.228 0.000 0.772 0.000 0.000
#> SRR2532349 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532348 5 0.2813 0.8000 0.000 0.168 0.000 0.000 0.832
#> SRR2532347 5 0.2179 0.7740 0.000 0.112 0.000 0.000 0.888
#> SRR2532346 5 0.2813 0.7973 0.000 0.168 0.000 0.000 0.832
#> SRR2532345 2 0.3774 0.5708 0.000 0.704 0.000 0.000 0.296
#> SRR2532344 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532343 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532342 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532341 2 0.4482 0.4321 0.000 0.636 0.348 0.000 0.016
#> SRR2532340 1 0.4249 0.1654 0.568 0.000 0.432 0.000 0.000
#> SRR2532339 2 0.1544 0.7748 0.000 0.932 0.000 0.000 0.068
#> SRR2532338 2 0.0000 0.7854 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.1121 0.8204 0.000 0.044 0.000 0.000 0.956
#> SRR2532336 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.1484 0.8822 0.008 0.048 0.944 0.000 0.000
#> SRR2532334 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532333 5 0.2127 0.8203 0.000 0.108 0.000 0.000 0.892
#> SRR2532332 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.1197 0.7821 0.000 0.952 0.000 0.000 0.048
#> SRR2532330 5 0.2813 0.8024 0.000 0.168 0.000 0.000 0.832
#> SRR2532329 2 0.0162 0.7861 0.000 0.996 0.000 0.000 0.004
#> SRR2532328 2 0.6705 0.0415 0.260 0.420 0.000 0.000 0.320
#> SRR2532327 2 0.0404 0.7859 0.000 0.988 0.000 0.000 0.012
#> SRR2532326 3 0.0000 0.9354 0.000 0.000 1.000 0.000 0.000
#> SRR2532324 2 0.3242 0.6752 0.000 0.784 0.000 0.000 0.216
#> SRR2532325 1 0.0000 0.9589 1.000 0.000 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.4814 0.47381 0.000 0.616 0.000 0.000 0.304 0.080
#> SRR2532320 2 0.0405 0.66562 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR2532319 3 0.0260 0.95449 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR2532317 5 0.0458 0.83005 0.000 0.016 0.000 0.000 0.984 0.000
#> SRR2532318 2 0.5231 0.44771 0.000 0.608 0.000 0.000 0.168 0.224
#> SRR2532315 4 0.0000 0.79739 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.79739 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.4066 0.60718 0.000 0.732 0.000 0.000 0.064 0.204
#> SRR2532395 5 0.0458 0.83005 0.000 0.016 0.000 0.000 0.984 0.000
#> SRR2532394 5 0.1913 0.80993 0.000 0.080 0.000 0.000 0.908 0.012
#> SRR2532393 5 0.1765 0.81635 0.000 0.096 0.000 0.000 0.904 0.000
#> SRR2532392 5 0.3841 0.68107 0.000 0.168 0.000 0.000 0.764 0.068
#> SRR2532391 6 0.5830 0.31390 0.284 0.000 0.228 0.000 0.000 0.488
#> SRR2532390 2 0.4544 0.60768 0.000 0.668 0.000 0.000 0.076 0.256
#> SRR2532389 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532388 5 0.4712 0.30863 0.000 0.344 0.000 0.000 0.596 0.060
#> SRR2532387 5 0.3945 0.43403 0.000 0.380 0.000 0.000 0.612 0.008
#> SRR2532386 4 0.3867 0.08310 0.000 0.000 0.000 0.512 0.000 0.488
#> SRR2532384 5 0.1075 0.82593 0.000 0.048 0.000 0.000 0.952 0.000
#> SRR2532385 3 0.0935 0.92432 0.000 0.032 0.964 0.000 0.004 0.000
#> SRR2532383 5 0.1806 0.82203 0.000 0.088 0.000 0.000 0.908 0.004
#> SRR2532381 6 0.5213 -0.17745 0.000 0.000 0.092 0.420 0.000 0.488
#> SRR2532382 1 0.3482 0.48501 0.684 0.000 0.000 0.000 0.000 0.316
#> SRR2532379 4 0.0000 0.79739 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 4 0.5096 0.18136 0.324 0.000 0.000 0.576 0.000 0.100
#> SRR2532377 5 0.0622 0.82876 0.000 0.008 0.000 0.000 0.980 0.012
#> SRR2532376 5 0.5395 0.58378 0.000 0.196 0.000 0.000 0.584 0.220
#> SRR2532375 2 0.3512 0.62156 0.000 0.772 0.000 0.000 0.196 0.032
#> SRR2532374 1 0.3166 0.69392 0.800 0.008 0.008 0.000 0.000 0.184
#> SRR2532372 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532373 2 0.3245 0.58821 0.000 0.764 0.000 0.000 0.228 0.008
#> SRR2532371 2 0.2706 0.67204 0.000 0.860 0.000 0.000 0.104 0.036
#> SRR2532370 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0405 0.82876 0.000 0.008 0.000 0.000 0.988 0.004
#> SRR2532368 2 0.4534 -0.14573 0.000 0.492 0.000 0.000 0.476 0.032
#> SRR2532367 2 0.4426 0.48410 0.000 0.652 0.000 0.000 0.296 0.052
#> SRR2532366 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.0458 0.83005 0.000 0.016 0.000 0.000 0.984 0.000
#> SRR2532364 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.4983 0.63170 0.000 0.644 0.000 0.000 0.148 0.208
#> SRR2532362 2 0.3050 0.61317 0.000 0.764 0.000 0.000 0.000 0.236
#> SRR2532361 4 0.0000 0.79739 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 0.79739 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532358 3 0.0260 0.95546 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR2532357 2 0.2996 0.61656 0.000 0.772 0.000 0.000 0.000 0.228
#> SRR2532356 2 0.3432 0.62118 0.000 0.764 0.000 0.000 0.020 0.216
#> SRR2532355 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532354 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532352 2 0.4565 0.62213 0.000 0.664 0.000 0.000 0.076 0.260
#> SRR2532350 3 0.3566 0.56897 0.224 0.000 0.752 0.000 0.000 0.024
#> SRR2532349 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532348 5 0.3927 0.72863 0.000 0.172 0.000 0.000 0.756 0.072
#> SRR2532347 5 0.3037 0.68108 0.000 0.176 0.000 0.000 0.808 0.016
#> SRR2532346 5 0.4800 0.67626 0.000 0.164 0.000 0.000 0.672 0.164
#> SRR2532345 2 0.4601 0.45398 0.000 0.628 0.000 0.000 0.312 0.060
#> SRR2532344 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532343 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532342 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532341 6 0.5819 0.29134 0.000 0.264 0.212 0.000 0.004 0.520
#> SRR2532340 1 0.5423 -0.00537 0.488 0.000 0.392 0.000 0.000 0.120
#> SRR2532339 2 0.3270 0.65789 0.000 0.820 0.000 0.000 0.120 0.060
#> SRR2532338 2 0.3198 0.61547 0.000 0.740 0.000 0.000 0.000 0.260
#> SRR2532337 5 0.0547 0.83050 0.000 0.020 0.000 0.000 0.980 0.000
#> SRR2532336 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.1675 0.89949 0.008 0.032 0.936 0.000 0.000 0.024
#> SRR2532334 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532333 5 0.2909 0.79056 0.000 0.028 0.000 0.000 0.836 0.136
#> SRR2532332 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.3213 0.59437 0.000 0.820 0.000 0.000 0.048 0.132
#> SRR2532330 5 0.2457 0.81385 0.000 0.036 0.000 0.000 0.880 0.084
#> SRR2532329 2 0.0603 0.66626 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR2532328 6 0.6999 0.34532 0.204 0.248 0.000 0.000 0.096 0.452
#> SRR2532327 2 0.2593 0.64942 0.000 0.844 0.000 0.000 0.008 0.148
#> SRR2532326 3 0.0000 0.96127 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532324 2 0.2814 0.64963 0.000 0.820 0.000 0.000 0.172 0.008
#> SRR2532325 1 0.0000 0.90904 1.000 0.000 0.000 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.991 0.996 0.506 0.494 0.494
#> 3 3 0.946 0.919 0.949 0.226 0.859 0.721
#> 4 4 0.670 0.721 0.783 0.110 0.935 0.837
#> 5 5 0.834 0.778 0.909 0.111 0.838 0.564
#> 6 6 0.770 0.714 0.823 0.041 0.948 0.777
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
#> SRR2532323 1 0.000 0.992 1.0 0.0
#> SRR2532322 1 0.000 0.992 1.0 0.0
#> SRR2532321 2 0.000 1.000 0.0 1.0
#> SRR2532320 2 0.000 1.000 0.0 1.0
#> SRR2532319 1 0.000 0.992 1.0 0.0
#> SRR2532317 2 0.000 1.000 0.0 1.0
#> SRR2532318 2 0.000 1.000 0.0 1.0
#> SRR2532315 1 0.000 0.992 1.0 0.0
#> SRR2532316 1 0.000 0.992 1.0 0.0
#> SRR2532396 2 0.000 1.000 0.0 1.0
#> SRR2532395 2 0.000 1.000 0.0 1.0
#> SRR2532394 2 0.000 1.000 0.0 1.0
#> SRR2532393 2 0.000 1.000 0.0 1.0
#> SRR2532392 2 0.000 1.000 0.0 1.0
#> SRR2532391 1 0.000 0.992 1.0 0.0
#> SRR2532390 2 0.000 1.000 0.0 1.0
#> SRR2532389 1 0.000 0.992 1.0 0.0
#> SRR2532388 2 0.000 1.000 0.0 1.0
#> SRR2532387 2 0.000 1.000 0.0 1.0
#> SRR2532386 1 0.000 0.992 1.0 0.0
#> SRR2532384 2 0.000 1.000 0.0 1.0
#> SRR2532385 1 0.881 0.571 0.7 0.3
#> SRR2532383 2 0.000 1.000 0.0 1.0
#> SRR2532381 1 0.000 0.992 1.0 0.0
#> SRR2532382 1 0.000 0.992 1.0 0.0
#> SRR2532379 1 0.000 0.992 1.0 0.0
#> SRR2532380 1 0.000 0.992 1.0 0.0
#> SRR2532378 1 0.000 0.992 1.0 0.0
#> SRR2532377 2 0.000 1.000 0.0 1.0
#> SRR2532376 2 0.000 1.000 0.0 1.0
#> SRR2532375 2 0.000 1.000 0.0 1.0
#> SRR2532374 1 0.000 0.992 1.0 0.0
#> SRR2532372 1 0.000 0.992 1.0 0.0
#> SRR2532373 2 0.000 1.000 0.0 1.0
#> SRR2532371 2 0.000 1.000 0.0 1.0
#> SRR2532370 1 0.000 0.992 1.0 0.0
#> SRR2532369 2 0.000 1.000 0.0 1.0
#> SRR2532368 2 0.000 1.000 0.0 1.0
#> SRR2532367 2 0.000 1.000 0.0 1.0
#> SRR2532366 1 0.000 0.992 1.0 0.0
#> SRR2532365 2 0.000 1.000 0.0 1.0
#> SRR2532364 1 0.000 0.992 1.0 0.0
#> SRR2532363 2 0.000 1.000 0.0 1.0
#> SRR2532362 2 0.000 1.000 0.0 1.0
#> SRR2532361 1 0.000 0.992 1.0 0.0
#> SRR2532360 1 0.000 0.992 1.0 0.0
#> SRR2532359 1 0.000 0.992 1.0 0.0
#> SRR2532358 1 0.000 0.992 1.0 0.0
#> SRR2532357 2 0.000 1.000 0.0 1.0
#> SRR2532356 2 0.000 1.000 0.0 1.0
#> SRR2532355 1 0.000 0.992 1.0 0.0
#> SRR2532354 1 0.000 0.992 1.0 0.0
#> SRR2532353 1 0.000 0.992 1.0 0.0
#> SRR2532352 2 0.000 1.000 0.0 1.0
#> SRR2532350 1 0.000 0.992 1.0 0.0
#> SRR2532349 1 0.000 0.992 1.0 0.0
#> SRR2532348 2 0.000 1.000 0.0 1.0
#> SRR2532347 2 0.000 1.000 0.0 1.0
#> SRR2532346 2 0.000 1.000 0.0 1.0
#> SRR2532345 2 0.000 1.000 0.0 1.0
#> SRR2532344 1 0.000 0.992 1.0 0.0
#> SRR2532343 1 0.000 0.992 1.0 0.0
#> SRR2532342 1 0.000 0.992 1.0 0.0
#> SRR2532341 1 0.000 0.992 1.0 0.0
#> SRR2532340 1 0.000 0.992 1.0 0.0
#> SRR2532339 2 0.000 1.000 0.0 1.0
#> SRR2532338 2 0.000 1.000 0.0 1.0
#> SRR2532337 2 0.000 1.000 0.0 1.0
#> SRR2532336 1 0.000 0.992 1.0 0.0
#> SRR2532335 1 0.000 0.992 1.0 0.0
#> SRR2532334 1 0.000 0.992 1.0 0.0
#> SRR2532333 2 0.000 1.000 0.0 1.0
#> SRR2532332 1 0.000 0.992 1.0 0.0
#> SRR2532331 2 0.000 1.000 0.0 1.0
#> SRR2532330 2 0.000 1.000 0.0 1.0
#> SRR2532329 2 0.000 1.000 0.0 1.0
#> SRR2532328 1 0.000 0.992 1.0 0.0
#> SRR2532327 2 0.000 1.000 0.0 1.0
#> SRR2532326 1 0.000 0.992 1.0 0.0
#> SRR2532324 2 0.000 1.000 0.0 1.0
#> SRR2532325 1 0.000 0.992 1.0 0.0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.1529 0.9416 0.960 0.000 0.040
#> SRR2532322 1 0.2959 0.9132 0.900 0.000 0.100
#> SRR2532321 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532320 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532319 3 0.0424 0.8965 0.008 0.000 0.992
#> SRR2532317 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532318 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532315 1 0.2356 0.9491 0.928 0.000 0.072
#> SRR2532316 1 0.2356 0.9491 0.928 0.000 0.072
#> SRR2532396 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532395 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532394 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532393 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532392 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532391 3 0.0747 0.8948 0.016 0.000 0.984
#> SRR2532390 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532389 3 0.6180 0.2552 0.416 0.000 0.584
#> SRR2532388 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532387 2 0.0747 0.9865 0.016 0.984 0.000
#> SRR2532386 1 0.2356 0.9491 0.928 0.000 0.072
#> SRR2532384 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532385 2 0.2339 0.9463 0.012 0.940 0.048
#> SRR2532383 2 0.0237 0.9873 0.004 0.996 0.000
#> SRR2532381 1 0.2448 0.9490 0.924 0.000 0.076
#> SRR2532382 1 0.2448 0.9490 0.924 0.000 0.076
#> SRR2532379 1 0.2356 0.9491 0.928 0.000 0.072
#> SRR2532380 1 0.1529 0.9416 0.960 0.000 0.040
#> SRR2532378 1 0.2261 0.9485 0.932 0.000 0.068
#> SRR2532377 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532376 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532375 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532374 3 0.1289 0.8901 0.032 0.000 0.968
#> SRR2532372 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532373 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532370 1 0.2625 0.9256 0.916 0.000 0.084
#> SRR2532369 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532368 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532367 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532366 3 0.5650 0.5699 0.312 0.000 0.688
#> SRR2532365 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532364 1 0.3340 0.8977 0.880 0.000 0.120
#> SRR2532363 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532362 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532361 1 0.2625 0.9430 0.916 0.000 0.084
#> SRR2532360 1 0.2356 0.9491 0.928 0.000 0.072
#> SRR2532359 3 0.4842 0.6894 0.224 0.000 0.776
#> SRR2532358 1 0.5785 0.5807 0.668 0.000 0.332
#> SRR2532357 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532356 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532355 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532354 1 0.1529 0.9416 0.960 0.000 0.040
#> SRR2532353 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532352 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532350 3 0.0747 0.8948 0.016 0.000 0.984
#> SRR2532349 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532348 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532347 2 0.1163 0.9848 0.028 0.972 0.000
#> SRR2532346 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532345 2 0.1031 0.9855 0.024 0.976 0.000
#> SRR2532344 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532343 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532342 3 0.4504 0.7217 0.196 0.000 0.804
#> SRR2532341 3 0.1453 0.8904 0.024 0.008 0.968
#> SRR2532340 3 0.0747 0.8948 0.016 0.000 0.984
#> SRR2532339 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532338 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532337 2 0.0747 0.9865 0.016 0.984 0.000
#> SRR2532336 1 0.1529 0.9416 0.960 0.000 0.040
#> SRR2532335 3 0.0747 0.8948 0.016 0.000 0.984
#> SRR2532334 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532333 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532332 1 0.3340 0.8945 0.880 0.000 0.120
#> SRR2532331 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532330 2 0.1289 0.9836 0.032 0.968 0.000
#> SRR2532329 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532328 3 0.3406 0.8536 0.068 0.028 0.904
#> SRR2532327 2 0.0237 0.9865 0.004 0.996 0.000
#> SRR2532326 3 0.0000 0.8972 0.000 0.000 1.000
#> SRR2532324 2 0.0000 0.9872 0.000 1.000 0.000
#> SRR2532325 3 0.6299 0.0459 0.476 0.000 0.524
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 4 0.5158 0.2592 0.472 0.000 0.004 0.524
#> SRR2532322 1 0.7622 0.6909 0.472 0.000 0.248 0.280
#> SRR2532321 2 0.3400 0.8488 0.180 0.820 0.000 0.000
#> SRR2532320 2 0.3610 0.8447 0.200 0.800 0.000 0.000
#> SRR2532319 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532317 2 0.3074 0.8015 0.152 0.848 0.000 0.000
#> SRR2532318 2 0.3172 0.7969 0.160 0.840 0.000 0.000
#> SRR2532315 4 0.0469 0.6702 0.000 0.000 0.012 0.988
#> SRR2532316 4 0.0469 0.6702 0.000 0.000 0.012 0.988
#> SRR2532396 2 0.4679 0.7591 0.352 0.648 0.000 0.000
#> SRR2532395 2 0.1302 0.8511 0.044 0.956 0.000 0.000
#> SRR2532394 2 0.0921 0.8463 0.028 0.972 0.000 0.000
#> SRR2532393 2 0.2704 0.8139 0.124 0.876 0.000 0.000
#> SRR2532392 2 0.3528 0.8500 0.192 0.808 0.000 0.000
#> SRR2532391 3 0.0188 0.8755 0.000 0.000 0.996 0.004
#> SRR2532390 2 0.3486 0.8492 0.188 0.812 0.000 0.000
#> SRR2532389 3 0.7040 -0.6659 0.420 0.000 0.460 0.120
#> SRR2532388 2 0.0921 0.8508 0.028 0.972 0.000 0.000
#> SRR2532387 2 0.3726 0.8383 0.212 0.788 0.000 0.000
#> SRR2532386 4 0.2402 0.6618 0.076 0.000 0.012 0.912
#> SRR2532384 2 0.1389 0.8463 0.048 0.952 0.000 0.000
#> SRR2532385 2 0.4206 0.7793 0.136 0.816 0.048 0.000
#> SRR2532383 2 0.2868 0.8573 0.136 0.864 0.000 0.000
#> SRR2532381 4 0.3900 0.6195 0.164 0.000 0.020 0.816
#> SRR2532382 4 0.5526 0.3357 0.416 0.000 0.020 0.564
#> SRR2532379 4 0.0469 0.6702 0.000 0.000 0.012 0.988
#> SRR2532380 4 0.5158 0.2592 0.472 0.000 0.004 0.524
#> SRR2532378 4 0.3806 0.6125 0.156 0.000 0.020 0.824
#> SRR2532377 2 0.0707 0.8481 0.020 0.980 0.000 0.000
#> SRR2532376 2 0.3219 0.7949 0.164 0.836 0.000 0.000
#> SRR2532375 2 0.3356 0.8528 0.176 0.824 0.000 0.000
#> SRR2532374 3 0.1256 0.8433 0.008 0.000 0.964 0.028
#> SRR2532372 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532373 2 0.4713 0.7526 0.360 0.640 0.000 0.000
#> SRR2532371 2 0.3356 0.8517 0.176 0.824 0.000 0.000
#> SRR2532370 1 0.6558 -0.0386 0.472 0.000 0.076 0.452
#> SRR2532369 2 0.3219 0.7949 0.164 0.836 0.000 0.000
#> SRR2532368 2 0.3569 0.8537 0.196 0.804 0.000 0.000
#> SRR2532367 2 0.2921 0.8559 0.140 0.860 0.000 0.000
#> SRR2532366 1 0.6799 0.6494 0.464 0.000 0.440 0.096
#> SRR2532365 2 0.0707 0.8506 0.020 0.980 0.000 0.000
#> SRR2532364 1 0.7627 0.6726 0.468 0.000 0.240 0.292
#> SRR2532363 2 0.3266 0.8511 0.168 0.832 0.000 0.000
#> SRR2532362 2 0.3024 0.8551 0.148 0.852 0.000 0.000
#> SRR2532361 4 0.0469 0.6702 0.000 0.000 0.012 0.988
#> SRR2532360 4 0.0469 0.6702 0.000 0.000 0.012 0.988
#> SRR2532359 1 0.6887 0.6456 0.456 0.000 0.440 0.104
#> SRR2532358 3 0.4977 0.0292 0.000 0.000 0.540 0.460
#> SRR2532357 2 0.4730 0.7512 0.364 0.636 0.000 0.000
#> SRR2532356 2 0.4730 0.7512 0.364 0.636 0.000 0.000
#> SRR2532355 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532354 4 0.5158 0.2592 0.472 0.000 0.004 0.524
#> SRR2532353 3 0.0336 0.8726 0.000 0.000 0.992 0.008
#> SRR2532352 2 0.3219 0.8515 0.164 0.836 0.000 0.000
#> SRR2532350 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532349 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532348 2 0.3219 0.7949 0.164 0.836 0.000 0.000
#> SRR2532347 2 0.1302 0.8487 0.044 0.956 0.000 0.000
#> SRR2532346 2 0.3219 0.7949 0.164 0.836 0.000 0.000
#> SRR2532345 2 0.1302 0.8555 0.044 0.956 0.000 0.000
#> SRR2532344 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532343 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532342 3 0.4608 0.5640 0.096 0.000 0.800 0.104
#> SRR2532341 3 0.2876 0.7680 0.092 0.008 0.892 0.008
#> SRR2532340 3 0.0921 0.8519 0.000 0.000 0.972 0.028
#> SRR2532339 2 0.3123 0.8529 0.156 0.844 0.000 0.000
#> SRR2532338 2 0.3400 0.8514 0.180 0.820 0.000 0.000
#> SRR2532337 2 0.3219 0.8294 0.164 0.836 0.000 0.000
#> SRR2532336 4 0.5158 0.2592 0.472 0.000 0.004 0.524
#> SRR2532335 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532334 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532333 2 0.3219 0.7949 0.164 0.836 0.000 0.000
#> SRR2532332 1 0.7625 0.6949 0.472 0.000 0.252 0.276
#> SRR2532331 2 0.2973 0.8574 0.144 0.856 0.000 0.000
#> SRR2532330 2 0.2081 0.8387 0.084 0.916 0.000 0.000
#> SRR2532329 2 0.4697 0.7549 0.356 0.644 0.000 0.000
#> SRR2532328 2 0.9724 0.2016 0.276 0.348 0.164 0.212
#> SRR2532327 2 0.3024 0.8541 0.148 0.852 0.000 0.000
#> SRR2532326 3 0.0000 0.8781 0.000 0.000 1.000 0.000
#> SRR2532324 2 0.4679 0.7569 0.352 0.648 0.000 0.000
#> SRR2532325 1 0.7231 0.7033 0.464 0.000 0.392 0.144
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532320 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532317 5 0.3774 0.584 0.000 0.296 0.000 0.000 0.704
#> SRR2532318 5 0.1341 0.721 0.000 0.056 0.000 0.000 0.944
#> SRR2532315 4 0.0000 0.878 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.878 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.0290 0.888 0.000 0.992 0.000 0.000 0.008
#> SRR2532395 5 0.4305 0.295 0.000 0.488 0.000 0.000 0.512
#> SRR2532394 5 0.4307 0.244 0.000 0.500 0.000 0.000 0.500
#> SRR2532393 5 0.2377 0.727 0.000 0.128 0.000 0.000 0.872
#> SRR2532392 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532391 3 0.0404 0.938 0.012 0.000 0.988 0.000 0.000
#> SRR2532390 2 0.0510 0.886 0.000 0.984 0.000 0.000 0.016
#> SRR2532389 1 0.1768 0.894 0.924 0.000 0.072 0.004 0.000
#> SRR2532388 2 0.4302 -0.252 0.000 0.520 0.000 0.000 0.480
#> SRR2532387 2 0.3774 0.417 0.000 0.704 0.000 0.000 0.296
#> SRR2532386 4 0.2843 0.799 0.144 0.000 0.008 0.848 0.000
#> SRR2532384 5 0.3336 0.696 0.000 0.228 0.000 0.000 0.772
#> SRR2532385 5 0.0794 0.677 0.000 0.000 0.028 0.000 0.972
#> SRR2532383 2 0.0404 0.888 0.000 0.988 0.000 0.000 0.012
#> SRR2532381 4 0.3942 0.697 0.232 0.000 0.020 0.748 0.000
#> SRR2532382 1 0.1725 0.907 0.936 0.000 0.020 0.044 0.000
#> SRR2532379 4 0.0000 0.878 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 4 0.4808 0.360 0.400 0.000 0.024 0.576 0.000
#> SRR2532377 5 0.4305 0.283 0.000 0.488 0.000 0.000 0.512
#> SRR2532376 5 0.1121 0.718 0.000 0.044 0.000 0.000 0.956
#> SRR2532375 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532374 3 0.3003 0.754 0.188 0.000 0.812 0.000 0.000
#> SRR2532372 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532373 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532371 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532370 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.0000 0.692 0.000 0.000 0.000 0.000 1.000
#> SRR2532368 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532367 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532366 1 0.1478 0.903 0.936 0.000 0.064 0.000 0.000
#> SRR2532365 2 0.3966 0.307 0.000 0.664 0.000 0.000 0.336
#> SRR2532364 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532361 4 0.0000 0.878 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.878 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.4301 0.602 0.712 0.000 0.260 0.028 0.000
#> SRR2532358 3 0.5182 0.187 0.044 0.000 0.544 0.412 0.000
#> SRR2532357 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.0162 0.941 0.004 0.000 0.996 0.000 0.000
#> SRR2532354 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532352 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532350 3 0.0510 0.937 0.016 0.000 0.984 0.000 0.000
#> SRR2532349 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532348 5 0.0510 0.696 0.000 0.016 0.000 0.000 0.984
#> SRR2532347 5 0.4219 0.458 0.000 0.416 0.000 0.000 0.584
#> SRR2532346 5 0.0404 0.696 0.000 0.012 0.000 0.000 0.988
#> SRR2532345 2 0.3305 0.592 0.000 0.776 0.000 0.000 0.224
#> SRR2532344 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532343 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532342 3 0.1831 0.885 0.076 0.000 0.920 0.004 0.000
#> SRR2532341 3 0.2005 0.897 0.016 0.000 0.924 0.004 0.056
#> SRR2532340 3 0.0880 0.926 0.032 0.000 0.968 0.000 0.000
#> SRR2532339 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532338 2 0.0404 0.888 0.000 0.988 0.000 0.000 0.012
#> SRR2532337 2 0.3210 0.616 0.000 0.788 0.000 0.000 0.212
#> SRR2532336 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.0404 0.938 0.012 0.000 0.988 0.000 0.000
#> SRR2532334 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532333 5 0.0000 0.692 0.000 0.000 0.000 0.000 1.000
#> SRR2532332 1 0.0000 0.945 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532330 5 0.3586 0.669 0.000 0.264 0.000 0.000 0.736
#> SRR2532329 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 2 0.6953 -0.101 0.160 0.456 0.028 0.356 0.000
#> SRR2532327 2 0.0162 0.893 0.000 0.996 0.000 0.000 0.004
#> SRR2532326 3 0.0000 0.941 0.000 0.000 1.000 0.000 0.000
#> SRR2532324 2 0.0000 0.893 0.000 1.000 0.000 0.000 0.000
#> SRR2532325 1 0.0865 0.932 0.972 0.000 0.024 0.004 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.3221 0.6961 0.736 0.000 0.000 0.000 0.000 0.264
#> SRR2532322 1 0.0000 0.8326 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0260 0.8954 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532320 2 0.1958 0.8856 0.000 0.896 0.000 0.000 0.100 0.004
#> SRR2532319 3 0.0790 0.9166 0.000 0.000 0.968 0.000 0.032 0.000
#> SRR2532317 6 0.4866 0.1540 0.000 0.364 0.000 0.000 0.068 0.568
#> SRR2532318 5 0.4256 -0.1621 0.000 0.016 0.000 0.000 0.520 0.464
#> SRR2532315 4 0.0000 0.8450 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.8450 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.2100 0.8791 0.000 0.884 0.000 0.000 0.112 0.004
#> SRR2532395 5 0.2178 0.7139 0.000 0.132 0.000 0.000 0.868 0.000
#> SRR2532394 5 0.3457 0.6901 0.000 0.232 0.000 0.000 0.752 0.016
#> SRR2532393 5 0.5139 -0.0419 0.000 0.084 0.000 0.000 0.492 0.424
#> SRR2532392 2 0.0937 0.9003 0.000 0.960 0.000 0.000 0.040 0.000
#> SRR2532391 3 0.1036 0.9120 0.024 0.000 0.964 0.000 0.004 0.008
#> SRR2532390 2 0.0725 0.8907 0.000 0.976 0.000 0.000 0.012 0.012
#> SRR2532389 1 0.2806 0.7911 0.876 0.000 0.040 0.004 0.068 0.012
#> SRR2532388 5 0.2762 0.7151 0.000 0.196 0.000 0.000 0.804 0.000
#> SRR2532387 5 0.2941 0.6968 0.000 0.220 0.000 0.000 0.780 0.000
#> SRR2532386 4 0.5483 0.5445 0.080 0.000 0.020 0.536 0.000 0.364
#> SRR2532384 5 0.2361 0.6773 0.000 0.088 0.000 0.000 0.884 0.028
#> SRR2532385 6 0.4610 0.3824 0.000 0.000 0.044 0.000 0.388 0.568
#> SRR2532383 2 0.2003 0.8785 0.000 0.884 0.000 0.000 0.116 0.000
#> SRR2532381 4 0.5845 0.5042 0.104 0.000 0.028 0.508 0.000 0.360
#> SRR2532382 1 0.5979 0.4037 0.492 0.000 0.028 0.120 0.000 0.360
#> SRR2532379 4 0.0000 0.8450 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.1444 0.8208 0.928 0.000 0.000 0.000 0.000 0.072
#> SRR2532378 6 0.6665 -0.4669 0.348 0.000 0.032 0.256 0.000 0.364
#> SRR2532377 5 0.2854 0.7070 0.000 0.208 0.000 0.000 0.792 0.000
#> SRR2532376 5 0.4263 -0.2131 0.000 0.016 0.000 0.000 0.504 0.480
#> SRR2532375 2 0.2118 0.8838 0.000 0.888 0.000 0.000 0.104 0.008
#> SRR2532374 3 0.4062 0.7491 0.144 0.000 0.772 0.000 0.068 0.016
#> SRR2532372 3 0.0632 0.9181 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2532373 2 0.2053 0.8820 0.000 0.888 0.000 0.000 0.108 0.004
#> SRR2532371 2 0.2053 0.8820 0.000 0.888 0.000 0.000 0.108 0.004
#> SRR2532370 1 0.0000 0.8326 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 6 0.3774 0.3918 0.000 0.000 0.000 0.000 0.408 0.592
#> SRR2532368 2 0.0291 0.9001 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR2532367 2 0.0146 0.8973 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532366 1 0.1124 0.8271 0.956 0.000 0.036 0.000 0.000 0.008
#> SRR2532365 2 0.3309 0.6177 0.000 0.720 0.000 0.000 0.280 0.000
#> SRR2532364 1 0.0260 0.8336 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8988 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0405 0.8943 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR2532361 4 0.0146 0.8428 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR2532360 4 0.0000 0.8450 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.4181 0.3699 0.616 0.000 0.368 0.004 0.004 0.008
#> SRR2532358 3 0.6656 0.2232 0.036 0.000 0.512 0.224 0.016 0.212
#> SRR2532357 2 0.0363 0.9011 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR2532356 2 0.1501 0.8936 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR2532355 3 0.0405 0.9165 0.008 0.000 0.988 0.000 0.004 0.000
#> SRR2532354 1 0.1204 0.8261 0.944 0.000 0.000 0.000 0.000 0.056
#> SRR2532353 3 0.0603 0.9183 0.000 0.000 0.980 0.004 0.016 0.000
#> SRR2532352 2 0.0146 0.9001 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532350 3 0.0922 0.9126 0.024 0.000 0.968 0.000 0.004 0.004
#> SRR2532349 3 0.0458 0.9185 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR2532348 6 0.5042 0.4012 0.000 0.100 0.000 0.000 0.308 0.592
#> SRR2532347 5 0.2135 0.7128 0.000 0.128 0.000 0.000 0.872 0.000
#> SRR2532346 6 0.4799 0.4188 0.000 0.068 0.000 0.000 0.340 0.592
#> SRR2532345 2 0.2053 0.8691 0.000 0.888 0.000 0.000 0.108 0.004
#> SRR2532344 3 0.0632 0.9181 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2532343 3 0.0632 0.9181 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2532342 3 0.2804 0.7913 0.152 0.000 0.836 0.004 0.004 0.004
#> SRR2532341 3 0.2924 0.8631 0.024 0.000 0.868 0.000 0.068 0.040
#> SRR2532340 3 0.1268 0.9072 0.036 0.000 0.952 0.000 0.004 0.008
#> SRR2532339 2 0.0622 0.8921 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR2532338 2 0.0622 0.8921 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR2532337 5 0.2854 0.7090 0.000 0.208 0.000 0.000 0.792 0.000
#> SRR2532336 1 0.3607 0.6173 0.652 0.000 0.000 0.000 0.000 0.348
#> SRR2532335 3 0.1232 0.9108 0.024 0.000 0.956 0.000 0.016 0.004
#> SRR2532334 3 0.0632 0.9181 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2532333 6 0.3774 0.3918 0.000 0.000 0.000 0.000 0.408 0.592
#> SRR2532332 1 0.0000 0.8326 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.2053 0.8820 0.000 0.888 0.000 0.000 0.108 0.004
#> SRR2532330 5 0.3017 0.6423 0.000 0.084 0.000 0.000 0.844 0.072
#> SRR2532329 2 0.0713 0.9013 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR2532328 2 0.8519 -0.1152 0.084 0.384 0.032 0.160 0.076 0.264
#> SRR2532327 2 0.0146 0.9003 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532326 3 0.0632 0.9181 0.000 0.000 0.976 0.000 0.024 0.000
#> SRR2532324 2 0.2053 0.8820 0.000 0.888 0.000 0.000 0.108 0.004
#> SRR2532325 1 0.1553 0.8252 0.944 0.000 0.032 0.004 0.012 0.008
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 1.000 0.980 0.992 0.5052 0.494 0.494
#> 3 3 0.833 0.865 0.943 0.2291 0.852 0.710
#> 4 4 0.614 0.637 0.815 0.1633 0.817 0.557
#> 5 5 0.662 0.655 0.797 0.0869 0.829 0.472
#> 6 6 0.763 0.769 0.862 0.0437 0.923 0.682
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
#> SRR2532323 1 0.0000 0.983 1.000 0.000
#> SRR2532322 1 0.0000 0.983 1.000 0.000
#> SRR2532321 2 0.0000 1.000 0.000 1.000
#> SRR2532320 2 0.0000 1.000 0.000 1.000
#> SRR2532319 1 0.0376 0.980 0.996 0.004
#> SRR2532317 2 0.0000 1.000 0.000 1.000
#> SRR2532318 2 0.0000 1.000 0.000 1.000
#> SRR2532315 1 0.0000 0.983 1.000 0.000
#> SRR2532316 1 0.0000 0.983 1.000 0.000
#> SRR2532396 2 0.0000 1.000 0.000 1.000
#> SRR2532395 2 0.0000 1.000 0.000 1.000
#> SRR2532394 2 0.0000 1.000 0.000 1.000
#> SRR2532393 2 0.0000 1.000 0.000 1.000
#> SRR2532392 2 0.0000 1.000 0.000 1.000
#> SRR2532391 1 0.0000 0.983 1.000 0.000
#> SRR2532390 2 0.0000 1.000 0.000 1.000
#> SRR2532389 1 0.0000 0.983 1.000 0.000
#> SRR2532388 2 0.0000 1.000 0.000 1.000
#> SRR2532387 2 0.0000 1.000 0.000 1.000
#> SRR2532386 1 0.0000 0.983 1.000 0.000
#> SRR2532384 2 0.0000 1.000 0.000 1.000
#> SRR2532385 2 0.0000 1.000 0.000 1.000
#> SRR2532383 2 0.0000 1.000 0.000 1.000
#> SRR2532381 1 0.0000 0.983 1.000 0.000
#> SRR2532382 1 0.0000 0.983 1.000 0.000
#> SRR2532379 1 0.0000 0.983 1.000 0.000
#> SRR2532380 1 0.0000 0.983 1.000 0.000
#> SRR2532378 1 0.0000 0.983 1.000 0.000
#> SRR2532377 2 0.0000 1.000 0.000 1.000
#> SRR2532376 2 0.0000 1.000 0.000 1.000
#> SRR2532375 2 0.0000 1.000 0.000 1.000
#> SRR2532374 1 0.0000 0.983 1.000 0.000
#> SRR2532372 1 0.0000 0.983 1.000 0.000
#> SRR2532373 2 0.0000 1.000 0.000 1.000
#> SRR2532371 2 0.0000 1.000 0.000 1.000
#> SRR2532370 1 0.0000 0.983 1.000 0.000
#> SRR2532369 2 0.0000 1.000 0.000 1.000
#> SRR2532368 2 0.0000 1.000 0.000 1.000
#> SRR2532367 2 0.0000 1.000 0.000 1.000
#> SRR2532366 1 0.0000 0.983 1.000 0.000
#> SRR2532365 2 0.0000 1.000 0.000 1.000
#> SRR2532364 1 0.0000 0.983 1.000 0.000
#> SRR2532363 2 0.0000 1.000 0.000 1.000
#> SRR2532362 2 0.0000 1.000 0.000 1.000
#> SRR2532361 1 0.0000 0.983 1.000 0.000
#> SRR2532360 1 0.0000 0.983 1.000 0.000
#> SRR2532359 1 0.0000 0.983 1.000 0.000
#> SRR2532358 1 0.0000 0.983 1.000 0.000
#> SRR2532357 2 0.0000 1.000 0.000 1.000
#> SRR2532356 2 0.0000 1.000 0.000 1.000
#> SRR2532355 1 0.0000 0.983 1.000 0.000
#> SRR2532354 1 0.0000 0.983 1.000 0.000
#> SRR2532353 1 0.0000 0.983 1.000 0.000
#> SRR2532352 2 0.0000 1.000 0.000 1.000
#> SRR2532350 1 0.0000 0.983 1.000 0.000
#> SRR2532349 1 0.0000 0.983 1.000 0.000
#> SRR2532348 2 0.0000 1.000 0.000 1.000
#> SRR2532347 2 0.0000 1.000 0.000 1.000
#> SRR2532346 2 0.0000 1.000 0.000 1.000
#> SRR2532345 2 0.0000 1.000 0.000 1.000
#> SRR2532344 1 0.0000 0.983 1.000 0.000
#> SRR2532343 1 0.0000 0.983 1.000 0.000
#> SRR2532342 1 0.0000 0.983 1.000 0.000
#> SRR2532341 1 0.9922 0.201 0.552 0.448
#> SRR2532340 1 0.0000 0.983 1.000 0.000
#> SRR2532339 2 0.0000 1.000 0.000 1.000
#> SRR2532338 2 0.0000 1.000 0.000 1.000
#> SRR2532337 2 0.0000 1.000 0.000 1.000
#> SRR2532336 1 0.0000 0.983 1.000 0.000
#> SRR2532335 1 0.0000 0.983 1.000 0.000
#> SRR2532334 1 0.0000 0.983 1.000 0.000
#> SRR2532333 2 0.0000 1.000 0.000 1.000
#> SRR2532332 1 0.0000 0.983 1.000 0.000
#> SRR2532331 2 0.0000 1.000 0.000 1.000
#> SRR2532330 2 0.0000 1.000 0.000 1.000
#> SRR2532329 2 0.0000 1.000 0.000 1.000
#> SRR2532328 1 0.6712 0.783 0.824 0.176
#> SRR2532327 2 0.0000 1.000 0.000 1.000
#> SRR2532326 1 0.0000 0.983 1.000 0.000
#> SRR2532324 2 0.0000 1.000 0.000 1.000
#> SRR2532325 1 0.0000 0.983 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.2796 0.87254 0.908 0.000 0.092
#> SRR2532322 1 0.0000 0.90743 1.000 0.000 0.000
#> SRR2532321 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532319 1 0.6516 -0.09845 0.516 0.004 0.480
#> SRR2532317 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532318 2 0.3482 0.85410 0.000 0.872 0.128
#> SRR2532315 3 0.0237 0.84301 0.004 0.000 0.996
#> SRR2532316 3 0.0000 0.84346 0.000 0.000 1.000
#> SRR2532396 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532391 1 0.0747 0.90892 0.984 0.000 0.016
#> SRR2532390 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532389 1 0.0000 0.90743 1.000 0.000 0.000
#> SRR2532388 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532386 3 0.1411 0.83588 0.036 0.000 0.964
#> SRR2532384 2 0.0237 0.97506 0.000 0.996 0.004
#> SRR2532385 3 0.3412 0.72258 0.000 0.124 0.876
#> SRR2532383 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532381 3 0.3816 0.75438 0.148 0.000 0.852
#> SRR2532382 1 0.3752 0.82976 0.856 0.000 0.144
#> SRR2532379 3 0.0000 0.84346 0.000 0.000 1.000
#> SRR2532380 1 0.0747 0.90877 0.984 0.000 0.016
#> SRR2532378 3 0.6308 -0.00196 0.492 0.000 0.508
#> SRR2532377 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532376 2 0.3412 0.85879 0.000 0.876 0.124
#> SRR2532375 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532374 1 0.0000 0.90743 1.000 0.000 0.000
#> SRR2532372 3 0.6140 0.27211 0.404 0.000 0.596
#> SRR2532373 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532370 1 0.0424 0.90876 0.992 0.000 0.008
#> SRR2532369 2 0.2066 0.92727 0.000 0.940 0.060
#> SRR2532368 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532366 1 0.1163 0.90633 0.972 0.000 0.028
#> SRR2532365 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.90743 1.000 0.000 0.000
#> SRR2532363 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532361 3 0.0000 0.84346 0.000 0.000 1.000
#> SRR2532360 3 0.0000 0.84346 0.000 0.000 1.000
#> SRR2532359 1 0.3340 0.85325 0.880 0.000 0.120
#> SRR2532358 3 0.2796 0.80462 0.092 0.000 0.908
#> SRR2532357 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532355 1 0.3267 0.85594 0.884 0.000 0.116
#> SRR2532354 1 0.1031 0.90764 0.976 0.000 0.024
#> SRR2532353 3 0.1643 0.83364 0.044 0.000 0.956
#> SRR2532352 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532350 1 0.1031 0.90750 0.976 0.000 0.024
#> SRR2532349 1 0.4842 0.72655 0.776 0.000 0.224
#> SRR2532348 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532347 2 0.0237 0.97506 0.000 0.996 0.004
#> SRR2532346 2 0.0237 0.97506 0.000 0.996 0.004
#> SRR2532345 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532344 3 0.3879 0.74621 0.152 0.000 0.848
#> SRR2532343 3 0.0000 0.84346 0.000 0.000 1.000
#> SRR2532342 3 0.6302 0.01767 0.480 0.000 0.520
#> SRR2532341 2 0.7176 0.56459 0.248 0.684 0.068
#> SRR2532340 1 0.0237 0.90821 0.996 0.000 0.004
#> SRR2532339 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532336 1 0.3192 0.85992 0.888 0.000 0.112
#> SRR2532335 1 0.0000 0.90743 1.000 0.000 0.000
#> SRR2532334 1 0.5431 0.62519 0.716 0.000 0.284
#> SRR2532333 2 0.0237 0.97506 0.000 0.996 0.004
#> SRR2532332 1 0.0000 0.90743 1.000 0.000 0.000
#> SRR2532331 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532330 2 0.5058 0.68376 0.000 0.756 0.244
#> SRR2532329 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532328 1 0.1289 0.87837 0.968 0.032 0.000
#> SRR2532327 2 0.0000 0.97752 0.000 1.000 0.000
#> SRR2532326 3 0.0000 0.84346 0.000 0.000 1.000
#> SRR2532324 2 0.0424 0.97161 0.008 0.992 0.000
#> SRR2532325 1 0.0000 0.90743 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.2704 0.79905 0.876 0.000 0.000 0.124
#> SRR2532322 1 0.1118 0.82172 0.964 0.000 0.000 0.036
#> SRR2532321 2 0.0188 0.83648 0.000 0.996 0.004 0.000
#> SRR2532320 2 0.1716 0.82550 0.000 0.936 0.064 0.000
#> SRR2532319 3 0.5905 0.26798 0.156 0.000 0.700 0.144
#> SRR2532317 2 0.3356 0.69609 0.000 0.824 0.176 0.000
#> SRR2532318 3 0.3606 0.67078 0.000 0.140 0.840 0.020
#> SRR2532315 4 0.0817 0.78633 0.024 0.000 0.000 0.976
#> SRR2532316 4 0.0000 0.79068 0.000 0.000 0.000 1.000
#> SRR2532396 2 0.0188 0.83587 0.000 0.996 0.004 0.000
#> SRR2532395 3 0.4972 0.39287 0.000 0.456 0.544 0.000
#> SRR2532394 2 0.1637 0.81228 0.000 0.940 0.060 0.000
#> SRR2532393 3 0.4103 0.64822 0.000 0.256 0.744 0.000
#> SRR2532392 2 0.0188 0.83587 0.000 0.996 0.004 0.000
#> SRR2532391 1 0.4137 0.73659 0.780 0.000 0.208 0.012
#> SRR2532390 2 0.0895 0.83753 0.004 0.976 0.020 0.000
#> SRR2532389 1 0.1256 0.81404 0.964 0.000 0.028 0.008
#> SRR2532388 3 0.4955 0.41696 0.000 0.444 0.556 0.000
#> SRR2532387 2 0.2081 0.79506 0.000 0.916 0.084 0.000
#> SRR2532386 4 0.0592 0.79086 0.016 0.000 0.000 0.984
#> SRR2532384 3 0.4790 0.53830 0.000 0.380 0.620 0.000
#> SRR2532385 3 0.3688 0.46476 0.000 0.000 0.792 0.208
#> SRR2532383 2 0.3123 0.72383 0.000 0.844 0.156 0.000
#> SRR2532381 4 0.0592 0.79086 0.016 0.000 0.000 0.984
#> SRR2532382 1 0.3266 0.76646 0.832 0.000 0.000 0.168
#> SRR2532379 4 0.0000 0.79068 0.000 0.000 0.000 1.000
#> SRR2532380 1 0.1940 0.81804 0.924 0.000 0.000 0.076
#> SRR2532378 4 0.4994 0.00473 0.480 0.000 0.000 0.520
#> SRR2532377 2 0.4972 -0.14167 0.000 0.544 0.456 0.000
#> SRR2532376 3 0.3876 0.65681 0.000 0.124 0.836 0.040
#> SRR2532375 2 0.3219 0.73316 0.000 0.836 0.164 0.000
#> SRR2532374 1 0.4257 0.70039 0.812 0.048 0.140 0.000
#> SRR2532372 3 0.7049 0.07494 0.300 0.000 0.548 0.152
#> SRR2532373 2 0.1978 0.83067 0.004 0.928 0.068 0.000
#> SRR2532371 2 0.1716 0.81166 0.000 0.936 0.064 0.000
#> SRR2532370 1 0.1637 0.81989 0.940 0.000 0.000 0.060
#> SRR2532369 3 0.5189 0.54905 0.000 0.372 0.616 0.012
#> SRR2532368 2 0.0469 0.83470 0.000 0.988 0.012 0.000
#> SRR2532367 2 0.0188 0.83587 0.000 0.996 0.004 0.000
#> SRR2532366 1 0.2011 0.81744 0.920 0.000 0.000 0.080
#> SRR2532365 2 0.3024 0.73346 0.000 0.852 0.148 0.000
#> SRR2532364 1 0.1118 0.82153 0.964 0.000 0.000 0.036
#> SRR2532363 2 0.2125 0.80278 0.004 0.920 0.076 0.000
#> SRR2532362 2 0.0592 0.83513 0.000 0.984 0.016 0.000
#> SRR2532361 4 0.1389 0.76429 0.000 0.000 0.048 0.952
#> SRR2532360 4 0.0469 0.79150 0.012 0.000 0.000 0.988
#> SRR2532359 1 0.4567 0.62722 0.716 0.000 0.008 0.276
#> SRR2532358 4 0.1584 0.77919 0.036 0.000 0.012 0.952
#> SRR2532357 2 0.2530 0.78340 0.004 0.896 0.100 0.000
#> SRR2532356 2 0.2266 0.80031 0.004 0.912 0.084 0.000
#> SRR2532355 1 0.4636 0.73136 0.792 0.000 0.068 0.140
#> SRR2532354 1 0.2281 0.81247 0.904 0.000 0.000 0.096
#> SRR2532353 4 0.7053 0.23219 0.356 0.000 0.132 0.512
#> SRR2532352 2 0.0336 0.83629 0.000 0.992 0.008 0.000
#> SRR2532350 1 0.3024 0.78059 0.852 0.000 0.148 0.000
#> SRR2532349 1 0.5963 0.61682 0.688 0.000 0.196 0.116
#> SRR2532348 3 0.3494 0.67028 0.000 0.172 0.824 0.004
#> SRR2532347 3 0.4981 0.36318 0.000 0.464 0.536 0.000
#> SRR2532346 3 0.2814 0.66803 0.000 0.132 0.868 0.000
#> SRR2532345 3 0.4855 0.50647 0.000 0.400 0.600 0.000
#> SRR2532344 3 0.6025 0.27504 0.096 0.000 0.668 0.236
#> SRR2532343 4 0.7377 0.38199 0.216 0.000 0.264 0.520
#> SRR2532342 4 0.5873 0.14208 0.416 0.000 0.036 0.548
#> SRR2532341 3 0.8346 -0.09169 0.304 0.064 0.496 0.136
#> SRR2532340 1 0.1302 0.80889 0.956 0.000 0.044 0.000
#> SRR2532339 2 0.0592 0.83513 0.000 0.984 0.016 0.000
#> SRR2532338 2 0.1305 0.83077 0.004 0.960 0.036 0.000
#> SRR2532337 2 0.4697 0.26474 0.000 0.644 0.356 0.000
#> SRR2532336 1 0.2814 0.79388 0.868 0.000 0.000 0.132
#> SRR2532335 1 0.4053 0.72388 0.768 0.004 0.228 0.000
#> SRR2532334 1 0.6537 0.52371 0.636 0.000 0.164 0.200
#> SRR2532333 3 0.4428 0.63930 0.000 0.276 0.720 0.004
#> SRR2532332 1 0.1118 0.82153 0.964 0.000 0.000 0.036
#> SRR2532331 2 0.4994 -0.08339 0.000 0.520 0.480 0.000
#> SRR2532330 3 0.5090 0.60186 0.000 0.324 0.660 0.016
#> SRR2532329 2 0.2888 0.76783 0.004 0.872 0.124 0.000
#> SRR2532328 2 0.7887 0.27092 0.316 0.500 0.160 0.024
#> SRR2532327 2 0.0817 0.83583 0.000 0.976 0.024 0.000
#> SRR2532326 1 0.7896 -0.11880 0.356 0.000 0.292 0.352
#> SRR2532324 2 0.4136 0.74301 0.016 0.788 0.196 0.000
#> SRR2532325 1 0.0921 0.81078 0.972 0.000 0.028 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0510 0.8562 0.984 0.000 0.000 0.016 0.000
#> SRR2532322 1 0.0000 0.8557 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.3039 0.8229 0.000 0.808 0.000 0.000 0.192
#> SRR2532320 2 0.3760 0.7559 0.000 0.784 0.028 0.000 0.188
#> SRR2532319 3 0.3139 0.7369 0.016 0.004 0.872 0.024 0.084
#> SRR2532317 5 0.3366 0.5455 0.000 0.232 0.000 0.000 0.768
#> SRR2532318 5 0.4291 0.1687 0.000 0.000 0.464 0.000 0.536
#> SRR2532315 4 0.0404 0.9040 0.012 0.000 0.000 0.988 0.000
#> SRR2532316 4 0.0162 0.9021 0.000 0.000 0.004 0.996 0.000
#> SRR2532396 2 0.2966 0.8276 0.000 0.816 0.000 0.000 0.184
#> SRR2532395 5 0.1484 0.6950 0.000 0.048 0.008 0.000 0.944
#> SRR2532394 5 0.4262 -0.0301 0.000 0.440 0.000 0.000 0.560
#> SRR2532393 5 0.2886 0.6407 0.000 0.008 0.148 0.000 0.844
#> SRR2532392 2 0.3534 0.7627 0.000 0.744 0.000 0.000 0.256
#> SRR2532391 3 0.4885 0.4185 0.368 0.008 0.608 0.008 0.008
#> SRR2532390 2 0.3109 0.8170 0.000 0.800 0.000 0.000 0.200
#> SRR2532389 1 0.3265 0.7867 0.860 0.088 0.040 0.012 0.000
#> SRR2532388 5 0.1626 0.6998 0.000 0.044 0.016 0.000 0.940
#> SRR2532387 5 0.3707 0.4526 0.000 0.284 0.000 0.000 0.716
#> SRR2532386 4 0.0404 0.9040 0.012 0.000 0.000 0.988 0.000
#> SRR2532384 5 0.0898 0.7019 0.000 0.008 0.020 0.000 0.972
#> SRR2532385 5 0.4982 0.2198 0.000 0.000 0.412 0.032 0.556
#> SRR2532383 5 0.3819 0.5432 0.000 0.228 0.016 0.000 0.756
#> SRR2532381 4 0.0510 0.9007 0.016 0.000 0.000 0.984 0.000
#> SRR2532382 1 0.0794 0.8515 0.972 0.000 0.000 0.028 0.000
#> SRR2532379 4 0.0162 0.9021 0.000 0.000 0.004 0.996 0.000
#> SRR2532380 1 0.0404 0.8571 0.988 0.000 0.000 0.012 0.000
#> SRR2532378 1 0.2798 0.7541 0.852 0.000 0.008 0.140 0.000
#> SRR2532377 5 0.2329 0.6522 0.000 0.124 0.000 0.000 0.876
#> SRR2532376 5 0.4305 0.1161 0.000 0.000 0.488 0.000 0.512
#> SRR2532375 5 0.5233 0.3982 0.000 0.288 0.076 0.000 0.636
#> SRR2532374 1 0.7182 0.2098 0.436 0.296 0.244 0.000 0.024
#> SRR2532372 3 0.2409 0.7475 0.028 0.000 0.908 0.008 0.056
#> SRR2532373 2 0.3999 0.3495 0.000 0.656 0.000 0.000 0.344
#> SRR2532371 5 0.4192 0.0785 0.000 0.404 0.000 0.000 0.596
#> SRR2532370 1 0.0404 0.8569 0.988 0.000 0.000 0.012 0.000
#> SRR2532369 5 0.1571 0.7026 0.000 0.004 0.060 0.000 0.936
#> SRR2532368 2 0.3366 0.7980 0.000 0.768 0.000 0.000 0.232
#> SRR2532367 2 0.3109 0.8179 0.000 0.800 0.000 0.000 0.200
#> SRR2532366 1 0.0451 0.8569 0.988 0.000 0.004 0.008 0.000
#> SRR2532365 5 0.2852 0.6123 0.000 0.172 0.000 0.000 0.828
#> SRR2532364 1 0.0162 0.8546 0.996 0.000 0.004 0.000 0.000
#> SRR2532363 2 0.0963 0.7930 0.000 0.964 0.000 0.000 0.036
#> SRR2532362 2 0.3003 0.8246 0.000 0.812 0.000 0.000 0.188
#> SRR2532361 4 0.0510 0.8938 0.000 0.000 0.016 0.984 0.000
#> SRR2532360 4 0.0404 0.9040 0.012 0.000 0.000 0.988 0.000
#> SRR2532359 1 0.4659 0.6685 0.744 0.004 0.084 0.168 0.000
#> SRR2532358 4 0.2110 0.8395 0.016 0.000 0.072 0.912 0.000
#> SRR2532357 2 0.0703 0.7860 0.000 0.976 0.000 0.000 0.024
#> SRR2532356 2 0.0794 0.7882 0.000 0.972 0.000 0.000 0.028
#> SRR2532355 1 0.5106 -0.1877 0.508 0.000 0.456 0.036 0.000
#> SRR2532354 1 0.0404 0.8569 0.988 0.000 0.000 0.012 0.000
#> SRR2532353 3 0.5767 0.5882 0.112 0.000 0.604 0.280 0.004
#> SRR2532352 2 0.2891 0.8272 0.000 0.824 0.000 0.000 0.176
#> SRR2532350 1 0.4200 0.4210 0.672 0.004 0.320 0.004 0.000
#> SRR2532349 3 0.4052 0.7385 0.204 0.000 0.764 0.028 0.004
#> SRR2532348 5 0.3636 0.5119 0.000 0.000 0.272 0.000 0.728
#> SRR2532347 5 0.1484 0.6951 0.000 0.048 0.008 0.000 0.944
#> SRR2532346 5 0.4219 0.2947 0.000 0.000 0.416 0.000 0.584
#> SRR2532345 5 0.2325 0.6988 0.000 0.028 0.068 0.000 0.904
#> SRR2532344 3 0.3141 0.7162 0.000 0.000 0.852 0.040 0.108
#> SRR2532343 3 0.5207 0.6970 0.076 0.000 0.708 0.196 0.020
#> SRR2532342 4 0.6368 0.0642 0.332 0.000 0.180 0.488 0.000
#> SRR2532341 3 0.6763 0.5820 0.120 0.112 0.656 0.080 0.032
#> SRR2532340 1 0.1788 0.8305 0.932 0.004 0.056 0.008 0.000
#> SRR2532339 2 0.3003 0.8246 0.000 0.812 0.000 0.000 0.188
#> SRR2532338 2 0.2690 0.8274 0.000 0.844 0.000 0.000 0.156
#> SRR2532337 5 0.2179 0.6616 0.000 0.112 0.000 0.000 0.888
#> SRR2532336 1 0.0404 0.8571 0.988 0.000 0.000 0.012 0.000
#> SRR2532335 3 0.4131 0.7021 0.216 0.020 0.756 0.004 0.004
#> SRR2532334 3 0.4914 0.6833 0.260 0.000 0.676 0.064 0.000
#> SRR2532333 5 0.4390 0.2307 0.000 0.004 0.428 0.000 0.568
#> SRR2532332 1 0.0162 0.8564 0.996 0.000 0.000 0.004 0.000
#> SRR2532331 5 0.4806 0.5976 0.000 0.060 0.252 0.000 0.688
#> SRR2532330 5 0.1502 0.7023 0.000 0.004 0.056 0.000 0.940
#> SRR2532329 2 0.0898 0.7733 0.000 0.972 0.008 0.000 0.020
#> SRR2532328 2 0.6259 0.4459 0.172 0.668 0.104 0.032 0.024
#> SRR2532327 2 0.1851 0.8130 0.000 0.912 0.000 0.000 0.088
#> SRR2532326 3 0.4588 0.7471 0.068 0.000 0.784 0.112 0.036
#> SRR2532324 2 0.5597 0.3683 0.004 0.624 0.100 0.000 0.272
#> SRR2532325 1 0.2235 0.8267 0.920 0.040 0.032 0.004 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.926 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532322 1 0.0146 0.926 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532321 2 0.0972 0.896 0.000 0.964 0.000 0.000 0.028 0.008
#> SRR2532320 2 0.5480 0.391 0.000 0.564 0.000 0.000 0.184 0.252
#> SRR2532319 3 0.1176 0.773 0.000 0.000 0.956 0.000 0.020 0.024
#> SRR2532317 5 0.3907 0.729 0.000 0.176 0.000 0.000 0.756 0.068
#> SRR2532318 5 0.3770 0.616 0.000 0.000 0.244 0.000 0.728 0.028
#> SRR2532315 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0260 0.958 0.000 0.000 0.008 0.992 0.000 0.000
#> SRR2532396 2 0.1225 0.895 0.000 0.952 0.000 0.000 0.036 0.012
#> SRR2532395 5 0.1918 0.790 0.000 0.088 0.000 0.000 0.904 0.008
#> SRR2532394 2 0.3684 0.464 0.000 0.664 0.000 0.000 0.332 0.004
#> SRR2532393 5 0.0976 0.773 0.000 0.008 0.016 0.000 0.968 0.008
#> SRR2532392 2 0.1411 0.882 0.000 0.936 0.000 0.000 0.060 0.004
#> SRR2532391 3 0.5409 0.289 0.076 0.004 0.496 0.008 0.000 0.416
#> SRR2532390 2 0.1116 0.896 0.000 0.960 0.008 0.000 0.028 0.004
#> SRR2532389 1 0.4223 0.479 0.632 0.004 0.008 0.008 0.000 0.348
#> SRR2532388 5 0.0806 0.780 0.000 0.020 0.000 0.000 0.972 0.008
#> SRR2532387 5 0.3582 0.678 0.000 0.252 0.000 0.000 0.732 0.016
#> SRR2532386 4 0.0146 0.959 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR2532384 5 0.1327 0.791 0.000 0.064 0.000 0.000 0.936 0.000
#> SRR2532385 5 0.4359 0.489 0.000 0.000 0.312 0.008 0.652 0.028
#> SRR2532383 5 0.3017 0.775 0.000 0.084 0.000 0.000 0.844 0.072
#> SRR2532381 4 0.0146 0.959 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR2532382 1 0.0508 0.924 0.984 0.000 0.000 0.012 0.000 0.004
#> SRR2532379 4 0.0146 0.960 0.000 0.000 0.004 0.996 0.000 0.000
#> SRR2532380 1 0.0146 0.926 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532378 1 0.1285 0.896 0.944 0.000 0.000 0.052 0.000 0.004
#> SRR2532377 5 0.1910 0.785 0.000 0.108 0.000 0.000 0.892 0.000
#> SRR2532376 5 0.3817 0.611 0.000 0.000 0.252 0.000 0.720 0.028
#> SRR2532375 5 0.4602 0.462 0.000 0.048 0.004 0.000 0.628 0.320
#> SRR2532374 6 0.2514 0.837 0.052 0.032 0.000 0.004 0.016 0.896
#> SRR2532372 3 0.1951 0.773 0.004 0.000 0.916 0.000 0.020 0.060
#> SRR2532373 5 0.5884 0.153 0.000 0.212 0.000 0.000 0.452 0.336
#> SRR2532371 5 0.3998 0.532 0.000 0.340 0.000 0.000 0.644 0.016
#> SRR2532370 1 0.0520 0.924 0.984 0.000 0.000 0.008 0.000 0.008
#> SRR2532369 5 0.2535 0.790 0.000 0.064 0.036 0.000 0.888 0.012
#> SRR2532368 2 0.2404 0.855 0.000 0.884 0.000 0.000 0.080 0.036
#> SRR2532367 2 0.1498 0.892 0.000 0.940 0.000 0.000 0.032 0.028
#> SRR2532366 1 0.0146 0.925 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532365 5 0.2669 0.769 0.000 0.156 0.000 0.000 0.836 0.008
#> SRR2532364 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.1524 0.876 0.000 0.932 0.000 0.000 0.008 0.060
#> SRR2532362 2 0.0909 0.896 0.000 0.968 0.000 0.000 0.020 0.012
#> SRR2532361 4 0.0458 0.953 0.000 0.000 0.016 0.984 0.000 0.000
#> SRR2532360 4 0.0000 0.960 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.3963 0.765 0.796 0.000 0.044 0.112 0.000 0.048
#> SRR2532358 4 0.3219 0.750 0.008 0.000 0.168 0.808 0.000 0.016
#> SRR2532357 2 0.1387 0.861 0.000 0.932 0.000 0.000 0.000 0.068
#> SRR2532356 2 0.1588 0.865 0.000 0.924 0.000 0.000 0.004 0.072
#> SRR2532355 3 0.2631 0.721 0.152 0.000 0.840 0.000 0.000 0.008
#> SRR2532354 1 0.0146 0.926 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532353 3 0.2281 0.773 0.012 0.000 0.908 0.048 0.004 0.028
#> SRR2532352 2 0.0777 0.897 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR2532350 3 0.5127 0.371 0.384 0.000 0.528 0.000 0.000 0.088
#> SRR2532349 3 0.2384 0.774 0.040 0.000 0.896 0.008 0.000 0.056
#> SRR2532348 5 0.3481 0.697 0.000 0.000 0.160 0.000 0.792 0.048
#> SRR2532347 5 0.1531 0.792 0.000 0.068 0.000 0.000 0.928 0.004
#> SRR2532346 5 0.4643 0.586 0.000 0.000 0.184 0.000 0.688 0.128
#> SRR2532345 5 0.1977 0.782 0.000 0.032 0.008 0.000 0.920 0.040
#> SRR2532344 3 0.1408 0.770 0.000 0.000 0.944 0.000 0.036 0.020
#> SRR2532343 3 0.1565 0.780 0.008 0.000 0.944 0.032 0.008 0.008
#> SRR2532342 3 0.5728 0.307 0.152 0.000 0.488 0.356 0.000 0.004
#> SRR2532341 6 0.4822 0.776 0.004 0.028 0.084 0.096 0.028 0.760
#> SRR2532340 1 0.3284 0.718 0.784 0.000 0.020 0.000 0.000 0.196
#> SRR2532339 2 0.1049 0.895 0.000 0.960 0.000 0.000 0.032 0.008
#> SRR2532338 2 0.0984 0.892 0.000 0.968 0.012 0.000 0.012 0.008
#> SRR2532337 5 0.2300 0.775 0.000 0.144 0.000 0.000 0.856 0.000
#> SRR2532336 1 0.0291 0.926 0.992 0.000 0.000 0.004 0.000 0.004
#> SRR2532335 3 0.4264 0.497 0.032 0.000 0.636 0.000 0.000 0.332
#> SRR2532334 3 0.1737 0.782 0.040 0.000 0.932 0.008 0.000 0.020
#> SRR2532333 3 0.4161 0.607 0.000 0.028 0.752 0.000 0.184 0.036
#> SRR2532332 1 0.0000 0.926 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.4063 0.634 0.000 0.016 0.032 0.000 0.740 0.212
#> SRR2532330 5 0.2764 0.789 0.000 0.100 0.028 0.000 0.864 0.008
#> SRR2532329 2 0.2362 0.801 0.000 0.860 0.004 0.000 0.000 0.136
#> SRR2532328 6 0.4402 0.817 0.040 0.088 0.004 0.084 0.004 0.780
#> SRR2532327 2 0.1594 0.884 0.000 0.932 0.000 0.000 0.016 0.052
#> SRR2532326 3 0.1672 0.781 0.012 0.000 0.940 0.016 0.004 0.028
#> SRR2532324 6 0.3225 0.817 0.000 0.092 0.000 0.000 0.080 0.828
#> SRR2532325 1 0.2020 0.863 0.896 0.008 0.000 0.000 0.000 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)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.983 0.990 0.5038 0.494 0.494
#> 3 3 0.762 0.725 0.868 0.2047 0.883 0.764
#> 4 4 0.814 0.862 0.917 0.0650 0.935 0.834
#> 5 5 0.844 0.857 0.938 0.0186 0.998 0.994
#> 6 6 0.678 0.729 0.847 0.1491 0.884 0.660
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
#> SRR2532323 1 0.0000 0.988 1.000 0.000
#> SRR2532322 1 0.0000 0.988 1.000 0.000
#> SRR2532321 2 0.0000 0.991 0.000 1.000
#> SRR2532320 2 0.0000 0.991 0.000 1.000
#> SRR2532319 1 0.3274 0.951 0.940 0.060
#> SRR2532317 2 0.0000 0.991 0.000 1.000
#> SRR2532318 2 0.4431 0.904 0.092 0.908
#> SRR2532315 1 0.0000 0.988 1.000 0.000
#> SRR2532316 1 0.0000 0.988 1.000 0.000
#> SRR2532396 2 0.0000 0.991 0.000 1.000
#> SRR2532395 2 0.0000 0.991 0.000 1.000
#> SRR2532394 2 0.0000 0.991 0.000 1.000
#> SRR2532393 2 0.0000 0.991 0.000 1.000
#> SRR2532392 2 0.0000 0.991 0.000 1.000
#> SRR2532391 1 0.2236 0.972 0.964 0.036
#> SRR2532390 2 0.0000 0.991 0.000 1.000
#> SRR2532389 1 0.0000 0.988 1.000 0.000
#> SRR2532388 2 0.0000 0.991 0.000 1.000
#> SRR2532387 2 0.0000 0.991 0.000 1.000
#> SRR2532386 1 0.0000 0.988 1.000 0.000
#> SRR2532384 2 0.0000 0.991 0.000 1.000
#> SRR2532385 2 0.4431 0.904 0.092 0.908
#> SRR2532383 2 0.0000 0.991 0.000 1.000
#> SRR2532381 1 0.0000 0.988 1.000 0.000
#> SRR2532382 1 0.0000 0.988 1.000 0.000
#> SRR2532379 1 0.0000 0.988 1.000 0.000
#> SRR2532380 1 0.0000 0.988 1.000 0.000
#> SRR2532378 1 0.0000 0.988 1.000 0.000
#> SRR2532377 2 0.0000 0.991 0.000 1.000
#> SRR2532376 2 0.4431 0.904 0.092 0.908
#> SRR2532375 2 0.0000 0.991 0.000 1.000
#> SRR2532374 1 0.2423 0.969 0.960 0.040
#> SRR2532372 1 0.2043 0.975 0.968 0.032
#> SRR2532373 2 0.0000 0.991 0.000 1.000
#> SRR2532371 2 0.0000 0.991 0.000 1.000
#> SRR2532370 1 0.0000 0.988 1.000 0.000
#> SRR2532369 2 0.0000 0.991 0.000 1.000
#> SRR2532368 2 0.0000 0.991 0.000 1.000
#> SRR2532367 2 0.0000 0.991 0.000 1.000
#> SRR2532366 1 0.0000 0.988 1.000 0.000
#> SRR2532365 2 0.0000 0.991 0.000 1.000
#> SRR2532364 1 0.0000 0.988 1.000 0.000
#> SRR2532363 2 0.0000 0.991 0.000 1.000
#> SRR2532362 2 0.0000 0.991 0.000 1.000
#> SRR2532361 1 0.0000 0.988 1.000 0.000
#> SRR2532360 1 0.0000 0.988 1.000 0.000
#> SRR2532359 1 0.0000 0.988 1.000 0.000
#> SRR2532358 1 0.1414 0.982 0.980 0.020
#> SRR2532357 2 0.0000 0.991 0.000 1.000
#> SRR2532356 2 0.0000 0.991 0.000 1.000
#> SRR2532355 1 0.0938 0.985 0.988 0.012
#> SRR2532354 1 0.0000 0.988 1.000 0.000
#> SRR2532353 1 0.0938 0.985 0.988 0.012
#> SRR2532352 2 0.0000 0.991 0.000 1.000
#> SRR2532350 1 0.0938 0.985 0.988 0.012
#> SRR2532349 1 0.1843 0.977 0.972 0.028
#> SRR2532348 2 0.0000 0.991 0.000 1.000
#> SRR2532347 2 0.0000 0.991 0.000 1.000
#> SRR2532346 2 0.4022 0.917 0.080 0.920
#> SRR2532345 2 0.0000 0.991 0.000 1.000
#> SRR2532344 1 0.3274 0.951 0.940 0.060
#> SRR2532343 1 0.0938 0.985 0.988 0.012
#> SRR2532342 1 0.0000 0.988 1.000 0.000
#> SRR2532341 1 0.2423 0.969 0.960 0.040
#> SRR2532340 1 0.0938 0.985 0.988 0.012
#> SRR2532339 2 0.0000 0.991 0.000 1.000
#> SRR2532338 2 0.0000 0.991 0.000 1.000
#> SRR2532337 2 0.0000 0.991 0.000 1.000
#> SRR2532336 1 0.0000 0.988 1.000 0.000
#> SRR2532335 1 0.2423 0.969 0.960 0.040
#> SRR2532334 1 0.0938 0.985 0.988 0.012
#> SRR2532333 2 0.0000 0.991 0.000 1.000
#> SRR2532332 1 0.0000 0.988 1.000 0.000
#> SRR2532331 2 0.0000 0.991 0.000 1.000
#> SRR2532330 2 0.0000 0.991 0.000 1.000
#> SRR2532329 2 0.0000 0.991 0.000 1.000
#> SRR2532328 1 0.2603 0.966 0.956 0.044
#> SRR2532327 2 0.0000 0.991 0.000 1.000
#> SRR2532326 1 0.0938 0.985 0.988 0.012
#> SRR2532324 2 0.0000 0.991 0.000 1.000
#> SRR2532325 1 0.0000 0.988 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.5178 0.451 0.744 0.000 0.256
#> SRR2532322 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532321 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532319 3 0.6648 0.530 0.364 0.016 0.620
#> SRR2532317 2 0.0237 0.986 0.000 0.996 0.004
#> SRR2532318 2 0.3267 0.880 0.000 0.884 0.116
#> SRR2532315 3 0.4002 0.433 0.160 0.000 0.840
#> SRR2532316 3 0.4002 0.433 0.160 0.000 0.840
#> SRR2532396 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532391 3 0.6298 0.530 0.388 0.004 0.608
#> SRR2532390 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532389 1 0.3752 0.595 0.856 0.000 0.144
#> SRR2532388 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532386 3 0.6154 0.107 0.408 0.000 0.592
#> SRR2532384 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532385 2 0.3267 0.880 0.000 0.884 0.116
#> SRR2532383 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532381 3 0.6154 0.107 0.408 0.000 0.592
#> SRR2532382 1 0.3879 0.581 0.848 0.000 0.152
#> SRR2532379 3 0.4002 0.433 0.160 0.000 0.840
#> SRR2532380 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532378 1 0.5178 0.451 0.744 0.000 0.256
#> SRR2532377 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532376 2 0.3267 0.880 0.000 0.884 0.116
#> SRR2532375 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532374 3 0.6247 0.538 0.376 0.004 0.620
#> SRR2532372 3 0.6225 0.474 0.432 0.000 0.568
#> SRR2532373 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532370 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532369 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532368 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532366 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532365 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532364 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532363 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532361 3 0.4002 0.433 0.160 0.000 0.840
#> SRR2532360 3 0.4002 0.433 0.160 0.000 0.840
#> SRR2532359 1 0.4931 0.445 0.768 0.000 0.232
#> SRR2532358 3 0.5859 0.540 0.344 0.000 0.656
#> SRR2532357 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532355 3 0.6192 0.495 0.420 0.000 0.580
#> SRR2532354 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532353 3 0.6235 0.466 0.436 0.000 0.564
#> SRR2532352 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532350 1 0.6309 -0.394 0.500 0.000 0.500
#> SRR2532349 3 0.6244 0.463 0.440 0.000 0.560
#> SRR2532348 2 0.0424 0.983 0.000 0.992 0.008
#> SRR2532347 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532346 2 0.3038 0.893 0.000 0.896 0.104
#> SRR2532345 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532344 3 0.6648 0.530 0.364 0.016 0.620
#> SRR2532343 3 0.6192 0.495 0.420 0.000 0.580
#> SRR2532342 1 0.5327 0.345 0.728 0.000 0.272
#> SRR2532341 3 0.6247 0.538 0.376 0.004 0.620
#> SRR2532340 1 0.6309 -0.394 0.500 0.000 0.500
#> SRR2532339 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532336 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532335 3 0.6247 0.538 0.376 0.004 0.620
#> SRR2532334 1 0.6140 -0.126 0.596 0.000 0.404
#> SRR2532333 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532332 1 0.0000 0.708 1.000 0.000 0.000
#> SRR2532331 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532330 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532329 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532328 3 0.0000 0.458 0.000 0.000 1.000
#> SRR2532327 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532326 3 0.6235 0.466 0.436 0.000 0.564
#> SRR2532324 2 0.0000 0.989 0.000 1.000 0.000
#> SRR2532325 1 0.3752 0.595 0.856 0.000 0.144
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.4193 0.5333 0.732 0.000 0.000 0.268
#> SRR2532322 1 0.0817 0.8313 0.976 0.000 0.024 0.000
#> SRR2532321 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532320 2 0.0188 0.9852 0.000 0.996 0.004 0.000
#> SRR2532319 3 0.0937 0.8273 0.000 0.012 0.976 0.012
#> SRR2532317 2 0.0376 0.9826 0.000 0.992 0.004 0.004
#> SRR2532318 2 0.2928 0.8759 0.000 0.880 0.108 0.012
#> SRR2532315 4 0.4852 0.8318 0.072 0.000 0.152 0.776
#> SRR2532316 4 0.4852 0.8318 0.072 0.000 0.152 0.776
#> SRR2532396 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532395 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532394 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532393 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532392 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532391 3 0.0592 0.8474 0.016 0.000 0.984 0.000
#> SRR2532390 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532389 1 0.3649 0.6708 0.796 0.000 0.204 0.000
#> SRR2532388 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532387 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532386 4 0.7248 0.4322 0.380 0.000 0.148 0.472
#> SRR2532384 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532385 2 0.2928 0.8759 0.000 0.880 0.108 0.012
#> SRR2532383 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532381 4 0.7248 0.4322 0.380 0.000 0.148 0.472
#> SRR2532382 1 0.3219 0.6857 0.836 0.000 0.000 0.164
#> SRR2532379 4 0.4852 0.8318 0.072 0.000 0.152 0.776
#> SRR2532380 1 0.0817 0.8313 0.976 0.000 0.024 0.000
#> SRR2532378 1 0.4193 0.5333 0.732 0.000 0.000 0.268
#> SRR2532377 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532376 2 0.2928 0.8759 0.000 0.880 0.108 0.012
#> SRR2532375 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532374 3 0.0000 0.8403 0.000 0.000 1.000 0.000
#> SRR2532372 3 0.1867 0.8611 0.072 0.000 0.928 0.000
#> SRR2532373 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532371 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532370 1 0.0817 0.8313 0.976 0.000 0.024 0.000
#> SRR2532369 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532368 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532367 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532366 1 0.0817 0.8313 0.976 0.000 0.024 0.000
#> SRR2532365 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532364 1 0.0921 0.8303 0.972 0.000 0.028 0.000
#> SRR2532363 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532362 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532361 4 0.4852 0.8318 0.072 0.000 0.152 0.776
#> SRR2532360 4 0.4852 0.8318 0.072 0.000 0.152 0.776
#> SRR2532359 1 0.5161 -0.0647 0.520 0.000 0.476 0.004
#> SRR2532358 3 0.4257 0.7700 0.048 0.000 0.812 0.140
#> SRR2532357 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532356 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532355 3 0.3421 0.8526 0.088 0.000 0.868 0.044
#> SRR2532354 1 0.0817 0.8313 0.976 0.000 0.024 0.000
#> SRR2532353 3 0.3958 0.8394 0.112 0.000 0.836 0.052
#> SRR2532352 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532350 3 0.3266 0.8220 0.168 0.000 0.832 0.000
#> SRR2532349 3 0.2011 0.8609 0.080 0.000 0.920 0.000
#> SRR2532348 2 0.0524 0.9797 0.000 0.988 0.004 0.008
#> SRR2532347 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532346 2 0.2741 0.8886 0.000 0.892 0.096 0.012
#> SRR2532345 2 0.0188 0.9852 0.000 0.996 0.004 0.000
#> SRR2532344 3 0.0937 0.8273 0.000 0.012 0.976 0.012
#> SRR2532343 3 0.3421 0.8526 0.088 0.000 0.868 0.044
#> SRR2532342 3 0.5105 0.2869 0.432 0.000 0.564 0.004
#> SRR2532341 3 0.0000 0.8403 0.000 0.000 1.000 0.000
#> SRR2532340 3 0.3266 0.8220 0.168 0.000 0.832 0.000
#> SRR2532339 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532338 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532337 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532336 1 0.0817 0.8313 0.976 0.000 0.024 0.000
#> SRR2532335 3 0.0000 0.8403 0.000 0.000 1.000 0.000
#> SRR2532334 3 0.4164 0.7058 0.264 0.000 0.736 0.000
#> SRR2532333 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532332 1 0.0921 0.8303 0.972 0.000 0.028 0.000
#> SRR2532331 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532330 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532329 2 0.0188 0.9852 0.000 0.996 0.004 0.000
#> SRR2532328 4 0.3958 0.5854 0.024 0.000 0.160 0.816
#> SRR2532327 2 0.0000 0.9875 0.000 1.000 0.000 0.000
#> SRR2532326 3 0.3958 0.8394 0.112 0.000 0.836 0.052
#> SRR2532324 2 0.0188 0.9852 0.000 0.996 0.004 0.000
#> SRR2532325 1 0.3649 0.6708 0.796 0.000 0.204 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.3835 0.5794 0.732 0.000 0.000 0.260 0.008
#> SRR2532322 1 0.0000 0.8399 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532320 2 0.0162 0.9831 0.000 0.996 0.004 0.000 0.000
#> SRR2532319 3 0.0955 0.8268 0.000 0.000 0.968 0.004 0.028
#> SRR2532317 2 0.0324 0.9803 0.000 0.992 0.004 0.000 0.004
#> SRR2532318 2 0.2848 0.8539 0.000 0.868 0.104 0.000 0.028
#> SRR2532315 4 0.0162 0.8011 0.000 0.000 0.004 0.996 0.000
#> SRR2532316 4 0.0162 0.8011 0.000 0.000 0.004 0.996 0.000
#> SRR2532396 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532395 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532394 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532393 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532392 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532391 3 0.0693 0.8504 0.012 0.000 0.980 0.008 0.000
#> SRR2532390 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 1 0.3086 0.7011 0.816 0.000 0.180 0.004 0.000
#> SRR2532388 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532387 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532386 4 0.4823 0.4840 0.316 0.000 0.040 0.644 0.000
#> SRR2532384 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532385 2 0.2848 0.8539 0.000 0.868 0.104 0.000 0.028
#> SRR2532383 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532381 4 0.4823 0.4840 0.316 0.000 0.040 0.644 0.000
#> SRR2532382 1 0.2773 0.7121 0.836 0.000 0.000 0.164 0.000
#> SRR2532379 4 0.0162 0.8011 0.000 0.000 0.004 0.996 0.000
#> SRR2532380 1 0.0000 0.8399 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.3835 0.5794 0.732 0.000 0.000 0.260 0.008
#> SRR2532377 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532376 2 0.2848 0.8539 0.000 0.868 0.104 0.000 0.028
#> SRR2532375 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532374 3 0.0000 0.8427 0.000 0.000 1.000 0.000 0.000
#> SRR2532372 3 0.1608 0.8647 0.072 0.000 0.928 0.000 0.000
#> SRR2532373 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532371 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532370 1 0.0000 0.8399 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532368 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532367 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532366 1 0.0000 0.8399 1.000 0.000 0.000 0.000 0.000
#> SRR2532365 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532364 1 0.0162 0.8392 0.996 0.000 0.004 0.000 0.000
#> SRR2532363 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532362 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532361 4 0.0162 0.8011 0.000 0.000 0.004 0.996 0.000
#> SRR2532360 4 0.0162 0.8011 0.000 0.000 0.004 0.996 0.000
#> SRR2532359 1 0.4731 -0.0619 0.528 0.000 0.456 0.016 0.000
#> SRR2532358 3 0.3853 0.7926 0.036 0.000 0.804 0.152 0.008
#> SRR2532357 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532356 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.3102 0.8595 0.084 0.000 0.860 0.056 0.000
#> SRR2532354 1 0.0000 0.8399 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.3707 0.8494 0.108 0.000 0.828 0.056 0.008
#> SRR2532352 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532350 3 0.3093 0.8301 0.168 0.000 0.824 0.008 0.000
#> SRR2532349 3 0.1956 0.8653 0.076 0.000 0.916 0.008 0.000
#> SRR2532348 2 0.0451 0.9772 0.000 0.988 0.004 0.000 0.008
#> SRR2532347 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532346 2 0.2685 0.8680 0.000 0.880 0.092 0.000 0.028
#> SRR2532345 2 0.0162 0.9831 0.000 0.996 0.004 0.000 0.000
#> SRR2532344 3 0.0955 0.8268 0.000 0.000 0.968 0.004 0.028
#> SRR2532343 3 0.3102 0.8595 0.084 0.000 0.860 0.056 0.000
#> SRR2532342 3 0.4708 0.2916 0.436 0.000 0.548 0.016 0.000
#> SRR2532341 3 0.0162 0.8410 0.000 0.000 0.996 0.004 0.000
#> SRR2532340 3 0.2970 0.8300 0.168 0.000 0.828 0.004 0.000
#> SRR2532339 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532336 1 0.0000 0.8399 1.000 0.000 0.000 0.000 0.000
#> SRR2532335 3 0.0162 0.8410 0.000 0.000 0.996 0.004 0.000
#> SRR2532334 3 0.3967 0.7080 0.264 0.000 0.724 0.012 0.000
#> SRR2532333 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532332 1 0.0162 0.8392 0.996 0.000 0.004 0.000 0.000
#> SRR2532331 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532330 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532329 2 0.0162 0.9831 0.000 0.996 0.004 0.000 0.000
#> SRR2532328 5 0.0404 0.0000 0.000 0.000 0.000 0.012 0.988
#> SRR2532327 2 0.0000 0.9856 0.000 1.000 0.000 0.000 0.000
#> SRR2532326 3 0.3707 0.8494 0.108 0.000 0.828 0.056 0.008
#> SRR2532324 2 0.0162 0.9831 0.000 0.996 0.004 0.000 0.000
#> SRR2532325 1 0.3086 0.7011 0.816 0.000 0.180 0.004 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.3722 0.5691 0.724 0.000 0.004 0.260 0.004 0.008
#> SRR2532322 1 0.0146 0.8279 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2532321 2 0.0146 0.8424 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532320 2 0.1219 0.8323 0.000 0.948 0.004 0.000 0.048 0.000
#> SRR2532319 3 0.2378 0.7478 0.000 0.000 0.848 0.000 0.152 0.000
#> SRR2532317 2 0.3136 0.6452 0.000 0.768 0.004 0.000 0.228 0.000
#> SRR2532318 5 0.3877 0.7672 0.000 0.160 0.076 0.000 0.764 0.000
#> SRR2532315 4 0.0000 0.8069 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.8069 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.3371 0.5012 0.000 0.708 0.000 0.000 0.292 0.000
#> SRR2532395 5 0.3446 0.7901 0.000 0.308 0.000 0.000 0.692 0.000
#> SRR2532394 2 0.3371 0.5012 0.000 0.708 0.000 0.000 0.292 0.000
#> SRR2532393 2 0.2664 0.7153 0.000 0.816 0.000 0.000 0.184 0.000
#> SRR2532392 2 0.2883 0.6519 0.000 0.788 0.000 0.000 0.212 0.000
#> SRR2532391 3 0.0748 0.8158 0.004 0.000 0.976 0.004 0.016 0.000
#> SRR2532390 2 0.0000 0.8412 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532389 1 0.3651 0.6761 0.772 0.000 0.180 0.000 0.048 0.000
#> SRR2532388 2 0.2454 0.7446 0.000 0.840 0.000 0.000 0.160 0.000
#> SRR2532387 5 0.2996 0.8301 0.000 0.228 0.000 0.000 0.772 0.000
#> SRR2532386 4 0.4339 0.4910 0.316 0.000 0.032 0.648 0.004 0.000
#> SRR2532384 5 0.3634 0.7439 0.000 0.356 0.000 0.000 0.644 0.000
#> SRR2532385 5 0.3877 0.7672 0.000 0.160 0.076 0.000 0.764 0.000
#> SRR2532383 2 0.1910 0.7954 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2532381 4 0.4339 0.4910 0.316 0.000 0.032 0.648 0.004 0.000
#> SRR2532382 1 0.2632 0.7018 0.832 0.000 0.000 0.164 0.004 0.000
#> SRR2532379 4 0.0000 0.8069 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0146 0.8279 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2532378 1 0.3722 0.5691 0.724 0.000 0.004 0.260 0.004 0.008
#> SRR2532377 2 0.3371 0.5012 0.000 0.708 0.000 0.000 0.292 0.000
#> SRR2532376 5 0.3877 0.7672 0.000 0.160 0.076 0.000 0.764 0.000
#> SRR2532375 2 0.0547 0.8417 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR2532374 3 0.1714 0.7903 0.000 0.000 0.908 0.000 0.092 0.000
#> SRR2532372 3 0.2325 0.8277 0.060 0.000 0.892 0.000 0.048 0.000
#> SRR2532373 2 0.0000 0.8412 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532371 2 0.0865 0.8363 0.000 0.964 0.000 0.000 0.036 0.000
#> SRR2532370 1 0.0260 0.8284 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532369 5 0.3266 0.8183 0.000 0.272 0.000 0.000 0.728 0.000
#> SRR2532368 2 0.0146 0.8424 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532367 2 0.3727 0.2339 0.000 0.612 0.000 0.000 0.388 0.000
#> SRR2532366 1 0.0363 0.8284 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR2532365 2 0.3620 0.3594 0.000 0.648 0.000 0.000 0.352 0.000
#> SRR2532364 1 0.0458 0.8280 0.984 0.000 0.016 0.000 0.000 0.000
#> SRR2532363 2 0.0000 0.8412 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532362 2 0.0146 0.8410 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532361 4 0.0000 0.8069 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 0.8069 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.5068 -0.0705 0.484 0.000 0.456 0.012 0.048 0.000
#> SRR2532358 3 0.3453 0.7674 0.024 0.000 0.812 0.148 0.008 0.008
#> SRR2532357 2 0.0146 0.8410 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532356 2 0.0146 0.8410 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532355 3 0.2860 0.8253 0.068 0.000 0.868 0.052 0.012 0.000
#> SRR2532354 1 0.0146 0.8279 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2532353 3 0.3733 0.8143 0.068 0.000 0.828 0.052 0.044 0.008
#> SRR2532352 2 0.0146 0.8424 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532350 3 0.2773 0.8010 0.152 0.000 0.836 0.004 0.008 0.000
#> SRR2532349 3 0.1555 0.8315 0.060 0.000 0.932 0.004 0.004 0.000
#> SRR2532348 5 0.3819 0.6938 0.000 0.372 0.004 0.000 0.624 0.000
#> SRR2532347 5 0.3634 0.7439 0.000 0.356 0.000 0.000 0.644 0.000
#> SRR2532346 5 0.4381 0.7701 0.000 0.236 0.072 0.000 0.692 0.000
#> SRR2532345 2 0.3081 0.6636 0.000 0.776 0.004 0.000 0.220 0.000
#> SRR2532344 3 0.2378 0.7478 0.000 0.000 0.848 0.000 0.152 0.000
#> SRR2532343 3 0.2952 0.8247 0.068 0.000 0.864 0.052 0.016 0.000
#> SRR2532342 3 0.4998 0.2884 0.392 0.000 0.548 0.012 0.048 0.000
#> SRR2532341 3 0.1765 0.7854 0.000 0.000 0.904 0.000 0.096 0.000
#> SRR2532340 3 0.2907 0.8008 0.152 0.000 0.828 0.000 0.020 0.000
#> SRR2532339 2 0.0000 0.8412 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532338 2 0.0000 0.8412 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR2532337 5 0.3756 0.6619 0.000 0.400 0.000 0.000 0.600 0.000
#> SRR2532336 1 0.0146 0.8279 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR2532335 3 0.1765 0.7854 0.000 0.000 0.904 0.000 0.096 0.000
#> SRR2532334 3 0.4158 0.6895 0.224 0.000 0.724 0.008 0.044 0.000
#> SRR2532333 5 0.2996 0.8284 0.000 0.228 0.000 0.000 0.772 0.000
#> SRR2532332 1 0.0458 0.8280 0.984 0.000 0.016 0.000 0.000 0.000
#> SRR2532331 2 0.0632 0.8409 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR2532330 5 0.2912 0.8275 0.000 0.216 0.000 0.000 0.784 0.000
#> SRR2532329 2 0.2933 0.6894 0.000 0.796 0.004 0.000 0.200 0.000
#> SRR2532328 6 0.0000 0.0000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR2532327 2 0.0458 0.8419 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532326 3 0.3733 0.8143 0.068 0.000 0.828 0.052 0.044 0.008
#> SRR2532324 2 0.0935 0.8365 0.000 0.964 0.004 0.000 0.032 0.000
#> SRR2532325 1 0.3651 0.6761 0.772 0.000 0.180 0.000 0.048 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)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5061 0.494 0.494
#> 3 3 0.656 0.697 0.718 0.2247 0.883 0.764
#> 4 4 0.600 0.573 0.717 0.1436 0.846 0.609
#> 5 5 0.592 0.719 0.757 0.0842 0.902 0.653
#> 6 6 0.667 0.662 0.755 0.0498 0.962 0.825
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR2532323 1 0 1 1 0
#> SRR2532322 1 0 1 1 0
#> SRR2532321 2 0 1 0 1
#> SRR2532320 2 0 1 0 1
#> SRR2532319 1 0 1 1 0
#> SRR2532317 2 0 1 0 1
#> SRR2532318 2 0 1 0 1
#> SRR2532315 1 0 1 1 0
#> SRR2532316 1 0 1 1 0
#> SRR2532396 2 0 1 0 1
#> SRR2532395 2 0 1 0 1
#> SRR2532394 2 0 1 0 1
#> SRR2532393 2 0 1 0 1
#> SRR2532392 2 0 1 0 1
#> SRR2532391 1 0 1 1 0
#> SRR2532390 2 0 1 0 1
#> SRR2532389 1 0 1 1 0
#> SRR2532388 2 0 1 0 1
#> SRR2532387 2 0 1 0 1
#> SRR2532386 1 0 1 1 0
#> SRR2532384 2 0 1 0 1
#> SRR2532385 2 0 1 0 1
#> SRR2532383 2 0 1 0 1
#> SRR2532381 1 0 1 1 0
#> SRR2532382 1 0 1 1 0
#> SRR2532379 1 0 1 1 0
#> SRR2532380 1 0 1 1 0
#> SRR2532378 1 0 1 1 0
#> SRR2532377 2 0 1 0 1
#> SRR2532376 2 0 1 0 1
#> SRR2532375 2 0 1 0 1
#> SRR2532374 1 0 1 1 0
#> SRR2532372 1 0 1 1 0
#> SRR2532373 2 0 1 0 1
#> SRR2532371 2 0 1 0 1
#> SRR2532370 1 0 1 1 0
#> SRR2532369 2 0 1 0 1
#> SRR2532368 2 0 1 0 1
#> SRR2532367 2 0 1 0 1
#> SRR2532366 1 0 1 1 0
#> SRR2532365 2 0 1 0 1
#> SRR2532364 1 0 1 1 0
#> SRR2532363 2 0 1 0 1
#> SRR2532362 2 0 1 0 1
#> SRR2532361 1 0 1 1 0
#> SRR2532360 1 0 1 1 0
#> SRR2532359 1 0 1 1 0
#> SRR2532358 1 0 1 1 0
#> SRR2532357 2 0 1 0 1
#> SRR2532356 2 0 1 0 1
#> SRR2532355 1 0 1 1 0
#> SRR2532354 1 0 1 1 0
#> SRR2532353 1 0 1 1 0
#> SRR2532352 2 0 1 0 1
#> SRR2532350 1 0 1 1 0
#> SRR2532349 1 0 1 1 0
#> SRR2532348 2 0 1 0 1
#> SRR2532347 2 0 1 0 1
#> SRR2532346 2 0 1 0 1
#> SRR2532345 2 0 1 0 1
#> SRR2532344 1 0 1 1 0
#> SRR2532343 1 0 1 1 0
#> SRR2532342 1 0 1 1 0
#> SRR2532341 1 0 1 1 0
#> SRR2532340 1 0 1 1 0
#> SRR2532339 2 0 1 0 1
#> SRR2532338 2 0 1 0 1
#> SRR2532337 2 0 1 0 1
#> SRR2532336 1 0 1 1 0
#> SRR2532335 1 0 1 1 0
#> SRR2532334 1 0 1 1 0
#> SRR2532333 2 0 1 0 1
#> SRR2532332 1 0 1 1 0
#> SRR2532331 2 0 1 0 1
#> SRR2532330 2 0 1 0 1
#> SRR2532329 2 0 1 0 1
#> SRR2532328 1 0 1 1 0
#> SRR2532327 2 0 1 0 1
#> SRR2532326 1 0 1 1 0
#> SRR2532324 2 0 1 0 1
#> SRR2532325 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.4750 0.4421 0.784 0.000 0.216
#> SRR2532322 1 0.5706 0.3008 0.680 0.000 0.320
#> SRR2532321 2 0.0000 0.8754 0.000 1.000 0.000
#> SRR2532320 2 0.2537 0.8732 0.000 0.920 0.080
#> SRR2532319 3 0.5678 0.7368 0.316 0.000 0.684
#> SRR2532317 2 0.4750 0.8783 0.000 0.784 0.216
#> SRR2532318 2 0.6045 0.8302 0.000 0.620 0.380
#> SRR2532315 1 0.4002 0.4067 0.840 0.000 0.160
#> SRR2532316 1 0.4002 0.4067 0.840 0.000 0.160
#> SRR2532396 2 0.3686 0.8785 0.000 0.860 0.140
#> SRR2532395 2 0.5397 0.8521 0.000 0.720 0.280
#> SRR2532394 2 0.4555 0.8709 0.000 0.800 0.200
#> SRR2532393 2 0.5650 0.8542 0.000 0.688 0.312
#> SRR2532392 2 0.0424 0.8774 0.000 0.992 0.008
#> SRR2532391 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532390 2 0.0892 0.8754 0.000 0.980 0.020
#> SRR2532389 3 0.6309 0.5147 0.496 0.000 0.504
#> SRR2532388 2 0.5859 0.8471 0.000 0.656 0.344
#> SRR2532387 2 0.5363 0.8562 0.000 0.724 0.276
#> SRR2532386 1 0.4178 0.4028 0.828 0.000 0.172
#> SRR2532384 2 0.5397 0.8521 0.000 0.720 0.280
#> SRR2532385 2 0.6079 0.8253 0.000 0.612 0.388
#> SRR2532383 2 0.1860 0.8833 0.000 0.948 0.052
#> SRR2532381 1 0.4178 0.4028 0.828 0.000 0.172
#> SRR2532382 1 0.4702 0.4432 0.788 0.000 0.212
#> SRR2532379 1 0.4002 0.4067 0.840 0.000 0.160
#> SRR2532380 1 0.5138 0.4110 0.748 0.000 0.252
#> SRR2532378 1 0.3116 0.4260 0.892 0.000 0.108
#> SRR2532377 2 0.4931 0.8657 0.000 0.768 0.232
#> SRR2532376 2 0.6079 0.8253 0.000 0.612 0.388
#> SRR2532375 2 0.2537 0.8748 0.000 0.920 0.080
#> SRR2532374 3 0.5988 0.8262 0.368 0.000 0.632
#> SRR2532372 3 0.5948 0.8184 0.360 0.000 0.640
#> SRR2532373 2 0.2448 0.8740 0.000 0.924 0.076
#> SRR2532371 2 0.0237 0.8767 0.000 0.996 0.004
#> SRR2532370 1 0.5706 0.3008 0.680 0.000 0.320
#> SRR2532369 2 0.5465 0.8517 0.000 0.712 0.288
#> SRR2532368 2 0.0000 0.8754 0.000 1.000 0.000
#> SRR2532367 2 0.0592 0.8782 0.000 0.988 0.012
#> SRR2532366 1 0.5706 0.3008 0.680 0.000 0.320
#> SRR2532365 2 0.4555 0.8742 0.000 0.800 0.200
#> SRR2532364 1 0.5706 0.3008 0.680 0.000 0.320
#> SRR2532363 2 0.0000 0.8754 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.8754 0.000 1.000 0.000
#> SRR2532361 1 0.5327 0.1582 0.728 0.000 0.272
#> SRR2532360 1 0.4002 0.4067 0.840 0.000 0.160
#> SRR2532359 1 0.5706 0.3008 0.680 0.000 0.320
#> SRR2532358 1 0.5678 0.0426 0.684 0.000 0.316
#> SRR2532357 2 0.0892 0.8754 0.000 0.980 0.020
#> SRR2532356 2 0.2261 0.8726 0.000 0.932 0.068
#> SRR2532355 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532354 1 0.5058 0.4201 0.756 0.000 0.244
#> SRR2532353 3 0.6180 0.7925 0.416 0.000 0.584
#> SRR2532352 2 0.0000 0.8754 0.000 1.000 0.000
#> SRR2532350 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532349 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532348 2 0.5905 0.8407 0.000 0.648 0.352
#> SRR2532347 2 0.5431 0.8521 0.000 0.716 0.284
#> SRR2532346 2 0.5926 0.8388 0.000 0.644 0.356
#> SRR2532345 2 0.5058 0.8708 0.000 0.756 0.244
#> SRR2532344 3 0.5678 0.7368 0.316 0.000 0.684
#> SRR2532343 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532342 3 0.6280 0.6257 0.460 0.000 0.540
#> SRR2532341 3 0.6416 0.5178 0.304 0.020 0.676
#> SRR2532340 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532339 2 0.0000 0.8754 0.000 1.000 0.000
#> SRR2532338 2 0.0892 0.8754 0.000 0.980 0.020
#> SRR2532337 2 0.4555 0.8709 0.000 0.800 0.200
#> SRR2532336 1 0.4750 0.4421 0.784 0.000 0.216
#> SRR2532335 3 0.5948 0.8184 0.360 0.000 0.640
#> SRR2532334 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532333 2 0.5926 0.8369 0.000 0.644 0.356
#> SRR2532332 1 0.5706 0.3008 0.680 0.000 0.320
#> SRR2532331 2 0.2625 0.8752 0.000 0.916 0.084
#> SRR2532330 2 0.5706 0.8464 0.000 0.680 0.320
#> SRR2532329 2 0.2625 0.8734 0.000 0.916 0.084
#> SRR2532328 3 0.6260 0.2324 0.448 0.000 0.552
#> SRR2532327 2 0.1860 0.8740 0.000 0.948 0.052
#> SRR2532326 3 0.6079 0.8366 0.388 0.000 0.612
#> SRR2532324 2 0.2537 0.8732 0.000 0.920 0.080
#> SRR2532325 1 0.6192 -0.2080 0.580 0.000 0.420
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.4509 0.619 0.708 0.000 0.288 0.004
#> SRR2532322 1 0.4776 0.566 0.624 0.000 0.376 0.000
#> SRR2532321 2 0.0336 0.711 0.008 0.992 0.000 0.000
#> SRR2532320 2 0.4535 0.623 0.084 0.804 0.000 0.112
#> SRR2532319 3 0.1798 0.764 0.040 0.000 0.944 0.016
#> SRR2532317 2 0.6830 -0.332 0.104 0.508 0.000 0.388
#> SRR2532318 4 0.6484 0.830 0.060 0.312 0.016 0.612
#> SRR2532315 1 0.7654 0.420 0.464 0.000 0.252 0.284
#> SRR2532316 1 0.7654 0.420 0.464 0.000 0.252 0.284
#> SRR2532396 2 0.4535 0.218 0.004 0.704 0.000 0.292
#> SRR2532395 4 0.4817 0.796 0.000 0.388 0.000 0.612
#> SRR2532394 2 0.5039 -0.267 0.004 0.592 0.000 0.404
#> SRR2532393 4 0.5713 0.845 0.036 0.360 0.000 0.604
#> SRR2532392 2 0.1767 0.688 0.012 0.944 0.000 0.044
#> SRR2532391 3 0.0672 0.801 0.008 0.000 0.984 0.008
#> SRR2532390 2 0.0804 0.713 0.008 0.980 0.000 0.012
#> SRR2532389 3 0.4136 0.528 0.196 0.000 0.788 0.016
#> SRR2532388 4 0.5614 0.848 0.036 0.336 0.000 0.628
#> SRR2532387 4 0.5016 0.783 0.004 0.396 0.000 0.600
#> SRR2532386 1 0.7613 0.410 0.472 0.000 0.288 0.240
#> SRR2532384 4 0.4817 0.796 0.000 0.388 0.000 0.612
#> SRR2532385 4 0.6566 0.826 0.060 0.308 0.020 0.612
#> SRR2532383 2 0.3525 0.637 0.040 0.860 0.000 0.100
#> SRR2532381 1 0.7613 0.410 0.472 0.000 0.288 0.240
#> SRR2532382 1 0.4331 0.619 0.712 0.000 0.288 0.000
#> SRR2532379 1 0.7654 0.420 0.464 0.000 0.252 0.284
#> SRR2532380 1 0.4382 0.617 0.704 0.000 0.296 0.000
#> SRR2532378 1 0.7023 0.473 0.576 0.000 0.192 0.232
#> SRR2532377 2 0.5165 -0.540 0.004 0.512 0.000 0.484
#> SRR2532376 4 0.6484 0.830 0.060 0.312 0.016 0.612
#> SRR2532375 2 0.4700 0.610 0.084 0.792 0.000 0.124
#> SRR2532374 3 0.0779 0.797 0.004 0.000 0.980 0.016
#> SRR2532372 3 0.0188 0.800 0.000 0.000 0.996 0.004
#> SRR2532373 2 0.4411 0.629 0.080 0.812 0.000 0.108
#> SRR2532371 2 0.0657 0.710 0.004 0.984 0.000 0.012
#> SRR2532370 1 0.4950 0.565 0.620 0.000 0.376 0.004
#> SRR2532369 4 0.4713 0.831 0.000 0.360 0.000 0.640
#> SRR2532368 2 0.0188 0.712 0.004 0.996 0.000 0.000
#> SRR2532367 2 0.2363 0.691 0.024 0.920 0.000 0.056
#> SRR2532366 1 0.4950 0.565 0.620 0.000 0.376 0.004
#> SRR2532365 2 0.5364 -0.271 0.016 0.592 0.000 0.392
#> SRR2532364 1 0.4950 0.565 0.620 0.000 0.376 0.004
#> SRR2532363 2 0.0188 0.712 0.004 0.996 0.000 0.000
#> SRR2532362 2 0.0336 0.713 0.008 0.992 0.000 0.000
#> SRR2532361 3 0.7844 -0.175 0.308 0.000 0.404 0.288
#> SRR2532360 1 0.7654 0.420 0.464 0.000 0.252 0.284
#> SRR2532359 1 0.5476 0.537 0.584 0.000 0.396 0.020
#> SRR2532358 3 0.4983 0.451 0.272 0.000 0.704 0.024
#> SRR2532357 2 0.0927 0.712 0.008 0.976 0.000 0.016
#> SRR2532356 2 0.2871 0.683 0.032 0.896 0.000 0.072
#> SRR2532355 3 0.1182 0.798 0.016 0.000 0.968 0.016
#> SRR2532354 1 0.4356 0.619 0.708 0.000 0.292 0.000
#> SRR2532353 3 0.1510 0.794 0.028 0.000 0.956 0.016
#> SRR2532352 2 0.0188 0.712 0.004 0.996 0.000 0.000
#> SRR2532350 3 0.1042 0.799 0.020 0.000 0.972 0.008
#> SRR2532349 3 0.0469 0.802 0.012 0.000 0.988 0.000
#> SRR2532348 4 0.7257 0.663 0.096 0.392 0.016 0.496
#> SRR2532347 4 0.4730 0.827 0.000 0.364 0.000 0.636
#> SRR2532346 4 0.7242 0.672 0.096 0.384 0.016 0.504
#> SRR2532345 2 0.6798 -0.351 0.100 0.504 0.000 0.396
#> SRR2532344 3 0.1798 0.764 0.040 0.000 0.944 0.016
#> SRR2532343 3 0.1182 0.798 0.016 0.000 0.968 0.016
#> SRR2532342 3 0.3266 0.682 0.108 0.000 0.868 0.024
#> SRR2532341 3 0.5082 0.581 0.108 0.004 0.776 0.112
#> SRR2532340 3 0.1042 0.799 0.020 0.000 0.972 0.008
#> SRR2532339 2 0.0188 0.712 0.004 0.996 0.000 0.000
#> SRR2532338 2 0.0804 0.713 0.008 0.980 0.000 0.012
#> SRR2532337 2 0.5039 -0.267 0.004 0.592 0.000 0.404
#> SRR2532336 1 0.4331 0.619 0.712 0.000 0.288 0.000
#> SRR2532335 3 0.0779 0.797 0.004 0.000 0.980 0.016
#> SRR2532334 3 0.1297 0.797 0.020 0.000 0.964 0.016
#> SRR2532333 4 0.6116 0.837 0.068 0.320 0.000 0.612
#> SRR2532332 1 0.4950 0.565 0.620 0.000 0.376 0.004
#> SRR2532331 2 0.5003 0.574 0.084 0.768 0.000 0.148
#> SRR2532330 4 0.4585 0.842 0.000 0.332 0.000 0.668
#> SRR2532329 2 0.4827 0.605 0.092 0.784 0.000 0.124
#> SRR2532328 3 0.5971 0.514 0.168 0.004 0.704 0.124
#> SRR2532327 2 0.2797 0.685 0.032 0.900 0.000 0.068
#> SRR2532326 3 0.1182 0.798 0.016 0.000 0.968 0.016
#> SRR2532324 2 0.4535 0.623 0.084 0.804 0.000 0.112
#> SRR2532325 3 0.5500 -0.270 0.464 0.000 0.520 0.016
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.1168 0.8988 0.960 0.000 0.000 0.008 0.032
#> SRR2532322 1 0.1605 0.9150 0.944 0.000 0.040 0.004 0.012
#> SRR2532321 2 0.1814 0.7286 0.004 0.940 0.004 0.024 0.028
#> SRR2532320 2 0.5764 0.6342 0.000 0.688 0.076 0.176 0.060
#> SRR2532319 3 0.2967 0.8437 0.104 0.000 0.868 0.016 0.012
#> SRR2532317 2 0.8014 -0.1007 0.004 0.404 0.108 0.164 0.320
#> SRR2532318 5 0.7614 0.6102 0.000 0.156 0.132 0.204 0.508
#> SRR2532315 4 0.5030 0.9070 0.200 0.000 0.104 0.696 0.000
#> SRR2532316 4 0.5030 0.9070 0.200 0.000 0.104 0.696 0.000
#> SRR2532396 5 0.5179 0.3194 0.004 0.448 0.004 0.024 0.520
#> SRR2532395 5 0.2966 0.7058 0.000 0.184 0.000 0.000 0.816
#> SRR2532394 5 0.4989 0.5545 0.004 0.336 0.004 0.028 0.628
#> SRR2532393 5 0.5600 0.6932 0.000 0.196 0.040 0.076 0.688
#> SRR2532392 2 0.4822 0.5802 0.004 0.744 0.028 0.036 0.188
#> SRR2532391 3 0.3771 0.8705 0.164 0.000 0.796 0.000 0.040
#> SRR2532390 2 0.0000 0.7417 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 3 0.5295 0.4772 0.408 0.000 0.540 0.000 0.052
#> SRR2532388 5 0.5745 0.6871 0.000 0.192 0.044 0.084 0.680
#> SRR2532387 5 0.4395 0.7059 0.000 0.188 0.000 0.064 0.748
#> SRR2532386 4 0.6322 0.8685 0.248 0.000 0.128 0.596 0.028
#> SRR2532384 5 0.3003 0.7054 0.000 0.188 0.000 0.000 0.812
#> SRR2532385 5 0.7573 0.6101 0.000 0.152 0.128 0.208 0.512
#> SRR2532383 2 0.6524 0.4648 0.004 0.604 0.044 0.112 0.236
#> SRR2532381 4 0.6322 0.8685 0.248 0.000 0.128 0.596 0.028
#> SRR2532382 1 0.0992 0.9019 0.968 0.000 0.000 0.008 0.024
#> SRR2532379 4 0.5030 0.9070 0.200 0.000 0.104 0.696 0.000
#> SRR2532380 1 0.1026 0.9055 0.968 0.000 0.004 0.004 0.024
#> SRR2532378 4 0.5707 0.7168 0.348 0.000 0.048 0.580 0.024
#> SRR2532377 5 0.4747 0.6170 0.004 0.284 0.004 0.028 0.680
#> SRR2532376 5 0.7637 0.6094 0.000 0.156 0.132 0.208 0.504
#> SRR2532375 2 0.6006 0.6254 0.000 0.672 0.068 0.172 0.088
#> SRR2532374 3 0.3911 0.8610 0.144 0.000 0.796 0.000 0.060
#> SRR2532372 3 0.2843 0.8712 0.144 0.000 0.848 0.000 0.008
#> SRR2532373 2 0.5273 0.6620 0.000 0.732 0.060 0.148 0.060
#> SRR2532371 2 0.3064 0.6963 0.000 0.856 0.000 0.036 0.108
#> SRR2532370 1 0.1043 0.9150 0.960 0.000 0.040 0.000 0.000
#> SRR2532369 5 0.3163 0.7124 0.000 0.164 0.000 0.012 0.824
#> SRR2532368 2 0.1399 0.7328 0.000 0.952 0.000 0.020 0.028
#> SRR2532367 2 0.5445 0.6316 0.004 0.728 0.048 0.080 0.140
#> SRR2532366 1 0.1121 0.9143 0.956 0.000 0.044 0.000 0.000
#> SRR2532365 5 0.5819 0.5554 0.004 0.316 0.028 0.048 0.604
#> SRR2532364 1 0.1121 0.9143 0.956 0.000 0.044 0.000 0.000
#> SRR2532363 2 0.1399 0.7328 0.000 0.952 0.000 0.020 0.028
#> SRR2532362 2 0.0510 0.7388 0.000 0.984 0.000 0.000 0.016
#> SRR2532361 4 0.4879 0.7446 0.076 0.000 0.228 0.696 0.000
#> SRR2532360 4 0.5030 0.9070 0.200 0.000 0.104 0.696 0.000
#> SRR2532359 1 0.3395 0.8152 0.848 0.000 0.108 0.016 0.028
#> SRR2532358 3 0.5461 0.5666 0.060 0.000 0.692 0.208 0.040
#> SRR2532357 2 0.0290 0.7416 0.000 0.992 0.000 0.008 0.000
#> SRR2532356 2 0.2864 0.7267 0.000 0.884 0.008 0.064 0.044
#> SRR2532355 3 0.3793 0.8699 0.168 0.000 0.800 0.016 0.016
#> SRR2532354 1 0.1026 0.9055 0.968 0.000 0.004 0.004 0.024
#> SRR2532353 3 0.4221 0.8685 0.168 0.000 0.780 0.016 0.036
#> SRR2532352 2 0.1622 0.7309 0.004 0.948 0.004 0.016 0.028
#> SRR2532350 3 0.2852 0.8734 0.172 0.000 0.828 0.000 0.000
#> SRR2532349 3 0.3053 0.8752 0.164 0.000 0.828 0.000 0.008
#> SRR2532348 5 0.8455 0.4569 0.004 0.224 0.156 0.248 0.368
#> SRR2532347 5 0.3167 0.7120 0.000 0.172 0.004 0.004 0.820
#> SRR2532346 5 0.8287 0.4560 0.000 0.212 0.156 0.252 0.380
#> SRR2532345 2 0.7953 -0.0176 0.000 0.408 0.104 0.196 0.292
#> SRR2532344 3 0.2967 0.8437 0.104 0.000 0.868 0.016 0.012
#> SRR2532343 3 0.3793 0.8699 0.168 0.000 0.800 0.016 0.016
#> SRR2532342 3 0.4902 0.7693 0.268 0.000 0.684 0.016 0.032
#> SRR2532341 3 0.2888 0.6596 0.004 0.000 0.880 0.056 0.060
#> SRR2532340 3 0.3242 0.8736 0.172 0.000 0.816 0.000 0.012
#> SRR2532339 2 0.1300 0.7328 0.000 0.956 0.000 0.016 0.028
#> SRR2532338 2 0.0000 0.7417 0.000 1.000 0.000 0.000 0.000
#> SRR2532337 5 0.4989 0.5545 0.004 0.336 0.004 0.028 0.628
#> SRR2532336 1 0.0992 0.9019 0.968 0.000 0.000 0.008 0.024
#> SRR2532335 3 0.3565 0.8661 0.144 0.000 0.816 0.000 0.040
#> SRR2532334 3 0.4052 0.8660 0.176 0.000 0.784 0.016 0.024
#> SRR2532333 5 0.7500 0.6208 0.000 0.164 0.108 0.212 0.516
#> SRR2532332 1 0.1121 0.9143 0.956 0.000 0.044 0.000 0.000
#> SRR2532331 2 0.6099 0.6145 0.000 0.664 0.076 0.176 0.084
#> SRR2532330 5 0.4519 0.7069 0.000 0.148 0.004 0.088 0.760
#> SRR2532329 2 0.6072 0.6089 0.000 0.664 0.088 0.180 0.068
#> SRR2532328 3 0.4172 0.5644 0.000 0.000 0.784 0.108 0.108
#> SRR2532327 2 0.3152 0.7253 0.000 0.872 0.016 0.064 0.048
#> SRR2532326 3 0.4221 0.8685 0.168 0.000 0.780 0.016 0.036
#> SRR2532324 2 0.5617 0.6411 0.000 0.700 0.068 0.172 0.060
#> SRR2532325 1 0.4096 0.6515 0.760 0.000 0.200 0.000 0.040
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.2503 0.8972 0.896 0.000 0.060 0.012 0.008 0.024
#> SRR2532322 1 0.1588 0.9065 0.924 0.000 0.072 0.000 0.004 0.000
#> SRR2532321 2 0.1881 0.6894 0.008 0.928 0.000 0.008 0.044 0.012
#> SRR2532320 2 0.5107 0.4684 0.016 0.576 0.000 0.012 0.032 0.364
#> SRR2532319 3 0.1760 0.8313 0.020 0.000 0.928 0.004 0.000 0.048
#> SRR2532317 6 0.6430 0.3782 0.016 0.256 0.000 0.004 0.276 0.448
#> SRR2532318 6 0.7466 0.5445 0.032 0.096 0.016 0.080 0.376 0.400
#> SRR2532315 4 0.2937 0.8984 0.096 0.000 0.056 0.848 0.000 0.000
#> SRR2532316 4 0.2937 0.8984 0.096 0.000 0.056 0.848 0.000 0.000
#> SRR2532396 5 0.4887 0.5006 0.012 0.360 0.000 0.020 0.592 0.016
#> SRR2532395 5 0.2053 0.6406 0.000 0.108 0.000 0.004 0.888 0.000
#> SRR2532394 5 0.4308 0.5969 0.012 0.276 0.000 0.012 0.688 0.012
#> SRR2532393 5 0.5775 0.1620 0.028 0.140 0.000 0.008 0.620 0.204
#> SRR2532392 2 0.4937 0.4984 0.020 0.712 0.000 0.032 0.192 0.044
#> SRR2532391 3 0.2975 0.8215 0.016 0.000 0.840 0.012 0.000 0.132
#> SRR2532390 2 0.1116 0.7048 0.000 0.960 0.000 0.008 0.004 0.028
#> SRR2532389 3 0.6485 0.3497 0.276 0.000 0.540 0.020 0.048 0.116
#> SRR2532388 5 0.5990 0.0737 0.032 0.144 0.000 0.008 0.592 0.224
#> SRR2532387 5 0.5246 0.5505 0.020 0.152 0.000 0.040 0.708 0.080
#> SRR2532386 4 0.5677 0.8350 0.128 0.000 0.108 0.676 0.012 0.076
#> SRR2532384 5 0.2003 0.6423 0.000 0.116 0.000 0.000 0.884 0.000
#> SRR2532385 5 0.7435 -0.5965 0.032 0.092 0.016 0.080 0.396 0.384
#> SRR2532383 2 0.6820 0.3274 0.024 0.500 0.000 0.036 0.216 0.224
#> SRR2532381 4 0.5677 0.8350 0.128 0.000 0.108 0.676 0.012 0.076
#> SRR2532382 1 0.2239 0.9038 0.908 0.000 0.060 0.012 0.008 0.012
#> SRR2532379 4 0.2937 0.8984 0.096 0.000 0.056 0.848 0.000 0.000
#> SRR2532380 1 0.2239 0.9038 0.908 0.000 0.060 0.012 0.008 0.012
#> SRR2532378 4 0.4737 0.6605 0.300 0.000 0.020 0.648 0.008 0.024
#> SRR2532377 5 0.4070 0.6298 0.012 0.208 0.000 0.016 0.748 0.016
#> SRR2532376 6 0.7466 0.5445 0.032 0.096 0.016 0.080 0.376 0.400
#> SRR2532375 2 0.5226 0.4500 0.016 0.556 0.000 0.000 0.064 0.364
#> SRR2532374 3 0.3282 0.8074 0.016 0.000 0.808 0.012 0.000 0.164
#> SRR2532372 3 0.1333 0.8442 0.008 0.000 0.944 0.000 0.000 0.048
#> SRR2532373 2 0.5055 0.5027 0.016 0.600 0.000 0.016 0.028 0.340
#> SRR2532371 2 0.3979 0.6336 0.016 0.788 0.000 0.016 0.148 0.032
#> SRR2532370 1 0.3017 0.9020 0.868 0.000 0.072 0.008 0.028 0.024
#> SRR2532369 5 0.2162 0.6122 0.004 0.088 0.000 0.000 0.896 0.012
#> SRR2532368 2 0.1007 0.6996 0.000 0.956 0.000 0.000 0.044 0.000
#> SRR2532367 2 0.5728 0.5208 0.016 0.632 0.000 0.032 0.096 0.224
#> SRR2532366 1 0.3017 0.9020 0.868 0.000 0.072 0.008 0.028 0.024
#> SRR2532365 5 0.5929 0.5297 0.020 0.224 0.000 0.032 0.616 0.108
#> SRR2532364 1 0.3017 0.9020 0.868 0.000 0.072 0.008 0.028 0.024
#> SRR2532363 2 0.1340 0.6984 0.004 0.948 0.000 0.008 0.040 0.000
#> SRR2532362 2 0.1275 0.7056 0.000 0.956 0.000 0.012 0.016 0.016
#> SRR2532361 4 0.2613 0.8202 0.012 0.000 0.140 0.848 0.000 0.000
#> SRR2532360 4 0.2937 0.8984 0.096 0.000 0.056 0.848 0.000 0.000
#> SRR2532359 1 0.5985 0.6864 0.648 0.000 0.180 0.040 0.048 0.084
#> SRR2532358 3 0.4010 0.7333 0.000 0.000 0.772 0.148 0.012 0.068
#> SRR2532357 2 0.1074 0.7043 0.000 0.960 0.000 0.012 0.000 0.028
#> SRR2532356 2 0.4017 0.6392 0.012 0.752 0.000 0.008 0.024 0.204
#> SRR2532355 3 0.2486 0.8319 0.016 0.000 0.900 0.028 0.008 0.048
#> SRR2532354 1 0.2239 0.9038 0.908 0.000 0.060 0.012 0.008 0.012
#> SRR2532353 3 0.3023 0.8297 0.016 0.000 0.868 0.032 0.012 0.072
#> SRR2532352 2 0.1590 0.6920 0.008 0.936 0.000 0.000 0.048 0.008
#> SRR2532350 3 0.1092 0.8466 0.020 0.000 0.960 0.000 0.000 0.020
#> SRR2532349 3 0.1391 0.8470 0.016 0.000 0.944 0.000 0.000 0.040
#> SRR2532348 6 0.6772 0.6314 0.008 0.132 0.008 0.068 0.256 0.528
#> SRR2532347 5 0.1957 0.6368 0.000 0.112 0.000 0.000 0.888 0.000
#> SRR2532346 6 0.6648 0.6409 0.004 0.132 0.008 0.072 0.240 0.544
#> SRR2532345 6 0.6361 0.3789 0.020 0.272 0.000 0.012 0.184 0.512
#> SRR2532344 3 0.1760 0.8313 0.020 0.000 0.928 0.004 0.000 0.048
#> SRR2532343 3 0.2562 0.8298 0.016 0.000 0.896 0.032 0.008 0.048
#> SRR2532342 3 0.5081 0.7323 0.080 0.000 0.744 0.040 0.048 0.088
#> SRR2532341 3 0.4133 0.7183 0.012 0.000 0.720 0.032 0.000 0.236
#> SRR2532340 3 0.1826 0.8438 0.020 0.000 0.924 0.004 0.000 0.052
#> SRR2532339 2 0.0937 0.7004 0.000 0.960 0.000 0.000 0.040 0.000
#> SRR2532338 2 0.0862 0.7060 0.000 0.972 0.000 0.008 0.004 0.016
#> SRR2532337 5 0.4106 0.5990 0.004 0.276 0.000 0.012 0.696 0.012
#> SRR2532336 1 0.2239 0.9038 0.908 0.000 0.060 0.012 0.008 0.012
#> SRR2532335 3 0.2742 0.8219 0.008 0.000 0.852 0.012 0.000 0.128
#> SRR2532334 3 0.2604 0.8306 0.024 0.000 0.888 0.032 0.000 0.056
#> SRR2532333 6 0.6947 0.5332 0.012 0.096 0.008 0.076 0.396 0.412
#> SRR2532332 1 0.3170 0.8988 0.860 0.000 0.072 0.008 0.028 0.032
#> SRR2532331 2 0.5618 0.3478 0.024 0.512 0.000 0.008 0.060 0.396
#> SRR2532330 5 0.4486 0.4295 0.004 0.080 0.000 0.040 0.764 0.112
#> SRR2532329 2 0.5196 0.3945 0.012 0.532 0.000 0.008 0.044 0.404
#> SRR2532328 3 0.5466 0.4450 0.016 0.000 0.484 0.056 0.008 0.436
#> SRR2532327 2 0.4075 0.6351 0.012 0.744 0.000 0.008 0.024 0.212
#> SRR2532326 3 0.3023 0.8297 0.016 0.000 0.868 0.032 0.012 0.072
#> SRR2532324 2 0.4858 0.4828 0.016 0.584 0.000 0.004 0.028 0.368
#> SRR2532325 1 0.5713 0.7114 0.660 0.000 0.184 0.020 0.048 0.088
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)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.5061 0.494 0.494
#> 3 3 0.867 0.916 0.929 0.2052 0.905 0.808
#> 4 4 0.711 0.818 0.873 0.1798 0.857 0.645
#> 5 5 0.689 0.679 0.821 0.0702 0.938 0.770
#> 6 6 0.674 0.622 0.796 0.0384 0.963 0.836
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
#> SRR2532323 1 0 1 1 0
#> SRR2532322 1 0 1 1 0
#> SRR2532321 2 0 1 0 1
#> SRR2532320 2 0 1 0 1
#> SRR2532319 1 0 1 1 0
#> SRR2532317 2 0 1 0 1
#> SRR2532318 2 0 1 0 1
#> SRR2532315 1 0 1 1 0
#> SRR2532316 1 0 1 1 0
#> SRR2532396 2 0 1 0 1
#> SRR2532395 2 0 1 0 1
#> SRR2532394 2 0 1 0 1
#> SRR2532393 2 0 1 0 1
#> SRR2532392 2 0 1 0 1
#> SRR2532391 1 0 1 1 0
#> SRR2532390 2 0 1 0 1
#> SRR2532389 1 0 1 1 0
#> SRR2532388 2 0 1 0 1
#> SRR2532387 2 0 1 0 1
#> SRR2532386 1 0 1 1 0
#> SRR2532384 2 0 1 0 1
#> SRR2532385 2 0 1 0 1
#> SRR2532383 2 0 1 0 1
#> SRR2532381 1 0 1 1 0
#> SRR2532382 1 0 1 1 0
#> SRR2532379 1 0 1 1 0
#> SRR2532380 1 0 1 1 0
#> SRR2532378 1 0 1 1 0
#> SRR2532377 2 0 1 0 1
#> SRR2532376 2 0 1 0 1
#> SRR2532375 2 0 1 0 1
#> SRR2532374 1 0 1 1 0
#> SRR2532372 1 0 1 1 0
#> SRR2532373 2 0 1 0 1
#> SRR2532371 2 0 1 0 1
#> SRR2532370 1 0 1 1 0
#> SRR2532369 2 0 1 0 1
#> SRR2532368 2 0 1 0 1
#> SRR2532367 2 0 1 0 1
#> SRR2532366 1 0 1 1 0
#> SRR2532365 2 0 1 0 1
#> SRR2532364 1 0 1 1 0
#> SRR2532363 2 0 1 0 1
#> SRR2532362 2 0 1 0 1
#> SRR2532361 1 0 1 1 0
#> SRR2532360 1 0 1 1 0
#> SRR2532359 1 0 1 1 0
#> SRR2532358 1 0 1 1 0
#> SRR2532357 2 0 1 0 1
#> SRR2532356 2 0 1 0 1
#> SRR2532355 1 0 1 1 0
#> SRR2532354 1 0 1 1 0
#> SRR2532353 1 0 1 1 0
#> SRR2532352 2 0 1 0 1
#> SRR2532350 1 0 1 1 0
#> SRR2532349 1 0 1 1 0
#> SRR2532348 2 0 1 0 1
#> SRR2532347 2 0 1 0 1
#> SRR2532346 2 0 1 0 1
#> SRR2532345 2 0 1 0 1
#> SRR2532344 1 0 1 1 0
#> SRR2532343 1 0 1 1 0
#> SRR2532342 1 0 1 1 0
#> SRR2532341 1 0 1 1 0
#> SRR2532340 1 0 1 1 0
#> SRR2532339 2 0 1 0 1
#> SRR2532338 2 0 1 0 1
#> SRR2532337 2 0 1 0 1
#> SRR2532336 1 0 1 1 0
#> SRR2532335 1 0 1 1 0
#> SRR2532334 1 0 1 1 0
#> SRR2532333 2 0 1 0 1
#> SRR2532332 1 0 1 1 0
#> SRR2532331 2 0 1 0 1
#> SRR2532330 2 0 1 0 1
#> SRR2532329 2 0 1 0 1
#> SRR2532328 1 0 1 1 0
#> SRR2532327 2 0 1 0 1
#> SRR2532326 1 0 1 1 0
#> SRR2532324 2 0 1 0 1
#> SRR2532325 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.4452 0.7604 0.808 0.000 0.192
#> SRR2532322 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532321 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532319 1 0.3192 0.8687 0.888 0.000 0.112
#> SRR2532317 2 0.0237 0.9700 0.000 0.996 0.004
#> SRR2532318 2 0.2537 0.9494 0.000 0.920 0.080
#> SRR2532315 3 0.3192 0.9600 0.112 0.000 0.888
#> SRR2532316 3 0.3192 0.9600 0.112 0.000 0.888
#> SRR2532396 2 0.0892 0.9678 0.000 0.980 0.020
#> SRR2532395 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532394 2 0.1411 0.9649 0.000 0.964 0.036
#> SRR2532393 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532392 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532391 1 0.1289 0.8892 0.968 0.000 0.032
#> SRR2532390 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532389 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532388 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532387 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532386 3 0.3412 0.9547 0.124 0.000 0.876
#> SRR2532384 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532385 2 0.5948 0.5652 0.000 0.640 0.360
#> SRR2532383 2 0.0237 0.9699 0.000 0.996 0.004
#> SRR2532381 3 0.3412 0.9547 0.124 0.000 0.876
#> SRR2532382 1 0.2448 0.8890 0.924 0.000 0.076
#> SRR2532379 3 0.3192 0.9600 0.112 0.000 0.888
#> SRR2532380 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532378 3 0.4974 0.8505 0.236 0.000 0.764
#> SRR2532377 2 0.1529 0.9639 0.000 0.960 0.040
#> SRR2532376 2 0.2537 0.9494 0.000 0.920 0.080
#> SRR2532375 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532374 1 0.1031 0.8876 0.976 0.000 0.024
#> SRR2532372 1 0.3267 0.8665 0.884 0.000 0.116
#> SRR2532373 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532370 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532369 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532368 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532366 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532365 2 0.1031 0.9675 0.000 0.976 0.024
#> SRR2532364 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532363 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532361 3 0.3192 0.9600 0.112 0.000 0.888
#> SRR2532360 3 0.3192 0.9600 0.112 0.000 0.888
#> SRR2532359 1 0.2537 0.9004 0.920 0.000 0.080
#> SRR2532358 3 0.3412 0.9525 0.124 0.000 0.876
#> SRR2532357 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532355 1 0.2625 0.8781 0.916 0.000 0.084
#> SRR2532354 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532353 1 0.6280 0.0245 0.540 0.000 0.460
#> SRR2532352 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532350 1 0.0747 0.8982 0.984 0.000 0.016
#> SRR2532349 1 0.2448 0.8852 0.924 0.000 0.076
#> SRR2532348 2 0.1964 0.9591 0.000 0.944 0.056
#> SRR2532347 2 0.2261 0.9552 0.000 0.932 0.068
#> SRR2532346 2 0.2165 0.9557 0.000 0.936 0.064
#> SRR2532345 2 0.0592 0.9692 0.000 0.988 0.012
#> SRR2532344 1 0.3192 0.8687 0.888 0.000 0.112
#> SRR2532343 1 0.2625 0.8781 0.916 0.000 0.084
#> SRR2532342 1 0.3482 0.8802 0.872 0.000 0.128
#> SRR2532341 3 0.3551 0.8871 0.132 0.000 0.868
#> SRR2532340 1 0.0424 0.8943 0.992 0.000 0.008
#> SRR2532339 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532337 2 0.1643 0.9629 0.000 0.956 0.044
#> SRR2532336 1 0.2448 0.8890 0.924 0.000 0.076
#> SRR2532335 1 0.2796 0.8785 0.908 0.000 0.092
#> SRR2532334 1 0.2625 0.8781 0.916 0.000 0.084
#> SRR2532333 2 0.2537 0.9494 0.000 0.920 0.080
#> SRR2532332 1 0.1860 0.9010 0.948 0.000 0.052
#> SRR2532331 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532330 2 0.2537 0.9494 0.000 0.920 0.080
#> SRR2532329 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532328 3 0.4178 0.8827 0.172 0.000 0.828
#> SRR2532327 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532326 1 0.4399 0.7740 0.812 0.000 0.188
#> SRR2532324 2 0.0000 0.9702 0.000 1.000 0.000
#> SRR2532325 1 0.1860 0.9010 0.948 0.000 0.052
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.4103 0.6411 0.744 0.000 0.000 0.256
#> SRR2532322 1 0.1389 0.8833 0.952 0.000 0.000 0.048
#> SRR2532321 2 0.0188 0.9181 0.000 0.996 0.004 0.000
#> SRR2532320 2 0.0336 0.9156 0.000 0.992 0.008 0.000
#> SRR2532319 1 0.4535 0.8350 0.804 0.000 0.112 0.084
#> SRR2532317 2 0.2704 0.8038 0.000 0.876 0.124 0.000
#> SRR2532318 3 0.2704 0.8021 0.000 0.124 0.876 0.000
#> SRR2532315 4 0.1118 0.9177 0.036 0.000 0.000 0.964
#> SRR2532316 4 0.1118 0.9177 0.036 0.000 0.000 0.964
#> SRR2532396 2 0.4134 0.4790 0.000 0.740 0.260 0.000
#> SRR2532395 3 0.3801 0.8331 0.000 0.220 0.780 0.000
#> SRR2532394 3 0.4994 0.4669 0.000 0.480 0.520 0.000
#> SRR2532393 3 0.4103 0.8181 0.000 0.256 0.744 0.000
#> SRR2532392 2 0.1118 0.9016 0.000 0.964 0.036 0.000
#> SRR2532391 1 0.2919 0.8738 0.896 0.000 0.060 0.044
#> SRR2532390 2 0.0000 0.9182 0.000 1.000 0.000 0.000
#> SRR2532389 1 0.1389 0.8833 0.952 0.000 0.000 0.048
#> SRR2532388 3 0.4222 0.8054 0.000 0.272 0.728 0.000
#> SRR2532387 3 0.4008 0.8245 0.000 0.244 0.756 0.000
#> SRR2532386 4 0.1716 0.9072 0.064 0.000 0.000 0.936
#> SRR2532384 3 0.3801 0.8331 0.000 0.220 0.780 0.000
#> SRR2532385 3 0.3051 0.7700 0.000 0.088 0.884 0.028
#> SRR2532383 2 0.2216 0.8435 0.000 0.908 0.092 0.000
#> SRR2532381 4 0.1792 0.9046 0.068 0.000 0.000 0.932
#> SRR2532382 1 0.2704 0.8306 0.876 0.000 0.000 0.124
#> SRR2532379 4 0.1118 0.9177 0.036 0.000 0.000 0.964
#> SRR2532380 1 0.1557 0.8803 0.944 0.000 0.000 0.056
#> SRR2532378 4 0.3528 0.8063 0.192 0.000 0.000 0.808
#> SRR2532377 3 0.4961 0.5500 0.000 0.448 0.552 0.000
#> SRR2532376 3 0.2704 0.8021 0.000 0.124 0.876 0.000
#> SRR2532375 2 0.0921 0.9089 0.000 0.972 0.028 0.000
#> SRR2532374 1 0.2660 0.8707 0.908 0.000 0.056 0.036
#> SRR2532372 1 0.4591 0.8323 0.800 0.000 0.116 0.084
#> SRR2532373 2 0.0188 0.9173 0.000 0.996 0.004 0.000
#> SRR2532371 2 0.1118 0.8988 0.000 0.964 0.036 0.000
#> SRR2532370 1 0.1389 0.8833 0.952 0.000 0.000 0.048
#> SRR2532369 3 0.3801 0.8331 0.000 0.220 0.780 0.000
#> SRR2532368 2 0.0188 0.9181 0.000 0.996 0.004 0.000
#> SRR2532367 2 0.1211 0.9005 0.000 0.960 0.040 0.000
#> SRR2532366 1 0.1389 0.8833 0.952 0.000 0.000 0.048
#> SRR2532365 2 0.4817 -0.0211 0.000 0.612 0.388 0.000
#> SRR2532364 1 0.1389 0.8833 0.952 0.000 0.000 0.048
#> SRR2532363 2 0.0188 0.9181 0.000 0.996 0.004 0.000
#> SRR2532362 2 0.0188 0.9181 0.000 0.996 0.004 0.000
#> SRR2532361 4 0.1118 0.9177 0.036 0.000 0.000 0.964
#> SRR2532360 4 0.1118 0.9177 0.036 0.000 0.000 0.964
#> SRR2532359 1 0.1867 0.8839 0.928 0.000 0.000 0.072
#> SRR2532358 4 0.1209 0.9156 0.032 0.000 0.004 0.964
#> SRR2532357 2 0.0000 0.9182 0.000 1.000 0.000 0.000
#> SRR2532356 2 0.0188 0.9173 0.000 0.996 0.004 0.000
#> SRR2532355 1 0.3679 0.8640 0.856 0.000 0.084 0.060
#> SRR2532354 1 0.1557 0.8803 0.944 0.000 0.000 0.056
#> SRR2532353 4 0.6562 0.2581 0.360 0.000 0.088 0.552
#> SRR2532352 2 0.0188 0.9181 0.000 0.996 0.004 0.000
#> SRR2532350 1 0.1733 0.8855 0.948 0.000 0.024 0.028
#> SRR2532349 1 0.3959 0.8529 0.840 0.000 0.092 0.068
#> SRR2532348 3 0.5000 0.3148 0.000 0.500 0.500 0.000
#> SRR2532347 3 0.3801 0.8331 0.000 0.220 0.780 0.000
#> SRR2532346 3 0.4356 0.6887 0.000 0.292 0.708 0.000
#> SRR2532345 2 0.4164 0.5141 0.000 0.736 0.264 0.000
#> SRR2532344 1 0.4535 0.8350 0.804 0.000 0.112 0.084
#> SRR2532343 1 0.3894 0.8536 0.844 0.000 0.088 0.068
#> SRR2532342 1 0.3820 0.8744 0.848 0.000 0.064 0.088
#> SRR2532341 4 0.3370 0.8198 0.048 0.000 0.080 0.872
#> SRR2532340 1 0.1109 0.8831 0.968 0.000 0.028 0.004
#> SRR2532339 2 0.0188 0.9181 0.000 0.996 0.004 0.000
#> SRR2532338 2 0.0000 0.9182 0.000 1.000 0.000 0.000
#> SRR2532337 3 0.4955 0.5590 0.000 0.444 0.556 0.000
#> SRR2532336 1 0.2704 0.8305 0.876 0.000 0.000 0.124
#> SRR2532335 1 0.4318 0.8434 0.816 0.000 0.116 0.068
#> SRR2532334 1 0.3601 0.8603 0.860 0.000 0.084 0.056
#> SRR2532333 3 0.2814 0.8074 0.000 0.132 0.868 0.000
#> SRR2532332 1 0.1389 0.8833 0.952 0.000 0.000 0.048
#> SRR2532331 2 0.2011 0.8623 0.000 0.920 0.080 0.000
#> SRR2532330 3 0.2814 0.8074 0.000 0.132 0.868 0.000
#> SRR2532329 2 0.0336 0.9156 0.000 0.992 0.008 0.000
#> SRR2532328 4 0.2376 0.8797 0.068 0.000 0.016 0.916
#> SRR2532327 2 0.0188 0.9173 0.000 0.996 0.004 0.000
#> SRR2532326 1 0.5646 0.7144 0.708 0.000 0.088 0.204
#> SRR2532324 2 0.0336 0.9156 0.000 0.992 0.008 0.000
#> SRR2532325 1 0.1389 0.8833 0.952 0.000 0.000 0.048
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.2179 0.6897 0.888 0.000 0.000 0.112 0.000
#> SRR2532322 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.0162 0.8747 0.000 0.996 0.004 0.000 0.000
#> SRR2532320 2 0.1469 0.8627 0.000 0.948 0.036 0.000 0.016
#> SRR2532319 3 0.4384 0.6333 0.324 0.000 0.660 0.016 0.000
#> SRR2532317 2 0.4384 0.6284 0.000 0.728 0.044 0.000 0.228
#> SRR2532318 5 0.3863 0.6617 0.000 0.012 0.176 0.020 0.792
#> SRR2532315 4 0.0609 0.9278 0.020 0.000 0.000 0.980 0.000
#> SRR2532316 4 0.0609 0.9278 0.020 0.000 0.000 0.980 0.000
#> SRR2532396 2 0.4182 0.3710 0.000 0.644 0.004 0.000 0.352
#> SRR2532395 5 0.2329 0.7591 0.000 0.124 0.000 0.000 0.876
#> SRR2532394 5 0.4410 0.3094 0.000 0.440 0.004 0.000 0.556
#> SRR2532393 5 0.4192 0.7045 0.000 0.232 0.032 0.000 0.736
#> SRR2532392 2 0.3278 0.7531 0.000 0.824 0.020 0.000 0.156
#> SRR2532391 3 0.4437 0.4379 0.464 0.000 0.532 0.004 0.000
#> SRR2532390 2 0.0000 0.8747 0.000 1.000 0.000 0.000 0.000
#> SRR2532389 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
#> SRR2532388 5 0.4192 0.6965 0.000 0.232 0.032 0.000 0.736
#> SRR2532387 5 0.3639 0.7374 0.000 0.184 0.024 0.000 0.792
#> SRR2532386 4 0.1952 0.8934 0.084 0.000 0.000 0.912 0.004
#> SRR2532384 5 0.2424 0.7577 0.000 0.132 0.000 0.000 0.868
#> SRR2532385 5 0.3566 0.6637 0.000 0.004 0.160 0.024 0.812
#> SRR2532383 2 0.3492 0.7132 0.000 0.796 0.016 0.000 0.188
#> SRR2532381 4 0.2068 0.8862 0.092 0.000 0.000 0.904 0.004
#> SRR2532382 1 0.1608 0.7449 0.928 0.000 0.000 0.072 0.000
#> SRR2532379 4 0.0609 0.9278 0.020 0.000 0.000 0.980 0.000
#> SRR2532380 1 0.0162 0.8085 0.996 0.000 0.000 0.004 0.000
#> SRR2532378 4 0.3395 0.7027 0.236 0.000 0.000 0.764 0.000
#> SRR2532377 5 0.4310 0.4414 0.000 0.392 0.004 0.000 0.604
#> SRR2532376 5 0.3754 0.6620 0.000 0.008 0.176 0.020 0.796
#> SRR2532375 2 0.1893 0.8575 0.000 0.928 0.024 0.000 0.048
#> SRR2532374 3 0.4451 0.3438 0.492 0.000 0.504 0.000 0.004
#> SRR2532372 3 0.3728 0.6596 0.244 0.000 0.748 0.008 0.000
#> SRR2532373 2 0.0451 0.8742 0.000 0.988 0.008 0.000 0.004
#> SRR2532371 2 0.1704 0.8460 0.000 0.928 0.004 0.000 0.068
#> SRR2532370 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.2439 0.7594 0.000 0.120 0.004 0.000 0.876
#> SRR2532368 2 0.0000 0.8747 0.000 1.000 0.000 0.000 0.000
#> SRR2532367 2 0.3214 0.7790 0.000 0.844 0.036 0.000 0.120
#> SRR2532366 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
#> SRR2532365 2 0.4971 -0.0764 0.000 0.512 0.028 0.000 0.460
#> SRR2532364 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 2 0.0162 0.8747 0.000 0.996 0.004 0.000 0.000
#> SRR2532362 2 0.0290 0.8742 0.000 0.992 0.008 0.000 0.000
#> SRR2532361 4 0.0609 0.9278 0.020 0.000 0.000 0.980 0.000
#> SRR2532360 4 0.0609 0.9278 0.020 0.000 0.000 0.980 0.000
#> SRR2532359 1 0.1211 0.7832 0.960 0.000 0.016 0.024 0.000
#> SRR2532358 4 0.1106 0.9216 0.024 0.000 0.012 0.964 0.000
#> SRR2532357 2 0.0290 0.8737 0.000 0.992 0.008 0.000 0.000
#> SRR2532356 2 0.0771 0.8700 0.000 0.976 0.020 0.000 0.004
#> SRR2532355 1 0.5365 -0.3594 0.512 0.000 0.440 0.044 0.004
#> SRR2532354 1 0.0162 0.8085 0.996 0.000 0.000 0.004 0.000
#> SRR2532353 3 0.6634 0.3279 0.188 0.000 0.424 0.384 0.004
#> SRR2532352 2 0.0162 0.8747 0.000 0.996 0.004 0.000 0.000
#> SRR2532350 1 0.3010 0.5964 0.824 0.000 0.172 0.004 0.000
#> SRR2532349 3 0.4608 0.6410 0.336 0.000 0.640 0.024 0.000
#> SRR2532348 5 0.5607 0.2938 0.000 0.408 0.064 0.004 0.524
#> SRR2532347 5 0.2536 0.7591 0.000 0.128 0.004 0.000 0.868
#> SRR2532346 5 0.5926 0.6101 0.000 0.124 0.216 0.020 0.640
#> SRR2532345 2 0.5506 0.4087 0.000 0.616 0.100 0.000 0.284
#> SRR2532344 3 0.4227 0.6481 0.292 0.000 0.692 0.016 0.000
#> SRR2532343 3 0.5779 0.4810 0.428 0.000 0.492 0.076 0.004
#> SRR2532342 1 0.4607 0.3731 0.720 0.000 0.228 0.048 0.004
#> SRR2532341 3 0.4843 -0.0614 0.016 0.000 0.552 0.428 0.004
#> SRR2532340 1 0.3480 0.4366 0.752 0.000 0.248 0.000 0.000
#> SRR2532339 2 0.0162 0.8747 0.000 0.996 0.004 0.000 0.000
#> SRR2532338 2 0.0162 0.8740 0.000 0.996 0.004 0.000 0.000
#> SRR2532337 5 0.4350 0.4041 0.000 0.408 0.004 0.000 0.588
#> SRR2532336 1 0.1608 0.7457 0.928 0.000 0.000 0.072 0.000
#> SRR2532335 3 0.3838 0.6538 0.280 0.000 0.716 0.000 0.004
#> SRR2532334 1 0.5347 -0.3103 0.528 0.000 0.424 0.044 0.004
#> SRR2532333 5 0.2644 0.7101 0.000 0.016 0.068 0.020 0.896
#> SRR2532332 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.2989 0.8128 0.000 0.868 0.060 0.000 0.072
#> SRR2532330 5 0.1471 0.7261 0.000 0.020 0.024 0.004 0.952
#> SRR2532329 2 0.1597 0.8603 0.000 0.940 0.048 0.000 0.012
#> SRR2532328 4 0.3937 0.8143 0.072 0.000 0.116 0.808 0.004
#> SRR2532327 2 0.0566 0.8722 0.000 0.984 0.012 0.000 0.004
#> SRR2532326 3 0.6215 0.5653 0.340 0.000 0.520 0.136 0.004
#> SRR2532324 2 0.1082 0.8678 0.000 0.964 0.028 0.000 0.008
#> SRR2532325 1 0.0000 0.8103 1.000 0.000 0.000 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.1615 0.8242 0.928 0.000 0.004 0.064 0.000 0.004
#> SRR2532322 1 0.0146 0.8893 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532321 2 0.0767 0.8284 0.000 0.976 0.004 0.000 0.012 0.008
#> SRR2532320 2 0.2957 0.7898 0.000 0.844 0.004 0.000 0.032 0.120
#> SRR2532319 3 0.3751 0.6047 0.108 0.000 0.792 0.004 0.000 0.096
#> SRR2532317 2 0.5512 0.2487 0.000 0.540 0.008 0.000 0.336 0.116
#> SRR2532318 5 0.4387 0.0169 0.000 0.008 0.016 0.000 0.584 0.392
#> SRR2532315 4 0.0146 0.8708 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532316 4 0.0146 0.8708 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532396 2 0.4304 0.0451 0.000 0.536 0.008 0.000 0.448 0.008
#> SRR2532395 5 0.2118 0.6398 0.000 0.104 0.000 0.000 0.888 0.008
#> SRR2532394 5 0.4101 0.4745 0.000 0.352 0.008 0.000 0.632 0.008
#> SRR2532393 5 0.4332 0.6214 0.000 0.228 0.000 0.000 0.700 0.072
#> SRR2532392 2 0.4384 0.5237 0.000 0.684 0.012 0.000 0.268 0.036
#> SRR2532391 3 0.6054 0.4152 0.324 0.000 0.444 0.004 0.000 0.228
#> SRR2532390 2 0.0291 0.8304 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR2532389 1 0.0717 0.8842 0.976 0.000 0.016 0.000 0.000 0.008
#> SRR2532388 5 0.4007 0.6357 0.000 0.220 0.000 0.000 0.728 0.052
#> SRR2532387 5 0.4051 0.6315 0.000 0.172 0.012 0.000 0.760 0.056
#> SRR2532386 4 0.2361 0.8097 0.104 0.000 0.012 0.880 0.000 0.004
#> SRR2532384 5 0.2212 0.6426 0.000 0.112 0.000 0.000 0.880 0.008
#> SRR2532385 5 0.4213 0.0982 0.000 0.004 0.020 0.000 0.636 0.340
#> SRR2532383 2 0.4110 0.5833 0.000 0.712 0.008 0.000 0.248 0.032
#> SRR2532381 4 0.2455 0.8022 0.112 0.000 0.012 0.872 0.000 0.004
#> SRR2532382 1 0.0790 0.8672 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR2532379 4 0.0146 0.8708 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532380 1 0.0146 0.8867 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532378 4 0.3175 0.6210 0.256 0.000 0.000 0.744 0.000 0.000
#> SRR2532377 5 0.4000 0.5262 0.000 0.324 0.008 0.000 0.660 0.008
#> SRR2532376 5 0.4275 0.0276 0.000 0.004 0.016 0.000 0.592 0.388
#> SRR2532375 2 0.2854 0.8014 0.000 0.860 0.004 0.000 0.048 0.088
#> SRR2532374 3 0.6168 0.2294 0.252 0.000 0.372 0.004 0.000 0.372
#> SRR2532372 3 0.3279 0.5812 0.060 0.000 0.828 0.004 0.000 0.108
#> SRR2532373 2 0.1410 0.8279 0.000 0.944 0.004 0.000 0.008 0.044
#> SRR2532371 2 0.2636 0.7760 0.000 0.860 0.004 0.000 0.120 0.016
#> SRR2532370 1 0.0260 0.8899 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532369 5 0.2218 0.6395 0.000 0.104 0.000 0.000 0.884 0.012
#> SRR2532368 2 0.0458 0.8296 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR2532367 2 0.4179 0.6311 0.000 0.744 0.012 0.000 0.188 0.056
#> SRR2532366 1 0.0260 0.8899 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532365 5 0.5152 0.2120 0.000 0.428 0.012 0.000 0.504 0.056
#> SRR2532364 1 0.0260 0.8899 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532363 2 0.0260 0.8304 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532362 2 0.0692 0.8281 0.000 0.976 0.000 0.000 0.004 0.020
#> SRR2532361 4 0.0146 0.8708 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532360 4 0.0146 0.8708 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532359 1 0.1367 0.8572 0.944 0.000 0.044 0.012 0.000 0.000
#> SRR2532358 4 0.0767 0.8636 0.008 0.000 0.012 0.976 0.000 0.004
#> SRR2532357 2 0.1082 0.8237 0.000 0.956 0.004 0.000 0.000 0.040
#> SRR2532356 2 0.1411 0.8196 0.000 0.936 0.004 0.000 0.000 0.060
#> SRR2532355 3 0.4233 0.6133 0.284 0.000 0.680 0.028 0.000 0.008
#> SRR2532354 1 0.0146 0.8867 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR2532353 3 0.5465 0.4895 0.108 0.000 0.612 0.256 0.000 0.024
#> SRR2532352 2 0.0291 0.8304 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR2532350 1 0.3384 0.5842 0.760 0.000 0.228 0.004 0.000 0.008
#> SRR2532349 3 0.4940 0.6333 0.188 0.000 0.688 0.020 0.000 0.104
#> SRR2532348 5 0.5676 0.4424 0.000 0.284 0.000 0.000 0.520 0.196
#> SRR2532347 5 0.2696 0.6419 0.000 0.116 0.000 0.000 0.856 0.028
#> SRR2532346 6 0.5022 -0.3030 0.000 0.072 0.000 0.000 0.432 0.496
#> SRR2532345 2 0.6095 0.1492 0.000 0.464 0.008 0.000 0.304 0.224
#> SRR2532344 3 0.3612 0.5959 0.092 0.000 0.804 0.004 0.000 0.100
#> SRR2532343 3 0.4147 0.6534 0.196 0.000 0.736 0.064 0.000 0.004
#> SRR2532342 1 0.4460 -0.1879 0.520 0.000 0.452 0.028 0.000 0.000
#> SRR2532341 6 0.6003 -0.3193 0.004 0.000 0.372 0.200 0.000 0.424
#> SRR2532340 1 0.4067 0.5319 0.728 0.000 0.212 0.000 0.000 0.060
#> SRR2532339 2 0.0146 0.8301 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR2532338 2 0.0291 0.8304 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR2532337 5 0.3789 0.5343 0.000 0.324 0.004 0.000 0.668 0.004
#> SRR2532336 1 0.0632 0.8747 0.976 0.000 0.000 0.024 0.000 0.000
#> SRR2532335 3 0.5658 0.3875 0.148 0.000 0.544 0.008 0.000 0.300
#> SRR2532334 3 0.4144 0.5147 0.360 0.000 0.620 0.020 0.000 0.000
#> SRR2532333 5 0.2989 0.3845 0.000 0.008 0.004 0.000 0.812 0.176
#> SRR2532332 1 0.0260 0.8899 0.992 0.000 0.008 0.000 0.000 0.000
#> SRR2532331 2 0.4154 0.7106 0.000 0.748 0.008 0.000 0.068 0.176
#> SRR2532330 5 0.1918 0.4791 0.000 0.008 0.000 0.000 0.904 0.088
#> SRR2532329 2 0.2308 0.8042 0.000 0.880 0.008 0.000 0.004 0.108
#> SRR2532328 4 0.5657 0.3757 0.032 0.000 0.092 0.568 0.000 0.308
#> SRR2532327 2 0.1152 0.8256 0.000 0.952 0.004 0.000 0.000 0.044
#> SRR2532326 3 0.4709 0.6344 0.140 0.000 0.724 0.112 0.000 0.024
#> SRR2532324 2 0.2001 0.8128 0.000 0.900 0.004 0.000 0.004 0.092
#> SRR2532325 1 0.0260 0.8899 0.992 0.000 0.008 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 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 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 1.000 0.992 0.996 0.5034 0.498 0.498
#> 3 3 0.862 0.731 0.833 0.1856 0.895 0.793
#> 4 4 0.959 0.933 0.971 0.0669 0.910 0.792
#> 5 5 0.773 0.803 0.907 0.2221 0.851 0.591
#> 6 6 0.742 0.737 0.860 0.0282 0.971 0.873
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2
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
#> SRR2532323 1 0.0000 0.999 1.000 0.000
#> SRR2532322 1 0.0000 0.999 1.000 0.000
#> SRR2532321 2 0.0000 0.993 0.000 1.000
#> SRR2532320 2 0.0000 0.993 0.000 1.000
#> SRR2532319 1 0.0376 0.995 0.996 0.004
#> SRR2532317 2 0.0000 0.993 0.000 1.000
#> SRR2532318 2 0.0000 0.993 0.000 1.000
#> SRR2532315 1 0.0000 0.999 1.000 0.000
#> SRR2532316 1 0.0000 0.999 1.000 0.000
#> SRR2532396 2 0.0000 0.993 0.000 1.000
#> SRR2532395 2 0.0000 0.993 0.000 1.000
#> SRR2532394 2 0.0000 0.993 0.000 1.000
#> SRR2532393 2 0.0000 0.993 0.000 1.000
#> SRR2532392 2 0.0000 0.993 0.000 1.000
#> SRR2532391 1 0.0000 0.999 1.000 0.000
#> SRR2532390 2 0.0000 0.993 0.000 1.000
#> SRR2532389 1 0.0000 0.999 1.000 0.000
#> SRR2532388 2 0.0000 0.993 0.000 1.000
#> SRR2532387 2 0.0000 0.993 0.000 1.000
#> SRR2532386 1 0.0000 0.999 1.000 0.000
#> SRR2532384 2 0.0000 0.993 0.000 1.000
#> SRR2532385 2 0.4690 0.889 0.100 0.900
#> SRR2532383 2 0.0000 0.993 0.000 1.000
#> SRR2532381 1 0.0000 0.999 1.000 0.000
#> SRR2532382 1 0.0000 0.999 1.000 0.000
#> SRR2532379 1 0.0000 0.999 1.000 0.000
#> SRR2532380 1 0.0000 0.999 1.000 0.000
#> SRR2532378 1 0.0000 0.999 1.000 0.000
#> SRR2532377 2 0.0000 0.993 0.000 1.000
#> SRR2532376 2 0.0000 0.993 0.000 1.000
#> SRR2532375 2 0.0000 0.993 0.000 1.000
#> SRR2532374 1 0.0000 0.999 1.000 0.000
#> SRR2532372 1 0.0000 0.999 1.000 0.000
#> SRR2532373 2 0.0000 0.993 0.000 1.000
#> SRR2532371 2 0.0000 0.993 0.000 1.000
#> SRR2532370 1 0.0000 0.999 1.000 0.000
#> SRR2532369 2 0.0000 0.993 0.000 1.000
#> SRR2532368 2 0.0000 0.993 0.000 1.000
#> SRR2532367 2 0.0000 0.993 0.000 1.000
#> SRR2532366 1 0.0000 0.999 1.000 0.000
#> SRR2532365 2 0.0000 0.993 0.000 1.000
#> SRR2532364 1 0.0000 0.999 1.000 0.000
#> SRR2532363 2 0.0000 0.993 0.000 1.000
#> SRR2532362 2 0.0000 0.993 0.000 1.000
#> SRR2532361 1 0.0000 0.999 1.000 0.000
#> SRR2532360 1 0.0000 0.999 1.000 0.000
#> SRR2532359 1 0.0000 0.999 1.000 0.000
#> SRR2532358 1 0.0000 0.999 1.000 0.000
#> SRR2532357 2 0.0000 0.993 0.000 1.000
#> SRR2532356 2 0.0000 0.993 0.000 1.000
#> SRR2532355 1 0.0000 0.999 1.000 0.000
#> SRR2532354 1 0.0000 0.999 1.000 0.000
#> SRR2532353 1 0.0000 0.999 1.000 0.000
#> SRR2532352 2 0.0000 0.993 0.000 1.000
#> SRR2532350 1 0.0000 0.999 1.000 0.000
#> SRR2532349 1 0.0000 0.999 1.000 0.000
#> SRR2532348 2 0.0000 0.993 0.000 1.000
#> SRR2532347 2 0.0000 0.993 0.000 1.000
#> SRR2532346 2 0.0000 0.993 0.000 1.000
#> SRR2532345 2 0.0000 0.993 0.000 1.000
#> SRR2532344 1 0.2236 0.963 0.964 0.036
#> SRR2532343 1 0.0000 0.999 1.000 0.000
#> SRR2532342 1 0.0000 0.999 1.000 0.000
#> SRR2532341 2 0.6343 0.812 0.160 0.840
#> SRR2532340 1 0.0000 0.999 1.000 0.000
#> SRR2532339 2 0.0000 0.993 0.000 1.000
#> SRR2532338 2 0.0000 0.993 0.000 1.000
#> SRR2532337 2 0.0000 0.993 0.000 1.000
#> SRR2532336 1 0.0000 0.999 1.000 0.000
#> SRR2532335 1 0.0000 0.999 1.000 0.000
#> SRR2532334 1 0.0000 0.999 1.000 0.000
#> SRR2532333 2 0.0000 0.993 0.000 1.000
#> SRR2532332 1 0.0000 0.999 1.000 0.000
#> SRR2532331 2 0.0000 0.993 0.000 1.000
#> SRR2532330 2 0.0000 0.993 0.000 1.000
#> SRR2532329 2 0.0000 0.993 0.000 1.000
#> SRR2532328 2 0.1633 0.971 0.024 0.976
#> SRR2532327 2 0.0000 0.993 0.000 1.000
#> SRR2532326 1 0.0000 0.999 1.000 0.000
#> SRR2532324 2 0.0000 0.993 0.000 1.000
#> SRR2532325 1 0.0000 0.999 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.6260 0.400 0.552 0.000 0.448
#> SRR2532322 1 0.6215 0.425 0.572 0.000 0.428
#> SRR2532321 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532320 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532319 1 0.0829 0.618 0.984 0.012 0.004
#> SRR2532317 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532318 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532315 3 0.6252 0.612 0.444 0.000 0.556
#> SRR2532316 3 0.6252 0.612 0.444 0.000 0.556
#> SRR2532396 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532395 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532394 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532393 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532392 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532391 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532390 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532389 1 0.4796 0.528 0.780 0.000 0.220
#> SRR2532388 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532387 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532386 3 0.6299 0.573 0.476 0.000 0.524
#> SRR2532384 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532385 2 0.1525 0.961 0.032 0.964 0.004
#> SRR2532383 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532381 1 0.6308 -0.581 0.508 0.000 0.492
#> SRR2532382 3 0.1529 0.356 0.040 0.000 0.960
#> SRR2532379 3 0.6252 0.612 0.444 0.000 0.556
#> SRR2532380 1 0.6235 0.415 0.564 0.000 0.436
#> SRR2532378 3 0.4062 0.464 0.164 0.000 0.836
#> SRR2532377 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532376 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532375 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532374 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532372 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532373 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532371 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532370 1 0.6215 0.425 0.572 0.000 0.428
#> SRR2532369 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532368 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532367 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532366 1 0.6215 0.425 0.572 0.000 0.428
#> SRR2532365 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532364 1 0.6215 0.425 0.572 0.000 0.428
#> SRR2532363 2 0.0237 0.992 0.000 0.996 0.004
#> SRR2532362 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532361 3 0.6252 0.612 0.444 0.000 0.556
#> SRR2532360 3 0.6252 0.612 0.444 0.000 0.556
#> SRR2532359 1 0.5016 0.518 0.760 0.000 0.240
#> SRR2532358 1 0.6307 -0.575 0.512 0.000 0.488
#> SRR2532357 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532356 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532355 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532354 3 0.6244 -0.295 0.440 0.000 0.560
#> SRR2532353 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532352 2 0.0000 0.992 0.000 1.000 0.000
#> SRR2532350 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532349 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532348 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532347 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532346 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532345 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532344 1 0.0829 0.618 0.984 0.012 0.004
#> SRR2532343 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532342 1 0.2959 0.472 0.900 0.000 0.100
#> SRR2532341 1 0.5902 0.228 0.680 0.316 0.004
#> SRR2532340 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532339 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532338 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532337 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532336 3 0.6235 -0.288 0.436 0.000 0.564
#> SRR2532335 1 0.0237 0.629 0.996 0.004 0.000
#> SRR2532334 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532333 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532332 1 0.6215 0.425 0.572 0.000 0.428
#> SRR2532331 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532330 2 0.0592 0.991 0.000 0.988 0.012
#> SRR2532329 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532328 2 0.0983 0.978 0.016 0.980 0.004
#> SRR2532327 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532326 1 0.0000 0.632 1.000 0.000 0.000
#> SRR2532324 2 0.0237 0.991 0.000 0.996 0.004
#> SRR2532325 1 0.6215 0.425 0.572 0.000 0.428
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532322 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532321 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532320 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532319 3 0.0376 0.9818 0.004 0.004 0.992 0.000
#> SRR2532317 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532318 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532315 4 0.0336 0.8745 0.000 0.000 0.008 0.992
#> SRR2532316 4 0.0336 0.8745 0.000 0.000 0.008 0.992
#> SRR2532396 2 0.0376 0.9845 0.004 0.992 0.000 0.004
#> SRR2532395 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532394 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532393 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532392 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532391 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532390 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532389 1 0.4866 0.3877 0.596 0.000 0.404 0.000
#> SRR2532388 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532387 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532386 4 0.4996 0.0442 0.000 0.000 0.484 0.516
#> SRR2532384 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532385 2 0.2530 0.8767 0.004 0.896 0.100 0.000
#> SRR2532383 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532381 3 0.1940 0.9127 0.000 0.000 0.924 0.076
#> SRR2532382 1 0.0336 0.9005 0.992 0.000 0.000 0.008
#> SRR2532379 4 0.0336 0.8745 0.000 0.000 0.008 0.992
#> SRR2532380 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532378 4 0.3219 0.7088 0.164 0.000 0.000 0.836
#> SRR2532377 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532376 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532375 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532374 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532372 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532373 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532371 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532370 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532369 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532368 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532367 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532366 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532365 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532364 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532363 2 0.0188 0.9850 0.000 0.996 0.000 0.004
#> SRR2532362 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532361 4 0.0336 0.8745 0.000 0.000 0.008 0.992
#> SRR2532360 4 0.0336 0.8745 0.000 0.000 0.008 0.992
#> SRR2532359 1 0.4776 0.4516 0.624 0.000 0.376 0.000
#> SRR2532358 3 0.0336 0.9833 0.000 0.000 0.992 0.008
#> SRR2532357 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532356 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532355 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532354 1 0.0376 0.9049 0.992 0.000 0.004 0.004
#> SRR2532353 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532352 2 0.0188 0.9850 0.000 0.996 0.000 0.004
#> SRR2532350 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532349 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532348 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532347 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532346 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532345 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532344 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532343 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532342 3 0.1256 0.9590 0.028 0.000 0.964 0.008
#> SRR2532341 2 0.3764 0.7229 0.000 0.784 0.216 0.000
#> SRR2532340 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532339 2 0.0376 0.9845 0.004 0.992 0.000 0.004
#> SRR2532338 2 0.0376 0.9845 0.004 0.992 0.000 0.004
#> SRR2532337 2 0.0524 0.9843 0.004 0.988 0.000 0.008
#> SRR2532336 1 0.1389 0.8737 0.952 0.000 0.048 0.000
#> SRR2532335 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532334 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532333 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532332 1 0.0336 0.9085 0.992 0.000 0.008 0.000
#> SRR2532331 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532330 2 0.0376 0.9848 0.004 0.992 0.000 0.004
#> SRR2532329 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532328 2 0.1211 0.9530 0.000 0.960 0.040 0.000
#> SRR2532327 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532326 3 0.0000 0.9909 0.000 0.000 1.000 0.000
#> SRR2532324 2 0.0188 0.9848 0.004 0.996 0.000 0.000
#> SRR2532325 1 0.0336 0.9085 0.992 0.000 0.008 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532321 5 0.0000 0.8385 0.000 0.000 0.000 0.000 1.000
#> SRR2532320 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532319 3 0.1732 0.8889 0.000 0.080 0.920 0.000 0.000
#> SRR2532317 5 0.2329 0.8304 0.000 0.124 0.000 0.000 0.876
#> SRR2532318 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532315 4 0.0000 0.8796 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.8796 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 5 0.3242 0.7605 0.000 0.216 0.000 0.000 0.784
#> SRR2532395 5 0.0510 0.8429 0.000 0.016 0.000 0.000 0.984
#> SRR2532394 5 0.0000 0.8385 0.000 0.000 0.000 0.000 1.000
#> SRR2532393 2 0.0162 0.8312 0.000 0.996 0.000 0.000 0.004
#> SRR2532392 5 0.0162 0.8398 0.000 0.004 0.000 0.000 0.996
#> SRR2532391 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532390 2 0.2424 0.7732 0.000 0.868 0.000 0.000 0.132
#> SRR2532389 1 0.4171 0.3868 0.604 0.000 0.396 0.000 0.000
#> SRR2532388 5 0.3857 0.6757 0.000 0.312 0.000 0.000 0.688
#> SRR2532387 5 0.3305 0.7730 0.000 0.224 0.000 0.000 0.776
#> SRR2532386 4 0.4287 0.1200 0.000 0.000 0.460 0.540 0.000
#> SRR2532384 5 0.0290 0.8416 0.000 0.008 0.000 0.000 0.992
#> SRR2532385 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532383 2 0.4306 -0.0535 0.000 0.508 0.000 0.000 0.492
#> SRR2532381 3 0.1732 0.9056 0.000 0.000 0.920 0.080 0.000
#> SRR2532382 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.8796 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 4 0.2690 0.7249 0.156 0.000 0.000 0.844 0.000
#> SRR2532377 5 0.0000 0.8385 0.000 0.000 0.000 0.000 1.000
#> SRR2532376 2 0.0703 0.8290 0.000 0.976 0.000 0.000 0.024
#> SRR2532375 2 0.3274 0.6246 0.000 0.780 0.000 0.000 0.220
#> SRR2532374 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532372 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532373 2 0.1410 0.8138 0.000 0.940 0.000 0.000 0.060
#> SRR2532371 5 0.0404 0.8371 0.000 0.012 0.000 0.000 0.988
#> SRR2532370 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.2020 0.8345 0.000 0.100 0.000 0.000 0.900
#> SRR2532368 2 0.2424 0.7868 0.000 0.868 0.000 0.000 0.132
#> SRR2532367 5 0.3210 0.7829 0.000 0.212 0.000 0.000 0.788
#> SRR2532366 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.1341 0.8451 0.000 0.056 0.000 0.000 0.944
#> SRR2532364 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532363 5 0.2561 0.7824 0.000 0.144 0.000 0.000 0.856
#> SRR2532362 2 0.4249 0.2819 0.000 0.568 0.000 0.000 0.432
#> SRR2532361 4 0.0000 0.8796 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0000 0.8796 0.000 0.000 0.000 1.000 0.000
#> SRR2532359 1 0.4088 0.4508 0.632 0.000 0.368 0.000 0.000
#> SRR2532358 3 0.0290 0.9772 0.000 0.000 0.992 0.008 0.000
#> SRR2532357 2 0.4161 0.3757 0.000 0.608 0.000 0.000 0.392
#> SRR2532356 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532355 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532354 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532352 5 0.2329 0.7651 0.000 0.124 0.000 0.000 0.876
#> SRR2532350 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532349 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532348 5 0.3274 0.7768 0.000 0.220 0.000 0.000 0.780
#> SRR2532347 5 0.2074 0.8342 0.000 0.104 0.000 0.000 0.896
#> SRR2532346 2 0.2516 0.7490 0.000 0.860 0.000 0.000 0.140
#> SRR2532345 2 0.2516 0.7490 0.000 0.860 0.000 0.000 0.140
#> SRR2532344 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532343 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532342 3 0.1341 0.9281 0.056 0.000 0.944 0.000 0.000
#> SRR2532341 5 0.4126 0.4664 0.000 0.000 0.380 0.000 0.620
#> SRR2532340 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532339 2 0.4219 0.4218 0.000 0.584 0.000 0.000 0.416
#> SRR2532338 2 0.2690 0.7535 0.000 0.844 0.000 0.000 0.156
#> SRR2532337 5 0.0000 0.8385 0.000 0.000 0.000 0.000 1.000
#> SRR2532336 1 0.1478 0.8506 0.936 0.000 0.064 0.000 0.000
#> SRR2532335 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532334 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532333 5 0.3274 0.7768 0.000 0.220 0.000 0.000 0.780
#> SRR2532332 1 0.0000 0.9070 1.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532330 5 0.3242 0.7795 0.000 0.216 0.000 0.000 0.784
#> SRR2532329 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532328 5 0.4920 0.6450 0.000 0.308 0.048 0.000 0.644
#> SRR2532327 2 0.1608 0.8051 0.000 0.928 0.000 0.000 0.072
#> SRR2532326 3 0.0000 0.9831 0.000 0.000 1.000 0.000 0.000
#> SRR2532324 2 0.0000 0.8312 0.000 1.000 0.000 0.000 0.000
#> SRR2532325 1 0.0162 0.9042 0.996 0.000 0.004 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0547 0.8589 0.980 0.000 0.020 0.000 0.000 0.000
#> SRR2532322 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 5 0.2562 0.7585 0.000 0.000 0.000 0.000 0.828 0.172
#> SRR2532320 2 0.0260 0.8079 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532319 3 0.2416 0.6402 0.000 0.156 0.844 0.000 0.000 0.000
#> SRR2532317 5 0.1765 0.7999 0.000 0.096 0.000 0.000 0.904 0.000
#> SRR2532318 2 0.1267 0.8006 0.000 0.940 0.000 0.000 0.000 0.060
#> SRR2532315 4 0.0000 0.9468 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.9468 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 5 0.3336 0.7900 0.000 0.132 0.000 0.000 0.812 0.056
#> SRR2532395 5 0.0363 0.8059 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR2532394 5 0.0790 0.7990 0.000 0.000 0.000 0.000 0.968 0.032
#> SRR2532393 2 0.1152 0.8041 0.000 0.952 0.000 0.000 0.004 0.044
#> SRR2532392 5 0.2527 0.7603 0.000 0.000 0.000 0.000 0.832 0.168
#> SRR2532391 3 0.2454 0.8030 0.000 0.000 0.840 0.000 0.000 0.160
#> SRR2532390 2 0.3215 0.7181 0.000 0.828 0.000 0.000 0.100 0.072
#> SRR2532389 3 0.5031 0.1119 0.448 0.000 0.480 0.000 0.000 0.072
#> SRR2532388 5 0.3690 0.6732 0.000 0.288 0.000 0.000 0.700 0.012
#> SRR2532387 5 0.2883 0.7437 0.000 0.212 0.000 0.000 0.788 0.000
#> SRR2532386 6 0.4674 0.3618 0.000 0.000 0.060 0.332 0.000 0.608
#> SRR2532384 5 0.0260 0.8053 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR2532385 2 0.1267 0.8006 0.000 0.940 0.000 0.000 0.000 0.060
#> SRR2532383 5 0.4051 0.2534 0.000 0.432 0.000 0.000 0.560 0.008
#> SRR2532381 6 0.4635 0.5288 0.000 0.000 0.336 0.056 0.000 0.608
#> SRR2532382 1 0.3695 0.4438 0.624 0.000 0.000 0.000 0.000 0.376
#> SRR2532379 4 0.0000 0.9468 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532378 4 0.2300 0.7196 0.144 0.000 0.000 0.856 0.000 0.000
#> SRR2532377 5 0.0000 0.8023 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR2532376 2 0.1890 0.7984 0.000 0.916 0.000 0.000 0.024 0.060
#> SRR2532375 2 0.3426 0.5121 0.000 0.720 0.000 0.000 0.276 0.004
#> SRR2532374 3 0.2454 0.8030 0.000 0.000 0.840 0.000 0.000 0.160
#> SRR2532372 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532373 2 0.1501 0.7964 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR2532371 5 0.2491 0.7722 0.000 0.020 0.000 0.000 0.868 0.112
#> SRR2532370 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.1501 0.8024 0.000 0.076 0.000 0.000 0.924 0.000
#> SRR2532368 2 0.4174 0.6699 0.000 0.736 0.000 0.000 0.092 0.172
#> SRR2532367 5 0.3133 0.7454 0.000 0.212 0.000 0.000 0.780 0.008
#> SRR2532366 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.2328 0.8095 0.000 0.052 0.000 0.000 0.892 0.056
#> SRR2532364 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532363 5 0.4351 0.6943 0.000 0.108 0.000 0.000 0.720 0.172
#> SRR2532362 2 0.4724 0.4018 0.000 0.592 0.000 0.000 0.348 0.060
#> SRR2532361 4 0.0000 0.9468 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532360 4 0.0000 0.9468 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532359 1 0.5442 0.0771 0.508 0.000 0.364 0.000 0.000 0.128
#> SRR2532358 3 0.0865 0.8291 0.000 0.000 0.964 0.036 0.000 0.000
#> SRR2532357 2 0.4660 0.4350 0.000 0.612 0.000 0.000 0.328 0.060
#> SRR2532356 2 0.0260 0.8079 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532355 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532354 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532352 5 0.4079 0.7025 0.000 0.084 0.000 0.000 0.744 0.172
#> SRR2532350 3 0.2454 0.8030 0.000 0.000 0.840 0.000 0.000 0.160
#> SRR2532349 3 0.1444 0.8379 0.000 0.000 0.928 0.000 0.000 0.072
#> SRR2532348 5 0.2883 0.7462 0.000 0.212 0.000 0.000 0.788 0.000
#> SRR2532347 5 0.1913 0.8026 0.000 0.080 0.000 0.000 0.908 0.012
#> SRR2532346 2 0.3354 0.7335 0.000 0.812 0.000 0.000 0.128 0.060
#> SRR2532345 2 0.2558 0.7406 0.000 0.840 0.000 0.000 0.156 0.004
#> SRR2532344 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532343 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532342 3 0.2579 0.7302 0.088 0.000 0.872 0.000 0.000 0.040
#> SRR2532341 5 0.5586 0.3419 0.000 0.004 0.284 0.000 0.552 0.160
#> SRR2532340 3 0.2454 0.8030 0.000 0.000 0.840 0.000 0.000 0.160
#> SRR2532339 2 0.5720 0.2472 0.000 0.472 0.000 0.000 0.356 0.172
#> SRR2532338 2 0.4474 0.6305 0.000 0.708 0.000 0.000 0.120 0.172
#> SRR2532337 5 0.2048 0.7713 0.000 0.000 0.000 0.000 0.880 0.120
#> SRR2532336 1 0.3674 0.5670 0.716 0.000 0.016 0.000 0.000 0.268
#> SRR2532335 3 0.2454 0.8030 0.000 0.000 0.840 0.000 0.000 0.160
#> SRR2532334 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532333 5 0.3348 0.7357 0.000 0.216 0.000 0.000 0.768 0.016
#> SRR2532332 1 0.0000 0.8759 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 2 0.1007 0.8030 0.000 0.956 0.000 0.000 0.000 0.044
#> SRR2532330 5 0.3290 0.7394 0.000 0.208 0.000 0.000 0.776 0.016
#> SRR2532329 2 0.0260 0.8079 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532328 5 0.5215 0.6816 0.000 0.128 0.032 0.000 0.676 0.164
#> SRR2532327 2 0.1327 0.7969 0.000 0.936 0.000 0.000 0.064 0.000
#> SRR2532326 3 0.0000 0.8526 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532324 2 0.0260 0.8079 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR2532325 1 0.0146 0.8736 0.996 0.000 0.000 0.000 0.000 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)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.999 1.000 0.5061 0.494 0.494
#> 3 3 0.725 0.718 0.835 0.1818 0.883 0.763
#> 4 4 0.718 0.769 0.793 0.0885 0.948 0.867
#> 5 5 0.678 0.662 0.816 0.0898 0.914 0.768
#> 6 6 0.616 0.627 0.760 0.0806 0.927 0.767
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
#> SRR2532323 1 0.000 1.000 1.00 0.00
#> SRR2532322 1 0.000 1.000 1.00 0.00
#> SRR2532321 2 0.000 0.999 0.00 1.00
#> SRR2532320 2 0.000 0.999 0.00 1.00
#> SRR2532319 1 0.000 1.000 1.00 0.00
#> SRR2532317 2 0.000 0.999 0.00 1.00
#> SRR2532318 2 0.000 0.999 0.00 1.00
#> SRR2532315 1 0.000 1.000 1.00 0.00
#> SRR2532316 1 0.000 1.000 1.00 0.00
#> SRR2532396 2 0.000 0.999 0.00 1.00
#> SRR2532395 2 0.000 0.999 0.00 1.00
#> SRR2532394 2 0.000 0.999 0.00 1.00
#> SRR2532393 2 0.000 0.999 0.00 1.00
#> SRR2532392 2 0.000 0.999 0.00 1.00
#> SRR2532391 1 0.000 1.000 1.00 0.00
#> SRR2532390 2 0.000 0.999 0.00 1.00
#> SRR2532389 1 0.000 1.000 1.00 0.00
#> SRR2532388 2 0.000 0.999 0.00 1.00
#> SRR2532387 2 0.000 0.999 0.00 1.00
#> SRR2532386 1 0.000 1.000 1.00 0.00
#> SRR2532384 2 0.000 0.999 0.00 1.00
#> SRR2532385 2 0.242 0.958 0.04 0.96
#> SRR2532383 2 0.000 0.999 0.00 1.00
#> SRR2532381 1 0.000 1.000 1.00 0.00
#> SRR2532382 1 0.000 1.000 1.00 0.00
#> SRR2532379 1 0.000 1.000 1.00 0.00
#> SRR2532380 1 0.000 1.000 1.00 0.00
#> SRR2532378 1 0.000 1.000 1.00 0.00
#> SRR2532377 2 0.000 0.999 0.00 1.00
#> SRR2532376 2 0.000 0.999 0.00 1.00
#> SRR2532375 2 0.000 0.999 0.00 1.00
#> SRR2532374 1 0.000 1.000 1.00 0.00
#> SRR2532372 1 0.000 1.000 1.00 0.00
#> SRR2532373 2 0.000 0.999 0.00 1.00
#> SRR2532371 2 0.000 0.999 0.00 1.00
#> SRR2532370 1 0.000 1.000 1.00 0.00
#> SRR2532369 2 0.000 0.999 0.00 1.00
#> SRR2532368 2 0.000 0.999 0.00 1.00
#> SRR2532367 2 0.000 0.999 0.00 1.00
#> SRR2532366 1 0.000 1.000 1.00 0.00
#> SRR2532365 2 0.000 0.999 0.00 1.00
#> SRR2532364 1 0.000 1.000 1.00 0.00
#> SRR2532363 2 0.000 0.999 0.00 1.00
#> SRR2532362 2 0.000 0.999 0.00 1.00
#> SRR2532361 1 0.000 1.000 1.00 0.00
#> SRR2532360 1 0.000 1.000 1.00 0.00
#> SRR2532359 1 0.000 1.000 1.00 0.00
#> SRR2532358 1 0.000 1.000 1.00 0.00
#> SRR2532357 2 0.000 0.999 0.00 1.00
#> SRR2532356 2 0.000 0.999 0.00 1.00
#> SRR2532355 1 0.000 1.000 1.00 0.00
#> SRR2532354 1 0.000 1.000 1.00 0.00
#> SRR2532353 1 0.000 1.000 1.00 0.00
#> SRR2532352 2 0.000 0.999 0.00 1.00
#> SRR2532350 1 0.000 1.000 1.00 0.00
#> SRR2532349 1 0.000 1.000 1.00 0.00
#> SRR2532348 2 0.000 0.999 0.00 1.00
#> SRR2532347 2 0.000 0.999 0.00 1.00
#> SRR2532346 2 0.000 0.999 0.00 1.00
#> SRR2532345 2 0.000 0.999 0.00 1.00
#> SRR2532344 1 0.000 1.000 1.00 0.00
#> SRR2532343 1 0.000 1.000 1.00 0.00
#> SRR2532342 1 0.000 1.000 1.00 0.00
#> SRR2532341 1 0.000 1.000 1.00 0.00
#> SRR2532340 1 0.000 1.000 1.00 0.00
#> SRR2532339 2 0.000 0.999 0.00 1.00
#> SRR2532338 2 0.000 0.999 0.00 1.00
#> SRR2532337 2 0.000 0.999 0.00 1.00
#> SRR2532336 1 0.000 1.000 1.00 0.00
#> SRR2532335 1 0.000 1.000 1.00 0.00
#> SRR2532334 1 0.000 1.000 1.00 0.00
#> SRR2532333 2 0.000 0.999 0.00 1.00
#> SRR2532332 1 0.000 1.000 1.00 0.00
#> SRR2532331 2 0.000 0.999 0.00 1.00
#> SRR2532330 2 0.000 0.999 0.00 1.00
#> SRR2532329 2 0.000 0.999 0.00 1.00
#> SRR2532328 1 0.000 1.000 1.00 0.00
#> SRR2532327 2 0.000 0.999 0.00 1.00
#> SRR2532326 1 0.000 1.000 1.00 0.00
#> SRR2532324 2 0.000 0.999 0.00 1.00
#> SRR2532325 1 0.000 1.000 1.00 0.00
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.0000 0.7045 1.000 0.000 0.000
#> SRR2532322 1 0.0424 0.7050 0.992 0.000 0.008
#> SRR2532321 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532319 3 0.6079 0.6779 0.388 0.000 0.612
#> SRR2532317 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532318 2 0.3340 0.9201 0.000 0.880 0.120
#> SRR2532315 3 0.6267 -0.0284 0.452 0.000 0.548
#> SRR2532316 3 0.6267 -0.0284 0.452 0.000 0.548
#> SRR2532396 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532395 2 0.2959 0.9320 0.000 0.900 0.100
#> SRR2532394 2 0.0424 0.9721 0.000 0.992 0.008
#> SRR2532393 2 0.3116 0.9275 0.000 0.892 0.108
#> SRR2532392 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532391 3 0.6095 0.6808 0.392 0.000 0.608
#> SRR2532390 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532389 1 0.5254 0.3122 0.736 0.000 0.264
#> SRR2532388 2 0.2959 0.9320 0.000 0.900 0.100
#> SRR2532387 2 0.0747 0.9691 0.000 0.984 0.016
#> SRR2532386 1 0.5431 0.2470 0.716 0.000 0.284
#> SRR2532384 2 0.2959 0.9320 0.000 0.900 0.100
#> SRR2532385 2 0.4504 0.8452 0.000 0.804 0.196
#> SRR2532383 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532381 1 0.5497 0.2271 0.708 0.000 0.292
#> SRR2532382 1 0.0000 0.7045 1.000 0.000 0.000
#> SRR2532379 3 0.6267 -0.0284 0.452 0.000 0.548
#> SRR2532380 1 0.0000 0.7045 1.000 0.000 0.000
#> SRR2532378 1 0.4002 0.5336 0.840 0.000 0.160
#> SRR2532377 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532376 2 0.3340 0.9201 0.000 0.880 0.120
#> SRR2532375 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532374 3 0.6140 0.6646 0.404 0.000 0.596
#> SRR2532372 3 0.6095 0.6808 0.392 0.000 0.608
#> SRR2532373 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532370 1 0.0424 0.7050 0.992 0.000 0.008
#> SRR2532369 2 0.2959 0.9320 0.000 0.900 0.100
#> SRR2532368 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532366 1 0.0592 0.7020 0.988 0.000 0.012
#> SRR2532365 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532364 1 0.0424 0.7050 0.992 0.000 0.008
#> SRR2532363 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532361 3 0.6260 -0.0221 0.448 0.000 0.552
#> SRR2532360 3 0.6274 -0.0322 0.456 0.000 0.544
#> SRR2532359 1 0.6168 -0.2015 0.588 0.000 0.412
#> SRR2532358 1 0.6267 -0.2912 0.548 0.000 0.452
#> SRR2532357 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532355 3 0.6095 0.6808 0.392 0.000 0.608
#> SRR2532354 1 0.0000 0.7045 1.000 0.000 0.000
#> SRR2532353 1 0.6280 -0.3788 0.540 0.000 0.460
#> SRR2532352 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532350 3 0.6111 0.6778 0.396 0.000 0.604
#> SRR2532349 3 0.6095 0.6808 0.392 0.000 0.608
#> SRR2532348 2 0.0237 0.9731 0.000 0.996 0.004
#> SRR2532347 2 0.3116 0.9275 0.000 0.892 0.108
#> SRR2532346 2 0.0424 0.9720 0.000 0.992 0.008
#> SRR2532345 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532344 3 0.6079 0.6779 0.388 0.000 0.612
#> SRR2532343 3 0.6111 0.6776 0.396 0.000 0.604
#> SRR2532342 3 0.6126 0.6734 0.400 0.000 0.600
#> SRR2532341 3 0.8878 0.2921 0.384 0.124 0.492
#> SRR2532340 3 0.6111 0.6770 0.396 0.000 0.604
#> SRR2532339 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532337 2 0.2796 0.9353 0.000 0.908 0.092
#> SRR2532336 1 0.0000 0.7045 1.000 0.000 0.000
#> SRR2532335 3 0.6095 0.6808 0.392 0.000 0.608
#> SRR2532334 3 0.6095 0.6808 0.392 0.000 0.608
#> SRR2532333 2 0.0424 0.9720 0.000 0.992 0.008
#> SRR2532332 1 0.0424 0.7050 0.992 0.000 0.008
#> SRR2532331 2 0.0424 0.9720 0.000 0.992 0.008
#> SRR2532330 2 0.2959 0.9320 0.000 0.900 0.100
#> SRR2532329 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532328 1 0.8479 0.1262 0.580 0.120 0.300
#> SRR2532327 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532326 3 0.6215 0.6236 0.428 0.000 0.572
#> SRR2532324 2 0.0000 0.9741 0.000 1.000 0.000
#> SRR2532325 1 0.1964 0.6672 0.944 0.000 0.056
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.1867 0.7065 0.928 0.000 0.000 0.072
#> SRR2532322 1 0.0000 0.6995 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0707 0.8981 0.000 0.980 0.000 0.020
#> SRR2532320 2 0.1576 0.8940 0.000 0.948 0.004 0.048
#> SRR2532319 3 0.6382 0.7354 0.340 0.000 0.580 0.080
#> SRR2532317 2 0.0592 0.8973 0.000 0.984 0.016 0.000
#> SRR2532318 2 0.5337 0.7511 0.000 0.696 0.044 0.260
#> SRR2532315 4 0.6222 0.9597 0.056 0.000 0.412 0.532
#> SRR2532316 4 0.6222 0.9597 0.056 0.000 0.412 0.532
#> SRR2532396 2 0.0921 0.8979 0.000 0.972 0.000 0.028
#> SRR2532395 2 0.3942 0.8160 0.000 0.764 0.000 0.236
#> SRR2532394 2 0.3649 0.8349 0.000 0.796 0.000 0.204
#> SRR2532393 2 0.4059 0.8241 0.000 0.788 0.012 0.200
#> SRR2532392 2 0.0707 0.8981 0.000 0.980 0.000 0.020
#> SRR2532391 3 0.4925 0.8730 0.428 0.000 0.572 0.000
#> SRR2532390 2 0.1902 0.8886 0.000 0.932 0.004 0.064
#> SRR2532389 1 0.4999 -0.7706 0.508 0.000 0.492 0.000
#> SRR2532388 2 0.3649 0.8257 0.000 0.796 0.000 0.204
#> SRR2532387 2 0.3907 0.8179 0.000 0.768 0.000 0.232
#> SRR2532386 1 0.7732 -0.2442 0.432 0.000 0.324 0.244
#> SRR2532384 2 0.3873 0.8173 0.000 0.772 0.000 0.228
#> SRR2532385 2 0.6525 0.6502 0.000 0.612 0.116 0.272
#> SRR2532383 2 0.0524 0.8991 0.000 0.988 0.004 0.008
#> SRR2532381 3 0.6430 0.5986 0.428 0.000 0.504 0.068
#> SRR2532382 1 0.2053 0.7046 0.924 0.000 0.004 0.072
#> SRR2532379 4 0.6222 0.9597 0.056 0.000 0.412 0.532
#> SRR2532380 1 0.1867 0.7065 0.928 0.000 0.000 0.072
#> SRR2532378 1 0.3335 0.6639 0.856 0.000 0.016 0.128
#> SRR2532377 2 0.0921 0.8978 0.000 0.972 0.000 0.028
#> SRR2532376 2 0.5416 0.7471 0.000 0.692 0.048 0.260
#> SRR2532375 2 0.1902 0.8886 0.000 0.932 0.004 0.064
#> SRR2532374 3 0.4925 0.8730 0.428 0.000 0.572 0.000
#> SRR2532372 3 0.6532 0.8284 0.420 0.000 0.504 0.076
#> SRR2532373 2 0.2002 0.8934 0.000 0.936 0.020 0.044
#> SRR2532371 2 0.1824 0.8950 0.000 0.936 0.004 0.060
#> SRR2532370 1 0.0000 0.6995 1.000 0.000 0.000 0.000
#> SRR2532369 2 0.3764 0.8183 0.000 0.784 0.000 0.216
#> SRR2532368 2 0.2197 0.8887 0.000 0.916 0.004 0.080
#> SRR2532367 2 0.0707 0.8981 0.000 0.980 0.000 0.020
#> SRR2532366 1 0.0000 0.6995 1.000 0.000 0.000 0.000
#> SRR2532365 2 0.0921 0.8979 0.000 0.972 0.000 0.028
#> SRR2532364 1 0.0000 0.6995 1.000 0.000 0.000 0.000
#> SRR2532363 2 0.1302 0.8976 0.000 0.956 0.000 0.044
#> SRR2532362 2 0.2197 0.8876 0.000 0.916 0.004 0.080
#> SRR2532361 4 0.6482 0.9229 0.072 0.000 0.424 0.504
#> SRR2532360 4 0.6696 0.9298 0.088 0.000 0.428 0.484
#> SRR2532359 1 0.5493 -0.7201 0.528 0.000 0.456 0.016
#> SRR2532358 3 0.5007 0.8135 0.356 0.000 0.636 0.008
#> SRR2532357 2 0.1792 0.8893 0.000 0.932 0.000 0.068
#> SRR2532356 2 0.1902 0.8886 0.000 0.932 0.004 0.064
#> SRR2532355 3 0.4916 0.8732 0.424 0.000 0.576 0.000
#> SRR2532354 1 0.1867 0.7065 0.928 0.000 0.000 0.072
#> SRR2532353 3 0.5055 0.8300 0.368 0.000 0.624 0.008
#> SRR2532352 2 0.1389 0.8973 0.000 0.952 0.000 0.048
#> SRR2532350 3 0.4925 0.8730 0.428 0.000 0.572 0.000
#> SRR2532349 3 0.4925 0.8730 0.428 0.000 0.572 0.000
#> SRR2532348 2 0.0927 0.8962 0.000 0.976 0.016 0.008
#> SRR2532347 2 0.3764 0.8183 0.000 0.784 0.000 0.216
#> SRR2532346 2 0.1975 0.8844 0.000 0.936 0.016 0.048
#> SRR2532345 2 0.0000 0.8981 0.000 1.000 0.000 0.000
#> SRR2532344 3 0.6382 0.7354 0.340 0.000 0.580 0.080
#> SRR2532343 3 0.6482 0.8340 0.424 0.000 0.504 0.072
#> SRR2532342 3 0.5500 0.8209 0.464 0.000 0.520 0.016
#> SRR2532341 3 0.7187 0.7473 0.324 0.028 0.564 0.084
#> SRR2532340 3 0.4925 0.8730 0.428 0.000 0.572 0.000
#> SRR2532339 2 0.2197 0.8887 0.000 0.916 0.004 0.080
#> SRR2532338 2 0.1902 0.8886 0.000 0.932 0.004 0.064
#> SRR2532337 2 0.3907 0.8188 0.000 0.768 0.000 0.232
#> SRR2532336 1 0.2053 0.7046 0.924 0.000 0.004 0.072
#> SRR2532335 3 0.6477 0.8324 0.420 0.000 0.508 0.072
#> SRR2532334 3 0.4916 0.8732 0.424 0.000 0.576 0.000
#> SRR2532333 2 0.2593 0.8730 0.000 0.892 0.004 0.104
#> SRR2532332 1 0.0000 0.6995 1.000 0.000 0.000 0.000
#> SRR2532331 2 0.1489 0.8955 0.000 0.952 0.004 0.044
#> SRR2532330 2 0.3873 0.8173 0.000 0.772 0.000 0.228
#> SRR2532329 2 0.1059 0.8981 0.000 0.972 0.016 0.012
#> SRR2532328 1 0.9000 -0.0164 0.392 0.320 0.220 0.068
#> SRR2532327 2 0.1902 0.8886 0.000 0.932 0.004 0.064
#> SRR2532326 3 0.4804 0.8491 0.384 0.000 0.616 0.000
#> SRR2532324 2 0.1302 0.8961 0.000 0.956 0.000 0.044
#> SRR2532325 1 0.2149 0.5848 0.912 0.000 0.088 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0963 0.84159 0.964 0.000 0.036 0.000 0.000
#> SRR2532322 1 0.0794 0.86759 0.972 0.000 0.028 0.000 0.000
#> SRR2532321 2 0.1502 0.77737 0.000 0.940 0.004 0.000 0.056
#> SRR2532320 2 0.1701 0.78378 0.000 0.936 0.016 0.000 0.048
#> SRR2532319 3 0.3480 0.82469 0.248 0.000 0.752 0.000 0.000
#> SRR2532317 2 0.1638 0.77228 0.000 0.932 0.004 0.000 0.064
#> SRR2532318 5 0.4823 0.54591 0.000 0.316 0.040 0.000 0.644
#> SRR2532315 4 0.0000 0.94251 0.000 0.000 0.000 1.000 0.000
#> SRR2532316 4 0.0000 0.94251 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.1704 0.77458 0.000 0.928 0.004 0.000 0.068
#> SRR2532395 5 0.4307 0.21787 0.000 0.500 0.000 0.000 0.500
#> SRR2532394 2 0.2230 0.74430 0.000 0.884 0.000 0.000 0.116
#> SRR2532393 2 0.2471 0.71765 0.000 0.864 0.000 0.000 0.136
#> SRR2532392 2 0.1571 0.77611 0.000 0.936 0.004 0.000 0.060
#> SRR2532391 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532390 2 0.2110 0.77464 0.000 0.912 0.016 0.000 0.072
#> SRR2532389 3 0.3966 0.83791 0.336 0.000 0.664 0.000 0.000
#> SRR2532388 2 0.2179 0.74081 0.000 0.888 0.000 0.000 0.112
#> SRR2532387 2 0.4306 -0.36560 0.000 0.508 0.000 0.000 0.492
#> SRR2532386 3 0.6783 0.47107 0.328 0.000 0.384 0.288 0.000
#> SRR2532384 2 0.4307 -0.38839 0.000 0.504 0.000 0.000 0.496
#> SRR2532385 5 0.3410 0.37169 0.000 0.068 0.092 0.000 0.840
#> SRR2532383 2 0.0162 0.78968 0.000 0.996 0.000 0.000 0.004
#> SRR2532381 3 0.5878 0.74661 0.336 0.000 0.548 0.116 0.000
#> SRR2532382 1 0.0000 0.86537 1.000 0.000 0.000 0.000 0.000
#> SRR2532379 4 0.0000 0.94251 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0000 0.86537 1.000 0.000 0.000 0.000 0.000
#> SRR2532378 1 0.5014 0.22625 0.592 0.000 0.040 0.368 0.000
#> SRR2532377 2 0.1270 0.78171 0.000 0.948 0.000 0.000 0.052
#> SRR2532376 5 0.3649 0.50218 0.000 0.152 0.040 0.000 0.808
#> SRR2532375 2 0.2110 0.77464 0.000 0.912 0.016 0.000 0.072
#> SRR2532374 3 0.3586 0.84192 0.264 0.000 0.736 0.000 0.000
#> SRR2532372 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532373 2 0.2172 0.77591 0.000 0.908 0.016 0.000 0.076
#> SRR2532371 2 0.2017 0.78347 0.000 0.912 0.008 0.000 0.080
#> SRR2532370 1 0.0794 0.86759 0.972 0.000 0.028 0.000 0.000
#> SRR2532369 2 0.4297 -0.33218 0.000 0.528 0.000 0.000 0.472
#> SRR2532368 2 0.2110 0.78166 0.000 0.912 0.016 0.000 0.072
#> SRR2532367 2 0.1704 0.77466 0.000 0.928 0.004 0.000 0.068
#> SRR2532366 1 0.0794 0.86759 0.972 0.000 0.028 0.000 0.000
#> SRR2532365 2 0.1831 0.77135 0.000 0.920 0.004 0.000 0.076
#> SRR2532364 1 0.0794 0.86759 0.972 0.000 0.028 0.000 0.000
#> SRR2532363 2 0.1638 0.78289 0.000 0.932 0.004 0.000 0.064
#> SRR2532362 2 0.1357 0.78901 0.000 0.948 0.004 0.000 0.048
#> SRR2532361 4 0.1851 0.91008 0.000 0.000 0.088 0.912 0.000
#> SRR2532360 4 0.1792 0.91411 0.000 0.000 0.084 0.916 0.000
#> SRR2532359 1 0.4278 -0.43607 0.548 0.000 0.452 0.000 0.000
#> SRR2532358 3 0.5598 0.76527 0.276 0.000 0.612 0.112 0.000
#> SRR2532357 2 0.1205 0.78786 0.000 0.956 0.004 0.000 0.040
#> SRR2532356 2 0.2110 0.77749 0.000 0.912 0.016 0.000 0.072
#> SRR2532355 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532354 1 0.0000 0.86537 1.000 0.000 0.000 0.000 0.000
#> SRR2532353 3 0.4301 0.82324 0.260 0.000 0.712 0.028 0.000
#> SRR2532352 2 0.1502 0.77737 0.000 0.940 0.004 0.000 0.056
#> SRR2532350 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532349 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532348 2 0.3508 0.49264 0.000 0.748 0.000 0.000 0.252
#> SRR2532347 2 0.4300 -0.33708 0.000 0.524 0.000 0.000 0.476
#> SRR2532346 2 0.4278 -0.03717 0.000 0.548 0.000 0.000 0.452
#> SRR2532345 2 0.0771 0.78685 0.000 0.976 0.004 0.000 0.020
#> SRR2532344 3 0.3480 0.82469 0.248 0.000 0.752 0.000 0.000
#> SRR2532343 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532342 3 0.3913 0.84898 0.324 0.000 0.676 0.000 0.000
#> SRR2532341 3 0.6629 0.55389 0.184 0.028 0.608 0.012 0.168
#> SRR2532340 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532339 2 0.2110 0.78166 0.000 0.912 0.016 0.000 0.072
#> SRR2532338 2 0.2046 0.77567 0.000 0.916 0.016 0.000 0.068
#> SRR2532337 2 0.3534 0.49553 0.000 0.744 0.000 0.000 0.256
#> SRR2532336 1 0.0290 0.86423 0.992 0.000 0.008 0.000 0.000
#> SRR2532335 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532334 3 0.3837 0.86012 0.308 0.000 0.692 0.000 0.000
#> SRR2532333 2 0.4219 -0.00362 0.000 0.584 0.000 0.000 0.416
#> SRR2532332 1 0.0794 0.86759 0.972 0.000 0.028 0.000 0.000
#> SRR2532331 2 0.1469 0.78425 0.000 0.948 0.016 0.000 0.036
#> SRR2532330 5 0.4306 0.24136 0.000 0.492 0.000 0.000 0.508
#> SRR2532329 2 0.1282 0.78022 0.000 0.952 0.004 0.000 0.044
#> SRR2532328 3 0.8813 -0.16811 0.152 0.176 0.356 0.028 0.288
#> SRR2532327 2 0.2110 0.77464 0.000 0.912 0.016 0.000 0.072
#> SRR2532326 3 0.4326 0.82638 0.264 0.000 0.708 0.028 0.000
#> SRR2532324 2 0.1638 0.78444 0.000 0.932 0.004 0.000 0.064
#> SRR2532325 1 0.2127 0.76169 0.892 0.000 0.108 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.4304 0.5566 0.740 0.000 0.128 0.000 0.004 0.128
#> SRR2532322 1 0.3309 0.8096 0.720 0.000 0.280 0.000 0.000 0.000
#> SRR2532321 2 0.4193 0.6382 0.036 0.776 0.000 0.000 0.124 0.064
#> SRR2532320 2 0.2994 0.6907 0.000 0.788 0.000 0.000 0.004 0.208
#> SRR2532319 3 0.1340 0.7999 0.040 0.000 0.948 0.000 0.008 0.004
#> SRR2532317 2 0.2895 0.6798 0.016 0.868 0.000 0.000 0.052 0.064
#> SRR2532318 5 0.5759 0.4136 0.008 0.148 0.000 0.000 0.508 0.336
#> SRR2532315 4 0.0000 0.8181 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532316 4 0.0000 0.8181 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532396 2 0.3735 0.6296 0.012 0.780 0.000 0.000 0.172 0.036
#> SRR2532395 5 0.3329 0.6557 0.020 0.184 0.000 0.000 0.792 0.004
#> SRR2532394 2 0.3965 0.4090 0.000 0.604 0.000 0.000 0.388 0.008
#> SRR2532393 2 0.4094 0.5037 0.004 0.700 0.000 0.000 0.264 0.032
#> SRR2532392 2 0.4355 0.6217 0.032 0.756 0.000 0.000 0.148 0.064
#> SRR2532391 3 0.0363 0.8300 0.012 0.000 0.988 0.000 0.000 0.000
#> SRR2532390 2 0.3244 0.6637 0.000 0.732 0.000 0.000 0.000 0.268
#> SRR2532389 3 0.1910 0.7318 0.108 0.000 0.892 0.000 0.000 0.000
#> SRR2532388 2 0.3997 0.4630 0.004 0.688 0.000 0.000 0.288 0.020
#> SRR2532387 5 0.3081 0.6541 0.000 0.220 0.000 0.000 0.776 0.004
#> SRR2532386 3 0.5461 0.1131 0.164 0.000 0.584 0.248 0.000 0.004
#> SRR2532384 5 0.3403 0.6649 0.020 0.212 0.000 0.000 0.768 0.000
#> SRR2532385 5 0.5651 0.2371 0.008 0.036 0.048 0.000 0.516 0.392
#> SRR2532383 2 0.1267 0.7214 0.000 0.940 0.000 0.000 0.000 0.060
#> SRR2532381 3 0.2772 0.7211 0.092 0.000 0.864 0.040 0.000 0.004
#> SRR2532382 1 0.5386 0.8017 0.572 0.000 0.296 0.000 0.004 0.128
#> SRR2532379 4 0.0000 0.8181 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR2532380 1 0.5352 0.8032 0.576 0.000 0.296 0.000 0.004 0.124
#> SRR2532378 1 0.7241 -0.0786 0.392 0.000 0.172 0.324 0.004 0.108
#> SRR2532377 2 0.3490 0.6269 0.000 0.784 0.000 0.000 0.176 0.040
#> SRR2532376 5 0.5006 0.3272 0.008 0.056 0.000 0.000 0.548 0.388
#> SRR2532375 2 0.3244 0.6637 0.000 0.732 0.000 0.000 0.000 0.268
#> SRR2532374 3 0.1444 0.7818 0.072 0.000 0.928 0.000 0.000 0.000
#> SRR2532372 3 0.0146 0.8321 0.004 0.000 0.996 0.000 0.000 0.000
#> SRR2532373 2 0.3052 0.6884 0.000 0.780 0.000 0.000 0.004 0.216
#> SRR2532371 2 0.3655 0.7073 0.004 0.800 0.000 0.000 0.088 0.108
#> SRR2532370 1 0.3351 0.8102 0.712 0.000 0.288 0.000 0.000 0.000
#> SRR2532369 5 0.3348 0.6588 0.000 0.216 0.000 0.000 0.768 0.016
#> SRR2532368 2 0.4054 0.6936 0.000 0.740 0.000 0.000 0.072 0.188
#> SRR2532367 2 0.4281 0.6285 0.032 0.764 0.000 0.000 0.140 0.064
#> SRR2532366 1 0.3309 0.8096 0.720 0.000 0.280 0.000 0.000 0.000
#> SRR2532365 2 0.4757 0.5584 0.028 0.700 0.000 0.000 0.208 0.064
#> SRR2532364 1 0.3309 0.8096 0.720 0.000 0.280 0.000 0.000 0.000
#> SRR2532363 2 0.3445 0.6858 0.036 0.836 0.000 0.000 0.080 0.048
#> SRR2532362 2 0.2581 0.7173 0.000 0.856 0.000 0.000 0.016 0.128
#> SRR2532361 4 0.3956 0.6246 0.088 0.000 0.152 0.760 0.000 0.000
#> SRR2532360 4 0.3806 0.6569 0.088 0.000 0.136 0.776 0.000 0.000
#> SRR2532359 3 0.2597 0.6353 0.176 0.000 0.824 0.000 0.000 0.000
#> SRR2532358 3 0.4928 0.2538 0.148 0.000 0.668 0.180 0.000 0.004
#> SRR2532357 2 0.2219 0.7067 0.000 0.864 0.000 0.000 0.000 0.136
#> SRR2532356 2 0.3360 0.6647 0.000 0.732 0.000 0.000 0.004 0.264
#> SRR2532355 3 0.0000 0.8311 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR2532354 1 0.5352 0.8032 0.576 0.000 0.296 0.000 0.004 0.124
#> SRR2532353 3 0.2838 0.6000 0.188 0.000 0.808 0.000 0.000 0.004
#> SRR2532352 2 0.3977 0.6535 0.036 0.796 0.000 0.000 0.104 0.064
#> SRR2532350 3 0.0291 0.8311 0.004 0.000 0.992 0.000 0.000 0.004
#> SRR2532349 3 0.0508 0.8304 0.012 0.000 0.984 0.000 0.000 0.004
#> SRR2532348 2 0.4892 0.3685 0.000 0.660 0.000 0.000 0.176 0.164
#> SRR2532347 5 0.2871 0.6666 0.004 0.192 0.000 0.000 0.804 0.000
#> SRR2532346 2 0.6015 -0.2887 0.000 0.388 0.000 0.000 0.240 0.372
#> SRR2532345 2 0.1723 0.7002 0.000 0.928 0.000 0.000 0.036 0.036
#> SRR2532344 3 0.1340 0.7999 0.040 0.000 0.948 0.000 0.008 0.004
#> SRR2532343 3 0.0146 0.8321 0.004 0.000 0.996 0.000 0.000 0.000
#> SRR2532342 3 0.0632 0.8189 0.024 0.000 0.976 0.000 0.000 0.000
#> SRR2532341 3 0.5748 -0.0921 0.176 0.016 0.608 0.008 0.000 0.192
#> SRR2532340 3 0.0146 0.8318 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR2532339 2 0.4585 0.6918 0.024 0.724 0.000 0.000 0.072 0.180
#> SRR2532338 2 0.3244 0.6637 0.000 0.732 0.000 0.000 0.000 0.268
#> SRR2532337 2 0.3955 0.2980 0.000 0.560 0.000 0.000 0.436 0.004
#> SRR2532336 1 0.5386 0.8017 0.572 0.000 0.296 0.000 0.004 0.128
#> SRR2532335 3 0.0146 0.8321 0.004 0.000 0.996 0.000 0.000 0.000
#> SRR2532334 3 0.0146 0.8321 0.004 0.000 0.996 0.000 0.000 0.000
#> SRR2532333 5 0.6100 0.2695 0.000 0.352 0.000 0.000 0.364 0.284
#> SRR2532332 1 0.3330 0.8096 0.716 0.000 0.284 0.000 0.000 0.000
#> SRR2532331 2 0.2631 0.6982 0.000 0.820 0.000 0.000 0.000 0.180
#> SRR2532330 5 0.2945 0.6545 0.020 0.156 0.000 0.000 0.824 0.000
#> SRR2532329 2 0.1049 0.7065 0.000 0.960 0.000 0.000 0.008 0.032
#> SRR2532328 6 0.8588 0.0000 0.180 0.052 0.292 0.052 0.076 0.348
#> SRR2532327 2 0.3244 0.6637 0.000 0.732 0.000 0.000 0.000 0.268
#> SRR2532326 3 0.2378 0.6842 0.152 0.000 0.848 0.000 0.000 0.000
#> SRR2532324 2 0.2146 0.6981 0.000 0.880 0.000 0.000 0.004 0.116
#> SRR2532325 1 0.3854 0.5460 0.536 0.000 0.464 0.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16752 rows and 81 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.978 0.991 0.505 0.494 0.494
#> 3 3 0.849 0.807 0.888 0.188 0.872 0.747
#> 4 4 0.692 0.703 0.849 0.158 0.856 0.662
#> 5 5 0.678 0.647 0.817 0.119 0.812 0.469
#> 6 6 0.690 0.654 0.803 0.035 0.880 0.524
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
#> SRR2532323 1 0.000 0.981 1.000 0.000
#> SRR2532322 1 0.000 0.981 1.000 0.000
#> SRR2532321 2 0.000 1.000 0.000 1.000
#> SRR2532320 2 0.000 1.000 0.000 1.000
#> SRR2532319 1 0.000 0.981 1.000 0.000
#> SRR2532317 2 0.000 1.000 0.000 1.000
#> SRR2532318 2 0.000 1.000 0.000 1.000
#> SRR2532315 1 0.000 0.981 1.000 0.000
#> SRR2532316 1 0.000 0.981 1.000 0.000
#> SRR2532396 2 0.000 1.000 0.000 1.000
#> SRR2532395 2 0.000 1.000 0.000 1.000
#> SRR2532394 2 0.000 1.000 0.000 1.000
#> SRR2532393 2 0.000 1.000 0.000 1.000
#> SRR2532392 2 0.000 1.000 0.000 1.000
#> SRR2532391 1 0.000 0.981 1.000 0.000
#> SRR2532390 2 0.000 1.000 0.000 1.000
#> SRR2532389 1 0.000 0.981 1.000 0.000
#> SRR2532388 2 0.000 1.000 0.000 1.000
#> SRR2532387 2 0.000 1.000 0.000 1.000
#> SRR2532386 1 0.000 0.981 1.000 0.000
#> SRR2532384 2 0.000 1.000 0.000 1.000
#> SRR2532385 2 0.000 1.000 0.000 1.000
#> SRR2532383 2 0.000 1.000 0.000 1.000
#> SRR2532381 1 0.000 0.981 1.000 0.000
#> SRR2532382 1 0.000 0.981 1.000 0.000
#> SRR2532379 1 0.000 0.981 1.000 0.000
#> SRR2532380 1 0.000 0.981 1.000 0.000
#> SRR2532378 1 0.000 0.981 1.000 0.000
#> SRR2532377 2 0.000 1.000 0.000 1.000
#> SRR2532376 2 0.000 1.000 0.000 1.000
#> SRR2532375 2 0.000 1.000 0.000 1.000
#> SRR2532374 1 0.000 0.981 1.000 0.000
#> SRR2532372 1 0.000 0.981 1.000 0.000
#> SRR2532373 2 0.000 1.000 0.000 1.000
#> SRR2532371 2 0.000 1.000 0.000 1.000
#> SRR2532370 1 0.000 0.981 1.000 0.000
#> SRR2532369 2 0.000 1.000 0.000 1.000
#> SRR2532368 2 0.000 1.000 0.000 1.000
#> SRR2532367 2 0.000 1.000 0.000 1.000
#> SRR2532366 1 0.000 0.981 1.000 0.000
#> SRR2532365 2 0.000 1.000 0.000 1.000
#> SRR2532364 1 0.000 0.981 1.000 0.000
#> SRR2532363 2 0.000 1.000 0.000 1.000
#> SRR2532362 2 0.000 1.000 0.000 1.000
#> SRR2532361 1 0.000 0.981 1.000 0.000
#> SRR2532360 1 0.000 0.981 1.000 0.000
#> SRR2532359 1 0.000 0.981 1.000 0.000
#> SRR2532358 1 0.000 0.981 1.000 0.000
#> SRR2532357 2 0.000 1.000 0.000 1.000
#> SRR2532356 2 0.000 1.000 0.000 1.000
#> SRR2532355 1 0.000 0.981 1.000 0.000
#> SRR2532354 1 0.000 0.981 1.000 0.000
#> SRR2532353 1 0.000 0.981 1.000 0.000
#> SRR2532352 2 0.000 1.000 0.000 1.000
#> SRR2532350 1 0.000 0.981 1.000 0.000
#> SRR2532349 1 0.000 0.981 1.000 0.000
#> SRR2532348 2 0.000 1.000 0.000 1.000
#> SRR2532347 2 0.000 1.000 0.000 1.000
#> SRR2532346 2 0.000 1.000 0.000 1.000
#> SRR2532345 2 0.000 1.000 0.000 1.000
#> SRR2532344 1 0.000 0.981 1.000 0.000
#> SRR2532343 1 0.000 0.981 1.000 0.000
#> SRR2532342 1 0.000 0.981 1.000 0.000
#> SRR2532341 1 0.871 0.593 0.708 0.292
#> SRR2532340 1 0.000 0.981 1.000 0.000
#> SRR2532339 2 0.000 1.000 0.000 1.000
#> SRR2532338 2 0.000 1.000 0.000 1.000
#> SRR2532337 2 0.000 1.000 0.000 1.000
#> SRR2532336 1 0.000 0.981 1.000 0.000
#> SRR2532335 1 0.000 0.981 1.000 0.000
#> SRR2532334 1 0.000 0.981 1.000 0.000
#> SRR2532333 2 0.000 1.000 0.000 1.000
#> SRR2532332 1 0.000 0.981 1.000 0.000
#> SRR2532331 2 0.000 1.000 0.000 1.000
#> SRR2532330 2 0.000 1.000 0.000 1.000
#> SRR2532329 2 0.000 1.000 0.000 1.000
#> SRR2532328 1 0.980 0.303 0.584 0.416
#> SRR2532327 2 0.000 1.000 0.000 1.000
#> SRR2532326 1 0.000 0.981 1.000 0.000
#> SRR2532324 2 0.000 1.000 0.000 1.000
#> SRR2532325 1 0.000 0.981 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR2532323 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532322 1 0.2878 0.6535 0.904 0.000 0.096
#> SRR2532321 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532320 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532319 1 0.4840 0.4464 0.816 0.016 0.168
#> SRR2532317 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532318 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532315 3 0.0424 0.8285 0.008 0.000 0.992
#> SRR2532316 3 0.0424 0.8285 0.008 0.000 0.992
#> SRR2532396 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532395 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532394 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532393 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532392 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532391 1 0.4702 0.7009 0.788 0.000 0.212
#> SRR2532390 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532389 1 0.0424 0.6032 0.992 0.000 0.008
#> SRR2532388 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532387 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532386 3 0.0424 0.8285 0.008 0.000 0.992
#> SRR2532384 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532385 2 0.6286 0.1650 0.000 0.536 0.464
#> SRR2532383 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532381 3 0.0592 0.8252 0.012 0.000 0.988
#> SRR2532382 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532379 3 0.0237 0.8283 0.004 0.000 0.996
#> SRR2532380 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532378 3 0.4842 0.4159 0.224 0.000 0.776
#> SRR2532377 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532376 2 0.0237 0.9752 0.000 0.996 0.004
#> SRR2532375 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532374 1 0.1031 0.6137 0.976 0.000 0.024
#> SRR2532372 3 0.6267 -0.2992 0.452 0.000 0.548
#> SRR2532373 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532371 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532370 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532369 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532368 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532367 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532366 1 0.6079 0.7116 0.612 0.000 0.388
#> SRR2532365 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532364 1 0.4452 0.6973 0.808 0.000 0.192
#> SRR2532363 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532362 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532361 3 0.0000 0.8277 0.000 0.000 1.000
#> SRR2532360 3 0.0424 0.8285 0.008 0.000 0.992
#> SRR2532359 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532358 3 0.0000 0.8277 0.000 0.000 1.000
#> SRR2532357 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532356 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532355 1 0.6299 0.6299 0.524 0.000 0.476
#> SRR2532354 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532353 3 0.0000 0.8277 0.000 0.000 1.000
#> SRR2532352 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532350 1 0.5968 0.7157 0.636 0.000 0.364
#> SRR2532349 1 0.6215 0.6909 0.572 0.000 0.428
#> SRR2532348 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532347 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532346 2 0.0237 0.9752 0.000 0.996 0.004
#> SRR2532345 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532344 1 0.5220 0.3916 0.780 0.012 0.208
#> SRR2532343 3 0.1964 0.7592 0.056 0.000 0.944
#> SRR2532342 1 0.6295 0.6277 0.528 0.000 0.472
#> SRR2532341 3 0.6308 -0.0333 0.000 0.492 0.508
#> SRR2532340 1 0.4796 0.7053 0.780 0.000 0.220
#> SRR2532339 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532338 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532337 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532336 1 0.6168 0.7030 0.588 0.000 0.412
#> SRR2532335 1 0.0592 0.5928 0.988 0.000 0.012
#> SRR2532334 1 0.6291 0.6171 0.532 0.000 0.468
#> SRR2532333 2 0.0237 0.9752 0.000 0.996 0.004
#> SRR2532332 1 0.5465 0.7159 0.712 0.000 0.288
#> SRR2532331 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532330 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532329 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532328 2 0.6934 0.3529 0.028 0.624 0.348
#> SRR2532327 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532326 3 0.0000 0.8277 0.000 0.000 1.000
#> SRR2532324 2 0.0000 0.9787 0.000 1.000 0.000
#> SRR2532325 1 0.0000 0.5970 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR2532323 1 0.1389 0.8648 0.952 0.000 0.048 0.000
#> SRR2532322 1 0.0000 0.8625 1.000 0.000 0.000 0.000
#> SRR2532321 2 0.0817 0.8621 0.000 0.976 0.000 0.024
#> SRR2532320 2 0.2281 0.8221 0.000 0.904 0.000 0.096
#> SRR2532319 4 0.4608 0.4406 0.104 0.000 0.096 0.800
#> SRR2532317 2 0.1109 0.8593 0.000 0.968 0.004 0.028
#> SRR2532318 4 0.5712 0.2590 0.000 0.384 0.032 0.584
#> SRR2532315 3 0.1792 0.7705 0.068 0.000 0.932 0.000
#> SRR2532316 3 0.1302 0.7784 0.044 0.000 0.956 0.000
#> SRR2532396 2 0.0336 0.8653 0.000 0.992 0.000 0.008
#> SRR2532395 2 0.1940 0.8524 0.000 0.924 0.000 0.076
#> SRR2532394 2 0.1474 0.8616 0.000 0.948 0.000 0.052
#> SRR2532393 2 0.2921 0.8164 0.000 0.860 0.000 0.140
#> SRR2532392 2 0.0817 0.8621 0.000 0.976 0.000 0.024
#> SRR2532391 4 0.6170 0.1505 0.332 0.000 0.068 0.600
#> SRR2532390 2 0.4500 0.4801 0.000 0.684 0.000 0.316
#> SRR2532389 1 0.1867 0.8305 0.928 0.000 0.000 0.072
#> SRR2532388 2 0.2216 0.8434 0.000 0.908 0.000 0.092
#> SRR2532387 2 0.1302 0.8636 0.000 0.956 0.000 0.044
#> SRR2532386 3 0.2011 0.7655 0.080 0.000 0.920 0.000
#> SRR2532384 2 0.1940 0.8524 0.000 0.924 0.000 0.076
#> SRR2532385 3 0.4617 0.6627 0.000 0.032 0.764 0.204
#> SRR2532383 2 0.1022 0.8659 0.000 0.968 0.000 0.032
#> SRR2532381 3 0.1792 0.7730 0.068 0.000 0.932 0.000
#> SRR2532382 1 0.1302 0.8671 0.956 0.000 0.044 0.000
#> SRR2532379 3 0.1022 0.7789 0.032 0.000 0.968 0.000
#> SRR2532380 1 0.1211 0.8690 0.960 0.000 0.040 0.000
#> SRR2532378 1 0.3528 0.7206 0.808 0.000 0.192 0.000
#> SRR2532377 2 0.1474 0.8616 0.000 0.948 0.000 0.052
#> SRR2532376 2 0.6253 0.1726 0.000 0.544 0.060 0.396
#> SRR2532375 2 0.4134 0.6076 0.000 0.740 0.000 0.260
#> SRR2532374 1 0.5548 0.5298 0.628 0.032 0.000 0.340
#> SRR2532372 3 0.6862 0.3032 0.104 0.000 0.488 0.408
#> SRR2532373 2 0.0895 0.8637 0.004 0.976 0.000 0.020
#> SRR2532371 2 0.0469 0.8669 0.000 0.988 0.000 0.012
#> SRR2532370 1 0.0921 0.8693 0.972 0.000 0.028 0.000
#> SRR2532369 2 0.1940 0.8524 0.000 0.924 0.000 0.076
#> SRR2532368 2 0.0188 0.8658 0.000 0.996 0.000 0.004
#> SRR2532367 2 0.0921 0.8604 0.000 0.972 0.000 0.028
#> SRR2532366 1 0.0921 0.8693 0.972 0.000 0.028 0.000
#> SRR2532365 2 0.0817 0.8667 0.000 0.976 0.000 0.024
#> SRR2532364 1 0.0188 0.8642 0.996 0.000 0.004 0.000
#> SRR2532363 2 0.0921 0.8604 0.000 0.972 0.000 0.028
#> SRR2532362 2 0.0336 0.8653 0.000 0.992 0.000 0.008
#> SRR2532361 3 0.0921 0.7785 0.028 0.000 0.972 0.000
#> SRR2532360 3 0.1302 0.7797 0.044 0.000 0.956 0.000
#> SRR2532359 1 0.1118 0.8695 0.964 0.000 0.036 0.000
#> SRR2532358 3 0.1302 0.7807 0.044 0.000 0.956 0.000
#> SRR2532357 2 0.2530 0.8183 0.004 0.896 0.000 0.100
#> SRR2532356 2 0.5263 0.0810 0.008 0.544 0.000 0.448
#> SRR2532355 3 0.6400 0.6131 0.168 0.000 0.652 0.180
#> SRR2532354 1 0.1211 0.8690 0.960 0.000 0.040 0.000
#> SRR2532353 3 0.2255 0.7644 0.012 0.000 0.920 0.068
#> SRR2532352 2 0.0817 0.8621 0.000 0.976 0.000 0.024
#> SRR2532350 1 0.5970 0.5441 0.668 0.000 0.088 0.244
#> SRR2532349 3 0.6926 0.2045 0.432 0.000 0.460 0.108
#> SRR2532348 2 0.2469 0.8305 0.000 0.892 0.000 0.108
#> SRR2532347 2 0.1940 0.8524 0.000 0.924 0.000 0.076
#> SRR2532346 4 0.5781 0.2452 0.000 0.380 0.036 0.584
#> SRR2532345 2 0.0817 0.8680 0.000 0.976 0.000 0.024
#> SRR2532344 4 0.5766 0.3303 0.104 0.000 0.192 0.704
#> SRR2532343 3 0.4894 0.7085 0.100 0.000 0.780 0.120
#> SRR2532342 3 0.4980 0.6055 0.304 0.000 0.680 0.016
#> SRR2532341 3 0.4533 0.6925 0.012 0.008 0.764 0.216
#> SRR2532340 1 0.3616 0.7907 0.852 0.000 0.036 0.112
#> SRR2532339 2 0.0336 0.8653 0.000 0.992 0.000 0.008
#> SRR2532338 2 0.3400 0.7216 0.000 0.820 0.000 0.180
#> SRR2532337 2 0.1716 0.8576 0.000 0.936 0.000 0.064
#> SRR2532336 1 0.1211 0.8690 0.960 0.000 0.040 0.000
#> SRR2532335 4 0.3464 0.4631 0.108 0.000 0.032 0.860
#> SRR2532334 3 0.7307 0.2843 0.156 0.000 0.468 0.376
#> SRR2532333 2 0.3591 0.7473 0.000 0.824 0.008 0.168
#> SRR2532332 1 0.0592 0.8676 0.984 0.000 0.016 0.000
#> SRR2532331 2 0.4356 0.5563 0.000 0.708 0.000 0.292
#> SRR2532330 2 0.1940 0.8524 0.000 0.924 0.000 0.076
#> SRR2532329 2 0.2831 0.8013 0.004 0.876 0.000 0.120
#> SRR2532328 1 0.7467 -0.0413 0.456 0.436 0.052 0.056
#> SRR2532327 2 0.4624 0.4342 0.000 0.660 0.000 0.340
#> SRR2532326 3 0.2813 0.7592 0.024 0.000 0.896 0.080
#> SRR2532324 4 0.5493 0.0922 0.016 0.456 0.000 0.528
#> SRR2532325 1 0.2469 0.8105 0.892 0.000 0.000 0.108
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR2532323 1 0.0404 0.883 0.988 0.000 0.000 0.012 0.000
#> SRR2532322 1 0.0162 0.879 0.996 0.000 0.004 0.000 0.000
#> SRR2532321 2 0.4273 0.489 0.000 0.552 0.000 0.000 0.448
#> SRR2532320 5 0.4452 -0.394 0.000 0.496 0.004 0.000 0.500
#> SRR2532319 3 0.0727 0.711 0.004 0.004 0.980 0.012 0.000
#> SRR2532317 2 0.4585 0.404 0.000 0.592 0.008 0.004 0.396
#> SRR2532318 3 0.4165 0.583 0.000 0.008 0.672 0.000 0.320
#> SRR2532315 4 0.0290 0.896 0.008 0.000 0.000 0.992 0.000
#> SRR2532316 4 0.0000 0.898 0.000 0.000 0.000 1.000 0.000
#> SRR2532396 2 0.4300 0.428 0.000 0.524 0.000 0.000 0.476
#> SRR2532395 5 0.0404 0.780 0.000 0.012 0.000 0.000 0.988
#> SRR2532394 5 0.2230 0.730 0.000 0.116 0.000 0.000 0.884
#> SRR2532393 5 0.1764 0.743 0.000 0.008 0.064 0.000 0.928
#> SRR2532392 5 0.4268 -0.193 0.000 0.444 0.000 0.000 0.556
#> SRR2532391 3 0.5198 0.565 0.192 0.092 0.704 0.012 0.000
#> SRR2532390 2 0.5843 0.611 0.000 0.572 0.124 0.000 0.304
#> SRR2532389 1 0.1300 0.862 0.956 0.028 0.016 0.000 0.000
#> SRR2532388 5 0.0566 0.777 0.000 0.004 0.012 0.000 0.984
#> SRR2532387 5 0.1908 0.750 0.000 0.092 0.000 0.000 0.908
#> SRR2532386 4 0.0566 0.892 0.012 0.004 0.000 0.984 0.000
#> SRR2532384 5 0.0162 0.778 0.000 0.000 0.004 0.000 0.996
#> SRR2532385 3 0.5868 0.499 0.000 0.000 0.516 0.104 0.380
#> SRR2532383 5 0.2605 0.692 0.000 0.148 0.000 0.000 0.852
#> SRR2532381 4 0.0404 0.895 0.012 0.000 0.000 0.988 0.000
#> SRR2532382 1 0.0404 0.883 0.988 0.000 0.000 0.012 0.000
#> SRR2532379 4 0.0000 0.898 0.000 0.000 0.000 1.000 0.000
#> SRR2532380 1 0.0404 0.883 0.988 0.000 0.000 0.012 0.000
#> SRR2532378 1 0.4249 0.208 0.568 0.000 0.000 0.432 0.000
#> SRR2532377 5 0.1341 0.770 0.000 0.056 0.000 0.000 0.944
#> SRR2532376 3 0.4354 0.529 0.000 0.008 0.624 0.000 0.368
#> SRR2532375 5 0.6173 -0.238 0.000 0.396 0.136 0.000 0.468
#> SRR2532374 2 0.4986 0.258 0.228 0.688 0.084 0.000 0.000
#> SRR2532372 3 0.2289 0.705 0.004 0.000 0.904 0.080 0.012
#> SRR2532373 2 0.4114 0.613 0.000 0.624 0.000 0.000 0.376
#> SRR2532371 5 0.3707 0.402 0.000 0.284 0.000 0.000 0.716
#> SRR2532370 1 0.0404 0.883 0.988 0.000 0.000 0.012 0.000
#> SRR2532369 5 0.0162 0.779 0.000 0.004 0.000 0.000 0.996
#> SRR2532368 2 0.4304 0.407 0.000 0.516 0.000 0.000 0.484
#> SRR2532367 2 0.3461 0.690 0.000 0.772 0.004 0.000 0.224
#> SRR2532366 1 0.0451 0.882 0.988 0.000 0.004 0.008 0.000
#> SRR2532365 5 0.2561 0.697 0.000 0.144 0.000 0.000 0.856
#> SRR2532364 1 0.0324 0.881 0.992 0.000 0.004 0.004 0.000
#> SRR2532363 2 0.2852 0.709 0.000 0.828 0.000 0.000 0.172
#> SRR2532362 2 0.3983 0.660 0.000 0.660 0.000 0.000 0.340
#> SRR2532361 4 0.0000 0.898 0.000 0.000 0.000 1.000 0.000
#> SRR2532360 4 0.0162 0.898 0.004 0.000 0.000 0.996 0.000
#> SRR2532359 1 0.0566 0.883 0.984 0.000 0.004 0.012 0.000
#> SRR2532358 4 0.0324 0.897 0.004 0.000 0.004 0.992 0.000
#> SRR2532357 2 0.2377 0.699 0.000 0.872 0.000 0.000 0.128
#> SRR2532356 2 0.4468 0.663 0.004 0.768 0.124 0.000 0.104
#> SRR2532355 3 0.3620 0.683 0.068 0.000 0.824 0.108 0.000
#> SRR2532354 1 0.0404 0.883 0.988 0.000 0.000 0.012 0.000
#> SRR2532353 4 0.4095 0.683 0.016 0.008 0.228 0.748 0.000
#> SRR2532352 2 0.3796 0.690 0.000 0.700 0.000 0.000 0.300
#> SRR2532350 1 0.4696 0.198 0.556 0.000 0.428 0.016 0.000
#> SRR2532349 3 0.6433 0.280 0.356 0.004 0.480 0.160 0.000
#> SRR2532348 5 0.1197 0.749 0.000 0.000 0.048 0.000 0.952
#> SRR2532347 5 0.0898 0.774 0.000 0.008 0.020 0.000 0.972
#> SRR2532346 3 0.4276 0.656 0.000 0.028 0.716 0.000 0.256
#> SRR2532345 5 0.0963 0.780 0.000 0.036 0.000 0.000 0.964
#> SRR2532344 3 0.1739 0.716 0.004 0.000 0.940 0.032 0.024
#> SRR2532343 3 0.4425 0.113 0.004 0.000 0.544 0.452 0.000
#> SRR2532342 1 0.6807 -0.190 0.364 0.000 0.336 0.300 0.000
#> SRR2532341 4 0.5076 0.594 0.000 0.060 0.272 0.664 0.004
#> SRR2532340 1 0.1965 0.825 0.904 0.000 0.096 0.000 0.000
#> SRR2532339 2 0.4045 0.645 0.000 0.644 0.000 0.000 0.356
#> SRR2532338 2 0.4442 0.693 0.000 0.688 0.028 0.000 0.284
#> SRR2532337 5 0.1671 0.762 0.000 0.076 0.000 0.000 0.924
#> SRR2532336 1 0.0404 0.883 0.988 0.000 0.000 0.012 0.000
#> SRR2532335 3 0.1018 0.707 0.016 0.016 0.968 0.000 0.000
#> SRR2532334 3 0.3164 0.692 0.044 0.000 0.852 0.104 0.000
#> SRR2532333 5 0.2865 0.650 0.000 0.008 0.132 0.004 0.856
#> SRR2532332 1 0.0451 0.882 0.988 0.004 0.000 0.008 0.000
#> SRR2532331 5 0.4588 0.557 0.000 0.060 0.220 0.000 0.720
#> SRR2532330 5 0.0451 0.775 0.000 0.000 0.008 0.004 0.988
#> SRR2532329 2 0.2411 0.691 0.000 0.884 0.008 0.000 0.108
#> SRR2532328 2 0.2642 0.608 0.004 0.900 0.016 0.064 0.016
#> SRR2532327 2 0.4757 0.696 0.000 0.716 0.080 0.000 0.204
#> SRR2532326 4 0.4109 0.641 0.008 0.008 0.260 0.724 0.000
#> SRR2532324 2 0.1195 0.620 0.000 0.960 0.028 0.000 0.012
#> SRR2532325 1 0.1211 0.865 0.960 0.024 0.016 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR2532323 1 0.0146 0.924 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532322 1 0.0000 0.924 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532321 2 0.1745 0.822 0.000 0.920 0.000 0.000 0.068 0.012
#> SRR2532320 2 0.5241 0.586 0.000 0.660 0.028 0.000 0.204 0.108
#> SRR2532319 3 0.1251 0.632 0.000 0.008 0.956 0.000 0.012 0.024
#> SRR2532317 6 0.5697 0.338 0.000 0.284 0.000 0.000 0.200 0.516
#> SRR2532318 5 0.4825 0.469 0.000 0.036 0.332 0.000 0.612 0.020
#> SRR2532315 4 0.0146 0.910 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532316 4 0.0146 0.910 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532396 2 0.1910 0.808 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR2532395 5 0.2730 0.712 0.000 0.192 0.000 0.000 0.808 0.000
#> SRR2532394 2 0.3774 0.144 0.000 0.592 0.000 0.000 0.408 0.000
#> SRR2532393 5 0.4035 0.702 0.000 0.204 0.052 0.000 0.740 0.004
#> SRR2532392 2 0.3513 0.757 0.000 0.796 0.000 0.000 0.144 0.060
#> SRR2532391 3 0.4897 0.215 0.060 0.000 0.492 0.000 0.000 0.448
#> SRR2532390 2 0.2196 0.819 0.000 0.908 0.020 0.000 0.056 0.016
#> SRR2532389 1 0.1806 0.863 0.908 0.000 0.000 0.004 0.000 0.088
#> SRR2532388 5 0.2553 0.721 0.000 0.144 0.000 0.000 0.848 0.008
#> SRR2532387 5 0.3575 0.638 0.000 0.284 0.000 0.000 0.708 0.008
#> SRR2532386 4 0.0291 0.908 0.004 0.000 0.000 0.992 0.004 0.000
#> SRR2532384 5 0.2697 0.714 0.000 0.188 0.000 0.000 0.812 0.000
#> SRR2532385 5 0.3900 0.544 0.000 0.012 0.248 0.000 0.724 0.016
#> SRR2532383 5 0.3998 0.165 0.000 0.492 0.000 0.000 0.504 0.004
#> SRR2532381 4 0.0260 0.908 0.008 0.000 0.000 0.992 0.000 0.000
#> SRR2532382 1 0.0405 0.921 0.988 0.000 0.000 0.008 0.000 0.004
#> SRR2532379 4 0.0146 0.910 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532380 1 0.0146 0.924 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532378 1 0.3819 0.374 0.624 0.000 0.000 0.372 0.000 0.004
#> SRR2532377 5 0.3351 0.636 0.000 0.288 0.000 0.000 0.712 0.000
#> SRR2532376 5 0.4428 0.547 0.000 0.036 0.260 0.000 0.688 0.016
#> SRR2532375 5 0.7405 0.276 0.000 0.300 0.152 0.004 0.388 0.156
#> SRR2532374 6 0.3716 0.492 0.064 0.032 0.088 0.000 0.000 0.816
#> SRR2532372 3 0.1794 0.652 0.000 0.000 0.932 0.016 0.024 0.028
#> SRR2532373 2 0.3148 0.782 0.000 0.840 0.004 0.000 0.092 0.064
#> SRR2532371 2 0.3309 0.545 0.000 0.720 0.000 0.000 0.280 0.000
#> SRR2532370 1 0.0000 0.924 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532369 5 0.3187 0.715 0.000 0.188 0.012 0.000 0.796 0.004
#> SRR2532368 2 0.1908 0.814 0.000 0.900 0.000 0.000 0.096 0.004
#> SRR2532367 2 0.3974 0.613 0.000 0.728 0.000 0.000 0.048 0.224
#> SRR2532366 1 0.0000 0.924 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532365 5 0.3765 0.428 0.000 0.404 0.000 0.000 0.596 0.000
#> SRR2532364 1 0.0146 0.923 0.996 0.000 0.004 0.000 0.000 0.000
#> SRR2532363 2 0.2066 0.793 0.000 0.904 0.000 0.000 0.024 0.072
#> SRR2532362 2 0.1477 0.825 0.000 0.940 0.004 0.000 0.048 0.008
#> SRR2532361 4 0.0405 0.906 0.004 0.000 0.000 0.988 0.000 0.008
#> SRR2532360 4 0.0146 0.910 0.004 0.000 0.000 0.996 0.000 0.000
#> SRR2532359 1 0.0692 0.913 0.976 0.000 0.004 0.020 0.000 0.000
#> SRR2532358 4 0.0972 0.881 0.000 0.000 0.028 0.964 0.000 0.008
#> SRR2532357 2 0.1856 0.766 0.000 0.920 0.000 0.000 0.032 0.048
#> SRR2532356 2 0.3787 0.638 0.000 0.808 0.028 0.000 0.100 0.064
#> SRR2532355 3 0.3420 0.655 0.108 0.004 0.824 0.060 0.000 0.004
#> SRR2532354 1 0.0146 0.924 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532353 3 0.6163 0.269 0.016 0.000 0.408 0.400 0.000 0.176
#> SRR2532352 2 0.1434 0.823 0.000 0.940 0.000 0.000 0.048 0.012
#> SRR2532350 3 0.4212 0.375 0.392 0.000 0.592 0.008 0.000 0.008
#> SRR2532349 3 0.5792 0.492 0.232 0.000 0.576 0.020 0.000 0.172
#> SRR2532348 5 0.3386 0.632 0.000 0.032 0.124 0.000 0.824 0.020
#> SRR2532347 5 0.3103 0.709 0.000 0.208 0.008 0.000 0.784 0.000
#> SRR2532346 5 0.4253 0.486 0.000 0.008 0.304 0.000 0.664 0.024
#> SRR2532345 5 0.2553 0.722 0.000 0.144 0.000 0.000 0.848 0.008
#> SRR2532344 3 0.1003 0.646 0.000 0.000 0.964 0.004 0.028 0.004
#> SRR2532343 3 0.3874 0.466 0.000 0.000 0.636 0.356 0.000 0.008
#> SRR2532342 4 0.5832 -0.205 0.188 0.000 0.384 0.428 0.000 0.000
#> SRR2532341 6 0.5234 0.111 0.000 0.000 0.260 0.144 0.000 0.596
#> SRR2532340 1 0.3601 0.431 0.684 0.000 0.312 0.000 0.000 0.004
#> SRR2532339 2 0.1364 0.825 0.000 0.944 0.004 0.000 0.048 0.004
#> SRR2532338 2 0.1666 0.820 0.000 0.936 0.020 0.000 0.036 0.008
#> SRR2532337 5 0.3857 0.283 0.000 0.468 0.000 0.000 0.532 0.000
#> SRR2532336 1 0.0146 0.924 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR2532335 3 0.2202 0.642 0.008 0.012 0.904 0.004 0.000 0.072
#> SRR2532334 3 0.2476 0.665 0.060 0.004 0.892 0.040 0.000 0.004
#> SRR2532333 5 0.5035 0.410 0.000 0.012 0.228 0.000 0.656 0.104
#> SRR2532332 1 0.0000 0.924 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR2532331 5 0.6214 0.545 0.000 0.224 0.204 0.000 0.536 0.036
#> SRR2532330 5 0.2595 0.721 0.000 0.160 0.000 0.000 0.836 0.004
#> SRR2532329 2 0.3621 0.609 0.000 0.772 0.004 0.000 0.032 0.192
#> SRR2532328 6 0.3950 0.573 0.000 0.144 0.016 0.060 0.000 0.780
#> SRR2532327 2 0.1871 0.809 0.000 0.928 0.016 0.000 0.032 0.024
#> SRR2532326 3 0.5673 0.328 0.004 0.000 0.464 0.396 0.000 0.136
#> SRR2532324 6 0.5263 0.336 0.000 0.356 0.012 0.000 0.076 0.556
#> SRR2532325 1 0.2135 0.872 0.916 0.012 0.000 0.004 0.024 0.044
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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