Date: 2019-12-25 23:18:26 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 13957 rows and 88 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] 13957 88
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:hclust | 3 | 1.000 | 1.000 | 1.000 | ** | |
SD:skmeans | 6 | 1.000 | 0.989 | 0.988 | ** | 4,5 |
SD:mclust | 3 | 1.000 | 0.979 | 0.993 | ** | |
CV:hclust | 3 | 1.000 | 1.000 | 1.000 | ** | 2 |
MAD:pam | 4 | 1.000 | 0.978 | 0.990 | ** | 2,3 |
MAD:mclust | 3 | 1.000 | 0.995 | 0.998 | ** | |
ATC:hclust | 2 | 1.000 | 1.000 | 1.000 | ** | |
ATC:kmeans | 2 | 1.000 | 0.999 | 0.998 | ** | |
ATC:pam | 2 | 1.000 | 1.000 | 1.000 | ** | |
SD:NMF | 6 | 0.999 | 0.980 | 0.986 | ** | 2,3,4,5 |
ATC:skmeans | 4 | 0.973 | 0.928 | 0.973 | ** | 2 |
ATC:mclust | 4 | 0.959 | 0.948 | 0.977 | ** | |
CV:NMF | 6 | 0.956 | 0.973 | 0.978 | ** | 2,3,5 |
CV:pam | 6 | 0.954 | 0.853 | 0.913 | ** | 2,4 |
CV:mclust | 6 | 0.954 | 0.932 | 0.945 | ** | 2,3,4,5 |
MAD:skmeans | 6 | 0.951 | 0.913 | 0.908 | ** | 3,4 |
MAD:NMF | 6 | 0.946 | 0.939 | 0.954 | * | 3,4,5 |
CV:skmeans | 6 | 0.939 | 0.978 | 0.962 | * | 4,5 |
ATC:NMF | 6 | 0.934 | 0.934 | 0.930 | * | 2,4,5 |
MAD:hclust | 6 | 0.927 | 0.957 | 0.969 | * | |
SD:pam | 5 | 0.922 | 0.939 | 0.973 | * | 2,3 |
CV:kmeans | 2 | 0.912 | 0.967 | 0.957 | * | |
SD:kmeans | 5 | 0.618 | 0.865 | 0.830 | ||
MAD:kmeans | 2 | 0.556 | 0.895 | 0.899 |
**: 1-PAC > 0.95, *: 1-PAC > 0.9
Cumulative distribution function curves of consensus matrix for all methods.
collect_plots(res_list, fun = plot_ecdf)
Consensus heatmaps for all methods. (What is a consensus heatmap?)
collect_plots(res_list, k = 2, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = consensus_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = consensus_heatmap, mc.cores = 4)
Membership heatmaps for all methods. (What is a membership heatmap?)
collect_plots(res_list, k = 2, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 3, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 4, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 5, fun = membership_heatmap, mc.cores = 4)
collect_plots(res_list, k = 6, fun = membership_heatmap, mc.cores = 4)
Signature heatmaps for all methods. (What is a signature heatmap?)
Note in following heatmaps, rows are scaled.
collect_plots(res_list, k = 2, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 3, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 4, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 5, fun = get_signatures, mc.cores = 4)
collect_plots(res_list, k = 6, fun = get_signatures, mc.cores = 4)
The statistics used for measuring the stability of consensus partitioning. (How are they defined?)
get_stats(res_list, k = 2)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 2 1.000 1.000 1.000 0.3298 0.671 0.671
#> CV:NMF 2 1.000 0.994 0.997 0.3261 0.671 0.671
#> MAD:NMF 2 0.683 0.861 0.937 0.3931 0.645 0.645
#> ATC:NMF 2 1.000 0.965 0.986 0.3305 0.671 0.671
#> SD:skmeans 2 0.850 0.943 0.960 0.4909 0.511 0.511
#> CV:skmeans 2 0.812 0.972 0.982 0.3849 0.599 0.599
#> MAD:skmeans 2 0.849 0.953 0.977 0.5031 0.494 0.494
#> ATC:skmeans 2 1.000 0.967 0.987 0.3868 0.609 0.609
#> SD:mclust 2 0.500 0.883 0.921 0.3886 0.645 0.645
#> CV:mclust 2 1.000 0.985 0.985 0.4754 0.515 0.515
#> MAD:mclust 2 0.394 0.805 0.859 0.3866 0.515 0.515
#> ATC:mclust 2 0.807 0.927 0.963 0.3866 0.599 0.599
#> SD:kmeans 2 0.496 0.776 0.870 0.4154 0.520 0.520
#> CV:kmeans 2 0.912 0.967 0.957 0.3055 0.699 0.699
#> MAD:kmeans 2 0.556 0.895 0.899 0.4510 0.494 0.494
#> ATC:kmeans 2 1.000 0.999 0.998 0.3018 0.699 0.699
#> SD:pam 2 1.000 0.998 0.999 0.3030 0.699 0.699
#> CV:pam 2 1.000 1.000 1.000 0.3016 0.699 0.699
#> MAD:pam 2 1.000 0.995 0.998 0.3047 0.699 0.699
#> ATC:pam 2 1.000 1.000 1.000 0.3016 0.699 0.699
#> SD:hclust 2 1.000 0.980 0.988 0.0638 0.955 0.955
#> CV:hclust 2 1.000 1.000 1.000 0.3016 0.699 0.699
#> MAD:hclust 2 0.578 0.868 0.925 0.2924 0.685 0.685
#> ATC:hclust 2 1.000 1.000 1.000 0.3016 0.699 0.699
get_stats(res_list, k = 3)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 3 1.000 0.995 0.998 0.787 0.739 0.611
#> CV:NMF 3 1.000 0.971 0.990 0.760 0.729 0.604
#> MAD:NMF 3 1.000 0.988 0.996 0.495 0.746 0.612
#> ATC:NMF 3 0.784 0.923 0.937 0.826 0.704 0.565
#> SD:skmeans 3 0.864 0.806 0.923 0.233 0.880 0.770
#> CV:skmeans 3 0.674 0.828 0.820 0.575 0.777 0.627
#> MAD:skmeans 3 0.923 0.948 0.970 0.257 0.857 0.715
#> ATC:skmeans 3 0.710 0.924 0.919 0.544 0.772 0.625
#> SD:mclust 3 1.000 0.979 0.993 0.448 0.689 0.553
#> CV:mclust 3 0.911 0.940 0.959 0.228 0.921 0.846
#> MAD:mclust 3 1.000 0.995 0.998 0.463 0.921 0.846
#> ATC:mclust 3 0.599 0.836 0.880 0.544 0.748 0.596
#> SD:kmeans 3 0.297 0.592 0.665 0.390 0.791 0.625
#> CV:kmeans 3 0.512 0.752 0.767 0.745 0.728 0.611
#> MAD:kmeans 3 0.585 0.800 0.812 0.344 0.846 0.703
#> ATC:kmeans 3 0.608 0.881 0.904 0.923 0.688 0.553
#> SD:pam 3 1.000 0.993 0.997 0.871 0.737 0.624
#> CV:pam 3 0.694 0.772 0.906 1.043 0.671 0.529
#> MAD:pam 3 1.000 0.999 1.000 0.853 0.737 0.624
#> ATC:pam 3 0.567 0.776 0.885 1.001 0.720 0.600
#> SD:hclust 3 1.000 1.000 1.000 4.300 0.707 0.694
#> CV:hclust 3 1.000 1.000 1.000 0.900 0.728 0.611
#> MAD:hclust 3 0.674 0.854 0.904 0.792 0.770 0.664
#> ATC:hclust 3 0.684 0.956 0.893 0.719 0.693 0.561
get_stats(res_list, k = 4)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 4 1.000 0.965 0.983 0.2702 0.839 0.607
#> CV:NMF 4 0.766 0.701 0.815 0.2453 0.826 0.592
#> MAD:NMF 4 0.925 0.889 0.952 0.2640 0.850 0.633
#> ATC:NMF 4 0.971 0.962 0.976 0.2168 0.833 0.593
#> SD:skmeans 4 0.960 0.958 0.979 0.2337 0.815 0.564
#> CV:skmeans 4 1.000 0.999 0.999 0.2150 0.838 0.596
#> MAD:skmeans 4 0.945 0.893 0.955 0.1780 0.817 0.543
#> ATC:skmeans 4 0.973 0.928 0.973 0.1628 0.908 0.764
#> SD:mclust 4 0.854 0.913 0.935 0.2694 0.828 0.605
#> CV:mclust 4 1.000 0.994 0.997 0.2628 0.828 0.605
#> MAD:mclust 4 0.796 0.762 0.897 0.2441 0.851 0.658
#> ATC:mclust 4 0.959 0.948 0.977 0.2262 0.829 0.589
#> SD:kmeans 4 0.519 0.765 0.798 0.1667 0.853 0.637
#> CV:kmeans 4 0.529 0.856 0.727 0.2528 0.836 0.617
#> MAD:kmeans 4 0.531 0.801 0.809 0.1590 0.783 0.507
#> ATC:kmeans 4 0.702 0.854 0.861 0.1846 0.862 0.660
#> SD:pam 4 0.858 0.872 0.932 0.1331 0.973 0.939
#> CV:pam 4 0.972 0.931 0.974 0.2003 0.766 0.459
#> MAD:pam 4 1.000 0.978 0.990 0.0924 0.937 0.856
#> ATC:pam 4 0.855 0.885 0.950 0.2210 0.821 0.580
#> SD:hclust 4 0.680 0.899 0.902 0.6776 0.784 0.675
#> CV:hclust 4 0.824 0.895 0.870 0.2284 0.836 0.617
#> MAD:hclust 4 0.681 0.809 0.828 0.2706 0.727 0.444
#> ATC:hclust 4 0.614 0.878 0.874 0.0382 0.993 0.981
get_stats(res_list, k = 5)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 5 0.982 0.943 0.974 0.0612 0.932 0.739
#> CV:NMF 5 0.949 0.920 0.937 0.0941 0.869 0.569
#> MAD:NMF 5 0.957 0.938 0.970 0.0580 0.908 0.676
#> ATC:NMF 5 0.951 0.955 0.970 0.0734 0.950 0.807
#> SD:skmeans 5 0.950 0.758 0.892 0.0723 0.893 0.614
#> CV:skmeans 5 0.948 0.925 0.959 0.0808 0.948 0.802
#> MAD:skmeans 5 0.853 0.862 0.884 0.0731 0.919 0.691
#> ATC:skmeans 5 0.832 0.875 0.925 0.1040 0.914 0.729
#> SD:mclust 5 0.755 0.762 0.856 0.0595 0.970 0.885
#> CV:mclust 5 0.946 0.944 0.966 0.0456 0.975 0.905
#> MAD:mclust 5 0.778 0.782 0.872 0.0819 0.850 0.542
#> ATC:mclust 5 0.840 0.880 0.890 0.0503 0.974 0.903
#> SD:kmeans 5 0.618 0.865 0.831 0.1025 0.941 0.788
#> CV:kmeans 5 0.673 0.878 0.828 0.1191 0.948 0.802
#> MAD:kmeans 5 0.756 0.871 0.856 0.0901 0.941 0.788
#> ATC:kmeans 5 0.740 0.817 0.833 0.0837 1.000 1.000
#> SD:pam 5 0.922 0.939 0.973 0.1494 0.859 0.655
#> CV:pam 5 0.884 0.786 0.898 0.0527 0.925 0.721
#> MAD:pam 5 0.860 0.933 0.957 0.1142 0.934 0.824
#> ATC:pam 5 0.894 0.899 0.949 0.0453 0.975 0.902
#> SD:hclust 5 0.754 0.811 0.893 0.2815 0.803 0.558
#> CV:hclust 5 0.860 0.989 0.933 0.0754 0.948 0.802
#> MAD:hclust 5 0.851 0.874 0.931 0.1365 0.898 0.673
#> ATC:hclust 5 0.503 0.825 0.811 0.0696 0.978 0.942
get_stats(res_list, k = 6)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> SD:NMF 6 0.999 0.980 0.986 0.0335 0.966 0.838
#> CV:NMF 6 0.956 0.973 0.978 0.0476 0.954 0.795
#> MAD:NMF 6 0.946 0.939 0.954 0.0440 0.955 0.795
#> ATC:NMF 6 0.934 0.934 0.930 0.0315 0.962 0.821
#> SD:skmeans 6 1.000 0.989 0.988 0.0342 0.955 0.781
#> CV:skmeans 6 0.939 0.978 0.962 0.0351 0.964 0.832
#> MAD:skmeans 6 0.951 0.913 0.908 0.0343 0.979 0.890
#> ATC:skmeans 6 0.871 0.855 0.873 0.0574 0.948 0.781
#> SD:mclust 6 0.829 0.760 0.865 0.0628 0.915 0.673
#> CV:mclust 6 0.954 0.932 0.945 0.0271 0.984 0.934
#> MAD:mclust 6 0.772 0.738 0.818 0.0318 0.963 0.844
#> ATC:mclust 6 0.846 0.771 0.873 0.0397 0.966 0.862
#> SD:kmeans 6 0.815 0.856 0.852 0.0520 0.992 0.964
#> CV:kmeans 6 0.762 0.810 0.793 0.0600 1.000 1.000
#> MAD:kmeans 6 0.826 0.838 0.854 0.0473 1.000 1.000
#> ATC:kmeans 6 0.787 0.466 0.767 0.0605 0.932 0.775
#> SD:pam 6 0.892 0.892 0.921 0.0624 0.941 0.782
#> CV:pam 6 0.954 0.853 0.913 0.0425 0.969 0.855
#> MAD:pam 6 0.805 0.813 0.875 0.0645 0.947 0.831
#> ATC:pam 6 0.882 0.896 0.938 0.0416 0.958 0.817
#> SD:hclust 6 0.827 0.741 0.855 0.0491 0.877 0.577
#> CV:hclust 6 0.844 0.957 0.936 0.0316 1.000 1.000
#> MAD:hclust 6 0.927 0.957 0.969 0.0449 0.941 0.782
#> ATC:hclust 6 0.460 0.738 0.786 0.0378 0.993 0.982
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 13957 rows and 88 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 0.980 0.988 0.0638 0.955 0.955
#> 3 3 1.000 1.000 1.000 4.2996 0.707 0.694
#> 4 4 0.680 0.899 0.902 0.6776 0.784 0.675
#> 5 5 0.754 0.811 0.893 0.2815 0.803 0.558
#> 6 6 0.827 0.741 0.855 0.0491 0.877 0.577
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
#> SRR522063 2 0.343 0.944 0.064 0.936
#> SRR522064 2 0.343 0.944 0.064 0.936
#> SRR522065 2 0.343 0.944 0.064 0.936
#> SRR522066 2 0.343 0.944 0.064 0.936
#> SRR522067 2 0.343 0.944 0.064 0.936
#> SRR522068 2 0.343 0.944 0.064 0.936
#> SRR522069 2 0.343 0.944 0.064 0.936
#> SRR522070 2 0.343 0.944 0.064 0.936
#> SRR522071 2 0.343 0.944 0.064 0.936
#> SRR522072 2 0.343 0.944 0.064 0.936
#> SRR522073 2 0.343 0.944 0.064 0.936
#> SRR522074 2 0.343 0.944 0.064 0.936
#> SRR522075 2 0.343 0.944 0.064 0.936
#> SRR522076 2 0.343 0.944 0.064 0.936
#> SRR522077 2 0.343 0.944 0.064 0.936
#> SRR522078 2 0.343 0.944 0.064 0.936
#> SRR522079 1 0.000 1.000 1.000 0.000
#> SRR522080 1 0.000 1.000 1.000 0.000
#> SRR522081 2 0.000 0.988 0.000 1.000
#> SRR522082 2 0.000 0.988 0.000 1.000
#> SRR522083 2 0.000 0.988 0.000 1.000
#> SRR522084 2 0.000 0.988 0.000 1.000
#> SRR522085 2 0.000 0.988 0.000 1.000
#> SRR522086 2 0.000 0.988 0.000 1.000
#> SRR522087 2 0.000 0.988 0.000 1.000
#> SRR522088 2 0.000 0.988 0.000 1.000
#> SRR522089 2 0.000 0.988 0.000 1.000
#> SRR522090 2 0.000 0.988 0.000 1.000
#> SRR522091 2 0.000 0.988 0.000 1.000
#> SRR522092 2 0.000 0.988 0.000 1.000
#> SRR522093 2 0.000 0.988 0.000 1.000
#> SRR522094 2 0.000 0.988 0.000 1.000
#> SRR522095 2 0.000 0.988 0.000 1.000
#> SRR522096 2 0.000 0.988 0.000 1.000
#> SRR522097 2 0.000 0.988 0.000 1.000
#> SRR522098 2 0.000 0.988 0.000 1.000
#> SRR522099 2 0.000 0.988 0.000 1.000
#> SRR522100 2 0.000 0.988 0.000 1.000
#> SRR522101 2 0.000 0.988 0.000 1.000
#> SRR522102 2 0.000 0.988 0.000 1.000
#> SRR522103 2 0.000 0.988 0.000 1.000
#> SRR522104 2 0.000 0.988 0.000 1.000
#> SRR522105 2 0.000 0.988 0.000 1.000
#> SRR522106 2 0.000 0.988 0.000 1.000
#> SRR522107 2 0.000 0.988 0.000 1.000
#> SRR522108 2 0.000 0.988 0.000 1.000
#> SRR522109 2 0.000 0.988 0.000 1.000
#> SRR522110 2 0.000 0.988 0.000 1.000
#> SRR522111 2 0.000 0.988 0.000 1.000
#> SRR522112 2 0.000 0.988 0.000 1.000
#> SRR522113 2 0.000 0.988 0.000 1.000
#> SRR522114 2 0.000 0.988 0.000 1.000
#> SRR522115 2 0.000 0.988 0.000 1.000
#> SRR522116 2 0.000 0.988 0.000 1.000
#> SRR522117 2 0.000 0.988 0.000 1.000
#> SRR522118 2 0.000 0.988 0.000 1.000
#> SRR522119 2 0.000 0.988 0.000 1.000
#> SRR522120 2 0.000 0.988 0.000 1.000
#> SRR522121 2 0.000 0.988 0.000 1.000
#> SRR522122 2 0.000 0.988 0.000 1.000
#> SRR522123 2 0.000 0.988 0.000 1.000
#> SRR522124 2 0.000 0.988 0.000 1.000
#> SRR522125 2 0.000 0.988 0.000 1.000
#> SRR522126 2 0.000 0.988 0.000 1.000
#> SRR522127 2 0.000 0.988 0.000 1.000
#> SRR522128 2 0.000 0.988 0.000 1.000
#> SRR522129 2 0.000 0.988 0.000 1.000
#> SRR522130 2 0.000 0.988 0.000 1.000
#> SRR522131 2 0.000 0.988 0.000 1.000
#> SRR522132 2 0.000 0.988 0.000 1.000
#> SRR522133 2 0.000 0.988 0.000 1.000
#> SRR522134 2 0.000 0.988 0.000 1.000
#> SRR522135 2 0.000 0.988 0.000 1.000
#> SRR522136 2 0.000 0.988 0.000 1.000
#> SRR522137 2 0.000 0.988 0.000 1.000
#> SRR522138 2 0.000 0.988 0.000 1.000
#> SRR522139 2 0.000 0.988 0.000 1.000
#> SRR522140 2 0.000 0.988 0.000 1.000
#> SRR522141 2 0.000 0.988 0.000 1.000
#> SRR522142 2 0.000 0.988 0.000 1.000
#> SRR522143 2 0.000 0.988 0.000 1.000
#> SRR522144 2 0.000 0.988 0.000 1.000
#> SRR522145 2 0.000 0.988 0.000 1.000
#> SRR522146 2 0.000 0.988 0.000 1.000
#> SRR522147 2 0.000 0.988 0.000 1.000
#> SRR522148 2 0.000 0.988 0.000 1.000
#> SRR522149 2 0.000 0.988 0.000 1.000
#> SRR522150 2 0.000 0.988 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0 1 1 0 0
#> SRR522064 1 0 1 1 0 0
#> SRR522065 1 0 1 1 0 0
#> SRR522066 1 0 1 1 0 0
#> SRR522067 1 0 1 1 0 0
#> SRR522068 1 0 1 1 0 0
#> SRR522069 1 0 1 1 0 0
#> SRR522070 1 0 1 1 0 0
#> SRR522071 1 0 1 1 0 0
#> SRR522072 1 0 1 1 0 0
#> SRR522073 1 0 1 1 0 0
#> SRR522074 1 0 1 1 0 0
#> SRR522075 1 0 1 1 0 0
#> SRR522076 1 0 1 1 0 0
#> SRR522077 1 0 1 1 0 0
#> SRR522078 1 0 1 1 0 0
#> SRR522079 3 0 1 0 0 1
#> SRR522080 3 0 1 0 0 1
#> SRR522081 2 0 1 0 1 0
#> SRR522082 2 0 1 0 1 0
#> SRR522083 2 0 1 0 1 0
#> SRR522084 2 0 1 0 1 0
#> SRR522085 2 0 1 0 1 0
#> SRR522086 2 0 1 0 1 0
#> SRR522087 2 0 1 0 1 0
#> SRR522088 2 0 1 0 1 0
#> SRR522089 2 0 1 0 1 0
#> SRR522090 2 0 1 0 1 0
#> SRR522091 2 0 1 0 1 0
#> SRR522092 2 0 1 0 1 0
#> SRR522093 2 0 1 0 1 0
#> SRR522094 2 0 1 0 1 0
#> SRR522095 2 0 1 0 1 0
#> SRR522096 2 0 1 0 1 0
#> SRR522097 2 0 1 0 1 0
#> SRR522098 2 0 1 0 1 0
#> SRR522099 2 0 1 0 1 0
#> SRR522100 2 0 1 0 1 0
#> SRR522101 2 0 1 0 1 0
#> SRR522102 2 0 1 0 1 0
#> SRR522103 2 0 1 0 1 0
#> SRR522104 2 0 1 0 1 0
#> SRR522105 2 0 1 0 1 0
#> SRR522106 2 0 1 0 1 0
#> SRR522107 2 0 1 0 1 0
#> SRR522108 2 0 1 0 1 0
#> SRR522109 2 0 1 0 1 0
#> SRR522110 2 0 1 0 1 0
#> SRR522111 2 0 1 0 1 0
#> SRR522112 2 0 1 0 1 0
#> SRR522113 2 0 1 0 1 0
#> SRR522114 2 0 1 0 1 0
#> SRR522115 2 0 1 0 1 0
#> SRR522116 2 0 1 0 1 0
#> SRR522117 2 0 1 0 1 0
#> SRR522118 2 0 1 0 1 0
#> SRR522119 2 0 1 0 1 0
#> SRR522120 2 0 1 0 1 0
#> SRR522121 2 0 1 0 1 0
#> SRR522122 2 0 1 0 1 0
#> SRR522123 2 0 1 0 1 0
#> SRR522124 2 0 1 0 1 0
#> SRR522125 2 0 1 0 1 0
#> SRR522126 2 0 1 0 1 0
#> SRR522127 2 0 1 0 1 0
#> SRR522128 2 0 1 0 1 0
#> SRR522129 2 0 1 0 1 0
#> SRR522130 2 0 1 0 1 0
#> SRR522131 2 0 1 0 1 0
#> SRR522132 2 0 1 0 1 0
#> SRR522133 2 0 1 0 1 0
#> SRR522134 2 0 1 0 1 0
#> SRR522135 2 0 1 0 1 0
#> SRR522136 2 0 1 0 1 0
#> SRR522137 2 0 1 0 1 0
#> SRR522138 2 0 1 0 1 0
#> SRR522139 2 0 1 0 1 0
#> SRR522140 2 0 1 0 1 0
#> SRR522141 2 0 1 0 1 0
#> SRR522142 2 0 1 0 1 0
#> SRR522143 2 0 1 0 1 0
#> SRR522144 2 0 1 0 1 0
#> SRR522145 2 0 1 0 1 0
#> SRR522146 2 0 1 0 1 0
#> SRR522147 2 0 1 0 1 0
#> SRR522148 2 0 1 0 1 0
#> SRR522149 2 0 1 0 1 0
#> SRR522150 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522079 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522080 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522081 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522082 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522083 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522084 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522085 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522086 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522087 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522088 4 0.4250 0.852 0 0.276 0 0.724
#> SRR522089 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522090 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522091 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522092 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522093 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522094 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522095 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522096 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522097 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522098 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522099 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522100 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522101 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522102 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522103 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522104 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522105 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522106 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522107 4 0.0000 0.797 0 0.000 0 1.000
#> SRR522108 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522109 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522110 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522111 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522112 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522113 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522114 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522115 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522116 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522117 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522118 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522119 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522120 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522121 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522122 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522123 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522124 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522125 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522126 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522127 4 0.3528 0.864 0 0.192 0 0.808
#> SRR522128 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522129 2 0.0000 0.997 0 1.000 0 0.000
#> SRR522130 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522131 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522132 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522133 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522134 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522135 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522136 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522137 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522138 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522139 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522140 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522141 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522142 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522143 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522144 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522145 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522146 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522147 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522148 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522149 4 0.4103 0.866 0 0.256 0 0.744
#> SRR522150 4 0.4103 0.866 0 0.256 0 0.744
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0
#> SRR522079 5 0.0000 1.000 0 0.000 0.000 0.000 1
#> SRR522080 5 0.0000 1.000 0 0.000 0.000 0.000 1
#> SRR522081 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522082 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522083 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522084 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522085 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522086 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522087 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522088 4 0.3086 0.439 0 0.180 0.004 0.816 0
#> SRR522089 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522090 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522091 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522092 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522093 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522094 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522095 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522096 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522097 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522098 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522099 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522100 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522101 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522102 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522103 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522104 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522105 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522106 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522107 3 0.0000 0.918 0 0.000 1.000 0.000 0
#> SRR522108 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522109 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522110 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522111 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522112 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522113 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522114 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522115 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522116 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522117 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522118 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522119 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522120 2 0.0162 0.996 0 0.996 0.004 0.000 0
#> SRR522121 2 0.0162 0.996 0 0.996 0.004 0.000 0
#> SRR522122 2 0.0162 0.996 0 0.996 0.004 0.000 0
#> SRR522123 2 0.0162 0.996 0 0.996 0.004 0.000 0
#> SRR522124 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522125 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522126 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522127 3 0.3846 0.768 0 0.056 0.800 0.144 0
#> SRR522128 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522129 2 0.0000 0.998 0 1.000 0.000 0.000 0
#> SRR522130 2 0.0162 0.996 0 0.996 0.004 0.000 0
#> SRR522131 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522132 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522133 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522134 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522135 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522136 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522137 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522138 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522139 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522140 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522141 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522142 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522143 4 0.1792 0.597 0 0.000 0.084 0.916 0
#> SRR522144 4 0.1792 0.597 0 0.000 0.084 0.916 0
#> SRR522145 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522146 4 0.1792 0.597 0 0.000 0.084 0.916 0
#> SRR522147 4 0.1792 0.597 0 0.000 0.084 0.916 0
#> SRR522148 4 0.4219 0.553 0 0.000 0.416 0.584 0
#> SRR522149 4 0.1792 0.597 0 0.000 0.084 0.916 0
#> SRR522150 4 0.1792 0.597 0 0.000 0.084 0.916 0
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0
#> SRR522079 6 0.0000 1.000 0 0.000 0.000 0.000 0.000 1
#> SRR522080 6 0.0000 1.000 0 0.000 0.000 0.000 0.000 1
#> SRR522081 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522082 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522083 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522084 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522085 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522086 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522087 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522088 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0
#> SRR522089 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522090 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522091 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522092 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522093 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522094 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522095 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522096 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522097 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522098 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522099 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522100 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522101 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522102 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522103 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522104 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522105 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522106 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522107 3 0.3774 1.000 0 0.000 0.592 0.408 0.000 0
#> SRR522108 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522109 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522110 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522111 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522112 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522113 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522114 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522115 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522116 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522117 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522118 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522119 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522120 2 0.0146 0.995 0 0.996 0.004 0.000 0.000 0
#> SRR522121 2 0.0146 0.995 0 0.996 0.004 0.000 0.000 0
#> SRR522122 2 0.0146 0.995 0 0.996 0.004 0.000 0.000 0
#> SRR522123 2 0.0146 0.995 0 0.996 0.004 0.000 0.000 0
#> SRR522124 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522125 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522126 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522127 4 0.5016 -0.545 0 0.000 0.392 0.532 0.076 0
#> SRR522128 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522129 2 0.0000 0.998 0 1.000 0.000 0.000 0.000 0
#> SRR522130 2 0.0146 0.995 0 0.996 0.004 0.000 0.000 0
#> SRR522131 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522132 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522133 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522134 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522135 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522136 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522137 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522138 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522139 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522140 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522141 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522142 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522143 4 0.3774 0.205 0 0.000 0.408 0.592 0.000 0
#> SRR522144 4 0.3774 0.205 0 0.000 0.408 0.592 0.000 0
#> SRR522145 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522146 4 0.3774 0.205 0 0.000 0.408 0.592 0.000 0
#> SRR522147 4 0.3774 0.205 0 0.000 0.408 0.592 0.000 0
#> SRR522148 4 0.0000 0.598 0 0.000 0.000 1.000 0.000 0
#> SRR522149 4 0.3774 0.205 0 0.000 0.408 0.592 0.000 0
#> SRR522150 4 0.3774 0.205 0 0.000 0.408 0.592 0.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["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 13957 rows and 88 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 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.496 0.776 0.870 0.415 0.520 0.520
#> 3 3 0.297 0.592 0.665 0.390 0.791 0.625
#> 4 4 0.519 0.765 0.798 0.167 0.853 0.637
#> 5 5 0.618 0.865 0.831 0.102 0.941 0.788
#> 6 6 0.815 0.856 0.852 0.052 0.992 0.964
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.2778 0.743 0.952 0.048
#> SRR522064 1 0.2778 0.743 0.952 0.048
#> SRR522065 1 0.2778 0.743 0.952 0.048
#> SRR522066 1 0.2778 0.743 0.952 0.048
#> SRR522067 1 0.2778 0.743 0.952 0.048
#> SRR522068 1 0.2778 0.743 0.952 0.048
#> SRR522069 1 0.2778 0.743 0.952 0.048
#> SRR522070 1 0.2778 0.743 0.952 0.048
#> SRR522071 1 0.2778 0.743 0.952 0.048
#> SRR522072 1 0.2778 0.743 0.952 0.048
#> SRR522073 1 0.2778 0.743 0.952 0.048
#> SRR522074 1 0.2778 0.743 0.952 0.048
#> SRR522075 1 0.2778 0.743 0.952 0.048
#> SRR522076 1 0.2778 0.743 0.952 0.048
#> SRR522077 1 0.2778 0.743 0.952 0.048
#> SRR522078 1 0.2778 0.743 0.952 0.048
#> SRR522079 2 0.0938 0.896 0.012 0.988
#> SRR522080 2 0.0938 0.896 0.012 0.988
#> SRR522081 2 0.1184 0.895 0.016 0.984
#> SRR522082 2 0.1184 0.895 0.016 0.984
#> SRR522083 2 0.1184 0.895 0.016 0.984
#> SRR522084 2 0.1184 0.895 0.016 0.984
#> SRR522085 2 0.1184 0.895 0.016 0.984
#> SRR522086 2 0.1184 0.895 0.016 0.984
#> SRR522087 2 0.1184 0.895 0.016 0.984
#> SRR522088 2 0.1184 0.895 0.016 0.984
#> SRR522089 1 0.9393 0.677 0.644 0.356
#> SRR522090 2 0.9993 -0.245 0.484 0.516
#> SRR522091 1 0.9393 0.677 0.644 0.356
#> SRR522092 1 0.9393 0.677 0.644 0.356
#> SRR522093 1 0.9393 0.677 0.644 0.356
#> SRR522094 1 0.9393 0.677 0.644 0.356
#> SRR522095 1 0.9393 0.677 0.644 0.356
#> SRR522096 1 0.9393 0.677 0.644 0.356
#> SRR522097 1 0.9393 0.677 0.644 0.356
#> SRR522098 1 0.9393 0.677 0.644 0.356
#> SRR522099 1 0.9393 0.677 0.644 0.356
#> SRR522100 1 0.9393 0.677 0.644 0.356
#> SRR522101 1 0.9393 0.677 0.644 0.356
#> SRR522102 1 0.9393 0.677 0.644 0.356
#> SRR522103 1 0.9393 0.677 0.644 0.356
#> SRR522104 1 0.9393 0.677 0.644 0.356
#> SRR522105 1 0.9393 0.677 0.644 0.356
#> SRR522106 1 0.9393 0.677 0.644 0.356
#> SRR522107 1 0.9393 0.677 0.644 0.356
#> SRR522108 2 0.0672 0.895 0.008 0.992
#> SRR522109 2 0.0672 0.895 0.008 0.992
#> SRR522110 2 0.0672 0.895 0.008 0.992
#> SRR522111 2 0.0672 0.895 0.008 0.992
#> SRR522112 2 0.0672 0.895 0.008 0.992
#> SRR522113 2 0.0672 0.895 0.008 0.992
#> SRR522114 2 0.2778 0.894 0.048 0.952
#> SRR522115 2 0.4022 0.881 0.080 0.920
#> SRR522116 2 0.2778 0.894 0.048 0.952
#> SRR522117 2 0.2778 0.894 0.048 0.952
#> SRR522118 2 0.0672 0.895 0.008 0.992
#> SRR522119 2 0.0672 0.895 0.008 0.992
#> SRR522120 2 0.0672 0.895 0.008 0.992
#> SRR522121 2 0.0672 0.895 0.008 0.992
#> SRR522122 2 0.0672 0.895 0.008 0.992
#> SRR522123 2 0.0672 0.895 0.008 0.992
#> SRR522124 2 0.2778 0.894 0.048 0.952
#> SRR522125 2 0.2778 0.894 0.048 0.952
#> SRR522126 2 0.2778 0.894 0.048 0.952
#> SRR522127 2 0.2778 0.894 0.048 0.952
#> SRR522128 2 0.0672 0.895 0.008 0.992
#> SRR522129 2 0.0672 0.895 0.008 0.992
#> SRR522130 2 0.0672 0.895 0.008 0.992
#> SRR522131 2 0.4022 0.884 0.080 0.920
#> SRR522132 2 0.4022 0.884 0.080 0.920
#> SRR522133 2 0.4022 0.884 0.080 0.920
#> SRR522134 2 0.4022 0.884 0.080 0.920
#> SRR522135 2 0.4022 0.884 0.080 0.920
#> SRR522136 2 0.4022 0.884 0.080 0.920
#> SRR522137 2 0.5408 0.837 0.124 0.876
#> SRR522138 2 0.4022 0.884 0.080 0.920
#> SRR522139 2 0.9087 0.436 0.324 0.676
#> SRR522140 2 0.9087 0.436 0.324 0.676
#> SRR522141 2 0.9087 0.436 0.324 0.676
#> SRR522142 2 0.9087 0.436 0.324 0.676
#> SRR522143 2 0.4022 0.884 0.080 0.920
#> SRR522144 2 0.4022 0.884 0.080 0.920
#> SRR522145 2 0.9087 0.436 0.324 0.676
#> SRR522146 2 0.4022 0.884 0.080 0.920
#> SRR522147 2 0.4022 0.884 0.080 0.920
#> SRR522148 2 0.9087 0.436 0.324 0.676
#> SRR522149 2 0.4022 0.884 0.080 0.920
#> SRR522150 2 0.4022 0.884 0.080 0.920
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522064 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522065 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522066 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522067 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522068 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522069 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522070 1 0.2772 0.998 0.916 0.080 0.004
#> SRR522071 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522072 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522073 1 0.2772 0.998 0.916 0.080 0.004
#> SRR522074 1 0.2772 0.998 0.916 0.080 0.004
#> SRR522075 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522076 1 0.2772 0.998 0.916 0.080 0.004
#> SRR522077 1 0.2537 0.999 0.920 0.080 0.000
#> SRR522078 1 0.2772 0.998 0.916 0.080 0.004
#> SRR522079 3 0.7044 -0.287 0.032 0.348 0.620
#> SRR522080 3 0.7044 -0.287 0.032 0.348 0.620
#> SRR522081 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522082 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522083 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522084 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522085 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522086 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522087 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522088 2 0.7499 0.521 0.048 0.592 0.360
#> SRR522089 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522090 3 0.9837 0.643 0.248 0.360 0.392
#> SRR522091 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522092 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522093 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522094 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522095 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522096 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522097 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522098 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522099 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522100 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522101 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522102 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522103 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522104 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522105 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522106 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522107 3 0.9883 0.658 0.260 0.360 0.380
#> SRR522108 3 0.6510 -0.303 0.012 0.364 0.624
#> SRR522109 2 0.6819 0.452 0.012 0.512 0.476
#> SRR522110 2 0.6819 0.452 0.012 0.512 0.476
#> SRR522111 2 0.6819 0.452 0.012 0.512 0.476
#> SRR522112 2 0.6819 0.452 0.012 0.512 0.476
#> SRR522113 3 0.6745 -0.375 0.012 0.428 0.560
#> SRR522114 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522115 2 0.4413 0.577 0.008 0.832 0.160
#> SRR522116 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522117 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522118 2 0.6819 0.452 0.012 0.512 0.476
#> SRR522119 3 0.6745 -0.375 0.012 0.428 0.560
#> SRR522120 2 0.6675 0.500 0.012 0.584 0.404
#> SRR522121 2 0.6675 0.500 0.012 0.584 0.404
#> SRR522122 2 0.6675 0.500 0.012 0.584 0.404
#> SRR522123 2 0.6675 0.500 0.012 0.584 0.404
#> SRR522124 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522125 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522126 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522127 2 0.4110 0.592 0.004 0.844 0.152
#> SRR522128 3 0.6510 -0.303 0.012 0.364 0.624
#> SRR522129 3 0.6510 -0.303 0.012 0.364 0.624
#> SRR522130 2 0.6819 0.452 0.012 0.512 0.476
#> SRR522131 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522132 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522133 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522134 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522135 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522136 2 0.3587 0.581 0.020 0.892 0.088
#> SRR522137 2 0.3722 0.578 0.024 0.888 0.088
#> SRR522138 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522139 2 0.4094 0.561 0.028 0.872 0.100
#> SRR522140 2 0.4094 0.561 0.028 0.872 0.100
#> SRR522141 2 0.4094 0.561 0.028 0.872 0.100
#> SRR522142 2 0.4094 0.561 0.028 0.872 0.100
#> SRR522143 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522144 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522145 2 0.4094 0.561 0.028 0.872 0.100
#> SRR522146 2 0.0892 0.645 0.020 0.980 0.000
#> SRR522147 2 0.2050 0.639 0.020 0.952 0.028
#> SRR522148 2 0.4094 0.561 0.028 0.872 0.100
#> SRR522149 2 0.1129 0.644 0.020 0.976 0.004
#> SRR522150 2 0.0892 0.645 0.020 0.980 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522064 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522065 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522066 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522067 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522068 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522069 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522070 1 0.5120 0.9627 0.776 0.028 0.160 0.036
#> SRR522071 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522072 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522073 1 0.5120 0.9627 0.776 0.028 0.160 0.036
#> SRR522074 1 0.5120 0.9627 0.776 0.028 0.160 0.036
#> SRR522075 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522076 1 0.5120 0.9627 0.776 0.028 0.160 0.036
#> SRR522077 1 0.3787 0.9832 0.840 0.000 0.124 0.036
#> SRR522078 1 0.5120 0.9627 0.776 0.028 0.160 0.036
#> SRR522079 2 0.4864 0.5864 0.044 0.812 0.100 0.044
#> SRR522080 2 0.4864 0.5864 0.044 0.812 0.100 0.044
#> SRR522081 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522082 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522083 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522084 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522085 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522086 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522087 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522088 4 0.8402 -0.0203 0.088 0.360 0.096 0.456
#> SRR522089 3 0.3721 0.9936 0.004 0.004 0.816 0.176
#> SRR522090 3 0.4217 0.9788 0.004 0.020 0.800 0.176
#> SRR522091 3 0.3863 0.9921 0.004 0.008 0.812 0.176
#> SRR522092 3 0.3863 0.9921 0.004 0.008 0.812 0.176
#> SRR522093 3 0.3863 0.9921 0.004 0.008 0.812 0.176
#> SRR522094 3 0.3863 0.9921 0.004 0.008 0.812 0.176
#> SRR522095 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522096 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522097 3 0.3721 0.9936 0.004 0.004 0.816 0.176
#> SRR522098 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522099 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522100 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522101 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522102 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522103 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522104 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522105 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522106 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522107 3 0.3356 0.9958 0.000 0.000 0.824 0.176
#> SRR522108 2 0.3587 0.6898 0.032 0.860 0.004 0.104
#> SRR522109 2 0.5330 0.7901 0.012 0.648 0.008 0.332
#> SRR522110 2 0.5330 0.7901 0.012 0.648 0.008 0.332
#> SRR522111 2 0.5330 0.7901 0.012 0.648 0.008 0.332
#> SRR522112 2 0.5330 0.7901 0.012 0.648 0.008 0.332
#> SRR522113 2 0.4948 0.7843 0.012 0.696 0.004 0.288
#> SRR522114 4 0.4562 0.6764 0.028 0.116 0.036 0.820
#> SRR522115 4 0.4535 0.6868 0.028 0.108 0.040 0.824
#> SRR522116 4 0.4562 0.6764 0.028 0.116 0.036 0.820
#> SRR522117 4 0.4562 0.6764 0.028 0.116 0.036 0.820
#> SRR522118 2 0.4897 0.7891 0.000 0.660 0.008 0.332
#> SRR522119 2 0.4456 0.7820 0.000 0.716 0.004 0.280
#> SRR522120 2 0.5323 0.7132 0.004 0.592 0.008 0.396
#> SRR522121 2 0.5323 0.7132 0.004 0.592 0.008 0.396
#> SRR522122 2 0.5323 0.7132 0.004 0.592 0.008 0.396
#> SRR522123 2 0.5323 0.7132 0.004 0.592 0.008 0.396
#> SRR522124 4 0.4562 0.6764 0.028 0.116 0.036 0.820
#> SRR522125 4 0.4470 0.6782 0.028 0.116 0.032 0.824
#> SRR522126 4 0.4562 0.6764 0.028 0.116 0.036 0.820
#> SRR522127 4 0.4562 0.6764 0.028 0.116 0.036 0.820
#> SRR522128 2 0.3283 0.6910 0.020 0.872 0.004 0.104
#> SRR522129 2 0.3283 0.6910 0.020 0.872 0.004 0.104
#> SRR522130 2 0.4897 0.7891 0.000 0.660 0.008 0.332
#> SRR522131 4 0.0524 0.7618 0.004 0.000 0.008 0.988
#> SRR522132 4 0.0524 0.7618 0.004 0.000 0.008 0.988
#> SRR522133 4 0.0524 0.7618 0.004 0.000 0.008 0.988
#> SRR522134 4 0.0524 0.7618 0.004 0.000 0.008 0.988
#> SRR522135 4 0.0524 0.7618 0.004 0.000 0.008 0.988
#> SRR522136 4 0.1004 0.7593 0.004 0.000 0.024 0.972
#> SRR522137 4 0.1004 0.7593 0.004 0.000 0.024 0.972
#> SRR522138 4 0.0524 0.7618 0.004 0.000 0.008 0.988
#> SRR522139 4 0.1398 0.7524 0.004 0.000 0.040 0.956
#> SRR522140 4 0.1398 0.7524 0.004 0.000 0.040 0.956
#> SRR522141 4 0.1398 0.7524 0.004 0.000 0.040 0.956
#> SRR522142 4 0.1398 0.7524 0.004 0.000 0.040 0.956
#> SRR522143 4 0.0804 0.7616 0.012 0.000 0.008 0.980
#> SRR522144 4 0.0804 0.7616 0.012 0.000 0.008 0.980
#> SRR522145 4 0.1398 0.7524 0.004 0.000 0.040 0.956
#> SRR522146 4 0.0804 0.7616 0.012 0.000 0.008 0.980
#> SRR522147 4 0.0992 0.7594 0.012 0.004 0.008 0.976
#> SRR522148 4 0.1398 0.7524 0.004 0.000 0.040 0.956
#> SRR522149 4 0.0804 0.7616 0.012 0.000 0.008 0.980
#> SRR522150 4 0.0804 0.7616 0.012 0.000 0.008 0.980
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522064 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522065 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522066 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522067 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522068 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522069 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522070 1 0.5651 0.8672 0.692 0.004 0.140 0.020 0.144
#> SRR522071 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522072 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522073 1 0.5651 0.8672 0.692 0.004 0.140 0.020 0.144
#> SRR522074 1 0.5651 0.8672 0.692 0.004 0.140 0.020 0.144
#> SRR522075 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522076 1 0.5651 0.8672 0.692 0.004 0.140 0.020 0.144
#> SRR522077 1 0.2233 0.9425 0.904 0.000 0.080 0.016 0.000
#> SRR522078 1 0.5651 0.8672 0.692 0.004 0.140 0.020 0.144
#> SRR522079 2 0.6489 0.0992 0.060 0.500 0.056 0.000 0.384
#> SRR522080 2 0.6489 0.0992 0.060 0.500 0.056 0.000 0.384
#> SRR522081 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522082 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522083 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522084 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522085 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522086 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522087 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522088 5 0.6026 1.0000 0.000 0.200 0.004 0.196 0.600
#> SRR522089 3 0.2957 0.9865 0.008 0.000 0.860 0.120 0.012
#> SRR522090 3 0.3349 0.9765 0.012 0.008 0.848 0.120 0.012
#> SRR522091 3 0.2846 0.9872 0.008 0.000 0.864 0.120 0.008
#> SRR522092 3 0.2846 0.9872 0.008 0.000 0.864 0.120 0.008
#> SRR522093 3 0.2846 0.9872 0.008 0.000 0.864 0.120 0.008
#> SRR522094 3 0.2846 0.9872 0.008 0.000 0.864 0.120 0.008
#> SRR522095 3 0.2563 0.9889 0.000 0.000 0.872 0.120 0.008
#> SRR522096 3 0.2674 0.9881 0.000 0.000 0.868 0.120 0.012
#> SRR522097 3 0.2957 0.9865 0.008 0.000 0.860 0.120 0.012
#> SRR522098 3 0.2674 0.9881 0.000 0.000 0.868 0.120 0.012
#> SRR522099 3 0.2439 0.9897 0.000 0.000 0.876 0.120 0.004
#> SRR522100 3 0.2674 0.9881 0.000 0.000 0.868 0.120 0.012
#> SRR522101 3 0.2439 0.9897 0.000 0.000 0.876 0.120 0.004
#> SRR522102 3 0.2674 0.9881 0.000 0.000 0.868 0.120 0.012
#> SRR522103 3 0.2439 0.9897 0.000 0.000 0.876 0.120 0.004
#> SRR522104 3 0.2674 0.9881 0.000 0.000 0.868 0.120 0.012
#> SRR522105 3 0.2439 0.9897 0.000 0.000 0.876 0.120 0.004
#> SRR522106 3 0.2674 0.9881 0.000 0.000 0.868 0.120 0.012
#> SRR522107 3 0.2439 0.9897 0.000 0.000 0.876 0.120 0.004
#> SRR522108 2 0.2078 0.7665 0.004 0.924 0.000 0.036 0.036
#> SRR522109 2 0.2660 0.8563 0.000 0.864 0.000 0.128 0.008
#> SRR522110 2 0.2660 0.8563 0.000 0.864 0.000 0.128 0.008
#> SRR522111 2 0.2660 0.8563 0.000 0.864 0.000 0.128 0.008
#> SRR522112 2 0.2660 0.8563 0.000 0.864 0.000 0.128 0.008
#> SRR522113 2 0.2411 0.8493 0.000 0.884 0.000 0.108 0.008
#> SRR522114 4 0.6189 0.6061 0.024 0.208 0.024 0.656 0.088
#> SRR522115 4 0.6049 0.6220 0.024 0.196 0.024 0.672 0.084
#> SRR522116 4 0.6189 0.6061 0.024 0.208 0.024 0.656 0.088
#> SRR522117 4 0.6189 0.6061 0.024 0.208 0.024 0.656 0.088
#> SRR522118 2 0.2536 0.8557 0.000 0.868 0.004 0.128 0.000
#> SRR522119 2 0.2286 0.8492 0.000 0.888 0.004 0.108 0.000
#> SRR522120 2 0.2719 0.8457 0.004 0.852 0.000 0.144 0.000
#> SRR522121 2 0.2719 0.8457 0.004 0.852 0.000 0.144 0.000
#> SRR522122 2 0.2719 0.8457 0.004 0.852 0.000 0.144 0.000
#> SRR522123 2 0.2719 0.8457 0.004 0.852 0.000 0.144 0.000
#> SRR522124 4 0.6138 0.6111 0.024 0.208 0.024 0.660 0.084
#> SRR522125 4 0.6138 0.6111 0.024 0.208 0.024 0.660 0.084
#> SRR522126 4 0.6138 0.6111 0.024 0.208 0.024 0.660 0.084
#> SRR522127 4 0.6138 0.6111 0.024 0.208 0.024 0.660 0.084
#> SRR522128 2 0.2364 0.7584 0.004 0.916 0.008 0.036 0.036
#> SRR522129 2 0.2364 0.7584 0.004 0.916 0.008 0.036 0.036
#> SRR522130 2 0.2536 0.8557 0.000 0.868 0.004 0.128 0.000
#> SRR522131 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522132 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522133 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522134 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522135 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522136 4 0.0609 0.8525 0.000 0.000 0.020 0.980 0.000
#> SRR522137 4 0.0609 0.8525 0.000 0.000 0.020 0.980 0.000
#> SRR522138 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522139 4 0.0794 0.8510 0.000 0.000 0.028 0.972 0.000
#> SRR522140 4 0.0794 0.8510 0.000 0.000 0.028 0.972 0.000
#> SRR522141 4 0.0794 0.8510 0.000 0.000 0.028 0.972 0.000
#> SRR522142 4 0.0794 0.8510 0.000 0.000 0.028 0.972 0.000
#> SRR522143 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522144 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522145 4 0.0794 0.8510 0.000 0.000 0.028 0.972 0.000
#> SRR522146 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522147 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522148 4 0.0794 0.8510 0.000 0.000 0.028 0.972 0.000
#> SRR522149 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
#> SRR522150 4 0.0902 0.8555 0.004 0.008 0.004 0.976 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522064 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522065 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522066 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522067 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522068 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522069 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522070 1 0.4928 0.794 0.712 0.000 0.064 0.004 0.044 0.176
#> SRR522071 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522072 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522073 1 0.4831 0.793 0.712 0.000 0.056 0.000 0.052 0.180
#> SRR522074 1 0.4856 0.793 0.712 0.000 0.060 0.000 0.052 0.176
#> SRR522075 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522076 1 0.5073 0.794 0.712 0.008 0.072 0.000 0.048 0.160
#> SRR522077 1 0.0632 0.916 0.976 0.000 0.024 0.000 0.000 0.000
#> SRR522078 1 0.5110 0.794 0.712 0.008 0.064 0.004 0.044 0.168
#> SRR522079 6 0.5296 1.000 0.000 0.260 0.000 0.000 0.152 0.588
#> SRR522080 6 0.5296 1.000 0.000 0.260 0.000 0.000 0.152 0.588
#> SRR522081 5 0.3912 0.998 0.000 0.076 0.000 0.164 0.760 0.000
#> SRR522082 5 0.4051 0.997 0.000 0.076 0.000 0.164 0.756 0.004
#> SRR522083 5 0.3912 0.998 0.000 0.076 0.000 0.164 0.760 0.000
#> SRR522084 5 0.3912 0.998 0.000 0.076 0.000 0.164 0.760 0.000
#> SRR522085 5 0.3912 0.998 0.000 0.076 0.000 0.164 0.760 0.000
#> SRR522086 5 0.4051 0.997 0.000 0.076 0.000 0.164 0.756 0.004
#> SRR522087 5 0.3912 0.998 0.000 0.076 0.000 0.164 0.760 0.000
#> SRR522088 5 0.4051 0.997 0.000 0.076 0.000 0.164 0.756 0.004
#> SRR522089 3 0.2841 0.941 0.000 0.000 0.876 0.052 0.036 0.036
#> SRR522090 3 0.2841 0.941 0.000 0.000 0.876 0.052 0.036 0.036
#> SRR522091 3 0.3181 0.933 0.000 0.000 0.856 0.052 0.048 0.044
#> SRR522092 3 0.3181 0.933 0.000 0.000 0.856 0.052 0.048 0.044
#> SRR522093 3 0.3181 0.933 0.000 0.000 0.856 0.052 0.048 0.044
#> SRR522094 3 0.3181 0.933 0.000 0.000 0.856 0.052 0.048 0.044
#> SRR522095 3 0.2138 0.951 0.000 0.000 0.908 0.052 0.004 0.036
#> SRR522096 3 0.2209 0.950 0.000 0.000 0.904 0.052 0.004 0.040
#> SRR522097 3 0.2841 0.941 0.000 0.000 0.876 0.052 0.036 0.036
#> SRR522098 3 0.2209 0.950 0.000 0.000 0.904 0.052 0.004 0.040
#> SRR522099 3 0.1429 0.954 0.000 0.000 0.940 0.052 0.004 0.004
#> SRR522100 3 0.2209 0.950 0.000 0.000 0.904 0.052 0.004 0.040
#> SRR522101 3 0.1429 0.954 0.000 0.000 0.940 0.052 0.004 0.004
#> SRR522102 3 0.2209 0.950 0.000 0.000 0.904 0.052 0.004 0.040
#> SRR522103 3 0.1429 0.954 0.000 0.000 0.940 0.052 0.004 0.004
#> SRR522104 3 0.2209 0.950 0.000 0.000 0.904 0.052 0.004 0.040
#> SRR522105 3 0.1644 0.954 0.000 0.000 0.932 0.052 0.004 0.012
#> SRR522106 3 0.2209 0.950 0.000 0.000 0.904 0.052 0.004 0.040
#> SRR522107 3 0.1429 0.954 0.000 0.000 0.940 0.052 0.004 0.004
#> SRR522108 2 0.2774 0.808 0.008 0.880 0.000 0.020 0.020 0.072
#> SRR522109 2 0.2903 0.921 0.008 0.872 0.000 0.076 0.016 0.028
#> SRR522110 2 0.2903 0.921 0.008 0.872 0.000 0.076 0.016 0.028
#> SRR522111 2 0.2903 0.921 0.008 0.872 0.000 0.076 0.016 0.028
#> SRR522112 2 0.2903 0.921 0.008 0.872 0.000 0.076 0.016 0.028
#> SRR522113 2 0.2734 0.915 0.008 0.884 0.000 0.064 0.016 0.028
#> SRR522114 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522115 4 0.6748 0.486 0.008 0.168 0.004 0.556 0.172 0.092
#> SRR522116 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522117 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522118 2 0.1588 0.926 0.004 0.924 0.000 0.072 0.000 0.000
#> SRR522119 2 0.1493 0.919 0.004 0.936 0.000 0.056 0.004 0.000
#> SRR522120 2 0.1610 0.921 0.000 0.916 0.000 0.084 0.000 0.000
#> SRR522121 2 0.1610 0.921 0.000 0.916 0.000 0.084 0.000 0.000
#> SRR522122 2 0.1610 0.921 0.000 0.916 0.000 0.084 0.000 0.000
#> SRR522123 2 0.1610 0.921 0.000 0.916 0.000 0.084 0.000 0.000
#> SRR522124 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522125 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522126 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522127 4 0.6774 0.483 0.008 0.172 0.004 0.552 0.172 0.092
#> SRR522128 2 0.1850 0.811 0.000 0.924 0.000 0.016 0.008 0.052
#> SRR522129 2 0.1785 0.817 0.000 0.928 0.000 0.016 0.008 0.048
#> SRR522130 2 0.1444 0.925 0.000 0.928 0.000 0.072 0.000 0.000
#> SRR522131 4 0.2213 0.797 0.008 0.008 0.032 0.920 0.016 0.016
#> SRR522132 4 0.2213 0.797 0.008 0.008 0.032 0.920 0.016 0.016
#> SRR522133 4 0.2213 0.797 0.008 0.008 0.032 0.920 0.016 0.016
#> SRR522134 4 0.2213 0.797 0.008 0.008 0.032 0.920 0.016 0.016
#> SRR522135 4 0.2213 0.797 0.008 0.008 0.032 0.920 0.016 0.016
#> SRR522136 4 0.2099 0.798 0.008 0.008 0.036 0.924 0.012 0.012
#> SRR522137 4 0.2099 0.798 0.008 0.008 0.036 0.924 0.012 0.012
#> SRR522138 4 0.2012 0.798 0.008 0.008 0.032 0.924 0.000 0.028
#> SRR522139 4 0.2057 0.797 0.008 0.004 0.040 0.924 0.012 0.012
#> SRR522140 4 0.2057 0.797 0.008 0.004 0.040 0.924 0.012 0.012
#> SRR522141 4 0.2057 0.797 0.008 0.004 0.040 0.924 0.012 0.012
#> SRR522142 4 0.2057 0.797 0.008 0.004 0.040 0.924 0.012 0.012
#> SRR522143 4 0.2401 0.796 0.012 0.008 0.032 0.912 0.016 0.020
#> SRR522144 4 0.2308 0.796 0.012 0.008 0.032 0.916 0.012 0.020
#> SRR522145 4 0.2057 0.797 0.008 0.004 0.040 0.924 0.012 0.012
#> SRR522146 4 0.2401 0.796 0.012 0.008 0.032 0.912 0.016 0.020
#> SRR522147 4 0.2401 0.796 0.012 0.008 0.032 0.912 0.016 0.020
#> SRR522148 4 0.2057 0.797 0.008 0.004 0.040 0.924 0.012 0.012
#> SRR522149 4 0.2401 0.796 0.012 0.008 0.032 0.912 0.016 0.020
#> SRR522150 4 0.2401 0.796 0.012 0.008 0.032 0.912 0.016 0.020
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["SD", "skmeans"]
# you can also extract it by
# res = res_list["SD:skmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 13957 rows and 88 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 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.850 0.943 0.960 0.4909 0.511 0.511
#> 3 3 0.864 0.806 0.923 0.2328 0.880 0.770
#> 4 4 0.960 0.958 0.979 0.2337 0.815 0.564
#> 5 5 0.950 0.758 0.892 0.0723 0.893 0.614
#> 6 6 1.000 0.989 0.988 0.0342 0.955 0.781
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] 4 5
There is also optional best \(k\) = 4 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.0376 0.965 0.996 0.004
#> SRR522064 1 0.0376 0.965 0.996 0.004
#> SRR522065 1 0.0376 0.965 0.996 0.004
#> SRR522066 1 0.0376 0.965 0.996 0.004
#> SRR522067 1 0.0376 0.965 0.996 0.004
#> SRR522068 1 0.0376 0.965 0.996 0.004
#> SRR522069 1 0.0376 0.965 0.996 0.004
#> SRR522070 1 0.0376 0.965 0.996 0.004
#> SRR522071 1 0.0376 0.965 0.996 0.004
#> SRR522072 1 0.0376 0.965 0.996 0.004
#> SRR522073 1 0.0376 0.965 0.996 0.004
#> SRR522074 1 0.0376 0.965 0.996 0.004
#> SRR522075 1 0.0376 0.965 0.996 0.004
#> SRR522076 1 0.0376 0.965 0.996 0.004
#> SRR522077 1 0.0376 0.965 0.996 0.004
#> SRR522078 1 0.0376 0.965 0.996 0.004
#> SRR522079 2 0.0938 0.960 0.012 0.988
#> SRR522080 2 0.0938 0.960 0.012 0.988
#> SRR522081 2 0.0938 0.960 0.012 0.988
#> SRR522082 2 0.0938 0.960 0.012 0.988
#> SRR522083 2 0.0938 0.960 0.012 0.988
#> SRR522084 2 0.0938 0.960 0.012 0.988
#> SRR522085 2 0.0938 0.960 0.012 0.988
#> SRR522086 2 0.0938 0.960 0.012 0.988
#> SRR522087 2 0.0938 0.960 0.012 0.988
#> SRR522088 2 0.0938 0.960 0.012 0.988
#> SRR522089 1 0.2778 0.969 0.952 0.048
#> SRR522090 1 0.3431 0.956 0.936 0.064
#> SRR522091 1 0.2778 0.969 0.952 0.048
#> SRR522092 1 0.2778 0.969 0.952 0.048
#> SRR522093 1 0.2778 0.969 0.952 0.048
#> SRR522094 1 0.2778 0.969 0.952 0.048
#> SRR522095 1 0.2778 0.969 0.952 0.048
#> SRR522096 1 0.2778 0.969 0.952 0.048
#> SRR522097 1 0.2778 0.969 0.952 0.048
#> SRR522098 1 0.2778 0.969 0.952 0.048
#> SRR522099 1 0.2778 0.969 0.952 0.048
#> SRR522100 1 0.2778 0.969 0.952 0.048
#> SRR522101 1 0.2778 0.969 0.952 0.048
#> SRR522102 1 0.2778 0.969 0.952 0.048
#> SRR522103 1 0.2778 0.969 0.952 0.048
#> SRR522104 1 0.2778 0.969 0.952 0.048
#> SRR522105 1 0.2778 0.969 0.952 0.048
#> SRR522106 1 0.2778 0.969 0.952 0.048
#> SRR522107 1 0.2778 0.969 0.952 0.048
#> SRR522108 2 0.0938 0.960 0.012 0.988
#> SRR522109 2 0.0672 0.960 0.008 0.992
#> SRR522110 2 0.0672 0.960 0.008 0.992
#> SRR522111 2 0.0672 0.960 0.008 0.992
#> SRR522112 2 0.0672 0.960 0.008 0.992
#> SRR522113 2 0.0672 0.960 0.008 0.992
#> SRR522114 2 0.0376 0.957 0.004 0.996
#> SRR522115 1 0.9635 0.417 0.612 0.388
#> SRR522116 2 0.0376 0.957 0.004 0.996
#> SRR522117 2 0.0376 0.957 0.004 0.996
#> SRR522118 2 0.0672 0.960 0.008 0.992
#> SRR522119 2 0.0938 0.960 0.012 0.988
#> SRR522120 2 0.0000 0.959 0.000 1.000
#> SRR522121 2 0.0000 0.959 0.000 1.000
#> SRR522122 2 0.0000 0.959 0.000 1.000
#> SRR522123 2 0.0000 0.959 0.000 1.000
#> SRR522124 2 0.0376 0.957 0.004 0.996
#> SRR522125 2 0.0376 0.957 0.004 0.996
#> SRR522126 2 0.0376 0.957 0.004 0.996
#> SRR522127 2 0.0376 0.957 0.004 0.996
#> SRR522128 2 0.0938 0.960 0.012 0.988
#> SRR522129 2 0.0938 0.960 0.012 0.988
#> SRR522130 2 0.0672 0.960 0.008 0.992
#> SRR522131 2 0.2423 0.950 0.040 0.960
#> SRR522132 2 0.2423 0.950 0.040 0.960
#> SRR522133 2 0.2423 0.950 0.040 0.960
#> SRR522134 2 0.2423 0.950 0.040 0.960
#> SRR522135 2 0.2423 0.950 0.040 0.960
#> SRR522136 2 0.3114 0.943 0.056 0.944
#> SRR522137 2 0.7139 0.813 0.196 0.804
#> SRR522138 2 0.2423 0.950 0.040 0.960
#> SRR522139 2 0.7219 0.808 0.200 0.800
#> SRR522140 2 0.7219 0.808 0.200 0.800
#> SRR522141 2 0.7219 0.808 0.200 0.800
#> SRR522142 2 0.7219 0.808 0.200 0.800
#> SRR522143 2 0.2423 0.950 0.040 0.960
#> SRR522144 2 0.2423 0.950 0.040 0.960
#> SRR522145 2 0.7219 0.808 0.200 0.800
#> SRR522146 2 0.2423 0.950 0.040 0.960
#> SRR522147 2 0.2423 0.950 0.040 0.960
#> SRR522148 2 0.7219 0.808 0.200 0.800
#> SRR522149 2 0.2423 0.950 0.040 0.960
#> SRR522150 2 0.2423 0.950 0.040 0.960
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 1.000 1.000 0.000 0.000
#> SRR522064 1 0.000 1.000 1.000 0.000 0.000
#> SRR522065 1 0.000 1.000 1.000 0.000 0.000
#> SRR522066 1 0.000 1.000 1.000 0.000 0.000
#> SRR522067 1 0.000 1.000 1.000 0.000 0.000
#> SRR522068 1 0.000 1.000 1.000 0.000 0.000
#> SRR522069 1 0.000 1.000 1.000 0.000 0.000
#> SRR522070 1 0.000 1.000 1.000 0.000 0.000
#> SRR522071 1 0.000 1.000 1.000 0.000 0.000
#> SRR522072 1 0.000 1.000 1.000 0.000 0.000
#> SRR522073 1 0.000 1.000 1.000 0.000 0.000
#> SRR522074 1 0.000 1.000 1.000 0.000 0.000
#> SRR522075 1 0.000 1.000 1.000 0.000 0.000
#> SRR522076 1 0.000 1.000 1.000 0.000 0.000
#> SRR522077 1 0.000 1.000 1.000 0.000 0.000
#> SRR522078 1 0.000 1.000 1.000 0.000 0.000
#> SRR522079 3 0.956 -0.695 0.208 0.332 0.460
#> SRR522080 3 0.956 -0.695 0.208 0.332 0.460
#> SRR522081 2 0.628 0.893 0.000 0.540 0.460
#> SRR522082 2 0.628 0.893 0.000 0.540 0.460
#> SRR522083 2 0.628 0.893 0.000 0.540 0.460
#> SRR522084 2 0.628 0.893 0.000 0.540 0.460
#> SRR522085 2 0.628 0.893 0.000 0.540 0.460
#> SRR522086 2 0.628 0.893 0.000 0.540 0.460
#> SRR522087 2 0.628 0.893 0.000 0.540 0.460
#> SRR522088 2 0.628 0.893 0.000 0.540 0.460
#> SRR522089 3 0.628 0.892 0.000 0.460 0.540
#> SRR522090 3 0.628 0.892 0.000 0.460 0.540
#> SRR522091 3 0.628 0.892 0.000 0.460 0.540
#> SRR522092 3 0.628 0.892 0.000 0.460 0.540
#> SRR522093 3 0.628 0.892 0.000 0.460 0.540
#> SRR522094 3 0.628 0.892 0.000 0.460 0.540
#> SRR522095 3 0.628 0.892 0.000 0.460 0.540
#> SRR522096 3 0.628 0.892 0.000 0.460 0.540
#> SRR522097 3 0.628 0.892 0.000 0.460 0.540
#> SRR522098 3 0.628 0.892 0.000 0.460 0.540
#> SRR522099 3 0.628 0.892 0.000 0.460 0.540
#> SRR522100 3 0.628 0.892 0.000 0.460 0.540
#> SRR522101 3 0.628 0.892 0.000 0.460 0.540
#> SRR522102 3 0.628 0.892 0.000 0.460 0.540
#> SRR522103 3 0.628 0.892 0.000 0.460 0.540
#> SRR522104 3 0.628 0.892 0.000 0.460 0.540
#> SRR522105 3 0.628 0.892 0.000 0.460 0.540
#> SRR522106 3 0.628 0.892 0.000 0.460 0.540
#> SRR522107 3 0.628 0.892 0.000 0.460 0.540
#> SRR522108 2 0.628 0.893 0.000 0.540 0.460
#> SRR522109 2 0.628 0.893 0.000 0.540 0.460
#> SRR522110 2 0.628 0.893 0.000 0.540 0.460
#> SRR522111 2 0.628 0.893 0.000 0.540 0.460
#> SRR522112 2 0.628 0.893 0.000 0.540 0.460
#> SRR522113 2 0.628 0.893 0.000 0.540 0.460
#> SRR522114 2 0.620 0.876 0.000 0.576 0.424
#> SRR522115 3 0.628 0.892 0.000 0.460 0.540
#> SRR522116 2 0.620 0.876 0.000 0.576 0.424
#> SRR522117 2 0.620 0.876 0.000 0.576 0.424
#> SRR522118 2 0.628 0.893 0.000 0.540 0.460
#> SRR522119 2 0.628 0.893 0.000 0.540 0.460
#> SRR522120 2 0.628 0.893 0.000 0.540 0.460
#> SRR522121 2 0.628 0.893 0.000 0.540 0.460
#> SRR522122 2 0.628 0.893 0.000 0.540 0.460
#> SRR522123 2 0.628 0.893 0.000 0.540 0.460
#> SRR522124 2 0.620 0.876 0.000 0.576 0.424
#> SRR522125 2 0.620 0.876 0.000 0.576 0.424
#> SRR522126 2 0.620 0.876 0.000 0.576 0.424
#> SRR522127 2 0.620 0.876 0.000 0.576 0.424
#> SRR522128 2 0.628 0.893 0.000 0.540 0.460
#> SRR522129 2 0.628 0.893 0.000 0.540 0.460
#> SRR522130 2 0.628 0.893 0.000 0.540 0.460
#> SRR522131 2 0.717 0.887 0.024 0.516 0.460
#> SRR522132 2 0.717 0.887 0.024 0.516 0.460
#> SRR522133 2 0.717 0.887 0.024 0.516 0.460
#> SRR522134 2 0.717 0.887 0.024 0.516 0.460
#> SRR522135 2 0.717 0.887 0.024 0.516 0.460
#> SRR522136 2 0.236 0.145 0.072 0.928 0.000
#> SRR522137 2 0.236 0.145 0.072 0.928 0.000
#> SRR522138 2 0.717 0.887 0.024 0.516 0.460
#> SRR522139 2 0.236 0.145 0.072 0.928 0.000
#> SRR522140 2 0.236 0.145 0.072 0.928 0.000
#> SRR522141 2 0.236 0.145 0.072 0.928 0.000
#> SRR522142 2 0.236 0.145 0.072 0.928 0.000
#> SRR522143 2 0.717 0.887 0.024 0.516 0.460
#> SRR522144 2 0.717 0.887 0.024 0.516 0.460
#> SRR522145 2 0.236 0.145 0.072 0.928 0.000
#> SRR522146 2 0.717 0.887 0.024 0.516 0.460
#> SRR522147 2 0.717 0.887 0.024 0.516 0.460
#> SRR522148 2 0.236 0.145 0.072 0.928 0.000
#> SRR522149 2 0.717 0.887 0.024 0.516 0.460
#> SRR522150 2 0.717 0.887 0.024 0.516 0.460
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522064 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522065 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522066 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522067 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522068 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522069 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522070 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522071 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522072 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522073 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522074 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522075 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522076 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522077 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522078 1 0.000 1.000 1 0.000 0.000 0.000
#> SRR522079 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522080 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522081 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522082 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522083 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522084 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522085 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522086 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522087 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522088 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522089 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522090 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522091 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522092 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522093 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522094 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522095 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522096 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522097 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522098 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522099 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522100 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522101 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522102 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522103 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522104 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522105 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522106 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522107 3 0.000 0.984 0 0.000 1.000 0.000
#> SRR522108 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522109 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522110 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522111 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522112 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522113 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522114 4 0.394 0.762 0 0.236 0.000 0.764
#> SRR522115 3 0.461 0.607 0 0.012 0.724 0.264
#> SRR522116 4 0.394 0.762 0 0.236 0.000 0.764
#> SRR522117 4 0.394 0.762 0 0.236 0.000 0.764
#> SRR522118 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522119 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522120 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522121 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522122 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522123 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522124 4 0.380 0.780 0 0.220 0.000 0.780
#> SRR522125 4 0.380 0.780 0 0.220 0.000 0.780
#> SRR522126 4 0.380 0.780 0 0.220 0.000 0.780
#> SRR522127 4 0.387 0.771 0 0.228 0.000 0.772
#> SRR522128 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522129 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522130 2 0.000 1.000 0 1.000 0.000 0.000
#> SRR522131 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522132 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522133 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522134 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522135 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522136 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522137 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522138 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522139 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522140 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522141 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522142 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522143 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522144 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522145 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522146 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522147 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522148 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522149 4 0.000 0.931 0 0.000 0.000 1.000
#> SRR522150 4 0.000 0.931 0 0.000 0.000 1.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 5 0.0000 0.243 0 0.000 0.000 0.000 1.000
#> SRR522080 5 0.0000 0.243 0 0.000 0.000 0.000 1.000
#> SRR522081 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522082 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522083 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522084 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522085 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522086 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522087 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522088 5 0.4227 0.560 0 0.420 0.000 0.000 0.580
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522108 5 0.4227 -0.472 0 0.420 0.000 0.000 0.580
#> SRR522109 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522110 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522111 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522112 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522113 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522114 2 0.1792 0.343 0 0.916 0.000 0.084 0.000
#> SRR522115 2 0.4352 0.237 0 0.720 0.244 0.036 0.000
#> SRR522116 2 0.1792 0.343 0 0.916 0.000 0.084 0.000
#> SRR522117 2 0.1792 0.343 0 0.916 0.000 0.084 0.000
#> SRR522118 2 0.4307 0.551 0 0.504 0.000 0.000 0.496
#> SRR522119 5 0.4273 -0.514 0 0.448 0.000 0.000 0.552
#> SRR522120 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522121 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522122 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522123 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522124 2 0.1851 0.338 0 0.912 0.000 0.088 0.000
#> SRR522125 2 0.1792 0.343 0 0.916 0.000 0.084 0.000
#> SRR522126 2 0.1851 0.338 0 0.912 0.000 0.088 0.000
#> SRR522127 2 0.1792 0.343 0 0.916 0.000 0.084 0.000
#> SRR522128 5 0.4219 -0.466 0 0.416 0.000 0.000 0.584
#> SRR522129 5 0.4294 -0.547 0 0.468 0.000 0.000 0.532
#> SRR522130 2 0.4306 0.557 0 0.508 0.000 0.000 0.492
#> SRR522131 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522132 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522133 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522134 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522135 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522137 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522139 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522140 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522141 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522142 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0162 0.996 0 0.000 0.000 0.996 0.004
#> SRR522144 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522145 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0162 0.996 0 0.000 0.000 0.996 0.004
#> SRR522147 4 0.0404 0.989 0 0.000 0.000 0.988 0.012
#> SRR522148 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0404 0.989 0 0.000 0.000 0.988 0.012
#> SRR522150 4 0.0000 0.998 0 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522079 5 0.1501 0.932 0 0.076 0.000 0.000 0.924 0.000
#> SRR522080 5 0.1501 0.932 0 0.076 0.000 0.000 0.924 0.000
#> SRR522081 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522082 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522083 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522084 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522085 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522086 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522087 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522088 5 0.0260 0.983 0 0.008 0.000 0.000 0.992 0.000
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0146 0.991 0 0.996 0.000 0.000 0.000 0.004
#> SRR522109 2 0.0458 0.992 0 0.984 0.000 0.000 0.000 0.016
#> SRR522110 2 0.0363 0.992 0 0.988 0.000 0.000 0.000 0.012
#> SRR522111 2 0.0547 0.990 0 0.980 0.000 0.000 0.000 0.020
#> SRR522112 2 0.0458 0.992 0 0.984 0.000 0.000 0.000 0.016
#> SRR522113 2 0.0363 0.992 0 0.988 0.000 0.000 0.000 0.012
#> SRR522114 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522115 6 0.0603 0.995 0 0.016 0.004 0.000 0.000 0.980
#> SRR522116 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522117 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522118 2 0.0146 0.992 0 0.996 0.000 0.000 0.000 0.004
#> SRR522119 2 0.0000 0.991 0 1.000 0.000 0.000 0.000 0.000
#> SRR522120 2 0.0363 0.993 0 0.988 0.000 0.000 0.000 0.012
#> SRR522121 2 0.0363 0.993 0 0.988 0.000 0.000 0.000 0.012
#> SRR522122 2 0.0363 0.993 0 0.988 0.000 0.000 0.000 0.012
#> SRR522123 2 0.0363 0.993 0 0.988 0.000 0.000 0.000 0.012
#> SRR522124 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522125 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522126 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522127 6 0.0458 0.999 0 0.016 0.000 0.000 0.000 0.984
#> SRR522128 2 0.0000 0.991 0 1.000 0.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.991 0 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0363 0.993 0 0.988 0.000 0.000 0.000 0.012
#> SRR522131 4 0.0508 0.974 0 0.000 0.000 0.984 0.012 0.004
#> SRR522132 4 0.0291 0.975 0 0.000 0.000 0.992 0.004 0.004
#> SRR522133 4 0.0508 0.974 0 0.000 0.000 0.984 0.012 0.004
#> SRR522134 4 0.0508 0.974 0 0.000 0.000 0.984 0.012 0.004
#> SRR522135 4 0.0291 0.975 0 0.000 0.000 0.992 0.004 0.004
#> SRR522136 4 0.1049 0.971 0 0.000 0.000 0.960 0.008 0.032
#> SRR522137 4 0.1049 0.971 0 0.000 0.000 0.960 0.008 0.032
#> SRR522138 4 0.0508 0.974 0 0.000 0.000 0.984 0.004 0.012
#> SRR522139 4 0.1124 0.970 0 0.000 0.000 0.956 0.008 0.036
#> SRR522140 4 0.1124 0.970 0 0.000 0.000 0.956 0.008 0.036
#> SRR522141 4 0.1124 0.970 0 0.000 0.000 0.956 0.008 0.036
#> SRR522142 4 0.1124 0.970 0 0.000 0.000 0.956 0.008 0.036
#> SRR522143 4 0.0692 0.971 0 0.000 0.000 0.976 0.020 0.004
#> SRR522144 4 0.0146 0.975 0 0.000 0.000 0.996 0.004 0.000
#> SRR522145 4 0.1124 0.970 0 0.000 0.000 0.956 0.008 0.036
#> SRR522146 4 0.0458 0.974 0 0.000 0.000 0.984 0.016 0.000
#> SRR522147 4 0.0935 0.963 0 0.004 0.000 0.964 0.032 0.000
#> SRR522148 4 0.1124 0.970 0 0.000 0.000 0.956 0.008 0.036
#> SRR522149 4 0.0713 0.968 0 0.000 0.000 0.972 0.028 0.000
#> SRR522150 4 0.0363 0.975 0 0.000 0.000 0.988 0.012 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 13957 rows and 88 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 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.998 0.999 0.3030 0.699 0.699
#> 3 3 1.000 0.993 0.997 0.8708 0.737 0.624
#> 4 4 0.858 0.872 0.932 0.1331 0.973 0.939
#> 5 5 0.922 0.939 0.973 0.1494 0.859 0.655
#> 6 6 0.892 0.892 0.921 0.0624 0.941 0.782
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 5
#> attr(,"optional")
#> [1] 2 3
There is also optional best \(k\) = 2 3 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.000 1.000 1.000 0.000
#> SRR522064 1 0.000 1.000 1.000 0.000
#> SRR522065 1 0.000 1.000 1.000 0.000
#> SRR522066 1 0.000 1.000 1.000 0.000
#> SRR522067 1 0.000 1.000 1.000 0.000
#> SRR522068 1 0.000 1.000 1.000 0.000
#> SRR522069 1 0.000 1.000 1.000 0.000
#> SRR522070 1 0.000 1.000 1.000 0.000
#> SRR522071 1 0.000 1.000 1.000 0.000
#> SRR522072 1 0.000 1.000 1.000 0.000
#> SRR522073 1 0.000 1.000 1.000 0.000
#> SRR522074 1 0.000 1.000 1.000 0.000
#> SRR522075 1 0.000 1.000 1.000 0.000
#> SRR522076 1 0.000 1.000 1.000 0.000
#> SRR522077 1 0.000 1.000 1.000 0.000
#> SRR522078 1 0.000 1.000 1.000 0.000
#> SRR522079 2 0.278 0.950 0.048 0.952
#> SRR522080 2 0.295 0.946 0.052 0.948
#> SRR522081 2 0.000 0.999 0.000 1.000
#> SRR522082 2 0.000 0.999 0.000 1.000
#> SRR522083 2 0.000 0.999 0.000 1.000
#> SRR522084 2 0.000 0.999 0.000 1.000
#> SRR522085 2 0.000 0.999 0.000 1.000
#> SRR522086 2 0.000 0.999 0.000 1.000
#> SRR522087 2 0.000 0.999 0.000 1.000
#> SRR522088 2 0.000 0.999 0.000 1.000
#> SRR522089 2 0.000 0.999 0.000 1.000
#> SRR522090 2 0.000 0.999 0.000 1.000
#> SRR522091 2 0.000 0.999 0.000 1.000
#> SRR522092 2 0.000 0.999 0.000 1.000
#> SRR522093 2 0.000 0.999 0.000 1.000
#> SRR522094 2 0.000 0.999 0.000 1.000
#> SRR522095 2 0.000 0.999 0.000 1.000
#> SRR522096 2 0.000 0.999 0.000 1.000
#> SRR522097 2 0.000 0.999 0.000 1.000
#> SRR522098 2 0.000 0.999 0.000 1.000
#> SRR522099 2 0.000 0.999 0.000 1.000
#> SRR522100 2 0.000 0.999 0.000 1.000
#> SRR522101 2 0.000 0.999 0.000 1.000
#> SRR522102 2 0.000 0.999 0.000 1.000
#> SRR522103 2 0.000 0.999 0.000 1.000
#> SRR522104 2 0.000 0.999 0.000 1.000
#> SRR522105 2 0.000 0.999 0.000 1.000
#> SRR522106 2 0.000 0.999 0.000 1.000
#> SRR522107 2 0.000 0.999 0.000 1.000
#> SRR522108 2 0.000 0.999 0.000 1.000
#> SRR522109 2 0.000 0.999 0.000 1.000
#> SRR522110 2 0.000 0.999 0.000 1.000
#> SRR522111 2 0.000 0.999 0.000 1.000
#> SRR522112 2 0.000 0.999 0.000 1.000
#> SRR522113 2 0.000 0.999 0.000 1.000
#> SRR522114 2 0.000 0.999 0.000 1.000
#> SRR522115 2 0.000 0.999 0.000 1.000
#> SRR522116 2 0.000 0.999 0.000 1.000
#> SRR522117 2 0.000 0.999 0.000 1.000
#> SRR522118 2 0.000 0.999 0.000 1.000
#> SRR522119 2 0.000 0.999 0.000 1.000
#> SRR522120 2 0.000 0.999 0.000 1.000
#> SRR522121 2 0.000 0.999 0.000 1.000
#> SRR522122 2 0.000 0.999 0.000 1.000
#> SRR522123 2 0.000 0.999 0.000 1.000
#> SRR522124 2 0.000 0.999 0.000 1.000
#> SRR522125 2 0.000 0.999 0.000 1.000
#> SRR522126 2 0.000 0.999 0.000 1.000
#> SRR522127 2 0.000 0.999 0.000 1.000
#> SRR522128 2 0.000 0.999 0.000 1.000
#> SRR522129 2 0.000 0.999 0.000 1.000
#> SRR522130 2 0.000 0.999 0.000 1.000
#> SRR522131 2 0.000 0.999 0.000 1.000
#> SRR522132 2 0.000 0.999 0.000 1.000
#> SRR522133 2 0.000 0.999 0.000 1.000
#> SRR522134 2 0.000 0.999 0.000 1.000
#> SRR522135 2 0.000 0.999 0.000 1.000
#> SRR522136 2 0.000 0.999 0.000 1.000
#> SRR522137 2 0.000 0.999 0.000 1.000
#> SRR522138 2 0.000 0.999 0.000 1.000
#> SRR522139 2 0.000 0.999 0.000 1.000
#> SRR522140 2 0.000 0.999 0.000 1.000
#> SRR522141 2 0.000 0.999 0.000 1.000
#> SRR522142 2 0.000 0.999 0.000 1.000
#> SRR522143 2 0.000 0.999 0.000 1.000
#> SRR522144 2 0.000 0.999 0.000 1.000
#> SRR522145 2 0.000 0.999 0.000 1.000
#> SRR522146 2 0.000 0.999 0.000 1.000
#> SRR522147 2 0.000 0.999 0.000 1.000
#> SRR522148 2 0.000 0.999 0.000 1.000
#> SRR522149 2 0.000 0.999 0.000 1.000
#> SRR522150 2 0.000 0.999 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 1.000 1.000 0.000 0.000
#> SRR522064 1 0.000 1.000 1.000 0.000 0.000
#> SRR522065 1 0.000 1.000 1.000 0.000 0.000
#> SRR522066 1 0.000 1.000 1.000 0.000 0.000
#> SRR522067 1 0.000 1.000 1.000 0.000 0.000
#> SRR522068 1 0.000 1.000 1.000 0.000 0.000
#> SRR522069 1 0.000 1.000 1.000 0.000 0.000
#> SRR522070 1 0.000 1.000 1.000 0.000 0.000
#> SRR522071 1 0.000 1.000 1.000 0.000 0.000
#> SRR522072 1 0.000 1.000 1.000 0.000 0.000
#> SRR522073 1 0.000 1.000 1.000 0.000 0.000
#> SRR522074 1 0.000 1.000 1.000 0.000 0.000
#> SRR522075 1 0.000 1.000 1.000 0.000 0.000
#> SRR522076 1 0.000 1.000 1.000 0.000 0.000
#> SRR522077 1 0.000 1.000 1.000 0.000 0.000
#> SRR522078 1 0.000 1.000 1.000 0.000 0.000
#> SRR522079 2 0.471 0.830 0.036 0.844 0.120
#> SRR522080 2 0.429 0.860 0.040 0.868 0.092
#> SRR522081 2 0.000 0.995 0.000 1.000 0.000
#> SRR522082 2 0.000 0.995 0.000 1.000 0.000
#> SRR522083 2 0.000 0.995 0.000 1.000 0.000
#> SRR522084 2 0.000 0.995 0.000 1.000 0.000
#> SRR522085 2 0.000 0.995 0.000 1.000 0.000
#> SRR522086 2 0.000 0.995 0.000 1.000 0.000
#> SRR522087 2 0.000 0.995 0.000 1.000 0.000
#> SRR522088 2 0.000 0.995 0.000 1.000 0.000
#> SRR522089 3 0.000 1.000 0.000 0.000 1.000
#> SRR522090 3 0.000 1.000 0.000 0.000 1.000
#> SRR522091 3 0.000 1.000 0.000 0.000 1.000
#> SRR522092 3 0.000 1.000 0.000 0.000 1.000
#> SRR522093 3 0.000 1.000 0.000 0.000 1.000
#> SRR522094 3 0.000 1.000 0.000 0.000 1.000
#> SRR522095 3 0.000 1.000 0.000 0.000 1.000
#> SRR522096 3 0.000 1.000 0.000 0.000 1.000
#> SRR522097 3 0.000 1.000 0.000 0.000 1.000
#> SRR522098 3 0.000 1.000 0.000 0.000 1.000
#> SRR522099 3 0.000 1.000 0.000 0.000 1.000
#> SRR522100 3 0.000 1.000 0.000 0.000 1.000
#> SRR522101 3 0.000 1.000 0.000 0.000 1.000
#> SRR522102 3 0.000 1.000 0.000 0.000 1.000
#> SRR522103 3 0.000 1.000 0.000 0.000 1.000
#> SRR522104 3 0.000 1.000 0.000 0.000 1.000
#> SRR522105 3 0.000 1.000 0.000 0.000 1.000
#> SRR522106 3 0.000 1.000 0.000 0.000 1.000
#> SRR522107 3 0.000 1.000 0.000 0.000 1.000
#> SRR522108 2 0.000 0.995 0.000 1.000 0.000
#> SRR522109 2 0.000 0.995 0.000 1.000 0.000
#> SRR522110 2 0.000 0.995 0.000 1.000 0.000
#> SRR522111 2 0.000 0.995 0.000 1.000 0.000
#> SRR522112 2 0.000 0.995 0.000 1.000 0.000
#> SRR522113 2 0.000 0.995 0.000 1.000 0.000
#> SRR522114 2 0.000 0.995 0.000 1.000 0.000
#> SRR522115 2 0.000 0.995 0.000 1.000 0.000
#> SRR522116 2 0.000 0.995 0.000 1.000 0.000
#> SRR522117 2 0.000 0.995 0.000 1.000 0.000
#> SRR522118 2 0.000 0.995 0.000 1.000 0.000
#> SRR522119 2 0.000 0.995 0.000 1.000 0.000
#> SRR522120 2 0.000 0.995 0.000 1.000 0.000
#> SRR522121 2 0.000 0.995 0.000 1.000 0.000
#> SRR522122 2 0.000 0.995 0.000 1.000 0.000
#> SRR522123 2 0.000 0.995 0.000 1.000 0.000
#> SRR522124 2 0.000 0.995 0.000 1.000 0.000
#> SRR522125 2 0.000 0.995 0.000 1.000 0.000
#> SRR522126 2 0.000 0.995 0.000 1.000 0.000
#> SRR522127 2 0.000 0.995 0.000 1.000 0.000
#> SRR522128 2 0.000 0.995 0.000 1.000 0.000
#> SRR522129 2 0.000 0.995 0.000 1.000 0.000
#> SRR522130 2 0.000 0.995 0.000 1.000 0.000
#> SRR522131 2 0.000 0.995 0.000 1.000 0.000
#> SRR522132 2 0.000 0.995 0.000 1.000 0.000
#> SRR522133 2 0.000 0.995 0.000 1.000 0.000
#> SRR522134 2 0.000 0.995 0.000 1.000 0.000
#> SRR522135 2 0.000 0.995 0.000 1.000 0.000
#> SRR522136 2 0.000 0.995 0.000 1.000 0.000
#> SRR522137 2 0.000 0.995 0.000 1.000 0.000
#> SRR522138 2 0.000 0.995 0.000 1.000 0.000
#> SRR522139 2 0.000 0.995 0.000 1.000 0.000
#> SRR522140 2 0.000 0.995 0.000 1.000 0.000
#> SRR522141 2 0.000 0.995 0.000 1.000 0.000
#> SRR522142 2 0.000 0.995 0.000 1.000 0.000
#> SRR522143 2 0.000 0.995 0.000 1.000 0.000
#> SRR522144 2 0.000 0.995 0.000 1.000 0.000
#> SRR522145 2 0.000 0.995 0.000 1.000 0.000
#> SRR522146 2 0.000 0.995 0.000 1.000 0.000
#> SRR522147 2 0.000 0.995 0.000 1.000 0.000
#> SRR522148 2 0.000 0.995 0.000 1.000 0.000
#> SRR522149 2 0.000 0.995 0.000 1.000 0.000
#> SRR522150 2 0.000 0.995 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522079 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522080 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522081 2 0.0921 0.853 0 0.972 0.000 0.028
#> SRR522082 2 0.0336 0.860 0 0.992 0.000 0.008
#> SRR522083 2 0.2216 0.819 0 0.908 0.000 0.092
#> SRR522084 2 0.1022 0.851 0 0.968 0.000 0.032
#> SRR522085 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522086 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522087 2 0.0921 0.853 0 0.972 0.000 0.028
#> SRR522088 2 0.1867 0.831 0 0.928 0.000 0.072
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522108 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522109 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522110 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522111 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522112 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522113 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522114 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522115 2 0.0188 0.861 0 0.996 0.004 0.000
#> SRR522116 2 0.1474 0.842 0 0.948 0.000 0.052
#> SRR522117 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522118 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522119 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522120 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522121 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522122 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522123 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522124 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522125 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522126 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522127 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522128 2 0.4804 0.573 0 0.616 0.000 0.384
#> SRR522129 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522130 2 0.4776 0.586 0 0.624 0.000 0.376
#> SRR522131 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522132 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522133 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522134 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522135 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522136 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522137 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522138 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522139 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522140 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522141 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522142 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522143 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522144 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522145 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522146 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522147 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522148 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522149 2 0.0000 0.863 0 1.000 0.000 0.000
#> SRR522150 2 0.0000 0.863 0 1.000 0.000 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.0
#> SRR522079 5 0.0000 1.000 0 0.000 0.000 0.000 1.0
#> SRR522080 5 0.0000 1.000 0 0.000 0.000 0.000 1.0
#> SRR522081 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522082 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522083 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522084 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522085 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522086 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522087 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522088 4 0.3109 0.804 0 0.000 0.000 0.800 0.2
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000 0.0
#> SRR522108 2 0.0290 0.905 0 0.992 0.000 0.008 0.0
#> SRR522109 2 0.1965 0.823 0 0.904 0.000 0.096 0.0
#> SRR522110 2 0.3857 0.462 0 0.688 0.000 0.312 0.0
#> SRR522111 2 0.0703 0.894 0 0.976 0.000 0.024 0.0
#> SRR522112 2 0.2020 0.817 0 0.900 0.000 0.100 0.0
#> SRR522113 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522114 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522115 4 0.0162 0.946 0 0.000 0.004 0.996 0.0
#> SRR522116 4 0.1544 0.895 0 0.068 0.000 0.932 0.0
#> SRR522117 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522118 2 0.3109 0.665 0 0.800 0.000 0.200 0.0
#> SRR522119 2 0.0162 0.907 0 0.996 0.000 0.004 0.0
#> SRR522120 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522121 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522122 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522123 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522124 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522125 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522126 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522127 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522128 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522129 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522130 2 0.0000 0.908 0 1.000 0.000 0.000 0.0
#> SRR522131 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522132 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522133 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522134 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522135 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522136 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522137 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522138 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522139 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522140 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522141 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522142 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522143 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522144 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522145 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522146 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522147 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522148 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522149 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
#> SRR522150 4 0.0000 0.949 0 0.000 0.000 1.000 0.0
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522079 6 0.1204 1.000 0 0.000 0.000 0.000 0.056 0.944
#> SRR522080 6 0.1204 1.000 0 0.000 0.000 0.000 0.056 0.944
#> SRR522081 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522082 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522083 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522084 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522085 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522086 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522087 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522088 5 0.0000 1.000 0 0.000 0.000 0.000 1.000 0.000
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0260 0.910 0 0.992 0.000 0.000 0.008 0.000
#> SRR522109 2 0.1765 0.833 0 0.904 0.000 0.000 0.096 0.000
#> SRR522110 2 0.3464 0.451 0 0.688 0.000 0.000 0.312 0.000
#> SRR522111 2 0.0632 0.900 0 0.976 0.000 0.000 0.024 0.000
#> SRR522112 2 0.1814 0.828 0 0.900 0.000 0.000 0.100 0.000
#> SRR522113 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522114 4 0.4795 0.791 0 0.000 0.000 0.544 0.400 0.056
#> SRR522115 4 0.4301 0.813 0 0.000 0.004 0.580 0.400 0.016
#> SRR522116 4 0.5701 0.725 0 0.048 0.000 0.496 0.400 0.056
#> SRR522117 4 0.4795 0.791 0 0.000 0.000 0.544 0.400 0.056
#> SRR522118 2 0.2793 0.685 0 0.800 0.000 0.000 0.200 0.000
#> SRR522119 2 0.0146 0.912 0 0.996 0.000 0.000 0.004 0.000
#> SRR522120 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522124 4 0.4795 0.791 0 0.000 0.000 0.544 0.400 0.056
#> SRR522125 4 0.4795 0.791 0 0.000 0.000 0.544 0.400 0.056
#> SRR522126 4 0.4795 0.791 0 0.000 0.000 0.544 0.400 0.056
#> SRR522127 4 0.4795 0.791 0 0.000 0.000 0.544 0.400 0.056
#> SRR522128 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.913 0 1.000 0.000 0.000 0.000 0.000
#> SRR522131 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522132 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522133 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522134 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522135 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522136 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522137 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522138 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522139 4 0.0000 0.487 0 0.000 0.000 1.000 0.000 0.000
#> SRR522140 4 0.0000 0.487 0 0.000 0.000 1.000 0.000 0.000
#> SRR522141 4 0.0000 0.487 0 0.000 0.000 1.000 0.000 0.000
#> SRR522142 4 0.0000 0.487 0 0.000 0.000 1.000 0.000 0.000
#> SRR522143 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522144 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522145 4 0.0000 0.487 0 0.000 0.000 1.000 0.000 0.000
#> SRR522146 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522147 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522148 4 0.0000 0.487 0 0.000 0.000 1.000 0.000 0.000
#> SRR522149 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
#> SRR522150 4 0.3756 0.822 0 0.000 0.000 0.600 0.400 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 13957 rows and 88 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.500 0.883 0.921 0.3886 0.645 0.645
#> 3 3 1.000 0.979 0.993 0.4476 0.689 0.553
#> 4 4 0.854 0.913 0.935 0.2694 0.828 0.605
#> 5 5 0.755 0.762 0.856 0.0595 0.970 0.885
#> 6 6 0.829 0.760 0.865 0.0628 0.915 0.673
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
#> SRR522063 1 0.1633 0.952 0.976 0.024
#> SRR522064 1 0.1633 0.952 0.976 0.024
#> SRR522065 1 0.1633 0.952 0.976 0.024
#> SRR522066 1 0.1633 0.952 0.976 0.024
#> SRR522067 1 0.1633 0.952 0.976 0.024
#> SRR522068 1 0.1633 0.952 0.976 0.024
#> SRR522069 1 0.1633 0.952 0.976 0.024
#> SRR522070 1 0.1633 0.952 0.976 0.024
#> SRR522071 1 0.1633 0.952 0.976 0.024
#> SRR522072 1 0.1633 0.952 0.976 0.024
#> SRR522073 1 0.1633 0.952 0.976 0.024
#> SRR522074 1 0.1633 0.952 0.976 0.024
#> SRR522075 1 0.1633 0.952 0.976 0.024
#> SRR522076 1 0.1633 0.952 0.976 0.024
#> SRR522077 1 0.1633 0.952 0.976 0.024
#> SRR522078 1 0.1633 0.952 0.976 0.024
#> SRR522079 1 0.6148 0.864 0.848 0.152
#> SRR522080 1 0.6148 0.864 0.848 0.152
#> SRR522081 2 0.5178 0.862 0.116 0.884
#> SRR522082 2 0.5178 0.862 0.116 0.884
#> SRR522083 2 0.5178 0.862 0.116 0.884
#> SRR522084 2 0.5178 0.862 0.116 0.884
#> SRR522085 2 0.5178 0.862 0.116 0.884
#> SRR522086 2 0.5178 0.862 0.116 0.884
#> SRR522087 2 0.5178 0.862 0.116 0.884
#> SRR522088 2 0.5178 0.862 0.116 0.884
#> SRR522089 2 0.4690 0.886 0.100 0.900
#> SRR522090 2 0.4690 0.886 0.100 0.900
#> SRR522091 2 0.4690 0.886 0.100 0.900
#> SRR522092 2 0.4690 0.886 0.100 0.900
#> SRR522093 2 0.4690 0.886 0.100 0.900
#> SRR522094 2 0.4690 0.886 0.100 0.900
#> SRR522095 2 0.4690 0.886 0.100 0.900
#> SRR522096 2 0.4690 0.886 0.100 0.900
#> SRR522097 2 0.4690 0.886 0.100 0.900
#> SRR522098 2 0.4690 0.886 0.100 0.900
#> SRR522099 2 0.4690 0.886 0.100 0.900
#> SRR522100 2 0.4690 0.886 0.100 0.900
#> SRR522101 2 0.4690 0.886 0.100 0.900
#> SRR522102 2 0.4690 0.886 0.100 0.900
#> SRR522103 2 0.4690 0.886 0.100 0.900
#> SRR522104 2 0.4690 0.886 0.100 0.900
#> SRR522105 2 0.4690 0.886 0.100 0.900
#> SRR522106 2 0.4690 0.886 0.100 0.900
#> SRR522107 2 0.4690 0.886 0.100 0.900
#> SRR522108 2 0.5178 0.862 0.116 0.884
#> SRR522109 2 0.5294 0.859 0.120 0.880
#> SRR522110 2 0.5178 0.862 0.116 0.884
#> SRR522111 2 0.5178 0.862 0.116 0.884
#> SRR522112 2 0.5178 0.862 0.116 0.884
#> SRR522113 2 0.5178 0.862 0.116 0.884
#> SRR522114 2 0.0000 0.906 0.000 1.000
#> SRR522115 2 0.0000 0.906 0.000 1.000
#> SRR522116 2 0.0672 0.907 0.008 0.992
#> SRR522117 2 0.9460 0.301 0.364 0.636
#> SRR522118 2 0.5178 0.862 0.116 0.884
#> SRR522119 1 0.9963 0.211 0.536 0.464
#> SRR522120 2 0.0000 0.906 0.000 1.000
#> SRR522121 2 0.0000 0.906 0.000 1.000
#> SRR522122 2 0.0000 0.906 0.000 1.000
#> SRR522123 2 0.0000 0.906 0.000 1.000
#> SRR522124 2 0.0000 0.906 0.000 1.000
#> SRR522125 2 0.0000 0.906 0.000 1.000
#> SRR522126 2 0.0000 0.906 0.000 1.000
#> SRR522127 2 0.0000 0.906 0.000 1.000
#> SRR522128 1 0.8081 0.747 0.752 0.248
#> SRR522129 2 0.6887 0.789 0.184 0.816
#> SRR522130 2 0.5059 0.865 0.112 0.888
#> SRR522131 2 0.2948 0.906 0.052 0.948
#> SRR522132 2 0.2948 0.906 0.052 0.948
#> SRR522133 2 0.2948 0.906 0.052 0.948
#> SRR522134 2 0.2948 0.906 0.052 0.948
#> SRR522135 2 0.2948 0.906 0.052 0.948
#> SRR522136 2 0.2948 0.906 0.052 0.948
#> SRR522137 2 0.2948 0.906 0.052 0.948
#> SRR522138 2 0.2948 0.906 0.052 0.948
#> SRR522139 2 0.2948 0.906 0.052 0.948
#> SRR522140 2 0.2948 0.906 0.052 0.948
#> SRR522141 2 0.2948 0.906 0.052 0.948
#> SRR522142 2 0.2948 0.906 0.052 0.948
#> SRR522143 2 0.2948 0.906 0.052 0.948
#> SRR522144 2 0.2948 0.906 0.052 0.948
#> SRR522145 2 0.2948 0.906 0.052 0.948
#> SRR522146 2 0.2948 0.906 0.052 0.948
#> SRR522147 2 0.2948 0.906 0.052 0.948
#> SRR522148 2 0.2948 0.906 0.052 0.948
#> SRR522149 2 0.2948 0.906 0.052 0.948
#> SRR522150 2 0.2948 0.906 0.052 0.948
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 1.000 1.000 0.000 0.000
#> SRR522064 1 0.000 1.000 1.000 0.000 0.000
#> SRR522065 1 0.000 1.000 1.000 0.000 0.000
#> SRR522066 1 0.000 1.000 1.000 0.000 0.000
#> SRR522067 1 0.000 1.000 1.000 0.000 0.000
#> SRR522068 1 0.000 1.000 1.000 0.000 0.000
#> SRR522069 1 0.000 1.000 1.000 0.000 0.000
#> SRR522070 1 0.000 1.000 1.000 0.000 0.000
#> SRR522071 1 0.000 1.000 1.000 0.000 0.000
#> SRR522072 1 0.000 1.000 1.000 0.000 0.000
#> SRR522073 1 0.000 1.000 1.000 0.000 0.000
#> SRR522074 1 0.000 1.000 1.000 0.000 0.000
#> SRR522075 1 0.000 1.000 1.000 0.000 0.000
#> SRR522076 1 0.000 1.000 1.000 0.000 0.000
#> SRR522077 1 0.000 1.000 1.000 0.000 0.000
#> SRR522078 1 0.000 1.000 1.000 0.000 0.000
#> SRR522079 2 0.312 0.881 0.108 0.892 0.000
#> SRR522080 2 0.312 0.881 0.108 0.892 0.000
#> SRR522081 2 0.000 0.996 0.000 1.000 0.000
#> SRR522082 2 0.000 0.996 0.000 1.000 0.000
#> SRR522083 2 0.000 0.996 0.000 1.000 0.000
#> SRR522084 2 0.000 0.996 0.000 1.000 0.000
#> SRR522085 2 0.000 0.996 0.000 1.000 0.000
#> SRR522086 2 0.000 0.996 0.000 1.000 0.000
#> SRR522087 2 0.000 0.996 0.000 1.000 0.000
#> SRR522088 2 0.000 0.996 0.000 1.000 0.000
#> SRR522089 3 0.000 0.966 0.000 0.000 1.000
#> SRR522090 3 0.621 0.245 0.000 0.428 0.572
#> SRR522091 3 0.000 0.966 0.000 0.000 1.000
#> SRR522092 3 0.000 0.966 0.000 0.000 1.000
#> SRR522093 3 0.000 0.966 0.000 0.000 1.000
#> SRR522094 3 0.000 0.966 0.000 0.000 1.000
#> SRR522095 3 0.000 0.966 0.000 0.000 1.000
#> SRR522096 3 0.000 0.966 0.000 0.000 1.000
#> SRR522097 3 0.000 0.966 0.000 0.000 1.000
#> SRR522098 3 0.000 0.966 0.000 0.000 1.000
#> SRR522099 3 0.000 0.966 0.000 0.000 1.000
#> SRR522100 3 0.000 0.966 0.000 0.000 1.000
#> SRR522101 3 0.000 0.966 0.000 0.000 1.000
#> SRR522102 3 0.000 0.966 0.000 0.000 1.000
#> SRR522103 3 0.000 0.966 0.000 0.000 1.000
#> SRR522104 3 0.000 0.966 0.000 0.000 1.000
#> SRR522105 3 0.000 0.966 0.000 0.000 1.000
#> SRR522106 3 0.000 0.966 0.000 0.000 1.000
#> SRR522107 3 0.000 0.966 0.000 0.000 1.000
#> SRR522108 2 0.000 0.996 0.000 1.000 0.000
#> SRR522109 2 0.000 0.996 0.000 1.000 0.000
#> SRR522110 2 0.000 0.996 0.000 1.000 0.000
#> SRR522111 2 0.000 0.996 0.000 1.000 0.000
#> SRR522112 2 0.000 0.996 0.000 1.000 0.000
#> SRR522113 2 0.000 0.996 0.000 1.000 0.000
#> SRR522114 2 0.000 0.996 0.000 1.000 0.000
#> SRR522115 2 0.000 0.996 0.000 1.000 0.000
#> SRR522116 2 0.000 0.996 0.000 1.000 0.000
#> SRR522117 2 0.000 0.996 0.000 1.000 0.000
#> SRR522118 2 0.000 0.996 0.000 1.000 0.000
#> SRR522119 2 0.000 0.996 0.000 1.000 0.000
#> SRR522120 2 0.000 0.996 0.000 1.000 0.000
#> SRR522121 2 0.000 0.996 0.000 1.000 0.000
#> SRR522122 2 0.000 0.996 0.000 1.000 0.000
#> SRR522123 2 0.000 0.996 0.000 1.000 0.000
#> SRR522124 2 0.000 0.996 0.000 1.000 0.000
#> SRR522125 2 0.000 0.996 0.000 1.000 0.000
#> SRR522126 2 0.000 0.996 0.000 1.000 0.000
#> SRR522127 2 0.000 0.996 0.000 1.000 0.000
#> SRR522128 2 0.000 0.996 0.000 1.000 0.000
#> SRR522129 2 0.000 0.996 0.000 1.000 0.000
#> SRR522130 2 0.000 0.996 0.000 1.000 0.000
#> SRR522131 2 0.000 0.996 0.000 1.000 0.000
#> SRR522132 2 0.000 0.996 0.000 1.000 0.000
#> SRR522133 2 0.000 0.996 0.000 1.000 0.000
#> SRR522134 2 0.000 0.996 0.000 1.000 0.000
#> SRR522135 2 0.000 0.996 0.000 1.000 0.000
#> SRR522136 2 0.000 0.996 0.000 1.000 0.000
#> SRR522137 2 0.000 0.996 0.000 1.000 0.000
#> SRR522138 2 0.000 0.996 0.000 1.000 0.000
#> SRR522139 2 0.000 0.996 0.000 1.000 0.000
#> SRR522140 2 0.000 0.996 0.000 1.000 0.000
#> SRR522141 2 0.000 0.996 0.000 1.000 0.000
#> SRR522142 2 0.000 0.996 0.000 1.000 0.000
#> SRR522143 2 0.000 0.996 0.000 1.000 0.000
#> SRR522144 2 0.000 0.996 0.000 1.000 0.000
#> SRR522145 2 0.000 0.996 0.000 1.000 0.000
#> SRR522146 2 0.000 0.996 0.000 1.000 0.000
#> SRR522147 2 0.000 0.996 0.000 1.000 0.000
#> SRR522148 2 0.000 0.996 0.000 1.000 0.000
#> SRR522149 2 0.000 0.996 0.000 1.000 0.000
#> SRR522150 2 0.000 0.996 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522079 2 0.3808 0.752 0.012 0.812 0.000 0.176
#> SRR522080 2 0.3808 0.752 0.012 0.812 0.000 0.176
#> SRR522081 2 0.1557 0.925 0.000 0.944 0.000 0.056
#> SRR522082 2 0.1716 0.920 0.000 0.936 0.000 0.064
#> SRR522083 2 0.1716 0.920 0.000 0.936 0.000 0.064
#> SRR522084 2 0.1716 0.920 0.000 0.936 0.000 0.064
#> SRR522085 2 0.1716 0.920 0.000 0.936 0.000 0.064
#> SRR522086 2 0.1637 0.922 0.000 0.940 0.000 0.060
#> SRR522087 2 0.1716 0.920 0.000 0.936 0.000 0.064
#> SRR522088 2 0.1302 0.932 0.000 0.956 0.000 0.044
#> SRR522089 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522090 3 0.6324 0.355 0.000 0.356 0.572 0.072
#> SRR522091 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.974 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0592 0.946 0.000 0.984 0.000 0.016
#> SRR522109 2 0.0817 0.946 0.000 0.976 0.000 0.024
#> SRR522110 2 0.0817 0.946 0.000 0.976 0.000 0.024
#> SRR522111 2 0.0817 0.946 0.000 0.976 0.000 0.024
#> SRR522112 2 0.0817 0.946 0.000 0.976 0.000 0.024
#> SRR522113 2 0.0817 0.946 0.000 0.976 0.000 0.024
#> SRR522114 2 0.0188 0.950 0.000 0.996 0.000 0.004
#> SRR522115 2 0.1716 0.906 0.000 0.936 0.000 0.064
#> SRR522116 2 0.0188 0.950 0.000 0.996 0.000 0.004
#> SRR522117 2 0.0000 0.949 0.000 1.000 0.000 0.000
#> SRR522118 2 0.0469 0.949 0.000 0.988 0.000 0.012
#> SRR522119 2 0.1637 0.909 0.000 0.940 0.000 0.060
#> SRR522120 2 0.0469 0.949 0.000 0.988 0.000 0.012
#> SRR522121 2 0.0469 0.949 0.000 0.988 0.000 0.012
#> SRR522122 2 0.0469 0.949 0.000 0.988 0.000 0.012
#> SRR522123 2 0.0469 0.949 0.000 0.988 0.000 0.012
#> SRR522124 2 0.0188 0.950 0.000 0.996 0.000 0.004
#> SRR522125 2 0.0592 0.949 0.000 0.984 0.000 0.016
#> SRR522126 2 0.0188 0.950 0.000 0.996 0.000 0.004
#> SRR522127 2 0.0188 0.950 0.000 0.996 0.000 0.004
#> SRR522128 2 0.0707 0.945 0.000 0.980 0.000 0.020
#> SRR522129 2 0.0707 0.945 0.000 0.980 0.000 0.020
#> SRR522130 2 0.0469 0.949 0.000 0.988 0.000 0.012
#> SRR522131 4 0.4543 0.812 0.000 0.324 0.000 0.676
#> SRR522132 4 0.4522 0.818 0.000 0.320 0.000 0.680
#> SRR522133 4 0.4500 0.819 0.000 0.316 0.000 0.684
#> SRR522134 4 0.4564 0.807 0.000 0.328 0.000 0.672
#> SRR522135 4 0.4500 0.819 0.000 0.316 0.000 0.684
#> SRR522136 4 0.2921 0.801 0.000 0.140 0.000 0.860
#> SRR522137 4 0.0921 0.761 0.000 0.028 0.000 0.972
#> SRR522138 4 0.4164 0.817 0.000 0.264 0.000 0.736
#> SRR522139 4 0.0592 0.755 0.000 0.016 0.000 0.984
#> SRR522140 4 0.0592 0.755 0.000 0.016 0.000 0.984
#> SRR522141 4 0.0592 0.755 0.000 0.016 0.000 0.984
#> SRR522142 4 0.0592 0.755 0.000 0.016 0.000 0.984
#> SRR522143 4 0.4522 0.818 0.000 0.320 0.000 0.680
#> SRR522144 4 0.4522 0.818 0.000 0.320 0.000 0.680
#> SRR522145 4 0.0592 0.755 0.000 0.016 0.000 0.984
#> SRR522146 4 0.4522 0.818 0.000 0.320 0.000 0.680
#> SRR522147 4 0.4522 0.818 0.000 0.320 0.000 0.680
#> SRR522148 4 0.0592 0.755 0.000 0.016 0.000 0.984
#> SRR522149 4 0.4522 0.818 0.000 0.320 0.000 0.680
#> SRR522150 4 0.4522 0.818 0.000 0.320 0.000 0.680
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 5 0.1965 0.582 0 0.096 0.000 0.000 0.904
#> SRR522080 5 0.1965 0.582 0 0.096 0.000 0.000 0.904
#> SRR522081 2 0.0510 0.708 0 0.984 0.000 0.000 0.016
#> SRR522082 2 0.0510 0.700 0 0.984 0.000 0.000 0.016
#> SRR522083 2 0.0794 0.705 0 0.972 0.000 0.000 0.028
#> SRR522084 2 0.1121 0.716 0 0.956 0.000 0.000 0.044
#> SRR522085 2 0.0609 0.702 0 0.980 0.000 0.000 0.020
#> SRR522086 2 0.0609 0.707 0 0.980 0.000 0.000 0.020
#> SRR522087 2 0.0703 0.705 0 0.976 0.000 0.000 0.024
#> SRR522088 2 0.0609 0.711 0 0.980 0.000 0.000 0.020
#> SRR522089 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.5702 0.357 0 0.104 0.576 0.000 0.320
#> SRR522091 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0609 0.962 0 0.000 0.980 0.000 0.020
#> SRR522095 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0510 0.965 0 0.000 0.984 0.000 0.016
#> SRR522099 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.976 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.4287 -0.123 0 0.540 0.000 0.000 0.460
#> SRR522109 2 0.2732 0.691 0 0.840 0.000 0.000 0.160
#> SRR522110 2 0.2516 0.690 0 0.860 0.000 0.000 0.140
#> SRR522111 2 0.1544 0.720 0 0.932 0.000 0.000 0.068
#> SRR522112 2 0.3242 0.666 0 0.784 0.000 0.000 0.216
#> SRR522113 2 0.2966 0.684 0 0.816 0.000 0.000 0.184
#> SRR522114 2 0.3980 0.650 0 0.708 0.000 0.008 0.284
#> SRR522115 2 0.4464 0.492 0 0.584 0.000 0.008 0.408
#> SRR522116 2 0.3885 0.660 0 0.724 0.000 0.008 0.268
#> SRR522117 2 0.4046 0.638 0 0.696 0.000 0.008 0.296
#> SRR522118 2 0.2813 0.695 0 0.832 0.000 0.000 0.168
#> SRR522119 2 0.3480 0.626 0 0.752 0.000 0.000 0.248
#> SRR522120 2 0.4327 0.567 0 0.632 0.000 0.008 0.360
#> SRR522121 2 0.4367 0.555 0 0.620 0.000 0.008 0.372
#> SRR522122 2 0.4341 0.558 0 0.628 0.000 0.008 0.364
#> SRR522123 2 0.4354 0.556 0 0.624 0.000 0.008 0.368
#> SRR522124 2 0.4666 0.590 0 0.732 0.000 0.088 0.180
#> SRR522125 2 0.4232 0.590 0 0.676 0.000 0.012 0.312
#> SRR522126 2 0.4630 0.592 0 0.736 0.000 0.088 0.176
#> SRR522127 2 0.4088 0.640 0 0.776 0.000 0.056 0.168
#> SRR522128 5 0.4283 0.137 0 0.456 0.000 0.000 0.544
#> SRR522129 5 0.4305 -0.154 0 0.488 0.000 0.000 0.512
#> SRR522130 2 0.4268 0.545 0 0.648 0.000 0.008 0.344
#> SRR522131 4 0.4686 0.751 0 0.384 0.000 0.596 0.020
#> SRR522132 4 0.4697 0.746 0 0.388 0.000 0.592 0.020
#> SRR522133 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522134 4 0.4779 0.741 0 0.388 0.000 0.588 0.024
#> SRR522135 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522136 4 0.3336 0.716 0 0.228 0.000 0.772 0.000
#> SRR522137 4 0.2583 0.672 0 0.132 0.000 0.864 0.004
#> SRR522138 4 0.4494 0.754 0 0.380 0.000 0.608 0.012
#> SRR522139 4 0.0162 0.610 0 0.000 0.000 0.996 0.004
#> SRR522140 4 0.0162 0.610 0 0.000 0.000 0.996 0.004
#> SRR522141 4 0.0162 0.610 0 0.000 0.000 0.996 0.004
#> SRR522142 4 0.0162 0.610 0 0.000 0.000 0.996 0.004
#> SRR522143 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522144 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522145 4 0.0162 0.610 0 0.000 0.000 0.996 0.004
#> SRR522146 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522147 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522148 4 0.0162 0.610 0 0.000 0.000 0.996 0.004
#> SRR522149 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
#> SRR522150 4 0.4675 0.756 0 0.380 0.000 0.600 0.020
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0291 0.9951 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR522067 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0291 0.9951 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR522071 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0291 0.9951 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR522074 1 0.0291 0.9951 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR522075 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0291 0.9951 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR522077 1 0.0000 0.9970 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0291 0.9951 0.992 0.000 0.000 0.000 0.004 0.004
#> SRR522079 5 0.0363 1.0000 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR522080 5 0.0363 1.0000 0.000 0.012 0.000 0.000 0.988 0.000
#> SRR522081 2 0.0603 0.7812 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522082 2 0.0603 0.7801 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522083 2 0.1003 0.7799 0.000 0.964 0.000 0.000 0.016 0.020
#> SRR522084 2 0.0717 0.7826 0.000 0.976 0.000 0.000 0.008 0.016
#> SRR522085 2 0.0914 0.7805 0.000 0.968 0.000 0.000 0.016 0.016
#> SRR522086 2 0.0820 0.7807 0.000 0.972 0.000 0.000 0.012 0.016
#> SRR522087 2 0.1176 0.7785 0.000 0.956 0.000 0.000 0.020 0.024
#> SRR522088 2 0.0820 0.7843 0.000 0.972 0.000 0.000 0.016 0.012
#> SRR522089 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.6424 0.0303 0.000 0.076 0.500 0.000 0.312 0.112
#> SRR522091 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0547 0.9527 0.000 0.000 0.980 0.000 0.020 0.000
#> SRR522095 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0146 0.9640 0.000 0.004 0.996 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0603 0.9529 0.000 0.004 0.980 0.000 0.016 0.000
#> SRR522099 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.9681 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.3668 0.5502 0.000 0.668 0.000 0.000 0.328 0.004
#> SRR522109 2 0.1010 0.7811 0.000 0.960 0.000 0.000 0.036 0.004
#> SRR522110 2 0.1049 0.7806 0.000 0.960 0.000 0.000 0.032 0.008
#> SRR522111 2 0.0458 0.7793 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR522112 2 0.1219 0.7797 0.000 0.948 0.000 0.000 0.048 0.004
#> SRR522113 2 0.1196 0.7801 0.000 0.952 0.000 0.000 0.040 0.008
#> SRR522114 6 0.4702 -0.2559 0.000 0.460 0.000 0.000 0.044 0.496
#> SRR522115 2 0.5775 0.4358 0.000 0.480 0.000 0.000 0.192 0.328
#> SRR522116 6 0.4705 -0.2794 0.000 0.472 0.000 0.000 0.044 0.484
#> SRR522117 2 0.5153 0.2279 0.000 0.464 0.000 0.000 0.084 0.452
#> SRR522118 2 0.1908 0.7661 0.000 0.900 0.000 0.000 0.096 0.004
#> SRR522119 2 0.3078 0.7241 0.000 0.796 0.000 0.000 0.192 0.012
#> SRR522120 2 0.5135 0.5998 0.000 0.616 0.000 0.000 0.144 0.240
#> SRR522121 2 0.5224 0.5722 0.000 0.588 0.000 0.000 0.132 0.280
#> SRR522122 2 0.5223 0.5816 0.000 0.592 0.000 0.000 0.136 0.272
#> SRR522123 2 0.5320 0.5608 0.000 0.576 0.000 0.000 0.144 0.280
#> SRR522124 6 0.3534 0.3378 0.000 0.276 0.000 0.000 0.008 0.716
#> SRR522125 2 0.5679 0.4998 0.000 0.500 0.000 0.000 0.176 0.324
#> SRR522126 6 0.3615 0.3121 0.000 0.292 0.000 0.000 0.008 0.700
#> SRR522127 6 0.3804 0.2828 0.000 0.336 0.000 0.000 0.008 0.656
#> SRR522128 2 0.3838 0.3774 0.000 0.552 0.000 0.000 0.448 0.000
#> SRR522129 2 0.3782 0.4632 0.000 0.588 0.000 0.000 0.412 0.000
#> SRR522130 2 0.4220 0.6871 0.000 0.732 0.000 0.000 0.172 0.096
#> SRR522131 6 0.4545 0.6748 0.000 0.112 0.000 0.192 0.000 0.696
#> SRR522132 6 0.4809 0.6693 0.000 0.140 0.000 0.192 0.000 0.668
#> SRR522133 6 0.4737 0.6723 0.000 0.132 0.000 0.192 0.000 0.676
#> SRR522134 6 0.4662 0.6711 0.000 0.140 0.000 0.172 0.000 0.688
#> SRR522135 6 0.4843 0.6677 0.000 0.144 0.000 0.192 0.000 0.664
#> SRR522136 4 0.3748 0.6723 0.000 0.112 0.000 0.792 0.004 0.092
#> SRR522137 4 0.0622 0.8605 0.000 0.008 0.000 0.980 0.000 0.012
#> SRR522138 4 0.6225 -0.2066 0.000 0.200 0.000 0.444 0.016 0.340
#> SRR522139 4 0.0000 0.8719 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522140 4 0.0000 0.8719 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522141 4 0.0000 0.8719 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522142 4 0.0000 0.8719 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522143 6 0.4215 0.6648 0.000 0.080 0.000 0.196 0.000 0.724
#> SRR522144 6 0.4490 0.6644 0.000 0.104 0.000 0.196 0.000 0.700
#> SRR522145 4 0.0000 0.8719 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522146 6 0.4311 0.6649 0.000 0.088 0.000 0.196 0.000 0.716
#> SRR522147 6 0.4358 0.6659 0.000 0.092 0.000 0.196 0.000 0.712
#> SRR522148 4 0.0000 0.8719 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522149 6 0.4215 0.6648 0.000 0.080 0.000 0.196 0.000 0.724
#> SRR522150 6 0.4264 0.6654 0.000 0.084 0.000 0.196 0.000 0.720
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 13957 rows and 88 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.3298 0.671 0.671
#> 3 3 1.000 0.995 0.998 0.7873 0.739 0.611
#> 4 4 1.000 0.965 0.983 0.2702 0.839 0.607
#> 5 5 0.982 0.943 0.974 0.0612 0.932 0.739
#> 6 6 0.999 0.980 0.986 0.0335 0.966 0.838
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4 5
There is also optional best \(k\) = 2 3 4 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0 1 1 0
#> SRR522064 1 0 1 1 0
#> SRR522065 1 0 1 1 0
#> SRR522066 1 0 1 1 0
#> SRR522067 1 0 1 1 0
#> SRR522068 1 0 1 1 0
#> SRR522069 1 0 1 1 0
#> SRR522070 1 0 1 1 0
#> SRR522071 1 0 1 1 0
#> SRR522072 1 0 1 1 0
#> SRR522073 1 0 1 1 0
#> SRR522074 1 0 1 1 0
#> SRR522075 1 0 1 1 0
#> SRR522076 1 0 1 1 0
#> SRR522077 1 0 1 1 0
#> SRR522078 1 0 1 1 0
#> SRR522079 1 0 1 1 0
#> SRR522080 1 0 1 1 0
#> SRR522081 2 0 1 0 1
#> SRR522082 2 0 1 0 1
#> SRR522083 2 0 1 0 1
#> SRR522084 2 0 1 0 1
#> SRR522085 2 0 1 0 1
#> SRR522086 2 0 1 0 1
#> SRR522087 2 0 1 0 1
#> SRR522088 2 0 1 0 1
#> SRR522089 2 0 1 0 1
#> SRR522090 2 0 1 0 1
#> SRR522091 2 0 1 0 1
#> SRR522092 2 0 1 0 1
#> SRR522093 2 0 1 0 1
#> SRR522094 2 0 1 0 1
#> SRR522095 2 0 1 0 1
#> SRR522096 2 0 1 0 1
#> SRR522097 2 0 1 0 1
#> SRR522098 2 0 1 0 1
#> SRR522099 2 0 1 0 1
#> SRR522100 2 0 1 0 1
#> SRR522101 2 0 1 0 1
#> SRR522102 2 0 1 0 1
#> SRR522103 2 0 1 0 1
#> SRR522104 2 0 1 0 1
#> SRR522105 2 0 1 0 1
#> SRR522106 2 0 1 0 1
#> SRR522107 2 0 1 0 1
#> SRR522108 2 0 1 0 1
#> SRR522109 2 0 1 0 1
#> SRR522110 2 0 1 0 1
#> SRR522111 2 0 1 0 1
#> SRR522112 2 0 1 0 1
#> SRR522113 2 0 1 0 1
#> SRR522114 2 0 1 0 1
#> SRR522115 2 0 1 0 1
#> SRR522116 2 0 1 0 1
#> SRR522117 2 0 1 0 1
#> SRR522118 2 0 1 0 1
#> SRR522119 2 0 1 0 1
#> SRR522120 2 0 1 0 1
#> SRR522121 2 0 1 0 1
#> SRR522122 2 0 1 0 1
#> SRR522123 2 0 1 0 1
#> SRR522124 2 0 1 0 1
#> SRR522125 2 0 1 0 1
#> SRR522126 2 0 1 0 1
#> SRR522127 2 0 1 0 1
#> SRR522128 2 0 1 0 1
#> SRR522129 2 0 1 0 1
#> SRR522130 2 0 1 0 1
#> SRR522131 2 0 1 0 1
#> SRR522132 2 0 1 0 1
#> SRR522133 2 0 1 0 1
#> SRR522134 2 0 1 0 1
#> SRR522135 2 0 1 0 1
#> SRR522136 2 0 1 0 1
#> SRR522137 2 0 1 0 1
#> SRR522138 2 0 1 0 1
#> SRR522139 2 0 1 0 1
#> SRR522140 2 0 1 0 1
#> SRR522141 2 0 1 0 1
#> SRR522142 2 0 1 0 1
#> SRR522143 2 0 1 0 1
#> SRR522144 2 0 1 0 1
#> SRR522145 2 0 1 0 1
#> SRR522146 2 0 1 0 1
#> SRR522147 2 0 1 0 1
#> SRR522148 2 0 1 0 1
#> SRR522149 2 0 1 0 1
#> SRR522150 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 0.995 1.000 0.000 0.000
#> SRR522064 1 0.000 0.995 1.000 0.000 0.000
#> SRR522065 1 0.000 0.995 1.000 0.000 0.000
#> SRR522066 1 0.000 0.995 1.000 0.000 0.000
#> SRR522067 1 0.000 0.995 1.000 0.000 0.000
#> SRR522068 1 0.000 0.995 1.000 0.000 0.000
#> SRR522069 1 0.000 0.995 1.000 0.000 0.000
#> SRR522070 1 0.000 0.995 1.000 0.000 0.000
#> SRR522071 1 0.000 0.995 1.000 0.000 0.000
#> SRR522072 1 0.000 0.995 1.000 0.000 0.000
#> SRR522073 1 0.000 0.995 1.000 0.000 0.000
#> SRR522074 1 0.000 0.995 1.000 0.000 0.000
#> SRR522075 1 0.000 0.995 1.000 0.000 0.000
#> SRR522076 1 0.000 0.995 1.000 0.000 0.000
#> SRR522077 1 0.000 0.995 1.000 0.000 0.000
#> SRR522078 1 0.000 0.995 1.000 0.000 0.000
#> SRR522079 1 0.129 0.958 0.968 0.032 0.000
#> SRR522080 1 0.129 0.958 0.968 0.032 0.000
#> SRR522081 2 0.000 1.000 0.000 1.000 0.000
#> SRR522082 2 0.000 1.000 0.000 1.000 0.000
#> SRR522083 2 0.000 1.000 0.000 1.000 0.000
#> SRR522084 2 0.000 1.000 0.000 1.000 0.000
#> SRR522085 2 0.000 1.000 0.000 1.000 0.000
#> SRR522086 2 0.000 1.000 0.000 1.000 0.000
#> SRR522087 2 0.000 1.000 0.000 1.000 0.000
#> SRR522088 2 0.000 1.000 0.000 1.000 0.000
#> SRR522089 3 0.000 0.993 0.000 0.000 1.000
#> SRR522090 3 0.000 0.993 0.000 0.000 1.000
#> SRR522091 3 0.000 0.993 0.000 0.000 1.000
#> SRR522092 3 0.000 0.993 0.000 0.000 1.000
#> SRR522093 3 0.000 0.993 0.000 0.000 1.000
#> SRR522094 3 0.000 0.993 0.000 0.000 1.000
#> SRR522095 3 0.000 0.993 0.000 0.000 1.000
#> SRR522096 3 0.000 0.993 0.000 0.000 1.000
#> SRR522097 3 0.000 0.993 0.000 0.000 1.000
#> SRR522098 3 0.000 0.993 0.000 0.000 1.000
#> SRR522099 3 0.000 0.993 0.000 0.000 1.000
#> SRR522100 3 0.000 0.993 0.000 0.000 1.000
#> SRR522101 3 0.000 0.993 0.000 0.000 1.000
#> SRR522102 3 0.000 0.993 0.000 0.000 1.000
#> SRR522103 3 0.000 0.993 0.000 0.000 1.000
#> SRR522104 3 0.000 0.993 0.000 0.000 1.000
#> SRR522105 3 0.000 0.993 0.000 0.000 1.000
#> SRR522106 3 0.000 0.993 0.000 0.000 1.000
#> SRR522107 3 0.000 0.993 0.000 0.000 1.000
#> SRR522108 2 0.000 1.000 0.000 1.000 0.000
#> SRR522109 2 0.000 1.000 0.000 1.000 0.000
#> SRR522110 2 0.000 1.000 0.000 1.000 0.000
#> SRR522111 2 0.000 1.000 0.000 1.000 0.000
#> SRR522112 2 0.000 1.000 0.000 1.000 0.000
#> SRR522113 2 0.000 1.000 0.000 1.000 0.000
#> SRR522114 2 0.000 1.000 0.000 1.000 0.000
#> SRR522115 3 0.288 0.864 0.000 0.096 0.904
#> SRR522116 2 0.000 1.000 0.000 1.000 0.000
#> SRR522117 2 0.000 1.000 0.000 1.000 0.000
#> SRR522118 2 0.000 1.000 0.000 1.000 0.000
#> SRR522119 2 0.000 1.000 0.000 1.000 0.000
#> SRR522120 2 0.000 1.000 0.000 1.000 0.000
#> SRR522121 2 0.000 1.000 0.000 1.000 0.000
#> SRR522122 2 0.000 1.000 0.000 1.000 0.000
#> SRR522123 2 0.000 1.000 0.000 1.000 0.000
#> SRR522124 2 0.000 1.000 0.000 1.000 0.000
#> SRR522125 2 0.000 1.000 0.000 1.000 0.000
#> SRR522126 2 0.000 1.000 0.000 1.000 0.000
#> SRR522127 2 0.000 1.000 0.000 1.000 0.000
#> SRR522128 2 0.000 1.000 0.000 1.000 0.000
#> SRR522129 2 0.000 1.000 0.000 1.000 0.000
#> SRR522130 2 0.000 1.000 0.000 1.000 0.000
#> SRR522131 2 0.000 1.000 0.000 1.000 0.000
#> SRR522132 2 0.000 1.000 0.000 1.000 0.000
#> SRR522133 2 0.000 1.000 0.000 1.000 0.000
#> SRR522134 2 0.000 1.000 0.000 1.000 0.000
#> SRR522135 2 0.000 1.000 0.000 1.000 0.000
#> SRR522136 2 0.000 1.000 0.000 1.000 0.000
#> SRR522137 2 0.000 1.000 0.000 1.000 0.000
#> SRR522138 2 0.000 1.000 0.000 1.000 0.000
#> SRR522139 2 0.000 1.000 0.000 1.000 0.000
#> SRR522140 2 0.000 1.000 0.000 1.000 0.000
#> SRR522141 2 0.000 1.000 0.000 1.000 0.000
#> SRR522142 2 0.000 1.000 0.000 1.000 0.000
#> SRR522143 2 0.000 1.000 0.000 1.000 0.000
#> SRR522144 2 0.000 1.000 0.000 1.000 0.000
#> SRR522145 2 0.000 1.000 0.000 1.000 0.000
#> SRR522146 2 0.000 1.000 0.000 1.000 0.000
#> SRR522147 2 0.000 1.000 0.000 1.000 0.000
#> SRR522148 2 0.000 1.000 0.000 1.000 0.000
#> SRR522149 2 0.000 1.000 0.000 1.000 0.000
#> SRR522150 2 0.000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 0.975 1.000 0.000 0.000 0.000
#> SRR522079 1 0.3448 0.807 0.828 0.004 0.000 0.168
#> SRR522080 1 0.4018 0.726 0.772 0.004 0.000 0.224
#> SRR522081 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522082 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522083 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522084 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522085 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522086 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522087 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522088 4 0.1302 0.963 0.000 0.044 0.000 0.956
#> SRR522089 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522090 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522091 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.999 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522114 2 0.0469 0.959 0.000 0.988 0.000 0.012
#> SRR522115 3 0.0672 0.985 0.000 0.008 0.984 0.008
#> SRR522116 2 0.2589 0.859 0.000 0.884 0.000 0.116
#> SRR522117 2 0.5004 0.359 0.000 0.604 0.004 0.392
#> SRR522118 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522124 2 0.0469 0.959 0.000 0.988 0.000 0.012
#> SRR522125 2 0.0336 0.962 0.000 0.992 0.000 0.008
#> SRR522126 2 0.2011 0.898 0.000 0.920 0.000 0.080
#> SRR522127 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522128 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.967 0.000 1.000 0.000 0.000
#> SRR522131 4 0.0336 0.984 0.000 0.008 0.000 0.992
#> SRR522132 4 0.0336 0.984 0.000 0.008 0.000 0.992
#> SRR522133 4 0.0336 0.984 0.000 0.008 0.000 0.992
#> SRR522134 4 0.0336 0.984 0.000 0.008 0.000 0.992
#> SRR522135 4 0.0336 0.984 0.000 0.008 0.000 0.992
#> SRR522136 4 0.0336 0.984 0.000 0.008 0.000 0.992
#> SRR522137 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522138 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522139 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522140 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522141 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522142 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522143 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522144 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522145 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522146 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522147 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522148 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522149 4 0.0188 0.984 0.000 0.004 0.000 0.996
#> SRR522150 4 0.0188 0.984 0.000 0.004 0.000 0.996
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522079 4 0.3074 0.756 0.196 0.000 0.000 0.804 0.000
#> SRR522080 4 0.3274 0.723 0.220 0.000 0.000 0.780 0.000
#> SRR522081 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522082 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522083 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522084 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522085 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522086 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522087 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522088 5 0.0794 0.931 0.000 0.000 0.000 0.028 0.972
#> SRR522089 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.996 0.000 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522114 2 0.3353 0.773 0.000 0.796 0.008 0.000 0.196
#> SRR522115 3 0.1877 0.918 0.000 0.000 0.924 0.012 0.064
#> SRR522116 2 0.4341 0.459 0.000 0.628 0.008 0.000 0.364
#> SRR522117 5 0.5009 -0.136 0.000 0.480 0.012 0.012 0.496
#> SRR522118 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522124 2 0.2669 0.863 0.000 0.876 0.000 0.020 0.104
#> SRR522125 2 0.1444 0.916 0.000 0.948 0.000 0.012 0.040
#> SRR522126 2 0.3656 0.785 0.000 0.800 0.000 0.032 0.168
#> SRR522127 2 0.2536 0.851 0.000 0.868 0.000 0.004 0.128
#> SRR522128 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.944 0.000 1.000 0.000 0.000 0.000
#> SRR522131 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522132 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522133 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522134 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522135 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522137 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522139 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522140 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522141 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522142 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522145 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522148 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
#> SRR522150 4 0.0000 0.977 0.000 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522079 4 0.2631 0.832 0.128 0.012 0.000 0.856 0.000 0.004
#> SRR522080 4 0.2996 0.804 0.144 0.016 0.000 0.832 0.000 0.008
#> SRR522081 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522082 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522083 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522084 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522085 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522086 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522087 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522088 5 0.0146 1.000 0.000 0.000 0.000 0.004 0.996 0.000
#> SRR522089 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.1610 0.946 0.000 0.916 0.000 0.000 0.000 0.084
#> SRR522109 2 0.1610 0.946 0.000 0.916 0.000 0.000 0.000 0.084
#> SRR522110 2 0.1610 0.946 0.000 0.916 0.000 0.000 0.000 0.084
#> SRR522111 2 0.1610 0.946 0.000 0.916 0.000 0.000 0.000 0.084
#> SRR522112 2 0.1663 0.943 0.000 0.912 0.000 0.000 0.000 0.088
#> SRR522113 2 0.1663 0.943 0.000 0.912 0.000 0.000 0.000 0.088
#> SRR522114 6 0.0881 0.973 0.000 0.012 0.000 0.008 0.008 0.972
#> SRR522115 6 0.1958 0.858 0.000 0.000 0.100 0.004 0.000 0.896
#> SRR522116 6 0.0924 0.973 0.000 0.008 0.004 0.008 0.008 0.972
#> SRR522117 6 0.0881 0.967 0.000 0.000 0.008 0.008 0.012 0.972
#> SRR522118 2 0.0790 0.959 0.000 0.968 0.000 0.000 0.000 0.032
#> SRR522119 2 0.0260 0.960 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR522120 2 0.0363 0.961 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR522121 2 0.0146 0.959 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522122 2 0.0146 0.960 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522123 2 0.0146 0.960 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522124 6 0.0870 0.972 0.000 0.012 0.000 0.012 0.004 0.972
#> SRR522125 6 0.0820 0.970 0.000 0.016 0.000 0.012 0.000 0.972
#> SRR522126 6 0.0881 0.973 0.000 0.008 0.000 0.012 0.008 0.972
#> SRR522127 6 0.0881 0.973 0.000 0.012 0.000 0.008 0.008 0.972
#> SRR522128 2 0.0146 0.959 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522129 2 0.0260 0.957 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR522130 2 0.0146 0.959 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522131 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522132 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522133 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522134 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522135 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522136 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522137 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522138 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522139 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522140 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522141 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522142 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522143 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522144 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522145 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522146 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522147 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522148 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522149 4 0.0000 0.984 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522150 4 0.0000 0.984 0.000 0.000 0.000 1.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["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 13957 rows and 88 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 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.3016 0.699 0.699
#> 3 3 1.000 1.000 1.000 0.8998 0.728 0.611
#> 4 4 0.824 0.895 0.870 0.2284 0.836 0.617
#> 5 5 0.860 0.989 0.933 0.0754 0.948 0.802
#> 6 6 0.844 0.957 0.936 0.0316 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
#> 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
#> SRR522063 1 0 1 1 0
#> SRR522064 1 0 1 1 0
#> SRR522065 1 0 1 1 0
#> SRR522066 1 0 1 1 0
#> SRR522067 1 0 1 1 0
#> SRR522068 1 0 1 1 0
#> SRR522069 1 0 1 1 0
#> SRR522070 1 0 1 1 0
#> SRR522071 1 0 1 1 0
#> SRR522072 1 0 1 1 0
#> SRR522073 1 0 1 1 0
#> SRR522074 1 0 1 1 0
#> SRR522075 1 0 1 1 0
#> SRR522076 1 0 1 1 0
#> SRR522077 1 0 1 1 0
#> SRR522078 1 0 1 1 0
#> SRR522079 2 0 1 0 1
#> SRR522080 2 0 1 0 1
#> SRR522081 2 0 1 0 1
#> SRR522082 2 0 1 0 1
#> SRR522083 2 0 1 0 1
#> SRR522084 2 0 1 0 1
#> SRR522085 2 0 1 0 1
#> SRR522086 2 0 1 0 1
#> SRR522087 2 0 1 0 1
#> SRR522088 2 0 1 0 1
#> SRR522089 2 0 1 0 1
#> SRR522090 2 0 1 0 1
#> SRR522091 2 0 1 0 1
#> SRR522092 2 0 1 0 1
#> SRR522093 2 0 1 0 1
#> SRR522094 2 0 1 0 1
#> SRR522095 2 0 1 0 1
#> SRR522096 2 0 1 0 1
#> SRR522097 2 0 1 0 1
#> SRR522098 2 0 1 0 1
#> SRR522099 2 0 1 0 1
#> SRR522100 2 0 1 0 1
#> SRR522101 2 0 1 0 1
#> SRR522102 2 0 1 0 1
#> SRR522103 2 0 1 0 1
#> SRR522104 2 0 1 0 1
#> SRR522105 2 0 1 0 1
#> SRR522106 2 0 1 0 1
#> SRR522107 2 0 1 0 1
#> SRR522108 2 0 1 0 1
#> SRR522109 2 0 1 0 1
#> SRR522110 2 0 1 0 1
#> SRR522111 2 0 1 0 1
#> SRR522112 2 0 1 0 1
#> SRR522113 2 0 1 0 1
#> SRR522114 2 0 1 0 1
#> SRR522115 2 0 1 0 1
#> SRR522116 2 0 1 0 1
#> SRR522117 2 0 1 0 1
#> SRR522118 2 0 1 0 1
#> SRR522119 2 0 1 0 1
#> SRR522120 2 0 1 0 1
#> SRR522121 2 0 1 0 1
#> SRR522122 2 0 1 0 1
#> SRR522123 2 0 1 0 1
#> SRR522124 2 0 1 0 1
#> SRR522125 2 0 1 0 1
#> SRR522126 2 0 1 0 1
#> SRR522127 2 0 1 0 1
#> SRR522128 2 0 1 0 1
#> SRR522129 2 0 1 0 1
#> SRR522130 2 0 1 0 1
#> SRR522131 2 0 1 0 1
#> SRR522132 2 0 1 0 1
#> SRR522133 2 0 1 0 1
#> SRR522134 2 0 1 0 1
#> SRR522135 2 0 1 0 1
#> SRR522136 2 0 1 0 1
#> SRR522137 2 0 1 0 1
#> SRR522138 2 0 1 0 1
#> SRR522139 2 0 1 0 1
#> SRR522140 2 0 1 0 1
#> SRR522141 2 0 1 0 1
#> SRR522142 2 0 1 0 1
#> SRR522143 2 0 1 0 1
#> SRR522144 2 0 1 0 1
#> SRR522145 2 0 1 0 1
#> SRR522146 2 0 1 0 1
#> SRR522147 2 0 1 0 1
#> SRR522148 2 0 1 0 1
#> SRR522149 2 0 1 0 1
#> SRR522150 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0 1 1 0 0
#> SRR522064 1 0 1 1 0 0
#> SRR522065 1 0 1 1 0 0
#> SRR522066 1 0 1 1 0 0
#> SRR522067 1 0 1 1 0 0
#> SRR522068 1 0 1 1 0 0
#> SRR522069 1 0 1 1 0 0
#> SRR522070 1 0 1 1 0 0
#> SRR522071 1 0 1 1 0 0
#> SRR522072 1 0 1 1 0 0
#> SRR522073 1 0 1 1 0 0
#> SRR522074 1 0 1 1 0 0
#> SRR522075 1 0 1 1 0 0
#> SRR522076 1 0 1 1 0 0
#> SRR522077 1 0 1 1 0 0
#> SRR522078 1 0 1 1 0 0
#> SRR522079 3 0 1 0 0 1
#> SRR522080 3 0 1 0 0 1
#> SRR522081 3 0 1 0 0 1
#> SRR522082 3 0 1 0 0 1
#> SRR522083 3 0 1 0 0 1
#> SRR522084 3 0 1 0 0 1
#> SRR522085 3 0 1 0 0 1
#> SRR522086 3 0 1 0 0 1
#> SRR522087 3 0 1 0 0 1
#> SRR522088 3 0 1 0 0 1
#> SRR522089 3 0 1 0 0 1
#> SRR522090 3 0 1 0 0 1
#> SRR522091 3 0 1 0 0 1
#> SRR522092 3 0 1 0 0 1
#> SRR522093 3 0 1 0 0 1
#> SRR522094 3 0 1 0 0 1
#> SRR522095 3 0 1 0 0 1
#> SRR522096 3 0 1 0 0 1
#> SRR522097 3 0 1 0 0 1
#> SRR522098 3 0 1 0 0 1
#> SRR522099 3 0 1 0 0 1
#> SRR522100 3 0 1 0 0 1
#> SRR522101 3 0 1 0 0 1
#> SRR522102 3 0 1 0 0 1
#> SRR522103 3 0 1 0 0 1
#> SRR522104 3 0 1 0 0 1
#> SRR522105 3 0 1 0 0 1
#> SRR522106 3 0 1 0 0 1
#> SRR522107 3 0 1 0 0 1
#> SRR522108 3 0 1 0 0 1
#> SRR522109 3 0 1 0 0 1
#> SRR522110 3 0 1 0 0 1
#> SRR522111 3 0 1 0 0 1
#> SRR522112 3 0 1 0 0 1
#> SRR522113 3 0 1 0 0 1
#> SRR522114 3 0 1 0 0 1
#> SRR522115 3 0 1 0 0 1
#> SRR522116 3 0 1 0 0 1
#> SRR522117 3 0 1 0 0 1
#> SRR522118 3 0 1 0 0 1
#> SRR522119 3 0 1 0 0 1
#> SRR522120 3 0 1 0 0 1
#> SRR522121 3 0 1 0 0 1
#> SRR522122 3 0 1 0 0 1
#> SRR522123 3 0 1 0 0 1
#> SRR522124 3 0 1 0 0 1
#> SRR522125 3 0 1 0 0 1
#> SRR522126 3 0 1 0 0 1
#> SRR522127 3 0 1 0 0 1
#> SRR522128 3 0 1 0 0 1
#> SRR522129 3 0 1 0 0 1
#> SRR522130 3 0 1 0 0 1
#> SRR522131 2 0 1 0 1 0
#> SRR522132 2 0 1 0 1 0
#> SRR522133 2 0 1 0 1 0
#> SRR522134 2 0 1 0 1 0
#> SRR522135 2 0 1 0 1 0
#> SRR522136 2 0 1 0 1 0
#> SRR522137 2 0 1 0 1 0
#> SRR522138 2 0 1 0 1 0
#> SRR522139 2 0 1 0 1 0
#> SRR522140 2 0 1 0 1 0
#> SRR522141 2 0 1 0 1 0
#> SRR522142 2 0 1 0 1 0
#> SRR522143 2 0 1 0 1 0
#> SRR522144 2 0 1 0 1 0
#> SRR522145 2 0 1 0 1 0
#> SRR522146 2 0 1 0 1 0
#> SRR522147 2 0 1 0 1 0
#> SRR522148 2 0 1 0 1 0
#> SRR522149 2 0 1 0 1 0
#> SRR522150 2 0 1 0 1 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.000 1.000 1 0.000 0.000 0
#> SRR522064 1 0.000 1.000 1 0.000 0.000 0
#> SRR522065 1 0.000 1.000 1 0.000 0.000 0
#> SRR522066 1 0.000 1.000 1 0.000 0.000 0
#> SRR522067 1 0.000 1.000 1 0.000 0.000 0
#> SRR522068 1 0.000 1.000 1 0.000 0.000 0
#> SRR522069 1 0.000 1.000 1 0.000 0.000 0
#> SRR522070 1 0.000 1.000 1 0.000 0.000 0
#> SRR522071 1 0.000 1.000 1 0.000 0.000 0
#> SRR522072 1 0.000 1.000 1 0.000 0.000 0
#> SRR522073 1 0.000 1.000 1 0.000 0.000 0
#> SRR522074 1 0.000 1.000 1 0.000 0.000 0
#> SRR522075 1 0.000 1.000 1 0.000 0.000 0
#> SRR522076 1 0.000 1.000 1 0.000 0.000 0
#> SRR522077 1 0.000 1.000 1 0.000 0.000 0
#> SRR522078 1 0.000 1.000 1 0.000 0.000 0
#> SRR522079 2 0.000 0.790 0 1.000 0.000 0
#> SRR522080 2 0.000 0.790 0 1.000 0.000 0
#> SRR522081 2 0.497 0.507 0 0.544 0.456 0
#> SRR522082 2 0.497 0.507 0 0.544 0.456 0
#> SRR522083 2 0.497 0.507 0 0.544 0.456 0
#> SRR522084 2 0.497 0.507 0 0.544 0.456 0
#> SRR522085 2 0.497 0.507 0 0.544 0.456 0
#> SRR522086 2 0.497 0.507 0 0.544 0.456 0
#> SRR522087 2 0.497 0.507 0 0.544 0.456 0
#> SRR522088 2 0.497 0.507 0 0.544 0.456 0
#> SRR522089 3 0.497 1.000 0 0.456 0.544 0
#> SRR522090 3 0.498 0.993 0 0.460 0.540 0
#> SRR522091 3 0.497 1.000 0 0.456 0.544 0
#> SRR522092 3 0.497 1.000 0 0.456 0.544 0
#> SRR522093 3 0.497 1.000 0 0.456 0.544 0
#> SRR522094 3 0.497 1.000 0 0.456 0.544 0
#> SRR522095 3 0.497 1.000 0 0.456 0.544 0
#> SRR522096 3 0.497 1.000 0 0.456 0.544 0
#> SRR522097 3 0.497 1.000 0 0.456 0.544 0
#> SRR522098 3 0.497 1.000 0 0.456 0.544 0
#> SRR522099 3 0.497 1.000 0 0.456 0.544 0
#> SRR522100 3 0.497 1.000 0 0.456 0.544 0
#> SRR522101 3 0.497 1.000 0 0.456 0.544 0
#> SRR522102 3 0.497 1.000 0 0.456 0.544 0
#> SRR522103 3 0.497 1.000 0 0.456 0.544 0
#> SRR522104 3 0.497 1.000 0 0.456 0.544 0
#> SRR522105 3 0.497 1.000 0 0.456 0.544 0
#> SRR522106 3 0.497 1.000 0 0.456 0.544 0
#> SRR522107 3 0.497 1.000 0 0.456 0.544 0
#> SRR522108 2 0.000 0.790 0 1.000 0.000 0
#> SRR522109 2 0.000 0.790 0 1.000 0.000 0
#> SRR522110 2 0.000 0.790 0 1.000 0.000 0
#> SRR522111 2 0.000 0.790 0 1.000 0.000 0
#> SRR522112 2 0.000 0.790 0 1.000 0.000 0
#> SRR522113 2 0.000 0.790 0 1.000 0.000 0
#> SRR522114 2 0.000 0.790 0 1.000 0.000 0
#> SRR522115 2 0.000 0.790 0 1.000 0.000 0
#> SRR522116 2 0.000 0.790 0 1.000 0.000 0
#> SRR522117 2 0.000 0.790 0 1.000 0.000 0
#> SRR522118 2 0.000 0.790 0 1.000 0.000 0
#> SRR522119 2 0.000 0.790 0 1.000 0.000 0
#> SRR522120 2 0.000 0.790 0 1.000 0.000 0
#> SRR522121 2 0.000 0.790 0 1.000 0.000 0
#> SRR522122 2 0.000 0.790 0 1.000 0.000 0
#> SRR522123 2 0.000 0.790 0 1.000 0.000 0
#> SRR522124 2 0.000 0.790 0 1.000 0.000 0
#> SRR522125 2 0.000 0.790 0 1.000 0.000 0
#> SRR522126 2 0.000 0.790 0 1.000 0.000 0
#> SRR522127 2 0.000 0.790 0 1.000 0.000 0
#> SRR522128 2 0.000 0.790 0 1.000 0.000 0
#> SRR522129 2 0.000 0.790 0 1.000 0.000 0
#> SRR522130 2 0.000 0.790 0 1.000 0.000 0
#> SRR522131 4 0.000 1.000 0 0.000 0.000 1
#> SRR522132 4 0.000 1.000 0 0.000 0.000 1
#> SRR522133 4 0.000 1.000 0 0.000 0.000 1
#> SRR522134 4 0.000 1.000 0 0.000 0.000 1
#> SRR522135 4 0.000 1.000 0 0.000 0.000 1
#> SRR522136 4 0.000 1.000 0 0.000 0.000 1
#> SRR522137 4 0.000 1.000 0 0.000 0.000 1
#> SRR522138 4 0.000 1.000 0 0.000 0.000 1
#> SRR522139 4 0.000 1.000 0 0.000 0.000 1
#> SRR522140 4 0.000 1.000 0 0.000 0.000 1
#> SRR522141 4 0.000 1.000 0 0.000 0.000 1
#> SRR522142 4 0.000 1.000 0 0.000 0.000 1
#> SRR522143 4 0.000 1.000 0 0.000 0.000 1
#> SRR522144 4 0.000 1.000 0 0.000 0.000 1
#> SRR522145 4 0.000 1.000 0 0.000 0.000 1
#> SRR522146 4 0.000 1.000 0 0.000 0.000 1
#> SRR522147 4 0.000 1.000 0 0.000 0.000 1
#> SRR522148 4 0.000 1.000 0 0.000 0.000 1
#> SRR522149 4 0.000 1.000 0 0.000 0.000 1
#> SRR522150 4 0.000 1.000 0 0.000 0.000 1
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.3123 0.852 0.812 0.000 0.184 0.000 0.004
#> SRR522071 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.1557 0.950 0.940 0.000 0.052 0.000 0.008
#> SRR522074 1 0.1041 0.962 0.964 0.000 0.032 0.000 0.004
#> SRR522075 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.2011 0.930 0.908 0.000 0.088 0.000 0.004
#> SRR522077 1 0.0000 0.976 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.2193 0.921 0.900 0.000 0.092 0.000 0.008
#> SRR522079 2 0.0510 0.979 0.000 0.984 0.016 0.000 0.000
#> SRR522080 2 0.0510 0.979 0.000 0.984 0.016 0.000 0.000
#> SRR522081 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522082 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522083 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522084 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522085 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522086 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522087 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522088 5 0.1671 1.000 0.000 0.076 0.000 0.000 0.924
#> SRR522089 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522090 3 0.3561 0.978 0.000 0.260 0.740 0.000 0.000
#> SRR522091 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522092 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522093 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522094 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522095 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522096 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522097 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522098 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522099 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522100 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522101 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522102 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522103 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522104 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522105 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522106 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522107 3 0.3452 0.999 0.000 0.244 0.756 0.000 0.000
#> SRR522108 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522114 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522115 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522116 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522117 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522118 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522124 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522125 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522126 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522127 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522128 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.998 0.000 1.000 0.000 0.000 0.000
#> SRR522131 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522132 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522133 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522134 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522135 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522137 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522139 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522140 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522141 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522142 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0703 0.981 0.000 0.000 0.000 0.976 0.024
#> SRR522144 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522145 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0703 0.981 0.000 0.000 0.000 0.976 0.024
#> SRR522148 4 0.0000 0.994 0.000 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0703 0.981 0.000 0.000 0.000 0.976 0.024
#> SRR522150 4 0.1444 0.956 0.000 0.000 0.012 0.948 0.040
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522064 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522065 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522066 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522067 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522068 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522069 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522070 1 0.4515 0.714 0.656 0.064 0.000 0.000 0 NA
#> SRR522071 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522072 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522073 1 0.2794 0.886 0.860 0.060 0.000 0.000 0 NA
#> SRR522074 1 0.2605 0.892 0.864 0.028 0.000 0.000 0 NA
#> SRR522075 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522076 1 0.3588 0.833 0.788 0.060 0.000 0.000 0 NA
#> SRR522077 1 0.0000 0.947 1.000 0.000 0.000 0.000 0 NA
#> SRR522078 1 0.3432 0.839 0.800 0.052 0.000 0.000 0 NA
#> SRR522079 2 0.2664 0.953 0.000 0.816 0.184 0.000 0 NA
#> SRR522080 2 0.2664 0.953 0.000 0.816 0.184 0.000 0 NA
#> SRR522081 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522082 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522083 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522084 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522085 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522086 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522087 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522088 5 0.0000 1.000 0.000 0.000 0.000 0.000 1 NA
#> SRR522089 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522090 3 0.0790 0.959 0.000 0.032 0.968 0.000 0 NA
#> SRR522091 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522092 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522093 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522094 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522095 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522096 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522097 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522098 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522099 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522100 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522101 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522102 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522103 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522104 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522105 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522106 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522107 3 0.0000 0.998 0.000 0.000 1.000 0.000 0 NA
#> SRR522108 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522109 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522110 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522111 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522112 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522113 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522114 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522115 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522116 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522117 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522118 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522119 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522120 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522121 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522122 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522123 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522124 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522125 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522126 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522127 2 0.2135 0.981 0.000 0.872 0.128 0.000 0 NA
#> SRR522128 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522129 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522130 2 0.2340 0.989 0.000 0.852 0.148 0.000 0 NA
#> SRR522131 4 0.0363 0.947 0.000 0.000 0.000 0.988 0 NA
#> SRR522132 4 0.0363 0.947 0.000 0.000 0.000 0.988 0 NA
#> SRR522133 4 0.0363 0.947 0.000 0.000 0.000 0.988 0 NA
#> SRR522134 4 0.0363 0.947 0.000 0.000 0.000 0.988 0 NA
#> SRR522135 4 0.0363 0.947 0.000 0.000 0.000 0.988 0 NA
#> SRR522136 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522137 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522138 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522139 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522140 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522141 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522142 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522143 4 0.2697 0.839 0.000 0.000 0.000 0.812 0 NA
#> SRR522144 4 0.0865 0.933 0.000 0.000 0.000 0.964 0 NA
#> SRR522145 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522146 4 0.1141 0.924 0.000 0.000 0.000 0.948 0 NA
#> SRR522147 4 0.2697 0.840 0.000 0.000 0.000 0.812 0 NA
#> SRR522148 4 0.0000 0.949 0.000 0.000 0.000 1.000 0 NA
#> SRR522149 4 0.2697 0.840 0.000 0.000 0.000 0.812 0 NA
#> SRR522150 4 0.3833 0.511 0.000 0.000 0.000 0.556 0 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "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 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.912 0.967 0.957 0.305 0.699 0.699
#> 3 3 0.512 0.752 0.767 0.745 0.728 0.611
#> 4 4 0.529 0.856 0.727 0.253 0.836 0.617
#> 5 5 0.673 0.878 0.828 0.119 0.948 0.802
#> 6 6 0.762 0.810 0.793 0.060 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] 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
#> SRR522063 1 0.4939 1.000 0.892 0.108
#> SRR522064 1 0.4939 1.000 0.892 0.108
#> SRR522065 1 0.4939 1.000 0.892 0.108
#> SRR522066 1 0.4939 1.000 0.892 0.108
#> SRR522067 1 0.4939 1.000 0.892 0.108
#> SRR522068 1 0.4939 1.000 0.892 0.108
#> SRR522069 1 0.4939 1.000 0.892 0.108
#> SRR522070 1 0.4939 1.000 0.892 0.108
#> SRR522071 1 0.4939 1.000 0.892 0.108
#> SRR522072 1 0.4939 1.000 0.892 0.108
#> SRR522073 1 0.4939 1.000 0.892 0.108
#> SRR522074 1 0.4939 1.000 0.892 0.108
#> SRR522075 1 0.4939 1.000 0.892 0.108
#> SRR522076 1 0.4939 1.000 0.892 0.108
#> SRR522077 1 0.4939 1.000 0.892 0.108
#> SRR522078 1 0.4939 1.000 0.892 0.108
#> SRR522079 2 0.0000 0.968 0.000 1.000
#> SRR522080 2 0.0000 0.968 0.000 1.000
#> SRR522081 2 0.0938 0.967 0.012 0.988
#> SRR522082 2 0.0938 0.967 0.012 0.988
#> SRR522083 2 0.0938 0.967 0.012 0.988
#> SRR522084 2 0.0938 0.967 0.012 0.988
#> SRR522085 2 0.0938 0.967 0.012 0.988
#> SRR522086 2 0.0938 0.967 0.012 0.988
#> SRR522087 2 0.0938 0.967 0.012 0.988
#> SRR522088 2 0.0938 0.967 0.012 0.988
#> SRR522089 2 0.1414 0.965 0.020 0.980
#> SRR522090 2 0.1414 0.965 0.020 0.980
#> SRR522091 2 0.1414 0.965 0.020 0.980
#> SRR522092 2 0.1414 0.965 0.020 0.980
#> SRR522093 2 0.1414 0.965 0.020 0.980
#> SRR522094 2 0.1414 0.965 0.020 0.980
#> SRR522095 2 0.1414 0.965 0.020 0.980
#> SRR522096 2 0.1414 0.965 0.020 0.980
#> SRR522097 2 0.1414 0.965 0.020 0.980
#> SRR522098 2 0.1414 0.965 0.020 0.980
#> SRR522099 2 0.1414 0.965 0.020 0.980
#> SRR522100 2 0.1414 0.965 0.020 0.980
#> SRR522101 2 0.1414 0.965 0.020 0.980
#> SRR522102 2 0.1414 0.965 0.020 0.980
#> SRR522103 2 0.1414 0.965 0.020 0.980
#> SRR522104 2 0.1414 0.965 0.020 0.980
#> SRR522105 2 0.1414 0.965 0.020 0.980
#> SRR522106 2 0.1414 0.965 0.020 0.980
#> SRR522107 2 0.1414 0.965 0.020 0.980
#> SRR522108 2 0.0000 0.968 0.000 1.000
#> SRR522109 2 0.0000 0.968 0.000 1.000
#> SRR522110 2 0.0000 0.968 0.000 1.000
#> SRR522111 2 0.0000 0.968 0.000 1.000
#> SRR522112 2 0.0000 0.968 0.000 1.000
#> SRR522113 2 0.0000 0.968 0.000 1.000
#> SRR522114 2 0.0376 0.968 0.004 0.996
#> SRR522115 2 0.0376 0.968 0.004 0.996
#> SRR522116 2 0.0376 0.968 0.004 0.996
#> SRR522117 2 0.0376 0.968 0.004 0.996
#> SRR522118 2 0.0000 0.968 0.000 1.000
#> SRR522119 2 0.0000 0.968 0.000 1.000
#> SRR522120 2 0.0000 0.968 0.000 1.000
#> SRR522121 2 0.0000 0.968 0.000 1.000
#> SRR522122 2 0.0000 0.968 0.000 1.000
#> SRR522123 2 0.0000 0.968 0.000 1.000
#> SRR522124 2 0.0938 0.967 0.012 0.988
#> SRR522125 2 0.0938 0.967 0.012 0.988
#> SRR522126 2 0.0938 0.967 0.012 0.988
#> SRR522127 2 0.0938 0.967 0.012 0.988
#> SRR522128 2 0.0000 0.968 0.000 1.000
#> SRR522129 2 0.0000 0.968 0.000 1.000
#> SRR522130 2 0.0000 0.968 0.000 1.000
#> SRR522131 2 0.3879 0.939 0.076 0.924
#> SRR522132 2 0.3879 0.939 0.076 0.924
#> SRR522133 2 0.3879 0.939 0.076 0.924
#> SRR522134 2 0.3879 0.939 0.076 0.924
#> SRR522135 2 0.3879 0.939 0.076 0.924
#> SRR522136 2 0.3879 0.939 0.076 0.924
#> SRR522137 2 0.3879 0.939 0.076 0.924
#> SRR522138 2 0.3879 0.939 0.076 0.924
#> SRR522139 2 0.3879 0.939 0.076 0.924
#> SRR522140 2 0.3879 0.939 0.076 0.924
#> SRR522141 2 0.3879 0.939 0.076 0.924
#> SRR522142 2 0.3879 0.939 0.076 0.924
#> SRR522143 2 0.3879 0.939 0.076 0.924
#> SRR522144 2 0.3879 0.939 0.076 0.924
#> SRR522145 2 0.3879 0.939 0.076 0.924
#> SRR522146 2 0.3879 0.939 0.076 0.924
#> SRR522147 2 0.3879 0.939 0.076 0.924
#> SRR522148 2 0.3879 0.939 0.076 0.924
#> SRR522149 2 0.3879 0.939 0.076 0.924
#> SRR522150 2 0.3879 0.939 0.076 0.924
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 0.977 1.000 0.000 0.000
#> SRR522064 1 0.000 0.977 1.000 0.000 0.000
#> SRR522065 1 0.000 0.977 1.000 0.000 0.000
#> SRR522066 1 0.288 0.961 0.904 0.096 0.000
#> SRR522067 1 0.000 0.977 1.000 0.000 0.000
#> SRR522068 1 0.000 0.977 1.000 0.000 0.000
#> SRR522069 1 0.000 0.977 1.000 0.000 0.000
#> SRR522070 1 0.288 0.961 0.904 0.096 0.000
#> SRR522071 1 0.000 0.977 1.000 0.000 0.000
#> SRR522072 1 0.000 0.977 1.000 0.000 0.000
#> SRR522073 1 0.288 0.961 0.904 0.096 0.000
#> SRR522074 1 0.288 0.961 0.904 0.096 0.000
#> SRR522075 1 0.000 0.977 1.000 0.000 0.000
#> SRR522076 1 0.288 0.961 0.904 0.096 0.000
#> SRR522077 1 0.000 0.977 1.000 0.000 0.000
#> SRR522078 1 0.288 0.961 0.904 0.096 0.000
#> SRR522079 3 0.601 0.668 0.004 0.332 0.664
#> SRR522080 3 0.601 0.668 0.004 0.332 0.664
#> SRR522081 3 0.648 0.542 0.004 0.448 0.548
#> SRR522082 3 0.648 0.542 0.004 0.448 0.548
#> SRR522083 3 0.648 0.542 0.004 0.448 0.548
#> SRR522084 3 0.648 0.542 0.004 0.448 0.548
#> SRR522085 3 0.648 0.542 0.004 0.448 0.548
#> SRR522086 3 0.648 0.542 0.004 0.448 0.548
#> SRR522087 3 0.648 0.542 0.004 0.448 0.548
#> SRR522088 3 0.648 0.542 0.004 0.448 0.548
#> SRR522089 3 0.103 0.599 0.000 0.024 0.976
#> SRR522090 3 0.175 0.615 0.000 0.048 0.952
#> SRR522091 3 0.103 0.599 0.000 0.024 0.976
#> SRR522092 3 0.103 0.599 0.000 0.024 0.976
#> SRR522093 3 0.103 0.599 0.000 0.024 0.976
#> SRR522094 3 0.103 0.599 0.000 0.024 0.976
#> SRR522095 3 0.103 0.599 0.000 0.024 0.976
#> SRR522096 3 0.103 0.599 0.000 0.024 0.976
#> SRR522097 3 0.103 0.599 0.000 0.024 0.976
#> SRR522098 3 0.103 0.599 0.000 0.024 0.976
#> SRR522099 3 0.103 0.599 0.000 0.024 0.976
#> SRR522100 3 0.103 0.599 0.000 0.024 0.976
#> SRR522101 3 0.103 0.599 0.000 0.024 0.976
#> SRR522102 3 0.103 0.599 0.000 0.024 0.976
#> SRR522103 3 0.103 0.599 0.000 0.024 0.976
#> SRR522104 3 0.103 0.599 0.000 0.024 0.976
#> SRR522105 3 0.103 0.599 0.000 0.024 0.976
#> SRR522106 3 0.103 0.599 0.000 0.024 0.976
#> SRR522107 3 0.103 0.599 0.000 0.024 0.976
#> SRR522108 3 0.596 0.670 0.004 0.324 0.672
#> SRR522109 3 0.596 0.670 0.004 0.324 0.672
#> SRR522110 3 0.596 0.670 0.004 0.324 0.672
#> SRR522111 3 0.596 0.670 0.004 0.324 0.672
#> SRR522112 3 0.596 0.670 0.004 0.324 0.672
#> SRR522113 3 0.596 0.670 0.004 0.324 0.672
#> SRR522114 3 0.596 0.657 0.004 0.324 0.672
#> SRR522115 3 0.596 0.657 0.004 0.324 0.672
#> SRR522116 3 0.596 0.657 0.004 0.324 0.672
#> SRR522117 3 0.596 0.657 0.004 0.324 0.672
#> SRR522118 3 0.596 0.670 0.004 0.324 0.672
#> SRR522119 3 0.596 0.670 0.004 0.324 0.672
#> SRR522120 3 0.596 0.670 0.004 0.324 0.672
#> SRR522121 3 0.596 0.670 0.004 0.324 0.672
#> SRR522122 3 0.596 0.670 0.004 0.324 0.672
#> SRR522123 3 0.596 0.670 0.004 0.324 0.672
#> SRR522124 3 0.598 0.652 0.004 0.328 0.668
#> SRR522125 3 0.598 0.652 0.004 0.328 0.668
#> SRR522126 3 0.598 0.652 0.004 0.328 0.668
#> SRR522127 3 0.598 0.652 0.004 0.328 0.668
#> SRR522128 3 0.596 0.670 0.004 0.324 0.672
#> SRR522129 3 0.596 0.670 0.004 0.324 0.672
#> SRR522130 3 0.596 0.670 0.004 0.324 0.672
#> SRR522131 2 0.522 0.927 0.000 0.740 0.260
#> SRR522132 2 0.522 0.927 0.000 0.740 0.260
#> SRR522133 2 0.522 0.927 0.000 0.740 0.260
#> SRR522134 2 0.522 0.927 0.000 0.740 0.260
#> SRR522135 2 0.522 0.927 0.000 0.740 0.260
#> SRR522136 2 0.559 0.897 0.000 0.696 0.304
#> SRR522137 2 0.559 0.897 0.000 0.696 0.304
#> SRR522138 2 0.506 0.918 0.000 0.756 0.244
#> SRR522139 2 0.559 0.897 0.000 0.696 0.304
#> SRR522140 2 0.559 0.897 0.000 0.696 0.304
#> SRR522141 2 0.559 0.897 0.000 0.696 0.304
#> SRR522142 2 0.559 0.897 0.000 0.696 0.304
#> SRR522143 2 0.522 0.927 0.000 0.740 0.260
#> SRR522144 2 0.522 0.927 0.000 0.740 0.260
#> SRR522145 2 0.559 0.897 0.000 0.696 0.304
#> SRR522146 2 0.522 0.927 0.000 0.740 0.260
#> SRR522147 2 0.522 0.927 0.000 0.740 0.260
#> SRR522148 2 0.559 0.897 0.000 0.696 0.304
#> SRR522149 2 0.522 0.927 0.000 0.740 0.260
#> SRR522150 2 0.522 0.927 0.000 0.740 0.260
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522066 1 0.3505 0.936 0.864 0.000 0.088 0.048
#> SRR522067 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522070 1 0.3521 0.936 0.864 0.000 0.084 0.052
#> SRR522071 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522073 1 0.3521 0.936 0.864 0.000 0.084 0.052
#> SRR522074 1 0.3521 0.936 0.864 0.000 0.084 0.052
#> SRR522075 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522076 1 0.3521 0.936 0.864 0.000 0.084 0.052
#> SRR522077 1 0.0000 0.963 1.000 0.000 0.000 0.000
#> SRR522078 1 0.3521 0.936 0.864 0.000 0.084 0.052
#> SRR522079 2 0.0188 0.776 0.000 0.996 0.000 0.004
#> SRR522080 2 0.0188 0.776 0.000 0.996 0.000 0.004
#> SRR522081 2 0.7382 0.495 0.000 0.516 0.276 0.208
#> SRR522082 2 0.7382 0.495 0.000 0.516 0.276 0.208
#> SRR522083 2 0.7382 0.495 0.000 0.516 0.276 0.208
#> SRR522084 2 0.7373 0.495 0.000 0.516 0.280 0.204
#> SRR522085 2 0.7382 0.495 0.000 0.516 0.276 0.208
#> SRR522086 2 0.7382 0.495 0.000 0.516 0.276 0.208
#> SRR522087 2 0.7373 0.495 0.000 0.516 0.280 0.204
#> SRR522088 2 0.7389 0.495 0.000 0.516 0.272 0.212
#> SRR522089 3 0.6087 0.980 0.000 0.412 0.540 0.048
#> SRR522090 3 0.5771 0.897 0.000 0.460 0.512 0.028
#> SRR522091 3 0.6087 0.980 0.000 0.412 0.540 0.048
#> SRR522092 3 0.6087 0.980 0.000 0.412 0.540 0.048
#> SRR522093 3 0.6087 0.980 0.000 0.412 0.540 0.048
#> SRR522094 3 0.6087 0.980 0.000 0.412 0.540 0.048
#> SRR522095 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522096 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522097 3 0.5942 0.983 0.000 0.412 0.548 0.040
#> SRR522098 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522099 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522100 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522101 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522102 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522103 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522104 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522105 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522106 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522107 3 0.5856 0.987 0.000 0.408 0.556 0.036
#> SRR522108 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522114 2 0.3229 0.741 0.000 0.880 0.048 0.072
#> SRR522115 2 0.3229 0.741 0.000 0.880 0.048 0.072
#> SRR522116 2 0.3229 0.741 0.000 0.880 0.048 0.072
#> SRR522117 2 0.3229 0.741 0.000 0.880 0.048 0.072
#> SRR522118 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522124 2 0.3370 0.738 0.000 0.872 0.048 0.080
#> SRR522125 2 0.3370 0.738 0.000 0.872 0.048 0.080
#> SRR522126 2 0.3370 0.738 0.000 0.872 0.048 0.080
#> SRR522127 2 0.3370 0.738 0.000 0.872 0.048 0.080
#> SRR522128 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.778 0.000 1.000 0.000 0.000
#> SRR522131 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522132 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522133 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522134 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522135 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522136 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522137 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522138 4 0.4072 0.929 0.000 0.252 0.000 0.748
#> SRR522139 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522140 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522141 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522142 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522143 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522144 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522145 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522146 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522147 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522148 4 0.6001 0.899 0.000 0.184 0.128 0.688
#> SRR522149 4 0.4103 0.930 0.000 0.256 0.000 0.744
#> SRR522150 4 0.4103 0.930 0.000 0.256 0.000 0.744
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522064 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522065 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522066 1 0.475 0.867 0.76 0.000 0.040 0.044 0.156
#> SRR522067 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522068 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522069 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522070 1 0.490 0.867 0.76 0.000 0.044 0.064 0.132
#> SRR522071 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522072 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522073 1 0.472 0.867 0.76 0.000 0.036 0.044 0.160
#> SRR522074 1 0.481 0.867 0.76 0.000 0.040 0.052 0.148
#> SRR522075 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522076 1 0.475 0.867 0.76 0.000 0.036 0.048 0.156
#> SRR522077 1 0.000 0.925 1.00 0.000 0.000 0.000 0.000
#> SRR522078 1 0.488 0.867 0.76 0.000 0.044 0.060 0.136
#> SRR522079 2 0.197 0.846 0.00 0.924 0.060 0.004 0.012
#> SRR522080 2 0.197 0.846 0.00 0.924 0.060 0.004 0.012
#> SRR522081 5 0.621 0.994 0.00 0.320 0.048 0.060 0.572
#> SRR522082 5 0.626 0.995 0.00 0.320 0.048 0.064 0.568
#> SRR522083 5 0.626 0.995 0.00 0.320 0.048 0.064 0.568
#> SRR522084 5 0.632 0.994 0.00 0.320 0.052 0.064 0.564
#> SRR522085 5 0.615 0.996 0.00 0.320 0.048 0.056 0.576
#> SRR522086 5 0.615 0.996 0.00 0.320 0.048 0.056 0.576
#> SRR522087 5 0.627 0.995 0.00 0.320 0.052 0.060 0.568
#> SRR522088 5 0.615 0.996 0.00 0.320 0.048 0.056 0.576
#> SRR522089 3 0.388 0.959 0.00 0.116 0.820 0.016 0.048
#> SRR522090 3 0.390 0.956 0.00 0.124 0.816 0.016 0.044
#> SRR522091 3 0.378 0.960 0.00 0.116 0.824 0.012 0.048
#> SRR522092 3 0.378 0.960 0.00 0.116 0.824 0.012 0.048
#> SRR522093 3 0.378 0.960 0.00 0.116 0.824 0.012 0.048
#> SRR522094 3 0.378 0.960 0.00 0.116 0.824 0.012 0.048
#> SRR522095 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522096 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522097 3 0.348 0.967 0.00 0.116 0.840 0.012 0.032
#> SRR522098 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522099 3 0.239 0.976 0.00 0.116 0.880 0.004 0.000
#> SRR522100 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522101 3 0.239 0.976 0.00 0.116 0.880 0.004 0.000
#> SRR522102 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522103 3 0.239 0.976 0.00 0.116 0.880 0.004 0.000
#> SRR522104 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522105 3 0.255 0.976 0.00 0.116 0.876 0.004 0.004
#> SRR522106 3 0.251 0.976 0.00 0.116 0.876 0.000 0.008
#> SRR522107 3 0.239 0.976 0.00 0.116 0.880 0.004 0.000
#> SRR522108 2 0.170 0.853 0.00 0.932 0.060 0.008 0.000
#> SRR522109 2 0.186 0.852 0.00 0.928 0.060 0.008 0.004
#> SRR522110 2 0.170 0.853 0.00 0.932 0.060 0.008 0.000
#> SRR522111 2 0.170 0.853 0.00 0.932 0.060 0.008 0.000
#> SRR522112 2 0.170 0.853 0.00 0.932 0.060 0.008 0.000
#> SRR522113 2 0.170 0.853 0.00 0.932 0.060 0.008 0.000
#> SRR522114 2 0.429 0.640 0.00 0.780 0.016 0.044 0.160
#> SRR522115 2 0.429 0.640 0.00 0.780 0.016 0.044 0.160
#> SRR522116 2 0.429 0.640 0.00 0.780 0.016 0.044 0.160
#> SRR522117 2 0.429 0.640 0.00 0.780 0.016 0.044 0.160
#> SRR522118 2 0.186 0.852 0.00 0.928 0.060 0.008 0.004
#> SRR522119 2 0.186 0.852 0.00 0.928 0.060 0.008 0.004
#> SRR522120 2 0.198 0.852 0.00 0.924 0.060 0.008 0.008
#> SRR522121 2 0.198 0.852 0.00 0.924 0.060 0.008 0.008
#> SRR522122 2 0.198 0.852 0.00 0.924 0.060 0.008 0.008
#> SRR522123 2 0.198 0.852 0.00 0.924 0.060 0.008 0.008
#> SRR522124 2 0.436 0.636 0.00 0.776 0.016 0.048 0.160
#> SRR522125 2 0.436 0.636 0.00 0.776 0.016 0.048 0.160
#> SRR522126 2 0.436 0.636 0.00 0.776 0.016 0.048 0.160
#> SRR522127 2 0.436 0.636 0.00 0.776 0.016 0.048 0.160
#> SRR522128 2 0.186 0.852 0.00 0.928 0.060 0.008 0.004
#> SRR522129 2 0.186 0.852 0.00 0.928 0.060 0.008 0.004
#> SRR522130 2 0.198 0.852 0.00 0.924 0.060 0.008 0.008
#> SRR522131 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522132 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522133 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522134 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522135 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522136 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522137 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522138 4 0.346 0.861 0.00 0.120 0.020 0.840 0.020
#> SRR522139 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522140 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522141 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522142 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522143 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522144 4 0.383 0.865 0.00 0.136 0.024 0.816 0.024
#> SRR522145 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522146 4 0.383 0.865 0.00 0.136 0.024 0.816 0.024
#> SRR522147 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522148 4 0.541 0.804 0.00 0.044 0.116 0.724 0.116
#> SRR522149 4 0.374 0.865 0.00 0.136 0.024 0.820 0.020
#> SRR522150 4 0.391 0.864 0.00 0.136 0.024 0.812 0.028
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522064 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522065 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522066 1 0.4809 0.813 0.692 0.020 0.000 0.000 0.080 NA
#> SRR522067 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522068 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522069 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522070 1 0.5296 0.809 0.684 0.028 0.000 0.012 0.100 NA
#> SRR522071 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522072 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522073 1 0.4862 0.809 0.684 0.020 0.000 0.000 0.080 NA
#> SRR522074 1 0.5044 0.809 0.684 0.024 0.000 0.004 0.084 NA
#> SRR522075 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522076 1 0.4922 0.809 0.684 0.020 0.000 0.000 0.092 NA
#> SRR522077 1 0.0000 0.895 1.000 0.000 0.000 0.000 0.000 NA
#> SRR522078 1 0.5282 0.809 0.684 0.024 0.000 0.016 0.092 NA
#> SRR522079 2 0.3103 0.761 0.000 0.836 0.132 0.004 0.008 NA
#> SRR522080 2 0.3103 0.761 0.000 0.836 0.132 0.004 0.008 NA
#> SRR522081 5 0.4896 0.985 0.000 0.188 0.052 0.040 0.712 NA
#> SRR522082 5 0.5376 0.981 0.000 0.208 0.052 0.040 0.676 NA
#> SRR522083 5 0.5376 0.981 0.000 0.208 0.052 0.040 0.676 NA
#> SRR522084 5 0.5132 0.982 0.000 0.208 0.052 0.040 0.688 NA
#> SRR522085 5 0.4789 0.986 0.000 0.188 0.052 0.040 0.716 NA
#> SRR522086 5 0.4896 0.986 0.000 0.188 0.052 0.040 0.712 NA
#> SRR522087 5 0.4896 0.986 0.000 0.188 0.052 0.040 0.712 NA
#> SRR522088 5 0.4991 0.984 0.000 0.188 0.052 0.040 0.708 NA
#> SRR522089 3 0.1950 0.944 0.000 0.000 0.912 0.000 0.024 NA
#> SRR522090 3 0.2034 0.943 0.000 0.004 0.912 0.000 0.024 NA
#> SRR522091 3 0.1950 0.944 0.000 0.000 0.912 0.000 0.024 NA
#> SRR522092 3 0.1950 0.944 0.000 0.000 0.912 0.000 0.024 NA
#> SRR522093 3 0.1950 0.944 0.000 0.000 0.912 0.000 0.024 NA
#> SRR522094 3 0.1950 0.944 0.000 0.000 0.912 0.000 0.024 NA
#> SRR522095 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522096 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522097 3 0.1480 0.953 0.000 0.000 0.940 0.000 0.020 NA
#> SRR522098 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522099 3 0.0000 0.968 0.000 0.000 1.000 0.000 0.000 NA
#> SRR522100 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522101 3 0.0000 0.968 0.000 0.000 1.000 0.000 0.000 NA
#> SRR522102 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522103 3 0.0000 0.968 0.000 0.000 1.000 0.000 0.000 NA
#> SRR522104 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522105 3 0.0000 0.968 0.000 0.000 1.000 0.000 0.000 NA
#> SRR522106 3 0.0291 0.968 0.000 0.000 0.992 0.000 0.004 NA
#> SRR522107 3 0.0000 0.968 0.000 0.000 1.000 0.000 0.000 NA
#> SRR522108 2 0.3475 0.759 0.000 0.816 0.132 0.008 0.004 NA
#> SRR522109 2 0.3475 0.759 0.000 0.816 0.132 0.008 0.004 NA
#> SRR522110 2 0.3475 0.759 0.000 0.816 0.132 0.008 0.004 NA
#> SRR522111 2 0.3475 0.759 0.000 0.816 0.132 0.008 0.004 NA
#> SRR522112 2 0.3475 0.759 0.000 0.816 0.132 0.008 0.004 NA
#> SRR522113 2 0.3475 0.759 0.000 0.816 0.132 0.008 0.004 NA
#> SRR522114 2 0.7874 0.452 0.000 0.464 0.092 0.104 0.192 NA
#> SRR522115 2 0.7874 0.452 0.000 0.464 0.092 0.104 0.192 NA
#> SRR522116 2 0.7874 0.452 0.000 0.464 0.092 0.104 0.192 NA
#> SRR522117 2 0.7874 0.452 0.000 0.464 0.092 0.104 0.192 NA
#> SRR522118 2 0.2961 0.761 0.000 0.840 0.132 0.008 0.000 NA
#> SRR522119 2 0.2961 0.761 0.000 0.840 0.132 0.008 0.000 NA
#> SRR522120 2 0.3103 0.762 0.000 0.836 0.132 0.008 0.004 NA
#> SRR522121 2 0.3103 0.762 0.000 0.836 0.132 0.008 0.004 NA
#> SRR522122 2 0.3103 0.762 0.000 0.836 0.132 0.008 0.004 NA
#> SRR522123 2 0.3103 0.762 0.000 0.836 0.132 0.008 0.004 NA
#> SRR522124 2 0.7860 0.452 0.000 0.464 0.092 0.104 0.200 NA
#> SRR522125 2 0.7860 0.452 0.000 0.464 0.092 0.104 0.200 NA
#> SRR522126 2 0.7860 0.452 0.000 0.464 0.092 0.104 0.200 NA
#> SRR522127 2 0.7860 0.452 0.000 0.464 0.092 0.104 0.200 NA
#> SRR522128 2 0.2961 0.761 0.000 0.840 0.132 0.008 0.000 NA
#> SRR522129 2 0.2961 0.761 0.000 0.840 0.132 0.008 0.000 NA
#> SRR522130 2 0.2961 0.761 0.000 0.840 0.132 0.008 0.000 NA
#> SRR522131 4 0.1124 0.784 0.000 0.036 0.008 0.956 0.000 NA
#> SRR522132 4 0.1124 0.784 0.000 0.036 0.008 0.956 0.000 NA
#> SRR522133 4 0.1124 0.784 0.000 0.036 0.008 0.956 0.000 NA
#> SRR522134 4 0.1124 0.784 0.000 0.036 0.008 0.956 0.000 NA
#> SRR522135 4 0.1124 0.784 0.000 0.036 0.008 0.956 0.000 NA
#> SRR522136 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522137 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522138 4 0.1226 0.783 0.000 0.040 0.004 0.952 0.000 NA
#> SRR522139 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522140 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522141 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522142 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522143 4 0.1196 0.783 0.000 0.040 0.008 0.952 0.000 NA
#> SRR522144 4 0.1606 0.782 0.000 0.056 0.008 0.932 0.004 NA
#> SRR522145 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522146 4 0.1542 0.783 0.000 0.052 0.008 0.936 0.004 NA
#> SRR522147 4 0.1757 0.782 0.000 0.052 0.008 0.928 0.012 NA
#> SRR522148 4 0.4410 0.677 0.000 0.008 0.012 0.508 0.000 NA
#> SRR522149 4 0.1523 0.783 0.000 0.044 0.008 0.940 0.008 NA
#> SRR522150 4 0.2206 0.777 0.000 0.064 0.008 0.904 0.024 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["CV", "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 13957 rows and 88 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 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.812 0.972 0.982 0.3849 0.599 0.599
#> 3 3 0.674 0.828 0.820 0.5749 0.777 0.627
#> 4 4 1.000 0.999 0.999 0.2150 0.838 0.596
#> 5 5 0.948 0.925 0.959 0.0808 0.948 0.802
#> 6 6 0.939 0.978 0.962 0.0351 0.964 0.832
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] 4 5
There is also optional best \(k\) = 4 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.000 0.935 1.000 0.000
#> SRR522064 1 0.000 0.935 1.000 0.000
#> SRR522065 1 0.000 0.935 1.000 0.000
#> SRR522066 1 0.000 0.935 1.000 0.000
#> SRR522067 1 0.000 0.935 1.000 0.000
#> SRR522068 1 0.000 0.935 1.000 0.000
#> SRR522069 1 0.000 0.935 1.000 0.000
#> SRR522070 1 0.000 0.935 1.000 0.000
#> SRR522071 1 0.000 0.935 1.000 0.000
#> SRR522072 1 0.000 0.935 1.000 0.000
#> SRR522073 1 0.000 0.935 1.000 0.000
#> SRR522074 1 0.000 0.935 1.000 0.000
#> SRR522075 1 0.000 0.935 1.000 0.000
#> SRR522076 1 0.000 0.935 1.000 0.000
#> SRR522077 1 0.000 0.935 1.000 0.000
#> SRR522078 1 0.000 0.935 1.000 0.000
#> SRR522079 2 0.000 0.998 0.000 1.000
#> SRR522080 2 0.000 0.998 0.000 1.000
#> SRR522081 2 0.000 0.998 0.000 1.000
#> SRR522082 2 0.000 0.998 0.000 1.000
#> SRR522083 2 0.000 0.998 0.000 1.000
#> SRR522084 2 0.000 0.998 0.000 1.000
#> SRR522085 2 0.000 0.998 0.000 1.000
#> SRR522086 2 0.000 0.998 0.000 1.000
#> SRR522087 2 0.000 0.998 0.000 1.000
#> SRR522088 2 0.000 0.998 0.000 1.000
#> SRR522089 2 0.000 0.998 0.000 1.000
#> SRR522090 2 0.000 0.998 0.000 1.000
#> SRR522091 2 0.000 0.998 0.000 1.000
#> SRR522092 2 0.000 0.998 0.000 1.000
#> SRR522093 2 0.000 0.998 0.000 1.000
#> SRR522094 2 0.000 0.998 0.000 1.000
#> SRR522095 2 0.000 0.998 0.000 1.000
#> SRR522096 2 0.000 0.998 0.000 1.000
#> SRR522097 2 0.000 0.998 0.000 1.000
#> SRR522098 2 0.000 0.998 0.000 1.000
#> SRR522099 2 0.000 0.998 0.000 1.000
#> SRR522100 2 0.000 0.998 0.000 1.000
#> SRR522101 2 0.000 0.998 0.000 1.000
#> SRR522102 2 0.000 0.998 0.000 1.000
#> SRR522103 2 0.000 0.998 0.000 1.000
#> SRR522104 2 0.000 0.998 0.000 1.000
#> SRR522105 2 0.000 0.998 0.000 1.000
#> SRR522106 2 0.000 0.998 0.000 1.000
#> SRR522107 2 0.000 0.998 0.000 1.000
#> SRR522108 2 0.000 0.998 0.000 1.000
#> SRR522109 2 0.000 0.998 0.000 1.000
#> SRR522110 2 0.000 0.998 0.000 1.000
#> SRR522111 2 0.000 0.998 0.000 1.000
#> SRR522112 2 0.000 0.998 0.000 1.000
#> SRR522113 2 0.000 0.998 0.000 1.000
#> SRR522114 2 0.000 0.998 0.000 1.000
#> SRR522115 2 0.000 0.998 0.000 1.000
#> SRR522116 2 0.000 0.998 0.000 1.000
#> SRR522117 2 0.000 0.998 0.000 1.000
#> SRR522118 2 0.000 0.998 0.000 1.000
#> SRR522119 2 0.000 0.998 0.000 1.000
#> SRR522120 2 0.000 0.998 0.000 1.000
#> SRR522121 2 0.000 0.998 0.000 1.000
#> SRR522122 2 0.000 0.998 0.000 1.000
#> SRR522123 2 0.000 0.998 0.000 1.000
#> SRR522124 2 0.000 0.998 0.000 1.000
#> SRR522125 2 0.000 0.998 0.000 1.000
#> SRR522126 2 0.000 0.998 0.000 1.000
#> SRR522127 2 0.000 0.998 0.000 1.000
#> SRR522128 2 0.000 0.998 0.000 1.000
#> SRR522129 2 0.000 0.998 0.000 1.000
#> SRR522130 2 0.000 0.998 0.000 1.000
#> SRR522131 2 0.000 0.998 0.000 1.000
#> SRR522132 2 0.000 0.998 0.000 1.000
#> SRR522133 2 0.000 0.998 0.000 1.000
#> SRR522134 2 0.000 0.998 0.000 1.000
#> SRR522135 2 0.000 0.998 0.000 1.000
#> SRR522136 1 0.680 0.847 0.820 0.180
#> SRR522137 1 0.680 0.847 0.820 0.180
#> SRR522138 2 0.482 0.873 0.104 0.896
#> SRR522139 1 0.680 0.847 0.820 0.180
#> SRR522140 1 0.680 0.847 0.820 0.180
#> SRR522141 1 0.680 0.847 0.820 0.180
#> SRR522142 1 0.680 0.847 0.820 0.180
#> SRR522143 2 0.000 0.998 0.000 1.000
#> SRR522144 2 0.000 0.998 0.000 1.000
#> SRR522145 1 0.680 0.847 0.820 0.180
#> SRR522146 2 0.000 0.998 0.000 1.000
#> SRR522147 2 0.000 0.998 0.000 1.000
#> SRR522148 1 0.680 0.847 0.820 0.180
#> SRR522149 2 0.000 0.998 0.000 1.000
#> SRR522150 2 0.000 0.998 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522064 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522065 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522066 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522067 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522068 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522069 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522070 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522071 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522072 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522073 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522074 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522075 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522076 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522077 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522078 1 0.0000 0.875 1.000 0.000 0.000
#> SRR522079 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522080 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522081 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522082 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522083 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522084 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522085 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522086 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522087 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522088 2 0.1163 0.808 0.000 0.972 0.028
#> SRR522089 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522090 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522091 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522092 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522093 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522094 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522095 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522096 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522097 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522098 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522099 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522100 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522101 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522102 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522103 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522104 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522105 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522106 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522107 3 0.6045 1.000 0.000 0.380 0.620
#> SRR522108 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522109 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522110 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522111 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522112 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522113 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522114 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522115 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522116 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522117 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522118 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522119 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522120 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522121 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522122 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522123 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522124 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522125 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522126 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522127 2 0.0000 0.813 0.000 1.000 0.000
#> SRR522128 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522129 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522130 2 0.0237 0.812 0.000 0.996 0.004
#> SRR522131 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522132 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522133 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522134 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522135 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522136 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522137 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522138 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522139 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522140 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522141 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522142 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522143 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522144 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522145 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522146 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522147 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522148 1 0.6584 0.738 0.608 0.012 0.380
#> SRR522149 2 0.6045 0.598 0.000 0.620 0.380
#> SRR522150 2 0.6045 0.598 0.000 0.620 0.380
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522079 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522080 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522081 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522082 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522083 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522084 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522085 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522086 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522087 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522088 2 0.0188 0.994 0 0.996 0.000 0.004
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522108 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522109 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522110 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522111 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522112 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522113 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522114 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522115 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522116 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522117 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522118 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522119 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522120 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522121 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522122 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522123 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522124 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522125 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522126 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522127 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522128 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522129 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522130 2 0.0188 0.998 0 0.996 0.004 0.000
#> SRR522131 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522132 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522133 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522134 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522135 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522136 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522137 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522138 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522139 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522140 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522141 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522142 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522143 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522144 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522145 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522146 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522147 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522148 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522149 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522150 4 0.0000 1.000 0 0.000 0.000 1.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522079 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522080 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522081 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522082 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522083 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522084 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522085 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522086 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522087 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522088 5 0.0880 1.000 0 0.032 0 0.000 0.968
#> SRR522089 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522108 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522109 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522110 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522111 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522112 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522113 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522114 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522115 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522116 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522117 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522118 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522119 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522120 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522121 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522122 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522123 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522124 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522125 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522126 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522127 2 0.4219 0.513 0 0.584 0 0.000 0.416
#> SRR522128 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522129 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522130 2 0.0000 0.842 0 1.000 0 0.000 0.000
#> SRR522131 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522132 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522133 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522134 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522135 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522136 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522137 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522138 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522139 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522140 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522141 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522142 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522143 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522144 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522145 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522146 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522147 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522148 4 0.0000 0.997 0 0.000 0 1.000 0.000
#> SRR522149 4 0.0162 0.998 0 0.000 0 0.996 0.004
#> SRR522150 4 0.0162 0.998 0 0.000 0 0.996 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522071 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522074 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522075 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522077 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0146 0.998 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522079 2 0.0146 0.996 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR522080 2 0.0146 0.996 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR522081 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522082 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522083 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522084 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522085 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522086 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522087 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522088 5 0.1753 1.000 0.000 0.004 0.000 0.000 0.912 0.084
#> SRR522089 3 0.0520 0.991 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR522090 3 0.0520 0.991 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR522091 3 0.0520 0.991 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR522092 3 0.0520 0.991 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR522093 3 0.0520 0.991 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR522094 3 0.0520 0.991 0.000 0.000 0.984 0.000 0.008 0.008
#> SRR522095 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0405 0.992 0.000 0.000 0.988 0.000 0.008 0.004
#> SRR522098 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0260 0.995 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR522109 2 0.0260 0.995 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR522110 2 0.0260 0.995 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR522111 2 0.0260 0.995 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR522112 2 0.0260 0.995 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR522113 2 0.0260 0.995 0.000 0.992 0.000 0.000 0.008 0.000
#> SRR522114 6 0.2006 0.993 0.000 0.104 0.000 0.000 0.004 0.892
#> SRR522115 6 0.1863 0.994 0.000 0.104 0.000 0.000 0.000 0.896
#> SRR522116 6 0.2006 0.993 0.000 0.104 0.000 0.000 0.004 0.892
#> SRR522117 6 0.2006 0.993 0.000 0.104 0.000 0.000 0.004 0.892
#> SRR522118 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522124 6 0.1958 0.994 0.000 0.100 0.000 0.004 0.000 0.896
#> SRR522125 6 0.1958 0.994 0.000 0.100 0.000 0.004 0.000 0.896
#> SRR522126 6 0.1958 0.994 0.000 0.100 0.000 0.004 0.000 0.896
#> SRR522127 6 0.1958 0.994 0.000 0.100 0.000 0.004 0.000 0.896
#> SRR522128 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.997 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522131 4 0.0935 0.926 0.000 0.000 0.000 0.964 0.004 0.032
#> SRR522132 4 0.0632 0.928 0.000 0.000 0.000 0.976 0.000 0.024
#> SRR522133 4 0.0777 0.927 0.000 0.000 0.000 0.972 0.004 0.024
#> SRR522134 4 0.0858 0.927 0.000 0.000 0.000 0.968 0.004 0.028
#> SRR522135 4 0.0858 0.927 0.000 0.000 0.000 0.968 0.004 0.028
#> SRR522136 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522137 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522138 4 0.0291 0.925 0.000 0.000 0.000 0.992 0.004 0.004
#> SRR522139 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522140 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522141 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522142 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522143 4 0.0858 0.927 0.000 0.000 0.000 0.968 0.004 0.028
#> SRR522144 4 0.0632 0.927 0.000 0.000 0.000 0.976 0.000 0.024
#> SRR522145 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522146 4 0.0935 0.926 0.000 0.000 0.000 0.964 0.004 0.032
#> SRR522147 4 0.0858 0.927 0.000 0.000 0.000 0.968 0.004 0.028
#> SRR522148 4 0.3017 0.896 0.000 0.000 0.000 0.844 0.072 0.084
#> SRR522149 4 0.0935 0.926 0.000 0.000 0.000 0.964 0.004 0.032
#> SRR522150 4 0.0790 0.927 0.000 0.000 0.000 0.968 0.000 0.032
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 13957 rows and 88 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 1.000 1.000 1.000 0.3016 0.699 0.699
#> 3 3 0.694 0.772 0.906 1.0435 0.671 0.529
#> 4 4 0.972 0.931 0.974 0.2003 0.766 0.459
#> 5 5 0.884 0.786 0.898 0.0527 0.925 0.721
#> 6 6 0.954 0.853 0.913 0.0425 0.969 0.855
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 4
There is also optional best \(k\) = 2 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
#> SRR522063 1 0 1 1 0
#> SRR522064 1 0 1 1 0
#> SRR522065 1 0 1 1 0
#> SRR522066 1 0 1 1 0
#> SRR522067 1 0 1 1 0
#> SRR522068 1 0 1 1 0
#> SRR522069 1 0 1 1 0
#> SRR522070 1 0 1 1 0
#> SRR522071 1 0 1 1 0
#> SRR522072 1 0 1 1 0
#> SRR522073 1 0 1 1 0
#> SRR522074 1 0 1 1 0
#> SRR522075 1 0 1 1 0
#> SRR522076 1 0 1 1 0
#> SRR522077 1 0 1 1 0
#> SRR522078 1 0 1 1 0
#> SRR522079 2 0 1 0 1
#> SRR522080 2 0 1 0 1
#> SRR522081 2 0 1 0 1
#> SRR522082 2 0 1 0 1
#> SRR522083 2 0 1 0 1
#> SRR522084 2 0 1 0 1
#> SRR522085 2 0 1 0 1
#> SRR522086 2 0 1 0 1
#> SRR522087 2 0 1 0 1
#> SRR522088 2 0 1 0 1
#> SRR522089 2 0 1 0 1
#> SRR522090 2 0 1 0 1
#> SRR522091 2 0 1 0 1
#> SRR522092 2 0 1 0 1
#> SRR522093 2 0 1 0 1
#> SRR522094 2 0 1 0 1
#> SRR522095 2 0 1 0 1
#> SRR522096 2 0 1 0 1
#> SRR522097 2 0 1 0 1
#> SRR522098 2 0 1 0 1
#> SRR522099 2 0 1 0 1
#> SRR522100 2 0 1 0 1
#> SRR522101 2 0 1 0 1
#> SRR522102 2 0 1 0 1
#> SRR522103 2 0 1 0 1
#> SRR522104 2 0 1 0 1
#> SRR522105 2 0 1 0 1
#> SRR522106 2 0 1 0 1
#> SRR522107 2 0 1 0 1
#> SRR522108 2 0 1 0 1
#> SRR522109 2 0 1 0 1
#> SRR522110 2 0 1 0 1
#> SRR522111 2 0 1 0 1
#> SRR522112 2 0 1 0 1
#> SRR522113 2 0 1 0 1
#> SRR522114 2 0 1 0 1
#> SRR522115 2 0 1 0 1
#> SRR522116 2 0 1 0 1
#> SRR522117 2 0 1 0 1
#> SRR522118 2 0 1 0 1
#> SRR522119 2 0 1 0 1
#> SRR522120 2 0 1 0 1
#> SRR522121 2 0 1 0 1
#> SRR522122 2 0 1 0 1
#> SRR522123 2 0 1 0 1
#> SRR522124 2 0 1 0 1
#> SRR522125 2 0 1 0 1
#> SRR522126 2 0 1 0 1
#> SRR522127 2 0 1 0 1
#> SRR522128 2 0 1 0 1
#> SRR522129 2 0 1 0 1
#> SRR522130 2 0 1 0 1
#> SRR522131 2 0 1 0 1
#> SRR522132 2 0 1 0 1
#> SRR522133 2 0 1 0 1
#> SRR522134 2 0 1 0 1
#> SRR522135 2 0 1 0 1
#> SRR522136 2 0 1 0 1
#> SRR522137 2 0 1 0 1
#> SRR522138 2 0 1 0 1
#> SRR522139 2 0 1 0 1
#> SRR522140 2 0 1 0 1
#> SRR522141 2 0 1 0 1
#> SRR522142 2 0 1 0 1
#> SRR522143 2 0 1 0 1
#> SRR522144 2 0 1 0 1
#> SRR522145 2 0 1 0 1
#> SRR522146 2 0 1 0 1
#> SRR522147 2 0 1 0 1
#> SRR522148 2 0 1 0 1
#> SRR522149 2 0 1 0 1
#> SRR522150 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 1.000 1 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000
#> SRR522079 3 0.0000 0.881 0 0.000 1.000
#> SRR522080 3 0.0000 0.881 0 0.000 1.000
#> SRR522081 2 0.2878 0.813 0 0.904 0.096
#> SRR522082 2 0.3116 0.807 0 0.892 0.108
#> SRR522083 2 0.4121 0.772 0 0.832 0.168
#> SRR522084 2 0.6244 0.334 0 0.560 0.440
#> SRR522085 2 0.4178 0.769 0 0.828 0.172
#> SRR522086 2 0.4346 0.760 0 0.816 0.184
#> SRR522087 2 0.4702 0.734 0 0.788 0.212
#> SRR522088 2 0.4346 0.761 0 0.816 0.184
#> SRR522089 3 0.0000 0.881 0 0.000 1.000
#> SRR522090 3 0.0000 0.881 0 0.000 1.000
#> SRR522091 3 0.0000 0.881 0 0.000 1.000
#> SRR522092 3 0.0000 0.881 0 0.000 1.000
#> SRR522093 3 0.0000 0.881 0 0.000 1.000
#> SRR522094 3 0.0000 0.881 0 0.000 1.000
#> SRR522095 3 0.0000 0.881 0 0.000 1.000
#> SRR522096 3 0.0000 0.881 0 0.000 1.000
#> SRR522097 3 0.0000 0.881 0 0.000 1.000
#> SRR522098 3 0.0000 0.881 0 0.000 1.000
#> SRR522099 3 0.0000 0.881 0 0.000 1.000
#> SRR522100 3 0.0000 0.881 0 0.000 1.000
#> SRR522101 3 0.0000 0.881 0 0.000 1.000
#> SRR522102 3 0.0000 0.881 0 0.000 1.000
#> SRR522103 3 0.0000 0.881 0 0.000 1.000
#> SRR522104 3 0.0000 0.881 0 0.000 1.000
#> SRR522105 3 0.0000 0.881 0 0.000 1.000
#> SRR522106 3 0.0000 0.881 0 0.000 1.000
#> SRR522107 3 0.0000 0.881 0 0.000 1.000
#> SRR522108 3 0.6079 0.242 0 0.388 0.612
#> SRR522109 3 0.6302 -0.097 0 0.480 0.520
#> SRR522110 2 0.5058 0.698 0 0.756 0.244
#> SRR522111 2 0.5733 0.585 0 0.676 0.324
#> SRR522112 3 0.5098 0.587 0 0.248 0.752
#> SRR522113 2 0.6267 0.299 0 0.548 0.452
#> SRR522114 2 0.4346 0.760 0 0.816 0.184
#> SRR522115 3 0.3879 0.746 0 0.152 0.848
#> SRR522116 2 0.6308 0.164 0 0.508 0.492
#> SRR522117 3 0.6252 0.057 0 0.444 0.556
#> SRR522118 2 0.6154 0.418 0 0.592 0.408
#> SRR522119 3 0.6215 0.120 0 0.428 0.572
#> SRR522120 3 0.6215 0.115 0 0.428 0.572
#> SRR522121 2 0.5968 0.513 0 0.636 0.364
#> SRR522122 2 0.6126 0.437 0 0.600 0.400
#> SRR522123 2 0.6309 0.130 0 0.500 0.500
#> SRR522124 2 0.0747 0.835 0 0.984 0.016
#> SRR522125 2 0.0237 0.837 0 0.996 0.004
#> SRR522126 2 0.2625 0.817 0 0.916 0.084
#> SRR522127 2 0.2878 0.812 0 0.904 0.096
#> SRR522128 3 0.1964 0.839 0 0.056 0.944
#> SRR522129 3 0.2356 0.825 0 0.072 0.928
#> SRR522130 2 0.6299 0.222 0 0.524 0.476
#> SRR522131 2 0.0000 0.838 0 1.000 0.000
#> SRR522132 2 0.0000 0.838 0 1.000 0.000
#> SRR522133 2 0.0000 0.838 0 1.000 0.000
#> SRR522134 2 0.0000 0.838 0 1.000 0.000
#> SRR522135 2 0.0000 0.838 0 1.000 0.000
#> SRR522136 2 0.0000 0.838 0 1.000 0.000
#> SRR522137 2 0.0000 0.838 0 1.000 0.000
#> SRR522138 2 0.0000 0.838 0 1.000 0.000
#> SRR522139 2 0.0000 0.838 0 1.000 0.000
#> SRR522140 2 0.0000 0.838 0 1.000 0.000
#> SRR522141 2 0.0000 0.838 0 1.000 0.000
#> SRR522142 2 0.0000 0.838 0 1.000 0.000
#> SRR522143 2 0.0000 0.838 0 1.000 0.000
#> SRR522144 2 0.0000 0.838 0 1.000 0.000
#> SRR522145 2 0.0000 0.838 0 1.000 0.000
#> SRR522146 2 0.0000 0.838 0 1.000 0.000
#> SRR522147 2 0.0000 0.838 0 1.000 0.000
#> SRR522148 2 0.0000 0.838 0 1.000 0.000
#> SRR522149 2 0.0000 0.838 0 1.000 0.000
#> SRR522150 2 0.0000 0.838 0 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522079 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522080 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522081 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522082 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522083 2 0.0469 0.941 0 0.988 0.000 0.012
#> SRR522084 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522085 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522086 2 0.0336 0.944 0 0.992 0.000 0.008
#> SRR522087 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522088 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522090 2 0.4989 0.105 0 0.528 0.472 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522114 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522115 2 0.5495 0.425 0 0.624 0.028 0.348
#> SRR522116 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522117 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522118 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522121 2 0.3610 0.740 0 0.800 0.000 0.200
#> SRR522122 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522124 4 0.4955 0.168 0 0.444 0.000 0.556
#> SRR522125 4 0.4830 0.326 0 0.392 0.000 0.608
#> SRR522126 2 0.4072 0.659 0 0.748 0.000 0.252
#> SRR522127 2 0.3074 0.801 0 0.848 0.000 0.152
#> SRR522128 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.950 0 1.000 0.000 0.000
#> SRR522131 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522132 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522133 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522134 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522135 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522136 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522137 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522138 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522139 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522140 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522141 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522142 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522143 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522144 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522145 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522146 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522147 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522148 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522149 4 0.0000 0.952 0 0.000 0.000 1.000
#> SRR522150 4 0.0000 0.952 0 0.000 0.000 1.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.0000 1 0.000 0.000 0.000 0.000
#> SRR522079 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522080 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522081 2 0.0000 0.6392 0 1.000 0.000 0.000 0.000
#> SRR522082 2 0.0000 0.6392 0 1.000 0.000 0.000 0.000
#> SRR522083 2 0.0404 0.6266 0 0.988 0.000 0.012 0.000
#> SRR522084 2 0.0162 0.6413 0 0.996 0.000 0.000 0.004
#> SRR522085 2 0.0000 0.6392 0 1.000 0.000 0.000 0.000
#> SRR522086 2 0.0290 0.6313 0 0.992 0.000 0.008 0.000
#> SRR522087 2 0.0000 0.6392 0 1.000 0.000 0.000 0.000
#> SRR522088 2 0.0000 0.6392 0 1.000 0.000 0.000 0.000
#> SRR522089 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.4562 -0.0866 0 0.492 0.500 0.000 0.008
#> SRR522091 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.9663 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522109 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522110 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522111 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522112 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522113 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522114 2 0.4283 0.2513 0 0.544 0.000 0.000 0.456
#> SRR522115 2 0.7403 -0.1683 0 0.400 0.040 0.348 0.212
#> SRR522116 5 0.4227 -0.0189 0 0.420 0.000 0.000 0.580
#> SRR522117 2 0.4390 0.3165 0 0.568 0.004 0.000 0.428
#> SRR522118 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522119 2 0.3305 0.7199 0 0.776 0.000 0.000 0.224
#> SRR522120 5 0.4304 0.0415 0 0.484 0.000 0.000 0.516
#> SRR522121 5 0.4653 0.0571 0 0.472 0.000 0.012 0.516
#> SRR522122 5 0.4304 0.0415 0 0.484 0.000 0.000 0.516
#> SRR522123 5 0.4304 0.0415 0 0.484 0.000 0.000 0.516
#> SRR522124 5 0.4161 0.3929 0 0.016 0.000 0.280 0.704
#> SRR522125 5 0.4184 0.3850 0 0.016 0.000 0.284 0.700
#> SRR522126 5 0.4871 0.4126 0 0.084 0.000 0.212 0.704
#> SRR522127 5 0.5048 0.3804 0 0.152 0.000 0.144 0.704
#> SRR522128 2 0.3395 0.7068 0 0.764 0.000 0.000 0.236
#> SRR522129 2 0.3424 0.7017 0 0.760 0.000 0.000 0.240
#> SRR522130 5 0.4304 0.0415 0 0.484 0.000 0.000 0.516
#> SRR522131 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522132 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522133 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522134 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522135 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522137 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522139 4 0.0162 0.9970 0 0.000 0.000 0.996 0.004
#> SRR522140 4 0.0162 0.9970 0 0.000 0.000 0.996 0.004
#> SRR522141 4 0.0162 0.9970 0 0.000 0.000 0.996 0.004
#> SRR522142 4 0.0162 0.9970 0 0.000 0.000 0.996 0.004
#> SRR522143 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522145 4 0.0162 0.9970 0 0.000 0.000 0.996 0.004
#> SRR522146 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522148 4 0.0162 0.9970 0 0.000 0.000 0.996 0.004
#> SRR522149 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
#> SRR522150 4 0.0000 0.9987 0 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522079 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522080 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522081 5 0.3899 0.659 0 0.364 0.000 0.000 0.628 0.008
#> SRR522082 5 0.3899 0.659 0 0.364 0.000 0.000 0.628 0.008
#> SRR522083 5 0.4231 0.646 0 0.364 0.000 0.012 0.616 0.008
#> SRR522084 5 0.3861 0.664 0 0.352 0.000 0.000 0.640 0.008
#> SRR522085 5 0.3899 0.659 0 0.364 0.000 0.000 0.628 0.008
#> SRR522086 5 0.4138 0.651 0 0.364 0.000 0.008 0.620 0.008
#> SRR522087 5 0.3899 0.659 0 0.364 0.000 0.000 0.628 0.008
#> SRR522088 5 0.3899 0.659 0 0.364 0.000 0.000 0.628 0.008
#> SRR522089 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.3864 -0.037 0 0.000 0.520 0.000 0.480 0.000
#> SRR522091 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.966 0 0.000 1.000 0.000 0.000 0.000
#> SRR522108 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522109 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522110 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522111 5 0.0146 0.751 0 0.004 0.000 0.000 0.996 0.000
#> SRR522112 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522113 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522114 6 0.3737 0.464 0 0.000 0.000 0.000 0.392 0.608
#> SRR522115 4 0.6655 -0.400 0 0.000 0.028 0.348 0.288 0.336
#> SRR522116 6 0.3330 0.623 0 0.000 0.000 0.000 0.284 0.716
#> SRR522117 6 0.3838 0.319 0 0.000 0.000 0.000 0.448 0.552
#> SRR522118 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522119 5 0.0000 0.755 0 0.000 0.000 0.000 1.000 0.000
#> SRR522120 2 0.3672 1.000 0 0.632 0.000 0.000 0.368 0.000
#> SRR522121 2 0.3672 1.000 0 0.632 0.000 0.000 0.368 0.000
#> SRR522122 2 0.3672 1.000 0 0.632 0.000 0.000 0.368 0.000
#> SRR522123 2 0.3672 1.000 0 0.632 0.000 0.000 0.368 0.000
#> SRR522124 6 0.1866 0.723 0 0.000 0.000 0.084 0.008 0.908
#> SRR522125 6 0.1866 0.723 0 0.000 0.000 0.084 0.008 0.908
#> SRR522126 6 0.1866 0.723 0 0.000 0.000 0.084 0.008 0.908
#> SRR522127 6 0.2030 0.723 0 0.000 0.000 0.064 0.028 0.908
#> SRR522128 5 0.0260 0.749 0 0.008 0.000 0.000 0.992 0.000
#> SRR522129 5 0.1075 0.695 0 0.048 0.000 0.000 0.952 0.000
#> SRR522130 2 0.3672 1.000 0 0.632 0.000 0.000 0.368 0.000
#> SRR522131 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522132 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522133 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522134 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522135 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522136 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522137 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522138 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522139 4 0.1753 0.901 0 0.004 0.000 0.912 0.000 0.084
#> SRR522140 4 0.1753 0.901 0 0.004 0.000 0.912 0.000 0.084
#> SRR522141 4 0.1753 0.901 0 0.004 0.000 0.912 0.000 0.084
#> SRR522142 4 0.1753 0.901 0 0.004 0.000 0.912 0.000 0.084
#> SRR522143 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522144 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522145 4 0.1753 0.901 0 0.004 0.000 0.912 0.000 0.084
#> SRR522146 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522147 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522148 4 0.1753 0.901 0 0.004 0.000 0.912 0.000 0.084
#> SRR522149 4 0.0000 0.938 0 0.000 0.000 1.000 0.000 0.000
#> SRR522150 4 0.0000 0.938 0 0.000 0.000 1.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["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 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'mclust' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.985 0.985 0.4754 0.515 0.515
#> 3 3 0.911 0.940 0.959 0.2277 0.921 0.846
#> 4 4 1.000 0.994 0.997 0.2628 0.828 0.605
#> 5 5 0.946 0.944 0.966 0.0456 0.975 0.905
#> 6 6 0.954 0.932 0.945 0.0271 0.984 0.934
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 4 5
There is also optional best \(k\) = 2 3 4 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.0000 0.966 1.000 0.000
#> SRR522064 1 0.0000 0.966 1.000 0.000
#> SRR522065 1 0.0000 0.966 1.000 0.000
#> SRR522066 1 0.0000 0.966 1.000 0.000
#> SRR522067 1 0.0000 0.966 1.000 0.000
#> SRR522068 1 0.0000 0.966 1.000 0.000
#> SRR522069 1 0.0000 0.966 1.000 0.000
#> SRR522070 1 0.0000 0.966 1.000 0.000
#> SRR522071 1 0.0000 0.966 1.000 0.000
#> SRR522072 1 0.0000 0.966 1.000 0.000
#> SRR522073 1 0.0000 0.966 1.000 0.000
#> SRR522074 1 0.0000 0.966 1.000 0.000
#> SRR522075 1 0.0000 0.966 1.000 0.000
#> SRR522076 1 0.0000 0.966 1.000 0.000
#> SRR522077 1 0.0000 0.966 1.000 0.000
#> SRR522078 1 0.0000 0.966 1.000 0.000
#> SRR522079 2 0.0000 0.997 0.000 1.000
#> SRR522080 2 0.0000 0.997 0.000 1.000
#> SRR522081 2 0.0000 0.997 0.000 1.000
#> SRR522082 2 0.0000 0.997 0.000 1.000
#> SRR522083 2 0.0000 0.997 0.000 1.000
#> SRR522084 2 0.0000 0.997 0.000 1.000
#> SRR522085 2 0.0000 0.997 0.000 1.000
#> SRR522086 2 0.0000 0.997 0.000 1.000
#> SRR522087 2 0.0000 0.997 0.000 1.000
#> SRR522088 2 0.0000 0.997 0.000 1.000
#> SRR522089 1 0.3274 0.970 0.940 0.060
#> SRR522090 1 0.4690 0.932 0.900 0.100
#> SRR522091 1 0.3274 0.970 0.940 0.060
#> SRR522092 1 0.3274 0.970 0.940 0.060
#> SRR522093 1 0.3274 0.970 0.940 0.060
#> SRR522094 1 0.3274 0.970 0.940 0.060
#> SRR522095 1 0.3274 0.970 0.940 0.060
#> SRR522096 1 0.3274 0.970 0.940 0.060
#> SRR522097 1 0.3274 0.970 0.940 0.060
#> SRR522098 1 0.3274 0.970 0.940 0.060
#> SRR522099 1 0.3274 0.970 0.940 0.060
#> SRR522100 1 0.3274 0.970 0.940 0.060
#> SRR522101 1 0.3274 0.970 0.940 0.060
#> SRR522102 1 0.3274 0.970 0.940 0.060
#> SRR522103 1 0.3274 0.970 0.940 0.060
#> SRR522104 1 0.3274 0.970 0.940 0.060
#> SRR522105 1 0.3274 0.970 0.940 0.060
#> SRR522106 1 0.3274 0.970 0.940 0.060
#> SRR522107 1 0.3274 0.970 0.940 0.060
#> SRR522108 2 0.0000 0.997 0.000 1.000
#> SRR522109 2 0.0000 0.997 0.000 1.000
#> SRR522110 2 0.0000 0.997 0.000 1.000
#> SRR522111 2 0.0000 0.997 0.000 1.000
#> SRR522112 2 0.0000 0.997 0.000 1.000
#> SRR522113 2 0.0000 0.997 0.000 1.000
#> SRR522114 2 0.0000 0.997 0.000 1.000
#> SRR522115 2 0.0000 0.997 0.000 1.000
#> SRR522116 2 0.0000 0.997 0.000 1.000
#> SRR522117 2 0.0000 0.997 0.000 1.000
#> SRR522118 2 0.0000 0.997 0.000 1.000
#> SRR522119 2 0.0000 0.997 0.000 1.000
#> SRR522120 2 0.0000 0.997 0.000 1.000
#> SRR522121 2 0.0000 0.997 0.000 1.000
#> SRR522122 2 0.0000 0.997 0.000 1.000
#> SRR522123 2 0.0000 0.997 0.000 1.000
#> SRR522124 2 0.0000 0.997 0.000 1.000
#> SRR522125 2 0.0000 0.997 0.000 1.000
#> SRR522126 2 0.0000 0.997 0.000 1.000
#> SRR522127 2 0.0000 0.997 0.000 1.000
#> SRR522128 2 0.0000 0.997 0.000 1.000
#> SRR522129 2 0.0000 0.997 0.000 1.000
#> SRR522130 2 0.0000 0.997 0.000 1.000
#> SRR522131 2 0.0672 0.995 0.008 0.992
#> SRR522132 2 0.0672 0.995 0.008 0.992
#> SRR522133 2 0.0672 0.995 0.008 0.992
#> SRR522134 2 0.0672 0.995 0.008 0.992
#> SRR522135 2 0.0672 0.995 0.008 0.992
#> SRR522136 2 0.0672 0.995 0.008 0.992
#> SRR522137 2 0.0672 0.995 0.008 0.992
#> SRR522138 2 0.0672 0.995 0.008 0.992
#> SRR522139 2 0.0672 0.995 0.008 0.992
#> SRR522140 2 0.0672 0.995 0.008 0.992
#> SRR522141 2 0.0672 0.995 0.008 0.992
#> SRR522142 2 0.0672 0.995 0.008 0.992
#> SRR522143 2 0.0672 0.995 0.008 0.992
#> SRR522144 2 0.0672 0.995 0.008 0.992
#> SRR522145 2 0.0672 0.995 0.008 0.992
#> SRR522146 2 0.0672 0.995 0.008 0.992
#> SRR522147 2 0.0672 0.995 0.008 0.992
#> SRR522148 2 0.0672 0.995 0.008 0.992
#> SRR522149 2 0.0672 0.995 0.008 0.992
#> SRR522150 2 0.0376 0.996 0.004 0.996
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522079 2 0.5138 0.721 0.000 0.748 0.252
#> SRR522080 2 0.5138 0.721 0.000 0.748 0.252
#> SRR522081 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522082 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522083 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522084 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522085 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522086 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522087 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522088 2 0.0424 0.930 0.000 0.992 0.008
#> SRR522089 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522090 3 0.0424 0.990 0.000 0.008 0.992
#> SRR522091 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522092 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522093 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522094 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522095 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522096 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522097 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522098 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522099 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522100 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522101 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522102 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522103 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522104 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522105 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522106 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522107 3 0.0000 0.999 0.000 0.000 1.000
#> SRR522108 2 0.1163 0.929 0.000 0.972 0.028
#> SRR522109 2 0.2066 0.920 0.000 0.940 0.060
#> SRR522110 2 0.1643 0.925 0.000 0.956 0.044
#> SRR522111 2 0.1411 0.927 0.000 0.964 0.036
#> SRR522112 2 0.1860 0.923 0.000 0.948 0.052
#> SRR522113 2 0.1529 0.927 0.000 0.960 0.040
#> SRR522114 2 0.4291 0.812 0.000 0.820 0.180
#> SRR522115 2 0.5327 0.695 0.000 0.728 0.272
#> SRR522116 2 0.5363 0.685 0.000 0.724 0.276
#> SRR522117 2 0.5431 0.672 0.000 0.716 0.284
#> SRR522118 2 0.1964 0.921 0.000 0.944 0.056
#> SRR522119 2 0.1163 0.930 0.000 0.972 0.028
#> SRR522120 2 0.2711 0.902 0.000 0.912 0.088
#> SRR522121 2 0.2356 0.913 0.000 0.928 0.072
#> SRR522122 2 0.1964 0.921 0.000 0.944 0.056
#> SRR522123 2 0.2711 0.902 0.000 0.912 0.088
#> SRR522124 2 0.0424 0.931 0.000 0.992 0.008
#> SRR522125 2 0.0424 0.931 0.000 0.992 0.008
#> SRR522126 2 0.0592 0.931 0.000 0.988 0.012
#> SRR522127 2 0.1031 0.930 0.000 0.976 0.024
#> SRR522128 2 0.1753 0.924 0.000 0.952 0.048
#> SRR522129 2 0.2066 0.919 0.000 0.940 0.060
#> SRR522130 2 0.2448 0.910 0.000 0.924 0.076
#> SRR522131 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522132 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522133 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522134 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522135 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522136 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522137 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522138 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522139 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522140 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522141 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522142 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522143 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522144 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522145 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522146 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522147 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522148 2 0.2165 0.921 0.064 0.936 0.000
#> SRR522149 2 0.1964 0.924 0.056 0.944 0.000
#> SRR522150 2 0.1964 0.924 0.056 0.944 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522079 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522080 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522081 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522082 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522083 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522084 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522085 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522086 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522087 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522088 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522089 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522090 3 0.0707 0.975 0 0.020 0.980 0.000
#> SRR522091 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.999 0 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522114 2 0.0592 0.982 0 0.984 0.000 0.016
#> SRR522115 2 0.0927 0.979 0 0.976 0.008 0.016
#> SRR522116 2 0.0592 0.982 0 0.984 0.000 0.016
#> SRR522117 2 0.0592 0.982 0 0.984 0.000 0.016
#> SRR522118 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522124 2 0.1557 0.949 0 0.944 0.000 0.056
#> SRR522125 2 0.0921 0.974 0 0.972 0.000 0.028
#> SRR522126 2 0.1557 0.949 0 0.944 0.000 0.056
#> SRR522127 2 0.1474 0.953 0 0.948 0.000 0.052
#> SRR522128 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.992 0 1.000 0.000 0.000
#> SRR522131 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522132 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522133 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522134 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522135 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522136 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522137 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522138 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522139 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522140 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522141 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522142 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522143 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522144 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522145 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522146 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522147 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522148 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522149 4 0.0000 1.000 0 0.000 0.000 1.000
#> SRR522150 4 0.0000 1.000 0 0.000 0.000 1.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 2 0.2707 0.848 0 0.860 0.000 0.132 0.008
#> SRR522080 2 0.2707 0.848 0 0.860 0.000 0.132 0.008
#> SRR522081 2 0.0162 0.932 0 0.996 0.000 0.000 0.004
#> SRR522082 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522083 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522084 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522085 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522086 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522087 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522088 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522089 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.1579 0.934 0 0.032 0.944 0.000 0.024
#> SRR522091 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.996 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522114 2 0.3675 0.791 0 0.788 0.000 0.188 0.024
#> SRR522115 2 0.1822 0.903 0 0.936 0.004 0.036 0.024
#> SRR522116 2 0.3012 0.847 0 0.852 0.000 0.124 0.024
#> SRR522117 2 0.2964 0.849 0 0.856 0.000 0.120 0.024
#> SRR522118 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522124 2 0.4565 0.639 0 0.664 0.000 0.308 0.028
#> SRR522125 2 0.4520 0.672 0 0.684 0.000 0.284 0.032
#> SRR522126 2 0.4565 0.639 0 0.664 0.000 0.308 0.028
#> SRR522127 2 0.4565 0.639 0 0.664 0.000 0.308 0.028
#> SRR522128 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.934 0 1.000 0.000 0.000 0.000
#> SRR522131 4 0.0609 0.946 0 0.000 0.000 0.980 0.020
#> SRR522132 4 0.2813 0.833 0 0.000 0.000 0.832 0.168
#> SRR522133 4 0.0703 0.945 0 0.000 0.000 0.976 0.024
#> SRR522134 4 0.2516 0.864 0 0.000 0.000 0.860 0.140
#> SRR522135 4 0.2690 0.847 0 0.000 0.000 0.844 0.156
#> SRR522136 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522137 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522138 4 0.1121 0.937 0 0.000 0.000 0.956 0.044
#> SRR522139 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522140 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522141 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522142 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522143 4 0.0290 0.944 0 0.000 0.000 0.992 0.008
#> SRR522144 4 0.0290 0.944 0 0.000 0.000 0.992 0.008
#> SRR522145 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522146 4 0.0510 0.946 0 0.000 0.000 0.984 0.016
#> SRR522147 4 0.0290 0.944 0 0.000 0.000 0.992 0.008
#> SRR522148 5 0.0703 1.000 0 0.000 0.000 0.024 0.976
#> SRR522149 4 0.0703 0.946 0 0.000 0.000 0.976 0.024
#> SRR522150 4 0.0000 0.938 0 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0146 0.995 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522065 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 6 0.2912 1.000 0.216 0.000 0.000 0.000 0.000 0.784
#> SRR522067 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0260 0.993 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR522070 6 0.2912 1.000 0.216 0.000 0.000 0.000 0.000 0.784
#> SRR522071 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0146 0.995 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522073 6 0.2912 1.000 0.216 0.000 0.000 0.000 0.000 0.784
#> SRR522074 6 0.2912 1.000 0.216 0.000 0.000 0.000 0.000 0.784
#> SRR522075 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 6 0.2912 1.000 0.216 0.000 0.000 0.000 0.000 0.784
#> SRR522077 1 0.0000 0.998 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 6 0.2912 1.000 0.216 0.000 0.000 0.000 0.000 0.784
#> SRR522079 2 0.0972 0.894 0.000 0.964 0.000 0.008 0.000 0.028
#> SRR522080 2 0.0972 0.894 0.000 0.964 0.000 0.008 0.000 0.028
#> SRR522081 2 0.1610 0.877 0.000 0.916 0.000 0.000 0.000 0.084
#> SRR522082 2 0.0865 0.897 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522083 2 0.0865 0.897 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522084 2 0.0865 0.897 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522085 2 0.0865 0.897 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522086 2 0.0865 0.897 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522087 2 0.0865 0.897 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522088 2 0.0937 0.896 0.000 0.960 0.000 0.000 0.000 0.040
#> SRR522089 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.1780 0.911 0.000 0.028 0.924 0.000 0.000 0.048
#> SRR522091 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.995 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522114 2 0.4195 0.753 0.000 0.724 0.000 0.076 0.000 0.200
#> SRR522115 2 0.3770 0.775 0.000 0.752 0.004 0.032 0.000 0.212
#> SRR522116 2 0.4228 0.746 0.000 0.716 0.000 0.072 0.000 0.212
#> SRR522117 2 0.4228 0.746 0.000 0.716 0.000 0.072 0.000 0.212
#> SRR522118 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522124 2 0.5827 0.378 0.000 0.476 0.000 0.316 0.000 0.208
#> SRR522125 2 0.4809 0.695 0.000 0.664 0.000 0.128 0.000 0.208
#> SRR522126 2 0.5827 0.378 0.000 0.476 0.000 0.316 0.000 0.208
#> SRR522127 2 0.5827 0.378 0.000 0.476 0.000 0.316 0.000 0.208
#> SRR522128 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.901 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522131 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522132 4 0.0363 0.989 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR522133 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522134 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522135 4 0.0363 0.989 0.000 0.000 0.000 0.988 0.012 0.000
#> SRR522136 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522137 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0146 0.995 0.000 0.000 0.000 0.996 0.004 0.000
#> SRR522139 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522140 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522141 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522142 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522144 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522145 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522147 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522148 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0000 0.997 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522150 4 0.0000 0.997 0.000 0.000 0.000 1.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["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 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'CV' method.
#> Subgroups are detected by 'NMF' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.994 0.997 0.3261 0.671 0.671
#> 3 3 1.000 0.971 0.990 0.7601 0.729 0.604
#> 4 4 0.766 0.701 0.815 0.2453 0.826 0.592
#> 5 5 0.949 0.920 0.937 0.0941 0.869 0.569
#> 6 6 0.956 0.973 0.978 0.0476 0.954 0.795
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 3 5
There is also optional best \(k\) = 2 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
#> SRR522063 1 0.0000 0.984 1.000 0.000
#> SRR522064 1 0.0000 0.984 1.000 0.000
#> SRR522065 1 0.0000 0.984 1.000 0.000
#> SRR522066 1 0.0000 0.984 1.000 0.000
#> SRR522067 1 0.0000 0.984 1.000 0.000
#> SRR522068 1 0.0000 0.984 1.000 0.000
#> SRR522069 1 0.0000 0.984 1.000 0.000
#> SRR522070 1 0.0000 0.984 1.000 0.000
#> SRR522071 1 0.0000 0.984 1.000 0.000
#> SRR522072 1 0.0000 0.984 1.000 0.000
#> SRR522073 1 0.0000 0.984 1.000 0.000
#> SRR522074 1 0.0000 0.984 1.000 0.000
#> SRR522075 1 0.0000 0.984 1.000 0.000
#> SRR522076 1 0.0000 0.984 1.000 0.000
#> SRR522077 1 0.0000 0.984 1.000 0.000
#> SRR522078 1 0.0000 0.984 1.000 0.000
#> SRR522079 1 0.5629 0.856 0.868 0.132
#> SRR522080 1 0.5737 0.851 0.864 0.136
#> SRR522081 2 0.0000 1.000 0.000 1.000
#> SRR522082 2 0.0376 0.996 0.004 0.996
#> SRR522083 2 0.0000 1.000 0.000 1.000
#> SRR522084 2 0.0000 1.000 0.000 1.000
#> SRR522085 2 0.0000 1.000 0.000 1.000
#> SRR522086 2 0.0000 1.000 0.000 1.000
#> SRR522087 2 0.0000 1.000 0.000 1.000
#> SRR522088 2 0.0000 1.000 0.000 1.000
#> SRR522089 2 0.0000 1.000 0.000 1.000
#> SRR522090 2 0.0000 1.000 0.000 1.000
#> SRR522091 2 0.0000 1.000 0.000 1.000
#> SRR522092 2 0.0000 1.000 0.000 1.000
#> SRR522093 2 0.0000 1.000 0.000 1.000
#> SRR522094 2 0.0000 1.000 0.000 1.000
#> SRR522095 2 0.0000 1.000 0.000 1.000
#> SRR522096 2 0.0000 1.000 0.000 1.000
#> SRR522097 2 0.0000 1.000 0.000 1.000
#> SRR522098 2 0.0000 1.000 0.000 1.000
#> SRR522099 2 0.0000 1.000 0.000 1.000
#> SRR522100 2 0.0000 1.000 0.000 1.000
#> SRR522101 2 0.0000 1.000 0.000 1.000
#> SRR522102 2 0.0000 1.000 0.000 1.000
#> SRR522103 2 0.0000 1.000 0.000 1.000
#> SRR522104 2 0.0000 1.000 0.000 1.000
#> SRR522105 2 0.0000 1.000 0.000 1.000
#> SRR522106 2 0.0000 1.000 0.000 1.000
#> SRR522107 2 0.0000 1.000 0.000 1.000
#> SRR522108 2 0.0000 1.000 0.000 1.000
#> SRR522109 2 0.0000 1.000 0.000 1.000
#> SRR522110 2 0.0000 1.000 0.000 1.000
#> SRR522111 2 0.0000 1.000 0.000 1.000
#> SRR522112 2 0.0000 1.000 0.000 1.000
#> SRR522113 2 0.0000 1.000 0.000 1.000
#> SRR522114 2 0.0000 1.000 0.000 1.000
#> SRR522115 2 0.0000 1.000 0.000 1.000
#> SRR522116 2 0.0000 1.000 0.000 1.000
#> SRR522117 2 0.0000 1.000 0.000 1.000
#> SRR522118 2 0.0000 1.000 0.000 1.000
#> SRR522119 2 0.0000 1.000 0.000 1.000
#> SRR522120 2 0.0000 1.000 0.000 1.000
#> SRR522121 2 0.0000 1.000 0.000 1.000
#> SRR522122 2 0.0000 1.000 0.000 1.000
#> SRR522123 2 0.0000 1.000 0.000 1.000
#> SRR522124 2 0.0000 1.000 0.000 1.000
#> SRR522125 2 0.0000 1.000 0.000 1.000
#> SRR522126 2 0.0000 1.000 0.000 1.000
#> SRR522127 2 0.0000 1.000 0.000 1.000
#> SRR522128 2 0.0000 1.000 0.000 1.000
#> SRR522129 2 0.0000 1.000 0.000 1.000
#> SRR522130 2 0.0000 1.000 0.000 1.000
#> SRR522131 2 0.0000 1.000 0.000 1.000
#> SRR522132 2 0.0000 1.000 0.000 1.000
#> SRR522133 2 0.0000 1.000 0.000 1.000
#> SRR522134 2 0.0000 1.000 0.000 1.000
#> SRR522135 2 0.0000 1.000 0.000 1.000
#> SRR522136 2 0.0000 1.000 0.000 1.000
#> SRR522137 2 0.0000 1.000 0.000 1.000
#> SRR522138 2 0.0000 1.000 0.000 1.000
#> SRR522139 2 0.0000 1.000 0.000 1.000
#> SRR522140 2 0.0000 1.000 0.000 1.000
#> SRR522141 2 0.0000 1.000 0.000 1.000
#> SRR522142 2 0.0000 1.000 0.000 1.000
#> SRR522143 2 0.0000 1.000 0.000 1.000
#> SRR522144 2 0.0000 1.000 0.000 1.000
#> SRR522145 2 0.0000 1.000 0.000 1.000
#> SRR522146 2 0.0000 1.000 0.000 1.000
#> SRR522147 2 0.0000 1.000 0.000 1.000
#> SRR522148 2 0.0000 1.000 0.000 1.000
#> SRR522149 2 0.0000 1.000 0.000 1.000
#> SRR522150 2 0.0000 1.000 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522064 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522065 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522066 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522067 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522068 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522069 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522070 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522071 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522072 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522073 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522074 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522075 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522076 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522077 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522078 1 0.0000 0.965 1.000 0.000 0.000
#> SRR522079 2 0.6252 0.167 0.444 0.556 0.000
#> SRR522080 1 0.6154 0.301 0.592 0.408 0.000
#> SRR522081 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522082 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522083 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522084 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522085 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522086 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522087 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522088 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522089 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522090 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522091 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522092 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522093 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522094 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522095 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522096 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522097 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522098 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522099 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522100 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522101 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522102 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522103 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522104 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522105 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522106 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522107 3 0.0000 1.000 0.000 0.000 1.000
#> SRR522108 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522109 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522110 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522111 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522112 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522113 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522114 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522115 2 0.0237 0.987 0.000 0.996 0.004
#> SRR522116 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522117 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522118 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522119 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522120 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522121 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522122 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522123 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522124 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522125 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522126 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522127 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522128 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522129 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522130 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522131 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522132 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522133 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522134 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522135 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522136 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522137 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522138 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522139 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522140 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522141 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522142 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522143 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522144 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522145 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522146 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522147 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522148 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522149 2 0.0000 0.991 0.000 1.000 0.000
#> SRR522150 2 0.0000 0.991 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522064 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522065 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522066 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522067 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522068 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522069 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522070 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522071 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522072 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522073 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522074 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522075 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522076 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522077 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522078 1 0.000 0.960 1.000 0.000 0.000 0.000
#> SRR522079 4 0.791 0.156 0.332 0.304 0.000 0.364
#> SRR522080 1 0.765 -0.218 0.436 0.216 0.000 0.348
#> SRR522081 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522082 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522083 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522084 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522085 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522086 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522087 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522088 4 0.422 0.265 0.000 0.272 0.000 0.728
#> SRR522089 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522090 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522091 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522092 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522093 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522094 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522095 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522096 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522097 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522098 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522099 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522100 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522101 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522102 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522103 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522104 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522105 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522106 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522107 3 0.000 1.000 0.000 0.000 1.000 0.000
#> SRR522108 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522109 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522110 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522111 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522112 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522113 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522114 2 0.495 0.170 0.000 0.556 0.000 0.444
#> SRR522115 2 0.537 0.147 0.000 0.544 0.012 0.444
#> SRR522116 2 0.495 0.170 0.000 0.556 0.000 0.444
#> SRR522117 2 0.496 0.156 0.000 0.552 0.000 0.448
#> SRR522118 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522119 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522120 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522121 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522122 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522123 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522124 2 0.495 0.170 0.000 0.556 0.000 0.444
#> SRR522125 2 0.496 0.158 0.000 0.552 0.000 0.448
#> SRR522126 2 0.495 0.170 0.000 0.556 0.000 0.444
#> SRR522127 2 0.495 0.170 0.000 0.556 0.000 0.444
#> SRR522128 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522129 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522130 2 0.000 0.736 0.000 1.000 0.000 0.000
#> SRR522131 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522132 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522133 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522134 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522135 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522136 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522137 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522138 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522139 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522140 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522141 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522142 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522143 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522144 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522145 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522146 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522147 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522148 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522149 4 0.464 0.647 0.000 0.344 0.000 0.656
#> SRR522150 4 0.464 0.647 0.000 0.344 0.000 0.656
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522079 4 0.4581 0.592 0.268 0.004 0.000 0.696 0.032
#> SRR522080 4 0.5390 0.235 0.412 0.004 0.000 0.536 0.048
#> SRR522081 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522082 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522083 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522084 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522085 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522086 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522087 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522088 5 0.3239 1.000 0.000 0.080 0.000 0.068 0.852
#> SRR522089 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0.000 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522109 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522110 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522111 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522112 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522113 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522114 4 0.5962 0.605 0.000 0.248 0.000 0.584 0.168
#> SRR522115 4 0.6423 0.629 0.000 0.196 0.032 0.604 0.168
#> SRR522116 4 0.5824 0.634 0.000 0.224 0.000 0.608 0.168
#> SRR522117 4 0.5824 0.634 0.000 0.224 0.000 0.608 0.168
#> SRR522118 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522119 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522120 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522121 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522122 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522123 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522124 4 0.5824 0.634 0.000 0.224 0.000 0.608 0.168
#> SRR522125 4 0.5824 0.634 0.000 0.224 0.000 0.608 0.168
#> SRR522126 4 0.5848 0.630 0.000 0.228 0.000 0.604 0.168
#> SRR522127 4 0.5896 0.622 0.000 0.236 0.000 0.596 0.168
#> SRR522128 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522129 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522130 2 0.0703 1.000 0.000 0.976 0.000 0.024 0.000
#> SRR522131 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522132 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522133 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522134 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522135 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522137 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522139 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522140 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522141 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522142 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522145 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522148 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
#> SRR522150 4 0.0000 0.854 0.000 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0146 0.995 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522067 1 0.0146 0.995 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522068 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0363 0.992 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR522071 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0547 0.988 0.980 0.000 0.000 0.000 0.000 0.020
#> SRR522074 1 0.0363 0.992 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR522075 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0458 0.990 0.984 0.000 0.000 0.000 0.000 0.016
#> SRR522077 1 0.0000 0.996 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0363 0.992 0.988 0.000 0.000 0.000 0.000 0.012
#> SRR522079 4 0.6064 0.235 0.268 0.004 0.000 0.508 0.008 0.212
#> SRR522080 4 0.5496 0.422 0.240 0.000 0.000 0.592 0.008 0.160
#> SRR522081 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522082 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522083 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522084 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522085 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522086 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522087 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522088 5 0.0260 1.000 0.000 0.008 0.000 0.000 0.992 0.000
#> SRR522089 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522091 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0146 0.996 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522093 3 0.0146 0.996 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522094 3 0.0146 0.996 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522095 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522114 6 0.2213 0.997 0.000 0.004 0.000 0.100 0.008 0.888
#> SRR522115 6 0.2213 0.997 0.000 0.004 0.000 0.100 0.008 0.888
#> SRR522116 6 0.2213 0.997 0.000 0.004 0.000 0.100 0.008 0.888
#> SRR522117 6 0.2213 0.997 0.000 0.004 0.000 0.100 0.008 0.888
#> SRR522118 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522124 6 0.2325 0.996 0.000 0.008 0.000 0.100 0.008 0.884
#> SRR522125 6 0.2213 0.997 0.000 0.004 0.000 0.100 0.008 0.888
#> SRR522126 6 0.2425 0.992 0.000 0.012 0.000 0.100 0.008 0.880
#> SRR522127 6 0.2325 0.996 0.000 0.008 0.000 0.100 0.008 0.884
#> SRR522128 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 1.000 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522131 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522132 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522133 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522134 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522135 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522136 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522137 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522138 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522139 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522140 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522141 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522142 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522143 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522144 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522145 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522146 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522147 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522148 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522149 4 0.0000 0.954 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522150 4 0.0000 0.954 0.000 0.000 0.000 1.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", "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 13957 rows and 88 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 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.578 0.868 0.925 0.2924 0.685 0.685
#> 3 3 0.674 0.854 0.904 0.7916 0.770 0.664
#> 4 4 0.681 0.809 0.828 0.2706 0.727 0.444
#> 5 5 0.851 0.874 0.931 0.1365 0.898 0.673
#> 6 6 0.927 0.957 0.969 0.0449 0.941 0.782
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 2 0.0938 0.935 0.012 0.988
#> SRR522064 2 0.0938 0.935 0.012 0.988
#> SRR522065 2 0.0938 0.935 0.012 0.988
#> SRR522066 2 0.0938 0.935 0.012 0.988
#> SRR522067 2 0.0938 0.935 0.012 0.988
#> SRR522068 2 0.0938 0.935 0.012 0.988
#> SRR522069 2 0.0938 0.935 0.012 0.988
#> SRR522070 2 0.0938 0.935 0.012 0.988
#> SRR522071 2 0.0938 0.935 0.012 0.988
#> SRR522072 2 0.0938 0.935 0.012 0.988
#> SRR522073 2 0.0938 0.935 0.012 0.988
#> SRR522074 2 0.0938 0.935 0.012 0.988
#> SRR522075 2 0.0938 0.935 0.012 0.988
#> SRR522076 2 0.0938 0.935 0.012 0.988
#> SRR522077 2 0.0938 0.935 0.012 0.988
#> SRR522078 2 0.0938 0.935 0.012 0.988
#> SRR522079 1 0.0000 0.755 1.000 0.000
#> SRR522080 1 0.0000 0.755 1.000 0.000
#> SRR522081 2 0.9491 0.247 0.368 0.632
#> SRR522082 2 0.9491 0.247 0.368 0.632
#> SRR522083 2 0.9491 0.247 0.368 0.632
#> SRR522084 2 0.9491 0.247 0.368 0.632
#> SRR522085 2 0.9491 0.247 0.368 0.632
#> SRR522086 2 0.9491 0.247 0.368 0.632
#> SRR522087 2 0.9491 0.247 0.368 0.632
#> SRR522088 2 0.9491 0.247 0.368 0.632
#> SRR522089 2 0.0000 0.941 0.000 1.000
#> SRR522090 2 0.0000 0.941 0.000 1.000
#> SRR522091 2 0.0000 0.941 0.000 1.000
#> SRR522092 2 0.0000 0.941 0.000 1.000
#> SRR522093 2 0.0000 0.941 0.000 1.000
#> SRR522094 2 0.0000 0.941 0.000 1.000
#> SRR522095 2 0.0000 0.941 0.000 1.000
#> SRR522096 2 0.0000 0.941 0.000 1.000
#> SRR522097 2 0.0000 0.941 0.000 1.000
#> SRR522098 2 0.0000 0.941 0.000 1.000
#> SRR522099 2 0.0000 0.941 0.000 1.000
#> SRR522100 2 0.0000 0.941 0.000 1.000
#> SRR522101 2 0.0000 0.941 0.000 1.000
#> SRR522102 2 0.0000 0.941 0.000 1.000
#> SRR522103 2 0.0000 0.941 0.000 1.000
#> SRR522104 2 0.0000 0.941 0.000 1.000
#> SRR522105 2 0.0000 0.941 0.000 1.000
#> SRR522106 2 0.0000 0.941 0.000 1.000
#> SRR522107 2 0.0000 0.941 0.000 1.000
#> SRR522108 1 0.7299 0.932 0.796 0.204
#> SRR522109 1 0.7299 0.932 0.796 0.204
#> SRR522110 1 0.7299 0.932 0.796 0.204
#> SRR522111 1 0.7299 0.932 0.796 0.204
#> SRR522112 1 0.7299 0.932 0.796 0.204
#> SRR522113 1 0.7299 0.932 0.796 0.204
#> SRR522114 2 0.0000 0.941 0.000 1.000
#> SRR522115 2 0.0000 0.941 0.000 1.000
#> SRR522116 2 0.0000 0.941 0.000 1.000
#> SRR522117 2 0.0000 0.941 0.000 1.000
#> SRR522118 1 0.7299 0.932 0.796 0.204
#> SRR522119 1 0.7299 0.932 0.796 0.204
#> SRR522120 1 0.8555 0.879 0.720 0.280
#> SRR522121 1 0.8555 0.879 0.720 0.280
#> SRR522122 1 0.8555 0.879 0.720 0.280
#> SRR522123 1 0.8555 0.879 0.720 0.280
#> SRR522124 2 0.0000 0.941 0.000 1.000
#> SRR522125 2 0.0000 0.941 0.000 1.000
#> SRR522126 2 0.0000 0.941 0.000 1.000
#> SRR522127 2 0.0000 0.941 0.000 1.000
#> SRR522128 1 0.7299 0.932 0.796 0.204
#> SRR522129 1 0.7299 0.932 0.796 0.204
#> SRR522130 1 0.8555 0.879 0.720 0.280
#> SRR522131 2 0.0000 0.941 0.000 1.000
#> SRR522132 2 0.0000 0.941 0.000 1.000
#> SRR522133 2 0.0000 0.941 0.000 1.000
#> SRR522134 2 0.0000 0.941 0.000 1.000
#> SRR522135 2 0.0000 0.941 0.000 1.000
#> SRR522136 2 0.0000 0.941 0.000 1.000
#> SRR522137 2 0.0000 0.941 0.000 1.000
#> SRR522138 2 0.0000 0.941 0.000 1.000
#> SRR522139 2 0.0000 0.941 0.000 1.000
#> SRR522140 2 0.0000 0.941 0.000 1.000
#> SRR522141 2 0.0000 0.941 0.000 1.000
#> SRR522142 2 0.0000 0.941 0.000 1.000
#> SRR522143 2 0.0000 0.941 0.000 1.000
#> SRR522144 2 0.0000 0.941 0.000 1.000
#> SRR522145 2 0.0000 0.941 0.000 1.000
#> SRR522146 2 0.0000 0.941 0.000 1.000
#> SRR522147 2 0.0000 0.941 0.000 1.000
#> SRR522148 2 0.0000 0.941 0.000 1.000
#> SRR522149 2 0.0000 0.941 0.000 1.000
#> SRR522150 2 0.0000 0.941 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522064 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522065 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522066 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522067 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522068 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522069 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522070 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522071 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522072 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522073 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522074 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522075 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522076 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522077 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522078 1 0.1289 1.000 0.968 0.000 0.032
#> SRR522079 2 0.1289 0.668 0.032 0.968 0.000
#> SRR522080 2 0.1289 0.668 0.032 0.968 0.000
#> SRR522081 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522082 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522083 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522084 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522085 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522086 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522087 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522088 3 0.5988 0.248 0.000 0.368 0.632
#> SRR522089 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522090 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522091 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522092 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522093 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522094 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522095 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522096 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522097 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522098 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522099 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522100 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522101 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522102 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522103 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522104 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522105 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522106 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522107 3 0.1860 0.890 0.052 0.000 0.948
#> SRR522108 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522109 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522110 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522111 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522112 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522113 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522114 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522115 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522116 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522117 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522118 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522119 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522120 2 0.5397 0.881 0.000 0.720 0.280
#> SRR522121 2 0.5397 0.881 0.000 0.720 0.280
#> SRR522122 2 0.5397 0.881 0.000 0.720 0.280
#> SRR522123 2 0.5397 0.881 0.000 0.720 0.280
#> SRR522124 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522125 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522126 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522127 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522128 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522129 2 0.4605 0.932 0.000 0.796 0.204
#> SRR522130 2 0.5397 0.881 0.000 0.720 0.280
#> SRR522131 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522132 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522133 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522134 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522135 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522136 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522137 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522138 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522139 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522140 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522141 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522142 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522143 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522144 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522145 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522146 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522147 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522148 3 0.0237 0.901 0.004 0.000 0.996
#> SRR522149 3 0.0000 0.900 0.000 0.000 1.000
#> SRR522150 3 0.0000 0.900 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000
#> SRR522079 2 0.4790 0.494 0 0.620 0.000 0.380
#> SRR522080 2 0.4790 0.494 0 0.620 0.000 0.380
#> SRR522081 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522082 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522083 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522084 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522085 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522086 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522087 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522088 2 0.7859 -0.149 0 0.376 0.352 0.272
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000
#> SRR522108 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522109 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522110 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522111 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522112 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522113 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522114 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522115 4 0.5155 0.861 0 0.004 0.468 0.528
#> SRR522116 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522117 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522118 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522119 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522120 2 0.2408 0.693 0 0.896 0.000 0.104
#> SRR522121 2 0.2408 0.693 0 0.896 0.000 0.104
#> SRR522122 2 0.2408 0.693 0 0.896 0.000 0.104
#> SRR522123 2 0.2408 0.693 0 0.896 0.000 0.104
#> SRR522124 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522125 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522126 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522127 4 0.5151 0.869 0 0.004 0.464 0.532
#> SRR522128 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522129 2 0.0921 0.696 0 0.972 0.000 0.028
#> SRR522130 2 0.2408 0.693 0 0.896 0.000 0.104
#> SRR522131 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522132 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522133 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522134 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522135 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522136 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522137 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522138 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522139 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522140 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522141 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522142 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522143 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522144 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522145 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522146 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522147 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522148 4 0.4950 0.950 0 0.004 0.376 0.620
#> SRR522149 4 0.5070 0.951 0 0.008 0.372 0.620
#> SRR522150 4 0.5070 0.951 0 0.008 0.372 0.620
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 5 0.2280 1.000 0 0.120 0.000 0.000 0.880
#> SRR522080 5 0.2280 1.000 0 0.120 0.000 0.000 0.880
#> SRR522081 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522082 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522083 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522084 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522085 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522086 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522087 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522088 4 0.5368 0.398 0 0.048 0.004 0.548 0.400
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0162 0.954 0 0.996 0.000 0.000 0.004
#> SRR522109 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522114 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522115 4 0.3099 0.779 0 0.000 0.124 0.848 0.028
#> SRR522116 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522117 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522118 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.956 0 1.000 0.000 0.000 0.000
#> SRR522120 2 0.1981 0.913 0 0.924 0.000 0.048 0.028
#> SRR522121 2 0.1981 0.913 0 0.924 0.000 0.048 0.028
#> SRR522122 2 0.1981 0.913 0 0.924 0.000 0.048 0.028
#> SRR522123 2 0.1981 0.913 0 0.924 0.000 0.048 0.028
#> SRR522124 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522125 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522126 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522127 4 0.3134 0.780 0 0.000 0.120 0.848 0.032
#> SRR522128 2 0.0162 0.953 0 0.996 0.000 0.000 0.004
#> SRR522129 2 0.0162 0.953 0 0.996 0.000 0.000 0.004
#> SRR522130 2 0.1981 0.913 0 0.924 0.000 0.048 0.028
#> SRR522131 4 0.0510 0.825 0 0.000 0.016 0.984 0.000
#> SRR522132 4 0.0510 0.825 0 0.000 0.016 0.984 0.000
#> SRR522133 4 0.0510 0.825 0 0.000 0.016 0.984 0.000
#> SRR522134 4 0.0510 0.825 0 0.000 0.016 0.984 0.000
#> SRR522135 4 0.0510 0.825 0 0.000 0.016 0.984 0.000
#> SRR522136 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522137 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522138 4 0.0510 0.825 0 0.000 0.016 0.984 0.000
#> SRR522139 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522140 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522141 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522142 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522143 4 0.0000 0.821 0 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0000 0.821 0 0.000 0.000 1.000 0.000
#> SRR522145 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522146 4 0.0000 0.821 0 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0000 0.821 0 0.000 0.000 1.000 0.000
#> SRR522148 4 0.1544 0.815 0 0.000 0.068 0.932 0.000
#> SRR522149 4 0.0000 0.821 0 0.000 0.000 1.000 0.000
#> SRR522150 4 0.0000 0.821 0 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522079 6 0.0717 1.000 0 0.008 0.000 0.000 0.016 0.976
#> SRR522080 6 0.0717 1.000 0 0.008 0.000 0.000 0.016 0.976
#> SRR522081 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522082 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522083 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522084 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522085 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522086 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522087 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522088 5 0.0146 1.000 0 0.000 0.000 0.004 0.996 0.000
#> SRR522089 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0146 0.953 0 0.996 0.000 0.000 0.000 0.004
#> SRR522109 2 0.0000 0.954 0 1.000 0.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.954 0 1.000 0.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.954 0 1.000 0.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.954 0 1.000 0.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.954 0 1.000 0.000 0.000 0.000 0.000
#> SRR522114 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522115 4 0.3393 0.849 0 0.000 0.124 0.824 0.028 0.024
#> SRR522116 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522117 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522118 2 0.0146 0.954 0 0.996 0.000 0.000 0.000 0.004
#> SRR522119 2 0.0146 0.954 0 0.996 0.000 0.000 0.000 0.004
#> SRR522120 2 0.1901 0.928 0 0.924 0.000 0.040 0.028 0.008
#> SRR522121 2 0.1901 0.928 0 0.924 0.000 0.040 0.028 0.008
#> SRR522122 2 0.1901 0.928 0 0.924 0.000 0.040 0.028 0.008
#> SRR522123 2 0.1901 0.928 0 0.924 0.000 0.040 0.028 0.008
#> SRR522124 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522125 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522126 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522127 4 0.3425 0.851 0 0.000 0.120 0.824 0.032 0.024
#> SRR522128 2 0.1444 0.928 0 0.928 0.000 0.000 0.000 0.072
#> SRR522129 2 0.1444 0.928 0 0.928 0.000 0.000 0.000 0.072
#> SRR522130 2 0.1901 0.928 0 0.924 0.000 0.040 0.028 0.008
#> SRR522131 4 0.0458 0.918 0 0.000 0.016 0.984 0.000 0.000
#> SRR522132 4 0.0458 0.918 0 0.000 0.016 0.984 0.000 0.000
#> SRR522133 4 0.0458 0.918 0 0.000 0.016 0.984 0.000 0.000
#> SRR522134 4 0.0458 0.918 0 0.000 0.016 0.984 0.000 0.000
#> SRR522135 4 0.0458 0.918 0 0.000 0.016 0.984 0.000 0.000
#> SRR522136 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522137 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522138 4 0.0458 0.918 0 0.000 0.016 0.984 0.000 0.000
#> SRR522139 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522140 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522141 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522142 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522143 4 0.0146 0.912 0 0.000 0.000 0.996 0.004 0.000
#> SRR522144 4 0.0146 0.912 0 0.000 0.000 0.996 0.004 0.000
#> SRR522145 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522146 4 0.0146 0.912 0 0.000 0.000 0.996 0.004 0.000
#> SRR522147 4 0.0146 0.912 0 0.000 0.000 0.996 0.004 0.000
#> SRR522148 4 0.1387 0.910 0 0.000 0.068 0.932 0.000 0.000
#> SRR522149 4 0.0146 0.912 0 0.000 0.000 0.996 0.004 0.000
#> SRR522150 4 0.0146 0.912 0 0.000 0.000 0.996 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 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 0.556 0.895 0.899 0.4510 0.494 0.494
#> 3 3 0.585 0.800 0.812 0.3436 0.846 0.703
#> 4 4 0.531 0.801 0.809 0.1590 0.783 0.507
#> 5 5 0.756 0.871 0.856 0.0901 0.941 0.788
#> 6 6 0.826 0.838 0.854 0.0473 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] 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
#> SRR522063 1 0.416 0.813 0.916 0.084
#> SRR522064 1 0.416 0.813 0.916 0.084
#> SRR522065 1 0.416 0.813 0.916 0.084
#> SRR522066 1 0.416 0.813 0.916 0.084
#> SRR522067 1 0.416 0.813 0.916 0.084
#> SRR522068 1 0.416 0.813 0.916 0.084
#> SRR522069 1 0.416 0.813 0.916 0.084
#> SRR522070 1 0.416 0.813 0.916 0.084
#> SRR522071 1 0.416 0.813 0.916 0.084
#> SRR522072 1 0.416 0.813 0.916 0.084
#> SRR522073 1 0.416 0.813 0.916 0.084
#> SRR522074 1 0.416 0.813 0.916 0.084
#> SRR522075 1 0.416 0.813 0.916 0.084
#> SRR522076 1 0.416 0.813 0.916 0.084
#> SRR522077 1 0.416 0.813 0.916 0.084
#> SRR522078 1 0.416 0.813 0.916 0.084
#> SRR522079 2 0.000 1.000 0.000 1.000
#> SRR522080 2 0.000 1.000 0.000 1.000
#> SRR522081 2 0.000 1.000 0.000 1.000
#> SRR522082 2 0.000 1.000 0.000 1.000
#> SRR522083 2 0.000 1.000 0.000 1.000
#> SRR522084 2 0.000 1.000 0.000 1.000
#> SRR522085 2 0.000 1.000 0.000 1.000
#> SRR522086 2 0.000 1.000 0.000 1.000
#> SRR522087 2 0.000 1.000 0.000 1.000
#> SRR522088 2 0.000 1.000 0.000 1.000
#> SRR522089 1 0.714 0.842 0.804 0.196
#> SRR522090 1 0.980 0.535 0.584 0.416
#> SRR522091 1 0.714 0.842 0.804 0.196
#> SRR522092 1 0.714 0.842 0.804 0.196
#> SRR522093 1 0.714 0.842 0.804 0.196
#> SRR522094 1 0.714 0.842 0.804 0.196
#> SRR522095 1 0.714 0.842 0.804 0.196
#> SRR522096 1 0.714 0.842 0.804 0.196
#> SRR522097 1 0.714 0.842 0.804 0.196
#> SRR522098 1 0.714 0.842 0.804 0.196
#> SRR522099 1 0.714 0.842 0.804 0.196
#> SRR522100 1 0.714 0.842 0.804 0.196
#> SRR522101 1 0.714 0.842 0.804 0.196
#> SRR522102 1 0.714 0.842 0.804 0.196
#> SRR522103 1 0.714 0.842 0.804 0.196
#> SRR522104 1 0.714 0.842 0.804 0.196
#> SRR522105 1 0.714 0.842 0.804 0.196
#> SRR522106 1 0.714 0.842 0.804 0.196
#> SRR522107 1 0.714 0.842 0.804 0.196
#> SRR522108 2 0.000 1.000 0.000 1.000
#> SRR522109 2 0.000 1.000 0.000 1.000
#> SRR522110 2 0.000 1.000 0.000 1.000
#> SRR522111 2 0.000 1.000 0.000 1.000
#> SRR522112 2 0.000 1.000 0.000 1.000
#> SRR522113 2 0.000 1.000 0.000 1.000
#> SRR522114 2 0.000 1.000 0.000 1.000
#> SRR522115 1 0.978 0.664 0.588 0.412
#> SRR522116 2 0.000 1.000 0.000 1.000
#> SRR522117 2 0.000 1.000 0.000 1.000
#> SRR522118 2 0.000 1.000 0.000 1.000
#> SRR522119 2 0.000 1.000 0.000 1.000
#> SRR522120 2 0.000 1.000 0.000 1.000
#> SRR522121 2 0.000 1.000 0.000 1.000
#> SRR522122 2 0.000 1.000 0.000 1.000
#> SRR522123 2 0.000 1.000 0.000 1.000
#> SRR522124 2 0.000 1.000 0.000 1.000
#> SRR522125 2 0.000 1.000 0.000 1.000
#> SRR522126 2 0.000 1.000 0.000 1.000
#> SRR522127 2 0.000 1.000 0.000 1.000
#> SRR522128 2 0.000 1.000 0.000 1.000
#> SRR522129 2 0.000 1.000 0.000 1.000
#> SRR522130 2 0.000 1.000 0.000 1.000
#> SRR522131 2 0.000 1.000 0.000 1.000
#> SRR522132 2 0.000 1.000 0.000 1.000
#> SRR522133 2 0.000 1.000 0.000 1.000
#> SRR522134 2 0.000 1.000 0.000 1.000
#> SRR522135 2 0.000 1.000 0.000 1.000
#> SRR522136 1 0.992 0.594 0.552 0.448
#> SRR522137 1 0.987 0.627 0.568 0.432
#> SRR522138 2 0.000 1.000 0.000 1.000
#> SRR522139 1 0.961 0.701 0.616 0.384
#> SRR522140 1 0.961 0.701 0.616 0.384
#> SRR522141 1 0.961 0.701 0.616 0.384
#> SRR522142 1 0.961 0.701 0.616 0.384
#> SRR522143 2 0.000 1.000 0.000 1.000
#> SRR522144 2 0.000 1.000 0.000 1.000
#> SRR522145 1 0.961 0.701 0.616 0.384
#> SRR522146 2 0.000 1.000 0.000 1.000
#> SRR522147 2 0.000 1.000 0.000 1.000
#> SRR522148 1 0.961 0.701 0.616 0.384
#> SRR522149 2 0.000 1.000 0.000 1.000
#> SRR522150 2 0.000 1.000 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522064 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522065 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522066 1 0.6318 0.986 0.636 0.008 0.356
#> SRR522067 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522068 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522069 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522070 1 0.6318 0.986 0.636 0.008 0.356
#> SRR522071 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522072 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522073 1 0.6318 0.986 0.636 0.008 0.356
#> SRR522074 1 0.6318 0.986 0.636 0.008 0.356
#> SRR522075 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522076 1 0.6318 0.986 0.636 0.008 0.356
#> SRR522077 1 0.6209 0.992 0.628 0.004 0.368
#> SRR522078 1 0.6318 0.986 0.636 0.008 0.356
#> SRR522079 2 0.5201 0.777 0.236 0.760 0.004
#> SRR522080 2 0.5201 0.777 0.236 0.760 0.004
#> SRR522081 2 0.3755 0.825 0.120 0.872 0.008
#> SRR522082 2 0.4068 0.826 0.120 0.864 0.016
#> SRR522083 2 0.4068 0.826 0.120 0.864 0.016
#> SRR522084 2 0.3755 0.825 0.120 0.872 0.008
#> SRR522085 2 0.4068 0.826 0.120 0.864 0.016
#> SRR522086 2 0.4068 0.826 0.120 0.864 0.016
#> SRR522087 2 0.4068 0.826 0.120 0.864 0.016
#> SRR522088 2 0.4068 0.826 0.120 0.864 0.016
#> SRR522089 3 0.0475 0.775 0.004 0.004 0.992
#> SRR522090 3 0.2590 0.698 0.004 0.072 0.924
#> SRR522091 3 0.0475 0.775 0.004 0.004 0.992
#> SRR522092 3 0.0475 0.775 0.004 0.004 0.992
#> SRR522093 3 0.0475 0.775 0.004 0.004 0.992
#> SRR522094 3 0.0475 0.775 0.004 0.004 0.992
#> SRR522095 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522096 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522097 3 0.0475 0.775 0.004 0.004 0.992
#> SRR522098 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522099 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522100 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522101 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522102 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522103 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522104 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522105 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522106 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522107 3 0.0237 0.776 0.000 0.004 0.996
#> SRR522108 2 0.4233 0.807 0.160 0.836 0.004
#> SRR522109 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522110 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522111 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522112 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522113 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522114 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522115 2 0.7416 0.579 0.068 0.656 0.276
#> SRR522116 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522117 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522118 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522119 2 0.3644 0.824 0.124 0.872 0.004
#> SRR522120 2 0.3500 0.827 0.116 0.880 0.004
#> SRR522121 2 0.3500 0.827 0.116 0.880 0.004
#> SRR522122 2 0.3500 0.827 0.116 0.880 0.004
#> SRR522123 2 0.3500 0.827 0.116 0.880 0.004
#> SRR522124 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522125 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522126 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522127 2 0.4569 0.837 0.068 0.860 0.072
#> SRR522128 2 0.4233 0.807 0.160 0.836 0.004
#> SRR522129 2 0.4233 0.807 0.160 0.836 0.004
#> SRR522130 2 0.3573 0.825 0.120 0.876 0.004
#> SRR522131 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522132 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522133 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522134 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522135 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522136 2 0.8202 0.264 0.080 0.544 0.376
#> SRR522137 3 0.9049 0.195 0.136 0.400 0.464
#> SRR522138 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522139 3 0.9141 0.417 0.212 0.244 0.544
#> SRR522140 3 0.9141 0.417 0.212 0.244 0.544
#> SRR522141 3 0.9141 0.417 0.212 0.244 0.544
#> SRR522142 3 0.9141 0.417 0.212 0.244 0.544
#> SRR522143 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522144 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522145 3 0.9141 0.417 0.212 0.244 0.544
#> SRR522146 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522147 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522148 3 0.9141 0.417 0.212 0.244 0.544
#> SRR522149 2 0.4995 0.833 0.092 0.840 0.068
#> SRR522150 2 0.4995 0.833 0.092 0.840 0.068
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522064 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522065 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522066 1 0.3029 0.9622 0.896 0.048 0.004 0.052
#> SRR522067 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522068 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522069 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522070 1 0.3387 0.9592 0.884 0.052 0.012 0.052
#> SRR522071 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522072 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522073 1 0.3387 0.9592 0.884 0.052 0.012 0.052
#> SRR522074 1 0.3387 0.9592 0.884 0.052 0.012 0.052
#> SRR522075 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522076 1 0.3387 0.9592 0.884 0.052 0.012 0.052
#> SRR522077 1 0.2060 0.9764 0.932 0.000 0.016 0.052
#> SRR522078 1 0.3387 0.9592 0.884 0.052 0.012 0.052
#> SRR522079 2 0.4587 0.7754 0.032 0.828 0.056 0.084
#> SRR522080 2 0.4587 0.7754 0.032 0.828 0.056 0.084
#> SRR522081 4 0.8629 0.0691 0.044 0.356 0.204 0.396
#> SRR522082 4 0.8622 0.0956 0.044 0.348 0.204 0.404
#> SRR522083 4 0.8622 0.0956 0.044 0.348 0.204 0.404
#> SRR522084 4 0.8632 0.0556 0.044 0.360 0.204 0.392
#> SRR522085 4 0.8622 0.0956 0.044 0.348 0.204 0.404
#> SRR522086 4 0.8622 0.0956 0.044 0.348 0.204 0.404
#> SRR522087 4 0.8622 0.0956 0.044 0.348 0.204 0.404
#> SRR522088 4 0.8622 0.0956 0.044 0.348 0.204 0.404
#> SRR522089 3 0.5644 0.9872 0.144 0.012 0.744 0.100
#> SRR522090 3 0.5670 0.9749 0.132 0.016 0.748 0.104
#> SRR522091 3 0.5644 0.9872 0.144 0.012 0.744 0.100
#> SRR522092 3 0.5644 0.9872 0.144 0.012 0.744 0.100
#> SRR522093 3 0.5644 0.9872 0.144 0.012 0.744 0.100
#> SRR522094 3 0.5644 0.9872 0.144 0.012 0.744 0.100
#> SRR522095 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522096 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522097 3 0.5644 0.9872 0.144 0.012 0.744 0.100
#> SRR522098 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522099 3 0.5151 0.9906 0.140 0.000 0.760 0.100
#> SRR522100 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522101 3 0.5151 0.9906 0.140 0.000 0.760 0.100
#> SRR522102 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522103 3 0.5151 0.9906 0.140 0.000 0.760 0.100
#> SRR522104 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522105 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522106 3 0.5471 0.9904 0.140 0.008 0.752 0.100
#> SRR522107 3 0.5151 0.9906 0.140 0.000 0.760 0.100
#> SRR522108 2 0.3680 0.9189 0.004 0.828 0.008 0.160
#> SRR522109 2 0.4153 0.9416 0.004 0.784 0.008 0.204
#> SRR522110 2 0.4153 0.9416 0.004 0.784 0.008 0.204
#> SRR522111 2 0.4279 0.9410 0.004 0.780 0.012 0.204
#> SRR522112 2 0.4153 0.9416 0.004 0.784 0.008 0.204
#> SRR522113 2 0.4153 0.9416 0.004 0.784 0.008 0.204
#> SRR522114 4 0.2142 0.7368 0.000 0.056 0.016 0.928
#> SRR522115 4 0.2364 0.7427 0.008 0.036 0.028 0.928
#> SRR522116 4 0.2142 0.7368 0.000 0.056 0.016 0.928
#> SRR522117 4 0.2142 0.7368 0.000 0.056 0.016 0.928
#> SRR522118 2 0.3831 0.9405 0.000 0.792 0.004 0.204
#> SRR522119 2 0.3486 0.9359 0.000 0.812 0.000 0.188
#> SRR522120 2 0.4228 0.9216 0.000 0.760 0.008 0.232
#> SRR522121 2 0.4228 0.9216 0.000 0.760 0.008 0.232
#> SRR522122 2 0.4228 0.9216 0.000 0.760 0.008 0.232
#> SRR522123 2 0.4228 0.9216 0.000 0.760 0.008 0.232
#> SRR522124 4 0.2142 0.7368 0.000 0.056 0.016 0.928
#> SRR522125 4 0.1938 0.7367 0.000 0.052 0.012 0.936
#> SRR522126 4 0.2142 0.7368 0.000 0.056 0.016 0.928
#> SRR522127 4 0.2142 0.7368 0.000 0.056 0.016 0.928
#> SRR522128 2 0.3355 0.9187 0.000 0.836 0.004 0.160
#> SRR522129 2 0.3355 0.9187 0.000 0.836 0.004 0.160
#> SRR522130 2 0.3831 0.9405 0.000 0.792 0.004 0.204
#> SRR522131 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522132 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522133 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522134 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522135 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522136 4 0.2186 0.7348 0.008 0.012 0.048 0.932
#> SRR522137 4 0.2940 0.7134 0.012 0.008 0.088 0.892
#> SRR522138 4 0.0895 0.7550 0.000 0.020 0.004 0.976
#> SRR522139 4 0.5376 0.5901 0.076 0.008 0.164 0.752
#> SRR522140 4 0.5376 0.5901 0.076 0.008 0.164 0.752
#> SRR522141 4 0.5376 0.5901 0.076 0.008 0.164 0.752
#> SRR522142 4 0.5376 0.5901 0.076 0.008 0.164 0.752
#> SRR522143 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522144 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522145 4 0.5376 0.5901 0.076 0.008 0.164 0.752
#> SRR522146 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522147 4 0.0804 0.7553 0.000 0.012 0.008 0.980
#> SRR522148 4 0.5376 0.5901 0.076 0.008 0.164 0.752
#> SRR522149 4 0.0657 0.7567 0.000 0.012 0.004 0.984
#> SRR522150 4 0.0657 0.7567 0.000 0.012 0.004 0.984
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522064 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522065 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522066 1 0.421 0.937 0.812 0.020 0.096 0.004 0.068
#> SRR522067 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522068 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522069 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522070 1 0.449 0.931 0.792 0.020 0.104 0.004 0.080
#> SRR522071 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522072 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522073 1 0.449 0.931 0.792 0.020 0.104 0.004 0.080
#> SRR522074 1 0.452 0.932 0.792 0.024 0.104 0.004 0.076
#> SRR522075 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522076 1 0.452 0.932 0.792 0.024 0.104 0.004 0.076
#> SRR522077 1 0.189 0.962 0.916 0.000 0.080 0.004 0.000
#> SRR522078 1 0.449 0.931 0.792 0.020 0.104 0.004 0.080
#> SRR522079 2 0.583 0.438 0.052 0.588 0.012 0.012 0.336
#> SRR522080 2 0.583 0.438 0.052 0.588 0.012 0.012 0.336
#> SRR522081 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522082 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522083 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522084 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522085 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522086 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522087 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522088 5 0.570 1.000 0.000 0.148 0.000 0.232 0.620
#> SRR522089 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522090 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522091 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522092 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522093 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522094 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522095 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522096 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522097 3 0.236 0.974 0.004 0.008 0.916 0.040 0.032
#> SRR522098 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522099 3 0.104 0.983 0.000 0.000 0.960 0.040 0.000
#> SRR522100 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522101 3 0.104 0.983 0.000 0.000 0.960 0.040 0.000
#> SRR522102 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522103 3 0.104 0.983 0.000 0.000 0.960 0.040 0.000
#> SRR522104 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522105 3 0.120 0.983 0.000 0.000 0.956 0.040 0.004
#> SRR522106 3 0.133 0.983 0.000 0.000 0.952 0.040 0.008
#> SRR522107 3 0.104 0.983 0.000 0.000 0.960 0.040 0.000
#> SRR522108 2 0.293 0.852 0.032 0.892 0.004 0.028 0.044
#> SRR522109 2 0.213 0.898 0.012 0.920 0.004 0.060 0.004
#> SRR522110 2 0.213 0.898 0.012 0.920 0.004 0.060 0.004
#> SRR522111 2 0.213 0.898 0.012 0.920 0.004 0.060 0.004
#> SRR522112 2 0.213 0.898 0.012 0.920 0.004 0.060 0.004
#> SRR522113 2 0.213 0.898 0.012 0.920 0.004 0.060 0.004
#> SRR522114 4 0.526 0.633 0.012 0.156 0.000 0.708 0.124
#> SRR522115 4 0.495 0.676 0.012 0.152 0.012 0.752 0.072
#> SRR522116 4 0.526 0.633 0.012 0.156 0.000 0.708 0.124
#> SRR522117 4 0.526 0.633 0.012 0.156 0.000 0.708 0.124
#> SRR522118 2 0.141 0.896 0.000 0.940 0.000 0.060 0.000
#> SRR522119 2 0.196 0.890 0.008 0.928 0.000 0.052 0.012
#> SRR522120 2 0.239 0.877 0.000 0.896 0.000 0.084 0.020
#> SRR522121 2 0.239 0.877 0.000 0.896 0.000 0.084 0.020
#> SRR522122 2 0.239 0.877 0.000 0.896 0.000 0.084 0.020
#> SRR522123 2 0.239 0.877 0.000 0.896 0.000 0.084 0.020
#> SRR522124 4 0.521 0.637 0.012 0.156 0.000 0.712 0.120
#> SRR522125 4 0.498 0.656 0.012 0.156 0.000 0.732 0.100
#> SRR522126 4 0.521 0.637 0.012 0.156 0.000 0.712 0.120
#> SRR522127 4 0.521 0.637 0.012 0.156 0.000 0.712 0.120
#> SRR522128 2 0.278 0.847 0.036 0.896 0.000 0.028 0.040
#> SRR522129 2 0.278 0.847 0.036 0.896 0.000 0.028 0.040
#> SRR522130 2 0.181 0.894 0.000 0.928 0.000 0.060 0.012
#> SRR522131 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522132 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522133 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522134 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522135 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522136 4 0.202 0.784 0.008 0.004 0.004 0.924 0.060
#> SRR522137 4 0.230 0.777 0.020 0.000 0.008 0.912 0.060
#> SRR522138 4 0.218 0.789 0.008 0.008 0.000 0.912 0.072
#> SRR522139 4 0.384 0.739 0.032 0.000 0.072 0.836 0.060
#> SRR522140 4 0.384 0.739 0.032 0.000 0.072 0.836 0.060
#> SRR522141 4 0.384 0.739 0.032 0.000 0.072 0.836 0.060
#> SRR522142 4 0.384 0.739 0.032 0.000 0.072 0.836 0.060
#> SRR522143 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522144 4 0.191 0.800 0.008 0.016 0.000 0.932 0.044
#> SRR522145 4 0.384 0.739 0.032 0.000 0.072 0.836 0.060
#> SRR522146 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522147 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522148 4 0.384 0.739 0.032 0.000 0.072 0.836 0.060
#> SRR522149 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
#> SRR522150 4 0.210 0.802 0.008 0.024 0.000 0.924 0.044
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522064 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522065 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522066 1 0.2848 0.913 0.848 0.000 0.024 0.000 0.004 NA
#> SRR522067 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522068 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522069 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522070 1 0.3642 0.896 0.796 0.004 0.024 0.000 0.016 NA
#> SRR522071 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522072 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522073 1 0.3691 0.896 0.796 0.004 0.024 0.000 0.020 NA
#> SRR522074 1 0.3343 0.896 0.796 0.000 0.024 0.000 0.004 NA
#> SRR522075 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522076 1 0.3419 0.896 0.796 0.000 0.024 0.000 0.008 NA
#> SRR522077 1 0.0632 0.945 0.976 0.000 0.024 0.000 0.000 NA
#> SRR522078 1 0.3343 0.896 0.796 0.000 0.024 0.000 0.004 NA
#> SRR522079 2 0.6106 0.291 0.000 0.420 0.000 0.004 0.236 NA
#> SRR522080 2 0.6106 0.291 0.000 0.420 0.000 0.004 0.236 NA
#> SRR522081 5 0.2647 0.999 0.000 0.044 0.000 0.088 0.868 NA
#> SRR522082 5 0.2647 0.999 0.000 0.044 0.000 0.088 0.868 NA
#> SRR522083 5 0.2647 0.999 0.000 0.044 0.000 0.088 0.868 NA
#> SRR522084 5 0.2789 0.998 0.004 0.044 0.000 0.088 0.864 NA
#> SRR522085 5 0.2647 0.999 0.000 0.044 0.000 0.088 0.868 NA
#> SRR522086 5 0.2647 0.999 0.000 0.044 0.000 0.088 0.868 NA
#> SRR522087 5 0.2789 0.998 0.004 0.044 0.000 0.088 0.864 NA
#> SRR522088 5 0.2647 0.999 0.000 0.044 0.000 0.088 0.868 NA
#> SRR522089 3 0.2177 0.940 0.000 0.004 0.908 0.004 0.024 NA
#> SRR522090 3 0.2177 0.940 0.000 0.004 0.908 0.004 0.024 NA
#> SRR522091 3 0.2237 0.939 0.000 0.004 0.904 0.004 0.024 NA
#> SRR522092 3 0.2237 0.939 0.000 0.004 0.904 0.004 0.024 NA
#> SRR522093 3 0.2237 0.939 0.000 0.004 0.904 0.004 0.024 NA
#> SRR522094 3 0.2237 0.939 0.000 0.004 0.904 0.004 0.024 NA
#> SRR522095 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522096 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522097 3 0.2177 0.940 0.000 0.004 0.908 0.004 0.024 NA
#> SRR522098 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522099 3 0.0146 0.957 0.000 0.000 0.996 0.004 0.000 NA
#> SRR522100 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522101 3 0.0146 0.957 0.000 0.000 0.996 0.004 0.000 NA
#> SRR522102 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522103 3 0.0146 0.957 0.000 0.000 0.996 0.004 0.000 NA
#> SRR522104 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522105 3 0.0922 0.956 0.000 0.000 0.968 0.004 0.004 NA
#> SRR522106 3 0.1147 0.956 0.000 0.004 0.960 0.004 0.004 NA
#> SRR522107 3 0.0146 0.957 0.000 0.000 0.996 0.004 0.000 NA
#> SRR522108 2 0.3343 0.826 0.020 0.828 0.004 0.012 0.004 NA
#> SRR522109 2 0.2873 0.855 0.020 0.880 0.004 0.012 0.016 NA
#> SRR522110 2 0.2873 0.855 0.020 0.880 0.004 0.012 0.016 NA
#> SRR522111 2 0.3193 0.853 0.020 0.856 0.004 0.012 0.016 NA
#> SRR522112 2 0.2873 0.855 0.020 0.880 0.004 0.012 0.016 NA
#> SRR522113 2 0.2873 0.855 0.020 0.880 0.004 0.012 0.016 NA
#> SRR522114 4 0.6706 0.597 0.000 0.100 0.004 0.500 0.112 NA
#> SRR522115 4 0.6447 0.620 0.000 0.100 0.004 0.528 0.084 NA
#> SRR522116 4 0.6706 0.597 0.000 0.100 0.004 0.500 0.112 NA
#> SRR522117 4 0.6706 0.597 0.000 0.100 0.004 0.500 0.112 NA
#> SRR522118 2 0.1180 0.859 0.000 0.960 0.000 0.012 0.016 NA
#> SRR522119 2 0.0820 0.856 0.000 0.972 0.000 0.012 0.000 NA
#> SRR522120 2 0.2447 0.844 0.000 0.900 0.004 0.020 0.024 NA
#> SRR522121 2 0.2447 0.844 0.000 0.900 0.004 0.020 0.024 NA
#> SRR522122 2 0.2447 0.844 0.000 0.900 0.004 0.020 0.024 NA
#> SRR522123 2 0.2447 0.844 0.000 0.900 0.004 0.020 0.024 NA
#> SRR522124 4 0.6693 0.601 0.000 0.100 0.004 0.504 0.112 NA
#> SRR522125 4 0.6624 0.608 0.000 0.100 0.004 0.512 0.104 NA
#> SRR522126 4 0.6693 0.601 0.000 0.100 0.004 0.504 0.112 NA
#> SRR522127 4 0.6693 0.601 0.000 0.100 0.004 0.504 0.112 NA
#> SRR522128 2 0.2476 0.819 0.000 0.880 0.000 0.012 0.012 NA
#> SRR522129 2 0.2476 0.819 0.000 0.880 0.000 0.012 0.012 NA
#> SRR522130 2 0.1870 0.855 0.000 0.928 0.004 0.012 0.012 NA
#> SRR522131 4 0.2854 0.751 0.000 0.048 0.004 0.860 0.088 NA
#> SRR522132 4 0.2854 0.751 0.000 0.048 0.004 0.860 0.088 NA
#> SRR522133 4 0.2854 0.751 0.000 0.048 0.004 0.860 0.088 NA
#> SRR522134 4 0.2854 0.751 0.000 0.048 0.004 0.860 0.088 NA
#> SRR522135 4 0.2803 0.752 0.000 0.048 0.004 0.864 0.084 NA
#> SRR522136 4 0.3161 0.732 0.008 0.004 0.004 0.840 0.020 NA
#> SRR522137 4 0.3320 0.729 0.016 0.000 0.008 0.832 0.020 NA
#> SRR522138 4 0.1655 0.731 0.000 0.012 0.004 0.936 0.004 NA
#> SRR522139 4 0.3761 0.724 0.020 0.000 0.024 0.812 0.020 NA
#> SRR522140 4 0.3761 0.724 0.020 0.000 0.024 0.812 0.020 NA
#> SRR522141 4 0.3761 0.724 0.020 0.000 0.024 0.812 0.020 NA
#> SRR522142 4 0.3761 0.724 0.020 0.000 0.024 0.812 0.020 NA
#> SRR522143 4 0.3056 0.750 0.000 0.048 0.004 0.856 0.084 NA
#> SRR522144 4 0.2991 0.750 0.000 0.044 0.004 0.860 0.084 NA
#> SRR522145 4 0.3761 0.724 0.020 0.000 0.024 0.812 0.020 NA
#> SRR522146 4 0.3056 0.750 0.000 0.048 0.004 0.856 0.084 NA
#> SRR522147 4 0.3056 0.750 0.000 0.048 0.004 0.856 0.084 NA
#> SRR522148 4 0.3761 0.724 0.020 0.000 0.024 0.812 0.020 NA
#> SRR522149 4 0.2996 0.750 0.000 0.048 0.004 0.856 0.088 NA
#> SRR522150 4 0.3056 0.750 0.000 0.048 0.004 0.856 0.084 NA
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 13957 rows and 88 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 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.849 0.953 0.977 0.5031 0.494 0.494
#> 3 3 0.923 0.948 0.970 0.2566 0.857 0.715
#> 4 4 0.945 0.893 0.955 0.1780 0.817 0.543
#> 5 5 0.853 0.862 0.884 0.0731 0.919 0.691
#> 6 6 0.951 0.913 0.908 0.0343 0.979 0.890
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 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
#> SRR522063 1 0.0000 0.9522 1.000 0.000
#> SRR522064 1 0.0000 0.9522 1.000 0.000
#> SRR522065 1 0.0000 0.9522 1.000 0.000
#> SRR522066 1 0.0000 0.9522 1.000 0.000
#> SRR522067 1 0.0000 0.9522 1.000 0.000
#> SRR522068 1 0.0000 0.9522 1.000 0.000
#> SRR522069 1 0.0000 0.9522 1.000 0.000
#> SRR522070 1 0.0000 0.9522 1.000 0.000
#> SRR522071 1 0.0000 0.9522 1.000 0.000
#> SRR522072 1 0.0000 0.9522 1.000 0.000
#> SRR522073 1 0.0000 0.9522 1.000 0.000
#> SRR522074 1 0.0000 0.9522 1.000 0.000
#> SRR522075 1 0.0000 0.9522 1.000 0.000
#> SRR522076 1 0.0000 0.9522 1.000 0.000
#> SRR522077 1 0.0000 0.9522 1.000 0.000
#> SRR522078 1 0.0000 0.9522 1.000 0.000
#> SRR522079 2 0.0000 0.9988 0.000 1.000
#> SRR522080 2 0.0000 0.9988 0.000 1.000
#> SRR522081 2 0.0000 0.9988 0.000 1.000
#> SRR522082 2 0.0000 0.9988 0.000 1.000
#> SRR522083 2 0.0000 0.9988 0.000 1.000
#> SRR522084 2 0.0000 0.9988 0.000 1.000
#> SRR522085 2 0.0000 0.9988 0.000 1.000
#> SRR522086 2 0.0000 0.9988 0.000 1.000
#> SRR522087 2 0.0000 0.9988 0.000 1.000
#> SRR522088 2 0.0000 0.9988 0.000 1.000
#> SRR522089 1 0.0376 0.9525 0.996 0.004
#> SRR522090 1 0.9988 0.0898 0.520 0.480
#> SRR522091 1 0.0376 0.9525 0.996 0.004
#> SRR522092 1 0.0376 0.9525 0.996 0.004
#> SRR522093 1 0.0376 0.9525 0.996 0.004
#> SRR522094 1 0.0376 0.9525 0.996 0.004
#> SRR522095 1 0.0376 0.9525 0.996 0.004
#> SRR522096 1 0.0376 0.9525 0.996 0.004
#> SRR522097 1 0.0376 0.9525 0.996 0.004
#> SRR522098 1 0.0376 0.9525 0.996 0.004
#> SRR522099 1 0.0376 0.9525 0.996 0.004
#> SRR522100 1 0.0376 0.9525 0.996 0.004
#> SRR522101 1 0.0376 0.9525 0.996 0.004
#> SRR522102 1 0.0376 0.9525 0.996 0.004
#> SRR522103 1 0.0376 0.9525 0.996 0.004
#> SRR522104 1 0.0376 0.9525 0.996 0.004
#> SRR522105 1 0.0376 0.9525 0.996 0.004
#> SRR522106 1 0.0376 0.9525 0.996 0.004
#> SRR522107 1 0.0376 0.9525 0.996 0.004
#> SRR522108 2 0.0000 0.9988 0.000 1.000
#> SRR522109 2 0.0000 0.9988 0.000 1.000
#> SRR522110 2 0.0000 0.9988 0.000 1.000
#> SRR522111 2 0.0000 0.9988 0.000 1.000
#> SRR522112 2 0.0000 0.9988 0.000 1.000
#> SRR522113 2 0.0000 0.9988 0.000 1.000
#> SRR522114 2 0.0000 0.9988 0.000 1.000
#> SRR522115 1 0.1184 0.9459 0.984 0.016
#> SRR522116 2 0.0000 0.9988 0.000 1.000
#> SRR522117 2 0.0000 0.9988 0.000 1.000
#> SRR522118 2 0.0000 0.9988 0.000 1.000
#> SRR522119 2 0.0000 0.9988 0.000 1.000
#> SRR522120 2 0.0000 0.9988 0.000 1.000
#> SRR522121 2 0.0000 0.9988 0.000 1.000
#> SRR522122 2 0.0000 0.9988 0.000 1.000
#> SRR522123 2 0.0000 0.9988 0.000 1.000
#> SRR522124 2 0.0000 0.9988 0.000 1.000
#> SRR522125 2 0.0000 0.9988 0.000 1.000
#> SRR522126 2 0.0000 0.9988 0.000 1.000
#> SRR522127 2 0.0000 0.9988 0.000 1.000
#> SRR522128 2 0.0000 0.9988 0.000 1.000
#> SRR522129 2 0.0000 0.9988 0.000 1.000
#> SRR522130 2 0.0000 0.9988 0.000 1.000
#> SRR522131 2 0.0376 0.9968 0.004 0.996
#> SRR522132 2 0.0376 0.9968 0.004 0.996
#> SRR522133 2 0.0376 0.9968 0.004 0.996
#> SRR522134 2 0.0376 0.9968 0.004 0.996
#> SRR522135 2 0.0376 0.9968 0.004 0.996
#> SRR522136 1 0.6973 0.7998 0.812 0.188
#> SRR522137 1 0.6712 0.8145 0.824 0.176
#> SRR522138 2 0.0376 0.9968 0.004 0.996
#> SRR522139 1 0.6712 0.8145 0.824 0.176
#> SRR522140 1 0.6712 0.8145 0.824 0.176
#> SRR522141 1 0.6712 0.8145 0.824 0.176
#> SRR522142 1 0.6712 0.8145 0.824 0.176
#> SRR522143 2 0.0376 0.9968 0.004 0.996
#> SRR522144 2 0.0376 0.9968 0.004 0.996
#> SRR522145 1 0.6712 0.8145 0.824 0.176
#> SRR522146 2 0.0376 0.9968 0.004 0.996
#> SRR522147 2 0.0376 0.9968 0.004 0.996
#> SRR522148 1 0.6712 0.8145 0.824 0.176
#> SRR522149 2 0.0376 0.9968 0.004 0.996
#> SRR522150 2 0.0376 0.9968 0.004 0.996
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 0.881 1.000 0.000 0.000
#> SRR522064 1 0.000 0.881 1.000 0.000 0.000
#> SRR522065 1 0.000 0.881 1.000 0.000 0.000
#> SRR522066 1 0.000 0.881 1.000 0.000 0.000
#> SRR522067 1 0.000 0.881 1.000 0.000 0.000
#> SRR522068 1 0.000 0.881 1.000 0.000 0.000
#> SRR522069 1 0.000 0.881 1.000 0.000 0.000
#> SRR522070 1 0.000 0.881 1.000 0.000 0.000
#> SRR522071 1 0.000 0.881 1.000 0.000 0.000
#> SRR522072 1 0.000 0.881 1.000 0.000 0.000
#> SRR522073 1 0.000 0.881 1.000 0.000 0.000
#> SRR522074 1 0.000 0.881 1.000 0.000 0.000
#> SRR522075 1 0.000 0.881 1.000 0.000 0.000
#> SRR522076 1 0.000 0.881 1.000 0.000 0.000
#> SRR522077 1 0.000 0.881 1.000 0.000 0.000
#> SRR522078 1 0.000 0.881 1.000 0.000 0.000
#> SRR522079 2 0.000 1.000 0.000 1.000 0.000
#> SRR522080 2 0.000 1.000 0.000 1.000 0.000
#> SRR522081 2 0.000 1.000 0.000 1.000 0.000
#> SRR522082 2 0.000 1.000 0.000 1.000 0.000
#> SRR522083 2 0.000 1.000 0.000 1.000 0.000
#> SRR522084 2 0.000 1.000 0.000 1.000 0.000
#> SRR522085 2 0.000 1.000 0.000 1.000 0.000
#> SRR522086 2 0.000 1.000 0.000 1.000 0.000
#> SRR522087 2 0.000 1.000 0.000 1.000 0.000
#> SRR522088 2 0.000 1.000 0.000 1.000 0.000
#> SRR522089 3 0.000 1.000 0.000 0.000 1.000
#> SRR522090 3 0.000 1.000 0.000 0.000 1.000
#> SRR522091 3 0.000 1.000 0.000 0.000 1.000
#> SRR522092 3 0.000 1.000 0.000 0.000 1.000
#> SRR522093 3 0.000 1.000 0.000 0.000 1.000
#> SRR522094 3 0.000 1.000 0.000 0.000 1.000
#> SRR522095 3 0.000 1.000 0.000 0.000 1.000
#> SRR522096 3 0.000 1.000 0.000 0.000 1.000
#> SRR522097 3 0.000 1.000 0.000 0.000 1.000
#> SRR522098 3 0.000 1.000 0.000 0.000 1.000
#> SRR522099 3 0.000 1.000 0.000 0.000 1.000
#> SRR522100 3 0.000 1.000 0.000 0.000 1.000
#> SRR522101 3 0.000 1.000 0.000 0.000 1.000
#> SRR522102 3 0.000 1.000 0.000 0.000 1.000
#> SRR522103 3 0.000 1.000 0.000 0.000 1.000
#> SRR522104 3 0.000 1.000 0.000 0.000 1.000
#> SRR522105 3 0.000 1.000 0.000 0.000 1.000
#> SRR522106 3 0.000 1.000 0.000 0.000 1.000
#> SRR522107 3 0.000 1.000 0.000 0.000 1.000
#> SRR522108 2 0.000 1.000 0.000 1.000 0.000
#> SRR522109 2 0.000 1.000 0.000 1.000 0.000
#> SRR522110 2 0.000 1.000 0.000 1.000 0.000
#> SRR522111 2 0.000 1.000 0.000 1.000 0.000
#> SRR522112 2 0.000 1.000 0.000 1.000 0.000
#> SRR522113 2 0.000 1.000 0.000 1.000 0.000
#> SRR522114 2 0.000 1.000 0.000 1.000 0.000
#> SRR522115 3 0.000 1.000 0.000 0.000 1.000
#> SRR522116 2 0.000 1.000 0.000 1.000 0.000
#> SRR522117 2 0.000 1.000 0.000 1.000 0.000
#> SRR522118 2 0.000 1.000 0.000 1.000 0.000
#> SRR522119 2 0.000 1.000 0.000 1.000 0.000
#> SRR522120 2 0.000 1.000 0.000 1.000 0.000
#> SRR522121 2 0.000 1.000 0.000 1.000 0.000
#> SRR522122 2 0.000 1.000 0.000 1.000 0.000
#> SRR522123 2 0.000 1.000 0.000 1.000 0.000
#> SRR522124 2 0.000 1.000 0.000 1.000 0.000
#> SRR522125 2 0.000 1.000 0.000 1.000 0.000
#> SRR522126 2 0.000 1.000 0.000 1.000 0.000
#> SRR522127 2 0.000 1.000 0.000 1.000 0.000
#> SRR522128 2 0.000 1.000 0.000 1.000 0.000
#> SRR522129 2 0.000 1.000 0.000 1.000 0.000
#> SRR522130 2 0.000 1.000 0.000 1.000 0.000
#> SRR522131 2 0.000 1.000 0.000 1.000 0.000
#> SRR522132 2 0.000 1.000 0.000 1.000 0.000
#> SRR522133 2 0.000 1.000 0.000 1.000 0.000
#> SRR522134 2 0.000 1.000 0.000 1.000 0.000
#> SRR522135 2 0.000 1.000 0.000 1.000 0.000
#> SRR522136 1 0.580 0.716 0.712 0.008 0.280
#> SRR522137 1 0.580 0.716 0.712 0.008 0.280
#> SRR522138 1 0.587 0.566 0.684 0.312 0.004
#> SRR522139 1 0.580 0.716 0.712 0.008 0.280
#> SRR522140 1 0.580 0.716 0.712 0.008 0.280
#> SRR522141 1 0.580 0.716 0.712 0.008 0.280
#> SRR522142 1 0.580 0.716 0.712 0.008 0.280
#> SRR522143 2 0.000 1.000 0.000 1.000 0.000
#> SRR522144 2 0.000 1.000 0.000 1.000 0.000
#> SRR522145 1 0.580 0.716 0.712 0.008 0.280
#> SRR522146 2 0.000 1.000 0.000 1.000 0.000
#> SRR522147 2 0.000 1.000 0.000 1.000 0.000
#> SRR522148 1 0.580 0.716 0.712 0.008 0.280
#> SRR522149 2 0.000 1.000 0.000 1.000 0.000
#> SRR522150 2 0.000 1.000 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522079 2 0.0592 0.9295 0.000 0.984 0.000 0.016
#> SRR522080 2 0.0592 0.9295 0.000 0.984 0.000 0.016
#> SRR522081 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522082 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522083 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522084 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522085 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522086 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522087 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522088 2 0.1022 0.9246 0.000 0.968 0.000 0.032
#> SRR522089 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522090 3 0.0336 0.9792 0.000 0.008 0.992 0.000
#> SRR522091 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.9872 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522114 2 0.4907 0.1856 0.000 0.580 0.000 0.420
#> SRR522115 3 0.4917 0.7192 0.008 0.044 0.772 0.176
#> SRR522116 2 0.4866 0.2371 0.000 0.596 0.000 0.404
#> SRR522117 2 0.4977 0.0356 0.000 0.540 0.000 0.460
#> SRR522118 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522124 4 0.4830 0.4135 0.000 0.392 0.000 0.608
#> SRR522125 4 0.4790 0.4410 0.000 0.380 0.000 0.620
#> SRR522126 4 0.4804 0.4327 0.000 0.384 0.000 0.616
#> SRR522127 4 0.4907 0.3394 0.000 0.420 0.000 0.580
#> SRR522128 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.9332 0.000 1.000 0.000 0.000
#> SRR522131 4 0.1867 0.8680 0.000 0.072 0.000 0.928
#> SRR522132 4 0.0921 0.8926 0.000 0.028 0.000 0.972
#> SRR522133 4 0.1557 0.8785 0.000 0.056 0.000 0.944
#> SRR522134 4 0.2647 0.8253 0.000 0.120 0.000 0.880
#> SRR522135 4 0.0000 0.8960 0.000 0.000 0.000 1.000
#> SRR522136 4 0.0937 0.8932 0.012 0.000 0.012 0.976
#> SRR522137 4 0.0937 0.8932 0.012 0.000 0.012 0.976
#> SRR522138 4 0.0000 0.8960 0.000 0.000 0.000 1.000
#> SRR522139 4 0.1174 0.8910 0.020 0.000 0.012 0.968
#> SRR522140 4 0.1174 0.8910 0.020 0.000 0.012 0.968
#> SRR522141 4 0.1174 0.8910 0.020 0.000 0.012 0.968
#> SRR522142 4 0.1174 0.8910 0.020 0.000 0.012 0.968
#> SRR522143 4 0.0336 0.8964 0.000 0.008 0.000 0.992
#> SRR522144 4 0.0000 0.8960 0.000 0.000 0.000 1.000
#> SRR522145 4 0.1174 0.8910 0.020 0.000 0.012 0.968
#> SRR522146 4 0.0469 0.8962 0.000 0.012 0.000 0.988
#> SRR522147 4 0.0921 0.8922 0.000 0.028 0.000 0.972
#> SRR522148 4 0.1174 0.8910 0.020 0.000 0.012 0.968
#> SRR522149 4 0.0469 0.8961 0.000 0.012 0.000 0.988
#> SRR522150 4 0.0469 0.8962 0.000 0.012 0.000 0.988
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000
#> SRR522079 2 0.4268 0.644 0.000 0.772 0.000 0.144 0.084
#> SRR522080 2 0.4268 0.644 0.000 0.772 0.000 0.144 0.084
#> SRR522081 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522082 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522083 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522084 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522085 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522086 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522087 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522088 5 0.6068 0.761 0.000 0.140 0.000 0.328 0.532
#> SRR522089 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.974 0.000 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0912 0.928 0.000 0.972 0.000 0.012 0.016
#> SRR522109 2 0.0162 0.942 0.000 0.996 0.000 0.004 0.000
#> SRR522110 2 0.0162 0.942 0.000 0.996 0.000 0.004 0.000
#> SRR522111 2 0.0290 0.938 0.000 0.992 0.000 0.000 0.008
#> SRR522112 2 0.0162 0.942 0.000 0.996 0.000 0.004 0.000
#> SRR522113 2 0.0162 0.942 0.000 0.996 0.000 0.004 0.000
#> SRR522114 5 0.5983 0.698 0.000 0.252 0.000 0.168 0.580
#> SRR522115 3 0.7143 0.197 0.004 0.204 0.492 0.028 0.272
#> SRR522116 5 0.5983 0.698 0.000 0.252 0.000 0.168 0.580
#> SRR522117 5 0.5952 0.698 0.000 0.252 0.000 0.164 0.584
#> SRR522118 2 0.0451 0.940 0.000 0.988 0.000 0.004 0.008
#> SRR522119 2 0.0579 0.938 0.000 0.984 0.000 0.008 0.008
#> SRR522120 2 0.0609 0.932 0.000 0.980 0.000 0.000 0.020
#> SRR522121 2 0.0609 0.932 0.000 0.980 0.000 0.000 0.020
#> SRR522122 2 0.0609 0.932 0.000 0.980 0.000 0.000 0.020
#> SRR522123 2 0.0609 0.932 0.000 0.980 0.000 0.000 0.020
#> SRR522124 5 0.6301 0.691 0.000 0.252 0.000 0.216 0.532
#> SRR522125 5 0.6341 0.682 0.000 0.256 0.000 0.220 0.524
#> SRR522126 5 0.6301 0.691 0.000 0.252 0.000 0.216 0.532
#> SRR522127 5 0.6278 0.693 0.000 0.252 0.000 0.212 0.536
#> SRR522128 2 0.0579 0.938 0.000 0.984 0.000 0.008 0.008
#> SRR522129 2 0.0579 0.938 0.000 0.984 0.000 0.008 0.008
#> SRR522130 2 0.0609 0.932 0.000 0.980 0.000 0.000 0.020
#> SRR522131 4 0.0898 0.728 0.000 0.008 0.000 0.972 0.020
#> SRR522132 4 0.0898 0.733 0.000 0.008 0.000 0.972 0.020
#> SRR522133 4 0.1168 0.723 0.000 0.008 0.000 0.960 0.032
#> SRR522134 4 0.1310 0.711 0.000 0.020 0.000 0.956 0.024
#> SRR522135 4 0.0404 0.749 0.000 0.000 0.000 0.988 0.012
#> SRR522136 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522137 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522138 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522139 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522140 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522141 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522142 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522143 4 0.0162 0.745 0.000 0.004 0.000 0.996 0.000
#> SRR522144 4 0.1341 0.754 0.000 0.000 0.000 0.944 0.056
#> SRR522145 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522146 4 0.0162 0.745 0.000 0.004 0.000 0.996 0.000
#> SRR522147 4 0.1282 0.706 0.000 0.004 0.000 0.952 0.044
#> SRR522148 4 0.4045 0.754 0.000 0.000 0.000 0.644 0.356
#> SRR522149 4 0.0451 0.741 0.000 0.004 0.000 0.988 0.008
#> SRR522150 4 0.0324 0.743 0.000 0.004 0.000 0.992 0.004
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522079 2 0.2362 0.834 0 0.860 0.000 0.000 0.136 0.004
#> SRR522080 2 0.2362 0.834 0 0.860 0.000 0.000 0.136 0.004
#> SRR522081 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522082 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522083 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522084 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522085 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522086 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522087 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522088 5 0.2571 1.000 0 0.060 0.000 0.000 0.876 0.064
#> SRR522089 3 0.0146 0.995 0 0.000 0.996 0.000 0.000 0.004
#> SRR522090 3 0.0146 0.995 0 0.000 0.996 0.000 0.000 0.004
#> SRR522091 3 0.0291 0.996 0 0.000 0.992 0.000 0.004 0.004
#> SRR522092 3 0.0146 0.995 0 0.000 0.996 0.000 0.000 0.004
#> SRR522093 3 0.0291 0.996 0 0.000 0.992 0.000 0.004 0.004
#> SRR522094 3 0.0146 0.995 0 0.000 0.996 0.000 0.000 0.004
#> SRR522095 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522096 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522097 3 0.0146 0.995 0 0.000 0.996 0.000 0.000 0.004
#> SRR522098 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522099 3 0.0000 0.996 0 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522101 3 0.0000 0.996 0 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522103 3 0.0000 0.996 0 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522105 3 0.0000 0.996 0 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0260 0.995 0 0.000 0.992 0.000 0.008 0.000
#> SRR522107 3 0.0000 0.996 0 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0146 0.961 0 0.996 0.000 0.000 0.004 0.000
#> SRR522109 2 0.0508 0.964 0 0.984 0.000 0.000 0.004 0.012
#> SRR522110 2 0.0405 0.964 0 0.988 0.000 0.000 0.004 0.008
#> SRR522111 2 0.0458 0.963 0 0.984 0.000 0.000 0.000 0.016
#> SRR522112 2 0.0508 0.964 0 0.984 0.000 0.000 0.004 0.012
#> SRR522113 2 0.0363 0.964 0 0.988 0.000 0.000 0.000 0.012
#> SRR522114 6 0.1788 0.963 0 0.040 0.000 0.004 0.028 0.928
#> SRR522115 6 0.2711 0.862 0 0.024 0.080 0.020 0.000 0.876
#> SRR522116 6 0.1713 0.960 0 0.044 0.000 0.000 0.028 0.928
#> SRR522117 6 0.1708 0.965 0 0.040 0.000 0.004 0.024 0.932
#> SRR522118 2 0.0260 0.963 0 0.992 0.000 0.000 0.000 0.008
#> SRR522119 2 0.0146 0.961 0 0.996 0.000 0.000 0.000 0.004
#> SRR522120 2 0.1007 0.954 0 0.956 0.000 0.000 0.000 0.044
#> SRR522121 2 0.1007 0.954 0 0.956 0.000 0.000 0.000 0.044
#> SRR522122 2 0.1007 0.954 0 0.956 0.000 0.000 0.000 0.044
#> SRR522123 2 0.1007 0.954 0 0.956 0.000 0.000 0.000 0.044
#> SRR522124 6 0.1453 0.969 0 0.040 0.000 0.008 0.008 0.944
#> SRR522125 6 0.1340 0.967 0 0.040 0.000 0.008 0.004 0.948
#> SRR522126 6 0.1453 0.969 0 0.040 0.000 0.008 0.008 0.944
#> SRR522127 6 0.1453 0.969 0 0.040 0.000 0.008 0.008 0.944
#> SRR522128 2 0.0146 0.961 0 0.996 0.000 0.000 0.000 0.004
#> SRR522129 2 0.0146 0.961 0 0.996 0.000 0.000 0.000 0.004
#> SRR522130 2 0.1075 0.953 0 0.952 0.000 0.000 0.000 0.048
#> SRR522131 4 0.6239 0.669 0 0.036 0.000 0.480 0.340 0.144
#> SRR522132 4 0.6218 0.686 0 0.036 0.000 0.504 0.308 0.152
#> SRR522133 4 0.6371 0.678 0 0.044 0.000 0.492 0.304 0.160
#> SRR522134 4 0.6395 0.665 0 0.044 0.000 0.476 0.324 0.156
#> SRR522135 4 0.6036 0.697 0 0.032 0.000 0.532 0.296 0.140
#> SRR522136 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522137 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522138 4 0.0909 0.698 0 0.000 0.000 0.968 0.012 0.020
#> SRR522139 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522140 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522141 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522142 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522143 4 0.5759 0.690 0 0.020 0.000 0.528 0.336 0.116
#> SRR522144 4 0.5431 0.697 0 0.008 0.000 0.560 0.320 0.112
#> SRR522145 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522146 4 0.5881 0.685 0 0.028 0.000 0.516 0.344 0.112
#> SRR522147 4 0.5982 0.646 0 0.028 0.000 0.472 0.384 0.116
#> SRR522148 4 0.0363 0.695 0 0.000 0.000 0.988 0.000 0.012
#> SRR522149 4 0.5867 0.665 0 0.028 0.000 0.496 0.372 0.104
#> SRR522150 4 0.5899 0.679 0 0.028 0.000 0.508 0.352 0.112
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
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 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'MAD' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 4.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.995 0.998 0.3047 0.699 0.699
#> 3 3 1.000 0.999 1.000 0.8533 0.737 0.624
#> 4 4 1.000 0.978 0.990 0.0924 0.937 0.856
#> 5 5 0.860 0.933 0.957 0.1142 0.934 0.824
#> 6 6 0.805 0.813 0.875 0.0645 0.947 0.831
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
#> SRR522063 1 0.000 1.000 1.000 0.000
#> SRR522064 1 0.000 1.000 1.000 0.000
#> SRR522065 1 0.000 1.000 1.000 0.000
#> SRR522066 1 0.000 1.000 1.000 0.000
#> SRR522067 1 0.000 1.000 1.000 0.000
#> SRR522068 1 0.000 1.000 1.000 0.000
#> SRR522069 1 0.000 1.000 1.000 0.000
#> SRR522070 1 0.000 1.000 1.000 0.000
#> SRR522071 1 0.000 1.000 1.000 0.000
#> SRR522072 1 0.000 1.000 1.000 0.000
#> SRR522073 1 0.000 1.000 1.000 0.000
#> SRR522074 1 0.000 1.000 1.000 0.000
#> SRR522075 1 0.000 1.000 1.000 0.000
#> SRR522076 1 0.000 1.000 1.000 0.000
#> SRR522077 1 0.000 1.000 1.000 0.000
#> SRR522078 1 0.000 1.000 1.000 0.000
#> SRR522079 2 0.184 0.969 0.028 0.972
#> SRR522080 2 0.000 0.997 0.000 1.000
#> SRR522081 2 0.000 0.997 0.000 1.000
#> SRR522082 2 0.000 0.997 0.000 1.000
#> SRR522083 2 0.000 0.997 0.000 1.000
#> SRR522084 2 0.000 0.997 0.000 1.000
#> SRR522085 2 0.000 0.997 0.000 1.000
#> SRR522086 2 0.000 0.997 0.000 1.000
#> SRR522087 2 0.000 0.997 0.000 1.000
#> SRR522088 2 0.000 0.997 0.000 1.000
#> SRR522089 2 0.000 0.997 0.000 1.000
#> SRR522090 2 0.000 0.997 0.000 1.000
#> SRR522091 2 0.000 0.997 0.000 1.000
#> SRR522092 2 0.000 0.997 0.000 1.000
#> SRR522093 2 0.000 0.997 0.000 1.000
#> SRR522094 2 0.000 0.997 0.000 1.000
#> SRR522095 2 0.697 0.770 0.188 0.812
#> SRR522096 2 0.000 0.997 0.000 1.000
#> SRR522097 2 0.000 0.997 0.000 1.000
#> SRR522098 2 0.000 0.997 0.000 1.000
#> SRR522099 2 0.000 0.997 0.000 1.000
#> SRR522100 2 0.000 0.997 0.000 1.000
#> SRR522101 2 0.000 0.997 0.000 1.000
#> SRR522102 2 0.000 0.997 0.000 1.000
#> SRR522103 2 0.000 0.997 0.000 1.000
#> SRR522104 2 0.000 0.997 0.000 1.000
#> SRR522105 2 0.000 0.997 0.000 1.000
#> SRR522106 2 0.000 0.997 0.000 1.000
#> SRR522107 2 0.000 0.997 0.000 1.000
#> SRR522108 2 0.000 0.997 0.000 1.000
#> SRR522109 2 0.000 0.997 0.000 1.000
#> SRR522110 2 0.000 0.997 0.000 1.000
#> SRR522111 2 0.000 0.997 0.000 1.000
#> SRR522112 2 0.000 0.997 0.000 1.000
#> SRR522113 2 0.000 0.997 0.000 1.000
#> SRR522114 2 0.000 0.997 0.000 1.000
#> SRR522115 2 0.000 0.997 0.000 1.000
#> SRR522116 2 0.000 0.997 0.000 1.000
#> SRR522117 2 0.000 0.997 0.000 1.000
#> SRR522118 2 0.000 0.997 0.000 1.000
#> SRR522119 2 0.000 0.997 0.000 1.000
#> SRR522120 2 0.000 0.997 0.000 1.000
#> SRR522121 2 0.000 0.997 0.000 1.000
#> SRR522122 2 0.000 0.997 0.000 1.000
#> SRR522123 2 0.000 0.997 0.000 1.000
#> SRR522124 2 0.000 0.997 0.000 1.000
#> SRR522125 2 0.000 0.997 0.000 1.000
#> SRR522126 2 0.000 0.997 0.000 1.000
#> SRR522127 2 0.000 0.997 0.000 1.000
#> SRR522128 2 0.000 0.997 0.000 1.000
#> SRR522129 2 0.000 0.997 0.000 1.000
#> SRR522130 2 0.000 0.997 0.000 1.000
#> SRR522131 2 0.000 0.997 0.000 1.000
#> SRR522132 2 0.000 0.997 0.000 1.000
#> SRR522133 2 0.000 0.997 0.000 1.000
#> SRR522134 2 0.000 0.997 0.000 1.000
#> SRR522135 2 0.000 0.997 0.000 1.000
#> SRR522136 2 0.000 0.997 0.000 1.000
#> SRR522137 2 0.000 0.997 0.000 1.000
#> SRR522138 2 0.000 0.997 0.000 1.000
#> SRR522139 2 0.000 0.997 0.000 1.000
#> SRR522140 2 0.000 0.997 0.000 1.000
#> SRR522141 2 0.000 0.997 0.000 1.000
#> SRR522142 2 0.000 0.997 0.000 1.000
#> SRR522143 2 0.000 0.997 0.000 1.000
#> SRR522144 2 0.000 0.997 0.000 1.000
#> SRR522145 2 0.000 0.997 0.000 1.000
#> SRR522146 2 0.000 0.997 0.000 1.000
#> SRR522147 2 0.000 0.997 0.000 1.000
#> SRR522148 2 0.000 0.997 0.000 1.000
#> SRR522149 2 0.000 0.997 0.000 1.000
#> SRR522150 2 0.000 0.997 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.000 1.000 1.000 0.000 0
#> SRR522064 1 0.000 1.000 1.000 0.000 0
#> SRR522065 1 0.000 1.000 1.000 0.000 0
#> SRR522066 1 0.000 1.000 1.000 0.000 0
#> SRR522067 1 0.000 1.000 1.000 0.000 0
#> SRR522068 1 0.000 1.000 1.000 0.000 0
#> SRR522069 1 0.000 1.000 1.000 0.000 0
#> SRR522070 1 0.000 1.000 1.000 0.000 0
#> SRR522071 1 0.000 1.000 1.000 0.000 0
#> SRR522072 1 0.000 1.000 1.000 0.000 0
#> SRR522073 1 0.000 1.000 1.000 0.000 0
#> SRR522074 1 0.000 1.000 1.000 0.000 0
#> SRR522075 1 0.000 1.000 1.000 0.000 0
#> SRR522076 1 0.000 1.000 1.000 0.000 0
#> SRR522077 1 0.000 1.000 1.000 0.000 0
#> SRR522078 1 0.000 1.000 1.000 0.000 0
#> SRR522079 2 0.116 0.971 0.028 0.972 0
#> SRR522080 2 0.000 0.999 0.000 1.000 0
#> SRR522081 2 0.000 0.999 0.000 1.000 0
#> SRR522082 2 0.000 0.999 0.000 1.000 0
#> SRR522083 2 0.000 0.999 0.000 1.000 0
#> SRR522084 2 0.000 0.999 0.000 1.000 0
#> SRR522085 2 0.000 0.999 0.000 1.000 0
#> SRR522086 2 0.000 0.999 0.000 1.000 0
#> SRR522087 2 0.000 0.999 0.000 1.000 0
#> SRR522088 2 0.000 0.999 0.000 1.000 0
#> SRR522089 3 0.000 1.000 0.000 0.000 1
#> SRR522090 3 0.000 1.000 0.000 0.000 1
#> SRR522091 3 0.000 1.000 0.000 0.000 1
#> SRR522092 3 0.000 1.000 0.000 0.000 1
#> SRR522093 3 0.000 1.000 0.000 0.000 1
#> SRR522094 3 0.000 1.000 0.000 0.000 1
#> SRR522095 3 0.000 1.000 0.000 0.000 1
#> SRR522096 3 0.000 1.000 0.000 0.000 1
#> SRR522097 3 0.000 1.000 0.000 0.000 1
#> SRR522098 3 0.000 1.000 0.000 0.000 1
#> SRR522099 3 0.000 1.000 0.000 0.000 1
#> SRR522100 3 0.000 1.000 0.000 0.000 1
#> SRR522101 3 0.000 1.000 0.000 0.000 1
#> SRR522102 3 0.000 1.000 0.000 0.000 1
#> SRR522103 3 0.000 1.000 0.000 0.000 1
#> SRR522104 3 0.000 1.000 0.000 0.000 1
#> SRR522105 3 0.000 1.000 0.000 0.000 1
#> SRR522106 3 0.000 1.000 0.000 0.000 1
#> SRR522107 3 0.000 1.000 0.000 0.000 1
#> SRR522108 2 0.000 0.999 0.000 1.000 0
#> SRR522109 2 0.000 0.999 0.000 1.000 0
#> SRR522110 2 0.000 0.999 0.000 1.000 0
#> SRR522111 2 0.000 0.999 0.000 1.000 0
#> SRR522112 2 0.000 0.999 0.000 1.000 0
#> SRR522113 2 0.000 0.999 0.000 1.000 0
#> SRR522114 2 0.000 0.999 0.000 1.000 0
#> SRR522115 2 0.000 0.999 0.000 1.000 0
#> SRR522116 2 0.000 0.999 0.000 1.000 0
#> SRR522117 2 0.000 0.999 0.000 1.000 0
#> SRR522118 2 0.000 0.999 0.000 1.000 0
#> SRR522119 2 0.000 0.999 0.000 1.000 0
#> SRR522120 2 0.000 0.999 0.000 1.000 0
#> SRR522121 2 0.000 0.999 0.000 1.000 0
#> SRR522122 2 0.000 0.999 0.000 1.000 0
#> SRR522123 2 0.000 0.999 0.000 1.000 0
#> SRR522124 2 0.000 0.999 0.000 1.000 0
#> SRR522125 2 0.000 0.999 0.000 1.000 0
#> SRR522126 2 0.000 0.999 0.000 1.000 0
#> SRR522127 2 0.000 0.999 0.000 1.000 0
#> SRR522128 2 0.000 0.999 0.000 1.000 0
#> SRR522129 2 0.000 0.999 0.000 1.000 0
#> SRR522130 2 0.000 0.999 0.000 1.000 0
#> SRR522131 2 0.000 0.999 0.000 1.000 0
#> SRR522132 2 0.000 0.999 0.000 1.000 0
#> SRR522133 2 0.000 0.999 0.000 1.000 0
#> SRR522134 2 0.000 0.999 0.000 1.000 0
#> SRR522135 2 0.000 0.999 0.000 1.000 0
#> SRR522136 2 0.000 0.999 0.000 1.000 0
#> SRR522137 2 0.000 0.999 0.000 1.000 0
#> SRR522138 2 0.000 0.999 0.000 1.000 0
#> SRR522139 2 0.000 0.999 0.000 1.000 0
#> SRR522140 2 0.000 0.999 0.000 1.000 0
#> SRR522141 2 0.000 0.999 0.000 1.000 0
#> SRR522142 2 0.000 0.999 0.000 1.000 0
#> SRR522143 2 0.000 0.999 0.000 1.000 0
#> SRR522144 2 0.000 0.999 0.000 1.000 0
#> SRR522145 2 0.000 0.999 0.000 1.000 0
#> SRR522146 2 0.000 0.999 0.000 1.000 0
#> SRR522147 2 0.000 0.999 0.000 1.000 0
#> SRR522148 2 0.000 0.999 0.000 1.000 0
#> SRR522149 2 0.000 0.999 0.000 1.000 0
#> SRR522150 2 0.000 0.999 0.000 1.000 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0 0.000
#> SRR522079 4 0.0000 0.644 0 0.000 0 1.000
#> SRR522080 4 0.0000 0.644 0 0.000 0 1.000
#> SRR522081 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522082 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522083 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522084 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522085 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522086 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522087 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522088 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522089 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1 0.000
#> SRR522108 4 0.4713 0.594 0 0.360 0 0.640
#> SRR522109 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522110 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522111 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522112 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522113 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522114 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522115 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522116 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522117 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522118 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522119 2 0.0188 0.995 0 0.996 0 0.004
#> SRR522120 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522121 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522122 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522123 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522124 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522125 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522126 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522127 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522128 4 0.2281 0.686 0 0.096 0 0.904
#> SRR522129 4 0.4898 0.487 0 0.416 0 0.584
#> SRR522130 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522131 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522132 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522133 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522134 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522135 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522136 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522137 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522138 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522139 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522140 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522141 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522142 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522143 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522144 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522145 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522146 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522147 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522148 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522149 2 0.0000 1.000 0 1.000 0 0.000
#> SRR522150 2 0.0000 1.000 0 1.000 0 0.000
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0 0.000 0.000
#> SRR522079 5 0.0000 0.532 0 0.000 0 0.000 1.000
#> SRR522080 5 0.0000 0.532 0 0.000 0 0.000 1.000
#> SRR522081 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522082 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522083 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522084 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522085 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522086 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522087 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522088 2 0.2648 0.818 0 0.848 0 0.152 0.000
#> SRR522089 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522090 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522091 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522092 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522093 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522094 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522095 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522096 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522097 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522098 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522099 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522100 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522101 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522102 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522103 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522104 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522105 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522106 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522107 3 0.0000 1.000 0 0.000 1 0.000 0.000
#> SRR522108 5 0.4761 0.460 0 0.356 0 0.028 0.616
#> SRR522109 2 0.0162 0.947 0 0.996 0 0.004 0.000
#> SRR522110 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522111 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522112 2 0.0609 0.939 0 0.980 0 0.020 0.000
#> SRR522113 2 0.0963 0.930 0 0.964 0 0.036 0.000
#> SRR522114 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522115 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522116 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522117 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522118 2 0.1121 0.924 0 0.956 0 0.044 0.000
#> SRR522119 2 0.1197 0.921 0 0.952 0 0.048 0.000
#> SRR522120 2 0.1197 0.921 0 0.952 0 0.048 0.000
#> SRR522121 2 0.1197 0.921 0 0.952 0 0.048 0.000
#> SRR522122 2 0.1197 0.921 0 0.952 0 0.048 0.000
#> SRR522123 2 0.1197 0.921 0 0.952 0 0.048 0.000
#> SRR522124 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522125 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522126 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522127 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522128 5 0.3058 0.564 0 0.096 0 0.044 0.860
#> SRR522129 5 0.5250 0.391 0 0.416 0 0.048 0.536
#> SRR522130 2 0.1197 0.921 0 0.952 0 0.048 0.000
#> SRR522131 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522132 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522133 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522134 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522135 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522136 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522137 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522138 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522139 4 0.3109 1.000 0 0.200 0 0.800 0.000
#> SRR522140 4 0.3109 1.000 0 0.200 0 0.800 0.000
#> SRR522141 4 0.3109 1.000 0 0.200 0 0.800 0.000
#> SRR522142 4 0.3109 1.000 0 0.200 0 0.800 0.000
#> SRR522143 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522144 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522145 4 0.3109 1.000 0 0.200 0 0.800 0.000
#> SRR522146 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522147 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522148 4 0.3109 1.000 0 0.200 0 0.800 0.000
#> SRR522149 2 0.0000 0.949 0 1.000 0 0.000 0.000
#> SRR522150 2 0.0000 0.949 0 1.000 0 0.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522064 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522065 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522066 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522067 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522068 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522069 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522070 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522071 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522072 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522073 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522074 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522075 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522076 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522077 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522078 1 0.000 1.000 1 0.000 0.000 0.000 0.0 0.000
#> SRR522079 6 0.380 0.611 0 0.424 0.000 0.000 0.0 0.576
#> SRR522080 6 0.380 0.611 0 0.424 0.000 0.000 0.0 0.576
#> SRR522081 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522082 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522083 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522084 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522085 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522086 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522087 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522088 4 0.279 0.696 0 0.000 0.000 0.800 0.2 0.000
#> SRR522089 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522090 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522091 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522092 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522093 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522094 3 0.371 0.751 0 0.000 0.620 0.000 0.0 0.380
#> SRR522095 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522096 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522097 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522098 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522099 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522100 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522101 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522102 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522103 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522104 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522105 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522106 3 0.380 0.746 0 0.000 0.576 0.000 0.0 0.424
#> SRR522107 3 0.000 0.782 0 0.000 1.000 0.000 0.0 0.000
#> SRR522108 6 0.610 -0.175 0 0.284 0.000 0.356 0.0 0.360
#> SRR522109 4 0.026 0.886 0 0.008 0.000 0.992 0.0 0.000
#> SRR522110 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522111 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522112 4 0.107 0.849 0 0.048 0.000 0.952 0.0 0.000
#> SRR522113 4 0.317 0.401 0 0.256 0.000 0.744 0.0 0.000
#> SRR522114 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522115 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522116 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522117 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522118 4 0.253 0.675 0 0.168 0.000 0.832 0.0 0.000
#> SRR522119 4 0.348 0.206 0 0.316 0.000 0.684 0.0 0.000
#> SRR522120 2 0.382 0.781 0 0.568 0.000 0.432 0.0 0.000
#> SRR522121 2 0.382 0.781 0 0.568 0.000 0.432 0.0 0.000
#> SRR522122 2 0.382 0.781 0 0.568 0.000 0.432 0.0 0.000
#> SRR522123 2 0.382 0.781 0 0.568 0.000 0.432 0.0 0.000
#> SRR522124 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522125 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522126 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522127 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522128 2 0.345 -0.445 0 0.780 0.000 0.032 0.0 0.188
#> SRR522129 2 0.320 0.484 0 0.740 0.000 0.260 0.0 0.000
#> SRR522130 2 0.382 0.781 0 0.568 0.000 0.432 0.0 0.000
#> SRR522131 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522132 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522133 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522134 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522135 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522136 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522137 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522138 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522139 5 0.279 1.000 0 0.000 0.000 0.200 0.8 0.000
#> SRR522140 5 0.279 1.000 0 0.000 0.000 0.200 0.8 0.000
#> SRR522141 5 0.279 1.000 0 0.000 0.000 0.200 0.8 0.000
#> SRR522142 5 0.279 1.000 0 0.000 0.000 0.200 0.8 0.000
#> SRR522143 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522144 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522145 5 0.279 1.000 0 0.000 0.000 0.200 0.8 0.000
#> SRR522146 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522147 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522148 5 0.279 1.000 0 0.000 0.000 0.200 0.8 0.000
#> SRR522149 4 0.000 0.893 0 0.000 0.000 1.000 0.0 0.000
#> SRR522150 4 0.000 0.893 0 0.000 0.000 1.000 0.0 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 13957 rows and 88 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.394 0.805 0.859 0.3866 0.515 0.515
#> 3 3 1.000 0.995 0.998 0.4628 0.921 0.846
#> 4 4 0.796 0.762 0.897 0.2441 0.851 0.658
#> 5 5 0.778 0.782 0.872 0.0819 0.850 0.542
#> 6 6 0.772 0.738 0.818 0.0318 0.963 0.844
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
#> SRR522063 1 0.9922 0.437 0.552 0.448
#> SRR522064 1 0.9922 0.437 0.552 0.448
#> SRR522065 1 0.9922 0.437 0.552 0.448
#> SRR522066 1 0.9922 0.437 0.552 0.448
#> SRR522067 1 0.9922 0.437 0.552 0.448
#> SRR522068 1 0.9922 0.437 0.552 0.448
#> SRR522069 1 0.9922 0.437 0.552 0.448
#> SRR522070 1 0.9922 0.437 0.552 0.448
#> SRR522071 1 0.9922 0.437 0.552 0.448
#> SRR522072 1 0.9922 0.437 0.552 0.448
#> SRR522073 1 0.9922 0.437 0.552 0.448
#> SRR522074 1 0.9922 0.437 0.552 0.448
#> SRR522075 1 0.9922 0.437 0.552 0.448
#> SRR522076 1 0.9922 0.437 0.552 0.448
#> SRR522077 1 0.9922 0.437 0.552 0.448
#> SRR522078 1 0.9922 0.437 0.552 0.448
#> SRR522079 2 0.5842 0.763 0.140 0.860
#> SRR522080 2 0.5842 0.763 0.140 0.860
#> SRR522081 2 0.0000 0.979 0.000 1.000
#> SRR522082 2 0.0000 0.979 0.000 1.000
#> SRR522083 2 0.0000 0.979 0.000 1.000
#> SRR522084 2 0.0000 0.979 0.000 1.000
#> SRR522085 2 0.0000 0.979 0.000 1.000
#> SRR522086 2 0.0000 0.979 0.000 1.000
#> SRR522087 2 0.0000 0.979 0.000 1.000
#> SRR522088 2 0.0000 0.979 0.000 1.000
#> SRR522089 1 0.7883 0.678 0.764 0.236
#> SRR522090 1 0.8081 0.671 0.752 0.248
#> SRR522091 1 0.7883 0.678 0.764 0.236
#> SRR522092 1 0.7883 0.678 0.764 0.236
#> SRR522093 1 0.7883 0.678 0.764 0.236
#> SRR522094 1 0.7883 0.678 0.764 0.236
#> SRR522095 1 0.7883 0.678 0.764 0.236
#> SRR522096 1 0.7883 0.678 0.764 0.236
#> SRR522097 1 0.7883 0.678 0.764 0.236
#> SRR522098 1 0.7883 0.678 0.764 0.236
#> SRR522099 1 0.7883 0.678 0.764 0.236
#> SRR522100 1 0.7883 0.678 0.764 0.236
#> SRR522101 1 0.7883 0.678 0.764 0.236
#> SRR522102 1 0.7883 0.678 0.764 0.236
#> SRR522103 1 0.7883 0.678 0.764 0.236
#> SRR522104 1 0.7883 0.678 0.764 0.236
#> SRR522105 1 0.7883 0.678 0.764 0.236
#> SRR522106 1 0.7883 0.678 0.764 0.236
#> SRR522107 1 0.7883 0.678 0.764 0.236
#> SRR522108 2 0.0672 0.975 0.008 0.992
#> SRR522109 2 0.0376 0.977 0.004 0.996
#> SRR522110 2 0.0376 0.977 0.004 0.996
#> SRR522111 2 0.0000 0.979 0.000 1.000
#> SRR522112 2 0.0000 0.979 0.000 1.000
#> SRR522113 2 0.0672 0.975 0.008 0.992
#> SRR522114 2 0.0000 0.979 0.000 1.000
#> SRR522115 2 0.0000 0.979 0.000 1.000
#> SRR522116 2 0.0000 0.979 0.000 1.000
#> SRR522117 2 0.0000 0.979 0.000 1.000
#> SRR522118 2 0.0376 0.977 0.004 0.996
#> SRR522119 2 0.5294 0.799 0.120 0.880
#> SRR522120 2 0.0000 0.979 0.000 1.000
#> SRR522121 2 0.0000 0.979 0.000 1.000
#> SRR522122 2 0.0000 0.979 0.000 1.000
#> SRR522123 2 0.0000 0.979 0.000 1.000
#> SRR522124 2 0.0672 0.975 0.008 0.992
#> SRR522125 2 0.0000 0.979 0.000 1.000
#> SRR522126 2 0.0672 0.975 0.008 0.992
#> SRR522127 2 0.0672 0.975 0.008 0.992
#> SRR522128 2 0.5519 0.785 0.128 0.872
#> SRR522129 2 0.1843 0.944 0.028 0.972
#> SRR522130 2 0.0000 0.979 0.000 1.000
#> SRR522131 2 0.0000 0.979 0.000 1.000
#> SRR522132 2 0.0000 0.979 0.000 1.000
#> SRR522133 2 0.0000 0.979 0.000 1.000
#> SRR522134 2 0.0000 0.979 0.000 1.000
#> SRR522135 2 0.0000 0.979 0.000 1.000
#> SRR522136 2 0.0672 0.975 0.008 0.992
#> SRR522137 2 0.0672 0.975 0.008 0.992
#> SRR522138 2 0.0000 0.979 0.000 1.000
#> SRR522139 2 0.0672 0.975 0.008 0.992
#> SRR522140 2 0.0672 0.975 0.008 0.992
#> SRR522141 2 0.0672 0.975 0.008 0.992
#> SRR522142 2 0.0672 0.975 0.008 0.992
#> SRR522143 2 0.0000 0.979 0.000 1.000
#> SRR522144 2 0.0000 0.979 0.000 1.000
#> SRR522145 2 0.0672 0.975 0.008 0.992
#> SRR522146 2 0.0000 0.979 0.000 1.000
#> SRR522147 2 0.0000 0.979 0.000 1.000
#> SRR522148 2 0.0672 0.975 0.008 0.992
#> SRR522149 2 0.0000 0.979 0.000 1.000
#> SRR522150 2 0.0000 0.979 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000
#> SRR522079 2 0.2356 0.925 0.072 0.928 0.000
#> SRR522080 2 0.2356 0.925 0.072 0.928 0.000
#> SRR522081 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522082 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522083 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522084 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522085 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522086 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522087 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522088 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522089 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522090 3 0.1753 0.930 0.000 0.048 0.952
#> SRR522091 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522092 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522093 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522094 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522095 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522096 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522097 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522098 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522099 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522100 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522101 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522102 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522103 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522104 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522105 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522106 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522107 3 0.0000 0.996 0.000 0.000 1.000
#> SRR522108 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522109 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522110 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522111 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522112 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522113 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522114 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522115 2 0.0592 0.986 0.012 0.988 0.000
#> SRR522116 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522117 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522118 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522119 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522120 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522121 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522122 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522123 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522124 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522125 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522126 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522127 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522128 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522129 2 0.0592 0.986 0.012 0.988 0.000
#> SRR522130 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522131 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522132 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522133 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522134 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522135 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522136 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522137 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522138 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522139 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522140 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522141 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522142 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522143 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522144 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522145 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522146 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522147 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522148 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522149 2 0.0000 0.997 0.000 1.000 0.000
#> SRR522150 2 0.0000 0.997 0.000 1.000 0.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.0000 1.000 0.000 0.000 0.000
#> SRR522079 2 0.3037 0.6979 0.076 0.888 0.000 0.036
#> SRR522080 2 0.3037 0.6979 0.076 0.888 0.000 0.036
#> SRR522081 2 0.4277 0.6081 0.000 0.720 0.000 0.280
#> SRR522082 2 0.4277 0.6081 0.000 0.720 0.000 0.280
#> SRR522083 2 0.4277 0.6081 0.000 0.720 0.000 0.280
#> SRR522084 2 0.4277 0.6081 0.000 0.720 0.000 0.280
#> SRR522085 2 0.4277 0.6081 0.000 0.720 0.000 0.280
#> SRR522086 2 0.4250 0.6118 0.000 0.724 0.000 0.276
#> SRR522087 2 0.4277 0.6081 0.000 0.720 0.000 0.280
#> SRR522088 2 0.4134 0.6219 0.000 0.740 0.000 0.260
#> SRR522089 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522090 3 0.1302 0.9445 0.000 0.044 0.956 0.000
#> SRR522091 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.9970 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR522109 2 0.1792 0.7803 0.000 0.932 0.000 0.068
#> SRR522110 2 0.2011 0.7779 0.000 0.920 0.000 0.080
#> SRR522111 2 0.3528 0.7021 0.000 0.808 0.000 0.192
#> SRR522112 2 0.1637 0.7818 0.000 0.940 0.000 0.060
#> SRR522113 2 0.2081 0.7761 0.000 0.916 0.000 0.084
#> SRR522114 2 0.0817 0.7899 0.000 0.976 0.000 0.024
#> SRR522115 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522116 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522117 2 0.0921 0.7879 0.000 0.972 0.000 0.028
#> SRR522118 2 0.0817 0.7960 0.000 0.976 0.000 0.024
#> SRR522119 2 0.0817 0.7806 0.000 0.976 0.000 0.024
#> SRR522120 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522121 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522122 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522123 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522124 2 0.0469 0.7969 0.000 0.988 0.000 0.012
#> SRR522125 2 0.0707 0.7958 0.000 0.980 0.000 0.020
#> SRR522126 2 0.0469 0.7969 0.000 0.988 0.000 0.012
#> SRR522127 2 0.0188 0.7960 0.000 0.996 0.000 0.004
#> SRR522128 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.7948 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0336 0.7935 0.000 0.992 0.000 0.008
#> SRR522131 2 0.4356 0.5885 0.000 0.708 0.000 0.292
#> SRR522132 2 0.4977 0.0637 0.000 0.540 0.000 0.460
#> SRR522133 4 0.4999 0.0857 0.000 0.492 0.000 0.508
#> SRR522134 2 0.4877 0.2789 0.000 0.592 0.000 0.408
#> SRR522135 2 0.5000 -0.1229 0.000 0.504 0.000 0.496
#> SRR522136 4 0.3400 0.6488 0.000 0.180 0.000 0.820
#> SRR522137 4 0.3024 0.6607 0.000 0.148 0.000 0.852
#> SRR522138 4 0.3123 0.6305 0.000 0.156 0.000 0.844
#> SRR522139 4 0.1389 0.6758 0.000 0.048 0.000 0.952
#> SRR522140 4 0.1389 0.6758 0.000 0.048 0.000 0.952
#> SRR522141 4 0.1389 0.6758 0.000 0.048 0.000 0.952
#> SRR522142 4 0.1389 0.6758 0.000 0.048 0.000 0.952
#> SRR522143 4 0.4981 0.1892 0.000 0.464 0.000 0.536
#> SRR522144 4 0.4948 0.2592 0.000 0.440 0.000 0.560
#> SRR522145 4 0.1389 0.6758 0.000 0.048 0.000 0.952
#> SRR522146 4 0.4977 0.2108 0.000 0.460 0.000 0.540
#> SRR522147 2 0.4998 -0.0664 0.000 0.512 0.000 0.488
#> SRR522148 4 0.1389 0.6758 0.000 0.048 0.000 0.952
#> SRR522149 4 0.4994 0.1391 0.000 0.480 0.000 0.520
#> SRR522150 4 0.4977 0.2109 0.000 0.460 0.000 0.540
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.2127 0.933 0.892 0.108 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.2127 0.933 0.892 0.108 0.000 0.000 0.000
#> SRR522071 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.2127 0.933 0.892 0.108 0.000 0.000 0.000
#> SRR522074 1 0.2127 0.933 0.892 0.108 0.000 0.000 0.000
#> SRR522075 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.2127 0.933 0.892 0.108 0.000 0.000 0.000
#> SRR522077 1 0.0000 0.960 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.2127 0.933 0.892 0.108 0.000 0.000 0.000
#> SRR522079 2 0.0290 0.668 0.000 0.992 0.000 0.000 0.008
#> SRR522080 2 0.0290 0.668 0.000 0.992 0.000 0.000 0.008
#> SRR522081 5 0.3534 0.671 0.000 0.256 0.000 0.000 0.744
#> SRR522082 5 0.3534 0.671 0.000 0.256 0.000 0.000 0.744
#> SRR522083 5 0.3508 0.674 0.000 0.252 0.000 0.000 0.748
#> SRR522084 5 0.3612 0.667 0.000 0.268 0.000 0.000 0.732
#> SRR522085 5 0.3480 0.677 0.000 0.248 0.000 0.000 0.752
#> SRR522086 5 0.3452 0.677 0.000 0.244 0.000 0.000 0.756
#> SRR522087 5 0.3480 0.677 0.000 0.248 0.000 0.000 0.752
#> SRR522088 5 0.3561 0.666 0.000 0.260 0.000 0.000 0.740
#> SRR522089 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0794 0.964 0.000 0.028 0.972 0.000 0.000
#> SRR522091 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000
#> SRR522108 2 0.3636 0.721 0.000 0.728 0.000 0.000 0.272
#> SRR522109 5 0.3895 0.595 0.000 0.320 0.000 0.000 0.680
#> SRR522110 5 0.3837 0.617 0.000 0.308 0.000 0.000 0.692
#> SRR522111 5 0.3508 0.674 0.000 0.252 0.000 0.000 0.748
#> SRR522112 5 0.3999 0.547 0.000 0.344 0.000 0.000 0.656
#> SRR522113 5 0.4101 0.491 0.000 0.372 0.000 0.000 0.628
#> SRR522114 5 0.4219 -0.214 0.000 0.416 0.000 0.000 0.584
#> SRR522115 2 0.2690 0.799 0.000 0.844 0.000 0.000 0.156
#> SRR522116 2 0.4297 0.409 0.000 0.528 0.000 0.000 0.472
#> SRR522117 5 0.4201 -0.205 0.000 0.408 0.000 0.000 0.592
#> SRR522118 2 0.4126 0.550 0.000 0.620 0.000 0.000 0.380
#> SRR522119 2 0.3003 0.799 0.000 0.812 0.000 0.000 0.188
#> SRR522120 2 0.3305 0.791 0.000 0.776 0.000 0.000 0.224
#> SRR522121 2 0.2813 0.803 0.000 0.832 0.000 0.000 0.168
#> SRR522122 2 0.3109 0.801 0.000 0.800 0.000 0.000 0.200
#> SRR522123 2 0.2773 0.803 0.000 0.836 0.000 0.000 0.164
#> SRR522124 2 0.4210 0.536 0.000 0.588 0.000 0.000 0.412
#> SRR522125 2 0.3480 0.782 0.000 0.752 0.000 0.000 0.248
#> SRR522126 2 0.4210 0.532 0.000 0.588 0.000 0.000 0.412
#> SRR522127 2 0.4201 0.546 0.000 0.592 0.000 0.000 0.408
#> SRR522128 2 0.2424 0.793 0.000 0.868 0.000 0.000 0.132
#> SRR522129 2 0.2424 0.793 0.000 0.868 0.000 0.000 0.132
#> SRR522130 2 0.2690 0.799 0.000 0.844 0.000 0.000 0.156
#> SRR522131 5 0.2561 0.697 0.000 0.144 0.000 0.000 0.856
#> SRR522132 5 0.0000 0.698 0.000 0.000 0.000 0.000 1.000
#> SRR522133 5 0.0000 0.698 0.000 0.000 0.000 0.000 1.000
#> SRR522134 5 0.0609 0.701 0.000 0.020 0.000 0.000 0.980
#> SRR522135 5 0.0000 0.698 0.000 0.000 0.000 0.000 1.000
#> SRR522136 5 0.5527 0.202 0.000 0.072 0.000 0.388 0.540
#> SRR522137 4 0.4757 0.304 0.000 0.024 0.000 0.596 0.380
#> SRR522138 5 0.4025 0.505 0.000 0.008 0.000 0.292 0.700
#> SRR522139 4 0.0000 0.921 0.000 0.000 0.000 1.000 0.000
#> SRR522140 4 0.0000 0.921 0.000 0.000 0.000 1.000 0.000
#> SRR522141 4 0.0000 0.921 0.000 0.000 0.000 1.000 0.000
#> SRR522142 4 0.0000 0.921 0.000 0.000 0.000 1.000 0.000
#> SRR522143 5 0.1124 0.684 0.000 0.004 0.000 0.036 0.960
#> SRR522144 5 0.1043 0.677 0.000 0.000 0.000 0.040 0.960
#> SRR522145 4 0.0000 0.921 0.000 0.000 0.000 1.000 0.000
#> SRR522146 5 0.0510 0.694 0.000 0.000 0.000 0.016 0.984
#> SRR522147 5 0.1195 0.695 0.000 0.012 0.000 0.028 0.960
#> SRR522148 4 0.0000 0.921 0.000 0.000 0.000 1.000 0.000
#> SRR522149 5 0.0290 0.697 0.000 0.000 0.000 0.008 0.992
#> SRR522150 5 0.0510 0.694 0.000 0.000 0.000 0.016 0.984
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 6 0.3607 1.000 0.348 0.000 0.000 0.000 0.000 0.652
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 6 0.3607 1.000 0.348 0.000 0.000 0.000 0.000 0.652
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 6 0.3607 1.000 0.348 0.000 0.000 0.000 0.000 0.652
#> SRR522074 6 0.3607 1.000 0.348 0.000 0.000 0.000 0.000 0.652
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 6 0.3607 1.000 0.348 0.000 0.000 0.000 0.000 0.652
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 6 0.3607 1.000 0.348 0.000 0.000 0.000 0.000 0.652
#> SRR522079 2 0.2219 0.567 0.000 0.864 0.000 0.000 0.000 0.136
#> SRR522080 2 0.2219 0.567 0.000 0.864 0.000 0.000 0.000 0.136
#> SRR522081 4 0.4641 0.628 0.000 0.240 0.000 0.668 0.000 0.092
#> SRR522082 4 0.4681 0.628 0.000 0.232 0.000 0.668 0.000 0.100
#> SRR522083 4 0.4619 0.627 0.000 0.244 0.000 0.668 0.000 0.088
#> SRR522084 4 0.4809 0.623 0.000 0.208 0.000 0.664 0.000 0.128
#> SRR522085 4 0.4456 0.621 0.000 0.268 0.000 0.668 0.000 0.064
#> SRR522086 4 0.4487 0.622 0.000 0.264 0.000 0.668 0.000 0.068
#> SRR522087 4 0.4456 0.621 0.000 0.268 0.000 0.668 0.000 0.064
#> SRR522088 4 0.4586 0.620 0.000 0.264 0.000 0.660 0.000 0.076
#> SRR522089 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0976 0.967 0.000 0.016 0.968 0.008 0.000 0.008
#> SRR522091 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522095 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.998 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.4270 0.485 0.000 0.684 0.000 0.264 0.000 0.052
#> SRR522109 4 0.5393 0.508 0.000 0.256 0.000 0.576 0.000 0.168
#> SRR522110 4 0.5367 0.526 0.000 0.224 0.000 0.588 0.000 0.188
#> SRR522111 4 0.4871 0.566 0.000 0.308 0.000 0.616 0.004 0.072
#> SRR522112 4 0.5510 0.476 0.000 0.248 0.000 0.560 0.000 0.192
#> SRR522113 4 0.5497 0.477 0.000 0.256 0.000 0.560 0.000 0.184
#> SRR522114 4 0.4569 -0.272 0.000 0.396 0.000 0.564 0.000 0.040
#> SRR522115 2 0.4050 0.575 0.000 0.716 0.000 0.048 0.000 0.236
#> SRR522116 4 0.4648 -0.345 0.000 0.464 0.000 0.496 0.000 0.040
#> SRR522117 4 0.4576 -0.281 0.000 0.400 0.000 0.560 0.000 0.040
#> SRR522118 2 0.4703 0.383 0.000 0.620 0.000 0.312 0.000 0.068
#> SRR522119 2 0.0858 0.624 0.000 0.968 0.000 0.028 0.000 0.004
#> SRR522120 2 0.5394 0.496 0.000 0.568 0.000 0.276 0.000 0.156
#> SRR522121 2 0.5219 0.580 0.000 0.612 0.000 0.212 0.000 0.176
#> SRR522122 2 0.5301 0.520 0.000 0.584 0.000 0.268 0.000 0.148
#> SRR522123 2 0.5361 0.533 0.000 0.576 0.000 0.268 0.000 0.156
#> SRR522124 2 0.3862 0.375 0.000 0.524 0.000 0.476 0.000 0.000
#> SRR522125 2 0.4594 0.434 0.000 0.560 0.000 0.404 0.004 0.032
#> SRR522126 2 0.3862 0.375 0.000 0.524 0.000 0.476 0.000 0.000
#> SRR522127 2 0.3864 0.369 0.000 0.520 0.000 0.480 0.000 0.000
#> SRR522128 2 0.2250 0.615 0.000 0.888 0.000 0.020 0.000 0.092
#> SRR522129 2 0.2573 0.611 0.000 0.864 0.000 0.024 0.000 0.112
#> SRR522130 2 0.2971 0.633 0.000 0.844 0.000 0.104 0.000 0.052
#> SRR522131 4 0.2760 0.648 0.000 0.116 0.000 0.856 0.004 0.024
#> SRR522132 4 0.0458 0.655 0.000 0.016 0.000 0.984 0.000 0.000
#> SRR522133 4 0.0508 0.652 0.000 0.004 0.000 0.984 0.000 0.012
#> SRR522134 4 0.0713 0.657 0.000 0.028 0.000 0.972 0.000 0.000
#> SRR522135 4 0.0622 0.656 0.000 0.012 0.000 0.980 0.000 0.008
#> SRR522136 4 0.4462 0.451 0.000 0.020 0.000 0.612 0.356 0.012
#> SRR522137 4 0.4502 0.417 0.000 0.016 0.000 0.568 0.404 0.012
#> SRR522138 4 0.4014 0.547 0.000 0.016 0.000 0.704 0.268 0.012
#> SRR522139 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522140 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522141 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522142 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0725 0.655 0.000 0.012 0.000 0.976 0.000 0.012
#> SRR522144 4 0.0508 0.651 0.000 0.000 0.000 0.984 0.004 0.012
#> SRR522145 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0508 0.651 0.000 0.000 0.000 0.984 0.004 0.012
#> SRR522147 4 0.1297 0.655 0.000 0.040 0.000 0.948 0.000 0.012
#> SRR522148 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0363 0.650 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR522150 4 0.0508 0.651 0.000 0.000 0.000 0.984 0.004 0.012
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 13957 rows and 88 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 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.683 0.861 0.937 0.393 0.645 0.645
#> 3 3 1.000 0.988 0.996 0.495 0.746 0.612
#> 4 4 0.925 0.889 0.952 0.264 0.850 0.633
#> 5 5 0.957 0.938 0.970 0.058 0.908 0.676
#> 6 6 0.946 0.939 0.954 0.044 0.955 0.795
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 4 5
There is also optional best \(k\) = 3 4 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.0000 0.959 1.000 0.000
#> SRR522064 1 0.0000 0.959 1.000 0.000
#> SRR522065 1 0.0000 0.959 1.000 0.000
#> SRR522066 1 0.0000 0.959 1.000 0.000
#> SRR522067 1 0.0000 0.959 1.000 0.000
#> SRR522068 1 0.0000 0.959 1.000 0.000
#> SRR522069 1 0.0000 0.959 1.000 0.000
#> SRR522070 1 0.0000 0.959 1.000 0.000
#> SRR522071 1 0.0000 0.959 1.000 0.000
#> SRR522072 1 0.0000 0.959 1.000 0.000
#> SRR522073 1 0.0000 0.959 1.000 0.000
#> SRR522074 1 0.0000 0.959 1.000 0.000
#> SRR522075 1 0.0000 0.959 1.000 0.000
#> SRR522076 1 0.0000 0.959 1.000 0.000
#> SRR522077 1 0.0000 0.959 1.000 0.000
#> SRR522078 1 0.0000 0.959 1.000 0.000
#> SRR522079 1 0.1184 0.947 0.984 0.016
#> SRR522080 1 0.9393 0.445 0.644 0.356
#> SRR522081 2 0.0000 0.922 0.000 1.000
#> SRR522082 2 0.0000 0.922 0.000 1.000
#> SRR522083 2 0.0000 0.922 0.000 1.000
#> SRR522084 2 0.0000 0.922 0.000 1.000
#> SRR522085 2 0.0000 0.922 0.000 1.000
#> SRR522086 2 0.0000 0.922 0.000 1.000
#> SRR522087 2 0.0000 0.922 0.000 1.000
#> SRR522088 2 0.0000 0.922 0.000 1.000
#> SRR522089 2 0.8955 0.612 0.312 0.688
#> SRR522090 2 0.7453 0.748 0.212 0.788
#> SRR522091 2 0.9996 0.179 0.488 0.512
#> SRR522092 2 0.9580 0.481 0.380 0.620
#> SRR522093 2 0.8713 0.644 0.292 0.708
#> SRR522094 2 0.5629 0.832 0.132 0.868
#> SRR522095 1 0.1843 0.935 0.972 0.028
#> SRR522096 2 0.5294 0.842 0.120 0.880
#> SRR522097 2 0.9323 0.548 0.348 0.652
#> SRR522098 2 0.4939 0.851 0.108 0.892
#> SRR522099 2 0.8955 0.612 0.312 0.688
#> SRR522100 2 0.6247 0.810 0.156 0.844
#> SRR522101 2 0.5059 0.848 0.112 0.888
#> SRR522102 2 1.0000 0.147 0.496 0.504
#> SRR522103 2 0.5059 0.848 0.112 0.888
#> SRR522104 1 0.8861 0.492 0.696 0.304
#> SRR522105 2 0.8955 0.612 0.312 0.688
#> SRR522106 2 0.9248 0.563 0.340 0.660
#> SRR522107 2 0.9393 0.532 0.356 0.644
#> SRR522108 2 0.0376 0.921 0.004 0.996
#> SRR522109 2 0.0000 0.922 0.000 1.000
#> SRR522110 2 0.0000 0.922 0.000 1.000
#> SRR522111 2 0.0000 0.922 0.000 1.000
#> SRR522112 2 0.0000 0.922 0.000 1.000
#> SRR522113 2 0.0000 0.922 0.000 1.000
#> SRR522114 2 0.0000 0.922 0.000 1.000
#> SRR522115 2 0.6148 0.814 0.152 0.848
#> SRR522116 2 0.0000 0.922 0.000 1.000
#> SRR522117 2 0.0000 0.922 0.000 1.000
#> SRR522118 2 0.0938 0.916 0.012 0.988
#> SRR522119 2 0.1414 0.911 0.020 0.980
#> SRR522120 2 0.0000 0.922 0.000 1.000
#> SRR522121 2 0.0000 0.922 0.000 1.000
#> SRR522122 2 0.0000 0.922 0.000 1.000
#> SRR522123 2 0.0000 0.922 0.000 1.000
#> SRR522124 2 0.0000 0.922 0.000 1.000
#> SRR522125 2 0.0000 0.922 0.000 1.000
#> SRR522126 2 0.0000 0.922 0.000 1.000
#> SRR522127 2 0.0000 0.922 0.000 1.000
#> SRR522128 2 0.1414 0.911 0.020 0.980
#> SRR522129 2 0.1184 0.914 0.016 0.984
#> SRR522130 2 0.1414 0.911 0.020 0.980
#> SRR522131 2 0.0000 0.922 0.000 1.000
#> SRR522132 2 0.0000 0.922 0.000 1.000
#> SRR522133 2 0.0000 0.922 0.000 1.000
#> SRR522134 2 0.0000 0.922 0.000 1.000
#> SRR522135 2 0.0000 0.922 0.000 1.000
#> SRR522136 2 0.0000 0.922 0.000 1.000
#> SRR522137 2 0.0000 0.922 0.000 1.000
#> SRR522138 2 0.0000 0.922 0.000 1.000
#> SRR522139 2 0.0000 0.922 0.000 1.000
#> SRR522140 2 0.0000 0.922 0.000 1.000
#> SRR522141 2 0.0000 0.922 0.000 1.000
#> SRR522142 2 0.0000 0.922 0.000 1.000
#> SRR522143 2 0.0376 0.921 0.004 0.996
#> SRR522144 2 0.0376 0.921 0.004 0.996
#> SRR522145 2 0.0000 0.922 0.000 1.000
#> SRR522146 2 0.0376 0.921 0.004 0.996
#> SRR522147 2 0.0000 0.922 0.000 1.000
#> SRR522148 2 0.0000 0.922 0.000 1.000
#> SRR522149 2 0.0938 0.916 0.012 0.988
#> SRR522150 2 0.0376 0.921 0.004 0.996
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.971 1.000 0.000 0
#> SRR522064 1 0.0000 0.971 1.000 0.000 0
#> SRR522065 1 0.0000 0.971 1.000 0.000 0
#> SRR522066 1 0.0000 0.971 1.000 0.000 0
#> SRR522067 1 0.0000 0.971 1.000 0.000 0
#> SRR522068 1 0.0000 0.971 1.000 0.000 0
#> SRR522069 1 0.0000 0.971 1.000 0.000 0
#> SRR522070 1 0.0000 0.971 1.000 0.000 0
#> SRR522071 1 0.0000 0.971 1.000 0.000 0
#> SRR522072 1 0.0000 0.971 1.000 0.000 0
#> SRR522073 1 0.0000 0.971 1.000 0.000 0
#> SRR522074 1 0.0000 0.971 1.000 0.000 0
#> SRR522075 1 0.0000 0.971 1.000 0.000 0
#> SRR522076 1 0.0000 0.971 1.000 0.000 0
#> SRR522077 1 0.0000 0.971 1.000 0.000 0
#> SRR522078 1 0.0000 0.971 1.000 0.000 0
#> SRR522079 1 0.0747 0.953 0.984 0.016 0
#> SRR522080 1 0.5882 0.468 0.652 0.348 0
#> SRR522081 2 0.0000 1.000 0.000 1.000 0
#> SRR522082 2 0.0000 1.000 0.000 1.000 0
#> SRR522083 2 0.0000 1.000 0.000 1.000 0
#> SRR522084 2 0.0000 1.000 0.000 1.000 0
#> SRR522085 2 0.0000 1.000 0.000 1.000 0
#> SRR522086 2 0.0000 1.000 0.000 1.000 0
#> SRR522087 2 0.0000 1.000 0.000 1.000 0
#> SRR522088 2 0.0000 1.000 0.000 1.000 0
#> SRR522089 3 0.0000 1.000 0.000 0.000 1
#> SRR522090 3 0.0000 1.000 0.000 0.000 1
#> SRR522091 3 0.0000 1.000 0.000 0.000 1
#> SRR522092 3 0.0000 1.000 0.000 0.000 1
#> SRR522093 3 0.0000 1.000 0.000 0.000 1
#> SRR522094 3 0.0000 1.000 0.000 0.000 1
#> SRR522095 3 0.0000 1.000 0.000 0.000 1
#> SRR522096 3 0.0000 1.000 0.000 0.000 1
#> SRR522097 3 0.0000 1.000 0.000 0.000 1
#> SRR522098 3 0.0000 1.000 0.000 0.000 1
#> SRR522099 3 0.0000 1.000 0.000 0.000 1
#> SRR522100 3 0.0000 1.000 0.000 0.000 1
#> SRR522101 3 0.0000 1.000 0.000 0.000 1
#> SRR522102 3 0.0000 1.000 0.000 0.000 1
#> SRR522103 3 0.0000 1.000 0.000 0.000 1
#> SRR522104 3 0.0000 1.000 0.000 0.000 1
#> SRR522105 3 0.0000 1.000 0.000 0.000 1
#> SRR522106 3 0.0000 1.000 0.000 0.000 1
#> SRR522107 3 0.0000 1.000 0.000 0.000 1
#> SRR522108 2 0.0000 1.000 0.000 1.000 0
#> SRR522109 2 0.0000 1.000 0.000 1.000 0
#> SRR522110 2 0.0000 1.000 0.000 1.000 0
#> SRR522111 2 0.0000 1.000 0.000 1.000 0
#> SRR522112 2 0.0000 1.000 0.000 1.000 0
#> SRR522113 2 0.0000 1.000 0.000 1.000 0
#> SRR522114 2 0.0000 1.000 0.000 1.000 0
#> SRR522115 3 0.0000 1.000 0.000 0.000 1
#> SRR522116 2 0.0000 1.000 0.000 1.000 0
#> SRR522117 2 0.0000 1.000 0.000 1.000 0
#> SRR522118 2 0.0000 1.000 0.000 1.000 0
#> SRR522119 2 0.0000 1.000 0.000 1.000 0
#> SRR522120 2 0.0000 1.000 0.000 1.000 0
#> SRR522121 2 0.0000 1.000 0.000 1.000 0
#> SRR522122 2 0.0000 1.000 0.000 1.000 0
#> SRR522123 2 0.0000 1.000 0.000 1.000 0
#> SRR522124 2 0.0000 1.000 0.000 1.000 0
#> SRR522125 2 0.0000 1.000 0.000 1.000 0
#> SRR522126 2 0.0000 1.000 0.000 1.000 0
#> SRR522127 2 0.0000 1.000 0.000 1.000 0
#> SRR522128 2 0.0000 1.000 0.000 1.000 0
#> SRR522129 2 0.0000 1.000 0.000 1.000 0
#> SRR522130 2 0.0000 1.000 0.000 1.000 0
#> SRR522131 2 0.0000 1.000 0.000 1.000 0
#> SRR522132 2 0.0000 1.000 0.000 1.000 0
#> SRR522133 2 0.0000 1.000 0.000 1.000 0
#> SRR522134 2 0.0000 1.000 0.000 1.000 0
#> SRR522135 2 0.0000 1.000 0.000 1.000 0
#> SRR522136 2 0.0000 1.000 0.000 1.000 0
#> SRR522137 2 0.0000 1.000 0.000 1.000 0
#> SRR522138 2 0.0000 1.000 0.000 1.000 0
#> SRR522139 2 0.0000 1.000 0.000 1.000 0
#> SRR522140 2 0.0000 1.000 0.000 1.000 0
#> SRR522141 2 0.0000 1.000 0.000 1.000 0
#> SRR522142 2 0.0000 1.000 0.000 1.000 0
#> SRR522143 2 0.0000 1.000 0.000 1.000 0
#> SRR522144 2 0.0000 1.000 0.000 1.000 0
#> SRR522145 2 0.0000 1.000 0.000 1.000 0
#> SRR522146 2 0.0000 1.000 0.000 1.000 0
#> SRR522147 2 0.0000 1.000 0.000 1.000 0
#> SRR522148 2 0.0000 1.000 0.000 1.000 0
#> SRR522149 2 0.0000 1.000 0.000 1.000 0
#> SRR522150 2 0.0000 1.000 0.000 1.000 0
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 0.9727 1.000 0.000 0.000 0.000
#> SRR522079 1 0.1975 0.9159 0.936 0.016 0.000 0.048
#> SRR522080 1 0.6821 0.4687 0.592 0.152 0.000 0.256
#> SRR522081 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522082 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522083 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522084 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522085 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522086 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522087 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522088 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522089 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522090 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522091 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.9998 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522114 2 0.4998 -0.0201 0.000 0.512 0.000 0.488
#> SRR522115 3 0.0188 0.9954 0.000 0.000 0.996 0.004
#> SRR522116 4 0.4431 0.5775 0.000 0.304 0.000 0.696
#> SRR522117 4 0.3539 0.7634 0.000 0.176 0.004 0.820
#> SRR522118 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522124 2 0.4933 0.1877 0.000 0.568 0.000 0.432
#> SRR522125 2 0.1940 0.8606 0.000 0.924 0.000 0.076
#> SRR522126 4 0.4431 0.5749 0.000 0.304 0.000 0.696
#> SRR522127 4 0.4977 0.1537 0.000 0.460 0.000 0.540
#> SRR522128 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.9335 0.000 1.000 0.000 0.000
#> SRR522131 4 0.4304 0.6436 0.000 0.284 0.000 0.716
#> SRR522132 4 0.0921 0.9020 0.000 0.028 0.000 0.972
#> SRR522133 4 0.4830 0.4399 0.000 0.392 0.000 0.608
#> SRR522134 4 0.4431 0.6264 0.000 0.304 0.000 0.696
#> SRR522135 4 0.2760 0.8299 0.000 0.128 0.000 0.872
#> SRR522136 4 0.1389 0.8911 0.000 0.048 0.000 0.952
#> SRR522137 4 0.1940 0.8748 0.000 0.076 0.000 0.924
#> SRR522138 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522139 4 0.0592 0.9047 0.000 0.016 0.000 0.984
#> SRR522140 4 0.0336 0.9051 0.000 0.008 0.000 0.992
#> SRR522141 4 0.0336 0.9051 0.000 0.008 0.000 0.992
#> SRR522142 4 0.1302 0.8932 0.000 0.044 0.000 0.956
#> SRR522143 4 0.0592 0.9050 0.000 0.016 0.000 0.984
#> SRR522144 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522145 4 0.0707 0.9037 0.000 0.020 0.000 0.980
#> SRR522146 4 0.2081 0.8683 0.000 0.084 0.000 0.916
#> SRR522147 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522148 4 0.0469 0.9052 0.000 0.012 0.000 0.988
#> SRR522149 4 0.0188 0.9046 0.000 0.004 0.000 0.996
#> SRR522150 4 0.0592 0.9049 0.000 0.016 0.000 0.984
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 0.984 1.000 0.000 0.000 0.000 0.000
#> SRR522079 1 0.5020 0.696 0.748 0.036 0.000 0.140 0.076
#> SRR522080 4 0.6108 0.562 0.208 0.056 0.000 0.648 0.088
#> SRR522081 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522082 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522083 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522084 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522085 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522086 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522087 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522088 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000
#> SRR522089 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.985 0.000 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522114 4 0.5504 0.203 0.000 0.448 0.000 0.488 0.064
#> SRR522115 3 0.3274 0.675 0.000 0.000 0.780 0.220 0.000
#> SRR522116 4 0.2873 0.835 0.000 0.120 0.000 0.860 0.020
#> SRR522117 4 0.4742 0.703 0.000 0.220 0.004 0.716 0.060
#> SRR522118 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522124 4 0.3246 0.789 0.000 0.184 0.000 0.808 0.008
#> SRR522125 4 0.3796 0.638 0.000 0.300 0.000 0.700 0.000
#> SRR522126 4 0.1628 0.887 0.000 0.056 0.000 0.936 0.008
#> SRR522127 4 0.3530 0.765 0.000 0.204 0.000 0.784 0.012
#> SRR522128 2 0.0162 0.995 0.000 0.996 0.000 0.004 0.000
#> SRR522129 2 0.0162 0.995 0.000 0.996 0.000 0.004 0.000
#> SRR522130 2 0.0000 0.999 0.000 1.000 0.000 0.000 0.000
#> SRR522131 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522132 4 0.0162 0.919 0.000 0.000 0.000 0.996 0.004
#> SRR522133 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522134 4 0.0290 0.917 0.000 0.008 0.000 0.992 0.000
#> SRR522135 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0162 0.919 0.000 0.000 0.000 0.996 0.004
#> SRR522137 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522139 4 0.0290 0.918 0.000 0.000 0.000 0.992 0.008
#> SRR522140 4 0.0290 0.918 0.000 0.000 0.000 0.992 0.008
#> SRR522141 4 0.0290 0.918 0.000 0.000 0.000 0.992 0.008
#> SRR522142 4 0.0290 0.918 0.000 0.000 0.000 0.992 0.008
#> SRR522143 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0162 0.919 0.000 0.000 0.000 0.996 0.004
#> SRR522145 4 0.0290 0.918 0.000 0.000 0.000 0.992 0.008
#> SRR522146 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
#> SRR522148 4 0.0290 0.918 0.000 0.000 0.000 0.992 0.008
#> SRR522149 4 0.0162 0.919 0.000 0.000 0.000 0.996 0.004
#> SRR522150 4 0.0000 0.919 0.000 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 0.972 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522079 1 0.6533 0.390 0.552 0.160 0.004 0.232 0.020 0.032
#> SRR522080 4 0.5703 0.562 0.060 0.160 0.000 0.680 0.040 0.060
#> SRR522081 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522082 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522083 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522084 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522085 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522086 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522087 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522088 5 0.0000 1.000 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522089 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522091 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522094 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522095 3 0.0146 0.996 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522096 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522099 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522104 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.999 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.3163 0.830 0.000 0.764 0.000 0.004 0.000 0.232
#> SRR522109 2 0.3489 0.798 0.000 0.708 0.000 0.004 0.000 0.288
#> SRR522110 2 0.3360 0.814 0.000 0.732 0.000 0.004 0.000 0.264
#> SRR522111 2 0.3448 0.804 0.000 0.716 0.000 0.004 0.000 0.280
#> SRR522112 2 0.3468 0.801 0.000 0.712 0.000 0.004 0.000 0.284
#> SRR522113 2 0.3528 0.792 0.000 0.700 0.000 0.004 0.000 0.296
#> SRR522114 6 0.1901 0.889 0.000 0.000 0.004 0.076 0.008 0.912
#> SRR522115 6 0.4389 0.623 0.000 0.008 0.252 0.048 0.000 0.692
#> SRR522116 6 0.2100 0.917 0.000 0.004 0.000 0.112 0.000 0.884
#> SRR522117 6 0.2118 0.916 0.000 0.000 0.008 0.104 0.000 0.888
#> SRR522118 2 0.1863 0.869 0.000 0.896 0.000 0.000 0.000 0.104
#> SRR522119 2 0.0713 0.878 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR522120 2 0.0713 0.879 0.000 0.972 0.000 0.000 0.000 0.028
#> SRR522121 2 0.0363 0.873 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR522122 2 0.0790 0.879 0.000 0.968 0.000 0.000 0.000 0.032
#> SRR522123 2 0.0363 0.875 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR522124 6 0.2048 0.917 0.000 0.000 0.000 0.120 0.000 0.880
#> SRR522125 6 0.2416 0.897 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR522126 6 0.2416 0.897 0.000 0.000 0.000 0.156 0.000 0.844
#> SRR522127 6 0.1910 0.916 0.000 0.000 0.000 0.108 0.000 0.892
#> SRR522128 2 0.0146 0.872 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522129 2 0.0260 0.872 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR522130 2 0.0260 0.872 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR522131 4 0.0146 0.972 0.000 0.004 0.000 0.996 0.000 0.000
#> SRR522132 4 0.0146 0.975 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522133 4 0.0146 0.975 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522134 4 0.0508 0.973 0.000 0.004 0.000 0.984 0.000 0.012
#> SRR522135 4 0.0146 0.975 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522136 4 0.0146 0.975 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522137 4 0.0363 0.973 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR522138 4 0.0146 0.975 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522139 4 0.0547 0.970 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR522140 4 0.0458 0.972 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR522141 4 0.0547 0.970 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR522142 4 0.0458 0.972 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR522143 4 0.0363 0.972 0.000 0.000 0.000 0.988 0.000 0.012
#> SRR522144 4 0.0260 0.970 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR522145 4 0.0458 0.972 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR522146 4 0.0260 0.970 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR522147 4 0.0146 0.973 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522148 4 0.0458 0.972 0.000 0.000 0.000 0.984 0.000 0.016
#> SRR522149 4 0.0260 0.974 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR522150 4 0.0000 0.974 0.000 0.000 0.000 1.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "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 13957 rows and 88 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.3016 0.699 0.699
#> 3 3 0.684 0.956 0.893 0.7188 0.693 0.561
#> 4 4 0.614 0.878 0.874 0.0382 0.993 0.981
#> 5 5 0.503 0.825 0.811 0.0696 0.978 0.942
#> 6 6 0.460 0.738 0.786 0.0378 0.993 0.982
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
#> SRR522063 1 0 1 1 0
#> SRR522064 1 0 1 1 0
#> SRR522065 1 0 1 1 0
#> SRR522066 1 0 1 1 0
#> SRR522067 1 0 1 1 0
#> SRR522068 1 0 1 1 0
#> SRR522069 1 0 1 1 0
#> SRR522070 1 0 1 1 0
#> SRR522071 1 0 1 1 0
#> SRR522072 1 0 1 1 0
#> SRR522073 1 0 1 1 0
#> SRR522074 1 0 1 1 0
#> SRR522075 1 0 1 1 0
#> SRR522076 1 0 1 1 0
#> SRR522077 1 0 1 1 0
#> SRR522078 1 0 1 1 0
#> SRR522079 2 0 1 0 1
#> SRR522080 2 0 1 0 1
#> SRR522081 2 0 1 0 1
#> SRR522082 2 0 1 0 1
#> SRR522083 2 0 1 0 1
#> SRR522084 2 0 1 0 1
#> SRR522085 2 0 1 0 1
#> SRR522086 2 0 1 0 1
#> SRR522087 2 0 1 0 1
#> SRR522088 2 0 1 0 1
#> SRR522089 2 0 1 0 1
#> SRR522090 2 0 1 0 1
#> SRR522091 2 0 1 0 1
#> SRR522092 2 0 1 0 1
#> SRR522093 2 0 1 0 1
#> SRR522094 2 0 1 0 1
#> SRR522095 2 0 1 0 1
#> SRR522096 2 0 1 0 1
#> SRR522097 2 0 1 0 1
#> SRR522098 2 0 1 0 1
#> SRR522099 2 0 1 0 1
#> SRR522100 2 0 1 0 1
#> SRR522101 2 0 1 0 1
#> SRR522102 2 0 1 0 1
#> SRR522103 2 0 1 0 1
#> SRR522104 2 0 1 0 1
#> SRR522105 2 0 1 0 1
#> SRR522106 2 0 1 0 1
#> SRR522107 2 0 1 0 1
#> SRR522108 2 0 1 0 1
#> SRR522109 2 0 1 0 1
#> SRR522110 2 0 1 0 1
#> SRR522111 2 0 1 0 1
#> SRR522112 2 0 1 0 1
#> SRR522113 2 0 1 0 1
#> SRR522114 2 0 1 0 1
#> SRR522115 2 0 1 0 1
#> SRR522116 2 0 1 0 1
#> SRR522117 2 0 1 0 1
#> SRR522118 2 0 1 0 1
#> SRR522119 2 0 1 0 1
#> SRR522120 2 0 1 0 1
#> SRR522121 2 0 1 0 1
#> SRR522122 2 0 1 0 1
#> SRR522123 2 0 1 0 1
#> SRR522124 2 0 1 0 1
#> SRR522125 2 0 1 0 1
#> SRR522126 2 0 1 0 1
#> SRR522127 2 0 1 0 1
#> SRR522128 2 0 1 0 1
#> SRR522129 2 0 1 0 1
#> SRR522130 2 0 1 0 1
#> SRR522131 2 0 1 0 1
#> SRR522132 2 0 1 0 1
#> SRR522133 2 0 1 0 1
#> SRR522134 2 0 1 0 1
#> SRR522135 2 0 1 0 1
#> SRR522136 2 0 1 0 1
#> SRR522137 2 0 1 0 1
#> SRR522138 2 0 1 0 1
#> SRR522139 2 0 1 0 1
#> SRR522140 2 0 1 0 1
#> SRR522141 2 0 1 0 1
#> SRR522142 2 0 1 0 1
#> SRR522143 2 0 1 0 1
#> SRR522144 2 0 1 0 1
#> SRR522145 2 0 1 0 1
#> SRR522146 2 0 1 0 1
#> SRR522147 2 0 1 0 1
#> SRR522148 2 0 1 0 1
#> SRR522149 2 0 1 0 1
#> SRR522150 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522064 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522065 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522066 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522067 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522068 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522069 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522070 1 0.5058 0.871 0.756 0.244 0.000
#> SRR522071 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522072 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522073 1 0.3619 0.931 0.864 0.136 0.000
#> SRR522074 1 0.2537 0.955 0.920 0.080 0.000
#> SRR522075 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522076 1 0.1643 0.969 0.956 0.044 0.000
#> SRR522077 1 0.0000 0.980 1.000 0.000 0.000
#> SRR522078 1 0.1753 0.967 0.952 0.048 0.000
#> SRR522079 2 0.5098 0.897 0.000 0.752 0.248
#> SRR522080 2 0.5098 0.897 0.000 0.752 0.248
#> SRR522081 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522082 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522083 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522084 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522085 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522086 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522087 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522088 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522089 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522090 3 0.0592 0.959 0.000 0.012 0.988
#> SRR522091 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522092 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522093 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522094 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522095 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522096 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522097 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522098 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522099 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522100 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522101 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522102 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522103 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522104 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522105 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522106 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522107 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522108 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522109 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522110 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522111 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522112 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522113 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522114 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522115 3 0.0592 0.959 0.000 0.012 0.988
#> SRR522116 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522117 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522118 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522119 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522120 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522121 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522122 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522123 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522124 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522125 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522126 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522127 3 0.1031 0.949 0.000 0.024 0.976
#> SRR522128 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522129 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522130 2 0.5706 0.991 0.000 0.680 0.320
#> SRR522131 3 0.4062 0.726 0.000 0.164 0.836
#> SRR522132 3 0.4062 0.726 0.000 0.164 0.836
#> SRR522133 3 0.4062 0.726 0.000 0.164 0.836
#> SRR522134 3 0.4062 0.726 0.000 0.164 0.836
#> SRR522135 3 0.4062 0.726 0.000 0.164 0.836
#> SRR522136 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522137 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522138 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522139 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522140 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522141 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522142 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522143 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522144 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522145 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522146 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522147 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522148 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522149 3 0.0000 0.967 0.000 0.000 1.000
#> SRR522150 3 0.0000 0.967 0.000 0.000 1.000
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522064 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522065 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522066 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522067 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522068 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522069 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522070 3 0.759 0.824 0.396 0.000 0.408 0.196
#> SRR522071 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522072 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522073 3 0.493 0.813 0.432 0.000 0.568 0.000
#> SRR522074 1 0.527 -0.170 0.656 0.000 0.320 0.024
#> SRR522075 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522076 1 0.480 0.102 0.708 0.000 0.276 0.016
#> SRR522077 1 0.000 0.859 1.000 0.000 0.000 0.000
#> SRR522078 1 0.490 -0.320 0.632 0.000 0.364 0.004
#> SRR522079 2 0.666 0.385 0.000 0.512 0.400 0.088
#> SRR522080 2 0.666 0.385 0.000 0.512 0.400 0.088
#> SRR522081 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522082 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522083 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522084 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522085 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522086 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522087 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522088 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522089 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522090 4 0.443 0.955 0.000 0.304 0.000 0.696
#> SRR522091 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522092 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522093 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522094 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522095 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522096 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522097 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522098 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522099 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522100 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522101 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522102 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522103 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522104 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522105 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522106 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522107 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522108 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522109 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522110 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522111 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522112 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522113 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522114 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522115 4 0.443 0.955 0.000 0.304 0.000 0.696
#> SRR522116 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522117 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522118 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522119 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522120 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522121 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522122 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522123 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522124 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522125 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522126 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522127 4 0.450 0.946 0.000 0.316 0.000 0.684
#> SRR522128 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522129 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522130 2 0.000 0.962 0.000 1.000 0.000 0.000
#> SRR522131 4 0.500 0.671 0.000 0.484 0.000 0.516
#> SRR522132 4 0.500 0.671 0.000 0.484 0.000 0.516
#> SRR522133 4 0.500 0.671 0.000 0.484 0.000 0.516
#> SRR522134 4 0.500 0.671 0.000 0.484 0.000 0.516
#> SRR522135 4 0.500 0.671 0.000 0.484 0.000 0.516
#> SRR522136 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522137 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522138 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522139 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522140 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522141 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522142 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522143 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522144 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522145 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522146 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522147 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522148 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522149 4 0.436 0.964 0.000 0.292 0.000 0.708
#> SRR522150 4 0.436 0.964 0.000 0.292 0.000 0.708
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522064 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522065 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522066 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522067 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522068 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522069 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522070 3 0.3349 0.490 0.016 0.052 0.860 0.000 0.072
#> SRR522071 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522072 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522073 5 0.5024 -0.632 0.032 0.000 0.440 0.000 0.528
#> SRR522074 3 0.6440 0.464 0.364 0.068 0.520 0.000 0.048
#> SRR522075 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522076 3 0.5646 0.531 0.340 0.080 0.576 0.000 0.004
#> SRR522077 1 0.3452 1.000 0.756 0.000 0.244 0.000 0.000
#> SRR522078 3 0.4046 0.581 0.296 0.000 0.696 0.000 0.008
#> SRR522079 5 0.6554 0.296 0.000 0.396 0.000 0.200 0.404
#> SRR522080 5 0.6554 0.296 0.000 0.396 0.000 0.200 0.404
#> SRR522081 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522082 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522083 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522084 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522085 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522086 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522087 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522088 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522089 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522090 4 0.3750 0.837 0.232 0.012 0.000 0.756 0.000
#> SRR522091 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522092 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522093 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522094 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522095 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522096 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522097 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522098 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522099 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522100 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522101 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522102 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522103 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522104 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522105 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522106 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522107 4 0.3452 0.840 0.244 0.000 0.000 0.756 0.000
#> SRR522108 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522109 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522110 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522111 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522112 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522113 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522114 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522115 4 0.3720 0.838 0.228 0.012 0.000 0.760 0.000
#> SRR522116 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522117 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522118 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522119 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522120 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522121 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522122 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522123 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522124 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522125 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522126 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522127 4 0.4000 0.832 0.228 0.024 0.000 0.748 0.000
#> SRR522128 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522129 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522130 2 0.3730 1.000 0.000 0.712 0.000 0.288 0.000
#> SRR522131 4 0.3039 0.472 0.000 0.192 0.000 0.808 0.000
#> SRR522132 4 0.3039 0.472 0.000 0.192 0.000 0.808 0.000
#> SRR522133 4 0.3039 0.472 0.000 0.192 0.000 0.808 0.000
#> SRR522134 4 0.3039 0.472 0.000 0.192 0.000 0.808 0.000
#> SRR522135 4 0.3039 0.472 0.000 0.192 0.000 0.808 0.000
#> SRR522136 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522137 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522138 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522139 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522140 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522141 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522142 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522143 4 0.0324 0.772 0.000 0.004 0.004 0.992 0.000
#> SRR522144 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522145 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522146 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522147 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522148 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522149 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
#> SRR522150 4 0.0162 0.775 0.000 0.000 0.004 0.996 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522064 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522065 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522066 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522067 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522068 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522069 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522070 3 0.5855 0.2859 0.000 0.192 0.412 0.000 NA 0.000
#> SRR522071 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522072 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522073 6 0.5408 -0.6008 0.088 0.000 0.308 0.000 NA 0.584
#> SRR522074 1 0.5875 -0.0229 0.504 0.000 0.280 0.000 NA 0.004
#> SRR522075 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522076 1 0.4666 -0.0758 0.492 0.004 0.476 0.000 NA 0.004
#> SRR522077 1 0.0000 0.8971 1.000 0.000 0.000 0.000 NA 0.000
#> SRR522078 3 0.3807 0.0734 0.368 0.004 0.628 0.000 NA 0.000
#> SRR522079 6 0.5884 0.3537 0.000 0.384 0.000 0.200 NA 0.416
#> SRR522080 6 0.5884 0.3537 0.000 0.384 0.000 0.200 NA 0.416
#> SRR522081 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522082 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522083 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522084 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522085 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522086 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522087 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522088 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522089 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522090 4 0.0363 0.7581 0.000 0.012 0.000 0.988 NA 0.000
#> SRR522091 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522092 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522093 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522094 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522095 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522096 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522097 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522098 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522099 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522100 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522101 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522102 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522103 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522104 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522105 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522106 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522107 4 0.0000 0.7601 0.000 0.000 0.000 1.000 NA 0.000
#> SRR522108 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522109 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522110 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522111 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522112 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522113 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522114 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522115 4 0.0622 0.7586 0.000 0.012 0.000 0.980 NA 0.000
#> SRR522116 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522117 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522118 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522119 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522120 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522121 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522122 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522123 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522124 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522125 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522126 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522127 4 0.0891 0.7519 0.000 0.024 0.000 0.968 NA 0.000
#> SRR522128 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522129 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522130 2 0.3351 1.0000 0.000 0.712 0.000 0.288 NA 0.000
#> SRR522131 4 0.5833 0.3110 0.000 0.192 0.000 0.444 NA 0.000
#> SRR522132 4 0.5833 0.3110 0.000 0.192 0.000 0.444 NA 0.000
#> SRR522133 4 0.5833 0.3110 0.000 0.192 0.000 0.444 NA 0.000
#> SRR522134 4 0.5833 0.3110 0.000 0.192 0.000 0.444 NA 0.000
#> SRR522135 4 0.5833 0.3110 0.000 0.192 0.000 0.444 NA 0.000
#> SRR522136 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522137 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522138 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522139 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522140 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522141 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522142 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522143 4 0.3841 0.6404 0.000 0.004 0.000 0.616 NA 0.000
#> SRR522144 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522145 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522146 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522147 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522148 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522149 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
#> SRR522150 4 0.3706 0.6443 0.000 0.000 0.000 0.620 NA 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "kmeans"]
# you can also extract it by
# res = res_list["ATC:kmeans"]
A summary of res
and all the functions that can be applied to it:
res
#> A 'ConsensusPartition' object with k = 2, 3, 4, 5, 6.
#> On a matrix with 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'kmeans' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.999 0.998 0.3018 0.699 0.699
#> 3 3 0.608 0.881 0.904 0.9234 0.688 0.553
#> 4 4 0.702 0.854 0.861 0.1846 0.862 0.660
#> 5 5 0.740 0.817 0.833 0.0837 1.000 1.000
#> 6 6 0.787 0.466 0.767 0.0605 0.932 0.775
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 2
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.0376 1.000 0.996 0.004
#> SRR522064 1 0.0376 1.000 0.996 0.004
#> SRR522065 1 0.0376 1.000 0.996 0.004
#> SRR522066 1 0.0376 1.000 0.996 0.004
#> SRR522067 1 0.0376 1.000 0.996 0.004
#> SRR522068 1 0.0376 1.000 0.996 0.004
#> SRR522069 1 0.0376 1.000 0.996 0.004
#> SRR522070 1 0.0376 1.000 0.996 0.004
#> SRR522071 1 0.0376 1.000 0.996 0.004
#> SRR522072 1 0.0376 1.000 0.996 0.004
#> SRR522073 1 0.0376 1.000 0.996 0.004
#> SRR522074 1 0.0376 1.000 0.996 0.004
#> SRR522075 1 0.0376 1.000 0.996 0.004
#> SRR522076 1 0.0376 1.000 0.996 0.004
#> SRR522077 1 0.0376 1.000 0.996 0.004
#> SRR522078 1 0.0376 1.000 0.996 0.004
#> SRR522079 2 0.0000 0.999 0.000 1.000
#> SRR522080 2 0.0000 0.999 0.000 1.000
#> SRR522081 2 0.0000 0.999 0.000 1.000
#> SRR522082 2 0.0000 0.999 0.000 1.000
#> SRR522083 2 0.0000 0.999 0.000 1.000
#> SRR522084 2 0.0000 0.999 0.000 1.000
#> SRR522085 2 0.0000 0.999 0.000 1.000
#> SRR522086 2 0.0000 0.999 0.000 1.000
#> SRR522087 2 0.0000 0.999 0.000 1.000
#> SRR522088 2 0.0000 0.999 0.000 1.000
#> SRR522089 2 0.0000 0.999 0.000 1.000
#> SRR522090 2 0.0000 0.999 0.000 1.000
#> SRR522091 2 0.0000 0.999 0.000 1.000
#> SRR522092 2 0.0000 0.999 0.000 1.000
#> SRR522093 2 0.0000 0.999 0.000 1.000
#> SRR522094 2 0.0000 0.999 0.000 1.000
#> SRR522095 2 0.0000 0.999 0.000 1.000
#> SRR522096 2 0.0000 0.999 0.000 1.000
#> SRR522097 2 0.0000 0.999 0.000 1.000
#> SRR522098 2 0.0000 0.999 0.000 1.000
#> SRR522099 2 0.0000 0.999 0.000 1.000
#> SRR522100 2 0.0000 0.999 0.000 1.000
#> SRR522101 2 0.0000 0.999 0.000 1.000
#> SRR522102 2 0.0000 0.999 0.000 1.000
#> SRR522103 2 0.0000 0.999 0.000 1.000
#> SRR522104 2 0.0000 0.999 0.000 1.000
#> SRR522105 2 0.0000 0.999 0.000 1.000
#> SRR522106 2 0.0000 0.999 0.000 1.000
#> SRR522107 2 0.0000 0.999 0.000 1.000
#> SRR522108 2 0.0000 0.999 0.000 1.000
#> SRR522109 2 0.0000 0.999 0.000 1.000
#> SRR522110 2 0.0000 0.999 0.000 1.000
#> SRR522111 2 0.0000 0.999 0.000 1.000
#> SRR522112 2 0.0000 0.999 0.000 1.000
#> SRR522113 2 0.0000 0.999 0.000 1.000
#> SRR522114 2 0.0000 0.999 0.000 1.000
#> SRR522115 2 0.0000 0.999 0.000 1.000
#> SRR522116 2 0.0000 0.999 0.000 1.000
#> SRR522117 2 0.0000 0.999 0.000 1.000
#> SRR522118 2 0.0000 0.999 0.000 1.000
#> SRR522119 2 0.0000 0.999 0.000 1.000
#> SRR522120 2 0.0000 0.999 0.000 1.000
#> SRR522121 2 0.0000 0.999 0.000 1.000
#> SRR522122 2 0.0000 0.999 0.000 1.000
#> SRR522123 2 0.0000 0.999 0.000 1.000
#> SRR522124 2 0.0000 0.999 0.000 1.000
#> SRR522125 2 0.0000 0.999 0.000 1.000
#> SRR522126 2 0.0000 0.999 0.000 1.000
#> SRR522127 2 0.0000 0.999 0.000 1.000
#> SRR522128 2 0.0000 0.999 0.000 1.000
#> SRR522129 2 0.0000 0.999 0.000 1.000
#> SRR522130 2 0.0000 0.999 0.000 1.000
#> SRR522131 2 0.0376 0.997 0.004 0.996
#> SRR522132 2 0.0376 0.997 0.004 0.996
#> SRR522133 2 0.0376 0.997 0.004 0.996
#> SRR522134 2 0.0376 0.997 0.004 0.996
#> SRR522135 2 0.0376 0.997 0.004 0.996
#> SRR522136 2 0.0376 0.997 0.004 0.996
#> SRR522137 2 0.0376 0.997 0.004 0.996
#> SRR522138 2 0.0376 0.997 0.004 0.996
#> SRR522139 2 0.0376 0.997 0.004 0.996
#> SRR522140 2 0.0376 0.997 0.004 0.996
#> SRR522141 2 0.0376 0.997 0.004 0.996
#> SRR522142 2 0.0376 0.997 0.004 0.996
#> SRR522143 2 0.0376 0.997 0.004 0.996
#> SRR522144 2 0.0376 0.997 0.004 0.996
#> SRR522145 2 0.0376 0.997 0.004 0.996
#> SRR522146 2 0.0376 0.997 0.004 0.996
#> SRR522147 2 0.0376 0.997 0.004 0.996
#> SRR522148 2 0.0376 0.997 0.004 0.996
#> SRR522149 2 0.0376 0.997 0.004 0.996
#> SRR522150 2 0.0376 0.997 0.004 0.996
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522064 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522065 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522066 1 0.2537 0.966 0.92 0.000 0.080
#> SRR522067 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522068 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522069 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522070 1 0.2537 0.966 0.92 0.000 0.080
#> SRR522071 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522072 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522073 1 0.2537 0.966 0.92 0.000 0.080
#> SRR522074 1 0.2537 0.966 0.92 0.000 0.080
#> SRR522075 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522076 1 0.2537 0.966 0.92 0.000 0.080
#> SRR522077 1 0.0000 0.980 1.00 0.000 0.000
#> SRR522078 1 0.2537 0.966 0.92 0.000 0.080
#> SRR522079 2 0.1031 0.899 0.00 0.976 0.024
#> SRR522080 2 0.1031 0.899 0.00 0.976 0.024
#> SRR522081 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522082 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522083 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522084 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522085 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522086 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522087 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522088 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522089 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522090 2 0.1411 0.888 0.00 0.964 0.036
#> SRR522091 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522092 3 0.5621 0.815 0.00 0.308 0.692
#> SRR522093 3 0.5591 0.821 0.00 0.304 0.696
#> SRR522094 3 0.5678 0.803 0.00 0.316 0.684
#> SRR522095 3 0.4452 0.928 0.00 0.192 0.808
#> SRR522096 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522097 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522098 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522099 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522100 3 0.4452 0.928 0.00 0.192 0.808
#> SRR522101 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522102 3 0.4452 0.928 0.00 0.192 0.808
#> SRR522103 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522104 3 0.4452 0.928 0.00 0.192 0.808
#> SRR522105 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522106 3 0.4452 0.928 0.00 0.192 0.808
#> SRR522107 3 0.4750 0.927 0.00 0.216 0.784
#> SRR522108 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522109 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522110 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522111 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522112 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522113 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522114 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522115 2 0.5591 0.461 0.00 0.696 0.304
#> SRR522116 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522117 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522118 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522119 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522120 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522121 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522122 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522123 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522124 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522125 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522126 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522127 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522128 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522129 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522130 2 0.0000 0.921 0.00 1.000 0.000
#> SRR522131 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522132 2 0.0424 0.918 0.00 0.992 0.008
#> SRR522133 2 0.0592 0.915 0.00 0.988 0.012
#> SRR522134 2 0.0237 0.920 0.00 0.996 0.004
#> SRR522135 2 0.0592 0.915 0.00 0.988 0.012
#> SRR522136 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522137 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522138 2 0.6168 0.322 0.00 0.588 0.412
#> SRR522139 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522140 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522141 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522142 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522143 2 0.5948 0.464 0.00 0.640 0.360
#> SRR522144 2 0.6008 0.436 0.00 0.628 0.372
#> SRR522145 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522146 2 0.5988 0.446 0.00 0.632 0.368
#> SRR522147 2 0.5465 0.598 0.00 0.712 0.288
#> SRR522148 3 0.3340 0.888 0.00 0.120 0.880
#> SRR522149 2 0.5948 0.464 0.00 0.640 0.360
#> SRR522150 2 0.6026 0.426 0.00 0.624 0.376
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522066 1 0.2662 0.950 0.9 0.000 0.016 0.084
#> SRR522067 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522070 1 0.2773 0.950 0.9 0.000 0.028 0.072
#> SRR522071 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522073 1 0.2662 0.950 0.9 0.000 0.016 0.084
#> SRR522074 1 0.2662 0.950 0.9 0.000 0.016 0.084
#> SRR522075 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522076 1 0.2706 0.950 0.9 0.000 0.020 0.080
#> SRR522077 1 0.0000 0.971 1.0 0.000 0.000 0.000
#> SRR522078 1 0.2662 0.950 0.9 0.000 0.016 0.084
#> SRR522079 2 0.3552 0.789 0.0 0.848 0.024 0.128
#> SRR522080 2 0.3552 0.789 0.0 0.848 0.024 0.128
#> SRR522081 2 0.3942 0.811 0.0 0.764 0.000 0.236
#> SRR522082 2 0.3975 0.810 0.0 0.760 0.000 0.240
#> SRR522083 2 0.3975 0.810 0.0 0.760 0.000 0.240
#> SRR522084 2 0.3907 0.814 0.0 0.768 0.000 0.232
#> SRR522085 2 0.3975 0.810 0.0 0.760 0.000 0.240
#> SRR522086 2 0.3975 0.810 0.0 0.760 0.000 0.240
#> SRR522087 2 0.3975 0.810 0.0 0.760 0.000 0.240
#> SRR522088 2 0.3975 0.810 0.0 0.760 0.000 0.240
#> SRR522089 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522090 3 0.5376 0.371 0.0 0.396 0.588 0.016
#> SRR522091 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522092 3 0.2704 0.886 0.0 0.124 0.876 0.000
#> SRR522093 3 0.2704 0.886 0.0 0.124 0.876 0.000
#> SRR522094 3 0.2868 0.869 0.0 0.136 0.864 0.000
#> SRR522095 3 0.1557 0.914 0.0 0.056 0.944 0.000
#> SRR522096 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522097 3 0.2081 0.933 0.0 0.084 0.916 0.000
#> SRR522098 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522099 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522100 3 0.1557 0.914 0.0 0.056 0.944 0.000
#> SRR522101 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522102 3 0.1557 0.914 0.0 0.056 0.944 0.000
#> SRR522103 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522104 3 0.1557 0.914 0.0 0.056 0.944 0.000
#> SRR522105 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522106 3 0.1557 0.914 0.0 0.056 0.944 0.000
#> SRR522107 3 0.2011 0.937 0.0 0.080 0.920 0.000
#> SRR522108 2 0.0336 0.896 0.0 0.992 0.000 0.008
#> SRR522109 2 0.0188 0.898 0.0 0.996 0.000 0.004
#> SRR522110 2 0.0188 0.898 0.0 0.996 0.000 0.004
#> SRR522111 2 0.0188 0.898 0.0 0.996 0.000 0.004
#> SRR522112 2 0.0188 0.898 0.0 0.996 0.000 0.004
#> SRR522113 2 0.0336 0.896 0.0 0.992 0.000 0.008
#> SRR522114 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522115 2 0.6058 0.386 0.0 0.604 0.336 0.060
#> SRR522116 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522117 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522118 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522124 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522125 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522126 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522127 2 0.1716 0.895 0.0 0.936 0.000 0.064
#> SRR522128 2 0.0592 0.894 0.0 0.984 0.000 0.016
#> SRR522129 2 0.0469 0.895 0.0 0.988 0.000 0.012
#> SRR522130 2 0.0000 0.899 0.0 1.000 0.000 0.000
#> SRR522131 2 0.2530 0.875 0.0 0.888 0.000 0.112
#> SRR522132 2 0.3105 0.864 0.0 0.868 0.012 0.120
#> SRR522133 2 0.3224 0.862 0.0 0.864 0.016 0.120
#> SRR522134 2 0.2469 0.876 0.0 0.892 0.000 0.108
#> SRR522135 2 0.3390 0.853 0.0 0.852 0.016 0.132
#> SRR522136 4 0.5511 0.685 0.0 0.028 0.352 0.620
#> SRR522137 4 0.5649 0.671 0.0 0.028 0.392 0.580
#> SRR522138 4 0.6386 0.723 0.0 0.212 0.140 0.648
#> SRR522139 4 0.5738 0.650 0.0 0.028 0.432 0.540
#> SRR522140 4 0.5738 0.650 0.0 0.028 0.432 0.540
#> SRR522141 4 0.5738 0.650 0.0 0.028 0.432 0.540
#> SRR522142 4 0.5738 0.650 0.0 0.028 0.432 0.540
#> SRR522143 4 0.6488 0.714 0.0 0.244 0.128 0.628
#> SRR522144 4 0.6478 0.721 0.0 0.236 0.132 0.632
#> SRR522145 4 0.5738 0.650 0.0 0.028 0.432 0.540
#> SRR522146 4 0.6478 0.721 0.0 0.236 0.132 0.632
#> SRR522147 4 0.6477 0.685 0.0 0.264 0.116 0.620
#> SRR522148 4 0.5738 0.650 0.0 0.028 0.432 0.540
#> SRR522149 4 0.6478 0.721 0.0 0.236 0.132 0.632
#> SRR522150 4 0.6478 0.721 0.0 0.236 0.132 0.632
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522064 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522065 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522066 1 0.4080 0.851 0.728 0.000 0.000 0.020 NA
#> SRR522067 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522068 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522069 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522070 1 0.4782 0.851 0.728 0.000 0.016 0.048 NA
#> SRR522071 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522072 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522073 1 0.4197 0.851 0.728 0.000 0.000 0.028 NA
#> SRR522074 1 0.4208 0.851 0.728 0.000 0.004 0.020 NA
#> SRR522075 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522076 1 0.4080 0.851 0.728 0.000 0.000 0.020 NA
#> SRR522077 1 0.0000 0.916 1.000 0.000 0.000 0.000 NA
#> SRR522078 1 0.4268 0.851 0.728 0.000 0.004 0.024 NA
#> SRR522079 2 0.5229 0.629 0.000 0.712 0.028 0.068 NA
#> SRR522080 2 0.5229 0.629 0.000 0.712 0.028 0.068 NA
#> SRR522081 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522082 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522083 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522084 2 0.4874 0.649 0.000 0.600 0.000 0.032 NA
#> SRR522085 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522086 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522087 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522088 2 0.4946 0.647 0.000 0.596 0.000 0.036 NA
#> SRR522089 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522090 3 0.3280 0.776 0.000 0.184 0.808 0.004 NA
#> SRR522091 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522092 3 0.1341 0.966 0.000 0.056 0.944 0.000 NA
#> SRR522093 3 0.1341 0.966 0.000 0.056 0.944 0.000 NA
#> SRR522094 3 0.1341 0.966 0.000 0.056 0.944 0.000 NA
#> SRR522095 3 0.1885 0.965 0.000 0.032 0.936 0.012 NA
#> SRR522096 3 0.1725 0.971 0.000 0.044 0.936 0.000 NA
#> SRR522097 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522098 3 0.1725 0.971 0.000 0.044 0.936 0.000 NA
#> SRR522099 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522100 3 0.1885 0.965 0.000 0.032 0.936 0.012 NA
#> SRR522101 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522102 3 0.1885 0.965 0.000 0.032 0.936 0.012 NA
#> SRR522103 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522104 3 0.1885 0.965 0.000 0.032 0.936 0.012 NA
#> SRR522105 3 0.1725 0.971 0.000 0.044 0.936 0.000 NA
#> SRR522106 3 0.1885 0.965 0.000 0.032 0.936 0.012 NA
#> SRR522107 3 0.1121 0.974 0.000 0.044 0.956 0.000 NA
#> SRR522108 2 0.0865 0.791 0.000 0.972 0.004 0.000 NA
#> SRR522109 2 0.0865 0.792 0.000 0.972 0.004 0.000 NA
#> SRR522110 2 0.0865 0.792 0.000 0.972 0.004 0.000 NA
#> SRR522111 2 0.0865 0.792 0.000 0.972 0.004 0.000 NA
#> SRR522112 2 0.0865 0.792 0.000 0.972 0.004 0.000 NA
#> SRR522113 2 0.0865 0.792 0.000 0.972 0.004 0.000 NA
#> SRR522114 2 0.4252 0.750 0.000 0.768 0.004 0.052 NA
#> SRR522115 2 0.7433 0.354 0.000 0.444 0.308 0.052 NA
#> SRR522116 2 0.4252 0.750 0.000 0.768 0.004 0.052 NA
#> SRR522117 2 0.4252 0.750 0.000 0.768 0.004 0.052 NA
#> SRR522118 2 0.0451 0.795 0.000 0.988 0.004 0.000 NA
#> SRR522119 2 0.0671 0.794 0.000 0.980 0.004 0.000 NA
#> SRR522120 2 0.0324 0.794 0.000 0.992 0.004 0.000 NA
#> SRR522121 2 0.0324 0.794 0.000 0.992 0.004 0.000 NA
#> SRR522122 2 0.0324 0.794 0.000 0.992 0.004 0.000 NA
#> SRR522123 2 0.0324 0.794 0.000 0.992 0.004 0.000 NA
#> SRR522124 2 0.4215 0.751 0.000 0.772 0.004 0.052 NA
#> SRR522125 2 0.4215 0.751 0.000 0.772 0.004 0.052 NA
#> SRR522126 2 0.4215 0.751 0.000 0.772 0.004 0.052 NA
#> SRR522127 2 0.4077 0.754 0.000 0.780 0.004 0.044 NA
#> SRR522128 2 0.0794 0.790 0.000 0.972 0.000 0.000 NA
#> SRR522129 2 0.0955 0.790 0.000 0.968 0.004 0.000 NA
#> SRR522130 2 0.0451 0.793 0.000 0.988 0.004 0.000 NA
#> SRR522131 2 0.5430 0.628 0.000 0.660 0.000 0.192 NA
#> SRR522132 2 0.5631 0.598 0.000 0.636 0.000 0.200 NA
#> SRR522133 2 0.5631 0.598 0.000 0.636 0.000 0.200 NA
#> SRR522134 2 0.5268 0.654 0.000 0.680 0.000 0.172 NA
#> SRR522135 2 0.5773 0.571 0.000 0.616 0.000 0.216 NA
#> SRR522136 4 0.2574 0.847 0.000 0.012 0.112 0.876 NA
#> SRR522137 4 0.2771 0.846 0.000 0.012 0.128 0.860 NA
#> SRR522138 4 0.4995 0.830 0.000 0.088 0.040 0.756 NA
#> SRR522139 4 0.3039 0.840 0.000 0.012 0.152 0.836 NA
#> SRR522140 4 0.3039 0.840 0.000 0.012 0.152 0.836 NA
#> SRR522141 4 0.3039 0.840 0.000 0.012 0.152 0.836 NA
#> SRR522142 4 0.3039 0.840 0.000 0.012 0.152 0.836 NA
#> SRR522143 4 0.5504 0.783 0.000 0.136 0.024 0.700 NA
#> SRR522144 4 0.5065 0.820 0.000 0.112 0.028 0.744 NA
#> SRR522145 4 0.3039 0.840 0.000 0.012 0.152 0.836 NA
#> SRR522146 4 0.5157 0.815 0.000 0.120 0.028 0.736 NA
#> SRR522147 4 0.5457 0.773 0.000 0.144 0.020 0.700 NA
#> SRR522148 4 0.3039 0.840 0.000 0.012 0.152 0.836 NA
#> SRR522149 4 0.5163 0.807 0.000 0.128 0.024 0.732 NA
#> SRR522150 4 0.5065 0.820 0.000 0.112 0.028 0.744 NA
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.4722 0.8134 0.696 0.000 0.004 0.004 0.100 0.196
#> SRR522067 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.5073 0.8120 0.696 0.000 0.004 0.024 0.124 0.152
#> SRR522071 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.4664 0.8134 0.696 0.000 0.000 0.004 0.116 0.184
#> SRR522074 1 0.4750 0.8136 0.696 0.000 0.004 0.008 0.088 0.204
#> SRR522075 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.4640 0.8135 0.696 0.000 0.000 0.008 0.088 0.208
#> SRR522077 1 0.0000 0.8977 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.4768 0.8137 0.696 0.000 0.008 0.004 0.092 0.200
#> SRR522079 2 0.5526 0.0890 0.000 0.548 0.000 0.032 0.068 0.352
#> SRR522080 2 0.5526 0.0890 0.000 0.548 0.000 0.032 0.068 0.352
#> SRR522081 2 0.6449 -1.0000 0.000 0.412 0.000 0.072 0.412 0.104
#> SRR522082 2 0.6479 -0.9950 0.000 0.412 0.000 0.072 0.408 0.108
#> SRR522083 2 0.6479 -0.9950 0.000 0.412 0.000 0.072 0.408 0.108
#> SRR522084 2 0.6439 -0.9867 0.000 0.416 0.000 0.068 0.408 0.108
#> SRR522085 2 0.6449 -1.0000 0.000 0.412 0.000 0.072 0.412 0.104
#> SRR522086 2 0.6449 -1.0000 0.000 0.412 0.000 0.072 0.412 0.104
#> SRR522087 2 0.6479 -0.9950 0.000 0.412 0.000 0.072 0.408 0.108
#> SRR522088 5 0.6449 0.0000 0.000 0.412 0.000 0.072 0.412 0.104
#> SRR522089 3 0.1262 0.9439 0.000 0.020 0.956 0.000 0.016 0.008
#> SRR522090 3 0.3373 0.7932 0.000 0.076 0.848 0.012 0.020 0.044
#> SRR522091 3 0.1262 0.9439 0.000 0.020 0.956 0.000 0.016 0.008
#> SRR522092 3 0.1528 0.9368 0.000 0.028 0.944 0.000 0.016 0.012
#> SRR522093 3 0.1528 0.9368 0.000 0.028 0.944 0.000 0.016 0.012
#> SRR522094 3 0.1622 0.9339 0.000 0.028 0.940 0.000 0.016 0.016
#> SRR522095 3 0.1743 0.9371 0.000 0.008 0.936 0.004 0.024 0.028
#> SRR522096 3 0.1882 0.9417 0.000 0.020 0.928 0.000 0.024 0.028
#> SRR522097 3 0.1262 0.9439 0.000 0.020 0.956 0.000 0.016 0.008
#> SRR522098 3 0.1882 0.9417 0.000 0.020 0.928 0.000 0.024 0.028
#> SRR522099 3 0.0547 0.9488 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR522100 3 0.1743 0.9371 0.000 0.008 0.936 0.004 0.024 0.028
#> SRR522101 3 0.0837 0.9480 0.000 0.020 0.972 0.000 0.004 0.004
#> SRR522102 3 0.1743 0.9371 0.000 0.008 0.936 0.004 0.024 0.028
#> SRR522103 3 0.0837 0.9480 0.000 0.020 0.972 0.000 0.004 0.004
#> SRR522104 3 0.1743 0.9371 0.000 0.008 0.936 0.004 0.024 0.028
#> SRR522105 3 0.1882 0.9417 0.000 0.020 0.928 0.000 0.024 0.028
#> SRR522106 3 0.1743 0.9371 0.000 0.008 0.936 0.004 0.024 0.028
#> SRR522107 3 0.0547 0.9488 0.000 0.020 0.980 0.000 0.000 0.000
#> SRR522108 2 0.0603 0.5234 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522109 2 0.0603 0.5234 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522110 2 0.0603 0.5234 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522111 2 0.0603 0.5234 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522112 2 0.0603 0.5234 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522113 2 0.0603 0.5234 0.000 0.980 0.000 0.000 0.004 0.016
#> SRR522114 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522115 6 0.7920 0.0000 0.000 0.304 0.244 0.092 0.040 0.320
#> SRR522116 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522117 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522118 2 0.0405 0.5269 0.000 0.988 0.000 0.000 0.004 0.008
#> SRR522119 2 0.1082 0.5186 0.000 0.956 0.000 0.000 0.004 0.040
#> SRR522120 2 0.0520 0.5265 0.000 0.984 0.000 0.000 0.008 0.008
#> SRR522121 2 0.0622 0.5256 0.000 0.980 0.000 0.000 0.008 0.012
#> SRR522122 2 0.0520 0.5265 0.000 0.984 0.000 0.000 0.008 0.008
#> SRR522123 2 0.0520 0.5265 0.000 0.984 0.000 0.000 0.008 0.008
#> SRR522124 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522125 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522126 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522127 2 0.5306 0.0215 0.000 0.596 0.000 0.060 0.032 0.312
#> SRR522128 2 0.0891 0.5173 0.000 0.968 0.000 0.000 0.008 0.024
#> SRR522129 2 0.0777 0.5198 0.000 0.972 0.000 0.000 0.004 0.024
#> SRR522130 2 0.0508 0.5272 0.000 0.984 0.000 0.000 0.004 0.012
#> SRR522131 4 0.5892 -0.2089 0.000 0.436 0.000 0.444 0.044 0.076
#> SRR522132 4 0.5810 -0.1226 0.000 0.384 0.000 0.500 0.044 0.072
#> SRR522133 4 0.5810 -0.1226 0.000 0.384 0.000 0.500 0.044 0.072
#> SRR522134 2 0.5916 -0.0911 0.000 0.472 0.000 0.404 0.044 0.080
#> SRR522135 4 0.5804 -0.1155 0.000 0.380 0.000 0.504 0.044 0.072
#> SRR522136 4 0.4905 0.5955 0.000 0.000 0.076 0.580 0.344 0.000
#> SRR522137 4 0.4961 0.5948 0.000 0.000 0.080 0.572 0.348 0.000
#> SRR522138 4 0.1408 0.5940 0.000 0.036 0.020 0.944 0.000 0.000
#> SRR522139 4 0.5127 0.5913 0.000 0.000 0.096 0.556 0.348 0.000
#> SRR522140 4 0.5127 0.5913 0.000 0.000 0.096 0.556 0.348 0.000
#> SRR522141 4 0.5127 0.5913 0.000 0.000 0.096 0.556 0.348 0.000
#> SRR522142 4 0.5127 0.5913 0.000 0.000 0.096 0.556 0.348 0.000
#> SRR522143 4 0.2510 0.5732 0.000 0.056 0.020 0.896 0.004 0.024
#> SRR522144 4 0.1549 0.5931 0.000 0.044 0.020 0.936 0.000 0.000
#> SRR522145 4 0.5127 0.5913 0.000 0.000 0.096 0.556 0.348 0.000
#> SRR522146 4 0.1549 0.5931 0.000 0.044 0.020 0.936 0.000 0.000
#> SRR522147 4 0.2313 0.5678 0.000 0.060 0.016 0.904 0.004 0.016
#> SRR522148 4 0.5127 0.5913 0.000 0.000 0.096 0.556 0.348 0.000
#> SRR522149 4 0.1938 0.5857 0.000 0.052 0.020 0.920 0.000 0.008
#> SRR522150 4 0.1549 0.5931 0.000 0.044 0.020 0.936 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", "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 13957 rows and 88 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 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.967 0.987 0.3868 0.609 0.609
#> 3 3 0.710 0.924 0.919 0.5439 0.772 0.625
#> 4 4 0.973 0.928 0.973 0.1628 0.908 0.764
#> 5 5 0.832 0.875 0.925 0.1040 0.914 0.729
#> 6 6 0.871 0.855 0.873 0.0574 0.948 0.781
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
#> attr(,"optional")
#> [1] 2
There is also optional best \(k\) = 2 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.000 0.965 1.000 0.000
#> SRR522064 1 0.000 0.965 1.000 0.000
#> SRR522065 1 0.000 0.965 1.000 0.000
#> SRR522066 1 0.000 0.965 1.000 0.000
#> SRR522067 1 0.000 0.965 1.000 0.000
#> SRR522068 1 0.000 0.965 1.000 0.000
#> SRR522069 1 0.000 0.965 1.000 0.000
#> SRR522070 1 0.000 0.965 1.000 0.000
#> SRR522071 1 0.000 0.965 1.000 0.000
#> SRR522072 1 0.000 0.965 1.000 0.000
#> SRR522073 1 0.000 0.965 1.000 0.000
#> SRR522074 1 0.000 0.965 1.000 0.000
#> SRR522075 1 0.000 0.965 1.000 0.000
#> SRR522076 1 0.000 0.965 1.000 0.000
#> SRR522077 1 0.000 0.965 1.000 0.000
#> SRR522078 1 0.000 0.965 1.000 0.000
#> SRR522079 2 0.000 0.993 0.000 1.000
#> SRR522080 2 0.000 0.993 0.000 1.000
#> SRR522081 2 0.000 0.993 0.000 1.000
#> SRR522082 2 0.000 0.993 0.000 1.000
#> SRR522083 2 0.000 0.993 0.000 1.000
#> SRR522084 2 0.000 0.993 0.000 1.000
#> SRR522085 2 0.000 0.993 0.000 1.000
#> SRR522086 2 0.000 0.993 0.000 1.000
#> SRR522087 2 0.000 0.993 0.000 1.000
#> SRR522088 2 0.000 0.993 0.000 1.000
#> SRR522089 2 0.000 0.993 0.000 1.000
#> SRR522090 2 0.000 0.993 0.000 1.000
#> SRR522091 2 0.000 0.993 0.000 1.000
#> SRR522092 2 0.000 0.993 0.000 1.000
#> SRR522093 2 0.000 0.993 0.000 1.000
#> SRR522094 2 0.000 0.993 0.000 1.000
#> SRR522095 2 0.000 0.993 0.000 1.000
#> SRR522096 2 0.000 0.993 0.000 1.000
#> SRR522097 2 0.000 0.993 0.000 1.000
#> SRR522098 2 0.000 0.993 0.000 1.000
#> SRR522099 2 0.000 0.993 0.000 1.000
#> SRR522100 2 0.000 0.993 0.000 1.000
#> SRR522101 2 0.000 0.993 0.000 1.000
#> SRR522102 2 0.000 0.993 0.000 1.000
#> SRR522103 2 0.000 0.993 0.000 1.000
#> SRR522104 2 0.000 0.993 0.000 1.000
#> SRR522105 2 0.000 0.993 0.000 1.000
#> SRR522106 2 0.000 0.993 0.000 1.000
#> SRR522107 2 0.000 0.993 0.000 1.000
#> SRR522108 2 0.000 0.993 0.000 1.000
#> SRR522109 2 0.000 0.993 0.000 1.000
#> SRR522110 2 0.000 0.993 0.000 1.000
#> SRR522111 2 0.000 0.993 0.000 1.000
#> SRR522112 2 0.000 0.993 0.000 1.000
#> SRR522113 2 0.000 0.993 0.000 1.000
#> SRR522114 2 0.000 0.993 0.000 1.000
#> SRR522115 2 0.000 0.993 0.000 1.000
#> SRR522116 2 0.000 0.993 0.000 1.000
#> SRR522117 2 0.000 0.993 0.000 1.000
#> SRR522118 2 0.000 0.993 0.000 1.000
#> SRR522119 2 0.000 0.993 0.000 1.000
#> SRR522120 2 0.000 0.993 0.000 1.000
#> SRR522121 2 0.000 0.993 0.000 1.000
#> SRR522122 2 0.000 0.993 0.000 1.000
#> SRR522123 2 0.000 0.993 0.000 1.000
#> SRR522124 2 0.000 0.993 0.000 1.000
#> SRR522125 2 0.000 0.993 0.000 1.000
#> SRR522126 2 0.000 0.993 0.000 1.000
#> SRR522127 2 0.000 0.993 0.000 1.000
#> SRR522128 2 0.000 0.993 0.000 1.000
#> SRR522129 2 0.000 0.993 0.000 1.000
#> SRR522130 2 0.000 0.993 0.000 1.000
#> SRR522131 2 0.000 0.993 0.000 1.000
#> SRR522132 2 0.000 0.993 0.000 1.000
#> SRR522133 2 0.000 0.993 0.000 1.000
#> SRR522134 2 0.000 0.993 0.000 1.000
#> SRR522135 2 0.000 0.993 0.000 1.000
#> SRR522136 2 0.971 0.285 0.400 0.600
#> SRR522137 1 0.971 0.357 0.600 0.400
#> SRR522138 2 0.000 0.993 0.000 1.000
#> SRR522139 1 0.000 0.965 1.000 0.000
#> SRR522140 1 0.671 0.790 0.824 0.176
#> SRR522141 1 0.000 0.965 1.000 0.000
#> SRR522142 1 0.662 0.795 0.828 0.172
#> SRR522143 2 0.000 0.993 0.000 1.000
#> SRR522144 2 0.000 0.993 0.000 1.000
#> SRR522145 1 0.000 0.965 1.000 0.000
#> SRR522146 2 0.000 0.993 0.000 1.000
#> SRR522147 2 0.000 0.993 0.000 1.000
#> SRR522148 1 0.000 0.965 1.000 0.000
#> SRR522149 2 0.000 0.993 0.000 1.000
#> SRR522150 2 0.000 0.993 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522064 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522065 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522066 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522067 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522068 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522069 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522070 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522071 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522072 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522073 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522074 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522075 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522076 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522077 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522078 1 0.0000 0.939 1.0 0.000 0.000
#> SRR522079 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522080 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522081 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522082 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522083 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522084 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522085 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522086 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522087 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522088 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522089 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522090 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522091 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522092 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522093 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522094 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522095 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522096 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522097 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522098 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522099 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522100 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522101 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522102 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522103 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522104 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522105 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522106 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522107 3 0.4555 1.000 0.0 0.200 0.800
#> SRR522108 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522109 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522110 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522111 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522112 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522113 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522114 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522115 2 0.3686 0.760 0.0 0.860 0.140
#> SRR522116 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522117 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522118 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522119 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522120 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522121 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522122 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522123 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522124 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522125 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522126 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522127 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522128 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522129 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522130 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522131 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522132 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522133 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522134 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522135 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522136 2 0.9602 -0.192 0.4 0.400 0.200
#> SRR522137 1 0.8650 0.621 0.6 0.200 0.200
#> SRR522138 2 0.4504 0.751 0.0 0.804 0.196
#> SRR522139 1 0.4555 0.862 0.8 0.000 0.200
#> SRR522140 1 0.4555 0.862 0.8 0.000 0.200
#> SRR522141 1 0.4555 0.862 0.8 0.000 0.200
#> SRR522142 1 0.4555 0.862 0.8 0.000 0.200
#> SRR522143 2 0.0892 0.934 0.0 0.980 0.020
#> SRR522144 2 0.4504 0.751 0.0 0.804 0.196
#> SRR522145 1 0.4555 0.862 0.8 0.000 0.200
#> SRR522146 2 0.4452 0.755 0.0 0.808 0.192
#> SRR522147 2 0.0000 0.953 0.0 1.000 0.000
#> SRR522148 1 0.4555 0.862 0.8 0.000 0.200
#> SRR522149 2 0.3752 0.807 0.0 0.856 0.144
#> SRR522150 2 0.4504 0.751 0.0 0.804 0.196
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522079 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522080 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522081 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522082 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522083 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522084 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522085 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522086 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522087 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522088 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522089 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522090 3 0.1867 0.894 0.000 0.072 0.928 0.000
#> SRR522091 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.994 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522114 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522115 2 0.3942 0.655 0.000 0.764 0.236 0.000
#> SRR522116 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522117 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522118 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522124 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522125 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522126 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522127 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522128 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.960 0.000 1.000 0.000 0.000
#> SRR522131 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522132 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522133 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522134 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522135 2 0.0188 0.959 0.000 0.996 0.000 0.004
#> SRR522136 4 0.0000 0.888 0.000 0.000 0.000 1.000
#> SRR522137 4 0.0000 0.888 0.000 0.000 0.000 1.000
#> SRR522138 4 0.1302 0.866 0.000 0.044 0.000 0.956
#> SRR522139 4 0.0188 0.889 0.004 0.000 0.000 0.996
#> SRR522140 4 0.0188 0.889 0.004 0.000 0.000 0.996
#> SRR522141 4 0.0188 0.889 0.004 0.000 0.000 0.996
#> SRR522142 4 0.0188 0.889 0.004 0.000 0.000 0.996
#> SRR522143 2 0.4776 0.341 0.000 0.624 0.000 0.376
#> SRR522144 4 0.3219 0.775 0.000 0.164 0.000 0.836
#> SRR522145 4 0.0188 0.889 0.004 0.000 0.000 0.996
#> SRR522146 4 0.4948 0.234 0.000 0.440 0.000 0.560
#> SRR522147 2 0.4564 0.462 0.000 0.672 0.000 0.328
#> SRR522148 4 0.0188 0.889 0.004 0.000 0.000 0.996
#> SRR522149 2 0.4888 0.232 0.000 0.588 0.000 0.412
#> SRR522150 4 0.3837 0.717 0.000 0.224 0.000 0.776
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522080 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522081 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522082 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522083 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522084 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522085 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522086 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522087 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522088 2 0.3707 0.642 0 0.716 0.000 0.284 0.000
#> SRR522089 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.2179 0.853 0 0.100 0.896 0.004 0.000
#> SRR522091 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0451 0.979 0 0.008 0.988 0.004 0.000
#> SRR522095 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522096 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522097 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522101 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522103 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522105 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522106 3 0.0162 0.990 0 0.000 0.996 0.004 0.000
#> SRR522107 3 0.0000 0.990 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522114 2 0.2561 0.794 0 0.856 0.000 0.144 0.000
#> SRR522115 2 0.5046 0.610 0 0.704 0.140 0.156 0.000
#> SRR522116 2 0.2605 0.792 0 0.852 0.000 0.148 0.000
#> SRR522117 2 0.2605 0.792 0 0.852 0.000 0.148 0.000
#> SRR522118 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522124 2 0.2605 0.792 0 0.852 0.000 0.148 0.000
#> SRR522125 2 0.2605 0.792 0 0.852 0.000 0.148 0.000
#> SRR522126 2 0.2605 0.792 0 0.852 0.000 0.148 0.000
#> SRR522127 2 0.2605 0.792 0 0.852 0.000 0.148 0.000
#> SRR522128 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.864 0 1.000 0.000 0.000 0.000
#> SRR522131 4 0.4060 0.598 0 0.360 0.000 0.640 0.000
#> SRR522132 4 0.3336 0.789 0 0.228 0.000 0.772 0.000
#> SRR522133 4 0.3395 0.785 0 0.236 0.000 0.764 0.000
#> SRR522134 4 0.4192 0.495 0 0.404 0.000 0.596 0.000
#> SRR522135 4 0.3366 0.788 0 0.232 0.000 0.768 0.000
#> SRR522136 5 0.2020 0.885 0 0.000 0.000 0.100 0.900
#> SRR522137 5 0.0510 0.972 0 0.000 0.000 0.016 0.984
#> SRR522138 4 0.3969 0.512 0 0.004 0.000 0.692 0.304
#> SRR522139 5 0.0000 0.982 0 0.000 0.000 0.000 1.000
#> SRR522140 5 0.0000 0.982 0 0.000 0.000 0.000 1.000
#> SRR522141 5 0.0000 0.982 0 0.000 0.000 0.000 1.000
#> SRR522142 5 0.0000 0.982 0 0.000 0.000 0.000 1.000
#> SRR522143 4 0.3586 0.802 0 0.096 0.000 0.828 0.076
#> SRR522144 4 0.3264 0.718 0 0.016 0.000 0.820 0.164
#> SRR522145 5 0.0000 0.982 0 0.000 0.000 0.000 1.000
#> SRR522146 4 0.3442 0.778 0 0.060 0.000 0.836 0.104
#> SRR522147 4 0.3427 0.805 0 0.108 0.000 0.836 0.056
#> SRR522148 5 0.0000 0.982 0 0.000 0.000 0.000 1.000
#> SRR522149 4 0.3297 0.798 0 0.084 0.000 0.848 0.068
#> SRR522150 4 0.3368 0.729 0 0.024 0.000 0.820 0.156
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000 0.000
#> SRR522079 2 0.4981 0.694 0 0.496 0.000 0.068 0.436 0.000
#> SRR522080 2 0.4981 0.694 0 0.496 0.000 0.068 0.436 0.000
#> SRR522081 5 0.3424 0.993 0 0.096 0.000 0.092 0.812 0.000
#> SRR522082 5 0.3472 0.997 0 0.100 0.000 0.092 0.808 0.000
#> SRR522083 5 0.3472 0.997 0 0.100 0.000 0.092 0.808 0.000
#> SRR522084 5 0.3518 0.991 0 0.104 0.000 0.092 0.804 0.000
#> SRR522085 5 0.3472 0.997 0 0.100 0.000 0.092 0.808 0.000
#> SRR522086 5 0.3424 0.993 0 0.096 0.000 0.092 0.812 0.000
#> SRR522087 5 0.3472 0.997 0 0.100 0.000 0.092 0.808 0.000
#> SRR522088 5 0.3472 0.997 0 0.100 0.000 0.092 0.808 0.000
#> SRR522089 3 0.0405 0.963 0 0.004 0.988 0.000 0.008 0.000
#> SRR522090 3 0.2771 0.839 0 0.116 0.852 0.000 0.032 0.000
#> SRR522091 3 0.0146 0.965 0 0.000 0.996 0.000 0.004 0.000
#> SRR522092 3 0.0820 0.957 0 0.016 0.972 0.000 0.012 0.000
#> SRR522093 3 0.0520 0.962 0 0.008 0.984 0.000 0.008 0.000
#> SRR522094 3 0.1434 0.934 0 0.048 0.940 0.000 0.012 0.000
#> SRR522095 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522096 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522097 3 0.0260 0.964 0 0.000 0.992 0.000 0.008 0.000
#> SRR522098 3 0.1082 0.963 0 0.004 0.956 0.000 0.040 0.000
#> SRR522099 3 0.0146 0.965 0 0.000 0.996 0.000 0.004 0.000
#> SRR522100 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522101 3 0.0260 0.964 0 0.000 0.992 0.000 0.008 0.000
#> SRR522102 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522103 3 0.0260 0.964 0 0.000 0.992 0.000 0.008 0.000
#> SRR522104 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522105 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522106 3 0.1219 0.961 0 0.004 0.948 0.000 0.048 0.000
#> SRR522107 3 0.0000 0.965 0 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.4929 0.704 0 0.508 0.000 0.064 0.428 0.000
#> SRR522109 2 0.4925 0.706 0 0.512 0.000 0.064 0.424 0.000
#> SRR522110 2 0.4925 0.706 0 0.512 0.000 0.064 0.424 0.000
#> SRR522111 2 0.4921 0.706 0 0.516 0.000 0.064 0.420 0.000
#> SRR522112 2 0.4925 0.706 0 0.512 0.000 0.064 0.424 0.000
#> SRR522113 2 0.4925 0.706 0 0.512 0.000 0.064 0.424 0.000
#> SRR522114 2 0.0692 0.473 0 0.976 0.000 0.020 0.004 0.000
#> SRR522115 2 0.2763 0.361 0 0.876 0.072 0.028 0.024 0.000
#> SRR522116 2 0.0692 0.473 0 0.976 0.000 0.020 0.004 0.000
#> SRR522117 2 0.0547 0.470 0 0.980 0.000 0.020 0.000 0.000
#> SRR522118 2 0.4911 0.702 0 0.524 0.000 0.064 0.412 0.000
#> SRR522119 2 0.4893 0.695 0 0.536 0.000 0.064 0.400 0.000
#> SRR522120 2 0.4975 0.702 0 0.504 0.000 0.068 0.428 0.000
#> SRR522121 2 0.4975 0.702 0 0.504 0.000 0.068 0.428 0.000
#> SRR522122 2 0.4975 0.702 0 0.504 0.000 0.068 0.428 0.000
#> SRR522123 2 0.4975 0.702 0 0.504 0.000 0.068 0.428 0.000
#> SRR522124 2 0.0891 0.478 0 0.968 0.000 0.024 0.008 0.000
#> SRR522125 2 0.0777 0.476 0 0.972 0.000 0.024 0.004 0.000
#> SRR522126 2 0.0891 0.478 0 0.968 0.000 0.024 0.008 0.000
#> SRR522127 2 0.0891 0.478 0 0.968 0.000 0.024 0.008 0.000
#> SRR522128 2 0.4978 0.700 0 0.500 0.000 0.068 0.432 0.000
#> SRR522129 2 0.4978 0.700 0 0.500 0.000 0.068 0.432 0.000
#> SRR522130 2 0.4925 0.705 0 0.512 0.000 0.064 0.424 0.000
#> SRR522131 4 0.3806 0.676 0 0.136 0.000 0.776 0.088 0.000
#> SRR522132 4 0.2201 0.832 0 0.048 0.000 0.900 0.052 0.000
#> SRR522133 4 0.2258 0.832 0 0.044 0.000 0.896 0.060 0.000
#> SRR522134 4 0.3947 0.659 0 0.136 0.000 0.764 0.100 0.000
#> SRR522135 4 0.1713 0.849 0 0.028 0.000 0.928 0.044 0.000
#> SRR522136 6 0.1866 0.908 0 0.000 0.000 0.084 0.008 0.908
#> SRR522137 6 0.0891 0.965 0 0.000 0.000 0.024 0.008 0.968
#> SRR522138 4 0.2833 0.767 0 0.004 0.000 0.836 0.012 0.148
#> SRR522139 6 0.0000 0.983 0 0.000 0.000 0.000 0.000 1.000
#> SRR522140 6 0.0000 0.983 0 0.000 0.000 0.000 0.000 1.000
#> SRR522141 6 0.0000 0.983 0 0.000 0.000 0.000 0.000 1.000
#> SRR522142 6 0.0000 0.983 0 0.000 0.000 0.000 0.000 1.000
#> SRR522143 4 0.1718 0.870 0 0.020 0.000 0.936 0.020 0.024
#> SRR522144 4 0.2103 0.848 0 0.012 0.000 0.912 0.020 0.056
#> SRR522145 6 0.0000 0.983 0 0.000 0.000 0.000 0.000 1.000
#> SRR522146 4 0.1408 0.867 0 0.000 0.000 0.944 0.020 0.036
#> SRR522147 4 0.1088 0.870 0 0.000 0.000 0.960 0.016 0.024
#> SRR522148 6 0.0000 0.983 0 0.000 0.000 0.000 0.000 1.000
#> SRR522149 4 0.1230 0.869 0 0.008 0.000 0.956 0.008 0.028
#> SRR522150 4 0.2045 0.852 0 0.016 0.000 0.916 0.016 0.052
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["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 13957 rows and 88 columns.
#> Top rows (1000, 2000, 3000, 4000, 5000) are extracted by 'ATC' method.
#> Subgroups are detected by 'pam' method.
#> Performed in total 1250 partitions by row resampling.
#> Best k for subgroups seems to be 2.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 1.000 1.000 0.3016 0.699 0.699
#> 3 3 0.567 0.776 0.885 1.0011 0.720 0.600
#> 4 4 0.855 0.885 0.950 0.2210 0.821 0.580
#> 5 5 0.894 0.899 0.949 0.0453 0.975 0.902
#> 6 6 0.882 0.896 0.938 0.0416 0.958 0.817
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
#> SRR522063 1 0 1 1 0
#> SRR522064 1 0 1 1 0
#> SRR522065 1 0 1 1 0
#> SRR522066 1 0 1 1 0
#> SRR522067 1 0 1 1 0
#> SRR522068 1 0 1 1 0
#> SRR522069 1 0 1 1 0
#> SRR522070 1 0 1 1 0
#> SRR522071 1 0 1 1 0
#> SRR522072 1 0 1 1 0
#> SRR522073 1 0 1 1 0
#> SRR522074 1 0 1 1 0
#> SRR522075 1 0 1 1 0
#> SRR522076 1 0 1 1 0
#> SRR522077 1 0 1 1 0
#> SRR522078 1 0 1 1 0
#> SRR522079 2 0 1 0 1
#> SRR522080 2 0 1 0 1
#> SRR522081 2 0 1 0 1
#> SRR522082 2 0 1 0 1
#> SRR522083 2 0 1 0 1
#> SRR522084 2 0 1 0 1
#> SRR522085 2 0 1 0 1
#> SRR522086 2 0 1 0 1
#> SRR522087 2 0 1 0 1
#> SRR522088 2 0 1 0 1
#> SRR522089 2 0 1 0 1
#> SRR522090 2 0 1 0 1
#> SRR522091 2 0 1 0 1
#> SRR522092 2 0 1 0 1
#> SRR522093 2 0 1 0 1
#> SRR522094 2 0 1 0 1
#> SRR522095 2 0 1 0 1
#> SRR522096 2 0 1 0 1
#> SRR522097 2 0 1 0 1
#> SRR522098 2 0 1 0 1
#> SRR522099 2 0 1 0 1
#> SRR522100 2 0 1 0 1
#> SRR522101 2 0 1 0 1
#> SRR522102 2 0 1 0 1
#> SRR522103 2 0 1 0 1
#> SRR522104 2 0 1 0 1
#> SRR522105 2 0 1 0 1
#> SRR522106 2 0 1 0 1
#> SRR522107 2 0 1 0 1
#> SRR522108 2 0 1 0 1
#> SRR522109 2 0 1 0 1
#> SRR522110 2 0 1 0 1
#> SRR522111 2 0 1 0 1
#> SRR522112 2 0 1 0 1
#> SRR522113 2 0 1 0 1
#> SRR522114 2 0 1 0 1
#> SRR522115 2 0 1 0 1
#> SRR522116 2 0 1 0 1
#> SRR522117 2 0 1 0 1
#> SRR522118 2 0 1 0 1
#> SRR522119 2 0 1 0 1
#> SRR522120 2 0 1 0 1
#> SRR522121 2 0 1 0 1
#> SRR522122 2 0 1 0 1
#> SRR522123 2 0 1 0 1
#> SRR522124 2 0 1 0 1
#> SRR522125 2 0 1 0 1
#> SRR522126 2 0 1 0 1
#> SRR522127 2 0 1 0 1
#> SRR522128 2 0 1 0 1
#> SRR522129 2 0 1 0 1
#> SRR522130 2 0 1 0 1
#> SRR522131 2 0 1 0 1
#> SRR522132 2 0 1 0 1
#> SRR522133 2 0 1 0 1
#> SRR522134 2 0 1 0 1
#> SRR522135 2 0 1 0 1
#> SRR522136 2 0 1 0 1
#> SRR522137 2 0 1 0 1
#> SRR522138 2 0 1 0 1
#> SRR522139 2 0 1 0 1
#> SRR522140 2 0 1 0 1
#> SRR522141 2 0 1 0 1
#> SRR522142 2 0 1 0 1
#> SRR522143 2 0 1 0 1
#> SRR522144 2 0 1 0 1
#> SRR522145 2 0 1 0 1
#> SRR522146 2 0 1 0 1
#> SRR522147 2 0 1 0 1
#> SRR522148 2 0 1 0 1
#> SRR522149 2 0 1 0 1
#> SRR522150 2 0 1 0 1
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 1.000 1 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000
#> SRR522079 2 0.5733 0.600 0 0.676 0.324
#> SRR522080 2 0.6045 0.500 0 0.620 0.380
#> SRR522081 2 0.0424 0.782 0 0.992 0.008
#> SRR522082 2 0.0424 0.782 0 0.992 0.008
#> SRR522083 2 0.0424 0.782 0 0.992 0.008
#> SRR522084 2 0.0592 0.782 0 0.988 0.012
#> SRR522085 2 0.0592 0.782 0 0.988 0.012
#> SRR522086 2 0.0424 0.782 0 0.992 0.008
#> SRR522087 2 0.2261 0.779 0 0.932 0.068
#> SRR522088 2 0.0424 0.782 0 0.992 0.008
#> SRR522089 3 0.0592 0.908 0 0.012 0.988
#> SRR522090 3 0.4452 0.686 0 0.192 0.808
#> SRR522091 3 0.0592 0.908 0 0.012 0.988
#> SRR522092 3 0.0592 0.908 0 0.012 0.988
#> SRR522093 3 0.0592 0.908 0 0.012 0.988
#> SRR522094 3 0.4452 0.686 0 0.192 0.808
#> SRR522095 3 0.0000 0.906 0 0.000 1.000
#> SRR522096 3 0.0000 0.906 0 0.000 1.000
#> SRR522097 3 0.0592 0.908 0 0.012 0.988
#> SRR522098 3 0.0000 0.906 0 0.000 1.000
#> SRR522099 3 0.0424 0.908 0 0.008 0.992
#> SRR522100 3 0.0000 0.906 0 0.000 1.000
#> SRR522101 3 0.0592 0.908 0 0.012 0.988
#> SRR522102 3 0.0000 0.906 0 0.000 1.000
#> SRR522103 3 0.0592 0.908 0 0.012 0.988
#> SRR522104 3 0.0000 0.906 0 0.000 1.000
#> SRR522105 3 0.0000 0.906 0 0.000 1.000
#> SRR522106 3 0.0000 0.906 0 0.000 1.000
#> SRR522107 3 0.0592 0.908 0 0.012 0.988
#> SRR522108 2 0.4654 0.730 0 0.792 0.208
#> SRR522109 2 0.4931 0.711 0 0.768 0.232
#> SRR522110 2 0.4654 0.730 0 0.792 0.208
#> SRR522111 2 0.4654 0.730 0 0.792 0.208
#> SRR522112 2 0.5098 0.695 0 0.752 0.248
#> SRR522113 2 0.5098 0.695 0 0.752 0.248
#> SRR522114 2 0.6062 0.492 0 0.616 0.384
#> SRR522115 3 0.6267 -0.291 0 0.452 0.548
#> SRR522116 2 0.5621 0.623 0 0.692 0.308
#> SRR522117 3 0.6180 0.149 0 0.416 0.584
#> SRR522118 2 0.1529 0.782 0 0.960 0.040
#> SRR522119 2 0.3619 0.764 0 0.864 0.136
#> SRR522120 2 0.5988 0.524 0 0.632 0.368
#> SRR522121 2 0.4002 0.755 0 0.840 0.160
#> SRR522122 2 0.6252 0.341 0 0.556 0.444
#> SRR522123 2 0.5706 0.605 0 0.680 0.320
#> SRR522124 2 0.4654 0.730 0 0.792 0.208
#> SRR522125 2 0.4750 0.724 0 0.784 0.216
#> SRR522126 2 0.4605 0.733 0 0.796 0.204
#> SRR522127 2 0.4654 0.730 0 0.792 0.208
#> SRR522128 2 0.3619 0.764 0 0.864 0.136
#> SRR522129 2 0.6168 0.427 0 0.588 0.412
#> SRR522130 2 0.6126 0.453 0 0.600 0.400
#> SRR522131 2 0.0592 0.780 0 0.988 0.012
#> SRR522132 2 0.0747 0.779 0 0.984 0.016
#> SRR522133 2 0.0747 0.779 0 0.984 0.016
#> SRR522134 2 0.0592 0.780 0 0.988 0.012
#> SRR522135 2 0.0747 0.779 0 0.984 0.016
#> SRR522136 2 0.4452 0.695 0 0.808 0.192
#> SRR522137 2 0.4452 0.695 0 0.808 0.192
#> SRR522138 2 0.4452 0.695 0 0.808 0.192
#> SRR522139 2 0.4452 0.695 0 0.808 0.192
#> SRR522140 2 0.4452 0.695 0 0.808 0.192
#> SRR522141 2 0.4452 0.695 0 0.808 0.192
#> SRR522142 2 0.4452 0.695 0 0.808 0.192
#> SRR522143 2 0.0892 0.779 0 0.980 0.020
#> SRR522144 2 0.4452 0.695 0 0.808 0.192
#> SRR522145 2 0.4452 0.695 0 0.808 0.192
#> SRR522146 2 0.4178 0.709 0 0.828 0.172
#> SRR522147 2 0.0747 0.779 0 0.984 0.016
#> SRR522148 2 0.4452 0.695 0 0.808 0.192
#> SRR522149 2 0.4346 0.701 0 0.816 0.184
#> SRR522150 2 0.4452 0.695 0 0.808 0.192
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.0000 1 0.000 0.000 0.000
#> SRR522079 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522080 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522081 2 0.1940 0.8635 0 0.924 0.000 0.076
#> SRR522082 2 0.4277 0.5789 0 0.720 0.000 0.280
#> SRR522083 2 0.4830 0.2987 0 0.608 0.000 0.392
#> SRR522084 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522085 2 0.4679 0.4139 0 0.648 0.000 0.352
#> SRR522086 4 0.4040 0.7511 0 0.248 0.000 0.752
#> SRR522087 2 0.3311 0.7514 0 0.828 0.000 0.172
#> SRR522088 4 0.4072 0.7447 0 0.252 0.000 0.748
#> SRR522089 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522090 3 0.2469 0.8437 0 0.108 0.892 0.000
#> SRR522091 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522092 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522093 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522094 3 0.2704 0.8234 0 0.124 0.876 0.000
#> SRR522095 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522096 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522097 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522098 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522099 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522100 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522101 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522102 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522103 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522104 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522105 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522106 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522107 3 0.0000 0.9573 0 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522114 2 0.0188 0.9247 0 0.996 0.000 0.004
#> SRR522115 3 0.4967 0.0919 0 0.000 0.548 0.452
#> SRR522116 2 0.0336 0.9202 0 0.992 0.008 0.000
#> SRR522117 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522118 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522120 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522121 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522124 2 0.1118 0.9006 0 0.964 0.000 0.036
#> SRR522125 2 0.4999 -0.0878 0 0.508 0.000 0.492
#> SRR522126 2 0.0336 0.9222 0 0.992 0.000 0.008
#> SRR522127 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522128 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.9270 0 1.000 0.000 0.000
#> SRR522131 4 0.3569 0.8198 0 0.196 0.000 0.804
#> SRR522132 4 0.3810 0.8230 0 0.188 0.008 0.804
#> SRR522133 4 0.3569 0.8198 0 0.196 0.000 0.804
#> SRR522134 4 0.3569 0.8198 0 0.196 0.000 0.804
#> SRR522135 4 0.3569 0.8198 0 0.196 0.000 0.804
#> SRR522136 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522137 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522138 4 0.0336 0.8908 0 0.000 0.008 0.992
#> SRR522139 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522140 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522141 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522142 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522143 4 0.3486 0.8253 0 0.188 0.000 0.812
#> SRR522144 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522145 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522146 4 0.0188 0.8924 0 0.000 0.004 0.996
#> SRR522147 4 0.3710 0.8217 0 0.192 0.004 0.804
#> SRR522148 4 0.0000 0.8934 0 0.000 0.000 1.000
#> SRR522149 4 0.0188 0.8925 0 0.000 0.004 0.996
#> SRR522150 4 0.0188 0.8925 0 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
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 2 0.0963 0.901 0 0.964 0.000 0.000 0.036
#> SRR522080 2 0.0963 0.901 0 0.964 0.000 0.000 0.036
#> SRR522081 2 0.1671 0.869 0 0.924 0.000 0.076 0.000
#> SRR522082 2 0.3684 0.635 0 0.720 0.000 0.280 0.000
#> SRR522083 2 0.4161 0.398 0 0.608 0.000 0.392 0.000
#> SRR522084 2 0.0609 0.909 0 0.980 0.000 0.000 0.020
#> SRR522085 2 0.4030 0.493 0 0.648 0.000 0.352 0.000
#> SRR522086 4 0.3480 0.618 0 0.248 0.000 0.752 0.000
#> SRR522087 2 0.3053 0.787 0 0.828 0.000 0.164 0.008
#> SRR522088 4 0.3508 0.612 0 0.252 0.000 0.748 0.000
#> SRR522089 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.2020 0.834 0 0.100 0.900 0.000 0.000
#> SRR522091 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.2230 0.810 0 0.116 0.884 0.000 0.000
#> SRR522095 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.954 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522109 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522110 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522114 2 0.1792 0.887 0 0.916 0.000 0.000 0.084
#> SRR522115 3 0.4278 0.115 0 0.000 0.548 0.452 0.000
#> SRR522116 2 0.2077 0.883 0 0.908 0.008 0.000 0.084
#> SRR522117 2 0.1792 0.887 0 0.916 0.000 0.000 0.084
#> SRR522118 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522124 2 0.2189 0.883 0 0.904 0.000 0.012 0.084
#> SRR522125 2 0.5703 0.228 0 0.508 0.000 0.408 0.084
#> SRR522126 2 0.1952 0.886 0 0.912 0.000 0.004 0.084
#> SRR522127 2 0.1792 0.887 0 0.916 0.000 0.000 0.084
#> SRR522128 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.914 0 1.000 0.000 0.000 0.000
#> SRR522131 4 0.2127 0.814 0 0.108 0.000 0.892 0.000
#> SRR522132 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522133 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522134 4 0.1544 0.861 0 0.068 0.000 0.932 0.000
#> SRR522135 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522136 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522137 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522138 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522139 5 0.2280 1.000 0 0.000 0.000 0.120 0.880
#> SRR522140 5 0.2280 1.000 0 0.000 0.000 0.120 0.880
#> SRR522141 5 0.2280 1.000 0 0.000 0.000 0.120 0.880
#> SRR522142 5 0.2280 1.000 0 0.000 0.000 0.120 0.880
#> SRR522143 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522145 5 0.2280 1.000 0 0.000 0.000 0.120 0.880
#> SRR522146 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522147 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522148 5 0.2280 1.000 0 0.000 0.000 0.120 0.880
#> SRR522149 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
#> SRR522150 4 0.0000 0.926 0 0.000 0.000 1.000 0.000
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.2219 0.909 0.864 0.000 0.000 0.000 0.000 0.136
#> SRR522069 1 0.2219 0.909 0.864 0.000 0.000 0.000 0.000 0.136
#> SRR522070 1 0.1204 0.926 0.944 0.000 0.000 0.000 0.000 0.056
#> SRR522071 1 0.2219 0.909 0.864 0.000 0.000 0.000 0.000 0.136
#> SRR522072 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0260 0.953 0.992 0.000 0.000 0.000 0.000 0.008
#> SRR522074 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.2219 0.909 0.864 0.000 0.000 0.000 0.000 0.136
#> SRR522076 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522077 1 0.2219 0.909 0.864 0.000 0.000 0.000 0.000 0.136
#> SRR522078 1 0.0000 0.956 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522079 2 0.1657 0.849 0.000 0.928 0.000 0.000 0.016 0.056
#> SRR522080 2 0.1657 0.849 0.000 0.928 0.000 0.000 0.016 0.056
#> SRR522081 2 0.1556 0.828 0.000 0.920 0.000 0.080 0.000 0.000
#> SRR522082 2 0.3351 0.547 0.000 0.712 0.000 0.288 0.000 0.000
#> SRR522083 2 0.3747 0.361 0.000 0.604 0.000 0.396 0.000 0.000
#> SRR522084 2 0.0865 0.870 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522085 2 0.3634 0.433 0.000 0.644 0.000 0.356 0.000 0.000
#> SRR522086 4 0.3126 0.618 0.000 0.248 0.000 0.752 0.000 0.000
#> SRR522087 2 0.3134 0.697 0.000 0.808 0.000 0.168 0.000 0.024
#> SRR522088 4 0.3151 0.610 0.000 0.252 0.000 0.748 0.000 0.000
#> SRR522089 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522090 3 0.1814 0.831 0.000 0.100 0.900 0.000 0.000 0.000
#> SRR522091 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522093 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522094 3 0.2003 0.805 0.000 0.116 0.884 0.000 0.000 0.000
#> SRR522095 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.954 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522109 2 0.0260 0.893 0.000 0.992 0.000 0.000 0.000 0.008
#> SRR522110 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522111 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522112 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522113 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522114 6 0.3175 0.983 0.000 0.256 0.000 0.000 0.000 0.744
#> SRR522115 3 0.3843 0.124 0.000 0.000 0.548 0.452 0.000 0.000
#> SRR522116 6 0.3373 0.974 0.000 0.248 0.008 0.000 0.000 0.744
#> SRR522117 6 0.3175 0.983 0.000 0.256 0.000 0.000 0.000 0.744
#> SRR522118 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522119 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522120 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522121 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522122 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522123 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522124 6 0.3175 0.983 0.000 0.256 0.000 0.000 0.000 0.744
#> SRR522125 6 0.3864 0.915 0.000 0.208 0.000 0.048 0.000 0.744
#> SRR522126 6 0.3175 0.983 0.000 0.256 0.000 0.000 0.000 0.744
#> SRR522127 6 0.3175 0.983 0.000 0.256 0.000 0.000 0.000 0.744
#> SRR522128 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522129 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0000 0.898 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522131 4 0.1910 0.829 0.000 0.108 0.000 0.892 0.000 0.000
#> SRR522132 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522133 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522134 4 0.1387 0.876 0.000 0.068 0.000 0.932 0.000 0.000
#> SRR522135 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522136 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522137 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522138 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522139 5 0.0458 1.000 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR522140 5 0.0458 1.000 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR522141 5 0.0458 1.000 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR522142 5 0.0458 1.000 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR522143 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522144 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522145 5 0.0458 1.000 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR522146 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522147 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522148 5 0.0458 1.000 0.000 0.000 0.000 0.016 0.984 0.000
#> SRR522149 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
#> SRR522150 4 0.0000 0.935 0.000 0.000 0.000 1.000 0.000 0.000
Heatmaps for the consensus matrix. It visualizes the probability of two samples to be in a same group.
consensus_heatmap(res, k = 2)
consensus_heatmap(res, k = 3)
consensus_heatmap(res, k = 4)
consensus_heatmap(res, k = 5)
consensus_heatmap(res, k = 6)
Heatmaps for the membership of samples in all partitions to see how consistent they are:
membership_heatmap(res, k = 2)
membership_heatmap(res, k = 3)
membership_heatmap(res, k = 4)
membership_heatmap(res, k = 5)
membership_heatmap(res, k = 6)
As soon as we have had the classes for columns, we can look for signatures which are significantly different between classes which can be candidate marks for certain classes. Following are the heatmaps for signatures.
Signature heatmaps where rows are scaled:
get_signatures(res, k = 2)
get_signatures(res, k = 3)
get_signatures(res, k = 4)
get_signatures(res, k = 5)
get_signatures(res, k = 6)
Signature heatmaps where rows are not scaled:
get_signatures(res, k = 2, scale_rows = FALSE)
get_signatures(res, k = 3, scale_rows = FALSE)
get_signatures(res, k = 4, scale_rows = FALSE)
get_signatures(res, k = 5, scale_rows = FALSE)
get_signatures(res, k = 6, scale_rows = FALSE)
Compare the overlap of signatures from different k:
compare_signatures(res)
get_signature()
returns a data frame invisibly. TO get the list of signatures, the function
call should be assigned to a variable explicitly. In following code, if plot
argument is set
to FALSE
, no heatmap is plotted while only the differential analysis is performed.
# code only for demonstration
tb = get_signature(res, k = ..., plot = FALSE)
An example of the output of tb
is:
#> which_row fdr mean_1 mean_2 scaled_mean_1 scaled_mean_2 km
#> 1 38 0.042760348 8.373488 9.131774 -0.5533452 0.5164555 1
#> 2 40 0.018707592 7.106213 8.469186 -0.6173731 0.5762149 1
#> 3 55 0.019134737 10.221463 11.207825 -0.6159697 0.5749050 1
#> 4 59 0.006059896 5.921854 7.869574 -0.6899429 0.6439467 1
#> 5 60 0.018055526 8.928898 10.211722 -0.6204761 0.5791110 1
#> 6 98 0.009384629 15.714769 14.887706 0.6635654 -0.6193277 2
...
The columns in tb
are:
which_row
: row indices corresponding to the input matrix.fdr
: FDR for the differential test. mean_x
: The mean value in group x.scaled_mean_x
: The mean value in group x after rows are scaled.km
: Row groups if k-means clustering is applied to rows.UMAP plot which shows how samples are separated.
dimension_reduction(res, k = 2, method = "UMAP")
dimension_reduction(res, k = 3, method = "UMAP")
dimension_reduction(res, k = 4, method = "UMAP")
dimension_reduction(res, k = 5, method = "UMAP")
dimension_reduction(res, k = 6, method = "UMAP")
Following heatmap shows how subgroups are split when increasing k
:
collect_classes(res)
If matrix rows can be associated to genes, consider to use functional_enrichment(res,
...)
to perform function enrichment for the signature genes. See this vignette for more detailed explanations.
The object with results only for a single top-value method and a single partition method can be extracted as:
res = res_list["ATC", "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 13957 rows and 88 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 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.807 0.927 0.963 0.3866 0.599 0.599
#> 3 3 0.599 0.836 0.880 0.5441 0.748 0.596
#> 4 4 0.959 0.948 0.977 0.2262 0.829 0.589
#> 5 5 0.840 0.880 0.890 0.0503 0.974 0.903
#> 6 6 0.846 0.771 0.873 0.0397 0.966 0.862
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 4
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.000 0.903 1.000 0.000
#> SRR522064 1 0.000 0.903 1.000 0.000
#> SRR522065 1 0.000 0.903 1.000 0.000
#> SRR522066 1 0.000 0.903 1.000 0.000
#> SRR522067 1 0.000 0.903 1.000 0.000
#> SRR522068 1 0.000 0.903 1.000 0.000
#> SRR522069 1 0.000 0.903 1.000 0.000
#> SRR522070 1 0.000 0.903 1.000 0.000
#> SRR522071 1 0.000 0.903 1.000 0.000
#> SRR522072 1 0.000 0.903 1.000 0.000
#> SRR522073 1 0.000 0.903 1.000 0.000
#> SRR522074 1 0.000 0.903 1.000 0.000
#> SRR522075 1 0.000 0.903 1.000 0.000
#> SRR522076 1 0.000 0.903 1.000 0.000
#> SRR522077 1 0.000 0.903 1.000 0.000
#> SRR522078 1 0.000 0.903 1.000 0.000
#> SRR522079 2 0.662 0.783 0.172 0.828
#> SRR522080 2 0.662 0.783 0.172 0.828
#> SRR522081 2 0.000 0.979 0.000 1.000
#> SRR522082 2 0.000 0.979 0.000 1.000
#> SRR522083 2 0.000 0.979 0.000 1.000
#> SRR522084 2 0.000 0.979 0.000 1.000
#> SRR522085 2 0.000 0.979 0.000 1.000
#> SRR522086 2 0.000 0.979 0.000 1.000
#> SRR522087 2 0.000 0.979 0.000 1.000
#> SRR522088 2 0.000 0.979 0.000 1.000
#> SRR522089 2 0.000 0.979 0.000 1.000
#> SRR522090 2 0.000 0.979 0.000 1.000
#> SRR522091 2 0.000 0.979 0.000 1.000
#> SRR522092 2 0.000 0.979 0.000 1.000
#> SRR522093 2 0.000 0.979 0.000 1.000
#> SRR522094 2 0.000 0.979 0.000 1.000
#> SRR522095 2 0.000 0.979 0.000 1.000
#> SRR522096 2 0.000 0.979 0.000 1.000
#> SRR522097 2 0.000 0.979 0.000 1.000
#> SRR522098 2 0.000 0.979 0.000 1.000
#> SRR522099 2 0.000 0.979 0.000 1.000
#> SRR522100 2 0.000 0.979 0.000 1.000
#> SRR522101 2 0.000 0.979 0.000 1.000
#> SRR522102 2 0.000 0.979 0.000 1.000
#> SRR522103 2 0.000 0.979 0.000 1.000
#> SRR522104 2 0.000 0.979 0.000 1.000
#> SRR522105 2 0.000 0.979 0.000 1.000
#> SRR522106 2 0.000 0.979 0.000 1.000
#> SRR522107 2 0.000 0.979 0.000 1.000
#> SRR522108 2 0.000 0.979 0.000 1.000
#> SRR522109 2 0.000 0.979 0.000 1.000
#> SRR522110 2 0.000 0.979 0.000 1.000
#> SRR522111 2 0.000 0.979 0.000 1.000
#> SRR522112 2 0.000 0.979 0.000 1.000
#> SRR522113 2 0.000 0.979 0.000 1.000
#> SRR522114 2 0.000 0.979 0.000 1.000
#> SRR522115 2 0.000 0.979 0.000 1.000
#> SRR522116 2 0.000 0.979 0.000 1.000
#> SRR522117 2 0.000 0.979 0.000 1.000
#> SRR522118 2 0.000 0.979 0.000 1.000
#> SRR522119 2 0.000 0.979 0.000 1.000
#> SRR522120 2 0.000 0.979 0.000 1.000
#> SRR522121 2 0.000 0.979 0.000 1.000
#> SRR522122 2 0.000 0.979 0.000 1.000
#> SRR522123 2 0.000 0.979 0.000 1.000
#> SRR522124 2 0.000 0.979 0.000 1.000
#> SRR522125 2 0.000 0.979 0.000 1.000
#> SRR522126 2 0.000 0.979 0.000 1.000
#> SRR522127 2 0.000 0.979 0.000 1.000
#> SRR522128 2 0.000 0.979 0.000 1.000
#> SRR522129 2 0.000 0.979 0.000 1.000
#> SRR522130 2 0.000 0.979 0.000 1.000
#> SRR522131 2 0.000 0.979 0.000 1.000
#> SRR522132 2 0.402 0.912 0.080 0.920
#> SRR522133 2 0.402 0.912 0.080 0.920
#> SRR522134 2 0.000 0.979 0.000 1.000
#> SRR522135 2 0.402 0.912 0.080 0.920
#> SRR522136 1 0.985 0.365 0.572 0.428
#> SRR522137 1 0.921 0.588 0.664 0.336
#> SRR522138 2 0.529 0.866 0.120 0.880
#> SRR522139 1 0.767 0.771 0.776 0.224
#> SRR522140 1 0.767 0.771 0.776 0.224
#> SRR522141 1 0.767 0.771 0.776 0.224
#> SRR522142 1 0.767 0.771 0.776 0.224
#> SRR522143 2 0.402 0.912 0.080 0.920
#> SRR522144 2 0.402 0.912 0.080 0.920
#> SRR522145 1 0.767 0.771 0.776 0.224
#> SRR522146 2 0.402 0.912 0.080 0.920
#> SRR522147 2 0.402 0.912 0.080 0.920
#> SRR522148 1 0.767 0.771 0.776 0.224
#> SRR522149 2 0.402 0.912 0.080 0.920
#> SRR522150 2 0.402 0.912 0.080 0.920
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522064 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522065 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522066 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522067 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522068 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522069 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522070 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522071 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522072 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522073 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522074 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522075 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522076 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522077 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522078 1 0.0000 0.843 1.000 0.000 0.000
#> SRR522079 2 0.3918 0.796 0.120 0.868 0.012
#> SRR522080 2 0.3918 0.796 0.120 0.868 0.012
#> SRR522081 2 0.0237 0.892 0.000 0.996 0.004
#> SRR522082 2 0.0237 0.892 0.000 0.996 0.004
#> SRR522083 2 0.0237 0.892 0.000 0.996 0.004
#> SRR522084 2 0.0424 0.892 0.000 0.992 0.008
#> SRR522085 2 0.0592 0.891 0.000 0.988 0.012
#> SRR522086 2 0.0237 0.892 0.000 0.996 0.004
#> SRR522087 2 0.0424 0.892 0.000 0.992 0.008
#> SRR522088 2 0.0000 0.892 0.000 1.000 0.000
#> SRR522089 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522090 2 0.5785 0.375 0.000 0.668 0.332
#> SRR522091 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522092 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522093 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522094 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522095 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522096 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522097 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522098 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522099 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522100 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522101 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522102 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522103 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522104 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522105 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522106 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522107 3 0.4002 1.000 0.000 0.160 0.840
#> SRR522108 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522109 2 0.0592 0.891 0.000 0.988 0.012
#> SRR522110 2 0.0592 0.891 0.000 0.988 0.012
#> SRR522111 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522112 2 0.0424 0.892 0.000 0.992 0.008
#> SRR522113 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522114 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522115 2 0.1964 0.868 0.000 0.944 0.056
#> SRR522116 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522117 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522118 2 0.0424 0.892 0.000 0.992 0.008
#> SRR522119 2 0.0237 0.892 0.000 0.996 0.004
#> SRR522120 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522121 2 0.0747 0.892 0.000 0.984 0.016
#> SRR522122 2 0.0747 0.889 0.000 0.984 0.016
#> SRR522123 2 0.0592 0.891 0.000 0.988 0.012
#> SRR522124 2 0.1964 0.882 0.000 0.944 0.056
#> SRR522125 2 0.1753 0.885 0.000 0.952 0.048
#> SRR522126 2 0.2796 0.864 0.000 0.908 0.092
#> SRR522127 2 0.0747 0.892 0.000 0.984 0.016
#> SRR522128 2 0.0237 0.892 0.000 0.996 0.004
#> SRR522129 2 0.0592 0.891 0.000 0.988 0.012
#> SRR522130 2 0.0424 0.892 0.000 0.992 0.008
#> SRR522131 2 0.4782 0.814 0.016 0.820 0.164
#> SRR522132 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522133 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522134 2 0.4782 0.808 0.016 0.820 0.164
#> SRR522135 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522136 2 0.9161 0.316 0.280 0.532 0.188
#> SRR522137 2 0.9502 -0.024 0.376 0.436 0.188
#> SRR522138 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522139 1 0.9227 0.445 0.520 0.292 0.188
#> SRR522140 1 0.9227 0.445 0.520 0.292 0.188
#> SRR522141 1 0.9227 0.445 0.520 0.292 0.188
#> SRR522142 1 0.9227 0.445 0.520 0.292 0.188
#> SRR522143 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522144 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522145 1 0.9227 0.445 0.520 0.292 0.188
#> SRR522146 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522147 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522148 1 0.9227 0.445 0.520 0.292 0.188
#> SRR522149 2 0.5062 0.796 0.016 0.800 0.184
#> SRR522150 2 0.5062 0.796 0.016 0.800 0.184
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522079 2 0.3528 0.762 0.192 0.808 0.000 0.000
#> SRR522080 2 0.3528 0.762 0.192 0.808 0.000 0.000
#> SRR522081 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522082 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522083 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522084 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522085 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522086 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522087 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522088 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522089 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522090 2 0.5151 0.142 0.004 0.532 0.464 0.000
#> SRR522091 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522092 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522093 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522094 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522095 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522096 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522097 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522098 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522099 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522100 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522101 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522102 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522103 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522104 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522105 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522106 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522107 3 0.0000 1.000 0.000 0.000 1.000 0.000
#> SRR522108 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522109 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522110 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522111 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522112 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522113 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522114 2 0.0817 0.952 0.000 0.976 0.024 0.000
#> SRR522115 2 0.0779 0.956 0.004 0.980 0.016 0.000
#> SRR522116 2 0.0817 0.952 0.000 0.976 0.024 0.000
#> SRR522117 2 0.0921 0.949 0.000 0.972 0.028 0.000
#> SRR522118 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522119 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522120 2 0.0188 0.967 0.000 0.996 0.004 0.000
#> SRR522121 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522122 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522123 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522124 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522125 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522126 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522127 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522128 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522129 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522130 2 0.0000 0.969 0.000 1.000 0.000 0.000
#> SRR522131 4 0.4454 0.616 0.000 0.308 0.000 0.692
#> SRR522132 4 0.2760 0.849 0.000 0.128 0.000 0.872
#> SRR522133 4 0.2814 0.846 0.000 0.132 0.000 0.868
#> SRR522134 4 0.4477 0.608 0.000 0.312 0.000 0.688
#> SRR522135 4 0.2760 0.849 0.000 0.128 0.000 0.872
#> SRR522136 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522137 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522138 4 0.0188 0.935 0.000 0.004 0.000 0.996
#> SRR522139 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522140 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522141 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522142 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522143 4 0.0188 0.935 0.000 0.004 0.000 0.996
#> SRR522144 4 0.0188 0.935 0.000 0.004 0.000 0.996
#> SRR522145 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522146 4 0.0188 0.935 0.000 0.004 0.000 0.996
#> SRR522147 4 0.0188 0.935 0.000 0.004 0.000 0.996
#> SRR522148 4 0.0000 0.934 0.000 0.000 0.000 1.000
#> SRR522149 4 0.0188 0.935 0.000 0.004 0.000 0.996
#> SRR522150 4 0.0188 0.935 0.000 0.004 0.000 0.996
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.2773 0.8996 0.836 0.000 0.000 0.164 0.000
#> SRR522067 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.2852 0.8960 0.828 0.000 0.000 0.172 0.000
#> SRR522071 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.2929 0.8912 0.820 0.000 0.000 0.180 0.000
#> SRR522074 1 0.2773 0.8998 0.836 0.000 0.000 0.164 0.000
#> SRR522075 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.2773 0.8996 0.836 0.000 0.000 0.164 0.000
#> SRR522077 1 0.0000 0.9415 1.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.2813 0.8979 0.832 0.000 0.000 0.168 0.000
#> SRR522079 2 0.3635 0.7046 0.004 0.748 0.000 0.248 0.000
#> SRR522080 2 0.3635 0.7046 0.004 0.748 0.000 0.248 0.000
#> SRR522081 2 0.1851 0.8790 0.000 0.912 0.000 0.088 0.000
#> SRR522082 2 0.1851 0.8790 0.000 0.912 0.000 0.088 0.000
#> SRR522083 2 0.1851 0.8790 0.000 0.912 0.000 0.088 0.000
#> SRR522084 2 0.1792 0.8797 0.000 0.916 0.000 0.084 0.000
#> SRR522085 2 0.2280 0.8780 0.000 0.880 0.000 0.120 0.000
#> SRR522086 2 0.1851 0.8790 0.000 0.912 0.000 0.088 0.000
#> SRR522087 2 0.1851 0.8790 0.000 0.912 0.000 0.088 0.000
#> SRR522088 2 0.1851 0.8790 0.000 0.912 0.000 0.088 0.000
#> SRR522089 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522090 2 0.5574 0.3048 0.000 0.512 0.416 0.072 0.000
#> SRR522091 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0162 0.9958 0.000 0.000 0.996 0.004 0.000
#> SRR522093 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0404 0.9889 0.000 0.000 0.988 0.012 0.000
#> SRR522095 3 0.0162 0.9958 0.000 0.000 0.996 0.004 0.000
#> SRR522096 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.9988 0.000 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0963 0.8808 0.000 0.964 0.000 0.036 0.000
#> SRR522109 2 0.1792 0.8824 0.000 0.916 0.000 0.084 0.000
#> SRR522110 2 0.1732 0.8822 0.000 0.920 0.000 0.080 0.000
#> SRR522111 2 0.0794 0.8873 0.000 0.972 0.000 0.028 0.000
#> SRR522112 2 0.1792 0.8824 0.000 0.916 0.000 0.084 0.000
#> SRR522113 2 0.1732 0.8836 0.000 0.920 0.000 0.080 0.000
#> SRR522114 2 0.3003 0.8159 0.000 0.812 0.000 0.188 0.000
#> SRR522115 2 0.2361 0.8642 0.000 0.892 0.012 0.096 0.000
#> SRR522116 2 0.3003 0.8159 0.000 0.812 0.000 0.188 0.000
#> SRR522117 2 0.3003 0.8159 0.000 0.812 0.000 0.188 0.000
#> SRR522118 2 0.1121 0.8890 0.000 0.956 0.000 0.044 0.000
#> SRR522119 2 0.0404 0.8825 0.000 0.988 0.000 0.012 0.000
#> SRR522120 2 0.2424 0.8494 0.000 0.868 0.000 0.132 0.000
#> SRR522121 2 0.1851 0.8678 0.000 0.912 0.000 0.088 0.000
#> SRR522122 2 0.0290 0.8826 0.000 0.992 0.000 0.008 0.000
#> SRR522123 2 0.0000 0.8822 0.000 1.000 0.000 0.000 0.000
#> SRR522124 2 0.2966 0.8165 0.000 0.816 0.000 0.184 0.000
#> SRR522125 2 0.2929 0.8193 0.000 0.820 0.000 0.180 0.000
#> SRR522126 2 0.3074 0.8162 0.000 0.804 0.000 0.196 0.000
#> SRR522127 2 0.3003 0.8170 0.000 0.812 0.000 0.188 0.000
#> SRR522128 2 0.0794 0.8831 0.000 0.972 0.000 0.028 0.000
#> SRR522129 2 0.1043 0.8871 0.000 0.960 0.000 0.040 0.000
#> SRR522130 2 0.1478 0.8795 0.000 0.936 0.000 0.064 0.000
#> SRR522131 4 0.4305 0.8119 0.000 0.052 0.000 0.748 0.200
#> SRR522132 4 0.4522 0.8616 0.000 0.044 0.000 0.708 0.248
#> SRR522133 4 0.4563 0.8596 0.000 0.048 0.000 0.708 0.244
#> SRR522134 4 0.4270 0.8174 0.000 0.048 0.000 0.748 0.204
#> SRR522135 4 0.4622 0.8671 0.000 0.044 0.000 0.692 0.264
#> SRR522136 5 0.2813 0.6621 0.000 0.000 0.000 0.168 0.832
#> SRR522137 5 0.0290 0.8919 0.000 0.000 0.000 0.008 0.992
#> SRR522138 5 0.4196 -0.0229 0.000 0.004 0.000 0.356 0.640
#> SRR522139 5 0.0000 0.8980 0.000 0.000 0.000 0.000 1.000
#> SRR522140 5 0.0000 0.8980 0.000 0.000 0.000 0.000 1.000
#> SRR522141 5 0.0000 0.8980 0.000 0.000 0.000 0.000 1.000
#> SRR522142 5 0.0000 0.8980 0.000 0.000 0.000 0.000 1.000
#> SRR522143 4 0.4029 0.8641 0.000 0.004 0.000 0.680 0.316
#> SRR522144 4 0.4310 0.7696 0.000 0.004 0.000 0.604 0.392
#> SRR522145 5 0.0000 0.8980 0.000 0.000 0.000 0.000 1.000
#> SRR522146 4 0.4151 0.8445 0.000 0.004 0.000 0.652 0.344
#> SRR522147 4 0.3928 0.8679 0.000 0.004 0.000 0.700 0.296
#> SRR522148 5 0.0000 0.8980 0.000 0.000 0.000 0.000 1.000
#> SRR522149 4 0.4135 0.8493 0.000 0.004 0.000 0.656 0.340
#> SRR522150 4 0.4299 0.7786 0.000 0.004 0.000 0.608 0.388
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.3864 0.6689 0.520 0.000 0.000 0.000 0.000 0.480
#> SRR522067 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.3866 0.6668 0.516 0.000 0.000 0.000 0.000 0.484
#> SRR522071 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.3867 0.6638 0.512 0.000 0.000 0.000 0.000 0.488
#> SRR522074 1 0.3866 0.6668 0.516 0.000 0.000 0.000 0.000 0.484
#> SRR522075 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.3864 0.6689 0.520 0.000 0.000 0.000 0.000 0.480
#> SRR522077 1 0.0000 0.8202 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.3866 0.6668 0.516 0.000 0.000 0.000 0.000 0.484
#> SRR522079 6 0.3868 1.0000 0.000 0.496 0.000 0.000 0.000 0.504
#> SRR522080 6 0.3868 1.0000 0.000 0.496 0.000 0.000 0.000 0.504
#> SRR522081 2 0.2122 0.7042 0.000 0.900 0.000 0.024 0.000 0.076
#> SRR522082 2 0.2122 0.7042 0.000 0.900 0.000 0.024 0.000 0.076
#> SRR522083 2 0.2122 0.7042 0.000 0.900 0.000 0.024 0.000 0.076
#> SRR522084 2 0.1995 0.7225 0.000 0.912 0.000 0.036 0.000 0.052
#> SRR522085 2 0.3370 0.6793 0.000 0.812 0.000 0.064 0.000 0.124
#> SRR522086 2 0.2122 0.7042 0.000 0.900 0.000 0.024 0.000 0.076
#> SRR522087 2 0.2122 0.7042 0.000 0.900 0.000 0.024 0.000 0.076
#> SRR522088 2 0.2331 0.7013 0.000 0.888 0.000 0.032 0.000 0.080
#> SRR522089 3 0.0146 0.9537 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522090 3 0.6488 -0.4205 0.000 0.316 0.344 0.016 0.000 0.324
#> SRR522091 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522092 3 0.0547 0.9432 0.000 0.000 0.980 0.000 0.000 0.020
#> SRR522093 3 0.0260 0.9516 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR522094 3 0.1141 0.9160 0.000 0.000 0.948 0.000 0.000 0.052
#> SRR522095 3 0.0260 0.9513 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR522096 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522097 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522098 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522099 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522102 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.9559 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.2762 0.5318 0.000 0.804 0.000 0.000 0.000 0.196
#> SRR522109 2 0.2595 0.5756 0.000 0.836 0.000 0.004 0.000 0.160
#> SRR522110 2 0.2165 0.6555 0.000 0.884 0.000 0.008 0.000 0.108
#> SRR522111 2 0.1176 0.7235 0.000 0.956 0.000 0.024 0.000 0.020
#> SRR522112 2 0.2703 0.5521 0.000 0.824 0.000 0.004 0.000 0.172
#> SRR522113 2 0.2703 0.5576 0.000 0.824 0.000 0.004 0.000 0.172
#> SRR522114 2 0.3578 0.6411 0.000 0.784 0.000 0.052 0.000 0.164
#> SRR522115 2 0.4103 0.0658 0.000 0.684 0.008 0.020 0.000 0.288
#> SRR522116 2 0.3672 0.6330 0.000 0.776 0.000 0.056 0.000 0.168
#> SRR522117 2 0.3803 0.6322 0.000 0.760 0.000 0.056 0.000 0.184
#> SRR522118 2 0.1644 0.7328 0.000 0.932 0.000 0.028 0.000 0.040
#> SRR522119 2 0.2841 0.5851 0.000 0.824 0.000 0.012 0.000 0.164
#> SRR522120 2 0.2733 0.7069 0.000 0.864 0.000 0.056 0.000 0.080
#> SRR522121 2 0.3020 0.7117 0.000 0.844 0.000 0.076 0.000 0.080
#> SRR522122 2 0.1616 0.7347 0.000 0.932 0.000 0.020 0.000 0.048
#> SRR522123 2 0.1003 0.7307 0.000 0.964 0.000 0.016 0.000 0.020
#> SRR522124 2 0.3792 0.6369 0.000 0.780 0.000 0.108 0.000 0.112
#> SRR522125 2 0.3006 0.6894 0.000 0.844 0.000 0.064 0.000 0.092
#> SRR522126 2 0.3961 0.6184 0.000 0.764 0.000 0.124 0.000 0.112
#> SRR522127 2 0.3637 0.6483 0.000 0.792 0.000 0.084 0.000 0.124
#> SRR522128 2 0.2706 0.5722 0.000 0.832 0.000 0.008 0.000 0.160
#> SRR522129 2 0.2841 0.5651 0.000 0.824 0.000 0.012 0.000 0.164
#> SRR522130 2 0.2744 0.7209 0.000 0.864 0.000 0.072 0.000 0.064
#> SRR522131 4 0.1967 0.8638 0.000 0.012 0.000 0.904 0.000 0.084
#> SRR522132 4 0.0748 0.9141 0.000 0.004 0.000 0.976 0.004 0.016
#> SRR522133 4 0.0508 0.9145 0.000 0.004 0.000 0.984 0.000 0.012
#> SRR522134 4 0.1643 0.8765 0.000 0.008 0.000 0.924 0.000 0.068
#> SRR522135 4 0.1148 0.9131 0.000 0.004 0.000 0.960 0.016 0.020
#> SRR522136 5 0.3695 0.6067 0.000 0.000 0.000 0.272 0.712 0.016
#> SRR522137 5 0.2494 0.8341 0.000 0.000 0.000 0.120 0.864 0.016
#> SRR522138 4 0.4279 0.1163 0.000 0.004 0.000 0.548 0.436 0.012
#> SRR522139 5 0.0000 0.9356 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522140 5 0.0000 0.9356 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522141 5 0.0000 0.9356 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522142 5 0.0000 0.9356 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522143 4 0.0508 0.9152 0.000 0.000 0.000 0.984 0.012 0.004
#> SRR522144 4 0.1461 0.8944 0.000 0.000 0.000 0.940 0.044 0.016
#> SRR522145 5 0.0000 0.9356 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522146 4 0.0622 0.9139 0.000 0.000 0.000 0.980 0.008 0.012
#> SRR522147 4 0.0146 0.9152 0.000 0.000 0.000 0.996 0.000 0.004
#> SRR522148 5 0.0000 0.9356 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522149 4 0.0717 0.9121 0.000 0.000 0.000 0.976 0.008 0.016
#> SRR522150 4 0.1500 0.8936 0.000 0.000 0.000 0.936 0.052 0.012
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 13957 rows and 88 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 6.
#>
#> Following methods can be applied to this 'ConsensusPartition' object:
#> [1] "cola_report" "collect_classes" "collect_plots"
#> [4] "collect_stats" "colnames" "compare_signatures"
#> [7] "consensus_heatmap" "dimension_reduction" "functional_enrichment"
#> [10] "get_anno_col" "get_anno" "get_classes"
#> [13] "get_consensus" "get_matrix" "get_membership"
#> [16] "get_param" "get_signatures" "get_stats"
#> [19] "is_best_k" "is_stable_k" "membership_heatmap"
#> [22] "ncol" "nrow" "plot_ecdf"
#> [25] "rownames" "select_partition_number" "show"
#> [28] "suggest_best_k" "test_to_known_factors"
collect_plots()
function collects all the plots made from res
for all k
(number of partitions)
into one single page to provide an easy and fast comparison between different k
.
collect_plots(res)
The plots are:
k
and the heatmap of
predicted classes for each k
.k
.k
.k
.All the plots in panels can be made by individual functions and they are plotted later in this section.
select_partition_number()
produces several plots showing different
statistics for choosing “optimized” k
. There are following statistics:
k
;k
, the area increased is defined as \(A_k - A_{k-1}\).The detailed explanations of these statistics can be found in the cola vignette.
Generally speaking, lower PAC score, higher mean silhouette score or higher
concordance corresponds to better partition. Rand index and Jaccard index
measure how similar the current partition is compared to partition with k-1
.
If they are too similar, we won't accept k
is better than k-1
.
select_partition_number(res)
The numeric values for all these statistics can be obtained by get_stats()
.
get_stats(res)
#> k 1-PAC mean_silhouette concordance area_increased Rand Jaccard
#> 2 2 1.000 0.965 0.986 0.3305 0.671 0.671
#> 3 3 0.784 0.923 0.937 0.8256 0.704 0.565
#> 4 4 0.971 0.962 0.976 0.2168 0.833 0.593
#> 5 5 0.951 0.955 0.970 0.0734 0.950 0.807
#> 6 6 0.934 0.934 0.930 0.0315 0.962 0.821
suggest_best_k()
suggests the best \(k\) based on these statistics. The rules are as follows:
suggest_best_k(res)
#> [1] 6
#> attr(,"optional")
#> [1] 2 4 5
There is also optional best \(k\) = 2 4 5 that is worth to check.
Following shows the table of the partitions (You need to click the show/hide
code output link to see it). The membership matrix (columns with name p*
)
is inferred by
clue::cl_consensus()
function with the SE
method. Basically the value in the membership matrix
represents the probability to belong to a certain group. The finall class
label for an item is determined with the group with highest probability it
belongs to.
In get_classes()
function, the entropy is calculated from the membership
matrix and the silhouette score is calculated from the consensus matrix.
cbind(get_classes(res, k = 2), get_membership(res, k = 2))
#> class entropy silhouette p1 p2
#> SRR522063 1 0.000 0.965 1.000 0.000
#> SRR522064 1 0.000 0.965 1.000 0.000
#> SRR522065 1 0.000 0.965 1.000 0.000
#> SRR522066 1 0.000 0.965 1.000 0.000
#> SRR522067 1 0.000 0.965 1.000 0.000
#> SRR522068 1 0.000 0.965 1.000 0.000
#> SRR522069 1 0.000 0.965 1.000 0.000
#> SRR522070 1 0.000 0.965 1.000 0.000
#> SRR522071 1 0.000 0.965 1.000 0.000
#> SRR522072 1 0.000 0.965 1.000 0.000
#> SRR522073 1 0.000 0.965 1.000 0.000
#> SRR522074 1 0.000 0.965 1.000 0.000
#> SRR522075 1 0.000 0.965 1.000 0.000
#> SRR522076 1 0.000 0.965 1.000 0.000
#> SRR522077 1 0.000 0.965 1.000 0.000
#> SRR522078 1 0.000 0.965 1.000 0.000
#> SRR522079 2 0.000 0.990 0.000 1.000
#> SRR522080 2 0.000 0.990 0.000 1.000
#> SRR522081 2 0.000 0.990 0.000 1.000
#> SRR522082 2 0.000 0.990 0.000 1.000
#> SRR522083 2 0.000 0.990 0.000 1.000
#> SRR522084 2 0.000 0.990 0.000 1.000
#> SRR522085 2 0.000 0.990 0.000 1.000
#> SRR522086 2 0.000 0.990 0.000 1.000
#> SRR522087 2 0.000 0.990 0.000 1.000
#> SRR522088 2 0.000 0.990 0.000 1.000
#> SRR522089 2 0.000 0.990 0.000 1.000
#> SRR522090 2 0.000 0.990 0.000 1.000
#> SRR522091 2 0.000 0.990 0.000 1.000
#> SRR522092 2 0.000 0.990 0.000 1.000
#> SRR522093 2 0.000 0.990 0.000 1.000
#> SRR522094 2 0.000 0.990 0.000 1.000
#> SRR522095 2 0.000 0.990 0.000 1.000
#> SRR522096 2 0.000 0.990 0.000 1.000
#> SRR522097 2 0.000 0.990 0.000 1.000
#> SRR522098 2 0.000 0.990 0.000 1.000
#> SRR522099 2 0.000 0.990 0.000 1.000
#> SRR522100 2 0.000 0.990 0.000 1.000
#> SRR522101 2 0.000 0.990 0.000 1.000
#> SRR522102 2 0.000 0.990 0.000 1.000
#> SRR522103 2 0.000 0.990 0.000 1.000
#> SRR522104 2 0.000 0.990 0.000 1.000
#> SRR522105 2 0.000 0.990 0.000 1.000
#> SRR522106 2 0.000 0.990 0.000 1.000
#> SRR522107 2 0.000 0.990 0.000 1.000
#> SRR522108 2 0.000 0.990 0.000 1.000
#> SRR522109 2 0.000 0.990 0.000 1.000
#> SRR522110 2 0.000 0.990 0.000 1.000
#> SRR522111 2 0.000 0.990 0.000 1.000
#> SRR522112 2 0.000 0.990 0.000 1.000
#> SRR522113 2 0.000 0.990 0.000 1.000
#> SRR522114 2 0.000 0.990 0.000 1.000
#> SRR522115 2 0.000 0.990 0.000 1.000
#> SRR522116 2 0.000 0.990 0.000 1.000
#> SRR522117 2 0.000 0.990 0.000 1.000
#> SRR522118 2 0.000 0.990 0.000 1.000
#> SRR522119 2 0.000 0.990 0.000 1.000
#> SRR522120 2 0.000 0.990 0.000 1.000
#> SRR522121 2 0.000 0.990 0.000 1.000
#> SRR522122 2 0.000 0.990 0.000 1.000
#> SRR522123 2 0.000 0.990 0.000 1.000
#> SRR522124 2 0.000 0.990 0.000 1.000
#> SRR522125 2 0.000 0.990 0.000 1.000
#> SRR522126 2 0.000 0.990 0.000 1.000
#> SRR522127 2 0.000 0.990 0.000 1.000
#> SRR522128 2 0.000 0.990 0.000 1.000
#> SRR522129 2 0.000 0.990 0.000 1.000
#> SRR522130 2 0.000 0.990 0.000 1.000
#> SRR522131 2 0.000 0.990 0.000 1.000
#> SRR522132 2 0.000 0.990 0.000 1.000
#> SRR522133 2 0.000 0.990 0.000 1.000
#> SRR522134 2 0.000 0.990 0.000 1.000
#> SRR522135 2 0.000 0.990 0.000 1.000
#> SRR522136 2 0.000 0.990 0.000 1.000
#> SRR522137 2 0.000 0.990 0.000 1.000
#> SRR522138 2 0.000 0.990 0.000 1.000
#> SRR522139 1 0.921 0.505 0.664 0.336
#> SRR522140 2 0.000 0.990 0.000 1.000
#> SRR522141 1 0.795 0.687 0.760 0.240
#> SRR522142 2 0.000 0.990 0.000 1.000
#> SRR522143 2 0.000 0.990 0.000 1.000
#> SRR522144 2 0.000 0.990 0.000 1.000
#> SRR522145 2 0.932 0.441 0.348 0.652
#> SRR522146 2 0.000 0.990 0.000 1.000
#> SRR522147 2 0.000 0.990 0.000 1.000
#> SRR522148 2 0.909 0.498 0.324 0.676
#> SRR522149 2 0.000 0.990 0.000 1.000
#> SRR522150 2 0.000 0.990 0.000 1.000
cbind(get_classes(res, k = 3), get_membership(res, k = 3))
#> class entropy silhouette p1 p2 p3
#> SRR522063 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522064 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522065 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522066 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522067 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522068 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522069 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522070 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522071 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522072 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522073 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522074 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522075 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522076 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522077 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522078 1 0.0000 0.935 1.000 0.000 0.000
#> SRR522079 2 0.0424 0.944 0.000 0.992 0.008
#> SRR522080 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522081 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522082 2 0.0000 0.942 0.000 1.000 0.000
#> SRR522083 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522084 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522085 2 0.0424 0.944 0.000 0.992 0.008
#> SRR522086 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522087 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522088 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522089 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522090 3 0.3192 0.949 0.000 0.112 0.888
#> SRR522091 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522092 3 0.3038 0.958 0.000 0.104 0.896
#> SRR522093 3 0.3116 0.954 0.000 0.108 0.892
#> SRR522094 3 0.3116 0.954 0.000 0.108 0.892
#> SRR522095 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522096 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522097 3 0.2356 0.984 0.000 0.072 0.928
#> SRR522098 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522099 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522100 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522101 3 0.2537 0.978 0.000 0.080 0.920
#> SRR522102 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522103 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522104 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522105 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522106 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522107 3 0.2261 0.986 0.000 0.068 0.932
#> SRR522108 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522109 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522110 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522111 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522112 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522113 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522114 2 0.1031 0.936 0.000 0.976 0.024
#> SRR522115 3 0.2625 0.974 0.000 0.084 0.916
#> SRR522116 2 0.2537 0.905 0.000 0.920 0.080
#> SRR522117 2 0.1289 0.937 0.000 0.968 0.032
#> SRR522118 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522119 2 0.0424 0.944 0.000 0.992 0.008
#> SRR522120 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522121 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522122 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522123 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522124 2 0.0237 0.943 0.000 0.996 0.004
#> SRR522125 2 0.1643 0.929 0.000 0.956 0.044
#> SRR522126 2 0.0237 0.941 0.000 0.996 0.004
#> SRR522127 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522128 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522129 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522130 2 0.0592 0.943 0.000 0.988 0.012
#> SRR522131 2 0.2066 0.922 0.000 0.940 0.060
#> SRR522132 2 0.2165 0.922 0.000 0.936 0.064
#> SRR522133 2 0.2625 0.912 0.000 0.916 0.084
#> SRR522134 2 0.1163 0.935 0.000 0.972 0.028
#> SRR522135 2 0.2448 0.912 0.000 0.924 0.076
#> SRR522136 2 0.4504 0.841 0.000 0.804 0.196
#> SRR522137 2 0.4555 0.838 0.000 0.800 0.200
#> SRR522138 2 0.4504 0.841 0.000 0.804 0.196
#> SRR522139 1 0.6208 0.733 0.752 0.048 0.200
#> SRR522140 2 0.4555 0.838 0.000 0.800 0.200
#> SRR522141 1 0.5660 0.751 0.772 0.028 0.200
#> SRR522142 2 0.4605 0.834 0.000 0.796 0.204
#> SRR522143 2 0.4291 0.854 0.000 0.820 0.180
#> SRR522144 2 0.4504 0.841 0.000 0.804 0.196
#> SRR522145 1 0.8345 0.583 0.628 0.172 0.200
#> SRR522146 2 0.4504 0.841 0.000 0.804 0.196
#> SRR522147 2 0.3412 0.891 0.000 0.876 0.124
#> SRR522148 1 0.8345 0.583 0.628 0.172 0.200
#> SRR522149 2 0.4346 0.851 0.000 0.816 0.184
#> SRR522150 2 0.4504 0.841 0.000 0.804 0.196
cbind(get_classes(res, k = 4), get_membership(res, k = 4))
#> class entropy silhouette p1 p2 p3 p4
#> SRR522063 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1.000 0.000 0.000 0.000
#> SRR522079 2 0.0188 0.978 0.000 0.996 0.000 0.004
#> SRR522080 2 0.0188 0.978 0.000 0.996 0.000 0.004
#> SRR522081 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR522082 2 0.0707 0.970 0.000 0.980 0.000 0.020
#> SRR522083 2 0.0469 0.974 0.000 0.988 0.000 0.012
#> SRR522084 2 0.0188 0.976 0.000 0.996 0.000 0.004
#> SRR522085 2 0.0592 0.972 0.000 0.984 0.000 0.016
#> SRR522086 2 0.0707 0.970 0.000 0.980 0.000 0.020
#> SRR522087 2 0.0707 0.970 0.000 0.980 0.000 0.020
#> SRR522088 2 0.0707 0.970 0.000 0.980 0.000 0.020
#> SRR522089 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522090 3 0.0469 0.990 0.000 0.012 0.988 0.000
#> SRR522091 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522092 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522093 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522094 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522095 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522096 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522097 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522098 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522099 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522100 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522101 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522102 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522103 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522104 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522105 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522106 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522107 3 0.0188 0.998 0.000 0.004 0.996 0.000
#> SRR522108 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522109 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522110 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522111 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522112 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522113 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522114 2 0.0672 0.977 0.000 0.984 0.008 0.008
#> SRR522115 3 0.0817 0.975 0.000 0.000 0.976 0.024
#> SRR522116 2 0.3808 0.787 0.000 0.812 0.176 0.012
#> SRR522117 2 0.2101 0.928 0.000 0.928 0.060 0.012
#> SRR522118 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522119 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522120 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522121 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522122 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522123 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522124 2 0.0707 0.977 0.000 0.980 0.000 0.020
#> SRR522125 2 0.2081 0.913 0.000 0.916 0.000 0.084
#> SRR522126 2 0.0707 0.977 0.000 0.980 0.000 0.020
#> SRR522127 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522128 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522129 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522130 2 0.0469 0.981 0.000 0.988 0.000 0.012
#> SRR522131 4 0.3837 0.781 0.000 0.224 0.000 0.776
#> SRR522132 4 0.3801 0.786 0.000 0.220 0.000 0.780
#> SRR522133 4 0.3444 0.821 0.000 0.184 0.000 0.816
#> SRR522134 4 0.3873 0.776 0.000 0.228 0.000 0.772
#> SRR522135 4 0.3801 0.786 0.000 0.220 0.000 0.780
#> SRR522136 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522137 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522138 4 0.0469 0.921 0.000 0.012 0.000 0.988
#> SRR522139 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522140 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522141 4 0.0188 0.917 0.004 0.000 0.000 0.996
#> SRR522142 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522143 4 0.0817 0.917 0.000 0.024 0.000 0.976
#> SRR522144 4 0.0188 0.921 0.000 0.004 0.000 0.996
#> SRR522145 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522146 4 0.0336 0.921 0.000 0.008 0.000 0.992
#> SRR522147 4 0.2530 0.870 0.000 0.112 0.000 0.888
#> SRR522148 4 0.0000 0.920 0.000 0.000 0.000 1.000
#> SRR522149 4 0.0707 0.919 0.000 0.020 0.000 0.980
#> SRR522150 4 0.0336 0.921 0.000 0.008 0.000 0.992
cbind(get_classes(res, k = 5), get_membership(res, k = 5))
#> class entropy silhouette p1 p2 p3 p4 p5
#> SRR522063 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522071 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522074 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522077 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0000 1.000 1 0.000 0.000 0.000 0.000
#> SRR522079 2 0.3143 0.720 0 0.796 0.000 0.000 0.204
#> SRR522080 2 0.3684 0.574 0 0.720 0.000 0.000 0.280
#> SRR522081 5 0.2020 0.964 0 0.100 0.000 0.000 0.900
#> SRR522082 5 0.1892 0.962 0 0.080 0.000 0.004 0.916
#> SRR522083 5 0.1908 0.965 0 0.092 0.000 0.000 0.908
#> SRR522084 5 0.3336 0.816 0 0.228 0.000 0.000 0.772
#> SRR522085 5 0.1831 0.959 0 0.076 0.000 0.004 0.920
#> SRR522086 5 0.2011 0.965 0 0.088 0.000 0.004 0.908
#> SRR522087 5 0.2179 0.964 0 0.100 0.000 0.004 0.896
#> SRR522088 5 0.2233 0.962 0 0.104 0.000 0.004 0.892
#> SRR522089 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522090 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522091 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522092 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522093 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522094 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522095 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522096 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522097 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522098 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522099 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522100 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522101 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522102 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522103 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522104 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522105 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522106 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522107 3 0.0000 0.997 0 0.000 1.000 0.000 0.000
#> SRR522108 2 0.0609 0.936 0 0.980 0.000 0.000 0.020
#> SRR522109 2 0.0404 0.940 0 0.988 0.000 0.000 0.012
#> SRR522110 2 0.0404 0.940 0 0.988 0.000 0.000 0.012
#> SRR522111 2 0.0162 0.941 0 0.996 0.000 0.000 0.004
#> SRR522112 2 0.0404 0.940 0 0.988 0.000 0.000 0.012
#> SRR522113 2 0.0404 0.940 0 0.988 0.000 0.000 0.012
#> SRR522114 2 0.2597 0.846 0 0.872 0.004 0.004 0.120
#> SRR522115 3 0.1904 0.934 0 0.028 0.936 0.016 0.020
#> SRR522116 2 0.2629 0.829 0 0.880 0.104 0.004 0.012
#> SRR522117 2 0.2597 0.875 0 0.896 0.040 0.004 0.060
#> SRR522118 2 0.0324 0.937 0 0.992 0.000 0.004 0.004
#> SRR522119 2 0.0162 0.939 0 0.996 0.000 0.004 0.000
#> SRR522120 2 0.0162 0.941 0 0.996 0.000 0.000 0.004
#> SRR522121 2 0.0162 0.941 0 0.996 0.000 0.000 0.004
#> SRR522122 2 0.0162 0.941 0 0.996 0.000 0.000 0.004
#> SRR522123 2 0.0162 0.941 0 0.996 0.000 0.000 0.004
#> SRR522124 2 0.1012 0.924 0 0.968 0.000 0.020 0.012
#> SRR522125 2 0.2777 0.810 0 0.864 0.000 0.120 0.016
#> SRR522126 2 0.1106 0.920 0 0.964 0.000 0.024 0.012
#> SRR522127 2 0.0566 0.933 0 0.984 0.000 0.004 0.012
#> SRR522128 2 0.0609 0.936 0 0.980 0.000 0.000 0.020
#> SRR522129 2 0.0404 0.940 0 0.988 0.000 0.000 0.012
#> SRR522130 2 0.0162 0.941 0 0.996 0.000 0.000 0.004
#> SRR522131 4 0.2179 0.883 0 0.112 0.000 0.888 0.000
#> SRR522132 4 0.1430 0.938 0 0.052 0.000 0.944 0.004
#> SRR522133 4 0.1270 0.940 0 0.052 0.000 0.948 0.000
#> SRR522134 4 0.2616 0.879 0 0.100 0.000 0.880 0.020
#> SRR522135 4 0.1908 0.903 0 0.092 0.000 0.908 0.000
#> SRR522136 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522137 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522138 4 0.0162 0.970 0 0.004 0.000 0.996 0.000
#> SRR522139 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522140 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522141 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522142 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522143 4 0.0000 0.970 0 0.000 0.000 1.000 0.000
#> SRR522144 4 0.0162 0.970 0 0.004 0.000 0.996 0.000
#> SRR522145 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522146 4 0.0162 0.970 0 0.004 0.000 0.996 0.000
#> SRR522147 4 0.0566 0.966 0 0.012 0.000 0.984 0.004
#> SRR522148 4 0.0162 0.970 0 0.000 0.000 0.996 0.004
#> SRR522149 4 0.0324 0.969 0 0.004 0.000 0.992 0.004
#> SRR522150 4 0.0290 0.968 0 0.000 0.000 0.992 0.008
cbind(get_classes(res, k = 6), get_membership(res, k = 6))
#> class entropy silhouette p1 p2 p3 p4 p5 p6
#> SRR522063 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522064 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522065 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522066 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522067 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522068 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522069 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522070 1 0.0146 0.997 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522071 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522072 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522073 1 0.0146 0.997 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522074 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522075 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522076 1 0.0146 0.997 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522077 1 0.0000 0.999 1.000 0.000 0.000 0.000 0.000 0.000
#> SRR522078 1 0.0146 0.997 0.996 0.000 0.000 0.000 0.000 0.004
#> SRR522079 2 0.2278 0.769 0.000 0.868 0.000 0.000 0.128 0.004
#> SRR522080 2 0.2994 0.633 0.000 0.788 0.000 0.000 0.208 0.004
#> SRR522081 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522082 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522083 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522084 5 0.1387 0.912 0.000 0.068 0.000 0.000 0.932 0.000
#> SRR522085 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522086 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522087 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522088 5 0.0000 0.988 0.000 0.000 0.000 0.000 1.000 0.000
#> SRR522089 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522090 3 0.0146 0.996 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522091 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522092 3 0.0260 0.995 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR522093 3 0.0260 0.995 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR522094 3 0.0260 0.995 0.000 0.000 0.992 0.000 0.000 0.008
#> SRR522095 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522096 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522097 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522098 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522099 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522100 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522101 3 0.0146 0.997 0.000 0.000 0.996 0.000 0.000 0.004
#> SRR522102 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522103 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522104 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522105 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522106 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522107 3 0.0000 0.997 0.000 0.000 1.000 0.000 0.000 0.000
#> SRR522108 2 0.0291 0.933 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR522109 2 0.0291 0.933 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR522110 2 0.0146 0.934 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522111 2 0.0146 0.934 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522112 2 0.0291 0.933 0.000 0.992 0.000 0.000 0.004 0.004
#> SRR522113 2 0.0146 0.934 0.000 0.996 0.000 0.000 0.000 0.004
#> SRR522114 6 0.5413 0.719 0.000 0.392 0.004 0.016 0.064 0.524
#> SRR522115 6 0.5324 0.365 0.000 0.024 0.328 0.068 0.000 0.580
#> SRR522116 6 0.5579 0.748 0.000 0.364 0.076 0.028 0.000 0.532
#> SRR522117 6 0.5294 0.732 0.000 0.412 0.020 0.028 0.016 0.524
#> SRR522118 2 0.1007 0.906 0.000 0.956 0.000 0.000 0.000 0.044
#> SRR522119 2 0.2346 0.772 0.000 0.868 0.000 0.008 0.000 0.124
#> SRR522120 2 0.0363 0.932 0.000 0.988 0.000 0.000 0.000 0.012
#> SRR522121 2 0.0790 0.919 0.000 0.968 0.000 0.000 0.000 0.032
#> SRR522122 2 0.0547 0.928 0.000 0.980 0.000 0.000 0.000 0.020
#> SRR522123 2 0.0458 0.930 0.000 0.984 0.000 0.000 0.000 0.016
#> SRR522124 6 0.4823 0.775 0.000 0.348 0.000 0.068 0.000 0.584
#> SRR522125 6 0.5204 0.736 0.000 0.292 0.000 0.124 0.000 0.584
#> SRR522126 6 0.4893 0.775 0.000 0.340 0.000 0.076 0.000 0.584
#> SRR522127 6 0.4224 0.709 0.000 0.432 0.000 0.016 0.000 0.552
#> SRR522128 2 0.0146 0.933 0.000 0.996 0.000 0.000 0.004 0.000
#> SRR522129 2 0.0000 0.934 0.000 1.000 0.000 0.000 0.000 0.000
#> SRR522130 2 0.0865 0.915 0.000 0.964 0.000 0.000 0.000 0.036
#> SRR522131 4 0.2377 0.861 0.000 0.124 0.000 0.868 0.004 0.004
#> SRR522132 4 0.1390 0.943 0.000 0.032 0.000 0.948 0.004 0.016
#> SRR522133 4 0.1464 0.947 0.000 0.016 0.000 0.944 0.004 0.036
#> SRR522134 4 0.2512 0.868 0.000 0.116 0.000 0.868 0.008 0.008
#> SRR522135 4 0.2002 0.933 0.000 0.012 0.000 0.908 0.004 0.076
#> SRR522136 4 0.0260 0.950 0.000 0.000 0.000 0.992 0.000 0.008
#> SRR522137 4 0.0547 0.950 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR522138 4 0.1531 0.940 0.000 0.000 0.000 0.928 0.004 0.068
#> SRR522139 4 0.0790 0.941 0.000 0.000 0.000 0.968 0.000 0.032
#> SRR522140 4 0.1267 0.929 0.000 0.000 0.000 0.940 0.000 0.060
#> SRR522141 4 0.0865 0.940 0.000 0.000 0.000 0.964 0.000 0.036
#> SRR522142 4 0.1007 0.937 0.000 0.000 0.000 0.956 0.000 0.044
#> SRR522143 4 0.0858 0.950 0.000 0.000 0.000 0.968 0.004 0.028
#> SRR522144 4 0.1588 0.938 0.000 0.000 0.000 0.924 0.004 0.072
#> SRR522145 4 0.0547 0.945 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR522146 4 0.1584 0.941 0.000 0.000 0.000 0.928 0.008 0.064
#> SRR522147 4 0.1524 0.942 0.000 0.000 0.000 0.932 0.008 0.060
#> SRR522148 4 0.0547 0.945 0.000 0.000 0.000 0.980 0.000 0.020
#> SRR522149 4 0.1584 0.942 0.000 0.000 0.000 0.928 0.008 0.064
#> SRR522150 4 0.0891 0.950 0.000 0.000 0.000 0.968 0.008 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.
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