Date: 2019-12-25 23:24:16 CET, cola version: 1.3.2
Document is loading...
All available functions which can be applied to this res_list
object:
res_list
#> A 'ConsensusPartitionList' object with 24 methods.
#> On a matrix with 16900 rows and 93 columns.
#> Top rows are extracted by 'SD, CV, MAD, ATC' methods.
#> Subgroups are detected by 'hclust, kmeans, skmeans, pam, mclust, NMF' method.
#> Number of partitions are tried for k = 2, 3, 4, 5, 6.
#> Performed in total 30000 partitions by row resampling.
#>
#> Following methods can be applied to this 'ConsensusPartitionList' object:
#> [1] "cola_report" "collect_classes" "collect_plots" "collect_stats"
#> [5] "colnames" "functional_enrichment" "get_anno_col" "get_anno"
#> [9] "get_classes" "get_matrix" "get_membership" "get_stats"
#> [13] "is_best_k" "is_stable_k" "ncol" "nrow"
#> [17] "rownames" "show" "suggest_best_k" "test_to_known_factors"
#> [21] "top_rows_heatmap" "top_rows_overlap"
#>
#> You can get result for a single method by, e.g. object["SD", "hclust"] or object["SD:hclust"]
#> or a subset of methods by object[c("SD", "CV")], c("hclust", "kmeans")]
The call of run_all_consensus_partition_methods()
was:
#> run_all_consensus_partition_methods(data = mat, mc.cores = 4)
Dimension of the input matrix:
mat = get_matrix(res_list)
dim(mat)
#> [1] 16900 93
The density distribution for each sample is visualized as in one column in the following heatmap. The clustering is based on the distance which is the Kolmogorov-Smirnov statistic between two distributions.
library(ComplexHeatmap)
densityHeatmap(mat, 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 | 3 | 1.000 | 0.982 | 0.954 | ** | |
SD:pam | 3 | 1.000 | 0.959 | 0.984 | ** | 2 |
CV:kmeans | 3 | 1.000 | 0.970 | 0.944 | ** | |
MAD:hclust | 3 | 1.000 | 0.979 | 0.990 | ** | |
MAD:skmeans | 3 | 1.000 | 0.980 | 0.991 | ** | 2 |
MAD:pam | 3 | 1.000 | 0.954 | 0.984 | ** | |
ATC:hclust | 2 | 1.000 | 1.000 | 1.000 | ** | |
ATC:kmeans | 2 | 1.000 | 1.000 | 1.000 | ** | |
ATC:mclust | 2 | 1.000 | 0.969 | 0.987 | ** | |
ATC:NMF | 3 | 1.000 | 0.975 | 0.987 | ** | 2 |
SD:skmeans | 4 | 0.996 | 0.948 | 0.971 | ** | 2,3 |
MAD:NMF | 4 | 0.979 | 0.956 | 0.980 | ** | 2,3 |
SD:NMF | 4 | 0.967 | 0.904 | 0.963 | ** | 3 |
SD:hclust | 3 | 0.966 | 0.976 | 0.988 | ** | 2 |
CV:skmeans | 5 | 0.925 | 0.940 | 0.933 | * | 2,3,4 |
CV:pam | 6 | 0.919 | 0.893 | 0.918 | * | 3,5 |
CV:hclust | 4 | 0.918 | 0.934 | 0.947 | * | 2,3 |
ATC:pam | 4 | 0.914 | 0.933 | 0.973 | * | 2,3 |
ATC:skmeans | 5 | 0.909 | 0.899 | 0.949 | * | 2 |
CV:NMF | 5 | 0.908 | 0.917 | 0.927 | * | 3,4 |
MAD:mclust | 3 | 0.886 | 0.955 | 0.899 | ||
CV:mclust | 3 | 0.884 | 0.900 | 0.956 | ||
SD:mclust | 3 | 0.870 | 0.910 | 0.964 | ||
MAD:kmeans | 3 | 0.814 | 0.950 | 0.937 |
**: 1-PAC > 0.95, *: 1-PAC > 0.9
Cumulative distribution function curves of consensus matrix for all methods.
collect_plots(res_list, fun = plot_ecdf)
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)
Signature heatmaps for all methods. (What is a signature heatmap?)
Note in following heatmaps, rows are scaled.
collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)
The statistics used for measuring the stability of consensus partitioning. (How are they defined?)
get_stats(res_list, k = 2)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 2 0.766 0.957 0.970 0.433 0.544 0.544
#> CV:NMF 2 0.604 0.876 0.898 0.441 0.496 0.496
#> MAD:NMF 2 0.977 0.937 0.973 0.501 0.495 0.495
#> ATC:NMF 2 1.000 0.990 0.996 0.307 0.698 0.698
#> SD:skmeans 2 1.000 0.983 0.993 0.506 0.495 0.495
#> CV:skmeans 2 1.000 0.995 0.998 0.505 0.495 0.495
#> MAD:skmeans 2 1.000 0.974 0.990 0.506 0.495 0.495
#> ATC:skmeans 2 0.977 0.969 0.985 0.461 0.531 0.531
#> SD:mclust 2 0.611 0.931 0.947 0.346 0.684 0.684
#> CV:mclust 2 0.580 0.955 0.932 0.336 0.684 0.684
#> MAD:mclust 2 0.591 0.874 0.915 0.366 0.684 0.684
#> ATC:mclust 2 1.000 0.969 0.987 0.331 0.684 0.684
#> SD:kmeans 2 0.399 0.796 0.845 0.414 0.495 0.495
#> CV:kmeans 2 0.380 0.679 0.774 0.413 0.583 0.583
#> MAD:kmeans 2 0.531 0.829 0.880 0.444 0.495 0.495
#> ATC:kmeans 2 1.000 1.000 1.000 0.342 0.659 0.659
#> SD:pam 2 1.000 0.999 1.000 0.316 0.684 0.684
#> CV:pam 2 0.496 0.768 0.781 0.380 0.575 0.575
#> MAD:pam 2 0.540 0.873 0.927 0.351 0.684 0.684
#> ATC:pam 2 1.000 0.987 0.995 0.328 0.671 0.671
#> SD:hclust 2 1.000 1.000 1.000 0.316 0.684 0.684
#> CV:hclust 2 1.000 0.998 0.998 0.317 0.684 0.684
#> MAD:hclust 2 0.579 0.807 0.849 0.387 0.684 0.684
#> ATC:hclust 2 1.000 1.000 1.000 0.342 0.659 0.659
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 1.000 0.987 0.994 0.436 0.753 0.578
#> CV:NMF 3 1.000 0.986 0.994 0.426 0.840 0.689
#> MAD:NMF 3 1.000 0.987 0.994 0.241 0.886 0.771
#> ATC:NMF 3 1.000 0.975 0.987 0.999 0.676 0.539
#> SD:skmeans 3 1.000 0.943 0.979 0.251 0.820 0.654
#> CV:skmeans 3 1.000 0.980 0.991 0.228 0.886 0.771
#> MAD:skmeans 3 1.000 0.980 0.991 0.257 0.823 0.658
#> ATC:skmeans 3 0.871 0.927 0.962 0.317 0.797 0.633
#> SD:mclust 3 0.870 0.910 0.964 0.814 0.692 0.551
#> CV:mclust 3 0.884 0.900 0.956 0.867 0.702 0.565
#> MAD:mclust 3 0.886 0.955 0.899 0.698 0.702 0.565
#> ATC:mclust 3 0.870 0.919 0.950 0.896 0.692 0.551
#> SD:kmeans 3 1.000 0.982 0.954 0.467 0.886 0.771
#> CV:kmeans 3 1.000 0.970 0.944 0.438 0.798 0.654
#> MAD:kmeans 3 0.814 0.950 0.937 0.400 0.886 0.771
#> ATC:kmeans 3 0.797 0.902 0.944 0.825 0.670 0.510
#> SD:pam 3 1.000 0.959 0.984 0.980 0.697 0.557
#> CV:pam 3 1.000 0.993 0.997 0.626 0.799 0.653
#> MAD:pam 3 1.000 0.954 0.984 0.791 0.688 0.544
#> ATC:pam 3 1.000 0.973 0.990 0.895 0.632 0.481
#> SD:hclust 3 0.966 0.976 0.988 0.954 0.702 0.565
#> CV:hclust 3 1.000 0.989 0.995 0.946 0.702 0.565
#> MAD:hclust 3 1.000 0.979 0.990 0.595 0.702 0.565
#> ATC:hclust 3 0.666 0.876 0.872 0.302 0.977 0.965
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 0.967 0.904 0.963 0.1890 0.879 0.687
#> CV:NMF 4 0.968 0.947 0.970 0.1886 0.869 0.653
#> MAD:NMF 4 0.979 0.956 0.980 0.1867 0.875 0.675
#> ATC:NMF 4 0.763 0.725 0.813 0.1526 0.835 0.588
#> SD:skmeans 4 0.996 0.948 0.971 0.1838 0.842 0.591
#> CV:skmeans 4 1.000 0.980 0.992 0.2094 0.869 0.657
#> MAD:skmeans 4 0.872 0.858 0.912 0.1787 0.870 0.646
#> ATC:skmeans 4 0.785 0.805 0.914 0.1276 0.916 0.779
#> SD:mclust 4 0.709 0.715 0.849 0.1421 0.884 0.697
#> CV:mclust 4 0.800 0.814 0.893 0.1714 0.817 0.554
#> MAD:mclust 4 0.832 0.840 0.911 0.1903 0.873 0.671
#> ATC:mclust 4 0.790 0.853 0.923 0.1598 0.878 0.683
#> SD:kmeans 4 0.751 0.715 0.820 0.1620 0.894 0.721
#> CV:kmeans 4 0.800 0.707 0.838 0.1683 0.994 0.984
#> MAD:kmeans 4 0.713 0.679 0.815 0.1395 0.894 0.721
#> ATC:kmeans 4 0.628 0.630 0.742 0.1454 0.941 0.835
#> SD:pam 4 0.728 0.724 0.842 0.1710 0.877 0.677
#> CV:pam 4 0.836 0.896 0.859 0.1321 0.874 0.669
#> MAD:pam 4 0.695 0.583 0.771 0.1655 0.876 0.679
#> ATC:pam 4 0.914 0.933 0.973 0.0827 0.865 0.678
#> SD:hclust 4 0.890 0.876 0.944 0.1146 0.931 0.822
#> CV:hclust 4 0.918 0.934 0.947 0.0570 0.972 0.927
#> MAD:hclust 4 0.833 0.824 0.913 0.1222 0.949 0.867
#> ATC:hclust 4 0.832 0.950 0.971 0.4825 0.693 0.517
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.819 0.696 0.835 0.0612 0.913 0.697
#> CV:NMF 5 0.908 0.917 0.927 0.0597 0.929 0.730
#> MAD:NMF 5 0.785 0.655 0.806 0.0709 0.932 0.746
#> ATC:NMF 5 0.820 0.855 0.919 0.0678 0.928 0.746
#> SD:skmeans 5 0.807 0.787 0.849 0.0476 0.971 0.887
#> CV:skmeans 5 0.925 0.940 0.933 0.0457 0.964 0.858
#> MAD:skmeans 5 0.838 0.780 0.831 0.0557 0.920 0.697
#> ATC:skmeans 5 0.909 0.899 0.949 0.0783 0.964 0.883
#> SD:mclust 5 0.751 0.735 0.839 0.0499 0.849 0.562
#> CV:mclust 5 0.744 0.720 0.835 0.0626 0.919 0.701
#> MAD:mclust 5 0.732 0.520 0.750 0.0513 0.871 0.582
#> ATC:mclust 5 0.778 0.754 0.859 0.0615 0.936 0.777
#> SD:kmeans 5 0.705 0.743 0.806 0.0757 0.941 0.799
#> CV:kmeans 5 0.757 0.868 0.833 0.0818 0.864 0.643
#> MAD:kmeans 5 0.707 0.679 0.774 0.0752 0.911 0.709
#> ATC:kmeans 5 0.657 0.532 0.688 0.0734 0.810 0.467
#> SD:pam 5 0.783 0.696 0.850 0.0768 0.889 0.611
#> CV:pam 5 0.947 0.966 0.971 0.0991 0.950 0.812
#> MAD:pam 5 0.837 0.804 0.887 0.0891 0.810 0.431
#> ATC:pam 5 0.883 0.857 0.932 0.0361 0.980 0.940
#> SD:hclust 5 0.853 0.854 0.905 0.0439 0.957 0.868
#> CV:hclust 5 0.856 0.853 0.935 0.0800 0.968 0.910
#> MAD:hclust 5 0.807 0.761 0.866 0.0429 0.989 0.967
#> ATC:hclust 5 0.802 0.925 0.954 0.0141 0.997 0.990
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.816 0.714 0.836 0.0491 0.900 0.595
#> CV:NMF 6 0.818 0.749 0.854 0.0383 0.961 0.818
#> MAD:NMF 6 0.861 0.808 0.888 0.0477 0.913 0.622
#> ATC:NMF 6 0.795 0.746 0.879 0.0569 0.880 0.570
#> SD:skmeans 6 0.819 0.789 0.821 0.0320 0.967 0.860
#> CV:skmeans 6 0.839 0.742 0.839 0.0349 0.985 0.930
#> MAD:skmeans 6 0.824 0.754 0.793 0.0329 0.942 0.734
#> ATC:skmeans 6 0.821 0.783 0.868 0.0779 0.909 0.674
#> SD:mclust 6 0.740 0.672 0.806 0.0644 0.911 0.675
#> CV:mclust 6 0.752 0.679 0.809 0.0414 0.935 0.713
#> MAD:mclust 6 0.753 0.639 0.816 0.0406 0.850 0.473
#> ATC:mclust 6 0.784 0.763 0.851 0.0353 0.947 0.787
#> SD:kmeans 6 0.718 0.680 0.760 0.0488 1.000 1.000
#> CV:kmeans 6 0.725 0.758 0.803 0.0516 0.972 0.887
#> MAD:kmeans 6 0.701 0.507 0.676 0.0508 0.921 0.696
#> ATC:kmeans 6 0.715 0.679 0.684 0.0562 0.933 0.729
#> SD:pam 6 0.811 0.729 0.802 0.0475 0.925 0.656
#> CV:pam 6 0.919 0.893 0.918 0.0492 0.938 0.732
#> MAD:pam 6 0.787 0.655 0.774 0.0323 0.909 0.602
#> ATC:pam 6 0.850 0.804 0.892 0.0855 0.924 0.767
#> SD:hclust 6 0.851 0.891 0.930 0.0365 0.972 0.900
#> CV:hclust 6 0.848 0.812 0.910 0.0782 0.893 0.679
#> MAD:hclust 6 0.810 0.692 0.805 0.0461 0.942 0.823
#> ATC:hclust 6 0.859 0.911 0.943 0.0658 0.974 0.920
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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 1.000 1.000 0.3163 0.684 0.684
#> 3 3 0.966 0.976 0.988 0.9545 0.702 0.565
#> 4 4 0.890 0.876 0.944 0.1146 0.931 0.822
#> 5 5 0.853 0.854 0.905 0.0439 0.957 0.868
#> 6 6 0.851 0.891 0.930 0.0365 0.972 0.900
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
#> SRR650205 2 0 1 0 1
#> SRR650134 2 0 1 0 1
#> SRR650135 2 0 1 0 1
#> SRR650136 2 0 1 0 1
#> SRR650137 2 0 1 0 1
#> SRR650140 2 0 1 0 1
#> SRR650141 2 0 1 0 1
#> SRR650144 2 0 1 0 1
#> SRR650147 2 0 1 0 1
#> SRR650150 2 0 1 0 1
#> SRR650153 2 0 1 0 1
#> SRR650156 2 0 1 0 1
#> SRR650159 2 0 1 0 1
#> SRR650162 2 0 1 0 1
#> SRR650168 2 0 1 0 1
#> SRR650166 2 0 1 0 1
#> SRR650167 2 0 1 0 1
#> SRR650171 2 0 1 0 1
#> SRR650165 2 0 1 0 1
#> SRR650176 2 0 1 0 1
#> SRR650177 2 0 1 0 1
#> SRR650180 2 0 1 0 1
#> SRR650179 2 0 1 0 1
#> SRR650181 2 0 1 0 1
#> SRR650183 2 0 1 0 1
#> SRR650184 2 0 1 0 1
#> SRR650185 2 0 1 0 1
#> SRR650188 2 0 1 0 1
#> SRR650191 2 0 1 0 1
#> SRR650192 2 0 1 0 1
#> SRR650195 2 0 1 0 1
#> SRR650198 2 0 1 0 1
#> SRR650200 2 0 1 0 1
#> SRR650196 2 0 1 0 1
#> SRR650197 2 0 1 0 1
#> SRR650201 2 0 1 0 1
#> SRR650203 2 0 1 0 1
#> SRR650204 2 0 1 0 1
#> SRR650202 2 0 1 0 1
#> SRR650130 2 0 1 0 1
#> SRR650131 2 0 1 0 1
#> SRR650132 2 0 1 0 1
#> SRR650133 2 0 1 0 1
#> SRR650138 2 0 1 0 1
#> SRR650139 2 0 1 0 1
#> SRR650142 2 0 1 0 1
#> SRR650143 2 0 1 0 1
#> SRR650145 2 0 1 0 1
#> SRR650146 2 0 1 0 1
#> SRR650148 2 0 1 0 1
#> SRR650149 2 0 1 0 1
#> SRR650151 2 0 1 0 1
#> SRR650152 2 0 1 0 1
#> SRR650154 2 0 1 0 1
#> SRR650155 2 0 1 0 1
#> SRR650157 2 0 1 0 1
#> SRR650158 2 0 1 0 1
#> SRR650160 2 0 1 0 1
#> SRR650161 2 0 1 0 1
#> SRR650163 2 0 1 0 1
#> SRR650164 2 0 1 0 1
#> SRR650169 2 0 1 0 1
#> SRR650170 2 0 1 0 1
#> SRR650172 2 0 1 0 1
#> SRR650173 2 0 1 0 1
#> SRR650174 2 0 1 0 1
#> SRR650175 2 0 1 0 1
#> SRR650178 2 0 1 0 1
#> SRR650182 2 0 1 0 1
#> SRR650186 2 0 1 0 1
#> SRR650187 2 0 1 0 1
#> SRR650189 2 0 1 0 1
#> SRR650190 2 0 1 0 1
#> SRR650193 2 0 1 0 1
#> SRR650194 2 0 1 0 1
#> SRR834560 1 0 1 1 0
#> SRR834561 1 0 1 1 0
#> SRR834562 1 0 1 1 0
#> SRR834563 1 0 1 1 0
#> SRR834564 1 0 1 1 0
#> SRR834565 1 0 1 1 0
#> SRR834566 1 0 1 1 0
#> SRR834567 1 0 1 1 0
#> SRR834568 1 0 1 1 0
#> SRR834569 1 0 1 1 0
#> SRR834570 1 0 1 1 0
#> SRR834571 1 0 1 1 0
#> SRR834572 1 0 1 1 0
#> SRR834573 1 0 1 1 0
#> SRR834574 1 0 1 1 0
#> SRR834575 1 0 1 1 0
#> SRR834576 1 0 1 1 0
#> SRR834577 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0237 0.974 0 0.996 0.004
#> SRR650134 2 0.0000 0.976 0 1.000 0.000
#> SRR650135 2 0.0000 0.976 0 1.000 0.000
#> SRR650136 2 0.0000 0.976 0 1.000 0.000
#> SRR650137 2 0.0000 0.976 0 1.000 0.000
#> SRR650140 2 0.0000 0.976 0 1.000 0.000
#> SRR650141 2 0.0237 0.974 0 0.996 0.004
#> SRR650144 2 0.0000 0.976 0 1.000 0.000
#> SRR650147 2 0.0237 0.974 0 0.996 0.004
#> SRR650150 2 0.0000 0.976 0 1.000 0.000
#> SRR650153 2 0.0000 0.976 0 1.000 0.000
#> SRR650156 2 0.0000 0.976 0 1.000 0.000
#> SRR650159 2 0.0000 0.976 0 1.000 0.000
#> SRR650162 2 0.0000 0.976 0 1.000 0.000
#> SRR650168 2 0.3482 0.868 0 0.872 0.128
#> SRR650166 2 0.0000 0.976 0 1.000 0.000
#> SRR650167 2 0.0000 0.976 0 1.000 0.000
#> SRR650171 2 0.0000 0.976 0 1.000 0.000
#> SRR650165 2 0.0000 0.976 0 1.000 0.000
#> SRR650176 2 0.0000 0.976 0 1.000 0.000
#> SRR650177 2 0.0000 0.976 0 1.000 0.000
#> SRR650180 2 0.0000 0.976 0 1.000 0.000
#> SRR650179 2 0.0000 0.976 0 1.000 0.000
#> SRR650181 2 0.0000 0.976 0 1.000 0.000
#> SRR650183 2 0.0000 0.976 0 1.000 0.000
#> SRR650184 2 0.2959 0.891 0 0.900 0.100
#> SRR650185 2 0.2959 0.891 0 0.900 0.100
#> SRR650188 2 0.0000 0.976 0 1.000 0.000
#> SRR650191 2 0.5397 0.650 0 0.720 0.280
#> SRR650192 2 0.0000 0.976 0 1.000 0.000
#> SRR650195 2 0.0000 0.976 0 1.000 0.000
#> SRR650198 2 0.0000 0.976 0 1.000 0.000
#> SRR650200 2 0.0000 0.976 0 1.000 0.000
#> SRR650196 2 0.0000 0.976 0 1.000 0.000
#> SRR650197 2 0.0000 0.976 0 1.000 0.000
#> SRR650201 2 0.0000 0.976 0 1.000 0.000
#> SRR650203 2 0.0000 0.976 0 1.000 0.000
#> SRR650204 2 0.0000 0.976 0 1.000 0.000
#> SRR650202 2 0.0000 0.976 0 1.000 0.000
#> SRR650130 2 0.0000 0.976 0 1.000 0.000
#> SRR650131 2 0.0000 0.976 0 1.000 0.000
#> SRR650132 2 0.0000 0.976 0 1.000 0.000
#> SRR650133 2 0.3941 0.834 0 0.844 0.156
#> SRR650138 3 0.0000 0.998 0 0.000 1.000
#> SRR650139 3 0.0000 0.998 0 0.000 1.000
#> SRR650142 3 0.0000 0.998 0 0.000 1.000
#> SRR650143 3 0.0000 0.998 0 0.000 1.000
#> SRR650145 3 0.0000 0.998 0 0.000 1.000
#> SRR650146 3 0.0000 0.998 0 0.000 1.000
#> SRR650148 3 0.0000 0.998 0 0.000 1.000
#> SRR650149 3 0.0000 0.998 0 0.000 1.000
#> SRR650151 3 0.0000 0.998 0 0.000 1.000
#> SRR650152 3 0.0000 0.998 0 0.000 1.000
#> SRR650154 3 0.0000 0.998 0 0.000 1.000
#> SRR650155 3 0.0000 0.998 0 0.000 1.000
#> SRR650157 3 0.0000 0.998 0 0.000 1.000
#> SRR650158 3 0.0000 0.998 0 0.000 1.000
#> SRR650160 2 0.3038 0.892 0 0.896 0.104
#> SRR650161 2 0.3038 0.892 0 0.896 0.104
#> SRR650163 3 0.0000 0.998 0 0.000 1.000
#> SRR650164 3 0.0000 0.998 0 0.000 1.000
#> SRR650169 3 0.0892 0.975 0 0.020 0.980
#> SRR650170 3 0.0892 0.975 0 0.020 0.980
#> SRR650172 3 0.0000 0.998 0 0.000 1.000
#> SRR650173 3 0.0000 0.998 0 0.000 1.000
#> SRR650174 3 0.0000 0.998 0 0.000 1.000
#> SRR650175 3 0.0000 0.998 0 0.000 1.000
#> SRR650178 2 0.1860 0.938 0 0.948 0.052
#> SRR650182 2 0.1860 0.938 0 0.948 0.052
#> SRR650186 3 0.0000 0.998 0 0.000 1.000
#> SRR650187 3 0.0000 0.998 0 0.000 1.000
#> SRR650189 3 0.0000 0.998 0 0.000 1.000
#> SRR650190 3 0.0000 0.998 0 0.000 1.000
#> SRR650193 2 0.0000 0.976 0 1.000 0.000
#> SRR650194 2 0.0000 0.976 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.3024 0.761 0 0.852 0.000 0.148
#> SRR650134 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650136 2 0.4977 -0.314 0 0.540 0.000 0.460
#> SRR650137 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650141 2 0.3074 0.757 0 0.848 0.000 0.152
#> SRR650144 4 0.4999 0.359 0 0.492 0.000 0.508
#> SRR650147 2 0.3074 0.757 0 0.848 0.000 0.152
#> SRR650150 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650153 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650156 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650168 4 0.4008 0.711 0 0.244 0.000 0.756
#> SRR650166 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650171 2 0.0707 0.901 0 0.980 0.000 0.020
#> SRR650165 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650176 2 0.0707 0.901 0 0.980 0.000 0.020
#> SRR650177 2 0.0707 0.901 0 0.980 0.000 0.020
#> SRR650180 2 0.0707 0.901 0 0.980 0.000 0.020
#> SRR650179 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650181 2 0.0921 0.894 0 0.972 0.000 0.028
#> SRR650183 2 0.4977 -0.314 0 0.540 0.000 0.460
#> SRR650184 4 0.4678 0.769 0 0.232 0.024 0.744
#> SRR650185 4 0.4678 0.769 0 0.232 0.024 0.744
#> SRR650188 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650191 4 0.1792 0.609 0 0.000 0.068 0.932
#> SRR650192 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650195 4 0.4585 0.695 0 0.332 0.000 0.668
#> SRR650198 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650200 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650197 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650203 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650204 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650202 2 0.1302 0.879 0 0.956 0.000 0.044
#> SRR650130 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650131 2 0.0336 0.909 0 0.992 0.000 0.008
#> SRR650132 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650133 4 0.3813 0.741 0 0.148 0.024 0.828
#> SRR650138 3 0.0817 0.964 0 0.000 0.976 0.024
#> SRR650139 3 0.0817 0.964 0 0.000 0.976 0.024
#> SRR650142 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650145 3 0.0817 0.964 0 0.000 0.976 0.024
#> SRR650146 3 0.0817 0.964 0 0.000 0.976 0.024
#> SRR650148 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650149 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650151 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650152 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650154 3 0.0817 0.964 0 0.000 0.976 0.024
#> SRR650155 3 0.0817 0.964 0 0.000 0.976 0.024
#> SRR650157 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650160 2 0.4950 0.266 0 0.620 0.004 0.376
#> SRR650161 2 0.4950 0.266 0 0.620 0.004 0.376
#> SRR650163 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650169 3 0.2469 0.920 0 0.000 0.892 0.108
#> SRR650170 3 0.2469 0.920 0 0.000 0.892 0.108
#> SRR650172 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650173 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650174 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650175 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650178 2 0.3123 0.738 0 0.844 0.000 0.156
#> SRR650182 2 0.3123 0.738 0 0.844 0.000 0.156
#> SRR650186 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.971 0 0.000 1.000 0.000
#> SRR650189 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650190 3 0.1211 0.969 0 0.000 0.960 0.040
#> SRR650193 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR650194 2 0.0000 0.914 0 1.000 0.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 2 0.3141 0.7498 0 0.832 0.000 0.016 0.152
#> SRR650134 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650135 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650136 4 0.4419 0.5463 0 0.312 0.000 0.668 0.020
#> SRR650137 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650140 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650141 2 0.3183 0.7433 0 0.828 0.000 0.016 0.156
#> SRR650144 4 0.4995 0.5757 0 0.264 0.000 0.668 0.068
#> SRR650147 2 0.3183 0.7433 0 0.828 0.000 0.016 0.156
#> SRR650150 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650153 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650156 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650159 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650168 5 0.6132 0.3386 0 0.224 0.000 0.212 0.564
#> SRR650166 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650167 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650171 2 0.0880 0.9216 0 0.968 0.000 0.032 0.000
#> SRR650165 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650176 2 0.0880 0.9216 0 0.968 0.000 0.032 0.000
#> SRR650177 2 0.0880 0.9216 0 0.968 0.000 0.032 0.000
#> SRR650180 2 0.0880 0.9216 0 0.968 0.000 0.032 0.000
#> SRR650179 2 0.3123 0.7185 0 0.812 0.000 0.004 0.184
#> SRR650181 2 0.1124 0.9154 0 0.960 0.000 0.036 0.004
#> SRR650183 4 0.4419 0.5463 0 0.312 0.000 0.668 0.020
#> SRR650184 4 0.4701 0.5366 0 0.052 0.004 0.712 0.232
#> SRR650185 4 0.4701 0.5366 0 0.052 0.004 0.712 0.232
#> SRR650188 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650191 5 0.4086 0.0566 0 0.000 0.024 0.240 0.736
#> SRR650192 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650195 4 0.4609 0.5785 0 0.104 0.000 0.744 0.152
#> SRR650198 2 0.2966 0.7190 0 0.816 0.000 0.000 0.184
#> SRR650200 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650196 2 0.3123 0.7185 0 0.812 0.000 0.004 0.184
#> SRR650197 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650201 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650203 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650204 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650202 2 0.1670 0.8882 0 0.936 0.000 0.012 0.052
#> SRR650130 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650131 2 0.0290 0.9355 0 0.992 0.000 0.008 0.000
#> SRR650132 2 0.0000 0.9392 0 1.000 0.000 0.000 0.000
#> SRR650133 5 0.5437 0.2774 0 0.128 0.000 0.220 0.652
#> SRR650138 3 0.4221 0.7595 0 0.000 0.732 0.236 0.032
#> SRR650139 3 0.4221 0.7595 0 0.000 0.732 0.236 0.032
#> SRR650142 3 0.0162 0.9093 0 0.000 0.996 0.004 0.000
#> SRR650143 3 0.0162 0.9093 0 0.000 0.996 0.004 0.000
#> SRR650145 3 0.4221 0.7595 0 0.000 0.732 0.236 0.032
#> SRR650146 3 0.4221 0.7595 0 0.000 0.732 0.236 0.032
#> SRR650148 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650149 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650151 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650152 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650154 3 0.4221 0.7595 0 0.000 0.732 0.236 0.032
#> SRR650155 3 0.4221 0.7595 0 0.000 0.732 0.236 0.032
#> SRR650157 3 0.0510 0.9066 0 0.000 0.984 0.016 0.000
#> SRR650158 3 0.0510 0.9066 0 0.000 0.984 0.016 0.000
#> SRR650160 5 0.4505 0.4095 0 0.384 0.000 0.012 0.604
#> SRR650161 5 0.4505 0.4095 0 0.384 0.000 0.012 0.604
#> SRR650163 3 0.0162 0.9093 0 0.000 0.996 0.004 0.000
#> SRR650164 3 0.0162 0.9093 0 0.000 0.996 0.004 0.000
#> SRR650169 3 0.2540 0.8694 0 0.000 0.888 0.024 0.088
#> SRR650170 3 0.2540 0.8694 0 0.000 0.888 0.024 0.088
#> SRR650172 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650173 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650174 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650175 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650178 2 0.2690 0.7586 0 0.844 0.000 0.000 0.156
#> SRR650182 2 0.2690 0.7586 0 0.844 0.000 0.000 0.156
#> SRR650186 3 0.0162 0.9093 0 0.000 0.996 0.004 0.000
#> SRR650187 3 0.0162 0.9093 0 0.000 0.996 0.004 0.000
#> SRR650189 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650190 3 0.1121 0.9098 0 0.000 0.956 0.000 0.044
#> SRR650193 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR650194 2 0.0162 0.9388 0 0.996 0.000 0.004 0.000
#> SRR834560 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.0000 1 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
#> SRR650205 2 0.3763 0.675 0.000 0.768 0.000 0.060 0.172 0.000
#> SRR650134 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650135 2 0.0405 0.933 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650136 4 0.2854 0.646 0.000 0.208 0.000 0.792 0.000 0.000
#> SRR650137 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650140 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650141 2 0.3796 0.668 0.000 0.764 0.000 0.060 0.176 0.000
#> SRR650144 4 0.2706 0.684 0.000 0.160 0.000 0.832 0.008 0.000
#> SRR650147 2 0.3796 0.668 0.000 0.764 0.000 0.060 0.176 0.000
#> SRR650150 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650153 2 0.0405 0.933 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650156 2 0.0405 0.933 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650159 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650168 5 0.4530 0.580 0.000 0.160 0.000 0.136 0.704 0.000
#> SRR650166 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650167 2 0.0405 0.933 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650171 2 0.0790 0.921 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR650165 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650176 2 0.0790 0.921 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR650177 2 0.0790 0.921 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR650180 2 0.0790 0.921 0.000 0.968 0.000 0.032 0.000 0.000
#> SRR650179 2 0.3197 0.729 0.000 0.804 0.000 0.012 0.008 0.176
#> SRR650181 2 0.1196 0.912 0.000 0.952 0.000 0.040 0.008 0.000
#> SRR650183 4 0.2854 0.646 0.000 0.208 0.000 0.792 0.000 0.000
#> SRR650184 4 0.2135 0.665 0.000 0.000 0.000 0.872 0.128 0.000
#> SRR650185 4 0.2135 0.665 0.000 0.000 0.000 0.872 0.128 0.000
#> SRR650188 2 0.0405 0.933 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650191 5 0.2398 0.371 0.000 0.000 0.020 0.104 0.876 0.000
#> SRR650192 2 0.0146 0.933 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650195 4 0.0260 0.672 0.000 0.000 0.000 0.992 0.008 0.000
#> SRR650198 2 0.3099 0.729 0.000 0.808 0.000 0.008 0.008 0.176
#> SRR650200 2 0.0405 0.933 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650196 2 0.3197 0.729 0.000 0.804 0.000 0.012 0.008 0.176
#> SRR650197 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650201 2 0.0260 0.932 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650203 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650204 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650202 2 0.2512 0.837 0.000 0.880 0.000 0.060 0.060 0.000
#> SRR650130 2 0.0146 0.933 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650131 2 0.0260 0.932 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650132 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650133 5 0.3700 0.540 0.000 0.068 0.000 0.152 0.780 0.000
#> SRR650138 6 0.2664 1.000 0.000 0.000 0.184 0.000 0.000 0.816
#> SRR650139 6 0.2664 1.000 0.000 0.000 0.184 0.000 0.000 0.816
#> SRR650142 3 0.1204 0.941 0.000 0.000 0.944 0.000 0.000 0.056
#> SRR650143 3 0.1204 0.941 0.000 0.000 0.944 0.000 0.000 0.056
#> SRR650145 6 0.2664 1.000 0.000 0.000 0.184 0.000 0.000 0.816
#> SRR650146 6 0.2664 1.000 0.000 0.000 0.184 0.000 0.000 0.816
#> SRR650148 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650149 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650151 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650152 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650154 6 0.2664 1.000 0.000 0.000 0.184 0.000 0.000 0.816
#> SRR650155 6 0.2664 1.000 0.000 0.000 0.184 0.000 0.000 0.816
#> SRR650157 3 0.1957 0.886 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR650158 3 0.1957 0.886 0.000 0.000 0.888 0.000 0.000 0.112
#> SRR650160 5 0.6922 0.547 0.000 0.268 0.008 0.068 0.472 0.184
#> SRR650161 5 0.6922 0.547 0.000 0.268 0.008 0.068 0.472 0.184
#> SRR650163 3 0.1204 0.941 0.000 0.000 0.944 0.000 0.000 0.056
#> SRR650164 3 0.1204 0.941 0.000 0.000 0.944 0.000 0.000 0.056
#> SRR650169 3 0.1563 0.903 0.000 0.000 0.932 0.012 0.056 0.000
#> SRR650170 3 0.1563 0.903 0.000 0.000 0.932 0.012 0.056 0.000
#> SRR650172 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650173 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650174 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650175 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650178 2 0.2527 0.769 0.000 0.832 0.000 0.000 0.168 0.000
#> SRR650182 2 0.2527 0.769 0.000 0.832 0.000 0.000 0.168 0.000
#> SRR650186 3 0.1204 0.941 0.000 0.000 0.944 0.000 0.000 0.056
#> SRR650187 3 0.1204 0.941 0.000 0.000 0.944 0.000 0.000 0.056
#> SRR650189 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650190 3 0.0000 0.955 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650193 2 0.0146 0.933 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650194 2 0.0146 0.933 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR834560 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR834570 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR834574 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
#> SRR834576 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0260 0.994 0.992 0.000 0.000 0.000 0.008 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.399 0.796 0.845 0.4137 0.495 0.495
#> 3 3 1.000 0.982 0.954 0.4666 0.886 0.771
#> 4 4 0.751 0.715 0.820 0.1620 0.894 0.721
#> 5 5 0.705 0.743 0.806 0.0757 0.941 0.799
#> 6 6 0.718 0.680 0.760 0.0488 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] 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
#> SRR650205 2 0.000 0.993 0.000 1.000
#> SRR650134 2 0.000 0.993 0.000 1.000
#> SRR650135 2 0.000 0.993 0.000 1.000
#> SRR650136 2 0.000 0.993 0.000 1.000
#> SRR650137 2 0.000 0.993 0.000 1.000
#> SRR650140 2 0.000 0.993 0.000 1.000
#> SRR650141 2 0.000 0.993 0.000 1.000
#> SRR650144 2 0.000 0.993 0.000 1.000
#> SRR650147 2 0.000 0.993 0.000 1.000
#> SRR650150 2 0.000 0.993 0.000 1.000
#> SRR650153 2 0.000 0.993 0.000 1.000
#> SRR650156 2 0.000 0.993 0.000 1.000
#> SRR650159 2 0.000 0.993 0.000 1.000
#> SRR650162 2 0.000 0.993 0.000 1.000
#> SRR650168 2 0.000 0.993 0.000 1.000
#> SRR650166 2 0.000 0.993 0.000 1.000
#> SRR650167 2 0.000 0.993 0.000 1.000
#> SRR650171 2 0.000 0.993 0.000 1.000
#> SRR650165 2 0.000 0.993 0.000 1.000
#> SRR650176 2 0.000 0.993 0.000 1.000
#> SRR650177 2 0.000 0.993 0.000 1.000
#> SRR650180 2 0.000 0.993 0.000 1.000
#> SRR650179 2 0.000 0.993 0.000 1.000
#> SRR650181 2 0.000 0.993 0.000 1.000
#> SRR650183 2 0.000 0.993 0.000 1.000
#> SRR650184 2 0.118 0.969 0.016 0.984
#> SRR650185 2 0.118 0.969 0.016 0.984
#> SRR650188 2 0.000 0.993 0.000 1.000
#> SRR650191 1 1.000 0.537 0.508 0.492
#> SRR650192 2 0.000 0.993 0.000 1.000
#> SRR650195 2 0.000 0.993 0.000 1.000
#> SRR650198 2 0.000 0.993 0.000 1.000
#> SRR650200 2 0.000 0.993 0.000 1.000
#> SRR650196 2 0.000 0.993 0.000 1.000
#> SRR650197 2 0.000 0.993 0.000 1.000
#> SRR650201 2 0.000 0.993 0.000 1.000
#> SRR650203 2 0.000 0.993 0.000 1.000
#> SRR650204 2 0.000 0.993 0.000 1.000
#> SRR650202 2 0.000 0.993 0.000 1.000
#> SRR650130 2 0.000 0.993 0.000 1.000
#> SRR650131 2 0.000 0.993 0.000 1.000
#> SRR650132 2 0.000 0.993 0.000 1.000
#> SRR650133 2 0.000 0.993 0.000 1.000
#> SRR650138 1 0.980 0.616 0.584 0.416
#> SRR650139 1 0.980 0.616 0.584 0.416
#> SRR650142 1 0.980 0.616 0.584 0.416
#> SRR650143 1 0.980 0.616 0.584 0.416
#> SRR650145 1 0.980 0.616 0.584 0.416
#> SRR650146 1 0.980 0.616 0.584 0.416
#> SRR650148 1 1.000 0.537 0.508 0.492
#> SRR650149 1 1.000 0.537 0.508 0.492
#> SRR650151 1 1.000 0.537 0.508 0.492
#> SRR650152 1 1.000 0.537 0.508 0.492
#> SRR650154 1 1.000 0.537 0.508 0.492
#> SRR650155 1 1.000 0.537 0.508 0.492
#> SRR650157 1 0.980 0.616 0.584 0.416
#> SRR650158 1 0.980 0.616 0.584 0.416
#> SRR650160 2 0.430 0.839 0.088 0.912
#> SRR650161 2 0.430 0.839 0.088 0.912
#> SRR650163 1 0.980 0.616 0.584 0.416
#> SRR650164 1 0.980 0.616 0.584 0.416
#> SRR650169 1 1.000 0.537 0.508 0.492
#> SRR650170 1 1.000 0.537 0.508 0.492
#> SRR650172 1 1.000 0.537 0.508 0.492
#> SRR650173 1 1.000 0.537 0.508 0.492
#> SRR650174 1 1.000 0.537 0.508 0.492
#> SRR650175 1 1.000 0.537 0.508 0.492
#> SRR650178 2 0.000 0.993 0.000 1.000
#> SRR650182 2 0.000 0.993 0.000 1.000
#> SRR650186 1 0.980 0.616 0.584 0.416
#> SRR650187 1 0.980 0.616 0.584 0.416
#> SRR650189 1 1.000 0.537 0.508 0.492
#> SRR650190 1 1.000 0.537 0.508 0.492
#> SRR650193 2 0.000 0.993 0.000 1.000
#> SRR650194 2 0.000 0.993 0.000 1.000
#> SRR834560 1 0.469 0.629 0.900 0.100
#> SRR834561 1 0.469 0.629 0.900 0.100
#> SRR834562 1 0.469 0.629 0.900 0.100
#> SRR834563 1 0.469 0.629 0.900 0.100
#> SRR834564 1 0.469 0.629 0.900 0.100
#> SRR834565 1 0.469 0.629 0.900 0.100
#> SRR834566 1 0.469 0.629 0.900 0.100
#> SRR834567 1 0.469 0.629 0.900 0.100
#> SRR834568 1 0.469 0.629 0.900 0.100
#> SRR834569 1 0.443 0.627 0.908 0.092
#> SRR834570 1 0.469 0.629 0.900 0.100
#> SRR834571 1 0.469 0.629 0.900 0.100
#> SRR834572 1 0.469 0.629 0.900 0.100
#> SRR834573 1 0.469 0.629 0.900 0.100
#> SRR834574 1 0.469 0.629 0.900 0.100
#> SRR834575 1 0.469 0.629 0.900 0.100
#> SRR834576 1 0.469 0.629 0.900 0.100
#> SRR834577 1 0.469 0.629 0.900 0.100
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650134 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650135 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650136 2 0.1860 0.972 0.052 0.948 0.000
#> SRR650137 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650140 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650141 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650144 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650147 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650150 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650153 2 0.1289 0.975 0.032 0.968 0.000
#> SRR650156 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650159 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650162 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650168 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650166 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650167 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650171 2 0.1964 0.972 0.056 0.944 0.000
#> SRR650165 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650176 2 0.1860 0.972 0.052 0.948 0.000
#> SRR650177 2 0.1860 0.972 0.052 0.948 0.000
#> SRR650180 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650179 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650181 2 0.0747 0.977 0.016 0.984 0.000
#> SRR650183 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650184 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650185 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650188 2 0.0000 0.977 0.000 1.000 0.000
#> SRR650191 3 0.3472 0.938 0.040 0.056 0.904
#> SRR650192 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650195 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650198 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650200 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650196 2 0.0747 0.975 0.016 0.984 0.000
#> SRR650197 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650201 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650203 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650204 2 0.0892 0.974 0.020 0.980 0.000
#> SRR650202 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650130 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650131 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650132 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650133 2 0.1753 0.972 0.048 0.952 0.000
#> SRR650138 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650139 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650142 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650143 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650145 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650146 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650148 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650149 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650151 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650152 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650154 3 0.1860 0.993 0.000 0.052 0.948
#> SRR650155 3 0.1860 0.993 0.000 0.052 0.948
#> SRR650157 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650158 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650160 2 0.1129 0.975 0.020 0.976 0.004
#> SRR650161 2 0.1129 0.975 0.020 0.976 0.004
#> SRR650163 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650164 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650169 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650170 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650172 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650173 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650174 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650175 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650178 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650182 2 0.0237 0.977 0.004 0.996 0.000
#> SRR650186 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650187 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650189 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650190 3 0.1753 0.997 0.000 0.048 0.952
#> SRR650193 2 0.1529 0.975 0.040 0.960 0.000
#> SRR650194 2 0.1529 0.975 0.040 0.960 0.000
#> SRR834560 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834561 1 0.3267 0.979 0.884 0.000 0.116
#> SRR834562 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834563 1 0.3267 0.979 0.884 0.000 0.116
#> SRR834564 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834565 1 0.3267 0.979 0.884 0.000 0.116
#> SRR834566 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834567 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834568 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834569 1 0.3116 0.980 0.892 0.000 0.108
#> SRR834570 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834571 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834572 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834573 1 0.3267 0.979 0.884 0.000 0.116
#> SRR834574 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834575 1 0.3267 0.979 0.884 0.000 0.116
#> SRR834576 1 0.2261 0.987 0.932 0.000 0.068
#> SRR834577 1 0.3267 0.979 0.884 0.000 0.116
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.4972 0.812 0.000 0.456 0.000 0.544
#> SRR650134 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650135 2 0.3710 0.552 0.004 0.804 0.000 0.192
#> SRR650136 2 0.5281 -0.605 0.008 0.528 0.000 0.464
#> SRR650137 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650140 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650141 4 0.4961 0.818 0.000 0.448 0.000 0.552
#> SRR650144 4 0.5292 0.719 0.008 0.480 0.000 0.512
#> SRR650147 4 0.4961 0.818 0.000 0.448 0.000 0.552
#> SRR650150 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650153 2 0.4964 -0.250 0.004 0.616 0.000 0.380
#> SRR650156 2 0.3710 0.552 0.004 0.804 0.000 0.192
#> SRR650159 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650162 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650168 4 0.4843 0.813 0.000 0.396 0.000 0.604
#> SRR650166 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650167 2 0.2081 0.689 0.000 0.916 0.000 0.084
#> SRR650171 2 0.5099 -0.431 0.008 0.612 0.000 0.380
#> SRR650165 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650176 2 0.5050 -0.530 0.004 0.588 0.000 0.408
#> SRR650177 2 0.5050 -0.530 0.004 0.588 0.000 0.408
#> SRR650180 4 0.5143 0.808 0.004 0.456 0.000 0.540
#> SRR650179 2 0.0592 0.703 0.000 0.984 0.000 0.016
#> SRR650181 2 0.4220 0.402 0.004 0.748 0.000 0.248
#> SRR650183 4 0.5220 0.812 0.008 0.424 0.000 0.568
#> SRR650184 4 0.6085 0.631 0.008 0.260 0.068 0.664
#> SRR650185 4 0.6085 0.631 0.008 0.260 0.068 0.664
#> SRR650188 2 0.3257 0.620 0.004 0.844 0.000 0.152
#> SRR650191 3 0.4453 0.779 0.000 0.012 0.744 0.244
#> SRR650192 4 0.4985 0.797 0.000 0.468 0.000 0.532
#> SRR650195 4 0.5055 0.787 0.008 0.368 0.000 0.624
#> SRR650198 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650200 2 0.2081 0.689 0.000 0.916 0.000 0.084
#> SRR650196 2 0.1716 0.696 0.000 0.936 0.000 0.064
#> SRR650197 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650201 2 0.2149 0.687 0.000 0.912 0.000 0.088
#> SRR650203 2 0.3123 0.614 0.000 0.844 0.000 0.156
#> SRR650204 2 0.0188 0.705 0.004 0.996 0.000 0.000
#> SRR650202 2 0.4998 -0.699 0.000 0.512 0.000 0.488
#> SRR650130 2 0.2081 0.689 0.000 0.916 0.000 0.084
#> SRR650131 4 0.4994 0.777 0.000 0.480 0.000 0.520
#> SRR650132 2 0.2011 0.690 0.000 0.920 0.000 0.080
#> SRR650133 4 0.4855 0.811 0.000 0.400 0.000 0.600
#> SRR650138 3 0.3428 0.904 0.000 0.012 0.844 0.144
#> SRR650139 3 0.3428 0.904 0.000 0.012 0.844 0.144
#> SRR650142 3 0.1854 0.939 0.000 0.012 0.940 0.048
#> SRR650143 3 0.1854 0.939 0.000 0.012 0.940 0.048
#> SRR650145 3 0.3428 0.904 0.000 0.012 0.844 0.144
#> SRR650146 3 0.3428 0.904 0.000 0.012 0.844 0.144
#> SRR650148 3 0.1767 0.940 0.000 0.012 0.944 0.044
#> SRR650149 3 0.1767 0.940 0.000 0.012 0.944 0.044
#> SRR650151 3 0.1767 0.942 0.000 0.012 0.944 0.044
#> SRR650152 3 0.1767 0.942 0.000 0.012 0.944 0.044
#> SRR650154 3 0.3428 0.899 0.000 0.012 0.844 0.144
#> SRR650155 3 0.3428 0.899 0.000 0.012 0.844 0.144
#> SRR650157 3 0.2021 0.936 0.000 0.012 0.932 0.056
#> SRR650158 3 0.2021 0.936 0.000 0.012 0.932 0.056
#> SRR650160 2 0.5691 0.145 0.000 0.648 0.048 0.304
#> SRR650161 2 0.5691 0.145 0.000 0.648 0.048 0.304
#> SRR650163 3 0.1854 0.939 0.000 0.012 0.940 0.048
#> SRR650164 3 0.1854 0.939 0.000 0.012 0.940 0.048
#> SRR650169 3 0.2101 0.935 0.000 0.012 0.928 0.060
#> SRR650170 3 0.2101 0.935 0.000 0.012 0.928 0.060
#> SRR650172 3 0.1767 0.940 0.000 0.012 0.944 0.044
#> SRR650173 3 0.1767 0.940 0.000 0.012 0.944 0.044
#> SRR650174 3 0.1677 0.940 0.000 0.012 0.948 0.040
#> SRR650175 3 0.1677 0.940 0.000 0.012 0.948 0.040
#> SRR650178 2 0.2530 0.676 0.000 0.888 0.000 0.112
#> SRR650182 2 0.2530 0.676 0.000 0.888 0.000 0.112
#> SRR650186 3 0.1854 0.939 0.000 0.012 0.940 0.048
#> SRR650187 3 0.1854 0.939 0.000 0.012 0.940 0.048
#> SRR650189 3 0.1059 0.943 0.000 0.012 0.972 0.016
#> SRR650190 3 0.1059 0.943 0.000 0.012 0.972 0.016
#> SRR650193 2 0.4122 0.285 0.004 0.760 0.000 0.236
#> SRR650194 2 0.4122 0.285 0.004 0.760 0.000 0.236
#> SRR834560 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834561 1 0.3757 0.927 0.828 0.000 0.020 0.152
#> SRR834562 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834563 1 0.3757 0.927 0.828 0.000 0.020 0.152
#> SRR834564 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834565 1 0.3757 0.927 0.828 0.000 0.020 0.152
#> SRR834566 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834567 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834568 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834569 1 0.3547 0.930 0.840 0.000 0.016 0.144
#> SRR834570 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834571 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834572 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834573 1 0.3695 0.927 0.828 0.000 0.016 0.156
#> SRR834574 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834575 1 0.3625 0.927 0.828 0.000 0.012 0.160
#> SRR834576 1 0.0469 0.956 0.988 0.000 0.012 0.000
#> SRR834577 1 0.3695 0.927 0.828 0.000 0.016 0.156
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.5064 0.7713 0.000 0.248 0.000 0.672 NA
#> SRR650134 2 0.0290 0.7431 0.000 0.992 0.000 0.000 NA
#> SRR650135 2 0.5535 0.4686 0.000 0.620 0.000 0.272 NA
#> SRR650136 4 0.5155 0.7002 0.000 0.352 0.000 0.596 NA
#> SRR650137 2 0.0162 0.7424 0.000 0.996 0.000 0.000 NA
#> SRR650140 2 0.1444 0.7401 0.000 0.948 0.000 0.040 NA
#> SRR650141 4 0.5066 0.7715 0.000 0.240 0.000 0.676 NA
#> SRR650144 4 0.4777 0.7652 0.000 0.268 0.000 0.680 NA
#> SRR650147 4 0.5117 0.7699 0.000 0.240 0.000 0.672 NA
#> SRR650150 2 0.0290 0.7403 0.000 0.992 0.000 0.000 NA
#> SRR650153 4 0.5966 0.2470 0.000 0.432 0.000 0.460 NA
#> SRR650156 2 0.5515 0.4745 0.000 0.624 0.000 0.268 NA
#> SRR650159 2 0.0000 0.7427 0.000 1.000 0.000 0.000 NA
#> SRR650162 2 0.0000 0.7427 0.000 1.000 0.000 0.000 NA
#> SRR650168 4 0.4768 0.7555 0.000 0.180 0.000 0.724 NA
#> SRR650166 2 0.0162 0.7424 0.000 0.996 0.000 0.000 NA
#> SRR650167 2 0.3857 0.7206 0.000 0.808 0.000 0.108 NA
#> SRR650171 4 0.4574 0.6535 0.000 0.412 0.000 0.576 NA
#> SRR650165 2 0.0162 0.7424 0.000 0.996 0.000 0.000 NA
#> SRR650176 4 0.4505 0.6939 0.000 0.384 0.000 0.604 NA
#> SRR650177 4 0.4505 0.6939 0.000 0.384 0.000 0.604 NA
#> SRR650180 4 0.3934 0.7852 0.000 0.244 0.000 0.740 NA
#> SRR650179 2 0.1992 0.7436 0.000 0.924 0.000 0.032 NA
#> SRR650181 2 0.5666 0.3884 0.000 0.592 0.000 0.300 NA
#> SRR650183 4 0.4589 0.7725 0.000 0.212 0.000 0.724 NA
#> SRR650184 4 0.5656 0.6296 0.000 0.116 0.024 0.680 NA
#> SRR650185 4 0.5656 0.6296 0.000 0.116 0.024 0.680 NA
#> SRR650188 2 0.5130 0.5857 0.000 0.680 0.000 0.220 NA
#> SRR650191 3 0.5703 0.6183 0.000 0.000 0.628 0.184 NA
#> SRR650192 4 0.4014 0.7838 0.000 0.256 0.000 0.728 NA
#> SRR650195 4 0.4845 0.7016 0.000 0.148 0.000 0.724 NA
#> SRR650198 2 0.0162 0.7424 0.000 0.996 0.000 0.000 NA
#> SRR650200 2 0.3857 0.7206 0.000 0.808 0.000 0.108 NA
#> SRR650196 2 0.3648 0.7277 0.000 0.824 0.000 0.092 NA
#> SRR650197 2 0.0162 0.7424 0.000 0.996 0.000 0.000 NA
#> SRR650201 2 0.4057 0.7136 0.000 0.792 0.000 0.120 NA
#> SRR650203 2 0.4873 0.5671 0.000 0.688 0.000 0.244 NA
#> SRR650204 2 0.0162 0.7424 0.000 0.996 0.000 0.000 NA
#> SRR650202 4 0.4805 0.7231 0.000 0.312 0.000 0.648 NA
#> SRR650130 2 0.3962 0.7177 0.000 0.800 0.000 0.112 NA
#> SRR650131 4 0.4637 0.7561 0.000 0.292 0.000 0.672 NA
#> SRR650132 2 0.3906 0.7189 0.000 0.804 0.000 0.112 NA
#> SRR650133 4 0.4901 0.7405 0.000 0.168 0.000 0.716 NA
#> SRR650138 3 0.4101 0.7701 0.000 0.000 0.628 0.000 NA
#> SRR650139 3 0.4101 0.7701 0.000 0.000 0.628 0.000 NA
#> SRR650142 3 0.2513 0.8693 0.000 0.000 0.876 0.008 NA
#> SRR650143 3 0.2513 0.8693 0.000 0.000 0.876 0.008 NA
#> SRR650145 3 0.4101 0.7701 0.000 0.000 0.628 0.000 NA
#> SRR650146 3 0.4101 0.7701 0.000 0.000 0.628 0.000 NA
#> SRR650148 3 0.1549 0.8693 0.000 0.000 0.944 0.040 NA
#> SRR650149 3 0.1549 0.8693 0.000 0.000 0.944 0.040 NA
#> SRR650151 3 0.1997 0.8697 0.000 0.000 0.924 0.036 NA
#> SRR650152 3 0.1997 0.8697 0.000 0.000 0.924 0.036 NA
#> SRR650154 3 0.4863 0.7627 0.000 0.000 0.672 0.056 NA
#> SRR650155 3 0.4863 0.7627 0.000 0.000 0.672 0.056 NA
#> SRR650157 3 0.3013 0.8591 0.000 0.000 0.832 0.008 NA
#> SRR650158 3 0.3013 0.8591 0.000 0.000 0.832 0.008 NA
#> SRR650160 2 0.7613 0.1438 0.000 0.484 0.100 0.252 NA
#> SRR650161 2 0.7613 0.1438 0.000 0.484 0.100 0.252 NA
#> SRR650163 3 0.2513 0.8693 0.000 0.000 0.876 0.008 NA
#> SRR650164 3 0.2513 0.8693 0.000 0.000 0.876 0.008 NA
#> SRR650169 3 0.2209 0.8575 0.000 0.000 0.912 0.032 NA
#> SRR650170 3 0.2209 0.8575 0.000 0.000 0.912 0.032 NA
#> SRR650172 3 0.1281 0.8723 0.000 0.000 0.956 0.032 NA
#> SRR650173 3 0.1281 0.8723 0.000 0.000 0.956 0.032 NA
#> SRR650174 3 0.1626 0.8692 0.000 0.000 0.940 0.044 NA
#> SRR650175 3 0.1626 0.8692 0.000 0.000 0.940 0.044 NA
#> SRR650178 2 0.4764 0.6889 0.000 0.732 0.000 0.140 NA
#> SRR650182 2 0.4764 0.6889 0.000 0.732 0.000 0.140 NA
#> SRR650186 3 0.2612 0.8690 0.000 0.000 0.868 0.008 NA
#> SRR650187 3 0.2612 0.8690 0.000 0.000 0.868 0.008 NA
#> SRR650189 3 0.0451 0.8763 0.000 0.000 0.988 0.004 NA
#> SRR650190 3 0.0451 0.8763 0.000 0.000 0.988 0.004 NA
#> SRR650193 2 0.4367 -0.0739 0.000 0.620 0.000 0.372 NA
#> SRR650194 2 0.4367 -0.0739 0.000 0.620 0.000 0.372 NA
#> SRR834560 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834561 1 0.4763 0.8504 0.712 0.000 0.000 0.076 NA
#> SRR834562 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834563 1 0.4763 0.8504 0.712 0.000 0.000 0.076 NA
#> SRR834564 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834565 1 0.4763 0.8504 0.712 0.000 0.000 0.076 NA
#> SRR834566 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834567 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834568 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834569 1 0.4461 0.8553 0.728 0.000 0.000 0.052 NA
#> SRR834570 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834571 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834572 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834573 1 0.4666 0.8467 0.704 0.000 0.000 0.056 NA
#> SRR834574 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834575 1 0.4536 0.8502 0.712 0.000 0.000 0.048 NA
#> SRR834576 1 0.0000 0.9118 1.000 0.000 0.000 0.000 NA
#> SRR834577 1 0.4666 0.8467 0.704 0.000 0.000 0.056 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.4635 0.714 0.000 0.116 0.000 0.728 NA 0.136
#> SRR650134 2 0.0260 0.672 0.000 0.992 0.000 0.000 NA 0.008
#> SRR650135 2 0.5720 0.520 0.000 0.488 0.000 0.180 NA 0.332
#> SRR650136 4 0.5895 0.611 0.000 0.248 0.000 0.584 NA 0.124
#> SRR650137 2 0.0000 0.671 0.000 1.000 0.000 0.000 NA 0.000
#> SRR650140 2 0.3005 0.663 0.000 0.856 0.000 0.036 NA 0.092
#> SRR650141 4 0.4709 0.714 0.000 0.112 0.000 0.724 NA 0.140
#> SRR650144 4 0.5277 0.684 0.000 0.148 0.000 0.680 NA 0.128
#> SRR650147 4 0.4784 0.712 0.000 0.112 0.000 0.720 NA 0.140
#> SRR650150 2 0.0508 0.664 0.000 0.984 0.000 0.000 NA 0.004
#> SRR650153 4 0.6127 -0.146 0.000 0.320 0.000 0.352 NA 0.328
#> SRR650156 2 0.5679 0.532 0.000 0.500 0.000 0.176 NA 0.324
#> SRR650159 2 0.0508 0.664 0.000 0.984 0.000 0.000 NA 0.004
#> SRR650162 2 0.0508 0.664 0.000 0.984 0.000 0.000 NA 0.004
#> SRR650168 4 0.4390 0.710 0.000 0.072 0.000 0.752 NA 0.148
#> SRR650166 2 0.0000 0.671 0.000 1.000 0.000 0.000 NA 0.000
#> SRR650167 2 0.4402 0.663 0.000 0.672 0.000 0.060 NA 0.268
#> SRR650171 4 0.4824 0.579 0.000 0.328 0.000 0.616 NA 0.028
#> SRR650165 2 0.0405 0.665 0.000 0.988 0.000 0.000 NA 0.004
#> SRR650176 4 0.4585 0.613 0.000 0.304 0.000 0.648 NA 0.020
#> SRR650177 4 0.4585 0.613 0.000 0.304 0.000 0.648 NA 0.020
#> SRR650180 4 0.2895 0.732 0.000 0.116 0.000 0.852 NA 0.016
#> SRR650179 2 0.3432 0.676 0.000 0.764 0.000 0.020 NA 0.216
#> SRR650181 2 0.5994 0.395 0.000 0.424 0.000 0.244 NA 0.332
#> SRR650183 4 0.4914 0.687 0.000 0.096 0.000 0.700 NA 0.176
#> SRR650184 4 0.5683 0.606 0.000 0.028 0.016 0.632 NA 0.228
#> SRR650185 4 0.5683 0.606 0.000 0.028 0.016 0.632 NA 0.228
#> SRR650188 2 0.5543 0.563 0.000 0.524 0.000 0.156 NA 0.320
#> SRR650191 3 0.6395 0.447 0.000 0.000 0.552 0.192 NA 0.184
#> SRR650192 4 0.3036 0.731 0.000 0.124 0.000 0.840 NA 0.028
#> SRR650195 4 0.5366 0.639 0.000 0.048 0.000 0.660 NA 0.200
#> SRR650198 2 0.0547 0.666 0.000 0.980 0.000 0.000 NA 0.020
#> SRR650200 2 0.4402 0.663 0.000 0.672 0.000 0.060 NA 0.268
#> SRR650196 2 0.4515 0.659 0.000 0.640 0.000 0.056 NA 0.304
#> SRR650197 2 0.0000 0.671 0.000 1.000 0.000 0.000 NA 0.000
#> SRR650201 2 0.4859 0.636 0.000 0.612 0.000 0.084 NA 0.304
#> SRR650203 2 0.5676 0.452 0.000 0.540 0.000 0.280 NA 0.176
#> SRR650204 2 0.0000 0.671 0.000 1.000 0.000 0.000 NA 0.000
#> SRR650202 4 0.4501 0.677 0.000 0.176 0.000 0.724 NA 0.088
#> SRR650130 2 0.4499 0.658 0.000 0.652 0.000 0.060 NA 0.288
#> SRR650131 4 0.4099 0.711 0.000 0.152 0.000 0.764 NA 0.072
#> SRR650132 2 0.4360 0.665 0.000 0.680 0.000 0.060 NA 0.260
#> SRR650133 4 0.4801 0.696 0.000 0.072 0.000 0.716 NA 0.172
#> SRR650138 3 0.5656 0.653 0.000 0.000 0.480 0.004 NA 0.136
#> SRR650139 3 0.5656 0.653 0.000 0.000 0.480 0.004 NA 0.136
#> SRR650142 3 0.3321 0.822 0.000 0.000 0.832 0.008 NA 0.072
#> SRR650143 3 0.3321 0.822 0.000 0.000 0.832 0.008 NA 0.072
#> SRR650145 3 0.5656 0.653 0.000 0.000 0.480 0.004 NA 0.136
#> SRR650146 3 0.5656 0.653 0.000 0.000 0.480 0.004 NA 0.136
#> SRR650148 3 0.1332 0.824 0.000 0.000 0.952 0.012 NA 0.028
#> SRR650149 3 0.1332 0.824 0.000 0.000 0.952 0.012 NA 0.028
#> SRR650151 3 0.2390 0.817 0.000 0.000 0.896 0.008 NA 0.052
#> SRR650152 3 0.2390 0.817 0.000 0.000 0.896 0.008 NA 0.052
#> SRR650154 3 0.6094 0.637 0.000 0.000 0.516 0.020 NA 0.196
#> SRR650155 3 0.6094 0.637 0.000 0.000 0.516 0.020 NA 0.196
#> SRR650157 3 0.4082 0.802 0.000 0.000 0.764 0.008 NA 0.084
#> SRR650158 3 0.4082 0.802 0.000 0.000 0.764 0.008 NA 0.084
#> SRR650160 2 0.8464 0.131 0.000 0.336 0.140 0.168 NA 0.260
#> SRR650161 2 0.8464 0.131 0.000 0.336 0.140 0.168 NA 0.260
#> SRR650163 3 0.3265 0.823 0.000 0.000 0.836 0.008 NA 0.068
#> SRR650164 3 0.3265 0.823 0.000 0.000 0.836 0.008 NA 0.068
#> SRR650169 3 0.2195 0.811 0.000 0.000 0.904 0.012 NA 0.068
#> SRR650170 3 0.2195 0.811 0.000 0.000 0.904 0.012 NA 0.068
#> SRR650172 3 0.1078 0.827 0.000 0.000 0.964 0.012 NA 0.016
#> SRR650173 3 0.1078 0.827 0.000 0.000 0.964 0.012 NA 0.016
#> SRR650174 3 0.1448 0.824 0.000 0.000 0.948 0.012 NA 0.024
#> SRR650175 3 0.1448 0.824 0.000 0.000 0.948 0.012 NA 0.024
#> SRR650178 2 0.5422 0.624 0.000 0.580 0.000 0.080 NA 0.316
#> SRR650182 2 0.5422 0.624 0.000 0.580 0.000 0.080 NA 0.316
#> SRR650186 3 0.3375 0.822 0.000 0.000 0.828 0.008 NA 0.076
#> SRR650187 3 0.3375 0.822 0.000 0.000 0.828 0.008 NA 0.076
#> SRR650189 3 0.0405 0.830 0.000 0.000 0.988 0.000 NA 0.004
#> SRR650190 3 0.0405 0.830 0.000 0.000 0.988 0.000 NA 0.004
#> SRR650193 2 0.4522 -0.149 0.000 0.548 0.000 0.424 NA 0.008
#> SRR650194 2 0.4522 -0.149 0.000 0.548 0.000 0.424 NA 0.008
#> SRR834560 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834561 1 0.4883 0.774 0.616 0.000 0.000 0.016 NA 0.048
#> SRR834562 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834563 1 0.4883 0.774 0.616 0.000 0.000 0.016 NA 0.048
#> SRR834564 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834565 1 0.4883 0.774 0.616 0.000 0.000 0.016 NA 0.048
#> SRR834566 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834567 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834568 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834569 1 0.3983 0.784 0.640 0.000 0.000 0.004 NA 0.008
#> SRR834570 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834571 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834572 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834573 1 0.4069 0.772 0.612 0.000 0.000 0.004 NA 0.008
#> SRR834574 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834575 1 0.3717 0.775 0.616 0.000 0.000 0.000 NA 0.000
#> SRR834576 1 0.0000 0.872 1.000 0.000 0.000 0.000 NA 0.000
#> SRR834577 1 0.4069 0.772 0.612 0.000 0.000 0.004 NA 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["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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.983 0.993 0.5056 0.495 0.495
#> 3 3 1.000 0.943 0.979 0.2513 0.820 0.654
#> 4 4 0.996 0.948 0.971 0.1838 0.842 0.591
#> 5 5 0.807 0.787 0.849 0.0476 0.971 0.887
#> 6 6 0.819 0.789 0.821 0.0320 0.967 0.860
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 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
#> SRR650205 2 0.000 0.986 0.000 1.000
#> SRR650134 2 0.000 0.986 0.000 1.000
#> SRR650135 2 0.000 0.986 0.000 1.000
#> SRR650136 2 0.000 0.986 0.000 1.000
#> SRR650137 2 0.000 0.986 0.000 1.000
#> SRR650140 2 0.000 0.986 0.000 1.000
#> SRR650141 2 0.000 0.986 0.000 1.000
#> SRR650144 2 0.000 0.986 0.000 1.000
#> SRR650147 2 0.000 0.986 0.000 1.000
#> SRR650150 2 0.000 0.986 0.000 1.000
#> SRR650153 2 0.000 0.986 0.000 1.000
#> SRR650156 2 0.000 0.986 0.000 1.000
#> SRR650159 2 0.000 0.986 0.000 1.000
#> SRR650162 2 0.000 0.986 0.000 1.000
#> SRR650168 2 0.000 0.986 0.000 1.000
#> SRR650166 2 0.000 0.986 0.000 1.000
#> SRR650167 2 0.000 0.986 0.000 1.000
#> SRR650171 2 0.000 0.986 0.000 1.000
#> SRR650165 2 0.000 0.986 0.000 1.000
#> SRR650176 2 0.000 0.986 0.000 1.000
#> SRR650177 2 0.000 0.986 0.000 1.000
#> SRR650180 2 0.000 0.986 0.000 1.000
#> SRR650179 2 0.000 0.986 0.000 1.000
#> SRR650181 2 0.000 0.986 0.000 1.000
#> SRR650183 2 0.000 0.986 0.000 1.000
#> SRR650184 2 0.000 0.986 0.000 1.000
#> SRR650185 2 0.000 0.986 0.000 1.000
#> SRR650188 2 0.000 0.986 0.000 1.000
#> SRR650191 1 0.000 1.000 1.000 0.000
#> SRR650192 2 0.000 0.986 0.000 1.000
#> SRR650195 2 0.000 0.986 0.000 1.000
#> SRR650198 2 0.000 0.986 0.000 1.000
#> SRR650200 2 0.000 0.986 0.000 1.000
#> SRR650196 2 0.000 0.986 0.000 1.000
#> SRR650197 2 0.000 0.986 0.000 1.000
#> SRR650201 2 0.000 0.986 0.000 1.000
#> SRR650203 2 0.000 0.986 0.000 1.000
#> SRR650204 2 0.000 0.986 0.000 1.000
#> SRR650202 2 0.000 0.986 0.000 1.000
#> SRR650130 2 0.000 0.986 0.000 1.000
#> SRR650131 2 0.000 0.986 0.000 1.000
#> SRR650132 2 0.000 0.986 0.000 1.000
#> SRR650133 2 0.000 0.986 0.000 1.000
#> SRR650138 1 0.000 1.000 1.000 0.000
#> SRR650139 1 0.000 1.000 1.000 0.000
#> SRR650142 1 0.000 1.000 1.000 0.000
#> SRR650143 1 0.000 1.000 1.000 0.000
#> SRR650145 1 0.000 1.000 1.000 0.000
#> SRR650146 1 0.000 1.000 1.000 0.000
#> SRR650148 1 0.000 1.000 1.000 0.000
#> SRR650149 1 0.000 1.000 1.000 0.000
#> SRR650151 1 0.000 1.000 1.000 0.000
#> SRR650152 1 0.000 1.000 1.000 0.000
#> SRR650154 1 0.000 1.000 1.000 0.000
#> SRR650155 1 0.000 1.000 1.000 0.000
#> SRR650157 1 0.000 1.000 1.000 0.000
#> SRR650158 1 0.000 1.000 1.000 0.000
#> SRR650160 2 0.909 0.531 0.324 0.676
#> SRR650161 2 0.909 0.531 0.324 0.676
#> SRR650163 1 0.000 1.000 1.000 0.000
#> SRR650164 1 0.000 1.000 1.000 0.000
#> SRR650169 1 0.000 1.000 1.000 0.000
#> SRR650170 1 0.000 1.000 1.000 0.000
#> SRR650172 1 0.000 1.000 1.000 0.000
#> SRR650173 1 0.000 1.000 1.000 0.000
#> SRR650174 1 0.000 1.000 1.000 0.000
#> SRR650175 1 0.000 1.000 1.000 0.000
#> SRR650178 2 0.000 0.986 0.000 1.000
#> SRR650182 2 0.000 0.986 0.000 1.000
#> SRR650186 1 0.000 1.000 1.000 0.000
#> SRR650187 1 0.000 1.000 1.000 0.000
#> SRR650189 1 0.000 1.000 1.000 0.000
#> SRR650190 1 0.000 1.000 1.000 0.000
#> SRR650193 2 0.000 0.986 0.000 1.000
#> SRR650194 2 0.000 0.986 0.000 1.000
#> SRR834560 1 0.000 1.000 1.000 0.000
#> SRR834561 1 0.000 1.000 1.000 0.000
#> SRR834562 1 0.000 1.000 1.000 0.000
#> SRR834563 1 0.000 1.000 1.000 0.000
#> SRR834564 1 0.000 1.000 1.000 0.000
#> SRR834565 1 0.000 1.000 1.000 0.000
#> SRR834566 1 0.000 1.000 1.000 0.000
#> SRR834567 1 0.000 1.000 1.000 0.000
#> SRR834568 1 0.000 1.000 1.000 0.000
#> SRR834569 1 0.000 1.000 1.000 0.000
#> SRR834570 1 0.000 1.000 1.000 0.000
#> SRR834571 1 0.000 1.000 1.000 0.000
#> SRR834572 1 0.000 1.000 1.000 0.000
#> SRR834573 1 0.000 1.000 1.000 0.000
#> SRR834574 1 0.000 1.000 1.000 0.000
#> SRR834575 1 0.000 1.000 1.000 0.000
#> SRR834576 1 0.000 1.000 1.000 0.000
#> SRR834577 1 0.000 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.000 1.000 0.0 1.000 0.000
#> SRR650134 2 0.000 1.000 0.0 1.000 0.000
#> SRR650135 2 0.000 1.000 0.0 1.000 0.000
#> SRR650136 2 0.000 1.000 0.0 1.000 0.000
#> SRR650137 2 0.000 1.000 0.0 1.000 0.000
#> SRR650140 2 0.000 1.000 0.0 1.000 0.000
#> SRR650141 2 0.000 1.000 0.0 1.000 0.000
#> SRR650144 2 0.000 1.000 0.0 1.000 0.000
#> SRR650147 2 0.000 1.000 0.0 1.000 0.000
#> SRR650150 2 0.000 1.000 0.0 1.000 0.000
#> SRR650153 2 0.000 1.000 0.0 1.000 0.000
#> SRR650156 2 0.000 1.000 0.0 1.000 0.000
#> SRR650159 2 0.000 1.000 0.0 1.000 0.000
#> SRR650162 2 0.000 1.000 0.0 1.000 0.000
#> SRR650168 2 0.000 1.000 0.0 1.000 0.000
#> SRR650166 2 0.000 1.000 0.0 1.000 0.000
#> SRR650167 2 0.000 1.000 0.0 1.000 0.000
#> SRR650171 2 0.000 1.000 0.0 1.000 0.000
#> SRR650165 2 0.000 1.000 0.0 1.000 0.000
#> SRR650176 2 0.000 1.000 0.0 1.000 0.000
#> SRR650177 2 0.000 1.000 0.0 1.000 0.000
#> SRR650180 2 0.000 1.000 0.0 1.000 0.000
#> SRR650179 2 0.000 1.000 0.0 1.000 0.000
#> SRR650181 2 0.000 1.000 0.0 1.000 0.000
#> SRR650183 2 0.000 1.000 0.0 1.000 0.000
#> SRR650184 3 0.621 0.280 0.0 0.428 0.572
#> SRR650185 3 0.621 0.280 0.0 0.428 0.572
#> SRR650188 2 0.000 1.000 0.0 1.000 0.000
#> SRR650191 3 0.000 0.927 0.0 0.000 1.000
#> SRR650192 2 0.000 1.000 0.0 1.000 0.000
#> SRR650195 2 0.000 1.000 0.0 1.000 0.000
#> SRR650198 2 0.000 1.000 0.0 1.000 0.000
#> SRR650200 2 0.000 1.000 0.0 1.000 0.000
#> SRR650196 2 0.000 1.000 0.0 1.000 0.000
#> SRR650197 2 0.000 1.000 0.0 1.000 0.000
#> SRR650201 2 0.000 1.000 0.0 1.000 0.000
#> SRR650203 2 0.000 1.000 0.0 1.000 0.000
#> SRR650204 2 0.000 1.000 0.0 1.000 0.000
#> SRR650202 2 0.000 1.000 0.0 1.000 0.000
#> SRR650130 2 0.000 1.000 0.0 1.000 0.000
#> SRR650131 2 0.000 1.000 0.0 1.000 0.000
#> SRR650132 2 0.000 1.000 0.0 1.000 0.000
#> SRR650133 2 0.000 1.000 0.0 1.000 0.000
#> SRR650138 3 0.000 0.927 0.0 0.000 1.000
#> SRR650139 3 0.000 0.927 0.0 0.000 1.000
#> SRR650142 3 0.000 0.927 0.0 0.000 1.000
#> SRR650143 3 0.000 0.927 0.0 0.000 1.000
#> SRR650145 3 0.000 0.927 0.0 0.000 1.000
#> SRR650146 3 0.000 0.927 0.0 0.000 1.000
#> SRR650148 3 0.000 0.927 0.0 0.000 1.000
#> SRR650149 3 0.000 0.927 0.0 0.000 1.000
#> SRR650151 3 0.000 0.927 0.0 0.000 1.000
#> SRR650152 3 0.000 0.927 0.0 0.000 1.000
#> SRR650154 3 0.000 0.927 0.0 0.000 1.000
#> SRR650155 3 0.000 0.927 0.0 0.000 1.000
#> SRR650157 3 0.000 0.927 0.0 0.000 1.000
#> SRR650158 3 0.000 0.927 0.0 0.000 1.000
#> SRR650160 3 0.933 0.041 0.4 0.164 0.436
#> SRR650161 3 0.933 0.041 0.4 0.164 0.436
#> SRR650163 3 0.000 0.927 0.0 0.000 1.000
#> SRR650164 3 0.000 0.927 0.0 0.000 1.000
#> SRR650169 3 0.000 0.927 0.0 0.000 1.000
#> SRR650170 3 0.000 0.927 0.0 0.000 1.000
#> SRR650172 3 0.000 0.927 0.0 0.000 1.000
#> SRR650173 3 0.000 0.927 0.0 0.000 1.000
#> SRR650174 3 0.000 0.927 0.0 0.000 1.000
#> SRR650175 3 0.000 0.927 0.0 0.000 1.000
#> SRR650178 2 0.000 1.000 0.0 1.000 0.000
#> SRR650182 2 0.000 1.000 0.0 1.000 0.000
#> SRR650186 3 0.000 0.927 0.0 0.000 1.000
#> SRR650187 3 0.000 0.927 0.0 0.000 1.000
#> SRR650189 3 0.000 0.927 0.0 0.000 1.000
#> SRR650190 3 0.000 0.927 0.0 0.000 1.000
#> SRR650193 2 0.000 1.000 0.0 1.000 0.000
#> SRR650194 2 0.000 1.000 0.0 1.000 0.000
#> SRR834560 1 0.000 1.000 1.0 0.000 0.000
#> SRR834561 1 0.000 1.000 1.0 0.000 0.000
#> SRR834562 1 0.000 1.000 1.0 0.000 0.000
#> SRR834563 1 0.000 1.000 1.0 0.000 0.000
#> SRR834564 1 0.000 1.000 1.0 0.000 0.000
#> SRR834565 1 0.000 1.000 1.0 0.000 0.000
#> SRR834566 1 0.000 1.000 1.0 0.000 0.000
#> SRR834567 1 0.000 1.000 1.0 0.000 0.000
#> SRR834568 1 0.000 1.000 1.0 0.000 0.000
#> SRR834569 1 0.000 1.000 1.0 0.000 0.000
#> SRR834570 1 0.000 1.000 1.0 0.000 0.000
#> SRR834571 1 0.000 1.000 1.0 0.000 0.000
#> SRR834572 1 0.000 1.000 1.0 0.000 0.000
#> SRR834573 1 0.000 1.000 1.0 0.000 0.000
#> SRR834574 1 0.000 1.000 1.0 0.000 0.000
#> SRR834575 1 0.000 1.000 1.0 0.000 0.000
#> SRR834576 1 0.000 1.000 1.0 0.000 0.000
#> SRR834577 1 0.000 1.000 1.0 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.1389 0.955 0.000 0.048 0.000 0.952
#> SRR650134 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650135 2 0.1637 0.899 0.000 0.940 0.000 0.060
#> SRR650136 4 0.1022 0.956 0.000 0.032 0.000 0.968
#> SRR650137 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650141 4 0.1389 0.955 0.000 0.048 0.000 0.952
#> SRR650144 4 0.1022 0.957 0.000 0.032 0.000 0.968
#> SRR650147 4 0.1792 0.944 0.000 0.068 0.000 0.932
#> SRR650150 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650153 4 0.4967 0.221 0.000 0.452 0.000 0.548
#> SRR650156 2 0.1637 0.899 0.000 0.940 0.000 0.060
#> SRR650159 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650168 4 0.0336 0.946 0.000 0.008 0.000 0.992
#> SRR650166 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650167 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650171 4 0.1302 0.957 0.000 0.044 0.000 0.956
#> SRR650165 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650176 4 0.1211 0.958 0.000 0.040 0.000 0.960
#> SRR650177 4 0.1211 0.958 0.000 0.040 0.000 0.960
#> SRR650180 4 0.0817 0.955 0.000 0.024 0.000 0.976
#> SRR650179 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650181 2 0.3942 0.658 0.000 0.764 0.000 0.236
#> SRR650183 4 0.0817 0.955 0.000 0.024 0.000 0.976
#> SRR650184 4 0.0188 0.940 0.000 0.000 0.004 0.996
#> SRR650185 4 0.0188 0.940 0.000 0.000 0.004 0.996
#> SRR650188 2 0.0336 0.943 0.000 0.992 0.000 0.008
#> SRR650191 3 0.0707 0.983 0.000 0.000 0.980 0.020
#> SRR650192 4 0.1118 0.958 0.000 0.036 0.000 0.964
#> SRR650195 4 0.0336 0.946 0.000 0.008 0.000 0.992
#> SRR650198 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650200 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650196 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650197 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650201 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650203 2 0.0817 0.931 0.000 0.976 0.000 0.024
#> SRR650204 2 0.0000 0.945 0.000 1.000 0.000 0.000
#> SRR650202 4 0.1557 0.952 0.000 0.056 0.000 0.944
#> SRR650130 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650131 4 0.1474 0.954 0.000 0.052 0.000 0.948
#> SRR650132 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650133 4 0.1022 0.954 0.000 0.032 0.000 0.968
#> SRR650138 3 0.0336 0.994 0.000 0.000 0.992 0.008
#> SRR650139 3 0.0336 0.994 0.000 0.000 0.992 0.008
#> SRR650142 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650145 3 0.0336 0.994 0.000 0.000 0.992 0.008
#> SRR650146 3 0.0336 0.994 0.000 0.000 0.992 0.008
#> SRR650148 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650154 3 0.0336 0.994 0.000 0.000 0.992 0.008
#> SRR650155 3 0.0336 0.994 0.000 0.000 0.992 0.008
#> SRR650157 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650160 2 0.8135 0.369 0.196 0.504 0.268 0.032
#> SRR650161 2 0.8135 0.369 0.196 0.504 0.268 0.032
#> SRR650163 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650169 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650170 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650172 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650178 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650182 2 0.0188 0.945 0.000 0.996 0.000 0.004
#> SRR650186 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.998 0.000 0.000 1.000 0.000
#> SRR650193 4 0.1940 0.942 0.000 0.076 0.000 0.924
#> SRR650194 4 0.1940 0.942 0.000 0.076 0.000 0.924
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 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
#> SRR650205 4 0.1918 0.877 0.000 0.036 0.000 0.928 0.036
#> SRR650134 2 0.3741 0.779 0.000 0.732 0.000 0.004 0.264
#> SRR650135 2 0.1893 0.756 0.000 0.928 0.000 0.048 0.024
#> SRR650136 4 0.3942 0.825 0.000 0.020 0.000 0.748 0.232
#> SRR650137 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650140 2 0.3890 0.781 0.000 0.736 0.000 0.012 0.252
#> SRR650141 4 0.1918 0.877 0.000 0.036 0.000 0.928 0.036
#> SRR650144 4 0.3519 0.841 0.000 0.008 0.000 0.776 0.216
#> SRR650147 4 0.2514 0.867 0.000 0.060 0.000 0.896 0.044
#> SRR650150 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650153 2 0.4268 0.448 0.000 0.708 0.000 0.268 0.024
#> SRR650156 2 0.1893 0.756 0.000 0.928 0.000 0.048 0.024
#> SRR650159 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650162 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650168 4 0.1768 0.864 0.000 0.004 0.000 0.924 0.072
#> SRR650166 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650167 2 0.0000 0.797 0.000 1.000 0.000 0.000 0.000
#> SRR650171 4 0.3061 0.849 0.000 0.020 0.000 0.844 0.136
#> SRR650165 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650176 4 0.2563 0.863 0.000 0.008 0.000 0.872 0.120
#> SRR650177 4 0.2563 0.863 0.000 0.008 0.000 0.872 0.120
#> SRR650180 4 0.0798 0.879 0.000 0.008 0.000 0.976 0.016
#> SRR650179 2 0.3491 0.784 0.000 0.768 0.000 0.004 0.228
#> SRR650181 2 0.2915 0.680 0.000 0.860 0.000 0.116 0.024
#> SRR650183 4 0.4406 0.808 0.000 0.108 0.000 0.764 0.128
#> SRR650184 4 0.2813 0.839 0.000 0.000 0.000 0.832 0.168
#> SRR650185 4 0.2813 0.839 0.000 0.000 0.000 0.832 0.168
#> SRR650188 2 0.1281 0.776 0.000 0.956 0.000 0.032 0.012
#> SRR650191 5 0.6030 -0.617 0.000 0.000 0.420 0.116 0.464
#> SRR650192 4 0.0404 0.879 0.000 0.012 0.000 0.988 0.000
#> SRR650195 4 0.2848 0.844 0.000 0.004 0.000 0.840 0.156
#> SRR650198 2 0.3838 0.768 0.000 0.716 0.000 0.004 0.280
#> SRR650200 2 0.0000 0.797 0.000 1.000 0.000 0.000 0.000
#> SRR650196 2 0.0000 0.797 0.000 1.000 0.000 0.000 0.000
#> SRR650197 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650201 2 0.0000 0.797 0.000 1.000 0.000 0.000 0.000
#> SRR650203 2 0.1211 0.794 0.000 0.960 0.000 0.024 0.016
#> SRR650204 2 0.3766 0.778 0.000 0.728 0.000 0.004 0.268
#> SRR650202 4 0.1608 0.873 0.000 0.072 0.000 0.928 0.000
#> SRR650130 2 0.0000 0.797 0.000 1.000 0.000 0.000 0.000
#> SRR650131 4 0.1270 0.880 0.000 0.052 0.000 0.948 0.000
#> SRR650132 2 0.0404 0.799 0.000 0.988 0.000 0.000 0.012
#> SRR650133 4 0.2423 0.863 0.000 0.024 0.000 0.896 0.080
#> SRR650138 3 0.0000 0.455 0.000 0.000 1.000 0.000 0.000
#> SRR650139 3 0.0000 0.455 0.000 0.000 1.000 0.000 0.000
#> SRR650142 3 0.4101 0.761 0.000 0.000 0.628 0.000 0.372
#> SRR650143 3 0.4101 0.761 0.000 0.000 0.628 0.000 0.372
#> SRR650145 3 0.0000 0.455 0.000 0.000 1.000 0.000 0.000
#> SRR650146 3 0.0000 0.455 0.000 0.000 1.000 0.000 0.000
#> SRR650148 3 0.4304 0.760 0.000 0.000 0.516 0.000 0.484
#> SRR650149 3 0.4304 0.760 0.000 0.000 0.516 0.000 0.484
#> SRR650151 3 0.4278 0.754 0.000 0.000 0.548 0.000 0.452
#> SRR650152 3 0.4278 0.754 0.000 0.000 0.548 0.000 0.452
#> SRR650154 3 0.0000 0.455 0.000 0.000 1.000 0.000 0.000
#> SRR650155 3 0.0000 0.455 0.000 0.000 1.000 0.000 0.000
#> SRR650157 3 0.4088 0.759 0.000 0.000 0.632 0.000 0.368
#> SRR650158 3 0.4088 0.759 0.000 0.000 0.632 0.000 0.368
#> SRR650160 5 0.6543 0.458 0.144 0.280 0.024 0.000 0.552
#> SRR650161 5 0.6543 0.458 0.144 0.280 0.024 0.000 0.552
#> SRR650163 3 0.4101 0.761 0.000 0.000 0.628 0.000 0.372
#> SRR650164 3 0.4101 0.761 0.000 0.000 0.628 0.000 0.372
#> SRR650169 3 0.4304 0.760 0.000 0.000 0.516 0.000 0.484
#> SRR650170 3 0.4304 0.760 0.000 0.000 0.516 0.000 0.484
#> SRR650172 3 0.4302 0.762 0.000 0.000 0.520 0.000 0.480
#> SRR650173 3 0.4302 0.762 0.000 0.000 0.520 0.000 0.480
#> SRR650174 3 0.4304 0.760 0.000 0.000 0.516 0.000 0.484
#> SRR650175 3 0.4304 0.760 0.000 0.000 0.516 0.000 0.484
#> SRR650178 2 0.0162 0.796 0.000 0.996 0.000 0.000 0.004
#> SRR650182 2 0.0162 0.796 0.000 0.996 0.000 0.000 0.004
#> SRR650186 3 0.4101 0.761 0.000 0.000 0.628 0.000 0.372
#> SRR650187 3 0.4101 0.761 0.000 0.000 0.628 0.000 0.372
#> SRR650189 3 0.4302 0.762 0.000 0.000 0.520 0.000 0.480
#> SRR650190 3 0.4302 0.762 0.000 0.000 0.520 0.000 0.480
#> SRR650193 4 0.4010 0.802 0.000 0.072 0.000 0.792 0.136
#> SRR650194 4 0.4010 0.802 0.000 0.072 0.000 0.792 0.136
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 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
#> SRR650205 4 0.2144 0.716 0.00 0.040 0.000 0.908 0.004 0.048
#> SRR650134 2 0.3804 0.622 0.00 0.576 0.000 0.000 0.424 0.000
#> SRR650135 2 0.1644 0.664 0.00 0.932 0.000 0.028 0.000 0.040
#> SRR650136 4 0.5975 0.604 0.00 0.036 0.000 0.476 0.100 0.388
#> SRR650137 2 0.3937 0.620 0.00 0.572 0.000 0.004 0.424 0.000
#> SRR650140 2 0.4362 0.618 0.00 0.584 0.000 0.028 0.388 0.000
#> SRR650141 4 0.2272 0.714 0.00 0.040 0.000 0.900 0.004 0.056
#> SRR650144 4 0.5442 0.632 0.00 0.020 0.000 0.520 0.072 0.388
#> SRR650147 4 0.2407 0.712 0.00 0.048 0.000 0.892 0.004 0.056
#> SRR650150 2 0.3950 0.614 0.00 0.564 0.000 0.004 0.432 0.000
#> SRR650153 2 0.3088 0.549 0.00 0.832 0.000 0.120 0.000 0.048
#> SRR650156 2 0.1633 0.664 0.00 0.932 0.000 0.024 0.000 0.044
#> SRR650159 2 0.3950 0.614 0.00 0.564 0.000 0.004 0.432 0.000
#> SRR650162 2 0.3950 0.614 0.00 0.564 0.000 0.004 0.432 0.000
#> SRR650168 4 0.1957 0.696 0.00 0.000 0.000 0.888 0.000 0.112
#> SRR650166 2 0.3937 0.620 0.00 0.572 0.000 0.004 0.424 0.000
#> SRR650167 2 0.0000 0.697 0.00 1.000 0.000 0.000 0.000 0.000
#> SRR650171 4 0.5314 0.657 0.00 0.040 0.000 0.668 0.180 0.112
#> SRR650165 2 0.3944 0.618 0.00 0.568 0.000 0.004 0.428 0.000
#> SRR650176 4 0.4345 0.721 0.00 0.012 0.000 0.748 0.112 0.128
#> SRR650177 4 0.4345 0.721 0.00 0.012 0.000 0.748 0.112 0.128
#> SRR650180 4 0.2623 0.740 0.00 0.016 0.000 0.852 0.000 0.132
#> SRR650179 2 0.3833 0.631 0.00 0.648 0.000 0.008 0.344 0.000
#> SRR650181 2 0.1863 0.653 0.00 0.920 0.000 0.036 0.000 0.044
#> SRR650183 4 0.5443 0.580 0.00 0.124 0.000 0.492 0.000 0.384
#> SRR650184 4 0.3995 0.602 0.00 0.000 0.000 0.516 0.004 0.480
#> SRR650185 4 0.3995 0.602 0.00 0.000 0.000 0.516 0.004 0.480
#> SRR650188 2 0.1320 0.675 0.00 0.948 0.000 0.016 0.000 0.036
#> SRR650191 3 0.5510 0.513 0.00 0.000 0.664 0.136 0.060 0.140
#> SRR650192 4 0.2122 0.743 0.00 0.024 0.000 0.900 0.000 0.076
#> SRR650195 4 0.3971 0.621 0.00 0.004 0.000 0.548 0.000 0.448
#> SRR650198 2 0.4062 0.600 0.00 0.552 0.000 0.008 0.440 0.000
#> SRR650200 2 0.0000 0.697 0.00 1.000 0.000 0.000 0.000 0.000
#> SRR650196 2 0.0260 0.699 0.00 0.992 0.000 0.000 0.008 0.000
#> SRR650197 2 0.3937 0.620 0.00 0.572 0.000 0.004 0.424 0.000
#> SRR650201 2 0.0000 0.697 0.00 1.000 0.000 0.000 0.000 0.000
#> SRR650203 2 0.2066 0.690 0.00 0.908 0.000 0.040 0.052 0.000
#> SRR650204 2 0.3944 0.617 0.00 0.568 0.000 0.004 0.428 0.000
#> SRR650202 4 0.2278 0.703 0.00 0.128 0.000 0.868 0.000 0.004
#> SRR650130 2 0.0146 0.697 0.00 0.996 0.000 0.004 0.000 0.000
#> SRR650131 4 0.1958 0.723 0.00 0.100 0.000 0.896 0.004 0.000
#> SRR650132 2 0.0790 0.700 0.00 0.968 0.000 0.000 0.032 0.000
#> SRR650133 4 0.2975 0.680 0.00 0.016 0.000 0.840 0.012 0.132
#> SRR650138 6 0.5976 0.991 0.00 0.000 0.228 0.000 0.364 0.408
#> SRR650139 6 0.5976 0.991 0.00 0.000 0.228 0.000 0.364 0.408
#> SRR650142 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650143 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650145 6 0.5976 0.991 0.00 0.000 0.228 0.000 0.364 0.408
#> SRR650146 6 0.5976 0.991 0.00 0.000 0.228 0.000 0.364 0.408
#> SRR650148 3 0.0820 0.855 0.00 0.000 0.972 0.000 0.016 0.012
#> SRR650149 3 0.0820 0.855 0.00 0.000 0.972 0.000 0.016 0.012
#> SRR650151 3 0.2384 0.781 0.00 0.000 0.884 0.000 0.032 0.084
#> SRR650152 3 0.2384 0.781 0.00 0.000 0.884 0.000 0.032 0.084
#> SRR650154 6 0.5970 0.981 0.00 0.000 0.228 0.000 0.356 0.416
#> SRR650155 6 0.5970 0.981 0.00 0.000 0.228 0.000 0.356 0.416
#> SRR650157 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650158 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650160 5 0.7364 1.000 0.06 0.108 0.328 0.000 0.436 0.068
#> SRR650161 5 0.7364 1.000 0.06 0.108 0.328 0.000 0.436 0.068
#> SRR650163 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650164 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650169 3 0.0260 0.864 0.00 0.000 0.992 0.000 0.008 0.000
#> SRR650170 3 0.0260 0.864 0.00 0.000 0.992 0.000 0.008 0.000
#> SRR650172 3 0.0363 0.860 0.00 0.000 0.988 0.000 0.012 0.000
#> SRR650173 3 0.0363 0.860 0.00 0.000 0.988 0.000 0.012 0.000
#> SRR650174 3 0.0820 0.855 0.00 0.000 0.972 0.000 0.016 0.012
#> SRR650175 3 0.0820 0.855 0.00 0.000 0.972 0.000 0.016 0.012
#> SRR650178 2 0.0790 0.686 0.00 0.968 0.000 0.000 0.032 0.000
#> SRR650182 2 0.0790 0.686 0.00 0.968 0.000 0.000 0.032 0.000
#> SRR650186 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650187 3 0.2572 0.828 0.00 0.000 0.852 0.000 0.136 0.012
#> SRR650189 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.000 0.000
#> SRR650190 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.000 0.000
#> SRR650193 4 0.5295 0.572 0.00 0.104 0.000 0.656 0.208 0.032
#> SRR650194 4 0.5295 0.572 0.00 0.104 0.000 0.656 0.208 0.032
#> SRR834560 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1.00 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", "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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.999 1.000 0.3157 0.684 0.684
#> 3 3 1.000 0.959 0.984 0.9800 0.697 0.557
#> 4 4 0.728 0.724 0.842 0.1710 0.877 0.677
#> 5 5 0.783 0.696 0.850 0.0768 0.889 0.611
#> 6 6 0.811 0.729 0.802 0.0475 0.925 0.656
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
#> SRR650205 2 0.00 1.000 0.000 1.000
#> SRR650134 2 0.00 1.000 0.000 1.000
#> SRR650135 2 0.00 1.000 0.000 1.000
#> SRR650136 2 0.00 1.000 0.000 1.000
#> SRR650137 2 0.00 1.000 0.000 1.000
#> SRR650140 2 0.00 1.000 0.000 1.000
#> SRR650141 2 0.00 1.000 0.000 1.000
#> SRR650144 2 0.00 1.000 0.000 1.000
#> SRR650147 2 0.00 1.000 0.000 1.000
#> SRR650150 2 0.00 1.000 0.000 1.000
#> SRR650153 2 0.00 1.000 0.000 1.000
#> SRR650156 2 0.00 1.000 0.000 1.000
#> SRR650159 2 0.00 1.000 0.000 1.000
#> SRR650162 2 0.00 1.000 0.000 1.000
#> SRR650168 2 0.00 1.000 0.000 1.000
#> SRR650166 2 0.00 1.000 0.000 1.000
#> SRR650167 2 0.00 1.000 0.000 1.000
#> SRR650171 2 0.00 1.000 0.000 1.000
#> SRR650165 2 0.00 1.000 0.000 1.000
#> SRR650176 2 0.00 1.000 0.000 1.000
#> SRR650177 2 0.00 1.000 0.000 1.000
#> SRR650180 2 0.00 1.000 0.000 1.000
#> SRR650179 2 0.00 1.000 0.000 1.000
#> SRR650181 2 0.00 1.000 0.000 1.000
#> SRR650183 2 0.00 1.000 0.000 1.000
#> SRR650184 2 0.00 1.000 0.000 1.000
#> SRR650185 2 0.00 1.000 0.000 1.000
#> SRR650188 2 0.00 1.000 0.000 1.000
#> SRR650191 2 0.00 1.000 0.000 1.000
#> SRR650192 2 0.00 1.000 0.000 1.000
#> SRR650195 2 0.00 1.000 0.000 1.000
#> SRR650198 2 0.00 1.000 0.000 1.000
#> SRR650200 2 0.00 1.000 0.000 1.000
#> SRR650196 2 0.00 1.000 0.000 1.000
#> SRR650197 2 0.00 1.000 0.000 1.000
#> SRR650201 2 0.00 1.000 0.000 1.000
#> SRR650203 2 0.00 1.000 0.000 1.000
#> SRR650204 2 0.00 1.000 0.000 1.000
#> SRR650202 2 0.00 1.000 0.000 1.000
#> SRR650130 2 0.00 1.000 0.000 1.000
#> SRR650131 2 0.00 1.000 0.000 1.000
#> SRR650132 2 0.00 1.000 0.000 1.000
#> SRR650133 2 0.00 1.000 0.000 1.000
#> SRR650138 2 0.00 1.000 0.000 1.000
#> SRR650139 2 0.00 1.000 0.000 1.000
#> SRR650142 2 0.00 1.000 0.000 1.000
#> SRR650143 2 0.00 1.000 0.000 1.000
#> SRR650145 2 0.00 1.000 0.000 1.000
#> SRR650146 2 0.00 1.000 0.000 1.000
#> SRR650148 2 0.00 1.000 0.000 1.000
#> SRR650149 2 0.00 1.000 0.000 1.000
#> SRR650151 2 0.00 1.000 0.000 1.000
#> SRR650152 2 0.00 1.000 0.000 1.000
#> SRR650154 2 0.00 1.000 0.000 1.000
#> SRR650155 2 0.00 1.000 0.000 1.000
#> SRR650157 2 0.00 1.000 0.000 1.000
#> SRR650158 2 0.00 1.000 0.000 1.000
#> SRR650160 2 0.00 1.000 0.000 1.000
#> SRR650161 2 0.00 1.000 0.000 1.000
#> SRR650163 2 0.00 1.000 0.000 1.000
#> SRR650164 2 0.00 1.000 0.000 1.000
#> SRR650169 2 0.00 1.000 0.000 1.000
#> SRR650170 2 0.00 1.000 0.000 1.000
#> SRR650172 2 0.00 1.000 0.000 1.000
#> SRR650173 2 0.00 1.000 0.000 1.000
#> SRR650174 2 0.00 1.000 0.000 1.000
#> SRR650175 2 0.00 1.000 0.000 1.000
#> SRR650178 2 0.00 1.000 0.000 1.000
#> SRR650182 2 0.00 1.000 0.000 1.000
#> SRR650186 2 0.00 1.000 0.000 1.000
#> SRR650187 2 0.00 1.000 0.000 1.000
#> SRR650189 2 0.00 1.000 0.000 1.000
#> SRR650190 2 0.00 1.000 0.000 1.000
#> SRR650193 2 0.00 1.000 0.000 1.000
#> SRR650194 2 0.00 1.000 0.000 1.000
#> SRR834560 1 0.00 0.997 1.000 0.000
#> SRR834561 1 0.00 0.997 1.000 0.000
#> SRR834562 1 0.00 0.997 1.000 0.000
#> SRR834563 1 0.00 0.997 1.000 0.000
#> SRR834564 1 0.00 0.997 1.000 0.000
#> SRR834565 1 0.00 0.997 1.000 0.000
#> SRR834566 1 0.00 0.997 1.000 0.000
#> SRR834567 1 0.00 0.997 1.000 0.000
#> SRR834568 1 0.00 0.997 1.000 0.000
#> SRR834569 1 0.00 0.997 1.000 0.000
#> SRR834570 1 0.00 0.997 1.000 0.000
#> SRR834571 1 0.00 0.997 1.000 0.000
#> SRR834572 1 0.00 0.997 1.000 0.000
#> SRR834573 1 0.00 0.997 1.000 0.000
#> SRR834574 1 0.00 0.997 1.000 0.000
#> SRR834575 1 0.00 0.997 1.000 0.000
#> SRR834576 1 0.00 0.997 1.000 0.000
#> SRR834577 1 0.26 0.954 0.956 0.044
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.000 0.9670 0 1.000 0.000
#> SRR650134 2 0.000 0.9670 0 1.000 0.000
#> SRR650135 2 0.000 0.9670 0 1.000 0.000
#> SRR650136 2 0.000 0.9670 0 1.000 0.000
#> SRR650137 2 0.000 0.9670 0 1.000 0.000
#> SRR650140 2 0.000 0.9670 0 1.000 0.000
#> SRR650141 2 0.000 0.9670 0 1.000 0.000
#> SRR650144 2 0.000 0.9670 0 1.000 0.000
#> SRR650147 2 0.000 0.9670 0 1.000 0.000
#> SRR650150 2 0.000 0.9670 0 1.000 0.000
#> SRR650153 2 0.000 0.9670 0 1.000 0.000
#> SRR650156 2 0.000 0.9670 0 1.000 0.000
#> SRR650159 2 0.000 0.9670 0 1.000 0.000
#> SRR650162 2 0.000 0.9670 0 1.000 0.000
#> SRR650168 2 0.000 0.9670 0 1.000 0.000
#> SRR650166 2 0.000 0.9670 0 1.000 0.000
#> SRR650167 2 0.000 0.9670 0 1.000 0.000
#> SRR650171 2 0.000 0.9670 0 1.000 0.000
#> SRR650165 2 0.000 0.9670 0 1.000 0.000
#> SRR650176 2 0.000 0.9670 0 1.000 0.000
#> SRR650177 2 0.000 0.9670 0 1.000 0.000
#> SRR650180 2 0.000 0.9670 0 1.000 0.000
#> SRR650179 2 0.000 0.9670 0 1.000 0.000
#> SRR650181 2 0.000 0.9670 0 1.000 0.000
#> SRR650183 2 0.000 0.9670 0 1.000 0.000
#> SRR650184 2 0.502 0.6894 0 0.760 0.240
#> SRR650185 2 0.518 0.6642 0 0.744 0.256
#> SRR650188 2 0.000 0.9670 0 1.000 0.000
#> SRR650191 3 0.000 1.0000 0 0.000 1.000
#> SRR650192 2 0.000 0.9670 0 1.000 0.000
#> SRR650195 2 0.000 0.9670 0 1.000 0.000
#> SRR650198 2 0.000 0.9670 0 1.000 0.000
#> SRR650200 2 0.000 0.9670 0 1.000 0.000
#> SRR650196 2 0.000 0.9670 0 1.000 0.000
#> SRR650197 2 0.000 0.9670 0 1.000 0.000
#> SRR650201 2 0.000 0.9670 0 1.000 0.000
#> SRR650203 2 0.000 0.9670 0 1.000 0.000
#> SRR650204 2 0.000 0.9670 0 1.000 0.000
#> SRR650202 2 0.000 0.9670 0 1.000 0.000
#> SRR650130 2 0.000 0.9670 0 1.000 0.000
#> SRR650131 2 0.000 0.9670 0 1.000 0.000
#> SRR650132 2 0.000 0.9670 0 1.000 0.000
#> SRR650133 2 0.000 0.9670 0 1.000 0.000
#> SRR650138 3 0.000 1.0000 0 0.000 1.000
#> SRR650139 3 0.000 1.0000 0 0.000 1.000
#> SRR650142 3 0.000 1.0000 0 0.000 1.000
#> SRR650143 3 0.000 1.0000 0 0.000 1.000
#> SRR650145 3 0.000 1.0000 0 0.000 1.000
#> SRR650146 3 0.000 1.0000 0 0.000 1.000
#> SRR650148 3 0.000 1.0000 0 0.000 1.000
#> SRR650149 3 0.000 1.0000 0 0.000 1.000
#> SRR650151 3 0.000 1.0000 0 0.000 1.000
#> SRR650152 3 0.000 1.0000 0 0.000 1.000
#> SRR650154 3 0.000 1.0000 0 0.000 1.000
#> SRR650155 3 0.000 1.0000 0 0.000 1.000
#> SRR650157 3 0.000 1.0000 0 0.000 1.000
#> SRR650158 3 0.000 1.0000 0 0.000 1.000
#> SRR650160 2 0.629 0.1745 0 0.536 0.464
#> SRR650161 2 0.631 0.0915 0 0.512 0.488
#> SRR650163 3 0.000 1.0000 0 0.000 1.000
#> SRR650164 3 0.000 1.0000 0 0.000 1.000
#> SRR650169 3 0.000 1.0000 0 0.000 1.000
#> SRR650170 3 0.000 1.0000 0 0.000 1.000
#> SRR650172 3 0.000 1.0000 0 0.000 1.000
#> SRR650173 3 0.000 1.0000 0 0.000 1.000
#> SRR650174 3 0.000 1.0000 0 0.000 1.000
#> SRR650175 3 0.000 1.0000 0 0.000 1.000
#> SRR650178 2 0.000 0.9670 0 1.000 0.000
#> SRR650182 2 0.000 0.9670 0 1.000 0.000
#> SRR650186 3 0.000 1.0000 0 0.000 1.000
#> SRR650187 3 0.000 1.0000 0 0.000 1.000
#> SRR650189 3 0.000 1.0000 0 0.000 1.000
#> SRR650190 3 0.000 1.0000 0 0.000 1.000
#> SRR650193 2 0.000 0.9670 0 1.000 0.000
#> SRR650194 2 0.000 0.9670 0 1.000 0.000
#> SRR834560 1 0.000 1.0000 1 0.000 0.000
#> SRR834561 1 0.000 1.0000 1 0.000 0.000
#> SRR834562 1 0.000 1.0000 1 0.000 0.000
#> SRR834563 1 0.000 1.0000 1 0.000 0.000
#> SRR834564 1 0.000 1.0000 1 0.000 0.000
#> SRR834565 1 0.000 1.0000 1 0.000 0.000
#> SRR834566 1 0.000 1.0000 1 0.000 0.000
#> SRR834567 1 0.000 1.0000 1 0.000 0.000
#> SRR834568 1 0.000 1.0000 1 0.000 0.000
#> SRR834569 1 0.000 1.0000 1 0.000 0.000
#> SRR834570 1 0.000 1.0000 1 0.000 0.000
#> SRR834571 1 0.000 1.0000 1 0.000 0.000
#> SRR834572 1 0.000 1.0000 1 0.000 0.000
#> SRR834573 1 0.000 1.0000 1 0.000 0.000
#> SRR834574 1 0.000 1.0000 1 0.000 0.000
#> SRR834575 1 0.000 1.0000 1 0.000 0.000
#> SRR834576 1 0.000 1.0000 1 0.000 0.000
#> SRR834577 1 0.000 1.0000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0592 0.7142 0 0.984 0.000 0.016
#> SRR650134 4 0.4304 0.7689 0 0.284 0.000 0.716
#> SRR650135 2 0.2530 0.6730 0 0.888 0.000 0.112
#> SRR650136 2 0.2704 0.6385 0 0.876 0.000 0.124
#> SRR650137 4 0.4331 0.7688 0 0.288 0.000 0.712
#> SRR650140 2 0.4855 0.0363 0 0.600 0.000 0.400
#> SRR650141 2 0.0592 0.7142 0 0.984 0.000 0.016
#> SRR650144 2 0.0000 0.7146 0 1.000 0.000 0.000
#> SRR650147 2 0.0000 0.7146 0 1.000 0.000 0.000
#> SRR650150 4 0.4304 0.7689 0 0.284 0.000 0.716
#> SRR650153 2 0.2530 0.6730 0 0.888 0.000 0.112
#> SRR650156 2 0.2647 0.6666 0 0.880 0.000 0.120
#> SRR650159 4 0.4356 0.7668 0 0.292 0.000 0.708
#> SRR650162 4 0.4382 0.7631 0 0.296 0.000 0.704
#> SRR650168 2 0.1637 0.6902 0 0.940 0.000 0.060
#> SRR650166 4 0.4304 0.7689 0 0.284 0.000 0.716
#> SRR650167 2 0.3873 0.5230 0 0.772 0.000 0.228
#> SRR650171 2 0.3569 0.4895 0 0.804 0.000 0.196
#> SRR650165 4 0.4331 0.7688 0 0.288 0.000 0.712
#> SRR650176 2 0.0592 0.7142 0 0.984 0.000 0.016
#> SRR650177 2 0.0592 0.7142 0 0.984 0.000 0.016
#> SRR650180 2 0.0592 0.7142 0 0.984 0.000 0.016
#> SRR650179 2 0.4866 0.0192 0 0.596 0.000 0.404
#> SRR650181 2 0.2530 0.6730 0 0.888 0.000 0.112
#> SRR650183 2 0.0000 0.7146 0 1.000 0.000 0.000
#> SRR650184 2 0.3837 0.4680 0 0.776 0.000 0.224
#> SRR650185 2 0.3837 0.4680 0 0.776 0.000 0.224
#> SRR650188 2 0.2530 0.6730 0 0.888 0.000 0.112
#> SRR650191 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650192 2 0.0592 0.7142 0 0.984 0.000 0.016
#> SRR650195 2 0.0000 0.7146 0 1.000 0.000 0.000
#> SRR650198 4 0.4761 0.6559 0 0.372 0.000 0.628
#> SRR650200 2 0.4040 0.4979 0 0.752 0.000 0.248
#> SRR650196 4 0.4981 0.4436 0 0.464 0.000 0.536
#> SRR650197 4 0.4304 0.7689 0 0.284 0.000 0.716
#> SRR650201 2 0.4907 -0.0593 0 0.580 0.000 0.420
#> SRR650203 4 0.4843 0.6146 0 0.396 0.000 0.604
#> SRR650204 4 0.4304 0.7689 0 0.284 0.000 0.716
#> SRR650202 2 0.0707 0.7125 0 0.980 0.000 0.020
#> SRR650130 2 0.3873 0.5230 0 0.772 0.000 0.228
#> SRR650131 2 0.4998 -0.3816 0 0.512 0.000 0.488
#> SRR650132 4 0.4356 0.7668 0 0.292 0.000 0.708
#> SRR650133 2 0.3024 0.5839 0 0.852 0.000 0.148
#> SRR650138 3 0.1637 0.8760 0 0.000 0.940 0.060
#> SRR650139 3 0.1637 0.8760 0 0.000 0.940 0.060
#> SRR650142 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650145 3 0.1637 0.8760 0 0.000 0.940 0.060
#> SRR650146 3 0.1637 0.8760 0 0.000 0.940 0.060
#> SRR650148 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650149 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650151 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650152 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650154 3 0.4304 0.8514 0 0.000 0.716 0.284
#> SRR650155 3 0.4304 0.8514 0 0.000 0.716 0.284
#> SRR650157 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650158 3 0.0188 0.8941 0 0.000 0.996 0.004
#> SRR650160 4 0.6761 0.2754 0 0.224 0.168 0.608
#> SRR650161 4 0.6819 0.2735 0 0.208 0.188 0.604
#> SRR650163 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650169 3 0.0188 0.8953 0 0.000 0.996 0.004
#> SRR650170 3 0.0336 0.8954 0 0.000 0.992 0.008
#> SRR650172 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650173 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650174 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650175 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650178 4 0.4356 0.4706 0 0.292 0.000 0.708
#> SRR650182 4 0.4855 0.2199 0 0.400 0.000 0.600
#> SRR650186 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.8949 0 0.000 1.000 0.000
#> SRR650189 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650190 3 0.3837 0.8707 0 0.000 0.776 0.224
#> SRR650193 2 0.4998 -0.3816 0 0.512 0.000 0.488
#> SRR650194 2 0.4998 -0.3816 0 0.512 0.000 0.488
#> SRR834560 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.0000 1 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
#> SRR650205 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650134 2 0.0404 0.7378 0.00 0.988 0.000 0.012 0.000
#> SRR650135 4 0.4045 0.3129 0.00 0.356 0.000 0.644 0.000
#> SRR650136 4 0.4161 0.1517 0.00 0.392 0.000 0.608 0.000
#> SRR650137 2 0.0000 0.7395 0.00 1.000 0.000 0.000 0.000
#> SRR650140 2 0.3983 0.4964 0.00 0.660 0.000 0.340 0.000
#> SRR650141 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650144 4 0.0404 0.7527 0.00 0.012 0.000 0.988 0.000
#> SRR650147 4 0.1478 0.7215 0.00 0.064 0.000 0.936 0.000
#> SRR650150 2 0.0404 0.7378 0.00 0.988 0.000 0.012 0.000
#> SRR650153 4 0.4045 0.3129 0.00 0.356 0.000 0.644 0.000
#> SRR650156 4 0.4045 0.3129 0.00 0.356 0.000 0.644 0.000
#> SRR650159 2 0.0162 0.7393 0.00 0.996 0.000 0.004 0.000
#> SRR650162 2 0.0290 0.7383 0.00 0.992 0.000 0.008 0.000
#> SRR650168 4 0.1270 0.7355 0.00 0.052 0.000 0.948 0.000
#> SRR650166 2 0.0404 0.7378 0.00 0.988 0.000 0.012 0.000
#> SRR650167 2 0.4306 0.1503 0.00 0.508 0.000 0.492 0.000
#> SRR650171 4 0.2929 0.5956 0.00 0.180 0.000 0.820 0.000
#> SRR650165 2 0.0162 0.7393 0.00 0.996 0.000 0.004 0.000
#> SRR650176 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650177 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650180 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650179 2 0.4015 0.4812 0.00 0.652 0.000 0.348 0.000
#> SRR650181 4 0.4045 0.3129 0.00 0.356 0.000 0.644 0.000
#> SRR650183 4 0.0404 0.7527 0.00 0.012 0.000 0.988 0.000
#> SRR650184 4 0.0404 0.7527 0.00 0.012 0.000 0.988 0.000
#> SRR650185 4 0.0404 0.7527 0.00 0.012 0.000 0.988 0.000
#> SRR650188 4 0.4045 0.3129 0.00 0.356 0.000 0.644 0.000
#> SRR650191 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650192 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650195 4 0.0404 0.7527 0.00 0.012 0.000 0.988 0.000
#> SRR650198 2 0.2074 0.6576 0.00 0.896 0.000 0.104 0.000
#> SRR650200 2 0.4283 0.2304 0.00 0.544 0.000 0.456 0.000
#> SRR650196 2 0.3305 0.6346 0.00 0.776 0.000 0.224 0.000
#> SRR650197 2 0.0404 0.7378 0.00 0.988 0.000 0.012 0.000
#> SRR650201 2 0.3857 0.5400 0.00 0.688 0.000 0.312 0.000
#> SRR650203 2 0.4015 0.2274 0.00 0.652 0.000 0.348 0.000
#> SRR650204 2 0.0404 0.7378 0.00 0.988 0.000 0.012 0.000
#> SRR650202 4 0.0794 0.7502 0.00 0.028 0.000 0.972 0.000
#> SRR650130 2 0.4306 0.1503 0.00 0.508 0.000 0.492 0.000
#> SRR650131 4 0.4297 0.1292 0.00 0.472 0.000 0.528 0.000
#> SRR650132 2 0.0290 0.7384 0.00 0.992 0.000 0.008 0.000
#> SRR650133 4 0.0510 0.7566 0.00 0.016 0.000 0.984 0.000
#> SRR650138 3 0.4192 0.5657 0.00 0.000 0.596 0.000 0.404
#> SRR650139 3 0.4192 0.5657 0.00 0.000 0.596 0.000 0.404
#> SRR650142 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650143 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650145 3 0.4192 0.5657 0.00 0.000 0.596 0.000 0.404
#> SRR650146 3 0.4192 0.5657 0.00 0.000 0.596 0.000 0.404
#> SRR650148 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650149 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650151 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650152 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650154 5 0.0000 0.4500 0.00 0.000 0.000 0.000 1.000
#> SRR650155 5 0.0000 0.4500 0.00 0.000 0.000 0.000 1.000
#> SRR650157 3 0.0404 0.8024 0.00 0.000 0.988 0.000 0.012
#> SRR650158 3 0.0703 0.7970 0.00 0.000 0.976 0.000 0.024
#> SRR650160 5 0.7842 0.4756 0.00 0.176 0.156 0.188 0.480
#> SRR650161 5 0.7799 0.4945 0.00 0.168 0.168 0.176 0.488
#> SRR650163 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650169 3 0.0880 0.7679 0.00 0.000 0.968 0.000 0.032
#> SRR650170 3 0.1043 0.7557 0.00 0.000 0.960 0.000 0.040
#> SRR650172 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650173 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650174 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650175 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650178 2 0.3074 0.6541 0.00 0.804 0.000 0.196 0.000
#> SRR650182 2 0.3774 0.5595 0.00 0.704 0.000 0.296 0.000
#> SRR650186 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650187 3 0.0000 0.8055 0.00 0.000 1.000 0.000 0.000
#> SRR650189 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650190 5 0.4192 0.8088 0.00 0.000 0.404 0.000 0.596
#> SRR650193 4 0.4306 0.0944 0.00 0.492 0.000 0.508 0.000
#> SRR650194 4 0.4306 0.0944 0.00 0.492 0.000 0.508 0.000
#> SRR834560 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834569 1 0.2516 0.8298 0.86 0.000 0.140 0.000 0.000
#> SRR834570 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9913 1.00 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.9913 1.00 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
#> SRR650205 4 0.1714 0.8635 0.00 0.092 0.000 0.908 0.000 0.000
#> SRR650134 5 0.3189 0.8791 0.00 0.236 0.000 0.004 0.760 0.000
#> SRR650135 2 0.0146 0.7464 0.00 0.996 0.000 0.004 0.000 0.000
#> SRR650136 2 0.2048 0.6830 0.00 0.880 0.000 0.120 0.000 0.000
#> SRR650137 5 0.3189 0.8791 0.00 0.236 0.000 0.004 0.760 0.000
#> SRR650140 2 0.3266 0.4148 0.00 0.728 0.000 0.000 0.272 0.000
#> SRR650141 4 0.0790 0.8937 0.00 0.032 0.000 0.968 0.000 0.000
#> SRR650144 2 0.3198 0.4850 0.00 0.740 0.000 0.260 0.000 0.000
#> SRR650147 2 0.3804 0.0972 0.00 0.576 0.000 0.424 0.000 0.000
#> SRR650150 5 0.4441 0.8251 0.00 0.208 0.000 0.092 0.700 0.000
#> SRR650153 2 0.0146 0.7464 0.00 0.996 0.000 0.004 0.000 0.000
#> SRR650156 2 0.0146 0.7464 0.00 0.996 0.000 0.004 0.000 0.000
#> SRR650159 5 0.3602 0.8797 0.00 0.208 0.000 0.032 0.760 0.000
#> SRR650162 5 0.3602 0.8797 0.00 0.208 0.000 0.032 0.760 0.000
#> SRR650168 4 0.0547 0.8962 0.00 0.020 0.000 0.980 0.000 0.000
#> SRR650166 5 0.3602 0.8797 0.00 0.208 0.000 0.032 0.760 0.000
#> SRR650167 2 0.0146 0.7444 0.00 0.996 0.000 0.000 0.004 0.000
#> SRR650171 4 0.0713 0.8940 0.00 0.028 0.000 0.972 0.000 0.000
#> SRR650165 5 0.3460 0.8815 0.00 0.220 0.000 0.020 0.760 0.000
#> SRR650176 4 0.0547 0.8962 0.00 0.020 0.000 0.980 0.000 0.000
#> SRR650177 4 0.0547 0.8962 0.00 0.020 0.000 0.980 0.000 0.000
#> SRR650180 4 0.0547 0.8962 0.00 0.020 0.000 0.980 0.000 0.000
#> SRR650179 2 0.2762 0.5449 0.00 0.804 0.000 0.000 0.196 0.000
#> SRR650181 2 0.0146 0.7464 0.00 0.996 0.000 0.004 0.000 0.000
#> SRR650183 2 0.3050 0.5178 0.00 0.764 0.000 0.236 0.000 0.000
#> SRR650184 4 0.4474 0.7388 0.00 0.188 0.000 0.704 0.108 0.000
#> SRR650185 4 0.4474 0.7388 0.00 0.188 0.000 0.704 0.108 0.000
#> SRR650188 2 0.0146 0.7464 0.00 0.996 0.000 0.004 0.000 0.000
#> SRR650191 6 0.0146 0.7062 0.00 0.000 0.000 0.000 0.004 0.996
#> SRR650192 4 0.0547 0.8962 0.00 0.020 0.000 0.980 0.000 0.000
#> SRR650195 4 0.5252 0.3024 0.00 0.424 0.000 0.480 0.096 0.000
#> SRR650198 5 0.3992 0.7982 0.00 0.136 0.000 0.104 0.760 0.000
#> SRR650200 2 0.1204 0.7100 0.00 0.944 0.000 0.000 0.056 0.000
#> SRR650196 2 0.3833 -0.2197 0.00 0.556 0.000 0.000 0.444 0.000
#> SRR650197 5 0.3189 0.8791 0.00 0.236 0.000 0.004 0.760 0.000
#> SRR650201 2 0.3847 0.1854 0.00 0.644 0.000 0.008 0.348 0.000
#> SRR650203 5 0.3922 0.4708 0.00 0.016 0.000 0.320 0.664 0.000
#> SRR650204 5 0.3189 0.8791 0.00 0.236 0.000 0.004 0.760 0.000
#> SRR650202 4 0.0547 0.8962 0.00 0.020 0.000 0.980 0.000 0.000
#> SRR650130 2 0.0146 0.7444 0.00 0.996 0.000 0.000 0.004 0.000
#> SRR650131 4 0.2631 0.7455 0.00 0.000 0.000 0.820 0.180 0.000
#> SRR650132 5 0.3126 0.8689 0.00 0.248 0.000 0.000 0.752 0.000
#> SRR650133 4 0.2854 0.7722 0.00 0.208 0.000 0.792 0.000 0.000
#> SRR650138 6 0.6115 0.4162 0.00 0.004 0.416 0.020 0.132 0.428
#> SRR650139 6 0.6115 0.4162 0.00 0.004 0.416 0.020 0.132 0.428
#> SRR650142 6 0.0000 0.7087 0.00 0.000 0.000 0.000 0.000 1.000
#> SRR650143 6 0.0000 0.7087 0.00 0.000 0.000 0.000 0.000 1.000
#> SRR650145 6 0.6115 0.4162 0.00 0.004 0.416 0.020 0.132 0.428
#> SRR650146 6 0.6115 0.4162 0.00 0.004 0.416 0.020 0.132 0.428
#> SRR650148 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650149 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650151 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650152 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650154 3 0.2263 0.2602 0.00 0.000 0.884 0.016 0.100 0.000
#> SRR650155 3 0.2494 0.2395 0.00 0.000 0.864 0.016 0.120 0.000
#> SRR650157 6 0.0363 0.7061 0.00 0.000 0.012 0.000 0.000 0.988
#> SRR650158 6 0.0632 0.7008 0.00 0.000 0.024 0.000 0.000 0.976
#> SRR650160 3 0.7142 0.4121 0.00 0.216 0.456 0.000 0.184 0.144
#> SRR650161 3 0.7128 0.4324 0.00 0.200 0.464 0.000 0.176 0.160
#> SRR650163 6 0.0000 0.7087 0.00 0.000 0.000 0.000 0.000 1.000
#> SRR650164 6 0.0000 0.7087 0.00 0.000 0.000 0.000 0.000 1.000
#> SRR650169 6 0.2378 0.5031 0.00 0.000 0.152 0.000 0.000 0.848
#> SRR650170 6 0.2378 0.5052 0.00 0.000 0.152 0.000 0.000 0.848
#> SRR650172 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650173 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650174 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650175 3 0.3789 0.7527 0.00 0.000 0.584 0.000 0.000 0.416
#> SRR650178 5 0.4091 0.3991 0.00 0.472 0.000 0.008 0.520 0.000
#> SRR650182 2 0.3819 0.2088 0.00 0.652 0.000 0.008 0.340 0.000
#> SRR650186 6 0.0000 0.7087 0.00 0.000 0.000 0.000 0.000 1.000
#> SRR650187 6 0.0000 0.7087 0.00 0.000 0.000 0.000 0.000 1.000
#> SRR650189 3 0.3860 0.6902 0.00 0.000 0.528 0.000 0.000 0.472
#> SRR650190 3 0.3838 0.7207 0.00 0.000 0.552 0.000 0.000 0.448
#> SRR650193 4 0.0547 0.8834 0.00 0.000 0.000 0.980 0.020 0.000
#> SRR650194 4 0.0547 0.8834 0.00 0.000 0.000 0.980 0.020 0.000
#> SRR834560 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.2260 0.8268 0.86 0.000 0.000 0.000 0.000 0.140
#> SRR834570 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9912 1.00 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.9912 1.00 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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.611 0.931 0.947 0.3455 0.684 0.684
#> 3 3 0.870 0.910 0.964 0.8143 0.692 0.551
#> 4 4 0.709 0.715 0.849 0.1421 0.884 0.697
#> 5 5 0.751 0.735 0.839 0.0499 0.849 0.562
#> 6 6 0.740 0.672 0.806 0.0644 0.911 0.675
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
#> SRR650205 2 0.000 0.928 0.000 1.000
#> SRR650134 2 0.000 0.928 0.000 1.000
#> SRR650135 2 0.000 0.928 0.000 1.000
#> SRR650136 2 0.000 0.928 0.000 1.000
#> SRR650137 2 0.000 0.928 0.000 1.000
#> SRR650140 2 0.000 0.928 0.000 1.000
#> SRR650141 2 0.000 0.928 0.000 1.000
#> SRR650144 2 0.000 0.928 0.000 1.000
#> SRR650147 2 0.000 0.928 0.000 1.000
#> SRR650150 2 0.000 0.928 0.000 1.000
#> SRR650153 2 0.000 0.928 0.000 1.000
#> SRR650156 2 0.000 0.928 0.000 1.000
#> SRR650159 2 0.000 0.928 0.000 1.000
#> SRR650162 2 0.000 0.928 0.000 1.000
#> SRR650168 2 0.295 0.921 0.052 0.948
#> SRR650166 2 0.000 0.928 0.000 1.000
#> SRR650167 2 0.000 0.928 0.000 1.000
#> SRR650171 2 0.000 0.928 0.000 1.000
#> SRR650165 2 0.000 0.928 0.000 1.000
#> SRR650176 2 0.000 0.928 0.000 1.000
#> SRR650177 2 0.000 0.928 0.000 1.000
#> SRR650180 2 0.000 0.928 0.000 1.000
#> SRR650179 2 0.000 0.928 0.000 1.000
#> SRR650181 2 0.000 0.928 0.000 1.000
#> SRR650183 2 0.000 0.928 0.000 1.000
#> SRR650184 2 0.358 0.919 0.068 0.932
#> SRR650185 2 0.358 0.919 0.068 0.932
#> SRR650188 2 0.000 0.928 0.000 1.000
#> SRR650191 2 0.625 0.894 0.156 0.844
#> SRR650192 2 0.000 0.928 0.000 1.000
#> SRR650195 2 0.000 0.928 0.000 1.000
#> SRR650198 2 0.000 0.928 0.000 1.000
#> SRR650200 2 0.000 0.928 0.000 1.000
#> SRR650196 2 0.000 0.928 0.000 1.000
#> SRR650197 2 0.000 0.928 0.000 1.000
#> SRR650201 2 0.000 0.928 0.000 1.000
#> SRR650203 2 0.000 0.928 0.000 1.000
#> SRR650204 2 0.000 0.928 0.000 1.000
#> SRR650202 2 0.000 0.928 0.000 1.000
#> SRR650130 2 0.000 0.928 0.000 1.000
#> SRR650131 2 0.000 0.928 0.000 1.000
#> SRR650132 2 0.000 0.928 0.000 1.000
#> SRR650133 2 0.358 0.919 0.068 0.932
#> SRR650138 2 0.634 0.891 0.160 0.840
#> SRR650139 2 0.634 0.891 0.160 0.840
#> SRR650142 2 0.625 0.894 0.156 0.844
#> SRR650143 2 0.625 0.894 0.156 0.844
#> SRR650145 2 0.634 0.891 0.160 0.840
#> SRR650146 2 0.634 0.891 0.160 0.840
#> SRR650148 2 0.625 0.894 0.156 0.844
#> SRR650149 2 0.625 0.894 0.156 0.844
#> SRR650151 2 0.625 0.894 0.156 0.844
#> SRR650152 2 0.625 0.894 0.156 0.844
#> SRR650154 2 0.625 0.894 0.156 0.844
#> SRR650155 2 0.625 0.894 0.156 0.844
#> SRR650157 2 0.625 0.894 0.156 0.844
#> SRR650158 2 0.625 0.894 0.156 0.844
#> SRR650160 2 0.653 0.884 0.168 0.832
#> SRR650161 2 0.653 0.884 0.168 0.832
#> SRR650163 2 0.625 0.894 0.156 0.844
#> SRR650164 2 0.625 0.894 0.156 0.844
#> SRR650169 2 0.625 0.894 0.156 0.844
#> SRR650170 2 0.625 0.894 0.156 0.844
#> SRR650172 2 0.625 0.894 0.156 0.844
#> SRR650173 2 0.625 0.894 0.156 0.844
#> SRR650174 2 0.625 0.894 0.156 0.844
#> SRR650175 2 0.625 0.894 0.156 0.844
#> SRR650178 2 0.373 0.918 0.072 0.928
#> SRR650182 2 0.373 0.918 0.072 0.928
#> SRR650186 2 0.625 0.894 0.156 0.844
#> SRR650187 2 0.625 0.894 0.156 0.844
#> SRR650189 2 0.625 0.894 0.156 0.844
#> SRR650190 2 0.625 0.894 0.156 0.844
#> SRR650193 2 0.000 0.928 0.000 1.000
#> SRR650194 2 0.000 0.928 0.000 1.000
#> SRR834560 1 0.000 1.000 1.000 0.000
#> SRR834561 1 0.000 1.000 1.000 0.000
#> SRR834562 1 0.000 1.000 1.000 0.000
#> SRR834563 1 0.000 1.000 1.000 0.000
#> SRR834564 1 0.000 1.000 1.000 0.000
#> SRR834565 1 0.000 1.000 1.000 0.000
#> SRR834566 1 0.000 1.000 1.000 0.000
#> SRR834567 1 0.000 1.000 1.000 0.000
#> SRR834568 1 0.000 1.000 1.000 0.000
#> SRR834569 1 0.000 1.000 1.000 0.000
#> SRR834570 1 0.000 1.000 1.000 0.000
#> SRR834571 1 0.000 1.000 1.000 0.000
#> SRR834572 1 0.000 1.000 1.000 0.000
#> SRR834573 1 0.000 1.000 1.000 0.000
#> SRR834574 1 0.000 1.000 1.000 0.000
#> SRR834575 1 0.000 1.000 1.000 0.000
#> SRR834576 1 0.000 1.000 1.000 0.000
#> SRR834577 1 0.000 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.938 0 1.000 0.000
#> SRR650134 2 0.0000 0.938 0 1.000 0.000
#> SRR650135 2 0.0000 0.938 0 1.000 0.000
#> SRR650136 2 0.0000 0.938 0 1.000 0.000
#> SRR650137 2 0.0000 0.938 0 1.000 0.000
#> SRR650140 2 0.0000 0.938 0 1.000 0.000
#> SRR650141 2 0.0237 0.936 0 0.996 0.004
#> SRR650144 2 0.0000 0.938 0 1.000 0.000
#> SRR650147 2 0.0892 0.925 0 0.980 0.020
#> SRR650150 2 0.0000 0.938 0 1.000 0.000
#> SRR650153 2 0.0000 0.938 0 1.000 0.000
#> SRR650156 2 0.0000 0.938 0 1.000 0.000
#> SRR650159 2 0.0000 0.938 0 1.000 0.000
#> SRR650162 2 0.0000 0.938 0 1.000 0.000
#> SRR650168 2 0.4452 0.754 0 0.808 0.192
#> SRR650166 2 0.0000 0.938 0 1.000 0.000
#> SRR650167 2 0.0000 0.938 0 1.000 0.000
#> SRR650171 2 0.0000 0.938 0 1.000 0.000
#> SRR650165 2 0.0000 0.938 0 1.000 0.000
#> SRR650176 2 0.0000 0.938 0 1.000 0.000
#> SRR650177 2 0.0000 0.938 0 1.000 0.000
#> SRR650180 2 0.0000 0.938 0 1.000 0.000
#> SRR650179 2 0.0000 0.938 0 1.000 0.000
#> SRR650181 2 0.0000 0.938 0 1.000 0.000
#> SRR650183 2 0.0000 0.938 0 1.000 0.000
#> SRR650184 2 0.5988 0.473 0 0.632 0.368
#> SRR650185 2 0.5988 0.473 0 0.632 0.368
#> SRR650188 2 0.0000 0.938 0 1.000 0.000
#> SRR650191 2 0.5988 0.473 0 0.632 0.368
#> SRR650192 2 0.0000 0.938 0 1.000 0.000
#> SRR650195 2 0.3879 0.800 0 0.848 0.152
#> SRR650198 2 0.0747 0.928 0 0.984 0.016
#> SRR650200 2 0.0000 0.938 0 1.000 0.000
#> SRR650196 2 0.0000 0.938 0 1.000 0.000
#> SRR650197 2 0.0000 0.938 0 1.000 0.000
#> SRR650201 2 0.0000 0.938 0 1.000 0.000
#> SRR650203 2 0.0000 0.938 0 1.000 0.000
#> SRR650204 2 0.0000 0.938 0 1.000 0.000
#> SRR650202 2 0.0000 0.938 0 1.000 0.000
#> SRR650130 2 0.0000 0.938 0 1.000 0.000
#> SRR650131 2 0.0000 0.938 0 1.000 0.000
#> SRR650132 2 0.0000 0.938 0 1.000 0.000
#> SRR650133 2 0.5988 0.473 0 0.632 0.368
#> SRR650138 3 0.0000 0.963 0 0.000 1.000
#> SRR650139 3 0.0000 0.963 0 0.000 1.000
#> SRR650142 3 0.0000 0.963 0 0.000 1.000
#> SRR650143 3 0.0000 0.963 0 0.000 1.000
#> SRR650145 3 0.0000 0.963 0 0.000 1.000
#> SRR650146 3 0.0000 0.963 0 0.000 1.000
#> SRR650148 3 0.0000 0.963 0 0.000 1.000
#> SRR650149 3 0.0000 0.963 0 0.000 1.000
#> SRR650151 3 0.0000 0.963 0 0.000 1.000
#> SRR650152 3 0.0000 0.963 0 0.000 1.000
#> SRR650154 3 0.0000 0.963 0 0.000 1.000
#> SRR650155 3 0.0000 0.963 0 0.000 1.000
#> SRR650157 3 0.0000 0.963 0 0.000 1.000
#> SRR650158 3 0.0000 0.963 0 0.000 1.000
#> SRR650160 2 0.5988 0.473 0 0.632 0.368
#> SRR650161 2 0.5988 0.473 0 0.632 0.368
#> SRR650163 3 0.0000 0.963 0 0.000 1.000
#> SRR650164 3 0.0000 0.963 0 0.000 1.000
#> SRR650169 3 0.0000 0.963 0 0.000 1.000
#> SRR650170 3 0.0000 0.963 0 0.000 1.000
#> SRR650172 3 0.0000 0.963 0 0.000 1.000
#> SRR650173 3 0.0000 0.963 0 0.000 1.000
#> SRR650174 3 0.0000 0.963 0 0.000 1.000
#> SRR650175 3 0.0000 0.963 0 0.000 1.000
#> SRR650178 3 0.6079 0.295 0 0.388 0.612
#> SRR650182 3 0.6079 0.295 0 0.388 0.612
#> SRR650186 3 0.0000 0.963 0 0.000 1.000
#> SRR650187 3 0.0000 0.963 0 0.000 1.000
#> SRR650189 3 0.0000 0.963 0 0.000 1.000
#> SRR650190 3 0.0000 0.963 0 0.000 1.000
#> SRR650193 2 0.0000 0.938 0 1.000 0.000
#> SRR650194 2 0.0000 0.938 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0921 0.638 0 0.972 0.000 0.028
#> SRR650134 4 0.4855 0.598 0 0.400 0.000 0.600
#> SRR650135 2 0.3649 0.624 0 0.796 0.000 0.204
#> SRR650136 2 0.3649 0.624 0 0.796 0.000 0.204
#> SRR650137 4 0.4713 0.663 0 0.360 0.000 0.640
#> SRR650140 2 0.3688 0.620 0 0.792 0.000 0.208
#> SRR650141 2 0.1022 0.636 0 0.968 0.000 0.032
#> SRR650144 2 0.3528 0.633 0 0.808 0.000 0.192
#> SRR650147 2 0.1209 0.634 0 0.964 0.004 0.032
#> SRR650150 4 0.4713 0.663 0 0.360 0.000 0.640
#> SRR650153 2 0.3074 0.648 0 0.848 0.000 0.152
#> SRR650156 2 0.3649 0.624 0 0.796 0.000 0.204
#> SRR650159 4 0.4999 0.400 0 0.492 0.000 0.508
#> SRR650162 4 0.4985 0.475 0 0.468 0.000 0.532
#> SRR650168 2 0.4039 0.501 0 0.836 0.080 0.084
#> SRR650166 4 0.4713 0.663 0 0.360 0.000 0.640
#> SRR650167 2 0.4713 0.285 0 0.640 0.000 0.360
#> SRR650171 2 0.3528 0.633 0 0.808 0.000 0.192
#> SRR650165 4 0.4730 0.659 0 0.364 0.000 0.636
#> SRR650176 2 0.1211 0.662 0 0.960 0.000 0.040
#> SRR650177 2 0.1557 0.663 0 0.944 0.000 0.056
#> SRR650180 2 0.0000 0.651 0 1.000 0.000 0.000
#> SRR650179 2 0.4998 -0.392 0 0.512 0.000 0.488
#> SRR650181 2 0.3649 0.624 0 0.796 0.000 0.204
#> SRR650183 2 0.1389 0.663 0 0.952 0.000 0.048
#> SRR650184 2 0.5512 0.365 0 0.728 0.100 0.172
#> SRR650185 2 0.5512 0.365 0 0.728 0.100 0.172
#> SRR650188 2 0.3649 0.624 0 0.796 0.000 0.204
#> SRR650191 2 0.5783 0.329 0 0.704 0.108 0.188
#> SRR650192 2 0.0592 0.645 0 0.984 0.000 0.016
#> SRR650195 2 0.3081 0.565 0 0.888 0.048 0.064
#> SRR650198 4 0.6262 0.566 0 0.400 0.060 0.540
#> SRR650200 2 0.4761 0.242 0 0.628 0.000 0.372
#> SRR650196 2 0.4955 -0.187 0 0.556 0.000 0.444
#> SRR650197 4 0.4713 0.663 0 0.360 0.000 0.640
#> SRR650201 2 0.3486 0.636 0 0.812 0.000 0.188
#> SRR650203 2 0.1305 0.641 0 0.960 0.004 0.036
#> SRR650204 4 0.4713 0.663 0 0.360 0.000 0.640
#> SRR650202 2 0.1792 0.663 0 0.932 0.000 0.068
#> SRR650130 2 0.4761 0.194 0 0.628 0.000 0.372
#> SRR650131 2 0.0921 0.638 0 0.972 0.000 0.028
#> SRR650132 2 0.4522 0.385 0 0.680 0.000 0.320
#> SRR650133 2 0.5247 0.396 0 0.752 0.100 0.148
#> SRR650138 3 0.2814 0.884 0 0.000 0.868 0.132
#> SRR650139 3 0.2814 0.884 0 0.000 0.868 0.132
#> SRR650142 3 0.0000 0.938 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.938 0 0.000 1.000 0.000
#> SRR650145 3 0.2704 0.888 0 0.000 0.876 0.124
#> SRR650146 3 0.2704 0.888 0 0.000 0.876 0.124
#> SRR650148 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650149 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650151 3 0.2149 0.913 0 0.000 0.912 0.088
#> SRR650152 3 0.2216 0.912 0 0.000 0.908 0.092
#> SRR650154 3 0.4996 0.483 0 0.000 0.516 0.484
#> SRR650155 3 0.4996 0.483 0 0.000 0.516 0.484
#> SRR650157 3 0.0000 0.938 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.938 0 0.000 1.000 0.000
#> SRR650160 4 0.6698 0.306 0 0.340 0.104 0.556
#> SRR650161 4 0.6698 0.306 0 0.340 0.104 0.556
#> SRR650163 3 0.0000 0.938 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.938 0 0.000 1.000 0.000
#> SRR650169 3 0.1211 0.930 0 0.000 0.960 0.040
#> SRR650170 3 0.1211 0.930 0 0.000 0.960 0.040
#> SRR650172 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650173 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650174 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650175 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650178 4 0.4673 0.464 0 0.076 0.132 0.792
#> SRR650182 4 0.4673 0.464 0 0.076 0.132 0.792
#> SRR650186 3 0.0336 0.938 0 0.000 0.992 0.008
#> SRR650187 3 0.0336 0.938 0 0.000 0.992 0.008
#> SRR650189 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650190 3 0.0469 0.939 0 0.000 0.988 0.012
#> SRR650193 2 0.3649 0.626 0 0.796 0.000 0.204
#> SRR650194 2 0.3649 0.626 0 0.796 0.000 0.204
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 2 0.4182 0.6206 0.000 0.600 0.000 0.400 0.000
#> SRR650134 2 0.0404 0.7222 0.000 0.988 0.000 0.000 0.012
#> SRR650135 2 0.3039 0.7644 0.000 0.808 0.000 0.192 0.000
#> SRR650136 2 0.3039 0.7644 0.000 0.808 0.000 0.192 0.000
#> SRR650137 2 0.0703 0.7149 0.000 0.976 0.000 0.000 0.024
#> SRR650140 2 0.2929 0.7648 0.000 0.820 0.000 0.180 0.000
#> SRR650141 2 0.4235 0.5822 0.000 0.576 0.000 0.424 0.000
#> SRR650144 2 0.3999 0.6726 0.000 0.656 0.000 0.344 0.000
#> SRR650147 2 0.4249 0.5533 0.000 0.568 0.000 0.432 0.000
#> SRR650150 2 0.0955 0.7084 0.000 0.968 0.000 0.004 0.028
#> SRR650153 2 0.4182 0.6206 0.000 0.600 0.000 0.400 0.000
#> SRR650156 2 0.3039 0.7644 0.000 0.808 0.000 0.192 0.000
#> SRR650159 2 0.0510 0.7203 0.000 0.984 0.000 0.000 0.016
#> SRR650162 2 0.0703 0.7149 0.000 0.976 0.000 0.000 0.024
#> SRR650168 4 0.4504 0.6899 0.000 0.168 0.000 0.748 0.084
#> SRR650166 2 0.0794 0.7118 0.000 0.972 0.000 0.000 0.028
#> SRR650167 2 0.2074 0.7582 0.000 0.896 0.000 0.104 0.000
#> SRR650171 2 0.3242 0.7563 0.000 0.784 0.000 0.216 0.000
#> SRR650165 2 0.0703 0.7149 0.000 0.976 0.000 0.000 0.024
#> SRR650176 2 0.4182 0.6206 0.000 0.600 0.000 0.400 0.000
#> SRR650177 2 0.4182 0.6206 0.000 0.600 0.000 0.400 0.000
#> SRR650180 2 0.4171 0.6217 0.000 0.604 0.000 0.396 0.000
#> SRR650179 2 0.1216 0.7250 0.000 0.960 0.000 0.020 0.020
#> SRR650181 2 0.3039 0.7644 0.000 0.808 0.000 0.192 0.000
#> SRR650183 2 0.4171 0.6244 0.000 0.604 0.000 0.396 0.000
#> SRR650184 4 0.2546 0.7512 0.000 0.036 0.012 0.904 0.048
#> SRR650185 4 0.2546 0.7512 0.000 0.036 0.012 0.904 0.048
#> SRR650188 2 0.3039 0.7644 0.000 0.808 0.000 0.192 0.000
#> SRR650191 4 0.3113 0.6114 0.000 0.008 0.080 0.868 0.044
#> SRR650192 2 0.4182 0.6206 0.000 0.600 0.000 0.400 0.000
#> SRR650195 4 0.5102 0.0918 0.000 0.376 0.000 0.580 0.044
#> SRR650198 2 0.2970 0.5172 0.000 0.828 0.000 0.004 0.168
#> SRR650200 2 0.1792 0.7547 0.000 0.916 0.000 0.084 0.000
#> SRR650196 2 0.0290 0.7247 0.000 0.992 0.000 0.000 0.008
#> SRR650197 2 0.0703 0.7149 0.000 0.976 0.000 0.000 0.024
#> SRR650201 2 0.3210 0.7544 0.000 0.788 0.000 0.212 0.000
#> SRR650203 2 0.4138 0.6279 0.000 0.616 0.000 0.384 0.000
#> SRR650204 2 0.0955 0.7084 0.000 0.968 0.000 0.004 0.028
#> SRR650202 2 0.4182 0.6206 0.000 0.600 0.000 0.400 0.000
#> SRR650130 2 0.0510 0.7341 0.000 0.984 0.000 0.016 0.000
#> SRR650131 2 0.4161 0.6215 0.000 0.608 0.000 0.392 0.000
#> SRR650132 2 0.1478 0.7502 0.000 0.936 0.000 0.064 0.000
#> SRR650133 4 0.3477 0.7359 0.000 0.056 0.000 0.832 0.112
#> SRR650138 5 0.4126 0.4663 0.000 0.000 0.380 0.000 0.620
#> SRR650139 5 0.4126 0.4663 0.000 0.000 0.380 0.000 0.620
#> SRR650142 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650143 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650145 5 0.4182 0.4337 0.000 0.000 0.400 0.000 0.600
#> SRR650146 5 0.4182 0.4337 0.000 0.000 0.400 0.000 0.600
#> SRR650148 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650149 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650151 3 0.3661 0.6495 0.000 0.000 0.724 0.000 0.276
#> SRR650152 3 0.3684 0.6428 0.000 0.000 0.720 0.000 0.280
#> SRR650154 5 0.2127 0.6105 0.000 0.000 0.108 0.000 0.892
#> SRR650155 5 0.2127 0.6105 0.000 0.000 0.108 0.000 0.892
#> SRR650157 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650160 5 0.5771 0.2929 0.000 0.112 0.000 0.316 0.572
#> SRR650161 5 0.5771 0.2929 0.000 0.112 0.000 0.316 0.572
#> SRR650163 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650169 3 0.3550 0.6105 0.000 0.000 0.760 0.236 0.004
#> SRR650170 3 0.3550 0.6105 0.000 0.000 0.760 0.236 0.004
#> SRR650172 3 0.2966 0.7678 0.000 0.000 0.816 0.000 0.184
#> SRR650173 3 0.2966 0.7678 0.000 0.000 0.816 0.000 0.184
#> SRR650174 3 0.2966 0.7678 0.000 0.000 0.816 0.000 0.184
#> SRR650175 3 0.2966 0.7678 0.000 0.000 0.816 0.000 0.184
#> SRR650178 5 0.4286 0.3946 0.000 0.340 0.004 0.004 0.652
#> SRR650182 5 0.4286 0.3946 0.000 0.340 0.004 0.004 0.652
#> SRR650186 3 0.0162 0.8762 0.000 0.000 0.996 0.000 0.004
#> SRR650187 3 0.0162 0.8762 0.000 0.000 0.996 0.000 0.004
#> SRR650189 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650190 3 0.0000 0.8785 0.000 0.000 1.000 0.000 0.000
#> SRR650193 2 0.2929 0.7645 0.000 0.820 0.000 0.180 0.000
#> SRR650194 2 0.2929 0.7645 0.000 0.820 0.000 0.180 0.000
#> SRR834560 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0510 0.9633 0.984 0.000 0.000 0.000 0.016
#> SRR834562 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.1410 0.9441 0.940 0.000 0.000 0.000 0.060
#> SRR834564 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.3134 0.8853 0.848 0.000 0.000 0.032 0.120
#> SRR834570 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.3051 0.8881 0.852 0.000 0.000 0.028 0.120
#> SRR834574 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.1732 0.9338 0.920 0.000 0.000 0.000 0.080
#> SRR834576 1 0.0000 0.9696 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.3099 0.8851 0.848 0.000 0.000 0.028 0.124
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.1528 0.7088 0.000 0.016 0.000 0.936 0.048 0.000
#> SRR650134 2 0.3607 0.6332 0.000 0.652 0.000 0.348 0.000 0.000
#> SRR650135 4 0.3330 0.4305 0.000 0.284 0.000 0.716 0.000 0.000
#> SRR650136 4 0.3468 0.4341 0.000 0.284 0.000 0.712 0.004 0.000
#> SRR650137 2 0.2562 0.7318 0.000 0.828 0.000 0.172 0.000 0.000
#> SRR650140 4 0.3905 0.3338 0.000 0.316 0.000 0.668 0.016 0.000
#> SRR650141 4 0.1895 0.6763 0.000 0.016 0.000 0.912 0.072 0.000
#> SRR650144 4 0.2680 0.6798 0.000 0.108 0.000 0.860 0.032 0.000
#> SRR650147 4 0.3253 0.4570 0.000 0.020 0.000 0.788 0.192 0.000
#> SRR650150 2 0.2378 0.7230 0.000 0.848 0.000 0.152 0.000 0.000
#> SRR650153 4 0.0820 0.7262 0.000 0.012 0.000 0.972 0.016 0.000
#> SRR650156 4 0.3330 0.4305 0.000 0.284 0.000 0.716 0.000 0.000
#> SRR650159 2 0.3944 0.5974 0.000 0.568 0.000 0.428 0.004 0.000
#> SRR650162 2 0.3584 0.6938 0.000 0.688 0.000 0.308 0.004 0.000
#> SRR650168 5 0.4348 0.7189 0.000 0.024 0.000 0.416 0.560 0.000
#> SRR650166 2 0.2340 0.7227 0.000 0.852 0.000 0.148 0.000 0.000
#> SRR650167 4 0.3868 -0.2981 0.000 0.492 0.000 0.508 0.000 0.000
#> SRR650171 4 0.2214 0.6957 0.000 0.096 0.000 0.888 0.016 0.000
#> SRR650165 2 0.3592 0.6373 0.000 0.656 0.000 0.344 0.000 0.000
#> SRR650176 4 0.1245 0.7227 0.000 0.016 0.000 0.952 0.032 0.000
#> SRR650177 4 0.1003 0.7254 0.000 0.016 0.000 0.964 0.020 0.000
#> SRR650180 4 0.0858 0.7237 0.000 0.004 0.000 0.968 0.028 0.000
#> SRR650179 2 0.3847 0.5187 0.000 0.544 0.000 0.456 0.000 0.000
#> SRR650181 4 0.3555 0.4467 0.000 0.280 0.000 0.712 0.008 0.000
#> SRR650183 4 0.1723 0.7233 0.000 0.036 0.000 0.928 0.036 0.000
#> SRR650184 5 0.3175 0.8479 0.000 0.000 0.000 0.256 0.744 0.000
#> SRR650185 5 0.3175 0.8479 0.000 0.000 0.000 0.256 0.744 0.000
#> SRR650188 4 0.3371 0.4160 0.000 0.292 0.000 0.708 0.000 0.000
#> SRR650191 5 0.4413 0.6987 0.000 0.008 0.088 0.160 0.740 0.004
#> SRR650192 4 0.0777 0.7227 0.000 0.004 0.000 0.972 0.024 0.000
#> SRR650195 4 0.4192 -0.3538 0.000 0.016 0.000 0.572 0.412 0.000
#> SRR650198 2 0.3361 0.6789 0.000 0.788 0.000 0.188 0.020 0.004
#> SRR650200 2 0.3864 0.3031 0.000 0.520 0.000 0.480 0.000 0.000
#> SRR650196 2 0.3899 0.6211 0.000 0.592 0.000 0.404 0.004 0.000
#> SRR650197 2 0.2454 0.7289 0.000 0.840 0.000 0.160 0.000 0.000
#> SRR650201 4 0.2146 0.6736 0.000 0.116 0.000 0.880 0.004 0.000
#> SRR650203 4 0.1616 0.7203 0.000 0.048 0.000 0.932 0.020 0.000
#> SRR650204 2 0.2092 0.7020 0.000 0.876 0.000 0.124 0.000 0.000
#> SRR650202 4 0.0603 0.7239 0.000 0.016 0.000 0.980 0.004 0.000
#> SRR650130 2 0.3866 0.4517 0.000 0.516 0.000 0.484 0.000 0.000
#> SRR650131 4 0.2214 0.6568 0.000 0.016 0.000 0.888 0.096 0.000
#> SRR650132 4 0.3774 -0.0378 0.000 0.408 0.000 0.592 0.000 0.000
#> SRR650133 5 0.4760 0.8138 0.000 0.020 0.000 0.332 0.616 0.032
#> SRR650138 6 0.0547 0.7174 0.000 0.000 0.020 0.000 0.000 0.980
#> SRR650139 6 0.0547 0.7174 0.000 0.000 0.020 0.000 0.000 0.980
#> SRR650142 3 0.0363 0.8322 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR650143 3 0.0363 0.8322 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR650145 6 0.0547 0.7174 0.000 0.000 0.020 0.000 0.000 0.980
#> SRR650146 6 0.0547 0.7174 0.000 0.000 0.020 0.000 0.000 0.980
#> SRR650148 3 0.1649 0.8333 0.000 0.000 0.932 0.000 0.036 0.032
#> SRR650149 3 0.1720 0.8324 0.000 0.000 0.928 0.000 0.040 0.032
#> SRR650151 3 0.4446 0.5342 0.000 0.020 0.588 0.000 0.008 0.384
#> SRR650152 3 0.4446 0.5342 0.000 0.020 0.588 0.000 0.008 0.384
#> SRR650154 6 0.3242 0.6945 0.000 0.024 0.040 0.000 0.092 0.844
#> SRR650155 6 0.3242 0.6945 0.000 0.024 0.040 0.000 0.092 0.844
#> SRR650157 3 0.0713 0.8375 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR650158 3 0.0713 0.8375 0.000 0.000 0.972 0.000 0.000 0.028
#> SRR650160 6 0.6386 0.3475 0.000 0.292 0.000 0.012 0.316 0.380
#> SRR650161 6 0.6386 0.3475 0.000 0.292 0.000 0.012 0.316 0.380
#> SRR650163 3 0.0363 0.8366 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR650164 3 0.0363 0.8366 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR650169 3 0.4040 0.4753 0.000 0.004 0.632 0.004 0.356 0.004
#> SRR650170 3 0.4040 0.4753 0.000 0.004 0.632 0.004 0.356 0.004
#> SRR650172 3 0.3670 0.6881 0.000 0.000 0.704 0.000 0.012 0.284
#> SRR650173 3 0.3670 0.6881 0.000 0.000 0.704 0.000 0.012 0.284
#> SRR650174 3 0.3445 0.7095 0.000 0.000 0.732 0.000 0.008 0.260
#> SRR650175 3 0.3445 0.7095 0.000 0.000 0.732 0.000 0.008 0.260
#> SRR650178 6 0.5686 0.5237 0.000 0.404 0.012 0.000 0.112 0.472
#> SRR650182 6 0.5686 0.5237 0.000 0.404 0.012 0.000 0.112 0.472
#> SRR650186 3 0.0363 0.8322 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR650187 3 0.0363 0.8322 0.000 0.000 0.988 0.000 0.012 0.000
#> SRR650189 3 0.1152 0.8348 0.000 0.000 0.952 0.000 0.004 0.044
#> SRR650190 3 0.1010 0.8361 0.000 0.000 0.960 0.000 0.004 0.036
#> SRR650193 4 0.2234 0.6644 0.000 0.124 0.000 0.872 0.004 0.000
#> SRR650194 4 0.2191 0.6679 0.000 0.120 0.000 0.876 0.004 0.000
#> SRR834560 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0146 0.9196 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834562 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0146 0.9196 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834564 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0146 0.9196 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834566 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.4743 0.6212 0.600 0.044 0.000 0.000 0.348 0.008
#> SRR834570 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.3134 0.8135 0.820 0.036 0.000 0.000 0.144 0.000
#> SRR834573 1 0.4755 0.6179 0.596 0.044 0.000 0.000 0.352 0.008
#> SRR834574 1 0.0146 0.9192 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834575 1 0.2062 0.8683 0.900 0.004 0.000 0.000 0.088 0.008
#> SRR834576 1 0.0000 0.9205 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.4767 0.6131 0.592 0.044 0.000 0.000 0.356 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["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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'SD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.766 0.957 0.970 0.4327 0.544 0.544
#> 3 3 1.000 0.987 0.994 0.4357 0.753 0.578
#> 4 4 0.967 0.904 0.963 0.1890 0.879 0.687
#> 5 5 0.819 0.696 0.835 0.0612 0.913 0.697
#> 6 6 0.816 0.714 0.836 0.0491 0.900 0.595
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 3
There is also optional best \(k\) = 3 that is worth to check.
Following 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
#> SRR650205 2 0.0000 0.996 0.000 1.000
#> SRR650134 2 0.0000 0.996 0.000 1.000
#> SRR650135 2 0.0000 0.996 0.000 1.000
#> SRR650136 2 0.0000 0.996 0.000 1.000
#> SRR650137 2 0.0000 0.996 0.000 1.000
#> SRR650140 2 0.0000 0.996 0.000 1.000
#> SRR650141 2 0.0000 0.996 0.000 1.000
#> SRR650144 2 0.0000 0.996 0.000 1.000
#> SRR650147 2 0.0000 0.996 0.000 1.000
#> SRR650150 2 0.0000 0.996 0.000 1.000
#> SRR650153 2 0.0000 0.996 0.000 1.000
#> SRR650156 2 0.0000 0.996 0.000 1.000
#> SRR650159 2 0.0000 0.996 0.000 1.000
#> SRR650162 2 0.0000 0.996 0.000 1.000
#> SRR650168 2 0.0000 0.996 0.000 1.000
#> SRR650166 2 0.0000 0.996 0.000 1.000
#> SRR650167 2 0.0000 0.996 0.000 1.000
#> SRR650171 2 0.0000 0.996 0.000 1.000
#> SRR650165 2 0.0000 0.996 0.000 1.000
#> SRR650176 2 0.0000 0.996 0.000 1.000
#> SRR650177 2 0.0000 0.996 0.000 1.000
#> SRR650180 2 0.0000 0.996 0.000 1.000
#> SRR650179 2 0.0000 0.996 0.000 1.000
#> SRR650181 2 0.0000 0.996 0.000 1.000
#> SRR650183 2 0.0000 0.996 0.000 1.000
#> SRR650184 2 0.0000 0.996 0.000 1.000
#> SRR650185 2 0.0000 0.996 0.000 1.000
#> SRR650188 2 0.0000 0.996 0.000 1.000
#> SRR650191 2 0.0000 0.996 0.000 1.000
#> SRR650192 2 0.0000 0.996 0.000 1.000
#> SRR650195 2 0.0000 0.996 0.000 1.000
#> SRR650198 2 0.0000 0.996 0.000 1.000
#> SRR650200 2 0.0000 0.996 0.000 1.000
#> SRR650196 2 0.0000 0.996 0.000 1.000
#> SRR650197 2 0.0000 0.996 0.000 1.000
#> SRR650201 2 0.0000 0.996 0.000 1.000
#> SRR650203 2 0.0000 0.996 0.000 1.000
#> SRR650204 2 0.0000 0.996 0.000 1.000
#> SRR650202 2 0.0000 0.996 0.000 1.000
#> SRR650130 2 0.0000 0.996 0.000 1.000
#> SRR650131 2 0.0000 0.996 0.000 1.000
#> SRR650132 2 0.0000 0.996 0.000 1.000
#> SRR650133 2 0.0000 0.996 0.000 1.000
#> SRR650138 1 0.6712 0.870 0.824 0.176
#> SRR650139 1 0.6712 0.870 0.824 0.176
#> SRR650142 1 0.6712 0.870 0.824 0.176
#> SRR650143 1 0.6712 0.870 0.824 0.176
#> SRR650145 1 0.6712 0.870 0.824 0.176
#> SRR650146 1 0.6712 0.870 0.824 0.176
#> SRR650148 2 0.2948 0.940 0.052 0.948
#> SRR650149 2 0.5178 0.855 0.116 0.884
#> SRR650151 2 0.0000 0.996 0.000 1.000
#> SRR650152 2 0.0000 0.996 0.000 1.000
#> SRR650154 2 0.0000 0.996 0.000 1.000
#> SRR650155 2 0.0000 0.996 0.000 1.000
#> SRR650157 1 0.6712 0.870 0.824 0.176
#> SRR650158 1 0.6712 0.870 0.824 0.176
#> SRR650160 2 0.0000 0.996 0.000 1.000
#> SRR650161 2 0.0000 0.996 0.000 1.000
#> SRR650163 1 0.6712 0.870 0.824 0.176
#> SRR650164 1 0.6712 0.870 0.824 0.176
#> SRR650169 2 0.0938 0.984 0.012 0.988
#> SRR650170 2 0.1633 0.972 0.024 0.976
#> SRR650172 2 0.0376 0.992 0.004 0.996
#> SRR650173 2 0.0672 0.988 0.008 0.992
#> SRR650174 2 0.0000 0.996 0.000 1.000
#> SRR650175 2 0.0000 0.996 0.000 1.000
#> SRR650178 2 0.0000 0.996 0.000 1.000
#> SRR650182 2 0.0000 0.996 0.000 1.000
#> SRR650186 1 0.6712 0.870 0.824 0.176
#> SRR650187 1 0.6712 0.870 0.824 0.176
#> SRR650189 1 0.7883 0.797 0.764 0.236
#> SRR650190 1 0.7602 0.819 0.780 0.220
#> SRR650193 2 0.0000 0.996 0.000 1.000
#> SRR650194 2 0.0000 0.996 0.000 1.000
#> SRR834560 1 0.0000 0.913 1.000 0.000
#> SRR834561 1 0.0000 0.913 1.000 0.000
#> SRR834562 1 0.0000 0.913 1.000 0.000
#> SRR834563 1 0.0000 0.913 1.000 0.000
#> SRR834564 1 0.0000 0.913 1.000 0.000
#> SRR834565 1 0.0000 0.913 1.000 0.000
#> SRR834566 1 0.0000 0.913 1.000 0.000
#> SRR834567 1 0.0000 0.913 1.000 0.000
#> SRR834568 1 0.0000 0.913 1.000 0.000
#> SRR834569 1 0.0000 0.913 1.000 0.000
#> SRR834570 1 0.0000 0.913 1.000 0.000
#> SRR834571 1 0.0000 0.913 1.000 0.000
#> SRR834572 1 0.0000 0.913 1.000 0.000
#> SRR834573 1 0.0000 0.913 1.000 0.000
#> SRR834574 1 0.0000 0.913 1.000 0.000
#> SRR834575 1 0.0000 0.913 1.000 0.000
#> SRR834576 1 0.0000 0.913 1.000 0.000
#> SRR834577 1 0.0000 0.913 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.988 0 1.000 0.000
#> SRR650134 2 0.0000 0.988 0 1.000 0.000
#> SRR650135 2 0.0000 0.988 0 1.000 0.000
#> SRR650136 2 0.0000 0.988 0 1.000 0.000
#> SRR650137 2 0.0000 0.988 0 1.000 0.000
#> SRR650140 2 0.0000 0.988 0 1.000 0.000
#> SRR650141 2 0.0000 0.988 0 1.000 0.000
#> SRR650144 2 0.0000 0.988 0 1.000 0.000
#> SRR650147 2 0.0000 0.988 0 1.000 0.000
#> SRR650150 2 0.0000 0.988 0 1.000 0.000
#> SRR650153 2 0.0000 0.988 0 1.000 0.000
#> SRR650156 2 0.0000 0.988 0 1.000 0.000
#> SRR650159 2 0.0000 0.988 0 1.000 0.000
#> SRR650162 2 0.0000 0.988 0 1.000 0.000
#> SRR650168 2 0.0000 0.988 0 1.000 0.000
#> SRR650166 2 0.0000 0.988 0 1.000 0.000
#> SRR650167 2 0.0000 0.988 0 1.000 0.000
#> SRR650171 2 0.0000 0.988 0 1.000 0.000
#> SRR650165 2 0.0000 0.988 0 1.000 0.000
#> SRR650176 2 0.0000 0.988 0 1.000 0.000
#> SRR650177 2 0.0000 0.988 0 1.000 0.000
#> SRR650180 2 0.0000 0.988 0 1.000 0.000
#> SRR650179 2 0.0000 0.988 0 1.000 0.000
#> SRR650181 2 0.0000 0.988 0 1.000 0.000
#> SRR650183 2 0.0000 0.988 0 1.000 0.000
#> SRR650184 2 0.0237 0.984 0 0.996 0.004
#> SRR650185 2 0.0237 0.984 0 0.996 0.004
#> SRR650188 2 0.0000 0.988 0 1.000 0.000
#> SRR650191 3 0.0000 1.000 0 0.000 1.000
#> SRR650192 2 0.0000 0.988 0 1.000 0.000
#> SRR650195 2 0.0000 0.988 0 1.000 0.000
#> SRR650198 2 0.0000 0.988 0 1.000 0.000
#> SRR650200 2 0.0000 0.988 0 1.000 0.000
#> SRR650196 2 0.0000 0.988 0 1.000 0.000
#> SRR650197 2 0.0000 0.988 0 1.000 0.000
#> SRR650201 2 0.0000 0.988 0 1.000 0.000
#> SRR650203 2 0.0000 0.988 0 1.000 0.000
#> SRR650204 2 0.0000 0.988 0 1.000 0.000
#> SRR650202 2 0.0000 0.988 0 1.000 0.000
#> SRR650130 2 0.0000 0.988 0 1.000 0.000
#> SRR650131 2 0.0000 0.988 0 1.000 0.000
#> SRR650132 2 0.0000 0.988 0 1.000 0.000
#> SRR650133 2 0.0000 0.988 0 1.000 0.000
#> SRR650138 3 0.0000 1.000 0 0.000 1.000
#> SRR650139 3 0.0000 1.000 0 0.000 1.000
#> SRR650142 3 0.0000 1.000 0 0.000 1.000
#> SRR650143 3 0.0000 1.000 0 0.000 1.000
#> SRR650145 3 0.0000 1.000 0 0.000 1.000
#> SRR650146 3 0.0000 1.000 0 0.000 1.000
#> SRR650148 3 0.0000 1.000 0 0.000 1.000
#> SRR650149 3 0.0000 1.000 0 0.000 1.000
#> SRR650151 3 0.0000 1.000 0 0.000 1.000
#> SRR650152 3 0.0000 1.000 0 0.000 1.000
#> SRR650154 3 0.0000 1.000 0 0.000 1.000
#> SRR650155 3 0.0000 1.000 0 0.000 1.000
#> SRR650157 3 0.0000 1.000 0 0.000 1.000
#> SRR650158 3 0.0000 1.000 0 0.000 1.000
#> SRR650160 2 0.5138 0.670 0 0.748 0.252
#> SRR650161 2 0.5291 0.642 0 0.732 0.268
#> SRR650163 3 0.0000 1.000 0 0.000 1.000
#> SRR650164 3 0.0000 1.000 0 0.000 1.000
#> SRR650169 3 0.0000 1.000 0 0.000 1.000
#> SRR650170 3 0.0000 1.000 0 0.000 1.000
#> SRR650172 3 0.0000 1.000 0 0.000 1.000
#> SRR650173 3 0.0000 1.000 0 0.000 1.000
#> SRR650174 3 0.0000 1.000 0 0.000 1.000
#> SRR650175 3 0.0000 1.000 0 0.000 1.000
#> SRR650178 2 0.0000 0.988 0 1.000 0.000
#> SRR650182 2 0.0000 0.988 0 1.000 0.000
#> SRR650186 3 0.0000 1.000 0 0.000 1.000
#> SRR650187 3 0.0000 1.000 0 0.000 1.000
#> SRR650189 3 0.0000 1.000 0 0.000 1.000
#> SRR650190 3 0.0000 1.000 0 0.000 1.000
#> SRR650193 2 0.0000 0.988 0 1.000 0.000
#> SRR650194 2 0.0000 0.988 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.2149 0.8792 0 0.088 0.000 0.912
#> SRR650134 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650136 2 0.4103 0.6410 0 0.744 0.000 0.256
#> SRR650137 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650141 4 0.0592 0.9476 0 0.016 0.000 0.984
#> SRR650144 2 0.4989 0.1609 0 0.528 0.000 0.472
#> SRR650147 4 0.4855 0.3144 0 0.400 0.000 0.600
#> SRR650150 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650153 2 0.0592 0.8941 0 0.984 0.000 0.016
#> SRR650156 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650168 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650166 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650171 2 0.4134 0.6353 0 0.740 0.000 0.260
#> SRR650165 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650176 4 0.0707 0.9448 0 0.020 0.000 0.980
#> SRR650177 4 0.0707 0.9448 0 0.020 0.000 0.980
#> SRR650180 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650179 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650181 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650183 4 0.0188 0.9528 0 0.004 0.000 0.996
#> SRR650184 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650185 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650188 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650191 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650192 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650195 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650198 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650200 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650197 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650203 2 0.4661 0.4784 0 0.652 0.000 0.348
#> SRR650204 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650202 2 0.4999 -0.0197 0 0.508 0.000 0.492
#> SRR650130 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650131 4 0.0000 0.9537 0 0.000 0.000 1.000
#> SRR650132 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650133 4 0.0592 0.9476 0 0.016 0.000 0.984
#> SRR650138 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650139 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650142 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650145 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650146 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650148 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650154 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650155 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650157 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650160 2 0.4967 0.2127 0 0.548 0.452 0.000
#> SRR650161 2 0.5000 0.0670 0 0.504 0.496 0.000
#> SRR650163 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650169 3 0.0707 0.9794 0 0.000 0.980 0.020
#> SRR650170 3 0.0817 0.9754 0 0.000 0.976 0.024
#> SRR650172 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650178 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.9982 0 0.000 1.000 0.000
#> SRR650193 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR650194 2 0.0000 0.9061 0 1.000 0.000 0.000
#> SRR834560 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.0000 1 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
#> SRR650205 4 0.4517 0.5145 0.000 0.008 0.000 0.556 0.436
#> SRR650134 2 0.3366 0.7779 0.000 0.768 0.000 0.232 0.000
#> SRR650135 2 0.0000 0.8302 0.000 1.000 0.000 0.000 0.000
#> SRR650136 4 0.4833 -0.1847 0.000 0.412 0.000 0.564 0.024
#> SRR650137 2 0.3480 0.7685 0.000 0.752 0.000 0.248 0.000
#> SRR650140 2 0.3636 0.7492 0.000 0.728 0.000 0.272 0.000
#> SRR650141 4 0.4517 0.5145 0.000 0.008 0.000 0.556 0.436
#> SRR650144 4 0.5071 -0.2372 0.000 0.424 0.000 0.540 0.036
#> SRR650147 4 0.5668 0.5013 0.000 0.080 0.000 0.504 0.416
#> SRR650150 2 0.3730 0.7300 0.000 0.712 0.000 0.288 0.000
#> SRR650153 2 0.2408 0.8198 0.000 0.892 0.000 0.092 0.016
#> SRR650156 2 0.0404 0.8282 0.000 0.988 0.000 0.000 0.012
#> SRR650159 2 0.3636 0.7478 0.000 0.728 0.000 0.272 0.000
#> SRR650162 2 0.3876 0.7048 0.000 0.684 0.000 0.316 0.000
#> SRR650168 4 0.4235 0.5160 0.000 0.000 0.000 0.576 0.424
#> SRR650166 2 0.3534 0.7629 0.000 0.744 0.000 0.256 0.000
#> SRR650167 2 0.0290 0.8284 0.000 0.992 0.000 0.000 0.008
#> SRR650171 4 0.4434 -0.2918 0.000 0.460 0.000 0.536 0.004
#> SRR650165 2 0.3586 0.7558 0.000 0.736 0.000 0.264 0.000
#> SRR650176 4 0.1341 0.4993 0.000 0.056 0.000 0.944 0.000
#> SRR650177 4 0.1341 0.4993 0.000 0.056 0.000 0.944 0.000
#> SRR650180 4 0.1502 0.5232 0.000 0.004 0.000 0.940 0.056
#> SRR650179 2 0.3241 0.8093 0.000 0.832 0.000 0.144 0.024
#> SRR650181 2 0.0510 0.8255 0.000 0.984 0.000 0.000 0.016
#> SRR650183 4 0.6133 0.4453 0.000 0.160 0.000 0.540 0.300
#> SRR650184 4 0.3837 0.4852 0.000 0.000 0.000 0.692 0.308
#> SRR650185 4 0.3816 0.4875 0.000 0.000 0.000 0.696 0.304
#> SRR650188 2 0.0703 0.8227 0.000 0.976 0.000 0.000 0.024
#> SRR650191 5 0.4130 -0.3068 0.000 0.000 0.012 0.292 0.696
#> SRR650192 4 0.4251 0.5433 0.000 0.012 0.000 0.672 0.316
#> SRR650195 4 0.4060 0.4509 0.000 0.000 0.000 0.640 0.360
#> SRR650198 2 0.2595 0.8117 0.000 0.888 0.000 0.080 0.032
#> SRR650200 2 0.0000 0.8302 0.000 1.000 0.000 0.000 0.000
#> SRR650196 2 0.1197 0.8095 0.000 0.952 0.000 0.000 0.048
#> SRR650197 2 0.3305 0.7818 0.000 0.776 0.000 0.224 0.000
#> SRR650201 2 0.0703 0.8234 0.000 0.976 0.000 0.000 0.024
#> SRR650203 2 0.4521 0.5843 0.000 0.748 0.000 0.088 0.164
#> SRR650204 2 0.3508 0.7659 0.000 0.748 0.000 0.252 0.000
#> SRR650202 4 0.4914 0.4943 0.000 0.108 0.000 0.712 0.180
#> SRR650130 2 0.1043 0.8139 0.000 0.960 0.000 0.000 0.040
#> SRR650131 4 0.4726 0.5279 0.000 0.020 0.000 0.580 0.400
#> SRR650132 2 0.0290 0.8311 0.000 0.992 0.000 0.008 0.000
#> SRR650133 4 0.4546 0.5004 0.000 0.008 0.000 0.532 0.460
#> SRR650138 3 0.0703 0.8702 0.000 0.000 0.976 0.000 0.024
#> SRR650139 3 0.0703 0.8702 0.000 0.000 0.976 0.000 0.024
#> SRR650142 3 0.0794 0.8732 0.000 0.000 0.972 0.000 0.028
#> SRR650143 3 0.0880 0.8721 0.000 0.000 0.968 0.000 0.032
#> SRR650145 3 0.0703 0.8702 0.000 0.000 0.976 0.000 0.024
#> SRR650146 3 0.0703 0.8702 0.000 0.000 0.976 0.000 0.024
#> SRR650148 3 0.4150 0.3213 0.000 0.000 0.612 0.000 0.388
#> SRR650149 3 0.4192 0.2791 0.000 0.000 0.596 0.000 0.404
#> SRR650151 3 0.0703 0.8702 0.000 0.000 0.976 0.000 0.024
#> SRR650152 3 0.0703 0.8702 0.000 0.000 0.976 0.000 0.024
#> SRR650154 3 0.1626 0.8420 0.000 0.016 0.940 0.000 0.044
#> SRR650155 3 0.1818 0.8336 0.000 0.024 0.932 0.000 0.044
#> SRR650157 3 0.0000 0.8761 0.000 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.8761 0.000 0.000 1.000 0.000 0.000
#> SRR650160 5 0.6362 0.5058 0.000 0.372 0.132 0.008 0.488
#> SRR650161 5 0.6387 0.5102 0.000 0.368 0.136 0.008 0.488
#> SRR650163 3 0.1197 0.8648 0.000 0.000 0.952 0.000 0.048
#> SRR650164 3 0.1341 0.8599 0.000 0.000 0.944 0.000 0.056
#> SRR650169 5 0.6040 0.3065 0.000 0.000 0.372 0.124 0.504
#> SRR650170 5 0.6040 0.3065 0.000 0.000 0.372 0.124 0.504
#> SRR650172 3 0.0290 0.8765 0.000 0.000 0.992 0.000 0.008
#> SRR650173 3 0.0290 0.8765 0.000 0.000 0.992 0.000 0.008
#> SRR650174 3 0.1410 0.8571 0.000 0.000 0.940 0.000 0.060
#> SRR650175 3 0.1478 0.8539 0.000 0.000 0.936 0.000 0.064
#> SRR650178 2 0.0703 0.8231 0.000 0.976 0.000 0.000 0.024
#> SRR650182 2 0.0609 0.8244 0.000 0.980 0.000 0.000 0.020
#> SRR650186 3 0.4182 0.2909 0.000 0.000 0.600 0.000 0.400
#> SRR650187 3 0.4192 0.2798 0.000 0.000 0.596 0.000 0.404
#> SRR650189 3 0.0609 0.8752 0.000 0.000 0.980 0.000 0.020
#> SRR650190 3 0.0609 0.8752 0.000 0.000 0.980 0.000 0.020
#> SRR650193 4 0.4410 -0.1227 0.000 0.440 0.000 0.556 0.004
#> SRR650194 4 0.4383 -0.0688 0.000 0.424 0.000 0.572 0.004
#> SRR834560 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0404 0.9924 0.988 0.000 0.000 0.000 0.012
#> SRR834562 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0404 0.9924 0.988 0.000 0.000 0.000 0.012
#> SRR834564 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0404 0.9924 0.988 0.000 0.000 0.000 0.012
#> SRR834566 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0290 0.9936 0.992 0.000 0.000 0.000 0.008
#> SRR834570 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0510 0.9902 0.984 0.000 0.000 0.000 0.016
#> SRR834574 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0404 0.9924 0.988 0.000 0.000 0.000 0.012
#> SRR834576 1 0.0000 0.9955 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0703 0.9845 0.976 0.000 0.000 0.000 0.024
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.0748 0.812 0.000 0.004 0.000 0.976 0.016 0.004
#> SRR650134 2 0.3864 -0.203 0.000 0.520 0.000 0.000 0.480 0.000
#> SRR650135 2 0.0547 0.772 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR650136 5 0.0405 0.650 0.000 0.000 0.000 0.008 0.988 0.004
#> SRR650137 5 0.3647 0.582 0.000 0.360 0.000 0.000 0.640 0.000
#> SRR650140 5 0.3482 0.641 0.000 0.316 0.000 0.000 0.684 0.000
#> SRR650141 4 0.0806 0.812 0.000 0.000 0.000 0.972 0.020 0.008
#> SRR650144 5 0.0405 0.648 0.000 0.000 0.000 0.004 0.988 0.008
#> SRR650147 4 0.1332 0.806 0.000 0.028 0.000 0.952 0.012 0.008
#> SRR650150 5 0.3515 0.634 0.000 0.324 0.000 0.000 0.676 0.000
#> SRR650153 2 0.4253 -0.153 0.000 0.524 0.000 0.016 0.460 0.000
#> SRR650156 2 0.1387 0.743 0.000 0.932 0.000 0.000 0.068 0.000
#> SRR650159 5 0.3515 0.634 0.000 0.324 0.000 0.000 0.676 0.000
#> SRR650162 5 0.2941 0.681 0.000 0.220 0.000 0.000 0.780 0.000
#> SRR650168 4 0.0363 0.810 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR650166 5 0.3717 0.539 0.000 0.384 0.000 0.000 0.616 0.000
#> SRR650167 2 0.0260 0.775 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650171 5 0.0717 0.666 0.000 0.016 0.000 0.008 0.976 0.000
#> SRR650165 5 0.3578 0.613 0.000 0.340 0.000 0.000 0.660 0.000
#> SRR650176 5 0.1053 0.660 0.000 0.012 0.000 0.020 0.964 0.004
#> SRR650177 5 0.1053 0.660 0.000 0.012 0.000 0.020 0.964 0.004
#> SRR650180 5 0.2053 0.576 0.000 0.000 0.000 0.108 0.888 0.004
#> SRR650179 2 0.4535 -0.114 0.000 0.488 0.000 0.000 0.480 0.032
#> SRR650181 2 0.0260 0.775 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR650183 5 0.5563 -0.435 0.000 0.108 0.000 0.400 0.484 0.008
#> SRR650184 4 0.5386 0.607 0.000 0.000 0.000 0.524 0.352 0.124
#> SRR650185 4 0.5386 0.607 0.000 0.000 0.000 0.524 0.352 0.124
#> SRR650188 2 0.0603 0.773 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR650191 4 0.1531 0.787 0.000 0.000 0.000 0.928 0.004 0.068
#> SRR650192 4 0.3717 0.437 0.000 0.000 0.000 0.616 0.384 0.000
#> SRR650195 4 0.4988 0.523 0.000 0.000 0.000 0.484 0.448 0.068
#> SRR650198 2 0.4252 0.478 0.000 0.652 0.000 0.000 0.312 0.036
#> SRR650200 2 0.0260 0.775 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650196 2 0.1492 0.751 0.000 0.940 0.000 0.000 0.024 0.036
#> SRR650197 2 0.3854 -0.145 0.000 0.536 0.000 0.000 0.464 0.000
#> SRR650201 2 0.0858 0.762 0.000 0.968 0.000 0.028 0.000 0.004
#> SRR650203 2 0.4996 0.378 0.000 0.604 0.000 0.296 0.100 0.000
#> SRR650204 5 0.3756 0.503 0.000 0.400 0.000 0.000 0.600 0.000
#> SRR650202 4 0.1789 0.799 0.000 0.044 0.000 0.924 0.032 0.000
#> SRR650130 2 0.1341 0.756 0.000 0.948 0.000 0.000 0.024 0.028
#> SRR650131 4 0.2282 0.797 0.000 0.024 0.000 0.888 0.088 0.000
#> SRR650132 2 0.0363 0.775 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR650133 4 0.0767 0.809 0.000 0.008 0.000 0.976 0.004 0.012
#> SRR650138 3 0.0000 0.784 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650139 3 0.0000 0.784 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650142 3 0.3547 0.661 0.000 0.000 0.668 0.000 0.000 0.332
#> SRR650143 3 0.3592 0.645 0.000 0.000 0.656 0.000 0.000 0.344
#> SRR650145 3 0.0000 0.784 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650146 3 0.0000 0.784 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650148 6 0.2996 0.714 0.000 0.000 0.228 0.000 0.000 0.772
#> SRR650149 6 0.2912 0.736 0.000 0.000 0.216 0.000 0.000 0.784
#> SRR650151 3 0.0000 0.784 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650152 3 0.0000 0.784 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650154 3 0.1218 0.756 0.000 0.012 0.956 0.000 0.004 0.028
#> SRR650155 3 0.1218 0.756 0.000 0.012 0.956 0.000 0.004 0.028
#> SRR650157 3 0.2092 0.795 0.000 0.000 0.876 0.000 0.000 0.124
#> SRR650158 3 0.2092 0.795 0.000 0.000 0.876 0.000 0.000 0.124
#> SRR650160 6 0.2520 0.804 0.000 0.108 0.012 0.000 0.008 0.872
#> SRR650161 6 0.2520 0.804 0.000 0.108 0.012 0.000 0.008 0.872
#> SRR650163 3 0.3634 0.619 0.000 0.000 0.644 0.000 0.000 0.356
#> SRR650164 3 0.3684 0.591 0.000 0.000 0.628 0.000 0.000 0.372
#> SRR650169 6 0.1718 0.827 0.000 0.000 0.016 0.008 0.044 0.932
#> SRR650170 6 0.1718 0.827 0.000 0.000 0.016 0.008 0.044 0.932
#> SRR650172 3 0.2597 0.784 0.000 0.000 0.824 0.000 0.000 0.176
#> SRR650173 3 0.2562 0.785 0.000 0.000 0.828 0.000 0.000 0.172
#> SRR650174 3 0.4570 0.679 0.000 0.080 0.668 0.000 0.000 0.252
#> SRR650175 3 0.4952 0.629 0.000 0.116 0.632 0.000 0.000 0.252
#> SRR650178 2 0.0260 0.775 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR650182 2 0.0146 0.775 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR650186 6 0.2135 0.832 0.000 0.000 0.128 0.000 0.000 0.872
#> SRR650187 6 0.2178 0.830 0.000 0.000 0.132 0.000 0.000 0.868
#> SRR650189 3 0.3221 0.734 0.000 0.000 0.736 0.000 0.000 0.264
#> SRR650190 3 0.3198 0.737 0.000 0.000 0.740 0.000 0.000 0.260
#> SRR650193 5 0.3791 0.677 0.000 0.236 0.000 0.032 0.732 0.000
#> SRR650194 5 0.3791 0.677 0.000 0.236 0.000 0.032 0.732 0.000
#> SRR834560 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.1138 0.977 0.960 0.000 0.000 0.012 0.004 0.024
#> SRR834562 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.1138 0.977 0.960 0.000 0.000 0.012 0.004 0.024
#> SRR834564 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.1138 0.977 0.960 0.000 0.000 0.012 0.004 0.024
#> SRR834566 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0862 0.981 0.972 0.000 0.000 0.008 0.004 0.016
#> SRR834570 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.1138 0.977 0.960 0.000 0.000 0.012 0.004 0.024
#> SRR834574 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.1138 0.977 0.960 0.000 0.000 0.012 0.004 0.024
#> SRR834576 1 0.0000 0.987 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.1321 0.973 0.952 0.000 0.000 0.020 0.004 0.024
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.998 0.998 0.3166 0.684 0.684
#> 3 3 1.000 0.989 0.995 0.9458 0.702 0.565
#> 4 4 0.918 0.934 0.947 0.0570 0.972 0.927
#> 5 5 0.856 0.853 0.935 0.0800 0.968 0.910
#> 6 6 0.848 0.812 0.910 0.0782 0.893 0.679
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 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
#> SRR650205 2 0.0376 0.998 0.004 0.996
#> SRR650134 2 0.0376 0.998 0.004 0.996
#> SRR650135 2 0.0376 0.998 0.004 0.996
#> SRR650136 2 0.0376 0.998 0.004 0.996
#> SRR650137 2 0.0376 0.998 0.004 0.996
#> SRR650140 2 0.0376 0.998 0.004 0.996
#> SRR650141 2 0.0376 0.998 0.004 0.996
#> SRR650144 2 0.0376 0.998 0.004 0.996
#> SRR650147 2 0.0376 0.998 0.004 0.996
#> SRR650150 2 0.0376 0.998 0.004 0.996
#> SRR650153 2 0.0376 0.998 0.004 0.996
#> SRR650156 2 0.0376 0.998 0.004 0.996
#> SRR650159 2 0.0376 0.998 0.004 0.996
#> SRR650162 2 0.0376 0.998 0.004 0.996
#> SRR650168 2 0.0376 0.998 0.004 0.996
#> SRR650166 2 0.0376 0.998 0.004 0.996
#> SRR650167 2 0.0376 0.998 0.004 0.996
#> SRR650171 2 0.0376 0.998 0.004 0.996
#> SRR650165 2 0.0376 0.998 0.004 0.996
#> SRR650176 2 0.0376 0.998 0.004 0.996
#> SRR650177 2 0.0376 0.998 0.004 0.996
#> SRR650180 2 0.0376 0.998 0.004 0.996
#> SRR650179 2 0.0376 0.998 0.004 0.996
#> SRR650181 2 0.0376 0.998 0.004 0.996
#> SRR650183 2 0.0376 0.998 0.004 0.996
#> SRR650184 2 0.0000 0.998 0.000 1.000
#> SRR650185 2 0.0000 0.998 0.000 1.000
#> SRR650188 2 0.0376 0.998 0.004 0.996
#> SRR650191 2 0.0000 0.998 0.000 1.000
#> SRR650192 2 0.0376 0.998 0.004 0.996
#> SRR650195 2 0.0376 0.998 0.004 0.996
#> SRR650198 2 0.0376 0.998 0.004 0.996
#> SRR650200 2 0.0376 0.998 0.004 0.996
#> SRR650196 2 0.0376 0.998 0.004 0.996
#> SRR650197 2 0.0376 0.998 0.004 0.996
#> SRR650201 2 0.0376 0.998 0.004 0.996
#> SRR650203 2 0.0376 0.998 0.004 0.996
#> SRR650204 2 0.0376 0.998 0.004 0.996
#> SRR650202 2 0.0376 0.998 0.004 0.996
#> SRR650130 2 0.0376 0.998 0.004 0.996
#> SRR650131 2 0.0376 0.998 0.004 0.996
#> SRR650132 2 0.0376 0.998 0.004 0.996
#> SRR650133 2 0.0376 0.998 0.004 0.996
#> SRR650138 2 0.0000 0.998 0.000 1.000
#> SRR650139 2 0.0000 0.998 0.000 1.000
#> SRR650142 2 0.0000 0.998 0.000 1.000
#> SRR650143 2 0.0000 0.998 0.000 1.000
#> SRR650145 2 0.0000 0.998 0.000 1.000
#> SRR650146 2 0.0000 0.998 0.000 1.000
#> SRR650148 2 0.0000 0.998 0.000 1.000
#> SRR650149 2 0.0000 0.998 0.000 1.000
#> SRR650151 2 0.0000 0.998 0.000 1.000
#> SRR650152 2 0.0000 0.998 0.000 1.000
#> SRR650154 2 0.0000 0.998 0.000 1.000
#> SRR650155 2 0.0000 0.998 0.000 1.000
#> SRR650157 2 0.0000 0.998 0.000 1.000
#> SRR650158 2 0.0000 0.998 0.000 1.000
#> SRR650160 2 0.0376 0.998 0.004 0.996
#> SRR650161 2 0.0376 0.998 0.004 0.996
#> SRR650163 2 0.0000 0.998 0.000 1.000
#> SRR650164 2 0.0000 0.998 0.000 1.000
#> SRR650169 2 0.0000 0.998 0.000 1.000
#> SRR650170 2 0.0000 0.998 0.000 1.000
#> SRR650172 2 0.0000 0.998 0.000 1.000
#> SRR650173 2 0.0000 0.998 0.000 1.000
#> SRR650174 2 0.0000 0.998 0.000 1.000
#> SRR650175 2 0.0000 0.998 0.000 1.000
#> SRR650178 2 0.0376 0.998 0.004 0.996
#> SRR650182 2 0.0376 0.998 0.004 0.996
#> SRR650186 2 0.0000 0.998 0.000 1.000
#> SRR650187 2 0.0000 0.998 0.000 1.000
#> SRR650189 2 0.0000 0.998 0.000 1.000
#> SRR650190 2 0.0000 0.998 0.000 1.000
#> SRR650193 2 0.0376 0.998 0.004 0.996
#> SRR650194 2 0.0376 0.998 0.004 0.996
#> SRR834560 1 0.0000 1.000 1.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000
#> SRR834577 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
#> SRR650205 2 0.0000 0.989 0 1.000 0.000
#> SRR650134 2 0.0000 0.989 0 1.000 0.000
#> SRR650135 2 0.0000 0.989 0 1.000 0.000
#> SRR650136 2 0.0000 0.989 0 1.000 0.000
#> SRR650137 2 0.0000 0.989 0 1.000 0.000
#> SRR650140 2 0.0000 0.989 0 1.000 0.000
#> SRR650141 2 0.0000 0.989 0 1.000 0.000
#> SRR650144 2 0.0000 0.989 0 1.000 0.000
#> SRR650147 2 0.0000 0.989 0 1.000 0.000
#> SRR650150 2 0.0000 0.989 0 1.000 0.000
#> SRR650153 2 0.0000 0.989 0 1.000 0.000
#> SRR650156 2 0.0000 0.989 0 1.000 0.000
#> SRR650159 2 0.0000 0.989 0 1.000 0.000
#> SRR650162 2 0.0000 0.989 0 1.000 0.000
#> SRR650168 2 0.0892 0.971 0 0.980 0.020
#> SRR650166 2 0.0000 0.989 0 1.000 0.000
#> SRR650167 2 0.0000 0.989 0 1.000 0.000
#> SRR650171 2 0.0000 0.989 0 1.000 0.000
#> SRR650165 2 0.0000 0.989 0 1.000 0.000
#> SRR650176 2 0.0000 0.989 0 1.000 0.000
#> SRR650177 2 0.0000 0.989 0 1.000 0.000
#> SRR650180 2 0.0000 0.989 0 1.000 0.000
#> SRR650179 2 0.0000 0.989 0 1.000 0.000
#> SRR650181 2 0.0000 0.989 0 1.000 0.000
#> SRR650183 2 0.0000 0.989 0 1.000 0.000
#> SRR650184 2 0.3116 0.879 0 0.892 0.108
#> SRR650185 2 0.3116 0.879 0 0.892 0.108
#> SRR650188 2 0.0000 0.989 0 1.000 0.000
#> SRR650191 2 0.5058 0.688 0 0.756 0.244
#> SRR650192 2 0.0000 0.989 0 1.000 0.000
#> SRR650195 2 0.0000 0.989 0 1.000 0.000
#> SRR650198 2 0.0000 0.989 0 1.000 0.000
#> SRR650200 2 0.0000 0.989 0 1.000 0.000
#> SRR650196 2 0.0000 0.989 0 1.000 0.000
#> SRR650197 2 0.0000 0.989 0 1.000 0.000
#> SRR650201 2 0.0000 0.989 0 1.000 0.000
#> SRR650203 2 0.0000 0.989 0 1.000 0.000
#> SRR650204 2 0.0000 0.989 0 1.000 0.000
#> SRR650202 2 0.0000 0.989 0 1.000 0.000
#> SRR650130 2 0.0000 0.989 0 1.000 0.000
#> SRR650131 2 0.0000 0.989 0 1.000 0.000
#> SRR650132 2 0.0000 0.989 0 1.000 0.000
#> SRR650133 2 0.0000 0.989 0 1.000 0.000
#> SRR650138 3 0.0000 1.000 0 0.000 1.000
#> SRR650139 3 0.0000 1.000 0 0.000 1.000
#> SRR650142 3 0.0000 1.000 0 0.000 1.000
#> SRR650143 3 0.0000 1.000 0 0.000 1.000
#> SRR650145 3 0.0000 1.000 0 0.000 1.000
#> SRR650146 3 0.0000 1.000 0 0.000 1.000
#> SRR650148 3 0.0000 1.000 0 0.000 1.000
#> SRR650149 3 0.0000 1.000 0 0.000 1.000
#> SRR650151 3 0.0000 1.000 0 0.000 1.000
#> SRR650152 3 0.0000 1.000 0 0.000 1.000
#> SRR650154 3 0.0000 1.000 0 0.000 1.000
#> SRR650155 3 0.0000 1.000 0 0.000 1.000
#> SRR650157 3 0.0000 1.000 0 0.000 1.000
#> SRR650158 3 0.0000 1.000 0 0.000 1.000
#> SRR650160 2 0.0000 0.989 0 1.000 0.000
#> SRR650161 2 0.0000 0.989 0 1.000 0.000
#> SRR650163 3 0.0000 1.000 0 0.000 1.000
#> SRR650164 3 0.0000 1.000 0 0.000 1.000
#> SRR650169 3 0.0000 1.000 0 0.000 1.000
#> SRR650170 3 0.0000 1.000 0 0.000 1.000
#> SRR650172 3 0.0000 1.000 0 0.000 1.000
#> SRR650173 3 0.0000 1.000 0 0.000 1.000
#> SRR650174 3 0.0000 1.000 0 0.000 1.000
#> SRR650175 3 0.0000 1.000 0 0.000 1.000
#> SRR650178 2 0.0000 0.989 0 1.000 0.000
#> SRR650182 2 0.0000 0.989 0 1.000 0.000
#> SRR650186 3 0.0000 1.000 0 0.000 1.000
#> SRR650187 3 0.0000 1.000 0 0.000 1.000
#> SRR650189 3 0.0000 1.000 0 0.000 1.000
#> SRR650190 3 0.0000 1.000 0 0.000 1.000
#> SRR650193 2 0.0000 0.989 0 1.000 0.000
#> SRR650194 2 0.0000 0.989 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.2760 0.8663 0 0.872 0.000 0.128
#> SRR650134 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650136 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650137 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650141 2 0.2760 0.8663 0 0.872 0.000 0.128
#> SRR650144 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650147 2 0.2760 0.8663 0 0.872 0.000 0.128
#> SRR650150 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650153 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650156 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650168 2 0.3390 0.8483 0 0.852 0.016 0.132
#> SRR650166 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650171 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650165 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650176 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650177 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650180 2 0.0188 0.9604 0 0.996 0.000 0.004
#> SRR650179 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650181 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650183 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650184 2 0.5998 0.6072 0 0.680 0.108 0.212
#> SRR650185 2 0.5998 0.6072 0 0.680 0.108 0.212
#> SRR650188 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650191 2 0.7740 0.0778 0 0.416 0.236 0.348
#> SRR650192 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650195 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650198 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650200 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650197 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650203 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650204 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650202 2 0.0188 0.9604 0 0.996 0.000 0.004
#> SRR650130 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650131 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650132 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650133 2 0.2760 0.8663 0 0.872 0.000 0.128
#> SRR650138 4 0.4679 0.9972 0 0.000 0.352 0.648
#> SRR650139 4 0.4679 0.9972 0 0.000 0.352 0.648
#> SRR650142 3 0.0188 0.9252 0 0.000 0.996 0.004
#> SRR650143 3 0.0188 0.9252 0 0.000 0.996 0.004
#> SRR650145 4 0.4679 0.9972 0 0.000 0.352 0.648
#> SRR650146 4 0.4679 0.9972 0 0.000 0.352 0.648
#> SRR650148 3 0.1792 0.9018 0 0.000 0.932 0.068
#> SRR650149 3 0.1792 0.9018 0 0.000 0.932 0.068
#> SRR650151 3 0.3726 0.6315 0 0.000 0.788 0.212
#> SRR650152 3 0.3726 0.6315 0 0.000 0.788 0.212
#> SRR650154 4 0.4661 0.9944 0 0.000 0.348 0.652
#> SRR650155 4 0.4661 0.9944 0 0.000 0.348 0.652
#> SRR650157 3 0.0000 0.9265 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.9265 0 0.000 1.000 0.000
#> SRR650160 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650161 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650163 3 0.0000 0.9265 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.9265 0 0.000 1.000 0.000
#> SRR650169 3 0.0188 0.9252 0 0.000 0.996 0.004
#> SRR650170 3 0.0188 0.9252 0 0.000 0.996 0.004
#> SRR650172 3 0.1792 0.9018 0 0.000 0.932 0.068
#> SRR650173 3 0.1792 0.9018 0 0.000 0.932 0.068
#> SRR650174 3 0.1792 0.9018 0 0.000 0.932 0.068
#> SRR650175 3 0.1792 0.9018 0 0.000 0.932 0.068
#> SRR650178 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650186 3 0.0188 0.9252 0 0.000 0.996 0.004
#> SRR650187 3 0.0188 0.9252 0 0.000 0.996 0.004
#> SRR650189 3 0.0707 0.9236 0 0.000 0.980 0.020
#> SRR650190 3 0.0707 0.9236 0 0.000 0.980 0.020
#> SRR650193 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR650194 2 0.0000 0.9629 0 1.000 0.000 0.000
#> SRR834560 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.0000 1 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
#> SRR650205 2 0.2891 0.6844 0 0.824 0.000 0.176 0.000
#> SRR650134 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650135 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650136 2 0.4227 0.2042 0 0.580 0.000 0.420 0.000
#> SRR650137 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650140 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650141 2 0.2891 0.6793 0 0.824 0.000 0.176 0.000
#> SRR650144 2 0.4291 0.0384 0 0.536 0.000 0.464 0.000
#> SRR650147 2 0.2891 0.6793 0 0.824 0.000 0.176 0.000
#> SRR650150 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650153 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650156 2 0.0162 0.8676 0 0.996 0.000 0.004 0.000
#> SRR650159 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650168 2 0.3143 0.6444 0 0.796 0.000 0.204 0.000
#> SRR650166 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650167 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650171 2 0.2813 0.7554 0 0.832 0.000 0.168 0.000
#> SRR650165 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650176 2 0.2813 0.7554 0 0.832 0.000 0.168 0.000
#> SRR650177 2 0.2813 0.7554 0 0.832 0.000 0.168 0.000
#> SRR650180 2 0.2813 0.7581 0 0.832 0.000 0.168 0.000
#> SRR650179 2 0.0510 0.8630 0 0.984 0.000 0.016 0.000
#> SRR650181 2 0.1851 0.8230 0 0.912 0.000 0.088 0.000
#> SRR650183 2 0.4227 0.2042 0 0.580 0.000 0.420 0.000
#> SRR650184 4 0.3039 0.6807 0 0.192 0.000 0.808 0.000
#> SRR650185 4 0.3039 0.6807 0 0.192 0.000 0.808 0.000
#> SRR650188 2 0.0162 0.8673 0 0.996 0.000 0.004 0.000
#> SRR650191 4 0.6062 0.3690 0 0.336 0.120 0.540 0.004
#> SRR650192 2 0.2648 0.7694 0 0.848 0.000 0.152 0.000
#> SRR650195 2 0.4291 0.0384 0 0.536 0.000 0.464 0.000
#> SRR650198 2 0.0510 0.8630 0 0.984 0.000 0.016 0.000
#> SRR650200 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650196 2 0.0510 0.8630 0 0.984 0.000 0.016 0.000
#> SRR650197 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650201 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650203 2 0.0794 0.8573 0 0.972 0.000 0.028 0.000
#> SRR650204 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650202 2 0.2648 0.7718 0 0.848 0.000 0.152 0.000
#> SRR650130 2 0.0290 0.8660 0 0.992 0.000 0.008 0.000
#> SRR650131 2 0.2732 0.7641 0 0.840 0.000 0.160 0.000
#> SRR650132 2 0.0162 0.8675 0 0.996 0.000 0.004 0.000
#> SRR650133 2 0.2966 0.6672 0 0.816 0.000 0.184 0.000
#> SRR650138 5 0.0290 0.9977 0 0.000 0.008 0.000 0.992
#> SRR650139 5 0.0290 0.9977 0 0.000 0.008 0.000 0.992
#> SRR650142 3 0.0162 0.9523 0 0.000 0.996 0.000 0.004
#> SRR650143 3 0.0162 0.9523 0 0.000 0.996 0.000 0.004
#> SRR650145 5 0.0290 0.9977 0 0.000 0.008 0.000 0.992
#> SRR650146 5 0.0290 0.9977 0 0.000 0.008 0.000 0.992
#> SRR650148 3 0.1544 0.9386 0 0.000 0.932 0.000 0.068
#> SRR650149 3 0.1544 0.9386 0 0.000 0.932 0.000 0.068
#> SRR650151 3 0.3210 0.7923 0 0.000 0.788 0.000 0.212
#> SRR650152 3 0.3210 0.7923 0 0.000 0.788 0.000 0.212
#> SRR650154 5 0.0162 0.9953 0 0.000 0.004 0.000 0.996
#> SRR650155 5 0.0162 0.9953 0 0.000 0.004 0.000 0.996
#> SRR650157 3 0.0000 0.9531 0 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.9531 0 0.000 1.000 0.000 0.000
#> SRR650160 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650161 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650163 3 0.0000 0.9531 0 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.9531 0 0.000 1.000 0.000 0.000
#> SRR650169 3 0.0162 0.9523 0 0.000 0.996 0.000 0.004
#> SRR650170 3 0.0162 0.9523 0 0.000 0.996 0.000 0.004
#> SRR650172 3 0.1544 0.9386 0 0.000 0.932 0.000 0.068
#> SRR650173 3 0.1544 0.9386 0 0.000 0.932 0.000 0.068
#> SRR650174 3 0.1544 0.9386 0 0.000 0.932 0.000 0.068
#> SRR650175 3 0.1544 0.9386 0 0.000 0.932 0.000 0.068
#> SRR650178 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650182 2 0.0000 0.8682 0 1.000 0.000 0.000 0.000
#> SRR650186 3 0.0162 0.9523 0 0.000 0.996 0.000 0.004
#> SRR650187 3 0.0162 0.9523 0 0.000 0.996 0.000 0.004
#> SRR650189 3 0.0609 0.9515 0 0.000 0.980 0.000 0.020
#> SRR650190 3 0.0609 0.9515 0 0.000 0.980 0.000 0.020
#> SRR650193 2 0.2648 0.7694 0 0.848 0.000 0.152 0.000
#> SRR650194 2 0.2648 0.7694 0 0.848 0.000 0.152 0.000
#> SRR834560 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.0000 1 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
#> SRR650205 2 0.3383 0.562 0.000 0.728 0.000 0.004 0.268 0.000
#> SRR650134 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650135 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650136 4 0.1075 0.329 0.000 0.048 0.000 0.952 0.000 0.000
#> SRR650137 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650140 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650141 2 0.3309 0.544 0.000 0.720 0.000 0.000 0.280 0.000
#> SRR650144 4 0.0000 0.285 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650147 2 0.3309 0.544 0.000 0.720 0.000 0.000 0.280 0.000
#> SRR650150 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650153 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650156 2 0.0146 0.919 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650159 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650168 2 0.3748 0.472 0.000 0.688 0.000 0.012 0.300 0.000
#> SRR650166 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650167 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650171 4 0.3797 0.581 0.000 0.420 0.000 0.580 0.000 0.000
#> SRR650165 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650176 4 0.3797 0.581 0.000 0.420 0.000 0.580 0.000 0.000
#> SRR650177 4 0.3797 0.581 0.000 0.420 0.000 0.580 0.000 0.000
#> SRR650180 4 0.3930 0.579 0.000 0.420 0.000 0.576 0.004 0.000
#> SRR650179 2 0.0458 0.909 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR650181 2 0.3151 0.499 0.000 0.748 0.000 0.252 0.000 0.000
#> SRR650183 4 0.1075 0.329 0.000 0.048 0.000 0.952 0.000 0.000
#> SRR650184 4 0.3592 -0.103 0.000 0.000 0.000 0.656 0.344 0.000
#> SRR650185 4 0.3592 -0.103 0.000 0.000 0.000 0.656 0.344 0.000
#> SRR650188 2 0.0146 0.919 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650191 5 0.3141 0.000 0.000 0.200 0.012 0.000 0.788 0.000
#> SRR650192 4 0.3823 0.574 0.000 0.436 0.000 0.564 0.000 0.000
#> SRR650195 4 0.0000 0.285 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650198 2 0.0458 0.909 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR650200 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650196 2 0.0458 0.909 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR650197 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650201 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650203 2 0.1663 0.820 0.000 0.912 0.000 0.088 0.000 0.000
#> SRR650204 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650202 4 0.4051 0.570 0.000 0.432 0.000 0.560 0.008 0.000
#> SRR650130 2 0.0260 0.916 0.000 0.992 0.000 0.008 0.000 0.000
#> SRR650131 4 0.3975 0.541 0.000 0.452 0.000 0.544 0.004 0.000
#> SRR650132 2 0.0146 0.919 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650133 2 0.3499 0.443 0.000 0.680 0.000 0.000 0.320 0.000
#> SRR650138 6 0.0260 0.992 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR650139 6 0.0260 0.992 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR650142 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR650143 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR650145 6 0.0260 0.992 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR650146 6 0.0260 0.992 0.000 0.000 0.008 0.000 0.000 0.992
#> SRR650148 3 0.1387 0.939 0.000 0.000 0.932 0.000 0.000 0.068
#> SRR650149 3 0.1387 0.939 0.000 0.000 0.932 0.000 0.000 0.068
#> SRR650151 3 0.2883 0.793 0.000 0.000 0.788 0.000 0.000 0.212
#> SRR650152 3 0.2883 0.793 0.000 0.000 0.788 0.000 0.000 0.212
#> SRR650154 6 0.0260 0.984 0.000 0.000 0.000 0.000 0.008 0.992
#> SRR650155 6 0.0260 0.984 0.000 0.000 0.000 0.000 0.008 0.992
#> SRR650157 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650158 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650160 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650161 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650163 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650164 3 0.0000 0.952 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650169 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR650170 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR650172 3 0.1387 0.939 0.000 0.000 0.932 0.000 0.000 0.068
#> SRR650173 3 0.1387 0.939 0.000 0.000 0.932 0.000 0.000 0.068
#> SRR650174 3 0.1387 0.939 0.000 0.000 0.932 0.000 0.000 0.068
#> SRR650175 3 0.1387 0.939 0.000 0.000 0.932 0.000 0.000 0.068
#> SRR650178 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650182 2 0.0000 0.922 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650186 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR650187 3 0.0146 0.952 0.000 0.000 0.996 0.000 0.004 0.000
#> SRR650189 3 0.0547 0.951 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR650190 3 0.0547 0.951 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR650193 4 0.3823 0.574 0.000 0.436 0.000 0.564 0.000 0.000
#> SRR650194 4 0.3823 0.574 0.000 0.436 0.000 0.564 0.000 0.000
#> SRR834560 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0865 0.952 0.964 0.000 0.000 0.000 0.036 0.000
#> SRR834562 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.1663 0.924 0.912 0.000 0.000 0.000 0.088 0.000
#> SRR834564 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0865 0.952 0.964 0.000 0.000 0.000 0.036 0.000
#> SRR834566 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0363 0.961 0.988 0.000 0.000 0.000 0.012 0.000
#> SRR834570 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.2823 0.832 0.796 0.000 0.000 0.000 0.204 0.000
#> SRR834574 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.1814 0.917 0.900 0.000 0.000 0.000 0.100 0.000
#> SRR834576 1 0.0000 0.966 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.2823 0.832 0.796 0.000 0.000 0.000 0.204 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.380 0.679 0.774 0.4127 0.583 0.583
#> 3 3 1.000 0.970 0.944 0.4378 0.798 0.654
#> 4 4 0.800 0.707 0.838 0.1683 0.994 0.984
#> 5 5 0.757 0.868 0.833 0.0818 0.864 0.643
#> 6 6 0.725 0.758 0.803 0.0516 0.972 0.887
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
#> SRR650205 2 0.9170 0.739 0.332 0.668
#> SRR650134 2 0.9170 0.739 0.332 0.668
#> SRR650135 2 0.9170 0.739 0.332 0.668
#> SRR650136 2 0.9170 0.739 0.332 0.668
#> SRR650137 2 0.9170 0.739 0.332 0.668
#> SRR650140 2 0.9170 0.739 0.332 0.668
#> SRR650141 2 0.9170 0.739 0.332 0.668
#> SRR650144 2 0.9170 0.739 0.332 0.668
#> SRR650147 2 0.9170 0.739 0.332 0.668
#> SRR650150 2 0.9170 0.739 0.332 0.668
#> SRR650153 2 0.9170 0.739 0.332 0.668
#> SRR650156 2 0.9170 0.739 0.332 0.668
#> SRR650159 2 0.9170 0.739 0.332 0.668
#> SRR650162 2 0.9170 0.739 0.332 0.668
#> SRR650168 2 0.9170 0.739 0.332 0.668
#> SRR650166 2 0.9170 0.739 0.332 0.668
#> SRR650167 2 0.9170 0.739 0.332 0.668
#> SRR650171 2 0.9170 0.739 0.332 0.668
#> SRR650165 2 0.9170 0.739 0.332 0.668
#> SRR650176 2 0.9170 0.739 0.332 0.668
#> SRR650177 2 0.9170 0.739 0.332 0.668
#> SRR650180 2 0.9170 0.739 0.332 0.668
#> SRR650179 2 0.9170 0.739 0.332 0.668
#> SRR650181 2 0.9170 0.739 0.332 0.668
#> SRR650183 2 0.9170 0.739 0.332 0.668
#> SRR650184 2 0.9170 0.739 0.332 0.668
#> SRR650185 2 0.9170 0.739 0.332 0.668
#> SRR650188 2 0.9170 0.739 0.332 0.668
#> SRR650191 1 0.7219 0.548 0.800 0.200
#> SRR650192 2 0.9170 0.739 0.332 0.668
#> SRR650195 2 0.9170 0.739 0.332 0.668
#> SRR650198 2 0.9170 0.739 0.332 0.668
#> SRR650200 2 0.9170 0.739 0.332 0.668
#> SRR650196 2 0.9170 0.739 0.332 0.668
#> SRR650197 2 0.9170 0.739 0.332 0.668
#> SRR650201 2 0.9170 0.739 0.332 0.668
#> SRR650203 2 0.9170 0.739 0.332 0.668
#> SRR650204 2 0.9170 0.739 0.332 0.668
#> SRR650202 2 0.9170 0.739 0.332 0.668
#> SRR650130 2 0.9170 0.739 0.332 0.668
#> SRR650131 2 0.9170 0.739 0.332 0.668
#> SRR650132 2 0.9170 0.739 0.332 0.668
#> SRR650133 2 0.9170 0.739 0.332 0.668
#> SRR650138 1 0.0000 0.983 1.000 0.000
#> SRR650139 1 0.0000 0.983 1.000 0.000
#> SRR650142 1 0.0672 0.977 0.992 0.008
#> SRR650143 1 0.0672 0.977 0.992 0.008
#> SRR650145 1 0.0000 0.983 1.000 0.000
#> SRR650146 1 0.0000 0.983 1.000 0.000
#> SRR650148 1 0.0000 0.983 1.000 0.000
#> SRR650149 1 0.0000 0.983 1.000 0.000
#> SRR650151 1 0.0000 0.983 1.000 0.000
#> SRR650152 1 0.0000 0.983 1.000 0.000
#> SRR650154 1 0.0000 0.983 1.000 0.000
#> SRR650155 1 0.0000 0.983 1.000 0.000
#> SRR650157 1 0.0672 0.977 0.992 0.008
#> SRR650158 1 0.0672 0.977 0.992 0.008
#> SRR650160 2 0.9209 0.734 0.336 0.664
#> SRR650161 2 0.9209 0.734 0.336 0.664
#> SRR650163 1 0.0672 0.977 0.992 0.008
#> SRR650164 1 0.0672 0.977 0.992 0.008
#> SRR650169 1 0.0000 0.983 1.000 0.000
#> SRR650170 1 0.0000 0.983 1.000 0.000
#> SRR650172 1 0.0000 0.983 1.000 0.000
#> SRR650173 1 0.0000 0.983 1.000 0.000
#> SRR650174 1 0.0000 0.983 1.000 0.000
#> SRR650175 1 0.0000 0.983 1.000 0.000
#> SRR650178 2 0.9209 0.734 0.336 0.664
#> SRR650182 2 0.9209 0.734 0.336 0.664
#> SRR650186 1 0.0672 0.977 0.992 0.008
#> SRR650187 1 0.0672 0.977 0.992 0.008
#> SRR650189 1 0.0000 0.983 1.000 0.000
#> SRR650190 1 0.0000 0.983 1.000 0.000
#> SRR650193 2 0.9170 0.739 0.332 0.668
#> SRR650194 2 0.9170 0.739 0.332 0.668
#> SRR834560 2 0.9087 0.105 0.324 0.676
#> SRR834561 2 0.9087 0.105 0.324 0.676
#> SRR834562 2 0.9087 0.105 0.324 0.676
#> SRR834563 2 0.9087 0.105 0.324 0.676
#> SRR834564 2 0.9087 0.105 0.324 0.676
#> SRR834565 2 0.9087 0.105 0.324 0.676
#> SRR834566 2 0.9087 0.105 0.324 0.676
#> SRR834567 2 0.9087 0.105 0.324 0.676
#> SRR834568 2 0.9087 0.105 0.324 0.676
#> SRR834569 2 0.9850 -0.163 0.428 0.572
#> SRR834570 2 0.9087 0.105 0.324 0.676
#> SRR834571 2 0.9087 0.105 0.324 0.676
#> SRR834572 2 0.9087 0.105 0.324 0.676
#> SRR834573 2 0.9087 0.105 0.324 0.676
#> SRR834574 2 0.9087 0.105 0.324 0.676
#> SRR834575 2 0.9087 0.105 0.324 0.676
#> SRR834576 2 0.9087 0.105 0.324 0.676
#> SRR834577 2 0.9087 0.105 0.324 0.676
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650134 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650135 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650136 2 0.1411 0.978 0.036 0.964 0.000
#> SRR650137 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650140 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650141 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650144 2 0.1411 0.978 0.036 0.964 0.000
#> SRR650147 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650150 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650153 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650156 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650159 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650162 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650168 2 0.1289 0.980 0.032 0.968 0.000
#> SRR650166 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650167 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650171 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650165 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650176 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650177 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650180 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650179 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650181 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650183 2 0.1411 0.978 0.036 0.964 0.000
#> SRR650184 2 0.1643 0.974 0.044 0.956 0.000
#> SRR650185 2 0.1643 0.974 0.044 0.956 0.000
#> SRR650188 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650191 3 0.7464 0.351 0.040 0.400 0.560
#> SRR650192 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650195 2 0.1529 0.976 0.040 0.960 0.000
#> SRR650198 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650200 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650196 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650197 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650201 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650203 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650204 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650202 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650130 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650131 2 0.1163 0.982 0.028 0.972 0.000
#> SRR650132 2 0.0000 0.988 0.000 1.000 0.000
#> SRR650133 2 0.1289 0.980 0.032 0.968 0.000
#> SRR650138 3 0.3267 0.957 0.044 0.044 0.912
#> SRR650139 3 0.3267 0.957 0.044 0.044 0.912
#> SRR650142 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650143 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650145 3 0.3267 0.957 0.044 0.044 0.912
#> SRR650146 3 0.3267 0.957 0.044 0.044 0.912
#> SRR650148 3 0.2063 0.963 0.008 0.044 0.948
#> SRR650149 3 0.2063 0.963 0.008 0.044 0.948
#> SRR650151 3 0.3481 0.954 0.052 0.044 0.904
#> SRR650152 3 0.3481 0.954 0.052 0.044 0.904
#> SRR650154 3 0.3875 0.947 0.068 0.044 0.888
#> SRR650155 3 0.3875 0.947 0.068 0.044 0.888
#> SRR650157 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650158 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650160 2 0.0237 0.986 0.004 0.996 0.000
#> SRR650161 2 0.0237 0.986 0.004 0.996 0.000
#> SRR650163 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650164 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650169 3 0.2063 0.962 0.008 0.044 0.948
#> SRR650170 3 0.2063 0.962 0.008 0.044 0.948
#> SRR650172 3 0.3039 0.959 0.036 0.044 0.920
#> SRR650173 3 0.3039 0.959 0.036 0.044 0.920
#> SRR650174 3 0.2663 0.962 0.024 0.044 0.932
#> SRR650175 3 0.2663 0.962 0.024 0.044 0.932
#> SRR650178 2 0.0892 0.973 0.020 0.980 0.000
#> SRR650182 2 0.0892 0.973 0.020 0.980 0.000
#> SRR650186 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650187 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650189 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650190 3 0.1878 0.963 0.004 0.044 0.952
#> SRR650193 2 0.0424 0.987 0.008 0.992 0.000
#> SRR650194 2 0.0424 0.987 0.008 0.992 0.000
#> SRR834560 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834561 1 0.4921 0.981 0.844 0.072 0.084
#> SRR834562 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834563 1 0.4921 0.981 0.844 0.072 0.084
#> SRR834564 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834565 1 0.4921 0.981 0.844 0.072 0.084
#> SRR834566 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834567 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834568 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834569 1 0.4790 0.966 0.848 0.056 0.096
#> SRR834570 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834571 1 0.4569 0.983 0.860 0.072 0.068
#> SRR834572 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834573 1 0.4921 0.981 0.844 0.072 0.084
#> SRR834574 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834575 1 0.4921 0.981 0.844 0.072 0.084
#> SRR834576 1 0.3856 0.986 0.888 0.072 0.040
#> SRR834577 1 0.4921 0.981 0.844 0.072 0.084
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.5220 0.367 0.008 0.568 0.000 0.424
#> SRR650134 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650135 2 0.0336 0.721 0.000 0.992 0.000 0.008
#> SRR650136 2 0.4992 0.293 0.000 0.524 0.000 0.476
#> SRR650137 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650141 2 0.5220 0.367 0.008 0.568 0.000 0.424
#> SRR650144 2 0.4992 0.293 0.000 0.524 0.000 0.476
#> SRR650147 2 0.5203 0.377 0.008 0.576 0.000 0.416
#> SRR650150 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650153 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650156 2 0.0336 0.721 0.000 0.992 0.000 0.008
#> SRR650159 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650168 2 0.5229 0.360 0.008 0.564 0.000 0.428
#> SRR650166 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650167 2 0.0336 0.721 0.000 0.992 0.000 0.008
#> SRR650171 2 0.4933 0.367 0.000 0.568 0.000 0.432
#> SRR650165 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650176 2 0.4933 0.367 0.000 0.568 0.000 0.432
#> SRR650177 2 0.4933 0.367 0.000 0.568 0.000 0.432
#> SRR650180 2 0.4933 0.367 0.000 0.568 0.000 0.432
#> SRR650179 2 0.0469 0.719 0.000 0.988 0.000 0.012
#> SRR650181 2 0.0336 0.721 0.000 0.992 0.000 0.008
#> SRR650183 2 0.4992 0.293 0.000 0.524 0.000 0.476
#> SRR650184 2 0.5409 0.205 0.012 0.496 0.000 0.492
#> SRR650185 2 0.5409 0.205 0.012 0.496 0.000 0.492
#> SRR650188 2 0.0336 0.721 0.000 0.992 0.000 0.008
#> SRR650191 4 0.7904 0.000 0.012 0.196 0.332 0.460
#> SRR650192 2 0.4907 0.383 0.000 0.580 0.000 0.420
#> SRR650195 2 0.5161 0.281 0.004 0.520 0.000 0.476
#> SRR650198 2 0.0469 0.719 0.000 0.988 0.000 0.012
#> SRR650200 2 0.0336 0.721 0.000 0.992 0.000 0.008
#> SRR650196 2 0.0469 0.719 0.000 0.988 0.000 0.012
#> SRR650197 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650203 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650204 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650202 2 0.4925 0.372 0.000 0.572 0.000 0.428
#> SRR650130 2 0.0469 0.719 0.000 0.988 0.000 0.012
#> SRR650131 2 0.4933 0.367 0.000 0.568 0.000 0.432
#> SRR650132 2 0.0000 0.722 0.000 1.000 0.000 0.000
#> SRR650133 2 0.5229 0.361 0.008 0.564 0.000 0.428
#> SRR650138 3 0.4250 0.805 0.000 0.000 0.724 0.276
#> SRR650139 3 0.4250 0.805 0.000 0.000 0.724 0.276
#> SRR650142 3 0.0336 0.857 0.000 0.000 0.992 0.008
#> SRR650143 3 0.0336 0.857 0.000 0.000 0.992 0.008
#> SRR650145 3 0.4250 0.805 0.000 0.000 0.724 0.276
#> SRR650146 3 0.4250 0.805 0.000 0.000 0.724 0.276
#> SRR650148 3 0.1902 0.860 0.004 0.000 0.932 0.064
#> SRR650149 3 0.1902 0.860 0.004 0.000 0.932 0.064
#> SRR650151 3 0.4343 0.814 0.004 0.000 0.732 0.264
#> SRR650152 3 0.4343 0.814 0.004 0.000 0.732 0.264
#> SRR650154 3 0.4564 0.774 0.000 0.000 0.672 0.328
#> SRR650155 3 0.4564 0.774 0.000 0.000 0.672 0.328
#> SRR650157 3 0.0000 0.860 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.860 0.000 0.000 1.000 0.000
#> SRR650160 2 0.1635 0.685 0.008 0.948 0.000 0.044
#> SRR650161 2 0.1635 0.685 0.008 0.948 0.000 0.044
#> SRR650163 3 0.0000 0.860 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.860 0.000 0.000 1.000 0.000
#> SRR650169 3 0.1474 0.841 0.000 0.000 0.948 0.052
#> SRR650170 3 0.1474 0.841 0.000 0.000 0.948 0.052
#> SRR650172 3 0.3893 0.841 0.008 0.000 0.796 0.196
#> SRR650173 3 0.3893 0.841 0.008 0.000 0.796 0.196
#> SRR650174 3 0.3545 0.849 0.008 0.000 0.828 0.164
#> SRR650175 3 0.3545 0.849 0.008 0.000 0.828 0.164
#> SRR650178 2 0.1824 0.671 0.004 0.936 0.000 0.060
#> SRR650182 2 0.1824 0.671 0.004 0.936 0.000 0.060
#> SRR650186 3 0.0817 0.849 0.000 0.000 0.976 0.024
#> SRR650187 3 0.0817 0.849 0.000 0.000 0.976 0.024
#> SRR650189 3 0.0336 0.860 0.000 0.000 0.992 0.008
#> SRR650190 3 0.0336 0.860 0.000 0.000 0.992 0.008
#> SRR650193 2 0.4040 0.555 0.000 0.752 0.000 0.248
#> SRR650194 2 0.4040 0.555 0.000 0.752 0.000 0.248
#> SRR834560 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834561 1 0.3854 0.921 0.828 0.008 0.012 0.152
#> SRR834562 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834563 1 0.3854 0.921 0.828 0.008 0.012 0.152
#> SRR834564 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834565 1 0.3854 0.921 0.828 0.008 0.012 0.152
#> SRR834566 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834567 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834568 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834569 1 0.3854 0.921 0.828 0.008 0.012 0.152
#> SRR834570 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834571 1 0.2099 0.941 0.936 0.008 0.012 0.044
#> SRR834572 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834573 1 0.3854 0.921 0.828 0.008 0.012 0.152
#> SRR834574 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834575 1 0.3854 0.921 0.828 0.008 0.012 0.152
#> SRR834576 1 0.0804 0.947 0.980 0.008 0.012 0.000
#> SRR834577 1 0.3854 0.921 0.828 0.008 0.012 0.152
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.5245 0.837 0.000 0.280 0.000 0.640 0.080
#> SRR650134 2 0.0510 0.965 0.000 0.984 0.000 0.000 0.016
#> SRR650135 2 0.0703 0.964 0.000 0.976 0.000 0.000 0.024
#> SRR650136 4 0.5530 0.794 0.000 0.228 0.000 0.640 0.132
#> SRR650137 2 0.0510 0.965 0.000 0.984 0.000 0.000 0.016
#> SRR650140 2 0.0510 0.963 0.000 0.984 0.000 0.000 0.016
#> SRR650141 4 0.5245 0.837 0.000 0.280 0.000 0.640 0.080
#> SRR650144 4 0.5327 0.800 0.000 0.216 0.000 0.664 0.120
#> SRR650147 4 0.5336 0.831 0.000 0.288 0.000 0.628 0.084
#> SRR650150 2 0.0771 0.958 0.000 0.976 0.000 0.004 0.020
#> SRR650153 2 0.0955 0.960 0.000 0.968 0.000 0.004 0.028
#> SRR650156 2 0.0955 0.962 0.000 0.968 0.000 0.004 0.028
#> SRR650159 2 0.0671 0.961 0.000 0.980 0.000 0.004 0.016
#> SRR650162 2 0.0510 0.963 0.000 0.984 0.000 0.000 0.016
#> SRR650168 4 0.5158 0.837 0.000 0.264 0.000 0.656 0.080
#> SRR650166 2 0.0510 0.965 0.000 0.984 0.000 0.000 0.016
#> SRR650167 2 0.0703 0.964 0.000 0.976 0.000 0.000 0.024
#> SRR650171 4 0.4584 0.835 0.000 0.312 0.000 0.660 0.028
#> SRR650165 2 0.0609 0.963 0.000 0.980 0.000 0.000 0.020
#> SRR650176 4 0.4360 0.842 0.000 0.300 0.000 0.680 0.020
#> SRR650177 4 0.4360 0.842 0.000 0.300 0.000 0.680 0.020
#> SRR650180 4 0.3730 0.848 0.000 0.288 0.000 0.712 0.000
#> SRR650179 2 0.0451 0.964 0.000 0.988 0.000 0.008 0.004
#> SRR650181 2 0.1082 0.960 0.000 0.964 0.000 0.008 0.028
#> SRR650183 4 0.5284 0.799 0.000 0.216 0.000 0.668 0.116
#> SRR650184 4 0.5696 0.778 0.000 0.200 0.000 0.628 0.172
#> SRR650185 4 0.5696 0.778 0.000 0.200 0.000 0.628 0.172
#> SRR650188 2 0.0865 0.963 0.000 0.972 0.000 0.004 0.024
#> SRR650191 4 0.7620 0.458 0.000 0.112 0.288 0.468 0.132
#> SRR650192 4 0.4232 0.840 0.000 0.312 0.000 0.676 0.012
#> SRR650195 4 0.5405 0.787 0.000 0.204 0.000 0.660 0.136
#> SRR650198 2 0.0579 0.963 0.000 0.984 0.000 0.008 0.008
#> SRR650200 2 0.0703 0.964 0.000 0.976 0.000 0.000 0.024
#> SRR650196 2 0.0898 0.963 0.000 0.972 0.000 0.008 0.020
#> SRR650197 2 0.0510 0.965 0.000 0.984 0.000 0.000 0.016
#> SRR650201 2 0.0703 0.964 0.000 0.976 0.000 0.000 0.024
#> SRR650203 2 0.0162 0.966 0.000 0.996 0.000 0.004 0.000
#> SRR650204 2 0.0510 0.965 0.000 0.984 0.000 0.000 0.016
#> SRR650202 4 0.4380 0.843 0.000 0.304 0.000 0.676 0.020
#> SRR650130 2 0.0566 0.965 0.000 0.984 0.000 0.004 0.012
#> SRR650131 4 0.4046 0.846 0.000 0.296 0.000 0.696 0.008
#> SRR650132 2 0.0404 0.966 0.000 0.988 0.000 0.000 0.012
#> SRR650133 4 0.5260 0.836 0.000 0.264 0.000 0.648 0.088
#> SRR650138 3 0.4527 0.779 0.000 0.000 0.596 0.012 0.392
#> SRR650139 3 0.4527 0.779 0.000 0.000 0.596 0.012 0.392
#> SRR650142 3 0.0451 0.850 0.000 0.000 0.988 0.008 0.004
#> SRR650143 3 0.0451 0.850 0.000 0.000 0.988 0.008 0.004
#> SRR650145 3 0.4527 0.779 0.000 0.000 0.596 0.012 0.392
#> SRR650146 3 0.4527 0.779 0.000 0.000 0.596 0.012 0.392
#> SRR650148 3 0.2825 0.852 0.000 0.000 0.860 0.016 0.124
#> SRR650149 3 0.2825 0.852 0.000 0.000 0.860 0.016 0.124
#> SRR650151 3 0.4402 0.805 0.000 0.000 0.636 0.012 0.352
#> SRR650152 3 0.4402 0.805 0.000 0.000 0.636 0.012 0.352
#> SRR650154 3 0.4905 0.730 0.000 0.000 0.500 0.024 0.476
#> SRR650155 3 0.4905 0.730 0.000 0.000 0.500 0.024 0.476
#> SRR650157 3 0.0290 0.852 0.000 0.000 0.992 0.008 0.000
#> SRR650158 3 0.0290 0.852 0.000 0.000 0.992 0.008 0.000
#> SRR650160 2 0.2209 0.905 0.000 0.912 0.000 0.032 0.056
#> SRR650161 2 0.2209 0.905 0.000 0.912 0.000 0.032 0.056
#> SRR650163 3 0.0566 0.850 0.000 0.000 0.984 0.012 0.004
#> SRR650164 3 0.0566 0.850 0.000 0.000 0.984 0.012 0.004
#> SRR650169 3 0.1579 0.841 0.000 0.000 0.944 0.032 0.024
#> SRR650170 3 0.1579 0.841 0.000 0.000 0.944 0.032 0.024
#> SRR650172 3 0.3970 0.838 0.000 0.000 0.744 0.020 0.236
#> SRR650173 3 0.3970 0.838 0.000 0.000 0.744 0.020 0.236
#> SRR650174 3 0.3852 0.841 0.000 0.000 0.760 0.020 0.220
#> SRR650175 3 0.3852 0.841 0.000 0.000 0.760 0.020 0.220
#> SRR650178 2 0.2300 0.903 0.000 0.904 0.000 0.024 0.072
#> SRR650182 2 0.2300 0.903 0.000 0.904 0.000 0.024 0.072
#> SRR650186 3 0.0771 0.848 0.000 0.000 0.976 0.020 0.004
#> SRR650187 3 0.0771 0.848 0.000 0.000 0.976 0.020 0.004
#> SRR650189 3 0.0703 0.853 0.000 0.000 0.976 0.000 0.024
#> SRR650190 3 0.0703 0.853 0.000 0.000 0.976 0.000 0.024
#> SRR650193 4 0.4821 0.611 0.000 0.464 0.000 0.516 0.020
#> SRR650194 4 0.4821 0.611 0.000 0.464 0.000 0.516 0.020
#> SRR834560 1 0.0290 0.909 0.992 0.000 0.000 0.008 0.000
#> SRR834561 1 0.4779 0.860 0.716 0.000 0.000 0.084 0.200
#> SRR834562 1 0.0000 0.909 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.4707 0.860 0.716 0.000 0.000 0.072 0.212
#> SRR834564 1 0.0000 0.909 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.4779 0.860 0.716 0.000 0.000 0.084 0.200
#> SRR834566 1 0.0000 0.909 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0290 0.909 0.992 0.000 0.000 0.008 0.000
#> SRR834568 1 0.0290 0.909 0.992 0.000 0.000 0.008 0.000
#> SRR834569 1 0.4787 0.859 0.712 0.000 0.000 0.080 0.208
#> SRR834570 1 0.0000 0.909 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.1648 0.903 0.940 0.000 0.000 0.020 0.040
#> SRR834572 1 0.0000 0.909 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.4708 0.858 0.712 0.000 0.000 0.068 0.220
#> SRR834574 1 0.0290 0.909 0.992 0.000 0.000 0.008 0.000
#> SRR834575 1 0.4649 0.860 0.716 0.000 0.000 0.064 0.220
#> SRR834576 1 0.0290 0.909 0.992 0.000 0.000 0.008 0.000
#> SRR834577 1 0.4708 0.858 0.712 0.000 0.000 0.068 0.220
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.4619 0.799 0.000 0.112 0.000 0.748 NA 0.092
#> SRR650134 2 0.1720 0.922 0.000 0.928 0.000 0.000 NA 0.032
#> SRR650135 2 0.1713 0.924 0.000 0.928 0.000 0.000 NA 0.028
#> SRR650136 4 0.5560 0.743 0.000 0.084 0.000 0.612 NA 0.044
#> SRR650137 2 0.1720 0.922 0.000 0.928 0.000 0.000 NA 0.032
#> SRR650140 2 0.1572 0.922 0.000 0.936 0.000 0.000 NA 0.028
#> SRR650141 4 0.4680 0.798 0.000 0.112 0.000 0.744 NA 0.092
#> SRR650144 4 0.5311 0.747 0.000 0.080 0.000 0.640 NA 0.036
#> SRR650147 4 0.5109 0.787 0.000 0.128 0.000 0.708 NA 0.096
#> SRR650150 2 0.1906 0.917 0.000 0.924 0.000 0.008 NA 0.032
#> SRR650153 2 0.1845 0.927 0.000 0.920 0.000 0.000 NA 0.028
#> SRR650156 2 0.1780 0.923 0.000 0.924 0.000 0.000 NA 0.028
#> SRR650159 2 0.1572 0.922 0.000 0.936 0.000 0.000 NA 0.028
#> SRR650162 2 0.1572 0.922 0.000 0.936 0.000 0.000 NA 0.028
#> SRR650168 4 0.4576 0.799 0.000 0.108 0.000 0.752 NA 0.092
#> SRR650166 2 0.1720 0.922 0.000 0.928 0.000 0.000 NA 0.032
#> SRR650167 2 0.1572 0.926 0.000 0.936 0.000 0.000 NA 0.028
#> SRR650171 4 0.4073 0.809 0.000 0.164 0.000 0.764 NA 0.016
#> SRR650165 2 0.1720 0.922 0.000 0.928 0.000 0.000 NA 0.032
#> SRR650176 4 0.3822 0.815 0.000 0.140 0.000 0.788 NA 0.012
#> SRR650177 4 0.3822 0.815 0.000 0.140 0.000 0.788 NA 0.012
#> SRR650180 4 0.2446 0.820 0.000 0.124 0.000 0.864 NA 0.000
#> SRR650179 2 0.1334 0.925 0.000 0.948 0.000 0.000 NA 0.020
#> SRR650181 2 0.1924 0.922 0.000 0.920 0.000 0.004 NA 0.028
#> SRR650183 4 0.5436 0.746 0.000 0.080 0.000 0.624 NA 0.040
#> SRR650184 4 0.6253 0.686 0.000 0.068 0.000 0.512 NA 0.100
#> SRR650185 4 0.6253 0.686 0.000 0.068 0.000 0.512 NA 0.100
#> SRR650188 2 0.1984 0.921 0.000 0.912 0.000 0.000 NA 0.032
#> SRR650191 4 0.7677 0.416 0.000 0.040 0.236 0.448 NA 0.144
#> SRR650192 4 0.2631 0.819 0.000 0.152 0.000 0.840 NA 0.008
#> SRR650195 4 0.5844 0.710 0.000 0.076 0.000 0.556 NA 0.056
#> SRR650198 2 0.1549 0.925 0.000 0.936 0.000 0.000 NA 0.020
#> SRR650200 2 0.1498 0.927 0.000 0.940 0.000 0.000 NA 0.028
#> SRR650196 2 0.1765 0.923 0.000 0.924 0.000 0.000 NA 0.024
#> SRR650197 2 0.1720 0.922 0.000 0.928 0.000 0.000 NA 0.032
#> SRR650201 2 0.1418 0.928 0.000 0.944 0.000 0.000 NA 0.024
#> SRR650203 2 0.1679 0.925 0.000 0.936 0.000 0.008 NA 0.028
#> SRR650204 2 0.1720 0.922 0.000 0.928 0.000 0.000 NA 0.032
#> SRR650202 4 0.2531 0.819 0.000 0.128 0.000 0.860 NA 0.008
#> SRR650130 2 0.1984 0.920 0.000 0.912 0.000 0.000 NA 0.032
#> SRR650131 4 0.2346 0.819 0.000 0.124 0.000 0.868 NA 0.008
#> SRR650132 2 0.1088 0.931 0.000 0.960 0.000 0.000 NA 0.016
#> SRR650133 4 0.4984 0.790 0.000 0.112 0.000 0.720 NA 0.104
#> SRR650138 6 0.4325 0.832 0.000 0.000 0.456 0.000 NA 0.524
#> SRR650139 6 0.4325 0.832 0.000 0.000 0.456 0.000 NA 0.524
#> SRR650142 3 0.0405 0.708 0.000 0.000 0.988 0.008 NA 0.000
#> SRR650143 3 0.0405 0.708 0.000 0.000 0.988 0.008 NA 0.000
#> SRR650145 6 0.4325 0.832 0.000 0.000 0.456 0.000 NA 0.524
#> SRR650146 6 0.4325 0.832 0.000 0.000 0.456 0.000 NA 0.524
#> SRR650148 3 0.3568 0.528 0.000 0.000 0.780 0.012 NA 0.188
#> SRR650149 3 0.3568 0.528 0.000 0.000 0.780 0.012 NA 0.188
#> SRR650151 3 0.4633 -0.585 0.000 0.000 0.500 0.008 NA 0.468
#> SRR650152 3 0.4633 -0.585 0.000 0.000 0.500 0.008 NA 0.468
#> SRR650154 6 0.4691 0.719 0.000 0.000 0.316 0.008 NA 0.628
#> SRR650155 6 0.4691 0.719 0.000 0.000 0.316 0.008 NA 0.628
#> SRR650157 3 0.0520 0.708 0.000 0.000 0.984 0.000 NA 0.008
#> SRR650158 3 0.0520 0.708 0.000 0.000 0.984 0.000 NA 0.008
#> SRR650160 2 0.2705 0.887 0.000 0.872 0.000 0.004 NA 0.052
#> SRR650161 2 0.2705 0.887 0.000 0.872 0.000 0.004 NA 0.052
#> SRR650163 3 0.0291 0.709 0.000 0.000 0.992 0.004 NA 0.000
#> SRR650164 3 0.0291 0.709 0.000 0.000 0.992 0.004 NA 0.000
#> SRR650169 3 0.2259 0.668 0.000 0.000 0.908 0.032 NA 0.020
#> SRR650170 3 0.2259 0.668 0.000 0.000 0.908 0.032 NA 0.020
#> SRR650172 3 0.4274 0.265 0.000 0.000 0.676 0.012 NA 0.288
#> SRR650173 3 0.4274 0.265 0.000 0.000 0.676 0.012 NA 0.288
#> SRR650174 3 0.4311 0.263 0.000 0.000 0.668 0.012 NA 0.296
#> SRR650175 3 0.4311 0.263 0.000 0.000 0.668 0.012 NA 0.296
#> SRR650178 2 0.2978 0.890 0.000 0.860 0.000 0.012 NA 0.056
#> SRR650182 2 0.2978 0.890 0.000 0.860 0.000 0.012 NA 0.056
#> SRR650186 3 0.1003 0.699 0.000 0.000 0.964 0.020 NA 0.000
#> SRR650187 3 0.1003 0.699 0.000 0.000 0.964 0.020 NA 0.000
#> SRR650189 3 0.1230 0.700 0.000 0.000 0.956 0.008 NA 0.028
#> SRR650190 3 0.1230 0.700 0.000 0.000 0.956 0.008 NA 0.028
#> SRR650193 4 0.4415 0.703 0.000 0.268 0.000 0.684 NA 0.020
#> SRR650194 4 0.4415 0.703 0.000 0.268 0.000 0.684 NA 0.020
#> SRR834560 1 0.3872 0.862 0.604 0.000 0.000 0.004 NA 0.000
#> SRR834561 1 0.1196 0.771 0.952 0.000 0.000 0.008 NA 0.040
#> SRR834562 1 0.3747 0.862 0.604 0.000 0.000 0.000 NA 0.000
#> SRR834563 1 0.1124 0.771 0.956 0.000 0.000 0.008 NA 0.036
#> SRR834564 1 0.3747 0.862 0.604 0.000 0.000 0.000 NA 0.000
#> SRR834565 1 0.1196 0.771 0.952 0.000 0.000 0.008 NA 0.040
#> SRR834566 1 0.3747 0.862 0.604 0.000 0.000 0.000 NA 0.000
#> SRR834567 1 0.4079 0.860 0.608 0.000 0.000 0.004 NA 0.008
#> SRR834568 1 0.3872 0.862 0.604 0.000 0.000 0.004 NA 0.000
#> SRR834569 1 0.0717 0.772 0.976 0.000 0.000 0.008 NA 0.016
#> SRR834570 1 0.3747 0.862 0.604 0.000 0.000 0.000 NA 0.000
#> SRR834571 1 0.3940 0.854 0.652 0.000 0.000 0.004 NA 0.008
#> SRR834572 1 0.3747 0.862 0.604 0.000 0.000 0.000 NA 0.000
#> SRR834573 1 0.0603 0.770 0.980 0.000 0.000 0.004 NA 0.016
#> SRR834574 1 0.3872 0.862 0.604 0.000 0.000 0.004 NA 0.000
#> SRR834575 1 0.0146 0.771 0.996 0.000 0.000 0.000 NA 0.004
#> SRR834576 1 0.3872 0.862 0.604 0.000 0.000 0.004 NA 0.000
#> SRR834577 1 0.0603 0.770 0.980 0.000 0.000 0.004 NA 0.016
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 5.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.995 0.998 0.5052 0.495 0.495
#> 3 3 1.000 0.980 0.991 0.2284 0.886 0.771
#> 4 4 1.000 0.980 0.992 0.2094 0.869 0.657
#> 5 5 0.925 0.940 0.933 0.0457 0.964 0.858
#> 6 6 0.839 0.742 0.839 0.0349 0.985 0.930
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3 4
There is also optional best \(k\) = 2 3 4 that is worth to check.
Following 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
#> SRR650205 2 0.000 1.000 0.0 1.0
#> SRR650134 2 0.000 1.000 0.0 1.0
#> SRR650135 2 0.000 1.000 0.0 1.0
#> SRR650136 2 0.000 1.000 0.0 1.0
#> SRR650137 2 0.000 1.000 0.0 1.0
#> SRR650140 2 0.000 1.000 0.0 1.0
#> SRR650141 2 0.000 1.000 0.0 1.0
#> SRR650144 2 0.000 1.000 0.0 1.0
#> SRR650147 2 0.000 1.000 0.0 1.0
#> SRR650150 2 0.000 1.000 0.0 1.0
#> SRR650153 2 0.000 1.000 0.0 1.0
#> SRR650156 2 0.000 1.000 0.0 1.0
#> SRR650159 2 0.000 1.000 0.0 1.0
#> SRR650162 2 0.000 1.000 0.0 1.0
#> SRR650168 2 0.000 1.000 0.0 1.0
#> SRR650166 2 0.000 1.000 0.0 1.0
#> SRR650167 2 0.000 1.000 0.0 1.0
#> SRR650171 2 0.000 1.000 0.0 1.0
#> SRR650165 2 0.000 1.000 0.0 1.0
#> SRR650176 2 0.000 1.000 0.0 1.0
#> SRR650177 2 0.000 1.000 0.0 1.0
#> SRR650180 2 0.000 1.000 0.0 1.0
#> SRR650179 2 0.000 1.000 0.0 1.0
#> SRR650181 2 0.000 1.000 0.0 1.0
#> SRR650183 2 0.000 1.000 0.0 1.0
#> SRR650184 2 0.000 1.000 0.0 1.0
#> SRR650185 2 0.000 1.000 0.0 1.0
#> SRR650188 2 0.000 1.000 0.0 1.0
#> SRR650191 1 0.722 0.750 0.8 0.2
#> SRR650192 2 0.000 1.000 0.0 1.0
#> SRR650195 2 0.000 1.000 0.0 1.0
#> SRR650198 2 0.000 1.000 0.0 1.0
#> SRR650200 2 0.000 1.000 0.0 1.0
#> SRR650196 2 0.000 1.000 0.0 1.0
#> SRR650197 2 0.000 1.000 0.0 1.0
#> SRR650201 2 0.000 1.000 0.0 1.0
#> SRR650203 2 0.000 1.000 0.0 1.0
#> SRR650204 2 0.000 1.000 0.0 1.0
#> SRR650202 2 0.000 1.000 0.0 1.0
#> SRR650130 2 0.000 1.000 0.0 1.0
#> SRR650131 2 0.000 1.000 0.0 1.0
#> SRR650132 2 0.000 1.000 0.0 1.0
#> SRR650133 2 0.000 1.000 0.0 1.0
#> SRR650138 1 0.000 0.995 1.0 0.0
#> SRR650139 1 0.000 0.995 1.0 0.0
#> SRR650142 1 0.000 0.995 1.0 0.0
#> SRR650143 1 0.000 0.995 1.0 0.0
#> SRR650145 1 0.000 0.995 1.0 0.0
#> SRR650146 1 0.000 0.995 1.0 0.0
#> SRR650148 1 0.000 0.995 1.0 0.0
#> SRR650149 1 0.000 0.995 1.0 0.0
#> SRR650151 1 0.000 0.995 1.0 0.0
#> SRR650152 1 0.000 0.995 1.0 0.0
#> SRR650154 1 0.000 0.995 1.0 0.0
#> SRR650155 1 0.000 0.995 1.0 0.0
#> SRR650157 1 0.000 0.995 1.0 0.0
#> SRR650158 1 0.000 0.995 1.0 0.0
#> SRR650160 2 0.000 1.000 0.0 1.0
#> SRR650161 2 0.000 1.000 0.0 1.0
#> SRR650163 1 0.000 0.995 1.0 0.0
#> SRR650164 1 0.000 0.995 1.0 0.0
#> SRR650169 1 0.000 0.995 1.0 0.0
#> SRR650170 1 0.000 0.995 1.0 0.0
#> SRR650172 1 0.000 0.995 1.0 0.0
#> SRR650173 1 0.000 0.995 1.0 0.0
#> SRR650174 1 0.000 0.995 1.0 0.0
#> SRR650175 1 0.000 0.995 1.0 0.0
#> SRR650178 2 0.000 1.000 0.0 1.0
#> SRR650182 2 0.000 1.000 0.0 1.0
#> SRR650186 1 0.000 0.995 1.0 0.0
#> SRR650187 1 0.000 0.995 1.0 0.0
#> SRR650189 1 0.000 0.995 1.0 0.0
#> SRR650190 1 0.000 0.995 1.0 0.0
#> SRR650193 2 0.000 1.000 0.0 1.0
#> SRR650194 2 0.000 1.000 0.0 1.0
#> SRR834560 1 0.000 0.995 1.0 0.0
#> SRR834561 1 0.000 0.995 1.0 0.0
#> SRR834562 1 0.000 0.995 1.0 0.0
#> SRR834563 1 0.000 0.995 1.0 0.0
#> SRR834564 1 0.000 0.995 1.0 0.0
#> SRR834565 1 0.000 0.995 1.0 0.0
#> SRR834566 1 0.000 0.995 1.0 0.0
#> SRR834567 1 0.000 0.995 1.0 0.0
#> SRR834568 1 0.000 0.995 1.0 0.0
#> SRR834569 1 0.000 0.995 1.0 0.0
#> SRR834570 1 0.000 0.995 1.0 0.0
#> SRR834571 1 0.000 0.995 1.0 0.0
#> SRR834572 1 0.000 0.995 1.0 0.0
#> SRR834573 1 0.000 0.995 1.0 0.0
#> SRR834574 1 0.000 0.995 1.0 0.0
#> SRR834575 1 0.000 0.995 1.0 0.0
#> SRR834576 1 0.000 0.995 1.0 0.0
#> SRR834577 1 0.000 0.995 1.0 0.0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.000 0.986 0 1.000 0.000
#> SRR650134 2 0.000 0.986 0 1.000 0.000
#> SRR650135 2 0.000 0.986 0 1.000 0.000
#> SRR650136 2 0.000 0.986 0 1.000 0.000
#> SRR650137 2 0.000 0.986 0 1.000 0.000
#> SRR650140 2 0.000 0.986 0 1.000 0.000
#> SRR650141 2 0.000 0.986 0 1.000 0.000
#> SRR650144 2 0.000 0.986 0 1.000 0.000
#> SRR650147 2 0.000 0.986 0 1.000 0.000
#> SRR650150 2 0.000 0.986 0 1.000 0.000
#> SRR650153 2 0.000 0.986 0 1.000 0.000
#> SRR650156 2 0.000 0.986 0 1.000 0.000
#> SRR650159 2 0.000 0.986 0 1.000 0.000
#> SRR650162 2 0.000 0.986 0 1.000 0.000
#> SRR650168 2 0.000 0.986 0 1.000 0.000
#> SRR650166 2 0.000 0.986 0 1.000 0.000
#> SRR650167 2 0.000 0.986 0 1.000 0.000
#> SRR650171 2 0.000 0.986 0 1.000 0.000
#> SRR650165 2 0.000 0.986 0 1.000 0.000
#> SRR650176 2 0.000 0.986 0 1.000 0.000
#> SRR650177 2 0.000 0.986 0 1.000 0.000
#> SRR650180 2 0.000 0.986 0 1.000 0.000
#> SRR650179 2 0.000 0.986 0 1.000 0.000
#> SRR650181 2 0.000 0.986 0 1.000 0.000
#> SRR650183 2 0.000 0.986 0 1.000 0.000
#> SRR650184 2 0.000 0.986 0 1.000 0.000
#> SRR650185 2 0.000 0.986 0 1.000 0.000
#> SRR650188 2 0.000 0.986 0 1.000 0.000
#> SRR650191 3 0.455 0.722 0 0.200 0.800
#> SRR650192 2 0.000 0.986 0 1.000 0.000
#> SRR650195 2 0.000 0.986 0 1.000 0.000
#> SRR650198 2 0.000 0.986 0 1.000 0.000
#> SRR650200 2 0.000 0.986 0 1.000 0.000
#> SRR650196 2 0.000 0.986 0 1.000 0.000
#> SRR650197 2 0.000 0.986 0 1.000 0.000
#> SRR650201 2 0.000 0.986 0 1.000 0.000
#> SRR650203 2 0.000 0.986 0 1.000 0.000
#> SRR650204 2 0.000 0.986 0 1.000 0.000
#> SRR650202 2 0.000 0.986 0 1.000 0.000
#> SRR650130 2 0.000 0.986 0 1.000 0.000
#> SRR650131 2 0.000 0.986 0 1.000 0.000
#> SRR650132 2 0.000 0.986 0 1.000 0.000
#> SRR650133 2 0.000 0.986 0 1.000 0.000
#> SRR650138 3 0.000 0.990 0 0.000 1.000
#> SRR650139 3 0.000 0.990 0 0.000 1.000
#> SRR650142 3 0.000 0.990 0 0.000 1.000
#> SRR650143 3 0.000 0.990 0 0.000 1.000
#> SRR650145 3 0.000 0.990 0 0.000 1.000
#> SRR650146 3 0.000 0.990 0 0.000 1.000
#> SRR650148 3 0.000 0.990 0 0.000 1.000
#> SRR650149 3 0.000 0.990 0 0.000 1.000
#> SRR650151 3 0.000 0.990 0 0.000 1.000
#> SRR650152 3 0.000 0.990 0 0.000 1.000
#> SRR650154 3 0.000 0.990 0 0.000 1.000
#> SRR650155 3 0.000 0.990 0 0.000 1.000
#> SRR650157 3 0.000 0.990 0 0.000 1.000
#> SRR650158 3 0.000 0.990 0 0.000 1.000
#> SRR650160 2 0.406 0.815 0 0.836 0.164
#> SRR650161 2 0.406 0.815 0 0.836 0.164
#> SRR650163 3 0.000 0.990 0 0.000 1.000
#> SRR650164 3 0.000 0.990 0 0.000 1.000
#> SRR650169 3 0.000 0.990 0 0.000 1.000
#> SRR650170 3 0.000 0.990 0 0.000 1.000
#> SRR650172 3 0.000 0.990 0 0.000 1.000
#> SRR650173 3 0.000 0.990 0 0.000 1.000
#> SRR650174 3 0.000 0.990 0 0.000 1.000
#> SRR650175 3 0.000 0.990 0 0.000 1.000
#> SRR650178 2 0.375 0.840 0 0.856 0.144
#> SRR650182 2 0.375 0.840 0 0.856 0.144
#> SRR650186 3 0.000 0.990 0 0.000 1.000
#> SRR650187 3 0.000 0.990 0 0.000 1.000
#> SRR650189 3 0.000 0.990 0 0.000 1.000
#> SRR650190 3 0.000 0.990 0 0.000 1.000
#> SRR650193 2 0.000 0.986 0 1.000 0.000
#> SRR650194 2 0.000 0.986 0 1.000 0.000
#> SRR834560 1 0.000 1.000 1 0.000 0.000
#> SRR834561 1 0.000 1.000 1 0.000 0.000
#> SRR834562 1 0.000 1.000 1 0.000 0.000
#> SRR834563 1 0.000 1.000 1 0.000 0.000
#> SRR834564 1 0.000 1.000 1 0.000 0.000
#> SRR834565 1 0.000 1.000 1 0.000 0.000
#> SRR834566 1 0.000 1.000 1 0.000 0.000
#> SRR834567 1 0.000 1.000 1 0.000 0.000
#> SRR834568 1 0.000 1.000 1 0.000 0.000
#> SRR834569 1 0.000 1.000 1 0.000 0.000
#> SRR834570 1 0.000 1.000 1 0.000 0.000
#> SRR834571 1 0.000 1.000 1 0.000 0.000
#> SRR834572 1 0.000 1.000 1 0.000 0.000
#> SRR834573 1 0.000 1.000 1 0.000 0.000
#> SRR834574 1 0.000 1.000 1 0.000 0.000
#> SRR834575 1 0.000 1.000 1 0.000 0.000
#> SRR834576 1 0.000 1.000 1 0.000 0.000
#> SRR834577 1 0.000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650134 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650136 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650137 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650141 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650144 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650147 4 0.0188 0.995 0 0.004 0.000 0.996
#> SRR650150 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650153 2 0.0469 0.981 0 0.988 0.000 0.012
#> SRR650156 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650168 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650166 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650171 4 0.0188 0.996 0 0.004 0.000 0.996
#> SRR650165 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650176 4 0.0188 0.996 0 0.004 0.000 0.996
#> SRR650177 4 0.0188 0.996 0 0.004 0.000 0.996
#> SRR650180 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650179 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650181 2 0.2760 0.858 0 0.872 0.000 0.128
#> SRR650183 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650184 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650185 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650188 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650191 3 0.4972 0.163 0 0.000 0.544 0.456
#> SRR650192 4 0.0336 0.993 0 0.008 0.000 0.992
#> SRR650195 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650198 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650200 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650197 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650203 2 0.2281 0.896 0 0.904 0.000 0.096
#> SRR650204 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650202 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650130 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650131 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650132 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650133 4 0.0000 0.998 0 0.000 0.000 1.000
#> SRR650138 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650139 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650142 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650145 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650146 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650148 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650154 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650155 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650157 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650160 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650161 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650163 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650169 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650170 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650172 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650178 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.991 0 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.982 0 0.000 1.000 0.000
#> SRR650193 4 0.0336 0.993 0 0.008 0.000 0.992
#> SRR650194 4 0.0336 0.993 0 0.008 0.000 0.992
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 4 0.1197 0.936 0 0.000 0.000 0.952 0.048
#> SRR650134 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650135 2 0.0963 0.935 0 0.964 0.000 0.000 0.036
#> SRR650136 4 0.2424 0.911 0 0.000 0.000 0.868 0.132
#> SRR650137 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650140 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650141 4 0.1197 0.936 0 0.000 0.000 0.952 0.048
#> SRR650144 4 0.2329 0.913 0 0.000 0.000 0.876 0.124
#> SRR650147 4 0.1502 0.933 0 0.004 0.000 0.940 0.056
#> SRR650150 2 0.0898 0.936 0 0.972 0.000 0.008 0.020
#> SRR650153 2 0.1915 0.925 0 0.928 0.000 0.032 0.040
#> SRR650156 2 0.1043 0.935 0 0.960 0.000 0.000 0.040
#> SRR650159 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650162 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650168 4 0.1341 0.935 0 0.000 0.000 0.944 0.056
#> SRR650166 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650167 2 0.0963 0.935 0 0.964 0.000 0.000 0.036
#> SRR650171 4 0.1211 0.936 0 0.016 0.000 0.960 0.024
#> SRR650165 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650176 4 0.0290 0.940 0 0.000 0.000 0.992 0.008
#> SRR650177 4 0.0290 0.940 0 0.000 0.000 0.992 0.008
#> SRR650180 4 0.0000 0.941 0 0.000 0.000 1.000 0.000
#> SRR650179 2 0.0609 0.936 0 0.980 0.000 0.000 0.020
#> SRR650181 2 0.4066 0.751 0 0.768 0.000 0.188 0.044
#> SRR650183 4 0.2471 0.910 0 0.000 0.000 0.864 0.136
#> SRR650184 4 0.2605 0.907 0 0.000 0.000 0.852 0.148
#> SRR650185 4 0.2605 0.907 0 0.000 0.000 0.852 0.148
#> SRR650188 2 0.1121 0.935 0 0.956 0.000 0.000 0.044
#> SRR650191 3 0.5215 0.399 0 0.000 0.656 0.256 0.088
#> SRR650192 4 0.1121 0.924 0 0.044 0.000 0.956 0.000
#> SRR650195 4 0.2516 0.908 0 0.000 0.000 0.860 0.140
#> SRR650198 2 0.0880 0.936 0 0.968 0.000 0.000 0.032
#> SRR650200 2 0.0880 0.936 0 0.968 0.000 0.000 0.032
#> SRR650196 2 0.1043 0.936 0 0.960 0.000 0.000 0.040
#> SRR650197 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650201 2 0.0880 0.936 0 0.968 0.000 0.000 0.032
#> SRR650203 2 0.3829 0.762 0 0.776 0.000 0.196 0.028
#> SRR650204 2 0.0609 0.939 0 0.980 0.000 0.000 0.020
#> SRR650202 4 0.0000 0.941 0 0.000 0.000 1.000 0.000
#> SRR650130 2 0.1197 0.934 0 0.952 0.000 0.000 0.048
#> SRR650131 4 0.0000 0.941 0 0.000 0.000 1.000 0.000
#> SRR650132 2 0.0794 0.936 0 0.972 0.000 0.000 0.028
#> SRR650133 4 0.1544 0.932 0 0.000 0.000 0.932 0.068
#> SRR650138 5 0.3913 0.993 0 0.000 0.324 0.000 0.676
#> SRR650139 5 0.3913 0.993 0 0.000 0.324 0.000 0.676
#> SRR650142 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650143 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650145 5 0.3913 0.993 0 0.000 0.324 0.000 0.676
#> SRR650146 5 0.3913 0.993 0 0.000 0.324 0.000 0.676
#> SRR650148 3 0.0162 0.959 0 0.000 0.996 0.000 0.004
#> SRR650149 3 0.0162 0.959 0 0.000 0.996 0.000 0.004
#> SRR650151 5 0.3895 0.993 0 0.000 0.320 0.000 0.680
#> SRR650152 5 0.3895 0.993 0 0.000 0.320 0.000 0.680
#> SRR650154 5 0.3857 0.987 0 0.000 0.312 0.000 0.688
#> SRR650155 5 0.3857 0.987 0 0.000 0.312 0.000 0.688
#> SRR650157 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650160 2 0.3375 0.846 0 0.840 0.056 0.000 0.104
#> SRR650161 2 0.3375 0.846 0 0.840 0.056 0.000 0.104
#> SRR650163 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650169 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650170 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650172 3 0.0609 0.944 0 0.000 0.980 0.000 0.020
#> SRR650173 3 0.0609 0.944 0 0.000 0.980 0.000 0.020
#> SRR650174 3 0.0510 0.950 0 0.000 0.984 0.000 0.016
#> SRR650175 3 0.0510 0.950 0 0.000 0.984 0.000 0.016
#> SRR650178 2 0.3480 0.775 0 0.752 0.000 0.000 0.248
#> SRR650182 2 0.3480 0.775 0 0.752 0.000 0.000 0.248
#> SRR650186 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650187 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650189 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650190 3 0.0000 0.962 0 0.000 1.000 0.000 0.000
#> SRR650193 4 0.1725 0.914 0 0.044 0.000 0.936 0.020
#> SRR650194 4 0.1725 0.914 0 0.044 0.000 0.936 0.020
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 4 0.4264 -0.9363 0.000 0.000 0.000 0.492 0.492 0.016
#> SRR650134 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650135 2 0.3888 0.8218 0.000 0.756 0.000 0.012 0.200 0.032
#> SRR650136 4 0.1003 0.3592 0.000 0.016 0.000 0.964 0.020 0.000
#> SRR650137 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650140 2 0.0146 0.8455 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650141 5 0.4264 0.9251 0.000 0.000 0.000 0.488 0.496 0.016
#> SRR650144 4 0.0632 0.3589 0.000 0.000 0.000 0.976 0.024 0.000
#> SRR650147 5 0.4338 0.9192 0.000 0.000 0.000 0.484 0.496 0.020
#> SRR650150 2 0.0508 0.8405 0.000 0.984 0.000 0.004 0.012 0.000
#> SRR650153 2 0.4169 0.8141 0.000 0.752 0.000 0.048 0.180 0.020
#> SRR650156 2 0.4089 0.8195 0.000 0.744 0.000 0.020 0.204 0.032
#> SRR650159 2 0.0146 0.8444 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650162 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650168 5 0.4262 0.9315 0.000 0.000 0.000 0.476 0.508 0.016
#> SRR650166 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650167 2 0.3385 0.8296 0.000 0.788 0.000 0.000 0.180 0.032
#> SRR650171 4 0.4420 0.0388 0.000 0.048 0.000 0.644 0.308 0.000
#> SRR650165 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650176 4 0.3998 -0.0641 0.000 0.016 0.000 0.644 0.340 0.000
#> SRR650177 4 0.3998 -0.0641 0.000 0.016 0.000 0.644 0.340 0.000
#> SRR650180 4 0.3782 -0.1494 0.000 0.004 0.000 0.636 0.360 0.000
#> SRR650179 2 0.3705 0.8138 0.000 0.792 0.000 0.008 0.144 0.056
#> SRR650181 2 0.5429 0.7536 0.000 0.648 0.000 0.132 0.188 0.032
#> SRR650183 4 0.1007 0.3569 0.000 0.000 0.000 0.956 0.044 0.000
#> SRR650184 4 0.1644 0.3171 0.000 0.000 0.000 0.920 0.076 0.004
#> SRR650185 4 0.1644 0.3171 0.000 0.000 0.000 0.920 0.076 0.004
#> SRR650188 2 0.4071 0.8202 0.000 0.736 0.000 0.012 0.216 0.036
#> SRR650191 3 0.5004 0.4124 0.000 0.000 0.600 0.048 0.332 0.020
#> SRR650192 4 0.4511 -0.0755 0.000 0.048 0.000 0.620 0.332 0.000
#> SRR650195 4 0.1204 0.3522 0.000 0.000 0.000 0.944 0.056 0.000
#> SRR650198 2 0.3128 0.8116 0.000 0.844 0.000 0.008 0.096 0.052
#> SRR650200 2 0.3071 0.8322 0.000 0.804 0.000 0.000 0.180 0.016
#> SRR650196 2 0.4019 0.8149 0.000 0.756 0.000 0.008 0.180 0.056
#> SRR650197 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650201 2 0.2981 0.8369 0.000 0.820 0.000 0.000 0.160 0.020
#> SRR650203 2 0.4059 0.6335 0.000 0.752 0.000 0.100 0.148 0.000
#> SRR650204 2 0.0000 0.8455 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650202 4 0.4076 -0.1750 0.000 0.016 0.000 0.620 0.364 0.000
#> SRR650130 2 0.4102 0.8159 0.000 0.720 0.000 0.004 0.232 0.044
#> SRR650131 4 0.3782 -0.1493 0.000 0.004 0.000 0.636 0.360 0.000
#> SRR650132 2 0.2135 0.8424 0.000 0.872 0.000 0.000 0.128 0.000
#> SRR650133 5 0.4250 0.9004 0.000 0.000 0.000 0.456 0.528 0.016
#> SRR650138 6 0.2762 0.9747 0.000 0.000 0.196 0.000 0.000 0.804
#> SRR650139 6 0.2762 0.9747 0.000 0.000 0.196 0.000 0.000 0.804
#> SRR650142 3 0.0000 0.9463 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650143 3 0.0000 0.9463 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650145 6 0.2762 0.9747 0.000 0.000 0.196 0.000 0.000 0.804
#> SRR650146 6 0.2762 0.9747 0.000 0.000 0.196 0.000 0.000 0.804
#> SRR650148 3 0.1297 0.9296 0.000 0.000 0.948 0.000 0.040 0.012
#> SRR650149 3 0.1297 0.9296 0.000 0.000 0.948 0.000 0.040 0.012
#> SRR650151 6 0.3642 0.9474 0.000 0.000 0.204 0.000 0.036 0.760
#> SRR650152 6 0.3642 0.9474 0.000 0.000 0.204 0.000 0.036 0.760
#> SRR650154 6 0.2527 0.9612 0.000 0.000 0.168 0.000 0.000 0.832
#> SRR650155 6 0.2527 0.9612 0.000 0.000 0.168 0.000 0.000 0.832
#> SRR650157 3 0.0000 0.9463 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650158 3 0.0000 0.9463 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650160 2 0.6163 0.5883 0.000 0.524 0.024 0.004 0.284 0.164
#> SRR650161 2 0.6163 0.5883 0.000 0.524 0.024 0.004 0.284 0.164
#> SRR650163 3 0.0000 0.9463 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650164 3 0.0000 0.9463 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650169 3 0.0146 0.9451 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650170 3 0.0146 0.9451 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650172 3 0.1713 0.9150 0.000 0.000 0.928 0.000 0.044 0.028
#> SRR650173 3 0.1713 0.9150 0.000 0.000 0.928 0.000 0.044 0.028
#> SRR650174 3 0.1633 0.9200 0.000 0.000 0.932 0.000 0.044 0.024
#> SRR650175 3 0.1633 0.9200 0.000 0.000 0.932 0.000 0.044 0.024
#> SRR650178 2 0.5830 0.5925 0.000 0.488 0.000 0.000 0.284 0.228
#> SRR650182 2 0.5830 0.5925 0.000 0.488 0.000 0.000 0.284 0.228
#> SRR650186 3 0.0146 0.9451 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650187 3 0.0146 0.9451 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650189 3 0.0458 0.9434 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR650190 3 0.0458 0.9434 0.000 0.000 0.984 0.000 0.016 0.000
#> SRR650193 4 0.5369 -0.0540 0.000 0.128 0.000 0.540 0.332 0.000
#> SRR650194 4 0.5369 -0.0540 0.000 0.128 0.000 0.540 0.332 0.000
#> SRR834560 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0458 0.9906 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834562 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0458 0.9906 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834564 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0458 0.9906 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834566 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0547 0.9892 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR834570 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0547 0.9892 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR834574 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0547 0.9892 0.980 0.000 0.000 0.000 0.020 0.000
#> SRR834576 1 0.0000 0.9940 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0547 0.9892 0.980 0.000 0.000 0.000 0.020 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", "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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.496 0.768 0.781 0.3803 0.575 0.575
#> 3 3 1.000 0.993 0.997 0.6255 0.799 0.653
#> 4 4 0.836 0.896 0.859 0.1321 0.874 0.669
#> 5 5 0.947 0.966 0.971 0.0991 0.950 0.812
#> 6 6 0.919 0.893 0.918 0.0492 0.938 0.732
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] 3 5
There is also optional best \(k\) = 3 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR650205 2 0.993 0.777 0.452 0.548
#> SRR650134 2 0.993 0.777 0.452 0.548
#> SRR650135 2 0.993 0.777 0.452 0.548
#> SRR650136 2 0.993 0.777 0.452 0.548
#> SRR650137 2 0.993 0.777 0.452 0.548
#> SRR650140 2 0.993 0.777 0.452 0.548
#> SRR650141 2 0.993 0.777 0.452 0.548
#> SRR650144 2 0.993 0.777 0.452 0.548
#> SRR650147 2 0.993 0.777 0.452 0.548
#> SRR650150 2 0.993 0.777 0.452 0.548
#> SRR650153 2 0.993 0.777 0.452 0.548
#> SRR650156 2 0.993 0.777 0.452 0.548
#> SRR650159 2 0.993 0.777 0.452 0.548
#> SRR650162 2 0.993 0.777 0.452 0.548
#> SRR650168 2 0.993 0.777 0.452 0.548
#> SRR650166 2 0.993 0.777 0.452 0.548
#> SRR650167 2 0.993 0.777 0.452 0.548
#> SRR650171 2 0.993 0.777 0.452 0.548
#> SRR650165 2 0.993 0.777 0.452 0.548
#> SRR650176 2 0.993 0.777 0.452 0.548
#> SRR650177 2 0.993 0.777 0.452 0.548
#> SRR650180 2 0.993 0.777 0.452 0.548
#> SRR650179 2 0.993 0.777 0.452 0.548
#> SRR650181 2 0.993 0.777 0.452 0.548
#> SRR650183 2 0.993 0.777 0.452 0.548
#> SRR650184 2 0.993 0.777 0.452 0.548
#> SRR650185 2 0.994 0.770 0.456 0.544
#> SRR650188 2 0.993 0.777 0.452 0.548
#> SRR650191 1 0.000 0.971 1.000 0.000
#> SRR650192 2 0.993 0.777 0.452 0.548
#> SRR650195 2 0.993 0.777 0.452 0.548
#> SRR650198 2 0.993 0.777 0.452 0.548
#> SRR650200 2 0.993 0.777 0.452 0.548
#> SRR650196 2 0.993 0.777 0.452 0.548
#> SRR650197 2 0.993 0.777 0.452 0.548
#> SRR650201 2 0.993 0.777 0.452 0.548
#> SRR650203 2 0.993 0.777 0.452 0.548
#> SRR650204 2 0.993 0.777 0.452 0.548
#> SRR650202 2 0.993 0.777 0.452 0.548
#> SRR650130 2 0.993 0.777 0.452 0.548
#> SRR650131 2 0.993 0.777 0.452 0.548
#> SRR650132 2 0.993 0.777 0.452 0.548
#> SRR650133 2 0.993 0.777 0.452 0.548
#> SRR650138 1 0.000 0.971 1.000 0.000
#> SRR650139 1 0.000 0.971 1.000 0.000
#> SRR650142 1 0.000 0.971 1.000 0.000
#> SRR650143 1 0.000 0.971 1.000 0.000
#> SRR650145 1 0.000 0.971 1.000 0.000
#> SRR650146 1 0.000 0.971 1.000 0.000
#> SRR650148 1 0.000 0.971 1.000 0.000
#> SRR650149 1 0.000 0.971 1.000 0.000
#> SRR650151 1 0.000 0.971 1.000 0.000
#> SRR650152 1 0.000 0.971 1.000 0.000
#> SRR650154 1 0.000 0.971 1.000 0.000
#> SRR650155 1 0.000 0.971 1.000 0.000
#> SRR650157 1 0.000 0.971 1.000 0.000
#> SRR650158 1 0.000 0.971 1.000 0.000
#> SRR650160 2 0.993 0.777 0.452 0.548
#> SRR650161 2 0.993 0.777 0.452 0.548
#> SRR650163 1 0.000 0.971 1.000 0.000
#> SRR650164 1 0.000 0.971 1.000 0.000
#> SRR650169 1 0.000 0.971 1.000 0.000
#> SRR650170 1 0.000 0.971 1.000 0.000
#> SRR650172 1 0.000 0.971 1.000 0.000
#> SRR650173 1 0.000 0.971 1.000 0.000
#> SRR650174 1 0.000 0.971 1.000 0.000
#> SRR650175 1 0.000 0.971 1.000 0.000
#> SRR650178 2 0.993 0.777 0.452 0.548
#> SRR650182 2 0.993 0.777 0.452 0.548
#> SRR650186 1 0.000 0.971 1.000 0.000
#> SRR650187 1 0.000 0.971 1.000 0.000
#> SRR650189 1 0.000 0.971 1.000 0.000
#> SRR650190 1 0.000 0.971 1.000 0.000
#> SRR650193 2 0.993 0.777 0.452 0.548
#> SRR650194 2 0.993 0.777 0.452 0.548
#> SRR834560 2 0.000 0.490 0.000 1.000
#> SRR834561 2 0.000 0.490 0.000 1.000
#> SRR834562 2 0.000 0.490 0.000 1.000
#> SRR834563 2 0.000 0.490 0.000 1.000
#> SRR834564 2 0.000 0.490 0.000 1.000
#> SRR834565 2 0.000 0.490 0.000 1.000
#> SRR834566 2 0.000 0.490 0.000 1.000
#> SRR834567 2 0.000 0.490 0.000 1.000
#> SRR834568 2 0.000 0.490 0.000 1.000
#> SRR834569 1 0.993 0.333 0.548 0.452
#> SRR834570 2 0.000 0.490 0.000 1.000
#> SRR834571 2 0.000 0.490 0.000 1.000
#> SRR834572 2 0.000 0.490 0.000 1.000
#> SRR834573 2 0.995 -0.282 0.460 0.540
#> SRR834574 2 0.000 0.490 0.000 1.000
#> SRR834575 2 0.000 0.490 0.000 1.000
#> SRR834576 2 0.000 0.490 0.000 1.000
#> SRR834577 2 0.000 0.490 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.998 0 1.000 0.000
#> SRR650134 2 0.0000 0.998 0 1.000 0.000
#> SRR650135 2 0.0000 0.998 0 1.000 0.000
#> SRR650136 2 0.0000 0.998 0 1.000 0.000
#> SRR650137 2 0.0000 0.998 0 1.000 0.000
#> SRR650140 2 0.0000 0.998 0 1.000 0.000
#> SRR650141 2 0.0000 0.998 0 1.000 0.000
#> SRR650144 2 0.0000 0.998 0 1.000 0.000
#> SRR650147 2 0.0000 0.998 0 1.000 0.000
#> SRR650150 2 0.0000 0.998 0 1.000 0.000
#> SRR650153 2 0.0000 0.998 0 1.000 0.000
#> SRR650156 2 0.0000 0.998 0 1.000 0.000
#> SRR650159 2 0.0000 0.998 0 1.000 0.000
#> SRR650162 2 0.0000 0.998 0 1.000 0.000
#> SRR650168 2 0.0000 0.998 0 1.000 0.000
#> SRR650166 2 0.0000 0.998 0 1.000 0.000
#> SRR650167 2 0.0000 0.998 0 1.000 0.000
#> SRR650171 2 0.0000 0.998 0 1.000 0.000
#> SRR650165 2 0.0000 0.998 0 1.000 0.000
#> SRR650176 2 0.0000 0.998 0 1.000 0.000
#> SRR650177 2 0.0000 0.998 0 1.000 0.000
#> SRR650180 2 0.0000 0.998 0 1.000 0.000
#> SRR650179 2 0.0000 0.998 0 1.000 0.000
#> SRR650181 2 0.0000 0.998 0 1.000 0.000
#> SRR650183 2 0.0000 0.998 0 1.000 0.000
#> SRR650184 2 0.0000 0.998 0 1.000 0.000
#> SRR650185 2 0.0237 0.995 0 0.996 0.004
#> SRR650188 2 0.0000 0.998 0 1.000 0.000
#> SRR650191 3 0.4555 0.720 0 0.200 0.800
#> SRR650192 2 0.0000 0.998 0 1.000 0.000
#> SRR650195 2 0.0000 0.998 0 1.000 0.000
#> SRR650198 2 0.0000 0.998 0 1.000 0.000
#> SRR650200 2 0.0000 0.998 0 1.000 0.000
#> SRR650196 2 0.0000 0.998 0 1.000 0.000
#> SRR650197 2 0.0000 0.998 0 1.000 0.000
#> SRR650201 2 0.0000 0.998 0 1.000 0.000
#> SRR650203 2 0.0000 0.998 0 1.000 0.000
#> SRR650204 2 0.0000 0.998 0 1.000 0.000
#> SRR650202 2 0.0000 0.998 0 1.000 0.000
#> SRR650130 2 0.0000 0.998 0 1.000 0.000
#> SRR650131 2 0.0000 0.998 0 1.000 0.000
#> SRR650132 2 0.0000 0.998 0 1.000 0.000
#> SRR650133 2 0.0000 0.998 0 1.000 0.000
#> SRR650138 3 0.0000 0.990 0 0.000 1.000
#> SRR650139 3 0.0000 0.990 0 0.000 1.000
#> SRR650142 3 0.0000 0.990 0 0.000 1.000
#> SRR650143 3 0.0000 0.990 0 0.000 1.000
#> SRR650145 3 0.0000 0.990 0 0.000 1.000
#> SRR650146 3 0.0000 0.990 0 0.000 1.000
#> SRR650148 3 0.0000 0.990 0 0.000 1.000
#> SRR650149 3 0.0000 0.990 0 0.000 1.000
#> SRR650151 3 0.0000 0.990 0 0.000 1.000
#> SRR650152 3 0.0000 0.990 0 0.000 1.000
#> SRR650154 3 0.0000 0.990 0 0.000 1.000
#> SRR650155 3 0.0000 0.990 0 0.000 1.000
#> SRR650157 3 0.0000 0.990 0 0.000 1.000
#> SRR650158 3 0.0000 0.990 0 0.000 1.000
#> SRR650160 2 0.1031 0.976 0 0.976 0.024
#> SRR650161 2 0.0747 0.984 0 0.984 0.016
#> SRR650163 3 0.0000 0.990 0 0.000 1.000
#> SRR650164 3 0.0000 0.990 0 0.000 1.000
#> SRR650169 3 0.0000 0.990 0 0.000 1.000
#> SRR650170 3 0.0000 0.990 0 0.000 1.000
#> SRR650172 3 0.0000 0.990 0 0.000 1.000
#> SRR650173 3 0.0000 0.990 0 0.000 1.000
#> SRR650174 3 0.0000 0.990 0 0.000 1.000
#> SRR650175 3 0.0000 0.990 0 0.000 1.000
#> SRR650178 2 0.0747 0.984 0 0.984 0.016
#> SRR650182 2 0.0747 0.984 0 0.984 0.016
#> SRR650186 3 0.0000 0.990 0 0.000 1.000
#> SRR650187 3 0.0000 0.990 0 0.000 1.000
#> SRR650189 3 0.0000 0.990 0 0.000 1.000
#> SRR650190 3 0.0000 0.990 0 0.000 1.000
#> SRR650193 2 0.0000 0.998 0 1.000 0.000
#> SRR650194 2 0.0000 0.998 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650134 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650135 2 0.2216 0.77303 0 0.908 0.000 0.092
#> SRR650136 2 0.1302 0.87636 0 0.956 0.000 0.044
#> SRR650137 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650141 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650144 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650147 2 0.5000 -0.95879 0 0.504 0.000 0.496
#> SRR650150 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650153 2 0.1389 0.87033 0 0.952 0.000 0.048
#> SRR650156 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650168 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650166 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650171 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650165 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650176 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650177 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650180 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650179 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650181 2 0.2345 0.74979 0 0.900 0.000 0.100
#> SRR650183 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650184 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650185 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650188 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650191 3 0.7423 -0.00487 0 0.180 0.476 0.344
#> SRR650192 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650195 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650198 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650200 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650197 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650203 2 0.0592 0.92326 0 0.984 0.000 0.016
#> SRR650204 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650202 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650130 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650131 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650132 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650133 4 0.4998 0.99153 0 0.488 0.000 0.512
#> SRR650138 3 0.4996 0.63377 0 0.000 0.516 0.484
#> SRR650139 3 0.4996 0.63377 0 0.000 0.516 0.484
#> SRR650142 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650145 3 0.4996 0.63377 0 0.000 0.516 0.484
#> SRR650146 3 0.4996 0.63377 0 0.000 0.516 0.484
#> SRR650148 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650151 3 0.1637 0.86264 0 0.000 0.940 0.060
#> SRR650152 3 0.1637 0.86264 0 0.000 0.940 0.060
#> SRR650154 3 0.4996 0.63377 0 0.000 0.516 0.484
#> SRR650155 3 0.4996 0.63377 0 0.000 0.516 0.484
#> SRR650157 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650160 2 0.0592 0.91614 0 0.984 0.016 0.000
#> SRR650161 2 0.0188 0.93842 0 0.996 0.004 0.000
#> SRR650163 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650169 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650170 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650172 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650178 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.94500 0 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.88493 0 0.000 1.000 0.000
#> SRR650193 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR650194 4 0.4996 0.99951 0 0.484 0.000 0.516
#> SRR834560 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.00000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.00000 1 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
#> SRR650205 4 0.1908 0.949 0 0.092 0.000 0.908 0.000
#> SRR650134 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650135 2 0.2020 0.889 0 0.900 0.000 0.100 0.000
#> SRR650136 2 0.3039 0.772 0 0.808 0.000 0.192 0.000
#> SRR650137 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650140 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650141 4 0.1908 0.949 0 0.092 0.000 0.908 0.000
#> SRR650144 4 0.1908 0.948 0 0.092 0.000 0.908 0.000
#> SRR650147 4 0.3074 0.847 0 0.196 0.000 0.804 0.000
#> SRR650150 2 0.1197 0.937 0 0.952 0.000 0.048 0.000
#> SRR650153 2 0.1478 0.927 0 0.936 0.000 0.064 0.000
#> SRR650156 2 0.0290 0.973 0 0.992 0.000 0.008 0.000
#> SRR650159 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650168 4 0.1792 0.949 0 0.084 0.000 0.916 0.000
#> SRR650166 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650167 2 0.0290 0.973 0 0.992 0.000 0.008 0.000
#> SRR650171 4 0.1908 0.948 0 0.092 0.000 0.908 0.000
#> SRR650165 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650176 4 0.1792 0.949 0 0.084 0.000 0.916 0.000
#> SRR650177 4 0.1792 0.949 0 0.084 0.000 0.916 0.000
#> SRR650180 4 0.1792 0.949 0 0.084 0.000 0.916 0.000
#> SRR650179 2 0.0290 0.973 0 0.992 0.000 0.008 0.000
#> SRR650181 2 0.2424 0.845 0 0.868 0.000 0.132 0.000
#> SRR650183 4 0.2127 0.938 0 0.108 0.000 0.892 0.000
#> SRR650184 4 0.0404 0.874 0 0.012 0.000 0.988 0.000
#> SRR650185 4 0.0290 0.873 0 0.008 0.000 0.992 0.000
#> SRR650188 2 0.0290 0.973 0 0.992 0.000 0.008 0.000
#> SRR650191 4 0.5150 0.724 0 0.136 0.172 0.692 0.000
#> SRR650192 4 0.2020 0.947 0 0.100 0.000 0.900 0.000
#> SRR650195 4 0.0290 0.873 0 0.008 0.000 0.992 0.000
#> SRR650198 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650200 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650196 2 0.0162 0.974 0 0.996 0.000 0.004 0.000
#> SRR650197 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650201 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650203 2 0.0703 0.959 0 0.976 0.000 0.024 0.000
#> SRR650204 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650202 4 0.1851 0.949 0 0.088 0.000 0.912 0.000
#> SRR650130 2 0.0290 0.973 0 0.992 0.000 0.008 0.000
#> SRR650131 4 0.1908 0.949 0 0.092 0.000 0.908 0.000
#> SRR650132 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650133 4 0.2732 0.893 0 0.160 0.000 0.840 0.000
#> SRR650138 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR650139 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR650142 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650143 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650145 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR650146 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR650148 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650149 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650151 3 0.1478 0.935 0 0.000 0.936 0.000 0.064
#> SRR650152 3 0.1478 0.935 0 0.000 0.936 0.000 0.064
#> SRR650154 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR650155 5 0.0000 1.000 0 0.000 0.000 0.000 1.000
#> SRR650157 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650160 2 0.0162 0.973 0 0.996 0.004 0.000 0.000
#> SRR650161 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650163 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650169 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650170 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650172 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650173 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650174 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650175 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650178 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650182 2 0.0000 0.976 0 1.000 0.000 0.000 0.000
#> SRR650186 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650187 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650189 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650190 3 0.0000 0.993 0 0.000 1.000 0.000 0.000
#> SRR650193 4 0.2020 0.947 0 0.100 0.000 0.900 0.000
#> SRR650194 4 0.2020 0.947 0 0.100 0.000 0.900 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650134 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650135 5 0.3823 0.697 0.000 0.436 0.000 0.000 0.564 0.000
#> SRR650136 5 0.4499 0.612 0.000 0.152 0.000 0.140 0.708 0.000
#> SRR650137 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650140 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650141 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650144 5 0.4357 0.354 0.000 0.036 0.000 0.340 0.624 0.000
#> SRR650147 5 0.5644 0.530 0.000 0.188 0.000 0.288 0.524 0.000
#> SRR650150 2 0.2969 0.579 0.000 0.776 0.000 0.224 0.000 0.000
#> SRR650153 5 0.3823 0.697 0.000 0.436 0.000 0.000 0.564 0.000
#> SRR650156 5 0.3823 0.697 0.000 0.436 0.000 0.000 0.564 0.000
#> SRR650159 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650168 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650166 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650167 5 0.3823 0.697 0.000 0.436 0.000 0.000 0.564 0.000
#> SRR650171 4 0.2119 0.840 0.000 0.036 0.000 0.904 0.060 0.000
#> SRR650165 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650176 4 0.1124 0.885 0.000 0.036 0.000 0.956 0.008 0.000
#> SRR650177 4 0.1124 0.885 0.000 0.036 0.000 0.956 0.008 0.000
#> SRR650180 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650179 2 0.1327 0.885 0.000 0.936 0.000 0.000 0.064 0.000
#> SRR650181 5 0.4045 0.699 0.000 0.428 0.000 0.008 0.564 0.000
#> SRR650183 5 0.4982 0.420 0.000 0.084 0.000 0.340 0.576 0.000
#> SRR650184 4 0.3810 0.549 0.000 0.000 0.000 0.572 0.428 0.000
#> SRR650185 4 0.3810 0.549 0.000 0.000 0.000 0.572 0.428 0.000
#> SRR650188 5 0.3823 0.697 0.000 0.436 0.000 0.000 0.564 0.000
#> SRR650191 4 0.6445 0.426 0.000 0.164 0.208 0.548 0.080 0.000
#> SRR650192 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650195 5 0.0865 0.388 0.000 0.000 0.000 0.036 0.964 0.000
#> SRR650198 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650200 2 0.0458 0.955 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR650196 2 0.0547 0.950 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR650197 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650201 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650203 2 0.0547 0.945 0.000 0.980 0.000 0.020 0.000 0.000
#> SRR650204 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650202 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650130 5 0.3823 0.697 0.000 0.436 0.000 0.000 0.564 0.000
#> SRR650131 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650132 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650133 4 0.3136 0.677 0.000 0.188 0.000 0.796 0.016 0.000
#> SRR650138 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR650139 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR650142 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650143 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650145 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR650146 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR650148 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650149 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650151 3 0.2179 0.927 0.000 0.000 0.900 0.000 0.036 0.064
#> SRR650152 3 0.2179 0.927 0.000 0.000 0.900 0.000 0.036 0.064
#> SRR650154 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR650155 6 0.0000 1.000 0.000 0.000 0.000 0.000 0.000 1.000
#> SRR650157 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650158 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650160 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650161 2 0.0146 0.967 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650163 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650164 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650169 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650170 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650172 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650173 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650174 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650175 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650178 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650182 2 0.0000 0.972 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650186 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650187 3 0.0000 0.978 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650189 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650190 3 0.0865 0.976 0.000 0.000 0.964 0.000 0.036 0.000
#> SRR650193 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR650194 4 0.0790 0.891 0.000 0.032 0.000 0.968 0.000 0.000
#> SRR834560 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0790 0.980 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR834562 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0790 0.980 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR834564 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0790 0.980 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR834566 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0790 0.980 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR834574 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0790 0.980 0.968 0.000 0.000 0.032 0.000 0.000
#> SRR834576 1 0.0000 0.990 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0790 0.980 0.968 0.000 0.000 0.032 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["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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.580 0.955 0.932 0.3357 0.684 0.684
#> 3 3 0.884 0.900 0.956 0.8667 0.702 0.565
#> 4 4 0.800 0.814 0.893 0.1714 0.817 0.554
#> 5 5 0.744 0.720 0.835 0.0626 0.919 0.701
#> 6 6 0.752 0.679 0.809 0.0414 0.935 0.713
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
#> SRR650205 2 0.000 0.954 0.000 1.000
#> SRR650134 2 0.000 0.954 0.000 1.000
#> SRR650135 2 0.000 0.954 0.000 1.000
#> SRR650136 2 0.000 0.954 0.000 1.000
#> SRR650137 2 0.000 0.954 0.000 1.000
#> SRR650140 2 0.000 0.954 0.000 1.000
#> SRR650141 2 0.000 0.954 0.000 1.000
#> SRR650144 2 0.000 0.954 0.000 1.000
#> SRR650147 2 0.000 0.954 0.000 1.000
#> SRR650150 2 0.000 0.954 0.000 1.000
#> SRR650153 2 0.000 0.954 0.000 1.000
#> SRR650156 2 0.000 0.954 0.000 1.000
#> SRR650159 2 0.000 0.954 0.000 1.000
#> SRR650162 2 0.000 0.954 0.000 1.000
#> SRR650168 2 0.000 0.954 0.000 1.000
#> SRR650166 2 0.000 0.954 0.000 1.000
#> SRR650167 2 0.000 0.954 0.000 1.000
#> SRR650171 2 0.000 0.954 0.000 1.000
#> SRR650165 2 0.000 0.954 0.000 1.000
#> SRR650176 2 0.000 0.954 0.000 1.000
#> SRR650177 2 0.000 0.954 0.000 1.000
#> SRR650180 2 0.000 0.954 0.000 1.000
#> SRR650179 2 0.000 0.954 0.000 1.000
#> SRR650181 2 0.000 0.954 0.000 1.000
#> SRR650183 2 0.000 0.954 0.000 1.000
#> SRR650184 2 0.000 0.954 0.000 1.000
#> SRR650185 2 0.000 0.954 0.000 1.000
#> SRR650188 2 0.000 0.954 0.000 1.000
#> SRR650191 2 0.482 0.931 0.104 0.896
#> SRR650192 2 0.000 0.954 0.000 1.000
#> SRR650195 2 0.000 0.954 0.000 1.000
#> SRR650198 2 0.000 0.954 0.000 1.000
#> SRR650200 2 0.000 0.954 0.000 1.000
#> SRR650196 2 0.000 0.954 0.000 1.000
#> SRR650197 2 0.000 0.954 0.000 1.000
#> SRR650201 2 0.000 0.954 0.000 1.000
#> SRR650203 2 0.000 0.954 0.000 1.000
#> SRR650204 2 0.000 0.954 0.000 1.000
#> SRR650202 2 0.000 0.954 0.000 1.000
#> SRR650130 2 0.000 0.954 0.000 1.000
#> SRR650131 2 0.000 0.954 0.000 1.000
#> SRR650132 2 0.000 0.954 0.000 1.000
#> SRR650133 2 0.000 0.954 0.000 1.000
#> SRR650138 2 0.482 0.931 0.104 0.896
#> SRR650139 2 0.482 0.931 0.104 0.896
#> SRR650142 2 0.482 0.931 0.104 0.896
#> SRR650143 2 0.482 0.931 0.104 0.896
#> SRR650145 2 0.482 0.931 0.104 0.896
#> SRR650146 2 0.482 0.931 0.104 0.896
#> SRR650148 2 0.482 0.931 0.104 0.896
#> SRR650149 2 0.482 0.931 0.104 0.896
#> SRR650151 2 0.482 0.931 0.104 0.896
#> SRR650152 2 0.482 0.931 0.104 0.896
#> SRR650154 2 0.482 0.931 0.104 0.896
#> SRR650155 2 0.482 0.931 0.104 0.896
#> SRR650157 2 0.482 0.931 0.104 0.896
#> SRR650158 2 0.482 0.931 0.104 0.896
#> SRR650160 2 0.482 0.931 0.104 0.896
#> SRR650161 2 0.482 0.931 0.104 0.896
#> SRR650163 2 0.482 0.931 0.104 0.896
#> SRR650164 2 0.482 0.931 0.104 0.896
#> SRR650169 2 0.482 0.931 0.104 0.896
#> SRR650170 2 0.482 0.931 0.104 0.896
#> SRR650172 2 0.482 0.931 0.104 0.896
#> SRR650173 2 0.482 0.931 0.104 0.896
#> SRR650174 2 0.482 0.931 0.104 0.896
#> SRR650175 2 0.482 0.931 0.104 0.896
#> SRR650178 2 0.430 0.935 0.088 0.912
#> SRR650182 2 0.430 0.935 0.088 0.912
#> SRR650186 2 0.482 0.931 0.104 0.896
#> SRR650187 2 0.482 0.931 0.104 0.896
#> SRR650189 2 0.482 0.931 0.104 0.896
#> SRR650190 2 0.482 0.931 0.104 0.896
#> SRR650193 2 0.000 0.954 0.000 1.000
#> SRR650194 2 0.000 0.954 0.000 1.000
#> SRR834560 1 0.000 1.000 1.000 0.000
#> SRR834561 1 0.000 1.000 1.000 0.000
#> SRR834562 1 0.000 1.000 1.000 0.000
#> SRR834563 1 0.000 1.000 1.000 0.000
#> SRR834564 1 0.000 1.000 1.000 0.000
#> SRR834565 1 0.000 1.000 1.000 0.000
#> SRR834566 1 0.000 1.000 1.000 0.000
#> SRR834567 1 0.000 1.000 1.000 0.000
#> SRR834568 1 0.000 1.000 1.000 0.000
#> SRR834569 1 0.000 1.000 1.000 0.000
#> SRR834570 1 0.000 1.000 1.000 0.000
#> SRR834571 1 0.000 1.000 1.000 0.000
#> SRR834572 1 0.000 1.000 1.000 0.000
#> SRR834573 1 0.000 1.000 1.000 0.000
#> SRR834574 1 0.000 1.000 1.000 0.000
#> SRR834575 1 0.000 1.000 1.000 0.000
#> SRR834576 1 0.000 1.000 1.000 0.000
#> SRR834577 1 0.000 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.907 0 1.000 0.000
#> SRR650134 2 0.0000 0.907 0 1.000 0.000
#> SRR650135 2 0.0000 0.907 0 1.000 0.000
#> SRR650136 2 0.0592 0.901 0 0.988 0.012
#> SRR650137 2 0.0000 0.907 0 1.000 0.000
#> SRR650140 2 0.0000 0.907 0 1.000 0.000
#> SRR650141 2 0.2711 0.850 0 0.912 0.088
#> SRR650144 2 0.0592 0.901 0 0.988 0.012
#> SRR650147 2 0.4750 0.726 0 0.784 0.216
#> SRR650150 2 0.0000 0.907 0 1.000 0.000
#> SRR650153 2 0.0000 0.907 0 1.000 0.000
#> SRR650156 2 0.0000 0.907 0 1.000 0.000
#> SRR650159 2 0.0000 0.907 0 1.000 0.000
#> SRR650162 2 0.0000 0.907 0 1.000 0.000
#> SRR650168 2 0.5178 0.678 0 0.744 0.256
#> SRR650166 2 0.0000 0.907 0 1.000 0.000
#> SRR650167 2 0.0000 0.907 0 1.000 0.000
#> SRR650171 2 0.0000 0.907 0 1.000 0.000
#> SRR650165 2 0.0000 0.907 0 1.000 0.000
#> SRR650176 2 0.0000 0.907 0 1.000 0.000
#> SRR650177 2 0.0000 0.907 0 1.000 0.000
#> SRR650180 2 0.0000 0.907 0 1.000 0.000
#> SRR650179 2 0.0000 0.907 0 1.000 0.000
#> SRR650181 2 0.0000 0.907 0 1.000 0.000
#> SRR650183 2 0.0592 0.901 0 0.988 0.012
#> SRR650184 2 0.6154 0.436 0 0.592 0.408
#> SRR650185 2 0.6154 0.436 0 0.592 0.408
#> SRR650188 2 0.0000 0.907 0 1.000 0.000
#> SRR650191 2 0.6215 0.391 0 0.572 0.428
#> SRR650192 2 0.0000 0.907 0 1.000 0.000
#> SRR650195 2 0.1964 0.873 0 0.944 0.056
#> SRR650198 2 0.0000 0.907 0 1.000 0.000
#> SRR650200 2 0.0000 0.907 0 1.000 0.000
#> SRR650196 2 0.0000 0.907 0 1.000 0.000
#> SRR650197 2 0.0000 0.907 0 1.000 0.000
#> SRR650201 2 0.0000 0.907 0 1.000 0.000
#> SRR650203 2 0.0000 0.907 0 1.000 0.000
#> SRR650204 2 0.0000 0.907 0 1.000 0.000
#> SRR650202 2 0.0000 0.907 0 1.000 0.000
#> SRR650130 2 0.0000 0.907 0 1.000 0.000
#> SRR650131 2 0.0000 0.907 0 1.000 0.000
#> SRR650132 2 0.0000 0.907 0 1.000 0.000
#> SRR650133 2 0.6168 0.428 0 0.588 0.412
#> SRR650138 3 0.0000 1.000 0 0.000 1.000
#> SRR650139 3 0.0000 1.000 0 0.000 1.000
#> SRR650142 3 0.0000 1.000 0 0.000 1.000
#> SRR650143 3 0.0000 1.000 0 0.000 1.000
#> SRR650145 3 0.0000 1.000 0 0.000 1.000
#> SRR650146 3 0.0000 1.000 0 0.000 1.000
#> SRR650148 3 0.0000 1.000 0 0.000 1.000
#> SRR650149 3 0.0000 1.000 0 0.000 1.000
#> SRR650151 3 0.0000 1.000 0 0.000 1.000
#> SRR650152 3 0.0000 1.000 0 0.000 1.000
#> SRR650154 3 0.0000 1.000 0 0.000 1.000
#> SRR650155 3 0.0000 1.000 0 0.000 1.000
#> SRR650157 3 0.0000 1.000 0 0.000 1.000
#> SRR650158 3 0.0000 1.000 0 0.000 1.000
#> SRR650160 2 0.6168 0.428 0 0.588 0.412
#> SRR650161 2 0.6168 0.428 0 0.588 0.412
#> SRR650163 3 0.0000 1.000 0 0.000 1.000
#> SRR650164 3 0.0000 1.000 0 0.000 1.000
#> SRR650169 3 0.0000 1.000 0 0.000 1.000
#> SRR650170 3 0.0000 1.000 0 0.000 1.000
#> SRR650172 3 0.0000 1.000 0 0.000 1.000
#> SRR650173 3 0.0000 1.000 0 0.000 1.000
#> SRR650174 3 0.0000 1.000 0 0.000 1.000
#> SRR650175 3 0.0000 1.000 0 0.000 1.000
#> SRR650178 2 0.6305 0.241 0 0.516 0.484
#> SRR650182 2 0.6305 0.241 0 0.516 0.484
#> SRR650186 3 0.0000 1.000 0 0.000 1.000
#> SRR650187 3 0.0000 1.000 0 0.000 1.000
#> SRR650189 3 0.0000 1.000 0 0.000 1.000
#> SRR650190 3 0.0000 1.000 0 0.000 1.000
#> SRR650193 2 0.0000 0.907 0 1.000 0.000
#> SRR650194 2 0.0000 0.907 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.4103 0.775 0 0.256 0.000 0.744
#> SRR650134 2 0.0336 0.810 0 0.992 0.000 0.008
#> SRR650135 2 0.4382 0.521 0 0.704 0.000 0.296
#> SRR650136 4 0.4500 0.613 0 0.316 0.000 0.684
#> SRR650137 2 0.0000 0.810 0 1.000 0.000 0.000
#> SRR650140 2 0.4382 0.521 0 0.704 0.000 0.296
#> SRR650141 4 0.3768 0.784 0 0.184 0.008 0.808
#> SRR650144 4 0.4477 0.612 0 0.312 0.000 0.688
#> SRR650147 4 0.3453 0.753 0 0.080 0.052 0.868
#> SRR650150 2 0.0000 0.810 0 1.000 0.000 0.000
#> SRR650153 2 0.4804 0.292 0 0.616 0.000 0.384
#> SRR650156 2 0.4500 0.488 0 0.684 0.000 0.316
#> SRR650159 2 0.0469 0.810 0 0.988 0.000 0.012
#> SRR650162 2 0.0188 0.811 0 0.996 0.000 0.004
#> SRR650168 4 0.2926 0.742 0 0.056 0.048 0.896
#> SRR650166 2 0.0469 0.808 0 0.988 0.000 0.012
#> SRR650167 2 0.0817 0.802 0 0.976 0.000 0.024
#> SRR650171 4 0.4967 0.357 0 0.452 0.000 0.548
#> SRR650165 2 0.0000 0.810 0 1.000 0.000 0.000
#> SRR650176 4 0.4250 0.763 0 0.276 0.000 0.724
#> SRR650177 4 0.4250 0.763 0 0.276 0.000 0.724
#> SRR650180 4 0.4164 0.773 0 0.264 0.000 0.736
#> SRR650179 2 0.0592 0.809 0 0.984 0.000 0.016
#> SRR650181 2 0.4543 0.463 0 0.676 0.000 0.324
#> SRR650183 4 0.3024 0.776 0 0.148 0.000 0.852
#> SRR650184 4 0.2928 0.719 0 0.052 0.052 0.896
#> SRR650185 4 0.2928 0.719 0 0.052 0.052 0.896
#> SRR650188 2 0.4382 0.527 0 0.704 0.000 0.296
#> SRR650191 4 0.5106 0.544 0 0.040 0.240 0.720
#> SRR650192 4 0.4193 0.770 0 0.268 0.000 0.732
#> SRR650195 4 0.2654 0.764 0 0.108 0.004 0.888
#> SRR650198 2 0.1022 0.797 0 0.968 0.000 0.032
#> SRR650200 2 0.0000 0.810 0 1.000 0.000 0.000
#> SRR650196 2 0.0469 0.810 0 0.988 0.000 0.012
#> SRR650197 2 0.0000 0.810 0 1.000 0.000 0.000
#> SRR650201 2 0.0188 0.811 0 0.996 0.000 0.004
#> SRR650203 4 0.4193 0.770 0 0.268 0.000 0.732
#> SRR650204 2 0.0188 0.811 0 0.996 0.000 0.004
#> SRR650202 4 0.4277 0.761 0 0.280 0.000 0.720
#> SRR650130 2 0.0469 0.810 0 0.988 0.000 0.012
#> SRR650131 4 0.4164 0.773 0 0.264 0.000 0.736
#> SRR650132 2 0.3726 0.628 0 0.788 0.000 0.212
#> SRR650133 4 0.4174 0.672 0 0.044 0.140 0.816
#> SRR650138 3 0.1211 0.927 0 0.000 0.960 0.040
#> SRR650139 3 0.1211 0.927 0 0.000 0.960 0.040
#> SRR650142 3 0.0817 0.931 0 0.000 0.976 0.024
#> SRR650143 3 0.0817 0.931 0 0.000 0.976 0.024
#> SRR650145 3 0.1211 0.927 0 0.000 0.960 0.040
#> SRR650146 3 0.1211 0.927 0 0.000 0.960 0.040
#> SRR650148 3 0.0469 0.935 0 0.000 0.988 0.012
#> SRR650149 3 0.0469 0.935 0 0.000 0.988 0.012
#> SRR650151 3 0.0336 0.936 0 0.000 0.992 0.008
#> SRR650152 3 0.0336 0.936 0 0.000 0.992 0.008
#> SRR650154 3 0.1557 0.926 0 0.000 0.944 0.056
#> SRR650155 3 0.1557 0.926 0 0.000 0.944 0.056
#> SRR650157 3 0.0817 0.931 0 0.000 0.976 0.024
#> SRR650158 3 0.0817 0.931 0 0.000 0.976 0.024
#> SRR650160 3 0.6004 0.642 0 0.276 0.648 0.076
#> SRR650161 3 0.6004 0.642 0 0.276 0.648 0.076
#> SRR650163 3 0.0000 0.935 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.935 0 0.000 1.000 0.000
#> SRR650169 3 0.2081 0.908 0 0.000 0.916 0.084
#> SRR650170 3 0.2149 0.906 0 0.000 0.912 0.088
#> SRR650172 3 0.0469 0.935 0 0.000 0.988 0.012
#> SRR650173 3 0.0469 0.935 0 0.000 0.988 0.012
#> SRR650174 3 0.0336 0.936 0 0.000 0.992 0.008
#> SRR650175 3 0.0336 0.936 0 0.000 0.992 0.008
#> SRR650178 3 0.5716 0.661 0 0.272 0.668 0.060
#> SRR650182 3 0.5716 0.661 0 0.272 0.668 0.060
#> SRR650186 3 0.1474 0.919 0 0.000 0.948 0.052
#> SRR650187 3 0.1474 0.919 0 0.000 0.948 0.052
#> SRR650189 3 0.0000 0.935 0 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.935 0 0.000 1.000 0.000
#> SRR650193 2 0.4898 0.155 0 0.584 0.000 0.416
#> SRR650194 2 0.4898 0.155 0 0.584 0.000 0.416
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 4 0.2848 0.7499 0.000 0.104 0.000 0.868 0.028
#> SRR650134 2 0.0912 0.7828 0.000 0.972 0.000 0.016 0.012
#> SRR650135 2 0.3612 0.5555 0.000 0.732 0.000 0.268 0.000
#> SRR650136 4 0.5218 0.4595 0.000 0.336 0.000 0.604 0.060
#> SRR650137 2 0.0404 0.7825 0.000 0.988 0.000 0.000 0.012
#> SRR650140 2 0.3612 0.5561 0.000 0.732 0.000 0.268 0.000
#> SRR650141 4 0.2938 0.7474 0.000 0.048 0.008 0.880 0.064
#> SRR650144 4 0.5741 0.3892 0.000 0.360 0.000 0.544 0.096
#> SRR650147 4 0.3003 0.7338 0.000 0.016 0.020 0.872 0.092
#> SRR650150 2 0.0290 0.7836 0.000 0.992 0.000 0.000 0.008
#> SRR650153 2 0.4307 -0.0808 0.000 0.500 0.000 0.500 0.000
#> SRR650156 2 0.4045 0.4220 0.000 0.644 0.000 0.356 0.000
#> SRR650159 2 0.0510 0.7847 0.000 0.984 0.000 0.016 0.000
#> SRR650162 2 0.0404 0.7852 0.000 0.988 0.000 0.012 0.000
#> SRR650168 4 0.4334 0.6926 0.000 0.016 0.040 0.772 0.172
#> SRR650166 2 0.1216 0.7800 0.000 0.960 0.000 0.020 0.020
#> SRR650167 2 0.2069 0.7498 0.000 0.912 0.000 0.076 0.012
#> SRR650171 4 0.4464 0.3194 0.000 0.408 0.000 0.584 0.008
#> SRR650165 2 0.0404 0.7825 0.000 0.988 0.000 0.000 0.012
#> SRR650176 4 0.2707 0.7455 0.000 0.132 0.000 0.860 0.008
#> SRR650177 4 0.2753 0.7439 0.000 0.136 0.000 0.856 0.008
#> SRR650180 4 0.2513 0.7496 0.000 0.116 0.000 0.876 0.008
#> SRR650179 2 0.2193 0.7643 0.000 0.900 0.000 0.092 0.008
#> SRR650181 2 0.4219 0.2380 0.000 0.584 0.000 0.416 0.000
#> SRR650183 4 0.2795 0.7468 0.000 0.064 0.000 0.880 0.056
#> SRR650184 4 0.3724 0.6659 0.000 0.000 0.020 0.776 0.204
#> SRR650185 4 0.3724 0.6659 0.000 0.000 0.020 0.776 0.204
#> SRR650188 2 0.3857 0.5146 0.000 0.688 0.000 0.312 0.000
#> SRR650191 4 0.5315 0.5295 0.000 0.004 0.148 0.688 0.160
#> SRR650192 4 0.2471 0.7431 0.000 0.136 0.000 0.864 0.000
#> SRR650195 4 0.3573 0.7234 0.000 0.036 0.000 0.812 0.152
#> SRR650198 2 0.2754 0.7575 0.000 0.880 0.000 0.080 0.040
#> SRR650200 2 0.0404 0.7825 0.000 0.988 0.000 0.000 0.012
#> SRR650196 2 0.2305 0.7636 0.000 0.896 0.000 0.092 0.012
#> SRR650197 2 0.0404 0.7825 0.000 0.988 0.000 0.000 0.012
#> SRR650201 2 0.0000 0.7850 0.000 1.000 0.000 0.000 0.000
#> SRR650203 4 0.3663 0.6889 0.000 0.208 0.000 0.776 0.016
#> SRR650204 2 0.0000 0.7850 0.000 1.000 0.000 0.000 0.000
#> SRR650202 4 0.3480 0.6365 0.000 0.248 0.000 0.752 0.000
#> SRR650130 2 0.1851 0.7654 0.000 0.912 0.000 0.088 0.000
#> SRR650131 4 0.2563 0.7486 0.000 0.120 0.000 0.872 0.008
#> SRR650132 2 0.3048 0.6420 0.000 0.820 0.000 0.176 0.004
#> SRR650133 4 0.5025 0.6216 0.000 0.008 0.092 0.716 0.184
#> SRR650138 5 0.3684 0.8131 0.000 0.000 0.280 0.000 0.720
#> SRR650139 5 0.3684 0.8131 0.000 0.000 0.280 0.000 0.720
#> SRR650142 3 0.0703 0.8389 0.000 0.000 0.976 0.000 0.024
#> SRR650143 3 0.0703 0.8389 0.000 0.000 0.976 0.000 0.024
#> SRR650145 5 0.3684 0.8131 0.000 0.000 0.280 0.000 0.720
#> SRR650146 5 0.3684 0.8131 0.000 0.000 0.280 0.000 0.720
#> SRR650148 3 0.0794 0.8439 0.000 0.000 0.972 0.000 0.028
#> SRR650149 3 0.0794 0.8439 0.000 0.000 0.972 0.000 0.028
#> SRR650151 3 0.3857 0.4874 0.000 0.000 0.688 0.000 0.312
#> SRR650152 3 0.3857 0.4874 0.000 0.000 0.688 0.000 0.312
#> SRR650154 5 0.4338 0.8112 0.000 0.024 0.280 0.000 0.696
#> SRR650155 5 0.4338 0.8112 0.000 0.024 0.280 0.000 0.696
#> SRR650157 3 0.0000 0.8470 0.000 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.8470 0.000 0.000 1.000 0.000 0.000
#> SRR650160 5 0.6368 0.5777 0.000 0.292 0.148 0.012 0.548
#> SRR650161 5 0.6368 0.5777 0.000 0.292 0.148 0.012 0.548
#> SRR650163 3 0.0000 0.8470 0.000 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.8470 0.000 0.000 1.000 0.000 0.000
#> SRR650169 3 0.2989 0.7609 0.000 0.000 0.868 0.060 0.072
#> SRR650170 3 0.2989 0.7609 0.000 0.000 0.868 0.060 0.072
#> SRR650172 3 0.3636 0.5740 0.000 0.000 0.728 0.000 0.272
#> SRR650173 3 0.3636 0.5740 0.000 0.000 0.728 0.000 0.272
#> SRR650174 3 0.3177 0.6858 0.000 0.000 0.792 0.000 0.208
#> SRR650175 3 0.3177 0.6858 0.000 0.000 0.792 0.000 0.208
#> SRR650178 2 0.6531 -0.3250 0.000 0.432 0.168 0.004 0.396
#> SRR650182 2 0.6531 -0.3250 0.000 0.432 0.168 0.004 0.396
#> SRR650186 3 0.1661 0.8277 0.000 0.000 0.940 0.036 0.024
#> SRR650187 3 0.1661 0.8277 0.000 0.000 0.940 0.036 0.024
#> SRR650189 3 0.0880 0.8424 0.000 0.000 0.968 0.000 0.032
#> SRR650190 3 0.0880 0.8424 0.000 0.000 0.968 0.000 0.032
#> SRR650193 4 0.4306 0.1006 0.000 0.492 0.000 0.508 0.000
#> SRR650194 4 0.4304 0.1320 0.000 0.484 0.000 0.516 0.000
#> SRR834560 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0510 0.9910 0.984 0.000 0.000 0.000 0.016
#> SRR834562 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0510 0.9910 0.984 0.000 0.000 0.000 0.016
#> SRR834564 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0510 0.9910 0.984 0.000 0.000 0.000 0.016
#> SRR834566 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0609 0.9895 0.980 0.000 0.000 0.000 0.020
#> SRR834570 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0609 0.9895 0.980 0.000 0.000 0.000 0.020
#> SRR834574 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0510 0.9910 0.984 0.000 0.000 0.000 0.016
#> SRR834576 1 0.0000 0.9943 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0609 0.9895 0.980 0.000 0.000 0.000 0.020
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.2618 0.5722 0.000 0.052 0.000 0.872 0.076 0.000
#> SRR650134 2 0.0405 0.8251 0.000 0.988 0.000 0.008 0.004 0.000
#> SRR650135 2 0.3515 0.4659 0.000 0.676 0.000 0.324 0.000 0.000
#> SRR650136 4 0.4002 0.6337 0.000 0.260 0.000 0.704 0.036 0.000
#> SRR650137 2 0.0405 0.8231 0.000 0.988 0.000 0.004 0.000 0.008
#> SRR650140 2 0.3405 0.5662 0.000 0.724 0.000 0.272 0.000 0.004
#> SRR650141 4 0.3032 0.5189 0.000 0.040 0.000 0.852 0.096 0.012
#> SRR650144 4 0.4711 0.5984 0.000 0.280 0.000 0.640 0.080 0.000
#> SRR650147 4 0.4201 0.3051 0.000 0.032 0.000 0.760 0.164 0.044
#> SRR650150 2 0.0972 0.8294 0.000 0.964 0.000 0.028 0.000 0.008
#> SRR650153 4 0.3672 0.4833 0.000 0.368 0.000 0.632 0.000 0.000
#> SRR650156 2 0.3847 0.1765 0.000 0.544 0.000 0.456 0.000 0.000
#> SRR650159 2 0.1124 0.8296 0.000 0.956 0.000 0.036 0.000 0.008
#> SRR650162 2 0.1196 0.8288 0.000 0.952 0.000 0.040 0.000 0.008
#> SRR650168 4 0.5366 -0.4821 0.000 0.036 0.000 0.476 0.448 0.040
#> SRR650166 2 0.0632 0.8274 0.000 0.976 0.000 0.024 0.000 0.000
#> SRR650167 2 0.2257 0.7644 0.000 0.876 0.000 0.116 0.008 0.000
#> SRR650171 4 0.3448 0.6022 0.000 0.280 0.000 0.716 0.004 0.000
#> SRR650165 2 0.0458 0.8290 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR650176 4 0.1970 0.6542 0.000 0.092 0.000 0.900 0.008 0.000
#> SRR650177 4 0.2020 0.6560 0.000 0.096 0.000 0.896 0.008 0.000
#> SRR650180 4 0.3125 0.6247 0.000 0.080 0.000 0.836 0.084 0.000
#> SRR650179 2 0.4563 0.6616 0.000 0.712 0.000 0.152 0.132 0.004
#> SRR650181 4 0.3854 0.2327 0.000 0.464 0.000 0.536 0.000 0.000
#> SRR650183 4 0.3321 0.5938 0.000 0.080 0.000 0.820 0.100 0.000
#> SRR650184 5 0.3298 0.8096 0.000 0.000 0.008 0.236 0.756 0.000
#> SRR650185 5 0.3298 0.8096 0.000 0.000 0.008 0.236 0.756 0.000
#> SRR650188 2 0.4131 0.3798 0.000 0.600 0.000 0.384 0.000 0.016
#> SRR650191 5 0.4210 0.7468 0.000 0.000 0.024 0.168 0.756 0.052
#> SRR650192 4 0.2985 0.6374 0.000 0.100 0.000 0.844 0.056 0.000
#> SRR650195 5 0.4648 0.3979 0.000 0.040 0.000 0.464 0.496 0.000
#> SRR650198 2 0.5392 0.5794 0.000 0.640 0.000 0.176 0.164 0.020
#> SRR650200 2 0.0777 0.8242 0.000 0.972 0.000 0.024 0.004 0.000
#> SRR650196 2 0.3754 0.7259 0.000 0.776 0.000 0.152 0.072 0.000
#> SRR650197 2 0.0405 0.8234 0.000 0.988 0.000 0.004 0.000 0.008
#> SRR650201 2 0.1049 0.8293 0.000 0.960 0.000 0.032 0.000 0.008
#> SRR650203 4 0.4264 0.5628 0.000 0.124 0.000 0.744 0.128 0.004
#> SRR650204 2 0.1049 0.8299 0.000 0.960 0.000 0.032 0.000 0.008
#> SRR650202 4 0.2631 0.6629 0.000 0.180 0.000 0.820 0.000 0.000
#> SRR650130 2 0.2923 0.7789 0.000 0.848 0.000 0.100 0.052 0.000
#> SRR650131 4 0.3514 0.5956 0.000 0.088 0.000 0.804 0.108 0.000
#> SRR650132 2 0.2520 0.7440 0.000 0.844 0.000 0.152 0.000 0.004
#> SRR650133 5 0.5109 0.7220 0.000 0.000 0.000 0.316 0.580 0.104
#> SRR650138 6 0.0363 0.6918 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650139 6 0.0363 0.6918 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650142 3 0.0713 0.7108 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR650143 3 0.0713 0.7108 0.000 0.000 0.972 0.000 0.028 0.000
#> SRR650145 6 0.0363 0.6918 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650146 6 0.0363 0.6918 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650148 3 0.3711 0.6548 0.000 0.000 0.720 0.020 0.000 0.260
#> SRR650149 3 0.3711 0.6548 0.000 0.000 0.720 0.020 0.000 0.260
#> SRR650151 6 0.3867 0.0983 0.000 0.000 0.328 0.012 0.000 0.660
#> SRR650152 6 0.3867 0.0983 0.000 0.000 0.328 0.012 0.000 0.660
#> SRR650154 6 0.1643 0.6922 0.000 0.000 0.008 0.000 0.068 0.924
#> SRR650155 6 0.1643 0.6922 0.000 0.000 0.008 0.000 0.068 0.924
#> SRR650157 3 0.0603 0.7199 0.000 0.000 0.980 0.000 0.004 0.016
#> SRR650158 3 0.0603 0.7199 0.000 0.000 0.980 0.000 0.004 0.016
#> SRR650160 6 0.6070 0.5625 0.000 0.220 0.000 0.020 0.232 0.528
#> SRR650161 6 0.6070 0.5625 0.000 0.220 0.000 0.020 0.232 0.528
#> SRR650163 3 0.0777 0.7217 0.000 0.000 0.972 0.004 0.000 0.024
#> SRR650164 3 0.0777 0.7217 0.000 0.000 0.972 0.004 0.000 0.024
#> SRR650169 3 0.4271 0.6371 0.000 0.000 0.696 0.000 0.244 0.060
#> SRR650170 3 0.4271 0.6371 0.000 0.000 0.696 0.000 0.244 0.060
#> SRR650172 3 0.4722 0.3803 0.000 0.000 0.492 0.036 0.004 0.468
#> SRR650173 3 0.4722 0.3803 0.000 0.000 0.492 0.036 0.004 0.468
#> SRR650174 3 0.4651 0.4183 0.000 0.004 0.516 0.032 0.000 0.448
#> SRR650175 3 0.4644 0.4304 0.000 0.004 0.524 0.032 0.000 0.440
#> SRR650178 6 0.6119 0.5628 0.000 0.236 0.000 0.024 0.212 0.528
#> SRR650182 6 0.6119 0.5628 0.000 0.236 0.000 0.024 0.212 0.528
#> SRR650186 3 0.2631 0.6673 0.000 0.000 0.820 0.000 0.180 0.000
#> SRR650187 3 0.2631 0.6673 0.000 0.000 0.820 0.000 0.180 0.000
#> SRR650189 3 0.3778 0.6375 0.000 0.000 0.696 0.016 0.000 0.288
#> SRR650190 3 0.3778 0.6375 0.000 0.000 0.696 0.016 0.000 0.288
#> SRR650193 4 0.4873 0.3483 0.000 0.440 0.000 0.508 0.048 0.004
#> SRR650194 4 0.4822 0.3455 0.000 0.444 0.000 0.508 0.044 0.004
#> SRR834560 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0458 0.9899 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834562 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0458 0.9899 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834564 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0458 0.9899 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834566 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0713 0.9843 0.972 0.000 0.000 0.000 0.028 0.000
#> SRR834570 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0458 0.9899 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834572 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0713 0.9843 0.972 0.000 0.000 0.000 0.028 0.000
#> SRR834574 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0458 0.9899 0.984 0.000 0.000 0.000 0.016 0.000
#> SRR834576 1 0.0000 0.9922 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0632 0.9865 0.976 0.000 0.000 0.000 0.024 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", "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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.604 0.876 0.898 0.4406 0.496 0.496
#> 3 3 1.000 0.986 0.994 0.4260 0.840 0.689
#> 4 4 0.968 0.947 0.970 0.1886 0.869 0.653
#> 5 5 0.908 0.917 0.927 0.0597 0.929 0.730
#> 6 6 0.818 0.749 0.854 0.0383 0.961 0.818
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 3 4
There is also optional best \(k\) = 3 4 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
#> SRR650205 2 0.0000 0.990 0.000 1.000
#> SRR650134 2 0.0000 0.990 0.000 1.000
#> SRR650135 2 0.0000 0.990 0.000 1.000
#> SRR650136 2 0.0000 0.990 0.000 1.000
#> SRR650137 2 0.0000 0.990 0.000 1.000
#> SRR650140 2 0.0000 0.990 0.000 1.000
#> SRR650141 2 0.0000 0.990 0.000 1.000
#> SRR650144 2 0.0000 0.990 0.000 1.000
#> SRR650147 2 0.0000 0.990 0.000 1.000
#> SRR650150 2 0.0000 0.990 0.000 1.000
#> SRR650153 2 0.0000 0.990 0.000 1.000
#> SRR650156 2 0.0000 0.990 0.000 1.000
#> SRR650159 2 0.0000 0.990 0.000 1.000
#> SRR650162 2 0.0000 0.990 0.000 1.000
#> SRR650168 2 0.0000 0.990 0.000 1.000
#> SRR650166 2 0.0000 0.990 0.000 1.000
#> SRR650167 2 0.0000 0.990 0.000 1.000
#> SRR650171 2 0.0000 0.990 0.000 1.000
#> SRR650165 2 0.0000 0.990 0.000 1.000
#> SRR650176 2 0.0000 0.990 0.000 1.000
#> SRR650177 2 0.0000 0.990 0.000 1.000
#> SRR650180 2 0.0000 0.990 0.000 1.000
#> SRR650179 2 0.0000 0.990 0.000 1.000
#> SRR650181 2 0.0000 0.990 0.000 1.000
#> SRR650183 2 0.0000 0.990 0.000 1.000
#> SRR650184 2 0.0000 0.990 0.000 1.000
#> SRR650185 2 0.0000 0.990 0.000 1.000
#> SRR650188 2 0.0000 0.990 0.000 1.000
#> SRR650191 2 0.8955 0.316 0.312 0.688
#> SRR650192 2 0.0000 0.990 0.000 1.000
#> SRR650195 2 0.0000 0.990 0.000 1.000
#> SRR650198 2 0.0000 0.990 0.000 1.000
#> SRR650200 2 0.0000 0.990 0.000 1.000
#> SRR650196 2 0.0000 0.990 0.000 1.000
#> SRR650197 2 0.0000 0.990 0.000 1.000
#> SRR650201 2 0.0000 0.990 0.000 1.000
#> SRR650203 2 0.0000 0.990 0.000 1.000
#> SRR650204 2 0.0000 0.990 0.000 1.000
#> SRR650202 2 0.0000 0.990 0.000 1.000
#> SRR650130 2 0.0000 0.990 0.000 1.000
#> SRR650131 2 0.0000 0.990 0.000 1.000
#> SRR650132 2 0.0000 0.990 0.000 1.000
#> SRR650133 2 0.0000 0.990 0.000 1.000
#> SRR650138 1 0.9209 0.778 0.664 0.336
#> SRR650139 1 0.9209 0.778 0.664 0.336
#> SRR650142 1 0.9209 0.778 0.664 0.336
#> SRR650143 1 0.9209 0.778 0.664 0.336
#> SRR650145 1 0.9209 0.778 0.664 0.336
#> SRR650146 1 0.9209 0.778 0.664 0.336
#> SRR650148 1 0.9209 0.778 0.664 0.336
#> SRR650149 1 0.9209 0.778 0.664 0.336
#> SRR650151 1 0.9209 0.778 0.664 0.336
#> SRR650152 1 0.9209 0.778 0.664 0.336
#> SRR650154 1 0.9608 0.703 0.616 0.384
#> SRR650155 1 0.9552 0.717 0.624 0.376
#> SRR650157 1 0.9209 0.778 0.664 0.336
#> SRR650158 1 0.9209 0.778 0.664 0.336
#> SRR650160 2 0.1184 0.971 0.016 0.984
#> SRR650161 2 0.1184 0.971 0.016 0.984
#> SRR650163 1 0.9209 0.778 0.664 0.336
#> SRR650164 1 0.9209 0.778 0.664 0.336
#> SRR650169 1 0.9209 0.778 0.664 0.336
#> SRR650170 1 0.9209 0.778 0.664 0.336
#> SRR650172 1 0.9209 0.778 0.664 0.336
#> SRR650173 1 0.9209 0.778 0.664 0.336
#> SRR650174 1 0.9209 0.778 0.664 0.336
#> SRR650175 1 0.9209 0.778 0.664 0.336
#> SRR650178 2 0.0938 0.976 0.012 0.988
#> SRR650182 2 0.0938 0.976 0.012 0.988
#> SRR650186 1 0.9209 0.778 0.664 0.336
#> SRR650187 1 0.9209 0.778 0.664 0.336
#> SRR650189 1 0.9209 0.778 0.664 0.336
#> SRR650190 1 0.9209 0.778 0.664 0.336
#> SRR650193 2 0.0000 0.990 0.000 1.000
#> SRR650194 2 0.0000 0.990 0.000 1.000
#> SRR834560 1 0.1184 0.756 0.984 0.016
#> SRR834561 1 0.1184 0.756 0.984 0.016
#> SRR834562 1 0.1184 0.756 0.984 0.016
#> SRR834563 1 0.1184 0.756 0.984 0.016
#> SRR834564 1 0.1184 0.756 0.984 0.016
#> SRR834565 1 0.1184 0.756 0.984 0.016
#> SRR834566 1 0.1184 0.756 0.984 0.016
#> SRR834567 1 0.1184 0.756 0.984 0.016
#> SRR834568 1 0.1184 0.756 0.984 0.016
#> SRR834569 1 0.1184 0.756 0.984 0.016
#> SRR834570 1 0.1184 0.756 0.984 0.016
#> SRR834571 1 0.1184 0.756 0.984 0.016
#> SRR834572 1 0.1184 0.756 0.984 0.016
#> SRR834573 1 0.1184 0.756 0.984 0.016
#> SRR834574 1 0.1184 0.756 0.984 0.016
#> SRR834575 1 0.1184 0.756 0.984 0.016
#> SRR834576 1 0.1184 0.756 0.984 0.016
#> SRR834577 1 0.1184 0.756 0.984 0.016
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.991 0 1.000 0.000
#> SRR650134 2 0.0000 0.991 0 1.000 0.000
#> SRR650135 2 0.0000 0.991 0 1.000 0.000
#> SRR650136 2 0.0000 0.991 0 1.000 0.000
#> SRR650137 2 0.0000 0.991 0 1.000 0.000
#> SRR650140 2 0.0000 0.991 0 1.000 0.000
#> SRR650141 2 0.0000 0.991 0 1.000 0.000
#> SRR650144 2 0.0000 0.991 0 1.000 0.000
#> SRR650147 2 0.0000 0.991 0 1.000 0.000
#> SRR650150 2 0.0000 0.991 0 1.000 0.000
#> SRR650153 2 0.0000 0.991 0 1.000 0.000
#> SRR650156 2 0.0000 0.991 0 1.000 0.000
#> SRR650159 2 0.0000 0.991 0 1.000 0.000
#> SRR650162 2 0.0000 0.991 0 1.000 0.000
#> SRR650168 2 0.0000 0.991 0 1.000 0.000
#> SRR650166 2 0.0000 0.991 0 1.000 0.000
#> SRR650167 2 0.0000 0.991 0 1.000 0.000
#> SRR650171 2 0.0000 0.991 0 1.000 0.000
#> SRR650165 2 0.0000 0.991 0 1.000 0.000
#> SRR650176 2 0.0000 0.991 0 1.000 0.000
#> SRR650177 2 0.0000 0.991 0 1.000 0.000
#> SRR650180 2 0.0000 0.991 0 1.000 0.000
#> SRR650179 2 0.0000 0.991 0 1.000 0.000
#> SRR650181 2 0.0000 0.991 0 1.000 0.000
#> SRR650183 2 0.0000 0.991 0 1.000 0.000
#> SRR650184 2 0.0000 0.991 0 1.000 0.000
#> SRR650185 2 0.0000 0.991 0 1.000 0.000
#> SRR650188 2 0.0000 0.991 0 1.000 0.000
#> SRR650191 3 0.4504 0.730 0 0.196 0.804
#> SRR650192 2 0.0000 0.991 0 1.000 0.000
#> SRR650195 2 0.0000 0.991 0 1.000 0.000
#> SRR650198 2 0.0000 0.991 0 1.000 0.000
#> SRR650200 2 0.0000 0.991 0 1.000 0.000
#> SRR650196 2 0.0000 0.991 0 1.000 0.000
#> SRR650197 2 0.0000 0.991 0 1.000 0.000
#> SRR650201 2 0.0000 0.991 0 1.000 0.000
#> SRR650203 2 0.0000 0.991 0 1.000 0.000
#> SRR650204 2 0.0000 0.991 0 1.000 0.000
#> SRR650202 2 0.0000 0.991 0 1.000 0.000
#> SRR650130 2 0.0000 0.991 0 1.000 0.000
#> SRR650131 2 0.0000 0.991 0 1.000 0.000
#> SRR650132 2 0.0000 0.991 0 1.000 0.000
#> SRR650133 2 0.0000 0.991 0 1.000 0.000
#> SRR650138 3 0.0000 0.991 0 0.000 1.000
#> SRR650139 3 0.0000 0.991 0 0.000 1.000
#> SRR650142 3 0.0000 0.991 0 0.000 1.000
#> SRR650143 3 0.0000 0.991 0 0.000 1.000
#> SRR650145 3 0.0000 0.991 0 0.000 1.000
#> SRR650146 3 0.0000 0.991 0 0.000 1.000
#> SRR650148 3 0.0000 0.991 0 0.000 1.000
#> SRR650149 3 0.0000 0.991 0 0.000 1.000
#> SRR650151 3 0.0000 0.991 0 0.000 1.000
#> SRR650152 3 0.0000 0.991 0 0.000 1.000
#> SRR650154 3 0.0000 0.991 0 0.000 1.000
#> SRR650155 3 0.0000 0.991 0 0.000 1.000
#> SRR650157 3 0.0000 0.991 0 0.000 1.000
#> SRR650158 3 0.0000 0.991 0 0.000 1.000
#> SRR650160 3 0.0237 0.986 0 0.004 0.996
#> SRR650161 3 0.0000 0.991 0 0.000 1.000
#> SRR650163 3 0.0000 0.991 0 0.000 1.000
#> SRR650164 3 0.0000 0.991 0 0.000 1.000
#> SRR650169 3 0.0000 0.991 0 0.000 1.000
#> SRR650170 3 0.0000 0.991 0 0.000 1.000
#> SRR650172 3 0.0000 0.991 0 0.000 1.000
#> SRR650173 3 0.0000 0.991 0 0.000 1.000
#> SRR650174 3 0.0000 0.991 0 0.000 1.000
#> SRR650175 3 0.0000 0.991 0 0.000 1.000
#> SRR650178 2 0.4346 0.778 0 0.816 0.184
#> SRR650182 2 0.4235 0.789 0 0.824 0.176
#> SRR650186 3 0.0000 0.991 0 0.000 1.000
#> SRR650187 3 0.0000 0.991 0 0.000 1.000
#> SRR650189 3 0.0000 0.991 0 0.000 1.000
#> SRR650190 3 0.0000 0.991 0 0.000 1.000
#> SRR650193 2 0.0000 0.991 0 1.000 0.000
#> SRR650194 2 0.0000 0.991 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.1302 0.960 0.000 0.044 0.000 0.956
#> SRR650134 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650136 4 0.1637 0.950 0.000 0.060 0.000 0.940
#> SRR650137 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650141 4 0.1389 0.959 0.000 0.048 0.000 0.952
#> SRR650144 4 0.3837 0.751 0.000 0.224 0.000 0.776
#> SRR650147 4 0.3024 0.872 0.000 0.148 0.000 0.852
#> SRR650150 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650153 2 0.1022 0.935 0.000 0.968 0.000 0.032
#> SRR650156 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650168 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650166 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650171 4 0.2868 0.879 0.000 0.136 0.000 0.864
#> SRR650165 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650176 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650177 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650180 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650179 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650181 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650183 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650184 4 0.0817 0.962 0.000 0.024 0.000 0.976
#> SRR650185 4 0.0817 0.962 0.000 0.024 0.000 0.976
#> SRR650188 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650191 4 0.0895 0.959 0.000 0.020 0.004 0.976
#> SRR650192 4 0.1716 0.951 0.000 0.064 0.000 0.936
#> SRR650195 4 0.0817 0.962 0.000 0.024 0.000 0.976
#> SRR650198 2 0.2530 0.857 0.000 0.888 0.000 0.112
#> SRR650200 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650196 2 0.0921 0.940 0.000 0.972 0.000 0.028
#> SRR650197 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650203 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650204 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650202 4 0.2081 0.935 0.000 0.084 0.000 0.916
#> SRR650130 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650131 4 0.0921 0.964 0.000 0.028 0.000 0.972
#> SRR650132 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR650133 4 0.1557 0.956 0.000 0.056 0.000 0.944
#> SRR650138 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650139 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650142 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650145 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650146 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650148 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650154 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650155 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650157 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650160 3 0.4164 0.649 0.000 0.264 0.736 0.000
#> SRR650161 3 0.3764 0.728 0.000 0.216 0.784 0.000
#> SRR650163 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650169 3 0.0469 0.971 0.000 0.000 0.988 0.012
#> SRR650170 3 0.0469 0.971 0.000 0.000 0.988 0.012
#> SRR650172 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650178 2 0.0817 0.936 0.000 0.976 0.024 0.000
#> SRR650182 2 0.0817 0.936 0.000 0.976 0.024 0.000
#> SRR650186 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.980 0.000 0.000 1.000 0.000
#> SRR650193 2 0.4585 0.472 0.000 0.668 0.000 0.332
#> SRR650194 2 0.4804 0.334 0.000 0.616 0.000 0.384
#> SRR834560 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0817 0.989 0.976 0.000 0.000 0.024
#> SRR834562 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0817 0.989 0.976 0.000 0.000 0.024
#> SRR834564 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0817 0.989 0.976 0.000 0.000 0.024
#> SRR834566 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834569 1 0.0817 0.989 0.976 0.000 0.000 0.024
#> SRR834570 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0817 0.989 0.976 0.000 0.000 0.024
#> SRR834574 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0817 0.989 0.976 0.000 0.000 0.024
#> SRR834576 1 0.0000 0.993 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0817 0.989 0.976 0.000 0.000 0.024
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.0798 0.932 0.000 0.008 0.000 0.976 0.016
#> SRR650134 2 0.1117 0.962 0.000 0.964 0.000 0.016 0.020
#> SRR650135 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650136 4 0.2612 0.907 0.000 0.008 0.000 0.868 0.124
#> SRR650137 2 0.1310 0.961 0.000 0.956 0.000 0.020 0.024
#> SRR650140 2 0.1310 0.961 0.000 0.956 0.000 0.020 0.024
#> SRR650141 4 0.0992 0.929 0.000 0.008 0.000 0.968 0.024
#> SRR650144 4 0.4981 0.732 0.000 0.172 0.000 0.708 0.120
#> SRR650147 4 0.2189 0.886 0.000 0.084 0.000 0.904 0.012
#> SRR650150 2 0.2540 0.910 0.000 0.888 0.000 0.088 0.024
#> SRR650153 2 0.1469 0.957 0.000 0.948 0.000 0.036 0.016
#> SRR650156 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650159 2 0.1403 0.959 0.000 0.952 0.000 0.024 0.024
#> SRR650162 2 0.1310 0.961 0.000 0.956 0.000 0.020 0.024
#> SRR650168 4 0.0609 0.928 0.000 0.000 0.000 0.980 0.020
#> SRR650166 2 0.1310 0.961 0.000 0.956 0.000 0.020 0.024
#> SRR650167 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650171 4 0.3569 0.872 0.000 0.068 0.000 0.828 0.104
#> SRR650165 2 0.1310 0.961 0.000 0.956 0.000 0.020 0.024
#> SRR650176 4 0.0880 0.933 0.000 0.000 0.000 0.968 0.032
#> SRR650177 4 0.0880 0.933 0.000 0.000 0.000 0.968 0.032
#> SRR650180 4 0.0794 0.933 0.000 0.000 0.000 0.972 0.028
#> SRR650179 2 0.0880 0.952 0.000 0.968 0.000 0.000 0.032
#> SRR650181 2 0.0290 0.962 0.000 0.992 0.000 0.008 0.000
#> SRR650183 4 0.2377 0.906 0.000 0.000 0.000 0.872 0.128
#> SRR650184 4 0.2280 0.909 0.000 0.000 0.000 0.880 0.120
#> SRR650185 4 0.2280 0.909 0.000 0.000 0.000 0.880 0.120
#> SRR650188 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650191 3 0.4687 0.420 0.000 0.000 0.636 0.336 0.028
#> SRR650192 4 0.1106 0.930 0.000 0.012 0.000 0.964 0.024
#> SRR650195 4 0.2377 0.906 0.000 0.000 0.000 0.872 0.128
#> SRR650198 2 0.3631 0.821 0.000 0.824 0.000 0.104 0.072
#> SRR650200 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650196 2 0.2036 0.920 0.000 0.920 0.000 0.024 0.056
#> SRR650197 2 0.1117 0.962 0.000 0.964 0.000 0.016 0.020
#> SRR650201 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650203 4 0.1597 0.930 0.000 0.012 0.000 0.940 0.048
#> SRR650204 2 0.1310 0.961 0.000 0.956 0.000 0.020 0.024
#> SRR650202 4 0.1211 0.929 0.000 0.016 0.000 0.960 0.024
#> SRR650130 2 0.0404 0.960 0.000 0.988 0.000 0.000 0.012
#> SRR650131 4 0.0703 0.928 0.000 0.000 0.000 0.976 0.024
#> SRR650132 2 0.0000 0.962 0.000 1.000 0.000 0.000 0.000
#> SRR650133 4 0.1493 0.927 0.000 0.028 0.000 0.948 0.024
#> SRR650138 5 0.3305 0.938 0.000 0.000 0.224 0.000 0.776
#> SRR650139 5 0.3305 0.938 0.000 0.000 0.224 0.000 0.776
#> SRR650142 3 0.0000 0.901 0.000 0.000 1.000 0.000 0.000
#> SRR650143 3 0.0000 0.901 0.000 0.000 1.000 0.000 0.000
#> SRR650145 5 0.3305 0.938 0.000 0.000 0.224 0.000 0.776
#> SRR650146 5 0.3305 0.938 0.000 0.000 0.224 0.000 0.776
#> SRR650148 3 0.0000 0.901 0.000 0.000 1.000 0.000 0.000
#> SRR650149 3 0.0000 0.901 0.000 0.000 1.000 0.000 0.000
#> SRR650151 5 0.3305 0.938 0.000 0.000 0.224 0.000 0.776
#> SRR650152 5 0.3305 0.938 0.000 0.000 0.224 0.000 0.776
#> SRR650154 5 0.3177 0.925 0.000 0.000 0.208 0.000 0.792
#> SRR650155 5 0.3177 0.925 0.000 0.000 0.208 0.000 0.792
#> SRR650157 3 0.1965 0.836 0.000 0.000 0.904 0.000 0.096
#> SRR650158 3 0.1851 0.844 0.000 0.000 0.912 0.000 0.088
#> SRR650160 3 0.2068 0.808 0.000 0.092 0.904 0.000 0.004
#> SRR650161 3 0.2124 0.802 0.000 0.096 0.900 0.000 0.004
#> SRR650163 3 0.0162 0.900 0.000 0.000 0.996 0.000 0.004
#> SRR650164 3 0.0162 0.900 0.000 0.000 0.996 0.000 0.004
#> SRR650169 3 0.1043 0.879 0.000 0.000 0.960 0.000 0.040
#> SRR650170 3 0.1043 0.879 0.000 0.000 0.960 0.000 0.040
#> SRR650172 5 0.4242 0.645 0.000 0.000 0.428 0.000 0.572
#> SRR650173 5 0.4126 0.743 0.000 0.000 0.380 0.000 0.620
#> SRR650174 3 0.2230 0.809 0.000 0.000 0.884 0.000 0.116
#> SRR650175 3 0.2377 0.791 0.000 0.000 0.872 0.000 0.128
#> SRR650178 2 0.0880 0.949 0.000 0.968 0.000 0.000 0.032
#> SRR650182 2 0.1043 0.944 0.000 0.960 0.000 0.000 0.040
#> SRR650186 3 0.0290 0.898 0.000 0.000 0.992 0.000 0.008
#> SRR650187 3 0.0290 0.898 0.000 0.000 0.992 0.000 0.008
#> SRR650189 3 0.1121 0.881 0.000 0.000 0.956 0.000 0.044
#> SRR650190 3 0.1197 0.878 0.000 0.000 0.952 0.000 0.048
#> SRR650193 4 0.1493 0.925 0.000 0.028 0.000 0.948 0.024
#> SRR650194 4 0.1403 0.927 0.000 0.024 0.000 0.952 0.024
#> SRR834560 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.1478 0.966 0.936 0.000 0.000 0.000 0.064
#> SRR834562 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.1478 0.966 0.936 0.000 0.000 0.000 0.064
#> SRR834564 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.1478 0.966 0.936 0.000 0.000 0.000 0.064
#> SRR834566 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.1270 0.969 0.948 0.000 0.000 0.000 0.052
#> SRR834570 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.1478 0.966 0.936 0.000 0.000 0.000 0.064
#> SRR834574 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.1478 0.966 0.936 0.000 0.000 0.000 0.064
#> SRR834576 1 0.0000 0.980 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.1478 0.966 0.936 0.000 0.000 0.000 0.064
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.0291 0.6670 0.000 0.004 0.000 0.992 0.000 0.004
#> SRR650134 2 0.2402 0.8093 0.000 0.856 0.000 0.004 0.140 0.000
#> SRR650135 2 0.0146 0.8235 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650136 5 0.3056 0.6252 0.000 0.008 0.000 0.184 0.804 0.004
#> SRR650137 2 0.2838 0.7924 0.000 0.808 0.000 0.004 0.188 0.000
#> SRR650140 2 0.3383 0.7344 0.000 0.728 0.000 0.004 0.268 0.000
#> SRR650141 4 0.0291 0.6670 0.000 0.004 0.000 0.992 0.000 0.004
#> SRR650144 5 0.2994 0.6166 0.000 0.008 0.000 0.164 0.820 0.008
#> SRR650147 4 0.1951 0.6115 0.000 0.060 0.000 0.916 0.020 0.004
#> SRR650150 2 0.5716 0.3419 0.000 0.500 0.000 0.188 0.312 0.000
#> SRR650153 2 0.4014 0.7254 0.000 0.716 0.000 0.044 0.240 0.000
#> SRR650156 2 0.0632 0.8237 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR650159 2 0.3778 0.7001 0.000 0.696 0.000 0.016 0.288 0.000
#> SRR650162 2 0.3405 0.7328 0.000 0.724 0.000 0.004 0.272 0.000
#> SRR650168 4 0.0436 0.6633 0.000 0.004 0.000 0.988 0.004 0.004
#> SRR650166 2 0.2902 0.7885 0.000 0.800 0.000 0.004 0.196 0.000
#> SRR650167 2 0.0146 0.8235 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650171 5 0.3911 0.5580 0.000 0.032 0.000 0.256 0.712 0.000
#> SRR650165 2 0.3052 0.7759 0.000 0.780 0.000 0.004 0.216 0.000
#> SRR650176 5 0.3867 0.1601 0.000 0.000 0.000 0.488 0.512 0.000
#> SRR650177 5 0.3857 0.2262 0.000 0.000 0.000 0.468 0.532 0.000
#> SRR650180 4 0.3607 0.2815 0.000 0.000 0.000 0.652 0.348 0.000
#> SRR650179 2 0.3470 0.6923 0.000 0.792 0.000 0.012 0.176 0.020
#> SRR650181 2 0.1616 0.8057 0.000 0.932 0.000 0.048 0.020 0.000
#> SRR650183 5 0.3830 0.6104 0.000 0.000 0.000 0.376 0.620 0.004
#> SRR650184 5 0.4057 0.5798 0.000 0.000 0.008 0.436 0.556 0.000
#> SRR650185 5 0.4057 0.5798 0.000 0.000 0.008 0.436 0.556 0.000
#> SRR650188 2 0.0547 0.8188 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR650191 4 0.3892 0.2556 0.000 0.000 0.352 0.640 0.004 0.004
#> SRR650192 4 0.3601 0.4043 0.000 0.004 0.000 0.684 0.312 0.000
#> SRR650195 5 0.3911 0.6126 0.000 0.000 0.000 0.368 0.624 0.008
#> SRR650198 2 0.5123 0.4269 0.000 0.616 0.000 0.060 0.300 0.024
#> SRR650200 2 0.0146 0.8235 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650196 2 0.3998 0.6323 0.000 0.736 0.000 0.016 0.224 0.024
#> SRR650197 2 0.2520 0.8060 0.000 0.844 0.000 0.004 0.152 0.000
#> SRR650201 2 0.0291 0.8234 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR650203 4 0.2398 0.6368 0.000 0.020 0.000 0.876 0.104 0.000
#> SRR650204 2 0.2838 0.7925 0.000 0.808 0.000 0.004 0.188 0.000
#> SRR650202 4 0.1700 0.6620 0.000 0.004 0.000 0.916 0.080 0.000
#> SRR650130 2 0.1806 0.7869 0.000 0.908 0.000 0.000 0.088 0.004
#> SRR650131 4 0.1753 0.6450 0.000 0.004 0.000 0.912 0.084 0.000
#> SRR650132 2 0.0508 0.8230 0.000 0.984 0.000 0.004 0.012 0.000
#> SRR650133 4 0.1251 0.6511 0.000 0.012 0.000 0.956 0.024 0.008
#> SRR650138 6 0.1444 0.9172 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR650139 6 0.1444 0.9172 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR650142 3 0.0260 0.9019 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650143 3 0.0260 0.9019 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650145 6 0.1444 0.9172 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR650146 6 0.1444 0.9172 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR650148 3 0.0622 0.9011 0.000 0.000 0.980 0.000 0.008 0.012
#> SRR650149 3 0.0622 0.9011 0.000 0.000 0.980 0.000 0.008 0.012
#> SRR650151 6 0.1444 0.9172 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR650152 6 0.1444 0.9172 0.000 0.000 0.072 0.000 0.000 0.928
#> SRR650154 6 0.2078 0.8694 0.000 0.004 0.040 0.000 0.044 0.912
#> SRR650155 6 0.2078 0.8694 0.000 0.004 0.040 0.000 0.044 0.912
#> SRR650157 3 0.2092 0.8446 0.000 0.000 0.876 0.000 0.000 0.124
#> SRR650158 3 0.2092 0.8446 0.000 0.000 0.876 0.000 0.000 0.124
#> SRR650160 3 0.2473 0.7898 0.000 0.136 0.856 0.000 0.008 0.000
#> SRR650161 3 0.2389 0.7985 0.000 0.128 0.864 0.000 0.008 0.000
#> SRR650163 3 0.0363 0.9022 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR650164 3 0.0363 0.9022 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR650169 3 0.0146 0.9000 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR650170 3 0.0146 0.9000 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR650172 3 0.3869 -0.0797 0.000 0.000 0.500 0.000 0.000 0.500
#> SRR650173 6 0.3857 0.0586 0.000 0.000 0.468 0.000 0.000 0.532
#> SRR650174 3 0.2778 0.7919 0.000 0.000 0.824 0.000 0.008 0.168
#> SRR650175 3 0.3043 0.7488 0.000 0.000 0.792 0.000 0.008 0.200
#> SRR650178 2 0.0993 0.8156 0.000 0.964 0.000 0.000 0.012 0.024
#> SRR650182 2 0.0993 0.8156 0.000 0.964 0.000 0.000 0.012 0.024
#> SRR650186 3 0.0146 0.9000 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR650187 3 0.0146 0.9000 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR650189 3 0.1075 0.8921 0.000 0.000 0.952 0.000 0.000 0.048
#> SRR650190 3 0.1075 0.8921 0.000 0.000 0.952 0.000 0.000 0.048
#> SRR650193 4 0.4134 0.3791 0.000 0.028 0.000 0.656 0.316 0.000
#> SRR650194 4 0.4062 0.3807 0.000 0.024 0.000 0.660 0.316 0.000
#> SRR834560 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.3190 0.8964 0.820 0.000 0.000 0.000 0.136 0.044
#> SRR834562 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.3190 0.8964 0.820 0.000 0.000 0.000 0.136 0.044
#> SRR834564 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.3190 0.8964 0.820 0.000 0.000 0.000 0.136 0.044
#> SRR834566 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.2798 0.9053 0.852 0.000 0.000 0.000 0.112 0.036
#> SRR834570 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.3190 0.8964 0.820 0.000 0.000 0.000 0.136 0.044
#> SRR834574 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.3190 0.8964 0.820 0.000 0.000 0.000 0.136 0.044
#> SRR834576 1 0.0000 0.9385 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.3190 0.8964 0.820 0.000 0.000 0.000 0.136 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["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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.579 0.807 0.849 0.3874 0.684 0.684
#> 3 3 1.000 0.979 0.990 0.5945 0.702 0.565
#> 4 4 0.833 0.824 0.913 0.1222 0.949 0.867
#> 5 5 0.807 0.761 0.866 0.0429 0.989 0.967
#> 6 6 0.810 0.692 0.805 0.0461 0.942 0.823
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
#> SRR650205 2 0.9552 0.843 0.376 0.624
#> SRR650134 2 0.9552 0.843 0.376 0.624
#> SRR650135 2 0.9552 0.843 0.376 0.624
#> SRR650136 2 0.9552 0.843 0.376 0.624
#> SRR650137 2 0.9552 0.843 0.376 0.624
#> SRR650140 2 0.9552 0.843 0.376 0.624
#> SRR650141 2 0.9552 0.843 0.376 0.624
#> SRR650144 2 0.9552 0.843 0.376 0.624
#> SRR650147 2 0.9552 0.843 0.376 0.624
#> SRR650150 2 0.9552 0.843 0.376 0.624
#> SRR650153 2 0.9552 0.843 0.376 0.624
#> SRR650156 2 0.9552 0.843 0.376 0.624
#> SRR650159 2 0.9552 0.843 0.376 0.624
#> SRR650162 2 0.9552 0.843 0.376 0.624
#> SRR650168 2 0.9393 0.837 0.356 0.644
#> SRR650166 2 0.9552 0.843 0.376 0.624
#> SRR650167 2 0.9552 0.843 0.376 0.624
#> SRR650171 2 0.9552 0.843 0.376 0.624
#> SRR650165 2 0.9552 0.843 0.376 0.624
#> SRR650176 2 0.9552 0.843 0.376 0.624
#> SRR650177 2 0.9552 0.843 0.376 0.624
#> SRR650180 2 0.9552 0.843 0.376 0.624
#> SRR650179 2 0.9552 0.843 0.376 0.624
#> SRR650181 2 0.9552 0.843 0.376 0.624
#> SRR650183 2 0.9552 0.843 0.376 0.624
#> SRR650184 2 0.9170 0.826 0.332 0.668
#> SRR650185 2 0.9170 0.826 0.332 0.668
#> SRR650188 2 0.9552 0.843 0.376 0.624
#> SRR650191 2 0.8443 0.796 0.272 0.728
#> SRR650192 2 0.9552 0.843 0.376 0.624
#> SRR650195 2 0.9491 0.841 0.368 0.632
#> SRR650198 2 0.9552 0.843 0.376 0.624
#> SRR650200 2 0.9552 0.843 0.376 0.624
#> SRR650196 2 0.9552 0.843 0.376 0.624
#> SRR650197 2 0.9552 0.843 0.376 0.624
#> SRR650201 2 0.9552 0.843 0.376 0.624
#> SRR650203 2 0.9552 0.843 0.376 0.624
#> SRR650204 2 0.9552 0.843 0.376 0.624
#> SRR650202 2 0.9552 0.843 0.376 0.624
#> SRR650130 2 0.9552 0.843 0.376 0.624
#> SRR650131 2 0.9552 0.843 0.376 0.624
#> SRR650132 2 0.9552 0.843 0.376 0.624
#> SRR650133 2 0.9491 0.841 0.368 0.632
#> SRR650138 2 0.0000 0.610 0.000 1.000
#> SRR650139 2 0.0000 0.610 0.000 1.000
#> SRR650142 2 0.0000 0.610 0.000 1.000
#> SRR650143 2 0.0000 0.610 0.000 1.000
#> SRR650145 2 0.0000 0.610 0.000 1.000
#> SRR650146 2 0.0000 0.610 0.000 1.000
#> SRR650148 2 0.0000 0.610 0.000 1.000
#> SRR650149 2 0.0000 0.610 0.000 1.000
#> SRR650151 2 0.0000 0.610 0.000 1.000
#> SRR650152 2 0.0000 0.610 0.000 1.000
#> SRR650154 2 0.0000 0.610 0.000 1.000
#> SRR650155 2 0.0000 0.610 0.000 1.000
#> SRR650157 2 0.0000 0.610 0.000 1.000
#> SRR650158 2 0.0000 0.610 0.000 1.000
#> SRR650160 2 0.9661 0.833 0.392 0.608
#> SRR650161 2 0.9661 0.833 0.392 0.608
#> SRR650163 2 0.0000 0.610 0.000 1.000
#> SRR650164 2 0.0000 0.610 0.000 1.000
#> SRR650169 2 0.0938 0.620 0.012 0.988
#> SRR650170 2 0.0938 0.620 0.012 0.988
#> SRR650172 2 0.0000 0.610 0.000 1.000
#> SRR650173 2 0.0000 0.610 0.000 1.000
#> SRR650174 2 0.0000 0.610 0.000 1.000
#> SRR650175 2 0.0000 0.610 0.000 1.000
#> SRR650178 2 0.9552 0.843 0.376 0.624
#> SRR650182 2 0.9552 0.843 0.376 0.624
#> SRR650186 2 0.0000 0.610 0.000 1.000
#> SRR650187 2 0.0000 0.610 0.000 1.000
#> SRR650189 2 0.0000 0.610 0.000 1.000
#> SRR650190 2 0.0000 0.610 0.000 1.000
#> SRR650193 2 0.9552 0.843 0.376 0.624
#> SRR650194 2 0.9552 0.843 0.376 0.624
#> SRR834560 1 0.9552 1.000 0.624 0.376
#> SRR834561 1 0.9552 1.000 0.624 0.376
#> SRR834562 1 0.9552 1.000 0.624 0.376
#> SRR834563 1 0.9552 1.000 0.624 0.376
#> SRR834564 1 0.9552 1.000 0.624 0.376
#> SRR834565 1 0.9552 1.000 0.624 0.376
#> SRR834566 1 0.9552 1.000 0.624 0.376
#> SRR834567 1 0.9552 1.000 0.624 0.376
#> SRR834568 1 0.9552 1.000 0.624 0.376
#> SRR834569 1 0.9552 1.000 0.624 0.376
#> SRR834570 1 0.9552 1.000 0.624 0.376
#> SRR834571 1 0.9552 1.000 0.624 0.376
#> SRR834572 1 0.9552 1.000 0.624 0.376
#> SRR834573 1 0.9552 1.000 0.624 0.376
#> SRR834574 1 0.9552 1.000 0.624 0.376
#> SRR834575 1 0.9552 1.000 0.624 0.376
#> SRR834576 1 0.9552 1.000 0.624 0.376
#> SRR834577 1 0.9552 1.000 0.624 0.376
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650134 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650135 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650136 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650137 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650140 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650141 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650144 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650147 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650150 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650153 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650156 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650159 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650162 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650168 2 0.3116 0.883 0.000 0.892 0.108
#> SRR650166 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650167 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650171 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650165 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650176 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650177 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650180 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650179 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650181 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650183 2 0.0747 0.969 0.000 0.984 0.016
#> SRR650184 2 0.4178 0.806 0.000 0.828 0.172
#> SRR650185 2 0.4178 0.806 0.000 0.828 0.172
#> SRR650188 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650191 2 0.5529 0.608 0.000 0.704 0.296
#> SRR650192 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650195 2 0.1289 0.956 0.000 0.968 0.032
#> SRR650198 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650200 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650196 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650197 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650201 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650203 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650204 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650202 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650130 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650131 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650132 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650133 2 0.1964 0.935 0.000 0.944 0.056
#> SRR650138 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650139 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650142 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650143 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650145 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650146 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650148 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650149 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650151 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650152 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650154 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650155 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650157 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650158 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650160 2 0.1337 0.961 0.016 0.972 0.012
#> SRR650161 2 0.1337 0.961 0.016 0.972 0.012
#> SRR650163 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650164 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650169 3 0.0592 0.985 0.000 0.012 0.988
#> SRR650170 3 0.0592 0.985 0.000 0.012 0.988
#> SRR650172 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650173 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650174 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650175 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650178 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650182 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650186 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650187 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650189 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650190 3 0.0000 0.999 0.000 0.000 1.000
#> SRR650193 2 0.0000 0.980 0.000 1.000 0.000
#> SRR650194 2 0.0000 0.980 0.000 1.000 0.000
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.2868 0.665 0.000 0.864 0.000 0.136
#> SRR650134 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650135 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650136 2 0.4222 0.328 0.000 0.728 0.000 0.272
#> SRR650137 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650140 2 0.1389 0.798 0.000 0.952 0.000 0.048
#> SRR650141 2 0.2868 0.665 0.000 0.864 0.000 0.136
#> SRR650144 2 0.4040 0.474 0.000 0.752 0.000 0.248
#> SRR650147 2 0.2868 0.665 0.000 0.864 0.000 0.136
#> SRR650150 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650153 2 0.0188 0.805 0.000 0.996 0.000 0.004
#> SRR650156 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650159 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650162 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650168 4 0.5778 0.597 0.000 0.472 0.028 0.500
#> SRR650166 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650167 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650171 2 0.0817 0.807 0.000 0.976 0.000 0.024
#> SRR650165 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650176 2 0.0817 0.807 0.000 0.976 0.000 0.024
#> SRR650177 2 0.0817 0.807 0.000 0.976 0.000 0.024
#> SRR650180 2 0.0817 0.807 0.000 0.976 0.000 0.024
#> SRR650179 2 0.0707 0.808 0.000 0.980 0.000 0.020
#> SRR650181 2 0.1557 0.761 0.000 0.944 0.000 0.056
#> SRR650183 2 0.4776 -0.176 0.000 0.624 0.000 0.376
#> SRR650184 4 0.5900 0.812 0.000 0.260 0.076 0.664
#> SRR650185 4 0.5900 0.812 0.000 0.260 0.076 0.664
#> SRR650188 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650191 4 0.7249 0.747 0.000 0.260 0.200 0.540
#> SRR650192 2 0.0707 0.808 0.000 0.980 0.000 0.020
#> SRR650195 4 0.4925 0.675 0.000 0.428 0.000 0.572
#> SRR650198 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650200 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650197 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650201 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650203 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650204 2 0.4134 0.668 0.000 0.740 0.000 0.260
#> SRR650202 2 0.1118 0.781 0.000 0.964 0.000 0.036
#> SRR650130 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650131 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650132 2 0.0000 0.807 0.000 1.000 0.000 0.000
#> SRR650133 2 0.5842 -0.546 0.000 0.520 0.032 0.448
#> SRR650138 3 0.1940 0.937 0.000 0.000 0.924 0.076
#> SRR650139 3 0.1940 0.937 0.000 0.000 0.924 0.076
#> SRR650142 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650145 3 0.1940 0.937 0.000 0.000 0.924 0.076
#> SRR650146 3 0.1940 0.937 0.000 0.000 0.924 0.076
#> SRR650148 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650149 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650151 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650152 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650154 3 0.1940 0.937 0.000 0.000 0.924 0.076
#> SRR650155 3 0.1940 0.937 0.000 0.000 0.924 0.076
#> SRR650157 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650160 2 0.5395 0.537 0.016 0.628 0.004 0.352
#> SRR650161 2 0.5395 0.537 0.016 0.628 0.004 0.352
#> SRR650163 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650169 3 0.1022 0.961 0.000 0.000 0.968 0.032
#> SRR650170 3 0.1022 0.961 0.000 0.000 0.968 0.032
#> SRR650172 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650173 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650174 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650175 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650178 2 0.0336 0.804 0.000 0.992 0.000 0.008
#> SRR650182 2 0.0336 0.804 0.000 0.992 0.000 0.008
#> SRR650186 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.976 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650190 3 0.0336 0.976 0.000 0.000 0.992 0.008
#> SRR650193 2 0.0707 0.808 0.000 0.980 0.000 0.020
#> SRR650194 2 0.0707 0.808 0.000 0.980 0.000 0.020
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 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
#> SRR650205 2 0.3209 0.5769 0 0.812 0.000 0.180 NA
#> SRR650134 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650135 2 0.0451 0.7594 0 0.988 0.000 0.004 NA
#> SRR650136 2 0.5927 -0.0920 0 0.592 0.000 0.172 NA
#> SRR650137 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650140 2 0.1965 0.7447 0 0.904 0.000 0.000 NA
#> SRR650141 2 0.3209 0.5769 0 0.812 0.000 0.180 NA
#> SRR650144 2 0.5773 0.0744 0 0.616 0.000 0.168 NA
#> SRR650147 2 0.3171 0.5802 0 0.816 0.000 0.176 NA
#> SRR650150 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650153 2 0.0579 0.7576 0 0.984 0.000 0.008 NA
#> SRR650156 2 0.0451 0.7594 0 0.988 0.000 0.004 NA
#> SRR650159 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650162 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650168 4 0.4800 0.6379 0 0.368 0.028 0.604 NA
#> SRR650166 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650167 2 0.0451 0.7638 0 0.988 0.000 0.004 NA
#> SRR650171 2 0.0963 0.7650 0 0.964 0.000 0.000 NA
#> SRR650165 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650176 2 0.0963 0.7650 0 0.964 0.000 0.000 NA
#> SRR650177 2 0.0963 0.7650 0 0.964 0.000 0.000 NA
#> SRR650180 2 0.1124 0.7649 0 0.960 0.000 0.004 NA
#> SRR650179 2 0.1357 0.7644 0 0.948 0.000 0.004 NA
#> SRR650181 2 0.2077 0.7060 0 0.920 0.000 0.040 NA
#> SRR650183 2 0.6491 -0.4358 0 0.488 0.000 0.284 NA
#> SRR650184 4 0.7507 0.7668 0 0.252 0.080 0.488 NA
#> SRR650185 4 0.7507 0.7668 0 0.252 0.080 0.488 NA
#> SRR650188 2 0.0451 0.7594 0 0.988 0.000 0.004 NA
#> SRR650191 4 0.6298 0.6572 0 0.168 0.200 0.608 NA
#> SRR650192 2 0.0880 0.7654 0 0.968 0.000 0.000 NA
#> SRR650195 4 0.6504 0.7070 0 0.288 0.000 0.484 NA
#> SRR650198 2 0.4717 0.4910 0 0.584 0.000 0.020 NA
#> SRR650200 2 0.0451 0.7638 0 0.988 0.000 0.004 NA
#> SRR650196 2 0.0955 0.7644 0 0.968 0.000 0.004 NA
#> SRR650197 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650201 2 0.0451 0.7638 0 0.988 0.000 0.004 NA
#> SRR650203 2 0.0000 0.7626 0 1.000 0.000 0.000 NA
#> SRR650204 2 0.3983 0.5862 0 0.660 0.000 0.000 NA
#> SRR650202 2 0.1608 0.7250 0 0.928 0.000 0.072 NA
#> SRR650130 2 0.0865 0.7643 0 0.972 0.000 0.004 NA
#> SRR650131 2 0.0000 0.7626 0 1.000 0.000 0.000 NA
#> SRR650132 2 0.0162 0.7637 0 0.996 0.000 0.000 NA
#> SRR650133 4 0.5155 0.5644 0 0.404 0.028 0.560 NA
#> SRR650138 3 0.4401 0.7003 0 0.000 0.656 0.016 NA
#> SRR650139 3 0.4401 0.7003 0 0.000 0.656 0.016 NA
#> SRR650142 3 0.0290 0.9095 0 0.000 0.992 0.000 NA
#> SRR650143 3 0.0290 0.9095 0 0.000 0.992 0.000 NA
#> SRR650145 3 0.4401 0.7003 0 0.000 0.656 0.016 NA
#> SRR650146 3 0.4401 0.7003 0 0.000 0.656 0.016 NA
#> SRR650148 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650149 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650151 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650152 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650154 3 0.4401 0.7003 0 0.000 0.656 0.016 NA
#> SRR650155 3 0.4401 0.7003 0 0.000 0.656 0.016 NA
#> SRR650157 3 0.1544 0.8839 0 0.000 0.932 0.000 NA
#> SRR650158 3 0.1544 0.8839 0 0.000 0.932 0.000 NA
#> SRR650160 2 0.6793 0.1549 0 0.468 0.008 0.288 NA
#> SRR650161 2 0.6793 0.1549 0 0.468 0.008 0.288 NA
#> SRR650163 3 0.0290 0.9095 0 0.000 0.992 0.000 NA
#> SRR650164 3 0.0290 0.9095 0 0.000 0.992 0.000 NA
#> SRR650169 3 0.0807 0.8963 0 0.000 0.976 0.012 NA
#> SRR650170 3 0.0807 0.8963 0 0.000 0.976 0.012 NA
#> SRR650172 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650173 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650174 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650175 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650178 2 0.0912 0.7618 0 0.972 0.000 0.012 NA
#> SRR650182 2 0.0912 0.7618 0 0.972 0.000 0.012 NA
#> SRR650186 3 0.0290 0.9095 0 0.000 0.992 0.000 NA
#> SRR650187 3 0.0290 0.9095 0 0.000 0.992 0.000 NA
#> SRR650189 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650190 3 0.0000 0.9098 0 0.000 1.000 0.000 NA
#> SRR650193 2 0.0880 0.7654 0 0.968 0.000 0.000 NA
#> SRR650194 2 0.0880 0.7654 0 0.968 0.000 0.000 NA
#> SRR834560 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834561 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834562 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834563 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834564 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834565 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834566 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834567 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834568 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834569 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834570 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834571 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834572 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834573 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834574 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834575 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834576 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
#> SRR834577 1 0.0000 1.0000 1 0.000 0.000 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 2 0.4762 0.0574 0.000 0.676 0.000 0.176 0.148 0.000
#> SRR650134 2 0.5565 0.1138 0.000 0.552 0.000 0.000 0.240 0.208
#> SRR650135 2 0.0363 0.6481 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR650136 2 0.4242 -0.1183 0.000 0.572 0.000 0.412 0.012 0.004
#> SRR650137 2 0.5565 0.1138 0.000 0.552 0.000 0.000 0.240 0.208
#> SRR650140 2 0.3312 0.4775 0.000 0.792 0.000 0.000 0.180 0.028
#> SRR650141 2 0.4762 0.0574 0.000 0.676 0.000 0.176 0.148 0.000
#> SRR650144 2 0.4649 -0.0259 0.000 0.616 0.000 0.340 0.024 0.020
#> SRR650147 2 0.4734 0.0671 0.000 0.680 0.000 0.168 0.152 0.000
#> SRR650150 2 0.5618 0.0918 0.000 0.540 0.000 0.000 0.252 0.208
#> SRR650153 2 0.0458 0.6457 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR650156 2 0.0363 0.6481 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR650159 2 0.5601 0.0981 0.000 0.544 0.000 0.000 0.248 0.208
#> SRR650162 2 0.5601 0.0981 0.000 0.544 0.000 0.000 0.248 0.208
#> SRR650168 4 0.5949 0.3157 0.000 0.160 0.000 0.480 0.348 0.012
#> SRR650166 2 0.5583 0.1082 0.000 0.548 0.000 0.000 0.244 0.208
#> SRR650167 2 0.0405 0.6540 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650171 2 0.1088 0.6515 0.000 0.960 0.000 0.000 0.016 0.024
#> SRR650165 2 0.5565 0.1138 0.000 0.552 0.000 0.000 0.240 0.208
#> SRR650176 2 0.1088 0.6515 0.000 0.960 0.000 0.000 0.016 0.024
#> SRR650177 2 0.1088 0.6515 0.000 0.960 0.000 0.000 0.016 0.024
#> SRR650180 2 0.1346 0.6487 0.000 0.952 0.000 0.008 0.016 0.024
#> SRR650179 2 0.1552 0.6471 0.000 0.940 0.000 0.004 0.036 0.020
#> SRR650181 2 0.1814 0.5491 0.000 0.900 0.000 0.100 0.000 0.000
#> SRR650183 4 0.4083 0.1026 0.000 0.460 0.000 0.532 0.008 0.000
#> SRR650184 4 0.5078 0.5356 0.000 0.208 0.000 0.632 0.160 0.000
#> SRR650185 4 0.5078 0.5356 0.000 0.208 0.000 0.632 0.160 0.000
#> SRR650188 2 0.0363 0.6481 0.000 0.988 0.000 0.012 0.000 0.000
#> SRR650191 4 0.5517 0.3758 0.000 0.000 0.092 0.488 0.408 0.012
#> SRR650192 2 0.1003 0.6527 0.000 0.964 0.000 0.000 0.016 0.020
#> SRR650195 4 0.3695 0.4749 0.000 0.244 0.000 0.732 0.024 0.000
#> SRR650198 2 0.6003 -0.1949 0.000 0.496 0.000 0.008 0.272 0.224
#> SRR650200 2 0.0405 0.6540 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650196 2 0.1010 0.6499 0.000 0.960 0.000 0.004 0.036 0.000
#> SRR650197 2 0.5565 0.1138 0.000 0.552 0.000 0.000 0.240 0.208
#> SRR650201 2 0.0405 0.6540 0.000 0.988 0.000 0.004 0.008 0.000
#> SRR650203 2 0.0146 0.6523 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650204 2 0.5583 0.1048 0.000 0.548 0.000 0.000 0.244 0.208
#> SRR650202 2 0.3202 0.4308 0.000 0.816 0.000 0.144 0.040 0.000
#> SRR650130 2 0.0858 0.6519 0.000 0.968 0.000 0.004 0.028 0.000
#> SRR650131 2 0.0146 0.6523 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650132 2 0.0260 0.6537 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650133 4 0.6084 0.2408 0.000 0.188 0.000 0.464 0.336 0.012
#> SRR650138 6 0.3221 0.9884 0.000 0.000 0.264 0.000 0.000 0.736
#> SRR650139 6 0.3221 0.9884 0.000 0.000 0.264 0.000 0.000 0.736
#> SRR650142 3 0.0260 0.9768 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650143 3 0.0260 0.9768 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650145 6 0.3221 0.9884 0.000 0.000 0.264 0.000 0.000 0.736
#> SRR650146 6 0.3221 0.9884 0.000 0.000 0.264 0.000 0.000 0.736
#> SRR650148 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650149 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650151 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650152 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650154 6 0.3330 0.9768 0.000 0.000 0.284 0.000 0.000 0.716
#> SRR650155 6 0.3330 0.9768 0.000 0.000 0.284 0.000 0.000 0.716
#> SRR650157 3 0.1814 0.8621 0.000 0.000 0.900 0.000 0.000 0.100
#> SRR650158 3 0.1814 0.8621 0.000 0.000 0.900 0.000 0.000 0.100
#> SRR650160 5 0.5651 1.0000 0.000 0.392 0.008 0.036 0.516 0.048
#> SRR650161 5 0.5651 1.0000 0.000 0.392 0.008 0.036 0.516 0.048
#> SRR650163 3 0.0260 0.9768 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650164 3 0.0260 0.9768 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650169 3 0.0725 0.9587 0.000 0.000 0.976 0.012 0.012 0.000
#> SRR650170 3 0.0725 0.9587 0.000 0.000 0.976 0.012 0.012 0.000
#> SRR650172 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650173 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650174 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650175 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650178 2 0.0972 0.6473 0.000 0.964 0.000 0.008 0.028 0.000
#> SRR650182 2 0.0972 0.6473 0.000 0.964 0.000 0.008 0.028 0.000
#> SRR650186 3 0.0260 0.9768 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650187 3 0.0260 0.9768 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR650189 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650190 3 0.0000 0.9790 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650193 2 0.1003 0.6527 0.000 0.964 0.000 0.000 0.016 0.020
#> SRR650194 2 0.1003 0.6527 0.000 0.964 0.000 0.000 0.016 0.020
#> SRR834560 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0146 0.9971 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834570 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0146 0.9971 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834574 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0146 0.9971 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834576 1 0.0000 0.9992 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0146 0.9971 0.996 0.000 0.000 0.000 0.004 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.531 0.829 0.880 0.4443 0.495 0.495
#> 3 3 0.814 0.950 0.937 0.3997 0.886 0.771
#> 4 4 0.713 0.679 0.815 0.1395 0.894 0.721
#> 5 5 0.707 0.679 0.774 0.0752 0.911 0.709
#> 6 6 0.701 0.507 0.676 0.0508 0.921 0.696
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
#> SRR650205 2 0.000 0.984 0.000 1.000
#> SRR650134 2 0.000 0.984 0.000 1.000
#> SRR650135 2 0.000 0.984 0.000 1.000
#> SRR650136 2 0.000 0.984 0.000 1.000
#> SRR650137 2 0.000 0.984 0.000 1.000
#> SRR650140 2 0.000 0.984 0.000 1.000
#> SRR650141 2 0.000 0.984 0.000 1.000
#> SRR650144 2 0.000 0.984 0.000 1.000
#> SRR650147 2 0.000 0.984 0.000 1.000
#> SRR650150 2 0.000 0.984 0.000 1.000
#> SRR650153 2 0.000 0.984 0.000 1.000
#> SRR650156 2 0.000 0.984 0.000 1.000
#> SRR650159 2 0.000 0.984 0.000 1.000
#> SRR650162 2 0.000 0.984 0.000 1.000
#> SRR650168 2 0.000 0.984 0.000 1.000
#> SRR650166 2 0.000 0.984 0.000 1.000
#> SRR650167 2 0.000 0.984 0.000 1.000
#> SRR650171 2 0.000 0.984 0.000 1.000
#> SRR650165 2 0.000 0.984 0.000 1.000
#> SRR650176 2 0.000 0.984 0.000 1.000
#> SRR650177 2 0.000 0.984 0.000 1.000
#> SRR650180 2 0.000 0.984 0.000 1.000
#> SRR650179 2 0.000 0.984 0.000 1.000
#> SRR650181 2 0.000 0.984 0.000 1.000
#> SRR650183 2 0.000 0.984 0.000 1.000
#> SRR650184 2 0.373 0.890 0.072 0.928
#> SRR650185 2 0.373 0.890 0.072 0.928
#> SRR650188 2 0.000 0.984 0.000 1.000
#> SRR650191 1 0.969 0.626 0.604 0.396
#> SRR650192 2 0.000 0.984 0.000 1.000
#> SRR650195 2 0.000 0.984 0.000 1.000
#> SRR650198 2 0.000 0.984 0.000 1.000
#> SRR650200 2 0.000 0.984 0.000 1.000
#> SRR650196 2 0.000 0.984 0.000 1.000
#> SRR650197 2 0.000 0.984 0.000 1.000
#> SRR650201 2 0.000 0.984 0.000 1.000
#> SRR650203 2 0.000 0.984 0.000 1.000
#> SRR650204 2 0.000 0.984 0.000 1.000
#> SRR650202 2 0.000 0.984 0.000 1.000
#> SRR650130 2 0.000 0.984 0.000 1.000
#> SRR650131 2 0.000 0.984 0.000 1.000
#> SRR650132 2 0.000 0.984 0.000 1.000
#> SRR650133 2 0.000 0.984 0.000 1.000
#> SRR650138 1 0.753 0.749 0.784 0.216
#> SRR650139 1 0.753 0.749 0.784 0.216
#> SRR650142 1 0.844 0.734 0.728 0.272
#> SRR650143 1 0.844 0.734 0.728 0.272
#> SRR650145 1 0.760 0.749 0.780 0.220
#> SRR650146 1 0.760 0.749 0.780 0.220
#> SRR650148 1 0.992 0.558 0.552 0.448
#> SRR650149 1 0.992 0.558 0.552 0.448
#> SRR650151 1 0.992 0.558 0.552 0.448
#> SRR650152 1 0.992 0.558 0.552 0.448
#> SRR650154 1 0.995 0.532 0.540 0.460
#> SRR650155 1 0.995 0.532 0.540 0.460
#> SRR650157 1 0.802 0.744 0.756 0.244
#> SRR650158 1 0.802 0.744 0.756 0.244
#> SRR650160 2 0.714 0.627 0.196 0.804
#> SRR650161 2 0.714 0.627 0.196 0.804
#> SRR650163 1 0.833 0.738 0.736 0.264
#> SRR650164 1 0.833 0.738 0.736 0.264
#> SRR650169 1 0.992 0.558 0.552 0.448
#> SRR650170 1 0.992 0.558 0.552 0.448
#> SRR650172 1 0.992 0.558 0.552 0.448
#> SRR650173 1 0.992 0.558 0.552 0.448
#> SRR650174 1 0.992 0.558 0.552 0.448
#> SRR650175 1 0.992 0.558 0.552 0.448
#> SRR650178 2 0.000 0.984 0.000 1.000
#> SRR650182 2 0.000 0.984 0.000 1.000
#> SRR650186 1 0.833 0.738 0.736 0.264
#> SRR650187 1 0.833 0.738 0.736 0.264
#> SRR650189 1 0.936 0.672 0.648 0.352
#> SRR650190 1 0.936 0.672 0.648 0.352
#> SRR650193 2 0.000 0.984 0.000 1.000
#> SRR650194 2 0.000 0.984 0.000 1.000
#> SRR834560 1 0.358 0.739 0.932 0.068
#> SRR834561 1 0.358 0.739 0.932 0.068
#> SRR834562 1 0.358 0.739 0.932 0.068
#> SRR834563 1 0.358 0.739 0.932 0.068
#> SRR834564 1 0.358 0.739 0.932 0.068
#> SRR834565 1 0.358 0.739 0.932 0.068
#> SRR834566 1 0.358 0.739 0.932 0.068
#> SRR834567 1 0.358 0.739 0.932 0.068
#> SRR834568 1 0.358 0.739 0.932 0.068
#> SRR834569 1 0.000 0.720 1.000 0.000
#> SRR834570 1 0.358 0.739 0.932 0.068
#> SRR834571 1 0.358 0.739 0.932 0.068
#> SRR834572 1 0.358 0.739 0.932 0.068
#> SRR834573 1 0.311 0.737 0.944 0.056
#> SRR834574 1 0.358 0.739 0.932 0.068
#> SRR834575 1 0.358 0.739 0.932 0.068
#> SRR834576 1 0.358 0.739 0.932 0.068
#> SRR834577 1 0.311 0.737 0.944 0.056
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650134 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650135 2 0.0747 0.943 0.016 0.984 0.000
#> SRR650136 2 0.2261 0.938 0.068 0.932 0.000
#> SRR650137 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650140 2 0.1289 0.939 0.032 0.968 0.000
#> SRR650141 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650144 2 0.2448 0.935 0.076 0.924 0.000
#> SRR650147 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650150 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650153 2 0.2261 0.937 0.068 0.932 0.000
#> SRR650156 2 0.0747 0.943 0.016 0.984 0.000
#> SRR650159 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650162 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650168 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650166 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650167 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650171 2 0.2165 0.940 0.064 0.936 0.000
#> SRR650165 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650176 2 0.2537 0.937 0.080 0.920 0.000
#> SRR650177 2 0.2537 0.937 0.080 0.920 0.000
#> SRR650180 2 0.2625 0.931 0.084 0.916 0.000
#> SRR650179 2 0.1163 0.940 0.028 0.972 0.000
#> SRR650181 2 0.1529 0.941 0.040 0.960 0.000
#> SRR650183 2 0.2711 0.930 0.088 0.912 0.000
#> SRR650184 2 0.8440 0.206 0.088 0.492 0.420
#> SRR650185 2 0.8440 0.206 0.088 0.492 0.420
#> SRR650188 2 0.0424 0.943 0.008 0.992 0.000
#> SRR650191 3 0.2050 0.946 0.028 0.020 0.952
#> SRR650192 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650195 2 0.2711 0.930 0.088 0.912 0.000
#> SRR650198 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650200 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650196 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650197 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650201 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650203 2 0.1964 0.939 0.056 0.944 0.000
#> SRR650204 2 0.1411 0.938 0.036 0.964 0.000
#> SRR650202 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650130 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650131 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650132 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650133 2 0.2537 0.933 0.080 0.920 0.000
#> SRR650138 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650139 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650142 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650143 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650145 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650146 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650148 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650149 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650151 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650152 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650154 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650155 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650157 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650158 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650160 2 0.3472 0.925 0.056 0.904 0.040
#> SRR650161 2 0.3472 0.925 0.056 0.904 0.040
#> SRR650163 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650164 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650169 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650170 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650172 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650173 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650174 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650175 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650178 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650182 2 0.0892 0.941 0.020 0.980 0.000
#> SRR650186 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650187 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650189 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650190 3 0.0424 0.998 0.000 0.008 0.992
#> SRR650193 2 0.1529 0.942 0.040 0.960 0.000
#> SRR650194 2 0.1529 0.942 0.040 0.960 0.000
#> SRR834560 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834561 1 0.3551 0.996 0.868 0.000 0.132
#> SRR834562 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834563 1 0.3551 0.996 0.868 0.000 0.132
#> SRR834564 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834565 1 0.3551 0.996 0.868 0.000 0.132
#> SRR834566 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834567 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834568 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834569 1 0.3551 0.996 0.868 0.000 0.132
#> SRR834570 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834571 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834572 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834573 1 0.3551 0.996 0.868 0.000 0.132
#> SRR834574 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834575 1 0.3551 0.996 0.868 0.000 0.132
#> SRR834576 1 0.3412 0.998 0.876 0.000 0.124
#> SRR834577 1 0.3551 0.996 0.868 0.000 0.132
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.5158 0.715 0.004 0.472 0.000 0.524
#> SRR650134 2 0.1182 0.613 0.016 0.968 0.000 0.016
#> SRR650135 2 0.4877 0.232 0.008 0.664 0.000 0.328
#> SRR650136 2 0.4746 0.152 0.008 0.688 0.000 0.304
#> SRR650137 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650140 2 0.0336 0.615 0.000 0.992 0.000 0.008
#> SRR650141 4 0.5158 0.715 0.004 0.472 0.000 0.524
#> SRR650144 2 0.5294 -0.544 0.008 0.508 0.000 0.484
#> SRR650147 4 0.5158 0.715 0.004 0.472 0.000 0.524
#> SRR650150 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650153 2 0.5273 -0.399 0.008 0.536 0.000 0.456
#> SRR650156 2 0.4877 0.232 0.008 0.664 0.000 0.328
#> SRR650159 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650162 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650168 4 0.5250 0.701 0.008 0.440 0.000 0.552
#> SRR650166 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650167 2 0.3945 0.494 0.004 0.780 0.000 0.216
#> SRR650171 2 0.4155 0.281 0.004 0.756 0.000 0.240
#> SRR650165 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650176 2 0.4372 0.191 0.004 0.728 0.000 0.268
#> SRR650177 2 0.4372 0.191 0.004 0.728 0.000 0.268
#> SRR650180 4 0.5163 0.704 0.004 0.480 0.000 0.516
#> SRR650179 2 0.0921 0.611 0.000 0.972 0.000 0.028
#> SRR650181 2 0.4990 0.133 0.008 0.640 0.000 0.352
#> SRR650183 4 0.5263 0.655 0.008 0.448 0.000 0.544
#> SRR650184 4 0.6879 0.334 0.008 0.120 0.272 0.600
#> SRR650185 4 0.6879 0.334 0.008 0.120 0.272 0.600
#> SRR650188 2 0.4814 0.270 0.008 0.676 0.000 0.316
#> SRR650191 3 0.2999 0.865 0.004 0.000 0.864 0.132
#> SRR650192 4 0.4992 0.708 0.000 0.476 0.000 0.524
#> SRR650195 4 0.5125 0.648 0.008 0.388 0.000 0.604
#> SRR650198 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650200 2 0.3945 0.494 0.004 0.780 0.000 0.216
#> SRR650196 2 0.3945 0.494 0.004 0.780 0.000 0.216
#> SRR650197 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650201 2 0.4158 0.474 0.008 0.768 0.000 0.224
#> SRR650203 2 0.5268 -0.494 0.008 0.540 0.000 0.452
#> SRR650204 2 0.0592 0.617 0.016 0.984 0.000 0.000
#> SRR650202 4 0.5163 0.700 0.004 0.480 0.000 0.516
#> SRR650130 2 0.3945 0.494 0.004 0.780 0.000 0.216
#> SRR650131 4 0.5161 0.709 0.004 0.476 0.000 0.520
#> SRR650132 2 0.4018 0.481 0.004 0.772 0.000 0.224
#> SRR650133 4 0.5243 0.677 0.004 0.416 0.004 0.576
#> SRR650138 3 0.3907 0.855 0.000 0.000 0.768 0.232
#> SRR650139 3 0.3907 0.855 0.000 0.000 0.768 0.232
#> SRR650142 3 0.1792 0.923 0.000 0.000 0.932 0.068
#> SRR650143 3 0.1792 0.923 0.000 0.000 0.932 0.068
#> SRR650145 3 0.3907 0.855 0.000 0.000 0.768 0.232
#> SRR650146 3 0.3907 0.855 0.000 0.000 0.768 0.232
#> SRR650148 3 0.1118 0.924 0.000 0.000 0.964 0.036
#> SRR650149 3 0.1118 0.924 0.000 0.000 0.964 0.036
#> SRR650151 3 0.1637 0.922 0.000 0.000 0.940 0.060
#> SRR650152 3 0.1637 0.922 0.000 0.000 0.940 0.060
#> SRR650154 3 0.3074 0.897 0.000 0.000 0.848 0.152
#> SRR650155 3 0.3074 0.897 0.000 0.000 0.848 0.152
#> SRR650157 3 0.3074 0.892 0.000 0.000 0.848 0.152
#> SRR650158 3 0.3074 0.892 0.000 0.000 0.848 0.152
#> SRR650160 2 0.5542 0.295 0.004 0.716 0.064 0.216
#> SRR650161 2 0.5542 0.295 0.004 0.716 0.064 0.216
#> SRR650163 3 0.1867 0.922 0.000 0.000 0.928 0.072
#> SRR650164 3 0.1867 0.922 0.000 0.000 0.928 0.072
#> SRR650169 3 0.1389 0.921 0.000 0.000 0.952 0.048
#> SRR650170 3 0.1389 0.921 0.000 0.000 0.952 0.048
#> SRR650172 3 0.1022 0.925 0.000 0.000 0.968 0.032
#> SRR650173 3 0.1022 0.925 0.000 0.000 0.968 0.032
#> SRR650174 3 0.1022 0.925 0.000 0.000 0.968 0.032
#> SRR650175 3 0.1022 0.925 0.000 0.000 0.968 0.032
#> SRR650178 2 0.4228 0.481 0.008 0.760 0.000 0.232
#> SRR650182 2 0.4228 0.481 0.008 0.760 0.000 0.232
#> SRR650186 3 0.1867 0.922 0.000 0.000 0.928 0.072
#> SRR650187 3 0.1867 0.922 0.000 0.000 0.928 0.072
#> SRR650189 3 0.0000 0.928 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.928 0.000 0.000 1.000 0.000
#> SRR650193 2 0.3672 0.453 0.012 0.824 0.000 0.164
#> SRR650194 2 0.3672 0.453 0.012 0.824 0.000 0.164
#> SRR834560 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834561 1 0.3464 0.948 0.860 0.000 0.032 0.108
#> SRR834562 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834563 1 0.3464 0.948 0.860 0.000 0.032 0.108
#> SRR834564 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834565 1 0.3464 0.948 0.860 0.000 0.032 0.108
#> SRR834566 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834567 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834568 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834569 1 0.3581 0.945 0.852 0.000 0.032 0.116
#> SRR834570 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834571 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834572 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834573 1 0.3523 0.947 0.856 0.000 0.032 0.112
#> SRR834574 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834575 1 0.3523 0.947 0.856 0.000 0.032 0.112
#> SRR834576 1 0.1022 0.968 0.968 0.000 0.032 0.000
#> SRR834577 1 0.3523 0.947 0.856 0.000 0.032 0.112
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.0807 0.65728 0.000 0.012 0.000 0.976 NA
#> SRR650134 2 0.5644 0.64936 0.000 0.628 0.000 0.228 NA
#> SRR650135 2 0.4747 0.35028 0.000 0.496 0.000 0.488 NA
#> SRR650136 4 0.5897 0.39948 0.004 0.212 0.000 0.616 NA
#> SRR650137 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650140 2 0.5726 0.63922 0.000 0.612 0.000 0.248 NA
#> SRR650141 4 0.0693 0.65781 0.000 0.008 0.000 0.980 NA
#> SRR650144 4 0.3937 0.61084 0.004 0.072 0.000 0.808 NA
#> SRR650147 4 0.0693 0.65781 0.000 0.008 0.000 0.980 NA
#> SRR650150 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650153 4 0.4290 0.25952 0.000 0.304 0.000 0.680 NA
#> SRR650156 2 0.4747 0.35028 0.000 0.496 0.000 0.488 NA
#> SRR650159 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650162 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650168 4 0.2079 0.64669 0.000 0.020 0.000 0.916 NA
#> SRR650166 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650167 2 0.4138 0.56977 0.000 0.616 0.000 0.384 NA
#> SRR650171 4 0.5828 0.27825 0.004 0.260 0.000 0.608 NA
#> SRR650165 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650176 4 0.5436 0.39001 0.004 0.216 0.000 0.664 NA
#> SRR650177 4 0.5436 0.39001 0.004 0.216 0.000 0.664 NA
#> SRR650180 4 0.1547 0.65946 0.004 0.016 0.000 0.948 NA
#> SRR650179 2 0.5232 0.64032 0.000 0.668 0.000 0.228 NA
#> SRR650181 4 0.4702 -0.20987 0.000 0.432 0.000 0.552 NA
#> SRR650183 4 0.3778 0.61051 0.004 0.108 0.000 0.820 NA
#> SRR650184 4 0.6712 0.45222 0.004 0.056 0.148 0.608 NA
#> SRR650185 4 0.6712 0.45222 0.004 0.056 0.148 0.608 NA
#> SRR650188 2 0.4738 0.40893 0.000 0.520 0.000 0.464 NA
#> SRR650191 3 0.4816 0.71477 0.000 0.024 0.760 0.128 NA
#> SRR650192 4 0.0912 0.65962 0.000 0.016 0.000 0.972 NA
#> SRR650195 4 0.4765 0.57343 0.004 0.060 0.012 0.748 NA
#> SRR650198 2 0.5911 0.64269 0.000 0.596 0.000 0.228 NA
#> SRR650200 2 0.4138 0.56977 0.000 0.616 0.000 0.384 NA
#> SRR650196 2 0.4251 0.57065 0.000 0.624 0.000 0.372 NA
#> SRR650197 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650201 2 0.4182 0.55306 0.000 0.600 0.000 0.400 NA
#> SRR650203 4 0.3561 0.34426 0.000 0.260 0.000 0.740 NA
#> SRR650204 2 0.5904 0.64781 0.000 0.596 0.000 0.232 NA
#> SRR650202 4 0.0880 0.65040 0.000 0.032 0.000 0.968 NA
#> SRR650130 2 0.4126 0.56866 0.000 0.620 0.000 0.380 NA
#> SRR650131 4 0.0703 0.65472 0.000 0.024 0.000 0.976 NA
#> SRR650132 2 0.4161 0.56184 0.000 0.608 0.000 0.392 NA
#> SRR650133 4 0.2710 0.62778 0.000 0.032 0.016 0.896 NA
#> SRR650138 3 0.4273 0.73042 0.000 0.000 0.552 0.000 NA
#> SRR650139 3 0.4273 0.73042 0.000 0.000 0.552 0.000 NA
#> SRR650142 3 0.2920 0.86395 0.000 0.016 0.852 0.000 NA
#> SRR650143 3 0.2920 0.86395 0.000 0.016 0.852 0.000 NA
#> SRR650145 3 0.4273 0.73042 0.000 0.000 0.552 0.000 NA
#> SRR650146 3 0.4273 0.73042 0.000 0.000 0.552 0.000 NA
#> SRR650148 3 0.1168 0.86499 0.000 0.008 0.960 0.000 NA
#> SRR650149 3 0.1168 0.86499 0.000 0.008 0.960 0.000 NA
#> SRR650151 3 0.1626 0.86475 0.000 0.016 0.940 0.000 NA
#> SRR650152 3 0.1626 0.86475 0.000 0.016 0.940 0.000 NA
#> SRR650154 3 0.4952 0.77367 0.000 0.052 0.672 0.004 NA
#> SRR650155 3 0.4952 0.77367 0.000 0.052 0.672 0.004 NA
#> SRR650157 3 0.3789 0.83758 0.000 0.016 0.760 0.000 NA
#> SRR650158 3 0.3789 0.83758 0.000 0.016 0.760 0.000 NA
#> SRR650160 2 0.7715 0.15548 0.000 0.412 0.080 0.328 NA
#> SRR650161 2 0.7715 0.15548 0.000 0.412 0.080 0.328 NA
#> SRR650163 3 0.3055 0.86129 0.000 0.016 0.840 0.000 NA
#> SRR650164 3 0.3055 0.86129 0.000 0.016 0.840 0.000 NA
#> SRR650169 3 0.1282 0.86215 0.000 0.004 0.952 0.000 NA
#> SRR650170 3 0.1282 0.86215 0.000 0.004 0.952 0.000 NA
#> SRR650172 3 0.0290 0.87035 0.000 0.000 0.992 0.000 NA
#> SRR650173 3 0.0290 0.87035 0.000 0.000 0.992 0.000 NA
#> SRR650174 3 0.0992 0.86632 0.000 0.008 0.968 0.000 NA
#> SRR650175 3 0.0992 0.86632 0.000 0.008 0.968 0.000 NA
#> SRR650178 2 0.4436 0.54058 0.000 0.596 0.000 0.396 NA
#> SRR650182 2 0.4436 0.54058 0.000 0.596 0.000 0.396 NA
#> SRR650186 3 0.3141 0.86122 0.000 0.016 0.832 0.000 NA
#> SRR650187 3 0.3141 0.86122 0.000 0.016 0.832 0.000 NA
#> SRR650189 3 0.0451 0.87125 0.000 0.004 0.988 0.000 NA
#> SRR650190 3 0.0451 0.87125 0.000 0.004 0.988 0.000 NA
#> SRR650193 4 0.5975 0.00335 0.000 0.344 0.000 0.532 NA
#> SRR650194 4 0.5975 0.00335 0.000 0.344 0.000 0.532 NA
#> SRR834560 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834561 1 0.3779 0.90654 0.816 0.056 0.004 0.000 NA
#> SRR834562 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834563 1 0.3779 0.90654 0.816 0.056 0.004 0.000 NA
#> SRR834564 1 0.0324 0.94160 0.992 0.004 0.004 0.000 NA
#> SRR834565 1 0.3779 0.90654 0.816 0.056 0.004 0.000 NA
#> SRR834566 1 0.0324 0.94160 0.992 0.004 0.004 0.000 NA
#> SRR834567 1 0.0324 0.94160 0.992 0.004 0.004 0.000 NA
#> SRR834568 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834569 1 0.4360 0.89070 0.780 0.080 0.008 0.000 NA
#> SRR834570 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834571 1 0.0324 0.94160 0.992 0.004 0.004 0.000 NA
#> SRR834572 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834573 1 0.4054 0.90073 0.800 0.080 0.004 0.000 NA
#> SRR834574 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834575 1 0.4054 0.90073 0.800 0.080 0.004 0.000 NA
#> SRR834576 1 0.0162 0.94183 0.996 0.000 0.004 0.000 NA
#> SRR834577 1 0.4054 0.90073 0.800 0.080 0.004 0.000 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.2917 0.67161 0.000 0.104 0.000 0.852 0.040 0.004
#> SRR650134 2 0.1411 0.51957 0.000 0.936 0.000 0.004 0.060 0.000
#> SRR650135 5 0.6306 0.78841 0.000 0.328 0.000 0.248 0.412 0.012
#> SRR650136 4 0.6832 0.32181 0.000 0.376 0.000 0.400 0.120 0.104
#> SRR650137 2 0.0000 0.56842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650140 2 0.3717 0.39781 0.000 0.792 0.000 0.040 0.152 0.016
#> SRR650141 4 0.2984 0.67103 0.000 0.104 0.000 0.848 0.044 0.004
#> SRR650144 4 0.6132 0.55014 0.000 0.196 0.000 0.596 0.104 0.104
#> SRR650147 4 0.2984 0.67103 0.000 0.104 0.000 0.848 0.044 0.004
#> SRR650150 2 0.0520 0.56570 0.000 0.984 0.000 0.008 0.008 0.000
#> SRR650153 5 0.6049 0.47459 0.000 0.168 0.000 0.404 0.416 0.012
#> SRR650156 5 0.6306 0.78841 0.000 0.328 0.000 0.248 0.412 0.012
#> SRR650159 2 0.0508 0.56641 0.000 0.984 0.000 0.004 0.012 0.000
#> SRR650162 2 0.0508 0.56641 0.000 0.984 0.000 0.004 0.012 0.000
#> SRR650168 4 0.3153 0.67967 0.000 0.096 0.000 0.848 0.028 0.028
#> SRR650166 2 0.0000 0.56842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650167 2 0.5696 -0.71363 0.000 0.444 0.000 0.160 0.396 0.000
#> SRR650171 4 0.5668 0.35445 0.000 0.420 0.000 0.480 0.056 0.044
#> SRR650165 2 0.0000 0.56842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650176 4 0.5541 0.41045 0.000 0.396 0.000 0.512 0.048 0.044
#> SRR650177 4 0.5541 0.41045 0.000 0.396 0.000 0.512 0.048 0.044
#> SRR650180 4 0.3641 0.68041 0.000 0.120 0.000 0.812 0.028 0.040
#> SRR650179 2 0.4234 0.23193 0.000 0.712 0.000 0.044 0.236 0.008
#> SRR650181 5 0.6337 0.74403 0.000 0.284 0.000 0.292 0.412 0.012
#> SRR650183 4 0.5627 0.43969 0.000 0.072 0.000 0.636 0.212 0.080
#> SRR650184 4 0.6062 0.49825 0.000 0.004 0.076 0.580 0.080 0.260
#> SRR650185 4 0.6062 0.49825 0.000 0.004 0.076 0.580 0.080 0.260
#> SRR650188 5 0.6088 0.78154 0.000 0.348 0.000 0.228 0.420 0.004
#> SRR650191 3 0.5491 0.24443 0.000 0.000 0.652 0.152 0.040 0.156
#> SRR650192 4 0.2889 0.68160 0.000 0.116 0.000 0.852 0.012 0.020
#> SRR650195 4 0.5666 0.55164 0.000 0.032 0.016 0.632 0.084 0.236
#> SRR650198 2 0.0777 0.55962 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR650200 2 0.5696 -0.71363 0.000 0.444 0.000 0.160 0.396 0.000
#> SRR650196 5 0.5636 0.67945 0.000 0.424 0.000 0.148 0.428 0.000
#> SRR650197 2 0.0260 0.56540 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650201 2 0.5802 -0.74737 0.000 0.420 0.000 0.180 0.400 0.000
#> SRR650203 4 0.5442 0.03329 0.000 0.204 0.000 0.576 0.220 0.000
#> SRR650204 2 0.0000 0.56842 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650202 4 0.2815 0.66704 0.000 0.120 0.000 0.848 0.032 0.000
#> SRR650130 2 0.5681 -0.73502 0.000 0.424 0.000 0.156 0.420 0.000
#> SRR650131 4 0.2815 0.66929 0.000 0.120 0.000 0.848 0.032 0.000
#> SRR650132 2 0.5740 -0.72605 0.000 0.436 0.000 0.168 0.396 0.000
#> SRR650133 4 0.3473 0.66025 0.000 0.068 0.012 0.844 0.052 0.024
#> SRR650138 6 0.3862 1.00000 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650139 6 0.3862 1.00000 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650142 3 0.3998 0.33503 0.000 0.000 0.736 0.016 0.024 0.224
#> SRR650143 3 0.3998 0.33503 0.000 0.000 0.736 0.016 0.024 0.224
#> SRR650145 6 0.3862 1.00000 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650146 6 0.3862 1.00000 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650148 3 0.1562 0.61876 0.000 0.000 0.940 0.004 0.024 0.032
#> SRR650149 3 0.1562 0.61876 0.000 0.000 0.940 0.004 0.024 0.032
#> SRR650151 3 0.1873 0.59686 0.000 0.000 0.924 0.008 0.048 0.020
#> SRR650152 3 0.1873 0.59686 0.000 0.000 0.924 0.008 0.048 0.020
#> SRR650154 3 0.5190 -0.11638 0.000 0.000 0.632 0.016 0.096 0.256
#> SRR650155 3 0.5190 -0.11638 0.000 0.000 0.632 0.016 0.096 0.256
#> SRR650157 3 0.4225 0.05736 0.000 0.000 0.688 0.016 0.020 0.276
#> SRR650158 3 0.4225 0.05736 0.000 0.000 0.688 0.016 0.020 0.276
#> SRR650160 2 0.8448 0.08040 0.000 0.348 0.100 0.224 0.208 0.120
#> SRR650161 2 0.8448 0.08040 0.000 0.348 0.100 0.224 0.208 0.120
#> SRR650163 3 0.3942 0.32900 0.000 0.000 0.752 0.020 0.024 0.204
#> SRR650164 3 0.3942 0.32900 0.000 0.000 0.752 0.020 0.024 0.204
#> SRR650169 3 0.2294 0.58540 0.000 0.000 0.896 0.008 0.020 0.076
#> SRR650170 3 0.2294 0.58540 0.000 0.000 0.896 0.008 0.020 0.076
#> SRR650172 3 0.1230 0.61677 0.000 0.000 0.956 0.008 0.028 0.008
#> SRR650173 3 0.1230 0.61677 0.000 0.000 0.956 0.008 0.028 0.008
#> SRR650174 3 0.1777 0.61605 0.000 0.000 0.932 0.012 0.032 0.024
#> SRR650175 3 0.1777 0.61605 0.000 0.000 0.932 0.012 0.032 0.024
#> SRR650178 5 0.5963 0.68305 0.000 0.408 0.000 0.152 0.428 0.012
#> SRR650182 5 0.5963 0.68305 0.000 0.408 0.000 0.152 0.428 0.012
#> SRR650186 3 0.3998 0.33503 0.000 0.000 0.736 0.016 0.024 0.224
#> SRR650187 3 0.3998 0.33503 0.000 0.000 0.736 0.016 0.024 0.224
#> SRR650189 3 0.0622 0.61309 0.000 0.000 0.980 0.012 0.000 0.008
#> SRR650190 3 0.0622 0.61309 0.000 0.000 0.980 0.012 0.000 0.008
#> SRR650193 2 0.4570 0.00186 0.000 0.600 0.000 0.364 0.020 0.016
#> SRR650194 2 0.4570 0.00186 0.000 0.600 0.000 0.364 0.020 0.016
#> SRR834560 1 0.0146 0.88230 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834561 1 0.4742 0.80421 0.676 0.000 0.000 0.012 0.240 0.072
#> SRR834562 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.4742 0.80421 0.676 0.000 0.000 0.012 0.240 0.072
#> SRR834564 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.4742 0.80421 0.676 0.000 0.000 0.012 0.240 0.072
#> SRR834566 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0146 0.88230 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834569 1 0.4886 0.76962 0.612 0.000 0.000 0.004 0.312 0.072
#> SRR834570 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.4552 0.78814 0.640 0.000 0.000 0.000 0.300 0.060
#> SRR834574 1 0.0146 0.88230 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834575 1 0.4552 0.78814 0.640 0.000 0.000 0.000 0.300 0.060
#> SRR834576 1 0.0000 0.88278 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.4552 0.78814 0.640 0.000 0.000 0.000 0.300 0.060
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.974 0.990 0.5056 0.495 0.495
#> 3 3 1.000 0.980 0.991 0.2569 0.823 0.658
#> 4 4 0.872 0.858 0.912 0.1787 0.870 0.646
#> 5 5 0.838 0.780 0.831 0.0557 0.920 0.697
#> 6 6 0.824 0.754 0.793 0.0329 0.942 0.734
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
#> SRR650205 2 0.00 0.980 0.000 1.000
#> SRR650134 2 0.00 0.980 0.000 1.000
#> SRR650135 2 0.00 0.980 0.000 1.000
#> SRR650136 2 0.00 0.980 0.000 1.000
#> SRR650137 2 0.00 0.980 0.000 1.000
#> SRR650140 2 0.00 0.980 0.000 1.000
#> SRR650141 2 0.00 0.980 0.000 1.000
#> SRR650144 2 0.00 0.980 0.000 1.000
#> SRR650147 2 0.00 0.980 0.000 1.000
#> SRR650150 2 0.00 0.980 0.000 1.000
#> SRR650153 2 0.00 0.980 0.000 1.000
#> SRR650156 2 0.00 0.980 0.000 1.000
#> SRR650159 2 0.00 0.980 0.000 1.000
#> SRR650162 2 0.00 0.980 0.000 1.000
#> SRR650168 2 0.00 0.980 0.000 1.000
#> SRR650166 2 0.00 0.980 0.000 1.000
#> SRR650167 2 0.00 0.980 0.000 1.000
#> SRR650171 2 0.00 0.980 0.000 1.000
#> SRR650165 2 0.00 0.980 0.000 1.000
#> SRR650176 2 0.00 0.980 0.000 1.000
#> SRR650177 2 0.00 0.980 0.000 1.000
#> SRR650180 2 0.00 0.980 0.000 1.000
#> SRR650179 2 0.00 0.980 0.000 1.000
#> SRR650181 2 0.00 0.980 0.000 1.000
#> SRR650183 2 0.00 0.980 0.000 1.000
#> SRR650184 2 0.26 0.940 0.044 0.956
#> SRR650185 2 0.26 0.940 0.044 0.956
#> SRR650188 2 0.00 0.980 0.000 1.000
#> SRR650191 1 0.00 1.000 1.000 0.000
#> SRR650192 2 0.00 0.980 0.000 1.000
#> SRR650195 2 0.00 0.980 0.000 1.000
#> SRR650198 2 0.00 0.980 0.000 1.000
#> SRR650200 2 0.00 0.980 0.000 1.000
#> SRR650196 2 0.00 0.980 0.000 1.000
#> SRR650197 2 0.00 0.980 0.000 1.000
#> SRR650201 2 0.00 0.980 0.000 1.000
#> SRR650203 2 0.00 0.980 0.000 1.000
#> SRR650204 2 0.00 0.980 0.000 1.000
#> SRR650202 2 0.00 0.980 0.000 1.000
#> SRR650130 2 0.00 0.980 0.000 1.000
#> SRR650131 2 0.00 0.980 0.000 1.000
#> SRR650132 2 0.00 0.980 0.000 1.000
#> SRR650133 2 0.00 0.980 0.000 1.000
#> SRR650138 1 0.00 1.000 1.000 0.000
#> SRR650139 1 0.00 1.000 1.000 0.000
#> SRR650142 1 0.00 1.000 1.000 0.000
#> SRR650143 1 0.00 1.000 1.000 0.000
#> SRR650145 1 0.00 1.000 1.000 0.000
#> SRR650146 1 0.00 1.000 1.000 0.000
#> SRR650148 1 0.00 1.000 1.000 0.000
#> SRR650149 1 0.00 1.000 1.000 0.000
#> SRR650151 1 0.00 1.000 1.000 0.000
#> SRR650152 1 0.00 1.000 1.000 0.000
#> SRR650154 1 0.00 1.000 1.000 0.000
#> SRR650155 1 0.00 1.000 1.000 0.000
#> SRR650157 1 0.00 1.000 1.000 0.000
#> SRR650158 1 0.00 1.000 1.000 0.000
#> SRR650160 2 0.98 0.304 0.416 0.584
#> SRR650161 2 0.98 0.304 0.416 0.584
#> SRR650163 1 0.00 1.000 1.000 0.000
#> SRR650164 1 0.00 1.000 1.000 0.000
#> SRR650169 1 0.00 1.000 1.000 0.000
#> SRR650170 1 0.00 1.000 1.000 0.000
#> SRR650172 1 0.00 1.000 1.000 0.000
#> SRR650173 1 0.00 1.000 1.000 0.000
#> SRR650174 1 0.00 1.000 1.000 0.000
#> SRR650175 1 0.00 1.000 1.000 0.000
#> SRR650178 2 0.00 0.980 0.000 1.000
#> SRR650182 2 0.00 0.980 0.000 1.000
#> SRR650186 1 0.00 1.000 1.000 0.000
#> SRR650187 1 0.00 1.000 1.000 0.000
#> SRR650189 1 0.00 1.000 1.000 0.000
#> SRR650190 1 0.00 1.000 1.000 0.000
#> SRR650193 2 0.00 0.980 0.000 1.000
#> SRR650194 2 0.00 0.980 0.000 1.000
#> SRR834560 1 0.00 1.000 1.000 0.000
#> SRR834561 1 0.00 1.000 1.000 0.000
#> SRR834562 1 0.00 1.000 1.000 0.000
#> SRR834563 1 0.00 1.000 1.000 0.000
#> SRR834564 1 0.00 1.000 1.000 0.000
#> SRR834565 1 0.00 1.000 1.000 0.000
#> SRR834566 1 0.00 1.000 1.000 0.000
#> SRR834567 1 0.00 1.000 1.000 0.000
#> SRR834568 1 0.00 1.000 1.000 0.000
#> SRR834569 1 0.00 1.000 1.000 0.000
#> SRR834570 1 0.00 1.000 1.000 0.000
#> SRR834571 1 0.00 1.000 1.000 0.000
#> SRR834572 1 0.00 1.000 1.000 0.000
#> SRR834573 1 0.00 1.000 1.000 0.000
#> SRR834574 1 0.00 1.000 1.000 0.000
#> SRR834575 1 0.00 1.000 1.000 0.000
#> SRR834576 1 0.00 1.000 1.000 0.000
#> SRR834577 1 0.00 1.000 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.000 1.000 0.0 1.000 0.000
#> SRR650134 2 0.000 1.000 0.0 1.000 0.000
#> SRR650135 2 0.000 1.000 0.0 1.000 0.000
#> SRR650136 2 0.000 1.000 0.0 1.000 0.000
#> SRR650137 2 0.000 1.000 0.0 1.000 0.000
#> SRR650140 2 0.000 1.000 0.0 1.000 0.000
#> SRR650141 2 0.000 1.000 0.0 1.000 0.000
#> SRR650144 2 0.000 1.000 0.0 1.000 0.000
#> SRR650147 2 0.000 1.000 0.0 1.000 0.000
#> SRR650150 2 0.000 1.000 0.0 1.000 0.000
#> SRR650153 2 0.000 1.000 0.0 1.000 0.000
#> SRR650156 2 0.000 1.000 0.0 1.000 0.000
#> SRR650159 2 0.000 1.000 0.0 1.000 0.000
#> SRR650162 2 0.000 1.000 0.0 1.000 0.000
#> SRR650168 2 0.000 1.000 0.0 1.000 0.000
#> SRR650166 2 0.000 1.000 0.0 1.000 0.000
#> SRR650167 2 0.000 1.000 0.0 1.000 0.000
#> SRR650171 2 0.000 1.000 0.0 1.000 0.000
#> SRR650165 2 0.000 1.000 0.0 1.000 0.000
#> SRR650176 2 0.000 1.000 0.0 1.000 0.000
#> SRR650177 2 0.000 1.000 0.0 1.000 0.000
#> SRR650180 2 0.000 1.000 0.0 1.000 0.000
#> SRR650179 2 0.000 1.000 0.0 1.000 0.000
#> SRR650181 2 0.000 1.000 0.0 1.000 0.000
#> SRR650183 2 0.000 1.000 0.0 1.000 0.000
#> SRR650184 3 0.000 1.000 0.0 0.000 1.000
#> SRR650185 3 0.000 1.000 0.0 0.000 1.000
#> SRR650188 2 0.000 1.000 0.0 1.000 0.000
#> SRR650191 3 0.000 1.000 0.0 0.000 1.000
#> SRR650192 2 0.000 1.000 0.0 1.000 0.000
#> SRR650195 2 0.000 1.000 0.0 1.000 0.000
#> SRR650198 2 0.000 1.000 0.0 1.000 0.000
#> SRR650200 2 0.000 1.000 0.0 1.000 0.000
#> SRR650196 2 0.000 1.000 0.0 1.000 0.000
#> SRR650197 2 0.000 1.000 0.0 1.000 0.000
#> SRR650201 2 0.000 1.000 0.0 1.000 0.000
#> SRR650203 2 0.000 1.000 0.0 1.000 0.000
#> SRR650204 2 0.000 1.000 0.0 1.000 0.000
#> SRR650202 2 0.000 1.000 0.0 1.000 0.000
#> SRR650130 2 0.000 1.000 0.0 1.000 0.000
#> SRR650131 2 0.000 1.000 0.0 1.000 0.000
#> SRR650132 2 0.000 1.000 0.0 1.000 0.000
#> SRR650133 2 0.000 1.000 0.0 1.000 0.000
#> SRR650138 3 0.000 1.000 0.0 0.000 1.000
#> SRR650139 3 0.000 1.000 0.0 0.000 1.000
#> SRR650142 3 0.000 1.000 0.0 0.000 1.000
#> SRR650143 3 0.000 1.000 0.0 0.000 1.000
#> SRR650145 3 0.000 1.000 0.0 0.000 1.000
#> SRR650146 3 0.000 1.000 0.0 0.000 1.000
#> SRR650148 3 0.000 1.000 0.0 0.000 1.000
#> SRR650149 3 0.000 1.000 0.0 0.000 1.000
#> SRR650151 3 0.000 1.000 0.0 0.000 1.000
#> SRR650152 3 0.000 1.000 0.0 0.000 1.000
#> SRR650154 3 0.000 1.000 0.0 0.000 1.000
#> SRR650155 3 0.000 1.000 0.0 0.000 1.000
#> SRR650157 3 0.000 1.000 0.0 0.000 1.000
#> SRR650158 3 0.000 1.000 0.0 0.000 1.000
#> SRR650160 1 0.773 0.474 0.6 0.336 0.064
#> SRR650161 1 0.773 0.474 0.6 0.336 0.064
#> SRR650163 3 0.000 1.000 0.0 0.000 1.000
#> SRR650164 3 0.000 1.000 0.0 0.000 1.000
#> SRR650169 3 0.000 1.000 0.0 0.000 1.000
#> SRR650170 3 0.000 1.000 0.0 0.000 1.000
#> SRR650172 3 0.000 1.000 0.0 0.000 1.000
#> SRR650173 3 0.000 1.000 0.0 0.000 1.000
#> SRR650174 3 0.000 1.000 0.0 0.000 1.000
#> SRR650175 3 0.000 1.000 0.0 0.000 1.000
#> SRR650178 2 0.000 1.000 0.0 1.000 0.000
#> SRR650182 2 0.000 1.000 0.0 1.000 0.000
#> SRR650186 3 0.000 1.000 0.0 0.000 1.000
#> SRR650187 3 0.000 1.000 0.0 0.000 1.000
#> SRR650189 3 0.000 1.000 0.0 0.000 1.000
#> SRR650190 3 0.000 1.000 0.0 0.000 1.000
#> SRR650193 2 0.000 1.000 0.0 1.000 0.000
#> SRR650194 2 0.000 1.000 0.0 1.000 0.000
#> SRR834560 1 0.000 0.956 1.0 0.000 0.000
#> SRR834561 1 0.000 0.956 1.0 0.000 0.000
#> SRR834562 1 0.000 0.956 1.0 0.000 0.000
#> SRR834563 1 0.000 0.956 1.0 0.000 0.000
#> SRR834564 1 0.000 0.956 1.0 0.000 0.000
#> SRR834565 1 0.000 0.956 1.0 0.000 0.000
#> SRR834566 1 0.000 0.956 1.0 0.000 0.000
#> SRR834567 1 0.000 0.956 1.0 0.000 0.000
#> SRR834568 1 0.000 0.956 1.0 0.000 0.000
#> SRR834569 1 0.000 0.956 1.0 0.000 0.000
#> SRR834570 1 0.000 0.956 1.0 0.000 0.000
#> SRR834571 1 0.000 0.956 1.0 0.000 0.000
#> SRR834572 1 0.000 0.956 1.0 0.000 0.000
#> SRR834573 1 0.000 0.956 1.0 0.000 0.000
#> SRR834574 1 0.000 0.956 1.0 0.000 0.000
#> SRR834575 1 0.000 0.956 1.0 0.000 0.000
#> SRR834576 1 0.000 0.956 1.0 0.000 0.000
#> SRR834577 1 0.000 0.956 1.0 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.4356 0.8459 0.000 0.292 0.000 0.708
#> SRR650134 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650135 2 0.0707 0.7817 0.000 0.980 0.000 0.020
#> SRR650136 4 0.2345 0.6960 0.000 0.100 0.000 0.900
#> SRR650137 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650140 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650141 4 0.4356 0.8459 0.000 0.292 0.000 0.708
#> SRR650144 4 0.1302 0.7517 0.000 0.044 0.000 0.956
#> SRR650147 4 0.4356 0.8459 0.000 0.292 0.000 0.708
#> SRR650150 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650153 2 0.4103 0.3583 0.000 0.744 0.000 0.256
#> SRR650156 2 0.0707 0.7817 0.000 0.980 0.000 0.020
#> SRR650159 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650162 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650168 4 0.3688 0.8365 0.000 0.208 0.000 0.792
#> SRR650166 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650167 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650171 4 0.1474 0.7492 0.000 0.052 0.000 0.948
#> SRR650165 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650176 4 0.1118 0.7551 0.000 0.036 0.000 0.964
#> SRR650177 4 0.1118 0.7551 0.000 0.036 0.000 0.964
#> SRR650180 4 0.3688 0.8365 0.000 0.208 0.000 0.792
#> SRR650179 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650181 2 0.2704 0.6564 0.000 0.876 0.000 0.124
#> SRR650183 4 0.4331 0.8459 0.000 0.288 0.000 0.712
#> SRR650184 4 0.5021 0.8206 0.000 0.240 0.036 0.724
#> SRR650185 4 0.5021 0.8206 0.000 0.240 0.036 0.724
#> SRR650188 2 0.0336 0.7900 0.000 0.992 0.000 0.008
#> SRR650191 3 0.0592 0.9867 0.000 0.000 0.984 0.016
#> SRR650192 4 0.4356 0.8459 0.000 0.292 0.000 0.708
#> SRR650195 4 0.4304 0.8446 0.000 0.284 0.000 0.716
#> SRR650198 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650200 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650196 2 0.0188 0.7955 0.000 0.996 0.000 0.004
#> SRR650197 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650201 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650203 2 0.3400 0.5449 0.000 0.820 0.000 0.180
#> SRR650204 2 0.4072 0.7958 0.000 0.748 0.000 0.252
#> SRR650202 4 0.4356 0.8459 0.000 0.292 0.000 0.708
#> SRR650130 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650131 4 0.4356 0.8459 0.000 0.292 0.000 0.708
#> SRR650132 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650133 4 0.4331 0.8459 0.000 0.288 0.000 0.712
#> SRR650138 3 0.0817 0.9812 0.000 0.000 0.976 0.024
#> SRR650139 3 0.0817 0.9812 0.000 0.000 0.976 0.024
#> SRR650142 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650145 3 0.0817 0.9812 0.000 0.000 0.976 0.024
#> SRR650146 3 0.0817 0.9812 0.000 0.000 0.976 0.024
#> SRR650148 3 0.0469 0.9902 0.000 0.000 0.988 0.012
#> SRR650149 3 0.0469 0.9902 0.000 0.000 0.988 0.012
#> SRR650151 3 0.0336 0.9912 0.000 0.000 0.992 0.008
#> SRR650152 3 0.0336 0.9912 0.000 0.000 0.992 0.008
#> SRR650154 3 0.0817 0.9812 0.000 0.000 0.976 0.024
#> SRR650155 3 0.0817 0.9812 0.000 0.000 0.976 0.024
#> SRR650157 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650160 1 0.6626 0.0744 0.496 0.444 0.032 0.028
#> SRR650161 1 0.6626 0.0744 0.496 0.444 0.032 0.028
#> SRR650163 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650169 3 0.0469 0.9902 0.000 0.000 0.988 0.012
#> SRR650170 3 0.0469 0.9902 0.000 0.000 0.988 0.012
#> SRR650172 3 0.0336 0.9912 0.000 0.000 0.992 0.008
#> SRR650173 3 0.0336 0.9912 0.000 0.000 0.992 0.008
#> SRR650174 3 0.0469 0.9902 0.000 0.000 0.988 0.012
#> SRR650175 3 0.0469 0.9902 0.000 0.000 0.988 0.012
#> SRR650178 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.9912 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0336 0.9912 0.000 0.000 0.992 0.008
#> SRR650190 3 0.0336 0.9912 0.000 0.000 0.992 0.008
#> SRR650193 4 0.1557 0.7467 0.000 0.056 0.000 0.944
#> SRR650194 4 0.1557 0.7467 0.000 0.056 0.000 0.944
#> SRR834560 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9433 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.9433 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
#> SRR650205 4 0.1300 0.8502 0.000 0.028 0.000 0.956 0.016
#> SRR650134 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650135 2 0.4774 0.9081 0.000 0.612 0.000 0.028 0.360
#> SRR650136 5 0.5467 0.0336 0.000 0.064 0.000 0.412 0.524
#> SRR650137 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650140 5 0.0290 0.7280 0.000 0.008 0.000 0.000 0.992
#> SRR650141 4 0.1300 0.8502 0.000 0.028 0.000 0.956 0.016
#> SRR650144 4 0.5386 0.2891 0.000 0.060 0.000 0.544 0.396
#> SRR650147 4 0.1493 0.8465 0.000 0.028 0.000 0.948 0.024
#> SRR650150 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650153 2 0.5342 0.8509 0.000 0.612 0.000 0.076 0.312
#> SRR650156 2 0.4774 0.9081 0.000 0.612 0.000 0.028 0.360
#> SRR650159 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650162 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650168 4 0.0404 0.8429 0.000 0.000 0.000 0.988 0.012
#> SRR650166 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650167 2 0.4663 0.9101 0.000 0.604 0.000 0.020 0.376
#> SRR650171 5 0.4449 -0.0847 0.000 0.004 0.000 0.484 0.512
#> SRR650165 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650176 4 0.4367 0.2786 0.000 0.004 0.000 0.580 0.416
#> SRR650177 4 0.4367 0.2786 0.000 0.004 0.000 0.580 0.416
#> SRR650180 4 0.0865 0.8455 0.000 0.004 0.000 0.972 0.024
#> SRR650179 5 0.0880 0.6960 0.000 0.032 0.000 0.000 0.968
#> SRR650181 2 0.4774 0.9081 0.000 0.612 0.000 0.028 0.360
#> SRR650183 2 0.4702 0.0120 0.000 0.552 0.000 0.432 0.016
#> SRR650184 4 0.2260 0.8146 0.000 0.064 0.028 0.908 0.000
#> SRR650185 4 0.2260 0.8146 0.000 0.064 0.028 0.908 0.000
#> SRR650188 2 0.4709 0.9096 0.000 0.612 0.000 0.024 0.364
#> SRR650191 3 0.4182 0.4482 0.000 0.004 0.644 0.352 0.000
#> SRR650192 4 0.0898 0.8509 0.000 0.008 0.000 0.972 0.020
#> SRR650195 4 0.1478 0.8275 0.000 0.064 0.000 0.936 0.000
#> SRR650198 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650200 2 0.4663 0.9101 0.000 0.604 0.000 0.020 0.376
#> SRR650196 2 0.4675 0.9058 0.000 0.600 0.000 0.020 0.380
#> SRR650197 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650201 2 0.4651 0.9104 0.000 0.608 0.000 0.020 0.372
#> SRR650203 2 0.6093 0.6907 0.000 0.568 0.000 0.192 0.240
#> SRR650204 5 0.0000 0.7364 0.000 0.000 0.000 0.000 1.000
#> SRR650202 4 0.1493 0.8486 0.000 0.028 0.000 0.948 0.024
#> SRR650130 2 0.4663 0.9101 0.000 0.604 0.000 0.020 0.376
#> SRR650131 4 0.1725 0.8423 0.000 0.044 0.000 0.936 0.020
#> SRR650132 2 0.4663 0.9092 0.000 0.604 0.000 0.020 0.376
#> SRR650133 4 0.0955 0.8482 0.000 0.028 0.000 0.968 0.004
#> SRR650138 3 0.3210 0.8051 0.000 0.212 0.788 0.000 0.000
#> SRR650139 3 0.3210 0.8051 0.000 0.212 0.788 0.000 0.000
#> SRR650142 3 0.0000 0.8974 0.000 0.000 1.000 0.000 0.000
#> SRR650143 3 0.0000 0.8974 0.000 0.000 1.000 0.000 0.000
#> SRR650145 3 0.3210 0.8051 0.000 0.212 0.788 0.000 0.000
#> SRR650146 3 0.3210 0.8051 0.000 0.212 0.788 0.000 0.000
#> SRR650148 3 0.2127 0.8983 0.000 0.108 0.892 0.000 0.000
#> SRR650149 3 0.2127 0.8983 0.000 0.108 0.892 0.000 0.000
#> SRR650151 3 0.2179 0.8988 0.000 0.112 0.888 0.000 0.000
#> SRR650152 3 0.2179 0.8988 0.000 0.112 0.888 0.000 0.000
#> SRR650154 3 0.3210 0.8082 0.000 0.212 0.788 0.000 0.000
#> SRR650155 3 0.3210 0.8082 0.000 0.212 0.788 0.000 0.000
#> SRR650157 3 0.0162 0.8971 0.000 0.004 0.996 0.000 0.000
#> SRR650158 3 0.0162 0.8971 0.000 0.004 0.996 0.000 0.000
#> SRR650160 1 0.7617 -0.0457 0.388 0.152 0.068 0.004 0.388
#> SRR650161 5 0.7617 -0.0657 0.388 0.152 0.068 0.004 0.388
#> SRR650163 3 0.0162 0.8971 0.000 0.004 0.996 0.000 0.000
#> SRR650164 3 0.0162 0.8971 0.000 0.004 0.996 0.000 0.000
#> SRR650169 3 0.2127 0.8983 0.000 0.108 0.892 0.000 0.000
#> SRR650170 3 0.2127 0.8983 0.000 0.108 0.892 0.000 0.000
#> SRR650172 3 0.2074 0.8990 0.000 0.104 0.896 0.000 0.000
#> SRR650173 3 0.2074 0.8990 0.000 0.104 0.896 0.000 0.000
#> SRR650174 3 0.2127 0.8983 0.000 0.108 0.892 0.000 0.000
#> SRR650175 3 0.2127 0.8983 0.000 0.108 0.892 0.000 0.000
#> SRR650178 2 0.4663 0.9101 0.000 0.604 0.000 0.020 0.376
#> SRR650182 2 0.4663 0.9101 0.000 0.604 0.000 0.020 0.376
#> SRR650186 3 0.0162 0.8971 0.000 0.004 0.996 0.000 0.000
#> SRR650187 3 0.0162 0.8971 0.000 0.004 0.996 0.000 0.000
#> SRR650189 3 0.2074 0.8990 0.000 0.104 0.896 0.000 0.000
#> SRR650190 3 0.2074 0.8990 0.000 0.104 0.896 0.000 0.000
#> SRR650193 5 0.4302 -0.0666 0.000 0.000 0.000 0.480 0.520
#> SRR650194 5 0.4302 -0.0666 0.000 0.000 0.000 0.480 0.520
#> SRR834560 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9682 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.9682 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
#> SRR650205 4 0.0935 0.742 0.000 0.032 0.000 0.964 0.004 0.000
#> SRR650134 5 0.3464 0.717 0.000 0.312 0.000 0.000 0.688 0.000
#> SRR650135 2 0.0260 0.892 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650136 5 0.6338 -0.027 0.000 0.096 0.000 0.168 0.576 0.160
#> SRR650137 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650140 5 0.3912 0.690 0.000 0.340 0.000 0.000 0.648 0.012
#> SRR650141 4 0.0935 0.742 0.000 0.032 0.000 0.964 0.004 0.000
#> SRR650144 5 0.6279 -0.221 0.000 0.048 0.000 0.260 0.532 0.160
#> SRR650147 4 0.1082 0.740 0.000 0.040 0.000 0.956 0.004 0.000
#> SRR650150 5 0.3528 0.726 0.000 0.296 0.000 0.004 0.700 0.000
#> SRR650153 2 0.0891 0.871 0.000 0.968 0.000 0.024 0.008 0.000
#> SRR650156 2 0.0260 0.892 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650159 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650162 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650168 4 0.0508 0.737 0.000 0.004 0.000 0.984 0.012 0.000
#> SRR650166 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650167 2 0.0713 0.899 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR650171 5 0.4834 -0.306 0.000 0.004 0.000 0.468 0.484 0.044
#> SRR650165 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650176 4 0.4666 0.354 0.000 0.000 0.000 0.536 0.420 0.044
#> SRR650177 4 0.4666 0.354 0.000 0.000 0.000 0.536 0.420 0.044
#> SRR650180 4 0.2488 0.716 0.000 0.000 0.000 0.880 0.076 0.044
#> SRR650179 5 0.3992 0.660 0.000 0.364 0.000 0.000 0.624 0.012
#> SRR650181 2 0.0260 0.892 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650183 2 0.7086 0.110 0.000 0.460 0.000 0.164 0.236 0.140
#> SRR650184 4 0.6665 0.482 0.000 0.024 0.016 0.472 0.276 0.212
#> SRR650185 4 0.6665 0.482 0.000 0.024 0.016 0.472 0.276 0.212
#> SRR650188 2 0.0146 0.894 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650191 3 0.5283 0.441 0.000 0.000 0.648 0.168 0.016 0.168
#> SRR650192 4 0.1176 0.742 0.000 0.024 0.000 0.956 0.020 0.000
#> SRR650195 4 0.6446 0.493 0.000 0.036 0.000 0.480 0.272 0.212
#> SRR650198 5 0.3390 0.727 0.000 0.296 0.000 0.000 0.704 0.000
#> SRR650200 2 0.0713 0.899 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR650196 2 0.0865 0.892 0.000 0.964 0.000 0.000 0.036 0.000
#> SRR650197 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650201 2 0.0713 0.899 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR650203 2 0.3834 0.607 0.000 0.732 0.000 0.232 0.036 0.000
#> SRR650204 5 0.3409 0.728 0.000 0.300 0.000 0.000 0.700 0.000
#> SRR650202 4 0.1196 0.741 0.000 0.040 0.000 0.952 0.008 0.000
#> SRR650130 2 0.0632 0.899 0.000 0.976 0.000 0.000 0.024 0.000
#> SRR650131 4 0.1367 0.740 0.000 0.044 0.000 0.944 0.012 0.000
#> SRR650132 2 0.0865 0.894 0.000 0.964 0.000 0.000 0.036 0.000
#> SRR650133 4 0.1536 0.731 0.000 0.020 0.000 0.944 0.012 0.024
#> SRR650138 6 0.3620 0.934 0.000 0.000 0.352 0.000 0.000 0.648
#> SRR650139 6 0.3620 0.934 0.000 0.000 0.352 0.000 0.000 0.648
#> SRR650142 3 0.2191 0.805 0.000 0.000 0.876 0.000 0.004 0.120
#> SRR650143 3 0.2191 0.805 0.000 0.000 0.876 0.000 0.004 0.120
#> SRR650145 6 0.3620 0.934 0.000 0.000 0.352 0.000 0.000 0.648
#> SRR650146 6 0.3620 0.934 0.000 0.000 0.352 0.000 0.000 0.648
#> SRR650148 3 0.1643 0.810 0.000 0.000 0.924 0.000 0.008 0.068
#> SRR650149 3 0.1643 0.810 0.000 0.000 0.924 0.000 0.008 0.068
#> SRR650151 3 0.2070 0.783 0.000 0.000 0.892 0.000 0.008 0.100
#> SRR650152 3 0.2070 0.783 0.000 0.000 0.892 0.000 0.008 0.100
#> SRR650154 6 0.3756 0.868 0.000 0.004 0.316 0.000 0.004 0.676
#> SRR650155 6 0.3756 0.868 0.000 0.004 0.316 0.000 0.004 0.676
#> SRR650157 3 0.2278 0.799 0.000 0.000 0.868 0.000 0.004 0.128
#> SRR650158 3 0.2278 0.799 0.000 0.000 0.868 0.000 0.004 0.128
#> SRR650160 5 0.8341 0.156 0.320 0.072 0.156 0.028 0.356 0.068
#> SRR650161 5 0.8341 0.156 0.320 0.072 0.156 0.028 0.356 0.068
#> SRR650163 3 0.2234 0.802 0.000 0.000 0.872 0.000 0.004 0.124
#> SRR650164 3 0.2234 0.802 0.000 0.000 0.872 0.000 0.004 0.124
#> SRR650169 3 0.1049 0.835 0.000 0.000 0.960 0.000 0.008 0.032
#> SRR650170 3 0.1049 0.835 0.000 0.000 0.960 0.000 0.008 0.032
#> SRR650172 3 0.0291 0.842 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR650173 3 0.0291 0.842 0.000 0.000 0.992 0.000 0.004 0.004
#> SRR650174 3 0.1643 0.810 0.000 0.000 0.924 0.000 0.008 0.068
#> SRR650175 3 0.1643 0.810 0.000 0.000 0.924 0.000 0.008 0.068
#> SRR650178 2 0.0713 0.899 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR650182 2 0.0713 0.899 0.000 0.972 0.000 0.000 0.028 0.000
#> SRR650186 3 0.2234 0.802 0.000 0.000 0.872 0.000 0.004 0.124
#> SRR650187 3 0.2234 0.802 0.000 0.000 0.872 0.000 0.004 0.124
#> SRR650189 3 0.0000 0.842 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650190 3 0.0000 0.842 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650193 4 0.4300 0.253 0.000 0.004 0.000 0.528 0.456 0.012
#> SRR650194 4 0.4300 0.253 0.000 0.004 0.000 0.528 0.456 0.012
#> SRR834560 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR834562 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR834564 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR834570 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR834574 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR834576 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0146 0.998 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["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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.540 0.873 0.927 0.3508 0.684 0.684
#> 3 3 1.000 0.954 0.984 0.7910 0.688 0.544
#> 4 4 0.695 0.583 0.771 0.1655 0.876 0.679
#> 5 5 0.837 0.804 0.887 0.0891 0.810 0.431
#> 6 6 0.787 0.655 0.774 0.0323 0.909 0.602
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
#> SRR650205 2 0.0000 0.911 0.000 1.000
#> SRR650134 2 0.0000 0.911 0.000 1.000
#> SRR650135 2 0.0000 0.911 0.000 1.000
#> SRR650136 2 0.0000 0.911 0.000 1.000
#> SRR650137 2 0.0000 0.911 0.000 1.000
#> SRR650140 2 0.0000 0.911 0.000 1.000
#> SRR650141 2 0.0000 0.911 0.000 1.000
#> SRR650144 2 0.0000 0.911 0.000 1.000
#> SRR650147 2 0.0000 0.911 0.000 1.000
#> SRR650150 2 0.0000 0.911 0.000 1.000
#> SRR650153 2 0.0000 0.911 0.000 1.000
#> SRR650156 2 0.0000 0.911 0.000 1.000
#> SRR650159 2 0.0000 0.911 0.000 1.000
#> SRR650162 2 0.0000 0.911 0.000 1.000
#> SRR650168 2 0.0000 0.911 0.000 1.000
#> SRR650166 2 0.0000 0.911 0.000 1.000
#> SRR650167 2 0.0000 0.911 0.000 1.000
#> SRR650171 2 0.0000 0.911 0.000 1.000
#> SRR650165 2 0.0000 0.911 0.000 1.000
#> SRR650176 2 0.0000 0.911 0.000 1.000
#> SRR650177 2 0.0000 0.911 0.000 1.000
#> SRR650180 2 0.0000 0.911 0.000 1.000
#> SRR650179 2 0.0000 0.911 0.000 1.000
#> SRR650181 2 0.0000 0.911 0.000 1.000
#> SRR650183 2 0.0000 0.911 0.000 1.000
#> SRR650184 2 0.5629 0.863 0.132 0.868
#> SRR650185 2 0.5629 0.863 0.132 0.868
#> SRR650188 2 0.0000 0.911 0.000 1.000
#> SRR650191 2 0.6801 0.839 0.180 0.820
#> SRR650192 2 0.0000 0.911 0.000 1.000
#> SRR650195 2 0.0000 0.911 0.000 1.000
#> SRR650198 2 0.0000 0.911 0.000 1.000
#> SRR650200 2 0.0000 0.911 0.000 1.000
#> SRR650196 2 0.0000 0.911 0.000 1.000
#> SRR650197 2 0.0000 0.911 0.000 1.000
#> SRR650201 2 0.0000 0.911 0.000 1.000
#> SRR650203 2 0.0000 0.911 0.000 1.000
#> SRR650204 2 0.0000 0.911 0.000 1.000
#> SRR650202 2 0.0000 0.911 0.000 1.000
#> SRR650130 2 0.0000 0.911 0.000 1.000
#> SRR650131 2 0.0000 0.911 0.000 1.000
#> SRR650132 2 0.0000 0.911 0.000 1.000
#> SRR650133 2 0.0000 0.911 0.000 1.000
#> SRR650138 2 0.8081 0.779 0.248 0.752
#> SRR650139 2 0.8081 0.779 0.248 0.752
#> SRR650142 2 0.8081 0.779 0.248 0.752
#> SRR650143 2 0.8081 0.779 0.248 0.752
#> SRR650145 2 0.8081 0.779 0.248 0.752
#> SRR650146 2 0.8081 0.779 0.248 0.752
#> SRR650148 2 0.6712 0.842 0.176 0.824
#> SRR650149 2 0.6712 0.842 0.176 0.824
#> SRR650151 2 0.6712 0.842 0.176 0.824
#> SRR650152 2 0.6712 0.842 0.176 0.824
#> SRR650154 2 0.6623 0.844 0.172 0.828
#> SRR650155 2 0.6623 0.844 0.172 0.828
#> SRR650157 2 0.8081 0.779 0.248 0.752
#> SRR650158 2 0.8081 0.779 0.248 0.752
#> SRR650160 2 0.0000 0.911 0.000 1.000
#> SRR650161 2 0.0000 0.911 0.000 1.000
#> SRR650163 2 0.8081 0.779 0.248 0.752
#> SRR650164 2 0.8081 0.779 0.248 0.752
#> SRR650169 2 0.6712 0.842 0.176 0.824
#> SRR650170 2 0.6712 0.842 0.176 0.824
#> SRR650172 2 0.6712 0.842 0.176 0.824
#> SRR650173 2 0.6712 0.842 0.176 0.824
#> SRR650174 2 0.6712 0.842 0.176 0.824
#> SRR650175 2 0.6712 0.842 0.176 0.824
#> SRR650178 2 0.0000 0.911 0.000 1.000
#> SRR650182 2 0.0000 0.911 0.000 1.000
#> SRR650186 2 0.8081 0.779 0.248 0.752
#> SRR650187 2 0.8081 0.779 0.248 0.752
#> SRR650189 2 0.6712 0.842 0.176 0.824
#> SRR650190 2 0.6712 0.842 0.176 0.824
#> SRR650193 2 0.0000 0.911 0.000 1.000
#> SRR650194 2 0.0000 0.911 0.000 1.000
#> SRR834560 1 0.0376 0.932 0.996 0.004
#> SRR834561 1 0.3114 0.894 0.944 0.056
#> SRR834562 1 0.0000 0.935 1.000 0.000
#> SRR834563 1 0.6247 0.799 0.844 0.156
#> SRR834564 1 0.0000 0.935 1.000 0.000
#> SRR834565 1 0.6623 0.780 0.828 0.172
#> SRR834566 1 0.0000 0.935 1.000 0.000
#> SRR834567 1 0.0000 0.935 1.000 0.000
#> SRR834568 1 0.0000 0.935 1.000 0.000
#> SRR834569 1 0.9710 0.158 0.600 0.400
#> SRR834570 1 0.0000 0.935 1.000 0.000
#> SRR834571 1 0.0000 0.935 1.000 0.000
#> SRR834572 1 0.0000 0.935 1.000 0.000
#> SRR834573 1 0.0000 0.935 1.000 0.000
#> SRR834574 1 0.0000 0.935 1.000 0.000
#> SRR834575 1 0.0000 0.935 1.000 0.000
#> SRR834576 1 0.0000 0.935 1.000 0.000
#> SRR834577 1 0.6148 0.768 0.848 0.152
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650134 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650135 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650136 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650137 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650140 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650141 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650144 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650147 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650150 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650153 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650156 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650159 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650162 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650168 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650166 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650167 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650171 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650165 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650176 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650177 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650180 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650179 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650181 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650183 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650184 3 0.3619 0.818 0.0 0.136 0.864
#> SRR650185 3 0.3619 0.818 0.0 0.136 0.864
#> SRR650188 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650191 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650192 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650195 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650198 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650200 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650196 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650197 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650201 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650203 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650204 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650202 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650130 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650131 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650132 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650133 2 0.0424 0.971 0.0 0.992 0.008
#> SRR650138 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650139 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650142 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650143 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650145 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650146 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650148 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650149 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650151 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650152 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650154 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650155 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650157 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650158 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650160 2 0.6140 0.315 0.0 0.596 0.404
#> SRR650161 2 0.6260 0.182 0.0 0.552 0.448
#> SRR650163 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650164 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650169 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650170 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650172 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650173 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650174 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650175 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650178 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650182 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650186 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650187 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650189 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650190 3 0.0000 0.987 0.0 0.000 1.000
#> SRR650193 2 0.0000 0.979 0.0 1.000 0.000
#> SRR650194 2 0.0000 0.979 0.0 1.000 0.000
#> SRR834560 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834561 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834562 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834563 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834564 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834565 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834566 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834567 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834568 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834569 1 0.6126 0.312 0.6 0.000 0.400
#> SRR834570 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834571 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834572 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834573 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834574 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834575 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834576 1 0.0000 0.976 1.0 0.000 0.000
#> SRR834577 1 0.0000 0.976 1.0 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650134 2 0.4998 -0.4172 0.000 0.512 0.000 0.488
#> SRR650135 2 0.0000 0.5439 0.000 1.000 0.000 0.000
#> SRR650136 2 0.4250 0.3177 0.000 0.724 0.000 0.276
#> SRR650137 2 0.4999 -0.4280 0.000 0.508 0.000 0.492
#> SRR650140 2 0.4761 -0.0644 0.000 0.628 0.000 0.372
#> SRR650141 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650144 2 0.0592 0.5366 0.000 0.984 0.000 0.016
#> SRR650147 2 0.0188 0.5424 0.000 0.996 0.000 0.004
#> SRR650150 4 0.4679 0.7867 0.000 0.352 0.000 0.648
#> SRR650153 2 0.0000 0.5439 0.000 1.000 0.000 0.000
#> SRR650156 2 0.0000 0.5439 0.000 1.000 0.000 0.000
#> SRR650159 4 0.4679 0.7867 0.000 0.352 0.000 0.648
#> SRR650162 4 0.4948 0.5996 0.000 0.440 0.000 0.560
#> SRR650168 4 0.4998 0.6722 0.000 0.488 0.000 0.512
#> SRR650166 4 0.4697 0.7826 0.000 0.356 0.000 0.644
#> SRR650167 2 0.2647 0.4920 0.000 0.880 0.000 0.120
#> SRR650171 4 0.4981 0.7286 0.000 0.464 0.000 0.536
#> SRR650165 4 0.4941 0.6176 0.000 0.436 0.000 0.564
#> SRR650176 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650177 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650180 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650179 2 0.4761 -0.0644 0.000 0.628 0.000 0.372
#> SRR650181 2 0.0000 0.5439 0.000 1.000 0.000 0.000
#> SRR650183 2 0.0336 0.5402 0.000 0.992 0.000 0.008
#> SRR650184 3 0.5296 0.0352 0.000 0.492 0.500 0.008
#> SRR650185 3 0.5296 0.0352 0.000 0.492 0.500 0.008
#> SRR650188 2 0.0000 0.5439 0.000 1.000 0.000 0.000
#> SRR650191 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650192 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650195 2 0.0927 0.5347 0.000 0.976 0.016 0.008
#> SRR650198 4 0.4679 0.7867 0.000 0.352 0.000 0.648
#> SRR650200 2 0.2647 0.4920 0.000 0.880 0.000 0.120
#> SRR650196 2 0.3172 0.4478 0.000 0.840 0.000 0.160
#> SRR650197 2 0.4999 -0.4280 0.000 0.508 0.000 0.492
#> SRR650201 2 0.2647 0.4916 0.000 0.880 0.000 0.120
#> SRR650203 2 0.4999 -0.4282 0.000 0.508 0.000 0.492
#> SRR650204 4 0.4679 0.7867 0.000 0.352 0.000 0.648
#> SRR650202 2 0.4304 0.1754 0.000 0.716 0.000 0.284
#> SRR650130 2 0.2647 0.4920 0.000 0.880 0.000 0.120
#> SRR650131 4 0.4981 0.7286 0.000 0.464 0.000 0.536
#> SRR650132 2 0.4356 0.1717 0.000 0.708 0.000 0.292
#> SRR650133 2 0.6147 0.2931 0.000 0.672 0.200 0.128
#> SRR650138 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650139 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650142 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650143 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650145 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650146 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650148 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650154 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650155 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650157 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650158 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650160 3 0.7043 0.1187 0.000 0.128 0.504 0.368
#> SRR650161 3 0.7043 0.1187 0.000 0.128 0.504 0.368
#> SRR650163 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650164 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650169 3 0.1302 0.7831 0.000 0.000 0.956 0.044
#> SRR650170 3 0.1118 0.7834 0.000 0.000 0.964 0.036
#> SRR650172 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650178 2 0.7507 0.0839 0.000 0.480 0.204 0.316
#> SRR650182 2 0.6915 0.2475 0.000 0.592 0.196 0.212
#> SRR650186 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650187 3 0.4643 0.7583 0.000 0.000 0.656 0.344
#> SRR650189 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.7833 0.000 0.000 1.000 0.000
#> SRR650193 4 0.4981 0.7286 0.000 0.464 0.000 0.536
#> SRR650194 4 0.4981 0.7286 0.000 0.464 0.000 0.536
#> SRR834560 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834569 1 0.6443 0.0661 0.528 0.000 0.400 0.072
#> SRR834570 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9700 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.9700 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
#> SRR650205 4 0.4074 0.782 0.0 0.364 0.000 0.636 0.000
#> SRR650134 2 0.3661 0.756 0.0 0.724 0.000 0.276 0.000
#> SRR650135 2 0.4305 0.776 0.0 0.512 0.000 0.488 0.000
#> SRR650136 2 0.3177 0.598 0.0 0.792 0.000 0.208 0.000
#> SRR650137 2 0.3561 0.748 0.0 0.740 0.000 0.260 0.000
#> SRR650140 2 0.4088 0.782 0.0 0.632 0.000 0.368 0.000
#> SRR650141 4 0.4074 0.782 0.0 0.364 0.000 0.636 0.000
#> SRR650144 4 0.1341 0.565 0.0 0.056 0.000 0.944 0.000
#> SRR650147 4 0.0963 0.423 0.0 0.036 0.000 0.964 0.000
#> SRR650150 2 0.0609 0.491 0.0 0.980 0.000 0.020 0.000
#> SRR650153 2 0.4305 0.776 0.0 0.512 0.000 0.488 0.000
#> SRR650156 2 0.4305 0.776 0.0 0.512 0.000 0.488 0.000
#> SRR650159 2 0.0000 0.523 0.0 1.000 0.000 0.000 0.000
#> SRR650162 2 0.1341 0.581 0.0 0.944 0.000 0.056 0.000
#> SRR650168 4 0.4278 0.750 0.0 0.452 0.000 0.548 0.000
#> SRR650166 2 0.0162 0.529 0.0 0.996 0.000 0.004 0.000
#> SRR650167 2 0.4287 0.787 0.0 0.540 0.000 0.460 0.000
#> SRR650171 4 0.4287 0.745 0.0 0.460 0.000 0.540 0.000
#> SRR650165 2 0.2471 0.670 0.0 0.864 0.000 0.136 0.000
#> SRR650176 4 0.4088 0.783 0.0 0.368 0.000 0.632 0.000
#> SRR650177 4 0.4088 0.783 0.0 0.368 0.000 0.632 0.000
#> SRR650180 4 0.4088 0.783 0.0 0.368 0.000 0.632 0.000
#> SRR650179 2 0.4088 0.782 0.0 0.632 0.000 0.368 0.000
#> SRR650181 2 0.4305 0.776 0.0 0.512 0.000 0.488 0.000
#> SRR650183 4 0.0000 0.488 0.0 0.000 0.000 1.000 0.000
#> SRR650184 4 0.3636 0.549 0.0 0.000 0.272 0.728 0.000
#> SRR650185 4 0.3636 0.549 0.0 0.000 0.272 0.728 0.000
#> SRR650188 2 0.4305 0.776 0.0 0.512 0.000 0.488 0.000
#> SRR650191 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650192 4 0.4088 0.783 0.0 0.368 0.000 0.632 0.000
#> SRR650195 4 0.3143 0.594 0.0 0.000 0.204 0.796 0.000
#> SRR650198 2 0.0290 0.512 0.0 0.992 0.000 0.008 0.000
#> SRR650200 2 0.4287 0.787 0.0 0.540 0.000 0.460 0.000
#> SRR650196 2 0.4262 0.792 0.0 0.560 0.000 0.440 0.000
#> SRR650197 2 0.3561 0.748 0.0 0.740 0.000 0.260 0.000
#> SRR650201 2 0.4291 0.786 0.0 0.536 0.000 0.464 0.000
#> SRR650203 4 0.3177 0.540 0.0 0.208 0.000 0.792 0.000
#> SRR650204 2 0.1341 0.592 0.0 0.944 0.000 0.056 0.000
#> SRR650202 4 0.4088 0.783 0.0 0.368 0.000 0.632 0.000
#> SRR650130 2 0.4287 0.787 0.0 0.540 0.000 0.460 0.000
#> SRR650131 4 0.4287 0.745 0.0 0.460 0.000 0.540 0.000
#> SRR650132 2 0.4182 0.791 0.0 0.600 0.000 0.400 0.000
#> SRR650133 4 0.2470 0.599 0.0 0.104 0.012 0.884 0.000
#> SRR650138 5 0.0000 0.907 0.0 0.000 0.000 0.000 1.000
#> SRR650139 5 0.0000 0.907 0.0 0.000 0.000 0.000 1.000
#> SRR650142 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650143 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650145 5 0.0000 0.907 0.0 0.000 0.000 0.000 1.000
#> SRR650146 5 0.0000 0.907 0.0 0.000 0.000 0.000 1.000
#> SRR650148 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650149 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650151 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650152 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650154 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650155 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650157 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650158 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650160 3 0.1851 0.856 0.0 0.088 0.912 0.000 0.000
#> SRR650161 3 0.1851 0.856 0.0 0.088 0.912 0.000 0.000
#> SRR650163 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650164 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650169 3 0.4227 0.263 0.0 0.000 0.580 0.000 0.420
#> SRR650170 3 0.4088 0.405 0.0 0.000 0.632 0.000 0.368
#> SRR650172 3 0.0404 0.915 0.0 0.000 0.988 0.000 0.012
#> SRR650173 3 0.0404 0.915 0.0 0.000 0.988 0.000 0.012
#> SRR650174 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650175 3 0.0000 0.919 0.0 0.000 1.000 0.000 0.000
#> SRR650178 2 0.4537 0.790 0.0 0.592 0.012 0.396 0.000
#> SRR650182 2 0.4617 0.791 0.0 0.552 0.012 0.436 0.000
#> SRR650186 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650187 5 0.1544 0.937 0.0 0.000 0.068 0.000 0.932
#> SRR650189 3 0.1851 0.853 0.0 0.000 0.912 0.000 0.088
#> SRR650190 3 0.0404 0.915 0.0 0.000 0.988 0.000 0.012
#> SRR650193 4 0.4287 0.745 0.0 0.460 0.000 0.540 0.000
#> SRR650194 4 0.4287 0.745 0.0 0.460 0.000 0.540 0.000
#> SRR834560 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834569 5 0.5499 0.340 0.4 0.000 0.068 0.000 0.532
#> SRR834570 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.0 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1.0 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
#> SRR650205 4 0.5157 -0.5134 0.000 0.088 0.000 0.508 0.404 0.000
#> SRR650134 2 0.0458 0.7281 0.000 0.984 0.000 0.016 0.000 0.000
#> SRR650135 4 0.3659 0.4542 0.000 0.364 0.000 0.636 0.000 0.000
#> SRR650136 4 0.4953 0.3652 0.000 0.268 0.000 0.624 0.108 0.000
#> SRR650137 2 0.0146 0.7336 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650140 2 0.2300 0.6254 0.000 0.856 0.000 0.144 0.000 0.000
#> SRR650141 4 0.5157 -0.5134 0.000 0.088 0.000 0.508 0.404 0.000
#> SRR650144 4 0.2586 0.4014 0.000 0.032 0.000 0.868 0.100 0.000
#> SRR650147 4 0.4764 0.1912 0.000 0.108 0.000 0.660 0.232 0.000
#> SRR650150 2 0.2838 0.6517 0.000 0.808 0.000 0.004 0.188 0.000
#> SRR650153 4 0.3659 0.4542 0.000 0.364 0.000 0.636 0.000 0.000
#> SRR650156 4 0.3659 0.4542 0.000 0.364 0.000 0.636 0.000 0.000
#> SRR650159 2 0.1910 0.7111 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR650162 2 0.2954 0.7184 0.000 0.844 0.000 0.048 0.108 0.000
#> SRR650168 5 0.4705 0.9523 0.000 0.088 0.000 0.260 0.652 0.000
#> SRR650166 2 0.1910 0.7111 0.000 0.892 0.000 0.000 0.108 0.000
#> SRR650167 4 0.3672 0.4493 0.000 0.368 0.000 0.632 0.000 0.000
#> SRR650171 5 0.4992 0.9334 0.000 0.116 0.000 0.260 0.624 0.000
#> SRR650165 2 0.1398 0.7372 0.000 0.940 0.000 0.008 0.052 0.000
#> SRR650176 5 0.4705 0.9523 0.000 0.088 0.000 0.260 0.652 0.000
#> SRR650177 5 0.4705 0.9523 0.000 0.088 0.000 0.260 0.652 0.000
#> SRR650180 5 0.4705 0.9523 0.000 0.088 0.000 0.260 0.652 0.000
#> SRR650179 2 0.2378 0.6173 0.000 0.848 0.000 0.152 0.000 0.000
#> SRR650181 4 0.3659 0.4542 0.000 0.364 0.000 0.636 0.000 0.000
#> SRR650183 4 0.2527 0.4712 0.000 0.108 0.000 0.868 0.024 0.000
#> SRR650184 4 0.4047 -0.1548 0.000 0.000 0.028 0.676 0.296 0.000
#> SRR650185 4 0.4047 -0.1548 0.000 0.000 0.028 0.676 0.296 0.000
#> SRR650188 4 0.3659 0.4542 0.000 0.364 0.000 0.636 0.000 0.000
#> SRR650191 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650192 5 0.4705 0.9523 0.000 0.088 0.000 0.260 0.652 0.000
#> SRR650195 4 0.3136 0.1370 0.000 0.000 0.016 0.796 0.188 0.000
#> SRR650198 2 0.2165 0.7056 0.000 0.884 0.000 0.008 0.108 0.000
#> SRR650200 4 0.3672 0.4493 0.000 0.368 0.000 0.632 0.000 0.000
#> SRR650196 4 0.3867 0.2319 0.000 0.488 0.000 0.512 0.000 0.000
#> SRR650197 2 0.0146 0.7336 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650201 4 0.3747 0.4094 0.000 0.396 0.000 0.604 0.000 0.000
#> SRR650203 2 0.3950 0.2843 0.000 0.696 0.000 0.276 0.028 0.000
#> SRR650204 2 0.0458 0.7378 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR650202 5 0.4705 0.9523 0.000 0.088 0.000 0.260 0.652 0.000
#> SRR650130 4 0.3672 0.4493 0.000 0.368 0.000 0.632 0.000 0.000
#> SRR650131 5 0.6044 0.6380 0.000 0.336 0.000 0.260 0.404 0.000
#> SRR650132 2 0.3499 0.2459 0.000 0.680 0.000 0.320 0.000 0.000
#> SRR650133 4 0.7369 -0.4207 0.000 0.192 0.140 0.372 0.296 0.000
#> SRR650138 6 0.3940 0.6442 0.000 0.000 0.000 0.012 0.348 0.640
#> SRR650139 6 0.3940 0.6442 0.000 0.000 0.000 0.012 0.348 0.640
#> SRR650142 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650143 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650145 6 0.3940 0.6442 0.000 0.000 0.000 0.012 0.348 0.640
#> SRR650146 6 0.3940 0.6442 0.000 0.000 0.000 0.012 0.348 0.640
#> SRR650148 3 0.0000 0.8084 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650149 3 0.0000 0.8084 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650151 3 0.0000 0.8084 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650152 3 0.0000 0.8084 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650154 3 0.3133 0.6806 0.000 0.000 0.780 0.000 0.212 0.008
#> SRR650155 3 0.3217 0.6696 0.000 0.000 0.768 0.000 0.224 0.008
#> SRR650157 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650158 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650160 3 0.3371 0.5978 0.000 0.292 0.708 0.000 0.000 0.000
#> SRR650161 3 0.3351 0.6028 0.000 0.288 0.712 0.000 0.000 0.000
#> SRR650163 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650164 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650169 3 0.3672 0.4204 0.000 0.000 0.632 0.000 0.000 0.368
#> SRR650170 3 0.3578 0.4853 0.000 0.000 0.660 0.000 0.000 0.340
#> SRR650172 3 0.2260 0.7645 0.000 0.000 0.860 0.000 0.000 0.140
#> SRR650173 3 0.2260 0.7645 0.000 0.000 0.860 0.000 0.000 0.140
#> SRR650174 3 0.0000 0.8084 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650175 3 0.0000 0.8084 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650178 2 0.5461 0.1292 0.000 0.528 0.140 0.332 0.000 0.000
#> SRR650182 2 0.5581 -0.0903 0.000 0.452 0.140 0.408 0.000 0.000
#> SRR650186 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650187 6 0.1556 0.8273 0.000 0.000 0.080 0.000 0.000 0.920
#> SRR650189 3 0.2883 0.7143 0.000 0.000 0.788 0.000 0.000 0.212
#> SRR650190 3 0.2562 0.7471 0.000 0.000 0.828 0.000 0.000 0.172
#> SRR650193 5 0.4875 0.9450 0.000 0.104 0.000 0.260 0.636 0.000
#> SRR650194 5 0.4875 0.9450 0.000 0.104 0.000 0.260 0.636 0.000
#> SRR834560 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 6 0.5016 0.4050 0.392 0.000 0.076 0.000 0.000 0.532
#> SRR834570 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.0000 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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 3.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.591 0.874 0.915 0.3656 0.684 0.684
#> 3 3 0.886 0.955 0.899 0.6977 0.702 0.565
#> 4 4 0.832 0.840 0.911 0.1903 0.873 0.671
#> 5 5 0.732 0.520 0.750 0.0513 0.871 0.582
#> 6 6 0.753 0.639 0.816 0.0406 0.850 0.473
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
#> SRR650205 2 0.0000 0.880 0.000 1.000
#> SRR650134 2 0.0000 0.880 0.000 1.000
#> SRR650135 2 0.0000 0.880 0.000 1.000
#> SRR650136 2 0.0000 0.880 0.000 1.000
#> SRR650137 2 0.0000 0.880 0.000 1.000
#> SRR650140 2 0.0000 0.880 0.000 1.000
#> SRR650141 2 0.0000 0.880 0.000 1.000
#> SRR650144 2 0.0000 0.880 0.000 1.000
#> SRR650147 2 0.0000 0.880 0.000 1.000
#> SRR650150 2 0.0000 0.880 0.000 1.000
#> SRR650153 2 0.0000 0.880 0.000 1.000
#> SRR650156 2 0.0000 0.880 0.000 1.000
#> SRR650159 2 0.0000 0.880 0.000 1.000
#> SRR650162 2 0.0000 0.880 0.000 1.000
#> SRR650168 2 0.3431 0.865 0.064 0.936
#> SRR650166 2 0.0000 0.880 0.000 1.000
#> SRR650167 2 0.0000 0.880 0.000 1.000
#> SRR650171 2 0.0000 0.880 0.000 1.000
#> SRR650165 2 0.0000 0.880 0.000 1.000
#> SRR650176 2 0.0000 0.880 0.000 1.000
#> SRR650177 2 0.0000 0.880 0.000 1.000
#> SRR650180 2 0.0000 0.880 0.000 1.000
#> SRR650179 2 0.0000 0.880 0.000 1.000
#> SRR650181 2 0.0000 0.880 0.000 1.000
#> SRR650183 2 0.0000 0.880 0.000 1.000
#> SRR650184 2 0.3879 0.862 0.076 0.924
#> SRR650185 2 0.3879 0.862 0.076 0.924
#> SRR650188 2 0.0000 0.880 0.000 1.000
#> SRR650191 2 0.8207 0.791 0.256 0.744
#> SRR650192 2 0.0000 0.880 0.000 1.000
#> SRR650195 2 0.0000 0.880 0.000 1.000
#> SRR650198 2 0.0000 0.880 0.000 1.000
#> SRR650200 2 0.0000 0.880 0.000 1.000
#> SRR650196 2 0.0000 0.880 0.000 1.000
#> SRR650197 2 0.0000 0.880 0.000 1.000
#> SRR650201 2 0.0000 0.880 0.000 1.000
#> SRR650203 2 0.0000 0.880 0.000 1.000
#> SRR650204 2 0.0000 0.880 0.000 1.000
#> SRR650202 2 0.0000 0.880 0.000 1.000
#> SRR650130 2 0.0000 0.880 0.000 1.000
#> SRR650131 2 0.0000 0.880 0.000 1.000
#> SRR650132 2 0.0000 0.880 0.000 1.000
#> SRR650133 2 0.3879 0.862 0.076 0.924
#> SRR650138 2 0.8499 0.774 0.276 0.724
#> SRR650139 2 0.8499 0.774 0.276 0.724
#> SRR650142 2 0.8267 0.791 0.260 0.740
#> SRR650143 2 0.8267 0.791 0.260 0.740
#> SRR650145 2 0.8499 0.774 0.276 0.724
#> SRR650146 2 0.8499 0.774 0.276 0.724
#> SRR650148 2 0.8267 0.791 0.260 0.740
#> SRR650149 2 0.8267 0.791 0.260 0.740
#> SRR650151 2 0.8267 0.791 0.260 0.740
#> SRR650152 2 0.8267 0.791 0.260 0.740
#> SRR650154 2 0.8267 0.791 0.260 0.740
#> SRR650155 2 0.8267 0.791 0.260 0.740
#> SRR650157 2 0.8327 0.787 0.264 0.736
#> SRR650158 2 0.8327 0.787 0.264 0.736
#> SRR650160 2 0.7883 0.801 0.236 0.764
#> SRR650161 2 0.7883 0.801 0.236 0.764
#> SRR650163 2 0.8267 0.791 0.260 0.740
#> SRR650164 2 0.8267 0.791 0.260 0.740
#> SRR650169 2 0.8267 0.791 0.260 0.740
#> SRR650170 2 0.8267 0.791 0.260 0.740
#> SRR650172 2 0.8267 0.791 0.260 0.740
#> SRR650173 2 0.8267 0.791 0.260 0.740
#> SRR650174 2 0.8267 0.791 0.260 0.740
#> SRR650175 2 0.8267 0.791 0.260 0.740
#> SRR650178 2 0.0938 0.878 0.012 0.988
#> SRR650182 2 0.0938 0.878 0.012 0.988
#> SRR650186 2 0.8267 0.791 0.260 0.740
#> SRR650187 2 0.8267 0.791 0.260 0.740
#> SRR650189 2 0.8267 0.791 0.260 0.740
#> SRR650190 2 0.8267 0.791 0.260 0.740
#> SRR650193 2 0.0000 0.880 0.000 1.000
#> SRR650194 2 0.0000 0.880 0.000 1.000
#> SRR834560 1 0.0376 1.000 0.996 0.004
#> SRR834561 1 0.0376 1.000 0.996 0.004
#> SRR834562 1 0.0376 1.000 0.996 0.004
#> SRR834563 1 0.0376 1.000 0.996 0.004
#> SRR834564 1 0.0376 1.000 0.996 0.004
#> SRR834565 1 0.0376 1.000 0.996 0.004
#> SRR834566 1 0.0376 1.000 0.996 0.004
#> SRR834567 1 0.0376 1.000 0.996 0.004
#> SRR834568 1 0.0376 1.000 0.996 0.004
#> SRR834569 1 0.0376 1.000 0.996 0.004
#> SRR834570 1 0.0376 1.000 0.996 0.004
#> SRR834571 1 0.0376 1.000 0.996 0.004
#> SRR834572 1 0.0376 1.000 0.996 0.004
#> SRR834573 1 0.0376 1.000 0.996 0.004
#> SRR834574 1 0.0376 1.000 0.996 0.004
#> SRR834575 1 0.0376 1.000 0.996 0.004
#> SRR834576 1 0.0376 1.000 0.996 0.004
#> SRR834577 1 0.0376 1.000 0.996 0.004
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650134 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650135 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650136 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650137 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650140 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650141 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650144 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650147 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650150 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650153 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650156 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650159 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650162 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650168 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650166 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650167 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650171 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650165 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650176 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650177 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650180 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650179 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650181 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650183 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650184 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650185 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650188 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650191 2 0.4702 0.775 0.000 0.788 0.212
#> SRR650192 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650195 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650198 2 0.1031 0.938 0.000 0.976 0.024
#> SRR650200 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650196 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650197 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650201 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650203 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650204 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650202 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650130 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650131 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650132 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650133 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650138 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650139 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650142 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650143 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650145 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650146 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650148 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650149 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650151 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650152 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650154 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650155 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650157 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650158 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650160 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650161 2 0.4178 0.822 0.000 0.828 0.172
#> SRR650163 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650164 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650169 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650170 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650172 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650173 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650174 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650175 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650178 2 0.5785 0.580 0.000 0.668 0.332
#> SRR650182 2 0.5785 0.580 0.000 0.668 0.332
#> SRR650186 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650187 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650189 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650190 3 0.0000 1.000 0.000 0.000 1.000
#> SRR650193 2 0.0000 0.953 0.000 1.000 0.000
#> SRR650194 2 0.0000 0.953 0.000 1.000 0.000
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834569 1 0.0237 0.996 0.996 0.000 0.004
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.2345 0.810 0.000 0.100 0.000 0.900
#> SRR650134 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650135 2 0.4382 0.692 0.000 0.704 0.000 0.296
#> SRR650136 2 0.4382 0.692 0.000 0.704 0.000 0.296
#> SRR650137 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650140 2 0.4431 0.685 0.000 0.696 0.000 0.304
#> SRR650141 4 0.1716 0.822 0.000 0.064 0.000 0.936
#> SRR650144 2 0.4713 0.622 0.000 0.640 0.000 0.360
#> SRR650147 4 0.1474 0.823 0.000 0.052 0.000 0.948
#> SRR650150 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650153 2 0.4713 0.622 0.000 0.640 0.000 0.360
#> SRR650156 2 0.4382 0.692 0.000 0.704 0.000 0.296
#> SRR650159 2 0.0592 0.778 0.000 0.984 0.000 0.016
#> SRR650162 2 0.0592 0.778 0.000 0.984 0.000 0.016
#> SRR650168 4 0.1545 0.822 0.000 0.008 0.040 0.952
#> SRR650166 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650167 2 0.0921 0.780 0.000 0.972 0.000 0.028
#> SRR650171 2 0.4697 0.627 0.000 0.644 0.000 0.356
#> SRR650165 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650176 2 0.5000 0.324 0.000 0.500 0.000 0.500
#> SRR650177 2 0.4996 0.369 0.000 0.516 0.000 0.484
#> SRR650180 4 0.2814 0.779 0.000 0.132 0.000 0.868
#> SRR650179 2 0.1637 0.779 0.000 0.940 0.000 0.060
#> SRR650181 2 0.4431 0.685 0.000 0.696 0.000 0.304
#> SRR650183 4 0.4072 0.585 0.000 0.252 0.000 0.748
#> SRR650184 4 0.2412 0.804 0.000 0.008 0.084 0.908
#> SRR650185 4 0.2412 0.804 0.000 0.008 0.084 0.908
#> SRR650188 2 0.4382 0.692 0.000 0.704 0.000 0.296
#> SRR650191 4 0.2401 0.797 0.000 0.004 0.092 0.904
#> SRR650192 4 0.2345 0.810 0.000 0.100 0.000 0.900
#> SRR650195 4 0.1767 0.823 0.000 0.012 0.044 0.944
#> SRR650198 2 0.2647 0.684 0.000 0.880 0.000 0.120
#> SRR650200 2 0.1022 0.780 0.000 0.968 0.000 0.032
#> SRR650196 2 0.0592 0.778 0.000 0.984 0.000 0.016
#> SRR650197 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650201 2 0.4999 0.263 0.000 0.508 0.000 0.492
#> SRR650203 4 0.2216 0.814 0.000 0.092 0.000 0.908
#> SRR650204 2 0.0000 0.774 0.000 1.000 0.000 0.000
#> SRR650202 4 0.4222 0.535 0.000 0.272 0.000 0.728
#> SRR650130 2 0.1637 0.779 0.000 0.940 0.000 0.060
#> SRR650131 4 0.2469 0.803 0.000 0.108 0.000 0.892
#> SRR650132 2 0.1867 0.778 0.000 0.928 0.000 0.072
#> SRR650133 4 0.1807 0.819 0.000 0.008 0.052 0.940
#> SRR650138 3 0.0804 0.982 0.000 0.012 0.980 0.008
#> SRR650139 3 0.0804 0.982 0.000 0.012 0.980 0.008
#> SRR650142 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650145 3 0.0804 0.982 0.000 0.012 0.980 0.008
#> SRR650146 3 0.0804 0.982 0.000 0.012 0.980 0.008
#> SRR650148 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650154 3 0.0779 0.981 0.000 0.016 0.980 0.004
#> SRR650155 3 0.0779 0.981 0.000 0.016 0.980 0.004
#> SRR650157 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650160 4 0.5783 0.596 0.000 0.220 0.088 0.692
#> SRR650161 4 0.5783 0.596 0.000 0.220 0.088 0.692
#> SRR650163 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650169 3 0.2053 0.926 0.000 0.004 0.924 0.072
#> SRR650170 3 0.2053 0.926 0.000 0.004 0.924 0.072
#> SRR650172 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650178 2 0.3597 0.649 0.000 0.836 0.148 0.016
#> SRR650182 2 0.3597 0.649 0.000 0.836 0.148 0.016
#> SRR650186 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.990 0.000 0.000 1.000 0.000
#> SRR650193 2 0.4477 0.676 0.000 0.688 0.000 0.312
#> SRR650194 2 0.4477 0.676 0.000 0.688 0.000 0.312
#> SRR834560 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834569 1 0.2081 0.889 0.916 0.000 0.084 0.000
#> SRR834570 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.994 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.994 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
#> SRR650205 2 0.4291 -0.41382 0.000 0.536 0.000 0.464 0.000
#> SRR650134 2 0.4307 0.21376 0.000 0.500 0.000 0.000 0.500
#> SRR650135 2 0.0000 0.55649 0.000 1.000 0.000 0.000 0.000
#> SRR650136 2 0.0290 0.55267 0.000 0.992 0.000 0.008 0.000
#> SRR650137 2 0.4182 0.40328 0.000 0.644 0.000 0.004 0.352
#> SRR650140 2 0.0162 0.55472 0.000 0.996 0.000 0.004 0.000
#> SRR650141 4 0.4249 0.64954 0.000 0.432 0.000 0.568 0.000
#> SRR650144 2 0.2233 0.47825 0.000 0.892 0.000 0.104 0.004
#> SRR650147 4 0.4074 0.75537 0.000 0.364 0.000 0.636 0.000
#> SRR650150 2 0.4196 0.40028 0.000 0.640 0.000 0.004 0.356
#> SRR650153 2 0.4060 -0.09053 0.000 0.640 0.000 0.360 0.000
#> SRR650156 2 0.0000 0.55649 0.000 1.000 0.000 0.000 0.000
#> SRR650159 2 0.4166 0.40763 0.000 0.648 0.000 0.004 0.348
#> SRR650162 2 0.4182 0.40328 0.000 0.644 0.000 0.004 0.352
#> SRR650168 4 0.4972 0.79617 0.000 0.336 0.000 0.620 0.044
#> SRR650166 2 0.4196 0.40011 0.000 0.640 0.000 0.004 0.356
#> SRR650167 2 0.2230 0.57325 0.000 0.884 0.000 0.000 0.116
#> SRR650171 2 0.2561 0.43917 0.000 0.856 0.000 0.144 0.000
#> SRR650165 5 0.4294 -0.25571 0.000 0.468 0.000 0.000 0.532
#> SRR650176 2 0.3109 0.34901 0.000 0.800 0.000 0.200 0.000
#> SRR650177 2 0.3074 0.35687 0.000 0.804 0.000 0.196 0.000
#> SRR650180 2 0.4242 -0.29744 0.000 0.572 0.000 0.428 0.000
#> SRR650179 2 0.3966 0.41040 0.000 0.664 0.000 0.000 0.336
#> SRR650181 2 0.2732 0.38050 0.000 0.840 0.000 0.160 0.000
#> SRR650183 2 0.4225 -0.12275 0.000 0.632 0.000 0.364 0.004
#> SRR650184 4 0.5801 0.76584 0.000 0.296 0.044 0.616 0.044
#> SRR650185 4 0.5801 0.76584 0.000 0.296 0.044 0.616 0.044
#> SRR650188 2 0.0000 0.55649 0.000 1.000 0.000 0.000 0.000
#> SRR650191 4 0.5319 0.28902 0.000 0.008 0.360 0.588 0.044
#> SRR650192 2 0.4294 -0.42728 0.000 0.532 0.000 0.468 0.000
#> SRR650195 4 0.4972 0.79617 0.000 0.336 0.000 0.620 0.044
#> SRR650198 5 0.5813 -0.04893 0.000 0.328 0.000 0.112 0.560
#> SRR650200 2 0.2605 0.56613 0.000 0.852 0.000 0.000 0.148
#> SRR650196 2 0.3966 0.41017 0.000 0.664 0.000 0.000 0.336
#> SRR650197 2 0.4166 0.40551 0.000 0.648 0.000 0.004 0.348
#> SRR650201 2 0.3730 0.10380 0.000 0.712 0.000 0.288 0.000
#> SRR650203 4 0.4302 0.51880 0.000 0.480 0.000 0.520 0.000
#> SRR650204 5 0.4437 -0.25632 0.000 0.464 0.000 0.004 0.532
#> SRR650202 2 0.4161 -0.19552 0.000 0.608 0.000 0.392 0.000
#> SRR650130 2 0.3949 0.41431 0.000 0.668 0.000 0.000 0.332
#> SRR650131 2 0.4283 -0.38705 0.000 0.544 0.000 0.456 0.000
#> SRR650132 2 0.2732 0.55767 0.000 0.840 0.000 0.000 0.160
#> SRR650133 4 0.4972 0.79617 0.000 0.336 0.000 0.620 0.044
#> SRR650138 5 0.6807 0.00343 0.000 0.000 0.336 0.300 0.364
#> SRR650139 5 0.6807 0.00343 0.000 0.000 0.336 0.300 0.364
#> SRR650142 3 0.1579 0.79250 0.000 0.000 0.944 0.032 0.024
#> SRR650143 3 0.1579 0.79250 0.000 0.000 0.944 0.032 0.024
#> SRR650145 5 0.6807 0.00343 0.000 0.000 0.336 0.300 0.364
#> SRR650146 5 0.6807 0.00343 0.000 0.000 0.336 0.300 0.364
#> SRR650148 3 0.1386 0.79471 0.000 0.000 0.952 0.032 0.016
#> SRR650149 3 0.1579 0.79250 0.000 0.000 0.944 0.032 0.024
#> SRR650151 3 0.5265 0.61474 0.000 0.000 0.636 0.284 0.080
#> SRR650152 3 0.5265 0.61474 0.000 0.000 0.636 0.284 0.080
#> SRR650154 5 0.6794 0.00448 0.000 0.000 0.320 0.300 0.380
#> SRR650155 5 0.6794 0.00448 0.000 0.000 0.320 0.300 0.380
#> SRR650157 3 0.2280 0.79241 0.000 0.000 0.880 0.120 0.000
#> SRR650158 3 0.2280 0.79241 0.000 0.000 0.880 0.120 0.000
#> SRR650160 5 0.4666 0.04516 0.000 0.012 0.004 0.388 0.596
#> SRR650161 5 0.4666 0.04516 0.000 0.012 0.004 0.388 0.596
#> SRR650163 3 0.0000 0.80254 0.000 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.80254 0.000 0.000 1.000 0.000 0.000
#> SRR650169 3 0.3241 0.70437 0.000 0.000 0.832 0.144 0.024
#> SRR650170 3 0.3241 0.70437 0.000 0.000 0.832 0.144 0.024
#> SRR650172 3 0.4275 0.68979 0.000 0.000 0.696 0.284 0.020
#> SRR650173 3 0.4275 0.68979 0.000 0.000 0.696 0.284 0.020
#> SRR650174 3 0.4275 0.68979 0.000 0.000 0.696 0.284 0.020
#> SRR650175 3 0.4275 0.68979 0.000 0.000 0.696 0.284 0.020
#> SRR650178 5 0.3932 0.13480 0.000 0.328 0.000 0.000 0.672
#> SRR650182 5 0.3932 0.13480 0.000 0.328 0.000 0.000 0.672
#> SRR650186 3 0.1579 0.79250 0.000 0.000 0.944 0.032 0.024
#> SRR650187 3 0.1579 0.79250 0.000 0.000 0.944 0.032 0.024
#> SRR650189 3 0.2873 0.78818 0.000 0.000 0.860 0.120 0.020
#> SRR650190 3 0.2873 0.78818 0.000 0.000 0.860 0.120 0.020
#> SRR650193 2 0.2304 0.49050 0.000 0.892 0.000 0.100 0.008
#> SRR650194 2 0.2358 0.48625 0.000 0.888 0.000 0.104 0.008
#> SRR834560 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0566 0.98762 0.984 0.000 0.004 0.000 0.012
#> SRR834570 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0290 0.99362 0.992 0.000 0.000 0.000 0.008
#> SRR834574 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.99829 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0404 0.99092 0.988 0.000 0.000 0.000 0.012
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.1327 0.5805 0.000 0.064 0.000 0.936 0.000 0.000
#> SRR650134 2 0.4680 0.6572 0.000 0.684 0.000 0.132 0.184 0.000
#> SRR650135 2 0.2933 0.7137 0.000 0.796 0.000 0.200 0.004 0.000
#> SRR650136 2 0.2996 0.6899 0.000 0.772 0.000 0.228 0.000 0.000
#> SRR650137 2 0.1429 0.7201 0.000 0.940 0.000 0.004 0.052 0.004
#> SRR650140 2 0.3287 0.7005 0.000 0.768 0.000 0.220 0.012 0.000
#> SRR650141 4 0.0508 0.5205 0.000 0.012 0.000 0.984 0.004 0.000
#> SRR650144 4 0.3866 0.0132 0.000 0.484 0.000 0.516 0.000 0.000
#> SRR650147 4 0.1983 0.4325 0.000 0.020 0.000 0.908 0.072 0.000
#> SRR650150 2 0.2051 0.6960 0.000 0.896 0.000 0.004 0.096 0.004
#> SRR650153 4 0.2664 0.6061 0.000 0.184 0.000 0.816 0.000 0.000
#> SRR650156 2 0.2964 0.7109 0.000 0.792 0.000 0.204 0.004 0.000
#> SRR650159 2 0.3013 0.7452 0.000 0.832 0.000 0.140 0.024 0.004
#> SRR650162 2 0.2527 0.7195 0.000 0.884 0.000 0.048 0.064 0.004
#> SRR650168 4 0.3810 -0.5487 0.000 0.000 0.000 0.572 0.428 0.000
#> SRR650166 2 0.2700 0.6631 0.000 0.836 0.000 0.004 0.156 0.004
#> SRR650167 2 0.2389 0.7474 0.000 0.864 0.000 0.128 0.008 0.000
#> SRR650171 4 0.3823 0.1757 0.000 0.436 0.000 0.564 0.000 0.000
#> SRR650165 2 0.3348 0.6131 0.000 0.768 0.000 0.016 0.216 0.000
#> SRR650176 4 0.3464 0.4597 0.000 0.312 0.000 0.688 0.000 0.000
#> SRR650177 4 0.3515 0.4422 0.000 0.324 0.000 0.676 0.000 0.000
#> SRR650180 4 0.2092 0.6088 0.000 0.124 0.000 0.876 0.000 0.000
#> SRR650179 2 0.1563 0.7429 0.000 0.932 0.000 0.056 0.012 0.000
#> SRR650181 2 0.3930 0.3387 0.000 0.576 0.000 0.420 0.004 0.000
#> SRR650183 4 0.2562 0.6074 0.000 0.172 0.000 0.828 0.000 0.000
#> SRR650184 5 0.3652 0.9435 0.000 0.000 0.004 0.324 0.672 0.000
#> SRR650185 5 0.3652 0.9435 0.000 0.000 0.004 0.324 0.672 0.000
#> SRR650188 2 0.2902 0.7171 0.000 0.800 0.000 0.196 0.004 0.000
#> SRR650191 5 0.4265 0.9129 0.000 0.000 0.040 0.300 0.660 0.000
#> SRR650192 4 0.1765 0.6000 0.000 0.096 0.000 0.904 0.000 0.000
#> SRR650195 5 0.3737 0.8653 0.000 0.000 0.000 0.392 0.608 0.000
#> SRR650198 2 0.4022 0.5254 0.000 0.688 0.000 0.016 0.288 0.008
#> SRR650200 2 0.2278 0.7471 0.000 0.868 0.000 0.128 0.004 0.000
#> SRR650196 2 0.2092 0.7490 0.000 0.876 0.000 0.124 0.000 0.000
#> SRR650197 2 0.1578 0.7236 0.000 0.936 0.000 0.012 0.048 0.004
#> SRR650201 4 0.3717 0.2496 0.000 0.384 0.000 0.616 0.000 0.000
#> SRR650203 4 0.2962 0.4956 0.000 0.068 0.000 0.848 0.084 0.000
#> SRR650204 2 0.1615 0.7161 0.000 0.928 0.000 0.004 0.064 0.004
#> SRR650202 4 0.2378 0.6099 0.000 0.152 0.000 0.848 0.000 0.000
#> SRR650130 2 0.2300 0.7440 0.000 0.856 0.000 0.144 0.000 0.000
#> SRR650131 4 0.3013 0.4985 0.000 0.068 0.000 0.844 0.088 0.000
#> SRR650132 2 0.2491 0.7347 0.000 0.836 0.000 0.164 0.000 0.000
#> SRR650133 4 0.3804 -0.5474 0.000 0.000 0.000 0.576 0.424 0.000
#> SRR650138 6 0.0520 0.6685 0.000 0.000 0.008 0.000 0.008 0.984
#> SRR650139 6 0.0520 0.6685 0.000 0.000 0.008 0.000 0.008 0.984
#> SRR650142 3 0.0000 0.7529 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650143 3 0.0000 0.7529 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650145 6 0.0405 0.6703 0.000 0.000 0.008 0.000 0.004 0.988
#> SRR650146 6 0.0405 0.6703 0.000 0.000 0.008 0.000 0.004 0.988
#> SRR650148 3 0.1765 0.7231 0.000 0.000 0.904 0.000 0.000 0.096
#> SRR650149 3 0.1501 0.7356 0.000 0.000 0.924 0.000 0.000 0.076
#> SRR650151 6 0.3266 0.6028 0.000 0.000 0.272 0.000 0.000 0.728
#> SRR650152 6 0.3266 0.6028 0.000 0.000 0.272 0.000 0.000 0.728
#> SRR650154 6 0.2019 0.6783 0.000 0.000 0.088 0.000 0.012 0.900
#> SRR650155 6 0.2019 0.6783 0.000 0.000 0.088 0.000 0.012 0.900
#> SRR650157 3 0.3240 0.6296 0.000 0.000 0.752 0.000 0.004 0.244
#> SRR650158 3 0.3215 0.6356 0.000 0.000 0.756 0.000 0.004 0.240
#> SRR650160 4 0.5771 -0.0118 0.000 0.140 0.000 0.480 0.372 0.008
#> SRR650161 4 0.5771 -0.0118 0.000 0.140 0.000 0.480 0.372 0.008
#> SRR650163 3 0.2697 0.6849 0.000 0.000 0.812 0.000 0.000 0.188
#> SRR650164 3 0.2697 0.6849 0.000 0.000 0.812 0.000 0.000 0.188
#> SRR650169 3 0.3986 0.6010 0.000 0.000 0.780 0.044 0.148 0.028
#> SRR650170 3 0.3986 0.6010 0.000 0.000 0.780 0.044 0.148 0.028
#> SRR650172 6 0.3862 0.2740 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650173 6 0.3862 0.2740 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650174 6 0.3862 0.2740 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650175 6 0.3862 0.2740 0.000 0.000 0.476 0.000 0.000 0.524
#> SRR650178 2 0.5181 0.3834 0.000 0.580 0.000 0.008 0.084 0.328
#> SRR650182 2 0.5181 0.3834 0.000 0.580 0.000 0.008 0.084 0.328
#> SRR650186 3 0.0000 0.7529 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650187 3 0.0000 0.7529 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650189 3 0.3634 0.3575 0.000 0.000 0.644 0.000 0.000 0.356
#> SRR650190 3 0.3634 0.3575 0.000 0.000 0.644 0.000 0.000 0.356
#> SRR650193 2 0.3782 0.4679 0.000 0.636 0.000 0.360 0.000 0.004
#> SRR650194 2 0.3782 0.4679 0.000 0.636 0.000 0.360 0.000 0.004
#> SRR834560 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0146 0.9918 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834565 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0146 0.9918 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834568 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.1285 0.9520 0.944 0.000 0.000 0.000 0.052 0.004
#> SRR834570 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0146 0.9918 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834573 1 0.0777 0.9754 0.972 0.000 0.000 0.000 0.024 0.004
#> SRR834574 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9933 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0858 0.9730 0.968 0.000 0.000 0.000 0.028 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["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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.977 0.937 0.973 0.5005 0.495 0.495
#> 3 3 1.000 0.987 0.994 0.2410 0.886 0.771
#> 4 4 0.979 0.956 0.980 0.1867 0.875 0.675
#> 5 5 0.785 0.655 0.806 0.0709 0.932 0.746
#> 6 6 0.861 0.808 0.888 0.0477 0.913 0.622
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 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
#> SRR650205 2 0.0000 1.000 0.000 1.000
#> SRR650134 2 0.0000 1.000 0.000 1.000
#> SRR650135 2 0.0000 1.000 0.000 1.000
#> SRR650136 2 0.0000 1.000 0.000 1.000
#> SRR650137 2 0.0000 1.000 0.000 1.000
#> SRR650140 2 0.0000 1.000 0.000 1.000
#> SRR650141 2 0.0000 1.000 0.000 1.000
#> SRR650144 2 0.0000 1.000 0.000 1.000
#> SRR650147 2 0.0000 1.000 0.000 1.000
#> SRR650150 2 0.0000 1.000 0.000 1.000
#> SRR650153 2 0.0000 1.000 0.000 1.000
#> SRR650156 2 0.0000 1.000 0.000 1.000
#> SRR650159 2 0.0000 1.000 0.000 1.000
#> SRR650162 2 0.0000 1.000 0.000 1.000
#> SRR650168 2 0.0000 1.000 0.000 1.000
#> SRR650166 2 0.0000 1.000 0.000 1.000
#> SRR650167 2 0.0000 1.000 0.000 1.000
#> SRR650171 2 0.0000 1.000 0.000 1.000
#> SRR650165 2 0.0000 1.000 0.000 1.000
#> SRR650176 2 0.0000 1.000 0.000 1.000
#> SRR650177 2 0.0000 1.000 0.000 1.000
#> SRR650180 2 0.0000 1.000 0.000 1.000
#> SRR650179 2 0.0000 1.000 0.000 1.000
#> SRR650181 2 0.0000 1.000 0.000 1.000
#> SRR650183 2 0.0000 1.000 0.000 1.000
#> SRR650184 2 0.0000 1.000 0.000 1.000
#> SRR650185 2 0.0000 1.000 0.000 1.000
#> SRR650188 2 0.0000 1.000 0.000 1.000
#> SRR650191 1 0.2043 0.921 0.968 0.032
#> SRR650192 2 0.0000 1.000 0.000 1.000
#> SRR650195 2 0.0000 1.000 0.000 1.000
#> SRR650198 2 0.0000 1.000 0.000 1.000
#> SRR650200 2 0.0000 1.000 0.000 1.000
#> SRR650196 2 0.0000 1.000 0.000 1.000
#> SRR650197 2 0.0000 1.000 0.000 1.000
#> SRR650201 2 0.0000 1.000 0.000 1.000
#> SRR650203 2 0.0000 1.000 0.000 1.000
#> SRR650204 2 0.0000 1.000 0.000 1.000
#> SRR650202 2 0.0000 1.000 0.000 1.000
#> SRR650130 2 0.0000 1.000 0.000 1.000
#> SRR650131 2 0.0000 1.000 0.000 1.000
#> SRR650132 2 0.0000 1.000 0.000 1.000
#> SRR650133 2 0.0000 1.000 0.000 1.000
#> SRR650138 1 0.0000 0.943 1.000 0.000
#> SRR650139 1 0.0000 0.943 1.000 0.000
#> SRR650142 1 0.0000 0.943 1.000 0.000
#> SRR650143 1 0.0000 0.943 1.000 0.000
#> SRR650145 1 0.0000 0.943 1.000 0.000
#> SRR650146 1 0.0000 0.943 1.000 0.000
#> SRR650148 1 0.0672 0.938 0.992 0.008
#> SRR650149 1 0.0000 0.943 1.000 0.000
#> SRR650151 1 0.9580 0.456 0.620 0.380
#> SRR650152 1 0.9087 0.566 0.676 0.324
#> SRR650154 1 0.9754 0.389 0.592 0.408
#> SRR650155 1 0.9608 0.446 0.616 0.384
#> SRR650157 1 0.0000 0.943 1.000 0.000
#> SRR650158 1 0.0000 0.943 1.000 0.000
#> SRR650160 2 0.0000 1.000 0.000 1.000
#> SRR650161 2 0.0000 1.000 0.000 1.000
#> SRR650163 1 0.0000 0.943 1.000 0.000
#> SRR650164 1 0.0000 0.943 1.000 0.000
#> SRR650169 1 0.0672 0.938 0.992 0.008
#> SRR650170 1 0.0376 0.940 0.996 0.004
#> SRR650172 1 0.3431 0.894 0.936 0.064
#> SRR650173 1 0.1843 0.924 0.972 0.028
#> SRR650174 1 0.9996 0.153 0.512 0.488
#> SRR650175 1 0.9491 0.482 0.632 0.368
#> SRR650178 2 0.0000 1.000 0.000 1.000
#> SRR650182 2 0.0000 1.000 0.000 1.000
#> SRR650186 1 0.0000 0.943 1.000 0.000
#> SRR650187 1 0.0000 0.943 1.000 0.000
#> SRR650189 1 0.0000 0.943 1.000 0.000
#> SRR650190 1 0.0000 0.943 1.000 0.000
#> SRR650193 2 0.0000 1.000 0.000 1.000
#> SRR650194 2 0.0000 1.000 0.000 1.000
#> SRR834560 1 0.0000 0.943 1.000 0.000
#> SRR834561 1 0.0000 0.943 1.000 0.000
#> SRR834562 1 0.0000 0.943 1.000 0.000
#> SRR834563 1 0.0000 0.943 1.000 0.000
#> SRR834564 1 0.0000 0.943 1.000 0.000
#> SRR834565 1 0.0000 0.943 1.000 0.000
#> SRR834566 1 0.0000 0.943 1.000 0.000
#> SRR834567 1 0.0000 0.943 1.000 0.000
#> SRR834568 1 0.0000 0.943 1.000 0.000
#> SRR834569 1 0.0000 0.943 1.000 0.000
#> SRR834570 1 0.0000 0.943 1.000 0.000
#> SRR834571 1 0.0000 0.943 1.000 0.000
#> SRR834572 1 0.0000 0.943 1.000 0.000
#> SRR834573 1 0.0000 0.943 1.000 0.000
#> SRR834574 1 0.0000 0.943 1.000 0.000
#> SRR834575 1 0.0000 0.943 1.000 0.000
#> SRR834576 1 0.0000 0.943 1.000 0.000
#> SRR834577 1 0.0000 0.943 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.000 0.988 0 1.000 0.000
#> SRR650134 2 0.000 0.988 0 1.000 0.000
#> SRR650135 2 0.000 0.988 0 1.000 0.000
#> SRR650136 2 0.000 0.988 0 1.000 0.000
#> SRR650137 2 0.000 0.988 0 1.000 0.000
#> SRR650140 2 0.000 0.988 0 1.000 0.000
#> SRR650141 2 0.000 0.988 0 1.000 0.000
#> SRR650144 2 0.000 0.988 0 1.000 0.000
#> SRR650147 2 0.000 0.988 0 1.000 0.000
#> SRR650150 2 0.000 0.988 0 1.000 0.000
#> SRR650153 2 0.000 0.988 0 1.000 0.000
#> SRR650156 2 0.000 0.988 0 1.000 0.000
#> SRR650159 2 0.000 0.988 0 1.000 0.000
#> SRR650162 2 0.000 0.988 0 1.000 0.000
#> SRR650168 2 0.000 0.988 0 1.000 0.000
#> SRR650166 2 0.000 0.988 0 1.000 0.000
#> SRR650167 2 0.000 0.988 0 1.000 0.000
#> SRR650171 2 0.000 0.988 0 1.000 0.000
#> SRR650165 2 0.000 0.988 0 1.000 0.000
#> SRR650176 2 0.000 0.988 0 1.000 0.000
#> SRR650177 2 0.000 0.988 0 1.000 0.000
#> SRR650180 2 0.000 0.988 0 1.000 0.000
#> SRR650179 2 0.000 0.988 0 1.000 0.000
#> SRR650181 2 0.000 0.988 0 1.000 0.000
#> SRR650183 2 0.000 0.988 0 1.000 0.000
#> SRR650184 2 0.518 0.663 0 0.744 0.256
#> SRR650185 2 0.518 0.663 0 0.744 0.256
#> SRR650188 2 0.000 0.988 0 1.000 0.000
#> SRR650191 3 0.000 1.000 0 0.000 1.000
#> SRR650192 2 0.000 0.988 0 1.000 0.000
#> SRR650195 2 0.000 0.988 0 1.000 0.000
#> SRR650198 2 0.000 0.988 0 1.000 0.000
#> SRR650200 2 0.000 0.988 0 1.000 0.000
#> SRR650196 2 0.000 0.988 0 1.000 0.000
#> SRR650197 2 0.000 0.988 0 1.000 0.000
#> SRR650201 2 0.000 0.988 0 1.000 0.000
#> SRR650203 2 0.000 0.988 0 1.000 0.000
#> SRR650204 2 0.000 0.988 0 1.000 0.000
#> SRR650202 2 0.000 0.988 0 1.000 0.000
#> SRR650130 2 0.000 0.988 0 1.000 0.000
#> SRR650131 2 0.000 0.988 0 1.000 0.000
#> SRR650132 2 0.000 0.988 0 1.000 0.000
#> SRR650133 2 0.000 0.988 0 1.000 0.000
#> SRR650138 3 0.000 1.000 0 0.000 1.000
#> SRR650139 3 0.000 1.000 0 0.000 1.000
#> SRR650142 3 0.000 1.000 0 0.000 1.000
#> SRR650143 3 0.000 1.000 0 0.000 1.000
#> SRR650145 3 0.000 1.000 0 0.000 1.000
#> SRR650146 3 0.000 1.000 0 0.000 1.000
#> SRR650148 3 0.000 1.000 0 0.000 1.000
#> SRR650149 3 0.000 1.000 0 0.000 1.000
#> SRR650151 3 0.000 1.000 0 0.000 1.000
#> SRR650152 3 0.000 1.000 0 0.000 1.000
#> SRR650154 3 0.000 1.000 0 0.000 1.000
#> SRR650155 3 0.000 1.000 0 0.000 1.000
#> SRR650157 3 0.000 1.000 0 0.000 1.000
#> SRR650158 3 0.000 1.000 0 0.000 1.000
#> SRR650160 2 0.000 0.988 0 1.000 0.000
#> SRR650161 2 0.000 0.988 0 1.000 0.000
#> SRR650163 3 0.000 1.000 0 0.000 1.000
#> SRR650164 3 0.000 1.000 0 0.000 1.000
#> SRR650169 3 0.000 1.000 0 0.000 1.000
#> SRR650170 3 0.000 1.000 0 0.000 1.000
#> SRR650172 3 0.000 1.000 0 0.000 1.000
#> SRR650173 3 0.000 1.000 0 0.000 1.000
#> SRR650174 3 0.000 1.000 0 0.000 1.000
#> SRR650175 3 0.000 1.000 0 0.000 1.000
#> SRR650178 2 0.000 0.988 0 1.000 0.000
#> SRR650182 2 0.000 0.988 0 1.000 0.000
#> SRR650186 3 0.000 1.000 0 0.000 1.000
#> SRR650187 3 0.000 1.000 0 0.000 1.000
#> SRR650189 3 0.000 1.000 0 0.000 1.000
#> SRR650190 3 0.000 1.000 0 0.000 1.000
#> SRR650193 2 0.000 0.988 0 1.000 0.000
#> SRR650194 2 0.000 0.988 0 1.000 0.000
#> SRR834560 1 0.000 1.000 1 0.000 0.000
#> SRR834561 1 0.000 1.000 1 0.000 0.000
#> SRR834562 1 0.000 1.000 1 0.000 0.000
#> SRR834563 1 0.000 1.000 1 0.000 0.000
#> SRR834564 1 0.000 1.000 1 0.000 0.000
#> SRR834565 1 0.000 1.000 1 0.000 0.000
#> SRR834566 1 0.000 1.000 1 0.000 0.000
#> SRR834567 1 0.000 1.000 1 0.000 0.000
#> SRR834568 1 0.000 1.000 1 0.000 0.000
#> SRR834569 1 0.000 1.000 1 0.000 0.000
#> SRR834570 1 0.000 1.000 1 0.000 0.000
#> SRR834571 1 0.000 1.000 1 0.000 0.000
#> SRR834572 1 0.000 1.000 1 0.000 0.000
#> SRR834573 1 0.000 1.000 1 0.000 0.000
#> SRR834574 1 0.000 1.000 1 0.000 0.000
#> SRR834575 1 0.000 1.000 1 0.000 0.000
#> SRR834576 1 0.000 1.000 1 0.000 0.000
#> SRR834577 1 0.000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650134 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650136 2 0.2469 0.876 0.000 0.892 0.000 0.108
#> SRR650137 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650140 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650141 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650144 2 0.3688 0.752 0.000 0.792 0.000 0.208
#> SRR650147 4 0.3024 0.822 0.000 0.148 0.000 0.852
#> SRR650150 2 0.0336 0.960 0.000 0.992 0.000 0.008
#> SRR650153 2 0.1118 0.941 0.000 0.964 0.000 0.036
#> SRR650156 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650159 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650162 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650168 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650166 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650171 2 0.4103 0.679 0.000 0.744 0.000 0.256
#> SRR650165 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650176 4 0.0592 0.938 0.000 0.016 0.000 0.984
#> SRR650177 4 0.0592 0.938 0.000 0.016 0.000 0.984
#> SRR650180 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650179 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650181 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650183 4 0.4855 0.306 0.000 0.400 0.000 0.600
#> SRR650184 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650185 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650188 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650191 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650192 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650195 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650198 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650200 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650197 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650201 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650203 2 0.4164 0.661 0.000 0.736 0.000 0.264
#> SRR650204 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650202 4 0.2345 0.870 0.000 0.100 0.000 0.900
#> SRR650130 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650131 4 0.0592 0.938 0.000 0.016 0.000 0.984
#> SRR650132 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650133 4 0.0000 0.945 0.000 0.000 0.000 1.000
#> SRR650138 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650139 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650142 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650145 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650146 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650148 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650154 3 0.0336 0.991 0.000 0.008 0.992 0.000
#> SRR650155 3 0.0336 0.991 0.000 0.008 0.992 0.000
#> SRR650157 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650160 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650161 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650163 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650169 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650170 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650172 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650178 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.966 0.000 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR650193 2 0.2011 0.905 0.000 0.920 0.000 0.080
#> SRR650194 2 0.2011 0.905 0.000 0.920 0.000 0.080
#> SRR834560 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0336 0.990 0.992 0.000 0.000 0.008
#> SRR834574 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.996 1.000 0.000 0.000 0.000
#> SRR834577 1 0.1557 0.941 0.944 0.000 0.000 0.056
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.1012 0.8121 0.000 0.012 0.000 0.968 0.020
#> SRR650134 2 0.3003 0.5432 0.000 0.812 0.000 0.000 0.188
#> SRR650135 2 0.0290 0.6960 0.000 0.992 0.000 0.000 0.008
#> SRR650136 5 0.4599 0.4742 0.000 0.356 0.000 0.020 0.624
#> SRR650137 2 0.4304 -0.2960 0.000 0.516 0.000 0.000 0.484
#> SRR650140 5 0.4307 0.2571 0.000 0.500 0.000 0.000 0.500
#> SRR650141 4 0.0609 0.8120 0.000 0.000 0.000 0.980 0.020
#> SRR650144 5 0.4456 0.4855 0.000 0.320 0.000 0.020 0.660
#> SRR650147 4 0.2595 0.7831 0.000 0.080 0.000 0.888 0.032
#> SRR650150 5 0.4747 0.2910 0.000 0.488 0.000 0.016 0.496
#> SRR650153 2 0.3838 0.3695 0.000 0.716 0.000 0.004 0.280
#> SRR650156 2 0.1121 0.6807 0.000 0.956 0.000 0.000 0.044
#> SRR650159 5 0.4562 0.2806 0.000 0.492 0.000 0.008 0.500
#> SRR650162 5 0.4552 0.3295 0.000 0.468 0.000 0.008 0.524
#> SRR650168 4 0.0404 0.8117 0.000 0.000 0.000 0.988 0.012
#> SRR650166 2 0.4440 -0.2632 0.000 0.528 0.000 0.004 0.468
#> SRR650167 2 0.0162 0.6958 0.000 0.996 0.000 0.000 0.004
#> SRR650171 5 0.4977 0.4855 0.000 0.356 0.000 0.040 0.604
#> SRR650165 2 0.4304 -0.2960 0.000 0.516 0.000 0.000 0.484
#> SRR650176 5 0.5160 0.3141 0.000 0.056 0.000 0.336 0.608
#> SRR650177 5 0.5188 0.3295 0.000 0.060 0.000 0.328 0.612
#> SRR650180 4 0.4451 -0.0604 0.000 0.004 0.000 0.504 0.492
#> SRR650179 2 0.4307 -0.3140 0.000 0.504 0.000 0.000 0.496
#> SRR650181 2 0.0290 0.6943 0.000 0.992 0.000 0.000 0.008
#> SRR650183 4 0.6289 0.1549 0.000 0.356 0.000 0.484 0.160
#> SRR650184 4 0.3586 0.7194 0.000 0.000 0.000 0.736 0.264
#> SRR650185 4 0.3561 0.7215 0.000 0.000 0.000 0.740 0.260
#> SRR650188 2 0.0162 0.6956 0.000 0.996 0.000 0.000 0.004
#> SRR650191 4 0.2127 0.7804 0.000 0.000 0.000 0.892 0.108
#> SRR650192 4 0.1043 0.8087 0.000 0.000 0.000 0.960 0.040
#> SRR650195 4 0.3913 0.6816 0.000 0.000 0.000 0.676 0.324
#> SRR650198 2 0.3561 0.4409 0.000 0.740 0.000 0.000 0.260
#> SRR650200 2 0.0000 0.6965 0.000 1.000 0.000 0.000 0.000
#> SRR650196 2 0.0609 0.6923 0.000 0.980 0.000 0.000 0.020
#> SRR650197 2 0.3109 0.5280 0.000 0.800 0.000 0.000 0.200
#> SRR650201 2 0.0404 0.6944 0.000 0.988 0.000 0.000 0.012
#> SRR650203 2 0.3863 0.3892 0.000 0.740 0.000 0.248 0.012
#> SRR650204 2 0.4302 -0.2845 0.000 0.520 0.000 0.000 0.480
#> SRR650202 4 0.2580 0.7812 0.000 0.064 0.000 0.892 0.044
#> SRR650130 2 0.0510 0.6919 0.000 0.984 0.000 0.000 0.016
#> SRR650131 4 0.1408 0.8041 0.000 0.044 0.000 0.948 0.008
#> SRR650132 2 0.0404 0.6948 0.000 0.988 0.000 0.000 0.012
#> SRR650133 4 0.0566 0.8122 0.000 0.004 0.000 0.984 0.012
#> SRR650138 3 0.0162 0.8786 0.000 0.000 0.996 0.000 0.004
#> SRR650139 3 0.0162 0.8786 0.000 0.000 0.996 0.000 0.004
#> SRR650142 3 0.0162 0.8801 0.000 0.000 0.996 0.000 0.004
#> SRR650143 3 0.0162 0.8801 0.000 0.000 0.996 0.000 0.004
#> SRR650145 3 0.0162 0.8786 0.000 0.000 0.996 0.000 0.004
#> SRR650146 3 0.0162 0.8786 0.000 0.000 0.996 0.000 0.004
#> SRR650148 3 0.3814 0.7374 0.000 0.000 0.720 0.004 0.276
#> SRR650149 3 0.3838 0.7345 0.000 0.000 0.716 0.004 0.280
#> SRR650151 3 0.0451 0.8759 0.000 0.008 0.988 0.000 0.004
#> SRR650152 3 0.0771 0.8695 0.000 0.020 0.976 0.000 0.004
#> SRR650154 3 0.4416 0.4863 0.000 0.356 0.632 0.000 0.012
#> SRR650155 3 0.4494 0.4440 0.000 0.380 0.608 0.000 0.012
#> SRR650157 3 0.0162 0.8800 0.000 0.000 0.996 0.000 0.004
#> SRR650158 3 0.0162 0.8800 0.000 0.000 0.996 0.000 0.004
#> SRR650160 5 0.3877 0.2559 0.000 0.212 0.024 0.000 0.764
#> SRR650161 5 0.4206 0.1929 0.000 0.272 0.020 0.000 0.708
#> SRR650163 3 0.1410 0.8650 0.000 0.000 0.940 0.000 0.060
#> SRR650164 3 0.1544 0.8617 0.000 0.000 0.932 0.000 0.068
#> SRR650169 3 0.4557 0.5047 0.000 0.000 0.516 0.008 0.476
#> SRR650170 3 0.4557 0.5047 0.000 0.000 0.516 0.008 0.476
#> SRR650172 3 0.0162 0.8801 0.000 0.000 0.996 0.000 0.004
#> SRR650173 3 0.0162 0.8801 0.000 0.000 0.996 0.000 0.004
#> SRR650174 3 0.0794 0.8768 0.000 0.000 0.972 0.000 0.028
#> SRR650175 3 0.0794 0.8768 0.000 0.000 0.972 0.000 0.028
#> SRR650178 2 0.0290 0.6943 0.000 0.992 0.000 0.000 0.008
#> SRR650182 2 0.0290 0.6943 0.000 0.992 0.000 0.000 0.008
#> SRR650186 3 0.3814 0.7375 0.000 0.000 0.720 0.004 0.276
#> SRR650187 3 0.3814 0.7375 0.000 0.000 0.720 0.004 0.276
#> SRR650189 3 0.0290 0.8799 0.000 0.000 0.992 0.000 0.008
#> SRR650190 3 0.0290 0.8799 0.000 0.000 0.992 0.000 0.008
#> SRR650193 5 0.6445 0.4908 0.000 0.288 0.000 0.216 0.496
#> SRR650194 5 0.6458 0.4908 0.000 0.280 0.000 0.224 0.496
#> SRR834560 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.2852 0.7859 0.828 0.000 0.000 0.172 0.000
#> SRR834574 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.9730 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.3534 0.6570 0.744 0.000 0.000 0.256 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.0458 0.8549 0.000 0.000 0.000 0.984 0.016 0.000
#> SRR650134 5 0.3860 0.0484 0.000 0.472 0.000 0.000 0.528 0.000
#> SRR650135 2 0.0790 0.8474 0.000 0.968 0.000 0.000 0.032 0.000
#> SRR650136 5 0.1781 0.8532 0.000 0.008 0.000 0.008 0.924 0.060
#> SRR650137 5 0.1957 0.8648 0.000 0.112 0.000 0.000 0.888 0.000
#> SRR650140 5 0.1327 0.8870 0.000 0.064 0.000 0.000 0.936 0.000
#> SRR650141 4 0.0458 0.8549 0.000 0.000 0.000 0.984 0.016 0.000
#> SRR650144 5 0.2361 0.8128 0.000 0.012 0.000 0.004 0.880 0.104
#> SRR650147 4 0.2306 0.8271 0.000 0.092 0.000 0.888 0.016 0.004
#> SRR650150 5 0.1462 0.8879 0.000 0.056 0.000 0.008 0.936 0.000
#> SRR650153 2 0.3804 0.2708 0.000 0.576 0.000 0.000 0.424 0.000
#> SRR650156 2 0.1471 0.8344 0.000 0.932 0.000 0.000 0.064 0.004
#> SRR650159 5 0.1327 0.8872 0.000 0.064 0.000 0.000 0.936 0.000
#> SRR650162 5 0.1007 0.8884 0.000 0.044 0.000 0.000 0.956 0.000
#> SRR650168 4 0.0547 0.8549 0.000 0.000 0.000 0.980 0.020 0.000
#> SRR650166 5 0.2048 0.8590 0.000 0.120 0.000 0.000 0.880 0.000
#> SRR650167 2 0.0547 0.8480 0.000 0.980 0.000 0.000 0.020 0.000
#> SRR650171 5 0.0653 0.8838 0.000 0.012 0.000 0.004 0.980 0.004
#> SRR650165 5 0.1863 0.8698 0.000 0.104 0.000 0.000 0.896 0.000
#> SRR650176 5 0.1168 0.8737 0.000 0.000 0.000 0.028 0.956 0.016
#> SRR650177 5 0.1168 0.8737 0.000 0.000 0.000 0.028 0.956 0.016
#> SRR650180 5 0.2219 0.7878 0.000 0.000 0.000 0.136 0.864 0.000
#> SRR650179 5 0.3529 0.7054 0.000 0.208 0.000 0.000 0.764 0.028
#> SRR650181 2 0.0146 0.8440 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR650183 2 0.5447 0.6104 0.000 0.680 0.000 0.116 0.088 0.116
#> SRR650184 4 0.4277 0.7208 0.000 0.000 0.000 0.700 0.064 0.236
#> SRR650185 4 0.4354 0.7156 0.000 0.000 0.000 0.692 0.068 0.240
#> SRR650188 2 0.0260 0.8449 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR650191 4 0.1814 0.8203 0.000 0.000 0.000 0.900 0.000 0.100
#> SRR650192 4 0.3023 0.7177 0.000 0.000 0.000 0.768 0.232 0.000
#> SRR650195 4 0.5032 0.6701 0.000 0.008 0.000 0.636 0.096 0.260
#> SRR650198 2 0.4276 0.3050 0.000 0.564 0.000 0.000 0.416 0.020
#> SRR650200 2 0.0865 0.8467 0.000 0.964 0.000 0.000 0.036 0.000
#> SRR650196 2 0.0865 0.8340 0.000 0.964 0.000 0.000 0.036 0.000
#> SRR650197 2 0.3867 0.0177 0.000 0.512 0.000 0.000 0.488 0.000
#> SRR650201 2 0.0603 0.8468 0.000 0.980 0.000 0.000 0.016 0.004
#> SRR650203 2 0.4071 0.5408 0.000 0.672 0.000 0.304 0.020 0.004
#> SRR650204 5 0.2378 0.8300 0.000 0.152 0.000 0.000 0.848 0.000
#> SRR650202 4 0.2263 0.8277 0.000 0.016 0.000 0.884 0.100 0.000
#> SRR650130 2 0.0777 0.8407 0.000 0.972 0.000 0.000 0.024 0.004
#> SRR650131 4 0.2308 0.8293 0.000 0.068 0.000 0.892 0.040 0.000
#> SRR650132 2 0.1501 0.8312 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR650133 4 0.0622 0.8540 0.000 0.008 0.000 0.980 0.012 0.000
#> SRR650138 3 0.0000 0.8793 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650139 3 0.0000 0.8793 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650142 3 0.1765 0.8374 0.000 0.000 0.904 0.000 0.000 0.096
#> SRR650143 3 0.1765 0.8374 0.000 0.000 0.904 0.000 0.000 0.096
#> SRR650145 3 0.0000 0.8793 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650146 3 0.0000 0.8793 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650148 6 0.3023 0.7774 0.000 0.004 0.212 0.000 0.000 0.784
#> SRR650149 6 0.2994 0.7798 0.000 0.004 0.208 0.000 0.000 0.788
#> SRR650151 3 0.0000 0.8793 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650152 3 0.0260 0.8776 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR650154 3 0.2034 0.8205 0.000 0.060 0.912 0.004 0.024 0.000
#> SRR650155 3 0.2034 0.8205 0.000 0.060 0.912 0.004 0.024 0.000
#> SRR650157 3 0.0146 0.8797 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650158 3 0.0146 0.8797 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650160 6 0.1267 0.7685 0.000 0.060 0.000 0.000 0.000 0.940
#> SRR650161 6 0.1327 0.7667 0.000 0.064 0.000 0.000 0.000 0.936
#> SRR650163 3 0.2883 0.7060 0.000 0.000 0.788 0.000 0.000 0.212
#> SRR650164 3 0.2941 0.6958 0.000 0.000 0.780 0.000 0.000 0.220
#> SRR650169 6 0.0405 0.7734 0.000 0.000 0.008 0.004 0.000 0.988
#> SRR650170 6 0.0405 0.7734 0.000 0.000 0.008 0.004 0.000 0.988
#> SRR650172 3 0.0865 0.8754 0.000 0.000 0.964 0.000 0.000 0.036
#> SRR650173 3 0.0937 0.8741 0.000 0.000 0.960 0.000 0.000 0.040
#> SRR650174 3 0.5238 0.3892 0.000 0.268 0.592 0.000 0.000 0.140
#> SRR650175 3 0.5209 0.2100 0.000 0.416 0.492 0.000 0.000 0.092
#> SRR650178 2 0.0508 0.8458 0.000 0.984 0.000 0.004 0.012 0.000
#> SRR650182 2 0.0603 0.8464 0.000 0.980 0.000 0.004 0.016 0.000
#> SRR650186 6 0.3428 0.6803 0.000 0.000 0.304 0.000 0.000 0.696
#> SRR650187 6 0.3428 0.6805 0.000 0.000 0.304 0.000 0.000 0.696
#> SRR650189 3 0.0937 0.8739 0.000 0.000 0.960 0.000 0.000 0.040
#> SRR650190 3 0.0937 0.8739 0.000 0.000 0.960 0.000 0.000 0.040
#> SRR650193 5 0.1421 0.8855 0.000 0.028 0.000 0.028 0.944 0.000
#> SRR650194 5 0.1492 0.8833 0.000 0.024 0.000 0.036 0.940 0.000
#> SRR834560 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0291 0.9796 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR834562 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0291 0.9796 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR834564 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0291 0.9796 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR834566 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0146 0.9810 0.996 0.000 0.000 0.000 0.004 0.000
#> SRR834570 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0767 0.9682 0.976 0.000 0.000 0.012 0.004 0.008
#> SRR834574 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0291 0.9796 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR834576 1 0.0000 0.9821 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.3329 0.6762 0.756 0.000 0.000 0.236 0.004 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", "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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'hclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.3419 0.659 0.659
#> 3 3 0.666 0.876 0.872 0.3023 0.977 0.965
#> 4 4 0.832 0.950 0.971 0.4825 0.693 0.517
#> 5 5 0.802 0.925 0.954 0.0141 0.997 0.990
#> 6 6 0.859 0.911 0.943 0.0658 0.974 0.920
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
#> SRR650205 2 0 1 0 1
#> SRR650134 2 0 1 0 1
#> SRR650135 2 0 1 0 1
#> SRR650136 2 0 1 0 1
#> SRR650137 2 0 1 0 1
#> SRR650140 2 0 1 0 1
#> SRR650141 2 0 1 0 1
#> SRR650144 2 0 1 0 1
#> SRR650147 2 0 1 0 1
#> SRR650150 2 0 1 0 1
#> SRR650153 2 0 1 0 1
#> SRR650156 2 0 1 0 1
#> SRR650159 2 0 1 0 1
#> SRR650162 2 0 1 0 1
#> SRR650168 2 0 1 0 1
#> SRR650166 2 0 1 0 1
#> SRR650167 2 0 1 0 1
#> SRR650171 2 0 1 0 1
#> SRR650165 2 0 1 0 1
#> SRR650176 2 0 1 0 1
#> SRR650177 2 0 1 0 1
#> SRR650180 2 0 1 0 1
#> SRR650179 2 0 1 0 1
#> SRR650181 2 0 1 0 1
#> SRR650183 2 0 1 0 1
#> SRR650184 2 0 1 0 1
#> SRR650185 2 0 1 0 1
#> SRR650188 2 0 1 0 1
#> SRR650191 2 0 1 0 1
#> SRR650192 2 0 1 0 1
#> SRR650195 2 0 1 0 1
#> SRR650198 2 0 1 0 1
#> SRR650200 2 0 1 0 1
#> SRR650196 2 0 1 0 1
#> SRR650197 2 0 1 0 1
#> SRR650201 2 0 1 0 1
#> SRR650203 2 0 1 0 1
#> SRR650204 2 0 1 0 1
#> SRR650202 2 0 1 0 1
#> SRR650130 2 0 1 0 1
#> SRR650131 2 0 1 0 1
#> SRR650132 2 0 1 0 1
#> SRR650133 2 0 1 0 1
#> SRR650138 2 0 1 0 1
#> SRR650139 2 0 1 0 1
#> SRR650142 2 0 1 0 1
#> SRR650143 2 0 1 0 1
#> SRR650145 2 0 1 0 1
#> SRR650146 2 0 1 0 1
#> SRR650148 2 0 1 0 1
#> SRR650149 2 0 1 0 1
#> SRR650151 2 0 1 0 1
#> SRR650152 2 0 1 0 1
#> SRR650154 2 0 1 0 1
#> SRR650155 2 0 1 0 1
#> SRR650157 2 0 1 0 1
#> SRR650158 2 0 1 0 1
#> SRR650160 1 0 1 1 0
#> SRR650161 1 0 1 1 0
#> SRR650163 2 0 1 0 1
#> SRR650164 2 0 1 0 1
#> SRR650169 2 0 1 0 1
#> SRR650170 2 0 1 0 1
#> SRR650172 2 0 1 0 1
#> SRR650173 2 0 1 0 1
#> SRR650174 2 0 1 0 1
#> SRR650175 2 0 1 0 1
#> SRR650178 2 0 1 0 1
#> SRR650182 2 0 1 0 1
#> SRR650186 2 0 1 0 1
#> SRR650187 2 0 1 0 1
#> SRR650189 2 0 1 0 1
#> SRR650190 2 0 1 0 1
#> SRR650193 2 0 1 0 1
#> SRR650194 2 0 1 0 1
#> SRR834560 1 0 1 1 0
#> SRR834561 1 0 1 1 0
#> SRR834562 1 0 1 1 0
#> SRR834563 1 0 1 1 0
#> SRR834564 1 0 1 1 0
#> SRR834565 1 0 1 1 0
#> SRR834566 1 0 1 1 0
#> SRR834567 1 0 1 1 0
#> SRR834568 1 0 1 1 0
#> SRR834569 1 0 1 1 0
#> SRR834570 1 0 1 1 0
#> SRR834571 1 0 1 1 0
#> SRR834572 1 0 1 1 0
#> SRR834573 1 0 1 1 0
#> SRR834574 1 0 1 1 0
#> SRR834575 1 0 1 1 0
#> SRR834576 1 0 1 1 0
#> SRR834577 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650134 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650135 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650136 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650137 2 0.0424 0.825 0.000 0.992 0.008
#> SRR650140 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650141 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650144 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650147 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650150 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650153 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650156 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650159 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650162 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650168 2 0.0237 0.827 0.000 0.996 0.004
#> SRR650166 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650167 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650171 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650165 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650176 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650177 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650180 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650179 2 0.0237 0.827 0.000 0.996 0.004
#> SRR650181 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650183 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650184 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650185 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650188 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650191 2 0.5178 0.868 0.000 0.744 0.256
#> SRR650192 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650195 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650198 2 0.0237 0.827 0.000 0.996 0.004
#> SRR650200 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650196 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650197 2 0.0424 0.825 0.000 0.992 0.008
#> SRR650201 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650203 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650204 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650202 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650130 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650131 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650132 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650133 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650138 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650139 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650142 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650143 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650145 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650146 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650148 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650149 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650151 2 0.5327 0.870 0.000 0.728 0.272
#> SRR650152 2 0.5327 0.870 0.000 0.728 0.272
#> SRR650154 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650155 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650157 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650158 2 0.0747 0.820 0.000 0.984 0.016
#> SRR650160 3 0.5497 0.965 0.292 0.000 0.708
#> SRR650161 3 0.5497 0.965 0.292 0.000 0.708
#> SRR650163 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650164 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650169 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650170 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650172 2 0.0237 0.827 0.000 0.996 0.004
#> SRR650173 2 0.0237 0.827 0.000 0.996 0.004
#> SRR650174 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650175 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650178 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650182 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650186 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650187 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650189 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650190 2 0.0000 0.828 0.000 1.000 0.000
#> SRR650193 2 0.5363 0.870 0.000 0.724 0.276
#> SRR650194 2 0.5363 0.870 0.000 0.724 0.276
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834561 3 0.5497 0.965 0.292 0.000 0.708
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834563 3 0.5497 0.965 0.292 0.000 0.708
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834565 3 0.6305 0.628 0.484 0.000 0.516
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834569 3 0.5497 0.965 0.292 0.000 0.708
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834573 3 0.5497 0.965 0.292 0.000 0.708
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834575 3 0.5497 0.965 0.292 0.000 0.708
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000
#> SRR834577 3 0.5497 0.965 0.292 0.000 0.708
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650134 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650135 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650136 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650137 3 0.0469 0.914 0.00 0.012 0.988 0.00
#> SRR650140 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650141 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650144 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650147 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650150 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650153 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650156 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650159 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650162 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650168 3 0.0592 0.915 0.00 0.016 0.984 0.00
#> SRR650166 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650167 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650171 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650165 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650176 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650177 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650180 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650179 3 0.0592 0.915 0.00 0.016 0.984 0.00
#> SRR650181 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650183 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650184 2 0.0592 0.977 0.00 0.984 0.016 0.00
#> SRR650185 2 0.0592 0.977 0.00 0.984 0.016 0.00
#> SRR650188 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650191 2 0.3726 0.699 0.00 0.788 0.212 0.00
#> SRR650192 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650195 2 0.0592 0.977 0.00 0.984 0.016 0.00
#> SRR650198 3 0.0592 0.915 0.00 0.016 0.984 0.00
#> SRR650200 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650196 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650197 3 0.0469 0.914 0.00 0.012 0.988 0.00
#> SRR650201 2 0.0469 0.980 0.00 0.988 0.012 0.00
#> SRR650203 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650204 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650202 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650130 3 0.3688 0.804 0.00 0.208 0.792 0.00
#> SRR650131 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650132 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650133 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650138 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650139 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650142 3 0.2760 0.894 0.00 0.128 0.872 0.00
#> SRR650143 3 0.2760 0.894 0.00 0.128 0.872 0.00
#> SRR650145 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650146 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650148 3 0.3074 0.876 0.00 0.152 0.848 0.00
#> SRR650149 3 0.3074 0.876 0.00 0.152 0.848 0.00
#> SRR650151 2 0.0707 0.972 0.00 0.980 0.020 0.00
#> SRR650152 2 0.0707 0.972 0.00 0.980 0.020 0.00
#> SRR650154 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650155 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650157 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650158 3 0.0000 0.908 0.00 0.000 1.000 0.00
#> SRR650160 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR650161 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR650163 3 0.1557 0.915 0.00 0.056 0.944 0.00
#> SRR650164 3 0.1557 0.915 0.00 0.056 0.944 0.00
#> SRR650169 3 0.3074 0.876 0.00 0.152 0.848 0.00
#> SRR650170 3 0.3074 0.876 0.00 0.152 0.848 0.00
#> SRR650172 3 0.1302 0.917 0.00 0.044 0.956 0.00
#> SRR650173 3 0.1302 0.917 0.00 0.044 0.956 0.00
#> SRR650174 3 0.3074 0.876 0.00 0.152 0.848 0.00
#> SRR650175 3 0.3074 0.876 0.00 0.152 0.848 0.00
#> SRR650178 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650182 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650186 3 0.2589 0.899 0.00 0.116 0.884 0.00
#> SRR650187 3 0.2589 0.899 0.00 0.116 0.884 0.00
#> SRR650189 3 0.2704 0.896 0.00 0.124 0.876 0.00
#> SRR650190 3 0.2704 0.896 0.00 0.124 0.876 0.00
#> SRR650193 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR650194 2 0.0000 0.991 0.00 1.000 0.000 0.00
#> SRR834560 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834561 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR834562 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834563 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR834564 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834565 4 0.4134 0.649 0.26 0.000 0.000 0.74
#> SRR834566 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834567 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834568 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834569 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR834570 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834571 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834572 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834573 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR834574 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834575 4 0.0000 0.967 0.00 0.000 0.000 1.00
#> SRR834576 1 0.0000 1.000 1.00 0.000 0.000 0.00
#> SRR834577 4 0.0000 0.967 0.00 0.000 0.000 1.00
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650134 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650135 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650136 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650137 3 0.1942 0.849 0.00 0.068 0.920 0.012 0.00
#> SRR650140 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650141 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650144 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650147 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650150 3 0.3274 0.715 0.00 0.220 0.780 0.000 0.00
#> SRR650153 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650156 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650159 3 0.3274 0.715 0.00 0.220 0.780 0.000 0.00
#> SRR650162 3 0.3274 0.715 0.00 0.220 0.780 0.000 0.00
#> SRR650168 3 0.1469 0.865 0.00 0.036 0.948 0.016 0.00
#> SRR650166 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650167 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650171 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650165 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650176 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650177 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650180 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650179 3 0.1469 0.865 0.00 0.036 0.948 0.016 0.00
#> SRR650181 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650183 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650184 4 0.0510 0.975 0.00 0.000 0.016 0.984 0.00
#> SRR650185 4 0.0510 0.975 0.00 0.000 0.016 0.984 0.00
#> SRR650188 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650191 4 0.3210 0.679 0.00 0.000 0.212 0.788 0.00
#> SRR650192 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650195 4 0.0510 0.975 0.00 0.000 0.016 0.984 0.00
#> SRR650198 3 0.1469 0.865 0.00 0.036 0.948 0.016 0.00
#> SRR650200 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650196 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650197 3 0.1942 0.849 0.00 0.068 0.920 0.012 0.00
#> SRR650201 4 0.0404 0.979 0.00 0.000 0.012 0.988 0.00
#> SRR650203 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650204 3 0.3274 0.715 0.00 0.220 0.780 0.000 0.00
#> SRR650202 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650130 3 0.3177 0.768 0.00 0.000 0.792 0.208 0.00
#> SRR650131 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650132 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650133 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650138 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.00
#> SRR650139 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.00
#> SRR650142 3 0.2377 0.861 0.00 0.000 0.872 0.128 0.00
#> SRR650143 3 0.2377 0.861 0.00 0.000 0.872 0.128 0.00
#> SRR650145 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.00
#> SRR650146 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.00
#> SRR650148 3 0.2648 0.844 0.00 0.000 0.848 0.152 0.00
#> SRR650149 3 0.2648 0.844 0.00 0.000 0.848 0.152 0.00
#> SRR650151 4 0.0609 0.970 0.00 0.000 0.020 0.980 0.00
#> SRR650152 4 0.0609 0.970 0.00 0.000 0.020 0.980 0.00
#> SRR650154 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650155 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650157 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.00
#> SRR650158 3 0.0000 0.863 0.00 0.000 1.000 0.000 0.00
#> SRR650160 2 0.3274 1.000 0.00 0.780 0.000 0.000 0.22
#> SRR650161 2 0.3274 1.000 0.00 0.780 0.000 0.000 0.22
#> SRR650163 3 0.1341 0.877 0.00 0.000 0.944 0.056 0.00
#> SRR650164 3 0.1341 0.877 0.00 0.000 0.944 0.056 0.00
#> SRR650169 3 0.2648 0.844 0.00 0.000 0.848 0.152 0.00
#> SRR650170 3 0.2648 0.844 0.00 0.000 0.848 0.152 0.00
#> SRR650172 3 0.1121 0.877 0.00 0.000 0.956 0.044 0.00
#> SRR650173 3 0.1121 0.877 0.00 0.000 0.956 0.044 0.00
#> SRR650174 3 0.2648 0.844 0.00 0.000 0.848 0.152 0.00
#> SRR650175 3 0.2648 0.844 0.00 0.000 0.848 0.152 0.00
#> SRR650178 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650182 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650186 3 0.2230 0.867 0.00 0.000 0.884 0.116 0.00
#> SRR650187 3 0.2230 0.867 0.00 0.000 0.884 0.116 0.00
#> SRR650189 3 0.2329 0.863 0.00 0.000 0.876 0.124 0.00
#> SRR650190 3 0.2329 0.863 0.00 0.000 0.876 0.124 0.00
#> SRR650193 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR650194 4 0.0000 0.990 0.00 0.000 0.000 1.000 0.00
#> SRR834560 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834561 5 0.0000 0.919 0.00 0.000 0.000 0.000 1.00
#> SRR834562 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834563 5 0.0000 0.919 0.00 0.000 0.000 0.000 1.00
#> SRR834564 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834565 5 0.3561 0.467 0.26 0.000 0.000 0.000 0.74
#> SRR834566 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834567 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834568 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834569 5 0.0000 0.919 0.00 0.000 0.000 0.000 1.00
#> SRR834570 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834571 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834572 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834573 5 0.0000 0.919 0.00 0.000 0.000 0.000 1.00
#> SRR834574 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834575 5 0.0000 0.919 0.00 0.000 0.000 0.000 1.00
#> SRR834576 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.00
#> SRR834577 5 0.0000 0.919 0.00 0.000 0.000 0.000 1.00
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650134 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650135 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650136 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650137 3 0.3221 0.747 0.00 0.264 0.736 0.000 0.000 0
#> SRR650140 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650141 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650144 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650147 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650150 2 0.0458 1.000 0.00 0.984 0.016 0.000 0.000 0
#> SRR650153 4 0.0547 0.952 0.00 0.000 0.020 0.980 0.000 0
#> SRR650156 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650159 2 0.0458 1.000 0.00 0.984 0.016 0.000 0.000 0
#> SRR650162 2 0.0458 1.000 0.00 0.984 0.016 0.000 0.000 0
#> SRR650168 3 0.2527 0.834 0.00 0.168 0.832 0.000 0.000 0
#> SRR650166 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650167 4 0.0713 0.949 0.00 0.000 0.028 0.972 0.000 0
#> SRR650171 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650165 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650176 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650177 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650180 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650179 3 0.2527 0.834 0.00 0.168 0.832 0.000 0.000 0
#> SRR650181 4 0.1075 0.939 0.00 0.000 0.048 0.952 0.000 0
#> SRR650183 4 0.1327 0.932 0.00 0.000 0.064 0.936 0.000 0
#> SRR650184 4 0.1910 0.901 0.00 0.000 0.108 0.892 0.000 0
#> SRR650185 4 0.1910 0.901 0.00 0.000 0.108 0.892 0.000 0
#> SRR650188 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650191 4 0.3499 0.575 0.00 0.000 0.320 0.680 0.000 0
#> SRR650192 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650195 4 0.2048 0.890 0.00 0.000 0.120 0.880 0.000 0
#> SRR650198 3 0.2527 0.834 0.00 0.168 0.832 0.000 0.000 0
#> SRR650200 4 0.0713 0.949 0.00 0.000 0.028 0.972 0.000 0
#> SRR650196 4 0.1610 0.918 0.00 0.000 0.084 0.916 0.000 0
#> SRR650197 3 0.3221 0.747 0.00 0.264 0.736 0.000 0.000 0
#> SRR650201 4 0.1814 0.908 0.00 0.000 0.100 0.900 0.000 0
#> SRR650203 4 0.1910 0.901 0.00 0.000 0.108 0.892 0.000 0
#> SRR650204 2 0.0458 1.000 0.00 0.984 0.016 0.000 0.000 0
#> SRR650202 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650130 3 0.1610 0.794 0.00 0.000 0.916 0.084 0.000 0
#> SRR650131 4 0.1910 0.901 0.00 0.000 0.108 0.892 0.000 0
#> SRR650132 4 0.1910 0.901 0.00 0.000 0.108 0.892 0.000 0
#> SRR650133 4 0.1910 0.901 0.00 0.000 0.108 0.892 0.000 0
#> SRR650138 3 0.3126 0.774 0.00 0.248 0.752 0.000 0.000 0
#> SRR650139 3 0.3126 0.774 0.00 0.248 0.752 0.000 0.000 0
#> SRR650142 3 0.0146 0.869 0.00 0.000 0.996 0.004 0.000 0
#> SRR650143 3 0.0146 0.869 0.00 0.000 0.996 0.004 0.000 0
#> SRR650145 3 0.3126 0.774 0.00 0.248 0.752 0.000 0.000 0
#> SRR650146 3 0.3126 0.774 0.00 0.248 0.752 0.000 0.000 0
#> SRR650148 3 0.0713 0.860 0.00 0.000 0.972 0.028 0.000 0
#> SRR650149 3 0.0713 0.860 0.00 0.000 0.972 0.028 0.000 0
#> SRR650151 4 0.0713 0.944 0.00 0.000 0.028 0.972 0.000 0
#> SRR650152 4 0.0713 0.944 0.00 0.000 0.028 0.972 0.000 0
#> SRR650154 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650155 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650157 3 0.3126 0.774 0.00 0.248 0.752 0.000 0.000 0
#> SRR650158 3 0.3126 0.774 0.00 0.248 0.752 0.000 0.000 0
#> SRR650160 6 0.0000 1.000 0.00 0.000 0.000 0.000 0.000 1
#> SRR650161 6 0.0000 1.000 0.00 0.000 0.000 0.000 0.000 1
#> SRR650163 3 0.1387 0.869 0.00 0.068 0.932 0.000 0.000 0
#> SRR650164 3 0.1387 0.869 0.00 0.068 0.932 0.000 0.000 0
#> SRR650169 3 0.0713 0.860 0.00 0.000 0.972 0.028 0.000 0
#> SRR650170 3 0.0713 0.860 0.00 0.000 0.972 0.028 0.000 0
#> SRR650172 3 0.1714 0.864 0.00 0.092 0.908 0.000 0.000 0
#> SRR650173 3 0.1714 0.864 0.00 0.092 0.908 0.000 0.000 0
#> SRR650174 3 0.0713 0.860 0.00 0.000 0.972 0.028 0.000 0
#> SRR650175 3 0.0713 0.860 0.00 0.000 0.972 0.028 0.000 0
#> SRR650178 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650182 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650186 3 0.0260 0.871 0.00 0.008 0.992 0.000 0.000 0
#> SRR650187 3 0.0260 0.871 0.00 0.008 0.992 0.000 0.000 0
#> SRR650189 3 0.0291 0.870 0.00 0.004 0.992 0.004 0.000 0
#> SRR650190 3 0.0291 0.870 0.00 0.004 0.992 0.004 0.000 0
#> SRR650193 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR650194 4 0.0000 0.959 0.00 0.000 0.000 1.000 0.000 0
#> SRR834560 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834561 5 0.0458 0.927 0.00 0.016 0.000 0.000 0.984 0
#> SRR834562 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834563 5 0.0458 0.927 0.00 0.016 0.000 0.000 0.984 0
#> SRR834564 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834565 5 0.3629 0.578 0.26 0.016 0.000 0.000 0.724 0
#> SRR834566 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834567 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834568 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834569 5 0.0000 0.931 0.00 0.000 0.000 0.000 1.000 0
#> SRR834570 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834571 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834572 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834573 5 0.0000 0.931 0.00 0.000 0.000 0.000 1.000 0
#> SRR834574 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834575 5 0.0000 0.931 0.00 0.000 0.000 0.000 1.000 0
#> SRR834576 1 0.0000 1.000 1.00 0.000 0.000 0.000 0.000 0
#> SRR834577 5 0.0000 0.931 0.00 0.000 0.000 0.000 1.000 0
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.3419 0.659 0.659
#> 3 3 0.797 0.902 0.944 0.8252 0.670 0.510
#> 4 4 0.628 0.630 0.742 0.1454 0.941 0.835
#> 5 5 0.657 0.532 0.688 0.0734 0.810 0.467
#> 6 6 0.715 0.679 0.684 0.0562 0.933 0.729
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
#> SRR650205 2 0 1 0 1
#> SRR650134 2 0 1 0 1
#> SRR650135 2 0 1 0 1
#> SRR650136 2 0 1 0 1
#> SRR650137 2 0 1 0 1
#> SRR650140 2 0 1 0 1
#> SRR650141 2 0 1 0 1
#> SRR650144 2 0 1 0 1
#> SRR650147 2 0 1 0 1
#> SRR650150 2 0 1 0 1
#> SRR650153 2 0 1 0 1
#> SRR650156 2 0 1 0 1
#> SRR650159 2 0 1 0 1
#> SRR650162 2 0 1 0 1
#> SRR650168 2 0 1 0 1
#> SRR650166 2 0 1 0 1
#> SRR650167 2 0 1 0 1
#> SRR650171 2 0 1 0 1
#> SRR650165 2 0 1 0 1
#> SRR650176 2 0 1 0 1
#> SRR650177 2 0 1 0 1
#> SRR650180 2 0 1 0 1
#> SRR650179 2 0 1 0 1
#> SRR650181 2 0 1 0 1
#> SRR650183 2 0 1 0 1
#> SRR650184 2 0 1 0 1
#> SRR650185 2 0 1 0 1
#> SRR650188 2 0 1 0 1
#> SRR650191 2 0 1 0 1
#> SRR650192 2 0 1 0 1
#> SRR650195 2 0 1 0 1
#> SRR650198 2 0 1 0 1
#> SRR650200 2 0 1 0 1
#> SRR650196 2 0 1 0 1
#> SRR650197 2 0 1 0 1
#> SRR650201 2 0 1 0 1
#> SRR650203 2 0 1 0 1
#> SRR650204 2 0 1 0 1
#> SRR650202 2 0 1 0 1
#> SRR650130 2 0 1 0 1
#> SRR650131 2 0 1 0 1
#> SRR650132 2 0 1 0 1
#> SRR650133 2 0 1 0 1
#> SRR650138 2 0 1 0 1
#> SRR650139 2 0 1 0 1
#> SRR650142 2 0 1 0 1
#> SRR650143 2 0 1 0 1
#> SRR650145 2 0 1 0 1
#> SRR650146 2 0 1 0 1
#> SRR650148 2 0 1 0 1
#> SRR650149 2 0 1 0 1
#> SRR650151 2 0 1 0 1
#> SRR650152 2 0 1 0 1
#> SRR650154 2 0 1 0 1
#> SRR650155 2 0 1 0 1
#> SRR650157 2 0 1 0 1
#> SRR650158 2 0 1 0 1
#> SRR650160 1 0 1 1 0
#> SRR650161 1 0 1 1 0
#> SRR650163 2 0 1 0 1
#> SRR650164 2 0 1 0 1
#> SRR650169 2 0 1 0 1
#> SRR650170 2 0 1 0 1
#> SRR650172 2 0 1 0 1
#> SRR650173 2 0 1 0 1
#> SRR650174 2 0 1 0 1
#> SRR650175 2 0 1 0 1
#> SRR650178 2 0 1 0 1
#> SRR650182 2 0 1 0 1
#> SRR650186 2 0 1 0 1
#> SRR650187 2 0 1 0 1
#> SRR650189 2 0 1 0 1
#> SRR650190 2 0 1 0 1
#> SRR650193 2 0 1 0 1
#> SRR650194 2 0 1 0 1
#> SRR834560 1 0 1 1 0
#> SRR834561 1 0 1 1 0
#> SRR834562 1 0 1 1 0
#> SRR834563 1 0 1 1 0
#> SRR834564 1 0 1 1 0
#> SRR834565 1 0 1 1 0
#> SRR834566 1 0 1 1 0
#> SRR834567 1 0 1 1 0
#> SRR834568 1 0 1 1 0
#> SRR834569 1 0 1 1 0
#> SRR834570 1 0 1 1 0
#> SRR834571 1 0 1 1 0
#> SRR834572 1 0 1 1 0
#> SRR834573 1 0 1 1 0
#> SRR834574 1 0 1 1 0
#> SRR834575 1 0 1 1 0
#> SRR834576 1 0 1 1 0
#> SRR834577 1 0 1 1 0
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650134 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650135 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650136 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650137 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650140 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650141 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650144 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650147 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650150 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650153 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650156 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650159 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650162 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650168 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650166 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650167 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650171 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650165 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650176 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650177 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650180 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650179 3 0.5016 0.754 0.000 0.240 0.760
#> SRR650181 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650183 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650184 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650185 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650188 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650191 2 0.3816 0.796 0.000 0.852 0.148
#> SRR650192 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650195 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650198 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650200 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650196 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650197 3 0.1289 0.874 0.000 0.032 0.968
#> SRR650201 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650203 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650204 3 0.0424 0.856 0.000 0.008 0.992
#> SRR650202 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650130 3 0.4654 0.777 0.000 0.208 0.792
#> SRR650131 2 0.3116 0.858 0.000 0.892 0.108
#> SRR650132 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650133 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650138 3 0.0592 0.858 0.000 0.012 0.988
#> SRR650139 3 0.0592 0.858 0.000 0.012 0.988
#> SRR650142 3 0.5733 0.664 0.000 0.324 0.676
#> SRR650143 3 0.5733 0.664 0.000 0.324 0.676
#> SRR650145 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650146 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650148 3 0.5733 0.664 0.000 0.324 0.676
#> SRR650149 3 0.5733 0.664 0.000 0.324 0.676
#> SRR650151 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650152 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650154 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650155 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650157 3 0.0592 0.858 0.000 0.012 0.988
#> SRR650158 3 0.0592 0.858 0.000 0.012 0.988
#> SRR650160 1 0.5706 0.650 0.680 0.000 0.320
#> SRR650161 1 0.5706 0.650 0.680 0.000 0.320
#> SRR650163 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650164 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650169 3 0.5363 0.724 0.000 0.276 0.724
#> SRR650170 3 0.5363 0.724 0.000 0.276 0.724
#> SRR650172 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650173 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650174 3 0.5678 0.675 0.000 0.316 0.684
#> SRR650175 3 0.5733 0.664 0.000 0.324 0.676
#> SRR650178 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650182 2 0.0000 0.991 0.000 1.000 0.000
#> SRR650186 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650187 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650189 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650190 3 0.1411 0.875 0.000 0.036 0.964
#> SRR650193 2 0.0237 0.989 0.000 0.996 0.004
#> SRR650194 2 0.0237 0.989 0.000 0.996 0.004
#> SRR834560 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834561 1 0.1289 0.937 0.968 0.000 0.032
#> SRR834562 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834563 1 0.1289 0.937 0.968 0.000 0.032
#> SRR834564 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834565 1 0.1163 0.938 0.972 0.000 0.028
#> SRR834566 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834567 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834568 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834569 3 0.5465 0.426 0.288 0.000 0.712
#> SRR834570 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834571 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834572 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834573 1 0.5254 0.728 0.736 0.000 0.264
#> SRR834574 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834575 1 0.1289 0.937 0.968 0.000 0.032
#> SRR834576 1 0.0000 0.945 1.000 0.000 0.000
#> SRR834577 3 0.0237 0.845 0.004 0.000 0.996
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650134 2 0.2149 0.793 0.000 0.912 0.000 0.088
#> SRR650135 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650136 2 0.3400 0.750 0.000 0.820 0.000 0.180
#> SRR650137 4 0.4761 0.709 0.000 0.000 0.372 0.628
#> SRR650140 2 0.3219 0.761 0.000 0.836 0.000 0.164
#> SRR650141 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650144 2 0.3074 0.767 0.000 0.848 0.000 0.152
#> SRR650147 2 0.1792 0.801 0.000 0.932 0.000 0.068
#> SRR650150 4 0.4605 0.711 0.000 0.000 0.336 0.664
#> SRR650153 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650156 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650159 4 0.4746 0.711 0.000 0.000 0.368 0.632
#> SRR650162 4 0.4605 0.711 0.000 0.000 0.336 0.664
#> SRR650168 4 0.4866 0.686 0.000 0.000 0.404 0.596
#> SRR650166 2 0.3266 0.758 0.000 0.832 0.000 0.168
#> SRR650167 2 0.0000 0.815 0.000 1.000 0.000 0.000
#> SRR650171 2 0.3400 0.750 0.000 0.820 0.000 0.180
#> SRR650165 2 0.4283 0.673 0.000 0.740 0.004 0.256
#> SRR650176 2 0.3400 0.750 0.000 0.820 0.000 0.180
#> SRR650177 2 0.3400 0.750 0.000 0.820 0.000 0.180
#> SRR650180 2 0.2011 0.796 0.000 0.920 0.000 0.080
#> SRR650179 4 0.6652 0.473 0.000 0.088 0.396 0.516
#> SRR650181 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650183 2 0.3494 0.767 0.000 0.824 0.172 0.004
#> SRR650184 2 0.4936 0.676 0.000 0.672 0.316 0.012
#> SRR650185 2 0.4936 0.676 0.000 0.672 0.316 0.012
#> SRR650188 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650191 2 0.5143 0.483 0.000 0.540 0.456 0.004
#> SRR650192 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650195 2 0.4872 0.642 0.000 0.640 0.356 0.004
#> SRR650198 4 0.4907 0.594 0.000 0.000 0.420 0.580
#> SRR650200 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650196 2 0.4872 0.642 0.000 0.640 0.356 0.004
#> SRR650197 4 0.4866 0.686 0.000 0.000 0.404 0.596
#> SRR650201 2 0.4905 0.634 0.000 0.632 0.364 0.004
#> SRR650203 2 0.4905 0.634 0.000 0.632 0.364 0.004
#> SRR650204 4 0.4661 0.686 0.000 0.000 0.348 0.652
#> SRR650202 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650130 3 0.4888 0.185 0.000 0.036 0.740 0.224
#> SRR650131 2 0.5408 0.554 0.000 0.576 0.408 0.016
#> SRR650132 2 0.0188 0.815 0.000 0.996 0.000 0.004
#> SRR650133 2 0.4905 0.634 0.000 0.632 0.364 0.004
#> SRR650138 3 0.4776 0.120 0.000 0.000 0.624 0.376
#> SRR650139 3 0.4776 0.120 0.000 0.000 0.624 0.376
#> SRR650142 3 0.2408 0.496 0.000 0.104 0.896 0.000
#> SRR650143 3 0.2408 0.496 0.000 0.104 0.896 0.000
#> SRR650145 3 0.4713 0.153 0.000 0.000 0.640 0.360
#> SRR650146 3 0.4713 0.153 0.000 0.000 0.640 0.360
#> SRR650148 3 0.2345 0.499 0.000 0.100 0.900 0.000
#> SRR650149 3 0.2345 0.499 0.000 0.100 0.900 0.000
#> SRR650151 2 0.4936 0.625 0.000 0.624 0.372 0.004
#> SRR650152 2 0.4936 0.625 0.000 0.624 0.372 0.004
#> SRR650154 2 0.3024 0.777 0.000 0.852 0.148 0.000
#> SRR650155 2 0.3024 0.777 0.000 0.852 0.148 0.000
#> SRR650157 3 0.4776 0.120 0.000 0.000 0.624 0.376
#> SRR650158 3 0.4776 0.120 0.000 0.000 0.624 0.376
#> SRR650160 1 0.6148 0.505 0.484 0.000 0.048 0.468
#> SRR650161 1 0.6148 0.505 0.484 0.000 0.048 0.468
#> SRR650163 3 0.4713 0.153 0.000 0.000 0.640 0.360
#> SRR650164 3 0.4713 0.153 0.000 0.000 0.640 0.360
#> SRR650169 3 0.1118 0.505 0.000 0.036 0.964 0.000
#> SRR650170 3 0.1557 0.506 0.000 0.056 0.944 0.000
#> SRR650172 3 0.4624 0.158 0.000 0.000 0.660 0.340
#> SRR650173 3 0.4624 0.158 0.000 0.000 0.660 0.340
#> SRR650174 3 0.2345 0.499 0.000 0.100 0.900 0.000
#> SRR650175 3 0.2345 0.499 0.000 0.100 0.900 0.000
#> SRR650178 2 0.4343 0.715 0.000 0.732 0.264 0.004
#> SRR650182 2 0.4188 0.728 0.000 0.752 0.244 0.004
#> SRR650186 3 0.2760 0.424 0.000 0.000 0.872 0.128
#> SRR650187 3 0.2469 0.444 0.000 0.000 0.892 0.108
#> SRR650189 3 0.1637 0.475 0.000 0.000 0.940 0.060
#> SRR650190 3 0.0000 0.498 0.000 0.000 1.000 0.000
#> SRR650193 2 0.2973 0.772 0.000 0.856 0.000 0.144
#> SRR650194 2 0.2973 0.772 0.000 0.856 0.000 0.144
#> SRR834560 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834561 1 0.3726 0.820 0.788 0.000 0.000 0.212
#> SRR834562 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834563 1 0.3726 0.820 0.788 0.000 0.000 0.212
#> SRR834564 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834565 1 0.3726 0.820 0.788 0.000 0.000 0.212
#> SRR834566 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834569 4 0.7238 0.158 0.160 0.000 0.332 0.508
#> SRR834570 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834573 1 0.5905 0.597 0.564 0.000 0.040 0.396
#> SRR834574 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834575 1 0.3907 0.809 0.768 0.000 0.000 0.232
#> SRR834576 1 0.0000 0.884 1.000 0.000 0.000 0.000
#> SRR834577 4 0.4855 0.170 0.000 0.000 0.400 0.600
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.4251 0.8020 0.000 0.000 0.372 0.624 0.004
#> SRR650134 4 0.4622 0.8046 0.000 0.004 0.240 0.712 0.044
#> SRR650135 4 0.4299 0.7943 0.000 0.000 0.388 0.608 0.004
#> SRR650136 4 0.6251 0.7391 0.000 0.116 0.192 0.640 0.052
#> SRR650137 2 0.1195 0.7329 0.000 0.960 0.012 0.028 0.000
#> SRR650140 4 0.5915 0.7630 0.000 0.080 0.204 0.664 0.052
#> SRR650141 4 0.4251 0.8020 0.000 0.000 0.372 0.624 0.004
#> SRR650144 4 0.5140 0.7929 0.000 0.028 0.212 0.708 0.052
#> SRR650147 4 0.4854 0.8077 0.000 0.000 0.308 0.648 0.044
#> SRR650150 2 0.1116 0.7313 0.000 0.964 0.004 0.028 0.004
#> SRR650153 4 0.4321 0.7934 0.000 0.000 0.396 0.600 0.004
#> SRR650156 4 0.4299 0.7943 0.000 0.000 0.388 0.608 0.004
#> SRR650159 2 0.1195 0.7329 0.000 0.960 0.012 0.028 0.000
#> SRR650162 2 0.1116 0.7313 0.000 0.964 0.004 0.028 0.004
#> SRR650168 2 0.2546 0.6828 0.000 0.904 0.048 0.012 0.036
#> SRR650166 4 0.5651 0.7889 0.000 0.056 0.224 0.672 0.048
#> SRR650167 4 0.4321 0.7928 0.000 0.000 0.396 0.600 0.004
#> SRR650171 4 0.6313 0.7384 0.000 0.116 0.192 0.636 0.056
#> SRR650165 4 0.6595 0.6580 0.000 0.192 0.152 0.604 0.052
#> SRR650176 4 0.6313 0.7384 0.000 0.116 0.192 0.636 0.056
#> SRR650177 4 0.6313 0.7384 0.000 0.116 0.192 0.636 0.056
#> SRR650180 4 0.4113 0.8057 0.000 0.000 0.232 0.740 0.028
#> SRR650179 2 0.3981 0.6118 0.000 0.820 0.028 0.108 0.044
#> SRR650181 4 0.4299 0.7943 0.000 0.000 0.388 0.608 0.004
#> SRR650183 3 0.4688 -0.3577 0.000 0.004 0.616 0.364 0.016
#> SRR650184 3 0.3612 0.4913 0.000 0.004 0.832 0.100 0.064
#> SRR650185 3 0.3612 0.4913 0.000 0.004 0.832 0.100 0.064
#> SRR650188 4 0.4299 0.7943 0.000 0.000 0.388 0.608 0.004
#> SRR650191 3 0.2952 0.5772 0.000 0.036 0.872 0.004 0.088
#> SRR650192 4 0.4251 0.8020 0.000 0.000 0.372 0.624 0.004
#> SRR650195 3 0.1808 0.5095 0.000 0.004 0.936 0.040 0.020
#> SRR650198 2 0.2233 0.5954 0.000 0.892 0.004 0.000 0.104
#> SRR650200 4 0.4310 0.7933 0.000 0.000 0.392 0.604 0.004
#> SRR650196 3 0.1443 0.4953 0.000 0.004 0.948 0.044 0.004
#> SRR650197 2 0.0865 0.7214 0.000 0.972 0.024 0.004 0.000
#> SRR650201 3 0.1787 0.5019 0.000 0.004 0.936 0.044 0.016
#> SRR650203 3 0.0932 0.5261 0.000 0.004 0.972 0.020 0.004
#> SRR650204 2 0.1410 0.6666 0.000 0.940 0.000 0.000 0.060
#> SRR650202 4 0.4251 0.8020 0.000 0.000 0.372 0.624 0.004
#> SRR650130 3 0.5276 0.1356 0.000 0.436 0.516 0.000 0.048
#> SRR650131 3 0.1885 0.5576 0.000 0.032 0.936 0.012 0.020
#> SRR650132 4 0.4410 0.7493 0.000 0.000 0.440 0.556 0.004
#> SRR650133 3 0.1173 0.5414 0.000 0.004 0.964 0.012 0.020
#> SRR650138 5 0.4278 0.8136 0.000 0.452 0.000 0.000 0.548
#> SRR650139 5 0.4278 0.8136 0.000 0.452 0.000 0.000 0.548
#> SRR650142 3 0.5744 0.3697 0.000 0.108 0.572 0.000 0.320
#> SRR650143 3 0.5744 0.3697 0.000 0.108 0.572 0.000 0.320
#> SRR650145 5 0.4489 0.8327 0.000 0.420 0.008 0.000 0.572
#> SRR650146 5 0.4489 0.8327 0.000 0.420 0.008 0.000 0.572
#> SRR650148 3 0.5771 0.3712 0.000 0.112 0.572 0.000 0.316
#> SRR650149 3 0.5771 0.3712 0.000 0.112 0.572 0.000 0.316
#> SRR650151 3 0.1493 0.5384 0.000 0.000 0.948 0.028 0.024
#> SRR650152 3 0.1493 0.5384 0.000 0.000 0.948 0.028 0.024
#> SRR650154 3 0.4264 -0.3744 0.000 0.000 0.620 0.376 0.004
#> SRR650155 3 0.4264 -0.3744 0.000 0.000 0.620 0.376 0.004
#> SRR650157 5 0.4268 0.8240 0.000 0.444 0.000 0.000 0.556
#> SRR650158 5 0.4268 0.8240 0.000 0.444 0.000 0.000 0.556
#> SRR650160 1 0.7381 0.1662 0.504 0.212 0.000 0.068 0.216
#> SRR650161 1 0.7381 0.1662 0.504 0.212 0.000 0.068 0.216
#> SRR650163 5 0.4489 0.8327 0.000 0.420 0.008 0.000 0.572
#> SRR650164 5 0.4489 0.8327 0.000 0.420 0.008 0.000 0.572
#> SRR650169 3 0.5938 0.3357 0.000 0.128 0.552 0.000 0.320
#> SRR650170 3 0.5938 0.3357 0.000 0.128 0.552 0.000 0.320
#> SRR650172 2 0.4977 -0.6850 0.000 0.500 0.028 0.000 0.472
#> SRR650173 2 0.4977 -0.6850 0.000 0.500 0.028 0.000 0.472
#> SRR650174 3 0.5825 0.3623 0.000 0.116 0.564 0.000 0.320
#> SRR650175 3 0.5771 0.3712 0.000 0.112 0.572 0.000 0.316
#> SRR650178 3 0.3366 0.1478 0.000 0.000 0.784 0.212 0.004
#> SRR650182 3 0.3550 0.0635 0.000 0.000 0.760 0.236 0.004
#> SRR650186 5 0.6653 0.1039 0.000 0.228 0.364 0.000 0.408
#> SRR650187 3 0.6417 -0.0182 0.000 0.172 0.424 0.000 0.404
#> SRR650189 3 0.6416 0.1124 0.000 0.180 0.464 0.000 0.356
#> SRR650190 3 0.6206 0.2215 0.000 0.152 0.504 0.000 0.344
#> SRR650193 4 0.5311 0.7905 0.000 0.032 0.216 0.696 0.056
#> SRR650194 4 0.5311 0.7905 0.000 0.032 0.216 0.696 0.056
#> SRR834560 1 0.5923 0.7092 0.572 0.000 0.000 0.140 0.288
#> SRR834561 1 0.0000 0.5940 1.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834563 1 0.0000 0.5940 1.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.5923 0.7092 0.572 0.000 0.000 0.140 0.288
#> SRR834565 1 0.0000 0.5940 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834567 1 0.5923 0.7092 0.572 0.000 0.000 0.140 0.288
#> SRR834568 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834569 1 0.6285 -0.1738 0.456 0.152 0.000 0.000 0.392
#> SRR834570 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834571 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834572 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834573 1 0.5640 0.2101 0.608 0.116 0.000 0.000 0.276
#> SRR834574 1 0.5923 0.7092 0.572 0.000 0.000 0.140 0.288
#> SRR834575 1 0.2286 0.5284 0.888 0.004 0.000 0.000 0.108
#> SRR834576 1 0.5885 0.7098 0.572 0.000 0.000 0.132 0.296
#> SRR834577 1 0.6456 -0.2305 0.428 0.180 0.000 0.000 0.392
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.2058 0.6932 0.000 0.008 0.072 0.908 0.012 0.000
#> SRR650134 4 0.4849 0.6632 0.000 0.188 0.000 0.664 0.148 0.000
#> SRR650135 4 0.1501 0.6916 0.000 0.000 0.076 0.924 0.000 0.000
#> SRR650136 4 0.5593 0.6137 0.000 0.280 0.000 0.536 0.184 0.000
#> SRR650137 2 0.3802 0.9285 0.000 0.676 0.012 0.000 0.000 0.312
#> SRR650140 4 0.5531 0.6234 0.000 0.264 0.000 0.552 0.184 0.000
#> SRR650141 4 0.2058 0.6932 0.000 0.008 0.072 0.908 0.012 0.000
#> SRR650144 4 0.5461 0.6310 0.000 0.248 0.000 0.568 0.184 0.000
#> SRR650147 4 0.4980 0.6885 0.000 0.176 0.040 0.700 0.084 0.000
#> SRR650150 2 0.3938 0.9290 0.000 0.672 0.012 0.000 0.004 0.312
#> SRR650153 4 0.1757 0.6924 0.000 0.008 0.076 0.916 0.000 0.000
#> SRR650156 4 0.1501 0.6916 0.000 0.000 0.076 0.924 0.000 0.000
#> SRR650159 2 0.3938 0.9290 0.000 0.672 0.012 0.000 0.004 0.312
#> SRR650162 2 0.3938 0.9290 0.000 0.672 0.012 0.000 0.004 0.312
#> SRR650168 2 0.5592 0.8335 0.000 0.572 0.092 0.000 0.028 0.308
#> SRR650166 4 0.5298 0.6440 0.000 0.248 0.000 0.592 0.160 0.000
#> SRR650167 4 0.1700 0.6897 0.000 0.000 0.080 0.916 0.004 0.000
#> SRR650171 4 0.5662 0.6113 0.000 0.280 0.000 0.524 0.196 0.000
#> SRR650165 4 0.5742 0.5604 0.000 0.332 0.000 0.484 0.184 0.000
#> SRR650176 4 0.5662 0.6113 0.000 0.280 0.000 0.524 0.196 0.000
#> SRR650177 4 0.5662 0.6113 0.000 0.280 0.000 0.524 0.196 0.000
#> SRR650180 4 0.3963 0.6750 0.000 0.080 0.000 0.756 0.164 0.000
#> SRR650179 2 0.5420 0.8028 0.000 0.608 0.032 0.000 0.080 0.280
#> SRR650181 4 0.1501 0.6916 0.000 0.000 0.076 0.924 0.000 0.000
#> SRR650183 4 0.5022 0.2002 0.000 0.024 0.352 0.584 0.040 0.000
#> SRR650184 3 0.3944 0.6413 0.000 0.012 0.780 0.164 0.032 0.012
#> SRR650185 3 0.3944 0.6413 0.000 0.012 0.780 0.164 0.032 0.012
#> SRR650188 4 0.1501 0.6916 0.000 0.000 0.076 0.924 0.000 0.000
#> SRR650191 3 0.2511 0.6685 0.000 0.008 0.900 0.044 0.024 0.024
#> SRR650192 4 0.2058 0.6932 0.000 0.008 0.072 0.908 0.012 0.000
#> SRR650195 3 0.4789 0.6129 0.000 0.028 0.708 0.184 0.080 0.000
#> SRR650198 2 0.4255 0.8514 0.000 0.600 0.016 0.000 0.004 0.380
#> SRR650200 4 0.1843 0.6876 0.000 0.004 0.080 0.912 0.004 0.000
#> SRR650196 3 0.5541 0.5534 0.000 0.044 0.632 0.224 0.100 0.000
#> SRR650197 2 0.4321 0.9218 0.000 0.652 0.020 0.000 0.012 0.316
#> SRR650201 3 0.5398 0.5791 0.000 0.048 0.660 0.192 0.100 0.000
#> SRR650203 3 0.5085 0.6092 0.000 0.044 0.696 0.164 0.096 0.000
#> SRR650204 2 0.3996 0.8975 0.000 0.636 0.008 0.000 0.004 0.352
#> SRR650202 4 0.2058 0.6932 0.000 0.008 0.072 0.908 0.012 0.000
#> SRR650130 3 0.5694 0.3247 0.000 0.348 0.544 0.004 0.072 0.032
#> SRR650131 3 0.4657 0.6497 0.000 0.044 0.752 0.100 0.100 0.004
#> SRR650132 4 0.4480 0.5684 0.000 0.040 0.120 0.756 0.084 0.000
#> SRR650133 3 0.4811 0.6331 0.000 0.044 0.728 0.128 0.100 0.000
#> SRR650138 6 0.0806 0.8327 0.000 0.020 0.000 0.000 0.008 0.972
#> SRR650139 6 0.0806 0.8327 0.000 0.020 0.000 0.000 0.008 0.972
#> SRR650142 3 0.3302 0.6021 0.000 0.000 0.760 0.004 0.004 0.232
#> SRR650143 3 0.3302 0.6021 0.000 0.000 0.760 0.004 0.004 0.232
#> SRR650145 6 0.0622 0.8396 0.000 0.000 0.012 0.000 0.008 0.980
#> SRR650146 6 0.0622 0.8396 0.000 0.000 0.012 0.000 0.008 0.980
#> SRR650148 3 0.3221 0.6101 0.000 0.000 0.772 0.004 0.004 0.220
#> SRR650149 3 0.3221 0.6101 0.000 0.000 0.772 0.004 0.004 0.220
#> SRR650151 3 0.5102 0.6492 0.000 0.040 0.724 0.136 0.080 0.020
#> SRR650152 3 0.5102 0.6492 0.000 0.040 0.724 0.136 0.080 0.020
#> SRR650154 4 0.5565 0.2645 0.000 0.040 0.296 0.588 0.076 0.000
#> SRR650155 4 0.5565 0.2645 0.000 0.040 0.296 0.588 0.076 0.000
#> SRR650157 6 0.0806 0.8327 0.000 0.020 0.000 0.000 0.008 0.972
#> SRR650158 6 0.0806 0.8327 0.000 0.020 0.000 0.000 0.008 0.972
#> SRR650160 5 0.7169 0.6676 0.092 0.196 0.028 0.000 0.512 0.172
#> SRR650161 5 0.7169 0.6676 0.092 0.196 0.028 0.000 0.512 0.172
#> SRR650163 6 0.0632 0.8352 0.000 0.000 0.024 0.000 0.000 0.976
#> SRR650164 6 0.0632 0.8352 0.000 0.000 0.024 0.000 0.000 0.976
#> SRR650169 3 0.3533 0.5949 0.000 0.004 0.748 0.000 0.012 0.236
#> SRR650170 3 0.3533 0.5949 0.000 0.004 0.748 0.000 0.012 0.236
#> SRR650172 6 0.3138 0.7085 0.000 0.096 0.060 0.000 0.004 0.840
#> SRR650173 6 0.3138 0.7085 0.000 0.096 0.060 0.000 0.004 0.840
#> SRR650174 3 0.3550 0.6003 0.000 0.004 0.752 0.004 0.008 0.232
#> SRR650175 3 0.3221 0.6101 0.000 0.000 0.772 0.004 0.004 0.220
#> SRR650178 3 0.5883 0.3811 0.000 0.048 0.536 0.332 0.084 0.000
#> SRR650182 3 0.5913 0.3504 0.000 0.048 0.524 0.344 0.084 0.000
#> SRR650186 6 0.4089 -0.0735 0.000 0.000 0.468 0.000 0.008 0.524
#> SRR650187 3 0.4098 0.0612 0.000 0.000 0.496 0.000 0.008 0.496
#> SRR650189 3 0.3971 0.2001 0.000 0.000 0.548 0.000 0.004 0.448
#> SRR650190 3 0.3923 0.2900 0.000 0.000 0.580 0.000 0.004 0.416
#> SRR650193 4 0.5464 0.6363 0.000 0.224 0.000 0.572 0.204 0.000
#> SRR650194 4 0.5464 0.6363 0.000 0.224 0.000 0.572 0.204 0.000
#> SRR834560 1 0.0363 0.9915 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR834561 5 0.4057 0.5840 0.388 0.000 0.012 0.000 0.600 0.000
#> SRR834562 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 5 0.4057 0.5840 0.388 0.000 0.012 0.000 0.600 0.000
#> SRR834564 1 0.0363 0.9915 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR834565 5 0.4057 0.5840 0.388 0.000 0.012 0.000 0.600 0.000
#> SRR834566 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0363 0.9915 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 5 0.4799 0.6516 0.048 0.012 0.000 0.000 0.620 0.320
#> SRR834570 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 5 0.5226 0.7116 0.104 0.012 0.000 0.000 0.620 0.264
#> SRR834574 1 0.0363 0.9915 0.988 0.000 0.012 0.000 0.000 0.000
#> SRR834575 5 0.4972 0.6884 0.272 0.000 0.000 0.000 0.620 0.108
#> SRR834576 1 0.0000 0.9951 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 5 0.4004 0.5680 0.000 0.012 0.000 0.000 0.620 0.368
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'skmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.977 0.969 0.985 0.4611 0.531 0.531
#> 3 3 0.871 0.927 0.962 0.3169 0.797 0.633
#> 4 4 0.785 0.805 0.914 0.1276 0.916 0.779
#> 5 5 0.909 0.899 0.949 0.0783 0.964 0.883
#> 6 6 0.821 0.783 0.868 0.0779 0.909 0.674
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2
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
#> SRR650205 2 0.000 0.998 0.000 1.000
#> SRR650134 2 0.000 0.998 0.000 1.000
#> SRR650135 2 0.000 0.998 0.000 1.000
#> SRR650136 2 0.000 0.998 0.000 1.000
#> SRR650137 2 0.000 0.998 0.000 1.000
#> SRR650140 2 0.000 0.998 0.000 1.000
#> SRR650141 2 0.000 0.998 0.000 1.000
#> SRR650144 2 0.000 0.998 0.000 1.000
#> SRR650147 2 0.000 0.998 0.000 1.000
#> SRR650150 1 0.900 0.589 0.684 0.316
#> SRR650153 2 0.000 0.998 0.000 1.000
#> SRR650156 2 0.000 0.998 0.000 1.000
#> SRR650159 2 0.000 0.998 0.000 1.000
#> SRR650162 1 0.552 0.853 0.872 0.128
#> SRR650168 2 0.000 0.998 0.000 1.000
#> SRR650166 2 0.000 0.998 0.000 1.000
#> SRR650167 2 0.000 0.998 0.000 1.000
#> SRR650171 2 0.000 0.998 0.000 1.000
#> SRR650165 2 0.000 0.998 0.000 1.000
#> SRR650176 2 0.000 0.998 0.000 1.000
#> SRR650177 2 0.000 0.998 0.000 1.000
#> SRR650180 2 0.000 0.998 0.000 1.000
#> SRR650179 2 0.000 0.998 0.000 1.000
#> SRR650181 2 0.000 0.998 0.000 1.000
#> SRR650183 2 0.000 0.998 0.000 1.000
#> SRR650184 2 0.000 0.998 0.000 1.000
#> SRR650185 2 0.000 0.998 0.000 1.000
#> SRR650188 2 0.000 0.998 0.000 1.000
#> SRR650191 2 0.000 0.998 0.000 1.000
#> SRR650192 2 0.000 0.998 0.000 1.000
#> SRR650195 2 0.000 0.998 0.000 1.000
#> SRR650198 1 0.000 0.960 1.000 0.000
#> SRR650200 2 0.000 0.998 0.000 1.000
#> SRR650196 2 0.000 0.998 0.000 1.000
#> SRR650197 2 0.000 0.998 0.000 1.000
#> SRR650201 2 0.000 0.998 0.000 1.000
#> SRR650203 2 0.000 0.998 0.000 1.000
#> SRR650204 1 0.000 0.960 1.000 0.000
#> SRR650202 2 0.000 0.998 0.000 1.000
#> SRR650130 2 0.000 0.998 0.000 1.000
#> SRR650131 2 0.000 0.998 0.000 1.000
#> SRR650132 2 0.000 0.998 0.000 1.000
#> SRR650133 2 0.000 0.998 0.000 1.000
#> SRR650138 1 0.000 0.960 1.000 0.000
#> SRR650139 1 0.000 0.960 1.000 0.000
#> SRR650142 2 0.000 0.998 0.000 1.000
#> SRR650143 2 0.000 0.998 0.000 1.000
#> SRR650145 1 0.706 0.785 0.808 0.192
#> SRR650146 1 0.706 0.785 0.808 0.192
#> SRR650148 2 0.000 0.998 0.000 1.000
#> SRR650149 2 0.000 0.998 0.000 1.000
#> SRR650151 2 0.000 0.998 0.000 1.000
#> SRR650152 2 0.000 0.998 0.000 1.000
#> SRR650154 2 0.000 0.998 0.000 1.000
#> SRR650155 2 0.000 0.998 0.000 1.000
#> SRR650157 1 0.000 0.960 1.000 0.000
#> SRR650158 1 0.000 0.960 1.000 0.000
#> SRR650160 1 0.000 0.960 1.000 0.000
#> SRR650161 1 0.000 0.960 1.000 0.000
#> SRR650163 1 0.000 0.960 1.000 0.000
#> SRR650164 1 0.000 0.960 1.000 0.000
#> SRR650169 2 0.000 0.998 0.000 1.000
#> SRR650170 2 0.000 0.998 0.000 1.000
#> SRR650172 1 0.781 0.733 0.768 0.232
#> SRR650173 1 0.781 0.733 0.768 0.232
#> SRR650174 2 0.000 0.998 0.000 1.000
#> SRR650175 2 0.000 0.998 0.000 1.000
#> SRR650178 2 0.000 0.998 0.000 1.000
#> SRR650182 2 0.000 0.998 0.000 1.000
#> SRR650186 2 0.443 0.892 0.092 0.908
#> SRR650187 2 0.000 0.998 0.000 1.000
#> SRR650189 2 0.000 0.998 0.000 1.000
#> SRR650190 2 0.000 0.998 0.000 1.000
#> SRR650193 2 0.000 0.998 0.000 1.000
#> SRR650194 2 0.000 0.998 0.000 1.000
#> SRR834560 1 0.000 0.960 1.000 0.000
#> SRR834561 1 0.000 0.960 1.000 0.000
#> SRR834562 1 0.000 0.960 1.000 0.000
#> SRR834563 1 0.000 0.960 1.000 0.000
#> SRR834564 1 0.000 0.960 1.000 0.000
#> SRR834565 1 0.000 0.960 1.000 0.000
#> SRR834566 1 0.000 0.960 1.000 0.000
#> SRR834567 1 0.000 0.960 1.000 0.000
#> SRR834568 1 0.000 0.960 1.000 0.000
#> SRR834569 1 0.000 0.960 1.000 0.000
#> SRR834570 1 0.000 0.960 1.000 0.000
#> SRR834571 1 0.000 0.960 1.000 0.000
#> SRR834572 1 0.000 0.960 1.000 0.000
#> SRR834573 1 0.000 0.960 1.000 0.000
#> SRR834574 1 0.000 0.960 1.000 0.000
#> SRR834575 1 0.000 0.960 1.000 0.000
#> SRR834576 1 0.000 0.960 1.000 0.000
#> SRR834577 1 0.000 0.960 1.000 0.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650134 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650135 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650136 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650137 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650140 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650141 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650144 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650147 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650150 1 0.6026 0.408 0.624 0.376 0.000
#> SRR650153 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650156 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650159 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650162 1 0.6937 0.548 0.680 0.272 0.048
#> SRR650168 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650166 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650167 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650171 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650165 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650176 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650177 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650180 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650179 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650181 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650183 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650184 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650185 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650188 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650191 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650192 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650195 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650198 1 0.3752 0.826 0.856 0.000 0.144
#> SRR650200 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650196 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650197 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650201 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650203 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650204 1 0.0000 0.939 1.000 0.000 0.000
#> SRR650202 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650130 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650131 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650132 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650133 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650138 1 0.5254 0.698 0.736 0.000 0.264
#> SRR650139 1 0.5254 0.698 0.736 0.000 0.264
#> SRR650142 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650143 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650145 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650146 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650148 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650149 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650151 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650152 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650154 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650155 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650157 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650158 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650160 1 0.0000 0.939 1.000 0.000 0.000
#> SRR650161 1 0.0000 0.939 1.000 0.000 0.000
#> SRR650163 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650164 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650169 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650170 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650172 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650173 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650174 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650175 3 0.5254 0.772 0.000 0.264 0.736
#> SRR650178 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650182 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650186 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650187 3 0.0000 0.844 0.000 0.000 1.000
#> SRR650189 3 0.0892 0.843 0.000 0.020 0.980
#> SRR650190 3 0.0892 0.843 0.000 0.020 0.980
#> SRR650193 2 0.0000 1.000 0.000 1.000 0.000
#> SRR650194 2 0.0000 1.000 0.000 1.000 0.000
#> SRR834560 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834561 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834562 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834563 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834564 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834565 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834566 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834567 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834568 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834569 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834570 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834571 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834572 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834573 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834574 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834575 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834576 1 0.0000 0.939 1.000 0.000 0.000
#> SRR834577 1 0.0000 0.939 1.000 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650134 2 0.2868 0.843 0.000 0.864 0.000 0.136
#> SRR650135 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650136 2 0.3444 0.807 0.000 0.816 0.000 0.184
#> SRR650137 4 0.0188 0.883 0.000 0.004 0.000 0.996
#> SRR650140 2 0.3444 0.807 0.000 0.816 0.000 0.184
#> SRR650141 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650144 2 0.3356 0.813 0.000 0.824 0.000 0.176
#> SRR650147 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650150 4 0.0188 0.883 0.000 0.004 0.000 0.996
#> SRR650153 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650156 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650159 4 0.0188 0.883 0.000 0.004 0.000 0.996
#> SRR650162 4 0.0000 0.880 0.000 0.000 0.000 1.000
#> SRR650168 4 0.0188 0.883 0.000 0.004 0.000 0.996
#> SRR650166 2 0.3172 0.827 0.000 0.840 0.000 0.160
#> SRR650167 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650171 2 0.3444 0.807 0.000 0.816 0.000 0.184
#> SRR650165 2 0.4977 0.279 0.000 0.540 0.000 0.460
#> SRR650176 2 0.3444 0.807 0.000 0.816 0.000 0.184
#> SRR650177 2 0.3444 0.807 0.000 0.816 0.000 0.184
#> SRR650180 2 0.0336 0.929 0.000 0.992 0.000 0.008
#> SRR650179 4 0.0188 0.883 0.000 0.004 0.000 0.996
#> SRR650181 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650183 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650184 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650185 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650188 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650191 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650192 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650195 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650198 4 0.3356 0.727 0.176 0.000 0.000 0.824
#> SRR650200 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650197 4 0.0188 0.883 0.000 0.004 0.000 0.996
#> SRR650201 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650203 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650204 4 0.3400 0.724 0.180 0.000 0.000 0.820
#> SRR650202 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650130 4 0.4967 0.195 0.000 0.452 0.000 0.548
#> SRR650131 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650132 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650133 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650138 1 0.5168 0.287 0.500 0.000 0.496 0.004
#> SRR650139 1 0.5168 0.287 0.500 0.000 0.496 0.004
#> SRR650142 3 0.4985 0.408 0.000 0.468 0.532 0.000
#> SRR650143 3 0.4985 0.408 0.000 0.468 0.532 0.000
#> SRR650145 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650146 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650148 3 0.5000 0.367 0.000 0.496 0.504 0.000
#> SRR650149 3 0.5000 0.367 0.000 0.496 0.504 0.000
#> SRR650151 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650152 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650154 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650155 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650157 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650158 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650160 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR650161 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR650163 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650164 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650169 3 0.5000 0.367 0.000 0.496 0.504 0.000
#> SRR650170 3 0.5000 0.367 0.000 0.496 0.504 0.000
#> SRR650172 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650173 3 0.0188 0.670 0.000 0.000 0.996 0.004
#> SRR650174 3 0.5000 0.367 0.000 0.496 0.504 0.000
#> SRR650175 3 0.5000 0.367 0.000 0.496 0.504 0.000
#> SRR650178 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.934 0.000 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.669 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.669 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0707 0.667 0.000 0.020 0.980 0.000
#> SRR650190 3 0.0707 0.667 0.000 0.020 0.980 0.000
#> SRR650193 2 0.3172 0.827 0.000 0.840 0.000 0.160
#> SRR650194 2 0.3172 0.827 0.000 0.840 0.000 0.160
#> SRR834560 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 0.947 1.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 0.947 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
#> SRR650205 4 0.0162 0.924 0.000 0.000 0.000 0.996 0.004
#> SRR650134 4 0.2072 0.896 0.000 0.036 0.020 0.928 0.016
#> SRR650135 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650136 4 0.3414 0.837 0.000 0.116 0.020 0.844 0.020
#> SRR650137 2 0.0000 0.861 0.000 1.000 0.000 0.000 0.000
#> SRR650140 4 0.3414 0.837 0.000 0.116 0.020 0.844 0.020
#> SRR650141 4 0.0162 0.924 0.000 0.000 0.000 0.996 0.004
#> SRR650144 4 0.2986 0.864 0.000 0.084 0.020 0.876 0.020
#> SRR650147 4 0.1012 0.915 0.000 0.000 0.020 0.968 0.012
#> SRR650150 2 0.0000 0.861 0.000 1.000 0.000 0.000 0.000
#> SRR650153 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650156 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650159 2 0.0000 0.861 0.000 1.000 0.000 0.000 0.000
#> SRR650162 2 0.0000 0.861 0.000 1.000 0.000 0.000 0.000
#> SRR650168 2 0.3739 0.712 0.000 0.820 0.024 0.136 0.020
#> SRR650166 4 0.2708 0.874 0.000 0.072 0.020 0.892 0.016
#> SRR650167 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650171 4 0.3414 0.837 0.000 0.116 0.020 0.844 0.020
#> SRR650165 4 0.5048 0.463 0.000 0.352 0.020 0.612 0.016
#> SRR650176 4 0.3414 0.837 0.000 0.116 0.020 0.844 0.020
#> SRR650177 4 0.3414 0.837 0.000 0.116 0.020 0.844 0.020
#> SRR650180 4 0.1216 0.912 0.000 0.000 0.020 0.960 0.020
#> SRR650179 2 0.1461 0.841 0.000 0.952 0.028 0.004 0.016
#> SRR650181 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650183 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650184 4 0.0324 0.924 0.000 0.000 0.004 0.992 0.004
#> SRR650185 4 0.0324 0.924 0.000 0.000 0.004 0.992 0.004
#> SRR650188 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650191 4 0.0324 0.924 0.000 0.000 0.004 0.992 0.004
#> SRR650192 4 0.0162 0.924 0.000 0.000 0.000 0.996 0.004
#> SRR650195 4 0.0451 0.923 0.000 0.000 0.008 0.988 0.004
#> SRR650198 2 0.2532 0.791 0.088 0.892 0.008 0.000 0.012
#> SRR650200 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650196 4 0.0290 0.922 0.000 0.000 0.008 0.992 0.000
#> SRR650197 2 0.0000 0.861 0.000 1.000 0.000 0.000 0.000
#> SRR650201 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650203 4 0.0290 0.922 0.000 0.000 0.008 0.992 0.000
#> SRR650204 2 0.2127 0.779 0.108 0.892 0.000 0.000 0.000
#> SRR650202 4 0.0162 0.924 0.000 0.000 0.000 0.996 0.004
#> SRR650130 2 0.4273 0.197 0.000 0.552 0.000 0.448 0.000
#> SRR650131 4 0.0162 0.924 0.000 0.000 0.004 0.996 0.000
#> SRR650132 4 0.0290 0.922 0.000 0.000 0.008 0.992 0.000
#> SRR650133 4 0.0290 0.922 0.000 0.000 0.008 0.992 0.000
#> SRR650138 5 0.0609 0.973 0.020 0.000 0.000 0.000 0.980
#> SRR650139 5 0.0609 0.973 0.020 0.000 0.000 0.000 0.980
#> SRR650142 3 0.0865 0.943 0.000 0.000 0.972 0.024 0.004
#> SRR650143 3 0.0865 0.943 0.000 0.000 0.972 0.024 0.004
#> SRR650145 5 0.0609 0.992 0.000 0.000 0.020 0.000 0.980
#> SRR650146 5 0.0609 0.992 0.000 0.000 0.020 0.000 0.980
#> SRR650148 3 0.0794 0.944 0.000 0.000 0.972 0.028 0.000
#> SRR650149 3 0.0794 0.944 0.000 0.000 0.972 0.028 0.000
#> SRR650151 4 0.4273 0.209 0.000 0.000 0.448 0.552 0.000
#> SRR650152 4 0.4273 0.209 0.000 0.000 0.448 0.552 0.000
#> SRR650154 4 0.1341 0.890 0.000 0.000 0.056 0.944 0.000
#> SRR650155 4 0.1341 0.890 0.000 0.000 0.056 0.944 0.000
#> SRR650157 5 0.0609 0.992 0.000 0.000 0.020 0.000 0.980
#> SRR650158 5 0.0609 0.992 0.000 0.000 0.020 0.000 0.980
#> SRR650160 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR650161 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR650163 5 0.0609 0.992 0.000 0.000 0.020 0.000 0.980
#> SRR650164 5 0.0609 0.992 0.000 0.000 0.020 0.000 0.980
#> SRR650169 3 0.0794 0.944 0.000 0.000 0.972 0.028 0.000
#> SRR650170 3 0.0794 0.944 0.000 0.000 0.972 0.028 0.000
#> SRR650172 5 0.0794 0.988 0.000 0.000 0.028 0.000 0.972
#> SRR650173 5 0.0794 0.988 0.000 0.000 0.028 0.000 0.972
#> SRR650174 3 0.0794 0.944 0.000 0.000 0.972 0.028 0.000
#> SRR650175 3 0.0794 0.944 0.000 0.000 0.972 0.028 0.000
#> SRR650178 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650182 4 0.0000 0.925 0.000 0.000 0.000 1.000 0.000
#> SRR650186 3 0.3395 0.713 0.000 0.000 0.764 0.000 0.236
#> SRR650187 3 0.3366 0.719 0.000 0.000 0.768 0.000 0.232
#> SRR650189 3 0.0963 0.921 0.000 0.000 0.964 0.000 0.036
#> SRR650190 3 0.0794 0.926 0.000 0.000 0.972 0.000 0.028
#> SRR650193 4 0.2677 0.878 0.000 0.064 0.020 0.896 0.020
#> SRR650194 4 0.2677 0.878 0.000 0.064 0.020 0.896 0.020
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 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
#> SRR650205 2 0.3690 0.5719 0.000 0.700 0.000 0.288 0.000 0.012
#> SRR650134 2 0.3860 -0.2514 0.000 0.528 0.000 0.472 0.000 0.000
#> SRR650135 2 0.2092 0.7359 0.000 0.876 0.000 0.124 0.000 0.000
#> SRR650136 4 0.3426 0.7760 0.000 0.276 0.000 0.720 0.004 0.000
#> SRR650137 5 0.1141 0.8763 0.000 0.000 0.000 0.052 0.948 0.000
#> SRR650140 4 0.3426 0.7760 0.000 0.276 0.000 0.720 0.004 0.000
#> SRR650141 2 0.3421 0.5784 0.000 0.736 0.000 0.256 0.000 0.008
#> SRR650144 4 0.3508 0.7667 0.000 0.292 0.000 0.704 0.004 0.000
#> SRR650147 2 0.3717 0.2118 0.000 0.616 0.000 0.384 0.000 0.000
#> SRR650150 5 0.1075 0.8767 0.000 0.000 0.000 0.048 0.952 0.000
#> SRR650153 2 0.2814 0.6908 0.000 0.820 0.000 0.172 0.000 0.008
#> SRR650156 2 0.1910 0.7447 0.000 0.892 0.000 0.108 0.000 0.000
#> SRR650159 5 0.1075 0.8767 0.000 0.000 0.000 0.048 0.952 0.000
#> SRR650162 5 0.1075 0.8767 0.000 0.000 0.000 0.048 0.952 0.000
#> SRR650168 4 0.2833 0.3313 0.000 0.004 0.000 0.836 0.148 0.012
#> SRR650166 2 0.3930 -0.0929 0.000 0.576 0.000 0.420 0.004 0.000
#> SRR650167 2 0.1444 0.7578 0.000 0.928 0.000 0.072 0.000 0.000
#> SRR650171 4 0.3426 0.7760 0.000 0.276 0.000 0.720 0.004 0.000
#> SRR650165 4 0.4239 0.7396 0.000 0.248 0.000 0.696 0.056 0.000
#> SRR650176 4 0.3426 0.7760 0.000 0.276 0.000 0.720 0.004 0.000
#> SRR650177 4 0.3426 0.7760 0.000 0.276 0.000 0.720 0.004 0.000
#> SRR650180 4 0.3652 0.7247 0.000 0.324 0.000 0.672 0.000 0.004
#> SRR650179 4 0.3619 0.0867 0.000 0.004 0.000 0.680 0.316 0.000
#> SRR650181 2 0.2346 0.7338 0.000 0.868 0.000 0.124 0.000 0.008
#> SRR650183 2 0.2743 0.7382 0.000 0.828 0.000 0.164 0.000 0.008
#> SRR650184 4 0.4439 -0.0653 0.000 0.468 0.004 0.512 0.004 0.012
#> SRR650185 4 0.4437 -0.0471 0.000 0.464 0.004 0.516 0.004 0.012
#> SRR650188 2 0.1501 0.7570 0.000 0.924 0.000 0.076 0.000 0.000
#> SRR650191 2 0.4398 0.5096 0.000 0.600 0.008 0.376 0.004 0.012
#> SRR650192 2 0.3323 0.6000 0.000 0.752 0.000 0.240 0.000 0.008
#> SRR650195 2 0.3672 0.6880 0.000 0.744 0.004 0.236 0.004 0.012
#> SRR650198 5 0.2170 0.8130 0.012 0.000 0.000 0.100 0.888 0.000
#> SRR650200 2 0.1267 0.7601 0.000 0.940 0.000 0.060 0.000 0.000
#> SRR650196 2 0.0692 0.7523 0.000 0.976 0.004 0.020 0.000 0.000
#> SRR650197 5 0.1267 0.8666 0.000 0.000 0.000 0.060 0.940 0.000
#> SRR650201 2 0.2113 0.7197 0.000 0.896 0.004 0.092 0.000 0.008
#> SRR650203 2 0.1700 0.7247 0.000 0.916 0.004 0.080 0.000 0.000
#> SRR650204 5 0.0547 0.8534 0.020 0.000 0.000 0.000 0.980 0.000
#> SRR650202 2 0.3373 0.5859 0.000 0.744 0.000 0.248 0.000 0.008
#> SRR650130 5 0.4903 0.0892 0.000 0.468 0.000 0.060 0.472 0.000
#> SRR650131 2 0.2163 0.7136 0.000 0.892 0.004 0.096 0.000 0.008
#> SRR650132 2 0.0146 0.7572 0.000 0.996 0.004 0.000 0.000 0.000
#> SRR650133 2 0.2261 0.7065 0.000 0.884 0.004 0.104 0.000 0.008
#> SRR650138 6 0.0363 0.9554 0.012 0.000 0.000 0.000 0.000 0.988
#> SRR650139 6 0.0363 0.9554 0.012 0.000 0.000 0.000 0.000 0.988
#> SRR650142 3 0.0603 0.9698 0.000 0.004 0.980 0.016 0.000 0.000
#> SRR650143 3 0.0603 0.9698 0.000 0.004 0.980 0.016 0.000 0.000
#> SRR650145 6 0.0363 0.9627 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650146 6 0.0363 0.9627 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650148 3 0.0000 0.9756 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650149 3 0.0000 0.9756 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650151 2 0.2416 0.6195 0.000 0.844 0.156 0.000 0.000 0.000
#> SRR650152 2 0.2416 0.6195 0.000 0.844 0.156 0.000 0.000 0.000
#> SRR650154 2 0.0260 0.7562 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR650155 2 0.0260 0.7562 0.000 0.992 0.008 0.000 0.000 0.000
#> SRR650157 6 0.0363 0.9627 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650158 6 0.0363 0.9627 0.000 0.000 0.012 0.000 0.000 0.988
#> SRR650160 1 0.0632 0.9784 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR650161 1 0.0632 0.9784 0.976 0.000 0.000 0.000 0.024 0.000
#> SRR650163 6 0.0767 0.9606 0.000 0.000 0.012 0.008 0.004 0.976
#> SRR650164 6 0.0767 0.9606 0.000 0.000 0.012 0.008 0.004 0.976
#> SRR650169 3 0.0146 0.9752 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR650170 3 0.0146 0.9752 0.000 0.000 0.996 0.004 0.000 0.000
#> SRR650172 6 0.3350 0.8699 0.000 0.000 0.012 0.124 0.040 0.824
#> SRR650173 6 0.3350 0.8699 0.000 0.000 0.012 0.124 0.040 0.824
#> SRR650174 3 0.0000 0.9756 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650175 3 0.0000 0.9756 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650178 2 0.0000 0.7579 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650182 2 0.0000 0.7579 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR650186 3 0.2527 0.8937 0.000 0.000 0.880 0.032 0.004 0.084
#> SRR650187 3 0.2474 0.8980 0.000 0.000 0.884 0.032 0.004 0.080
#> SRR650189 3 0.0146 0.9739 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650190 3 0.0000 0.9756 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650193 4 0.3446 0.7507 0.000 0.308 0.000 0.692 0.000 0.000
#> SRR650194 4 0.3446 0.7507 0.000 0.308 0.000 0.692 0.000 0.000
#> SRR834560 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.0146 0.9955 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834562 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.0146 0.9955 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834564 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.0146 0.9955 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834570 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.0146 0.9955 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834574 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.0146 0.9955 0.996 0.000 0.000 0.004 0.000 0.000
#> SRR834576 1 0.0000 0.9965 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.0146 0.9955 0.996 0.000 0.000 0.004 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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.987 0.995 0.3280 0.671 0.671
#> 3 3 1.000 0.973 0.990 0.8946 0.632 0.481
#> 4 4 0.914 0.933 0.973 0.0827 0.865 0.678
#> 5 5 0.883 0.857 0.932 0.0361 0.980 0.940
#> 6 6 0.850 0.804 0.892 0.0855 0.924 0.767
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 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
#> SRR650205 2 0.000 0.997 0.000 1.000
#> SRR650134 2 0.000 0.997 0.000 1.000
#> SRR650135 2 0.000 0.997 0.000 1.000
#> SRR650136 2 0.000 0.997 0.000 1.000
#> SRR650137 2 0.000 0.997 0.000 1.000
#> SRR650140 2 0.000 0.997 0.000 1.000
#> SRR650141 2 0.000 0.997 0.000 1.000
#> SRR650144 2 0.000 0.997 0.000 1.000
#> SRR650147 2 0.000 0.997 0.000 1.000
#> SRR650150 2 0.000 0.997 0.000 1.000
#> SRR650153 2 0.000 0.997 0.000 1.000
#> SRR650156 2 0.000 0.997 0.000 1.000
#> SRR650159 2 0.000 0.997 0.000 1.000
#> SRR650162 2 0.000 0.997 0.000 1.000
#> SRR650168 2 0.000 0.997 0.000 1.000
#> SRR650166 2 0.000 0.997 0.000 1.000
#> SRR650167 2 0.000 0.997 0.000 1.000
#> SRR650171 2 0.000 0.997 0.000 1.000
#> SRR650165 2 0.000 0.997 0.000 1.000
#> SRR650176 2 0.000 0.997 0.000 1.000
#> SRR650177 2 0.000 0.997 0.000 1.000
#> SRR650180 2 0.000 0.997 0.000 1.000
#> SRR650179 2 0.000 0.997 0.000 1.000
#> SRR650181 2 0.000 0.997 0.000 1.000
#> SRR650183 2 0.000 0.997 0.000 1.000
#> SRR650184 2 0.000 0.997 0.000 1.000
#> SRR650185 2 0.000 0.997 0.000 1.000
#> SRR650188 2 0.000 0.997 0.000 1.000
#> SRR650191 2 0.000 0.997 0.000 1.000
#> SRR650192 2 0.000 0.997 0.000 1.000
#> SRR650195 2 0.000 0.997 0.000 1.000
#> SRR650198 2 0.000 0.997 0.000 1.000
#> SRR650200 2 0.000 0.997 0.000 1.000
#> SRR650196 2 0.000 0.997 0.000 1.000
#> SRR650197 2 0.000 0.997 0.000 1.000
#> SRR650201 2 0.000 0.997 0.000 1.000
#> SRR650203 2 0.000 0.997 0.000 1.000
#> SRR650204 2 0.000 0.997 0.000 1.000
#> SRR650202 2 0.000 0.997 0.000 1.000
#> SRR650130 2 0.000 0.997 0.000 1.000
#> SRR650131 2 0.000 0.997 0.000 1.000
#> SRR650132 2 0.000 0.997 0.000 1.000
#> SRR650133 2 0.000 0.997 0.000 1.000
#> SRR650138 2 0.000 0.997 0.000 1.000
#> SRR650139 2 0.000 0.997 0.000 1.000
#> SRR650142 2 0.000 0.997 0.000 1.000
#> SRR650143 2 0.000 0.997 0.000 1.000
#> SRR650145 2 0.000 0.997 0.000 1.000
#> SRR650146 2 0.000 0.997 0.000 1.000
#> SRR650148 2 0.000 0.997 0.000 1.000
#> SRR650149 2 0.000 0.997 0.000 1.000
#> SRR650151 2 0.000 0.997 0.000 1.000
#> SRR650152 2 0.000 0.997 0.000 1.000
#> SRR650154 2 0.000 0.997 0.000 1.000
#> SRR650155 2 0.000 0.997 0.000 1.000
#> SRR650157 2 0.000 0.997 0.000 1.000
#> SRR650158 2 0.000 0.997 0.000 1.000
#> SRR650160 1 0.000 0.983 1.000 0.000
#> SRR650161 1 0.000 0.983 1.000 0.000
#> SRR650163 2 0.000 0.997 0.000 1.000
#> SRR650164 2 0.000 0.997 0.000 1.000
#> SRR650169 2 0.000 0.997 0.000 1.000
#> SRR650170 2 0.000 0.997 0.000 1.000
#> SRR650172 2 0.000 0.997 0.000 1.000
#> SRR650173 2 0.000 0.997 0.000 1.000
#> SRR650174 2 0.000 0.997 0.000 1.000
#> SRR650175 2 0.000 0.997 0.000 1.000
#> SRR650178 2 0.000 0.997 0.000 1.000
#> SRR650182 2 0.000 0.997 0.000 1.000
#> SRR650186 2 0.000 0.997 0.000 1.000
#> SRR650187 2 0.000 0.997 0.000 1.000
#> SRR650189 2 0.000 0.997 0.000 1.000
#> SRR650190 2 0.000 0.997 0.000 1.000
#> SRR650193 2 0.000 0.997 0.000 1.000
#> SRR650194 2 0.000 0.997 0.000 1.000
#> SRR834560 1 0.000 0.983 1.000 0.000
#> SRR834561 1 0.000 0.983 1.000 0.000
#> SRR834562 1 0.000 0.983 1.000 0.000
#> SRR834563 1 0.000 0.983 1.000 0.000
#> SRR834564 1 0.000 0.983 1.000 0.000
#> SRR834565 1 0.000 0.983 1.000 0.000
#> SRR834566 1 0.000 0.983 1.000 0.000
#> SRR834567 1 0.000 0.983 1.000 0.000
#> SRR834568 1 0.000 0.983 1.000 0.000
#> SRR834569 1 0.881 0.568 0.700 0.300
#> SRR834570 1 0.000 0.983 1.000 0.000
#> SRR834571 1 0.000 0.983 1.000 0.000
#> SRR834572 1 0.000 0.983 1.000 0.000
#> SRR834573 1 0.000 0.983 1.000 0.000
#> SRR834574 1 0.000 0.983 1.000 0.000
#> SRR834575 1 0.000 0.983 1.000 0.000
#> SRR834576 1 0.000 0.983 1.000 0.000
#> SRR834577 2 0.738 0.731 0.208 0.792
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0000 0.992 0 1.000 0.000
#> SRR650134 2 0.0000 0.992 0 1.000 0.000
#> SRR650135 2 0.0000 0.992 0 1.000 0.000
#> SRR650136 2 0.0000 0.992 0 1.000 0.000
#> SRR650137 3 0.6168 0.300 0 0.412 0.588
#> SRR650140 2 0.0000 0.992 0 1.000 0.000
#> SRR650141 2 0.0000 0.992 0 1.000 0.000
#> SRR650144 2 0.0000 0.992 0 1.000 0.000
#> SRR650147 2 0.0000 0.992 0 1.000 0.000
#> SRR650150 3 0.0000 0.979 0 0.000 1.000
#> SRR650153 2 0.0000 0.992 0 1.000 0.000
#> SRR650156 2 0.0000 0.992 0 1.000 0.000
#> SRR650159 3 0.0000 0.979 0 0.000 1.000
#> SRR650162 3 0.0000 0.979 0 0.000 1.000
#> SRR650168 3 0.0000 0.979 0 0.000 1.000
#> SRR650166 2 0.0000 0.992 0 1.000 0.000
#> SRR650167 2 0.0000 0.992 0 1.000 0.000
#> SRR650171 2 0.0000 0.992 0 1.000 0.000
#> SRR650165 2 0.0000 0.992 0 1.000 0.000
#> SRR650176 2 0.0000 0.992 0 1.000 0.000
#> SRR650177 2 0.0000 0.992 0 1.000 0.000
#> SRR650180 2 0.0000 0.992 0 1.000 0.000
#> SRR650179 2 0.5497 0.573 0 0.708 0.292
#> SRR650181 2 0.0000 0.992 0 1.000 0.000
#> SRR650183 2 0.0000 0.992 0 1.000 0.000
#> SRR650184 2 0.0000 0.992 0 1.000 0.000
#> SRR650185 2 0.0000 0.992 0 1.000 0.000
#> SRR650188 2 0.0000 0.992 0 1.000 0.000
#> SRR650191 3 0.0237 0.974 0 0.004 0.996
#> SRR650192 2 0.0000 0.992 0 1.000 0.000
#> SRR650195 2 0.0000 0.992 0 1.000 0.000
#> SRR650198 3 0.0000 0.979 0 0.000 1.000
#> SRR650200 2 0.0000 0.992 0 1.000 0.000
#> SRR650196 2 0.0000 0.992 0 1.000 0.000
#> SRR650197 3 0.4504 0.724 0 0.196 0.804
#> SRR650201 2 0.0000 0.992 0 1.000 0.000
#> SRR650203 2 0.0000 0.992 0 1.000 0.000
#> SRR650204 3 0.0000 0.979 0 0.000 1.000
#> SRR650202 2 0.0000 0.992 0 1.000 0.000
#> SRR650130 2 0.0000 0.992 0 1.000 0.000
#> SRR650131 2 0.0000 0.992 0 1.000 0.000
#> SRR650132 2 0.0000 0.992 0 1.000 0.000
#> SRR650133 2 0.0000 0.992 0 1.000 0.000
#> SRR650138 3 0.0000 0.979 0 0.000 1.000
#> SRR650139 3 0.0000 0.979 0 0.000 1.000
#> SRR650142 3 0.0000 0.979 0 0.000 1.000
#> SRR650143 3 0.0000 0.979 0 0.000 1.000
#> SRR650145 3 0.0000 0.979 0 0.000 1.000
#> SRR650146 3 0.0000 0.979 0 0.000 1.000
#> SRR650148 3 0.0000 0.979 0 0.000 1.000
#> SRR650149 3 0.0000 0.979 0 0.000 1.000
#> SRR650151 2 0.0000 0.992 0 1.000 0.000
#> SRR650152 2 0.0000 0.992 0 1.000 0.000
#> SRR650154 2 0.0000 0.992 0 1.000 0.000
#> SRR650155 2 0.0000 0.992 0 1.000 0.000
#> SRR650157 3 0.0000 0.979 0 0.000 1.000
#> SRR650158 3 0.0000 0.979 0 0.000 1.000
#> SRR650160 3 0.0000 0.979 0 0.000 1.000
#> SRR650161 3 0.0000 0.979 0 0.000 1.000
#> SRR650163 3 0.0000 0.979 0 0.000 1.000
#> SRR650164 3 0.0000 0.979 0 0.000 1.000
#> SRR650169 3 0.0000 0.979 0 0.000 1.000
#> SRR650170 3 0.0000 0.979 0 0.000 1.000
#> SRR650172 3 0.0000 0.979 0 0.000 1.000
#> SRR650173 3 0.0000 0.979 0 0.000 1.000
#> SRR650174 3 0.0000 0.979 0 0.000 1.000
#> SRR650175 3 0.0000 0.979 0 0.000 1.000
#> SRR650178 2 0.0000 0.992 0 1.000 0.000
#> SRR650182 2 0.0000 0.992 0 1.000 0.000
#> SRR650186 3 0.0000 0.979 0 0.000 1.000
#> SRR650187 3 0.0000 0.979 0 0.000 1.000
#> SRR650189 3 0.0000 0.979 0 0.000 1.000
#> SRR650190 3 0.0000 0.979 0 0.000 1.000
#> SRR650193 2 0.0000 0.992 0 1.000 0.000
#> SRR650194 2 0.0000 0.992 0 1.000 0.000
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 3 0.0000 0.979 0 0.000 1.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 3 0.0000 0.979 0 0.000 1.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 3 0.0000 0.979 0 0.000 1.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 3 0.0000 0.979 0 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650134 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650135 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650136 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650137 3 0.3052 0.805 0.000 0.136 0.860 0.004
#> SRR650140 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650141 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650144 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650147 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650150 3 0.0188 0.935 0.000 0.000 0.996 0.004
#> SRR650153 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650156 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650159 3 0.0188 0.935 0.000 0.000 0.996 0.004
#> SRR650162 3 0.0188 0.935 0.000 0.000 0.996 0.004
#> SRR650168 3 0.0188 0.935 0.000 0.000 0.996 0.004
#> SRR650166 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650167 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650171 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650165 2 0.0188 0.978 0.000 0.996 0.000 0.004
#> SRR650176 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650177 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650180 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650179 3 0.5004 0.395 0.000 0.392 0.604 0.004
#> SRR650181 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650183 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650184 3 0.4585 0.542 0.000 0.332 0.668 0.000
#> SRR650185 3 0.4713 0.494 0.000 0.360 0.640 0.000
#> SRR650188 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650191 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650192 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650195 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650198 3 0.0188 0.935 0.000 0.000 0.996 0.004
#> SRR650200 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650196 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650197 3 0.3052 0.805 0.000 0.136 0.860 0.004
#> SRR650201 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650203 2 0.1867 0.898 0.000 0.928 0.072 0.000
#> SRR650204 3 0.0188 0.935 0.000 0.000 0.996 0.004
#> SRR650202 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650130 2 0.3710 0.726 0.000 0.804 0.192 0.004
#> SRR650131 2 0.4155 0.650 0.000 0.756 0.240 0.004
#> SRR650132 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650133 2 0.0336 0.974 0.000 0.992 0.008 0.000
#> SRR650138 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650139 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650142 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650145 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650146 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650148 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650151 3 0.2921 0.803 0.000 0.140 0.860 0.000
#> SRR650152 3 0.2921 0.803 0.000 0.140 0.860 0.000
#> SRR650154 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650155 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650157 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650160 4 0.2921 0.829 0.000 0.000 0.140 0.860
#> SRR650161 4 0.2921 0.829 0.000 0.000 0.140 0.860
#> SRR650163 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650169 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650170 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650172 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650178 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650182 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650186 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650187 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650189 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.937 0.000 0.000 1.000 0.000
#> SRR650193 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR650194 2 0.0000 0.982 0.000 1.000 0.000 0.000
#> SRR834560 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834561 4 0.0188 0.948 0.004 0.000 0.000 0.996
#> SRR834562 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834563 4 0.0188 0.948 0.004 0.000 0.000 0.996
#> SRR834564 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834565 4 0.0188 0.948 0.004 0.000 0.000 0.996
#> SRR834566 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834569 4 0.0188 0.950 0.000 0.000 0.004 0.996
#> SRR834570 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834573 4 0.0188 0.950 0.000 0.000 0.004 0.996
#> SRR834574 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834575 4 0.0188 0.950 0.000 0.000 0.004 0.996
#> SRR834576 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR834577 4 0.0188 0.950 0.000 0.000 0.004 0.996
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650134 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650135 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650136 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650137 3 0.4183 0.6358 0.000 0.324 0.668 0.008 0.000
#> SRR650140 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650141 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650144 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650147 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650150 3 0.3913 0.6405 0.000 0.324 0.676 0.000 0.000
#> SRR650153 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650156 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650159 3 0.3949 0.6396 0.000 0.332 0.668 0.000 0.000
#> SRR650162 3 0.3913 0.6405 0.000 0.324 0.676 0.000 0.000
#> SRR650168 3 0.3949 0.6396 0.000 0.332 0.668 0.000 0.000
#> SRR650166 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650167 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650171 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650165 4 0.3913 0.5308 0.000 0.324 0.000 0.676 0.000
#> SRR650176 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650177 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650180 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650179 3 0.5915 0.4448 0.000 0.324 0.552 0.124 0.000
#> SRR650181 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650183 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650184 3 0.4497 0.2311 0.000 0.008 0.568 0.424 0.000
#> SRR650185 4 0.4559 -0.0494 0.000 0.008 0.480 0.512 0.000
#> SRR650188 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650191 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650192 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650195 4 0.0290 0.9367 0.000 0.008 0.000 0.992 0.000
#> SRR650198 3 0.3913 0.6405 0.000 0.324 0.676 0.000 0.000
#> SRR650200 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650196 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650197 3 0.3949 0.6396 0.000 0.332 0.668 0.000 0.000
#> SRR650201 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650203 4 0.2390 0.8291 0.000 0.020 0.084 0.896 0.000
#> SRR650204 3 0.3913 0.6405 0.000 0.324 0.676 0.000 0.000
#> SRR650202 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650130 4 0.5378 0.5024 0.000 0.160 0.172 0.668 0.000
#> SRR650131 4 0.5903 0.2187 0.000 0.120 0.332 0.548 0.000
#> SRR650132 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650133 4 0.0693 0.9258 0.000 0.008 0.012 0.980 0.000
#> SRR650138 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650139 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650142 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650143 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650145 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650146 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650148 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650149 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650151 3 0.3196 0.6457 0.000 0.004 0.804 0.192 0.000
#> SRR650152 3 0.3282 0.6488 0.000 0.008 0.804 0.188 0.000
#> SRR650154 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650155 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650157 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650158 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650160 2 0.5345 1.0000 0.000 0.668 0.196 0.000 0.136
#> SRR650161 2 0.5345 1.0000 0.000 0.668 0.196 0.000 0.136
#> SRR650163 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650164 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650169 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650170 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650172 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650173 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650174 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650175 3 0.0290 0.8456 0.000 0.008 0.992 0.000 0.000
#> SRR650178 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650182 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650186 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650187 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650189 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650190 3 0.0000 0.8466 0.000 0.000 1.000 0.000 0.000
#> SRR650193 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR650194 4 0.0000 0.9438 0.000 0.000 0.000 1.000 0.000
#> SRR834560 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834561 5 0.0000 0.9979 0.000 0.000 0.000 0.000 1.000
#> SRR834562 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834563 5 0.0000 0.9979 0.000 0.000 0.000 0.000 1.000
#> SRR834564 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834565 5 0.0290 0.9876 0.008 0.000 0.000 0.000 0.992
#> SRR834566 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834569 5 0.0000 0.9979 0.000 0.000 0.000 0.000 1.000
#> SRR834570 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834573 5 0.0000 0.9979 0.000 0.000 0.000 0.000 1.000
#> SRR834574 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834575 5 0.0000 0.9979 0.000 0.000 0.000 0.000 1.000
#> SRR834576 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000
#> SRR834577 5 0.0000 0.9979 0.000 0.000 0.000 0.000 1.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650134 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650135 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650136 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650137 2 0.2664 0.7268 0.000 0.816 0.184 0.000 0.000 0.000
#> SRR650140 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650141 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650144 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650147 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650150 2 0.3198 0.7090 0.000 0.740 0.260 0.000 0.000 0.000
#> SRR650153 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650156 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650159 2 0.1556 0.6735 0.000 0.920 0.080 0.000 0.000 0.000
#> SRR650162 2 0.3198 0.7090 0.000 0.740 0.260 0.000 0.000 0.000
#> SRR650168 2 0.2597 0.7259 0.000 0.824 0.176 0.000 0.000 0.000
#> SRR650166 4 0.0260 0.9154 0.000 0.008 0.000 0.992 0.000 0.000
#> SRR650167 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650171 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650165 2 0.3684 0.2581 0.000 0.628 0.000 0.372 0.000 0.000
#> SRR650176 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650177 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650180 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650179 2 0.1556 0.6735 0.000 0.920 0.080 0.000 0.000 0.000
#> SRR650181 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650183 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650184 3 0.7310 0.2998 0.000 0.252 0.368 0.272 0.000 0.108
#> SRR650185 4 0.6834 0.2135 0.000 0.212 0.180 0.500 0.000 0.108
#> SRR650188 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650191 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650192 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650195 4 0.4383 0.6096 0.000 0.176 0.000 0.716 0.000 0.108
#> SRR650198 2 0.3198 0.7090 0.000 0.740 0.260 0.000 0.000 0.000
#> SRR650200 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650196 4 0.1556 0.8711 0.000 0.080 0.000 0.920 0.000 0.000
#> SRR650197 2 0.1957 0.6989 0.000 0.888 0.112 0.000 0.000 0.000
#> SRR650201 4 0.0146 0.9175 0.000 0.004 0.000 0.996 0.000 0.000
#> SRR650203 4 0.6929 0.0465 0.000 0.292 0.212 0.424 0.000 0.072
#> SRR650204 2 0.3198 0.7090 0.000 0.740 0.260 0.000 0.000 0.000
#> SRR650202 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650130 4 0.3854 0.2108 0.000 0.464 0.000 0.536 0.000 0.000
#> SRR650131 2 0.6370 -0.1825 0.000 0.504 0.312 0.116 0.000 0.068
#> SRR650132 4 0.1007 0.8950 0.000 0.044 0.000 0.956 0.000 0.000
#> SRR650133 4 0.4166 0.6574 0.000 0.216 0.008 0.728 0.000 0.048
#> SRR650138 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650139 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650142 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650143 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650145 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650146 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650148 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650149 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650151 3 0.5993 0.5547 0.000 0.116 0.608 0.196 0.000 0.080
#> SRR650152 3 0.6054 0.6142 0.000 0.172 0.608 0.136 0.000 0.084
#> SRR650154 4 0.1556 0.8711 0.000 0.080 0.000 0.920 0.000 0.000
#> SRR650155 4 0.1556 0.8711 0.000 0.080 0.000 0.920 0.000 0.000
#> SRR650157 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650158 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650160 6 0.1910 0.9936 0.000 0.000 0.108 0.000 0.000 0.892
#> SRR650161 6 0.2006 0.9936 0.000 0.000 0.104 0.000 0.004 0.892
#> SRR650163 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650164 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650169 3 0.4414 0.7112 0.000 0.180 0.712 0.000 0.000 0.108
#> SRR650170 3 0.4444 0.7111 0.000 0.184 0.708 0.000 0.000 0.108
#> SRR650172 3 0.0260 0.7552 0.000 0.008 0.992 0.000 0.000 0.000
#> SRR650173 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650174 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650175 3 0.4915 0.6961 0.000 0.260 0.632 0.000 0.000 0.108
#> SRR650178 4 0.1556 0.8711 0.000 0.080 0.000 0.920 0.000 0.000
#> SRR650182 4 0.1501 0.8738 0.000 0.076 0.000 0.924 0.000 0.000
#> SRR650186 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650187 3 0.0000 0.7621 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650189 3 0.0790 0.7612 0.000 0.032 0.968 0.000 0.000 0.000
#> SRR650190 3 0.2006 0.7502 0.000 0.104 0.892 0.000 0.000 0.004
#> SRR650193 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650194 4 0.0000 0.9194 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR834560 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 5 0.0000 0.9972 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR834562 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 5 0.0000 0.9972 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR834564 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 5 0.0363 0.9830 0.012 0.000 0.000 0.000 0.988 0.000
#> SRR834566 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 5 0.0000 0.9972 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR834570 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 5 0.0000 0.9972 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR834574 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 5 0.0000 0.9972 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR834576 1 0.0000 1.0000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 5 0.0000 0.9972 0.000 0.000 0.000 0.000 1.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.969 0.987 0.3308 0.684 0.684
#> 3 3 0.870 0.919 0.950 0.8965 0.692 0.551
#> 4 4 0.790 0.853 0.923 0.1598 0.878 0.683
#> 5 5 0.778 0.754 0.859 0.0615 0.936 0.777
#> 6 6 0.784 0.763 0.851 0.0353 0.947 0.787
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
#> SRR650205 2 0.0000 0.984 0.000 1.000
#> SRR650134 2 0.0376 0.982 0.004 0.996
#> SRR650135 2 0.0000 0.984 0.000 1.000
#> SRR650136 2 0.0376 0.982 0.004 0.996
#> SRR650137 2 0.0376 0.982 0.004 0.996
#> SRR650140 2 0.0376 0.982 0.004 0.996
#> SRR650141 2 0.0000 0.984 0.000 1.000
#> SRR650144 2 0.0376 0.982 0.004 0.996
#> SRR650147 2 0.0000 0.984 0.000 1.000
#> SRR650150 2 0.0376 0.982 0.004 0.996
#> SRR650153 2 0.0000 0.984 0.000 1.000
#> SRR650156 2 0.0000 0.984 0.000 1.000
#> SRR650159 2 0.0376 0.982 0.004 0.996
#> SRR650162 2 0.0376 0.982 0.004 0.996
#> SRR650168 2 0.0376 0.982 0.004 0.996
#> SRR650166 2 0.0376 0.982 0.004 0.996
#> SRR650167 2 0.0000 0.984 0.000 1.000
#> SRR650171 2 0.0376 0.982 0.004 0.996
#> SRR650165 2 0.0376 0.982 0.004 0.996
#> SRR650176 2 0.0376 0.982 0.004 0.996
#> SRR650177 2 0.0376 0.982 0.004 0.996
#> SRR650180 2 0.0376 0.982 0.004 0.996
#> SRR650179 2 0.0376 0.982 0.004 0.996
#> SRR650181 2 0.0000 0.984 0.000 1.000
#> SRR650183 2 0.0000 0.984 0.000 1.000
#> SRR650184 2 0.0000 0.984 0.000 1.000
#> SRR650185 2 0.0000 0.984 0.000 1.000
#> SRR650188 2 0.0000 0.984 0.000 1.000
#> SRR650191 2 0.0000 0.984 0.000 1.000
#> SRR650192 2 0.0000 0.984 0.000 1.000
#> SRR650195 2 0.0000 0.984 0.000 1.000
#> SRR650198 2 0.0376 0.982 0.004 0.996
#> SRR650200 2 0.0000 0.984 0.000 1.000
#> SRR650196 2 0.0000 0.984 0.000 1.000
#> SRR650197 2 0.0376 0.982 0.004 0.996
#> SRR650201 2 0.0000 0.984 0.000 1.000
#> SRR650203 2 0.0000 0.984 0.000 1.000
#> SRR650204 2 0.0376 0.982 0.004 0.996
#> SRR650202 2 0.0000 0.984 0.000 1.000
#> SRR650130 2 0.0376 0.982 0.004 0.996
#> SRR650131 2 0.7056 0.766 0.192 0.808
#> SRR650132 2 0.0000 0.984 0.000 1.000
#> SRR650133 2 0.5842 0.836 0.140 0.860
#> SRR650138 2 0.0000 0.984 0.000 1.000
#> SRR650139 2 0.0000 0.984 0.000 1.000
#> SRR650142 2 0.0000 0.984 0.000 1.000
#> SRR650143 2 0.0000 0.984 0.000 1.000
#> SRR650145 2 0.0000 0.984 0.000 1.000
#> SRR650146 2 0.0000 0.984 0.000 1.000
#> SRR650148 2 0.0000 0.984 0.000 1.000
#> SRR650149 2 0.0000 0.984 0.000 1.000
#> SRR650151 2 0.0000 0.984 0.000 1.000
#> SRR650152 2 0.0000 0.984 0.000 1.000
#> SRR650154 2 0.0000 0.984 0.000 1.000
#> SRR650155 2 0.0000 0.984 0.000 1.000
#> SRR650157 2 0.0000 0.984 0.000 1.000
#> SRR650158 2 0.0000 0.984 0.000 1.000
#> SRR650160 2 0.9686 0.371 0.396 0.604
#> SRR650161 2 0.9686 0.371 0.396 0.604
#> SRR650163 2 0.0000 0.984 0.000 1.000
#> SRR650164 2 0.0000 0.984 0.000 1.000
#> SRR650169 2 0.0000 0.984 0.000 1.000
#> SRR650170 2 0.0000 0.984 0.000 1.000
#> SRR650172 2 0.0000 0.984 0.000 1.000
#> SRR650173 2 0.0000 0.984 0.000 1.000
#> SRR650174 2 0.0000 0.984 0.000 1.000
#> SRR650175 2 0.0000 0.984 0.000 1.000
#> SRR650178 2 0.0000 0.984 0.000 1.000
#> SRR650182 2 0.0000 0.984 0.000 1.000
#> SRR650186 2 0.0000 0.984 0.000 1.000
#> SRR650187 2 0.0000 0.984 0.000 1.000
#> SRR650189 2 0.0000 0.984 0.000 1.000
#> SRR650190 2 0.0000 0.984 0.000 1.000
#> SRR650193 2 0.0376 0.982 0.004 0.996
#> SRR650194 2 0.0376 0.982 0.004 0.996
#> SRR834560 1 0.0000 1.000 1.000 0.000
#> SRR834561 1 0.0000 1.000 1.000 0.000
#> SRR834562 1 0.0000 1.000 1.000 0.000
#> SRR834563 1 0.0000 1.000 1.000 0.000
#> SRR834564 1 0.0000 1.000 1.000 0.000
#> SRR834565 1 0.0000 1.000 1.000 0.000
#> SRR834566 1 0.0000 1.000 1.000 0.000
#> SRR834567 1 0.0000 1.000 1.000 0.000
#> SRR834568 1 0.0000 1.000 1.000 0.000
#> SRR834569 1 0.0000 1.000 1.000 0.000
#> SRR834570 1 0.0000 1.000 1.000 0.000
#> SRR834571 1 0.0000 1.000 1.000 0.000
#> SRR834572 1 0.0000 1.000 1.000 0.000
#> SRR834573 1 0.0000 1.000 1.000 0.000
#> SRR834574 1 0.0000 1.000 1.000 0.000
#> SRR834575 1 0.0000 1.000 1.000 0.000
#> SRR834576 1 0.0000 1.000 1.000 0.000
#> SRR834577 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
#> SRR650205 2 0.2448 0.909 0 0.924 0.076
#> SRR650134 2 0.0747 0.914 0 0.984 0.016
#> SRR650135 2 0.2066 0.915 0 0.940 0.060
#> SRR650136 2 0.0747 0.914 0 0.984 0.016
#> SRR650137 2 0.0000 0.907 0 1.000 0.000
#> SRR650140 2 0.0747 0.914 0 0.984 0.016
#> SRR650141 2 0.2066 0.915 0 0.940 0.060
#> SRR650144 2 0.0747 0.914 0 0.984 0.016
#> SRR650147 2 0.1529 0.914 0 0.960 0.040
#> SRR650150 2 0.0000 0.907 0 1.000 0.000
#> SRR650153 2 0.2066 0.915 0 0.940 0.060
#> SRR650156 2 0.2066 0.915 0 0.940 0.060
#> SRR650159 2 0.0000 0.907 0 1.000 0.000
#> SRR650162 2 0.0000 0.907 0 1.000 0.000
#> SRR650168 2 0.0000 0.907 0 1.000 0.000
#> SRR650166 2 0.0000 0.907 0 1.000 0.000
#> SRR650167 2 0.1964 0.915 0 0.944 0.056
#> SRR650171 2 0.0747 0.914 0 0.984 0.016
#> SRR650165 2 0.0747 0.914 0 0.984 0.016
#> SRR650176 2 0.0747 0.914 0 0.984 0.016
#> SRR650177 2 0.0747 0.914 0 0.984 0.016
#> SRR650180 2 0.0892 0.914 0 0.980 0.020
#> SRR650179 2 0.1163 0.914 0 0.972 0.028
#> SRR650181 2 0.2066 0.915 0 0.940 0.060
#> SRR650183 2 0.2066 0.915 0 0.940 0.060
#> SRR650184 2 0.4796 0.789 0 0.780 0.220
#> SRR650185 2 0.3686 0.869 0 0.860 0.140
#> SRR650188 2 0.2066 0.915 0 0.940 0.060
#> SRR650191 2 0.6235 0.416 0 0.564 0.436
#> SRR650192 2 0.2066 0.915 0 0.940 0.060
#> SRR650195 2 0.6280 0.355 0 0.540 0.460
#> SRR650198 2 0.5678 0.577 0 0.684 0.316
#> SRR650200 2 0.2066 0.915 0 0.940 0.060
#> SRR650196 2 0.6180 0.468 0 0.584 0.416
#> SRR650197 2 0.0000 0.907 0 1.000 0.000
#> SRR650201 2 0.4452 0.821 0 0.808 0.192
#> SRR650203 2 0.6192 0.453 0 0.580 0.420
#> SRR650204 2 0.0000 0.907 0 1.000 0.000
#> SRR650202 2 0.2066 0.915 0 0.940 0.060
#> SRR650130 2 0.2448 0.903 0 0.924 0.076
#> SRR650131 2 0.2356 0.905 0 0.928 0.072
#> SRR650132 2 0.4346 0.832 0 0.816 0.184
#> SRR650133 2 0.3116 0.884 0 0.892 0.108
#> SRR650138 3 0.0000 0.989 0 0.000 1.000
#> SRR650139 3 0.0000 0.989 0 0.000 1.000
#> SRR650142 3 0.0000 0.989 0 0.000 1.000
#> SRR650143 3 0.0000 0.989 0 0.000 1.000
#> SRR650145 3 0.0000 0.989 0 0.000 1.000
#> SRR650146 3 0.0000 0.989 0 0.000 1.000
#> SRR650148 3 0.0000 0.989 0 0.000 1.000
#> SRR650149 3 0.0000 0.989 0 0.000 1.000
#> SRR650151 3 0.0000 0.989 0 0.000 1.000
#> SRR650152 3 0.0000 0.989 0 0.000 1.000
#> SRR650154 3 0.0000 0.989 0 0.000 1.000
#> SRR650155 3 0.0000 0.989 0 0.000 1.000
#> SRR650157 3 0.0000 0.989 0 0.000 1.000
#> SRR650158 3 0.0000 0.989 0 0.000 1.000
#> SRR650160 3 0.3879 0.842 0 0.152 0.848
#> SRR650161 3 0.3879 0.842 0 0.152 0.848
#> SRR650163 3 0.0000 0.989 0 0.000 1.000
#> SRR650164 3 0.0000 0.989 0 0.000 1.000
#> SRR650169 3 0.0000 0.989 0 0.000 1.000
#> SRR650170 3 0.0000 0.989 0 0.000 1.000
#> SRR650172 3 0.0000 0.989 0 0.000 1.000
#> SRR650173 3 0.0000 0.989 0 0.000 1.000
#> SRR650174 3 0.0000 0.989 0 0.000 1.000
#> SRR650175 3 0.0000 0.989 0 0.000 1.000
#> SRR650178 2 0.4291 0.836 0 0.820 0.180
#> SRR650182 2 0.3116 0.889 0 0.892 0.108
#> SRR650186 3 0.0000 0.989 0 0.000 1.000
#> SRR650187 3 0.0000 0.989 0 0.000 1.000
#> SRR650189 3 0.0000 0.989 0 0.000 1.000
#> SRR650190 3 0.0000 0.989 0 0.000 1.000
#> SRR650193 2 0.0747 0.914 0 0.984 0.016
#> SRR650194 2 0.0747 0.914 0 0.984 0.016
#> SRR834560 1 0.0000 1.000 1 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 0.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 2 0.0592 0.815 0 0.984 0.016 0.000
#> SRR650134 2 0.4999 -0.295 0 0.508 0.000 0.492
#> SRR650135 2 0.0336 0.811 0 0.992 0.008 0.000
#> SRR650136 4 0.3569 0.876 0 0.196 0.000 0.804
#> SRR650137 4 0.3569 0.876 0 0.196 0.000 0.804
#> SRR650140 4 0.3569 0.876 0 0.196 0.000 0.804
#> SRR650141 2 0.2081 0.807 0 0.916 0.084 0.000
#> SRR650144 4 0.4761 0.615 0 0.372 0.000 0.628
#> SRR650147 2 0.0000 0.807 0 1.000 0.000 0.000
#> SRR650150 4 0.0000 0.819 0 0.000 0.000 1.000
#> SRR650153 2 0.0927 0.814 0 0.976 0.016 0.008
#> SRR650156 2 0.0592 0.815 0 0.984 0.016 0.000
#> SRR650159 4 0.1867 0.856 0 0.072 0.000 0.928
#> SRR650162 4 0.1867 0.856 0 0.072 0.000 0.928
#> SRR650168 2 0.0188 0.805 0 0.996 0.000 0.004
#> SRR650166 2 0.4008 0.527 0 0.756 0.000 0.244
#> SRR650167 2 0.0524 0.811 0 0.988 0.008 0.004
#> SRR650171 4 0.3610 0.873 0 0.200 0.000 0.800
#> SRR650165 4 0.3528 0.876 0 0.192 0.000 0.808
#> SRR650176 4 0.3569 0.876 0 0.196 0.000 0.804
#> SRR650177 4 0.3569 0.876 0 0.196 0.000 0.804
#> SRR650180 2 0.3196 0.702 0 0.856 0.008 0.136
#> SRR650179 4 0.3105 0.869 0 0.120 0.012 0.868
#> SRR650181 2 0.1389 0.816 0 0.952 0.048 0.000
#> SRR650183 2 0.2345 0.801 0 0.900 0.100 0.000
#> SRR650184 2 0.3311 0.765 0 0.828 0.172 0.000
#> SRR650185 2 0.3266 0.768 0 0.832 0.168 0.000
#> SRR650188 2 0.0817 0.817 0 0.976 0.024 0.000
#> SRR650191 2 0.3311 0.765 0 0.828 0.172 0.000
#> SRR650192 2 0.1211 0.817 0 0.960 0.040 0.000
#> SRR650195 2 0.4866 0.440 0 0.596 0.404 0.000
#> SRR650198 2 0.3443 0.686 0 0.848 0.016 0.136
#> SRR650200 2 0.1109 0.817 0 0.968 0.028 0.004
#> SRR650196 2 0.4679 0.554 0 0.648 0.352 0.000
#> SRR650197 2 0.5000 -0.363 0 0.504 0.000 0.496
#> SRR650201 2 0.3356 0.762 0 0.824 0.176 0.000
#> SRR650203 2 0.4643 0.569 0 0.656 0.344 0.000
#> SRR650204 4 0.0000 0.819 0 0.000 0.000 1.000
#> SRR650202 2 0.0592 0.815 0 0.984 0.016 0.000
#> SRR650130 2 0.0000 0.807 0 1.000 0.000 0.000
#> SRR650131 2 0.0000 0.807 0 1.000 0.000 0.000
#> SRR650132 2 0.3801 0.723 0 0.780 0.220 0.000
#> SRR650133 2 0.1118 0.817 0 0.964 0.036 0.000
#> SRR650138 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650139 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650142 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650143 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650145 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650146 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650148 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650149 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650151 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650152 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650154 3 0.1557 0.933 0 0.056 0.944 0.000
#> SRR650155 3 0.1389 0.941 0 0.048 0.952 0.000
#> SRR650157 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650158 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650160 4 0.4150 0.728 0 0.120 0.056 0.824
#> SRR650161 4 0.4150 0.728 0 0.120 0.056 0.824
#> SRR650163 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650164 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650169 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650170 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650172 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650173 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650174 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650175 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650178 2 0.3356 0.762 0 0.824 0.176 0.000
#> SRR650182 2 0.2921 0.782 0 0.860 0.140 0.000
#> SRR650186 3 0.0336 0.987 0 0.008 0.992 0.000
#> SRR650187 3 0.0336 0.987 0 0.008 0.992 0.000
#> SRR650189 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650190 3 0.0000 0.994 0 0.000 1.000 0.000
#> SRR650193 2 0.3528 0.621 0 0.808 0.000 0.192
#> SRR650194 2 0.3219 0.660 0 0.836 0.000 0.164
#> SRR834560 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834561 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834562 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834563 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834564 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834565 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834566 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834567 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834568 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834569 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834570 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834571 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834572 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834573 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834574 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834575 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834576 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR834577 1 0.0000 1.000 1 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
#> SRR650205 4 0.2177 0.8397 0.000 0.080 0.008 0.908 0.004
#> SRR650134 2 0.1792 0.6600 0.000 0.916 0.000 0.084 0.000
#> SRR650135 4 0.1877 0.8406 0.000 0.064 0.000 0.924 0.012
#> SRR650136 2 0.1430 0.6791 0.000 0.944 0.000 0.052 0.004
#> SRR650137 2 0.3487 0.4314 0.000 0.780 0.000 0.008 0.212
#> SRR650140 2 0.1430 0.6791 0.000 0.944 0.000 0.052 0.004
#> SRR650141 4 0.2865 0.8076 0.000 0.132 0.008 0.856 0.004
#> SRR650144 2 0.1544 0.6711 0.000 0.932 0.000 0.068 0.000
#> SRR650147 4 0.3317 0.7879 0.000 0.116 0.000 0.840 0.044
#> SRR650150 2 0.4171 0.1714 0.000 0.604 0.000 0.000 0.396
#> SRR650153 4 0.2193 0.8283 0.000 0.092 0.000 0.900 0.008
#> SRR650156 4 0.1956 0.8382 0.000 0.076 0.000 0.916 0.008
#> SRR650159 2 0.4161 0.1825 0.000 0.608 0.000 0.000 0.392
#> SRR650162 2 0.4126 0.2056 0.000 0.620 0.000 0.000 0.380
#> SRR650168 4 0.5915 -0.0428 0.000 0.324 0.000 0.552 0.124
#> SRR650166 2 0.4711 0.4747 0.000 0.736 0.000 0.148 0.116
#> SRR650167 4 0.3563 0.7219 0.000 0.208 0.000 0.780 0.012
#> SRR650171 2 0.1670 0.6782 0.000 0.936 0.000 0.052 0.012
#> SRR650165 2 0.1430 0.6791 0.000 0.944 0.000 0.052 0.004
#> SRR650176 2 0.2139 0.6713 0.000 0.916 0.000 0.052 0.032
#> SRR650177 2 0.2300 0.6683 0.000 0.908 0.000 0.052 0.040
#> SRR650180 2 0.4015 0.1813 0.000 0.652 0.000 0.348 0.000
#> SRR650179 2 0.4674 0.5000 0.000 0.708 0.000 0.060 0.232
#> SRR650181 4 0.1205 0.8441 0.000 0.040 0.004 0.956 0.000
#> SRR650183 4 0.0451 0.8448 0.000 0.004 0.008 0.988 0.000
#> SRR650184 4 0.0566 0.8434 0.000 0.000 0.012 0.984 0.004
#> SRR650185 4 0.0566 0.8434 0.000 0.000 0.012 0.984 0.004
#> SRR650188 4 0.2130 0.8358 0.000 0.080 0.000 0.908 0.012
#> SRR650191 4 0.1173 0.8344 0.000 0.020 0.012 0.964 0.004
#> SRR650192 4 0.2852 0.7742 0.000 0.172 0.000 0.828 0.000
#> SRR650195 4 0.2233 0.7720 0.000 0.000 0.104 0.892 0.004
#> SRR650198 4 0.6430 -0.3276 0.000 0.328 0.000 0.480 0.192
#> SRR650200 4 0.2864 0.7955 0.000 0.136 0.000 0.852 0.012
#> SRR650196 4 0.1952 0.7963 0.000 0.000 0.084 0.912 0.004
#> SRR650197 2 0.6410 -0.5200 0.000 0.496 0.000 0.304 0.200
#> SRR650201 4 0.0404 0.8440 0.000 0.000 0.012 0.988 0.000
#> SRR650203 4 0.2124 0.7835 0.000 0.000 0.096 0.900 0.004
#> SRR650204 2 0.4341 0.1459 0.000 0.592 0.000 0.004 0.404
#> SRR650202 4 0.2852 0.7715 0.000 0.172 0.000 0.828 0.000
#> SRR650130 4 0.4065 0.6399 0.000 0.180 0.000 0.772 0.048
#> SRR650131 4 0.3064 0.7595 0.000 0.108 0.000 0.856 0.036
#> SRR650132 4 0.0609 0.8423 0.000 0.000 0.020 0.980 0.000
#> SRR650133 4 0.2419 0.7958 0.000 0.064 0.004 0.904 0.028
#> SRR650138 3 0.3231 0.8478 0.000 0.000 0.800 0.004 0.196
#> SRR650139 3 0.3231 0.8478 0.000 0.000 0.800 0.004 0.196
#> SRR650142 3 0.0404 0.9170 0.000 0.000 0.988 0.012 0.000
#> SRR650143 3 0.0404 0.9170 0.000 0.000 0.988 0.012 0.000
#> SRR650145 3 0.3003 0.8548 0.000 0.000 0.812 0.000 0.188
#> SRR650146 3 0.3003 0.8548 0.000 0.000 0.812 0.000 0.188
#> SRR650148 3 0.0404 0.9170 0.000 0.000 0.988 0.012 0.000
#> SRR650149 3 0.0404 0.9170 0.000 0.000 0.988 0.012 0.000
#> SRR650151 3 0.0609 0.9146 0.000 0.000 0.980 0.020 0.000
#> SRR650152 3 0.0609 0.9146 0.000 0.000 0.980 0.020 0.000
#> SRR650154 3 0.2488 0.8285 0.000 0.000 0.872 0.124 0.004
#> SRR650155 3 0.2389 0.8373 0.000 0.000 0.880 0.116 0.004
#> SRR650157 3 0.3003 0.8548 0.000 0.000 0.812 0.000 0.188
#> SRR650158 3 0.3003 0.8548 0.000 0.000 0.812 0.000 0.188
#> SRR650160 5 0.7227 1.0000 0.000 0.312 0.028 0.228 0.432
#> SRR650161 5 0.7227 1.0000 0.000 0.312 0.028 0.228 0.432
#> SRR650163 3 0.3003 0.8548 0.000 0.000 0.812 0.000 0.188
#> SRR650164 3 0.2813 0.8638 0.000 0.000 0.832 0.000 0.168
#> SRR650169 3 0.0703 0.9130 0.000 0.000 0.976 0.024 0.000
#> SRR650170 3 0.0404 0.9170 0.000 0.000 0.988 0.012 0.000
#> SRR650172 3 0.0000 0.9170 0.000 0.000 1.000 0.000 0.000
#> SRR650173 3 0.0000 0.9170 0.000 0.000 1.000 0.000 0.000
#> SRR650174 3 0.0000 0.9170 0.000 0.000 1.000 0.000 0.000
#> SRR650175 3 0.0000 0.9170 0.000 0.000 1.000 0.000 0.000
#> SRR650178 4 0.0404 0.8440 0.000 0.000 0.012 0.988 0.000
#> SRR650182 4 0.0290 0.8443 0.000 0.000 0.008 0.992 0.000
#> SRR650186 3 0.2074 0.8593 0.000 0.000 0.896 0.104 0.000
#> SRR650187 3 0.2020 0.8629 0.000 0.000 0.900 0.100 0.000
#> SRR650189 3 0.0000 0.9170 0.000 0.000 1.000 0.000 0.000
#> SRR650190 3 0.0000 0.9170 0.000 0.000 1.000 0.000 0.000
#> SRR650193 2 0.2193 0.6522 0.000 0.900 0.000 0.092 0.008
#> SRR650194 2 0.2249 0.6478 0.000 0.896 0.000 0.096 0.008
#> SRR834560 1 0.0290 0.9306 0.992 0.000 0.000 0.000 0.008
#> SRR834561 1 0.1671 0.9125 0.924 0.000 0.000 0.000 0.076
#> SRR834562 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.1671 0.9125 0.924 0.000 0.000 0.000 0.076
#> SRR834564 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.1671 0.9125 0.924 0.000 0.000 0.000 0.076
#> SRR834566 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0290 0.9306 0.992 0.000 0.000 0.000 0.008
#> SRR834568 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.4101 0.7051 0.628 0.000 0.000 0.000 0.372
#> SRR834570 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834573 1 0.4101 0.7051 0.628 0.000 0.000 0.000 0.372
#> SRR834574 1 0.0290 0.9306 0.992 0.000 0.000 0.000 0.008
#> SRR834575 1 0.1671 0.9125 0.924 0.000 0.000 0.000 0.076
#> SRR834576 1 0.0000 0.9311 1.000 0.000 0.000 0.000 0.000
#> SRR834577 1 0.4101 0.7051 0.628 0.000 0.000 0.000 0.372
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 2 0.2257 0.8809 0.000 0.876 0.000 0.116 0.008 0.000
#> SRR650134 4 0.0146 0.6823 0.000 0.004 0.000 0.996 0.000 0.000
#> SRR650135 2 0.3187 0.8683 0.000 0.836 0.000 0.112 0.008 0.044
#> SRR650136 4 0.0000 0.6836 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650137 4 0.3290 0.1963 0.000 0.004 0.000 0.744 0.000 0.252
#> SRR650140 4 0.0000 0.6836 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650141 2 0.2709 0.8749 0.000 0.848 0.000 0.132 0.020 0.000
#> SRR650144 4 0.0000 0.6836 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650147 2 0.2917 0.8653 0.000 0.840 0.000 0.136 0.008 0.016
#> SRR650150 6 0.3833 0.7491 0.000 0.000 0.000 0.444 0.000 0.556
#> SRR650153 2 0.3897 0.7950 0.000 0.756 0.000 0.196 0.008 0.040
#> SRR650156 2 0.2716 0.8803 0.000 0.868 0.000 0.096 0.008 0.028
#> SRR650159 6 0.3789 0.8143 0.000 0.000 0.000 0.416 0.000 0.584
#> SRR650162 6 0.3982 0.7493 0.000 0.004 0.000 0.460 0.000 0.536
#> SRR650168 4 0.5083 0.1376 0.000 0.464 0.000 0.472 0.008 0.056
#> SRR650166 4 0.4034 0.4423 0.000 0.168 0.000 0.760 0.008 0.064
#> SRR650167 2 0.4283 0.7394 0.000 0.704 0.000 0.244 0.008 0.044
#> SRR650171 4 0.0547 0.6740 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR650165 4 0.0000 0.6836 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR650176 4 0.0632 0.6706 0.000 0.000 0.000 0.976 0.000 0.024
#> SRR650177 4 0.0632 0.6706 0.000 0.000 0.000 0.976 0.000 0.024
#> SRR650180 4 0.3915 0.3102 0.000 0.284 0.000 0.696 0.008 0.012
#> SRR650179 4 0.3616 0.2479 0.000 0.012 0.000 0.748 0.008 0.232
#> SRR650181 2 0.1970 0.8870 0.000 0.900 0.000 0.092 0.008 0.000
#> SRR650183 2 0.0260 0.8960 0.000 0.992 0.000 0.008 0.000 0.000
#> SRR650184 2 0.0146 0.8937 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR650185 2 0.0146 0.8937 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR650188 2 0.2604 0.8821 0.000 0.872 0.000 0.100 0.008 0.020
#> SRR650191 2 0.0653 0.8923 0.000 0.980 0.004 0.000 0.012 0.004
#> SRR650192 2 0.2743 0.8556 0.000 0.828 0.000 0.164 0.008 0.000
#> SRR650195 2 0.1655 0.8748 0.000 0.936 0.044 0.004 0.012 0.004
#> SRR650198 4 0.6004 -0.0469 0.000 0.284 0.000 0.436 0.000 0.280
#> SRR650200 2 0.3897 0.7931 0.000 0.756 0.000 0.196 0.008 0.040
#> SRR650196 2 0.1226 0.8833 0.000 0.952 0.040 0.004 0.000 0.004
#> SRR650197 4 0.5036 0.0064 0.000 0.080 0.000 0.612 0.008 0.300
#> SRR650201 2 0.0146 0.8937 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR650203 2 0.2367 0.8506 0.000 0.900 0.064 0.004 0.012 0.020
#> SRR650204 6 0.3852 0.8247 0.000 0.004 0.000 0.384 0.000 0.612
#> SRR650202 2 0.2948 0.8337 0.000 0.804 0.000 0.188 0.008 0.000
#> SRR650130 2 0.2696 0.8158 0.000 0.856 0.000 0.116 0.000 0.028
#> SRR650131 2 0.1616 0.8788 0.000 0.932 0.000 0.048 0.000 0.020
#> SRR650132 2 0.1109 0.8892 0.000 0.964 0.016 0.004 0.012 0.004
#> SRR650133 2 0.1325 0.8948 0.000 0.956 0.004 0.016 0.012 0.012
#> SRR650138 3 0.1745 0.7196 0.000 0.000 0.924 0.000 0.056 0.020
#> SRR650139 3 0.1745 0.7196 0.000 0.000 0.924 0.000 0.056 0.020
#> SRR650142 3 0.4311 0.8527 0.000 0.008 0.692 0.000 0.040 0.260
#> SRR650143 3 0.4405 0.8521 0.000 0.012 0.688 0.000 0.040 0.260
#> SRR650145 3 0.1225 0.7364 0.000 0.000 0.952 0.000 0.036 0.012
#> SRR650146 3 0.1225 0.7364 0.000 0.000 0.952 0.000 0.036 0.012
#> SRR650148 3 0.4311 0.8527 0.000 0.008 0.692 0.000 0.040 0.260
#> SRR650149 3 0.4311 0.8527 0.000 0.008 0.692 0.000 0.040 0.260
#> SRR650151 3 0.4723 0.8471 0.000 0.028 0.672 0.000 0.040 0.260
#> SRR650152 3 0.4574 0.8501 0.000 0.020 0.680 0.000 0.040 0.260
#> SRR650154 3 0.6091 0.7003 0.000 0.200 0.516 0.004 0.012 0.268
#> SRR650155 3 0.6091 0.7003 0.000 0.200 0.516 0.004 0.012 0.268
#> SRR650157 3 0.1633 0.7252 0.000 0.000 0.932 0.000 0.044 0.024
#> SRR650158 3 0.1549 0.7267 0.000 0.000 0.936 0.000 0.044 0.020
#> SRR650160 6 0.3452 0.7753 0.000 0.000 0.004 0.256 0.004 0.736
#> SRR650161 6 0.3452 0.7753 0.000 0.000 0.004 0.256 0.004 0.736
#> SRR650163 3 0.1225 0.7364 0.000 0.000 0.952 0.000 0.036 0.012
#> SRR650164 3 0.1010 0.7402 0.000 0.000 0.960 0.000 0.036 0.004
#> SRR650169 3 0.4519 0.8512 0.000 0.024 0.684 0.000 0.032 0.260
#> SRR650170 3 0.4341 0.8532 0.000 0.012 0.692 0.000 0.036 0.260
#> SRR650172 3 0.3674 0.8509 0.000 0.000 0.716 0.000 0.016 0.268
#> SRR650173 3 0.3674 0.8509 0.000 0.000 0.716 0.000 0.016 0.268
#> SRR650174 3 0.3521 0.8531 0.000 0.004 0.724 0.000 0.004 0.268
#> SRR650175 3 0.3360 0.8540 0.000 0.004 0.732 0.000 0.000 0.264
#> SRR650178 2 0.0508 0.8952 0.000 0.984 0.000 0.004 0.000 0.012
#> SRR650182 2 0.0291 0.8957 0.000 0.992 0.000 0.004 0.000 0.004
#> SRR650186 3 0.5400 0.8240 0.000 0.064 0.624 0.000 0.048 0.264
#> SRR650187 3 0.5400 0.8240 0.000 0.064 0.624 0.000 0.048 0.264
#> SRR650189 3 0.3337 0.8540 0.000 0.004 0.736 0.000 0.000 0.260
#> SRR650190 3 0.3337 0.8540 0.000 0.004 0.736 0.000 0.000 0.260
#> SRR650193 4 0.1483 0.6543 0.000 0.012 0.000 0.944 0.008 0.036
#> SRR650194 4 0.1332 0.6610 0.000 0.012 0.000 0.952 0.008 0.028
#> SRR834560 1 0.1765 0.8434 0.904 0.000 0.000 0.000 0.096 0.000
#> SRR834561 5 0.3531 0.7886 0.328 0.000 0.000 0.000 0.672 0.000
#> SRR834562 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 5 0.3446 0.8088 0.308 0.000 0.000 0.000 0.692 0.000
#> SRR834564 1 0.0790 0.9031 0.968 0.000 0.000 0.000 0.032 0.000
#> SRR834565 5 0.3659 0.7311 0.364 0.000 0.000 0.000 0.636 0.000
#> SRR834566 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.3515 0.3079 0.676 0.000 0.000 0.000 0.324 0.000
#> SRR834568 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 5 0.1910 0.8096 0.108 0.000 0.000 0.000 0.892 0.000
#> SRR834570 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 5 0.1910 0.8096 0.108 0.000 0.000 0.000 0.892 0.000
#> SRR834574 1 0.1765 0.8434 0.904 0.000 0.000 0.000 0.096 0.000
#> SRR834575 5 0.3371 0.8166 0.292 0.000 0.000 0.000 0.708 0.000
#> SRR834576 1 0.0000 0.9233 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 5 0.1910 0.8096 0.108 0.000 0.000 0.000 0.892 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 16900 rows and 93 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 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.3066 0.698 0.698
#> 3 3 1.000 0.975 0.987 0.9991 0.676 0.539
#> 4 4 0.763 0.725 0.813 0.1526 0.835 0.588
#> 5 5 0.820 0.855 0.919 0.0678 0.928 0.746
#> 6 6 0.795 0.746 0.879 0.0569 0.880 0.570
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
#> SRR650205 2 0.000 0.995 0.000 1.000
#> SRR650134 2 0.000 0.995 0.000 1.000
#> SRR650135 2 0.000 0.995 0.000 1.000
#> SRR650136 2 0.000 0.995 0.000 1.000
#> SRR650137 2 0.000 0.995 0.000 1.000
#> SRR650140 2 0.000 0.995 0.000 1.000
#> SRR650141 2 0.000 0.995 0.000 1.000
#> SRR650144 2 0.000 0.995 0.000 1.000
#> SRR650147 2 0.000 0.995 0.000 1.000
#> SRR650150 2 0.000 0.995 0.000 1.000
#> SRR650153 2 0.000 0.995 0.000 1.000
#> SRR650156 2 0.000 0.995 0.000 1.000
#> SRR650159 2 0.000 0.995 0.000 1.000
#> SRR650162 2 0.000 0.995 0.000 1.000
#> SRR650168 2 0.000 0.995 0.000 1.000
#> SRR650166 2 0.000 0.995 0.000 1.000
#> SRR650167 2 0.000 0.995 0.000 1.000
#> SRR650171 2 0.000 0.995 0.000 1.000
#> SRR650165 2 0.000 0.995 0.000 1.000
#> SRR650176 2 0.000 0.995 0.000 1.000
#> SRR650177 2 0.000 0.995 0.000 1.000
#> SRR650180 2 0.000 0.995 0.000 1.000
#> SRR650179 2 0.000 0.995 0.000 1.000
#> SRR650181 2 0.000 0.995 0.000 1.000
#> SRR650183 2 0.000 0.995 0.000 1.000
#> SRR650184 2 0.000 0.995 0.000 1.000
#> SRR650185 2 0.000 0.995 0.000 1.000
#> SRR650188 2 0.000 0.995 0.000 1.000
#> SRR650191 2 0.000 0.995 0.000 1.000
#> SRR650192 2 0.000 0.995 0.000 1.000
#> SRR650195 2 0.000 0.995 0.000 1.000
#> SRR650198 2 0.000 0.995 0.000 1.000
#> SRR650200 2 0.000 0.995 0.000 1.000
#> SRR650196 2 0.000 0.995 0.000 1.000
#> SRR650197 2 0.000 0.995 0.000 1.000
#> SRR650201 2 0.000 0.995 0.000 1.000
#> SRR650203 2 0.000 0.995 0.000 1.000
#> SRR650204 2 0.000 0.995 0.000 1.000
#> SRR650202 2 0.000 0.995 0.000 1.000
#> SRR650130 2 0.000 0.995 0.000 1.000
#> SRR650131 2 0.000 0.995 0.000 1.000
#> SRR650132 2 0.000 0.995 0.000 1.000
#> SRR650133 2 0.000 0.995 0.000 1.000
#> SRR650138 2 0.000 0.995 0.000 1.000
#> SRR650139 2 0.000 0.995 0.000 1.000
#> SRR650142 2 0.000 0.995 0.000 1.000
#> SRR650143 2 0.000 0.995 0.000 1.000
#> SRR650145 2 0.000 0.995 0.000 1.000
#> SRR650146 2 0.000 0.995 0.000 1.000
#> SRR650148 2 0.000 0.995 0.000 1.000
#> SRR650149 2 0.000 0.995 0.000 1.000
#> SRR650151 2 0.000 0.995 0.000 1.000
#> SRR650152 2 0.000 0.995 0.000 1.000
#> SRR650154 2 0.000 0.995 0.000 1.000
#> SRR650155 2 0.000 0.995 0.000 1.000
#> SRR650157 2 0.000 0.995 0.000 1.000
#> SRR650158 2 0.000 0.995 0.000 1.000
#> SRR650160 2 0.000 0.995 0.000 1.000
#> SRR650161 2 0.000 0.995 0.000 1.000
#> SRR650163 2 0.000 0.995 0.000 1.000
#> SRR650164 2 0.000 0.995 0.000 1.000
#> SRR650169 2 0.000 0.995 0.000 1.000
#> SRR650170 2 0.000 0.995 0.000 1.000
#> SRR650172 2 0.000 0.995 0.000 1.000
#> SRR650173 2 0.000 0.995 0.000 1.000
#> SRR650174 2 0.000 0.995 0.000 1.000
#> SRR650175 2 0.000 0.995 0.000 1.000
#> SRR650178 2 0.000 0.995 0.000 1.000
#> SRR650182 2 0.000 0.995 0.000 1.000
#> SRR650186 2 0.000 0.995 0.000 1.000
#> SRR650187 2 0.000 0.995 0.000 1.000
#> SRR650189 2 0.000 0.995 0.000 1.000
#> SRR650190 2 0.000 0.995 0.000 1.000
#> SRR650193 2 0.000 0.995 0.000 1.000
#> SRR650194 2 0.000 0.995 0.000 1.000
#> SRR834560 1 0.000 0.997 1.000 0.000
#> SRR834561 1 0.000 0.997 1.000 0.000
#> SRR834562 1 0.000 0.997 1.000 0.000
#> SRR834563 1 0.000 0.997 1.000 0.000
#> SRR834564 1 0.000 0.997 1.000 0.000
#> SRR834565 1 0.000 0.997 1.000 0.000
#> SRR834566 1 0.000 0.997 1.000 0.000
#> SRR834567 1 0.000 0.997 1.000 0.000
#> SRR834568 1 0.000 0.997 1.000 0.000
#> SRR834569 1 0.000 0.997 1.000 0.000
#> SRR834570 1 0.000 0.997 1.000 0.000
#> SRR834571 1 0.000 0.997 1.000 0.000
#> SRR834572 1 0.000 0.997 1.000 0.000
#> SRR834573 1 0.278 0.949 0.952 0.048
#> SRR834574 1 0.000 0.997 1.000 0.000
#> SRR834575 1 0.000 0.997 1.000 0.000
#> SRR834576 1 0.000 0.997 1.000 0.000
#> SRR834577 2 0.925 0.482 0.340 0.660
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR650205 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650134 2 0.0424 0.987 0.000 0.992 0.008
#> SRR650135 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650136 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650137 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650140 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650141 2 0.0747 0.984 0.000 0.984 0.016
#> SRR650144 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650147 2 0.0424 0.987 0.000 0.992 0.008
#> SRR650150 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650153 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650156 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650159 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650162 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650168 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650166 2 0.0424 0.987 0.000 0.992 0.008
#> SRR650167 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650171 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650165 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650176 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650177 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650180 2 0.0424 0.987 0.000 0.992 0.008
#> SRR650179 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650181 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650183 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650184 2 0.2066 0.942 0.000 0.940 0.060
#> SRR650185 2 0.1411 0.967 0.000 0.964 0.036
#> SRR650188 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650191 3 0.2711 0.878 0.000 0.088 0.912
#> SRR650192 2 0.0747 0.984 0.000 0.984 0.016
#> SRR650195 2 0.4974 0.708 0.000 0.764 0.236
#> SRR650198 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650200 2 0.0424 0.987 0.000 0.992 0.008
#> SRR650196 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650197 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650201 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650203 2 0.1289 0.971 0.000 0.968 0.032
#> SRR650204 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650202 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650130 2 0.0424 0.987 0.000 0.992 0.008
#> SRR650131 2 0.0592 0.986 0.000 0.988 0.012
#> SRR650132 2 0.0892 0.981 0.000 0.980 0.020
#> SRR650133 2 0.1289 0.971 0.000 0.968 0.032
#> SRR650138 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650139 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650142 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650143 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650145 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650146 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650148 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650149 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650151 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650152 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650154 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650155 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650157 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650158 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650160 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650161 2 0.0000 0.985 0.000 1.000 0.000
#> SRR650163 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650164 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650169 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650170 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650172 3 0.0747 0.974 0.000 0.016 0.984
#> SRR650173 3 0.0237 0.988 0.000 0.004 0.996
#> SRR650174 3 0.0237 0.988 0.000 0.004 0.996
#> SRR650175 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650178 2 0.0747 0.984 0.000 0.984 0.016
#> SRR650182 2 0.0747 0.984 0.000 0.984 0.016
#> SRR650186 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650187 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650189 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650190 3 0.0000 0.992 0.000 0.000 1.000
#> SRR650193 2 0.0237 0.987 0.000 0.996 0.004
#> SRR650194 2 0.0237 0.987 0.000 0.996 0.004
#> SRR834560 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834561 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834562 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834563 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834564 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834565 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834566 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834567 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834568 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834569 1 0.5621 0.548 0.692 0.000 0.308
#> SRR834570 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834571 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834572 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834573 3 0.0424 0.985 0.008 0.000 0.992
#> SRR834574 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834575 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834576 1 0.0000 0.979 1.000 0.000 0.000
#> SRR834577 3 0.2448 0.915 0.076 0.000 0.924
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR650205 4 0.1474 0.6148 0.000 0.052 0.000 0.948
#> SRR650134 2 0.4697 0.8623 0.000 0.644 0.000 0.356
#> SRR650135 4 0.4916 -0.3914 0.000 0.424 0.000 0.576
#> SRR650136 2 0.4679 0.8640 0.000 0.648 0.000 0.352
#> SRR650137 2 0.4624 0.8604 0.000 0.660 0.000 0.340
#> SRR650140 2 0.4624 0.8604 0.000 0.660 0.000 0.340
#> SRR650141 4 0.2053 0.6028 0.000 0.072 0.004 0.924
#> SRR650144 2 0.4679 0.8640 0.000 0.648 0.000 0.352
#> SRR650147 4 0.5000 -0.6203 0.000 0.496 0.000 0.504
#> SRR650150 2 0.4624 0.8604 0.000 0.660 0.000 0.340
#> SRR650153 2 0.4941 0.7742 0.000 0.564 0.000 0.436
#> SRR650156 4 0.4804 -0.2568 0.000 0.384 0.000 0.616
#> SRR650159 2 0.4643 0.8624 0.000 0.656 0.000 0.344
#> SRR650162 2 0.4624 0.8604 0.000 0.660 0.000 0.340
#> SRR650168 2 0.4925 0.5875 0.000 0.572 0.000 0.428
#> SRR650166 2 0.4761 0.8516 0.000 0.628 0.000 0.372
#> SRR650167 2 0.4907 0.7944 0.000 0.580 0.000 0.420
#> SRR650171 2 0.4679 0.8640 0.000 0.648 0.000 0.352
#> SRR650165 2 0.4643 0.8624 0.000 0.656 0.000 0.344
#> SRR650176 2 0.4679 0.8640 0.000 0.648 0.000 0.352
#> SRR650177 2 0.4679 0.8640 0.000 0.648 0.000 0.352
#> SRR650180 2 0.4925 0.7842 0.000 0.572 0.000 0.428
#> SRR650179 2 0.4193 0.7683 0.000 0.732 0.000 0.268
#> SRR650181 4 0.3356 0.4562 0.000 0.176 0.000 0.824
#> SRR650183 4 0.2760 0.5390 0.000 0.128 0.000 0.872
#> SRR650184 4 0.1716 0.6104 0.000 0.000 0.064 0.936
#> SRR650185 4 0.1722 0.6185 0.000 0.008 0.048 0.944
#> SRR650188 4 0.4522 0.0282 0.000 0.320 0.000 0.680
#> SRR650191 4 0.4454 0.3138 0.000 0.000 0.308 0.692
#> SRR650192 4 0.1902 0.6078 0.000 0.064 0.004 0.932
#> SRR650195 4 0.3893 0.5187 0.000 0.008 0.196 0.796
#> SRR650198 2 0.4713 0.8463 0.000 0.640 0.000 0.360
#> SRR650200 4 0.4972 -0.5113 0.000 0.456 0.000 0.544
#> SRR650196 4 0.2593 0.5697 0.000 0.104 0.004 0.892
#> SRR650197 2 0.4679 0.8636 0.000 0.648 0.000 0.352
#> SRR650201 4 0.2125 0.6117 0.000 0.076 0.004 0.920
#> SRR650203 4 0.2816 0.5943 0.000 0.036 0.064 0.900
#> SRR650204 2 0.4585 0.8527 0.000 0.668 0.000 0.332
#> SRR650202 4 0.2149 0.5887 0.000 0.088 0.000 0.912
#> SRR650130 2 0.4955 0.7514 0.000 0.556 0.000 0.444
#> SRR650131 4 0.0921 0.6189 0.000 0.028 0.000 0.972
#> SRR650132 4 0.1635 0.6181 0.000 0.044 0.008 0.948
#> SRR650133 4 0.1389 0.6170 0.000 0.000 0.048 0.952
#> SRR650138 3 0.0524 0.9515 0.000 0.008 0.988 0.004
#> SRR650139 3 0.0376 0.9524 0.000 0.004 0.992 0.004
#> SRR650142 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650143 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650145 3 0.0188 0.9528 0.000 0.000 0.996 0.004
#> SRR650146 3 0.0188 0.9528 0.000 0.000 0.996 0.004
#> SRR650148 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650149 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650151 3 0.1474 0.9215 0.000 0.000 0.948 0.052
#> SRR650152 3 0.1474 0.9229 0.000 0.000 0.948 0.052
#> SRR650154 3 0.4746 0.4683 0.000 0.000 0.632 0.368
#> SRR650155 3 0.4855 0.4020 0.000 0.000 0.600 0.400
#> SRR650157 3 0.0921 0.9421 0.000 0.028 0.972 0.000
#> SRR650158 3 0.0921 0.9421 0.000 0.028 0.972 0.000
#> SRR650160 2 0.4274 0.1793 0.000 0.820 0.108 0.072
#> SRR650161 2 0.5032 0.1135 0.000 0.764 0.156 0.080
#> SRR650163 3 0.0895 0.9434 0.000 0.020 0.976 0.004
#> SRR650164 3 0.1004 0.9417 0.000 0.024 0.972 0.004
#> SRR650169 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650170 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650172 3 0.1576 0.9274 0.000 0.048 0.948 0.004
#> SRR650173 3 0.1576 0.9274 0.000 0.048 0.948 0.004
#> SRR650174 3 0.0592 0.9466 0.000 0.000 0.984 0.016
#> SRR650175 3 0.0188 0.9528 0.000 0.000 0.996 0.004
#> SRR650178 4 0.5112 -0.4353 0.000 0.436 0.004 0.560
#> SRR650182 2 0.4967 0.7332 0.000 0.548 0.000 0.452
#> SRR650186 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650187 3 0.0336 0.9527 0.000 0.000 0.992 0.008
#> SRR650189 3 0.0524 0.9515 0.000 0.008 0.988 0.004
#> SRR650190 3 0.0376 0.9524 0.000 0.004 0.992 0.004
#> SRR650193 2 0.4776 0.8488 0.000 0.624 0.000 0.376
#> SRR650194 2 0.4804 0.8403 0.000 0.616 0.000 0.384
#> SRR834560 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834561 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834562 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834563 1 0.0469 0.9835 0.988 0.000 0.000 0.012
#> SRR834564 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834565 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834566 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834569 1 0.2053 0.9135 0.924 0.000 0.072 0.004
#> SRR834570 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834573 4 0.6757 0.0220 0.100 0.000 0.376 0.524
#> SRR834574 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834575 1 0.0592 0.9801 0.984 0.000 0.000 0.016
#> SRR834576 1 0.0000 0.9925 1.000 0.000 0.000 0.000
#> SRR834577 4 0.6156 0.1582 0.064 0.000 0.344 0.592
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR650205 4 0.3648 0.8213 0.000 0.092 0.000 0.824 0.084
#> SRR650134 2 0.0000 0.8916 0.000 1.000 0.000 0.000 0.000
#> SRR650135 2 0.3612 0.6647 0.000 0.732 0.000 0.268 0.000
#> SRR650136 2 0.0000 0.8916 0.000 1.000 0.000 0.000 0.000
#> SRR650137 2 0.0290 0.8910 0.000 0.992 0.000 0.000 0.008
#> SRR650140 2 0.0290 0.8910 0.000 0.992 0.000 0.000 0.008
#> SRR650141 4 0.4254 0.8118 0.000 0.148 0.000 0.772 0.080
#> SRR650144 2 0.0162 0.8918 0.000 0.996 0.000 0.000 0.004
#> SRR650147 2 0.2068 0.8590 0.000 0.904 0.000 0.092 0.004
#> SRR650150 2 0.0162 0.8902 0.000 0.996 0.000 0.004 0.000
#> SRR650153 2 0.2777 0.8384 0.000 0.864 0.000 0.120 0.016
#> SRR650156 4 0.4307 -0.0179 0.000 0.496 0.000 0.504 0.000
#> SRR650159 2 0.0162 0.8902 0.000 0.996 0.000 0.004 0.000
#> SRR650162 2 0.0162 0.8902 0.000 0.996 0.000 0.004 0.000
#> SRR650168 4 0.5163 0.7487 0.000 0.152 0.000 0.692 0.156
#> SRR650166 2 0.0290 0.8920 0.000 0.992 0.000 0.008 0.000
#> SRR650167 2 0.2660 0.8343 0.000 0.864 0.000 0.128 0.008
#> SRR650171 2 0.0290 0.8918 0.000 0.992 0.000 0.000 0.008
#> SRR650165 2 0.0162 0.8902 0.000 0.996 0.000 0.004 0.000
#> SRR650176 2 0.0290 0.8915 0.000 0.992 0.000 0.000 0.008
#> SRR650177 2 0.0290 0.8915 0.000 0.992 0.000 0.000 0.008
#> SRR650180 2 0.2036 0.8716 0.000 0.920 0.000 0.056 0.024
#> SRR650179 2 0.2605 0.7850 0.000 0.852 0.000 0.000 0.148
#> SRR650181 4 0.3398 0.7458 0.000 0.216 0.000 0.780 0.004
#> SRR650183 4 0.3333 0.7526 0.000 0.208 0.000 0.788 0.004
#> SRR650184 4 0.2448 0.7915 0.000 0.020 0.000 0.892 0.088
#> SRR650185 4 0.3416 0.8170 0.000 0.072 0.000 0.840 0.088
#> SRR650188 2 0.4291 0.1305 0.000 0.536 0.000 0.464 0.000
#> SRR650191 4 0.2289 0.7808 0.000 0.004 0.012 0.904 0.080
#> SRR650192 4 0.4367 0.7867 0.000 0.192 0.000 0.748 0.060
#> SRR650195 4 0.1710 0.8058 0.000 0.016 0.004 0.940 0.040
#> SRR650198 2 0.2054 0.8708 0.000 0.920 0.000 0.028 0.052
#> SRR650200 2 0.4074 0.4560 0.000 0.636 0.000 0.364 0.000
#> SRR650196 4 0.2411 0.8200 0.000 0.108 0.000 0.884 0.008
#> SRR650197 2 0.0898 0.8888 0.000 0.972 0.000 0.008 0.020
#> SRR650201 4 0.0992 0.8096 0.000 0.024 0.000 0.968 0.008
#> SRR650203 4 0.0968 0.7997 0.000 0.012 0.012 0.972 0.004
#> SRR650204 2 0.0566 0.8878 0.000 0.984 0.000 0.004 0.012
#> SRR650202 4 0.4133 0.7978 0.000 0.180 0.000 0.768 0.052
#> SRR650130 2 0.2806 0.8144 0.000 0.844 0.000 0.152 0.004
#> SRR650131 4 0.2179 0.8221 0.000 0.100 0.000 0.896 0.004
#> SRR650132 4 0.2694 0.8119 0.000 0.128 0.004 0.864 0.004
#> SRR650133 4 0.0703 0.8104 0.000 0.024 0.000 0.976 0.000
#> SRR650138 3 0.0000 0.9502 0.000 0.000 1.000 0.000 0.000
#> SRR650139 3 0.0000 0.9502 0.000 0.000 1.000 0.000 0.000
#> SRR650142 3 0.0162 0.9496 0.000 0.000 0.996 0.004 0.000
#> SRR650143 3 0.0162 0.9502 0.000 0.000 0.996 0.004 0.000
#> SRR650145 3 0.0162 0.9496 0.000 0.000 0.996 0.004 0.000
#> SRR650146 3 0.0000 0.9502 0.000 0.000 1.000 0.000 0.000
#> SRR650148 3 0.0566 0.9472 0.000 0.004 0.984 0.012 0.000
#> SRR650149 3 0.2069 0.8917 0.000 0.000 0.912 0.076 0.012
#> SRR650151 3 0.2305 0.8736 0.000 0.012 0.896 0.092 0.000
#> SRR650152 3 0.2361 0.8700 0.000 0.012 0.892 0.096 0.000
#> SRR650154 3 0.3885 0.6308 0.000 0.008 0.724 0.268 0.000
#> SRR650155 3 0.4088 0.5699 0.000 0.008 0.688 0.304 0.000
#> SRR650157 3 0.0162 0.9501 0.000 0.000 0.996 0.004 0.000
#> SRR650158 3 0.0162 0.9501 0.000 0.000 0.996 0.004 0.000
#> SRR650160 5 0.1792 1.0000 0.000 0.084 0.000 0.000 0.916
#> SRR650161 5 0.1792 1.0000 0.000 0.084 0.000 0.000 0.916
#> SRR650163 3 0.0510 0.9461 0.000 0.000 0.984 0.000 0.016
#> SRR650164 3 0.0671 0.9465 0.000 0.000 0.980 0.004 0.016
#> SRR650169 3 0.0324 0.9499 0.000 0.004 0.992 0.004 0.000
#> SRR650170 3 0.0451 0.9496 0.000 0.000 0.988 0.004 0.008
#> SRR650172 3 0.0865 0.9426 0.000 0.000 0.972 0.004 0.024
#> SRR650173 3 0.0865 0.9426 0.000 0.000 0.972 0.004 0.024
#> SRR650174 3 0.0579 0.9482 0.000 0.008 0.984 0.008 0.000
#> SRR650175 3 0.0451 0.9490 0.000 0.004 0.988 0.008 0.000
#> SRR650178 2 0.3861 0.6261 0.000 0.712 0.000 0.284 0.004
#> SRR650182 2 0.2516 0.8236 0.000 0.860 0.000 0.140 0.000
#> SRR650186 3 0.0290 0.9485 0.000 0.000 0.992 0.008 0.000
#> SRR650187 3 0.0324 0.9493 0.000 0.000 0.992 0.004 0.004
#> SRR650189 3 0.0451 0.9496 0.000 0.004 0.988 0.008 0.000
#> SRR650190 3 0.0290 0.9503 0.000 0.000 0.992 0.008 0.000
#> SRR650193 2 0.0798 0.8909 0.000 0.976 0.000 0.016 0.008
#> SRR650194 2 0.0992 0.8888 0.000 0.968 0.000 0.024 0.008
#> SRR834560 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834561 1 0.2116 0.9097 0.912 0.000 0.004 0.008 0.076
#> SRR834562 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834563 1 0.3584 0.8267 0.840 0.000 0.008 0.076 0.076
#> SRR834564 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.0703 0.9518 0.976 0.000 0.000 0.000 0.024
#> SRR834566 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.2228 0.9057 0.908 0.000 0.004 0.012 0.076
#> SRR834570 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834573 4 0.4086 0.6886 0.100 0.000 0.012 0.808 0.080
#> SRR834574 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834575 1 0.2522 0.8951 0.896 0.000 0.004 0.024 0.076
#> SRR834576 1 0.0000 0.9644 1.000 0.000 0.000 0.000 0.000
#> SRR834577 4 0.2786 0.7567 0.020 0.000 0.012 0.884 0.084
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR650205 4 0.3183 0.6216 0.000 0.112 0.000 0.828 0.060 0.000
#> SRR650134 2 0.1501 0.8691 0.000 0.924 0.000 0.000 0.076 0.000
#> SRR650135 5 0.4169 0.2100 0.000 0.456 0.000 0.012 0.532 0.000
#> SRR650136 2 0.0291 0.8973 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR650137 2 0.0458 0.8967 0.000 0.984 0.000 0.000 0.016 0.000
#> SRR650140 2 0.0405 0.8981 0.000 0.988 0.000 0.000 0.008 0.004
#> SRR650141 4 0.5539 0.4180 0.000 0.272 0.000 0.548 0.180 0.000
#> SRR650144 2 0.0291 0.8973 0.000 0.992 0.000 0.004 0.004 0.000
#> SRR650147 2 0.3194 0.7671 0.000 0.808 0.000 0.020 0.168 0.004
#> SRR650150 2 0.0547 0.8916 0.000 0.980 0.000 0.020 0.000 0.000
#> SRR650153 2 0.3996 0.3922 0.000 0.636 0.000 0.008 0.352 0.004
#> SRR650156 5 0.2558 0.7491 0.000 0.156 0.000 0.004 0.840 0.000
#> SRR650159 2 0.0146 0.8963 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650162 2 0.0363 0.8974 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR650168 4 0.2122 0.6163 0.000 0.076 0.000 0.900 0.000 0.024
#> SRR650166 2 0.1858 0.8570 0.000 0.904 0.000 0.000 0.092 0.004
#> SRR650167 5 0.4089 0.1698 0.000 0.468 0.000 0.008 0.524 0.000
#> SRR650171 2 0.0632 0.8913 0.000 0.976 0.000 0.024 0.000 0.000
#> SRR650165 2 0.0146 0.8963 0.000 0.996 0.000 0.004 0.000 0.000
#> SRR650176 2 0.0865 0.8846 0.000 0.964 0.000 0.036 0.000 0.000
#> SRR650177 2 0.0937 0.8820 0.000 0.960 0.000 0.040 0.000 0.000
#> SRR650180 2 0.2593 0.7972 0.000 0.844 0.000 0.148 0.000 0.008
#> SRR650179 2 0.3823 0.2987 0.000 0.564 0.000 0.000 0.000 0.436
#> SRR650181 5 0.3570 0.7270 0.000 0.144 0.000 0.064 0.792 0.000
#> SRR650183 5 0.3297 0.7366 0.000 0.112 0.000 0.068 0.820 0.000
#> SRR650184 4 0.1780 0.6580 0.000 0.028 0.000 0.924 0.048 0.000
#> SRR650185 4 0.1921 0.6556 0.000 0.052 0.000 0.916 0.032 0.000
#> SRR650188 5 0.2234 0.7579 0.000 0.124 0.000 0.004 0.872 0.000
#> SRR650191 4 0.1753 0.6429 0.000 0.000 0.004 0.912 0.084 0.000
#> SRR650192 4 0.6100 0.1080 0.000 0.308 0.000 0.384 0.308 0.000
#> SRR650195 5 0.3747 0.1800 0.000 0.000 0.000 0.396 0.604 0.000
#> SRR650198 2 0.4418 0.7252 0.000 0.728 0.000 0.004 0.128 0.140
#> SRR650200 5 0.2871 0.7278 0.000 0.192 0.000 0.004 0.804 0.000
#> SRR650196 5 0.0622 0.7428 0.000 0.008 0.000 0.012 0.980 0.000
#> SRR650197 2 0.3339 0.7912 0.000 0.816 0.000 0.012 0.144 0.028
#> SRR650201 5 0.1900 0.7218 0.000 0.008 0.000 0.068 0.916 0.008
#> SRR650203 5 0.0790 0.7309 0.000 0.000 0.000 0.032 0.968 0.000
#> SRR650204 2 0.0363 0.8974 0.000 0.988 0.000 0.000 0.012 0.000
#> SRR650202 4 0.6123 0.0318 0.000 0.312 0.000 0.356 0.332 0.000
#> SRR650130 5 0.2520 0.7495 0.000 0.152 0.000 0.004 0.844 0.000
#> SRR650131 5 0.1176 0.7478 0.000 0.020 0.000 0.024 0.956 0.000
#> SRR650132 5 0.0777 0.7453 0.000 0.024 0.000 0.000 0.972 0.004
#> SRR650133 5 0.1674 0.7228 0.000 0.004 0.000 0.068 0.924 0.004
#> SRR650138 3 0.0000 0.9284 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650139 3 0.0000 0.9284 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650142 3 0.0146 0.9286 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650143 3 0.0363 0.9281 0.000 0.000 0.988 0.000 0.000 0.012
#> SRR650145 3 0.0000 0.9284 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650146 3 0.0000 0.9284 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR650148 3 0.2062 0.8486 0.000 0.000 0.900 0.008 0.088 0.004
#> SRR650149 3 0.4057 0.1799 0.000 0.000 0.556 0.008 0.436 0.000
#> SRR650151 3 0.4313 -0.0124 0.000 0.000 0.504 0.012 0.480 0.004
#> SRR650152 5 0.4076 0.4086 0.000 0.000 0.348 0.012 0.636 0.004
#> SRR650154 5 0.4105 0.4516 0.000 0.000 0.332 0.016 0.648 0.004
#> SRR650155 5 0.3144 0.6241 0.000 0.000 0.172 0.016 0.808 0.004
#> SRR650157 3 0.0260 0.9272 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR650158 3 0.0260 0.9272 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR650160 6 0.0146 1.0000 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR650161 6 0.0146 1.0000 0.000 0.000 0.000 0.000 0.004 0.996
#> SRR650163 3 0.0547 0.9261 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR650164 3 0.0547 0.9261 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR650169 3 0.0520 0.9280 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR650170 3 0.0622 0.9274 0.000 0.000 0.980 0.000 0.008 0.012
#> SRR650172 3 0.1007 0.9124 0.000 0.000 0.956 0.000 0.000 0.044
#> SRR650173 3 0.1075 0.9101 0.000 0.000 0.952 0.000 0.000 0.048
#> SRR650174 3 0.0767 0.9258 0.000 0.000 0.976 0.012 0.004 0.008
#> SRR650175 3 0.1546 0.9113 0.000 0.000 0.944 0.020 0.016 0.020
#> SRR650178 5 0.1843 0.7566 0.000 0.080 0.000 0.004 0.912 0.004
#> SRR650182 5 0.2871 0.7269 0.000 0.192 0.000 0.000 0.804 0.004
#> SRR650186 3 0.0146 0.9286 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR650187 3 0.0508 0.9279 0.000 0.000 0.984 0.000 0.004 0.012
#> SRR650189 3 0.0260 0.9272 0.000 0.000 0.992 0.008 0.000 0.000
#> SRR650190 3 0.0653 0.9261 0.000 0.000 0.980 0.012 0.004 0.004
#> SRR650193 2 0.0909 0.8966 0.000 0.968 0.000 0.020 0.012 0.000
#> SRR650194 2 0.0820 0.8968 0.000 0.972 0.000 0.016 0.012 0.000
#> SRR834560 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834561 4 0.3934 0.3191 0.376 0.000 0.008 0.616 0.000 0.000
#> SRR834562 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834563 4 0.2946 0.5881 0.176 0.000 0.012 0.812 0.000 0.000
#> SRR834564 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834565 1 0.2883 0.6864 0.788 0.000 0.000 0.212 0.000 0.000
#> SRR834566 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834567 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834568 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834569 1 0.3961 0.1161 0.556 0.000 0.004 0.440 0.000 0.000
#> SRR834570 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834571 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834572 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834573 4 0.2252 0.6429 0.072 0.000 0.016 0.900 0.012 0.000
#> SRR834574 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834575 4 0.3601 0.4524 0.312 0.000 0.004 0.684 0.000 0.000
#> SRR834576 1 0.0000 0.9312 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR834577 4 0.1787 0.6495 0.020 0.000 0.016 0.932 0.032 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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